WebKit-https.git
7 years agoIDB: Support createIndex/deleteIndex
beidson@apple.com [Fri, 24 Jan 2014 23:05:51 +0000 (23:05 +0000)]
IDB: Support createIndex/deleteIndex
<rdar://problem/15779642> and https://bugs.webkit.org/show_bug.cgi?id=127585

Reviewed by Tim Horton.

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::createIndex):
(WebKit::UniqueIDBDatabase::deleteIndex):
(WebKit::UniqueIDBDatabase::createIndexInBackingStore):
(WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteObjectStore): Also drop all associated indexes.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::deleteIndex):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

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

7 years ago[New Multicolumn] Don't destroy all the renderers when a multi-column block stops...
hyatt@apple.com [Fri, 24 Jan 2014 22:52:41 +0000 (22:52 +0000)]
[New Multicolumn] Don't destroy all the renderers when a multi-column block stops being multi-column (and vice versa)
https://bugs.webkit.org/show_bug.cgi?id=127584

Make the logic for when you need columns and when you don't shared between the
old multi-column code and the new multi-column code. Make sure that the flow thread
and sets get created lazily and destroyed on-demand when whether or not we should
have multiple columns changes.

Reviewed by Beth Dakin.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateLogicalWidthAndColumnWidth):
No longer virtual. The new column code now uses this function too.

(WebCore::RenderBlock::availableLogicalWidth):
Renamed desiredColumnWidth() to computedColumnWidth().

(WebCore::RenderBlock::computeColumnCountAndWidth):
Renamed calcColumnWidth to computeColumnCountAndWidth.

(WebCore::RenderBlock::setComputedColumnCountAndWidth):
Rename setDesiredColumnCountAndWidth to computed.

(WebCore::RenderBlock::computedColumnWidth):
(WebCore::RenderBlock::computedColumnCount):
Renamed desiredColumnWidth/Count to computedColumnWidth/Count and made them virtual.

(WebCore::RenderBlock::updateFirstLetterStyle):
desired -> computed rename.

* rendering/RenderBlock.h:
Renames and made a few functions virtual so that RenderBlockFlow can override.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::RenderBlockFlow):
Don't create the flow thread at construction time any longer.

(WebCore::RenderBlockFlow::createMultiColumnFlowThread):
(WebCore::RenderBlockFlow::destroyMultiColumnFlowThread):
The methods to create and destroy flow threads. These work at any time now and will
fix up the render tree accordingly.

(WebCore::RenderBlockFlow::setComputedColumnCountAndWidth):
Virtual override that creates/destroys the new multi-column information as needed.

(WebCore::RenderBlockFlow::computedColumnWidth):
(WebCore::RenderBlockFlow::computedColumnCount):
Overrides to return the cached column width and count from the flow thread.

* rendering/RenderBlockFlow.h:
Has overrides of the virtual functions needed to turn multi-column state on/off and
to hand back computed count/width information.

* rendering/RenderMultiColumnFlowThread.cpp:
* rendering/RenderMultiColumnFlowThread.h:
Removed the algorithm to compute column count and width, since this has been combined
with the old multi-column layout code.

* rendering/RenderView.cpp:
(WebCore::RenderView::computeColumnCountAndWidth):
Renamed desired -> computed.

* rendering/RenderView.h:
Renamed desired -> computed.

* style/StyleResolveTree.cpp:
(WebCore::Style::determineChange):
(WebCore::Style::resolveLocal):
(WebCore::Style::resolveTree):
* style/StyleResolveTree.h:
The Settings argument is no longer needed now that we don't destroy and re-create
the renderer for a block flow if it stops being (or becomes) multi-column.

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

7 years agoFix 32-bit build.
andersca@apple.com [Fri, 24 Jan 2014 22:29:03 +0000 (22:29 +0000)]
Fix 32-bit build.

* WebCore.exp.in:

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

7 years ago[GTK] youtube HTML5 videos in fullscreen, after <Esc>, can't go fullscreen again
vjaquez@igalia.com [Fri, 24 Jan 2014 22:05:22 +0000 (22:05 +0000)]
[GTK] youtube HTML5 videos in fullscreen, after <Esc>, can't go fullscreen again
https://bugs.webkit.org/show_bug.cgi?id=127064

When pressing <Esc> or <f> at full screen, the WebView shall emit the
event webkitfullscreenchange, but wk2gtk does not emit it. This is
because the WebView manages directly the exit of the full screen.

With this patch the WebView calls requestExitFullScreen to the full
screen manager, instead of managing directly the exit of the full
screen, and the event webkitfullscreenchange will be dispatched
correctly.

Reviewed by Martin Robinson.

No tests are included because there is a bug in WKTR that prevents the
execution of a test for this patch. See
https://bugs.webkit.org/show_bug.cgi?id=127348

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseKeyPressEvent): Call
webkitWebViewBaseRequestExitFullScreen.
(webkitWebViewBaseRequestExitFullScreen): Added.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Ditto.

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

7 years ago[Win] Convert some NMake files to MSBuild project files
bfulgham@apple.com [Fri, 24 Jan 2014 22:01:10 +0000 (22:01 +0000)]
[Win] Convert some NMake files to MSBuild project files
https://bugs.webkit.org/show_bug.cgi?id=127579

Reviewed by Tim Horton.

../JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCore.make: Removed.
* JavaScriptCore.vcxproj/JavaScriptCore.proj: Added.

../WebCore:

* WebCore.vcxproj/WebCore.make: Removed.
* WebCore.vcxproj/WebCore.proj: Added.

../WTF:

* WTF.vcxproj/WTF.make: Removed.
* WTF.vcxproj/WTF.proj: Added.

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

7 years agoFixed a bad assertion in CodeBlock::removeBreakpoint().
mark.lam@apple.com [Fri, 24 Jan 2014 21:46:25 +0000 (21:46 +0000)]
Fixed a bad assertion in CodeBlock::removeBreakpoint().
<https://webkit.org/b/127581>

Reviewed by Joseph Pecoraro.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::removeBreakpoint):

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

7 years agoiOS build fix after r162710.
timothy_horton@apple.com [Fri, 24 Jan 2014 21:28:25 +0000 (21:28 +0000)]
iOS build fix after r162710.

This is why these sorts of comments are bad.

* UIProcess/WebPageProxy.cpp:

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

7 years agofast/profiler tests ASSERTing after moving recompileAllJSFunctions off a timer
joepeck@webkit.org [Fri, 24 Jan 2014 21:27:42 +0000 (21:27 +0000)]
fast/profiler tests ASSERTing after moving recompileAllJSFunctions off a timer
https://bugs.webkit.org/show_bug.cgi?id=127566

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

Make the VM handle recompilation as soon as possible after it is requested.

* debugger/Debugger.cpp:
(JSC::Debugger::recompileAllJSFunctions):
When in a JavaScript stack, mark for recompilation when possible.

* runtime/VMEntryScope.h:
(JSC::VMEntryScope::setRecompilationNeeded):
* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::~VMEntryScope):
Handle recompilation when the top VMEntryScope is popped.
Pass the needs recompilation flag up the stack if needed.

Source/WebCore:

Covered by existing tests.

* testing/Internals.cpp:
(WebCore::Internals::closeDummyInspectorFrontend):
Now that we don't have to fake that this is a page being destroyed to
avoid recompilation. Use the InspectorDestroyed reason.

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

7 years agoUse a side table to map WebPageProxy objects to WKBrowsingContextController objects
andersca@apple.com [Fri, 24 Jan 2014 21:25:23 +0000 (21:25 +0000)]
Use a side table to map WebPageProxy objects to WKBrowsingContextController objects
https://bugs.webkit.org/show_bug.cgi?id=127577

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(browsingContextControllerMap):
(-[WKBrowsingContextController dealloc]):
(-[WKBrowsingContextController _initWithPageRef:]):
(+[WKBrowsingContextController _browsingContextControllerForPageRef:]):
* UIProcess/API/Cocoa/WKBrowsingContextControllerInternal.h:
* UIProcess/WebPageProxy.h:

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

7 years agoGeneric JSObject::put should handle static properties in the classinfo hierarchy
mark.lam@apple.com [Fri, 24 Jan 2014 21:23:17 +0000 (21:23 +0000)]
Generic JSObject::put should handle static properties in the classinfo hierarchy
https://bugs.webkit.org/show_bug.cgi?id=127523

Patch by Oliver Hunt <oliver@apple.com> on 2014-01-24
Reviewed by Geoffrey Garen.

This patch makes JSObject::put correctly call static setters
defined by the ClassInfo.

To make this not clobber performance, the ClassInfo HashTable
now includes a flag to indicate that it contains setters. This
required updating the lut generator so that it tracked (and emitted)
this.

The rest of the change was making a number of the methods take
a VM rather than an ExecState*, so that Structure could set the
getter/setter flags during construction (if necessary).

This also means most objects do not need to perform a lookupPut
manually anymore, so most custom ::put's are no longer needed.
DOMWindow is the only exception as it has interesting security
related semantics.

* create_hash_table:
* interpreter/CallFrame.h:
(JSC::ExecState::arrayConstructorTable):
(JSC::ExecState::arrayPrototypeTable):
(JSC::ExecState::booleanPrototypeTable):
(JSC::ExecState::dataViewTable):
(JSC::ExecState::dateTable):
(JSC::ExecState::dateConstructorTable):
(JSC::ExecState::errorPrototypeTable):
(JSC::ExecState::globalObjectTable):
(JSC::ExecState::jsonTable):
(JSC::ExecState::numberConstructorTable):
(JSC::ExecState::numberPrototypeTable):
(JSC::ExecState::objectConstructorTable):
(JSC::ExecState::privateNamePrototypeTable):
(JSC::ExecState::regExpTable):
(JSC::ExecState::regExpConstructorTable):
(JSC::ExecState::regExpPrototypeTable):
(JSC::ExecState::stringConstructorTable):
(JSC::ExecState::promisePrototypeTable):
(JSC::ExecState::promiseConstructorTable):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::getOwnPropertySlot):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::getOwnPropertySlot):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::getOwnPropertySlot):
* runtime/ClassInfo.h:
(JSC::ClassInfo::propHashTable):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::getOwnPropertySlot):
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::getOwnPropertySlot):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::getOwnPropertySlot):
* runtime/JSDataViewPrototype.cpp:
(JSC::JSDataViewPrototype::getOwnPropertySlot):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::getOwnPropertySlot):
* runtime/JSONObject.cpp:
(JSC::JSONObject::getOwnPropertySlot):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::deleteProperty):
* runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::getOwnPropertySlot):
* runtime/JSPromisePrototype.cpp:
(JSC::JSPromisePrototype::getOwnPropertySlot):
* runtime/Lookup.h:
(JSC::HashTable::copy):
(JSC::putEntry):
(JSC::lookupPut):
* runtime/NamePrototype.cpp:
(JSC::NamePrototype::getOwnPropertySlot):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::getOwnPropertySlot):
* runtime/NumberConstructor.h:
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::getOwnPropertySlot):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::getOwnPropertySlot):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::getOwnPropertySlot):
* runtime/RegExpConstructor.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::getOwnPropertySlot):
(JSC::RegExpObject::put):
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::getOwnPropertySlot):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::getOwnPropertySlot):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::freezeTransition):
(JSC::ClassInfo::hasStaticSetterOrReadonlyProperties):

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

7 years agoGet rid of monotonicallyIncreasingTimeMS and start using std::chrono instead
andersca@apple.com [Fri, 24 Jan 2014 20:41:50 +0000 (20:41 +0000)]
Get rid of monotonicallyIncreasingTimeMS and start using std::chrono instead
https://bugs.webkit.org/show_bug.cgi?id=127571

Reviewed by Antti Koivisto.

Source/WebCore:

WebCore.exp.in:
Update symbols.

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::implicitClose):
(WebCore::Document::setParsing):
(WebCore::Document::isLayoutTimerActive):
(WebCore::Document::minimumLayoutDelay):
(WebCore::Document::elapsedTime):
(WebCore::Document::write):
(WebCore::Document::styleResolverChanged):
* dom/Document.h:
Use std::chrono instead of doubles for the times and durations.

* fileapi/FileReader.cpp:
(WebCore::FileReader::FileReader):
(WebCore::FileReader::didReceiveData):
* fileapi/FileReader.h:
Switch over to std::chrono.

* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::layoutTimerFired):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
Update for Document::elapsedTime() changes.

* page/Settings.cpp:
(WebCore::Settings::setLayoutInterval):
* page/Settings.h:
(WebCore::Settings::layoutInterval):
Change layoutInterval to be std::chrono::milliseconds instead of int.

* platform/Timer.h:
(WebCore::TimerBase::startOneShot):
Add an overload that takes std::chrono::milliseconds.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Convert the layout interval to std::chrono::milliseconds.

Source/WTF:

* wtf/Compiler.h:
Add a CONSTEXPR define so we can still use constexpr on compilers that don't support them (MSVC).

* wtf/CurrentTime.h:
Remove monotonicallyIncreasingTimeMS().

* wtf/StdLibExtras.h:
(std::literals::chrono_literals::operator _s):
(std::literals::chrono_literals::operator _ms):
Add _s and _ms literals. Once we switch over to C++14, we can drop them and just use the built-in ones.

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

7 years agoiOS build fix after r162710.
timothy_horton@apple.com [Fri, 24 Jan 2014 20:27:47 +0000 (20:27 +0000)]
iOS build fix after r162710.

* UIProcess/API/ios/PageClientImplIOS.h:
* UIProcess/API/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::takeViewSnapshot):

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

7 years ago[GTK] Put cache files in XDG_CACHE_HOME
commit-queue@webkit.org [Fri, 24 Jan 2014 20:06:19 +0000 (20:06 +0000)]
[GTK] Put cache files in XDG_CACHE_HOME
https://bugs.webkit.org/show_bug.cgi?id=123458

Patch by Enrique Ocaña González <eocanha@igalia.com> on 2014-01-24
Reviewed by Martin Robinson.

Source/WebKit/gtk:

* webkit/webkitglobals.cpp:
(webkitInit):
* webkit/webkiticondatabase.cpp:

Source/WebKit2:

* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultIconDatabasePath):

Tools:

* GtkLauncher/main.c:
(createBrowser):

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

7 years agoGeneric JSObject::put should handle static properties in the classinfo hierarchy
oliver@apple.com [Fri, 24 Jan 2014 20:03:34 +0000 (20:03 +0000)]
Generic JSObject::put should handle static properties in the classinfo hierarchy
https://bugs.webkit.org/show_bug.cgi?id=127523

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This patch makes JSObject::put correctly call static setters
defined by the ClassInfo.

To make this not clobber performance, the ClassInfo HashTable
now includes a flag to indicate that it contains setters. This
required updating the lut generator so that it tracked (and emitted)
this.

The rest of the change was making a number of the methods take
a VM rather than an ExecState*, so that Structure could set the
getter/setter flags during construction (if necessary).

This also means most objects do not need to perform a lookupPut
manually anymore, so most custom ::put's are no longer needed.
DOMWindow is the only exception as it has interesting security
related semantics.

* create_hash_table:
* interpreter/CallFrame.h:
(JSC::ExecState::arrayConstructorTable):
(JSC::ExecState::arrayPrototypeTable):
(JSC::ExecState::booleanPrototypeTable):
(JSC::ExecState::dataViewTable):
(JSC::ExecState::dateTable):
(JSC::ExecState::dateConstructorTable):
(JSC::ExecState::errorPrototypeTable):
(JSC::ExecState::globalObjectTable):
(JSC::ExecState::jsonTable):
(JSC::ExecState::numberConstructorTable):
(JSC::ExecState::numberPrototypeTable):
(JSC::ExecState::objectConstructorTable):
(JSC::ExecState::privateNamePrototypeTable):
(JSC::ExecState::regExpTable):
(JSC::ExecState::regExpConstructorTable):
(JSC::ExecState::regExpPrototypeTable):
(JSC::ExecState::stringConstructorTable):
(JSC::ExecState::promisePrototypeTable):
(JSC::ExecState::promiseConstructorTable):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::getOwnPropertySlot):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::getOwnPropertySlot):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::getOwnPropertySlot):
* runtime/ClassInfo.h:
(JSC::ClassInfo::propHashTable):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::getOwnPropertySlot):
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::getOwnPropertySlot):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::getOwnPropertySlot):
* runtime/JSDataViewPrototype.cpp:
(JSC::JSDataViewPrototype::getOwnPropertySlot):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::getOwnPropertySlot):
* runtime/JSONObject.cpp:
(JSC::JSONObject::getOwnPropertySlot):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::deleteProperty):
* runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::getOwnPropertySlot):
* runtime/JSPromisePrototype.cpp:
(JSC::JSPromisePrototype::getOwnPropertySlot):
* runtime/Lookup.h:
(JSC::HashTable::copy):
(JSC::putEntry):
(JSC::lookupPut):
* runtime/NamePrototype.cpp:
(JSC::NamePrototype::getOwnPropertySlot):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::getOwnPropertySlot):
* runtime/NumberConstructor.h:
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::getOwnPropertySlot):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::getOwnPropertySlot):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::getOwnPropertySlot):
* runtime/RegExpConstructor.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::getOwnPropertySlot):
(JSC::RegExpObject::put):
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::getOwnPropertySlot):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::getOwnPropertySlot):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::freezeTransition):
(JSC::ClassInfo::hasStaticSetterOrReadonlyProperties):

