Title: [209137] trunk/Source/WebCore
- Revision
- 209137
- Author
- [email protected]
- Date
- 2016-11-30 10:42:14 -0800 (Wed, 30 Nov 2016)
Log Message
[CSS Parser] Fix crash in -webkit-shape-outside parsing
https://bugs.webkit.org/show_bug.cgi?id=165202
Reviewed by Dean Jackson.
* css/CSSBasicShapes.cpp:
(WebCore::buildSerializablePositionOffset):
The old parser never passed in a singleton value ID for top/right/bottom/left.
The new parser does, and it exposed a bug in the serialization code for
shapes that didn't properly create the offset primitive value as a percentage
in those cases.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (209136 => 209137)
--- trunk/Source/WebCore/ChangeLog 2016-11-30 18:30:47 UTC (rev 209136)
+++ trunk/Source/WebCore/ChangeLog 2016-11-30 18:42:14 UTC (rev 209137)
@@ -1,3 +1,17 @@
+2016-11-30 Dave Hyatt <[email protected]>
+
+ [CSS Parser] Fix crash in -webkit-shape-outside parsing
+ https://bugs.webkit.org/show_bug.cgi?id=165202
+
+ Reviewed by Dean Jackson.
+
+ * css/CSSBasicShapes.cpp:
+ (WebCore::buildSerializablePositionOffset):
+ The old parser never passed in a singleton value ID for top/right/bottom/left.
+ The new parser does, and it exposed a bug in the serialization code for
+ shapes that didn't properly create the offset primitive value as a percentage
+ in those cases.
+
2016-11-30 Carlos Garcia Campos <[email protected]>
[GLIB] IndexedDB: Switch to use new encoder for IDBKeyData
Modified: trunk/Source/WebCore/css/CSSBasicShapes.cpp (209136 => 209137)
--- trunk/Source/WebCore/css/CSSBasicShapes.cpp 2016-11-30 18:30:47 UTC (rev 209136)
+++ trunk/Source/WebCore/css/CSSBasicShapes.cpp 2016-11-30 18:42:14 UTC (rev 209137)
@@ -67,10 +67,12 @@
amount = offset;
auto& cssValuePool = CSSValuePool::singleton();
- if (side == CSSValueCenter) {
+ if (!amount)
+ amount = cssValuePool.createValue(Length(side == CSSValueCenter ? 50 : 0, Percent));
+
+ if (side == CSSValueCenter)
side = defaultSide;
- amount = cssValuePool.createValue(Length(50, Percent));
- } else if ((side == CSSValueRight || side == CSSValueBottom)
+ else if ((side == CSSValueRight || side == CSSValueBottom)
&& amount->isPercentage()) {
side = defaultSide;
amount = cssValuePool.createValue(Length(100 - amount->floatValue(), Percent));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes