Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / rendering / RenderLayerClipper.h
index 077501c..00d5b1f 100644 (file)
@@ -64,7 +64,7 @@ public:
         , scrollbarRelevancy(relevancy)
         , cacheSlot(slot)
         , subPixelAccumulation(accumulation)
-        , respectOverflowClip(RespectOverflowClip)
+        , respectOverflowClip(slot == PaintingClipRectsIgnoringOverflowClip ? IgnoreOverflowClip : RespectOverflowClip)
     {
     }
 
@@ -72,7 +72,8 @@ public:
     {
         ASSERT(!usesCache() || cacheSlot == PaintingClipRects);
         ASSERT(respectOverflowClip == RespectOverflowClip);
-        cacheSlot = PaintingClipRectsIgnoringOverflowClip;
+        if (usesCache())
+            cacheSlot = PaintingClipRectsIgnoringOverflowClip;
         respectOverflowClip = IgnoreOverflowClip;
     }