Fix JSC::ARM64Assembler::LinkRecord::RealTypes
https://bugs.webkit.org/show_bug.cgi?id=135906

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-08-14
Reviewed by Michael Saboff.

JSC::ARM64Assembler::LinkRecord::RealTypes::m_compareRegister is defined
to occupy 5 bits but JSC::ARM64Assembler::RegisterID needs 6 bits. So,
increase the size of the bit field and also reorganize the struct to
better align with word boundaries.

* assembler/ARM64Assembler.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. In r165709 I mistakenly appended the -fno-exceptions
and -fno-strict-aliasing compiler flags to CMAKE_CXX_FLAGS and then
re-set CMAKE_C_FLAGS with the new string. The two flags should really
be appended to CMAKE_C_FLAGS and the same variable re-set with the
new string.

* Source/cmake/OptionsCommon.cmake:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ImageBufferDataCairo.h is missing header guards
https://bugs.webkit.org/show_bug.cgi?id=135933

Reviewed by Philippe Normand.

* platform/graphics/cairo/ImageBufferDataCairo.h:
Add the missing head guards to avoid problems when re-inclusion occurs.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] WebKit DOM documentation (webkitdomgtk) not installed after make install
https://bugs.webkit.org/show_bug.cgi?id=135836

Reviewed by Philippe Normand.

* Source/PlatformGTK.cmake: Add install command to also install
the GObject DOM bindings API docs.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] Move svg tests into fast/regions/svg
https://bugs.webkit.org/show_bug.cgi?id=135883

Reviewed by Andrei Bucur.

Move tests and adjust paths accordingly.

* fast/regions/svg/svg-doc-fragment-not-collected-expected.html: Renamed from LayoutTests/fast/regions/svg-doc-fragment-not-collected-expected.html.
* fast/regions/svg/svg-doc-fragment-not-collected.html: Renamed from LayoutTests/fast/regions/svg-doc-fragment-not-collected.html.
* fast/regions/svg/svg-element-not-collected-expected.html: Renamed from LayoutTests/fast/regions/svg-element-not-collected-expected.html.
* fast/regions/svg/svg-element-not-collected.html: Renamed from LayoutTests/fast/regions/svg-element-not-collected.html.
* fast/regions/svg/svg-root-element-collected-expected.txt: Renamed from LayoutTests/fast/regions/svg-root-element-collected-expected.txt.
* fast/regions/svg/svg-root-element-collected.html: Renamed from LayoutTests/fast/regions/svg-root-element-collected.html.
* fast/regions/svg/symbol-in-named-flow-crash-expected.txt: Renamed from LayoutTests/fast/regions/symbol-in-named-flow-crash-expected.txt.
* fast/regions/svg/symbol-in-named-flow-crash.svg: Renamed from LayoutTests/fast/regions/symbol-in-named-flow-crash.svg.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] REGRESSION(r171598, CMake): Introspection files are installed at the wrong path
https://bugs.webkit.org/show_bug.cgi?id=135934

Reviewed by Gustavo Noronha Silva.

Since r171598 gir files are installed under $datadir/webkitgtk-4.0/gir-1.0/.
The gir files should installed in $datadir/gir-1.0/ together with all other
gir files. We don't need to install introspection files in a versioned
directory because their filenames already contain the binary version. But before
r171598, the files were only installed to the right directory if the
gobject-instrospection pkg-config file was in the same prefix than the one we
wanted to install, because the gir and typelibs directories were extracted from
the pkg-config file. We should define INTROSPECTION_INSTALL_GIRDIR and
INTROSPECTION_INSTALL_TYPELIBDIR in OptionsGTK.cmake based on $datadir and $libdir
like we do in the autotools build.

* Source/cmake/FindGObjectIntrospection.cmake: Do not define
INTROSPECTION_INSTALL_GIRDIR and INTROSPECTION_INSTALL_TYPELIBDIR.
* Source/cmake/OptionsGTK.cmake: Define
INTROSPECTION_INSTALL_GIRDIR and INTROSPECTION_INSTALL_TYPELIBDIR.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MSE] Altering the quality of a YouTube video will cause the video to distort and display an error message
https://bugs.webkit.org/show_bug.cgi?id=135931

Reviewed by Eric Carlson.

When removing samples from the TrackBuffer's sample map, also remove those samples from the
TrackBuffer's decode queue. Otherwise, removed samples may persist in the decode queue and
either break sync-sample dependencies or cause decoding artifacts.

