<rdar://problem/12395187> REGRESSION (r121299): OS X Text Replacement forces cursor out of text fields
https://bugs.webkit.org/show_bug.cgi?id=100768

Reviewed by Anders Carlsson.

Source/WebCore: 

r121299 introduced code to restore the paragraph range by saving its length and start offset
relative to the document. The latter was obtained by iterating over the range starting at
the beginning of the document and ending at the beginning of the paragraph range. However,
such a range could not be constructed if the paragraph range was contained in a shadow DOM,
since a range must have both its endpoints within the same shadow tree (or not in a shadow
tree).

Test: platform/mac/editing/spelling/autocorrection-in-textarea.html

* editing/Editor.cpp:
(WebCore::Editor::markAndReplaceFor): Changed paragraphStartIndex to be relative to the
root container of paragraphRange, using the same logic used by
checkForDifferentRootContainer() in Range.cpp.

LayoutTests: 

* platform/mac/editing/spelling/autocorrection-in-textarea-expected.txt: Added.
* platform/mac/editing/spelling/autocorrection-in-textarea.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build WebKit as C++11 on Mac
https://bugs.webkit.org/show_bug.cgi?id=100720

Reviewed by Daniel Bates.

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::pushFinallyContext):
(JSC::BytecodeGenerator::beginSwitch):
* llint/LLIntOffsetsExtractor.cpp:
* runtime/Identifier.cpp:
(JSC::Identifier::add8):
* runtime/Identifier.h:
(JSC::Identifier::add):
* runtime/JSONObject.cpp:
(JSC::appendStringToStringBuilder):
* runtime/StringPrototype.cpp:
(JSC::replaceUsingStringSearch):
Add static_casts to prevent implicit type conversions in non-constant initializer lists.

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig:
Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x.

Source/WebCore:

* Configurations/Base.xcconfig:
Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x.

* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::hash):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLine):
(WebCore::GraphicsContext::strokeArc):
* platform/graphics/filters/CustomFilterProgramInfo.cpp:
(WebCore::CustomFilterProgramInfo::hash):
(WebCore::ProtectionSpaceHash::hash):
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::setHTTPBody):
Add static_casts to prevent implicit type conversions in non-constant initializer lists.

* platform/mac/ClipboardMac.mm:
(WebCore::ClipboardMac::createDragImage):
* platform/mac/CursorMac.mm:
(WebCore::createNamedCursor):
* platform/mac/ScrollViewMac.mm:
(WebCore::ScrollView::platformSetContentsSize):
Use NSMakePoint to prevent implicit type conversions in non-constant initializer lists.

* platform/mac/CookieJar.mm:
(WebCore::cookiesEnabled):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::shouldRelaxThirdPartyCookiePolicy):
Add explicit casts to NSHTTPCookieAcceptPolicy.

* platform/mac/WebCoreNSURLExtras.h:
* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::URLByTruncatingOneCharacterBeforeComponent):
(WebCore::dataForURLComponentType):
* platform/network/ProtectionSpaceHash.h:
Use CFIndex instead of CFURLComponentType, the enum can be mangled differently in some cases, and these
functions are exported from WebCore.

Source/WebKit/mac:

* Configurations/Base.xcconfig:
Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x.

* History/WebBackForwardList.mm:
(-[WebBackForwardList description]):
* History/WebHistoryItem.mm:
(-[WebHistoryItem description]):
Add static_casts to prevent implicit type conversions in non-constant initializer lists.

Source/WebKit2:

* Configurations/Base.xcconfig:
Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x.

