[Webkit-unassigned] [Bug 158297] Sporadic crash in HashTableAddResult following CSSValuePool::createFontFamilyValue

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 16 00:22:12 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=158297

--- Comment #10 from Myles C. Maxfield <mmaxfield at apple.com> ---
(In reply to comment #9)
> This is because of the following code in TreeResolver::styleForElement():
> 
>     if (!m_document.haveStylesheetsLoaded() && !element.renderer()) {
>         m_document.setHasNodesWithPlaceholderStyle();
>         return RenderStyle::clonePtr(*placeholderStyle);
>     }
> 
> This placeholder style does not have its font family set.

This can be resolved by the following code in ensurePlaceholderStyle()

    FontCascadeDescription fontDescription;
    fontDescription.setOneFamily(standardFamily);
    fontDescription.setKeywordSizeFromIdentifier(CSSValueMedium);
    float size = Style::fontSizeForKeyword(CSSValueMedium, false, document);
    fontDescription.setSpecifiedSize(size);
    fontDescription.setComputedSize(size);
    placeholderStyle->setFontDescription(fontDescription);

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160616/58a21ed8/attachment.html>


More information about the webkit-unassigned mailing list