vertical-align: middle causes overflow with subpixel layout
https://bugs.webkit.org/show_bug.cgi?id=91464

Reviewed by Eric Seidel.

Source/WebCore: 

Using vertical-align: middle in combination with an overflow value other
than visible can cause the overflow height to be computed incorrectly.

Test: fast/sub-pixel/vertical-align-middle-overflow.html

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::verticalPositionForBox):
Round verticalPosition after calculation instead of flooring the result
of the xHeight calculation. By flooring it the resulting value is in
effect rounded up which can cause the height of the box to grow by one.
By rounding the resulting value thevertical position is more accurate and
the off by one error is avoided.

LayoutTests: 

Add new test for vertical-align: middle and adjust existing results to
reflect the improved alignment calculation.

* fast/sub-pixel/vertical-align-middle-overflow-expected.txt: Added.
* fast/sub-pixel/vertical-align-middle-overflow.html: Added.
* platform/chromium-linux/css2.1/t100801-c544-valgn-03-d-agi-expected.png:
* platform/chromium-linux/css2.1/t100801-c544-valgn-03-d-agi-expected.txt:
* platform/chromium-linux/fast/inline-block/inline-block-vertical-align-expected.png:
* platform/chromium-linux/fast/inline/002-expected.png:
* platform/chromium-linux/fast/table/table-display-types-strict-expected.png:
* platform/chromium-linux/tables/mozilla/bugs/bug4527-expected.png:
* platform/chromium-mac-snowleopard/css2.1/t100801-c544-valgn-03-d-agi-expected.png:
* platform/chromium-mac-snowleopard/fast/block/basic/014-expected.png:
* platform/chromium-mac-snowleopard/fast/css/line-height-determined-by-primary-font-expected.png:
* platform/chromium-mac-snowleopard/fast/inline/002-expected.png:
* platform/chromium-mac-snowleopard/fast/table/table-display-types-strict-expected.png:
* platform/chromium-mac-snowleopard/fast/text/international/bidi-LDB-2-CSS-expected.png:
* platform/chromium-mac-snowleopard/fast/text/international/bidi-LDB-2-HTML-expected.png:
* platform/chromium-mac-snowleopard/fast/text/international/bidi-LDB-2-formatting-characters-expected.png:
* platform/chromium-mac-snowleopard/tables/mozilla/bugs/bug4527-expected.png:
* platform/chromium-mac/css1/text_properties/vertical_align-expected.txt:
* platform/chromium-mac/css2.1/t100801-c544-valgn-03-d-agi-expected.txt:
* platform/chromium-mac/fast/block/basic/014-expected.txt:
* platform/chromium-mac/fast/inline-block/inline-block-vertical-align-expected.txt:
* platform/chromium-mac/fast/text/international/bidi-LDB-2-CSS-expected.txt:
* platform/chromium-mac/fast/text/international/bidi-LDB-2-HTML-expected.txt:
* platform/chromium-mac/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
* platform/chromium-mac/tables/mozilla/bugs/bug4527-expected.txt:
* platform/chromium-win/css1/text_properties/vertical_align-expected.txt:
* platform/chromium-win/fast/block/basic/014-expected.txt:
* platform/chromium-win/fast/inline-block/inline-block-vertical-align-expected.txt:
* platform/chromium-win/fast/inline/002-expected.txt:
* platform/chromium-win/fast/table/table-display-types-strict-expected.txt:
* platform/chromium-win/tables/mozilla/bugs/bug4527-expected.txt:
* platform/mac/fast/inline/002-expected.txt:
* platform/mac/fast/replaced/008-expected.png:
* platform/mac/fast/table/table-display-types-strict-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Add intVersion to chromium/public/WebIDBMetadata.h
https://bugs.webkit.org/show_bug.cgi?id=91408

Reviewed by Adam Barth.

This is in support of the new upgradeneeded versioning api.
intVersion will eventually replace the WebString version member.

* public/WebIDBMetadata.h:
(WebIDBMetadata): The spec uses unsigned long long for version
numbers but we use int64_t here so that we can use -1 as a sentinel.
It indicates that a database still uses a string version.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] REGRESSION (r122651): fast/text/descent-clip-in-scaled-page.html fails
https://bugs.webkit.org/show_bug.cgi?id=91552

