| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 } | 235 } |
| 236 | 236 |
| 237 void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect,
bool, WebFloatRect&) | 237 void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect,
bool, WebFloatRect&) |
| 238 { | 238 { |
| 239 if (!m_node || !m_node->renderer()) | 239 if (!m_node || !m_node->renderer()) |
| 240 return; | 240 return; |
| 241 | 241 |
| 242 GraphicsContext gc(canvas); | 242 GraphicsContext gc(canvas); |
| 243 IntRect clipRect(IntPoint(webClipRect.x, webClipRect.y), IntSize(webClipRect
.width, webClipRect.height)); | 243 IntRect clipRect(IntPoint(webClipRect.x, webClipRect.y), IntSize(webClipRect
.width, webClipRect.height)); |
| 244 gc.clip(clipRect); | 244 gc.clip(clipRect); |
| 245 gc.setFillColor(m_node->renderer()->style()->tapHighlightColor(), ColorSpace
DeviceRGB); | 245 gc.setFillColor(m_node->renderer()->style()->tapHighlightColor()); |
| 246 gc.fillPath(m_path); | 246 gc.fillPath(m_path); |
| 247 } | 247 } |
| 248 | 248 |
| 249 void LinkHighlight::startHighlightAnimationIfNeeded() | 249 void LinkHighlight::startHighlightAnimationIfNeeded() |
| 250 { | 250 { |
| 251 if (m_isAnimating) | 251 if (m_isAnimating) |
| 252 return; | 252 return; |
| 253 | 253 |
| 254 m_isAnimating = true; | 254 m_isAnimating = true; |
| 255 const float startOpacity = 1; | 255 const float startOpacity = 1; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). | 334 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). |
| 335 m_geometryNeedsUpdate = true; | 335 m_geometryNeedsUpdate = true; |
| 336 } | 336 } |
| 337 | 337 |
| 338 WebLayer* LinkHighlight::layer() | 338 WebLayer* LinkHighlight::layer() |
| 339 { | 339 { |
| 340 return clipLayer(); | 340 return clipLayer(); |
| 341 } | 341 } |
| 342 | 342 |
| 343 } // namespace WeKit | 343 } // namespace WeKit |
| OLD | NEW |