Add from-image to css3-images image-resolution
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Jun 2012 23:30:29 +0000 (23:30 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Jun 2012 23:30:29 +0000 (23:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=85451

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

Source/WebCore:

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

No new tests; extended fast/css/image-resolution/image-resolution.html

* css/CSSParser.cpp: Accept from-image identifier in image-resolution property.
(WebCore::CSSParser::parseImageResolution): Map CSSValueFromImage to identifier value from cssValuePool.
* css/CSSValueKeywords.in: Add from-image.
* css/StyleBuilder.cpp: Extend ApplyPropertyImageResolution to apply RenderStyle::imageResolutionSource.
(WebCore::ApplyPropertyImageResolution::applyInheritValue): Apply RenderStyle::imageResolutionSource.
(WebCore::ApplyPropertyImageResolution::applyInitialValue): Apply RenderStyle::imageResolutionSource.
(WebCore::ApplyPropertyImageResolution::applyValue): Map CSSValueFromImage to ImageResolutionFromImage.
* rendering/RenderImage.cpp: Extend conditions for recalculation of intrinsic size.
(WebCore::RenderImage::styleDidChange): Update intrinsic size if RenderStyle::imageResolutionSource() has changed.
* rendering/style/RenderStyle.cpp: Include StyleRareInheritedData::m_imageResolutionSource in style diff.
(WebCore::RenderStyle::diff): Map change in StyleRareInheritedData::m_imageResolutionSource to StyleDifferenceLayout.
* rendering/style/RenderStyle.h: Add RenderStyle::imageResolutionSource, RenderStyle::setImageResolutionSource, RenderStyle::initialImageResolutionSource.
* rendering/style/RenderStyleConstants.h: Add enum ImageResolutionSource.
* rendering/style/StyleRareInheritedData.cpp: Add StyleRareInheritedData::m_imageResolutionSource.
(WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageResolutionSource to default and copy constructor.
(WebCore::StyleRareInheritedData::operator==): Include m_imageResolutionSource in comparison.
* rendering/style/StyleRareInheritedData.h: Add StyleRareInheritedData::m_imageResolutionSource.
(StyleRareInheritedData): Add 1-bit field StyleRareInheritedData::m_imageResolutionSource.

LayoutTests:

* fast/css/image-resolution/image-resolution-expected.txt:
* fast/css/image-resolution/image-resolution.html:

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

13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/image-resolution/image-resolution-expected.txt
LayoutTests/fast/css/image-resolution/image-resolution.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/StyleBuilder.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.h

index b472f65..5a9cce3 100644 (file)
@@ -1,3 +1,13 @@
+2012-06-18  David Barr  <davidbarr@chromium.org>
+
+        Add from-image to css3-images image-resolution
+        https://bugs.webkit.org/show_bug.cgi?id=85451
+
+        Reviewed by Tony Chang.
+
+        * fast/css/image-resolution/image-resolution-expected.txt:
+        * fast/css/image-resolution/image-resolution.html:
+
 2012-06-18  Igor Oliveira  <igor.o@sisa.samsung.com>
 
         Unreviewed, rolling out r120119.
index b76731f..9e3c933 100644 (file)
@@ -1,4 +1,4 @@
-Apply image-resolution property to a fixed image (16x16@0.75dppx).
+Apply image-resolution property to a fixed image (16x16).
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
@@ -75,6 +75,150 @@ PASS img.offsetWidth is 4
 PASS img.offsetHeight is 4
 TEST ""
 PASS img.style.cssText is ""
+TEST "0dppx from-image"
+PASS img.style.cssText is ""
+TEST "from-image 0dppx"
+PASS img.style.cssText is ""
+TEST "1dppx from-image"
+PASS img.style.cssText is "image-resolution: 1dppx from-image; "
+PASS img.offsetWidth is 16
+PASS img.offsetHeight is 16
+TEST "from-image 1dppx"
+PASS img.style.cssText is "image-resolution: from-image 1dppx; "
+PASS img.offsetWidth is 16
+PASS img.offsetHeight is 16
+TEST "2dppx from-image"
+PASS img.style.cssText is "image-resolution: 2dppx from-image; "
+PASS img.offsetWidth is 8
+PASS img.offsetHeight is 8
+TEST "from-image 2dppx"
+PASS img.style.cssText is "image-resolution: from-image 2dppx; "
+PASS img.offsetWidth is 8
+PASS img.offsetHeight is 8
+TEST "3dppx from-image"
+PASS img.style.cssText is "image-resolution: 3dppx from-image; "
+PASS img.offsetWidth is 5
+PASS img.offsetHeight is 5
+TEST "from-image 3dppx"
+PASS img.style.cssText is "image-resolution: from-image 3dppx; "
+PASS img.offsetWidth is 5
+PASS img.offsetHeight is 5
+TEST "4dppx from-image"
+PASS img.style.cssText is "image-resolution: 4dppx from-image; "
+PASS img.offsetWidth is 4
+PASS img.offsetHeight is 4
+TEST "from-image 4dppx"
+PASS img.style.cssText is "image-resolution: from-image 4dppx; "
+PASS img.offsetWidth is 4
+PASS img.offsetHeight is 4
+TEST "0dpi from-image"
+PASS img.style.cssText is ""
+TEST "from-image 0dpi"
+PASS img.style.cssText is ""
+TEST "96dpi from-image"
+PASS img.style.cssText is "image-resolution: 96dpi from-image; "
+PASS img.offsetWidth is 16
+PASS img.offsetHeight is 16
+TEST "from-image 96dpi"
+PASS img.style.cssText is "image-resolution: from-image 96dpi; "
+PASS img.offsetWidth is 16
+PASS img.offsetHeight is 16
+TEST "192dpi from-image"
+PASS img.style.cssText is "image-resolution: 192dpi from-image; "
+PASS img.offsetWidth is 8
+PASS img.offsetHeight is 8
+TEST "from-image 192dpi"
+PASS img.style.cssText is "image-resolution: from-image 192dpi; "
+PASS img.offsetWidth is 8
+PASS img.offsetHeight is 8
+TEST "288dpi from-image"
+PASS img.style.cssText is "image-resolution: 288dpi from-image; "
+PASS img.offsetWidth is 5
+PASS img.offsetHeight is 5
+TEST "from-image 288dpi"
+PASS img.style.cssText is "image-resolution: from-image 288dpi; "
+PASS img.offsetWidth is 5
+PASS img.offsetHeight is 5
+TEST "384dpi from-image"
+PASS img.style.cssText is "image-resolution: 384dpi from-image; "
+PASS img.offsetWidth is 4
+PASS img.offsetHeight is 4
+TEST "from-image 384dpi"
+PASS img.style.cssText is "image-resolution: from-image 384dpi; "
+PASS img.offsetWidth is 4
+PASS img.offsetHeight is 4
+TEST "150dpi from-image"
+PASS img.style.cssText is "image-resolution: 150dpi from-image; "
+PASS img.offsetWidth is 10
+PASS img.offsetHeight is 10
+TEST "from-image 150dpi"
+PASS img.style.cssText is "image-resolution: from-image 150dpi; "
+PASS img.offsetWidth is 10
+PASS img.offsetHeight is 10
+TEST "300dpi from-image"
+PASS img.style.cssText is "image-resolution: 300dpi from-image; "
+PASS img.offsetWidth is 5
+PASS img.offsetHeight is 5
+TEST "from-image 300dpi"
+PASS img.style.cssText is "image-resolution: from-image 300dpi; "
+PASS img.offsetWidth is 5
+PASS img.offsetHeight is 5
+TEST "450dpi from-image"
+PASS img.style.cssText is "image-resolution: 450dpi from-image; "
+PASS img.offsetWidth is 3
+PASS img.offsetHeight is 3
+TEST "from-image 450dpi"
+PASS img.style.cssText is "image-resolution: from-image 450dpi; "
+PASS img.offsetWidth is 3
+PASS img.offsetHeight is 3
+TEST "600dpi from-image"
+PASS img.style.cssText is "image-resolution: 600dpi from-image; "
+PASS img.offsetWidth is 2
+PASS img.offsetHeight is 2
+TEST "from-image 600dpi"
+PASS img.style.cssText is "image-resolution: from-image 600dpi; "
+PASS img.offsetWidth is 2
+PASS img.offsetHeight is 2
+TEST "0dpcm from-image"
+PASS img.style.cssText is ""
+TEST "from-image 0dpcm"
+PASS img.style.cssText is ""
+TEST "37.7dpcm from-image"
+PASS img.style.cssText is "image-resolution: 37.7dpcm from-image; "
+PASS img.offsetWidth is 16
+PASS img.offsetHeight is 16
+TEST "from-image 37.7dpcm"
+PASS img.style.cssText is "image-resolution: from-image 37.7dpcm; "
+PASS img.offsetWidth is 16
+PASS img.offsetHeight is 16
+TEST "75.5dpcm from-image"
+PASS img.style.cssText is "image-resolution: 75.5dpcm from-image; "
+PASS img.offsetWidth is 8
+PASS img.offsetHeight is 8
+TEST "from-image 75.5dpcm"
+PASS img.style.cssText is "image-resolution: from-image 75.5dpcm; "
+PASS img.offsetWidth is 8
+PASS img.offsetHeight is 8
+TEST "113.3dpcm from-image"
+PASS img.style.cssText is "image-resolution: 113.3dpcm from-image; "
+PASS img.offsetWidth is 5
+PASS img.offsetHeight is 5
+TEST "from-image 113.3dpcm"
+PASS img.style.cssText is "image-resolution: from-image 113.3dpcm; "
+PASS img.offsetWidth is 5
+PASS img.offsetHeight is 5
+TEST "151.1dpcm from-image"
+PASS img.style.cssText is "image-resolution: 151.1dpcm from-image; "
+PASS img.offsetWidth is 4
+PASS img.offsetHeight is 4
+TEST "from-image 151.1dpcm"
+PASS img.style.cssText is "image-resolution: from-image 151.1dpcm; "
+PASS img.offsetWidth is 4
+PASS img.offsetHeight is 4
+TEST "from-image"
+PASS img.style.cssText is "image-resolution: from-image; "
+PASS img.offsetWidth is 16
+PASS img.offsetHeight is 16
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 7eb3552..7e194e4 100644 (file)
@@ -39,7 +39,7 @@ function computeResolution(resolution, imgResolutionDppx)
         else if (unit === 'dpcm')
             dppx = value / (cssPxPerIn / cmPerIn);
     }
-    if (fromImage)
+    if (fromImage && imgResolutionDppx)
         dppx = imgResolutionDppx;
     if (snap)
         dppx = Math.floor(dppx);
@@ -48,11 +48,26 @@ function computeResolution(resolution, imgResolutionDppx)
     return dppx;
 }
 
+function permute2(rule) {
+    var s = rule.trim().split(' ');
+    if (s.length == 1)
+        return s;
+    return [s.join(' '), [s[1], s[0]].join(' ')];
+}
+
+function generateTests(resolutions) {
+    var tests = resolutions.slice();
+    resolutions.forEach(function(resolution) {
+        tests.push.apply(tests, permute2(resolution + ' from-image'));
+    });
+    return tests;
+}
+
 var imgUrl = '../../images/resources/green.jpg';
 var imgWidthPx = 16;
 var imgHeightPx = 16;
-var imgResolutionDppx = 72 / 96;
-var dimensions = imgWidthPx + 'x' + imgHeightPx + '@' + imgResolutionDppx + 'dppx';
+var imgResolutionDppx = 0; /* Embedded image resolution data not plumbed yet. */
+var dimensions = imgWidthPx + 'x' + imgHeightPx;
 
 description('Apply image-resolution property to a fixed image (' + dimensions + ').');
 
@@ -65,7 +80,7 @@ var resolutions = ['0dppx', '1dppx', '2dppx', '3dppx', '4dppx',
                    '0dpcm', '37.7dpcm', '75.5dpcm', '113.3dpcm', '151.1dpcm', ''];
 
 img.onload = function() {
-    resolutions.forEach(function(test) {
+    generateTests(resolutions).forEach(function(test) {
         var dppx = computeResolution(test, imgResolutionDppx);
         img.style.imageResolution = '';
         img.style.imageResolution = test;
index 0a1b68c..650af1e 100644 (file)
@@ -1,3 +1,34 @@
+2012-06-18  David Barr  <davidbarr@chromium.org>
+
+        Add from-image to css3-images image-resolution
+        https://bugs.webkit.org/show_bug.cgi?id=85451
+
+        Reviewed by Tony Chang.
+
+        The css3-images module is at candidate recommendation.
+        http://www.w3.org/TR/2012/CR-css3-images-20120417/#the-image-resolution
+
+        No new tests; extended fast/css/image-resolution/image-resolution.html
+
+        * css/CSSParser.cpp: Accept from-image identifier in image-resolution property.
+        (WebCore::CSSParser::parseImageResolution): Map CSSValueFromImage to identifier value from cssValuePool.
+        * css/CSSValueKeywords.in: Add from-image.
+        * css/StyleBuilder.cpp: Extend ApplyPropertyImageResolution to apply RenderStyle::imageResolutionSource.
+        (WebCore::ApplyPropertyImageResolution::applyInheritValue): Apply RenderStyle::imageResolutionSource.
+        (WebCore::ApplyPropertyImageResolution::applyInitialValue): Apply RenderStyle::imageResolutionSource.
+        (WebCore::ApplyPropertyImageResolution::applyValue): Map CSSValueFromImage to ImageResolutionFromImage.
+        * rendering/RenderImage.cpp: Extend conditions for recalculation of intrinsic size.
+        (WebCore::RenderImage::styleDidChange): Update intrinsic size if RenderStyle::imageResolutionSource() has changed.
+        * rendering/style/RenderStyle.cpp: Include StyleRareInheritedData::m_imageResolutionSource in style diff.
+        (WebCore::RenderStyle::diff): Map change in StyleRareInheritedData::m_imageResolutionSource to StyleDifferenceLayout.
+        * rendering/style/RenderStyle.h: Add RenderStyle::imageResolutionSource, RenderStyle::setImageResolutionSource, RenderStyle::initialImageResolutionSource.
+        * rendering/style/RenderStyleConstants.h: Add enum ImageResolutionSource.
+        * rendering/style/StyleRareInheritedData.cpp: Add StyleRareInheritedData::m_imageResolutionSource.
+        (WebCore::StyleRareInheritedData::StyleRareInheritedData): Add m_imageResolutionSource to default and copy constructor.
+        (WebCore::StyleRareInheritedData::operator==): Include m_imageResolutionSource in comparison.
+        * rendering/style/StyleRareInheritedData.h: Add StyleRareInheritedData::m_imageResolutionSource.
+        (StyleRareInheritedData): Add 1-bit field StyleRareInheritedData::m_imageResolutionSource.
+
 2012-06-18  James Robinson  <jamesr@chromium.org>
 
         [chromium] REGRESSION(r120346) ContentLayerPainter should clear rect to be painted
index 0a187ce..5747b46 100644 (file)
@@ -6893,10 +6893,14 @@ PassRefPtr<CSSValue> CSSParser::parseImageResolution(CSSParserValueList* valueLi
 {
     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
     bool haveResolution = false;
+    bool haveFromImage = false;
 
     CSSParserValue* value = valueList->current();
     while (value) {
-        if (!haveResolution && validUnit(value, FResolution | FNonNeg) && value->fValue > 0) {
+        if (!haveFromImage && value->id == CSSValueFromImage) {
+            list->append(cssValuePool().createIdentifierValue(value->id));
+            haveFromImage = true;
+        } else if (!haveResolution && validUnit(value, FResolution | FNonNeg) && value->fValue > 0) {
             list->append(createPrimitiveNumericValue(value));
             haveResolution = true;
         } else
index 98b20c3..6f96a04 100644 (file)
@@ -924,3 +924,7 @@ filter-box
 detached
 #endif // CSS_SHADERS
 #endif // CSS_FILTERS
+
+#if defined(ENABLE_CSS_IMAGE_RESOLUTION) && ENABLE_CSS_IMAGE_RESOLUTION
+from-image
+#endif
index b9cffef..9115050 100644 (file)
@@ -1772,11 +1772,13 @@ class ApplyPropertyImageResolution {
 public:
     static void applyInheritValue(StyleResolver* styleResolver)
     {
+        ApplyPropertyDefaultBase<ImageResolutionSource, &RenderStyle::imageResolutionSource, ImageResolutionSource, &RenderStyle::setImageResolutionSource, ImageResolutionSource, &RenderStyle::initialImageResolutionSource>::applyInheritValue(styleResolver);
         ApplyPropertyDefaultBase<float, &RenderStyle::imageResolution, float, &RenderStyle::setImageResolution, float, &RenderStyle::initialImageResolution>::applyInheritValue(styleResolver);
     }
 
     static void applyInitialValue(StyleResolver* styleResolver)
     {
+        ApplyPropertyDefaultBase<ImageResolutionSource, &RenderStyle::imageResolutionSource, ImageResolutionSource, &RenderStyle::setImageResolutionSource, ImageResolutionSource, &RenderStyle::initialImageResolutionSource>::applyInitialValue(styleResolver);
         ApplyPropertyDefaultBase<float, &RenderStyle::imageResolution, float, &RenderStyle::setImageResolution, float, &RenderStyle::initialImageResolution>::applyInitialValue(styleResolver);
     }
 
@@ -1785,13 +1787,20 @@ public:
         if (!value->isValueList())
             return;
         CSSValueList* valueList = static_cast<CSSValueList*>(value);
+        ImageResolutionSource source = RenderStyle::initialImageResolutionSource();
+        double resolution = RenderStyle::initialImageResolution();
         for (size_t i = 0; i < valueList->length(); i++) {
             CSSValue* item = valueList->itemWithoutBoundsCheck(i);
             if (!item->isPrimitiveValue())
                 continue;
             CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(item);
-            styleResolver->style()->setImageResolution(primitiveValue->getDoubleValue(CSSPrimitiveValue::CSS_DPPX));
+            if (primitiveValue->getIdent() == CSSValueFromImage)
+                source = ImageResolutionFromImage;
+            else
+                resolution = primitiveValue->getDoubleValue(CSSPrimitiveValue::CSS_DPPX);
         }
+        styleResolver->style()->setImageResolutionSource(source);
+        styleResolver->style()->setImageResolution(resolution);
     }
 
     static PropertyHandler createHandler()
index b7d7105..093880e 100644 (file)
@@ -138,7 +138,9 @@ void RenderImage::styleDidChange(StyleDifference diff, const RenderStyle* oldSty
         m_needsToSetSizeForAltText = false;
     }
 #if ENABLE(CSS_IMAGE_RESOLUTION)
-    if (diff == StyleDifferenceLayout && oldStyle->imageResolution() != style()->imageResolution())
+    if (diff == StyleDifferenceLayout
+        && (oldStyle->imageResolution() != style()->imageResolution()
+            || oldStyle->imageResolutionSource() != style()->imageResolutionSource()))
         imageDimensionsChanged(true /* imageSizeChanged */);
 #endif
 }
index d02a875..36c5ed4 100644 (file)
@@ -473,6 +473,7 @@ StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon
             || rareInheritedData->m_lineBoxContain != other->rareInheritedData->m_lineBoxContain
             || rareInheritedData->m_lineGrid != other->rareInheritedData->m_lineGrid
 #if ENABLE(CSS_IMAGE_RESOLUTION)
+            || rareInheritedData->m_imageResolutionSource != other->rareInheritedData->m_imageResolutionSource
             || rareInheritedData->m_imageResolution != other->rareInheritedData->m_imageResolution
 #endif
             || rareInheritedData->m_lineSnap != other->rareInheritedData->m_lineSnap
index b19b4b1..4df8009 100644 (file)
@@ -983,6 +983,7 @@ public:
     EImageRendering imageRendering() const { return static_cast<EImageRendering>(rareInheritedData->m_imageRendering); }
 
 #if ENABLE(CSS_IMAGE_RESOLUTION)
+    ImageResolutionSource imageResolutionSource() const { return static_cast<ImageResolutionSource>(rareInheritedData->m_imageResolutionSource); }
     float imageResolution() const { return rareInheritedData->m_imageResolution; }
 #endif
     
@@ -1153,6 +1154,7 @@ public:
     void setImageRendering(EImageRendering v) { SET_VAR(rareInheritedData, m_imageRendering, v) }
 
 #if ENABLE(CSS_IMAGE_RESOLUTION)
+    void setImageResolutionSource(ImageResolutionSource v) { SET_VAR(rareInheritedData, m_imageResolutionSource, v) }
     void setImageResolution(float f) { SET_VAR(rareInheritedData, m_imageResolution, f) }
 #endif
 
@@ -1667,6 +1669,7 @@ public:
     static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmphasisPositionOver; }
     static LineBoxContain initialLineBoxContain() { return LineBoxContainBlock | LineBoxContainInline | LineBoxContainReplaced; }
     static EImageRendering initialImageRendering() { return ImageRenderingAuto; }
+    static ImageResolutionSource initialImageResolutionSource() { return ImageResolutionSpecified; }
     static float initialImageResolution() { return 1; }
     static StyleImage* initialBorderImageSource() { return 0; }
     static StyleImage* initialMaskBoxImageSource() { return 0; }
index c96b57a..b2c6a5d 100644 (file)
@@ -454,6 +454,8 @@ enum TextOverflow { TextOverflowClip = 0, TextOverflowEllipsis };
 
 enum EImageRendering { ImageRenderingAuto, ImageRenderingOptimizeSpeed, ImageRenderingOptimizeQuality, ImageRenderingOptimizeContrast };
 
+enum ImageResolutionSource { ImageResolutionSpecified = 0, ImageResolutionFromImage };
+
 enum Order { LogicalOrder = 0, VisualOrder };
 
 enum RegionOverflow { AutoRegionOverflow, BreakRegionOverflow };
index 35a52e5..7fe609c 100644 (file)
@@ -87,6 +87,9 @@ StyleRareInheritedData::StyleRareInheritedData()
 #if ENABLE(OVERFLOW_SCROLLING)
     , useTouchOverflowScrolling(RenderStyle::initialUseTouchOverflowScrolling())
 #endif
+#if ENABLE(CSS_IMAGE_RESOLUTION)
+    , m_imageResolutionSource(RenderStyle::initialImageResolutionSource())
+#endif
     , hyphenationLimitBefore(-1)
     , hyphenationLimitAfter(-1)
     , hyphenationLimitLines(-1)
@@ -142,6 +145,9 @@ StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
 #if ENABLE(OVERFLOW_SCROLLING)
     , useTouchOverflowScrolling(o.useTouchOverflowScrolling)
 #endif
+#if ENABLE(CSS_IMAGE_RESOLUTION)
+    , m_imageResolutionSource(o.m_imageResolutionSource)
+#endif
     , hyphenationString(o.hyphenationString)
     , hyphenationLimitBefore(o.hyphenationLimitBefore)
     , hyphenationLimitAfter(o.hyphenationLimitAfter)
@@ -224,6 +230,7 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
         && m_lineGrid == o.m_lineGrid
         && m_imageRendering == o.m_imageRendering
 #if ENABLE(CSS_IMAGE_RESOLUTION)
+        && m_imageResolutionSource == o.m_imageResolutionSource
         && m_imageResolution == o.m_imageResolution
 #endif
         && m_lineSnap == o.m_lineSnap
index b329e8b..5891af9 100644 (file)
@@ -101,6 +101,9 @@ public:
 #if ENABLE(OVERFLOW_SCROLLING)
     unsigned useTouchOverflowScrolling: 1;
 #endif
+#if ENABLE(CSS_IMAGE_RESOLUTION)
+    unsigned m_imageResolutionSource : 1; // ImageResolutionSource
+#endif
 
     AtomicString hyphenationString;
     short hyphenationLimitBefore;