Source/WebCore:

Update the bindings generator to emit the flag indicating the presence
of setters, and remove the many (now unnecessary) put overrides.
Tested with run-jsc-benchmarks and shows neutral performance. A few of the
micro benchmarks actually get a significant performance increase which
is nice.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::put):
    We still need a custom call to lookupPut here in order
    to get the magic security semantics of the window object.
* bindings/scripts/CodeGeneratorJS.pm:
(hashTableAccessor):
(prototypeHashTableAccessor):
(constructorHashTableAccessor):
(GenerateImplementation):
(GenerateHashTable):
(GenerateConstructorHelperMethods):

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::put):
* bindings/scripts/CodeGeneratorJS.pm:
(hashTableAccessor):
(prototypeHashTableAccessor):
(constructorHashTableAccessor):
(InstanceOverridesPutImplementation):
(InstanceOverridesPutDeclaration):
(GenerateHeader):
(GenerateImplementation):
(GenerateHashTable):
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::put):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSreadonly.cpp:
* html/canvas/WebGLRenderingContext.idl:
  Remove bogus attribute, as it has never been in the spec and should not
  have been added.

LayoutTests:

Yay tests!

* fast/canvas/webgl/constants.html:
  Remove incorrect constant
* js/script-tests/static-put-in-prototype-chain.js: Added.
* js/static-put-in-prototype-chain-expected.txt: Added.
* js/static-put-in-prototype-chain.html: Added.

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

7 years ago[New Multicolumn] Eliminate RenderMultiColumnBlock
hyatt@apple.com [Fri, 24 Jan 2014 19:55:33 +0000 (19:55 +0000)]
[New Multicolumn] Eliminate RenderMultiColumnBlock
https://bugs.webkit.org/show_bug.cgi?id=127565

Reviewed by Antti Koivisto.

This patch eliminates RenderMultiColumnBlock and folds all of its remaining code
back into RenderBlockFlow. This allows all block flows to support multi-column
layout, including table cells, list items, and the RenderView itself.

* CMakeLists.txt:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Remove RenderMultiColumnBlock from the makefiles.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
Tweak the comment, since it was no longer accurate.

* rendering/RenderBlock.h:
Move some functions down into RenderBlockFlow.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::RenderBlockFlow):
(WebCore::RenderBlockFlow::createMultiColumnFlowThreadIfNeeded):
(WebCore::RenderBlockFlow::styleDidChange):
(WebCore::RenderBlockFlow::relayoutForPagination):
(WebCore::RenderBlockFlow::layoutSpecialExcludedChild):
(WebCore::RenderBlockFlow::updateLogicalWidthAndColumnWidth):
(WebCore::RenderBlockFlow::addChild):
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
 * rendering/RenderBlockFlow.h:
 Move a bunch of functions from RenderMultiColumnBlock up into RenderBlockFlow.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::isUnsplittableForPagination):
Calls isMultiColumnBlockFlow() now instead of testing for a specific renderer type.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
Remove the multicolumn block creation code, since we always make a block flow now.

* rendering/RenderMultiColumnBlock.cpp: Removed.
* rendering/RenderMultiColumnBlock.h: Removed.
Nuke the files.

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::initialLogicalWidth):
(WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
(WebCore::RenderMultiColumnSet::addForcedBreak):
(WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
(WebCore::RenderMultiColumnSet::updateLogicalWidth):
(WebCore::RenderMultiColumnSet::prepareForLayout):
(WebCore::RenderMultiColumnSet::columnGap):
(WebCore::RenderMultiColumnSet::paintColumnRules):
Change all of the functions in the multicolumnset and multicolumnflowthread classes
to cast the parent to a RenderBlockFlow now instead of a RenderMultiColumnBlock.
Change the code to call through to multiColumnFlowThread() for column-specific information
for that parent block.

* rendering/RenderObject.h:
(WebCore::RenderObject::isMultiColumnBlockFlow):
Remove isRenderMultiColumnBlock() and replace with isMultiColumnBlockFlow().

* rendering/RenderingAllInOne.cpp:
Remove RenderMultiColumnBlock include.

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

7 years agoRemoving the need for Debugger* and m_shouldPause op_debug check.
mark.lam@apple.com [Fri, 24 Jan 2014 19:07:31 +0000 (19:07 +0000)]
Removing the need for Debugger* and m_shouldPause op_debug check.
<https://webkit.org/b/127532>

Reviewed by Geoffrey Garen.

This patch replaces the checking of the Debugger::m_shouldPause flag
with a procedure to set a SteppingMode flag on all CodeBlocks under
the management of the debugger. This simplifies the op_debug checking
logic in all the execution engines.

* bytecode/CodeBlock.cpp:
* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasDebuggerRequests):
(JSC::CodeBlock::debuggerRequestsAddress):
(JSC::CodeBlock::setSteppingMode):
(JSC::CodeBlock::clearDebuggerRequests):
- CodeBlock::m_debuggerRequests is a union of m_numBreakpoints and the
  new m_steppingMode. The debugger can add/remove breakpoints to the
  CodeBlock as well as set the stepping mode. By having
  m_debuggerRequests as a union of the 2 bit fields, the op_debug code
  can now check if any of the 2 requests made on the CodeBlock is still
  in effect just by testing a single int.

* debugger/Debugger.cpp:
(JSC::Debugger::Debugger):
(JSC::Debugger::detach):
- This was bug from before where I forgot to clear the CodeBlock
  breakpoints before detaching. We now take care of it by clearing all
  debugger requests made to the CodeBlock.

(JSC::Debugger::SetSteppingModeFunctor::SetSteppingModeFunctor):
(JSC::Debugger::SetSteppingModeFunctor::operator()):
(JSC::Debugger::setSteppingMode):
(JSC::Debugger::ClearCodeBlockDebuggerRequestsFunctor::ClearCodeBlockDebuggerRequestsFunctor):
(JSC::Debugger::ClearCodeBlockDebuggerRequestsFunctor::operator()):
(JSC::Debugger::clearBreakpoints):

(JSC::Debugger::ClearDebuggerRequestsFunctor::ClearDebuggerRequestsFunctor):
(JSC::Debugger::ClearDebuggerRequestsFunctor::operator()):
(JSC::Debugger::clearDebuggerRequests):
- We need a distinct clearDebuggerRequests() from clearBreakpoints()
  because:
  1. When we detach a globalObject, we only want to clear the debugger
     requests in CodeBlocks from that global.
  2. Clearing the debugger requests in the CodeBlocks is not the same
     as clearing the breakpoints. The breakpoints are still in effect
     for the next time a globalObject is attached, or for other
     globalObjects that are still attached.

(JSC::Debugger::setPauseOnNextStatement):
(JSC::Debugger::breakProgram):
(JSC::Debugger::stepIntoStatement):
(JSC::Debugger::updateCallFrameAndPauseIfNeeded):
(JSC::Debugger::pauseIfNeeded):
(JSC::Debugger::exception):
(JSC::Debugger::willExecuteProgram):
(JSC::Debugger::didReachBreakpoint):
* debugger/Debugger.h:
- We're always going to support the debugger. So, there's no longer
  a need to check ENABLE(JAVASCRIPT_DEBUGGER). Removed the unneeded code.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::debug):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_debug):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_debug):
* llint/LowLevelInterpreter.asm:
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::setDebugger):

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

7 years agoWebKit2 View Gestures (Swipe): Add a simple cache of view snapshots
timothy_horton@apple.com [Fri, 24 Jan 2014 18:56:23 +0000 (18:56 +0000)]
WebKit2 View Gestures (Swipe): Add a simple cache of view snapshots
https://bugs.webkit.org/show_bug.cgi?id=127438

Reviewed by Sam Weinig.

Add a cache of bitmap snapshots of the WKView, taken via OS X's window server
snapshotting mechanism. For now, we store all snapshots; refinements to the
caching strategy (or really having one at all) will come in future patches.

Snapshots are stored in a side map, with a UUID that allows references
to be stored inside WebBackForwardListItem (and serialized along with
the back-forward list when it is copied).

* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setSnapshotUUID):
(WebKit::WebBackForwardListItem::snapshotUUID):
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
(WebKit::extractBackForwardListEntriesFromArray):
Store and serialize a UUID along with each back-forward list item which
identifies that item's view snapshot in the ViewSnapshotStore.

* UIProcess/cf/WebPageProxyCF.cpp:
Bump the session state data version, as we changed the WebBackForwardList format.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::takeViewSnapshot):

* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Add _takeViewSnapshot IPI, which is used by ViewSnapshotStore via the PageClient
to take a snapshot of the view.

(-[WKView saveBackForwardSnapshotForCurrentItem]):
Add saveBackForwardSnapshotForCurrentItem SPI, which clients could potentially
use when they know they're about to manipulate the view hierarchy in such a way
that they want the current back-forward item's snapshot to be up to date.

* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::recordNavigationSnapshot):
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
Update the current back-forward item's snapshot immediately before navigating.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::shouldRecordNavigationSnapshots):
(WebKit::WebPageProxy::setShouldRecordNavigationSnapshots):
Expose the ability to enable taking view snapshots on every navigation.
This is off by default, so we won't be taking any snapshots yet.

* UIProcess/mac/ViewSnapshotStore.h: Added.
(WebKit::ViewSnapshotStore::disableSnapshotting):
(WebKit::ViewSnapshotStore::enableSnapshotting):
* UIProcess/mac/ViewSnapshotStore.mm: Added.
(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::~ViewSnapshotStore):
(WebKit::ViewSnapshotStore::shared):
(WebKit::ViewSnapshotStore::recordSnapshot):
(WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::takeViewSnapshot):
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoIDB: support createIndex/deleteIndex messaging
beidson@apple.com [Fri, 24 Jan 2014 18:46:39 +0000 (18:46 +0000)]
IDB: support createIndex/deleteIndex messaging
https://bugs.webkit.org/show_bug.cgi?id=127546

Reviewed by Tim Horton.

Source/WebCore:

* WebCore.exp.in: Export a needed CrossThreadCopier

Source/WebKit2:

Message create/delete requests over to the DatabaseProcess, and listen to its replies:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::createIndex):
(WebKit::WebIDBServerConnection::didCreateIndex):
(WebKit::WebIDBServerConnection::deleteIndex):
(WebKit::WebIDBServerConnection::didDeleteIndex):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

Pass create/delete requests to the appropriate unique IDB database:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::createIndex):
(WebKit::DatabaseProcessIDBConnection::deleteIndex):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:

Message the create/delete request to the database thread for the backing store to handle:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::didCreateIndex):
(WebKit::UniqueIDBDatabase::didDeleteIndex):
(WebKit::UniqueIDBDatabase::createIndex):
(WebKit::UniqueIDBDatabase::deleteIndex):
(WebKit::UniqueIDBDatabase::createIndexInBackingStore):
(WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

* Scripts/webkit2/messages.py:
(struct_or_class):

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

7 years agoThe CXX_EXPLICIT_CONVERSIONS COMPILER_SUPPORTS macro has been removed, and all
andersca@apple.com [Fri, 24 Jan 2014 18:30:50 +0000 (18:30 +0000)]
The CXX_EXPLICIT_CONVERSIONS COMPILER_SUPPORTS macro has been removed, and all
compilers support explicit conversions now so simply remove the #ifdef.

* wtf/RetainPtr.h:

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

7 years agoSimplify Compiler.h
andersca@apple.com [Fri, 24 Jan 2014 18:20:06 +0000 (18:20 +0000)]
Simplify Compiler.h
https://bugs.webkit.org/show_bug.cgi?id=127491

Patch by Darin Adler <darin@apple.com> on 2014-01-24
Reviewed by Anders Carlsson.

* wtf/Assertions.h: Remove COMPILER_SUPPORTS(CXX_STATIC_ASSERT), since
we now have that for all compilers that can build WebKit.

* wtf/Compiler.h: Removed always true feature flags, including:
COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES), COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES),
COMPILER_SUPPORTS(CXX_DELETED_FUNCTIONS), COMPILER_SUPPORTS(CXX_NULLPTR),
COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS), COMPILER_SUPPORTS(CXX_STATIC_ASSERT),
COMPILER_SUPPORTS(CXX_OVERRIDE_CONTROL), COMPILER_SUPPORTS(CXX_STRONG_ENUMS), and
COMPILER_SUPPORTS(CXX_AUTO_TYPE). Sorted sections alphabetically. Separated out
nested #if and #else into separate checks for greater readability. Removed obsolete
check for COMPILER(RVCT). Removed unused COMPILER(GCCE) detection.

* wtf/RefPtr.h: Remove COMPILER_SUPPORTS(CXX_NULLPTR), since we now have
that for all compilers that can build WebKit.
* wtf/RetainPtr.h: Ditto.

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

7 years agoFix the Windows build after <http://trac.webkit.org/changeset/162704>
dbates@webkit.org [Fri, 24 Jan 2014 18:09:18 +0000 (18:09 +0000)]
Fix the Windows build after <trac.webkit.org/changeset/162704>
(https://bugs.webkit.org/show_bug.cgi?id=127293)

Only include TargetConditionals.h when building on a Darwin-based OS.
Also, check that TARGET_OS_IPHONE is defined before referencing its value
since it will be undefined when building on Windows.

* bindings/objc/PublicDOMInterfaces.h:

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

7 years agoBindings generation tests hit an error trying to include wtf/Platform.h after r161638
dbates@webkit.org [Fri, 24 Jan 2014 17:49:54 +0000 (17:49 +0000)]
Bindings generation tests hit an error trying to include wtf/Platform.h after r161638
https://bugs.webkit.org/show_bug.cgi?id=127293

Reviewed by Alexey Proskuryakov.

Include TargetConditionals.h instead of wtf/Platform.h as the latter isn't available
in the public SDK.

As a side effect of this change, replace usage of PLATFORM(IOS) with TARGET_OS_IPHONE.

* bindings/objc/PublicDOMInterfaces.h:

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

7 years ago[New Multicolumn] Table cells and list items need to work as multicolumn blocks.
hyatt@apple.com [Fri, 24 Jan 2014 17:14:22 +0000 (17:14 +0000)]
[New Multicolumn] Table cells and list items need to work as multicolumn blocks.
https://bugs.webkit.org/show_bug.cgi?id=127365

This patch is a first step towards eliminating RenderMultiColumnBlock and moving
all its functionality into RenderBlockFlow. Doing so will allow table cells, list
items and the RenderView to use the new multi-column layout.

Reviewed by Simon Fraser.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::setMultiColumnFlowThread):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderBlockFlow::multiColumnFlowThread):
Add the flow thread pointer to the multi-column flow thread to RenderBlockFlow's
rare data. This lets us use only one pointer in the rare data to point to an object
that can hold all of the rest of the multi-column info.

* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
Move the construction of the flow thread to the constructor. This ensures we
never have a null flow thread and lets us avoid having to null check it for
empty multi-column blocks.

(WebCore::RenderMultiColumnBlock::columnHeightAvailable):
(WebCore::RenderMultiColumnBlock::columnWidth):
(WebCore::RenderMultiColumnBlock::columnCount):
(WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth):
The above functions now call through to the multi-column flow thread for results.

(WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
 Set the column height available on the flow thread.

(WebCore::RenderMultiColumnBlock::relayoutForPagination):
The balancing pass and guard is in the multi-column flow thread now.

(WebCore::RenderMultiColumnBlock::addChild):
Don't have to create the flow thread here any longer, since we do it up front
in the constructor of RenderMultiColumnBlock.

(WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
Don't need the null check of the flow thread any more.

* rendering/RenderMultiColumnBlock.h:
Change the inlined functions to not be inlined, since they need to call
RenderMultiColumnFlowThread functions now.

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
Init the new member variables we moved here from RenderMultiColumnBlock.

(WebCore::RenderMultiColumnFlowThread::computeColumnCountAndWidth):
Moved from RenderMultiColumnBlock.

* rendering/RenderMultiColumnFlowThread.h:
Add public getters/setters to the member variables so that RenderMultiColumnBlock can
still see them. Move the member variables here from RenderMultiColumnBlock.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::calculateBalancedHeight):
(WebCore::RenderMultiColumnSet::prepareForLayout):
(WebCore::RenderMultiColumnSet::columnCount):
Call through to the flow thread instead.

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

7 years agoARM Offline assembler temporary register allocator has duplicate register when buildi...
msaboff@apple.com [Fri, 24 Jan 2014 16:34:24 +0000 (16:34 +0000)]
ARM Offline assembler temporary register allocator has duplicate register when building fat binaries
https://bugs.webkit.org/show_bug.cgi?id=127545

Reviewed by Mark Lam.

Eliminate the conditional addition of r11/r7 from getModifiedListARMCommon as the
.concat will add the new register to ARM_EXTRA_GPRS.  If getModifiedListARMCommon is
invoked a second time, there will be a second r11 or r7, which messes things up.
Instead, r6 was added to ARM_EXTRA_GPRS.  r6 is currently an unused register.

* offlineasm/arm.rb:

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

7 years ago[EFL] Add expectations for two flaky media layout tests
commit-queue@webkit.org [Fri, 24 Jan 2014 16:19:45 +0000 (16:19 +0000)]
[EFL] Add expectations for two flaky media layout tests
https://bugs.webkit.org/show_bug.cgi?id=127557

Unreviewed EFL gardening.

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2014-01-24

* platform/efl/TestExpectations:

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

7 years ago[EFL][WK2] Debug buildfix
ossy@webkit.org [Fri, 24 Jan 2014 12:02:52 +0000 (12:02 +0000)]
[EFL][WK2] Debug buildfix
https://bugs.webkit.org/show_bug.cgi?id=127496

Reviewed by Gyuyoung Kim.

* Shared/SessionTracker.cpp:

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

7 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Fri, 24 Jan 2014 11:44:50 +0000 (11:44 +0000)]
Unreviewed EFL gardening

