Workaround for display:none issue.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 1 Sep 2008 01:24:46 +0000 (01:24 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 1 Sep 2008 01:24:46 +0000 (01:24 +0000)
Library.mm
control

index 3dfd3035bda56fcab2b4497b782a8966951cb4c3..34efd272a2c15e20950d98c23a0f55f5fa0ff496 100644 (file)
@@ -129,6 +129,8 @@ void WBInject(const char *classname, const char *oldname, IMP newimp, const char
 /* }}} */
 
 @protocol WinterBoard
+- (CGSize) wb_renderedSizeOfNode:(id)node constrainedToWidth:(float)width;
+- (void *) _node;
 - (void) wb_updateDesktopImage:(UIImage *)image;
 - (UIImage *) wb_defaultDesktopImage;
 - (NSString *) wb_bundlePath;
@@ -786,6 +788,16 @@ static void SBIconLabel$setInDock$(SBIconLabel<WinterBoard> *self, SEL sel, BOOL
     return [self wb_setInDock:docked];
 }
 
+@class WebCoreFrameBridge;
+static CGSize WebCoreFrameBridge$renderedSizeOfNode$constrainedToWidth$(WebCoreFrameBridge<WinterBoard> *self, SEL sel, id node, float width) {
+    if (node == nil)
+        return CGSizeZero;
+    void **core(reinterpret_cast<void **>([node _node]));
+    if (core == NULL || core[6] == NULL)
+        return CGSizeZero;
+    return [self wb_renderedSizeOfNode:node constrainedToWidth:width];
+}
+
 static void SBIconLabel$drawRect$(SBIconLabel<WinterBoard> *self, SEL sel, CGRect rect) {
     CGRect bounds = [self bounds];
 
@@ -1019,6 +1031,8 @@ extern "C" void WBInitialize() {
     WBRename(true, "UINavigationBar", @selector(setBarStyle:), (IMP) &UINavigationBar$setBarStyle$);
     WBRename(true, "UIToolbar", @selector(setBarStyle:), (IMP) &UIToolbar$setBarStyle$);
 
+    WBRename(true, "WebCoreFrameBridge", @selector(renderedSizeOfNode:constrainedToWidth:), (IMP) &WebCoreFrameBridge$renderedSizeOfNode$constrainedToWidth$);
+
     WBRename(true, "SBApplication", @selector(pathForIcon), (IMP) &SBApplication$pathForIcon);
     WBRename(true, "SBApplicationIcon", @selector(icon), (IMP) &SBApplicationIcon$icon);
     WBRename(true, "SBBookmarkIcon", @selector(icon), (IMP) &SBBookmarkIcon$icon);
diff --git a/control b/control
index 6b9cc149ea8f3b4ceb00f790715b81c54f27b779..abc93adae7544ac9b050ae7d58c2b7fb1bf81d1e 100644 (file)
--- a/control
+++ b/control
@@ -3,7 +3,7 @@ Priority: optional
 Section: System
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
-Version: 0.9.2563-1
+Version: 0.9.2564-1
 Description: more powerful, open-source SummerBoard
 Name: WinterBoard
 Depends: mobilesubstrate (>= 0.9.2560-1)