Implement more decoding methods
https://bugs.webkit.org/show_bug.cgi?id=123922

Reviewed by Dan Bernstein.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectDecoder decodeObjectForKey:]):
Call decodeObjectOfClasses:forKey: passing nil as the classes set.

(-[WKRemoteObjectDecoder decodeInt64ForKey:]):
Try to get a WebUInt64 and return its value.

(-[WKRemoteObjectDecoder decodeDoubleForKey:]):
Try to get a WebDouble and return its value.

(-[WKRemoteObjectDecoder decodeBytesForKey:returnedLength:]):
Move this method next to the other decoding methods.

(-[WKRemoteObjectDecoder requiresSecureCoding]):
Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove the flaky test expectation after r158720 now that the test is not flaky.

* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix test case

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: CSS Regions: When a flow is clicked the content of flow needs to be displayed
https://bugs.webkit.org/show_bug.cgi?id=122927

Reviewed by Joseph Pecoraro.

ContentFlowTreeContentView is now used to display the content nodes of a ContentFlow. It is
very similar to the DOMTreeContentView class, but can handle multiple root nodes.

* UserInterface/ContentFlowTreeContentView.js: Added.
(WebInspector.ContentFlowTreeContentView):
(WebInspector.ContentFlowTreeContentView.prototype.get selectionPathComponents):
(WebInspector.ContentFlowTreeContentView.prototype.updateLayout):
(WebInspector.ContentFlowTreeContentView.prototype.shown):
(WebInspector.ContentFlowTreeContentView.prototype.hidden):
(WebInspector.ContentFlowTreeContentView.prototype.closed):
(WebInspector.ContentFlowTreeContentView.prototype._selectedNodeDidChange):
(WebInspector.ContentFlowTreeContentView.prototype._pathComponentSelected):
(WebInspector.ContentFlowTreeContentView.prototype._createContentNodeTree):
(WebInspector.ContentFlowTreeContentView.prototype._createContentTrees):
(WebInspector.ContentFlowTreeContentView.prototype._contentNodeWasAdded):
(WebInspector.ContentFlowTreeContentView.prototype._contentNodeWasRemoved):
* UserInterface/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
* UserInterface/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype.ondeselect): We need to remove the selected "dom node"
so that the element is not going to stay selected after the we move to a different DOM tree.
* UserInterface/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline.prototype.selectDOMNode):
* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.sidebarPanelForRepresentedObject):
* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the display of query parameters when the value is missing.

https://bugs.webkit.org/show_bug.cgi?id=123920

Reviewed by Joseph Pecoraro.

* UserInterface/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix EFL build after r158753
https://bugs.webkit.org/show_bug.cgi?id=123923

r158753 renamed WKNavigationData.h as WKNavigationDataRef.h, so
update it in UIProcess/API/efl/ewk_navigation_data_private.h.

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-11-06
Reviewed by Csaba Osztrogonác.

* UIProcess/API/efl/ewk_navigation_data_private.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support iteration of the Arguments object
https://bugs.webkit.org/show_bug.cgi?id=123835

Reviewed by Mark Lam.

Source/JavaScriptCore:

Add an ArgumentsIterator object, and associated classes so that we can support
iteration of the arguments object.

This is a largely mechanical patch.  The only gnarliness is in the
logic to avoid reifying the Arguments object in for(... of arguments)
scenarios.

* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitEnumeration):
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::argumentsFuncIterator):
* runtime/Arguments.h:
* runtime/ArgumentsIteratorConstructor.cpp: Added.
(JSC::ArgumentsIteratorConstructor::finishCreation):
* runtime/ArgumentsIteratorConstructor.h: Added.
(JSC::ArgumentsIteratorConstructor::create):
(JSC::ArgumentsIteratorConstructor::createStructure):
(JSC::ArgumentsIteratorConstructor::ArgumentsIteratorConstructor):
* runtime/ArgumentsIteratorPrototype.cpp: Added.
(JSC::ArgumentsIteratorPrototype::finishCreation):
(JSC::argumentsIteratorPrototypeFuncIterator):
(JSC::argumentsIteratorPrototypeFuncNext):
* runtime/ArgumentsIteratorPrototype.h: Added.
(JSC::ArgumentsIteratorPrototype::create):
(JSC::ArgumentsIteratorPrototype::createStructure):
(JSC::ArgumentsIteratorPrototype::ArgumentsIteratorPrototype):
* runtime/CommonIdentifiers.h:
* runtime/JSArgumentsIterator.cpp: Added.
(JSC::JSArgumentsIterator::finishCreation):
* runtime/JSArgumentsIterator.h: Added.
(JSC::JSArgumentsIterator::createStructure):
(JSC::JSArgumentsIterator::create):
(JSC::JSArgumentsIterator::next):
(JSC::JSArgumentsIterator::JSArgumentsIterator):
* runtime/JSArrayIterator.cpp:
(JSC::createIteratorResult):
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:

