[GStreamer] Remove ImageGStreamerCG implementation
https://bugs.webkit.org/show_bug.cgi?id=87559

The ImageGStreamerCG abstraction is being removed until I manage to
port my gst-mac WebKit branch over to the WebKit2 mac port. No
need to update the XCode project because this file is not
referenced there anyway.

Reviewed by Martin Robinson.

* platform/graphics/gstreamer/ImageGStreamer.h:
(ImageGStreamer):
* platform/graphics/gstreamer/ImageGStreamerCG.mm: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/11439771> WebProcess sends many synchronous messages to the UI process while scrolling beneath ScrollView::contentsToScreen()
https://bugs.webkit.org/show_bug.cgi?id=87571

Reviewed by Anders Carlsson.

fakeMouseEventTimerFired() uses the last known mouse position for the fake mouse event, but
calls contentsToScreen() to compute a corresponding position in screen coordinates. Avoid
this by also recording the last known mouse position in screen coordinates, and using that
value.

* page/EventHandler.cpp:
(WebCore::EventHandler::clear): Added resetting m_currentMouseGlobalPosition.
(WebCore::EventHandler::handleMousePressEvent): Added updating m_currentMouseGlobalPosition
when updating m_currentMousePosition.
(WebCore::EventHandler::handleMouseDoubleClickEvent): Ditto.
(WebCore::EventHandler::handleMouseMoveEvent): Ditto.
(WebCore::EventHandler::handleMouseReleaseEvent): Ditto.
(WebCore::EventHandler::fakeMouseMoveEventTimerFired): Changed to use m_currentMouseGlobalPosition
in the fake event instead of calling contentsToScreen().
* page/EventHandler.h: Added m_currentMouseGlobalPosition data member.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clip rects assertion when hovering div with transform
https://bugs.webkit.org/show_bug.cgi?id=87580

Source/WebCore:

Reviewed by Eric Seidel.

Hit testing used to use temporary clip rects in composited documents,
until r118562. Now that we cache clip rects for hit testing, we need
to clear the cache on descendant layers when a layer gains or loses
a transform.

Test: fast/layers/clip-rects-assertion.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateTransform):

LayoutTests:

Reviewed by Eric Seidel.

Test that changes transform on hover style, testing for clipRect-related
assertions.

* fast/layers/clip-rects-assertion-expected.txt: Added.
* fast/layers/clip-rects-assertion.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
My first commit - set svn:mime-type to image/png on one .png file.

* platform/mac/mathml/presentation/mroot-pref-width-expected.png:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move myself to committers.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r116720): Subframe PDF scrolls extremely slowly
https://bugs.webkit.org/show_bug.cgi?id=87557
<rdar://problem/11499408>

Reviewed by Anders Carlsson.
        
It's not possible to make an automated test for this.

* WebProcess/Plugins/PDF/BuiltInPDFView.mm:
(WebKit::BuiltInPDFView::wantsWheelEvents): Return true instead of false and delete
misleading comment. While the built-in PDF view would get added to the set of scrollable
areas anyway, there are some code paths that check wantsWheelEvents explicitly, so it seems
necessary to reutrn true.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit should be lazy-finalization-safe (esp. the DOM) v2
https://bugs.webkit.org/show_bug.cgi?id=87581

Reviewed by Oliver Hunt.

../JavaScriptCore: 

* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::callDestructor):
* heap/WeakBlock.h:
* heap/WeakSetInlines.h:
(JSC::WeakBlock::finalize): Since we don't guarantee destruction order,
it's not valid to access GC pointers like the Structure pointer during
finalization. We NULL out the structure pointer in debug builds to try
to make this programming mistake more obvious.

* API/JSCallbackConstructor.cpp:
(JSC::JSCallbackConstructor::destroy):
* API/JSCallbackObject.cpp:
(JSC::::destroy):
(JSC::JSCallbackObjectData::finalize):
* runtime/Arguments.cpp:
(JSC::Arguments::destroy):
* runtime/DateInstance.cpp:
(JSC::DateInstance::destroy):
* runtime/Error.cpp:
(JSC::StrictModeTypeErrorFunction::destroy):
* runtime/Executable.cpp:
(JSC::ExecutableBase::destroy):
(JSC::NativeExecutable::destroy):
(JSC::ScriptExecutable::destroy):
(JSC::EvalExecutable::destroy):
(JSC::ProgramExecutable::destroy):
(JSC::FunctionExecutable::destroy):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::destroy):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::destroy):
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::destroy):
* runtime/JSString.cpp:
(JSC::JSString::destroy):
* runtime/JSVariableObject.cpp:
(JSC::JSVariableObject::destroy):
* runtime/NameInstance.cpp:
(JSC::NameInstance::destroy):
* runtime/RegExp.cpp:
(JSC::RegExp::destroy):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::destroy):
* runtime/Structure.cpp:
(JSC::Structure::destroy):
* runtime/StructureChain.cpp:
(JSC::StructureChain::destroy): Use static_cast instead of jsCast because
jsCast does Structure-based validation, and our Structure is not guaranteed
to be alive when we get finalized.

../WebCore: 

* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::destroy):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::destroy):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::destroy):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNodeOwner::finalize):
* bindings/js/JSWorkerContextBase.cpp:
(WebCore::JSWorkerContextBase::destroy):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObject::destroy):
(WebCore::JSTestActiveDOMObjectOwner::finalize):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetter::destroy):
(WebCore::JSTestCustomNamedGetterOwner::finalize):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructor::destroy):
(WebCore::JSTestEventConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::destroy):
(WebCore::JSTestEventTargetOwner::finalize):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestException::destroy):
(WebCore::JSTestExceptionOwner::finalize):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::destroy):
(WebCore::JSTestInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListener::destroy):
(WebCore::JSTestMediaQueryListListenerOwner::finalize):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructor::destroy):
(WebCore::JSTestNamedConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::destroy):
(WebCore::JSTestObjOwner::finalize):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterface::destroy):
(WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcFallbackObjectImp::destroy):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeMethod::destroy):
* bridge/qt/qt_runtime_qt4.cpp:
(JSC::Bindings::QtRuntimeMethod::destroy):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::destroy):
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::destroy):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::destroy):
* bridge/runtime_root.cpp:
(JSC::Bindings::RootObject::finalize): Use static_cast instead of jsCast because
jsCast does Structure-based validation, and our Structure is not guaranteed
to be alive when we get finalized.

../WebKit2: 

* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::destroy):
(WebKit::JSNPObject::leakNPObject):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::finalize): Use static_cast instead of jsCast because
jsCast does Structure-based validation, and our Structure is not guaranteed
to be alive when we get finalized.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fast/block/inline-children-root-linebox-crash.html asserts after r118567
https://bugs.webkit.org/show_bug.cgi?id=87544

Source/WebCore:

Reviewed by Darin Adler.

RenderInline::offsetFromContainer() set offsetDependsOnPoint to true based
on the container's flipped writing mode. However, offsetFromContainer() would
then overwrite that, since it only checked for columns.

Fix by having RenderInline::offsetFromContainer() check for flipping on
the container. This fixes the assertion.

The new testcase exercises fixes another issue; unlike mapLocalToAbsolute(),
RenderGeometryMap::absoluteRect() didn't pass the rect center point through
the mapping, which resulted in a different result in some flipping cases.

Test: compositing/geometry/flipped-blocks-inline-mapping.html

* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::absoluteRect):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::offsetFromContainer):
(WebCore::RenderInline::pushMappingToContainer):

LayoutTests:

Reviewed by Darin Adler.

Remove fast/block/inline-children-root-linebox-crash.html from the skipped
list.

New, more complex writing mode flipping test with compositing.

* compositing/geometry/flipped-blocks-inline-mapping-expected.txt: Added.
* compositing/geometry/flipped-blocks-inline-mapping.html: Added.
* platform/mac/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Cancel CachedResource loads when the last client is removed.
https://bugs.webkit.org/show_bug.cgi?id=35377

Reviewed by Darin Adler.

Test: http/tests/cache/cancel-in-progress-load.html

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::errorLoadingResource):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::allClientsRemoved):
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::allClientsRemoved):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::allClientsRemoved):
* loader/cache/CachedRawResource.cpp:
(WebCore):
* loader/cache/CachedRawResource.h:
(WebCore::CachedRawResource::shouldIgnoreHTTPStatusCodeErrors):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::allClientsRemoved):
(WebCore):
* loader/cache/CachedResource.h:
(CachedResource):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::allClientsRemoved):

LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=35377.

Reviewed by Darin Adler.

* http/tests/cache/cancel-in-progress-load-expected.txt: Added.
* http/tests/cache/cancel-in-progress-load.html: Added.
* http/tests/misc/write-while-waiting.html: Add waitUntilDone()/notifyDone().
    The slow script will now be cancelled when the script element is removed from the document.
    Without waitUntilDone(), LayoutTestController will immediately end the test upon cancellation
    of the last resource.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build when NETSCAPE_PLUGIN_API is disabled by marking a
parameter as unused.

* plugins/PluginData.cpp:
(WebCore::PluginData::initPlugins):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[FileAPI] The result attribute of FileReader shuold use null to replace empty string
https://bugs.webkit.org/show_bug.cgi?id=87578

Patch by Li Yin <li.yin@intel.com> on 2012-05-26
Reviewed by Kentaro Hara.

Source/WebCore:

From Spec: http://www.w3.org/TR/FileAPI/#filedata-attr
Before read method has been called or an error in reading has occurred,
the result attribute should be null, not empty string.

Currently, Firefox, Opera and IE 10 follows the spec, but Webkit based
browser don't.
WebKit should change the returned value empty string into null to keep
conformance with the spec.

Tests: fast/files/read-file-async.html
       fast/files/blob-slice-test.html
       fast/files/read-blob-async.html
       fast/files/workers/worker-read-blob-async.html
       fast/files/workers/worker-read-file-async.html

* fileapi/FileReader.cpp:
(WebCore::FileReader::stringResult):

LayoutTests:

From Spec: http://www.w3.org/TR/FileAPI/#filedata-attr
Before read method has been called or an error in reading has occurred,
the result attribute should be null, not empty string.
WebKit should change the returned value empty string into null to keep
conformance with the spec.

* fast/files/blob-slice-test-expected.txt:
* fast/files/read-blob-async-expected.txt:
* fast/files/read-file-async-expected.txt:
* fast/files/resources/read-common.js:
(logResult):
* fast/files/workers/worker-read-blob-async-expected.txt:
* fast/files/workers/worker-read-file-async-expected.txt:

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