summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2014-11-13 18:21:09 +0000
committerBen Murdoch <benm@google.com>2014-11-13 18:21:09 +0000
commit042939c159e27d08cc39001e3990ccb318513dd6 (patch)
treecf73d09764c6ed1e49e91fda63f2725e30e426c4
parentd7f75b9970e1230a9c958b05dbebbe8beea2c43e (diff)
downloadWebKit-042939c159e27d08cc39001e3990ccb318513dd6.tar.gz
Cherry pick: Partially revert r181835 to fix link highlighting
Bug: 18370401 Original description: The changes in LinkHighlight code in http://crrev.com/541913002 causes the link-highlights to disappear in many cases (see the bug). Eight changes have been committed to the same code afterwards, making it impossible to fully revert the target CL. The partial revert here fixes the problem. BUG=430244 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185245 Change-Id: I6292fd736027e3b5b743cb44ad67f11de3d34f2b
-rw-r--r--Source/web/LinkHighlight.cpp13
-rw-r--r--Source/web/LinkHighlight.h2
2 files changed, 3 insertions, 12 deletions
diff --git a/Source/web/LinkHighlight.cpp b/Source/web/LinkHighlight.cpp
index afaed964d..611fa8aa0 100644
--- a/Source/web/LinkHighlight.cpp
+++ b/Source/web/LinkHighlight.cpp
@@ -39,7 +39,6 @@
#include "core/rendering/compositing/CompositedLayerMapping.h"
#include "core/rendering/style/ShadowData.h"
#include "platform/graphics/Color.h"
-#include "platform/graphics/DisplayList.h"
#include "public/platform/Platform.h"
#include "public/platform/WebCompositorAnimationCurve.h"
#include "public/platform/WebCompositorSupport.h"
@@ -237,13 +236,6 @@ bool LinkHighlight::computeHighlightLayerPathAndPosition(RenderLayer* compositin
bool pathHasChanged = !(newPath == m_path);
if (pathHasChanged) {
m_path = newPath;
-
- GraphicsContext gc(0);
- gc.beginRecording(boundingRect);
- gc.setFillColor(m_node->renderer()->style()->tapHighlightColor());
- gc.fillPath(m_path);
- m_displayList = gc.endRecording();
-
m_contentLayer->layer()->setBounds(enclosingIntRect(boundingRect).size());
}
@@ -260,8 +252,9 @@ 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));
- m_displayList->setClip(clipRect);
- gc.drawDisplayList(m_displayList.get());
+ gc.clip(clipRect);
+ gc.setFillColor(m_node->renderer()->style()->tapHighlightColor());
+ gc.fillPath(m_path);
}
void LinkHighlight::startHighlightAnimationIfNeeded()
diff --git a/Source/web/LinkHighlight.h b/Source/web/LinkHighlight.h
index cea39b0b0..47c203edf 100644
--- a/Source/web/LinkHighlight.h
+++ b/Source/web/LinkHighlight.h
@@ -39,7 +39,6 @@
namespace blink {
-class DisplayList;
class Node;
class RenderLayer;
class RenderObject;
@@ -86,7 +85,6 @@ private:
OwnPtr<WebContentLayer> m_contentLayer;
OwnPtr<WebLayer> m_clipLayer;
Path m_path;
- RefPtr<DisplayList> m_displayList;
RefPtrWillBePersistent<Node> m_node;
WebViewImpl* m_owningWebViewImpl;