Changeset 90691 in webkit
- Timestamp:
- Jul 10, 2011, 8:37:30 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r90666 r90691 1 2011-07-10 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/9750062> REGRESSION: Button text missing in many iTunes Store pages 4 https://bugs.webkit.org/show_bug.cgi?id=64236 5 6 Reviewed by Maciej Stachowiak. 7 8 * fast/css/empty-display-none-expected.txt: Added. 9 * fast/css/empty-display-none.html: Added. 10 1 11 2011-07-08 Stephen White <senorblanco@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r90690 r90691 1 2011-07-10 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/9750062> REGRESSION: Button text missing in many iTunes Store pages 4 https://bugs.webkit.org/show_bug.cgi?id=64236 5 6 Reviewed by Maciej Stachowiak. 7 8 Test: fast/css/empty-display-none.html 9 10 When an :empty selector caused an element to not have a renderer, the check for empty style 11 change when finishing parsing the elemenet did nothing, because it could not check if the 12 element’s current style was affected by :empty. The fix is to record the fact that the style 13 was affected by :empty in ElementRareData in the no-renderer case. 14 15 * dom/Element.cpp: 16 (WebCore::Element::recalcStyle): Clear the m_styleAffectedByEmpty flag. 17 (WebCore::checkForEmptyStyleChange): If the style is null (meaning there is no renderer), check 18 Element::styleAffectedByEmpty(). 19 (WebCore::Element::setStyleAffectedByEmpty): Added. Sets the flag in rare data. 20 (WebCore::Element::styleAffectedByEmpty): Added. Checks for the flag in rare data. 21 * dom/Element.h: 22 * dom/ElementRareData.h: 23 (WebCore::ElementRareData::ElementRareData): Added m_styleAffectedByEmpty and initialized it 24 to false. 25 * dom/NodeRenderingContext.cpp: 26 (WebCore::NodeRendererFactory::createRendererAndStyle): If an element doesn’t need a renderer 27 and its style is affected by :empty, record this fact in the element by calling setStyleAffectedByEmpty(). 28 1 29 2011-07-10 Mark Rowe <mrowe@apple.com> 2 30 -
trunk/Source/WebCore/dom/Element.cpp
r90094 r90691 1103 1103 1104 1104 if ((change > NoChange || needsStyleRecalc())) { 1105 if (hasRareData()) 1106 rareData()->resetComputedStyle(); 1105 if (hasRareData()) { 1106 ElementRareData* data = rareData(); 1107 data->resetComputedStyle(); 1108 data->m_styleAffectedByEmpty = false; 1109 } 1107 1110 } 1108 1111 if (hasParentStyle && (change >= Inherit || needsStyleRecalc())) { … … 1302 1305 static void checkForEmptyStyleChange(Element* element, RenderStyle* style) 1303 1306 { 1304 if (!style )1305 return; 1306 1307 if ( style->affectedByEmpty() && (!style->emptyState() || element->hasChildNodes()))1307 if (!style && !element->styleAffectedByEmpty()) 1308 return; 1309 1310 if (!style || (style->affectedByEmpty() && (!style->emptyState() || element->hasChildNodes()))) 1308 1311 element->setNeedsStyleRecalc(); 1309 1312 } … … 1751 1754 } 1752 1755 1756 void Element::setStyleAffectedByEmpty() 1757 { 1758 ElementRareData* data = ensureRareData(); 1759 data->m_styleAffectedByEmpty = true; 1760 } 1761 1762 bool Element::styleAffectedByEmpty() const 1763 { 1764 return hasRareData() && rareData()->m_styleAffectedByEmpty; 1765 } 1766 1753 1767 AtomicString Element::computeInheritedLanguage() const 1754 1768 { -
trunk/Source/WebCore/dom/Element.h
r90026 r90691 241 241 RenderStyle* computedStyle(PseudoId = NOPSEUDO); 242 242 243 void setStyleAffectedByEmpty(); 244 bool styleAffectedByEmpty() const; 245 243 246 AtomicString computeInheritedLanguage() const; 244 247 -
trunk/Source/WebCore/dom/ElementRareData.h
r89989 r90691 51 51 OwnPtr<ClassList> m_classList; 52 52 53 bool m_styleAffectedByEmpty; 54 53 55 #if ENABLE(FULLSCREEN_API) 54 56 bool m_containsFullScreenElement; … … 64 66 : m_minimumSizeForResizing(defaultMinimumSizeForResizing()) 65 67 , m_shadowRoot(0) 68 , m_styleAffectedByEmpty(false) 66 69 #if ENABLE(FULLSCREEN_API) 67 70 , m_containsFullScreenElement(false) -
trunk/Source/WebCore/dom/NodeRenderingContext.cpp
r90536 r90691 272 272 273 273 m_context.setStyle(node->styleForRenderer(m_context)); 274 if (!node->rendererIsNeeded(m_context)) 275 return 0; 274 if (!node->rendererIsNeeded(m_context)) { 275 if (node->isElementNode()) { 276 Element* element = toElement(node); 277 if (m_context.style()->affectedByEmpty()) 278 element->setStyleAffectedByEmpty(); 279 } 280 return 0; 281 } 276 282 277 283 RenderObject* newRenderer = node->createRenderer(document->renderArena(), m_context.style());
Note:
See TracChangeset
for help on using the changeset viewer.