Title: [177068] branches/safari-600.1.4.13-branch
- Revision
- 177068
- Author
- [email protected]
- Date
- 2014-12-10 09:05:10 -0800 (Wed, 10 Dec 2014)
Log Message
Merged r175197. rdar://problem/19132052
Modified Paths
Diff
Modified: branches/safari-600.1.4.13-branch/LayoutTests/ChangeLog (177067 => 177068)
--- branches/safari-600.1.4.13-branch/LayoutTests/ChangeLog 2014-12-10 17:02:48 UTC (rev 177067)
+++ branches/safari-600.1.4.13-branch/LayoutTests/ChangeLog 2014-12-10 17:05:10 UTC (rev 177068)
@@ -1,5 +1,26 @@
2014-12-10 Babak Shafiei <[email protected]>
+ Merge r175197.
+
+ 2014-10-24 Said Abou-Hallawa <[email protected]>
+
+ Clamp wordSpacing percentage value.
+ https://bugs.webkit.org/show_bug.cgi?id=129350.
+
+ Reviewed by Zalan Bujtas.
+
+ Make sure that setting the CSS style wordSpacing property to very huge percentage
+ value and blending this value with other values for animating key frames does
+ not assert or crash. The expectation is to have this huge value to be clamped to
+ the pre-defined min/max values for the CSS length type. So when blending the clamped
+ value with other wordSpacing values, the result can't be NaN. This should be very
+ similar to the case when it is set to a huge <length> value.
+
+ * css3/infinite-word-spacing-expected.txt: Added.
+ * css3/infinite-word-spacing.html: Added.
+
+2014-12-10 Babak Shafiei <[email protected]>
+
Merge r176295.
2014-11-18 David Hyatt <[email protected]>
Modified: branches/safari-600.1.4.13-branch/Source/WebCore/ChangeLog (177067 => 177068)
--- branches/safari-600.1.4.13-branch/Source/WebCore/ChangeLog 2014-12-10 17:02:48 UTC (rev 177067)
+++ branches/safari-600.1.4.13-branch/Source/WebCore/ChangeLog 2014-12-10 17:05:10 UTC (rev 177068)
@@ -1,5 +1,32 @@
2014-12-10 Babak Shafiei <[email protected]>
+ Merge r175197.
+
+ 2014-10-24 Said Abou-Hallawa <[email protected]>
+
+ Clamp wordSpacing percentage value.
+ https://bugs.webkit.org/show_bug.cgi?id=129350.
+
+ Reviewed by Zalan Bujtas.
+
+ When the CSS wordSpacing property is percentage, its value has to be within the
+ pre-defined min/max values for the CSS length type. This is done the same way
+ the wordSpacing of type <length> is handled.
+
+ Tests: css3/infinite-word-spacing.html.
+
+ Move the definitions of minValueForCssLength and maxValueForCssLength from the
+ .cpp file to the .h file.
+ * css/CSSPrimitiveValue.cpp:
+ * css/CSSPrimitiveValue.h:
+
+ Clamp the wordSpacing value to minValueForCssLength and maxValueForCssLength when
+ its type is percentage.
+ * css/DeprecatedStyleBuilder.cpp:
+ (WebCore::ApplyPropertyWordSpacing::applyValue):
+
+2014-12-10 Babak Shafiei <[email protected]>
+
Merge r176735.
2014-12-03 Dana Burkart <[email protected]>
Modified: branches/safari-600.1.4.13-branch/Source/WebCore/css/CSSPrimitiveValue.cpp (177067 => 177068)
--- branches/safari-600.1.4.13-branch/Source/WebCore/css/CSSPrimitiveValue.cpp 2014-12-10 17:02:48 UTC (rev 177067)
+++ branches/safari-600.1.4.13-branch/Source/WebCore/css/CSSPrimitiveValue.cpp 2014-12-10 17:05:10 UTC (rev 177068)
@@ -33,7 +33,6 @@
#include "Counter.h"
#include "ExceptionCode.h"
#include "Font.h"
-#include "LayoutUnit.h"
#include "Node.h"
#include "Pair.h"
#include "RGBColor.h"
@@ -55,11 +54,6 @@
namespace WebCore {
-// Max/min values for CSS, needs to slightly smaller/larger than the true max/min values to allow for rounding without overflowing.
-// Subtract two (rather than one) to allow for values to be converted to float and back without exceeding the LayoutUnit::max.
-const int maxValueForCssLength = INT_MAX / kFixedPointDenominator - 2;
-const int minValueForCssLength = INT_MIN / kFixedPointDenominator + 2;
-
static inline bool isValidCSSUnitTypeForDoubleConversion(CSSPrimitiveValue::UnitTypes unitType)
{
switch (unitType) {
Modified: branches/safari-600.1.4.13-branch/Source/WebCore/css/CSSPrimitiveValue.h (177067 => 177068)
--- branches/safari-600.1.4.13-branch/Source/WebCore/css/CSSPrimitiveValue.h 2014-12-10 17:02:48 UTC (rev 177067)
+++ branches/safari-600.1.4.13-branch/Source/WebCore/css/CSSPrimitiveValue.h 2014-12-10 17:05:10 UTC (rev 177068)
@@ -26,6 +26,7 @@
#include "CSSValue.h"
#include "CSSValueKeywords.h"
#include "Color.h"
+#include "LayoutUnit.h"
#include <wtf/Forward.h>
#include <wtf/MathExtras.h>
#include <wtf/PassRefPtr.h>
@@ -46,6 +47,11 @@
struct Length;
struct LengthSize;
+// Max/min values for CSS, needs to slightly smaller/larger than the true max/min values to allow for rounding without overflowing.
+// Subtract two (rather than one) to allow for values to be converted to float and back without exceeding the LayoutUnit::max.
+const int maxValueForCssLength = intMaxForLayoutUnit - 2;
+const int minValueForCssLength = intMinForLayoutUnit + 2;
+
// Dimension calculations are imprecise, often resulting in values of e.g.
// 44.99998. We need to go ahead and round if we're really close to the next
// integer value.
Modified: branches/safari-600.1.4.13-branch/Source/WebCore/css/DeprecatedStyleBuilder.cpp (177067 => 177068)
--- branches/safari-600.1.4.13-branch/Source/WebCore/css/DeprecatedStyleBuilder.cpp 2014-12-10 17:02:48 UTC (rev 177067)
+++ branches/safari-600.1.4.13-branch/Source/WebCore/css/DeprecatedStyleBuilder.cpp 2014-12-10 17:05:10 UTC (rev 177068)
@@ -1527,7 +1527,7 @@
else if (primitiveValue->isLength()) {
wordSpacing = primitiveValue->computeLength<Length>(csstoLengthConversionDataWithTextZoomFactor(*styleResolver));
} else if (primitiveValue->isPercentage())
- wordSpacing = Length(primitiveValue->getDoubleValue(), Percent);
+ wordSpacing = Length(clampTo<float>(primitiveValue->getDoubleValue(), minValueForCssLength, maxValueForCssLength), Percent);
else if (primitiveValue->isNumber())
wordSpacing = Length(primitiveValue->getDoubleValue(), Fixed);
else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes