[WebKit2] Merge WebProcessMac and WebProcessIOS into WebProcessCocoa
https://bugs.webkit.org/show_bug.cgi?id=128939

Reviewed by Dan Bernstein.

* WebKit2.xcodeproj/project.pbxproj:
Add/remove files/groups.

* WebProcess/WebProcess.h:
Change stopRunLoop() to be AppKit only.

* WebProcess/cocoa: Added.
* WebProcess/cocoa/WebProcessCocoa.mm: Copied from Source/WebKit2/WebProcess/mac/WebProcessMac.mm.
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::initializeProcessName):
(WebKit::WebProcess::platformInitializeProcess):
(WebKit::WebProcess::initializeSandbox):
(WebKit::WebProcess::updateActivePages):
* WebProcess/ios/WebProcessIOS.mm: Removed.
* WebProcess/mac/WebProcessMac.mm: Removed.
Copy mac/WebProcessMac.mm to cocoa/WebProcessCocoa.mm, and add #if USE(APPKIT) where appropriate.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] [CMake] JavaScriptCore crashes in JSC::eval
https://bugs.webkit.org/show_bug.cgi?id=128434

Reviewed by Anders Carlsson.

* Source/cmake/OptionsGTK.cmake: Add -fno-omit-frame-pointer to the GTK+ CMake
port as well as -fno-tree-dce, like it is used in the autotools build.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add history delegate to WKWebView
https://bugs.webkit.org/show_bug.cgi?id=128930

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKHistoryDelegatePrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h.
* UIProcess/API/Cocoa/WKProcessClass.mm:
(-[WKProcessClass initWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _historyDelegate]):
(-[WKWebView _setHistoryDelegate:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/HistoryClient.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h.
* UIProcess/Cocoa/HistoryClient.mm: Added.
(WebKit::HistoryClient::HistoryClient):
(WebKit::HistoryClient::~HistoryClient):
(WebKit::HistoryClient::didNavigateWithNavigationData):
(WebKit::HistoryClient::didPerformClientRedirect):
(WebKit::HistoryClient::didPerformServerRedirect):
(WebKit::HistoryClient::didUpdateHistoryTitle):
(WebKit::HistoryClient::populateVisitedLinks):
(WebKit::HistoryClient::shouldTrackVisitedLinks):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::navigationStates):
(WebKit::NavigationState::NavigationState):
(WebKit::NavigationState::~NavigationState):
(WebKit::NavigationState::fromWebPage):
(WebKit::NavigationState::historyDelegate):
(WebKit::NavigationState::setHistoryDelegate):
(WebKit::NavigationState::didNavigateWithNavigationData):
(WebKit::NavigationState::didPerformClientRedirect):
(WebKit::NavigationState::didPerformServerRedirect):
(WebKit::NavigationState::didUpdateHistoryTitle):
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move iOS only Settings into Settings.in and make them not-iOS only
https://bugs.webkit.org/show_bug.cgi?id=128942

Reviewed by Tim Horton.

* page/Settings.cpp:
* page/Settings.h:
* page/Settings.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][wk2] Custom layers are sometimes put on-screen without being parented
https://bugs.webkit.org/show_bug.cgi?id=128935
<rdar://problem/16022336>

Reviewed by Sam Weinig.

* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createForExternalHostingProcess):
Give an explicit and unlikely display ID, so that the layer will never
be brought on-screen unless explicitly parented.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ENABLE_GLOBAL_FASTMALLOC_NEW
https://bugs.webkit.org/show_bug.cgi?id=127067

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* parser/Nodes.h:

Source/WebCore:

* platform/Timer.h:

Source/WTF:

Remove the global operator new/operator delete overrides. Having ALWAYS_INLINE operators
like we do is really undefined behavior according to the C++ standard and we've been lucky enough
to get away with it so far, but any code that calls operator new/operator delete inside from the C++ standard
library (not from headers that are included) will be mismatched and potentially crash. libc++ calls
delete in it's std::thread implementation for example.

The only supported way to override operator new and operator delete globally is to not use inline
functions, but that would mean that any application using WebKit would not be able to provide custom
operator new/operator delete functions so we'll just reuse the already existing infrastructure consisting
of the WTF_MAKE_FAST_ALLOCATED macro.

* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/FastMalloc.h:
* wtf/Platform.h:


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

* WebCore.exp.in:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Constrain replaced element layout to from-intrinsic aspect ratio if specified
https://bugs.webkit.org/show_bug.cgi?id=128629

Reviewed by Simon Fraser.

Source/WebCore:

First pass at implementing -webkit-aspect-ratio: from-instrinsics;

After RenderReplaced has done layout, attempt to update the
resulting size to match the desired aspect ratio. This step
will only reduce the size of an element, and never below the
minimum dimensions.

Tests: fast/css/aspect-ratio/columns.html
       fast/css/aspect-ratio/containers.html
       fast/css/aspect-ratio/simple.html

* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageDimensionsChanged): If we get an update
to our intrinsic dimensions, and layout depends on this, trigger
another layout pass.
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::layout): Implement the step described
above.

LayoutTests:

Three new tests that exercise aspect ratio on:
- normal content
- content that is constrained within a parent container
- content in columns (pages)

* fast/css/aspect-ratio/badchess-tall.png: Added.
* fast/css/aspect-ratio/badchess-wide.png: Added.
* fast/css/aspect-ratio/columns-expected.html: Added.
* fast/css/aspect-ratio/columns.html: Added.
* fast/css/aspect-ratio/containers-expected.html: Added.
* fast/css/aspect-ratio/containers.html: Added.
* fast/css/aspect-ratio/simple-expected.html: Added.
* fast/css/aspect-ratio/simple.html: Added.

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