[Webkit-unassigned] [Bug 65123] New: Font loading during layout can cause layout code to be re-entered via resource load delegate
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 25 11:09:01 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=65123
Summary: Font loading during layout can cause layout code to be
re-entered via resource load delegate
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: mitz at webkit.org
Font loading during layout can cause layout code to be re-entered via resource load delegate
Here is an example:
#import <Foundation/Foundation.h>
#import <WebKit/WebKit.h>
@interface ResourceLoadDelegate : NSObject {
}
@end
@implementation ResourceLoadDelegate
- (NSURLRequest *)webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource
{
if ([[[request URL] path] hasSuffix:@".ttf"]) {
DOMElement *documentElement = [[[sender mainFrame] DOMDocument] documentElement];
[[documentElement style] setProperty:@"display" value:@"none" priority:@""];
[documentElement offsetTop];
}
return request;
}
@end
int main (int argc, const char * argv[])
{
@autoreleasepool {
WebView *webView = [[WebView alloc] initWithFrame:NSZeroRect frameName:nil groupName:[[NSBundle mainBundle] bundleIdentifier]];
ResourceLoadDelegate *delegate = [[ResourceLoadDelegate alloc] init];
webView.resourceLoadDelegate = delegate;
[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.alistapart.com/d/cssatten/heid.html"]]];
[[NSRunLoop mainRunLoop] run];
}
return 0;
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list