Unreviewed. Fix typo in layout test introduced in r163811.

Patch by Diego Pino Garcia <dpino@igalia.com> on 2014-02-11

* inspector-protocol/debugger/hit-breakpoint-from-console.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: The test after storage/indexeddb/mozilla/object-identity.html fails in cleanup code
<rdar://problem/16040663> and https://bugs.webkit.org/show_bug.cgi?id=128621

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Covered by storage/indexeddb/mozilla/object-identity.html.

* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::abort): Clear the m_database pointer before calling the onAbort callback.
(WebCore::IDBTransactionBackend::commit): Don't run the abort code if there's no m_database pointer.

LayoutTests:

* platform/mac-wk2/TestExpectations: Enabled all of the storage/indexeddb/mozilla tests except 1.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: AX: Accessibility Node Inspection
https://bugs.webkit.org/show_bug.cgi?id=127447

Patch by James Craig <jcraig@apple.com> on 2014-02-11
Reviewed by Chris Fleizach.

Resolving build failure caused by r163891.

* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::computedRoleString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Bring third-party app cache blocking behavior in line with private browsing app cache blocking behavior
https://bugs.webkit.org/show_bug.cgi?id=128557

Reviewed by Alexey Proskuryakov.

Source/WebCore:

* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::cacheForMainRequest):
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
(WebCore::ApplicationCacheGroup::update):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::maybeLoadMainResource):
(WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
(WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
(WebCore::ApplicationCacheHost::maybeLoadResource):
(WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
(WebCore::ApplicationCacheHost::isApplicationCacheBlockedForRequest):
* loader/appcache/ApplicationCacheHost.h:

LayoutTests:

* http/tests/security/resources/cross-origin-iframe-for-appcache-allowed.html:
* http/tests/security/resources/cross-origin-iframe-for-appcache.html:
* http/tests/security/resources/same-origin-iframe-for-appcache-blocked.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
XMLHttpRequest should not send DNT header
https://bugs.webkit.org/show_bug.cgi?id=128533

Patch by Youenn Fablet <youennf@gmail.com> on 2014-02-11
Reviewed by Alexey Proskuryakov.

Source/WebCore:

Added DNT (Do Not Track) header to the list of forbidden headers.
Updated http/tests/xmlhttprequest/set-dangerous-headers.html to test that header.

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData):

LayoutTests:

Updated http/tests/xmlhttprequest/set-dangerous-headers.html to test that DNT header is not sent.

* http/tests/xmlhttprequest/set-dangerous-headers-expected.txt:
* http/tests/xmlhttprequest/set-dangerous-headers.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163915 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Convert position:fixed property to position:absolute upon copy
https://bugs.webkit.org/show_bug.cgi?id=128194

Reviewed by Simon Fraser.

This adds a Setting and Preference that allows clients to opt-in to this behavior.

This new behavior is only activated if the entire body is copied. If there is a position:fixed
element in the copied selection, it is replaced with position:absolute, and a containing
block (position:relative) is wrapped around the copied text.

This patch originally converted position:-webkit-sticky to position:relative. However, we
currently don't support copying and pasting of position:-webkit-sticky content (See below).
Therefore, this patch only deals with position:fixed.

Right now we don't copy position:-webkit-sticky. This is because:
1. When copying styled elements, we parse the style properties again
2. CSSParserContext has a flag which can disable parsing -webkit-sticky
3. There are two constructors to CSSParserContext: one that takes a document and sets up the
aforementioned flag, and a simple one that doesn't take a document and sets all the enableFoo
flags to false
4. At the relevant place within copy code, we are far removed from the Document object, so we
instead call the second constructor, thereby disabling parsing of -webkit-sticky

Test: editing/pasteboard/copy-paste-converts-sticky-and-fixed.html

* WebCore.exp.in: Export the Setting setter
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::convertFixedAndStickyPosition): Converts a single style
* editing/EditingStyle.h:
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator): Remember if we found
an element which needs the position:relative containing block
(WebCore::StyledMarkupAccumulator::appendElement): Surround with the position:relative
containing block if necessary
(WebCore::createMarkupInternal):
* page/Settings.cpp:
(WebCore::Settings::Settings): New setting to opt-in to this new behavior
(WebCore::Settings::setConvertPositionStyleOnCopy):
* page/Settings.h:
(WebCore::Settings::convertPositionStyleOnCopy):
* testing/InternalSettings.cpp: Allow setting the setting from a Layout Test
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setConvertPositionStyleOnCopy):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Source/WebKit/mac: Convert position:sticky and position:fixed properties to position:static and position:absolute upon copy
https://bugs.webkit.org/show_bug.cgi?id=128194

