Web Inspector receives spurious setScriptEnabled instrumentation calls
https://bugs.webkit.org/show_bug.cgi?id=130147

Reviewed by Timothy Hatcher.

When page settings change, inspector instrumentation should only fire if
the scriptsEnabled setting actually changes from the previous setting. But
due to an unnecessary PLATFORM(IOS) guard, the inspector was being notified
on every settings update even if nothing changed.

This manifested as lots of Page.scriptsEnabled messages being sent to
the inspector frontend as the Inspector window is dragged.

* page/Settings.cpp:
(WebCore::Settings::setScriptEnabled): Remove PLATFORM(IOS) from early return.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r165482.
https://bugs.webkit.org/show_bug.cgi?id=130157

Broke the windows build; "error C2466: cannot allocate an
array of constant size 0" (Requested by jernoble on #webkit).

Reverted changeset:

"Reduce memory use for static property maps"
https://bugs.webkit.org/show_bug.cgi?id=129986
http://trac.webkit.org/changeset/165482

Source/JavaScriptCore:

Patch by Commit Queue <commit-queue@webkit.org> on 2014-03-12

Source/WebCore:

Patch by Commit Queue <commit-queue@webkit.org> on 2014-03-12

LayoutTests:

Patch by Commit Queue <commit-queue@webkit.org> on 2014-03-12

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebVTT] HTML5 "space" cahracters around "-->" are not required
https://bugs.webkit.org/show_bug.cgi?id=117421

Reviewed by Eric Carlson.

Merged from Blink (patch by caitpotter88@gmail.com):
https://chromium.googlesource.com/chromium/blink/+/4ef469cd627a13696b88e285ae28a60e38f9c286
http://crbug.com/242158

Source/WebCore: 

New tests: media/track/track-webvtt-tc029-timings-whitespace.html

* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::collectTimingsAndSettings): Make whitespace around cue-timings optional.

LayoutTests: 

* media/track/captions-webvtt/tc008-timings-no-hour-errors.vtt:
* media/track/captions-webvtt/tc009-timings-hour-error.vtt:
* media/track/captions-webvtt/tc029-timings-whitespace.vtt: Added.
* media/track/track-webvtt-tc029-timings-whitespace.html: Added.
* media/track/track-webvtt-tc029-timings-whitespace-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: convert model tests and inspector-test.js to use Test.html
https://bugs.webkit.org/show_bug.cgi?id=129217

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

Miscellaneous changes to make the inspector model test harness work well in
scenarios where the test page must navigate or reload. Also improve reporting
test failures so that messages will be dumped correctly even when an exception
is thrown in the Inspector or the test times out.

* UserInterface/Base/Test.js:
(WebInspector.loaded): register new managers and observers.
(InspectorTest.log): Stringify the argument if it's an object.
(InspectorTest.assert): Stringify the argument if it's an object. Don't log
unless the condition is false.

(InspectorTest.expectThat): Added. Like assert(), but always logs.
(InspectorTest.debugLog): Escape and unescape the string properly.
(InspectorTest.completeTest): Fix teardown so messages are not lost.
(InspectorTest.evaluateInPage): Accept a callback argument.
(InspectorTest.addResult): Don't rebuild results when adding a new result.
(InspectorTest._resendResults.decrementPendingResponseCount): Added.

(InspectorTest._resendResults): Added. Track the number of pending
responses and invoke a given callback when everything has been resent.

(InspectorTest.testPageDidLoad): Renamed from `pageLoaded`.
(InspectorTest.reloadPage): Added.
(InspectorTest.reportUncaughtException): Prevent the default handler from running.
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype.dispatch): Report uncaught exceptions when dispatching
messages on the inspector page without blowing away the entire call stack.

* UserInterface/Test.html: Add files used by Network and Timeline domains.

LayoutTests:

* TestExpectations: Add flaky content-flow and failing shape-outside inspector tests.
* inspector-protocol/model/probe-manager-add-remove-actions.html: Removed.
* inspector-protocol/resources/shape-info-helper.js: Removed.
* inspector/debugger/debugger-test.js: Added.
(InspectorTestProxy.registerInitializer.):
(InspectorTestProxy.registerInitializer):
* inspector/debugger/probe-manager-add-remove-actions-expected.txt: Renamed from LayoutTests/inspector-protocol/model/probe-manager-add-remove-actions-expected.txt.
* inspector/debugger/probe-manager-add-remove-actions.html: Added.
* inspector/debugger/resources/breakpoint.js: Added. Copied from LayoutTests/inspector-protocol/.
(breakpointActions):
* inspector/dom/content-flow-content-nodes-expected.txt: Renamed from LayoutTests/inspector-protocol/model/content-flow-content-nodes-expected.txt.
* inspector/dom/content-flow-content-nodes.html: Renamed from LayoutTests/inspector-protocol/model/content-flow-content-nodes.html.
* inspector/dom/content-flow-content-removal-expected.txt: Renamed from LayoutTests/inspector-protocol/model/content-flow-content-removal-expected.txt.
* inspector/dom/content-flow-content-removal.html: Renamed from LayoutTests/inspector-protocol/model/content-flow-content-removal.html.
* inspector/dom/content-flow-list-expected.txt: Renamed from LayoutTests/inspector-protocol/model/content-flow-list-expected.txt.
* inspector/dom/content-flow-list.html: Renamed from LayoutTests/inspector-protocol/model/content-flow-list.html.
* inspector/dom/content-node-region-info-expected.txt: Renamed from LayoutTests/inspector-protocol/model/content-node-region-info-expected.txt.
* inspector/dom/content-node-region-info.html: Renamed from LayoutTests/inspector-protocol/model/content-node-region-info.html.
* inspector/dom/highlight-shape-outside-expected.txt: Renamed from LayoutTests/inspector-protocol/model/highlight-shape-outside-expected.txt.
* inspector/dom/highlight-shape-outside-margin-expected.txt: Renamed from LayoutTests/inspector-protocol/model/highlight-shape-outside-margin-expected.txt.
* inspector/dom/highlight-shape-outside-margin.html: Renamed from LayoutTests/inspector-protocol/model/highlight-shape-outside-margin.html.
* inspector/dom/highlight-shape-outside.html: Renamed from LayoutTests/inspector-protocol/model/highlight-shape-outside.html.
* inspector/dom/shapes-test.js: Added. Refactor existing shape helpers to use model objects
where it makes sense, and use easy-to-read assertions.
(InspectorTestProxy.registerInitializer.):
* inspector/inspector-test.js: Handle reloaded test pages better. Use better names.
(InspectorTestProxy.registerInitializer): Renamed from `register`.
(runTest.runInitializationMethodsInFrontend):
(runTest.runTestMethodInFrontend):
(runTest):
(InspectorTestProxy.completeTest):
* inspector/page/main-frame-resource-expected.txt: Renamed from LayoutTests/inspector-protocol/model/main-frame-resource-expected.txt.
* inspector/page/main-frame-resource.html: Renamed from LayoutTests/inspector-protocol/model/main-frame-resource.html.
* inspector/page/resources/dummy-page.html: Added.
* platform/efl/TestExpectations: Move failing inspector tests to generic expectations.
* platform/gtk/TestExpectations: Move failing inspector tests to generic expectations.
* platform/win/TestExpectations: Move failing inspector tests to generic expectations.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Incorrect reference counting of Range in WebFrame.
https://bugs.webkit.org/show_bug.cgi?id=130160
<rdar://problem/16282535>

Reviewed by Anders Carlsson.

* WebCoreSupport/WebFrameIOS.mm:
(-[WebFrame selectionRects]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/16307346> Add new WebKitLegacy.framework.

Reviewed by Dan Bernstein.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:
Add new files.

Source/WebKit/mac:

* Configurations/WebKitLegacy.xcconfig:
Add xcconfig file for the new framework.

* WebKitLegacy/Info.plist:
Add Info.plist for WebKitLegacy.framework.

* WebKitLegacy/MigrateHeadersToLegacy.make:
Add makefile that copies headers from WebKit to WebKitLegacy and rewrites includes from WebKit/ to WebKitLegacy/
* WebKitLegacy/WebKitLegacy.cpp:
Add an empty file so we'll have something to link.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix for ENABLE(IMAGE_CONTROLS) after 165479

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::servicesRolloverButtonCell):
(WebCore::RenderThemeMac::paintImageControlsButton):
(WebCore::RenderThemeMac::imageControlsButtonSize):
Don't try to use the AppKit methods that are only available on 64-bit.

* Misc/WebSharingServicePickerController.h:
* Misc/WebSharingServicePickerController.mm:
Don't use new-runtime features in code that has to build 32-bit.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WebKit2] Crash when trying to select inside a video element with longpress..
https://bugs.webkit.org/show_bug.cgi?id=130095
<rdar://problem/16294534>

Reviewed by Benjamin Poulain.

We only need to set the assisted node for nodes that will receive an
input peripheral (keyboard, picker, popover, etc.).

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::elementDidFocus):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Hang in Remote Inspection triggering breakpoint from console
https://bugs.webkit.org/show_bug.cgi?id=130032

Reviewed by Timothy Hatcher.

* inspector/EventLoop.h:
* inspector/EventLoop.cpp:
(Inspector::EventLoop::remoteInspectorRunLoopMode):
(Inspector::EventLoop::cycle):
Expose the run loop mode name so it can be used if needed by others.