Skip crashing http tests.

* platform/efl-wk2/TestExpectations:

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

7 years agoUnreviewed GTK build fix after r162663.
zandobersek@gmail.com [Fri, 24 Jan 2014 09:59:05 +0000 (09:59 +0000)]
Unreviewed GTK build fix after r162663.

* platform/gtk/ScrollViewGtk.cpp:
(WebCore::ScrollView::visibleContentRectInternal): Renamed from visibleContentRect.

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

7 years agoMove HistoryItem to std::unique_ptr
zandobersek@gmail.com [Fri, 24 Jan 2014 09:25:21 +0000 (09:25 +0000)]
Move HistoryItem to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=127275

Reviewed by Darin Adler.

Source/WebCore:

Replace the uses of OwnPtr and PassOwnPtr in the HistoryItem class with std::unique_ptr.

* history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem):
(WebCore::HistoryItem::reset):
(WebCore::HistoryItem::addRedirectURL):
(WebCore::HistoryItem::setRedirectURLs):
* history/HistoryItem.h:
* history/mac/HistoryItemMac.mm:
(WebCore::HistoryItem::setTransientProperty):
WebCore.exp.in: Update the symbol.

Source/WebKit/mac:

* History/WebHistoryItem.mm: The Vector object that's passed to HistoryItem::setRedirectURLs
should now be handled by std::unique_ptr and passed on through move semantics.
(-[WebHistoryItem initFromDictionaryRepresentation:]):

Source/WebKit/win:

* WebHistoryItem.cpp: The Vector object that's passed to HistoryItem::setRedirectURLs
should now be handled by std::unique_ptr and passed on through move semantics.
(WebHistoryItem::initFromDictionaryRepresentation):

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

7 years agoUnreviewed EFL gardening. Remove failure expectations which are passing now.
jinwoo7.song@samsung.com [Fri, 24 Jan 2014 08:33:35 +0000 (08:33 +0000)]
Unreviewed EFL gardening. Remove failure expectations which are passing now.

* platform/efl/TestExpectations: fast/css3-text/css3-text-decoration/

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

7 years agoRegion based multicol: unresolvable percent height results in 1px tall multicol
commit-queue@webkit.org [Fri, 24 Jan 2014 08:00:47 +0000 (08:00 +0000)]
Region based multicol: unresolvable percent height results in 1px tall multicol
https://bugs.webkit.org/show_bug.cgi?id=122826

Patch by Morten Stenshorne <mstensho@opera.com> on 2014-01-23
Reviewed by David Hyatt.

Source/WebCore:

If a box has a percentage height, but the computed height of its
containing block is auto, the computed height of the box also becomes
auto. computeContentLogicalHeight() returns -1 if the height isn't
resolvable, and we need to make sure that such a value doesn't
constrain the height of the multicol container.

Tests: fast/multicol/newmulticol/unresolvable-percent-height-2.html
       fast/multicol/newmulticol/unresolvable-percent-height.html
       fast/multicol/newmulticol/unresolvable-percent-max-height-2.html
       fast/multicol/newmulticol/unresolvable-percent-max-height.html

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
(WebCore::RenderMultiColumnSet::calculateBalancedHeight):
(WebCore::RenderMultiColumnSet::recalculateBalancedHeight):
(WebCore::RenderMultiColumnSet::prepareForLayout):

LayoutTests:

* fast/multicol/newmulticol/unresolvable-percent-height-2-expected.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-height-2.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-height-expected.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-height.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-max-height-2-expected.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-max-height-2.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-max-height-expected.html: Added.
* fast/multicol/newmulticol/unresolvable-percent-max-height.html: Added.

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

7 years agoUpstream changes to json-shared.php from the perf dashboard
rniwa@webkit.org [Fri, 24 Jan 2014 06:12:57 +0000 (06:12 +0000)]
Upstream changes to json-shared.php from the perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=127544

Reviewed by Joseph Pecoraro.

json-shared.php originated from the perf dashboard.
Upstream changes made to the version in the perf. dashboard so that two apps could share the same code.

* public/include/json-shared.php:
(exit_with_error):
(echo_success):
(exit_with_success):
(set_exit_detail):
(merge_additional_details):

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

7 years agoMove ContentSearchUtils, ScriptBreakpoint, and ScriptDebugListener into JavaScriptCor...
joepeck@webkit.org [Fri, 24 Jan 2014 06:07:31 +0000 (06:07 +0000)]
Move ContentSearchUtils, ScriptBreakpoint, and ScriptDebugListener into JavaScriptCore for inspector
https://bugs.webkit.org/show_bug.cgi?id=127537

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/ContentSearchUtilities.cpp: Renamed from Source/WebCore/inspector/ContentSearchUtils.cpp.
(Inspector::ContentSearchUtilities::createSearchRegexSource):
(Inspector::ContentSearchUtilities::sizetExtractor):
(Inspector::ContentSearchUtilities::textPositionFromOffset):
(Inspector::ContentSearchUtilities::getRegularExpressionMatchesByLines):
(Inspector::ContentSearchUtilities::lineEndings):
(Inspector::ContentSearchUtilities::buildObjectForSearchMatch):
(Inspector::ContentSearchUtilities::createSearchRegex):
(Inspector::ContentSearchUtilities::countRegularExpressionMatches):
(Inspector::ContentSearchUtilities::searchInTextByLines):
(Inspector::ContentSearchUtilities::scriptCommentPattern):
(Inspector::ContentSearchUtilities::stylesheetCommentPattern):
(Inspector::ContentSearchUtilities::findMagicComment):
(Inspector::ContentSearchUtilities::findScriptSourceURL):
(Inspector::ContentSearchUtilities::findScriptSourceMapURL):
(Inspector::ContentSearchUtilities::findStylesheetSourceMapURL):
* inspector/ContentSearchUtilities.h: Renamed from Source/WebCore/inspector/ContentSearchUtils.h.
* inspector/ScriptBreakpoint.h: Renamed from Source/WebCore/inspector/ScriptBreakpoint.h.
(Inspector::ScriptBreakpointAction::ScriptBreakpointAction):
(Inspector::ScriptBreakpoint::ScriptBreakpoint):
* inspector/ScriptDebugListener.h: Renamed from Source/WebCore/inspector/ScriptDebugListener.h.
(Inspector::ScriptDebugListener::Script::Script):
(Inspector::ScriptDebugListener::~ScriptDebugListener):
* runtime/RegExp.cpp:
(JSC::RegExp::match):

Source/WebCore:

  - Rename ContentSearchUtils => ContentSearchUtilities and move to JavaScriptCore.
  - Move ScriptBreakpoint and ScriptDebugListener to JavaScriptCore.
  - Move them all to namespace Inspector.
  - Update build files and users to the new names.

No change in functionality, just moving code.

* CMakeLists.txt:
* ForwardingHeaders/inspector/ContentSearchUtilities.h: Added.
* ForwardingHeaders/inspector/ScriptBreakpoint.h: Added.
* ForwardingHeaders/inspector/ScriptDebugListener.h: Added.
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/PageScriptDebugServer.cpp:
* bindings/js/PageScriptDebugServer.h:
* bindings/js/ScriptDebugServer.cpp:
* bindings/js/ScriptDebugServer.h:
* bindings/js/WorkerScriptDebugServer.cpp:
* bindings/js/WorkerScriptDebugServer.h:
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::searchInContent):
(WebCore::InspectorDebuggerAgent::sourceMapURLForScript):
(WebCore::InspectorDebuggerAgent::didParseSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::sourceMapURLForResource):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::searchInResources):
* inspector/InspectorStyleSheet.cpp:
(WebCore::buildSourceRangeObject):
(WebCore::InspectorStyleSheet::lineEndings):
(WebCore::InspectorStyleSheetForInlineStyle::lineEndings):

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

7 years agoMove RegularExpression into JavaScriptCore for inspector
joepeck@webkit.org [Fri, 24 Jan 2014 06:07:24 +0000 (06:07 +0000)]
Move RegularExpression into JavaScriptCore for inspector
https://bugs.webkit.org/show_bug.cgi?id=127526

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Move RegularExpression into JavaScriptCore/yarr so it can
be used later on by JavaScriptCore/inspector. Convert to
the JSC::Yarr namespace.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* yarr/RegularExpression.cpp: Renamed from Source/WebCore/platform/text/RegularExpression.cpp.
(JSC::Yarr::RegularExpression::Private::create):
(JSC::Yarr::RegularExpression::Private::Private):
(JSC::Yarr::RegularExpression::Private::compile):
(JSC::Yarr::RegularExpression::RegularExpression):
(JSC::Yarr::RegularExpression::~RegularExpression):
(JSC::Yarr::RegularExpression::operator=):
(JSC::Yarr::RegularExpression::match):
(JSC::Yarr::RegularExpression::searchRev):
(JSC::Yarr::RegularExpression::matchedLength):
(JSC::Yarr::replace):
(JSC::Yarr::RegularExpression::isValid):
* yarr/RegularExpression.h: Renamed from Source/WebCore/platform/text/RegularExpression.h.

Source/WebCore:

Update as appropriate for the moved file and namespace
change for class RegularExpression.

* CMakeLists.txt:
* ForwardingHeaders/yarr/RegularExpression.h: Added.
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMImplementation.h:
* html/BaseCheckableInputType.cpp:
* html/BaseTextInputType.cpp:
(WebCore::BaseTextInputType::patternMismatch):
* html/EmailInputType.cpp:
(WebCore::isValidEmailAddress):
* html/InputType.cpp:
* inspector/ContentSearchUtils.cpp:
(WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
(WebCore::ContentSearchUtils::createSearchRegex):
(WebCore::ContentSearchUtils::countRegularExpressionMatches):
(WebCore::ContentSearchUtils::searchInTextByLines):
* inspector/ContentSearchUtils.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::matches):
(WebCore::InspectorDebuggerAgent::breakpointActionLog):
(WebCore::InspectorDebuggerAgent::breakpointActionSound):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::searchInResources):
* inspector/InspectorPageAgent.h:
* inspector/InspectorRuntimeAgent.cpp:
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorStyleSheet.cpp:
(WebCore::selectorsFromSource):
* inspector/WorkerDebuggerAgent.cpp:
* page/Frame.cpp:
(WebCore::createRegExpForLabels):
(WebCore::Frame::searchForLabelsAboveCell):
(WebCore::Frame::searchForLabelsBeforeElement):
(WebCore::matchLabelsAgainstString):
* page/Frame.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::getUnmangledInfoLog):

Source/WebKit/mac:

* WebView/WebHTMLRepresentation.mm:

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

7 years agoSource/WebCore: IDB: Support IDBObjectStore.clear()
beidson@apple.com [Fri, 24 Jan 2014 05:45:09 +0000 (05:45 +0000)]
Source/WebCore: IDB: Support IDBObjectStore.clear()
https://bugs.webkit.org/show_bug.cgi?id=127541

Reviewed by Anders Carlsson.

The backing store should never be performing callbacks directly:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::clearObjectStore):

Instead, the transaction operations should do that themselves:
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::ClearObjectStoreOperation::perform):
* Modules/indexeddb/IDBTransactionBackendOperations.h:
(WebCore::ClearObjectStoreOperation::transaction):

Source/WebKit2: IDB: Support IDBObjectStore.clear()
https://bugs.webkit.org/show_bug.cgi?id=127541

Reviewed by Anders Carlsson.

Make the WebProcess call out to the DatabaseProcess with a clear request, and handle the
response from the DatabaseProcess:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::clearObjectStore):
(WebKit::WebIDBServerConnection::didClearObjectStore):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

Pass the clear request to the appropriate UniqueIDBDatabase:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::clearObjectStore):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:

Pass the clear request to the backing store:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::didClearObjectStore):
(WebKit::UniqueIDBDatabase::clearObjectStore):
(WebKit::UniqueIDBDatabase::clearObjectStoreInBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

Actually drop the records in the database:
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::clearObjectStore):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

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

7 years agoFix crash when opening the inspector
andersca@apple.com [Fri, 24 Jan 2014 05:43:09 +0000 (05:43 +0000)]
Fix crash when opening the inspector
https://bugs.webkit.org/show_bug.cgi?id=127542
<rdar://problem/15899544>

Reviewed by Joseph Pecoraro.

Create default clients so we won't crash if they're never set.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):

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

7 years agoUnreviewed build fix attemp on the EFL and GTK build after r162678
ryuan.choi@samsung.com [Fri, 24 Jan 2014 05:29:32 +0000 (05:29 +0000)]
Unreviewed build fix attemp on the EFL and GTK build after r162678

* CMakeLists.txt: Removed WebPolicyClient.cpp
* GNUmakefile.list.am: Removed WebPolicyClient.cpp and WebPolicyClient.h

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

7 years ago<rdar://problem/15875326> REGRESSION (r162257): Assertion failure (should not be...
mitz@apple.com [Fri, 24 Jan 2014 05:21:21 +0000 (05:21 +0000)]
<rdar://problem/15875326> REGRESSION (r162257): Assertion failure (should not be reached) in CSSPreloadScanner::tokenize()
https://bugs.webkit.org/show_bug.cgi?id=127540

Reviewed by Anders Carlsson.

No new tests, because I could not reproduce the bug reliably and I don’t know how to trigger
it.

* html/parser/CSSPreloadScanner.cpp:
(WebCore::CSSPreloadScanner::scan): Check for the DoneParsingImportRules before tokenizing
a character, not after. This restores the logic from before r162257.

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

7 years ago[iOS] Protect against possbile deadlock by delaying video layer creation
jer.noble@apple.com [Fri, 24 Jan 2014 05:15:38 +0000 (05:15 +0000)]
[iOS] Protect against possbile deadlock by delaying video layer creation
https://bugs.webkit.org/show_bug.cgi?id=127505

Reviewed by Eric Carlson.

Work around a possible deadlock on iOS when creating a media element
backed by AVFoundation by delaying creation of the AVPlayerLayer.
The deadlock can occur when the web thread is doing CALayer layout
while taking the web thread lock, while CoreMedia is doing property
access on an async thread while taking the CM lock, and each is waiting
for the other's lock to be released.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):

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

7 years ago[MSE][Mac] Crash when reloading a page during playback
jer.noble@apple.com [Fri, 24 Jan 2014 04:59:15 +0000 (04:59 +0000)]
[MSE][Mac] Crash when reloading a page during playback
https://bugs.webkit.org/show_bug.cgi?id=126903

Reviewed by Eric Carlson.

Periodic time observers added to AVSampleBufferRenderSynchronizer will execute their
callback block even after being removed with -removeTimeObserver:, which is tracked by
<rdar://problem/15798050>. Work around this problem by passing a WeakPtr into the block
and bail early if the owning media player has been destroyed.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):

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

7 years agoSupport NSInteger argument type for encoding/decoding invocations.
commit-queue@webkit.org [Fri, 24 Jan 2014 04:51:06 +0000 (04:51 +0000)]
Support NSInteger argument type for encoding/decoding invocations.
https://bugs.webkit.org/show_bug.cgi?id=127522

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-01-23
Reviewed by Dan Bernstein.

Add support for NSInteger argument type ('q') for remote invocations.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation):
(decodeInvocationArguments):

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

7 years agoDragging from inner side of video to outside causes a crash
changseok.oh@collabora.com [Fri, 24 Jan 2014 04:12:23 +0000 (04:12 +0000)]
Dragging from inner side of video to outside causes a crash
https://bugs.webkit.org/show_bug.cgi?id=126338

Reviewed by Jer Noble.

Source/WebCore:

The crash happens while dragging mouse cursor through timeline control to outside
of video region. This is beacause media controls are selected with the drag.
The media controls disappear when mouse cursor goes outside of video though
the dragging/selection proceeds. If once media controls are hidden, related element
lose their renderers. However the drag is still under going. it requires shadowPseudoId
of the selected controls. Untorntunately, SliderThumbElement/SliderContainerElement
don't return a static value for the shadowPseudoId unlike other media controls,
but they need a renderer to determine it. This is the reason of crash.

Test: media/media-controller-drag-crash.html

* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::shadowPseudoId):
(WebCore::SliderContainerElement::shadowPseudoId):

LayoutTests:

