Add parsing and style application for css3-images image-orientation
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2012 23:23:36 +0000 (23:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2012 23:23:36 +0000 (23:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=89624

Patch by David Barr <davidbarr@chromium.org> on 2012-07-17
Reviewed by Tony Chang.

The css3-images module is at candidate recommendation.
http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation

Source/WebCore:

Test: fast/css/image-orientation/image-orientation.html

* css/CSSComputedStyleDeclaration.cpp: Add computed style for image-orientation.
(WebCore): Add CSSPropertyImageOrientation to computedProperties.
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Map CSSPropertyImageOrientation using cast operator from PrimitiveValueMappings.
* css/CSSParser.cpp: Add parsing rule for image-orientation.
(WebCore::CSSParser::parseValue): Parse the value of CSSPropertyImageOrientation as an angle.
* css/CSSPrimitiveValueMappings.h: Add mappings between CSSPrimitiveValue and ImageOrientationEnum.
(WebCore): Add conditional include for ImageOrientation.h.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map the natural orientations to angles.
(WebCore::CSSPrimitiveValue::operator ImageOrientationEnum): Round angles away from zero to quarter turns and map to the natural orientations.
* css/CSSProperty.cpp: Add CSSPropertyImageOrientation.
(WebCore::CSSProperty::isInheritedProperty): Map CSSPropertyImageOrientation inherited.
* css/CSSPropertyNames.in: Add image-orientation.
* css/StyleBuilder.cpp: Add style application logic for CSSPropertyImageOrientation.
(WebCore::StyleBuilder::StyleBuilder): Map CSSPropertyImageOrientation to RenderStyle::imageOrientation with type ImageOrientationEnum.
* css/StyleResolver.cpp: Handle CSSPropertyImageOrientation.
(WebCore::StyleResolver::applyProperty): Expect CSSPropertyImageOrientation to be handled by StyleBuilder.
* rendering/style/RenderStyle.h: Add imageOrientation, setImageOrientation and initialImageOrientation.
* rendering/style/StyleRareInheritedData.cpp: Add m_imageOrientation.
(WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageOrientation to default and copy contructors.
(WebCore::StyleRareInheritedData::operator==): Include m_imageOrientation in comparison.
* rendering/style/StyleRareInheritedData.h: Add m_imageOrientation.
(StyleRareInheritedData): Add 4-bit field m_imageOrientation, mapping to ImageOrientationEnum.

LayoutTests:

* fast/css/image-orientation/image-orientation-expected.txt: Added.
* fast/css/image-orientation/image-orientation.html: Added.
* platform/chromium/TestExpectations: Skip tests until image-orientation implementation lands.
* platform/efl/TestExpectations: Skip tests until image-orientation implementation lands.
* platform/gtk/TestExpectations: Skip tests until image-orientation implementation lands.
* platform/mac/TestExpectations: Skip tests until image-orientation implementation lands.
* platform/qt/TestExpectations: Skip tests until image-orientation implementation lands.

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

19 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/image-orientation/image-orientation-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/image-orientation/image-orientation.html [new file with mode: 0644]
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/qt/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/StyleBuilder.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.h

index 18f9581..d1118b3 100644 (file)
@@ -1,3 +1,21 @@
+2012-07-17  David Barr  <davidbarr@chromium.org>
+
+        Add parsing and style application for css3-images image-orientation
+        https://bugs.webkit.org/show_bug.cgi?id=89624
+
+        Reviewed by Tony Chang.
+
+        The css3-images module is at candidate recommendation.
+        http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation
+
+        * fast/css/image-orientation/image-orientation-expected.txt: Added.
+        * fast/css/image-orientation/image-orientation.html: Added.
+        * platform/chromium/TestExpectations: Skip tests until image-orientation implementation lands.
+        * platform/efl/TestExpectations: Skip tests until image-orientation implementation lands.
+        * platform/gtk/TestExpectations: Skip tests until image-orientation implementation lands.
+        * platform/mac/TestExpectations: Skip tests until image-orientation implementation lands.
+        * platform/qt/TestExpectations: Skip tests until image-orientation implementation lands.
+
 2012-07-17  Andy Estes  <aestes@apple.com>
 
         Fix two mistakes I made when modifying TestExpectations.
diff --git a/LayoutTests/fast/css/image-orientation/image-orientation-expected.txt b/LayoutTests/fast/css/image-orientation/image-orientation-expected.txt
new file mode 100644 (file)
index 0000000..9a51384
--- /dev/null
@@ -0,0 +1,43 @@
+Apply image-resolution property and check computed style.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS p.style.cssText is "image-orientation: -360deg; "
+PASS getComputedStyle(p).imageOrientation is "0deg"
+PASS p.style.cssText is "image-orientation: -315deg; "
+PASS getComputedStyle(p).imageOrientation is "0deg"
+PASS p.style.cssText is "image-orientation: 0deg; "
+PASS getComputedStyle(p).imageOrientation is "0deg"
+PASS p.style.cssText is "image-orientation: 315deg; "
+PASS getComputedStyle(p).imageOrientation is "0deg"
+PASS p.style.cssText is "image-orientation: 360deg; "
+PASS getComputedStyle(p).imageOrientation is "0deg"
+PASS p.style.cssText is "image-orientation: -270deg; "
+PASS getComputedStyle(p).imageOrientation is "90deg"
+PASS p.style.cssText is "image-orientation: -225deg; "
+PASS getComputedStyle(p).imageOrientation is "90deg"
+PASS p.style.cssText is "image-orientation: 45deg; "
+PASS getComputedStyle(p).imageOrientation is "90deg"
+PASS p.style.cssText is "image-orientation: 90deg; "
+PASS getComputedStyle(p).imageOrientation is "90deg"
+PASS p.style.cssText is "image-orientation: -180deg; "
+PASS getComputedStyle(p).imageOrientation is "180deg"
+PASS p.style.cssText is "image-orientation: -135deg; "
+PASS getComputedStyle(p).imageOrientation is "180deg"
+PASS p.style.cssText is "image-orientation: 135deg; "
+PASS getComputedStyle(p).imageOrientation is "180deg"
+PASS p.style.cssText is "image-orientation: -180deg; "
+PASS getComputedStyle(p).imageOrientation is "180deg"
+PASS p.style.cssText is "image-orientation: -90deg; "
+PASS getComputedStyle(p).imageOrientation is "270deg"
+PASS p.style.cssText is "image-orientation: -45deg; "
+PASS getComputedStyle(p).imageOrientation is "270deg"
+PASS p.style.cssText is "image-orientation: 225deg; "
+PASS getComputedStyle(p).imageOrientation is "270deg"
+PASS p.style.cssText is "image-orientation: 270deg; "
+PASS getComputedStyle(p).imageOrientation is "270deg"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/css/image-orientation/image-orientation.html b/LayoutTests/fast/css/image-orientation/image-orientation.html
new file mode 100644 (file)
index 0000000..c627122
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style src="../../js/resources/js-test-style.css"></style>
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+description('Apply image-resolution property and check computed style.');
+
+var expectations = {
+    '0deg': ['-360deg', '-315deg', '0deg', '315deg', '360deg'],
+    '90deg': ['-270deg', '-225deg', '45deg', '90deg'],
+    '180deg': ['-180deg', '-135deg', '135deg', '-180deg'],
+    '270deg': ['-90deg', '-45deg', '225deg', '270deg']};
+
+var p = document.createElement('p');
+document.body.appendChild(p);
+for (expected in expectations) {
+    expectations[expected].forEach(function(test) {
+        p.style.imageOrientation = '';
+        p.style.imageOrientation = test;
+        shouldBe('p.style.cssText', '"image-orientation: ' + test + '; "');
+        shouldBe('getComputedStyle(p).imageOrientation', '"' + expected + '"');
+    });
+}
+document.body.removeChild(p);
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
index ae32586..aa22664 100644 (file)
@@ -159,6 +159,9 @@ BUGWK85580 SKIP : inspector/styles/variables = PASS
 // CSS image-resolution is not yet enabled.
 BUGWK85262 SKIP : fast/css/image-resolution = PASS
 
+// CSS image-orientation is not yet enabled.
+BUGWK89052 SKIP : fast/css/image-orientation = PASS
+
 // Chromium needs larger media files to test buffering this way.
 BUGWK88172 SKIP : http/tests/media/video-buffered.html = PASS
 
index ed3d78c..cfcfedb 100644 (file)
@@ -52,6 +52,9 @@ BUGWK85465 SKIP : css3/filters = TEXT
 // CSS image-resolution is not yet enabled.
 BUGWK85262 SKIP : fast/css/image-resolution = PASS
 
+// CSS image-orientation is not yet enabled.
+BUGWK89052 SKIP : fast/css/image-orientation = PASS
+
 // This test assumes we cannot play RTSP, but we can.
 BUGWKEFL SKIP : media/unsupported-rtsp.html = TIMEOUT
 
index 92f9af7..ae68658 100644 (file)
@@ -325,6 +325,9 @@ BUGWK85580 SKIP : inspector/styles/variables = PASS
 // CSS image-resolution is not yet enabled.
 BUGWK85262 SKIP : fast/css/image-resolution = PASS TEXT
 
+// CSS image-orientation is not yet enabled.
+BUGWK89052 SKIP : fast/css/image-orientation = PASS
+
 // No CORS support for media elements is implemented yet.
 BUGWKGTK SKIP : http/tests/security/video-cross-origin-readback.html = TEXT
 
index a1d955c..413c5d6 100644 (file)
@@ -19,6 +19,9 @@ BUGWK87908 SKIP : editing/undomanager = PASS
 // CSS image-resolution is not yet enabled.
 BUGWK85262 SKIP : fast/css/image-resolution = PASS
 
+// CSS image-orientation is not yet enabled.
+BUGWK89052 SKIP : fast/css/image-orientation = PASS
+
 // Our slow tests, in alphabetical order.
 BUGWK57672 : http/tests/local/fileapi/send-sliced-dragged-file.html = TEXT PASS
 
index da8f14a..0134de7 100644 (file)
@@ -82,6 +82,9 @@ BUGWK87908 SKIP : editing/undomanager = PASS
 // CSS image-resolution is not yet enabled.
 BUGWK85262 SKIP : fast/css/image-resolution = PASS
 
+// CSS image-orientation is not yet enabled.
+BUGWK89052 SKIP : fast/css/image-orientation = PASS
+
 // Needs rebaseline after bug 86441
 // failing new tests
 BUGWK86441 SKIP : fast/borders/border-antialiasing.html = IMAGE
index 82dde77..cbe22c7 100644 (file)
@@ -1,3 +1,38 @@
+2012-07-17  David Barr  <davidbarr@chromium.org>
+
+        Add parsing and style application for css3-images image-orientation
+        https://bugs.webkit.org/show_bug.cgi?id=89624
+
+        Reviewed by Tony Chang.
+
+        The css3-images module is at candidate recommendation.
+        http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-orientation
+
+        Test: fast/css/image-orientation/image-orientation.html
+
+        * css/CSSComputedStyleDeclaration.cpp: Add computed style for image-orientation.
+        (WebCore): Add CSSPropertyImageOrientation to computedProperties.
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Map CSSPropertyImageOrientation using cast operator from PrimitiveValueMappings.
+        * css/CSSParser.cpp: Add parsing rule for image-orientation.
+        (WebCore::CSSParser::parseValue): Parse the value of CSSPropertyImageOrientation as an angle.
+        * css/CSSPrimitiveValueMappings.h: Add mappings between CSSPrimitiveValue and ImageOrientationEnum.
+        (WebCore): Add conditional include for ImageOrientation.h.
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map the natural orientations to angles.
+        (WebCore::CSSPrimitiveValue::operator ImageOrientationEnum): Round angles away from zero to quarter turns and map to the natural orientations.
+        * css/CSSProperty.cpp: Add CSSPropertyImageOrientation.
+        (WebCore::CSSProperty::isInheritedProperty): Map CSSPropertyImageOrientation inherited.
+        * css/CSSPropertyNames.in: Add image-orientation.
+        * css/StyleBuilder.cpp: Add style application logic for CSSPropertyImageOrientation.
+        (WebCore::StyleBuilder::StyleBuilder): Map CSSPropertyImageOrientation to RenderStyle::imageOrientation with type ImageOrientationEnum.
+        * css/StyleResolver.cpp: Handle CSSPropertyImageOrientation.
+        (WebCore::StyleResolver::applyProperty): Expect CSSPropertyImageOrientation to be handled by StyleBuilder.
+        * rendering/style/RenderStyle.h: Add imageOrientation, setImageOrientation and initialImageOrientation.
+        * rendering/style/StyleRareInheritedData.cpp: Add m_imageOrientation.
+        (WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageOrientation to default and copy contructors.
+        (WebCore::StyleRareInheritedData::operator==): Include m_imageOrientation in comparison.
+        * rendering/style/StyleRareInheritedData.h: Add m_imageOrientation.
+        (StyleRareInheritedData): Add 4-bit field m_imageOrientation, mapping to ImageOrientationEnum.
+
 2012-07-17  Adrienne Walker  <enne@google.com>
 
         REGRESSION(r122215) - RenderObject::willRenderImage crashes on null view()
index 4d571cf..26615c5 100644 (file)
@@ -130,6 +130,9 @@ static const CSSPropertyID computedProperties[] = {
     CSSPropertyFontVariant,
     CSSPropertyFontWeight,
     CSSPropertyHeight,
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+    CSSPropertyImageOrientation,
+#endif
     CSSPropertyImageRendering,
 #if ENABLE(CSS_IMAGE_RESOLUTION)
     CSSPropertyImageResolution,
@@ -1775,6 +1778,10 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
             if (style->borderFit() == BorderFitBorder)
                 return cssValuePool().createIdentifierValue(CSSValueBorder);
             return cssValuePool().createIdentifierValue(CSSValueLines);
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+        case CSSPropertyImageOrientation:
+            return cssValuePool().createValue(style->imageOrientation());
+#endif
         case CSSPropertyImageRendering:
             return CSSPrimitiveValue::create(style->imageRendering());
 #if ENABLE(CSS_IMAGE_RESOLUTION)
index b1d0270..bf7d522 100644 (file)
@@ -2687,6 +2687,11 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
     case CSSPropertyWebkitWrap:
         return RuntimeEnabledFeatures::cssExclusionsEnabled() && parseShorthand(propId, webkitWrapShorthand(), important);
 #endif
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+    case CSSPropertyImageOrientation:
+        validPrimitive = !id && validUnit(value, FAngle);
+        break;
+#endif
 #if ENABLE(CSS_IMAGE_RESOLUTION)
     case CSSPropertyImageResolution:
         parsedValue = parseImageResolution(m_valueList.get());
index 4855ec3..a370112 100644 (file)
@@ -37,6 +37,9 @@
 #include "FontDescription.h"
 #include "FontSmoothingMode.h"
 #include "GraphicsTypes.h"
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+#include "ImageOrientation.h"
+#endif
 #include "Length.h"
 #include "LineClampValue.h"
 #include "Path.h"
@@ -4108,6 +4111,55 @@ template<> inline CSSPrimitiveValue::operator EVectorEffect() const
 
 #endif // ENABLE(SVG)
 
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ImageOrientationEnum e)
+    : CSSValue(PrimitiveClass)
+{
+    m_primitiveUnitType = CSS_DEG;
+    switch (e) {
+    case OriginTopLeft:
+        m_value.num = 0;
+        break;
+    case OriginRightTop:
+        m_value.num = 90;
+        break;
+    case OriginBottomRight:
+        m_value.num = 180;
+        break;
+    case OriginLeftBottom:
+        m_value.num = 270;
+        break;
+    case OriginTopRight:
+    case OriginLeftTop:
+    case OriginBottomLeft:
+    case OriginRightBottom:
+        ASSERT_NOT_REACHED();
+    }
+}
+
+template<> inline CSSPrimitiveValue::operator ImageOrientationEnum() const
+{
+    ASSERT(isAngle());
+    double quarters = 4 * getDoubleValue(CSS_TURN);
+    int orientation = 3 & static_cast<int>(quarters < 0 ? floor(quarters) : ceil(quarters));
+    switch (orientation) {
+    case 0:
+        return OriginTopLeft;
+    case 1:
+        return OriginRightTop;
+    case 2:
+        return OriginBottomRight;
+    case 3:
+        return OriginLeftBottom;
+    default:
+        ASSERT_NOT_REACHED();
+        return OriginTopLeft;
+    }
+}
+
+#endif // ENABLE(CSS_IMAGE_ORIENTATION)
+
 }
 
 #endif
index 76cc8ea..8c82dc6 100644 (file)
@@ -282,6 +282,9 @@ bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID)
     case CSSPropertyFontStyle:
     case CSSPropertyFontVariant:
     case CSSPropertyFontWeight:
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+    case CSSPropertyImageOrientation:
+#endif
     case CSSPropertyImageRendering:
 #if ENABLE(CSS_IMAGE_RESOLUTION)
     case CSSPropertyImageResolution:
index 8d44f98..547907e 100644 (file)
@@ -103,6 +103,9 @@ empty-cells
 float
 font-stretch
 height
+#if defined(ENABLE_CSS_IMAGE_ORIENTATION) && ENABLE_CSS_IMAGE_ORIENTATION
+image-orientation
+#endif
 image-rendering
 #if defined(ENABLE_CSS_IMAGE_RESOLUTION) && ENABLE_CSS_IMAGE_RESOLUTION
 image-resolution
index 44ec87f..0b4f3e9 100644 (file)
@@ -1880,6 +1880,9 @@ StyleBuilder::StyleBuilder()
     setPropertyHandler(CSSPropertyFontVariant, ApplyPropertyFont<FontSmallCaps, &FontDescription::smallCaps, &FontDescription::setSmallCaps, FontSmallCapsOff>::createHandler());
     setPropertyHandler(CSSPropertyFontWeight, ApplyPropertyFontWeight::createHandler());
     setPropertyHandler(CSSPropertyHeight, ApplyPropertyLength<&RenderStyle::height, &RenderStyle::setHeight, &RenderStyle::initialSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicDisabled, NoneDisabled, UndefinedDisabled>::createHandler());
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+    setPropertyHandler(CSSPropertyImageOrientation, ApplyPropertyDefault<ImageOrientationEnum, &RenderStyle::imageOrientation, ImageOrientationEnum, &RenderStyle::setImageOrientation, ImageOrientationEnum, &RenderStyle::initialImageOrientation>::createHandler());
+#endif
     setPropertyHandler(CSSPropertyImageRendering, ApplyPropertyDefault<EImageRendering, &RenderStyle::imageRendering, EImageRendering, &RenderStyle::setImageRendering, EImageRendering, &RenderStyle::initialImageRendering>::createHandler());
 #if ENABLE(CSS_IMAGE_RESOLUTION)
     setPropertyHandler(CSSPropertyImageResolution, ApplyPropertyImageResolution::createHandler());
index aedb199..6ba1033 100644 (file)
@@ -4169,6 +4169,9 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
     case CSSPropertyFontVariant:
     case CSSPropertyFontWeight:
     case CSSPropertyHeight:
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+    case CSSPropertyImageOrientation:
+#endif
     case CSSPropertyImageRendering:
 #if ENABLE(CSS_IMAGE_RESOLUTION)
     case CSSPropertyImageResolution:
index bb4b269..5e8a12c 100644 (file)
@@ -963,6 +963,10 @@ public:
     bool isFlippedLinesWritingMode() const { return writingMode() == LeftToRightWritingMode || writingMode() == BottomToTopWritingMode; }
     bool isFlippedBlocksWritingMode() const { return writingMode() == RightToLeftWritingMode || writingMode() == BottomToTopWritingMode; }
 
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+    ImageOrientationEnum imageOrientation() const { return static_cast<ImageOrientationEnum>(rareInheritedData->m_imageOrientation); }
+#endif
+
     EImageRendering imageRendering() const { return static_cast<EImageRendering>(rareInheritedData->m_imageRendering); }
 
 #if ENABLE(CSS_IMAGE_RESOLUTION)
@@ -1135,6 +1139,11 @@ public:
     bool setZoom(float);
     void setZoomWithoutReturnValue(float f) { setZoom(f); }
     bool setEffectiveZoom(float);
+
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+    void setImageOrientation(ImageOrientationEnum v) { SET_VAR(rareInheritedData, m_imageOrientation, static_cast<int>(v)) }
+#endif
+
     void setImageRendering(EImageRendering v) { SET_VAR(rareInheritedData, m_imageRendering, v) }
 
 #if ENABLE(CSS_IMAGE_RESOLUTION)
@@ -1658,6 +1667,7 @@ public:
     static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom; }
     static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmphasisPositionOver; }
     static LineBoxContain initialLineBoxContain() { return LineBoxContainBlock | LineBoxContainInline | LineBoxContainReplaced; }
