| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 5 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
| 8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. |
| 10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 | 454 |
| 455 // Map the <canvas> font into the text style. If the font uses keywords like | 455 // Map the <canvas> font into the text style. If the font uses keywords like |
| 456 // larger/smaller, these will work relative to the canvas. | 456 // larger/smaller, these will work relative to the canvas. |
| 457 RefPtr<ComputedStyle> fontStyle; | 457 RefPtr<ComputedStyle> fontStyle; |
| 458 const ComputedStyle* computedStyle = canvas()->ensureComputedStyle(); | 458 const ComputedStyle* computedStyle = canvas()->ensureComputedStyle(); |
| 459 if (computedStyle) { | 459 if (computedStyle) { |
| 460 HashMap<String, Font>::iterator i = | 460 HashMap<String, Font>::iterator i = |
| 461 m_fontsResolvedUsingCurrentStyle.find(newFont); | 461 m_fontsResolvedUsingCurrentStyle.find(newFont); |
| 462 if (i != m_fontsResolvedUsingCurrentStyle.end()) { | 462 if (i != m_fontsResolvedUsingCurrentStyle.end()) { |
| 463 DCHECK(m_fontLRUList.contains(newFont)); | 463 DCHECK(m_fontLRUList.contains(newFont)); |
| 464 m_fontLRUList.remove(newFont); | 464 m_fontLRUList.erase(newFont); |
| 465 m_fontLRUList.insert(newFont); | 465 m_fontLRUList.insert(newFont); |
| 466 modifiableState().setFont( | 466 modifiableState().setFont( |
| 467 i->value, canvas()->document().styleEngine().fontSelector()); | 467 i->value, canvas()->document().styleEngine().fontSelector()); |
| 468 } else { | 468 } else { |
| 469 MutableStylePropertySet* parsedStyle = | 469 MutableStylePropertySet* parsedStyle = |
| 470 canvasFontCache->parseFont(newFont); | 470 canvasFontCache->parseFont(newFont); |
| 471 if (!parsedStyle) | 471 if (!parsedStyle) |
| 472 return; | 472 return; |
| 473 fontStyle = ComputedStyle::create(); | 473 fontStyle = ComputedStyle::create(); |
| 474 FontDescription elementFontDescription( | 474 FontDescription elementFontDescription( |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 } | 1159 } |
| 1160 return true; | 1160 return true; |
| 1161 } | 1161 } |
| 1162 | 1162 |
| 1163 void CanvasRenderingContext2D::resetUsageTracking() { | 1163 void CanvasRenderingContext2D::resetUsageTracking() { |
| 1164 UsageCounters newCounters; | 1164 UsageCounters newCounters; |
| 1165 m_usageCounters = newCounters; | 1165 m_usageCounters = newCounters; |
| 1166 } | 1166 } |
| 1167 | 1167 |
| 1168 } // namespace blink | 1168 } // namespace blink |
| OLD | NEW |