* platform/mac/TestExpectations: Mark the test as expected to fail.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r122215) - RenderObject::willRenderImage crashes on null view()
https://bugs.webkit.org/show_bug.cgi?id=91525

Reviewed by Julien Chaffraix.

Fix by doing an early out check.  This is intended to fix the crash in
http://crbug.com/137161.

No new test, because unfortunately a layout test is ill-suited to
reproing this kind of Document creation/destruction bug.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::willRenderImage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
nrwt: move the bulk of the "expected" output to printing.py
https://bugs.webkit.org/show_bug.cgi?id=91442

Reviewed by Ojan Vafai.

More printing-related refactoring. This moves all of the code
that prints the results we expect to get, but doesn't move a few
dangling printfs (those'll get hit in a later patch).

No functional changes; covered by existing tests.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._split_into_chunks_if_necessary):
(Manager.prepare_lists_and_print_output):
(Manager.print_config):
* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer.print_expected):
(Printer):
(Printer._print_expected_results_of_type):
(Printer._num_digits):
(Printer._print_expected):
* Scripts/webkitpy/layout_tests/views/printing_unittest.py:
(Testprinter.test_print_expected):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] REGRESSION(r122768, r122771): They broke jquery/data.html and inspector/elements/edit-dom-actions.html
https://bugs.webkit.org/show_bug.cgi?id=91476

Reviewed by Mark Hahnenberg.

The 32-bit repatching code was not correctly adapted to the new world where there may not always
be an available scratch register. Fixed it by ensuring that the scratch register we select does
not overlap with the value tag.

* dfg/DFGRepatch.cpp:
(JSC::DFG::generateProtoChainAccessStub):
(JSC::DFG::tryCacheGetByID):
(JSC::DFG::tryBuildGetByIDList):
(JSC::DFG::emitPutReplaceStub):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix regression in style checker introduced in r122868.
https://bugs.webkit.org/show_bug.cgi?id=91470

Unreviewed, build fix.

* Scripts/webkitpy/style/checkers/cpp.py:
(_FileState.__init__):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] REGRESSION (r122494): Running platform/mac/plugins/root-object-premature-delete-crash.html results in a crash
https://bugs.webkit.org/show_bug.cgi?id=91505

Skip this test so we don't see it in the results.

* platform/mac/Skipped:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, optimize baselines for fast/block/float/02[68].html .

* fast/block/float/026-expected.txt: Renamed from LayoutTests/platform/efl/fast/block/float/026-expected.txt.
* fast/block/float/028-expected.txt: Renamed from LayoutTests/platform/efl/fast/block/float/028-expected.txt.
* platform/chromium-mac-snowleopard/fast/block/float/026-expected.txt: Removed.
* platform/chromium-mac-snowleopard/fast/block/float/028-expected.txt: Removed.
* platform/gtk/fast/block/float/026-expected.txt: Removed.
* platform/gtk/fast/block/float/028-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
nrwt: clean up logging when we're only running one chunk of the tests
https://bugs.webkit.org/show_bug.cgi?id=91447

Reviewed by Ojan Vafai.

Apparently we were creating a 'tests_run.txt' in the results
directory if we were only running one chunk of the tests; after
3+ years of hacking on this code, that was news to me, so I'm
guessing no one uses this. I'm removing this, and changing the
_print_expected calls to debug messages to simplify the
layering.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._split_into_chunks_if_necessary):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix two mistakes I made when modifying TestExpectations.

Apparently the MAC modifier and the FAIL result don't do what I think they do.

* platform/mac/TestExpectations: Remove MAC and replace FAIL with IMAGE.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
nrwt: move config-specific logging to printing.py
https://bugs.webkit.org/show_bug.cgi?id=91450

Reviewed by Ojan Vafai.

More refactoring ... this moves the 'config' output to
printing.py.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._resize_shards):
(Manager._run_tests):
(Manager._upload_json_files):
* Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
(ManagerTest.get_options):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(run):
* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer.print_config):
(Printer.print_workers_and_shards):
(Printer._print_config):
* Scripts/webkitpy/layout_tests/views/printing_unittest.py:
(Testprinter.test_fallback_path_in_config):
(Testprinter.test_print_config):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add parsing and style application for css3-images image-orientation
https://bugs.webkit.org/show_bug.cgi?id=89624

