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

Side by Side Diff: Source/core/style/ComputedStyle.cpp

Issue 1156143002: *** NOT FOR LANDING *** Text nodes should only inherit inheritable properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Some tests need to be rebaselined. Text nodes can no longer have z-index. Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 newStyle->inheritUnicodeBidiFrom(parentStyle); 87 newStyle->inheritUnicodeBidiFrom(parentStyle);
88 newStyle->setDisplay(display); 88 newStyle->setDisplay(display);
89 return newStyle; 89 return newStyle;
90 } 90 }
91 91
92 PassRefPtr<ComputedStyle> ComputedStyle::clone(const ComputedStyle& other) 92 PassRefPtr<ComputedStyle> ComputedStyle::clone(const ComputedStyle& other)
93 { 93 {
94 return adoptRef(new ComputedStyle(other)); 94 return adoptRef(new ComputedStyle(other));
95 } 95 }
96 96
97 PassRefPtr<ComputedStyle> ComputedStyle::createWithInheritableProperties(const C omputedStyle& parentStyle)
98 {
99 RefPtr<ComputedStyle> newStyle = ComputedStyle::create();
100 newStyle->inheritFrom(parentStyle);
101 newStyle->inheritUnicodeBidiFrom(parentStyle);
102 newStyle->m_svgStyle = parentStyle.m_svgStyle;
103 return newStyle.release();
104 }
105
97 ALWAYS_INLINE ComputedStyle::ComputedStyle() 106 ALWAYS_INLINE ComputedStyle::ComputedStyle()
98 : m_box(initialStyle()->m_box) 107 : m_box(initialStyle()->m_box)
99 , visual(initialStyle()->visual) 108 , visual(initialStyle()->visual)
100 , m_background(initialStyle()->m_background) 109 , m_background(initialStyle()->m_background)
101 , surround(initialStyle()->surround) 110 , surround(initialStyle()->surround)
102 , rareNonInheritedData(initialStyle()->rareNonInheritedData) 111 , rareNonInheritedData(initialStyle()->rareNonInheritedData)
103 , rareInheritedData(initialStyle()->rareInheritedData) 112 , rareInheritedData(initialStyle()->rareInheritedData)
104 , inherited(initialStyle()->inherited) 113 , inherited(initialStyle()->inherited)
105 , m_svgStyle(initialStyle()->m_svgStyle) 114 , m_svgStyle(initialStyle()->m_svgStyle)
106 { 115 {
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1738 } 1747 }
1739 1748
1740 void ComputedStyle::copyChildDependentFlagsFrom(const ComputedStyle& other) 1749 void ComputedStyle::copyChildDependentFlagsFrom(const ComputedStyle& other)
1741 { 1750 {
1742 setEmptyState(other.emptyState()); 1751 setEmptyState(other.emptyState());
1743 if (other.hasExplicitlyInheritedProperties()) 1752 if (other.hasExplicitlyInheritedProperties())
1744 setHasExplicitlyInheritedProperties(); 1753 setHasExplicitlyInheritedProperties();
1745 } 1754 }
1746 1755
1747 } // namespace blink 1756 } // namespace blink
OLDNEW
« Source/core/layout/LayoutText.cpp ('K') | « Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698