| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 m_contentLayer->layer()->setPosition(boundingRect.location()); | 250 m_contentLayer->layer()->setPosition(boundingRect.location()); |
| 251 | 251 |
| 252 return pathHasChanged; | 252 return pathHasChanged; |
| 253 } | 253 } |
| 254 | 254 |
| 255 void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect,
bool, WebFloatRect&) | 255 void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect,
bool, WebFloatRect&) |
| 256 { | 256 { |
| 257 if (!m_node || !m_node->renderer()) | 257 if (!m_node || !m_node->renderer()) |
| 258 return; | 258 return; |
| 259 | 259 |
| 260 PlatformContextSkia platformContext(canvas); | 260 GraphicsContext gc(canvas); |
| 261 GraphicsContext gc(&platformContext); | |
| 262 IntRect clipRect(IntPoint(webClipRect.x, webClipRect.y), IntSize(webClipRect
.width, webClipRect.height)); | 261 IntRect clipRect(IntPoint(webClipRect.x, webClipRect.y), IntSize(webClipRect
.width, webClipRect.height)); |
| 263 gc.clip(clipRect); | 262 gc.clip(clipRect); |
| 264 gc.setFillColor(m_node->renderer()->style()->tapHighlightColor(), ColorSpace
DeviceRGB); | 263 gc.setFillColor(m_node->renderer()->style()->tapHighlightColor(), ColorSpace
DeviceRGB); |
| 265 gc.fillPath(m_path); | 264 gc.fillPath(m_path); |
| 266 } | 265 } |
| 267 | 266 |
| 268 void LinkHighlight::startHighlightAnimationIfNeeded() | 267 void LinkHighlight::startHighlightAnimationIfNeeded() |
| 269 { | 268 { |
| 270 if (m_isAnimating) | 269 if (m_isAnimating) |
| 271 return; | 270 return; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). | 349 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). |
| 351 m_geometryNeedsUpdate = true; | 350 m_geometryNeedsUpdate = true; |
| 352 } | 351 } |
| 353 | 352 |
| 354 WebLayer* LinkHighlight::layer() | 353 WebLayer* LinkHighlight::layer() |
| 355 { | 354 { |
| 356 return clipLayer(); | 355 return clipLayer(); |
| 357 } | 356 } |
| 358 | 357 |
| 359 } // namespace WeKit | 358 } // namespace WeKit |
| OLD | NEW |