ASSERTION FAILED: leftCategory != CalcOther && rightCategory != CalcOther
in WebCore::CSSCalcBinaryOperation::createSimplified
https://bugs.webkit.org/show_bug.cgi?id=132870

Source/WebCore:
According to the standard, calc() should be able to handle angle, time
and frequency values as well: http://www.w3.org/TR/css3-values/#calc

Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-05-13
Reviewed by Darin Adler.

Test: fast/css/calc-with-angle-time-frequency.html

* css/CSSCalculationValue.cpp:
(WebCore::unitCategory):
(WebCore::CSSCalcPrimitiveValue::createCalcExpression):
(WebCore::CSSCalcPrimitiveValue::computeLengthPx):
(WebCore::CSSCalcPrimitiveValue::addSubtractResult):
(WebCore::CSSCalcPrimitiveValue::determineCategory):
(WebCore::CSSCalcBinaryOperation::primitiveType)
* css/CSSCalculationValue.h: extending CalculationCategory
* css/CSSParser.cpp:
(WebCore::CSSParser::validCalculationUnit):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::primitiveType):

LayoutTests:
Added test contains calc() expressions with angle, time and frequency values,
covering all the newly introduced unit types, each of which used to fail.

Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-05-13
Reviewed by Darin Adler.

* fast/css/calc-with-angle-time-frequency-expected.txt: Added.
* fast/css/calc-with-angle-time-frequency.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Add basic tests for inset flows into regions
https://bugs.webkit.org/show_bug.cgi?id=132871

Reviewed by Mihnea Ovidenie.

* fast/regions/shape-outside-floats/regions-shape-outside-floats-inset-expected.html: Added.
* fast/regions/shape-outside-floats/regions-shape-outside-floats-inset.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSSION(r168528) Subpixel rendering: Selection rect is not positioned properly when SVG text is selected.
https://bugs.webkit.org/show_bug.cgi?id=132868

Reviewed by Dirk Schulze.

Scale the selection rect. r168528 missed applying this final transform on the selection/painting rect.

Source/WebCore:
Test: svg/text/hidpi-text-selection-rect-position.html

* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::selectionRectForTextFragment):

LayoutTests:
* svg/text/hidpi-text-selection-rect-position-expected.html: Added.
* svg/text/hidpi-text-selection-rect-position.html: Added.


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

Rebaseline affected tests after svg root element background repaint changes
introduced in r168674.

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2014-05-13

* platform/gtk/http/tests/misc/slow-loading-image-in-pattern-expected.txt:
* platform/gtk/svg/custom/circle-move-invalidation-expected.txt:
* platform/gtk/svg/custom/mouse-move-on-svg-container-expected.txt:
* platform/gtk/svg/custom/mouse-move-on-svg-container-standalone-expected.txt:
* platform/gtk/svg/custom/mouse-move-on-svg-root-expected.txt:
* platform/gtk/svg/custom/mouse-move-on-svg-root-standalone-expected.txt:
* platform/gtk/svg/custom/pattern-userSpaceOnUse-userToBaseTransform-expected.txt:
* platform/gtk/svg/custom/svg-float-border-padding-expected.txt:
* platform/gtk/svg/text/small-fonts-in-html5-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2 View Gestures (Swipe): Encode snapshots as JPEG on some platforms
https://bugs.webkit.org/show_bug.cgi?id=127788
<rdar://problem/15928241>

Reviewed by Anders Carlsson.

Allow JPEG snapshots. Compression is done asynchronously.
Enable JPEG snapshots (for now) on all PLATFORM(MAC).
We'll switch back to IOSurface snapshots on 10.9+ after <rdar://problem/16734031> is resolved.

* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Store the image size on the ViewSnapshot.
Move IOSurface-related code to ViewSnapshotStore.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Adopt asLayerContents().

* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::retrieveSnapshotForItem):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
Adopt asLayerContents().
Put the snapshot on the right layer (the parent of the snapshot image layer);
if it's on the snapshot image layer itself, if there is no image, the shadow
is displayed on top of the white placeholder.
Only reset snapshot purgeability if we're using IOSurface snapshots.

* UIProcess/mac/ViewSnapshotStore.h:
Add a bunch of macros to allow us to switch the snapshot backing store implementation.

* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::~ViewSnapshotStore):
(WebKit::ViewSnapshotStore::recordSnapshot):
If takeViewSnapshot() fails, don't remove the existing snapshot.

(WebKit::createIOSurfaceFromImage):
(WebKit::compressImageAsJPEG):
(WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost):
(WebKit::ViewSnapshotStore::didCompressSnapshot):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::asLayerContents):
Asynchronously compress snapshots - if we're using JPEG snapshots - for a
very large memory win (~20-30x).


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