| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 m_displayList = gc.endRecording(); | 245 m_displayList = gc.endRecording(); |
| 246 | 246 |
| 247 m_contentLayer->layer()->setBounds(enclosingIntRect(boundingRect).size()
); | 247 m_contentLayer->layer()->setBounds(enclosingIntRect(boundingRect).size()
); |
| 248 } | 248 } |
| 249 | 249 |
| 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 canPaintLCDText, WebFloatRect&, WebContentLayerClient::GraphicsContextStat
us contextStatus) |
| 256 WebContentLayerClient::GraphicsContextStatus contextStatus) | 256 { |
| 257 paintContents(canvas, webClipRect, canPaintLCDText, contextStatus); |
| 258 } |
| 259 |
| 260 void LinkHighlight::paintContents(WebCanvas* canvas, const WebRect& webClipRect,
bool, WebContentLayerClient::GraphicsContextStatus contextStatus) |
| 257 { | 261 { |
| 258 if (!m_node || !m_node->renderer()) | 262 if (!m_node || !m_node->renderer()) |
| 259 return; | 263 return; |
| 260 | 264 |
| 261 GraphicsContext gc(canvas, | 265 GraphicsContext gc(canvas, |
| 262 contextStatus == WebContentLayerClient::GraphicsContextEnabled ? Graphic
sContext::NothingDisabled : GraphicsContext::FullyDisabled); | 266 contextStatus == WebContentLayerClient::GraphicsContextEnabled ? Graphic
sContext::NothingDisabled : GraphicsContext::FullyDisabled); |
| 263 IntRect clipRect(IntPoint(webClipRect.x, webClipRect.y), IntSize(webClipRect
.width, webClipRect.height)); | 267 IntRect clipRect(IntPoint(webClipRect.x, webClipRect.y), IntSize(webClipRect
.width, webClipRect.height)); |
| 264 m_displayList->setClip(clipRect); | 268 m_displayList->setClip(clipRect); |
| 265 gc.drawDisplayList(m_displayList.get()); | 269 gc.drawDisplayList(m_displayList.get()); |
| 266 } | 270 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). | 357 // Make sure we update geometry on the next callback from WebViewImpl::layou
t(). |
| 354 m_geometryNeedsUpdate = true; | 358 m_geometryNeedsUpdate = true; |
| 355 } | 359 } |
| 356 | 360 |
| 357 WebLayer* LinkHighlight::layer() | 361 WebLayer* LinkHighlight::layer() |
| 358 { | 362 { |
| 359 return clipLayer(); | 363 return clipLayer(); |
| 360 } | 364 } |
| 361 | 365 |
| 362 } // namespace blink | 366 } // namespace blink |
| OLD | NEW |