This tests that dragging through timeslider control to outside of video causes a crash.
The crash happened on both gtk+ and efl ports not using MEDIA_CONTROL_SCRIPT.

* media/media-controller-drag-crash-expected.txt: Added.
* media/media-controller-drag-crash.html: Added.

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

7 years agoIDB: Implement SQLite backing store 'get' support
beidson@apple.com [Fri, 24 Jan 2014 03:52:30 +0000 (03:52 +0000)]
IDB: Implement SQLite backing store 'get' support
https://bugs.webkit.org/show_bug.cgi?id=127502

Reviewed by Tim Horton.

Source/WebCore:

Get a KeyRange from a KeyRangeData:
* Modules/indexeddb/IDBKeyRangeData.cpp:
(WebCore::IDBKeyRangeData::maybeCreateIDBKeyRange):
* Modules/indexeddb/IDBKeyRangeData.h:

Add collation function support to SQLiteDatabase:
* platform/sql/SQLiteDatabase.cpp:
(WebCore::destroyCollationFunction):
(WebCore::callCollationFunction):
(WebCore::SQLiteDatabase::setCollationFunction):
(WebCore::SQLiteDatabase::removeCollationFunction):
* platform/sql/SQLiteDatabase.h:

* WebCore.exp.in:

Source/WebKit2:

This makes get of a single IDBKey work, and lays the groundwork for getting an IDBKeyRange.

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Add custom collation
  to the Records table.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata): Install the custom collator.
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::collate): Collation function to be filled in later.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

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

7 years agoRefactor TimelineRecordBar combining logic into a helper function.
timothy@apple.com [Fri, 24 Jan 2014 03:41:22 +0000 (03:41 +0000)]
Refactor TimelineRecordBar combining logic into a helper function.

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

Reviewed by Joseph Pecoraro.

* UserInterface/LayoutTimelineOverviewGraph.js:
(WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout.createBar):
(WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout):
Use TimelineRecordBar.createCombinedBars.

* UserInterface/NetworkTimelineOverviewGraph.css:
(.timeline-overview-graph.network):
(.timeline-overview-graph.network > .graph-row > .timeline-record-bar):
Cleaned up since we are using TimelineRecordBar.

* UserInterface/NetworkTimelineOverviewGraph.js:
(WebInspector.NetworkTimelineOverviewGraph.prototype.reset):
(WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout.createBar):
(WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout):
Use TimelineRecordBar.createCombinedBars.

* UserInterface/ScriptTimelineOverviewGraph.js:
(WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout.createBar):
(WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout):
Use TimelineRecordBar.createCombinedBars.

* UserInterface/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.refreshGraph.createBar):
(WebInspector.TimelineDataGridNode.prototype.refreshGraph):
Use TimelineRecordBar.createCombinedBars.

* UserInterface/TimelineRecordBar.css:
(.timeline-record-bar.unfinished > .segment):
(.timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
(:focus .selected .timeline-record-bar > .segment.inactive):
Improved selected appearance and don't assume .segment.inactive exists.

* UserInterface/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar):
(WebInspector.TimelineRecordBar.createCombinedBars.compareByActiveStartTime): Added.
(WebInspector.TimelineRecordBar.createCombinedBars): Added.
(WebInspector.TimelineRecordBar.prototype.get renderMode): Added.
(WebInspector.TimelineRecordBar.prototype.set renderMode): Added.
(WebInspector.TimelineRecordBar.prototype.set records):
(WebInspector.TimelineRecordBar.prototype.refresh):
Lazy create DOM elements. Support rendering one or both segments. Doing this lets
combined inactive segments to sit behind multiple active segments.

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

7 years agoRemote Inspector uses the Page pointer before the page is created on iOS
commit-queue@webkit.org [Fri, 24 Jan 2014 03:08:56 +0000 (03:08 +0000)]
Remote Inspector uses the Page pointer before the page is created on iOS
https://bugs.webkit.org/show_bug.cgi?id=127534

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-01-23
Reviewed by Joseph Pecoraro.

* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

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

7 years agoAssertion failure in WebCore::PseudoElement::didRecalcStyle()
jhoneycutt@apple.com [Fri, 24 Jan 2014 02:55:15 +0000 (02:55 +0000)]
Assertion failure in WebCore::PseudoElement::didRecalcStyle()
<https://bugs.webkit.org/show_bug.cgi?id=126761>
<rdar://problem/15793540>

Source/WebCore:

Reviewed by Andy Estes.

Test: fast/images/animate-list-item-image-assertion.html

* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didRecalcStyle):
Check isRenderImage() rather than isImage() before casting to
RenderImage.

* editing/ios/EditorIOS.mm:
(WebCore::getImage):
Ditto.

* editing/mac/EditorMac.mm:
(WebCore::getImage):
Ditto.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::didAttachRenderers):
Ditto.

* loader/ImageLoader.cpp:
(WebCore::ImageLoader::renderImageResource):
Ditto.

* page/DragController.cpp:
(WebCore::getCachedImage):
Ditto.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
(WebCore::RenderLayerBacking::updateImageContents):
Ditto.

Source/WebKit/mac:

Some areas of code were erroneously checking the value of
RenderObject::isImage() rather than RenderObject::isRenderImage()
before casting the object to RenderImage.

This could lead to an assertion failure for RenderListMarkers, which
may return true for isImage(), but are not RenderImages.

Reviewed by Andy Estes.

* Misc/WebNSPasteboardExtras.mm:
(-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
Check isRenderImage() rather than isImage() before casting to
RenderImage.

Source/WebKit2:

Reviewed by Andy Estes.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
Check isRenderImage() rather than isImage() before casting to
RenderImage.

LayoutTests:

Reviewed by Andy Estes.

* fast/images/animate-list-item-image-assertion-expected.txt: Added.
* fast/images/animate-list-item-image-assertion.html: Added.

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

7 years agoMove policy client into WKPage.cpp and get rid of WebPolicyClient files
andersca@apple.com [Fri, 24 Jan 2014 02:49:42 +0000 (02:49 +0000)]
Move policy client into WKPage.cpp and get rid of WebPolicyClient files
https://bugs.webkit.org/show_bug.cgi?id=127536

Reviewed by Tim Horton.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
* UIProcess/WebPolicyClient.cpp: Removed.
* UIProcess/WebPolicyClient.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoAttempt to fix Windows DRT link issue.
simon.fraser@apple.com [Fri, 24 Jan 2014 02:42:31 +0000 (02:42 +0000)]
Attempt to fix Windows DRT link issue.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

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

7 years agoWeb Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
joepeck@webkit.org [Fri, 24 Jan 2014 02:38:08 +0000 (02:38 +0000)]
Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
https://bugs.webkit.org/show_bug.cgi?id=127409

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* inspector/InspectorAgentBase.h:
When disconnecting agents, provide a InspectorDisconnectReason for
the disconnection. It could be that an inspector frontend is just
disconnecting or that the inspected object is going away entirely
and we can avoid doing some work.

* runtime/JSGlobalObjectDebuggable.h:
* runtime/JSGlobalObjectDebuggable.cpp:
(JSC::JSGlobalObjectDebuggable::~JSGlobalObjectDebuggable):
(JSC::JSGlobalObjectDebuggable::disconnect):
(JSC::JSGlobalObjectDebuggable::disconnectInternal):
Pass different reasons for the different disconnects.

* inspector/InspectorAgentRegistry.cpp:
(Inspector::InspectorAgentRegistry::willDestroyFrontendAndBackend):
* inspector/InspectorAgentRegistry.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
* inspector/JSGlobalObjectInspectorController.h:
* inspector/agents/InspectorAgent.cpp:
(Inspector::InspectorAgent::willDestroyFrontendAndBackend):
* inspector/agents/InspectorAgent.h:
Pass InspectorDisconnectReason around where needed.

Source/WebCore:

No new tests (OOPS!).

* bindings/js/ScriptDebugServer.h:
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::ScriptDebugServer):
Remove m_recompileTimer and the recompile soon function.
We can just recompile immediately in all existing cases.

* bindings/js/PageScriptDebugServer.h:
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::addListener):
(WebCore::PageScriptDebugServer::removeListener):
(WebCore::PageScriptDebugServer::recompileAllJSFunctions):
(WebCore::PageScriptDebugServer::didAddFirstListener):
(WebCore::PageScriptDebugServer::didRemoveLastListener):
Add a "didAddFirstListener" to match "didRemoveLastListener".
Only recompile functions when we attach the debugger and when
we detach the last listener.

* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::addListener):
(WebCore::WorkerScriptDebugServer::removeListener):
(WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
Same thing. Also rearrange the functions to read better.

* inspector/InspectorProfilerAgent.cpp:
Use the direct recompile function instead of the removed "soon" version.

* WebCore.exp.in:
Update disconnectFrontend symbol.

* page/PageDebuggable.cpp:
(WebCore::PageDebuggable::disconnect):
* testing/Internals.cpp:
(WebCore::Internals::closeDummyInspectorFrontend):
* workers/WorkerMessagingProxy.cpp:
(WebCore::disconnectFromWorkerGlobalScopeInspectorTask):
Include an InspectorDisconnectReason when calling disconnectFrontend.

* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::disable):
(WebCore::InspectorDebuggerAgent::willDestroyFrontendAndBackend):
If the disconnect reason is the page will be destroyed, don't recompile when disconnecting.

* inspector/InspectorProfilerAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::enable):
(WebCore::InspectorProfilerAgent::disable):
(WebCore::InspectorProfilerAgent::willDestroyFrontendAndBackend):
If the disconnect reason is the page will be destroyed, don't recompile when disconnecting.

* inspector/InspectorController.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::inspectedPageDestroyed):
(WebCore::InspectorController::disconnectFrontend):
(WebCore::InspectorController::close):
Pass different reasons for the different disconnect reasons.

* inspector/WorkerInspectorController.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::~WorkerInspectorController):
(WebCore::WorkerInspectorController::disconnectFrontend):
Pass different reasons for the different disconnect reasons.

* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend):
* inspector/InspectorCanvasAgent.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::willDestroyFrontendAndBackend):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::willDestroyFrontendAndBackend):
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
(WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorInputAgent.cpp:
(WebCore::InspectorInputAgent::willDestroyFrontendAndBackend):
* inspector/InspectorInputAgent.h:
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend):
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
* inspector/InspectorPageAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
* inspector/InspectorResourceAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
* inspector/InspectorWorkerAgent.h:
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::disable):
(WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
* inspector/PageDebuggerAgent.h:
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
* inspector/PageRuntimeAgent.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer):
* inspector/WorkerDebuggerAgent.h:
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
* inspector/WorkerRuntimeAgent.h:
Include InspectorDisconnectReason param.

Source/WebKit/efl:

* WebCoreSupport/InspectorClientEfl.cpp:
(WebCore::InspectorFrontendClientEfl::destroyInspectorWindow):
Include InspectorDisconnectReason.

Source/WebKit/gtk:

* WebCoreSupport/InspectorClientGtk.cpp:
(WebKit::InspectorFrontendClient::destroyInspectorWindow):
Include InspectorDisconnectReason.

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController destroyInspectorView:]):
Include InspectorDisconnectReason.

Source/WebKit/win:

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorFrontendClient::destroyInspectorView):
Include InspectorDisconnectReason.

Source/WebKit2:

* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::closeWindow):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::remoteFrontendDisconnected):
Include InspectorDisconnectReason.

LayoutTests:

Remove "Breakpoints Enabled" output in tests. Breakpoints are already
enabled by default in tests. Also since the DebuggerAgent.enable() call
now immediately recompiles scripts, sourceParsed events are now sent to
the frontend earlier even before the setBreakpointsActive message has
been processed, so the "Breakpoints Enabled" output was showing up
later, seemingly randomly in tests, and is no longer helpful.

* inspector-protocol/debugger/breakpoint-action-detach-expected.txt:
* inspector-protocol/debugger/breakpoint-action-detach.html:
* inspector-protocol/debugger/breakpoint-action-with-exception-expected.txt:
* inspector-protocol/debugger/breakpoint-action-with-exception.html:
* inspector-protocol/debugger/breakpoint-condition-detach-expected.txt:
* inspector-protocol/debugger/breakpoint-condition-detach.html:
* inspector-protocol/debugger/breakpoint-condition-with-exception-expected.txt:
* inspector-protocol/debugger/breakpoint-condition-with-exception.html:
* inspector-protocol/debugger/breakpoint-eval-with-exception-expected.txt:
* inspector-protocol/debugger/breakpoint-eval-with-exception.html:
* inspector-protocol/debugger/breakpoint-inside-conditons-and-actions-expected.txt:
* inspector-protocol/debugger/breakpoint-inside-conditons-and-actions.html:
* inspector-protocol/debugger/call-frame-function-name-expected.txt:
* inspector-protocol/debugger/call-frame-function-name.html:
* inspector-protocol/debugger/call-frame-this-host-expected.txt:
* inspector-protocol/debugger/call-frame-this-host.html:
* inspector-protocol/debugger/call-frame-this-nonstrict-expected.txt:
* inspector-protocol/debugger/call-frame-this-nonstrict.html:
* inspector-protocol/debugger/call-frame-this-strict-expected.txt:
* inspector-protocol/debugger/call-frame-this-strict.html:
* inspector-protocol/debugger/didSampleProbe-multiple-probes-expected.txt:
* inspector-protocol/debugger/didSampleProbe-multiple-probes.html:
* inspector-protocol/debugger/nested-inspectors-expected.txt:
* inspector-protocol/debugger/nested-inspectors.html:
* inspector-protocol/debugger/removeBreakpoint-expected.txt:
* inspector-protocol/debugger/removeBreakpoint.html:
* inspector-protocol/debugger/setBreakpoint-actions-expected.txt:
* inspector-protocol/debugger/setBreakpoint-actions.html:
* inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt:
* inspector-protocol/debugger/setBreakpoint-autoContinue.html:
* inspector-protocol/debugger/setBreakpoint-column-expected.txt:
* inspector-protocol/debugger/setBreakpoint-column.html:
* inspector-protocol/debugger/setBreakpoint-condition-expected.txt:
* inspector-protocol/debugger/setBreakpoint-condition.html:
* inspector-protocol/debugger/setBreakpoint-expected.txt:
* inspector-protocol/debugger/setBreakpoint-options-exception-expected.txt:
* inspector-protocol/debugger/setBreakpoint-options-exception.html:
* inspector-protocol/debugger/setBreakpoint.html:
* inspector-protocol/debugger/setBreakpointByUrl-sourceURL-expected.txt:
* inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html:
* inspector-protocol/debugger/setPauseOnExceptions-all-expected.txt:
* inspector-protocol/debugger/setPauseOnExceptions-all.html:
* inspector-protocol/debugger/setPauseOnExceptions-none-expected.txt:
* inspector-protocol/debugger/setPauseOnExceptions-none.html:
* inspector-protocol/debugger/setPauseOnExceptions-uncaught-expected.txt:
* inspector-protocol/debugger/setPauseOnExceptions-uncaught.html:
* inspector-protocol/dom-debugger/node-removed-expected.txt:
* inspector-protocol/dom-debugger/node-removed.html:

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

7 years agoOnly WKPage should know about WebPolicyClient
andersca@apple.com [Fri, 24 Jan 2014 02:33:02 +0000 (02:33 +0000)]
Only WKPage should know about WebPolicyClient
https://bugs.webkit.org/show_bug.cgi?id=127535

Reviewed by Andreas Kling.

* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(setUpPagePolicyClient):
(-[WKBrowsingContextController setPolicyDelegate:]):
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage):

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

7 years agoAnother Windows fix.
simon.fraser@apple.com [Fri, 24 Jan 2014 02:24:51 +0000 (02:24 +0000)]
Another Windows fix.

* WebFrame.cpp:
(WebFrame::frameBounds):

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

7 years agoSimplify API::LoaderClient management
andersca@apple.com [Fri, 24 Jan 2014 02:20:08 +0000 (02:20 +0000)]
Simplify API::LoaderClient management
https://bugs.webkit.org/show_bug.cgi?id=127531

Reviewed by Tim Horton.

