Get rid of ThreadRestrictionVerifier
https://bugs.webkit.org/show_bug.cgi?id=127004

Reviewed by Sam Weinig.

Source/WebCore:

Remove now unneeded calls.

* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::defaultIcon):
(WebCore::IconDatabase::setIconDataForIconURL):
(WebCore::IconDatabase::getOrCreateIconRecord):
(WebCore::IconDatabase::readFromDatabase):

Source/WTF:

The ThreadRestrictionVerifier mechanism has been turned off for a while
since it doesn't really have a good solution for objects that are passed between threads.
Instead of having dead code in the tree, just get rid of it.

* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/RefCounted.h:
(WTF::RefCountedBase::ref):
(WTF::RefCountedBase::hasOneRef):
(WTF::RefCountedBase::refCount):
(WTF::RefCountedBase::derefBase):
* wtf/ThreadRestrictionVerifier.h: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for handling WebGL load policies.
https://bugs.webkit.org/show_bug.cgi?id=126935
<rdar://problem/15790448>.

Reviewed by Brent Fulgham.

* WebCore.xcodeproj/project.pbxproj: Copy over HTMLCanvasElement.h to the private headers directory.
* html/HTMLCanvasElement.cpp: Show the policy dialog and retrieve policies as necessary.
(WebCore::HTMLCanvasElement::getContext): Make sure that WebGL is allowed on the site.
                                          If it isn't, be sure to notify the frame loader client that
                                          the site is trying to create a WebGL context.

Boiler plate code for sending messages to and from the UI and Web Process. 

* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::webGLPolicyForHost): Used to get the WebGL load policy for a site.
* loader/FrameLoaderTypes.h:
* page/ChromeClient.h:
(WebCore::ChromeClient::webGLContextCreated): Called when a site is creating a WebGL context.
* UIProcess/API/C/WKAPICast.h:
(WebKit::toWebGLLoadPolicy):
* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::webGLLoadPolicy):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::webGLContextCreated):
(WebKit::WebPageProxy::webGLPolicyForHost):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::webGLContextCreated):
* UIProcess/WebUIClient.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::webGLContextCreated):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::webGLPolicyForHost):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp: A sendSync is used here to get the webGLPolicyForHost message sent between the Web and UI process.
                                  In the future this will be replaced with a strategy is non-blocking.
(WebKit::WebPage::getWebGLPolicyForHost):
* WebProcess/WebPage/WebPage.h:
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Move CSSPrimitiveValue <-> LayoutBox Conversion to CSSPrimitiveValueMappings
https://bugs.webkit.org/show_bug.cgi?id=126719

Reviewed by Dirk Schulze.

The standard location for conversions to/from CSSPrimitiveValues is CSSPrimitiveValueMappings.
This patch moves the conversion for LayoutBoxes from BasicShapeFunctions to
CSSPrimitiveValueMappings.h.

Refactoring, no new tests.

* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):
(WebCore::basicShapeForValue):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator LayoutBox):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyClipPath::applyValue):
(WebCore::ApplyPropertyShape::applyValue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Skip some tests that now fail after r162000.
https://bugs.webkit.org/show_bug.cgi?id=127000.

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speculative buildfix after r161999.

* Shared/APIObject.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERTION FAILED: !hasError() in JSC::Parser<LexerType>::createSavePoint().
https://bugs.webkit.org/show_bug.cgi?id=126990.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseConstDeclarationList):
- We were missing an error check after attempting to parse an initializer
  expression. This is now fixed.

LayoutTests: 

* js/dom/parse-syntax-error-in-initializer-expected.txt: Added.
* js/dom/parse-syntax-error-in-initializer.html: Added.
* js/resources/parse-syntax-error-in-initializer.js: Added.
- Added bug test case as a regression test.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r162000.
http://trac.webkit.org/changeset/162000
https://bugs.webkit.org/show_bug.cgi?id=127009

API versioning is wrong (Requested by rfong on #webkit).

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
* loader/FrameLoaderClient.h:
* loader/FrameLoaderTypes.h:
* page/ChromeClient.h:

Source/WebKit2:

* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/WebLoaderClient.cpp:
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebUIClient.cpp:
* UIProcess/WebUIClient.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK1] Allow generated export files on iOS
https://bugs.webkit.org/show_bug.cgi?id=127008

Reviewed by Simon Fraser.

Source/WebKit:

Modify the export file generation rule to read from
a shared and platform-specific input file.

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

Add a new Mac-only symbol file.

* WebKit.exp: To begin, move the WebIcon* into the Mac-specific exports.
* WebKit.mac.exp: Added. New file holds Mac-only symbols.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162008 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: iOS build fixing: export required by iOS WebKit1.

* WebCore.exp.in:

Source/WebKit/mac: iOS build fixing: link WebKit against Security.framework on iOS.

* Configurations/WebKit.xcconfig:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WIN] Set MSBuild environment variable to avoid long-lived processes locking log files
https://bugs.webkit.org/show_bug.cgi?id=127002

