Add tests for WebIDL type conversions
https://bugs.webkit.org/show_bug.cgi?id=105927

Reviewed by Adam Barth.

Source/WebCore:

Expose attributes of various WebIDL types for testing ECMAScript value conversion,
including edge cases such as NaNs, Infinities, etc. These attributes hang off
a TypeConversions object created via window.internals.typeConversions().

Test: fast/js/webidl-type-mapping.html

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.vcproj/WebCoreTestSupport.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* testing/Internals.cpp:
(WebCore::Internals::typeConversions):
(WebCore):
* testing/Internals.h:
(WebCore):
* testing/Internals.idl:
* testing/TypeConversions.h: Added.
(WebCore):
(TypeConversions):
(WebCore::TypeConversions::create):
(WebCore::TypeConversions::testLong):
(WebCore::TypeConversions::setTestLong):
(WebCore::TypeConversions::testUnsignedLong):
(WebCore::TypeConversions::setTestUnsignedLong):
(WebCore::TypeConversions::testLongLong):
(WebCore::TypeConversions::setTestLongLong):
(WebCore::TypeConversions::testUnsignedLongLong):
(WebCore::TypeConversions::setTestUnsignedLongLong):
(WebCore::TypeConversions::TypeConversions):
* testing/TypeConversions.idl: Added.

LayoutTests:

This currently fails long long conversions of non-finites (which should map to 0). Patch
in progress at: http://wkbug.com/96798

* fast/js/webidl-type-mapping-expected.txt: Added.
* fast/js/webidl-type-mapping.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Enable Input Focus when handling touch events for JS
https://bugs.webkit.org/show_bug.cgi?id=106109

Reviewed by Yong Li.

PR 273325.

Toggle input mode active when a touch event is
received for JS processing to ensure state
is updated even when event is consumed.

Reviewed Internally by Gen Mak.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::touchEvent):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Vertical writing mode can overflow fixed size grandparent container
https://bugs.webkit.org/show_bug.cgi?id=93655

Reviewed by David Hyatt.

Source/WebCore:

Add a hook to RenderBox::availableHeight to exclude the containing block's
margin, border and padding. This is for auto-sizing perpendicular writing modes
to restrict to the minimum of the fill-available height and the viewport height.

This will be used in a future patch to implement "height: fill-available".

This behavior was recently specced in http://dev.w3.org/csswg/css3-sizing/#extrinsic-sizing.

Test: fast/writing-mode/auto-sizing-orthogonal-flows.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeight):
(WebCore::RenderBox::availableLogicalHeightUsing):
* rendering/RenderBox.h:
(RenderBox):
(WebCore::RenderBox::availableWidth):
(WebCore::RenderBox::availableHeight):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::computeIntrinsicRatioInformation):
* rendering/RenderView.cpp:
(WebCore::RenderView::availableLogicalHeight):
* rendering/RenderView.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight):

LayoutTests:

* fast/writing-mode/auto-sizing-orthogonal-flows-expected.txt: Added.
* fast/writing-mode/auto-sizing-orthogonal-flows.html: Added.
* fast/writing-mode/percentage-height-orthogonal-writing-modes-expected.txt:
* fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks-expected.txt:
* fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html:
* fast/writing-mode/percentage-height-orthogonal-writing-modes.html:
* fast/writing-mode/table-percent-width-quirk-expected.png:
* fast/writing-mode/table-percent-width-quirk-expected.txt:
This test now correctly uses the containing blocks's availableHeight instead of the
initial containing block's height to size the perpendicular child.
* platform/chromium-linux/fast/ruby/base-shorter-than-text-expected.txt:
* platform/chromium-linux/fast/table/038-vertical-expected.png:
* platform/chromium-linux/fast/table/border-collapsing/004-vertical-expected.png:
The extra wrapping in this test is just because we subtract the body's margin when
computing the available height. If you force the table's container 16px smaller,
you get the same rendering at tip of tree WebKit.
* platform/chromium-win/fast/table/038-vertical-expected.txt:
* platform/chromium-win/fast/table/border-collapsing/004-vertical-expected.txt:
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
Add tests that will need rebaseline once this patch lands.


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