Add default implementations to API::LoaderClient and change WebPageProxy::setLoaderClient to
always create a policy client, even if the loader client set is null. That way we don't have to null
check the loader client everywhere.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didStartProvisionalLoadForFrame):
(API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(API::LoaderClient::didCommitLoadForFrame):
(API::LoaderClient::didFinishDocumentLoadForFrame):
(API::LoaderClient::didFinishLoadForFrame):
(API::LoaderClient::didFailLoadWithErrorForFrame):
(API::LoaderClient::didSameDocumentNavigationForFrame):
(API::LoaderClient::didReceiveTitleForFrame):
(API::LoaderClient::didFirstLayoutForFrame):
(API::LoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
(API::LoaderClient::didRemoveFrameFromHierarchy):
(API::LoaderClient::didDisplayInsecureContentForFrame):
(API::LoaderClient::didRunInsecureContentForFrame):
(API::LoaderClient::didDetectXSSForFrame):
(API::LoaderClient::didLayout):
(API::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
(API::LoaderClient::didReceiveAuthenticationChallengeInFrame):
(API::LoaderClient::didStartProgress):
(API::LoaderClient::didChangeProgress):
(API::LoaderClient::didFinishProgress):
(API::LoaderClient::processDidBecomeUnresponsive):
(API::LoaderClient::interactionOccurredWhileProcessUnresponsive):
(API::LoaderClient::processDidBecomeResponsive):
(API::LoaderClient::processDidCrash):
(API::LoaderClient::didChangeBackForwardList):
(API::LoaderClient::willGoToBackForwardListItem):
(API::LoaderClient::pluginLoadPolicy):
(API::LoaderClient::didFailToInitializePlugin):
(API::LoaderClient::didBlockInsecurePluginVersion):
(API::LoaderClient::webGLLoadPolicy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setLoaderClient):
(WebKit::WebPageProxy::didChangeBackForwardList):
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::didStartProgress):
(WebKit::WebPageProxy::didChangeProgress):
(WebKit::WebPageProxy::didFinishProgress):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstLayoutForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didLayout):
(WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::didDetectXSSForFrame):
(WebKit::WebPageProxy::webGLPolicyForURL):
(WebKit::WebPageProxy::processDidBecomeUnresponsive):
(WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
(WebKit::WebPageProxy::processDidBecomeResponsive):
(WebKit::WebPageProxy::processDidCrash):
(WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
(WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
(WebKit::WebPageProxy::didFailToInitializePlugin):
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):

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

7 years agoSimplify API::PolicyClient management
andersca@apple.com [Fri, 24 Jan 2014 02:08:34 +0000 (02:08 +0000)]
Simplify API::PolicyClient management
https://bugs.webkit.org/show_bug.cgi?id=127529

Reviewed by Tim Horton.

Add default implementations to API::PolicyClient and change WebPageProxy::setPolicyClient to
always create a policy client, even if the policy object set is null. That way we don't have to null
check the policy client everywhere.

* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNavigationAction):
(API::PolicyClient::decidePolicyForNewWindowAction):
(API::PolicyClient::decidePolicyForResponse):
(API::PolicyClient::unableToImplementPolicy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setPolicyClient):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::unableToImplementPolicy):

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

7 years agoSource/WebKit/efl: Fix EFL.
simon.fraser@apple.com [Fri, 24 Jan 2014 02:04:26 +0000 (02:04 +0000)]
Source/WebKit/efl: Fix EFL.

* ewk/ewk_frame.cpp:
(ewk_frame_visible_content_geometry_get):

Source/WebKit2: Fix GTK.

* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitWebPageDidReceiveMessage):

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

7 years agoAdd an APILoaderClient base class
andersca@apple.com [Fri, 24 Jan 2014 02:00:12 +0000 (02:00 +0000)]
Add an APILoaderClient base class
https://bugs.webkit.org/show_bug.cgi?id=127527

Reviewed by Tim Horton.

* UIProcess/API/APILoaderClient.h: Added.
(API::LoaderClient::~LoaderClient):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(setUpPageLoaderClient):
(-[WKBrowsingContextController setLoadDelegate:]):
(+[WKBrowsingContextController _browsingContextControllerForPageRef:]):
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::WebLoaderClient):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setLoaderClient):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::didChangeBackForwardList):
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::didStartProgress):
(WebKit::WebPageProxy::didChangeProgress):
(WebKit::WebPageProxy::didFinishProgress):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::didReceiveTitleForFrame):
(WebKit::WebPageProxy::didFirstLayoutForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::didLayout):
(WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
(WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
(WebKit::WebPageProxy::didRunInsecureContentForFrame):
(WebKit::WebPageProxy::didDetectXSSForFrame):
(WebKit::WebPageProxy::webGLPolicyForURL):
(WebKit::WebPageProxy::processDidBecomeUnresponsive):
(WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive):
(WebKit::WebPageProxy::processDidBecomeResponsive):
(WebKit::WebPageProxy::processDidCrash):
(WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame):
(WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):
(WebKit::WebPageProxy::didFailToInitializePlugin):
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::loaderClient):
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoAnother Windows fix: include <algorithm> for std::min and std::max.
simon.fraser@apple.com [Fri, 24 Jan 2014 01:52:29 +0000 (01:52 +0000)]
Another Windows fix: include <algorithm> for std::min and std::max.

* platform/graphics/IntSize.h:

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

7 years agoBuild break after r162650
ryuan.choi@samsung.com [Fri, 24 Jan 2014 01:28:49 +0000 (01:28 +0000)]
Build break after r162650
https://bugs.webkit.org/show_bug.cgi?id=127525

Reviewed by Anders Carlsson.

WKPreferences.h was renamed to WKPreferencesRef.

* UIProcess/API/C/WKPreferences.cpp:

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

7 years agoFix a refactoring bug that crept in and is causing the inspector to crash.
andersca@apple.com [Fri, 24 Jan 2014 01:15:11 +0000 (01:15 +0000)]
Fix a refactoring bug that crept in and is causing the inspector to crash.

* UIProcess/WebPolicyClient.cpp:
(WebKit::WebPolicyClient::decidePolicyForResponse):

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

7 years agoTry to fix Windows build.
simon.fraser@apple.com [Fri, 24 Jan 2014 01:08:55 +0000 (01:08 +0000)]
Try to fix Windows build.

* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::visibleSize):
* platform/win/PopupMenuWin.h:

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

7 years agoMake visibleContentRect() return actualVisibleContentRect() on iOS most of the time
simon.fraser@apple.com [Fri, 24 Jan 2014 00:39:46 +0000 (00:39 +0000)]
Make visibleContentRect() return actualVisibleContentRect() on iOS most of the time
https://bugs.webkit.org/show_bug.cgi?id=127456

Reviewed by Antti Koivisto.

On iOS, visibleContentRect() returns the entire document rect for historical
reasons, and actualVisibleContentRect() returns what visibleContentRect()
returns on other platforms.

In addition, actualVisibleContentRect() was returning an empty rect in WK2.

Reduce the confusion of #ifdefs by making visibleContentRect() behave like
actualVisibleContentRect() by default on iOS. Where it needs the old behavior,
an optional parameter, LegacyIOSDocumentVisibleRect, provides this.

Achieve this by having the virtual ScrollableArea::visibleContentRectInternal(),
which is called by non-virtual visibleContentRect() and visibleContentRectIncludingScrollbars().

Similarly clean up visibleHeight/visibleWidth functions by having visibleSize() be virtual,
with non-virtual visibleHeight() and visibleWidth().

ScrollableArea subclasses override visibleContentRectInternal() and visibleSize() where necessary.

Mechanically change all the call sites of actualVisibleContentRect() to
use visibleContentRect(), and the call sites of visibleContentRect()
to visibleContentRect(..., LegacyIOSDocumentVisibleRect), adding comments
where this may not be appropriate.

Change callers of visibleContentRect(IncludeScrollbars...) to visibleContentRectIncludingScrollbars().

Also add actualScrollPosition(), and clean up some actualScroll* call sites.

No behavior change.

Source/WebCore:

* WebCore.exp.in:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isOnscreen):
(WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isOffScreen):
* dom/Document.cpp:
(WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale):
(WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale):
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
* editing/Editor.cpp:
(WebCore::Editor::countMatchesForText):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::bounds):
(WebCore::FrameSelection::getClippedVisibleTextRectangles):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::scrollTop):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::imageFitsInWindow):
(WebCore::ImageDocument::windowSizeChanged):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::innerHeight):
(WebCore::DOMWindow::innerWidth):
(WebCore::DOMWindow::scrollX):
(WebCore::DOMWindow::scrollY):
(WebCore::DOMWindow::scrollBy):
* page/FrameView.cpp:
(WebCore::FrameView::calculateScrollbarModesForLayout):
(WebCore::FrameView::layout):
(WebCore::FrameView::scrollContentsSlowPath):
(WebCore::FrameView::repaintContentRectangle):
(WebCore::FrameView::sendResizeEventIfNeeded):
(WebCore::FrameView::windowClipRect):
(WebCore::FrameView::isScrollable):
(WebCore::FrameView::paintControlTints):
* page/SpatialNavigation.cpp:
(WebCore::canScrollInDirection):
* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSize):
(WebCore::ScrollView::visibleContentRectInternal):
(WebCore::ScrollView::updateScrollbars):
(WebCore::ScrollView::paint):
* platform/ScrollView.h:
(WebCore::ScrollView::scrollOffset):
(WebCore::ScrollView::actualScrollX):
(WebCore::ScrollView::actualScrollY):
(WebCore::ScrollView::actualScrollPosition):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::visibleContentRect):
(WebCore::ScrollableArea::visibleContentRectIncludingScrollbars):
(WebCore::ScrollableArea::visibleContentRectInternal):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::visibleWidth):
(WebCore::ScrollableArea::visibleHeight):
* platform/graphics/IntSize.h:
(WebCore::IntSize::expandedTo): Drive-by cleanup.
(WebCore::IntSize::shrunkTo):
* platform/gtk/ScrollViewGtk.cpp:
(WebCore::ScrollView::visibleContentRect):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::maximumScrollPosition):
(WebCore::RenderLayer::visibleContentRectInternal):
(WebCore::RenderLayer::hitTest):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):
* rendering/RenderListBox.cpp:
* rendering/RenderListBox.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::viewRect):
(WebCore::RenderView::viewportSize):

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit2:

* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::visibleContentBounds):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):

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

7 years ago[wk2] Page Overlays: Add API to clear the page overlay (and get rid of its backing...
timothy_horton@apple.com [Fri, 24 Jan 2014 00:36:14 +0000 (00:36 +0000)]
[wk2] Page Overlays: Add API to clear the page overlay (and get rid of its backing store)
https://bugs.webkit.org/show_bug.cgi?id=127518

Reviewed by Anders Carlsson.

Add WKBundlePageOverlayClear, to allow clients of the page overlay API to
manually clear the page overlay's backing store, for memory, power, and performance gains.

* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(WKBundlePageOverlayClear):
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::clearPageOverlay):
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::clear):
* WebProcess/WebPage/PageOverlay.h:
Add WKBundlePageOverlayClear and plumb it through PageOverlay to the DrawingArea.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::clearPageOverlay):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::clearPageOverlay):
Set the layer to drawsContent=false and give it 0x0 size, effectively
removing its backing store.

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

7 years agoTurn text-decoration-skip: ink on for all underlines
mmaxfield@apple.com [Fri, 24 Jan 2014 00:23:19 +0000 (00:23 +0000)]
Turn text-decoration-skip: ink on for all underlines
https://bugs.webkit.org/show_bug.cgi?id=127331

Reviewed by Antti Koivisto.

No new tests are necessary because tests already exist

* rendering/style/RenderStyle.h:

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

7 years ago[CSS Shapes] Image valued shape size and position should conform to the spec
hmuller@adobe.com [Fri, 24 Jan 2014 00:06:45 +0000 (00:06 +0000)]
[CSS Shapes] Image valued shape size and position should conform to the spec
https://bugs.webkit.org/show_bug.cgi?id=123295

Reviewed by Andreas Kling.

Source/WebCore:

Implement image valued shape-outside scaling and translation per the spec,
http://dev.w3.org/csswg/css-shapes/#shapes-from-image:

"The image is sized and positioned as if it were a replaced element whose
specified width and height are the same as the element’s used content box size."

This change doesn't completely fulfill the spec, it's limited to image elements
and shape-outside.

Tests: fast/shapes/shape-outside-floats/shape-outside-image-fit-001.html
       fast/shapes/shape-outside-floats/shape-outside-image-fit-002.html
       fast/shapes/shape-outside-floats/shape-outside-image-fit-003.html
       fast/shapes/shape-outside-floats/shape-outside-image-fit-004.html

* rendering/shapes/Shape.h:
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createRasterShape):
Added an imageRect parameter which specifies where the shape image is to
appear relative to the content box. The imageRect implies both scaling and
translation of the shape image.

* rendering/shapes/ShapeInfo.cpp:
(WebCore::ShapeInfo<RenderType>::computedShape):
(WebCore::getShapeImageRect):
For replaced elements, compute the shape's imageRect with
RenderReplaced::replacedContentRect().

LayoutTests:

* fast/shapes/shape-outside-floats/shape-outside-image-fit-001-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-fit-001.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-fit-002-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-fit-002.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-fit-003-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-fit-003.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-fit-004-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-image-fit-004.html: Added.

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

7 years agoExplicitly link XPC services with AppKit
andersca@apple.com [Fri, 24 Jan 2014 00:01:39 +0000 (00:01 +0000)]
Explicitly link XPC services with AppKit
https://bugs.webkit.org/show_bug.cgi?id=127520
<rdar://problem/15759718>

Reviewed by Mark Rowe.

Explicitly link XPC services that use the _NSApplicationMain run loop type with AppKit.

* Configurations/PluginService.32.xcconfig:
* Configurations/PluginService.64.xcconfig:
* Configurations/PluginService.Development.xcconfig:
* Configurations/WebContentService.Development.xcconfig:
* Configurations/WebContentService.xcconfig:

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

7 years agoFix build again.
andersca@apple.com [Thu, 23 Jan 2014 23:50:36 +0000 (23:50 +0000)]
Fix build again.

* UIProcess/API/mac/WKView.mm:
(-[WKView _windowDidChangeBackingProperties:]):

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

7 years agoAnother 32-bit build fix.
andersca@apple.com [Thu, 23 Jan 2014 23:45:14 +0000 (23:45 +0000)]
Another 32-bit build fix.

* UIProcess/API/mac/WKView.mm:
(-[WKView _windowDidChangeBackingProperties:]):

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

7 years agoClean up WKView.mm a little
andersca@apple.com [Thu, 23 Jan 2014 23:28:54 +0000 (23:28 +0000)]
Clean up WKView.mm a little
https://bugs.webkit.org/show_bug.cgi?id=127517

Reviewed by Tim Horton.

Remove an unused ivar and migrate to API constants that were added in Lion.

* UIProcess/API/mac/WKView.mm:
(-[WKView setFrameSize:]):
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
(-[WKView viewDidMoveToWindow]):
(-[WKView _windowDidMiniaturize:]):
(-[WKView _windowDidResize:]):
(-[WKView _windowDidChangeBackingProperties:]):

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

7 years agoTry to fix the 32-bit build.
andersca@apple.com [Thu, 23 Jan 2014 23:23:51 +0000 (23:23 +0000)]
Try to fix the 32-bit build.

* UIProcess/API/Cocoa/WKPreferences.mm:

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

7 years agoRemove an unneeded synchronous back/forward message
andersca@apple.com [Thu, 23 Jan 2014 23:22:47 +0000 (23:22 +0000)]
Remove an unneeded synchronous back/forward message
https://bugs.webkit.org/show_bug.cgi?id=127516

Reviewed by Tim Horton.

* UIProcess/WebLoaderClient.cpp:
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeLoaderClient):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

7 years agoEnable DFG for the Debugger and Profiler.
mark.lam@apple.com [Thu, 23 Jan 2014 23:13:23 +0000 (23:13 +0000)]
Enable DFG for the Debugger and Profiler.
<https://webkit.org/b/122847>

Reviewed by Geoffrey Garen.

In this patch, we implement DFG op_debug as a series of 3 checks:
1. Check if the debugger pointer is non-null. This is needed in case
   the debugger has been detached but the DFG code is still running
   on the stack.
2. Check if Debugger::m_shouldPause is true.
3. Check if CodeBlock::m_numBreakpoints is non-zero.

These are the same 3 checks done in the LLINT and baselineJIT. But unlike
the LLINT and baselineJIT, these DFG checks are implemented as
speculationChecks. If the check fails, we OSR exit to the baselineJIT and
let it do the work of servicing the op_debug callback.

Stepping through code in the debugger would work the same way. The top
function being debugged has to be a LLINT or baselineJIT function because
we would have OSR exited if there is a breakpoint in that function. When
we step out of that function to its caller, we expect that the caller will
call back to the debugger at the next op_debug. If the caller function is
a DFG function, the op_debug site will fail its speculation check on
Debugger::m_shouldPause and deopt into a baselineJIT function. Execution
continues from there as usual, and the debugger gets its callback.

For the profile, op_profile_will_call and op_profile_did_call are
implemented as simple runtime calls to service the profiler.

With this patch, Octane performance with the WebInspector open jump from
~2000 to ~2500 (25% progression).

* bytecode/CodeBlock.h:
(JSC::CodeBlock::numBreakpointsAddress):
* bytecode/ExitKind.cpp:
(JSC::exitKindToString):
* bytecode/ExitKind.h:
* debugger/Debugger.cpp:
(JSC::Debugger::toggleBreakpoint):
- removed an obsolete assertion. The debugger can now handle DFG
  CodeBlocks too.
* debugger/Debugger.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::debuggerAddress):

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

7 years agoRename WKPreferences.h to WKPreferencesRef.h and add a stubbed out WKPreferences...
andersca@apple.com [Thu, 23 Jan 2014 23:03:01 +0000 (23:03 +0000)]
Rename WKPreferences.h to WKPreferencesRef.h and add a stubbed out WKPreferences class
https://bugs.webkit.org/show_bug.cgi?id=127512

Reviewed by Dan Bernstein.

* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPreferencesRef.h: Renamed from Source/WebKit2/UIProcess/API/C/WKPreferences.h.
* UIProcess/API/C/WebKit2_C.h:
* UIProcess/API/Cocoa/WKPreferences.h: Added.
* UIProcess/API/Cocoa/WKPreferences.mm: Added.
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoRebaseline after r162640.
antti@apple.com [Thu, 23 Jan 2014 23:00:56 +0000 (23:00 +0000)]
Rebaseline after r162640.

* platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt:
* platform/mac-wk2/tiled-drawing/tile-coverage-speculative-expected.txt:

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

7 years agoRemove CSS Custom Filters code and tests
mvujovic@adobe.com [Thu, 23 Jan 2014 22:31:06 +0000 (22:31 +0000)]
Remove CSS Custom Filters code and tests
https://bugs.webkit.org/show_bug.cgi?id=127382

Reviewed by Simon Fraser.

.:

* Source/autotools/FindDependencies.m4:
* Source/autotools/SetupWebKitFeatures.m4:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No new tests. Removing functionality.

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::toJS):
* bindings/objc/DOMCSS.mm:
(kitClass):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForFilter):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSComputedStyleDeclaration.h:
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseValue):
(WebCore::filterInfoForName):
(WebCore::CSSParser::parseFilter):
(WebCore::CSSParser::detectAtToken):
* css/CSSParser.h:
* css/CSSParserMode.h:
* css/CSSPropertyNames.in:
* css/CSSPropertySourceData.h:
* css/CSSRule.h:
* css/CSSRule.idl:
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::cloneForCSSOM):
* css/CSSValue.h:
* css/CSSValueKeywords.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::clear):
(WebCore::StyleResolver::applyProperty):
(WebCore::filterOperationForType):
(WebCore::StyleResolver::createFilterOperations):
(WebCore::StyleResolver::loadPendingResources):
* css/StyleResolver.h:
(WebCore::StyleResolver::State::State):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy):
(WebCore::StyleRuleBase::createCSSOMWrapper):
* css/StyleRule.h:
* css/StyleSheetContents.cpp:
(WebCore::childRulesHaveFailedOrCanceledSubresources):
* css/WebKitCSSArrayFunctionValue.cpp: Removed.
* css/WebKitCSSArrayFunctionValue.h: Removed.
* css/WebKitCSSFilterRule.cpp: Removed.
* css/WebKitCSSFilterRule.h: Removed.
* css/WebKitCSSFilterRule.idl: Removed.
* css/WebKitCSSFilterValue.cpp:
(WebCore::WebKitCSSFilterValue::WebKitCSSFilterValue):
(WebCore::WebKitCSSFilterValue::customCSSText):
* css/WebKitCSSFilterValue.h:
* css/WebKitCSSFilterValue.idl:
* css/WebKitCSSMatFunctionValue.cpp: Removed.
* css/WebKitCSSMatFunctionValue.h: Removed.
* css/WebKitCSSMixFunctionValue.cpp: Removed.
* css/WebKitCSSMixFunctionValue.h: Removed.
* css/WebKitCSSMixFunctionValue.idl: Removed.
* css/WebKitCSSShaderValue.cpp: Removed.
* css/WebKitCSSShaderValue.h: Removed.
* loader/cache/CachedResource.cpp:
(WebCore::defaultPriorityForResourceType):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource):
(WebCore::CachedResourceLoader::checkInsecureContent):
(WebCore::CachedResourceLoader::canRequest):
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedShader.cpp: Removed.
* loader/cache/CachedShader.h: Removed.
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFilter):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::filtersCanBeComposited):
* platform/graphics/filters/CustomFilterArrayParameter.h: Removed.
* platform/graphics/filters/CustomFilterColorParameter.h: Removed.
* platform/graphics/filters/CustomFilterCompiledProgram.cpp: Removed.
* platform/graphics/filters/CustomFilterCompiledProgram.h: Removed.
* platform/graphics/filters/CustomFilterConstants.h: Removed.
* platform/graphics/filters/CustomFilterGlobalContext.cpp: Removed.
* platform/graphics/filters/CustomFilterGlobalContext.h: Removed.
* platform/graphics/filters/CustomFilterMesh.cpp: Removed.
* platform/graphics/filters/CustomFilterMesh.h: Removed.
* platform/graphics/filters/CustomFilterMeshGenerator.cpp: Removed.
* platform/graphics/filters/CustomFilterMeshGenerator.h: Removed.
* platform/graphics/filters/CustomFilterNumberParameter.h: Removed.
* platform/graphics/filters/CustomFilterOperation.cpp: Removed.
* platform/graphics/filters/CustomFilterOperation.h: Removed.
* platform/graphics/filters/CustomFilterParameter.h: Removed.
* platform/graphics/filters/CustomFilterParameterList.cpp: Removed.
* platform/graphics/filters/CustomFilterParameterList.h: Removed.
* platform/graphics/filters/CustomFilterProgram.cpp: Removed.
* platform/graphics/filters/CustomFilterProgram.h: Removed.
* platform/graphics/filters/CustomFilterProgramClient.h: Removed.
* platform/graphics/filters/CustomFilterProgramInfo.cpp: Removed.
* platform/graphics/filters/CustomFilterProgramInfo.h: Removed.
* platform/graphics/filters/CustomFilterRenderer.cpp: Removed.
* platform/graphics/filters/CustomFilterRenderer.h: Removed.
* platform/graphics/filters/CustomFilterTransformParameter.h: Removed.
* platform/graphics/filters/CustomFilterValidatedProgram.cpp: Removed.
* platform/graphics/filters/CustomFilterValidatedProgram.h: Removed.
* platform/graphics/filters/FECustomFilter.cpp: Removed.
* platform/graphics/filters/FECustomFilter.h: Removed.
* platform/graphics/filters/FilterOperation.h:
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::outsets):
* platform/graphics/filters/FilterOperations.h:
* platform/graphics/filters/ValidatedCustomFilterOperation.cpp: Removed.
* platform/graphics/filters/ValidatedCustomFilterOperation.h: Removed.
* platform/graphics/filters/texmap/CustomFilterValidatedProgramTextureMapper.cpp: Removed.
* platform/graphics/filters/texmap/TextureMapperPlatformCompiledProgram.h: Removed.
* platform/graphics/gpu/Texture.cpp:
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::getPassesRequiredForFilter):
(WebCore::BitmapTextureGL::applyFilters):
* platform/graphics/texmap/TextureMapperGL.h:
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::clearPendingStateChanges):
(WebCore::CompositingCoordinator::syncLayerState):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h:
* platform/graphics/texmap/coordinated/CoordinatedCustomFilterOperation.h: Removed.
* platform/graphics/texmap/coordinated/CoordinatedCustomFilterProgram.h: Removed.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::setLayerFiltersIfNeeded):
(WebCore::CoordinatedGraphicsScene::commitSceneState):
(WebCore::CoordinatedGraphicsScene::setLayerAnimationsIfNeeded):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::FilterEffectRenderer):
(WebCore::FilterEffectRenderer::build):
(WebCore::FilterEffectRenderer::computeSourceImageRectForDirtyRect):
* rendering/FilterEffectRenderer.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateFilters):
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::~FilterInfo):
* rendering/RenderLayerFilterInfo.h:
* rendering/RenderView.cpp:
* rendering/RenderView.h:
* rendering/style/StyleCachedShader.cpp: Removed.
* rendering/style/StyleCachedShader.h: Removed.
* rendering/style/StyleCustomFilterProgram.cpp: Removed.
* rendering/style/StyleCustomFilterProgram.h: Removed.
* rendering/style/StyleCustomFilterProgramCache.cpp: Removed.
* rendering/style/StyleCustomFilterProgramCache.h: Removed.
* rendering/style/StylePendingShader.h: Removed.
* rendering/style/StyleShader.h: Removed.

Source/WebCore/platform/gtk/po:

No new tests. Removing functionality.

* ar.po:
* as.po:
* bg.po:
* cs.po:
* de.po:
* el.po:
* en_CA.po:
* en_GB.po:
* eo.po:
* es.po:
* et.po:
* eu.po:
* fr.po:
* gl.po:
* gu.po:
* he.po:
* hi.po:
* hu.po:
* id.po:
* it.po:
* kn.po:
* ko.po:
* lt.po:
* lv.po:
* ml.po:
* mr.po:
* nb.po:
* nl.po:
* or.po:
* pa.po:
* pl.po:
* pt.po:
* pt_BR.po:
* ro.po:
* ru.po:
* sl.po:
* sr.po:
* sr@latin.po:
* sv.po:
* ta.po:
* te.po:
* uk.po:
* vi.po:
* zh_CN.po:

Source/WebKit/gtk:

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
* webkit/webkitwebsettings.cpp:
(webkit_web_settings_class_init):
(webkit_web_settings_set_property):
(webkit_web_settings_get_property):
* webkit/webkitwebsettingsprivate.h:
* webkit/webkitwebview.cpp:
(webkit_web_view_update_settings):
(webkit_web_view_settings_notify):

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
(IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
(IPC::ArgumentCoder<CoordinatedGraphicsState>::encode):
(IPC::ArgumentCoder<CoordinatedGraphicsState>::decode):
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
* Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.cpp: Removed.
* Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.h: Removed.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeFilterOperation):
(IPC::decodeFilterOperation):
* Shared/WebPreferencesStore.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
* UIProcess/API/C/WKPreferences.cpp:
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* mac/WebKit2.order:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues):
* DumpRenderTree/gtk/TestRunnerGtk.cpp:
(TestRunner::overridePreference):

LayoutTests:

* animations/resources/animation-test-helpers.js:
(parseFilterFunctionList):
(compareFilterFunctions):
* css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid-expected.txt: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid.html: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid-expected.txt: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid.html: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-custom-function-invalid-expected.txt: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-custom-function-invalid.html: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-custom-function-valid-expected.txt: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-custom-function-valid.html: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-invalid-expected.txt: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-invalid.html: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-valid-expected.txt: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-valid.html: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-mix-property-invalid-expected.txt: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-mix-property-invalid.html: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-mix-property-valid-expected.txt: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-mix-property-valid.html: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid-expected.txt: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid.html: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid-expected.txt: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid.html: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-src-property-invalid-expected.txt: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-src-property-invalid.html: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-src-property-valid-expected.txt: Removed.
* css3/filters/custom-with-at-rule-syntax/parsing-src-property-valid.html: Removed.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-at-rule-invalid.js: Removed.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-at-rule-valid.js: Removed.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-custom-function-invalid.js: Removed.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-custom-function-valid.js: Removed.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-geometry-property-invalid.js: Removed.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-geometry-property-valid.js: Removed.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-mix-property-invalid.js: Removed.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-mix-property-valid.js: Removed.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-invalid.js: Removed.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-parameters-property-valid.js: Removed.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-src-property-invalid.js: Removed.
* css3/filters/custom-with-at-rule-syntax/script-tests/parsing-src-property-valid.js: Removed.
* css3/filters/custom/composited/custom-filter-blend-modes-expected.html: Removed.
* css3/filters/custom/composited/custom-filter-blend-modes.html: Removed.
* css3/filters/custom/custom-filter-a-tex-coord-optional-expected.html: Removed.
* css3/filters/custom/custom-filter-a-tex-coord-optional.html: Removed.
* css3/filters/custom/custom-filter-animation-expected.txt: Removed.
* css3/filters/custom/custom-filter-animation.html: Removed.
* css3/filters/custom/custom-filter-array-blending-expected.txt: Removed.
* css3/filters/custom/custom-filter-array-blending.html: Removed.
* css3/filters/custom/custom-filter-array-expected.html: Removed.
* css3/filters/custom/custom-filter-array-uniform-indirect-index-expected.html: Removed.
* css3/filters/custom/custom-filter-array-uniform-indirect-index.html: Removed.
* css3/filters/custom/custom-filter-array.html: Removed.
* css3/filters/custom/custom-filter-blend-fractional-destination-alpha-expected.html: Removed.
* css3/filters/custom/custom-filter-blend-fractional-destination-alpha.html: Removed.
* css3/filters/custom/custom-filter-blend-modes-expected.html: Removed.
* css3/filters/custom/custom-filter-blend-modes.html: Removed.
* css3/filters/custom/custom-filter-change-blend-mode-expected.html: Removed.
* css3/filters/custom/custom-filter-change-blend-mode.html: Removed.
* css3/filters/custom/custom-filter-clamp-css-color-matrix-expected.html: Removed.
* css3/filters/custom/custom-filter-clamp-css-color-matrix-negative-expected.html: Removed.
* css3/filters/custom/custom-filter-clamp-css-color-matrix-negative.html: Removed.
* css3/filters/custom/custom-filter-clamp-css-color-matrix.html: Removed.
* css3/filters/custom/custom-filter-clamp-css-mix-color-expected.html: Removed.
* css3/filters/custom/custom-filter-clamp-css-mix-color-negative-expected.html: Removed.
* css3/filters/custom/custom-filter-clamp-css-mix-color-negative.html: Removed.
* css3/filters/custom/custom-filter-clamp-css-mix-color.html: Removed.
* css3/filters/custom/custom-filter-color-expected.html: Removed.
* css3/filters/custom/custom-filter-color-matrix-expected.png: Removed.
* css3/filters/custom/custom-filter-color-matrix-expected.txt: Removed.
* css3/filters/custom/custom-filter-color-matrix.html: Removed.
* css3/filters/custom/custom-filter-color.html: Removed.
* css3/filters/custom/custom-filter-composite-fractional-source-alpha-expected.html: Removed.
* css3/filters/custom/custom-filter-composite-fractional-source-alpha.html: Removed.
* css3/filters/custom/custom-filter-composite-operators-expected.png: Removed.
* css3/filters/custom/custom-filter-composite-operators-expected.txt: Removed.
* css3/filters/custom/custom-filter-composite-operators.html: Removed.
* css3/filters/custom/custom-filter-composite-source-atop-expected.png: Removed.
* css3/filters/custom/custom-filter-composite-source-atop-expected.txt: Removed.
* css3/filters/custom/custom-filter-composite-source-atop.html: Removed.
* css3/filters/custom/custom-filter-crash-inline-computed-style-expected.txt: Removed.
* css3/filters/custom/custom-filter-crash-inline-computed-style.html: Removed.
* css3/filters/custom/custom-filter-css-keyword-as-parameter-name-expected.png: Removed.
* css3/filters/custom/custom-filter-css-keyword-as-parameter-name-expected.txt: Removed.
* css3/filters/custom/custom-filter-css-keyword-as-parameter-name.html: Removed.
* css3/filters/custom/custom-filter-detached-mesh-with-mesh-box-type-expected.html: Removed.
* css3/filters/custom/custom-filter-detached-mesh-with-mesh-box-type.html: Removed.
* css3/filters/custom/custom-filter-matN-expected.html: Removed.
* css3/filters/custom/custom-filter-matN.html: Removed.
* css3/filters/custom/custom-filter-mesh-column-row-order-expected.html: Removed.
* css3/filters/custom/custom-filter-mesh-column-row-order.html: Removed.
* css3/filters/custom/custom-filter-mix-bindings-expected.txt: Removed.
* css3/filters/custom/custom-filter-mix-bindings.html: Removed.
* css3/filters/custom/custom-filter-no-element-texture-access-expected.html: Removed.
* css3/filters/custom/custom-filter-no-element-texture-access.html: Removed.
* css3/filters/custom/custom-filter-nonseparable-blend-mode-color-expected.html: Removed.
* css3/filters/custom/custom-filter-nonseparable-blend-mode-color.html: Removed.
* css3/filters/custom/custom-filter-nonseparable-blend-mode-hue-expected.html: Removed.
* css3/filters/custom/custom-filter-nonseparable-blend-mode-hue.html: Removed.
* css3/filters/custom/custom-filter-nonseparable-blend-mode-luminosity-expected.html: Removed.
* css3/filters/custom/custom-filter-nonseparable-blend-mode-luminosity.html: Removed.
* css3/filters/custom/custom-filter-nonseparable-blend-mode-saturation-expected.html: Removed.
* css3/filters/custom/custom-filter-nonseparable-blend-mode-saturation.html: Removed.
* css3/filters/custom/custom-filter-property-computed-style-expected.txt: Removed.
* css3/filters/custom/custom-filter-property-computed-style.html: Removed.
* css3/filters/custom/custom-filter-property-parsing-expected.txt: Removed.
* css3/filters/custom/custom-filter-property-parsing-invalid-expected.txt: Removed.
* css3/filters/custom/custom-filter-property-parsing-invalid.html: Removed.
* css3/filters/custom/custom-filter-property-parsing.html: Removed.
* css3/filters/custom/custom-filter-reload-expected.txt: Removed.
* css3/filters/custom/custom-filter-reload.html: Removed.
* css3/filters/custom/custom-filter-shader-cache-expected.png: Removed.
* css3/filters/custom/custom-filter-shader-cache-expected.txt: Removed.
* css3/filters/custom/custom-filter-shader-cache.html: Removed.
* css3/filters/custom/custom-filter-shader-reuse-expected.txt: Removed.
* css3/filters/custom/custom-filter-shader-reuse.html: Removed.
* css3/filters/custom/custom-filter-transforms-animation-expected.txt: Removed.
* css3/filters/custom/custom-filter-transforms-animation.html: Removed.
* css3/filters/custom/custom-filter-u-mesh-box-expected.html: Removed.
* css3/filters/custom/custom-filter-u-mesh-box.html: Removed.
* css3/filters/custom/custom-filter-u-mesh-size-expected.html: Removed.
* css3/filters/custom/custom-filter-u-mesh-size.html: Removed.
* css3/filters/custom/custom-filter-u-texture-size-expected.html: Removed.
* css3/filters/custom/custom-filter-u-texture-size.html: Removed.
* css3/filters/custom/custom-filter-u-tile-size-expected.html: Removed.
* css3/filters/custom/custom-filter-u-tile-size.html: Removed.
* css3/filters/custom/custom-filter-unavailable-varying-expected.html: Removed.
* css3/filters/custom/custom-filter-unavailable-varying.html: Removed.
* css3/filters/custom/effect-color-check-expected.png: Removed.
* css3/filters/custom/effect-color-check-expected.txt: Removed.
* css3/filters/custom/effect-color-check.html: Removed.
* css3/filters/custom/effect-custom-combined-missing-expected.png: Removed.
* css3/filters/custom/effect-custom-combined-missing-expected.txt: Removed.
* css3/filters/custom/effect-custom-combined-missing.html: Removed.
* css3/filters/custom/effect-custom-disabled-expected.txt: Removed.
* css3/filters/custom/effect-custom-disabled.html: Removed.
* css3/filters/custom/effect-custom-expected.png: Removed.
* css3/filters/custom/effect-custom-expected.txt: Removed.
* css3/filters/custom/effect-custom-parameters-expected.png: Removed.
* css3/filters/custom/effect-custom-parameters-expected.txt: Removed.
* css3/filters/custom/effect-custom-parameters.html: Removed.
* css3/filters/custom/effect-custom-transform-parameters-expected.html: Removed.
* css3/filters/custom/effect-custom-transform-parameters.html: Removed.
* css3/filters/custom/effect-custom.html: Removed.
* css3/filters/custom/filter-fallback-to-software-expected.html: Removed.
* css3/filters/custom/filter-fallback-to-software.html: Removed.
* css3/filters/custom/filter-repaint-custom-clipped-expected.png: Removed.
* css3/filters/custom/filter-repaint-custom-clipped-expected.txt: Removed.
* css3/filters/custom/filter-repaint-custom-clipped.html: Removed.
* css3/filters/custom/filter-repaint-custom-expected.png: Removed.
* css3/filters/custom/filter-repaint-custom-expected.txt: Removed.
* css3/filters/custom/filter-repaint-custom-rotated-expected.png: Removed.
* css3/filters/custom/filter-repaint-custom-rotated-expected.txt: Removed.
* css3/filters/custom/filter-repaint-custom-rotated.html: Removed.
* css3/filters/custom/filter-repaint-custom.html: Removed.
* css3/filters/custom/invalid-custom-filter-attribute-types-expected.html: Removed.
* css3/filters/custom/invalid-custom-filter-attribute-types.html: Removed.
* css3/filters/custom/invalid-custom-filter-shader-expected.html: Removed.
* css3/filters/custom/invalid-custom-filter-shader.html: Removed.
* css3/filters/custom/invalid-custom-filter-uniform-types-expected.html: Removed.
* css3/filters/custom/invalid-custom-filter-uniform-types.html: Removed.
* css3/filters/custom/missing-custom-filter-shader-expected.png: Removed.
* css3/filters/custom/missing-custom-filter-shader-expected.txt: Removed.
* css3/filters/custom/missing-custom-filter-shader.html: Removed.
* css3/filters/resources/a-tex-coord-defined.vs: Removed.
* css3/filters/resources/a-tex-coord-undefined.vs: Removed.
* css3/filters/resources/a-triangle-coord-defined.vs: Removed.
* css3/filters/resources/array-uniform-indirect-index.vs: Removed.
* css3/filters/resources/checkerboard.vs: Removed.
* css3/filters/resources/color-fill.fs: Removed.
* css3/filters/resources/color-offset.fs: Removed.
* css3/filters/resources/composite.fs: Removed.
* css3/filters/resources/css-keyword-as-parameter-name.fs: Removed.
* css3/filters/resources/custom-filter-clamp-css-color-matrix-negative.fs: Removed.
* css3/filters/resources/custom-filter-clamp-css-color-matrix.fs: Removed.
* css3/filters/resources/custom-filter-parser.js: Removed.
* css3/filters/resources/fragment-color.fs: Removed.
* css3/filters/resources/fragment-colors.fs: Removed.
* css3/filters/resources/fragment-matN.fs: Removed.
* css3/filters/resources/grayscale-color-matrix.fs: Removed.
* css3/filters/resources/invalid-a-triangle-coord-with-attached-mesh.vs: Removed.
* css3/filters/resources/invalid-custom-attribute.vs: Removed.
* css3/filters/resources/invalid-shader.vs: Removed.
* css3/filters/resources/invalid-type-a-mesh-coord.vs: Removed.
* css3/filters/resources/invalid-type-a-position.vs: Removed.
* css3/filters/resources/invalid-type-a-tex-coord.vs: Removed.
* css3/filters/resources/invalid-type-a-triangle-coord.vs: Removed.
* css3/filters/resources/invalid-type-attribute-array.vs: Removed.
* css3/filters/resources/invalid-type-u-mesh-box.fs: Removed.
* css3/filters/resources/invalid-type-u-mesh-size.fs: Removed.
* css3/filters/resources/invalid-type-u-projection-matrix.fs: Removed.
* css3/filters/resources/invalid-type-u-texture-size.fs: Removed.
* css3/filters/resources/invalid-type-u-tile-size.fs: Removed.
* css3/filters/resources/invalid-type-uniform-array.fs: Removed.
* css3/filters/resources/mix-color.fs: Removed.
* css3/filters/resources/pass-tex-coord.vs: Removed.
* css3/filters/resources/sample-defined-css-u-texture-mix.fs: Removed.
* css3/filters/resources/sample-defined-css-u-texture.fs: Removed.
* css3/filters/resources/sample-u-texture-mix.fs: Removed.
* css3/filters/resources/sample-u-texture.fs: Removed.
* css3/filters/resources/sample-undefined-css-u-texture-mix.fs: Removed.
* css3/filters/resources/sample-undefined-css-u-texture.fs: Removed.
* css3/filters/resources/u-mesh-box-is-unit-square.fs: Removed.
* css3/filters/resources/u-mesh-size.fs: Removed.
* css3/filters/resources/u-texture-size.fs: Removed.
* css3/filters/resources/u-tile-size.fs: Removed.
* css3/filters/resources/unavailable-varying.fs: Removed.
* css3/filters/resources/varying-mix-color.fs: Removed.
* css3/filters/resources/vertex-explode-detached.vs: Removed.
* css3/filters/resources/vertex-horizontal-offset.vs: Removed.
* css3/filters/resources/vertex-offset-parameters.vs: Removed.
* css3/filters/resources/vertex-offset.vs: Removed.
* css3/filters/resources/vertex-rotate.vs: Removed.
* css3/filters/resources/vertex-transform-parameter.vs: Removed.
* css3/filters/script-tests/custom-filter-mix-bindings.js: Removed.
* css3/filters/script-tests/custom-filter-parsing-common.js: Removed.
* css3/filters/script-tests/custom-filter-property-computed-style.js: Removed.
* css3/filters/script-tests/custom-filter-property-parsing-invalid.js: Removed.
* css3/filters/script-tests/custom-filter-property-parsing.js: Removed.
* css3/filters/script-tests/effect-custom-disabled.js: Removed.
* js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

