diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-14 16:29:47 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-14 16:29:47 +0200 |
| commit | d0424a769059c84ae20beb3c217812792ea6726b (patch) | |
| tree | 6f94a5c3db8c52c6694ee56498542a6c35417350 /Source/WebCore/rendering/RenderInline.cpp | |
| parent | 88a04ac016f57c2d78e714682445dff2e7db4ade (diff) | |
| download | qtwebkit-d0424a769059c84ae20beb3c217812792ea6726b.tar.gz | |
Imported WebKit commit 37c5e5041d39a14ea0d429a77ebd352e4bd26516 (http://svn.webkit.org/repository/webkit/trunk@128608)
New snapshot that enables WebKit2 build on Windows (still some bugs) and allows for WebKit to be built with qmake && make
Diffstat (limited to 'Source/WebCore/rendering/RenderInline.cpp')
| -rw-r--r-- | Source/WebCore/rendering/RenderInline.cpp | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/Source/WebCore/rendering/RenderInline.cpp b/Source/WebCore/rendering/RenderInline.cpp index 941375509..234cea28b 100644 --- a/Source/WebCore/rendering/RenderInline.cpp +++ b/Source/WebCore/rendering/RenderInline.cpp @@ -993,15 +993,8 @@ LayoutRect RenderInline::clippedOverflowRectForRepaint(RenderBoxModelObject* rep if (cb->hasColumns()) cb->adjustRectForColumns(repaintRect); - if (cb->hasOverflowClip()) { - // cb->height() is inaccurate if we're in the middle of a layout of |cb|, so use the - // layer's size instead. Even if the layer's size is wrong, the layer itself will repaint - // anyway if its size does change. - repaintRect.move(-cb->scrolledContentOffset()); // For overflow:auto/scroll/hidden. - - LayoutRect boxRect(LayoutPoint(), cb->cachedSizeForOverflowClip()); - repaintRect.intersect(boxRect); - } + if (cb->hasOverflowClip()) + cb->applyCachedClipAndScrollOffsetForRepaint(repaintRect); cb->computeRectForRepaint(repaintContainer, repaintRect); @@ -1073,21 +1066,13 @@ void RenderInline::computeRectForRepaint(RenderBoxModelObject* repaintContainer, // FIXME: We ignore the lightweight clipping rect that controls use, since if |o| is in mid-layout, // its controlClipRect will be wrong. For overflow clip we use the values cached by the layer. + rect.setLocation(topLeft); if (o->hasOverflowClip()) { RenderBox* containerBox = toRenderBox(o); - - // o->height() is inaccurate if we're in the middle of a layout of |o|, so use the - // layer's size instead. Even if the layer's size is wrong, the layer itself will repaint - // anyway if its size does change. - topLeft -= containerBox->scrolledContentOffset(); // For overflow:auto/scroll/hidden. - - LayoutRect repaintRect(topLeft, rect.size()); - LayoutRect boxRect(LayoutPoint(), containerBox->cachedSizeForOverflowClip()); - rect = intersection(repaintRect, boxRect); + containerBox->applyCachedClipAndScrollOffsetForRepaint(rect); if (rect.isEmpty()) return; - } else - rect.setLocation(topLeft); + } if (containerSkipped) { // If the repaintContainer is below o, then we need to map the rect into repaintContainer's coordinates. |
