Huge filter area cause hangs and malloc failures
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jan 2012 22:37:13 +0000 (22:37 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jan 2012 22:37:13 +0000 (22:37 +0000)
commite1e7e78ae1e4226cb65b67f8a2a3fc6a4ae87ac3
tree546619f2361a6675f2f81d854e9ef7d850472de3
parentc07aadc14bec03e95d20029054b69f0d9b6a4945
Huge filter area cause hangs and malloc failures
https://bugs.webkit.org/show_bug.cgi?id=75711

Reviewed by Dean Jackson.

Filtering an element with a child that had a huge negative text-indent
was extremely slow, because transparencyClipBox() returned a huge rect.

Add a method, paintingExtent(), that wraps transparencyClipBox()
and intersects it with the paintDirtyRect to constrain the size
of the rect used for filters and transparency layers.

Transparency layer extent is not testable in layout tests.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintingExtent):
(WebCore::RenderLayer::beginTransparencyLayers): Floating point literals are required
to avoid ambiguous constructor call.
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::paintLayerContents):
* rendering/RenderLayer.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h