Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 87503003: Moving fontSelector from StyleResolver to StyleEngine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | Source/core/rendering/RenderListBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved.
9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
10 * 10 *
(...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 CSSPropertyValue(CSSPropertyFontSize, *parsedStyle), 2090 CSSPropertyValue(CSSPropertyFontSize, *parsedStyle),
2091 CSSPropertyValue(CSSPropertyLineHeight, *parsedStyle), 2091 CSSPropertyValue(CSSPropertyLineHeight, *parsedStyle),
2092 }; 2092 };
2093 2093
2094 StyleResolver& styleResolver = canvas()->document().ensureStyleResolver(); 2094 StyleResolver& styleResolver = canvas()->document().ensureStyleResolver();
2095 styleResolver.applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(properties ), newStyle.get()); 2095 styleResolver.applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(properties ), newStyle.get());
2096 2096
2097 if (state().m_realizedFont) 2097 if (state().m_realizedFont)
2098 state().m_font.fontSelector()->unregisterForInvalidationCallbacks(&modif iableState()); 2098 state().m_font.fontSelector()->unregisterForInvalidationCallbacks(&modif iableState());
2099 modifiableState().m_font = newStyle->font(); 2099 modifiableState().m_font = newStyle->font();
2100 modifiableState().m_font.update(styleResolver.fontSelector()); 2100 modifiableState().m_font.update(canvas()->document().styleEngine()->fontSele ctor());
2101 modifiableState().m_realizedFont = true; 2101 modifiableState().m_realizedFont = true;
2102 styleResolver.fontSelector()->registerForInvalidationCallbacks(&modifiableSt ate()); 2102 canvas()->document().styleEngine()->fontSelector()->registerForInvalidationC allbacks(&modifiableState());
2103 } 2103 }
2104 2104
2105 String CanvasRenderingContext2D::textAlign() const 2105 String CanvasRenderingContext2D::textAlign() const
2106 { 2106 {
2107 return textAlignName(state().m_textAlign); 2107 return textAlignName(state().m_textAlign);
2108 } 2108 }
2109 2109
2110 void CanvasRenderingContext2D::setTextAlign(const String& s) 2110 void CanvasRenderingContext2D::setTextAlign(const String& s)
2111 { 2111 {
2112 TextAlign align; 2112 TextAlign align;
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
2426 const int focusRingWidth = 5; 2426 const int focusRingWidth = 5;
2427 const int focusRingOutline = 0; 2427 const int focusRingOutline = 0;
2428 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor); 2428 c->drawFocusRing(path, focusRingWidth, focusRingOutline, focusRingColor);
2429 2429
2430 c->restore(); 2430 c->restore();
2431 2431
2432 didDraw(dirtyRect); 2432 didDraw(dirtyRect);
2433 } 2433 }
2434 2434
2435 } // namespace WebCore 2435 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | Source/core/rendering/RenderListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698