Changeset 98805 in webkit
- Timestamp:
- Oct 29, 2011 7:52:05 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 12 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r98800 r98805 1 2011-10-27 Robert Hogan <robert@webkit.org> 2 3 CSS 2.1 failure: dynamic-top-change-001 to 004 fail 4 https://bugs.webkit.org/show_bug.cgi?id=68149 5 6 Reviewed by David Hyatt. 7 8 * css2.1/20110323/dynamic-top-change-001.htm: Added. 9 * css2.1/20110323/dynamic-top-change-002.htm: Added. 10 * css2.1/20110323/dynamic-top-change-003.htm: Added. 11 * css2.1/20110323/dynamic-top-change-004.htm: Added. 12 * fast/table/border-collapsing/cached-change-tbody-border-color-expected.png: 13 See https://bugs.webkit.org/show_bug.cgi?id=68149#c15 14 * platform/chromium-linux/css2.1/20110323/dynamic-top-change-001-expected.png: Added. 15 * platform/chromium-linux/css2.1/20110323/dynamic-top-change-001-expected.txt: Added. 16 * platform/chromium-linux/css2.1/20110323/dynamic-top-change-002-expected.png: Added. 17 * platform/chromium-linux/css2.1/20110323/dynamic-top-change-002-expected.txt: Added. 18 * platform/chromium-linux/css2.1/20110323/dynamic-top-change-003-expected.png: Added. 19 * platform/chromium-linux/css2.1/20110323/dynamic-top-change-003-expected.txt: Added. 20 * platform/chromium-linux/css2.1/20110323/dynamic-top-change-004-expected.png: Added. 21 * platform/chromium-linux/css2.1/20110323/dynamic-top-change-004-expected.txt: Added. 22 1 23 2011-10-28 Antti Koivisto <antti@apple.com> 2 24 -
trunk/Source/WebCore/ChangeLog
r98803 r98805 1 2011-10-28 Robert Hogan <robert@webkit.org> 2 3 CSS 2.1 failure: dynamic-top-change-001 to 004 fail 4 https://bugs.webkit.org/show_bug.cgi?id=68149 5 6 Reviewed by David Hyatt. 7 8 In these tests a child inherits its top value from its parent and the parent's top value 9 is later updated by an onload event. The updated value is expected to cascade to the child. 10 11 The tests were failing because updating the value did not cascade immediately to the child inheriting it, though 12 it could be forced eventually with a full recalculation of the RenderStyle by changing the zoom factor 13 or opening the inspector. 14 15 The fix is to let the parent RenderStyle know that a child inherits a property explicitly and 16 recalculate children's style if the parent ever changes. This only happens if the property is inherited 17 explicitly, it does not apply to cases where the property is inherited by default. 18 19 * css/CSSStyleSelector.cpp: 20 (WebCore::CSSStyleSelector::applyProperty): 21 * dom/Node.cpp: 22 (WebCore::Node::diff): 23 * rendering/style/RenderStyle.cpp: 24 (WebCore::RenderStyle::RenderStyle): 25 * rendering/style/RenderStyle.h: 26 (WebCore::InheritedFlags::setHasExplicitlyInheritedProperties): 27 (WebCore::InheritedFlags::hasExplicitlyInheritedProperties): 28 1 29 2011-10-29 Antti Koivisto <antti@apple.com> 2 30 -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r98803 r98805 2497 2497 2498 2498 CSSPropertyID property = static_cast<CSSPropertyID>(id); 2499 2500 if (isInherit && m_parentStyle && !m_parentStyle->hasExplicitlyInheritedProperties() && !CSSProperty::isInheritedProperty(property)) 2501 m_parentStyle->setHasExplicitlyInheritedProperties(); 2499 2502 2500 2503 // check lookup table for implementations and use when available -
trunk/Source/WebCore/dom/Node.cpp
r98659 r98805 303 303 Node::StyleChange Node::diff(const RenderStyle* s1, const RenderStyle* s2) 304 304 { 305 // FIXME: The behavior of this function is just totally wrong. It doesn't handle306 // explicit inheritance of non-inherited properties and so you end up not re-resolving307 // style in cases where you need to.308 305 StyleChange ch = NoInherit; 309 306 EDisplay display1 = s1 ? s1->display() : NONE; … … 325 322 else if (s1->inheritedNotEqual(s2)) 326 323 ch = Inherit; 327 324 else if (s1->hasExplicitlyInheritedProperties() || s2->hasExplicitlyInheritedProperties()) 325 ch = Inherit; 326 328 327 // For nth-child and other positional rules, treat styles as different if they have 329 328 // changed positionally in the DOM. This way subsequent sibling resolutions won't be confused -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r98542 r98805 86 86 , m_firstChildState(false) 87 87 , m_lastChildState(false) 88 , m_explicitInheritance(false) 88 89 , m_childIndex(0) 89 90 , m_box(defaultStyle()->m_box) … … 115 116 , m_firstChildState(false) 116 117 , m_lastChildState(false) 118 , m_explicitInheritance(false) 117 119 , m_childIndex(0) 118 120 { … … 155 157 , m_firstChildState(false) 156 158 , m_lastChildState(false) 159 , m_explicitInheritance(false) 157 160 , m_childIndex(0) 158 161 , m_box(o.m_box) -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r98748 r98805 144 144 bool m_firstChildState : 1; 145 145 bool m_lastChildState : 1; 146 unsigned m_childIndex : 21; // Plenty of bits to cache an index. 146 bool m_explicitInheritance : 1; 147 unsigned m_childIndex : 20; // Plenty of bits to cache an index. 147 148 148 149 // non-inherited attributes … … 164 165 #endif 165 166 166 // !START SYNC!: Keep this in sync with the copy constructor in RenderStyle.cpp 167 // !START SYNC!: Keep this in sync with the copy constructor in RenderStyle.cpp and implicitlyInherited() in CSSStyleSelector.cpp 167 168 168 169 // inherit … … 1353 1354 Color visitedDependentColor(int colorProperty) const; 1354 1355 1356 void setHasExplicitlyInheritedProperties() { m_explicitInheritance = true; } 1357 bool hasExplicitlyInheritedProperties() const { return m_explicitInheritance; } 1358 1355 1359 // Initial values for all the properties 1356 1360 static EBorderCollapse initialBorderCollapse() { return BSEPARATE; }
Note: See TracChangeset
for help on using the changeset viewer.