summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/LinkHighlight.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/chromium/src/LinkHighlight.cpp')
-rw-r--r--Source/WebKit/chromium/src/LinkHighlight.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/WebKit/chromium/src/LinkHighlight.cpp b/Source/WebKit/chromium/src/LinkHighlight.cpp
index 815a0c300..0d4d154f0 100644
--- a/Source/WebKit/chromium/src/LinkHighlight.cpp
+++ b/Source/WebKit/chromium/src/LinkHighlight.cpp
@@ -48,6 +48,7 @@
#include <public/WebFloatPoint.h>
#include <public/WebRect.h>
#include <public/WebSize.h>
+#include <public/WebTransformationMatrix.h>
using namespace WebCore;
@@ -125,10 +126,10 @@ RenderLayer* LinkHighlight::computeEnclosingCompositingLayer()
if (!renderLayer || !renderLayer->isComposited())
return 0;
- m_graphicsLayerOffset = FloatPoint();
GraphicsLayerChromium* newGraphicsLayer = static_cast<GraphicsLayerChromium*>(renderLayer->backing()->graphicsLayer());
+ m_clipLayer->setSublayerTransform(WebTransformationMatrix());
if (!newGraphicsLayer->drawsContent()) {
- m_graphicsLayerOffset = newGraphicsLayer->position();
+ m_clipLayer->setSublayerTransform(WebTransformationMatrix(newGraphicsLayer->transform()));
newGraphicsLayer = static_cast<GraphicsLayerChromium*>(m_owningWebViewImpl->nonCompositedContentHost()->topLevelRootLayer());
}
@@ -225,7 +226,7 @@ bool LinkHighlight::computeHighlightLayerPathAndPosition(RenderLayer* compositin
return pathHasChanged;
}
-void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect, WebFloatRect&)
+void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect, bool, WebFloatRect&)
{
if (!m_node || !m_node->renderer())
return;
@@ -302,6 +303,9 @@ void LinkHighlight::updateGeometry()
// We only need to invalidate the layer if the highlight size has changed, otherwise
// we can just re-position the layer without needing to repaint.
m_contentLayer->layer()->invalidate();
+
+ if (m_currentGraphicsLayer)
+ m_currentGraphicsLayer->addRepaintRect(FloatRect(layer()->position().x, layer()->position().y, layer()->bounds().width, layer()->bounds().height));
}
}