Index: Source/web/LinkHighlight.cpp |
diff --git a/Source/web/LinkHighlight.cpp b/Source/web/LinkHighlight.cpp |
index 0b51e66ea6a8e6352ddde4c9bb515a6fc7a9d580..f7e919eb774e9bef891989d66061d07262a4b8b1 100644 |
--- a/Source/web/LinkHighlight.cpp |
+++ b/Source/web/LinkHighlight.cpp |
@@ -236,6 +236,12 @@ bool LinkHighlight::computeHighlightLayerPathAndPosition(RenderLayer* compositin |
bool pathHasChanged = !(newPath == m_path); |
if (pathHasChanged) { |
m_path = newPath; |
+ |
+ GraphicsContext gc(boundingRect); |
+ gc.setFillColor(m_node->renderer()->style()->tapHighlightColor()); |
+ gc.fillPath(m_path); |
+ m_displayList = gc.endRecording(); |
+ |
m_contentLayer->layer()->setBounds(enclosingIntRect(boundingRect).size()); |
} |
@@ -253,9 +259,8 @@ void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect, |
GraphicsContext gc(canvas, |
contextStatus == WebContentLayerClient::GraphicsContextEnabled ? GraphicsContext::NothingDisabled : GraphicsContext::FullyDisabled); |
IntRect clipRect(IntPoint(webClipRect.x, webClipRect.y), IntSize(webClipRect.width, webClipRect.height)); |
- gc.clip(clipRect); |
- gc.setFillColor(m_node->renderer()->style()->tapHighlightColor()); |
- gc.fillPath(m_path); |
+ m_displayList->setClip(clipRect); |
+ gc.drawDisplayList(m_displayList.get()); |
} |
void LinkHighlight::startHighlightAnimationIfNeeded() |