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

Side by Side Diff: sky/engine/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 838003008: Get rid of ensureStyleResolver(). (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months 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
« no previous file with comments | « sky/engine/core/frame/FrameView.cpp ('k') | no next file » | 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 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 // Now map the font property longhands into the style. 1729 // Now map the font property longhands into the style.
1730 CSSPropertyValue properties[] = { 1730 CSSPropertyValue properties[] = {
1731 CSSPropertyValue(CSSPropertyFontFamily, *parsedStyle), 1731 CSSPropertyValue(CSSPropertyFontFamily, *parsedStyle),
1732 CSSPropertyValue(CSSPropertyFontStyle, *parsedStyle), 1732 CSSPropertyValue(CSSPropertyFontStyle, *parsedStyle),
1733 CSSPropertyValue(CSSPropertyFontVariant, *parsedStyle), 1733 CSSPropertyValue(CSSPropertyFontVariant, *parsedStyle),
1734 CSSPropertyValue(CSSPropertyFontWeight, *parsedStyle), 1734 CSSPropertyValue(CSSPropertyFontWeight, *parsedStyle),
1735 CSSPropertyValue(CSSPropertyFontSize, *parsedStyle), 1735 CSSPropertyValue(CSSPropertyFontSize, *parsedStyle),
1736 CSSPropertyValue(CSSPropertyLineHeight, *parsedStyle), 1736 CSSPropertyValue(CSSPropertyLineHeight, *parsedStyle),
1737 }; 1737 };
1738 1738
1739 StyleResolver& styleResolver = canvas()->document().ensureStyleResolver(); 1739 StyleResolver& styleResolver = canvas()->document().styleResolver();
1740 styleResolver.applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(properties ), newStyle.get()); 1740 styleResolver.applyPropertiesToStyle(properties, WTF_ARRAY_LENGTH(properties ), newStyle.get());
1741 1741
1742 #if !ENABLE(OILPAN) 1742 #if !ENABLE(OILPAN)
1743 if (state().m_realizedFont) 1743 if (state().m_realizedFont)
1744 static_cast<CSSFontSelector*>(state().m_font.fontSelector())->unregister ForInvalidationCallbacks(&modifiableState()); 1744 static_cast<CSSFontSelector*>(state().m_font.fontSelector())->unregister ForInvalidationCallbacks(&modifiableState());
1745 #endif 1745 #endif
1746 modifiableState().m_font = newStyle->font(); 1746 modifiableState().m_font = newStyle->font();
1747 modifiableState().m_font.update(canvas()->document().styleEngine()->fontSele ctor()); 1747 modifiableState().m_font.update(canvas()->document().styleEngine()->fontSele ctor());
1748 modifiableState().m_realizedFont = true; 1748 modifiableState().m_realizedFont = true;
1749 canvas()->document().styleEngine()->fontSelector()->registerForInvalidationC allbacks(&modifiableState()); 1749 canvas()->document().styleEngine()->fontSelector()->registerForInvalidationC allbacks(&modifiableState());
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
2244 2244
2245 unsigned CanvasRenderingContext2D::hitRegionsCount() const 2245 unsigned CanvasRenderingContext2D::hitRegionsCount() const
2246 { 2246 {
2247 if (m_hitRegionManager) 2247 if (m_hitRegionManager)
2248 return m_hitRegionManager->getHitRegionsCount(); 2248 return m_hitRegionManager->getHitRegionsCount();
2249 2249
2250 return 0; 2250 return 0;
2251 } 2251 }
2252 2252
2253 } // namespace blink 2253 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698