Reviewed by Simon Fraser.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences convertPositionStyleOnCopy]):
(-[WebPreferences setConvertPositionStyleOnCopy:]):
* WebView/WebPreferencesPrivate.h: Opt-in to new behavior
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2: Convert position:sticky and position:fixed properties to position:static and position:absolute upon copy
https://bugs.webkit.org/show_bug.cgi?id=128194

Reviewed by Simon Fraser.

* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetConvertPositionStyleOnCopy):
(WKPreferencesGetConvertPositionStyleOnCopy):
* UIProcess/API/C/WKPreferencesPrivate.h: Opt-in to new behavior
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

LayoutTests: Convert position:sticky and position:fixed properties to position:static and position:absolute upon copy
https://bugs.webkit.org/show_bug.cgi?id=128194

Reviewed by Simon Fraser.

Checks that the style properties get converted.

* editing/pasteboard/copy-paste-converts-sticky-and-fixed-expected.txt: Added.
* editing/pasteboard/copy-paste-converts-sticky-and-fixed.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CTTE: RenderNamedFlowThread always has a WebKitNamedFlow.
<https://webkit.org/b/128623>

Codify the fact that RenderNamedFlowThread always has a corresponding
WebKitNamedFlow by storing it in a Ref, and adding an accessor that
returns a reference to get rid of all the ->'s.

Also removed some unnecessary assertions exposed by this.

Reviewed by Antti Koivisto.