Patch by David Barr <davidbarr@chromium.org> on 2012-07-17
Reviewed by Tony Chang.

The css3-images module is at candidate recommendation.
http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation

Source/WebCore:

Test: fast/css/image-orientation/image-orientation.html

* css/CSSComputedStyleDeclaration.cpp: Add computed style for image-orientation.
(WebCore): Add CSSPropertyImageOrientation to computedProperties.
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Map CSSPropertyImageOrientation using cast operator from PrimitiveValueMappings.
* css/CSSParser.cpp: Add parsing rule for image-orientation.
(WebCore::CSSParser::parseValue): Parse the value of CSSPropertyImageOrientation as an angle.
* css/CSSPrimitiveValueMappings.h: Add mappings between CSSPrimitiveValue and ImageOrientationEnum.
(WebCore): Add conditional include for ImageOrientation.h.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map the natural orientations to angles.
(WebCore::CSSPrimitiveValue::operator ImageOrientationEnum): Round angles away from zero to quarter turns and map to the natural orientations.
* css/CSSProperty.cpp: Add CSSPropertyImageOrientation.
(WebCore::CSSProperty::isInheritedProperty): Map CSSPropertyImageOrientation inherited.
* css/CSSPropertyNames.in: Add image-orientation.
* css/StyleBuilder.cpp: Add style application logic for CSSPropertyImageOrientation.
(WebCore::StyleBuilder::StyleBuilder): Map CSSPropertyImageOrientation to RenderStyle::imageOrientation with type ImageOrientationEnum.
* css/StyleResolver.cpp: Handle CSSPropertyImageOrientation.
(WebCore::StyleResolver::applyProperty): Expect CSSPropertyImageOrientation to be handled by StyleBuilder.
* rendering/style/RenderStyle.h: Add imageOrientation, setImageOrientation and initialImageOrientation.
* rendering/style/StyleRareInheritedData.cpp: Add m_imageOrientation.
(WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageOrientation to default and copy contructors.
(WebCore::StyleRareInheritedData::operator==): Include m_imageOrientation in comparison.
* rendering/style/StyleRareInheritedData.h: Add m_imageOrientation.
(StyleRareInheritedData): Add 4-bit field m_imageOrientation, mapping to ImageOrientationEnum.

LayoutTests:

* fast/css/image-orientation/image-orientation-expected.txt: Added.
* fast/css/image-orientation/image-orientation.html: Added.
* platform/chromium/TestExpectations: Skip tests until image-orientation implementation lands.
* platform/efl/TestExpectations: Skip tests until image-orientation implementation lands.
* platform/gtk/TestExpectations: Skip tests until image-orientation implementation lands.
* platform/mac/TestExpectations: Skip tests until image-orientation implementation lands.
* platform/qt/TestExpectations: Skip tests until image-orientation implementation lands.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Assertion failure/crash on Windows when using a font in an SVG
element with an unresaonbly large font size
https://bugs.webkit.org/show_bug.cgi?id=91273
Radar: <rdar://problem/8355401>

Source/WebCore:

Patch by Roger Fong <roger_fong@apple.com> on 2012-07-17
Reviewed by Tim Horton.

When using a font in an SVG element with an unreasonably large
font size in Windows, WebKit crashes. The problem has to do with
font sizes overflowing into negative values in the Windows specific code.
The fix is to cap the font sizes to something reasonable when the font style is getting processed.
The fix will apply to both CSS and SVG so that behaviour is consistent.

Test: svg/text/font-size-too-large-crash.svg

* css/StyleBuilder.cpp:
(WebCore::ApplyPropertyFontSize::applyValue):
This is where the font size capping now occurs. Caps size to 1000000.
Both CSS and SVG reach the font size capping code here.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
Capping here removed, moved to StyleBuilder.cpp.

LayoutTests:

Patch by Roger Fong <roger_fong@apple.com> on 2012-07-17
Reviewed by Tim Horton.

Test to make sure that having an overly large font size won't crash on Windows.

* svg/text/font-size-too-large-crash-expected.txt: Added.
* svg/text/font-size-too-large-crash.svg: Added.

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