Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r174273 - REGRESSION (r173531): Use after free in WebCore::Rend…
…erStyle::fontMetrics / WebCore::CSSPrimitiveValue::computeLengthDouble https://bugs.webkit.org/show_bug.cgi?id=136864 Reviewed by Andreas Kling. Source/WebCore: FontLoader previously called updateDocumentStyleIfNeeded, which would reset styles currently in use as part of the tabIndex calculation. The FontLoader should instead wait for pending stylesheets to load. Tests: fast/css/fontloader-tab-index.html * css/FontLoader.cpp: (WebCore::FontLoader::notifyWhenFontsReady): Do not immediately call loadingDone(). (WebCore::FontLoader::loadingDone): Wait for stylesheets to finish loading rather than updating document styles. * css/FontLoader.h: (WebCore::FontLoader::loading): Include JS font loads when testing for the loading state. LayoutTests: Test that getting the tab index on a body element with font-relative measurements to a local @font-face do not cause a crash. * fast/css/fontloader-tab-index-expected.html: Added. * fast/css/fontloader-tab-index.html: Added. Canonical link: https://commits.webkit.org/154760.102@webkitgtk/2.6 git-svn-id: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.6@174954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
ed4d832
commit 41f4f50
Showing
6 changed files
with
78 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<style> | ||
@font-face { | ||
font-family: 'times'; | ||
src: local('Lucida Grande'); | ||
} | ||
body { | ||
margin: 1ex; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
Fetching tabIndex should not cause a crash when involving font-relative units on the body element of the document. | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<style> | ||
@font-face { | ||
font-family: 'times'; | ||
src: local('Lucida Grande'); | ||
} | ||
body { | ||
margin: 1ex; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<script> | ||
var idx = document.querySelector("body").tabIndex; | ||
</script> | ||
Fetching tabIndex should not cause a crash when involving font-relative units on the body element of the document. | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters