2009-07-24  Kenneth Rohde Christiansen  <kenneth@webkit.org>

        Build fix for Qt.

        Fix build issue introduced in 46344
        ([Bug 22700] ApplicationCache should have size limit)

        Remove method only added to the Qt ChromeClient.

        * WebCoreSupport/ChromeClientQt.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  Kenneth Rohde Christiansen  <kenneth@webkit.org>

        Build fix for 64 bit Linux.

        int64_t is long on Linux 64 bit and not long long, thus
        getFileSize with a int64_t out value fails to build.

        Use a temporary to work around the problem.

        * loader/appcache/ApplicationCacheStorage.cpp:
        (WebCore::ApplicationCacheStorage::spaceNeeded):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46353 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Gustavo Noronha.

        Remove unneeded commas from PKG_CHECK_MODULES.

        * configure.ac:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  Jakob Petsovits  <jakob.petsovits@torchmobile.com>

         Reviewed by Adam Treat.

         Filetype support changes for cpplint and check_webkit_style
         https://bugs.webkit.org/show_bug.cgi?id=27653

         Introduce .c support for check_webkit_style, and remove support for
         .cc files in favor of .cpp.

         * Scripts/check-webkit-style:
         * Scripts/modules/cpplint.py:
         * Scripts/modules/cpplint_unittest.py:

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

        * bindings/js/JSAbstractWorkerCustom.cpp:
        (WebCore::toJS):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  David Levin  <levin@chromium.org>

        Reviewed by Adam Treat.

        cpplint crash when there is a duplicate header followed by another header.
        https://bugs.webkit.org/show_bug.cgi?id=27625

        * Scripts/modules/cpplint.py: Ensure that include_state.header_types is updated even
          there is a duplicate header, which resulted in some code rearrangement.  Also,
          changed some if's in this function to return early.  This avoids having nearly the
          whole function content being indented.
        * Scripts/modules/cpplint_unittest.py: Added a test which would have exposed the crash.

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

        * bindings/js/JSAbstractWorkerCustom.cpp:



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

2009-07-24  Brent Fulgham  <bfulgham@webkit.org>

        Reviewed by Dave Hyatt.

        Clean up dependencies on Apple support libraries for non-Apple build.
        http://bugs.webkit.org/show_bug.cgi?id=27532.

        * platform/graphics/win/SimpleFontDataWin.cpp: Conditionalize references
          to ApplicationServices.h and WebKitSystemInterface.h

WebKit/win:

2009-07-24  Brent Fulgham  <bfulgham@webkit.org>

        Reviewed by Dave Hyatt.

        Clean up dependencies on Apple support libraries for non-Apple build.
        http://bugs.webkit.org/show_bug.cgi?id=27532.

        * DefaultDownloadDelegate.h: Conditionalize include of CFNetwork.h
        * WebDownload.h: Conditionalize include of CFNetwork.h
        * WebMutableURLRequest.cpp: Conditionalize include of CFNetwork.h



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46359 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  Jian Li  <jianli@chromium.org>

        Reviewed by Eric Seidel.

        [V8] More V8 bindings changes to use ErrorEvent.
        https://bugs.webkit.org/show_bug.cgi?id=27630

        * bindings/v8/DOMObjectsInclude.h:
        * bindings/v8/DerivedSourcesAllInOne.cpp:
        * bindings/v8/V8DOMWrapper.cpp:
        (WebCore::V8DOMWrapper::convertEventToV8Object):
        * bindings/v8/V8Index.cpp:
        * bindings/v8/V8Index.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Anders Carlsson.

        Add the shadow style member to the ShadowData constructor and ==
        operator

        * rendering/style/ShadowData.cpp:
        (WebCore::ShadowData::ShadowData):
        (WebCore::ShadowData::operator==):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  Joseph Pecoraro  <joepeck02@gmail.com>

        Reviewed by Timothy Hatcher.

        REGRESSION: inspector seems broken in ToT WebKit
        https://bugs.webkit.org/show_bug.cgi?id=27646

        * inspector/front-end/Console.js:
        (WebInspector.Console.prototype._ensureCommandLineAPIInstalled):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  Stephen White  <senorblanco@chromium.org>

        Reviewed by David Levin.

        Reverting r46157, since it may be causing problems with Chromium
        reliability (see http://crbug.com/17569).

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

        * platform/graphics/skia/GraphicsContextSkia.cpp:
        (WebCore::GraphicsContext::drawLine):
        * platform/graphics/skia/PlatformContextSkia.cpp:
        (PlatformContextSkia::setupPaintForStroking):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  Antonio Gomes   <antonio.gomes@openbossa.org>

        Reviewed by Simon Hausmann.

        [QT] Implement originalUrl getter method to the API
        https://bugs.webkit.org/show_bug.cgi?id=25867

        * Api/qwebframe.cpp:
        (QWebFrame::originalUrl):
        * Api/qwebframe.h:
        * tests/qwebframe/qwebframe.qrc:
        * tests/qwebframe/test1.html: Added.
        * tests/qwebframe/test2.html: Added.
        * tests/qwebframe/tst_qwebframe.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  Jian Li  <jianli@chromium.org>

        Reviewed by Adam Barth.

        [V8] Cleanup exception handling in worker evaluation code.
        https://bugs.webkit.org/show_bug.cgi?id=27282

        * bindings/v8/WorkerContextExecutionProxy.cpp:
        (WebCore::WorkerContextExecutionProxy::evaluate):
        * bindings/v8/WorkerContextExecutionProxy.h:
        (WebCore::WorkerContextExecutionState::WorkerContextExecutionState):
        * bindings/v8/WorkerScriptController.cpp:
        (WebCore::WorkerScriptController::evaluate):
        (WebCore::WorkerScriptController::setException):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  Andre Pedralho  <andre.pedralho@openbossa.org>

        Reviewed by Adam Treat.

        Removed void QWebFrame::renderContents(...) and added the Q_PROPERTY
        clipRenderToViewport to control whether QWebFrame::render would call
        FrameView::paintContents rather than FrameView::paint and do not clip
        the frame content to viewport.
        https://bugs.webkit.org/show_bug.cgi?id=26352

        * Api/qwebframe.cpp:
        (QWebFramePrivate::renderPrivate):
        (QWebFrame::clipRenderToViewport):
        (QWebFrame::setClipRenderToViewport):
        * Api/qwebframe.h:
        * Api/qwebframe_p.h:
        (QWebFramePrivate::QWebFramePrivate):
        * tests/qwebframe/tst_qwebframe.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  Antonio Gomes   <antonio.gomes@openbossa.org>

        Reviewed by Adam Treat.

        As per discussion on IRC, changed originalUrl by requestedUrl.

        * Api/qwebframe.cpp:
        (QWebFrame::requestedUrl):
        * Api/qwebframe.h:
        * tests/qwebframe/tst_qwebframe.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  Eric Seidel  <eric@webkit.org>

        Reviewed by Adam Barth.

        Fix the last of the x-frame constructor calls to have the right prototype chains
        https://bugs.webkit.org/show_bug.cgi?id=27645

        I also had to add support for passing arguments to constructors
        in order to test the Worker constructor.

        * fast/dom/constructed-objects-prototypes-expected.txt:
        * fast/dom/resources/constructed-objects-prototypes.js:

2009-07-24  Eric Seidel  <eric@webkit.org>

        Reviewed by Adam Barth.

        Fix the last of the x-frame constructor calls to have the right prototype chains
        https://bugs.webkit.org/show_bug.cgi?id=27645

        Fix the last few constructors to use their stored globalObject pointer when
        constructing objects instead of the lexicalGlobalObject().

        * bindings/js/JSAudioConstructor.cpp:
        (WebCore::constructAudio):
        * bindings/js/JSImageConstructor.cpp:
        (WebCore::constructImage):
        * bindings/js/JSMessageChannelConstructor.cpp:
        (WebCore::JSMessageChannelConstructor::construct):
        * bindings/js/JSOptionConstructor.cpp:
        (WebCore::constructHTMLOptionElement):
        * bindings/js/JSWebKitPointConstructor.cpp:
        (WebCore::constructWebKitPoint):
        * bindings/js/JSWorkerConstructor.cpp:
        (WebCore::constructWorker):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  Drew Wilson  <atwilson@google.com>

        Reviewed by Adam Barth.

        Refactor WorkerContext to move DedicatedWorker-specific APIs into DedicatedWorkerContext
        https://bugs.webkit.org/show_bug.cgi?id=27420

        No new tests as the existing tests already provide sufficient coverage (this is just a refactoring with no new functionality).

        * DerivedSources.cpp:
        Added JSDerivedWorkerContext.cpp
        * DerivedSources.make:
        Added DerivedWorkerContext files
        * GNUmakefile.am:
        Added DerivedWorkerContext files
        * WebCore.gypi:
        Added DerivedWorkerContext files
        * WebCore.pro:
        Added DerivedWorkerContext files
        * WebCore.vcproj/WebCore.vcproj:
        Added DerivedWorkerContext files
        * WebCore.xcodeproj/project.pbxproj:
        Added DerivedWorkerContext files
        * bindings/js/JSDedicatedWorkerContextCustom.cpp: Added.
        (WebCore::JSDedicatedWorkerContext::mark):
        Custom mark function for onmessage event handler.
        * bindings/js/JSEventTarget.cpp:
        (WebCore::toJS):
        Supports conversion to JSDedicatedWorkerContext.
        (WebCore::toEventTarget):
        * bindings/js/JSWorkerContextCustom.cpp:
        (WebCore::JSWorkerContext::mark):
        Moved onmessage mark handling into DedicatedWorkerContext.
        * bindings/js/WorkerScriptController.cpp:
        Added appropriate casts to DedicatedWorkerContext for postMessage().
        (WebCore::WorkerScriptController::initScript):
        Manually sets up the prototype chain for the worker context.
        * bindings/scripts/CodeGeneratorJS.pm:
        Changed special case code for WorkerContext to be triggered by new IsWorkerContext attribute.
        * bindings/scripts/CodeGeneratorV8.pm:
        Changed hard-coded tests for WorkerContext to support DedicatedWorkerContext.
        * bindings/v8/DOMObjectsInclude.h:
        Added DedicatedWorkerContext.h
        * bindings/v8/DerivedSourcesAllInOne.cpp:
        Added V8DedicatedWorkerContext.cpp
        * bindings/v8/V8DOMWrapper.cpp:
        (WebCore::V8DOMWrapper::getTemplate):
        Added code to reserve extra fields for V8DedicatedWorkerContext.
        * bindings/v8/V8Index.cpp:
        Now includes V8DedicatedWorkerContext.h in addition to V8WorkerContext.h
        * bindings/v8/V8Index.h:
        Added DedicatedWorkerContext as a non-node wrapper type.
        Removed WORKERCONTEXT as a valid template type.
        * bindings/v8/WorkerContextExecutionProxy.cpp:
        (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
        Creates DedicatedWorkerContext instead of WorkerContext.
        (WebCore::WorkerContextExecutionProxy::EventTargetToV8Object):
        Returns DedicatedWorkerContext instead of WorkerContext.
        (WebCore::WorkerContextExecutionProxy::retrieve):
        Refactored to deal with DedicatedWorkerContext.
        * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
        * bindings/v8/custom/V8CustomBinding.h:
        * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: Added.
        Moved onmessage code from V8WorkerContextCustom.cpp
        (WebCore::ACCESSOR_GETTER):
        (WebCore::ACCESSOR_SETTER):
        * bindings/v8/custom/V8WorkerContextCustom.cpp:
        Moved onmessage code to V8DedicatedWorkerContextCustom.cpp
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::toDedicatedWorkerContext):
        * dom/EventTarget.h:
        * workers/DedicatedWorkerContext.cpp: Added.
        Moved DedicatedWorker-only APIs from WorkerContext.
        (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
        (WebCore::DedicatedWorkerContext::~DedicatedWorkerContext):
        (WebCore::DedicatedWorkerContext::reportException):
        (WebCore::DedicatedWorkerContext::postMessage):
        (WebCore::DedicatedWorkerContext::dispatchMessage):
        * workers/DedicatedWorkerContext.h: Added.
        Moved DedicatedWorker-only APIs from WorkerContext.
        (WebCore::DedicatedWorkerContext::create):
        (WebCore::DedicatedWorkerContext::toDedicatedWorkerContext):
        (WebCore::DedicatedWorkerContext::setOnmessage):
        (WebCore::DedicatedWorkerContext::onmessage):
        * workers/DedicatedWorkerContext.idl: Added.
        * workers/WorkerContext.cpp:
        (WebCore::WorkerContext::~WorkerContext):
        Moved code that notifies parent that worker is closing down into DedicatedWorkerContext.
        * workers/WorkerContext.h:
        (WebCore::WorkerContext::isClosing):
        Exposed closing flag as an API so derived classes can access it.
        * workers/WorkerContext.idl:
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::MessageWorkerContextTask::performTask):
        Calls into DedicatedWorkerContext to handle message.
        * workers/WorkerThread.cpp:
        (WebCore::WorkerThread::workerThread):
        Creates a DedicatedWorkerContext when the thread starts up.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-07-24  Drew Wilson  <atwilson@google.com>

        Reviewed by Adam Barth.

        Refactor WorkerContext to move DedicatedWorker-specific APIs into DedicatedWorkerContext
        https://bugs.webkit.org/show_bug.cgi?id=27420

        No new tests as the existing tests already provide sufficient coverage (this is just a refactoring with no new functionality).

        * DerivedSources.cpp:
        Added JSDerivedWorkerContext.cpp
        * DerivedSources.make:
        Added DerivedWorkerContext files
        * GNUmakefile.am:
        Added DerivedWorkerContext files
        * WebCore.gypi:
        Added DerivedWorkerContext files
        * WebCore.pro:
        Added DerivedWorkerContext files
        * WebCore.vcproj/WebCore.vcproj:
        Added DerivedWorkerContext files
        * WebCore.xcodeproj/project.pbxproj:
        Added DerivedWorkerContext files
        * bindings/js/JSDedicatedWorkerContextCustom.cpp: Added.
        (WebCore::JSDedicatedWorkerContext::mark):
        Custom mark function for onmessage event handler.
        * bindings/js/JSEventTarget.cpp:
        (WebCore::toJS):
        Supports conversion to JSDedicatedWorkerContext.
        (WebCore::toEventTarget):
        * bindings/js/JSWorkerContextCustom.cpp:
        (WebCore::JSWorkerContext::mark):
        Moved onmessage mark handling into DedicatedWorkerContext.
        * bindings/js/WorkerScriptController.cpp:
        Added appropriate casts to DedicatedWorkerContext for postMessage().
        (WebCore::WorkerScriptController::initScript):
        Manually sets up the prototype chain for the worker context.
        * bindings/scripts/CodeGeneratorJS.pm:
        Changed special case code for WorkerContext to be triggered by new IsWorkerContext attribute.
        * bindings/scripts/CodeGeneratorV8.pm:
        Changed hard-coded tests for WorkerContext to support DedicatedWorkerContext.
        * bindings/v8/DOMObjectsInclude.h:
        Added DedicatedWorkerContext.h
        * bindings/v8/DerivedSourcesAllInOne.cpp:
        Added V8DedicatedWorkerContext.cpp
        * bindings/v8/V8DOMWrapper.cpp:
        (WebCore::V8DOMWrapper::getTemplate):
        Added code to reserve extra fields for V8DedicatedWorkerContext.
        * bindings/v8/V8Index.cpp:
        Now includes V8DedicatedWorkerContext.h in addition to V8WorkerContext.h
        * bindings/v8/V8Index.h:
        Added DedicatedWorkerContext as a non-node wrapper type.
        Removed WORKERCONTEXT as a valid template type.
        * bindings/v8/WorkerContextExecutionProxy.cpp:
        (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
        Creates DedicatedWorkerContext instead of WorkerContext.
        (WebCore::WorkerContextExecutionProxy::EventTargetToV8Object):
        Returns DedicatedWorkerContext instead of WorkerContext.
        (WebCore::WorkerContextExecutionProxy::retrieve):
        Refactored to deal with DedicatedWorkerContext.
        * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
        * bindings/v8/custom/V8CustomBinding.h:
        * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: Added.
        Moved onmessage code from V8WorkerContextCustom.cpp
        (WebCore::ACCESSOR_GETTER):
        (WebCore::ACCESSOR_SETTER):
        * bindings/v8/custom/V8WorkerContextCustom.cpp:
        Moved onmessage code to V8DedicatedWorkerContextCustom.cpp
        * dom/EventTarget.cpp:
        (WebCore::EventTarget::toDedicatedWorkerContext):
        * dom/EventTarget.h:
        * workers/DedicatedWorkerContext.cpp: Added.
        Moved DedicatedWorker-only APIs from WorkerContext.
        (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
        (WebCore::DedicatedWorkerContext::~DedicatedWorkerContext):
        (WebCore::DedicatedWorkerContext::reportException):
        (WebCore::DedicatedWorkerContext::postMessage):
        (WebCore::DedicatedWorkerContext::dispatchMessage):
        * workers/DedicatedWorkerContext.h: Added.
        Moved DedicatedWorker-only APIs from WorkerContext.
        (WebCore::DedicatedWorkerContext::create):
        (WebCore::DedicatedWorkerContext::toDedicatedWorkerContext):
        (WebCore::DedicatedWorkerContext::setOnmessage):
        (WebCore::DedicatedWorkerContext::onmessage):
        * workers/DedicatedWorkerContext.idl: Added.
        * workers/WorkerContext.cpp:
        (WebCore::WorkerContext::~WorkerContext):
        Moved code that notifies parent that worker is closing down into DedicatedWorkerContext.
        * workers/WorkerContext.h:
        (WebCore::WorkerContext::isClosing):
        Exposed closing flag as an API so derived classes can access it.
        * workers/WorkerContext.idl:
        * workers/WorkerMessagingProxy.cpp:
        (WebCore::MessageWorkerContextTask::performTask):
        Calls into DedicatedWorkerContext to handle message.
        * workers/WorkerThread.cpp:
        (WebCore::WorkerThread::workerThread):
        Creates a DedicatedWorkerContext when the thread starts up.

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

2009-07-24  Drew Wilson  <atwilson@google.com>

        Reviewed by Adam Barth.

        Updated code generator to properly generate bindings for WorkerContext exposed functions.

        Storing a reference to WorkerContext.postMessage() and calling it later yields a TypeError
        https://bugs.webkit.org/show_bug.cgi?id=27419

        Test: fast/workers/worker-call.html

        * bindings/js/JSWorkerContextBase.cpp:
        (WebCore::toJSDedicatedWorkerContext):
        (WebCore::toJSWorkerContext):
        Functions that convert from JSValue to the appropriate WorkerContext/DedicatedWorkerContext object.
        * bindings/js/JSWorkerContextBase.h:
        Added toJS*WorkerContext APIs.
        * bindings/scripts/CodeGeneratorJS.pm:
        Added code to appropriately check the passed-in this object when invoking functions at global scope.

LayoutTests:

2009-07-24  Drew Wilson  <atwilson@google.com>

        Reviewed by Adam Barth.

       Added layout tests to exercise various use cases for calling functions defined on Worker global scope.

        Storing a reference to WorkerContext.postMessage() and calling it later yields a TypeError
        https://bugs.webkit.org/show_bug.cgi?id=27419

        * fast/workers/resources/worker-call.js: Added.
        * fast/workers/worker-call-expected.txt: Added.
        * fast/workers/worker-call.html: Added.

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