[CSS Grid Layout] Interaction between auto-placement and column / row spanning
https://bugs.webkit.org/show_bug.cgi?id=110633

Reviewed by Sergio Villar Senin.

Source/WebCore:
Modify auto-placement algorithm in order to support span in both
definite and automatic positions.

This patch fixes examples like:
grid-row: auto;
grid-column: 2 / span 3;

And also:
grid-row: auto;
grid-column: span 3;

Tests: fast/css-grid-layout/grid-item-auto-placement-automatic-span.html
       fast/css-grid-layout/grid-item-auto-placement-definite-span.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::isEmptyAreaEnough): New method that
checks if a grid area is or not empty.
(WebCore::RenderGrid::GridIterator::nextEmptyGridArea): Updated method
that now receives two arguments with the span value in both directions.
(WebCore::RenderGrid::ensureGridSize): Renamed from gridRow(). Adapted
method to grow in both directions at the same time if needed. It ensures
that the grid is big enough to insert a new item.
(WebCore::RenderGrid::insertItemIntoGrid): Only leave the method that
receives a GridCoordinate. It uses ensureGridSize() before inserting the
item in the grid.
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ensure that
the grid is big enough to place the largest span for auto-positioned
items.
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
New method that returns a GridCoordinate outside current grid with the
requested dimensions.
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Adapted
method to calculate the item's span and use the new version of
nextEmptyGridArea(). If an empty area is not found it uses
createEmptyGridAreaAtSpecifiedPositionsOutsideGrid() to place the item.
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Ditto.
(WebCore::RenderGrid::growGrid): Renamed to ensureGridSize().
* rendering/RenderGrid.h: Modify methods headers and add new method
signature.
* rendering/style/GridCoordinate.h:
(WebCore::GridSpan::integerSpan): Add new simple method to return the
span value of a position.
* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
Implement method to take into account span in auto-placement algorithm.
(WebCore::GridResolvedPosition::adjustGridPositionsFromStyle): Add new
checks related with named grid line spans in auto-positioned items,
which is not allowed according to the spec.
* rendering/style/GridResolvedPosition.h: Update method header.

LayoutTests:
Add new specific test cases for span in auto-placement algorithm.

* fast/css-grid-layout/grid-item-auto-placement-automatic-span-expected.txt: Added.
* fast/css-grid-layout/grid-item-auto-placement-automatic-span.html: Added.
* fast/css-grid-layout/grid-item-auto-placement-definite-span-expected.txt: Added.
* fast/css-grid-layout/grid-item-auto-placement-definite-span.html: Added.
* fast/css-grid-layout/grid-item-spanning-resolution.html: Update test
case now that span in auto-positioned items is supported.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Set cliprect radius unconditionally in RenderLayer.
https://bugs.webkit.org/show_bug.cgi?id=134396

Reviewed by Simon Fraser.

No change in functionality.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
removeCodedFrames should modify ref to TrackBuffer no a copy.
https://bugs.webkit.org/show_bug.cgi?id=134380

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-06-27
Reviewed by Daniel Bates.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::removeCodedFrames):
Iterate with a reference.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
XHR should keep attributes on instance
https://bugs.webkit.org/show_bug.cgi?id=134363

Reviewed by Sam Weinig.


Source/WebCore: 
Test: js/dom/xhr-prototype-define-property.html

Having them on the prototype broke some sites due to the fact that these DOM attributes are currently 
not configurable. Once we make them configurable, we can move XHR attributes back to the prototype.

* bindings/scripts/CodeGeneratorJS.pm:
(InterfaceRequiresAttributesOnInstanceForCompatibility):

LayoutTests: 
Added a new test for defining properties on XHR prototype.

* js/dom/xhr-prototype-define-property-expected.txt: Added.
* js/dom/xhr-prototype-define-property.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MSE] media/media-source/media-source-tracks.html is crashy
https://bugs.webkit.org/show_bug.cgi?id=134385

Reviewed by Eric Carlson.

Fix the refactoring error (self assignment) introduced by r170488.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ARMv7] Skip one particularly expensive fastFree() alignment check.
<https://webkit.org/b/134402>

The size class alignment check in fastFree() was crazy expensive on ARMv7
due to its use of modulo. Disabling it shaves 470ms off of PLT main thread
time in the web process.

Note that this was very hard to identify in profiles due to TCO.

Reviewed by Gavin Barraclough.

* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):

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

Rebaseline tests after r170207, r170249, r170304, r170418 and r170433.
Update expectations for new crashing tests.

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-06-27

* platform/gtk/TestExpectations: Report and mark new crashing tests. Adjust some tests expectations.
* platform/gtk/fast/canvas/canvas-blend-image-expected.txt: Rebaseline after r170433.
* platform/gtk/fast/canvas/canvas-blend-solid-expected.txt: Rebaseline after r170433.
* platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt: Rebaseline after r170249.
* platform/gtk/fast/dynamic/text-combine-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/multicol/pagination/RightToLeft-rl-dynamic-expected.txt: Added. Add baseline after r170304.
* platform/gtk/fast/regions/repaint/japanese-rl-selection-repaint-in-regions-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/repaint/japanese-rl-selection-clear-expected.txt: Added. Rebaseline after r170418.
* platform/gtk/fast/repaint/japanese-rl-selection-repaint-expected.txt: Added. Rebaseline after r170418.
* platform/gtk/fast/text/decorations-with-text-combine-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/text/emphasis-vertical-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/text/international/002-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/text/international/text-combine-image-test-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/text/international/text-spliced-font-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/text/international/wrap-CJK-001-expected.txt: Added. Rebaseline after r170418.
* platform/gtk/fast/text/khmer-lao-font-expected.txt: Added. Add baseline after r170207.
* platform/gtk/fast/writing-mode/border-vertical-lr-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/writing-mode/japanese-lr-selection-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/writing-mode/japanese-lr-text-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/writing-mode/japanese-rl-selection-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/writing-mode/japanese-rl-text-expected.txt: Rebaseline after r170418.
* platform/gtk/svg/W3C-SVG-1.1/filters-blend-01-b-expected.txt: Added. Rebaseline after r170433.
* platform/gtk/svg/filters/feBlend-all-blendmodes-expected.txt: Added. Add baseline after r170433.

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