* inspector/remote/RemoteInspectorDebuggableConnection.h:
* inspector/remote/RemoteInspectorDebuggableConnection.mm:
(Inspector::RemoteInspectorBlock::RemoteInspectorBlock):
(Inspector::RemoteInspectorBlock::~RemoteInspectorBlock):
(Inspector::RemoteInspectorBlock::operator=):
(Inspector::RemoteInspectorBlock::operator()):
(Inspector::RemoteInspectorQueueTask):
Instead of a dispatch_queue, have our own static Vector of debugger tasks.

(Inspector::RemoteInspectorHandleRunSource):
(Inspector::RemoteInspectorInitializeQueue):
Initialize the static queue and run loop source. When the run loop source
fires, it will exhaust the queue of debugger messages.

(Inspector::RemoteInspectorDebuggableConnection::RemoteInspectorDebuggableConnection):
(Inspector::RemoteInspectorDebuggableConnection::~RemoteInspectorDebuggableConnection):
When we get a debuggable connection add a run loop source for inspector commands.

(Inspector::RemoteInspectorDebuggableConnection::dispatchAsyncOnDebuggable):
(Inspector::RemoteInspectorDebuggableConnection::sendMessageToBackend):
Enqueue blocks on our Vector instead of our dispatch_queue.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Disable REMOTE_INSPECTOR in earlier OS X releases
https://bugs.webkit.org/show_bug.cgi?id=130118

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorClient::indicate):
(WebInspectorClient::hideIndication):
Properly guard REMOTE_INSPECTOR only calls.

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: OS X View Indication
https://bugs.webkit.org/show_bug.cgi?id=130119

Reviewed by Timothy Hatcher.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::setIndicating):
OS X will handles this in the InspectorOverlay. iOS does not use the
overlay, so it handles this in the client (already implemented).

* inspector/InspectorOverlay.h:
Remove unused m_size, and add a boolean for the indicating state.

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::InspectorOverlay):
(WebCore::InspectorOverlay::shouldShowOverlay):
Helper for determining if we should show the overlay or not.

(WebCore::InspectorOverlay::setIndicating):
Set the state and trigger an overlay update.

(WebCore::InspectorOverlay::paint):
(WebCore::InspectorOverlay::update):
(WebCore::InspectorOverlay::drawGutter):
(WebCore::InspectorOverlay::evaluateInOverlay):
Simplification of existing methods.

* inspector/InspectorOverlayPage.css:
(.indicate):
Give the page a blue tint, matching the node highlight color.

* inspector/InspectorOverlayPage.js:
(showPageIndication):
(hidePageIndication):
Add / remove a body style class.

(drawNodeHighlight):
Remove unused parameters.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebGL] WebKit1 + WebKit2 iOS clients should check load policy
https://bugs.webkit.org/show_bug.cgi?id=130162

Add iOS implementations of WebGL load policy queries.

* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMavericks.a:
* libWebKitSystemInterfaceMountainLion.a:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebGL] WebKit1 + WebKit2 iOS clients should check load policy
https://bugs.webkit.org/show_bug.cgi?id=130162

Reviewed by Simon Fraser.

Source/WebKit/mac:

Implement the webGLPolicyForURL methods, calling into WebKitSystemInterface.

* Configurations/WebKit.xcconfig: Add MobileAsset to iOS config.
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:

Source/WebKit2:

Implement webGLPolicyForURL() methods for iOS.

* Configurations/WebContent-iOS.entitlements: Add the MobileAsset asset type.
* Configurations/WebKit2.xcconfig: Add MobileAsset to iOS link list.
* WebProcess/WebPage/WebPage.cpp: Exclude iOS.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::webGLPolicyForURL): Call into WKSI.
(WebKit::WebPage::resolveWebGLPolicyForURL):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Fix multiple console.assert stripping issues
https://bugs.webkit.org/show_bug.cgi?id=130166

Reviewed by Timothy Hatcher.

There were a couple console.assert stripping issues in production.
One line required a semicolon so was avoiding getting stripped.
One resulted in a logic change, when stripping the only statement
of a control flow block. Add a warning for such cases.

* Scripts/remove-console-asserts.pl:
Add warning for a console.assert being the only statement in a control flow block
without braces. When it is stripped it may change the flow of the function.

* Scripts/remove-console-asserts-dryrun.rb: Added.
Add a script to quickly test running remove console asserts on our files, to
help catch errors not in a production build and in the original non-combined
files, so you can more easily fix issues.

* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._updateContentFlowFromPayload):
Convert the for loop into a single console.assert statement.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.removeChild):
Add missing semicolon.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Feature check for accessibility support before using it (DOMAgent.getAccessibilityPropertiesForNode)
https://bugs.webkit.org/show_bug.cgi?id=130037

Reviewed by Timothy Hatcher.

