Diff
Modified: trunk/LayoutTests/ChangeLog (91285 => 91286)
--- trunk/LayoutTests/ChangeLog 2011-07-19 19:25:30 UTC (rev 91285)
+++ trunk/LayoutTests/ChangeLog 2011-07-19 19:32:00 UTC (rev 91286)
@@ -1,5 +1,16 @@
2011-07-19 Mihnea Ovidenie <[email protected]>
+ [CSSRegions]Parse -webkit-region-overflow property
+ https://bugs.webkit.org/show_bug.cgi?id=64444
+
+ Reviewed by David Hyatt.
+
+ * fast/regions/script-tests/webkit-region-overflow-parsing.js: Added.
+ * fast/regions/webkit-region-overflow-parsing-expected.txt: Added.
+ * fast/regions/webkit-region-overflow-parsing.html: Added.
+
+2011-07-19 Mihnea Ovidenie <[email protected]>
+
hover then un-hover makes state change
https://bugs.webkit.org/show_bug.cgi?id=56401
Added: trunk/LayoutTests/fast/regions/script-tests/webkit-region-overflow-parsing.js (0 => 91286)
--- trunk/LayoutTests/fast/regions/script-tests/webkit-region-overflow-parsing.js (rev 0)
+++ trunk/LayoutTests/fast/regions/script-tests/webkit-region-overflow-parsing.js 2011-07-19 19:32:00 UTC (rev 91286)
@@ -0,0 +1,39 @@
+description('Tests parsing of webkit-region-overflow property');
+
+var webkitRegionOverflowProperty = "-webkit-region-overflow";
+
+function testCSSText(declaration) {
+ var div = document.createElement("div");
+ div.setAttribute("style", declaration);
+ return div.style.webkitRegionOverflow;
+}
+
+function testComputedStyle(declaration) {
+ var div = document.createElement("div");
+ document.body.appendChild(div);
+ div.style.setProperty(webkitRegionOverflowProperty, declaration);
+
+ var contentComputedValue = getComputedStyle(div).getPropertyValue(webkitRegionOverflowProperty);
+ document.body.removeChild(div);
+ return contentComputedValue;
+}
+
+shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': auto")', "auto");
+shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': initial")', "initial");
+shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': inherit")', "inherit");
+shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': -webkit-break")', "-webkit-break");
+shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': 0")', "");
+shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': -1")', "");
+shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': 12.5")', "");
+shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': 1px")', "");
+
+shouldBeEqualToString('testComputedStyle("auto")', "auto");
+shouldBeEqualToString('testComputedStyle("initial")', "auto");
+shouldBeEqualToString('testComputedStyle("inherit")', "auto");
+shouldBeEqualToString('testComputedStyle("-webkit-break")', "-webkit-break");
+shouldBeEqualToString('testComputedStyle("0")', "auto");
+shouldBeEqualToString('testComputedStyle("-1")', "auto");
+shouldBeEqualToString('testComputedStyle("12.5")', "auto");
+shouldBeEqualToString('testComputedStyle("1px")', "auto");
+
+successfullyParsed = true;
Added: trunk/LayoutTests/fast/regions/webkit-region-overflow-parsing-expected.txt (0 => 91286)
--- trunk/LayoutTests/fast/regions/webkit-region-overflow-parsing-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/regions/webkit-region-overflow-parsing-expected.txt 2011-07-19 19:32:00 UTC (rev 91286)
@@ -0,0 +1,25 @@
+Tests parsing of webkit-region-overflow property
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS testCSSText("-webkit-region-overflow: auto") is "auto"
+PASS testCSSText("-webkit-region-overflow: initial") is "initial"
+PASS testCSSText("-webkit-region-overflow: inherit") is "inherit"
+PASS testCSSText("-webkit-region-overflow: -webkit-break") is "-webkit-break"
+PASS testCSSText("-webkit-region-overflow: 0") is ""
+PASS testCSSText("-webkit-region-overflow: -1") is ""
+PASS testCSSText("-webkit-region-overflow: 12.5") is ""
+PASS testCSSText("-webkit-region-overflow: 1px") is ""
+PASS testComputedStyle("auto") is "auto"
+PASS testComputedStyle("initial") is "auto"
+PASS testComputedStyle("inherit") is "auto"
+PASS testComputedStyle("-webkit-break") is "-webkit-break"
+PASS testComputedStyle("0") is "auto"
+PASS testComputedStyle("-1") is "auto"
+PASS testComputedStyle("12.5") is "auto"
+PASS testComputedStyle("1px") is "auto"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/regions/webkit-region-overflow-parsing.html (0 => 91286)
--- trunk/LayoutTests/fast/regions/webkit-region-overflow-parsing.html (rev 0)
+++ trunk/LayoutTests/fast/regions/webkit-region-overflow-parsing.html 2011-07-19 19:32:00 UTC (rev 91286)
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href=""
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src=""
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (91285 => 91286)
--- trunk/Source/WebCore/ChangeLog 2011-07-19 19:25:30 UTC (rev 91285)
+++ trunk/Source/WebCore/ChangeLog 2011-07-19 19:32:00 UTC (rev 91286)
@@ -1,5 +1,37 @@
2011-07-19 Mihnea Ovidenie <[email protected]>
+ [CSSRegions]Parse -webkit-region-overflow property
+ https://bugs.webkit.org/show_bug.cgi?id=64444
+
+ Reviewed by David Hyatt.
+
+ Test: fast/regions/webkit-region-overflow-parsing.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator RegionOverflow):
+ * css/CSSPropertyNames.in:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ * css/CSSValueKeywords.in:
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::diff):
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::regionOverflow):
+ (WebCore::InheritedFlags::setRegionOverflow):
+ (WebCore::InheritedFlags::initialRegionOverflow):
+ * rendering/style/RenderStyleConstants.h:
+ * rendering/style/StyleRareNonInheritedData.cpp:
+ (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+ (WebCore::StyleRareNonInheritedData::operator==):
+ * rendering/style/StyleRareNonInheritedData.h:
+
+2011-07-19 Mihnea Ovidenie <[email protected]>
+
hover then un-hover makes state change
https://bugs.webkit.org/show_bug.cgi?id=56401
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (91285 => 91286)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2011-07-19 19:25:30 UTC (rev 91285)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2011-07-19 19:32:00 UTC (rev 91286)
@@ -249,6 +249,7 @@
#if ENABLE(CSS_REGIONS)
, CSSPropertyWebkitFlow
, CSSPropertyWebkitContentOrder
+ , CSSPropertyWebkitRegionOverflow
#endif
#if ENABLE(SVG)
,
@@ -1670,6 +1671,8 @@
return primitiveValueCache->createValue(style->flowThread(), CSSPrimitiveValue::CSS_STRING);
case CSSPropertyWebkitContentOrder:
return primitiveValueCache->createValue(style->regionIndex(), CSSPrimitiveValue::CSS_NUMBER);
+ case CSSPropertyWebkitRegionOverflow:
+ return primitiveValueCache->createValue(style->regionOverflow());
#endif
/* Shorthand properties, currently not supported see bug 13658*/
case CSSPropertyBackground:
Modified: trunk/Source/WebCore/css/CSSParser.cpp (91285 => 91286)
--- trunk/Source/WebCore/css/CSSParser.cpp 2011-07-19 19:25:30 UTC (rev 91285)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2011-07-19 19:32:00 UTC (rev 91286)
@@ -1594,6 +1594,10 @@
case CSSPropertyWebkitContentOrder:
validPrimitive = validUnit(value, FInteger, m_strict);
break;
+ case CSSPropertyWebkitRegionOverflow:
+ if (id == CSSValueAuto || id == CSSValueWebkitBreak)
+ validPrimitive = true;
+ break;
#endif
case CSSPropertyWebkitUserDrag: // auto | none | element
if (id == CSSValueAuto || id == CSSValueNone || id == CSSValueElement)
Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (91285 => 91286)
--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2011-07-19 19:25:30 UTC (rev 91285)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2011-07-19 19:32:00 UTC (rev 91286)
@@ -1338,6 +1338,35 @@
}
}
+#if ENABLE(CSS_REGIONS)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(RegionOverflow e)
+ : m_type(CSS_IDENT)
+ , m_hasCachedCSSText(false)
+{
+ switch (e) {
+ case AutoRegionOverflow:
+ m_value.ident = CSSValueAuto;
+ break;
+ case BreakRegionOverflow:
+ m_value.ident = CSSValueWebkitBreak;
+ break;
+ }
+}
+
+template<> inline CSSPrimitiveValue::operator RegionOverflow() const
+{
+ switch (m_value.ident) {
+ case CSSValueAuto:
+ return AutoRegionOverflow;
+ case CSSValueWebkitBreak:
+ return BreakRegionOverflow;
+ default:
+ ASSERT_NOT_REACHED();
+ return AutoRegionOverflow;
+ }
+}
+#endif
+
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarqueeDirection e)
: m_type(CSS_IDENT)
, m_hasCachedCSSText(false)
Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (91285 => 91286)
--- trunk/Source/WebCore/css/CSSPropertyNames.in 2011-07-19 19:25:30 UTC (rev 91285)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in 2011-07-19 19:32:00 UTC (rev 91286)
@@ -329,6 +329,7 @@
#if defined(ENABLE_CSS_REGIONS) && ENABLE_CSS_REGIONS
-webkit-flow
-webkit-content-order
+-webkit-region-overflow
#endif
#if defined(ENABLE_CSS_EXCLUSIONS) && ENABLE_CSS_EXCLUSIONS
-webkit-wrap-shape
Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (91285 => 91286)
--- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-07-19 19:25:30 UTC (rev 91285)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-07-19 19:32:00 UTC (rev 91286)
@@ -4829,6 +4829,9 @@
HANDLE_INHERIT_AND_INITIAL(regionIndex, RegionIndex);
m_style->setRegionIndex(clampToInteger(primitiveValue->getDoubleValue()));
return;
+ case CSSPropertyWebkitRegionOverflow:
+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(regionOverflow, RegionOverflow);
+ return;
#endif
case CSSPropertyWebkitMarqueeDirection:
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marqueeDirection, MarqueeDirection)
Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (91285 => 91286)
--- trunk/Source/WebCore/css/CSSValueKeywords.in 2011-07-19 19:25:30 UTC (rev 91285)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in 2011-07-19 19:32:00 UTC (rev 91286)
@@ -816,3 +816,9 @@
nonzero
evenodd
#endif
+
+#if defined(ENABLE_CSS_REGIONS) && ENABLE_CSS_REGIONS
+// -webkit-region-overflow
+// auto
+-webkit-break
+#endif
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (91285 => 91286)
--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2011-07-19 19:25:30 UTC (rev 91285)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2011-07-19 19:32:00 UTC (rev 91286)
@@ -348,7 +348,8 @@
#if ENABLE(CSS_REGIONS)
if (rareNonInheritedData->m_flowThread != other->rareNonInheritedData->m_flowThread
|| rareNonInheritedData->m_regionThread != other->rareNonInheritedData->m_regionThread
- || rareNonInheritedData->m_regionIndex != other->rareNonInheritedData->m_regionIndex)
+ || rareNonInheritedData->m_regionIndex != other->rareNonInheritedData->m_regionIndex
+ || rareNonInheritedData->m_regionOverflow != other->rareNonInheritedData->m_regionOverflow)
return StyleDifferenceLayout;
#endif
if (rareNonInheritedData->m_deprecatedFlexibleBox.get() != other->rareNonInheritedData->m_deprecatedFlexibleBox.get()
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (91285 => 91286)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2011-07-19 19:25:30 UTC (rev 91285)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2011-07-19 19:32:00 UTC (rev 91286)
@@ -747,6 +747,7 @@
const AtomicString& flowThread() const { return rareNonInheritedData->m_flowThread; }
const AtomicString& regionThread() const { return rareNonInheritedData->m_regionThread; }
int regionIndex() const { return rareNonInheritedData->m_regionIndex; }
+ RegionOverflow regionOverflow() const { return rareNonInheritedData->m_regionOverflow; }
#endif
// Apple-specific property getter methods
@@ -1101,6 +1102,7 @@
void setFlowThread(const AtomicString& flowThread) { SET_VAR(rareNonInheritedData, m_flowThread, flowThread); }
void setRegionThread(const AtomicString& regionThread) { SET_VAR(rareNonInheritedData, m_regionThread, regionThread); }
void setRegionIndex(int regionIndex) { SET_VAR(rareNonInheritedData, m_regionIndex, regionIndex); }
+ void setRegionOverflow(RegionOverflow regionOverflow) { SET_VAR(rareNonInheritedData, m_regionOverflow, regionOverflow); }
#endif
// Apple-specific property setters
@@ -1346,6 +1348,7 @@
static const AtomicString& initialFlowThread() { return nullAtom; }
static const AtomicString& initialRegionThread() { return nullAtom; }
static int initialRegionIndex() { return 0; }
+ static RegionOverflow initialRegionOverflow() { return AutoRegionOverflow; }
#endif
// Keep these at the end.
Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (91285 => 91286)
--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2011-07-19 19:25:30 UTC (rev 91285)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2011-07-19 19:32:00 UTC (rev 91286)
@@ -435,6 +435,10 @@
enum Order { LogicalOrder = 0, VisualOrder };
+#if ENABLE(CSS_REGIONS)
+enum RegionOverflow { AutoRegionOverflow, BreakRegionOverflow };
+#endif
+
} // namespace WebCore
#endif // RenderStyleConstants_h
Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (91285 => 91286)
--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2011-07-19 19:25:30 UTC (rev 91285)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2011-07-19 19:32:00 UTC (rev 91286)
@@ -59,6 +59,7 @@
, m_flowThread(RenderStyle::initialFlowThread())
, m_regionThread(RenderStyle::initialRegionThread())
, m_regionIndex(RenderStyle::initialRegionIndex())
+ , m_regionOverflow(RenderStyle::initialRegionOverflow())
#endif
#if ENABLE(CSS_EXCLUSIONS)
, m_wrapShape(RenderStyle::initialWrapShape())
@@ -106,6 +107,7 @@
, m_flowThread(o.m_flowThread)
, m_regionThread(o.m_regionThread)
, m_regionIndex(o.m_regionIndex)
+ , m_regionOverflow(o.m_regionOverflow)
#endif
#if ENABLE(CSS_EXCLUSIONS)
, m_wrapShape(o.m_wrapShape)
@@ -160,6 +162,7 @@
&& (m_flowThread == o.m_flowThread)
&& (m_regionThread == o.m_regionThread)
&& (m_regionIndex == o.m_regionIndex)
+ && (m_regionOverflow == o.m_regionOverflow)
#endif
#if ENABLE(CSS_EXCLUSIONS)
&& (m_wrapShape == o.m_wrapShape)
Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h (91285 => 91286)
--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h 2011-07-19 19:25:30 UTC (rev 91285)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h 2011-07-19 19:32:00 UTC (rev 91286)
@@ -136,6 +136,7 @@
AtomicString m_flowThread;
AtomicString m_regionThread;
int m_regionIndex;
+ RegionOverflow m_regionOverflow;
#endif
#if ENABLE(CSS_EXCLUSIONS)