Use SQLite journal mode WAL (WriteAheadLogging)
https://bugs.webkit.org/show_bug.cgi?id=124009

Reviewed by Anders Carlsson.

WriteAheadLogging journalling is better than the traditional rollback model.

* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::open): Use a PRAGMA to set journal_mode to WAL.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Gtk] Disable LTO when building cairo
https://bugs.webkit.org/show_bug.cgi?id=123954

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-11-07
Reviewed by Martin Robinson.

Cairo always uses LTO, when it detects compiler support.
LTO is buggy in many/all versions of GCC and shouldn't be enabled by
default. This patch disables LTO when building cairo library.
- See: https://bugs.freedesktop.org/show_bug.cgi?id=60852

With gcc 4.7.3, for example, the build fails with the following message:
'lto1: fatal error: LTO_tags out of range: Range is 0 to 361, value is 15872'

* gtk/jhbuild.modules:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use std::function for all policy continuation functions
https://bugs.webkit.org/show_bug.cgi?id=124011

Reviewed by Sam Weinig.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::responseReceived):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::loadPostRequest):
* loader/PolicyCallback.cpp:
(WebCore::PolicyCallback::clear):
(WebCore::PolicyCallback::set):
(WebCore::PolicyCallback::call):
(WebCore::PolicyCallback::clearRequest):
(WebCore::PolicyCallback::cancel):
* loader/PolicyCallback.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):
(WebCore::PolicyChecker::checkContentPolicy):
* loader/PolicyChecker.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash when submitting form in a document with null encoding
https://bugs.webkit.org/show_bug.cgi?id=123975

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/bba01a7fff09e3053ada96ababac2a6e4261fe5f

The CString object which is passed to normalizeLineEndingsToCRLF() can be
a null string. It is created in FormDataList::appendString(), and it
produces a null CString if FormDataList::m_encoding is a null encoding.

Test: fast/forms/form-submit-in-image-document.html

* platform/text/LineEnding.cpp:
(internalNormalizeLineEndingsToCRLF):

LayoutTests:

* fast/forms/form-submit-in-image-document-expected.txt: Added.
* fast/forms/form-submit-in-image-document.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Crash at com.apple.WebCore: -[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:] + 2084
https://bugs.webkit.org/show_bug.cgi?id=124012

Reviewed by Eric Carlson.

The value of the 'duration' key is a NSConcreteValue wrapping a CMTime, not a NSNumber.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in HTMLMediaElement::contextDestroyed
https://bugs.webkit.org/show_bug.cgi?id=123963

Reviewed by Eric Carlson.

Merge https://chromium.googlesource.com/chromium/blink/+/177999cdb34b707465670f0feff723922939f278

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening

Remove failure test expectations from passing tests.

* platform/efl-wk2/fast/repaint/caret-with-transformation-expected.png: Removed.
* platform/efl/TestExpectations:
* platform/efl/fast/repaint/caret-with-transformation-expected.png: Added.
* platform/efl/fast/repaint/caret-with-transformation-expected.txt: Renamed from LayoutTests/platform/efl-wk2/fast/repaint/caret-with-transformation-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't repaint the view when the web process crashes
https://bugs.webkit.org/show_bug.cgi?id=124013

Reviewed by Dan Bernstein.

It's up to each individual port to decide whether the view should be repainted when the web process crashes.

* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setViewNeedsDisplay):
(WebKit::PageClientImpl::displayView):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to fix the 32-bit build. Virtual thunks seem to have different
symbol names between 32- and 64-bit.

* WebCore.exp.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove npr.org specific hack in HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=123859

Reviewed by Jer Noble.

Remove the site specific hack added in r57820, it is no longer necessary.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Remove m_dispatchingCanPlayEvent.
(HTMLMediaElement::play): Don't special case npr.org.
* html/HTMLMediaElement.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reproducible crash when using Map (affects Web Inspector)
https://bugs.webkit.org/show_bug.cgi?id=123940

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Trivial fix.  Once again we get bitten by attempting to be clever when
growing while adding entries to indexing maps.

Now we simply do a find(), and then add() _after_ we've ensured there is
sufficient space in the MapData list.

* runtime/MapData.cpp:
(JSC::MapData::add):

LayoutTests:

Add testcases

* js/map-grow-with-holes-expected.txt: Added.
* js/map-grow-with-holes.html: Added.
* js/script-tests/map-grow-with-holes.js: Added.
(get map):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modify email order list for James Craig so his primary email is first.

* Scripts/webkitpy/common/config/contributors.json:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DOMTokenList::add can add duplicated values if arguments had duplicated values
https://bugs.webkit.org/show_bug.cgi?id=123962

Reviewed by Benjamin Poulain.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/bd3822ad4ae3fc5d8f89f433a7bf04f697334305

In case we do element.classList.add('a', 'a') we need to ensure that we do not add the same token twice.
See http://dom.spec.whatwg.org/#dom-domtokenlist-add

* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::add): Make sure filtered tokens are unique among themselves.

LayoutTests:

* fast/dom/HTMLElement/class-list-expected.txt:
* fast/dom/HTMLElement/class-list-quirks-expected.txt:
* fast/dom/HTMLElement/script-tests/class-list.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix up some sidebar switching details to make selections persist better.

Translate represented objects between sidebars so the same item can be reselected
as you switch between frames and main reources. Also fix some null checks that are
needed on selectedSidebarPanel.

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

Reviewed by Joseph Pecoraro.

* UserInterface/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.treeElementForRepresentedObject): Added. Translate a Frame
representedObject into a main resource representedObject.
* UserInterface/Main.js:
(WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar): Null check selectedSidebarPanel.
(WebInspector._updateNavigationSidebarForCurrentContentView): Fix a logic error to match other code.
allowedNavigationSidebarPanels.length needs to have a length before using contains.
(WebInspector._contentBrowserCurrentContentViewDidChange): Null check selectedSidebarPanel.
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Translate a main resource
representedObject into a Frame representedObject.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove more dead code
https://bugs.webkit.org/show_bug.cgi?id=124016

Reviewed by Beth Dakin.

We're always layer backed now so we never scroll using the PageClient.

* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::canScrollView):
(WebKit::PageClientImpl::scrollView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: CSS Regions: Use a Map object to store the ContentFlows
https://bugs.webkit.org/show_bug.cgi?id=124015

Reviewed by Joseph Pecoraro.

Changed the Object hashmap to a Map based hashmap when storing the flows in DOMTreeManager.

* UserInterface/DOMTreeManager.js:
(WebInspector.DOMTreeManager):
(WebInspector.DOMTreeManager.prototype.getNamedFlowCollection):
(WebInspector.DOMTreeManager.prototype.namedFlowRemoved):
(WebInspector.DOMTreeManager.prototype._sendNamedFlowUpdateEvents):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change CallFrameRegister to architected frame pointer register
https://bugs.webkit.org/show_bug.cgi?id=123956

Reviewed by Geoffrey Garen.

Changed X86 and ARM variants as well as MIPS to use their respective architected
frame pointer registers.  The freed up callFrameRegisteris are made available to 
the DFG register allocator.  Modified the FTL OSR exit compiler to use a temporary
register as a stand in for the destination callFrameRegister since the FTL frame
pointer register is needed to extract values from the FTL stack.

Reviewed by Geoffrey Garen.

* assembler/ARMAssembler.h:
* assembler/ARMv7Assembler.h:
* assembler/MacroAssemblerMIPS.h:
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::addressFor):
* jit/GPRInfo.h:
(JSC::GPRInfo::toRegister):
(JSC::GPRInfo::toIndex):
* jit/JITOperations.cpp:
* jit/JSInterfaceJIT.h:
* jit/ThunkGenerators.cpp:
(JSC::callToJavaScript):
* offlineasm/arm.rb:
* offlineasm/arm64.rb:
* offlineasm/mips.rb:
* offlineasm/x86.rb:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove a PLATFORM(IOS) from WebKit Private Header
https://bugs.webkit.org/show_bug.cgi?id=124014

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-11-07
Reviewed by Timothy Hatcher.

Source/WebKit/ios:

* WebKit.iOS.exp:

Source/WebKit/mac:

Make the previously iOS only WebInspectorDidStartSearchingForNode
and WebInspectorDidStopSearchingForNode notifications non iOS specific.

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorClient::didSetSearchingForNode):
* WebInspector/WebInspector.h:
* WebInspector/WebInspector.mm:
* WebKit.exp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Windows WebKit makefile fixes.

No need to copy over WebKit.resources.

* WebKit.vcxproj/WebKit.make:
* WebKit.vcxproj/WebKit/WebKitPostBuild.cmd:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Lots of layers get solid color but transparent contents layers now
https://bugs.webkit.org/show_bug.cgi?id=123537

Source/WebCore:

Reviewed by Tim Horton.

We call rendererBackgroundColor() to determine the layer's background color,
but on most elements this returns the transparent color (a valid color).
This caused us to allocate a contentsLayer, and use the transparent color as its
backgroundColor, which was wasteful.

Fix by only making a background-color layer if the color is not transparent (zero alpha).

Also avoid making a new contents layer on every color change, and make sure that
we don't do implicit animations for backgroundColor, and some other properties
that were omitted by mistake.

Layer tree dumps don't dump content layers, so no way to test easily.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setContentsToSolidColor):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(nullActionsDictionary):

Source/WebKit2:

Reviewed by Tim Horton.

Add some properties to the list of things not to implicitly animate.

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::disableActionsForLayer):

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