Non-special escape character sequences cause JSC::Lexer::parseString to create 16 bit strings
https://bugs.webkit.org/show_bug.cgi?id=100576

Reviewed by Darin Adler.

Source/JavaScriptCore: 

Changed singleEscape() processing to be based on a lookup of a static table.  The table
covers ASCII characters SPACE through DEL.  If a character can be a single character escape,
then the table provides the non-zero result of that escape.  Updated the result of
singleEscape to be an LChar to make the table as small as possible.
Added a new test fast/js/normal-character-escapes-in-string-literals.html to validated
the behavior.

* parser/Lexer.cpp:
(JSC::singleEscape):
(JSC::Lexer::parseString):
(JSC::Lexer::parseStringSlowCase):

LayoutTests: 

Added a new test to validated the behavior of the corresponding changes to string processing
in the Lexer.

* fast/js/normal-character-escapes-in-string-literals-expected.txt: Added.
* fast/js/normal-character-escapes-in-string-literals.html: Added.
* fast/js/script-tests/normal-character-escapes-in-string-literals.js: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Correct my previous patch to disable external SVG
references only on PLATFORM(CHROMIUM).

* wtf/Platform.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled DEPS.

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
feImage should not be allowed to self reference
https://bugs.webkit.org/show_bug.cgi?id=94652

Reviewed by Eric Seidel.

Source/WebCore: 

Add cycle detection for SVG filter application, and also fix a problem
with graphics context restore when filters are applied. This also
converts the flags in FilterData to a state tracking system, as the
number of flags was getting messy and only one flag is valid at any given time.

Test: svg/filters/feImage-self-and-other-referencing.html

* rendering/svg/RenderSVGResourceFilter.cpp: Convert to new FilterData
state management and enable cycle detection.
(WebCore):
(WebCore::RenderSVGResourceFilter::removeClientFromCache): Change isBuilt and markedForRemoval flags to state enums.
(WebCore::RenderSVGResourceFilter::applyResource): Change flags to state enums and detect cycles.
(WebCore::RenderSVGResourceFilter::postApplyResource): Change flags to state and add handling
for the various states.
(WebCore::RenderSVGResourceFilter::primitiveAttributeChanged): Change isBuilt flag to state enums.
* rendering/svg/RenderSVGResourceFilter.h:
(WebCore::FilterData::FilterData):
(FilterData): Convert to a state tracking system.
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced): Add a block around the
SVGRenderingContext so that it applies the filter and reverts the
context before the calling method restores the context.

LayoutTests: 

Additional test case for situations when the filter is applied to multiple objects that it also references.

* svg/filters/feImage-self-and-other-referencing-expected.html: Added.
* svg/filters/feImage-self-and-other-referencing.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [WK2] Add a NetworkingContext for NetworkProcess
        https://bugs.webkit.org/show_bug.cgi?id=100708

        Reviewed by Anders Carlsson.

        Each request will have a context, because these are so lightweight on Mac, and
        other platforms will need ResourceHandle refactored anyway to use NetworkProcess.

        * NetworkProcess/mac/RemoteNetworkingContext.h: Added.
        * NetworkProcess/mac/RemoteNetworkingContext.mm: Added.
        These go mac/ subdirectory, because NetworkingContext interface is different on
        each platform, as ResourceHandle needs dictate.

        * WebKit2.xcodeproj/project.pbxproj:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AtomicString(CFStringRef) shouldn't unconditionally create a StringImpl
https://bugs.webkit.org/show_bug.cgi?id=100701

Reviewed by Dan Bernstein.

Source/WebCore:

* WebCore.exp.in:
Export AtomicString::add(CFStringRef).

* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
Add AtomicStringCF.cpp

* platform/text/cf/AtomicStringCF.cpp: Added.
(WTF::AtomicString::add):
When trying to add the atomic string to the table, first try to get a Latin-1 pointer
from the string. Second, try to get a Unicode pointer from the string.
If that also fails, copy the string to a temporary unicode buffer and add it from there.

* platform/text/cf/HyphenationCF.cpp:
(WebCore::::createValueForKey):
Update for AtomicString::createCFString being removed.

Source/WTF:

* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
Change the constructors that take a CFStringRef and an NSString * to call AtomicString::add(CFStringRef)
and remove AtomicString::createCFString.

(WTF::AtomicString::add):
Add new member function declaration. The definition is in a new file in WebCore, AtomicStringCF.cpp.
Also, fix the overload of add that takes a const char* to call the right other overload instead of itself.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove references to unsupported OS and Xcode versions.

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
* Configurations/CompilerVersion.xcconfig: Removed.
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* JavaScriptCore.xcodeproj/project.pbxproj:

Source/ThirdParty:

* gtest/xcode/Config/CompilerVersion.xcconfig: Removed.
* gtest/xcode/Config/General.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig:
* Configurations/CompilerVersion.xcconfig: Removed.
* Configurations/DebugRelease.xcconfig:

Source/WebCore:

* Configurations/Base.xcconfig:
* Configurations/CompilerVersion.xcconfig: Removed.
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* Configurations/WebCore.xcconfig:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* Configurations/Base.xcconfig:
* Configurations/CompilerVersion.xcconfig: Removed.
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:

Source/WebKit2:

* Configurations/Base.xcconfig:
* Configurations/CompilerVersion.xcconfig: Removed.
* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:
* DerivedSources.make:
* WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