Reviewed by David Kilzer.

* Scripts/webkitdirs.pm:
(setupAppleWinEnv): Export MSBUILDDISABLENODEREUSE=1 to the environment.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Export __ZN7WebCore11FileChooser16chooseMediaFilesERKN3WTF6VectorINS1_6StringELm0ENS1_15CrashOnOverflowEEERKS3_PNS_4IconE
to fix WK1 iOS linking.

* WebCore.exp.in:

Source/WebKit/ios: Fix WK1 iOS build: need implementations of these functions in WebInspectorClientIOS.

* WebCoreSupport/WebInspectorClientIOS.mm:
(WebInspectorClient::indicate):
(WebInspectorClient::hideIndication):

Source/WebKit/mac: Fix iOS WK1 linking.

* Configurations/WebKit.xcconfig: We do need WebOpenPanelResultListener
on iOS.
* WebCoreSupport/WebOpenPanelResultListener.mm: Need <WebCore/Icon.h>

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
One more buildfix after r161999.

* Modules/webaudio/MediaStreamAudioSource.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move some Mac-only exports to WebKit.mac.exp for iOS build.

* WebKit.exp:
* WebKit.mac.exp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ios: Remove .objc_class_name_WebInspectorXPCWrapper from export on iOS build.

* WebKit.iOS.exp:

Source/WebKit/mac: Move some Mac-only exports to WebKit.mac.exp for iOS build.

* WebKit.exp:
* WebKit.mac.exp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Enable QuickLook
https://bugs.webkit.org/show_bug.cgi?id=126954

Reviewed by David Kilzer.

Source/WebKit/mac:

Remove empty implementation for quickLookContentForURL: since we always enable QuickLook on iOS.

* WebView/WebView.mm:
(-[WebView quickLookContentForURL:]):

Source/WTF:

* wtf/Platform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Copying should be generational
https://bugs.webkit.org/show_bug.cgi?id=126555

Reviewed by Geoffrey Garen.

This patch adds support for copying to our generational collector. Eden collections 
always trigger copying. Full collections use our normal fragmentation-based heuristics.

The way this works is that the CopiedSpace now has the notion of an old generation set of CopiedBlocks
and a new generation of CopiedBlocks. During each mutator cycle new CopiedSpace allocations reside
in the new generation. When a collection occurs, those blocks are moved to the old generation.

One key thing to remember is that both new and old generation objects in the MarkedSpace can
refer to old or new generation allocations in CopiedSpace. This is why we must fire write barriers 
when assigning to an old (MarkedSpace) object's Butterfly.

* heap/CopiedAllocator.h:
(JSC::CopiedAllocator::tryAllocateDuringCopying):
* heap/CopiedBlock.h:
(JSC::CopiedBlock::CopiedBlock):
(JSC::CopiedBlock::didEvacuateBytes):
(JSC::CopiedBlock::isOld):
(JSC::CopiedBlock::didPromote):
* heap/CopiedBlockInlines.h:
(JSC::CopiedBlock::reportLiveBytes):
(JSC::CopiedBlock::reportLiveBytesDuringCopying):
* heap/CopiedSpace.cpp:
(JSC::CopiedSpace::CopiedSpace):
(JSC::CopiedSpace::~CopiedSpace):
(JSC::CopiedSpace::init):
(JSC::CopiedSpace::tryAllocateOversize):
(JSC::CopiedSpace::tryReallocateOversize):
(JSC::CopiedSpace::doneFillingBlock):
(JSC::CopiedSpace::didStartFullCollection):
(JSC::CopiedSpace::doneCopying):
(JSC::CopiedSpace::size):
(JSC::CopiedSpace::capacity):
(JSC::CopiedSpace::isPagedOut):
* heap/CopiedSpace.h:
(JSC::CopiedSpace::CopiedGeneration::CopiedGeneration):
* heap/CopiedSpaceInlines.h:
(JSC::CopiedSpace::contains):
(JSC::CopiedSpace::recycleEvacuatedBlock):
(JSC::CopiedSpace::allocateBlock):
(JSC::CopiedSpace::startedCopying):
* heap/CopyVisitor.cpp:
(JSC::CopyVisitor::copyFromShared):
* heap/CopyVisitorInlines.h:
(JSC::CopyVisitor::allocateNewSpace):
(JSC::CopyVisitor::allocateNewSpaceSlow):
* heap/GCThreadSharedData.cpp:
(JSC::GCThreadSharedData::didStartCopying):
* heap/Heap.cpp:
(JSC::Heap::copyBackingStores):
* heap/SlotVisitorInlines.h:
(JSC::SlotVisitor::copyLater):
* heap/TinyBloomFilter.h:
(JSC::TinyBloomFilter::add):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162017 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Enable WTF_USE_UIKIT_EDITING

* wtf/Platform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162018 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Need to #import <WebCore/QuickLook.h>.

* WebView/WebDataSource.mm:

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