* UIProcess/mac/WebCookieManagerProxyMac.mm:
(WebKit::WebCookieManagerProxy::persistHTTPCookieAcceptPolicy):
* WebProcess/Cookies/mac/WebCookieManagerMac.mm:
(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
Add explicit casts to NSHTTPCookieAcceptPolicy.

Source/WTF:

* Configurations/Base.xcconfig:
Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x.

* wtf/text/AtomicString.cpp:
(WTF::AtomicString::add):
Change the type of length to be unsigned to prevent implicit type conversions in non-constant initializer lists.

* wtf/unicode/UTF8.cpp:
(Unicode):
Add static_casts to prevent implicit type conversions in non-constant initializer lists.

Tools:

* DumpRenderTree/mac/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:
Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Switch more class to use the new << form of encode
https://bugs.webkit.org/show_bug.cgi?id=100725

Reviewed by Anders Carlsson.

- Switches many uses of encoder.encode(foo) to encoder << foo.
- Switches a few places to take an ArgumentEncoder& rather than an ArgumentEncoder*.
- Switches a few places away from using encoder.encodeVariableLengthByteArray(foo) to
  using encoder << CoreIPC::DataReference(foo).

* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::handleMessage):
(CoreIPC::handleMessageVariadic):
* Platform/CoreIPC/StringReference.cpp:
(CoreIPC::StringReference::encode):
(CoreIPC::StringReference::decode):
* Platform/CoreIPC/mac/MachPort.h:
(CoreIPC::MachPort::encode):
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::Handle::encode):
* PluginProcess/PluginCreationParameters.cpp:
(WebKit::PluginCreationParameters::encode):
* Shared/DictionaryPopupInfo.cpp:
(WebKit::DictionaryPopupInfo::encode):
* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
* Shared/FontInfo.cpp:
(WebKit::FontInfo::encode):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
* Shared/OriginAndDatabases.cpp:
(WebKit::OriginAndDatabases::encode):
* Shared/PlatformPopupMenuData.cpp:
(WebKit::PlatformPopupMenuData::encode):
* Shared/Plugins/NPIdentifierData.cpp:
(WebKit::NPIdentifierData::encode):
* Shared/Plugins/NPVariantData.cpp:
(WebKit::NPVariantData::encode):
* Shared/Plugins/PluginProcessCreationParameters.cpp:
(WebKit::PluginProcessCreationParameters::encode):
* Shared/PrintInfo.cpp:
(WebKit::PrintInfo::encode):
* Shared/SecurityOriginData.cpp:
(WebKit::SecurityOriginData::encode):
* Shared/SessionState.cpp:
(WebKit::SessionState::encode):
* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::Handle::encode):
* Shared/SharedWorkerProcessCreationParameters.cpp:
(WebKit::SharedWorkerProcessCreationParameters::encode):
* Shared/StatisticsData.cpp:
(WebKit::StatisticsData::encode):
* Shared/StringPairVector.h:
(WebKit::StringPairVector::encode):
* Shared/UpdateInfo.cpp:
(WebKit::UpdateInfo::encode):
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::encode):
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::encode):
* Shared/WebEvent.cpp:
(WebKit::WebEvent::encode):
* Shared/WebGestureEvent.cpp:
(WebKit::WebGestureEvent::encode):
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::encode):
* Shared/WebKeyboardEvent.cpp:
(WebKit::WebKeyboardEvent::encode):
* Shared/WebMouseEvent.cpp:
(WebKit::WebMouseEvent::encode):
* Shared/WebNavigationDataStore.h:
(WebKit::WebNavigationDataStore::encode):
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
* Shared/WebPageGroupData.cpp:
(WebKit::WebPageGroupData::encode):
* Shared/WebPlatformTouchPoint.cpp:
(WebKit::WebPlatformTouchPoint::encode):
* Shared/WebPopupItem.cpp:
(WebKit::WebPopupItem::encode):
* Shared/WebPreferencesStore.cpp:
(WebKit::WebPreferencesStore::encode):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
* Shared/WebTouchEvent.cpp:
(WebKit::WebTouchEvent::encode):
* Shared/WebWheelEvent.cpp:
(WebKit::WebWheelEvent::encode):
* Shared/cf/ArgumentCodersCF.cpp:
(CoreIPC::encode):
(CoreIPC::decode):
* Shared/cf/ArgumentCodersCF.h:
(CoreIPC):
* Shared/mac/ArgumentCodersMac.h:
(CoreIPC):
* Shared/mac/ArgumentCodersMac.mm:
(CoreIPC::encode):
* Shared/mac/AttributedString.mm:
(WebKit::AttributedString::encode):
* Shared/mac/ColorSpaceData.mm:
(WebKit::ColorSpaceData::encode):
* Shared/mac/KeychainAttribute.cpp:
(CoreIPC::encode):
* Shared/mac/KeychainAttribute.h:
(CoreIPC):
* Shared/mac/LayerTreeContextMac.mm:
(WebKit::LayerTreeContext::encode):
* Shared/mac/PlatformCertificateInfo.mm:
(WebKit::PlatformCertificateInfo::encode):
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::Handle::encode):
(WebKit::SandboxExtension::Handle::decode):
(WebKit::SandboxExtension::HandleArray::encode):
(WebKit::SandboxExtension::HandleArray::decode):
* Shared/mac/SecItemRequestData.cpp:
(WebKit::SecItemRequestData::encode):
* Shared/mac/SecItemResponseData.cpp:
(WebKit::SecItemResponseData::encode):
* Shared/mac/SecKeychainItemRequestData.cpp:
(WebKit::SecKeychainItemRequestData::encode):
(WebKit::SecKeychainItemRequestData::decode):
* Shared/mac/SecKeychainItemResponseData.cpp:
(WebKit::SecKeychainItemResponseData::encode):
* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::::encodePlatformData):
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::encodeMessageBody):
* UIProcess/WebContextUserMessageCoders.h:
(WebKit::WebContextUserMessageEncoder::encode):
* WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
(WebKit::InjectedBundleUserMessageEncoder::encode):
* WebProcess/Plugins/Plugin.cpp:
(WebKit::Plugin::Parameters::encode):
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::encodeMessageBody):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shaders] Add the ValidatedCustomFilterOperation class
https://bugs.webkit.org/show_bug.cgi?id=100558

Reviewed by Dean Jackson.

Added the ValidatedCustomFilterOperation class. The file is now almost empty,
but more is going to come in the following patches.

Added the a filter operation type VALIDATED_CUSTOM and updated the compositors to ignore
such operations for now.

No new tests, there is no new functionality yet.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::valueForFilter):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createFilterOperations):
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::filtersCanBeComposited):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::filtersCanBeComposited):
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::copyWebCoreFilterOperationsToWebFilterOperations):
* platform/graphics/filters/FilterOperation.h:
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::hasCustomFilter):
(WebCore::FilterOperations::getOutsets):
* platform/graphics/filters/ValidatedCustomFilterOperation.cpp: Added.
(WebCore):
(WebCore::ValidatedCustomFilterOperation::ValidatedCustomFilterOperation):
(WebCore::ValidatedCustomFilterOperation::~ValidatedCustomFilterOperation):
(WebCore::ValidatedCustomFilterOperation::blend):
* platform/graphics/filters/ValidatedCustomFilterOperation.h: Added.
(WebCore):
(ValidatedCustomFilterOperation):
(WebCore::ValidatedCustomFilterOperation::create):
(WebCore::ValidatedCustomFilterOperation::affectsOpacity):
(WebCore::ValidatedCustomFilterOperation::movesPixels):
(WebCore::ValidatedCustomFilterOperation::blendingNeedsRendererSize):
(WebCore::ValidatedCustomFilterOperation::operator==):

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

* DEPS:

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