| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 if (pathHasChanged) { | 220 if (pathHasChanged) { |
| 221 m_path = newPath; | 221 m_path = newPath; |
| 222 m_contentLayer->layer()->setBounds(enclosingIntRect(boundingRect).size()
); | 222 m_contentLayer->layer()->setBounds(enclosingIntRect(boundingRect).size()
); |
| 223 } | 223 } |
| 224 | 224 |
| 225 m_contentLayer->layer()->setPosition(boundingRect.location()); | 225 m_contentLayer->layer()->setPosition(boundingRect.location()); |
| 226 | 226 |
| 227 return pathHasChanged; | 227 return pathHasChanged; |
| 228 } | 228 } |
| 229 | 229 |
| 230 void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect,
bool, WebFloatRect&) | 230 void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect,
bool, WebFloatRect&, bool deferred) |
| 231 { | 231 { |
| 232 if (!m_node || !m_node->renderer()) | 232 if (!m_node || !m_node->renderer()) |
| 233 return; | 233 return; |
| 234 | 234 |
| 235 PlatformContextSkia platformContext(canvas); | 235 PlatformContextSkia platformContext(canvas); |
| 236 platformContext.setDeferred(deferred); |
| 236 GraphicsContext gc(&platformContext); | 237 GraphicsContext gc(&platformContext); |
| 237 IntRect clipRect(IntPoint(webClipRect.x, webClipRect.y), IntSize(webClipRect
.width, webClipRect.height)); | 238 IntRect clipRect(IntPoint(webClipRect.x, webClipRect.y), IntSize(webClipRect
.width, webClipRect.height)); |
| 238 gc.clip(clipRect); | 239 gc.clip(clipRect); |
| 239 gc.setFillColor(m_node->renderer()->style()->tapHighlightColor(), ColorSpace
DeviceRGB); | 240 gc.setFillColor(m_node->renderer()->style()->tapHighlightColor(), ColorSpace
DeviceRGB); |
| 240 gc.fillPath(m_path); | 241 gc.fillPath(m_path); |
| 241 } | 242 } |
| 242 | 243 |
| 243 void LinkHighlight::startHighlightAnimationIfNeeded() | 244 void LinkHighlight::startHighlightAnimationIfNeeded() |
| 244 { | 245 { |
| 245 if (m_isAnimating) | 246 if (m_isAnimating) |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). | 326 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). |
| 326 m_geometryNeedsUpdate = true; | 327 m_geometryNeedsUpdate = true; |
| 327 } | 328 } |
| 328 | 329 |
| 329 WebLayer* LinkHighlight::layer() | 330 WebLayer* LinkHighlight::layer() |
| 330 { | 331 { |
| 331 return clipLayer(); | 332 return clipLayer(); |
| 332 } | 333 } |
| 333 | 334 |
| 334 } // namespace WeKit | 335 } // namespace WeKit |
| OLD | NEW |