Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1291)

Unified Diff: Source/web/LinkHighlight.cpp

Issue 719053004: Partially revert r181835 to fix link highlighting (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/LinkHighlight.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/LinkHighlight.cpp
diff --git a/Source/web/LinkHighlight.cpp b/Source/web/LinkHighlight.cpp
index 5e16b123c343713ab2200d1631fbec5433882891..cebb4c108a479be4485ac02fe50b9a49b4b184be 100644
--- a/Source/web/LinkHighlight.cpp
+++ b/Source/web/LinkHighlight.cpp
@@ -40,7 +40,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"
@@ -228,13 +227,6 @@ bool LinkHighlight::computeHighlightLayerPathAndPosition(const RenderLayerModelO
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());
}
@@ -251,8 +243,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()
« no previous file with comments | « Source/web/LinkHighlight.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698