Pull the code which removes samples from a track buffer into its own utility function, and
use this function both from removeCodedFrames(), and also when samples are removed due to
overlapping appends in sourceBufferPrivateDidReceiveSample(). In order to reference
TrackBuffers outside of SourceBuffer (and in the static removeSamplesFromTrackBuffer()
function), make TrackBuffer a public forward declaration.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::removeSamplesFromTrackBuffer):
(WebCore::SourceBuffer::removeCodedFrames):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
* Modules/mediasource/SourceBuffer.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Update expectations with new identified failures and flakiness.
* platform/gtk/fast/ruby/ruby-base-merge-block-children-crash-2-expected.txt: Rebaseline after r172517.
* platform/gtk/fast/ruby/ruby/ruby-base-merge-block-children-crash-2-expected.png: Removed. File was in wrong path.
* platform/gtk/fast/ruby/ruby/ruby-base-merge-block-children-crash-2-expected.txt: Removed. File was in wrong path.
* platform/gtk/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt: Rebaseline after r172136.
* platform/gtk/scrollbars/scrollbar-selectors-expected.txt: Added. Rebaseline after r172220.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Initialize a separate variable (TestWTF_SOURCES) with the list of files
that are built into the TestWTF executable and move it above the platform-specific
config file inclusion. This makes it possible to add platform-specific files to that
list (e.g. GUniquePtr.cpp for the GTK port).

Rubber-stamped by Carlos Garcia Campos.

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/PlatformGTK.cmake:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for ppc, ppc64, ppc64le, s390, s390x into the CMake build
https://bugs.webkit.org/show_bug.cgi?id=135937

Patch by Tomas Popela <tpopela@redhat.com> on 2014-08-14
Reviewed by Carlos Garcia Campos.

* CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove nonRendererStyle
https://bugs.webkit.org/show_bug.cgi?id=135938

Reviewed by Andreas Kling.

It is used to support styling of non-renderer option elements. We have a better
mechanism for this, Element::computedStyle().

* dom/Element.cpp:
(WebCore::Element::resetComputedStyle):
(WebCore::Element::willResetComputedStyle):
        
    Add a virtual callback for computed style reset.

* dom/Element.h:
* dom/Node.h:
(WebCore::Node::nonRendererStyle): Deleted.
* dom/NodeRenderStyle.h:
(WebCore::Node::renderStyle):
        
    renderStyle() now always matches renderer()->style()

* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
(WebCore::HTMLOptGroupElement::isFocusable):
(WebCore::HTMLOptGroupElement::didAttachRenderers): Deleted.
(WebCore::HTMLOptGroupElement::willDetachRenderers): Deleted.
(WebCore::HTMLOptGroupElement::updateNonRenderStyle): Deleted.
(WebCore::HTMLOptGroupElement::nonRendererStyle): Deleted.
(WebCore::HTMLOptGroupElement::customStyleForRenderer): Deleted.
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::isFocusable):
        
    Use computedStyle.

(WebCore::HTMLOptionElement::willResetComputedStyle):
(WebCore::HTMLOptionElement::didAttachRenderers): Deleted.
(WebCore::HTMLOptionElement::willDetachRenderers): Deleted.
(WebCore::HTMLOptionElement::updateNonRenderStyle): Deleted.
(WebCore::HTMLOptionElement::nonRendererStyle): Deleted.
(WebCore::HTMLOptionElement::customStyleForRenderer): Deleted.
(WebCore::HTMLOptionElement::didRecalcStyle): Deleted.
* html/HTMLOptionElement.h:
* rendering/RenderMenuList.cpp:
(RenderMenuList::updateOptionsWidth):
(RenderMenuList::setTextFromOption):
        
    Use computedStyle.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2GTK - WebKitWebProcess assertion fails when dragging and dropping a file into the view
https://bugs.webkit.org/show_bug.cgi?id=127576

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-08-14
Reviewed by Carlos Garcia Campos.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performDragControllerAction): Assume read access
to any file that has been dragged into the web view when compiling for
GTK, since we don't support sandbox extensions.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Removing empty directories.

* qt: Removed.
* qt/declarative: Removed.
* qt/docs: Removed.
* qt/docs/webkitsnippets: Removed.
* qt/examples: Removed.
* qt/tests: Removed.
* qt/tests/MIMESniffing: Removed.
* qt/tests/benchmarks: Removed.
* qt/tests/qgraphicswebview: Removed.
* qt/tests/qwebelement: Removed.
* qt/tests/qwebframe: Removed.
* qt/tests/qwebhistory: Removed.
* qt/tests/qwebpage: Removed.
* qt/tests/qwebsecurityorigin: Removed.
* qt/tests/qwebview: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Create activations eagerly
https://bugs.webkit.org/show_bug.cgi?id=135942

Reviewed by Geoffrey Garen.

Prepare to rewrite activation objects into a more
sane implementation. Step 1 is reverting to eager
creation of the activation object. This results in
a 1.35x regression in earley, but otherwise has a
minimal performance impact.

