]> git.saurik.com Git - winterboard.git/blobdiff - WBMarkup.mm
Here we go again: this time with SBIcon setAlpha.
[winterboard.git] / WBMarkup.mm
index 77d7c376238dcdc843947a747f4bcf649be53a68..9918a2837255962672a94c9b19a840cff926a693 100644 (file)
@@ -70,6 +70,13 @@ static WBMarkup *SharedMarkup_;
     MSHookSymbol(WKViewLockFocus$, "WKViewLockFocus", WebCore);
     MSHookSymbol(WKViewUnlockFocus$, "WKViewUnlockFocus", WebCore);
     MSHookSymbol(WKViewDisplayRect$, "WKViewDisplayRect", WebCore);
+
+    MSImageRef JavaScriptCore(MSGetImageByName("/System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore"));
+
+    void (*_ZN3JSC19initializeThreadingEv)();
+    MSHookSymbol(_ZN3JSC19initializeThreadingEv, "__ZN3JSC19initializeThreadingEv", JavaScriptCore);
+    if (_ZN3JSC19initializeThreadingEv != NULL)
+        (*_ZN3JSC19initializeThreadingEv)();
 }
 
 + (BOOL) isSharedMarkupCreated {
@@ -144,7 +151,7 @@ static WBMarkup *SharedMarkup_;
     origin_ = CGPointZero;
 }
 
-- (CGSize) sizeOfMarkup:(NSString *)markup forWidth:(float)width {
+- (CGSize) sizeOfMarkup:(NSString *)markup forWidth:(CGFloat)width {
     WebThreadLock();
 
     if (![self _webPrepareContextForTextDrawing:NO])
@@ -161,7 +168,7 @@ static WBMarkup *SharedMarkup_;
     return [[view_ mainFrame] renderedSizeOfNode:text_ constrainedToWidth:width];
 }
 
-- (CGSize) sizeOfString:(NSString *)string withStyle:(NSString *)style forWidth:(float)width {
+- (CGSize) sizeOfString:(NSString *)string withStyle:(NSString *)style forWidth:(CGFloat)width {
     WebThreadLock();
 
     if (![self _webPrepareContextForTextDrawing:NO])
@@ -183,7 +190,7 @@ static WBMarkup *SharedMarkup_;
     return style;
 }
 
-- (void) _setupWithStyle:(NSString *)style width:(float)width height:(float)height {
+- (void) _setupWithStyle:(NSString *)style width:(CGFloat)width height:(CGFloat)height {
     WebThreadLock();
 
     if (style != nil && [style length] != 0)