Feature detect if accessibility information is supported before
creating or attempting to update the accessibility section.

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._accessibilitySupported):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [iOS 6] uncaught exception attempting to use CSSAgent.getNamedFlowCollection
https://bugs.webkit.org/show_bug.cgi?id=130167

Reviewed by Timothy Hatcher.

Feature check the protocol method before using it. It is
fine to do nothing if the feature is not supported.

* UserInterface/Controllers/DOMTreeManager.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make HTMLCanvasElement::is3D private
https://bugs.webkit.org/show_bug.cgi?id=130117

Reviewed by Anders Carlsson.

HTMLCanvasElement::is3D is not used anywhere except HTMLCanvasElement.
So, make HTMLCanvasElement::is3D a private method. Also, make more use
of is3D method.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::reset):
(WebCore::HTMLCanvasElement::getImageData):
* html/HTMLCanvasElement.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Replay: add infrastructure for memoizing nondeterministic DOM APIs
https://bugs.webkit.org/show_bug.cgi?id=129445

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

There was a bug in the replay inputs code generator that would include
headers for definitions of enum classes, even though they can be safely
forward-declared.

* replay/scripts/CodeGeneratorReplayInputs.py:
(Generator.generate_includes): Only include for copy constructor if the
type is a heavy scalar (i.e., String, URL), not a normal scalar
(i.e., int, double, enum classes).

(Generator.generate_type_forward_declarations): Forward-declare scalars
that are enums or enum classes.

Source/WebCore:

Add two pieces of infrastructure to support memoization of selected DOM APIs.

The first piece is MemoizedDOMResult, a templated replay input class that knows
how to serialize a DOM API's return value, ctype, and exception code.

The second piece is the addition of a new IDL attribute called `Nondeterministic`.
When placed on a DOM function or attribute, the code generator will emit code
to save the DOM API's return value or use a memoized return value instead,
depending on the current replay state. This new emitted code path is behind
a feature flag.

No new tests, as no new inputs are addressed by this change. Per-DOM API replay
regression tests will be added when those APIs are marked as nondeterministic.

* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm: Add support of the `Nondeterministic` attribute.
(GenerateImplementation): Handle cases for attributes and getters with exceptions.
(GenerateImplementationFunctionCall): Handle function calls with and without exceptions.
(GetNativeTypeForMemoization): Added. Converts DOMString to WTF::String.
* bindings/scripts/IDLAttributes.txt: Add new `Nondeterministic` attribute.
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjAttrWithGetterException):
(WebCore::jsTestObjStringAttrWithGetterException):
(WebCore::jsTestObjWithScriptStateAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::jsTestObjNullableStringValue):
(WebCore::jsTestObjPrototypeFunctionByteMethod):
(WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionOctetMethod):
(WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionLongMethod):
(WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethod):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
(WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
(WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
(WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
(WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
(WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
(WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsAttrWithGetterException):
(WebCore::jsTestTypedefsStringAttrWithGetterException):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
(WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):

* replay/AllReplayInputs.h:
* replay/MemoizedDOMResult.cpp: Added.
(WebCore::MemoizedDOMResultBase::type):
(WebCore::MemoizedDOMResultBase::createFromEncodedResult):
(InputTraits<MemoizedDOMResultBase>::type):
(InputTraits<MemoizedDOMResultBase>::encode):
(InputTraits<MemoizedDOMResultBase>::decode):

* replay/MemoizedDOMResult.h: Added. Every specialization of MemoizedDOMResult<T>
stores a binding name, ctype, result value of type T, and optional exception code.
The ctype-specific code uses the CTypeTraits struct to abstract over enum names and
compiler types. The actual encode/decode methods just use methods from EncodingTraits<T>.

(WebCore::MemoizedDOMResultBase::MemoizedDOMResultBase):
(WebCore::MemoizedDOMResultBase::~MemoizedDOMResultBase):
(WebCore::MemoizedDOMResultBase::attribute):
(WebCore::MemoizedDOMResultBase::ctype):
(WebCore::MemoizedDOMResultBase::exceptionCode):
(WebCore::CTypeTraits::decode):
(WebCore::MemoizedDOMResultBase::convertTo):
(JSC::InputTraits<MemoizedDOMResultBase>::queue):
* replay/ReplayInputTypes.cpp: See below.
(WebCore::ReplayInputTypes::ReplayInputTypes):
* replay/ReplayInputTypes.h: See below.
* replay/SerializationMethods.cpp: We need to special-case the encoding
and decoding of MemoizedDOMResult inputs because the input is not part of
the generated per-framework replay inputs enum.
(JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
(JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):

* replay/WebInputs.json: Add the EncodedCType enum as an external enum type,
so that we can use a generated EncodingTraits specialization to encode the enum.

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