WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch V1
bug83960.patch (text/plain), 5.92 KB, created by
Alexandru Chiculita
on 2012-04-13 17:29:59 PDT
(
hide
)
Description:
Patch V1
Filename:
MIME Type:
Creator:
Alexandru Chiculita
Created:
2012-04-13 17:29:59 PDT
Size:
5.92 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index d397309..7ccaab4 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,23 @@ >+2012-04-13 Alexandru Chiculita <achicu@adobe.com> >+ >+ [CSS Filters] Do not use clipping rect when calculating the bounds of a layer >+ https://bugs.webkit.org/show_bug.cgi?id=83960 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The local clip rect should not be used when calculating the bounds of a filter area. Otherwise >+ drop-shadow might not know about the pixels outside the clipping rectangle, even though the actual shadow might >+ be inside it. >+ >+ No new tests added in this patch, but this patch fixes two existing tests that fail. >+ LayoutTests/css3/filters/filter-repaint-shadow-clipped.html >+ LayoutTests/css3/filters/filter-repaint-shadow-rotated.html >+ >+ * rendering/RenderLayer.cpp: >+ (WebCore::RenderLayer::paintLayerContents): >+ (WebCore::RenderLayer::calculateLayerBounds): >+ * rendering/RenderLayer.h: >+ > 2012-04-13 Jer Noble <jer.noble@apple.com> > > Video at apple.com gets standard controls in addition to custom controls after returning from full screen >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index 77b7011..e345013 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -2976,7 +2976,7 @@ void RenderLayer::paintLayerContents(RenderLayer* rootLayer, GraphicsContext* co > LayoutPoint rootLayerOffset; > convertToLayerCoords(rootLayer, rootLayerOffset); > m_filterRepaintRect.move(rootLayerOffset.x(), rootLayerOffset.y()); >- LayoutRect filterPaintDirtyRect = filterPainter.prepareFilterEffect(this, calculateLayerBounds(this, rootLayer, false, false), parentPaintDirtyRect, m_filterRepaintRect); >+ LayoutRect filterPaintDirtyRect = filterPainter.prepareFilterEffect(this, calculateLayerBounds(this, rootLayer, 0), parentPaintDirtyRect, m_filterRepaintRect); > m_filterRepaintRect = IntRect(); > // Rewire the old context to a memory buffer, so that we can capture the contents of the layer. > // NOTE: We saved the old context in the "transparencyLayerContext" local variable, to be able to start a transparency layer >@@ -4093,7 +4093,7 @@ IntRect RenderLayer::absoluteBoundingBox() const > return pixelSnappedIntRect(boundingBox(root())); > } > >-IntRect RenderLayer::calculateLayerBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer, bool includeSelfTransform, bool includeLayerFilterOutsets) >+IntRect RenderLayer::calculateLayerBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer, CalculateLayerBoundsFlags flags) > { > if (!layer->isSelfPaintingLayer()) > return IntRect(); >@@ -4114,12 +4114,14 @@ IntRect RenderLayer::calculateLayerBounds(const RenderLayer* layer, const Render > > LayoutRect unionBounds = boundingBoxRect; > >- LayoutRect localClipRect = layer->localClipRect(); >- if (localClipRect != PaintInfo::infiniteRect()) { >- LayoutPoint ancestorRelOffset; >- layer->convertToLayerCoords(ancestorLayer, ancestorRelOffset); >- localClipRect.moveBy(ancestorRelOffset); >- return pixelSnappedIntRect(localClipRect); >+ if (flags & UseLocalClipRectIfPossible) { >+ LayoutRect localClipRect = layer->localClipRect(); >+ if (localClipRect != PaintInfo::infiniteRect()) { >+ LayoutPoint ancestorRelOffset; >+ layer->convertToLayerCoords(ancestorLayer, ancestorRelOffset); >+ localClipRect.moveBy(ancestorRelOffset); >+ return pixelSnappedIntRect(localClipRect); >+ } > } > > if (RenderLayer* reflection = layer->reflectionLayer()) { >@@ -4172,7 +4174,7 @@ IntRect RenderLayer::calculateLayerBounds(const RenderLayer* layer, const Render > // FIXME: We can optimize the size of the composited layers, by not enlarging > // filtered areas with the outsets if we know that the filter is going to render in hardware. > // https://bugs.webkit.org/show_bug.cgi?id=81239 >- if (includeLayerFilterOutsets && layer->renderer()->style()->hasFilterOutsets()) { >+ if ((flags & IncludeLayerFilterOutsets) && layer->renderer()->style()->hasFilterOutsets()) { > int topOutset; > int rightOutset; > int bottomOutset; >@@ -4185,7 +4187,7 @@ IntRect RenderLayer::calculateLayerBounds(const RenderLayer* layer, const Render > UNUSED_PARAM(includeLayerFilterOutsets); > #endif > >- if (includeSelfTransform && layer->paintsWithTransform(PaintBehaviorNormal)) { >+ if ((flags & IncludeSelfTransform) && layer->paintsWithTransform(PaintBehaviorNormal)) { > TransformationMatrix* affineTrans = layer->transform(); > boundingBoxRect = affineTrans->mapRect(boundingBoxRect); > unionBounds = affineTrans->mapRect(unionBounds); >diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h >index 90b011a..c94bd25 100644 >--- a/Source/WebCore/rendering/RenderLayer.h >+++ b/Source/WebCore/rendering/RenderLayer.h >@@ -488,7 +488,14 @@ public: > // Pixel snapped bounding box relative to the root. > IntRect absoluteBoundingBox() const; > >- static IntRect calculateLayerBounds(const RenderLayer*, const RenderLayer* ancestorLayer, bool includeSelfTransform = true, bool includeLayerFilterOutsets = true); >+ enum CalculateLayerBoundsFlag { >+ IncludeSelfTransform = 1 << 0, >+ UseLocalClipRectIfPossible = 1 << 1, >+ IncludeLayerFilterOutsets = 1 << 2, >+ DefaultCalculateLayerBoundsFlags = IncludeSelfTransform | UseLocalClipRectIfPossible | IncludeLayerFilterOutsets >+ }; >+ typedef unsigned CalculateLayerBoundsFlags; >+ static IntRect calculateLayerBounds(const RenderLayer*, const RenderLayer* ancestorLayer, CalculateLayerBoundsFlags = DefaultCalculateLayerBoundsFlags); > > void updateHoverActiveState(const HitTestRequest&, HitTestResult&); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
simon.fraser
:
review+
simon.fraser
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 83960
: 137184