The earley regression is being tracked by bug #135943

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitNewFunctionInternal):
(JSC::BytecodeGenerator::emitNewFunctionExpression):
(JSC::BytecodeGenerator::emitCallEval):
(JSC::BytecodeGenerator::emitPushWithScope):
(JSC::BytecodeGenerator::emitPushCatchScope):
(JSC::BytecodeGenerator::createActivationIfNecessary): Deleted.
* bytecompiler/BytecodeGenerator.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_create_activation):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_create_activation):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/135909> Move helper applications out of the root of the framework.

As described in <https://developer.apple.com/library/mac/technotes/tn2206/>, for bundles containing
a Versions directory there may be no other content at the top level of the bundle other than symlinks.
Upcoming changes to code signing will prevent bundles that violate this rule from being signed.

Reviewed by Sam Weinig.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj: Add the symlink to WebKitPluginHost.app in the Versions/A
directory of the framework rather than at the top level.

Source/WebKit2:

* Configurations/Base.xcconfig: Define a configuration setting that points to the content directory
of the framework. On OS X this is Versions/A. On iOS, where frameworks are shallow, this is the top level.
* Configurations/BaseLegacyProcess.xcconfig: Install the legacy processes in the content directory
of the framework.
* WebKit2.xcodeproj/project.pbxproj: Copy the legacy processes into the content directory of the
framework during engineering builds. Generate symlinks for the legacy processes to their locations
in Versions/Current. This is necessary because -[NSBundle pathForAuxiliaryExecutable:] only looks
at the top level of the framework wrapper.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Services with UI] Selection services don't work inside <iframes>.
https://bugs.webkit.org/show_bug.cgi?id=135941
<rdar://problem/17957690>

Reviewed by Tim Horton.

Need to map the selection rectangles using the correct FrameView.
When handling the click, we must use the selection from the focused frame.

* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::buildSelectionHighlight):
(WebKit::ServicesOverlayController::handleClick):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Forms] We should share RenderStyle object for optgroup and option element
https://bugs.webkit.org/show_bug.cgi?id=88405

Reviewed by Andreas Kling.

We can remove this special case now.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update scope resolution to assume that the parent activation is always there
https://bugs.webkit.org/show_bug.cgi?id=135947

Reviewed by Andreas Kling.

Another incremental step in removing the idea of lazily created
activations.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitResolveClosure):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emitResolveClosure):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make inherited style and parent renderer references
https://bugs.webkit.org/show_bug.cgi?id=135857

Reviewed by Andreas Kling.

We don't recurse into non-rendered subtrees anymore so they can't be null.
Also stop using Element::renderStyle() as it differs from e->renderer().style() in
some rare cases (that should be fixed).

* style/StyleResolveTree.cpp:
(WebCore::Style::RenderTreePosition::parent):
(WebCore::Style::RenderTreePosition::RenderTreePosition):
(WebCore::Style::RenderTreePosition::canInsert):
(WebCore::Style::RenderTreePosition::insert):
(WebCore::Style::RenderTreePosition::computeNextSibling):
(WebCore::Style::shouldCreateRenderer):
(WebCore::Style::styleForElement):
(WebCore::Style::createRendererIfNeeded):
(WebCore::Style::textRendererIsNeeded):
(WebCore::Style::createTextRendererIfNeeded):
(WebCore::Style::updateTextRendererAfterContentChange):
(WebCore::Style::attachChildren):
(WebCore::Style::attachDistributedChildren):
(WebCore::Style::attachShadowRoot):
(WebCore::Style::resetStyleForNonRenderedDescendants):
(WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
(WebCore::Style::attachRenderTree):
(WebCore::Style::resolveLocal):
(WebCore::Style::resolveShadowTree):
(WebCore::Style::updateBeforeOrAfterPseudoElement):
(WebCore::Style::resolveTree):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
srcset with w descriptor doesn't behave as expected when sizes is not supported.
https://bugs.webkit.org/show_bug.cgi?id=135935

Reviewed by Dean Jackson.

In current implementation, if sizes is not supported, when authors would write
markup such as `<img src=fallback.jpg srcset="100px.jpg 100w, 400px.jpg 400w">`
the first candidate in srcset would be picked, regardless of its dimensions
That is likely to be confusing for authors.
Dropping these "not yet supported" candidates is likely to be less confusing,
and will result in the "fallback.jpg" candidate being picked.

No new tests since this change only concerns builds that are built
with the PICTURE_SIZES compile flag turned off.

* html/parser/HTMLSrcsetParser.cpp:
(WebCore::parseDescriptors):
Drop candidates that include either 'w' or 'h' descriptors when the
sizes feature is not supported.


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