7 years agoREGRESSION(r161967): Crash in WebCore::CachedSVGDocumentReference::load
jhoneycutt@apple.com [Thu, 23 Jan 2014 22:24:03 +0000 (22:24 +0000)]
REGRESSION(r161967): Crash in WebCore::CachedSVGDocumentReference::load
<https://webkit.org/b/127151>
<rdar://problem/15840760>

Source/WebCore:

There were two issues introduced here; the first is a use-after-free of
CachedSVGDocumentReference objects.

The previous code kept a map from FilterOperation ->
RefPtr<WebKitCSSSVGDocumentValue>, which retained the
CachedSVGDocument. In r161967, this was changed to use a weak HashSet,
which allows stale CachedSVGDocumentReferences in the pending document
set if the owning FilterOperation is deleted. To fix this, we'll keep a
vector of RefPtr<FilterOperation> with pending SVG documents.

The second issue is a null deref in CachedSVGDocumentReference::load();
CachedResourceLoader::requestSVGDocument() can return 0 if (for
example) an invalid URL is passed. r161967 removed a null check as part
of the refactoring.

Reviewed by Dirk Schulze.

Tests: css3/filters/crash-filter-animation-invalid-url.html
       css3/filters/crash-invalid-url.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::clear):
Use new member var name.
(WebCore::StyleResolver::loadPendingSVGDocuments):
For each FilterOperation with a pending SVG document, get or create a
CachedSVGDocumentReference, and tell it to load. Changed to use new
function names.
(WebCore::StyleResolver::createFilterOperations):
Append the FilterOperation to the list of FilterOperations with
unloaded SVG documents.

* css/StyleResolver.h:
Changed from using PendingSVGDocumentSet, a weak set, to
a Vector<RefPtr<ReferenceFilterOperation>>.
(WebCore::StyleResolver::State::filtersWithPendingSVGDocuments):
Return the vector.

* loader/cache/CachedSVGDocumentReference.cpp:
(WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
Null check m_document rather than checking m_loadRequested.
m_loadRequested may be true when m_document is 0.
(WebCore::CachedSVGDocumentReference::load):
Null check the result of CachedResourceLoader::requestSVGDocument().

* platform/graphics/filters/FilterOperation.cpp:
(WebCore::ReferenceFilterOperation::getOrCreateCachedSVGDocumentReference):
Create, if necessary, and return the CachedSVGDocumentReference.

* platform/graphics/filters/FilterOperation.h:
Replaced createCachedSVGDocumentReference() with
getOrCreateCachedSVGDocumentReference(), which makes for slightly
cleaner code.

LayoutTests:

Reviewed by Dirk Schulze.

* css3/filters/crash-filter-animation-invalid-url-expected.txt: Added.
* css3/filters/crash-filter-animation-invalid-url.html: Added.
* css3/filters/crash-invalid-url-expected.txt: Added.
* css3/filters/crash-invalid-url.html: Added.

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

7 years ago[Windows] Unreviewed. Disable unnecessary warning C4309, "truncation of constant...
roger_fong@apple.com [Thu, 23 Jan 2014 22:12:08 +0000 (22:12 +0000)]
[Windows] Unreviewed. Disable unnecessary warning C4309, "truncation of constant value".

* win/tools/vsprops/common.props:

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

7 years agoDon't enable speculative tiles immediately after main load stops progressing
antti@apple.com [Thu, 23 Jan 2014 22:03:27 +0000 (22:03 +0000)]
Don't enable speculative tiles immediately after main load stops progressing
https://bugs.webkit.org/show_bug.cgi?id=127507

Reviewed by Andreas Kling.

It is common for timers and events to trigger more loading after the initial main frame loading
has completed. We should delay a bit before enabling speculative tiles and keep them disabled
if loading still continues.

* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::adjustTiledBackingCoverage):
(WebCore::shouldEnableSpeculativeTilingDuringLoading):
(WebCore::FrameView::enableSpeculativeTilingIfNeeded):

    When load progression stops wait 0.5s before enabling speculative tiles.

(WebCore::FrameView::speculativeTilingEnableTimerFired):

    Don't enable speculative tiles if the progression has started again. Instead restart the timer.

* page/FrameView.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::computeTileCoverage):

    Move the FrameView level code to FrameView (so we don't need to add a timer to every RenderLayerBacking).

* rendering/RenderLayerBacking.h:

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

7 years agoAdd API::PolicyClient base class
andersca@apple.com [Thu, 23 Jan 2014 22:01:23 +0000 (22:01 +0000)]
Add API::PolicyClient base class
https://bugs.webkit.org/show_bug.cgi?id=127509

Reviewed by Tim Horton.

* UIProcess/API/APIPolicyClient.h: Copied from Source/WebKit2/UIProcess/WebPolicyClient.h.
(API::PolicyClient::~PolicyClient):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(setUpPagePolicyClient):
(-[WKBrowsingContextController setPolicyDelegate:]):
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setPolicyClient):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::unableToImplementPolicy):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPolicyClient.cpp:
(WebKit::WebPolicyClient::WebPolicyClient):
(WebKit::WebPolicyClient::decidePolicyForNavigationAction):
(WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
(WebKit::WebPolicyClient::decidePolicyForResponse):
* UIProcess/WebPolicyClient.h:
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoAdd init methods that create default configurations
andersca@apple.com [Thu, 23 Jan 2014 21:27:23 +0000 (21:27 +0000)]
Add init methods that create default configurations
https://bugs.webkit.org/show_bug.cgi?id=127503

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKProcessClass.mm:
(-[WKProcessClass init]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:]):

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

7 years agoLoads started soon after main frame completion should be considered part of the main...
antti@apple.com [Thu, 23 Jan 2014 21:20:00 +0000 (21:20 +0000)]
Loads started soon after main frame completion should be considered part of the main load
https://bugs.webkit.org/show_bug.cgi?id=127504

Reviewed by Andreas Kling.

ProgressTracker currently decides that main load is complete when the main frame stops loading.
However it is common that timers and onload events trigger more loads immediately (for example
by inserting iframes) and loading continues visually. These should be considered as part of the
main load for paint throttling and speculative tiling coverage purposes.

* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::ProgressTracker):
(WebCore::ProgressTracker::progressStarted):

    Track whether this is considered part of the main load or not with a boolean.
    It is set for subframe loads too if they start loading soon (within 1s) after the main frame load completes.

(WebCore::ProgressTracker::finalProgressComplete):

    Get a timestamp.

(WebCore::ProgressTracker::isMainLoadProgressing):

    New definition of "main load".

* loader/ProgressTracker.h:

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

7 years ago[WinCairo] Compile error.
commit-queue@webkit.org [Thu, 23 Jan 2014 21:19:31 +0000 (21:19 +0000)]
[WinCairo] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=127499

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-01-23
Reviewed by Brent Fulgham.

* platform/network/curl/ResourceError.h: Include <winsock2.h> before <curl/curl.h>.

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

7 years ago[WinCairo] Compile error.
commit-queue@webkit.org [Thu, 23 Jan 2014 21:18:06 +0000 (21:18 +0000)]
[WinCairo] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=127500

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-01-23
Reviewed by Brent Fulgham.

* WebCache.cpp:
(WebCache::cacheFolder): CurlCacheManager::getCacheDirectory() has changed name to cacheDirectory().

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

7 years agoProduction build fix.
timothy@apple.com [Thu, 23 Jan 2014 20:56:09 +0000 (20:56 +0000)]
Production build fix.

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

7 years agoIDB: Implement cross-thread and IPC plumbing for 'get' support
beidson@apple.com [Thu, 23 Jan 2014 20:25:34 +0000 (20:25 +0000)]
IDB: Implement cross-thread and IPC plumbing for 'get' support
https://bugs.webkit.org/show_bug.cgi?id=127501

Reviewed by Anders Carlsson.

Source/WebCore:

Add isolatedCopy to the IDBGetResult object:
* Modules/indexeddb/IDBGetResult.h:
(WebCore::IDBGetResult::isolatedCopy):

Add a cross-thread and cross-IPC appropriate object for IDBKeyRanges:
* Modules/indexeddb/IDBKeyRangeData.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
(WebCore::IDBKeyRangeData::isolatedCopy):
* Modules/indexeddb/IDBKeyRangeData.h: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
(WebCore::IDBKeyRangeData::IDBKeyRangeData):

Add a few more cross-thread copiers:
* platform/CrossThreadCopier.cpp:
(WebCore::IDBGetResult>::copy):
(WebCore::IDBKeyRangeData>::copy):
* platform/CrossThreadCopier.h:

Project file gunk:
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

Make the WebProcess call out to the DatabaseProcess with a get request, and handle the
response from the DatabaseProcess:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::get):
(WebKit::WebIDBServerConnection::didGetRecord):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

Get the request from the WebProcess and forward it to the appropriate unique IDB database:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::getRecord):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:

