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

Unified Diff: third_party/WebKit/Source/web/LinkHighlightImpl.cpp

Issue 1484163002: Raster display item lists via a visual rect RTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head. Created 5 years 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
Index: third_party/WebKit/Source/web/LinkHighlightImpl.cpp
diff --git a/third_party/WebKit/Source/web/LinkHighlightImpl.cpp b/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
index 4996a44161e21732940eb9e3250eb8718db56b69..72f240f324802e28c11e4be220f208954bf379ea 100644
--- a/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
+++ b/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
@@ -270,7 +270,8 @@ void LinkHighlightImpl::paintContents(WebDisplayItemList* webDisplayItemList, We
return;
SkPictureRecorder recorder;
- SkCanvas* canvas = recorder.beginRecording(paintableRegion().width(), paintableRegion().height());
+ gfx::Rect visualRect = paintableRegion();
+ SkCanvas* canvas = recorder.beginRecording(visualRect.width(), visualRect.height());
SkPaint paint;
paint.setStyle(SkPaint::kFill_Style);
@@ -279,8 +280,8 @@ void LinkHighlightImpl::paintContents(WebDisplayItemList* webDisplayItemList, We
canvas->drawPath(m_path.skPath(), paint);
RefPtr<const SkPicture> picture = adoptRef(recorder.endRecording());
- // TODO(wkorman): Pass actual visual rect with the drawing item.
- webDisplayItemList->appendDrawingItem(IntRect(), picture.get());
+ // TODO(wkorman): Consider using m_path.skPath().getBounds() as the visual rect below.
+ webDisplayItemList->appendDrawingItem(WebRect(visualRect.x(), visualRect.y(), visualRect.width(), visualRect.height()), picture.get());
}
void LinkHighlightImpl::startHighlightAnimationIfNeeded()

Powered by Google App Engine
This is Rietveld 408576698