* Configurations/Base.xcconfig:
* Configurations/CompilerVersion.xcconfig: Removed.
* Configurations/DebugRelease.xcconfig:
* WTF.xcodeproj/project.pbxproj:

Tools:

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/mac/Configurations/Base.xcconfig:
* DumpRenderTree/mac/Configurations/CompilerVersion.xcconfig: Removed.
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/CompilerVersion.xcconfig: Removed.
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/CompilerVersion.xcconfig: Removed.
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/CompilerVersion.xcconfig: Removed.
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify Xcode configuration settings that used to vary between OS versions.

Reviewed by Dan Bernstein.

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/JavaScriptCore.xcconfig:

Source/ThirdParty:

* gtest/xcode/Config/General.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/WebCore:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/WebCore.xcconfig:

Source/WebKit/mac:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
* Configurations/WebKit.xcconfig:

Source/WebKit2:

* Configurations/Base.xcconfig:
* Configurations/WebKit2.xcconfig:

Source/WTF:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Tools:

* DumpRenderTree/mac/Configurations/Base.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: Delete cached ShareableSurfaces when purging backingStores.
https://bugs.webkit.org/show_bug.cgi?id=100705

Patch by Huang Dongsung <luxtella@company100.net> on 2012-10-29
Reviewed by Noam Rosenthal.

LayerTreeCoordinatorProxy can be used after calling
LayerTreeCoordinatorProxy::purgeBackingStores(). So we should clear cached
ShareableSurfaces.

* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
(WebKit::LayerTreeCoordinatorProxy::purgeBackingStores):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Defer commits between page unload and first invalidation in threaded compositing mode
https://bugs.webkit.org/show_bug.cgi?id=100702

Reviewed by Adrienne Walker.

In threaded compositing mode, it's not terribly useful to commit after unloading a page and before receiving
the first invalidation for the new page since the document is likely not loaded enough to paint usefully.
This defers commits from the time compositing is deactivated (which in force compositing mode only happens
at FrameView destruction) until we get the first invalidation from WebCore.

* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::invalidateContentsAndRootView):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::invalidateRect):
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
(WebKit):
* src/WebViewImpl.h:
(WebViewImpl):

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

* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::setHeaderFields):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r132845.
http://trac.webkit.org/changeset/132845
https://bugs.webkit.org/show_bug.cgi?id=99975

Broke chromium builds, linker errors from
IDBBindingUtilitiesTest

Source/WebCore:

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::onSuccess):
(WebCore::IDBRequest::dispatchEvent):
* Modules/indexeddb/IDBRequest.h:
(IDBRequest):
* bindings/v8/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromScriptValueAndKeyPath):
(WebCore):
(WebCore::deserializeIDBValue):
(WebCore::injectIDBKeyIntoScriptValue):
(WebCore::idbKeyToScriptValue):
* bindings/v8/V8PerIsolateData.cpp:
(WebCore::V8PerIsolateData::ensureAuxiliaryContext):
(WebCore):
* bindings/v8/V8PerIsolateData.h:
(V8PerIsolateData):

Source/WebKit/chromium:

* tests/IDBBindingUtilitiesTest.cpp:
(WebCore::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132864 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Added myself as a committer.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Disable redirect to data scheme for potential fishing.
https://bugs.webkit.org/show_bug.cgi?id=100713

Reviewed by George Staikos.

We will disable redirect to data scheme to avoid potential security concern,
described in klevjers.com/papers/phishing.pdf.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleRedirect):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132867 268f45cc-cd09-0410-ab3c-d52691b4dbfc
NSLocale leaks in LocaleMac
https://bugs.webkit.org/show_bug.cgi?id=97628

Reviewed by Kent Tamura.

We need to adopt the NSLocale object so it doesn't leak and
determineLocale() should return a NSLocale without additional retain.

No new tests.

* platform/text/mac/LocaleMac.mm:
(WebCore::determineLocale): Returns a RetainPtr<NSLocale>.
(WebCore::Locale::create):
(WebCore::LocaleMac::LocaleMac): m_locale should adopt the NSLocale object.
(WebCore::LocaleMac::create): LocaleMac constructor takes NSLocale without additional retain.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a typo that caused SVG external resources to be blocked on
platforms other than Chromium.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r130755): All WebKit2 unit tests are failing in WebKit2 bot
https://bugs.webkit.org/show_bug.cgi?id=98864

Reviewed by Martin Robinson.

Use a dedicated directory to store WebKit2 generated resources.

* UIProcess/API/gtk/tests/GNUmakefile.am:
* UIProcess/API/gtk/tests/TestMain.cpp:
(registerGResource): load the resource from the new directory.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Null-check WebViewImpl::m_client before calling invalidateRect() on it
https://bugs.webkit.org/show_bug.cgi?id=100716

Patch by James Robinson <jamesr@chromium.org> on 2012-10-29
Reviewed by Dirk Pranke.

This check was accidentally removed in r132862 and the value is null in at least some unit tests.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::invalidateRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] TestRunner needs to compile ChromiumCurrentTime and ChromiumThreading in components build
https://bugs.webkit.org/show_bug.cgi?id=100658

Reviewed by Tony Chang.

Before, this was compiled into DumpRenderTree. I also dropped the
include_dirs and dependencies block as TestRunner already has them.

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:


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