Forward the request to the database thread, and response to the result from that thread:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::getRecord):
(WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
(WebKit::UniqueIDBDatabase::didGetRecordFromBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

IPC and asynchronous request infrastructure:
* Scripts/webkit2/messages.py:
(struct_or_class):

* Shared/AsyncTask.h:
(WebKit::createAsyncTask):

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<IDBGetResult>::encode):
(IPC::ArgumentCoder<IDBGetResult>::decode):
(IPC::ArgumentCoder<IDBKeyRangeData>::encode):
(IPC::ArgumentCoder<IDBKeyRangeData>::decode):
* Shared/WebCoreArgumentCoders.h:

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

7 years agosvg/animations/smil-syncbase-self-dependency.svg is very flaky
ap@apple.com [Thu, 23 Jan 2014 20:12:07 +0000 (20:12 +0000)]
svg/animations/smil-syncbase-self-dependency.svg is very flaky

This is a newly landed test for <https://bugs.webkit.org/show_bug.cgi?id=108184>
that wasn't actually testing for what the bug fixed. The plan is to add a better
test soon, so deleting this one.

* svg/animations/smil-syncbase-self-dependency-expected.txt: Removed.
* svg/animations/smil-syncbase-self-dependency.svg: Removed.

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

7 years ago[MSE][Mac] Adopt new AVStreamDataParser delegate API
jer.noble@apple.com [Thu, 23 Jan 2014 19:42:17 +0000 (19:42 +0000)]
[MSE][Mac] Adopt new AVStreamDataParser delegate API
https://bugs.webkit.org/show_bug.cgi?id=127498

Reviewed by Eric Carlson.

Adopt a new delegate API which passes in whether or not the new AVAsset
is discontinuous, implying the AVAsset is entirely new rather than
just updated with new information.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]):

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

7 years agoPDFPlugin: Use PDFPlugin even if there's an external plugin installed, if it's blocked
timothy_horton@apple.com [Thu, 23 Jan 2014 19:31:18 +0000 (19:31 +0000)]
PDFPlugin: Use PDFPlugin even if there's an external plugin installed, if it's blocked
https://bugs.webkit.org/show_bug.cgi?id=127415
<rdar://problem/12482452>

Reviewed by Sam Weinig.

Allow use of PDFPlugin even if an external plugin is installed but blocked.
If an external plugin is installed and not blocked, we will continue to use that.

Inject a context menu item into the PDFPlugin context menu that allows the client
to unblock the plugin and reload the page (via the same mechanism that the
unavailable plugin button uses).

* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(setUpPageLoaderClient):
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::pluginLoadPolicy):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
Add a new PluginLoadPolicy callback for the V4 client with
yet another string out-argument, to allow clients to customize the string
that will appear in the PDFPlugin context menu when it is used in place
of a blocked plugin.

* WebProcess/Plugins/PDF/PDFPlugin.h:
Add setUsedInPlaceOfBlockedPlugin(), which determines whether or not
we should include an item in the PDFPlugin context menu that acts identically
to the unavailable plugin button, allowing the client to potentially unblock
the plugin.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFPluginContextMenuTarget initWithPDFPlugin:WebKit::]):
(-[WKPDFPluginContextMenuTarget useBlockedPlugin:]):
Added WKPDFPluginContextMenuTarget, which is the Objective-C object that the
aforementioned context menu item targets.

(WebKit::PDFPlugin::PDFPlugin):
By default, we won't show the extra context menu item.

(WebKit::PDFPlugin::handleContextMenuEvent):
If we were used in place of a blocked plugin, inject our additional context
menu item into the menu. If we were handed a custom string via setUsedInPlaceOfBlockedPlugin,
use that. Otherwise, use the generic string from WebCore's localized strings.

(WebKit::PDFPlugin::openWithPlugin):
Pretend that the user clicked the unavailable plugin button when they click
the injected context menu item.

(WebKit::PDFPlugin::setUsedInPlaceOfBlockedPlugin):

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
If we end up with a blocked plugin, but could have used PDFPlugin to display
the content, do so instead of showing the unavailable plugin indicator.

Pass PDFPlugin the custom context menu item title acquired from the client.

(WebKit::WebPage::canPluginHandleResponse):

* English.lproj/Localizable.strings:
* WebCore.exp.in:
* platform/LocalizedStrings.cpp:
(WebCore::useBlockedPlugInContextMenuTitle):
* platform/LocalizedStrings.h:
Add a localizable string for the generic case, where the client
didn't provide a more specific string for the context menu item.

Adopt the new page loader client plugin load callback.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::pluginLoadPolicy):
* WebKitTestRunner/TestController.h:

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

7 years agoUnreviewed GTK gardening.
commit-queue@webkit.org [Thu, 23 Jan 2014 19:20:33 +0000 (19:20 +0000)]
Unreviewed GTK gardening.

Remove failure/timeout expectations for the following passed tests:

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-01-23

* platform/gtk/TestExpectations:
    http/tests/navigation/redirect-to-random-url-versus-memory-cache.html

* platform/gtk-wk2/TestExpectations:
    http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash.html
    accessibility/multiselect-list-reports-active-option.html

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

7 years ago[iOS] [WK2] WKContentView has a black background
timothy_horton@apple.com [Thu, 23 Jan 2014 18:52:01 +0000 (18:52 +0000)]
[iOS] [WK2] WKContentView has a black background
https://bugs.webkit.org/show_bug.cgi?id=127471
<rdar://problem/12287363>

Reviewed by Sam Weinig.

* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
Instead of giving it a (black!) background to make hit-testing work, use CALayer SPI
to tell CA that the whole layer should be treated as opaque when it comes to hit-testing.

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

7 years ago[Win] Mark test mathml/presentation/maction-toggle.html as failing in TestExpectation
dbates@webkit.org [Thu, 23 Jan 2014 18:48:05 +0000 (18:48 +0000)]
[Win] Mark test mathml/presentation/maction-toggle.html as failing in TestExpectation

For now, mark the test mathml/presentation/maction-toggle.html as failing. See
<https://bugs.webkit.org/show_bug.cgi?id=127495> for more details.

* platform/win/TestExpectations:

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

7 years ago[Curl] There is no way to specify cache folder.
commit-queue@webkit.org [Thu, 23 Jan 2014 18:20:38 +0000 (18:20 +0000)]
[Curl] There is no way to specify cache folder.
https://bugs.webkit.org/show_bug.cgi?id=125028

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-01-23
Reviewed by Brent Fulgham.

Source/WebCore:

Fixed logical test, disc cache should be disabled if creating cache folder fails.

* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::setCacheDirectory):

Source/WebKit/win:

Added interface methods to set and get cache folder location.

* Interfaces/IWebCache.idl:
* WebCache.cpp:
(WebCache::disabled):
(WebCache::cacheFolder):
(WebCache::setCacheFolder):
* WebCache.h:

Tools:

Enable disc cache in WinLauncher by setting cache folder location.

* WinLauncher/WinLauncher.cpp:
(getAppDataFolder): Added function to get app data folder.
(setCacheFolder): Added function to set cache folder.
(createCrashReport): Use new getAppDataFolder function.
(wWinMain): Use function setCacheFolder to set cache folder location.

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

7 years agoUnreviewed build fix.
beidson@apple.com [Thu, 23 Jan 2014 18:15:55 +0000 (18:15 +0000)]
Unreviewed build fix.

* WebCore.xcodeproj/project.pbxproj: Export the new header so WebKit can see it

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

7 years ago../JavaScriptCore: [Win] Update project and solution files for 64-bit builds.
bfulgham@apple.com [Thu, 23 Jan 2014 18:14:00 +0000 (18:14 +0000)]
../JavaScriptCore: [Win] Update project and solution files for 64-bit builds.
https://bugs.webkit.org/show_bug.cgi?id=127457

Reviewed by Eric Carlson.

* JavaScriptCore.vcxproj/JavaScriptCore.submit.sln: Add 64-bit target.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Update for VS2013
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Add missing
file from project view.
* JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Update for VS2013
* JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: Ditto
* JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Ditto

../WebCore: [Win] Update project and solution files for 64-bit builds
https://bugs.webkit.org/show_bug.cgi?id=127457

Reviewed by Eric Carlson.

* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Update for VS2013
* WebCore.vcxproj/WebCore.submit.sln: Add x64 targets
* WebCore.vcxproj/WebCore.vcxproj: Update for VS2013. Also exclude 32-bit specific
assembly when building 64-bit target.
* WebCore.vcxproj/WebCore.vcxproj.filters: Update for VS2013
* config.h: Handle 64-bit type definitions.
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
(PlatformCAAnimation::setFromValue): Use CGFloat to support 64-bit builds
(PlatformCAAnimation::setToValue): Ditto
(PlatformCAAnimation::setValues): Ditto
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Add cast to
support 32- and 64-bit targets.
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContext::drawLineForDocumentMarker): Use CGFloat to
support 64-bit builds.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeURLToDataObject): Specialize std::min to
work on 32- and 64-bit code.
(WebCore::createGlobalImageFileDescriptor): Ditto
* platform/win/StructuredExceptionHandlerSuppressor.cpp:
(WebCore::StructuredExceptionHandlerSuppressor::StructuredExceptionHandlerSuppressor):
Comment out 32-bit inline assembly.
(WebCore::StructuredExceptionHandlerSuppressor::~StructuredExceptionHandlerSuppressor):
Ditto

../WebKit: [Win] Update project and solution files for 64-bit builds
https://bugs.webkit.org/show_bug.cgi?id=127457

Reviewed by Eric Carlson.

* WebKit.vcxproj/Interfaces/Interfaces.vcxproj: Update for VS2013.
* WebKit.vcxproj/WebKit.submit.sln: Add 64-bit target.
* WebKit.vcxproj/WebKit/WebKit.vcxproj: Update for VS2013
* WebKit.vcxproj/WebKit/WebKitApple.props: Remove unused QTMovieWin
library dependency.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGenerator.vcxproj:
Update for VS2013.
* WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj: Ditto

../WTF: [Win] Update project and solution files for 64-bit builds.
https://bugs.webkit.org/show_bug.cgi?id=127457

Reviewed by Eric Carlson.

* WTF.vcxproj/WTF.submit.sln: Add x64 targets.
* WTF.vcxproj/WTF.vcxproj: Update for VS2013

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

7 years ago[Win] Mark test js/dom/date-big-constructor.html as failing and add Windows expected...
dbates@webkit.org [Thu, 23 Jan 2014 18:07:21 +0000 (18:07 +0000)]
[Win] Mark test js/dom/date-big-constructor.html as failing and add Windows expected result

Mark the test js/dom/date-big-constructor.html as failing while we investigate
regression in <https://bugs.webkit.org/show_bug.cgi?id=127492>. Also add Windows expected
result for test fast/css/relative-position-replaced-in-table-display-crash.html as the test
passes but differs in whitespace. We'll investigate this whitespace difference in
<https://bugs.webkit.org/show_bug.cgi?id=127479>.

* platform/win/TestExpectations:
* platform/win/fast/css/relative-position-replaced-in-table-display-crash-expected.txt: Added.

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

7 years agoMake IDBGetResult work with IDBKeyData instead of IDBKey.
beidson@apple.com [Thu, 23 Jan 2014 18:03:19 +0000 (18:03 +0000)]
Make IDBGetResult work with IDBKeyData instead of IDBKey.
https://bugs.webkit.org/show_bug.cgi?id=127493

Reviewed by Eric Carlson.

Also break it into its own header to work better with IPC messages.

* Modules/indexeddb/IDBGetResult.h: Added.
(WebCore::IDBGetResult::IDBGetResult):

* Modules/indexeddb/IDBServerConnection.h:

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::GetOperation::perform):

* WebCore.xcodeproj/project.pbxproj:

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

7 years ago[curl] Add storage limit to cache manager
commit-queue@webkit.org [Thu, 23 Jan 2014 17:53:14 +0000 (17:53 +0000)]
[curl] Add storage limit to cache manager
https://bugs.webkit.org/show_bug.cgi?id=125779

Patch by Mátyás Mustoha <mmatyas@inf.u-szeged.hu> on 2014-01-23
Reviewed by Brent Fulgham.

Sets a local disc storage size limit for the cache manager
used by the curl network backend.

* platform/network/curl/CurlCacheEntry.cpp:
(WebCore::CurlCacheEntry::CurlCacheEntry):
(WebCore::CurlCacheEntry::isCached):
(WebCore::CurlCacheEntry::saveCachedData):
(WebCore::CurlCacheEntry::readCachedData):
(WebCore::CurlCacheEntry::didFail):
(WebCore::CurlCacheEntry::didFinishLoading):
(WebCore::CurlCacheEntry::loadFileToBuffer):
(WebCore::CurlCacheEntry::parseResponseHeaders):
(WebCore::CurlCacheEntry::entrySize):
* platform/network/curl/CurlCacheEntry.h:
(WebCore::CurlCacheEntry::requestHeaders):
* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::CurlCacheManager):
(WebCore::CurlCacheManager::setStorageSizeLimit):
(WebCore::CurlCacheManager::loadIndex):
(WebCore::CurlCacheManager::saveIndex):
(WebCore::CurlCacheManager::makeRoomForNewEntry):
(WebCore::CurlCacheManager::didReceiveResponse):
(WebCore::CurlCacheManager::didReceiveData):
(WebCore::CurlCacheManager::invalidateCacheEntry):
(WebCore::CurlCacheManager::readCachedData):
* platform/network/curl/CurlCacheManager.h:
(WebCore::CurlCacheManager::cacheDirectory):

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

7 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Thu, 23 Jan 2014 17:33:18 +0000 (17:33 +0000)]
Unreviewed EFL gardening

Add test expectations for failing tests.

* platform/efl/TestExpectations:

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

7 years agobuild-webkit --sdk=iphonesimulator doesn't think it's building iOS
dbates@webkit.org [Thu, 23 Jan 2014 17:25:31 +0000 (17:25 +0000)]
build-webkit --sdk=iphonesimulator doesn't think it's building iOS
https://bugs.webkit.org/show_bug.cgi?id=127379

Reviewed by Simon Fraser.

Teach build-webkit to recognize --sdk=X.

Currently, build-webkit recognizes --sdk X to specify X as the Xcode SDK to use, which is also
considered when determining the WebKit port to build. But build-webkit advertises --sdk=X in its
help message. We should teach build-webkit to recognize both --sdk X and --sdk=X to make its handling
of --sdk more consistent with the handling of other build-webkit options that take a value (e.g. --prefix).

* Scripts/webkitdirs.pm:
(checkForArgumentAndRemoveFromArrayRefGettingValue): Added.
(checkForArgumentAndRemoveFromARGVGettingValue): Modified to call checkForArgumentAndRemoveFromArrayRefGettingValue().
* Scripts/webkitperl/webkitdirs_unittest/checkForArgumentAndRemoveFromArrayRefGettingValue.pl: Added.

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

7 years ago[Win] Update expected result for test svg/W3C-SVG-1.1/paths-data-03-f.html
dbates@webkit.org [Thu, 23 Jan 2014 17:23:47 +0000 (17:23 +0000)]
[Win] Update expected result for test svg/W3C-SVG-1.1/paths-data-03-f.html

The expected result for the test test svg/W3C-SVG-1.1/paths-data-03-f.html on Windows
shows a progression towards matching the Mac expected result. Currently, there are many
numerical differences between the expected results for these platforms, described within
three diff chunks. After this commit there will be a single numerical difference (described
in one diff chunk) between the Mac and Windows results. See <https://bugs.webkit.org/show_bug.cgi?id=127490>
for more details.

* platform/win/svg/W3C-SVG-1.1/paths-data-03-f-expected.txt:

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

7 years ago[Win] Update expected result for test svg/W3C-SVG-1.1/paths-data-03-f.html
dbates@webkit.org [Thu, 23 Jan 2014 17:21:28 +0000 (17:21 +0000)]
[Win] Update expected result for test svg/W3C-SVG-1.1/paths-data-03-f.html

The expected result for the test test svg/W3C-SVG-1.1/paths-data-03-f.html on Windows
shows a progression towards matching the Mac expected result. Currently, there are many
numerical differences between the expected results for these platforms, described within
three diff chunks. After this commit there will be a single numerical difference (described
in one diff chunk) between the Mac and Windows results. See <https://bugs.webkit.org/show_bug.cgi?id=127490>
for more details.

* platform/win/svg/W3C-SVG-1.1/paths-data-03-f-expected.txt:

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

7 years agoUnreviewed, rolling out r162612.
commit-queue@webkit.org [Thu, 23 Jan 2014 17:19:02 +0000 (17:19 +0000)]
Unreviewed, rolling out r162612.
http://trac.webkit.org/changeset/162612
https://bugs.webkit.org/show_bug.cgi?id=127488

broke the build (Requested by mhahnenberg on #webkit).

* Scripts/build-jsc:
* jsc-cli/jsc-cli.xcodeproj/project.pbxproj: Removed.
* jsc-cli/jsc-cli/CLIInstance.h: Removed.
* jsc-cli/jsc-cli/CLIInstance.m: Removed.
* jsc-cli/jsc-cli/JSModule.h: Removed.
* jsc-cli/jsc-cli/JSModule.m: Removed.
* jsc-cli/jsc-cli/JSRunLoopThread.h: Removed.
* jsc-cli/jsc-cli/JSRunLoopThread.m: Removed.
* jsc-cli/jsc-cli/ReadEvalPrintLoop.h: Removed.
* jsc-cli/jsc-cli/ReadEvalPrintLoop.m: Removed.
* jsc-cli/jsc-cli/RunLoopThread.h: Removed.
* jsc-cli/jsc-cli/RunLoopThread.m: Removed.
* jsc-cli/jsc-cli/ScriptInputSource.h: Removed.
* jsc-cli/jsc-cli/ScriptInputSource.m: Removed.
* jsc-cli/jsc-cli/main.m: Removed.

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