From ea173384eb3f0b9652fba63f188a0599f8842c7b Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 22 Jun 2009 11:35:37 +0000 Subject: [PATCH] Drastic performance and stability increases. --- Cydia.app/Sources/cydia.ifoneguide.nl.png | Bin 3464 -> 0 bytes Cydia.mm | 19 ++++++++- Library/firmware.sh | 33 ++++++++++++--- UICaboodle/BrowserView.h | 2 + UICaboodle/BrowserView.mm | 48 +++++++++++++++++++--- control | 2 +- 6 files changed, 92 insertions(+), 12 deletions(-) delete mode 100644 Cydia.app/Sources/cydia.ifoneguide.nl.png diff --git a/Cydia.app/Sources/cydia.ifoneguide.nl.png b/Cydia.app/Sources/cydia.ifoneguide.nl.png deleted file mode 100644 index 70278016ac61db5f4f136aa191ffaf3b32ab870c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3464 zcmV;34R`X1P)57rKP2(eik`=`0&=RzWVAPQ>RW{ z7j$1%yuwdB@kG!3{QL#2Teoie>#x7+BInMX)A4(j8Z~OTtgI|GeC^t`-Nzq)yi>-g z=bn3Rb5ez8&6@SMf`WqSr%#`*DdU1}I6FJrMIsUX`;tp8Nw|LE#0h;3yDyX$Bb+HI zDVaEF(xll53eT7^V?wW9y=ERiempA~%&SVV`t|F(i!Z*|)vH&})vi;=)j7X8chN-` z>2=+hc+150bN1|69UxEk>3;g@CwKDXN%zAKKLoDD9I{SXadGh&q3A!O3IpStZ@#(Y zmtTIV79!TFRm;__Ti0E7*=6p^E3Z`R`wCS?e*5h=Rs6#bKU6~mDUGL#ii&y`78Y(* z3<+Q7i=}E-B~MYZMT-`$VZ(+lCnrZeSY6x&G3NawMyc7kbLR!}XD4Oks}&) zkN)_h@(;0BUkGXpP|`pQnInG(MsNvSVRVr1c8SP8ITEbWRB#;#49Hm-T|<`v$H zazxV~MZv9Gx5jufm4Lj12M;E!%bG?PV#UuAu|q0cKO&o{lTNS#W_YwihYr!a86?cf zW~J(JpMU;&XeE6Sx@q7$B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Fx!w*Njo9cvd^ytwkPc(hc z`kq7ic(JYts?88s8zkco>_Nv+$tF}*a|#P%*6-iHe0*&n43yvPjv! zefxAC<`a&W$>KUB3+O$}&ET3Z+{1P5^FOnF@yd1oy%;unFMs>*Z9T^7;$r=by|G6= ziL|WFl~%0ssn-QsV1ilqI#WK|dBGqX|yHI0#QIpaJ#1 ze_HzV(@(2{zOqzS7Kf^TL)FJRaGeN@A#Lv%2qT*zIIZzFTPD3{rFiV~5{|(asfc1Y$=t>{ zzO!V>k{I5_^Uyde33q4FH?p2%<{73S>qM&{k42vGmqsvQshd#8;OQ|*(QgRF&n8#cl#cf_L8rQv3fc#X#yi00 zY?}K?F9ITzjn<}BmW#@9=!-H|X*O13a?f>Yd6L39k|NtB2WMpfWd z8%Ow!)>a-1hv|r>O`Dc*#^ejNE5Fa;xW+mdJ3X;Oe*2*ctte+x9G_AO(z{wamuh}G zELy`1`}S@8Grh9uAe8_;&_S@_d%Pw?OER(iT?MgYx}H&I!Z8aZK~b|Rgn8jGxw|q{ zi5s2u7x7tHS*zsD&`f_G$ms%*=jfIv5vhKI8HNs=SVDtjr>GeUKkfOGDcnNdaP*N= z*;!E>ZqoO*ZrxfB@$HPtP8{i(X(Ktlu@e#=v}Jmp7D8y!dDimZ=p#mvf%NegD!*R9 zakgBy@@Ck3t|~G(Oq%)wjU(kcxj==>l?L8R{|}U1TCPisB>g{1!fPHL{ka?td@;}c qzU7c|)VY7j;I|WjKkfaW00RK!x>dJnptZLE0000&2 + + if [[ ${line} == '' && "${blank+@}" ]]; then + continue + else + unset blank + fi + if [[ ${line} == 'Package: firmware' ]]; then firmware= elif [[ ${line} == '' ]]; then - unset firmware - elif [[ "${firmware+@}" ]]; then + blank= + fi + + if [[ "${firmware+@}" ]]; then + if [[ "${blank+@}" ]]; then + unset firmware + fi continue fi + #echo "${firmware+@}/${blank+@} ${line}" 1>&2 echo "${line}" -done >/var/lib/dpkg/status_ +done -cat >>/var/lib/dpkg/status_ <&2 +if ! [[ "${blank+@}" || "${firmware+@}" ]]; then + echo +fi + +cat </var/lib/dpkg/status_ + mv -f /var/lib/dpkg/status{_,} echo "/." >/var/lib/dpkg/info/firmware.list diff --git a/UICaboodle/BrowserView.h b/UICaboodle/BrowserView.h index f1a9dbcb..bd956b83 100644 --- a/UICaboodle/BrowserView.h +++ b/UICaboodle/BrowserView.h @@ -80,6 +80,8 @@ Class class_; } ++ (void) _initialize; + - (void) alertSheet:(UIActionSheet *)sheet buttonClicked:(int)button; - (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy; diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index b99c2d2b..e08c291f 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -6,6 +6,7 @@ extern NSString * const kCAFilterNearest; #include +#include #include "substrate.h" @@ -209,12 +210,28 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize( /* }}} */ #endif +#define ShowInternals 0 +#define LogBrowser 0 + +#define lprintf(args...) fprintf(stderr, args) + @implementation BrowserView #if ShowInternals -#include "Internals.h" +#include "UICaboodle/UCInternal.h" #endif ++ (void) _initialize { + NSLog(@"INITIALIZING"); + [WebView enableWebThread]; + + WebPreferences *preferences([WebPreferences standardPreferences]); + [preferences setCacheModel:WebCacheModelDocumentBrowser]; + [preferences setOfflineWebApplicationCacheEnabled:YES]; + + [WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]; +} + - (void) dealloc { #if LogBrowser NSLog(@"[BrowserView dealloc]"); @@ -232,9 +249,8 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize( [webview setScriptDebugDelegate:nil]; [webview setPolicyDelegate:nil]; - [webview setDownloadDelegate:nil]; - /* XXX: these are set by UIWebDocumentView + [webview setDownloadDelegate:nil]; [webview _setFormDelegate:nil]; [webview _setUIKitDelegate:nil]; [webview setEditingDelegate:nil];*/ @@ -425,6 +441,13 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize( return false; } +- (void) formAssistant:(id)sender didBeginEditingFormNode:(id)node { +} + +- (void) formAssistant:(id)sender didEndEditingFormNode:(id)node { + [self fixScroller]; +} + - (void) webViewShow:(WebView *)sender { /* XXX: this is where I cry myself to sleep */ } @@ -1214,17 +1237,25 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize( [webview_ setTileSize:CGSizeMake(webrect.size.width, 500)]; + if ([webview_ respondsToSelector:@selector(enableReachability)]) + [webview_ enableReachability]; + [webview_ setAllowsMessaging:YES]; + if ([webview_ respondsToSelector:@selector(useSelectionAssistantWithMode:)]) + [webview_ useSelectionAssistantWithMode:0]; + [webview_ setTilingEnabled:YES]; [webview_ setDrawsGrid:NO]; [webview_ setLogsTilingChanges:NO]; [webview_ setTileMinificationFilter:kCAFilterNearest]; + if ([webview_ respondsToSelector:@selector(setDataDetectorTypes:)]) /* XXX: abstractify */ [webview_ setDataDetectorTypes:0x80000000]; else [webview_ setDetectsPhoneNumbers:NO]; + [webview_ setAutoresizes:YES]; [webview_ setMinimumScale:0.25f forDocumentTypes:0x10]; @@ -1252,8 +1283,13 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize( [webview _setUsesLoaderCache:YES]; [webview setGroupName:@"CydiaGroup"]; + + WebPreferences *preferences([webview preferences]); + if ([webview respondsToSelector:@selector(_setLayoutInterval:)]) [webview _setLayoutInterval:0]; + else + [preferences _setLayoutInterval:0]; } [self setViewportWidth:width]; @@ -1270,10 +1306,12 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize( indirect_ = [[IndirectDelegate alloc] initWithDelegate:self]; [webview setFrameLoadDelegate:indirect_]; + [webview setPolicyDelegate:indirect_]; [webview setResourceLoadDelegate:indirect_]; [webview setUIDelegate:indirect_]; - [webview setScriptDebugDelegate:indirect_]; - [webview setPolicyDelegate:indirect_]; + + /* XXX: do not turn this on under penalty of extreme pain */ + [webview setScriptDebugDelegate:nil]; WebThreadUnlock(); diff --git a/control b/control index c59c8970..fb262dc5 100644 --- a/control +++ b/control @@ -3,7 +3,7 @@ Priority: required Section: Packaging Maintainer: Jay Freeman (saurik) Architecture: iphoneos-arm -Version: 1.0.2936-1 +Version: 1.0.2942-1 Replaces: com.sosiphone.addcydia Depends: apr-lib, apt7-lib, apt7-key, darwintools, pcre, shell-cmds, system-cmds Pre-Depends: dpkg (>= 1.14.25-8) -- 2.45.2