Changeset 202127 in webkit
- Timestamp:
- Jun 16, 2016 10:10:38 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202125 r202127 1 2016-06-16 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Sporadic crash in HashTableAddResult following CSSValuePool::createFontFamilyValue 4 https://bugs.webkit.org/show_bug.cgi?id=158297 5 6 Reviewed by Darin Adler. 7 8 * fast/text/placeholder-renderstyle-null-font-expected.txt: Added. 9 * fast/text/placeholder-renderstyle-null-font.html: Added. 10 1 11 2016-06-15 Keith Miller <keith_miller@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r202126 r202127 1 2016-06-16 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Sporadic crash in HashTableAddResult following CSSValuePool::createFontFamilyValue 4 https://bugs.webkit.org/show_bug.cgi?id=158297 5 6 Reviewed by Darin Adler. 7 8 In an effort to reduce the flash of unstyled content, we force all elements 9 to have display: none during an external stylesheet load. We do this by 10 ignoring the CSS cascade and forcing all elements to have a placeholder style 11 which hardcodes display: none. (This is necessary to make elements created by 12 script during the stylesheet load not flash.) 13 14 This style is exposed to web content via getComputedStyle(), which means it 15 needs to maintain the invariant that font-families can never be null strings. 16 We enforce this by forcing the font-family to be the standard font name. 17 18 Test: fast/text/placeholder-renderstyle-null-font.html 19 20 * style/StyleTreeResolver.cpp: 21 (WebCore::Style::ensurePlaceholderStyle): 22 1 23 2016-06-16 Chris Dumez <cdumez@apple.com> 2 24 -
trunk/Source/WebCore/style/StyleTreeResolver.cpp
r202091 r202127 44 44 #include "Settings.h" 45 45 #include "ShadowRoot.h" 46 #include "StyleFontSizeFunctions.h" 46 47 #include "StyleResolver.h" 47 48 #include "Text.h" … … 64 65 placeholderStyle->setDisplay(NONE); 65 66 placeholderStyle->setIsPlaceholderStyle(); 67 68 FontCascadeDescription fontDescription; 69 fontDescription.setOneFamily(standardFamily); 70 fontDescription.setKeywordSizeFromIdentifier(CSSValueMedium); 71 float size = Style::fontSizeForKeyword(CSSValueMedium, false, document); 72 fontDescription.setSpecifiedSize(size); 73 fontDescription.setComputedSize(size); 74 placeholderStyle->setFontDescription(fontDescription); 75 66 76 placeholderStyle->fontCascade().update(&document.fontSelector()); 67 77 }
Note: See TracChangeset
for help on using the changeset viewer.