LayoutTests:

Add test cases

* js/arguments-iterator-expected.txt: Added.
* js/arguments-iterator.html: Added.
* js/script-tests/arguments-iterator.js: Added.
(shouldThrow.test):
(testAlias):
(testStrict):
(testReifiedArguments):
(testOverwrittenArguments):
(testNullArguments):
(testNonArrayLikeArguments):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Changes to CodeGeneratorInspectorStrings.py should rebuild inspector generated files
https://bugs.webkit.org/show_bug.cgi?id=123925

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-11-06
Reviewed by Timothy Hatcher.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move allowed classes handling to decodeObject
https://bugs.webkit.org/show_bug.cgi?id=123930

Reviewed by Andreas Kling.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(decodeObjectFromObjectStream):
Pass allowed classes through to decodeObject.

(decodeObject):
Update to take an NSSet of allowed classes. If the set is nil, use the current set.

(-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]):
Pass classes to decodeObject.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158797 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebGL] We should not allow generateMipMap on compressed textures
https://bugs.webkit.org/show_bug.cgi?id=123915
<rdar://problem/15201274>

Reviewed by Dean Jackson.

Found by existing conformance/extensions/webgl-compressed-texture-s3tc.html

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::compressedTexImage2D): Set compressed flag.
(WebCore::WebGLRenderingContext::compressedTexSubImage2D): Ditto.
(WebCore::WebGLRenderingContext::generateMipmap): For Apple builds, check state
of compressed flag and generate appropriate WebGL error if necessary.
* html/canvas/WebGLTexture.cpp:
(WebCore::WebGLTexture::WebGLTexture): Set compressed flag to false by default
(WebCore::WebGLTexture::isCompressed): Added
(WebCore::WebGLTexture::setCompressed): Added
* html/canvas/WebGLTexture.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::generateMipmap): Switch implementation to use proper
glGenerateMipmaps, rather than the glGenerateMipmapsEXT method.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixed multiple API test failures after r158764.

Reviewed by Sam Weinig.

* UIProcess/API/mac/WKBrowsingContextController.mm:
(setUpPagePolicyClient): If the delegate isn’t set or doesn’t respond to a selector, respond
with WKFramePolicyListenerUse().



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cleanup FontMac.mm
https://bugs.webkit.org/show_bug.cgi?id=123928

Reviewed by Andy Estes.

* platform/graphics/mac/FontMac.mm:
(WebCore::showGlyphsWithAdvances): Inline the value of variable isVertical as we
reference it exactly once and its value is sufficiently clear.
(WebCore::Font::drawGlyphs): Remove default case in switch block so that the compiler
checks that all cases are covered. Move definition of platformData to the top of the
function and use it whenever we want to access the platform font data

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/media/track/track-forced-subtitles-in-band.html always times out
https://bugs.webkit.org/show_bug.cgi?id=123412

Reviewed by Jer Noble.

* media/content/CC+Subtitles.mov: Added.

* media/track/track-forced-subtitles-in-band.html: Fail loudly if the caption track menu is
    not found by the helper function. Wait for both 'seeked' and 'cuechange' events before
    checking activeCues.

* media/trackmenu-test.js:
(getTrackListElement): Correct the caption menu pseudo-id.
(trackMenuList): Complain when the track menu is not found.

* platform/mac/TestExpectations: Remove track-forced-subtitles-in-band.html.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in SliderThumbElement::dragFrom
https://bugs.webkit.org/show_bug.cgi?id=123873

Reviewed by Sam Weinig.

Moved Ref.

* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleMouseDownEvent):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::dragFrom):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Upstream Letterpress effect
https://bugs.webkit.org/show_bug.cgi?id=123932

Reviewed by Sam Weinig.

Source/JavaScriptCore:

