Source/WebCore: [Win] Unreviewed build fix

The build system continues to attempt to build QTMovieWin, even
though it is excluded from the build solution. I'm actually
removing the project files to prevent this.

* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Removed.
* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj.filters: Removed.

Source/WebKit: [Win] Unreviewed build fix.

* WebKit.vcxproj/WebKit.sln: Remove reference to QTMovieWin,
which we do not wish to build.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WIn] Unreviewed build fix after r160599

* rendering/RenderMediaControls.cpp:
(WebCore::determineState): RenderObject::theme now returns
a reference.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] Expose the certificate chain for the main frame
https://bugs.webkit.org/show_bug.cgi?id=125760

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKBrowsingContextController.h: Declared certificateChain property.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController certificateChain]): Added this getter, which calls through
to WebFrameProxy::certificateInfo.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor option handling in WebKitTestRunner.
https://bugs.webkit.org/show_bug.cgi?id=123185

Patch by Tamas Gergely <tgergely.u-szeged@partner.samsung.com> on 2013-12-15
Reviewed by Darin Adler.

Option handling is refactored (according to the FIXME) that allows
to automatically generate the help message.

* WebKitTestRunner/CMakeLists.txt:
* WebKitTestRunner/GNUmakefile.am:
* WebKitTestRunner/Options.cpp: Added.
(WTR::Options::Options):
(WTR::handleOptionTimeout):
(WTR::handleOptionNoTimeout):
(WTR::handleOptionNoTimeoutAtAll):
(WTR::handleOptionVerbose):
(WTR::handleOptionGcBetweenTests):
(WTR::handleOptionPixelTests):
(WTR::handleOptionPrintSupportedFeatures):
(WTR::handleOptionComplexText):
(WTR::handleOptionAcceleratedDrawing):
(WTR::handleOptionRemoteLayerTree):
(WTR::handleOptionUnmatched):
(WTR::OptionsHandler::OptionsHandler):
(WTR::Option::Option):
(WTR::Option::matches):
(WTR::OptionsHandler::parse):
(WTR::OptionsHandler::printHelp):
* WebKitTestRunner/Options.h: Added.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: 2x regression on Dromaeo DOM query tests
https://bugs.webkit.org/show_bug.cgi?id=125377

Reviewed by Filip Pizlo.

PerformanceTests:

Added a micro-benchmark for updating a named property on document.

* Bindings/update-name-getter.html: Added.
* Skipped:

Source/JavaScriptCore:

The bug was caused by JSC not JIT'ing property access on "document" due to its type info having
HasImpureGetOwnPropertySlot flag.

Fixed the bug by new type info flag NewImpurePropertyFiresWatchpoints, which allows the baseline
JIT to generate byte code for access properties on an object with named properties (a.k.a.
custom name getter) in DOM. When a new named property appears on the object, VM is notified via
VM::addImpureProperty and fires StructureStubClearingWatchpoint added during the repatch.

* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFromLLInt): Take the slow path if we have any object with impure
properties in the prototype chain.
(JSC::GetByIdStatus::computeForChain): Ditto.

* jit/Repatch.cpp:
(JSC::repatchByIdSelfAccess): Throw away the byte code when a new impure property is added on any
object in the prototype chain via StructureStubClearingWatchpoint.
(JSC::generateProtoChainAccessStub): Ditto.
(JSC::tryCacheGetByID):
(JSC::tryBuildGetByIDList):
(JSC::tryRepatchIn): Ditto.

* runtime/JSTypeInfo.h: Added NewImpurePropertyFiresWatchpoints.
(JSC::TypeInfo::newImpurePropertyFiresWatchpoints): Added.

* runtime/Operations.h:
(JSC::normalizePrototypeChainForChainAccess): Don't exit early if VM will be notified of new
impure property even if the object had impure properties.

* runtime/Structure.h:
(JSC::Structure::takesSlowPathInDFGForImpureProperty): Added. Wraps hasImpureGetOwnPropertySlot and
asserts that newImpurePropertyFiresWatchpoints is true whenever hasImpureGetOwnPropertySlot is true.

* runtime/VM.cpp:
(JSC::VM::registerWatchpointForImpureProperty): Added.
(JSC::VM::addImpureProperty): Added. HTMLDocument calls it to notify JSC of a new impure property.

* runtime/VM.h:

Source/WebCore:

The bug was caused by JSC not JIT'ing property accesses on document because of its having
custom named getter (named properties).  This resulted in resolution of methods on document
such as getElementById to happen inside the interpreter.

Fixed the bug by using the new JSC type info flag which tells JSC to JIT property access on
document, and then notifying JSC whenever a new named property appeared on document.

Tests: js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html
       js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html
       js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html
       js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html
       js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html
       js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html

* bindings/js/JSDOMBinding.cpp:
(WebCore::addImpureProperty): Wraps VM::addImpureProperty.
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader): Added the support for NewImpurePropertyFiresWatchpoints.
* bindings/scripts/IDLAttributes.txt: Ditto.
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::addDocumentNamedItem): Calls addImpureProperty.
* html/HTMLDocument.idl: Added NewImpurePropertyFiresWatchpoints.

LayoutTests:

Added more regression tests for throwing away byte code when a new named property appears.

* js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-expected: Rebaselined.
* js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps.html: Fixed the test to use dfgShouldBe.
* js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-2-expected.txt: Added.
* js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html: Added.
* js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-3-expected.txt: Added.
* js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html: Added.
* js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-4-expected.txt: Added.
* js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html: Added.
* js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-5-expected.txt: Added.
* js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-5.html: Added.
* js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-2-expected.txt: Added.
* js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html: Added.
* js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-3-expected.txt: Added.
* js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html: Added.
* js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-4-expected.txt: Added.
* js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html: Added.
* js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5-expected.txt: Added.
* js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5.html: Added.
* js/dom/script-tests/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps.js: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
More nullptr in RenderElement
https://bugs.webkit.org/show_bug.cgi?id=125764

Reviewed by Andreas Kling.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::uncachedFirstLineStyle):
(WebCore::RenderElement::updateShapeImage):
(WebCore::RenderElement::destroyLeftoverChildren):
(WebCore::RenderElement::findNextLayer):
Use nullptr in a few more places.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2 View Gestures: Can't pinch in past the maximum scale
https://bugs.webkit.org/show_bug.cgi?id=125749

Reviewed by Anders Carlsson.

Pinching in past the maximum scale should result in the zoom resisting, but continuing.

* UIProcess/mac/ViewGestureController.cpp:
(WebKit::resistanceForDelta):
Clean up the logic and apply resistance to pinching in past the maximum.

(WebKit::ViewGestureController::handleMagnificationGesture):
(WebKit::ViewGestureController::endMagnificationGesture):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for maction@toggle
https://bugs.webkit.org/show_bug.cgi?id=120059

Patch by Frédéric Wang <fred.wang@free.fr> on 2013-12-15
Reviewed by Chris Fleizach.

Source/WebCore:

Test: mathml/presentation/maction-toggle.html

* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::getSelectedChildAndIndex):
(WebCore::MathMLSelectElement::updateSelectedChild):
(WebCore::MathMLSelectElement::defaultEventHandler):
(WebCore::MathMLSelectElement::willRespondToMouseClickEvents):
(WebCore::MathMLSelectElement::toggle):
* mathml/MathMLSelectElement.h:

LayoutTests:

* mathml/presentation/maction-toggle-expected.html: Added.
* mathml/presentation/maction-toggle.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] can't build from trunk: WebKitCookieManager: 'WebString' was not declared in this scope
https://bugs.webkit.org/show_bug.cgi?id=125759

Reviewed by Carlos Garcia Campos.

Renamed WebString to API::String after r160608.

* UIProcess/API/gtk/WebKitCookieManager.cpp:
(webkitCookieManagerGetDomainsWithCookiesCallback):
* UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
(webkit_file_chooser_request_get_mime_types):
(webkit_file_chooser_request_get_mime_types_filter):
(webkit_file_chooser_request_get_selected_files):
* UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
(webkit_form_submission_request_get_text_fields):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_set_web_extensions_directory):
(webkit_web_context_prefetch_dns):
* UIProcess/API/gtk/WebKitWebViewGroup.cpp:
(toAPIArray):
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
(webkitWebExtensionDidReceiveMessage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] Fix the preferred logical widths code to work with spanning grid items
https://bugs.webkit.org/show_bug.cgi?id=123994

Reviewed by Andreas Kling.

From Blink r159189 by <jchaffraix@chromium.org>

Source/WebCore:

There was no definition in the specs for the intrinsic / preferred
logical widths on the grid element. The following was proposed to
the WG and later accepted:
- The sum of the grid tracks' UsedBreadth is the minimum logical width
- The sum of the grid tracks' MaxBreadth is the maximum logical width

http://lists.w3.org/Archives/Public/www-style/2013Oct/0054.html
for more information.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
(WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
(WebCore::RenderGrid::minContentForChild):
(WebCore::RenderGrid::maxContentForChild):
* rendering/RenderGrid.h:

LayoutTests:

Extended the test case to include spanning grid items.

* fast/css-grid-layout/grid-preferred-logical-widths-expected.txt:
* fast/css-grid-layout/grid-preferred-logical-widths.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add myself as a committer

Unreviewed.

* Scripts/webkitpy/common/config/contributors.json:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix GTK+ build after r160549.

* GNUmakefile.am: Fix the include paths to make sure we include
the WebKit2 config.h file when building libWebKit2Platform.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[FTL] Allow EFL to build FTL with the build-jsc script.
https://bugs.webkit.org/show_bug.cgi?id=125774

Patch by Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com> on 2013-12-16
Reviewed by Zoltan Herczeg.

* Scripts/build-jsc:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Expose accessibility objects with ATK_ROLE_ARTICLE
https://bugs.webkit.org/show_bug.cgi?id=125587

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed accessibility objects with article role with the proper
AtkRole, to be provided by the next stable release of ATK.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):

Tools:

Add mappings to DRT & WKTR for article roles.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

Update test to unskip article objects and update expectations.

* accessibility/aria-mappings-expected.txt:
* platform/gtk/accessibility/roles-exposed-expected.txt:
* platform/gtk/accessibility/roles-exposed.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Expose accessibility objects with ATK_ROLE_CHECK_MENU_ITEM
https://bugs.webkit.org/show_bug.cgi?id=125594

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed accessibility objects with checkmenuitem role with the
proper AtkRole, to be provided by the next stable release of ATK.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):

Tools:

Add mappings to DRT & WKTR for checkmenuitem role.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

Update test to update expectations.

* platform/gtk/accessibility/roles-exposed-expected.txt:
* platform/gtk/accessibility/roles-exposed.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Catch callers who forget to use initializeStyle
https://bugs.webkit.org/show_bug.cgi?id=125763

Reviewed by Andreas Kling.

A recent fix was because a caller used setStyle first rather than using
initializeStyle. This patch adds an assertion to catch cases where we do
that so we see the mistake right away instead of indirectly later.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::initializeStyle): Simplified an assertion.
(WebCore::RenderElement::setStyle): Added an assertion that m_hasInitializedStyle
is true, with an exception for RenderView, which needs to be created before we
have the correct style computed for it (at least for now). Also broke out an
assertion that was using &&, since we would prefer to know which clause failed,
making separate assertions more useful than a combined assertion.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix QuickTime plug-in replacement scripting bugs
https://bugs.webkit.org/show_bug.cgi?id=125717

Reviewed by Sam Weinig.

Source/WebCore:

No new tests, existing test updated.

* Modules/plugins/QuickTimePluginReplacement.js:
(Replacement): Change '' to "" to avoid "Empty character constant" warning when creating
    Derived Sources.
(Replacement.prototype.createVideoElement): Handle qtsrc attribute. Remember base url.
(Replacement.prototype.setURL): Resolve urls relative to base.

LayoutTests:

* plugins/quicktime-plugin-replacement-expected.txt:
* plugins/quicktime-plugin-replacement.html: Update to test 'qtsrc' attribute, and to check
    that relative urls are resolved correctly.
* plugins/resources/yellow.mov: Added.


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