[1mdiff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c[m
[1mindex 9dea6cbb..1f84aed6 100644[m
[1m--- a/src/ui/documentwidget.c[m
[1m+++ b/src/ui/documentwidget.c[m
[36m@@ -166,6 +166,7 @@[m [mstruct Impl_DocumentWidget {[m
iWidget widget;[m
enum iRequestState state;[m
iModel mod;[m
[32m+[m[32m int flags;[m
iString * titleUser;[m
iGmRequest * request;[m
iAtomicInt isRequestUpdated; /* request has new content, need to parse it */[m
[36m@@ -178,8 +179,6 @@[m [mstruct Impl_DocumentWidget {[m
iDate certExpiry;[m
iString * certSubject;[m
int redirectCount;[m
[31m- int flags;[m
[31m-// iBool selecting;[m
iRangecc selectMark;[m
iRangecc foundMark;[m
int pageMargin;[m
[36m@@ -190,17 +189,10 @@[m [mstruct Impl_DocumentWidget {[m
int playerTimer;[m
const iGmRun * hoverLink;[m
const iGmRun * contextLink;[m
[31m-// iBool noHoverWhileScrolling;[m
[31m-// iBool showLinkNumbers;[m
const iGmRun * firstVisibleRun;[m
const iGmRun * lastVisibleRun;[m
iClick click;[m
float initNormScrollY;[m
[31m-// int scrollY;[m
[31m-// int smoothScroll;[m
[31m-// int smoothSpeed;[m
[31m-// int smoothLastOffset;[m
[31m-// iBool smoothContinue;[m
iAnim scrollY;[m
iAnim sideOpacity;[m
iAnim outlineOpacity;[m
[36m@@ -220,6 +212,7 @@[m [mvoid init_DocumentWidget(iDocumentWidget *d) {[m
setId_Widget(w, "document000");[m
setFlags_Widget(w, hover_WidgetFlag, iTrue);[m
init_Model(&d->mod);[m
[32m+[m[32m d->flags = 0;[m
iZap(d->certExpiry);[m
d->certFlags = 0;[m
d->certSubject = new_String();[m
[36m@@ -232,19 +225,11 @@[m [mvoid init_DocumentWidget(iDocumentWidget *d) {[m
d->redirectCount = 0;[m
d->initNormScrollY = 0;[m
init_Anim(&d->scrollY, 0);[m
[31m-// d->scrollY = 0;[m
[31m-// d->smoothScroll = 0;[m
[31m-// d->smoothSpeed = 0;[m
[31m-// d->smoothLastOffset = 0;[m
[31m-// d->smoothContinue = iFalse;[m
[31m- d->flags = 0;[m
d->selectMark = iNullRange;[m
d->foundMark = iNullRange;[m
d->pageMargin = 5;[m
d->hoverLink = NULL;[m
d->contextLink = NULL;[m
[31m-// d->noHoverWhileScrolling = iFalse;[m
[31m-// d->showLinkNumbers = iFalse;[m
d->firstVisibleRun = NULL;[m
d->lastVisibleRun = NULL;[m
d->visBuf = new_VisBuf();[m
[36m@@ -931,23 +916,8 @@[m [mstatic iBool updateFromHistory_DocumentWidget_(iDocumentWidget *d) {[m
[m
static void refreshWhileScrolling_DocumentWidget_(iAny *ptr) {[m
iDocumentWidget *d = ptr;[m
[31m-// if (isFinished_Anim(&d-> isSmoothScrolling_DocumentWidget_(d)) {[m
[31m-// return; /* was cancelled */[m
[31m-// }[m
[31m-// const double elapsed = (double) elapsedSinceLastTicker_App() / 1000.0;[m
[31m-// int delta = d->smoothSpeed * elapsed * iSign(d->smoothScroll);[m
[31m-// if (iAbs(d->smoothScroll) <= iAbs(delta)) {[m
[31m-// if (d->smoothContinue) {[m
[31m-// d->smoothScroll += d->smoothLastOffset;[m
[31m-// }[m
[31m-// else {[m
[31m-// delta = d->smoothScroll;[m
[31m-// }[m
[31m-// }[m
updateVisible_DocumentWidget_(d);[m
refresh_Widget(d);[m
[31m-// scroll_DocumentWidget_(d, delta);[m
[31m-// d->smoothScroll -= delta;[m
if (!isFinished_Anim(&d->scrollY)) {[m
addTicker_App(refreshWhileScrolling_DocumentWidget_, d);[m
}[m
[36m@@ -955,7 +925,6 @@[m [mstatic void refreshWhileScrolling_DocumentWidget_(iAny *ptr) {[m
[m
static void smoothScroll_DocumentWidget_(iDocumentWidget *d, int offset, int duration) {[m
int destY = targetValue_Anim(&d->scrollY) + offset;[m
[31m-// d->scrollY += offset;[m
if (destY < 0) {[m
destY = 0;[m
}[m
[36m@@ -969,14 +938,6 @@[m [mstatic void smoothScroll_DocumentWidget_(iDocumentWidget *d, int offset, int dur[m
setValueEased_Anim(&d->scrollY, destY, duration);[m
updateVisible_DocumentWidget_(d);[m
refresh_Widget(as_Widget(d));[m
[31m-[m
[31m- // if (speed == 0) {[m
[31m-// scroll_DocumentWidget_(d, offset);[m
[31m-// return;[m
[31m-// }[m
[31m-// d->smoothSpeed = speed;[m
[31m-// d->smoothScroll += offset;[m
[31m-// d->smoothLastOffset = offset;[m
if (duration > 0) {[m
iChangeFlags(d->flags, noHoverWhileScrolling_DocumentWidgetFlag, iTrue);[m
addTicker_App(refreshWhileScrolling_DocumentWidget_, d);[m
[36m@@ -984,13 +945,9 @@[m [mstatic void smoothScroll_DocumentWidget_(iDocumentWidget *d, int offset, int dur[m
}[m
[m
static void scroll_DocumentWidget_(iDocumentWidget *d, int offset) {[m
[31m- smoothScroll_DocumentWidget_(d, offset, 0 /* instant */);[m
[32m+[m[32m smoothScroll_DocumentWidget_(d, offset, 0 /* instantly */);[m
}[m
[m
[31m-//static iBool isSmoothScrolling_DocumentWidget_(const iDocumentWidget *d) {[m
[31m-// return d->smoothScroll != 0;[m
[31m-//}[m
[31m-[m
static void scrollTo_DocumentWidget_(iDocumentWidget *d, int documentY, iBool centered) {[m
init_Anim(&d->scrollY,[m
documentY - (centered ? documentBounds_DocumentWidget_(d).size.y / 2[m
[36m@@ -1515,12 +1472,7 @@[m [mstatic iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)[m
}[m
else if (equalWidget_Command(cmd, w, "scroll.page")) {[m
if (argLabel_Command(cmd, "repeat")) {[m
[31m-// if (!d->smoothContinue) {[m
[31m-// d->smoothContinue = iTrue;[m
[31m-// }[m
[31m-// else {[m
[31m-// return iTrue;[m
[31m-// }[m
[32m+[m[32m /* TODO: Adjust scroll animation to be linear during repeated scroll? */[m
}[m
smoothScroll_DocumentWidget_(d,[m
arg_Command(cmd) *[m
[36m@@ -1845,8 +1797,7 @@[m [mstatic iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e[m
smoothScroll_DocumentWidget_([m
d,[m
-3 * ev->wheel.y * lineHeight_Text(paragraph_FontId) * acceleration,[m
[31m- smoothDuration_DocumentWidget_); /* +[m
[31m- (isSmoothScrolling_DocumentWidget_(d) ? d->smoothSpeed : 0)); */[m
[32m+[m[32m smoothDuration_DocumentWidget_);[m
#endif[m
iChangeFlags(d->flags, noHoverWhileScrolling_DocumentWidgetFlag, iTrue);[m
return iTrue;[m
[36m@@ -2603,7 +2554,6 @@[m [mconst iString *bookmarkTitle_DocumentWidget(const iDocumentWidget *d) {[m
return collect_String(joinCStr_StringArray(title, " \u2014 "));[m
}[m
[m
[31m-[m
void serializeState_DocumentWidget(const iDocumentWidget *d, iStream *outs) {[m
serialize_Model(&d->mod, outs);[m
}[m
[36m@@ -2650,8 +2600,6 @@[m [mvoid setRedirectCount_DocumentWidget(iDocumentWidget *d, int count) {[m
}[m
[m
iBool isRequestOngoing_DocumentWidget(const iDocumentWidget *d) {[m
[31m- /*return d->state == fetching_RequestState ||[m
[31m- d->state == receivedPartialResponse_RequestState;*/[m
return d->request != NULL;[m
}[m
[m
text/plain
This content has been proxied by September (ba2dc).