Add feature define ENABLE_LETTERPRESS disabled by default. We only enable
letterpress on iOS.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Test: platform/iphone-simulator/iphone/getComputedStyle-text-decoration-letterpress.html

* Configurations/FeatureDefines.xcconfig: Add feature define ENABLE_LETTERPRESS disabled
by default. We only enable letterpress on iOS.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationFlagsToCSSValue): Add support for CSS value -webkit-letterpress.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseTextDecoration): Ditto.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator TextDecoration): Ditto.
* css/CSSValueKeywords.in: Added CSS value -webkit-letterpress.
* platform/graphics/GraphicsContext.h:
* platform/graphics/mac/FontMac.mm:
(WebCore::fillVectorWithHorizontalGlyphPositions): Added.
(WebCore::shouldUseLetterpressEffect): Added.
(WebCore::showLetterpressedGlyphsWithAdvances): Added.
(WebCore::showGlyphsWithAdvances): Modified to call showLetterpressedGlyphsWithAdvances()
to show a letterpressed glyph. I also included additional iOS-specific changes.
(WebCore::Font::drawGlyphs):
* rendering/TextPaintStyle.cpp:
(WebCore::TextPaintStyle::TextPaintStyle):
(WebCore::computeTextPaintStyle): Modified to compute letterpress effect style.
(WebCore::updateGraphicsContext): Modified to apply/unapply letterpress effect drawing mode.
* rendering/TextPaintStyle.h:
* rendering/style/RenderStyleConstants.h:

Source/WebKit/mac:

Add feature define ENABLE_LETTERPRESS disabled by default. We only enable
letterpress on iOS.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Add feature define ENABLE_LETTERPRESS disabled by default. We only enable
letterpress on iOS.

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

Add feature define ENABLE_LETTERPRESS disabled by default. We only enable
letterpress on iOS.

* wtf/FeatureDefines.h:

LayoutTests:

* platform/iphone-simulator/iphone/getComputedStyle-text-decoration-letterpress-expected.txt: Added.
* platform/iphone-simulator/iphone/getComputedStyle-text-decoration-letterpress.html: Added.
* platform/iphone-simulator/iphone/resources/getComputedStyle-text-decoration-letterpress.js: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow property list classes to exist in containers
https://bugs.webkit.org/show_bug.cgi?id=123938

Reviewed by Andreas Kling.

* Shared/API/Cocoa/WKRemoteObjectInterface.mm:
(isContainerClass):
Return whether a given class is a container class.

(propertyListClasses):
Return the set of property list classes.

(allowedArgumentClassesForMethod):
Allow all property list classes for container type arguments.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158804 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Encoded object stream should be sequential
https://bugs.webkit.org/show_bug.cgi?id=123939

Reviewed by Andreas Kling.

Reserve space in the object stream for objects that are to be encoded, otherwise
the object stream will not be sequential.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeToObjectStream):
* Shared/ImmutableArray.h:
(WebKit::ImmutableArray::entries):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement enough functionality so that NSURLRequest objects can be decoded
https://bugs.webkit.org/show_bug.cgi?id=123942

Reviewed by Andreas Kling.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectEncoder requiresSecureCoding]):
Add new method. Return YES.

(-[WKRemoteObjectDecoder decodeValueOfObjCType:at:]):
Add new method. This currently only handles 'i', but we'll add more variants as needed.

(-[WKRemoteObjectDecoder decodeBoolForKey:]):
Get a WebBoolean from the dictionary and return its value.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
kTraceBufferLen is unused in default builds
https://bugs.webkit.org/show_bug.cgi?id=123941
<rdar://problem/15409804>

Reviewed by Tim Horton.

kTraceBufferLen is not used in debug.cpp if TRACE_ENABLED is
not defined. This causes a warning in newer builds of clang.
For now, skip warnings on unused variables until we
update from ANGLE.

* src/compiler/debug.cpp: Add unused-variable ignore pragma.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remote Layer Tree: RemoteLayerTreeDrawingArea doesn't make layers for fixedpos elements
https://bugs.webkit.org/show_bug.cgi?id=123943

Reviewed by Simon Fraser.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
Make fixed position elements create compositing layers and stacking contexts
in the RemoteLayerTreeDrawingArea just like they do in TiledCoreAnimationDrawingArea.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
Fix the comment, since we have long since achieved this goal.


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