* dom/NamedFlowCollection.cpp:
(WebCore::NamedFlowCollection::ensureFlowWithName):
* dom/NamedFlowCollection.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
(WebCore::RenderNamedFlowThread::flowThreadName):
(WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent):
(WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEvent):
(WebCore::RenderNamedFlowThread::regionLayoutUpdateEventTimerFired):
(WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
(WebCore::RenderNamedFlowThread::setMarkForDestruction):
(WebCore::RenderNamedFlowThread::resetMarkForDestruction):
(WebCore::RenderNamedFlowThread::isMarkedForDestruction):
* rendering/RenderNamedFlowThread.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Replay: upstream replay input code generator and EncodedValue class
https://bugs.webkit.org/show_bug.cgi?id=128215

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Add the replay inputs code generator. Most features of the input generator are
exercised by included generator regression tests, which produce useful but
non-compilable test replay inputs.

Add EncodedValue, the main replay input serialization class that encodes and
decodes inputs and their data between C++ types and the JSON-based replay recording
format. EncodedValue uses EncodingTraits specializations for type-specific encoding.
Relative to other WebKit marshalling mechanisms, EncodedValue is key/value based.
EncodedValue uses InspectorValue subclasses as its backing data structure.

Add some missing numerical conversions to InspectorValue.

* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/InspectorValues.cpp:
(Inspector::InspectorValue::asNumber):
(Inspector::InspectorBasicValue::asNumber):
* inspector/InspectorValues.h:
* replay/EncodedValue.cpp: Added.
(JSC::EncodedValue::asObject):
(JSC::EncodedValue::asArray):
(JSC::ScalarEncodingTraits<bool>::encodeValue):
(JSC::ScalarEncodingTraits<double>::encodeValue):
(JSC::ScalarEncodingTraits<float>::encodeValue):
(JSC::ScalarEncodingTraits<int32_t>::encodeValue):
(JSC::ScalarEncodingTraits<int64_t>::encodeValue):
(JSC::ScalarEncodingTraits<uint32_t>::encodeValue):
(JSC::ScalarEncodingTraits<uint64_t>::encodeValue):
(JSC::long>::encodeValue):
(JSC::EncodedValue::convertTo<bool>):
(JSC::EncodedValue::convertTo<double>):
(JSC::EncodedValue::convertTo<float>):
(JSC::EncodedValue::convertTo<int32_t>):
(JSC::EncodedValue::convertTo<int64_t>):
(JSC::EncodedValue::convertTo<uint32_t>):
(JSC::EncodedValue::convertTo<uint64_t>):
(JSC::long>):
(JSC::EncodedValue::convertTo<String>):
(JSC::EncodedValue::put<EncodedValue>):
(JSC::EncodedValue::append<EncodedValue>):
(JSC::EncodedValue::get<EncodedValue>):
* replay/EncodedValue.h: Added.
(JSC::EncodedValue::EncodedValue):
(JSC::EncodedValue::createObject):
(JSC::EncodedValue::createArray):
(JSC::EncodedValue::createString):
(JSC::EncodedValue::~EncodedValue):
(JSC::ScalarEncodingTraits::decodeValue):
(JSC::EncodingTraits<String>::encodeValue):
(JSC::EncodedValue::put):
(JSC::EncodedValue::append):
(JSC::EncodedValue::get):
* replay/scripts/CodeGeneratorReplayInputs.py: Added.
(ParseException):
(TypecheckException):
(Framework):
(Framework.__init__):
(Framework.setting):
(Framework.fromString):
(Frameworks):
(InputQueue):
(InputQueue.__init__):
(InputQueue.setting):
(InputQueue.fromString):
(InputQueues):
(Input):
(Input.__init__):
(Input.setting):
(InputMember):
(InputMember.__init__):
(InputMember.has_flag):
(TypeMode):
(TypeMode.__init__):
(TypeMode.fromString):
(TypeModes):
(Type):
(Type.__init__):
(Type.__eq__):
(Type.__hash__):
(Type.has_flag):
(Type.is_struct):
(Type.is_enum):
(Type.is_enum_class):
(Type.declaration_kind):
(Type.qualified_prefix):
(Type.qualified_prefix.is):
(Type.type_name):
(Type.storage_type):
(Type.borrow_type):
(Type.argument_type):
(check_properties):
(VectorType):
(VectorType.__init__):
(VectorType.has_flag):
(VectorType.is_struct):
(VectorType.is_enum):
(VectorType.is_enum_class):
(VectorType.qualified_prefix):
(VectorType.type_name):
(VectorType.argument_type):
(InputsModel):
(InputsModel.__init__):
(InputsModel.enum_types):
(InputsModel.get_type_for_member):
(InputsModel.parse_toplevel):
(InputsModel.parse_type_with_framework_name):
(InputsModel.parse_input):
(InputsModel.typecheck):
(InputsModel.typecheck_type):
(InputsModel.typecheck_input):
(InputsModel.typecheck_input_member):
(IncrementalFileWriter):
(IncrementalFileWriter.__init__):
(IncrementalFileWriter.write):
(IncrementalFileWriter.close):
(lcfirst):
(wrap_with_guard):
(Generator):
(Generator.__init__):
(Generator.setting):
(Generator.output_filename):
(Generator.write_output_files):
(Generator.generate_header):
(Generator.generate_implementation):
(Generator.generate_license):
(Generator.generate_includes):
(Generator.generate_includes.declaration):
(Generator.generate_includes.declaration.is):
(Generator.generate_type_forward_declarations):
(Generator.generate_type_forward_declarations.is):
(Generator.generate_class_declaration):
(Generator.generate_input_constructor_declaration):
(Generator.generate_input_destructor_declaration):
(Generator.generate_input_member_getter):
(Generator.generate_input_member_declaration):
(Generator.generate_input_member_tuples):
(Generator.qualified_input_name):
(Generator.generate_input_trait_declaration):
(Generator.generate_enum_trait_declaration):
(Generator.generate_for_each_macro):
(Generator.generate_class_implementation):
(Generator.generate_enum_trait_implementation):
(Generator.generate_enum_trait_implementation.is):
(Generator.generate_input_trait_implementation):
(Generator.generate_input_encode_implementation):
(Generator.generate_input_decode_implementation):
(Generator.generate_constructor_initializer_list):
(Generator.generate_constructor_formals_list):
(Generator.generate_member_borrow_expression):
(Generator.generate_member_move_expression):
(Generator.generate_constructor_arguments_list):
(generate_from_specification):
* replay/scripts/CodeGeneratorReplayInputsTemplates.py: Added.
(Templates):
* replay/scripts/tests/expected/JSInputs.json-TestReplayInputs.cpp: Added.
* replay/scripts/tests/expected/JSInputs.json-TestReplayInputs.h: Added.
* replay/scripts/tests/expected/fail-on-c-style-enum-no-storage.json-error: Added.
* replay/scripts/tests/expected/fail-on-duplicate-input-names.json-error: Added.
* replay/scripts/tests/expected/fail-on-duplicate-type-names.json-error: Added.
* replay/scripts/tests/expected/fail-on-enum-type-missing-values.json-error: Added.
* replay/scripts/tests/expected/fail-on-missing-input-member-name.json-error: Added.
* replay/scripts/tests/expected/fail-on-missing-input-name.json-error: Added.
* replay/scripts/tests/expected/fail-on-missing-input-queue.json-error: Added.
* replay/scripts/tests/expected/fail-on-missing-type-mode.json-error: Added.
* replay/scripts/tests/expected/fail-on-missing-type-name.json-error: Added.
* replay/scripts/tests/expected/fail-on-no-inputs.json-error: Added.
* replay/scripts/tests/expected/fail-on-no-types.json-error: Added.
* replay/scripts/tests/expected/fail-on-unknown-input-queue.json-error: Added.
* replay/scripts/tests/expected/fail-on-unknown-member-type.json-error: Added.
* replay/scripts/tests/expected/fail-on-unknown-type-mode.json-error: Added.
* replay/scripts/tests/expected/generate-enum-encoding-helpers-with-guarded-values.json-TestReplayInputs.cpp: Added.
* replay/scripts/tests/expected/generate-enum-encoding-helpers-with-guarded-values.json-TestReplayInputs.h: Added.
* replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.cpp: Added.
* replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.h: Added.
* replay/scripts/tests/expected/generate-enum-encoding-helpers.json-error: Added.
* replay/scripts/tests/expected/generate-event-loop-shape-types.json-error: Added.
* replay/scripts/tests/expected/generate-input-with-guard.json-TestReplayInputs.cpp: Added.
* replay/scripts/tests/expected/generate-input-with-guard.json-TestReplayInputs.h: Added.
* replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.cpp: Added.
* replay/scripts/tests/expected/generate-input-with-vector-members.json-TestReplayInputs.h: Added.
* replay/scripts/tests/expected/generate-inputs-with-flags.json-error: Added.
* replay/scripts/tests/expected/generate-memoized-type-modes.json-TestReplayInputs.cpp: Added.
* replay/scripts/tests/expected/generate-memoized-type-modes.json-TestReplayInputs.h: Added.
* replay/scripts/tests/fail-on-c-style-enum-no-storage.json: Added.
* replay/scripts/tests/fail-on-duplicate-input-names.json: Added.
* replay/scripts/tests/fail-on-duplicate-type-names.json: Added.
* replay/scripts/tests/fail-on-enum-type-missing-values.json: Added.
* replay/scripts/tests/fail-on-missing-input-member-name.json: Added.
* replay/scripts/tests/fail-on-missing-input-name.json: Added.
* replay/scripts/tests/fail-on-missing-input-queue.json: Added.
* replay/scripts/tests/fail-on-missing-type-mode.json: Added.
* replay/scripts/tests/fail-on-missing-type-name.json: Added.
* replay/scripts/tests/fail-on-no-inputs.json: Added.
* replay/scripts/tests/fail-on-no-types.json: Added.
* replay/scripts/tests/fail-on-unknown-input-queue.json: Added.
* replay/scripts/tests/fail-on-unknown-member-type.json: Added.
* replay/scripts/tests/fail-on-unknown-type-mode.json: Added.
* replay/scripts/tests/generate-enum-encoding-helpers-with-guarded-values.json: Added.
* replay/scripts/tests/generate-enum-encoding-helpers.json: Added.
* replay/scripts/tests/generate-event-loop-shape-types.json: Added.
* replay/scripts/tests/generate-input-with-guard.json: Added.
* replay/scripts/tests/generate-input-with-vector-members.json: Added.
* replay/scripts/tests/generate-inputs-with-flags.json: Added.
* replay/scripts/tests/generate-memoized-type-modes.json: Added.

Tools:

Add an executable script to launch the replay input generator tests.
Add a test harness for running the code generator tests, mostly taken
from the bindings test harness (but simplified).

* Scripts/run-input-generator-tests: Added.
(main):
* Scripts/webkitpy/replay/__init__.py: Added.
* Scripts/webkitpy/replay/main.py: Added.
(InputGeneratorTests):
(InputGeneratorTests.__init__):
(InputGeneratorTests.generate_from_json):
(InputGeneratorTests.write_error_file):
(InputGeneratorTests.detect_changes):
(InputGeneratorTests.run_tests):
(InputGeneratorTests.main):

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