=> 1fc35259649d3f3206e0b28e51ca2e0ca7776d33
[1mdiff --git a/src/app.c b/src/app.c[m [1mindex 2590da0d..eea3689f 100644[m [1m--- a/src/app.c[m [1m+++ b/src/app.c[m [36m@@ -2780,8 +2780,7 @@[m [miBool handleCommand_App(const char *cmd) {[m urlEncodePath_String(url);[m } [m setUrlFlags_DocumentWidget(doc, url,[m [31m- (isHistory ? useCachedContentIfAvailable_DocumentWidgetSetUrlFlag : 0) |[m [31m- (fromSidebar ? openedFromSidebar_DocumentWidgetSetUrlFlag : 0));[m [32m+[m[32m isHistory ? useCachedContentIfAvailable_DocumentWidgetSetUrlFlag : 0);[m /* Optionally, jump to a text in the document. This will only work if the document[m is already available, e.g., it's from "about:" or restored from cache. */[m const iRangecc gotoHeading = range_Command(cmd, "gotoheading");[m [1mdiff --git a/src/history.c b/src/history.c[m [1mindex 91416020..837b38cb 100644[m [1m--- a/src/history.c[m [1m+++ b/src/history.c[m [36m@@ -37,7 +37,7 @@[m [mvoid init_RecentUrl(iRecentUrl *d) {[m d->normScrollY = 0;[m d->cachedResponse = NULL;[m d->cachedDoc = NULL;[m [31m- d->flags.openedFromSidebar = iFalse;[m [32m+[m[32m d->flags = 0;[m }[m [m void deinit_RecentUrl(iRecentUrl *d) {[m [36m@@ -181,7 +181,7 @@[m [mvoid serialize_History(const iHistory *d, iStream *outs) {[m const iRecentUrl *item = i.value;[m serialize_String(&item->url, outs);[m write32_Stream(outs, item->normScrollY * 1.0e6f);[m [31m- writeU16_Stream(outs, item->flags.openedFromSidebar ? iBit(1) : 0);[m [32m+[m[32m writeU16_Stream(outs, item->flags);[m if (item->cachedResponse) {[m write8_Stream(outs, 1);[m serialize_GmResponse(item->cachedResponse, outs);[m [36m@@ -205,10 +205,7 @@[m [mvoid deserialize_History(iHistory *d, iStream *ins) {[m set_String(&item.url, canonicalUrl_String(&item.url));[m item.normScrollY = (float) read32_Stream(ins) / 1.0e6f;[m if (version_Stream(ins) >= addedRecentUrlFlags_FileVersion) {[m [31m- uint16_t flags = readU16_Stream(ins);[m [31m- if (flags & iBit(1)) {[m [31m- item.flags.openedFromSidebar = iTrue;[m [31m- }[m [32m+[m[32m item.flags = readU16_Stream(ins);[m }[m if (read8_Stream(ins)) {[m item.cachedResponse = new_GmResponse();[m [36m@@ -409,7 +406,7 @@[m [mvoid setCachedResponse_History(iHistory *d, const iGmResponse *response) {[m unlock_Mutex(d->mtx);[m }[m [m [31m-void setCachedDocument_History(iHistory *d, iGmDocument *doc, iBool openedFromSidebar) {[m [32m+[m[32mvoid setCachedDocument_History(iHistory *d, iGmDocument *doc) {[m lock_Mutex(d->mtx);[m iRecentUrl *item = mostRecentUrl_History(d);[m iAssert(size_GmDocument(doc).x > 0);[m [36m@@ -421,7 +418,6 @@[m [mvoid setCachedDocument_History(iHistory *d, iGmDocument *doc, iBool openedFromSi[m cstr_String(url_GmDocument(doc)));[m }[m #endif[m [31m- item->flags.openedFromSidebar = openedFromSidebar;[m if (item->cachedDoc != doc) {[m iRelease(item->cachedDoc);[m item->cachedDoc = ref_Object(doc);[m [1mdiff --git a/src/history.h b/src/history.h[m [1mindex bfb88cf4..383c132b 100644[m [1m--- a/src/history.h[m [1m+++ b/src/history.h[m [36m@@ -39,9 +39,7 @@[m [mstruct Impl_RecentUrl {[m float normScrollY; /* normalized to document height */[m iGmResponse *cachedResponse; /* kept in memory for quicker back navigation */[m iGmDocument *cachedDoc; /* cached copy of the presentation: layout and media (not serialized) */[m [31m- struct {[m [31m- uint8_t openedFromSidebar : 1;[m [31m- } flags;[m [32m+[m[32m uint16_t flags;[m };[m [m iDeclareType(MemInfo)[m [36m@@ -65,7 +63,7 @@[m [mvoid clear_History (iHistory *);[m void add_History (iHistory *, const iString *url);[m void replace_History (iHistory *, const iString *url);[m void setCachedResponse_History (iHistory *, const iGmResponse *response);[m [31m-void setCachedDocument_History (iHistory *, iGmDocument *doc, iBool openedFromSidebar);[m [32m+[m[32mvoid setCachedDocument_History (iHistory *, iGmDocument *doc);[m iBool goBack_History (iHistory *);[m iBool goForward_History (iHistory *);[m iRecentUrl *precedingLocked_History (iHistory *); /* requires manual lock/unlock! */[m [1mdiff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c[m [1mindex 4af3dd72..3bd9f059 100644[m [1m--- a/src/ui/documentwidget.c[m [1m+++ b/src/ui/documentwidget.c[m [36m@@ -220,13 +220,12 @@[m [menum iDocumentWidgetFlag {[m movingSelectMarkEnd_DocumentWidgetFlag = iBit(11),[m otherRootByDefault_DocumentWidgetFlag = iBit(12), /* links open to other root by default */[m urlChanged_DocumentWidgetFlag = iBit(13),[m [31m- openedFromSidebar_DocumentWidgetFlag = iBit(14),[m [31m- drawDownloadCounter_DocumentWidgetFlag = iBit(15),[m [31m- fromCache_DocumentWidgetFlag = iBit(16), /* don't write anything to cache */[m [31m- animationPlaceholder_DocumentWidgetFlag = iBit(17), /* avoid slow operations */[m [31m- invalidationPending_DocumentWidgetFlag = iBit(18), /* invalidate as soon as convenient */[m [31m- leftWheelSwipe_DocumentWidgetFlag = iBit(19), /* swipe state flags are used on desktop */[m [31m- rightWheelSwipe_DocumentWidgetFlag = iBit(20), [m [32m+[m[32m drawDownloadCounter_DocumentWidgetFlag = iBit(14),[m [32m+[m[32m fromCache_DocumentWidgetFlag = iBit(15), /* don't write anything to cache */[m [32m+[m[32m animationPlaceholder_DocumentWidgetFlag = iBit(16), /* avoid slow operations */[m [32m+[m[32m invalidationPending_DocumentWidgetFlag = iBit(17), /* invalidate as soon as convenient */[m [32m+[m[32m leftWheelSwipe_DocumentWidgetFlag = iBit(18), /* swipe state flags are used on desktop */[m [32m+[m[32m rightWheelSwipe_DocumentWidgetFlag = iBit(19),[m[41m [m eitherWheelSwipe_DocumentWidgetFlag = leftWheelSwipe_DocumentWidgetFlag |[m rightWheelSwipe_DocumentWidgetFlag,[m };[m [36m@@ -2144,9 +2143,7 @@[m [mstatic void documentWasChanged_DocumentWidget_(iDocumentWidget *d) {[m }[m showOrHidePinningIndicator_DocumentWidget_(d);[m if (~d->flags & fromCache_DocumentWidgetFlag) {[m [31m- setCachedDocument_History(d->mod.history,[m [31m- d->view.doc, /* keeps a ref */[m [31m- (d->flags & openedFromSidebar_DocumentWidgetFlag) != 0);[m [32m+[m[32m setCachedDocument_History(d->mod.history, d->view.doc /* keeps a ref */);[m }[m }[m [m [36m@@ -2905,14 +2902,11 @@[m [mstatic void updateFromCachedResponse_DocumentWidget_(iDocumentWidget *d, float n[m static iBool updateFromHistory_DocumentWidget_(iDocumentWidget *d) {[m const iRecentUrl *recent = constMostRecentUrl_History(d->mod.history);[m if (recent && recent->cachedResponse && equalCase_String(&recent->url, d->mod.url)) {[m [31m- iChangeFlags(d->flags,[m [31m- openedFromSidebar_DocumentWidgetFlag,[m [31m- recent->flags.openedFromSidebar);[m updateFromCachedResponse_DocumentWidget_([m d, recent->normScrollY, recent->cachedResponse, recent->cachedDoc);[m if (!recent->cachedDoc) {[m /* We have a cached copy now. */[m [31m- setCachedDocument_History(d->mod.history, d->view.doc, iFalse);[m [32m+[m[32m setCachedDocument_History(d->mod.history, d->view.doc);[m }[m return iTrue;[m }[m [36m@@ -5617,8 +5611,6 @@[m [mvoid deserializeState_DocumentWidget(iDocumentWidget *d, iStream *ins) {[m }[m [m void setUrlFlags_DocumentWidget(iDocumentWidget *d, const iString *url, int setUrlFlags) {[m [31m- iChangeFlags(d->flags, openedFromSidebar_DocumentWidgetFlag,[m [31m- (setUrlFlags & openedFromSidebar_DocumentWidgetSetUrlFlag) != 0);[m const iBool allowCache = (setUrlFlags & useCachedContentIfAvailable_DocumentWidgetSetUrlFlag) != 0;[m setLinkNumberMode_DocumentWidget_(d, iFalse);[m setUrl_DocumentWidget_(d, urlFragmentStripped_String(url));[m [36m@@ -5631,7 +5623,6 @@[m [mvoid setUrlFlags_DocumentWidget(iDocumentWidget *d, const iString *url, int setU[m [m void setUrlAndSource_DocumentWidget(iDocumentWidget *d, const iString *url, const iString *mime,[m const iBlock *source) {[m [31m- d->flags &= ~openedFromSidebar_DocumentWidgetFlag;[m setLinkNumberMode_DocumentWidget_(d, iFalse);[m setUrl_DocumentWidget_(d, url);[m parseUser_DocumentWidget_(d);[m [36m@@ -5673,11 +5664,6 @@[m [mvoid setRedirectCount_DocumentWidget(iDocumentWidget *d, int count) {[m d->redirectCount = count;[m }[m [m [31m-void setOpenedFromSidebar_DocumentWidget(iDocumentWidget *d, iBool fromSidebar) {[m [31m- iChangeFlags(d->flags, openedFromSidebar_DocumentWidgetFlag, fromSidebar);[m [31m-// setCachedDocument_History(d->mod.history, d->doc, fromSidebar);[m [31m-}[m [31m-[m iBool isRequestOngoing_DocumentWidget(const iDocumentWidget *d) {[m return d->request != NULL;[m }[m [1mdiff --git a/src/ui/documentwidget.h b/src/ui/documentwidget.h[m [1mindex 1405f19d..1bee8351 100644[m [1m--- a/src/ui/documentwidget.h[m [1m+++ b/src/ui/documentwidget.h[m [36m@@ -50,7 +50,6 @@[m [mint documentWidth_DocumentWidget (const iDocumentWidget *);[m [m enum iDocumentWidgetSetUrlFlags {[m useCachedContentIfAvailable_DocumentWidgetSetUrlFlag = iBit(1),[m [31m- openedFromSidebar_DocumentWidgetSetUrlFlag = iBit(2),[m };[m [m void setOrigin_DocumentWidget (iDocumentWidget *, const iDocumentWidget *other);[m [36m@@ -60,7 +59,6 @@[m [mvoid setUrlAndSource_DocumentWidget (iDocumentWidget *, const iString *url,[m void setInitialScroll_DocumentWidget (iDocumentWidget *, float normScrollY); /* set after content received */[m void setRedirectCount_DocumentWidget (iDocumentWidget *, int count);[m void setSource_DocumentWidget (iDocumentWidget *, const iString *sourceText);[m [31m-void setOpenedFromSidebar_DocumentWidget(iDocumentWidget *, iBool fromSidebar);[m [m void takeRequest_DocumentWidget (iDocumentWidget *, iGmRequest *finishedRequest); /* ownership given */[m [m [1mdiff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c[m [1mindex 4b4968a3..fe8ec939 100644[m [1m--- a/src/ui/sidebarwidget.c[m [1m+++ b/src/ui/sidebarwidget.c[m [36m@@ -965,7 +965,6 @@[m [mstatic void itemClicked_SidebarWidget_(iSidebarWidget *d, iSidebarItem *item, si[m const iGmHeading *head = constAt_Array(headings_GmDocument(doc), item->id);[m postCommandf_App("document.goto loc:%p", head->text.start);[m dismissPortraitPhoneSidebars_Root(as_Widget(d)->root);[m [31m- setOpenedFromSidebar_DocumentWidget(document_App(), iTrue);[m }[m break;[m }[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).