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

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

Issue 16081007: Introduce toHTMLInputElement(Node*), and use it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/accessibility/AccessibilitySlider.cpp ('k') | Source/core/dom/Node.h » ('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) 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 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 1659
1660 // Do the same for animations and transitions. 1660 // Do the same for animations and transitions.
1661 style->adjustAnimations(); 1661 style->adjustAnimations();
1662 style->adjustTransitions(); 1662 style->adjustTransitions();
1663 1663
1664 // Important: Intrinsic margins get added to controls before the theme has a djusted the style, since the theme will 1664 // Important: Intrinsic margins get added to controls before the theme has a djusted the style, since the theme will
1665 // alter fonts and heights/widths. 1665 // alter fonts and heights/widths.
1666 if (e && e->isFormControlElement() && style->fontSize() >= 11) { 1666 if (e && e->isFormControlElement() && style->fontSize() >= 11) {
1667 // Don't apply intrinsic margins to image buttons. The designer knows ho w big the images are, 1667 // Don't apply intrinsic margins to image buttons. The designer knows ho w big the images are,
1668 // so we have to treat all image buttons as though they were explicitly sized. 1668 // so we have to treat all image buttons as though they were explicitly sized.
1669 if (!e->hasTagName(inputTag) || !static_cast<HTMLInputElement*>(e)->isIm ageButton()) 1669 if (!e->hasTagName(inputTag) || !toHTMLInputElement(e)->isImageButton())
1670 addIntrinsicMargins(style); 1670 addIntrinsicMargins(style);
1671 } 1671 }
1672 1672
1673 // Let the theme also have a crack at adjusting the style. 1673 // Let the theme also have a crack at adjusting the style.
1674 if (style->hasAppearance()) 1674 if (style->hasAppearance())
1675 RenderTheme::defaultTheme()->adjustStyle(this, style, e, m_state.hasUAAp pearance(), m_state.borderData(), m_state.backgroundData(), m_state.backgroundCo lor()); 1675 RenderTheme::defaultTheme()->adjustStyle(this, style, e, m_state.hasUAAp pearance(), m_state.borderData(), m_state.backgroundData(), m_state.backgroundCo lor());
1676 1676
1677 // If we have first-letter pseudo style, do not share this style. 1677 // If we have first-letter pseudo style, do not share this style.
1678 if (style->hasPseudoStyle(FIRST_LETTER)) 1678 if (style->hasPseudoStyle(FIRST_LETTER))
1679 style->setUnique(); 1679 style->setUnique();
(...skipping 2057 matching lines...) Expand 10 before | Expand all | Expand 10 after
3737 info.addMember(m_state, "state"); 3737 info.addMember(m_state, "state");
3738 3738
3739 // FIXME: move this to a place where it would be called only once? 3739 // FIXME: move this to a place where it would be called only once?
3740 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); 3740 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle");
3741 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl e"); 3741 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl e");
3742 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle" ); 3742 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle" );
3743 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo urceStyle"); 3743 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo urceStyle");
3744 } 3744 }
3745 3745
3746 } // namespace WebCore 3746 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AccessibilitySlider.cpp ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698