+    static ImageOrientationEnum initialImageOrientation() { return OriginTopLeft; }
     static EImageRendering initialImageRendering() { return ImageRenderingAuto; }
     static ImageResolutionSource initialImageResolutionSource() { return ImageResolutionSpecified; }
     static ImageResolutionSnap initialImageResolutionSnap() { return ImageResolutionNoSnap; }
index e8a5433..97de42d 100644 (file)
@@ -81,6 +81,9 @@ StyleRareInheritedData::StyleRareInheritedData()
     , textEmphasisMark(TextEmphasisMarkNone)
     , textEmphasisPosition(TextEmphasisPositionOver)
     , m_lineBoxContain(RenderStyle::initialLineBoxContain())
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+    , m_imageOrientation(RenderStyle::initialImageOrientation())
+#endif
     , m_imageRendering(RenderStyle::initialImageRendering())
     , m_lineSnap(RenderStyle::initialLineSnap())
     , m_lineAlign(RenderStyle::initialLineAlign())
@@ -140,6 +143,9 @@ StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
     , textEmphasisMark(o.textEmphasisMark)
     , textEmphasisPosition(o.textEmphasisPosition)
     , m_lineBoxContain(o.m_lineBoxContain)
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+    , m_imageOrientation(o.m_imageOrientation)
+#endif
     , m_imageRendering(o.m_imageRendering)
     , m_lineSnap(o.m_lineSnap)
     , m_lineAlign(o.m_lineAlign)
@@ -230,6 +236,9 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
         && QuotesData::equal(quotes.get(), o.quotes.get())
         && m_tabSize == o.m_tabSize
         && m_lineGrid == o.m_lineGrid
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+        && m_imageOrientation == o.m_imageOrientation
+#endif
         && m_imageRendering == o.m_imageRendering
 #if ENABLE(CSS_IMAGE_RESOLUTION)
         && m_imageResolutionSource == o.m_imageResolutionSource
index 93908e4..b30982d 100644 (file)
@@ -95,6 +95,9 @@ public:
     unsigned textEmphasisPosition : 1; // TextEmphasisPosition
     unsigned m_lineBoxContain: 7; // LineBoxContain
     // CSS Image Values Level 3
+#if ENABLE(CSS_IMAGE_ORIENTATION)
+    unsigned m_imageOrientation : 4; // ImageOrientationEnum
+#endif
     unsigned m_imageRendering : 2; // EImageRendering
     unsigned m_lineSnap : 2; // LineSnap
     unsigned m_lineAlign : 1; // LineAlign