% unit heights don't work if parent block height is set in vh
https://bugs.webkit.org/show_bug.cgi?id=118516

Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2013-12-04
Reviewed by Simon Fraser.

From Blink r156449 by <srinivasa.ragavan.venkateswaran@intel.com>

Source/WebCore:

An element having height as percentage needs to have the
containingblock's height or availableheight to calculate its
own height. The containing block having a height set in vh
unit was not being considered for calculating the child's
height.

Tests: fast/css/viewport-percentage-compute-box-height.html
       fast/css/viewport-percentage-compute-box-width.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePercentageLogicalHeight):
Correct child's height(in pecentage) was not being calculated
incase of parent having height set in vh unit. Added condition
to calculate the containing block height in terms of viewport size.

LayoutTests:

* fast/css/viewport-percentage-compute-box-height-expected.html: Added.
* fast/css/viewport-percentage-compute-box-height.html: Added.
* fast/css/viewport-percentage-compute-box-width-expected.html: Added.
* fast/css/viewport-percentage-compute-box-width.html: Added.
Added new tests for verifying that percentage unit height/width works
if parent block height/width is set in vh/vw units.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Test platform/mac/accessibility/search-predicate-element-count.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=125195

Reviewed by Chris Fleizach.

Our test checks for AccessibilityObject::isOnscreen which makes sure an element is currently scrolled to a visible
location onscreen. This test was flaky because sometimes elements we thought would be visible weren't. To resolve
this I've moved the elements that are tested for visibility to the very top of the document so they have a tiny
vertical offset and will ALWAYS be visible.

* platform/mac/TestExpectations:
* platform/mac/accessibility/search-predicate-element-count-expected.txt:
* platform/mac/accessibility/search-predicate-element-count.html:


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