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

Side by Side Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 192373005: Use new is*Element() helper functions in CSS code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/resolver/StyleAdjuster.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 StyleAdjuster adjuster(state.cachedUAStyle(), m_document.inQuirksMode()) ; 711 StyleAdjuster adjuster(state.cachedUAStyle(), m_document.inQuirksMode()) ;
712 adjuster.adjustRenderStyle(state.style(), state.parentStyle(), element); 712 adjuster.adjustRenderStyle(state.style(), state.parentStyle(), element);
713 } 713 }
714 714
715 // FIXME: The CSSWG wants to specify that the effects of animations are appl ied before 715 // FIXME: The CSSWG wants to specify that the effects of animations are appl ied before
716 // important rules, but this currently happens here as we require adjustment to have happened 716 // important rules, but this currently happens here as we require adjustment to have happened
717 // before deciding which properties to transition. 717 // before deciding which properties to transition.
718 applyAnimatedProperties(state, element); 718 applyAnimatedProperties(state, element);
719 719
720 // FIXME: Shouldn't this be on RenderBody::styleDidChange? 720 // FIXME: Shouldn't this be on RenderBody::styleDidChange?
721 if (element->hasTagName(bodyTag)) 721 if (isHTMLBodyElement(*element))
722 document().textLinkColors().setTextColor(state.style()->color()); 722 document().textLinkColors().setTextColor(state.style()->color());
723 723
724 setAnimationUpdateIfNeeded(state, *element); 724 setAnimationUpdateIfNeeded(state, *element);
725 725
726 if (state.style()->hasViewportUnits()) 726 if (state.style()->hasViewportUnits())
727 document().setHasViewportUnits(); 727 document().setHasViewportUnits();
728 728
729 // Now return the style. 729 // Now return the style.
730 return state.takeStyle(); 730 return state.takeStyle();
731 } 731 }
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 bool StyleResolver::mediaQueryAffectedByViewportChange() const 1408 bool StyleResolver::mediaQueryAffectedByViewportChange() const
1409 { 1409 {
1410 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { 1410 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) {
1411 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio n) != m_viewportDependentMediaQueryResults[i]->m_result) 1411 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio n) != m_viewportDependentMediaQueryResults[i]->m_result)
1412 return true; 1412 return true;
1413 } 1413 }
1414 return false; 1414 return false;
1415 } 1415 }
1416 1416
1417 } // namespace WebCore 1417 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleAdjuster.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698