aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2015-01-02 00:39:21 +0100
committerSebastian Geerken <devnull@localhost>2015-01-02 00:39:21 +0100
commit974f88a4adc3ef460ad00ba3d398f697c8812393 (patch)
tree55c88aad376ae3d6a0a2f714c9f55673d9d989ef
parentecb8be82abafc3c7580cdeed4c8902b44bd06ae5 (diff)
parent86e780e73a11e8b9d1d57cb5f283c4fee6ca68e8 (diff)
Merge with main repo.
-rw-r--r--ChangeLog18
-rw-r--r--NEWS4
-rw-r--r--README8
-rw-r--r--configure.ac2
-rw-r--r--doc/dillo.1.in5
-rw-r--r--dw/fltkviewbase.cc2
-rw-r--r--dw/image.cc4
-rw-r--r--dw/ooffloatsmgr.cc85
-rw-r--r--dw/ooffloatsmgr.hh1
-rw-r--r--dw/table.cc10
-rw-r--r--dw/table.hh2
-rw-r--r--dw/textblock_linebreaking.cc64
-rw-r--r--dw/widget.cc11
-rw-r--r--src/IO/about.c70
-rw-r--r--src/cache.c12
-rw-r--r--src/dillo.cc4
-rw-r--r--src/html.cc6
-rw-r--r--src/jpeg.c3
-rw-r--r--src/prefs.c3
-rw-r--r--src/uicmd.cc6
20 files changed, 144 insertions, 176 deletions
diff --git a/ChangeLog b/ChangeLog
index d3fe8532..f9018087 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,7 +29,6 @@ dillo-3.1 [not released yet]
percentage value.
- New dillorc options 'adjust_min_width' and 'adjust_table_min_width'.
- Make building of test/ files more robust.
- - Fix Makefile to pick up LIBJPEG_CPPFLAGS.
- Work on collapsing spaces: more cases supported.
- Fix crash that's possible searching for text while page still being built.
Patches: Sebastian Geerken
@@ -43,12 +42,25 @@ dillo-3.1 [not released yet]
- Fix X11 icon name.
- Abort failed queries.
- In location bar, tend toward showing beginning of URL instead of end.
- - Remove Fl_Printer stub that always gave problems compiling under OSX.
- Handle irix's version of vsnprintf().
Patches: corvid
+- Avoid requesting background images if an ancestor has display:none.
- - Don't load background images in --local mode.
+ Patch: Johannes Hofmann
+
+-----------------------------------------------------------------------------
+
+dillo-3.0.4.1 [December 24, 2014]
+
++- Avoid a corner case segfault when no search URL is found in dillorc.
+ Patch: Sebastian Geerken, Jorge Arellano
++- Fix linking problem with fltk-1.3.3 and fl_oldfocus.
+ - Don't follow redirections or meta refresh in --local mode.
+ Patches: Jorge Arellano Cid
++- Don't load background images in --local mode.
+ - Make sure window is resizable with fltk-1.3.3.
Patches: Johannes Hofmann
++- Remove Fl_Printer stub that always gave problems compiling under OSX.
+ Patch: corvid
-----------------------------------------------------------------------------
diff --git a/NEWS b/NEWS
index b2702cdf..b9c1619c 100644
--- a/NEWS
+++ b/NEWS
@@ -46,6 +46,10 @@ Apr 2014
dillo-3.0.4, a new release for the new 3.x series is out.
+Dec 2014
+
+ dillo-3.0.4.1, a new release for the new 3.x series is out.
+
Jorge.-
jcid@dillo.org
diff --git a/README b/README
index 541c36fa..d5a305ba 100644
--- a/README
+++ b/README
@@ -42,8 +42,8 @@ FLTK-1.3
and build it like:
- tar zxvf fltk-1.3.2-source.tar.gz [or latest 1.3.x version]
- cd fltk-1.3.2
+ tar zxvf fltk-1.3.3-source.tar.gz [or latest 1.3.x version]
+ cd fltk-1.3.3
less README.Unix.txt
make
sudo make install
@@ -53,8 +53,8 @@ FLTK-1.3
Dillo3
------
- tar jxvf dillo-3.0.4.tar.bz2
- cd dillo-3.0.4
+ tar jxvf dillo-3.0.4.1.tar.bz2
+ cd dillo-3.0.4.1
./configure; make
sudo make install-strip
diff --git a/configure.ac b/configure.ac
index a0f582b3..fb0a1121 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
dnl Process this file with aclocal, autoconf and automake.
-AC_INIT([dillo], [3.0.4])
+AC_INIT([dillo], [3.1-dev])
dnl Detect the canonical target build environment
AC_CANONICAL_TARGET
diff --git a/doc/dillo.1.in b/doc/dillo.1.in
index a5228b63..3bb5fe03 100644
--- a/doc/dillo.1.in
+++ b/doc/dillo.1.in
@@ -1,4 +1,4 @@
-.TH dillo 1 "November 5, 2012" "" "USER COMMANDS"
+.TH dillo 1 "December 20, 2014" "" "USER COMMANDS"
.SH NAME
dillo \- web browser
.SH SYNOPSIS
@@ -44,7 +44,8 @@ Set initial window position where \fIGEO\fR is
Display this help text and exit.
.TP
\fB\-l\fR, \fB\-\-local\fR
-Don't load images or stylesheets for these URL(s).
+Don't load images or stylesheets, or follow redirections, for these FILEs or
+URLs. This is intended for use with HTML email.
.TP
\fB\-v\fR, \fB\-\-version\fR
Display version info and exit.
diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc
index 68218800..4778cd87 100644
--- a/dw/fltkviewbase.cc
+++ b/dw/fltkviewbase.cc
@@ -365,6 +365,8 @@ int FltkViewBase::handle (int event)
// FLTK delivers UNFOCUS to the previously focused widget
if (find(Fl::focus()) < children())
focused_child = Fl::focus(); // remember the focused child!
+ else if (Fl::focus() == this)
+ focused_child = NULL; // no focused child this time
return 0;
case FL_KEYBOARD:
if (Fl::event_key() == FL_Tab)
diff --git a/dw/image.cc b/dw/image.cc
index bd7c1ac9..a1052726 100644
--- a/dw/image.cc
+++ b/dw/image.cc
@@ -241,7 +241,7 @@ void Image::getExtremesImpl (core::Extremes *extremes)
{
int contentWidth;
if (buffer)
- contentWidth =buffer->getRootWidth ();
+ contentWidth = buffer->getRootWidth ();
else {
if (altText && altText[0]) {
if (altTextWidth == -1)
@@ -252,7 +252,7 @@ void Image::getExtremesImpl (core::Extremes *extremes)
contentWidth = 0;
}
- int width = contentWidth + + boxDiffWidth ();
+ int width = contentWidth + boxDiffWidth ();
// With percentage width, the image may be narrower than the buffer.
extremes->minWidth =
diff --git a/dw/ooffloatsmgr.cc b/dw/ooffloatsmgr.cc
index b7a4c8bc..0553e25d 100644
--- a/dw/ooffloatsmgr.cc
+++ b/dw/ooffloatsmgr.cc
@@ -1926,75 +1926,38 @@ void OOFFloatsMgr::getFloatsExtremes (Extremes *cbExtr, Side side,
for (int i = 0; i < list->size(); i++) {
Float *vloat = list->get(i);
- int leftDiff, rightDiff;
- if (getFloatDiffToCB (vloat, &leftDiff, &rightDiff)) {
+ DBG_OBJ_MSGF ("resize.oofm", 1,
+ "float %p has generator %p (container is %p)",
+ vloat->getWidget (), vloat->generatingBlock,
+ containingBlock);
+
+ if (vloat->generatingBlock == container ||
+ wasAllocated (vloat->generatingBlock)) {
Extremes extr;
vloat->getWidget()->getExtremes (&extr);
+ int x;
- DBG_OBJ_MSGF ("resize.oofm", 1,
- "considering float %p generated by %p: %d / %d",
- vloat->getWidget (), vloat->generatingBlock,
- extr.minWidth, extr.maxWidth);
-
- // TODO: Or zero (instead of rightDiff) for right floats?
- *minWidth =
- max (*minWidth,
- extr.minWidth + (side == LEFT ? leftDiff : rightDiff));
- *maxWidth = max (*maxWidth, extr.maxWidth + leftDiff + rightDiff);
-
- DBG_OBJ_MSGF ("resize.oofm", 1, " => %d / %d", *minWidth, *maxWidth);
+ if (vloat->generatingBlock == container)
+ x = side == LEFT ?
+ vloat->generatingBlock->getStyle()->boxOffsetX() : 0;
+ else {
+ Allocation *gba = getAllocation(vloat->generatingBlock);
+ x = calcFloatX (vloat, side,
+ gba->x - containerAllocation.x, gba->width,
+ vloat->generatingBlock->getLineBreakWidth ());
+ }
+
+ *minWidth = max (*minWidth, x + extr.minWidth);
+ *maxWidth = max (*maxWidth, x + extr.maxWidth);
+
+ DBG_OBJ_MSGF ("resize.oofm", 1, "%d + %d / %d => %d * %d",
+ x, extr.minWidth, extr.maxWidth, *minWidth, *maxWidth);
} else
- DBG_OBJ_MSGF ("resize.oofm", 1,
- "considering float %p generated by %p: not allocated",
- vloat->getWidget (), vloat->generatingBlock);
- }
-
- DBG_OBJ_LEAVE ();
-}
-
-// Returns "false" when borders cannot yet determined; *leftDiff and
-// *rightDiff are undefined in this case.
-bool OOFFloatsMgr::getFloatDiffToCB (Float *vloat, int *leftDiff,
- int *rightDiff)
-{
- DBG_OBJ_ENTER ("resize.oofm", 0, "getDiffToCB",
- "float %p [generated by %p], ...",
- vloat->getWidget (), vloat->generatingBlock);
-
- bool result;
-
- if (vloat->generatingBlock == container) {
- *leftDiff = vloat->generatingBlock->boxOffsetX();
- *rightDiff = vloat->generatingBlock->boxRestWidth();
- result = true;
- DBG_OBJ_MSGF ("resize.oofm", 1,
- "GB == CB => leftDiff = %d, rightDiff = %d",
- *leftDiff, *rightDiff);
- } else if (wasAllocated (vloat->generatingBlock)) {
- Allocation *gba = getAllocation(vloat->generatingBlock);
- *leftDiff = gba->x - containerAllocation.x
- + vloat->generatingBlock->boxOffsetX();
- *rightDiff =
- (containerAllocation.x + containerAllocation.width)
- - (gba->x + gba->width)
- + vloat->generatingBlock->boxRestWidth();
- result = true;
- DBG_OBJ_MSGF ("resize.oofm", 1,
- "GB != CB => leftDiff = %d - %d + %d = %d, "
- "rightDiff = (%d + %d) - (%d + %d) + %d = %d",
- gba->x, containerAllocation.x,
- vloat->generatingBlock->boxOffsetX(), *leftDiff,
- containerAllocation.x, containerAllocation.width,
- gba->x, gba->width, vloat->generatingBlock->boxRestWidth(),
- *rightDiff);
- } else {
- DBG_OBJ_MSG ("resize.oofm", 1, "GB != CB, and float not allocated");
- result = false;
+ DBG_OBJ_MSG ("resize.oofm", 1, "not allocated");
}
DBG_OBJ_LEAVE ();
- return result;
}
OOFFloatsMgr::TBInfo *OOFFloatsMgr::getOOFAwareWidgetWhenRegistered
diff --git a/dw/ooffloatsmgr.hh b/dw/ooffloatsmgr.hh
index 86bf62da..b82019fe 100644
--- a/dw/ooffloatsmgr.hh
+++ b/dw/ooffloatsmgr.hh
@@ -306,7 +306,6 @@ private:
int *height);
void getFloatsExtremes (core::Extremes *cbExtr, Side side, int *minWidth,
int *maxWidth);
- bool getFloatDiffToCB (Float *vloat, int *leftDiff, int *rightDiff);
TBInfo *getOOFAwareWidget (OOFAwareWidget *widget);
TBInfo *getOOFAwareWidgetWhenRegistered (OOFAwareWidget *widget);
diff --git a/dw/table.cc b/dw/table.cc
index 2d820035..d6dbe633 100644
--- a/dw/table.cc
+++ b/dw/table.cc
@@ -814,10 +814,10 @@ void Table::calcCellSizes (bool calcHeights)
calcHeights ? "true" : "false");
bool sizeChanged = needsResize () || resizeQueued ();
- bool extremesChanges = extremesChanged () || extremesQueued ();
+ bool extremesChanget = extremesChanged () || extremesQueued ();
- if (calcHeights ? (extremesChanges || sizeChanged) :
- (extremesChanges || !colWidthsUpToDateWidthColExtremes))
+ if (calcHeights ? (extremesChanget || sizeChanged) :
+ (extremesChanget || !colWidthsUpToDateWidthColExtremes))
forceCalcCellSizes (calcHeights);
DBG_OBJ_LEAVE ();
@@ -1215,8 +1215,10 @@ void Table::apportionRowSpan ()
*
* \bug Some parts are missing.
*/
-void Table::calcColumnExtremes ()
+void Table::_unused_calcColumnExtremes ()
{
+ // This method is actually not used. Consider removal.
+
DBG_OBJ_ENTER0 ("resize", 0, "calcColumnExtremes");
if (extremesChanged () || extremesQueued ())
diff --git a/dw/table.hh b/dw/table.hh
index 44abc42f..2ad56447 100644
--- a/dw/table.hh
+++ b/dw/table.hh
@@ -436,7 +436,7 @@ private:
void forceCalcCellSizes (bool calcHeights);
void apportionRowSpan ();
- void calcColumnExtremes ();
+ void _unused_calcColumnExtremes ();
void forceCalcColumnExtremes ();
void calcExtremesSpanMulteCols (int col, int cs,
core::Extremes *cellExtremes,
diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc
index 5cc6ad65..666a38f8 100644
--- a/dw/textblock_linebreaking.cc
+++ b/dw/textblock_linebreaking.cc
@@ -544,6 +544,7 @@ void Textblock::processWord (int wordIndex)
if (paragraphs->size() > 0) {
firstWord = paragraphs->getLastRef()->firstWord;
paragraphs->setSize (paragraphs->size() - 1);
+ DBG_OBJ_SET_NUM ("paragraphs.size", paragraphs->size ());
DBG_OBJ_MSG ("construct.paragraph", 1, "removing last paragraph");
} else
firstWord = 0;
@@ -1251,6 +1252,8 @@ void Textblock::handleWordExtremes (int wordIndex)
->badnessAndPenalty.lineMustBeBroken (1)) {
// Add a new paragraph.
paragraphs->increase ();
+ DBG_OBJ_SET_NUM ("paragraphs.size", paragraphs->size ());
+
Paragraph *prevPar = paragraphs->size() == 1 ?
NULL : paragraphs->getRef(paragraphs->size() - 2);
Paragraph *par = paragraphs->getLastRef();
@@ -1268,12 +1271,16 @@ void Textblock::handleWordExtremes (int wordIndex)
par->maxParMin = par->maxParMinIntrinsic = par->maxParMax =
par->maxParMaxIntrinsic = 0;
- DBG_OBJ_MSGF ("construct.paragraph", 1, "new par: %d",
- paragraphs->size() - 1);
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1, "maxParMin",
+ par->maxParMin);
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1,
+ "maxParMinIntrinsic", par->maxParMinIntrinsic);
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1, "maxParMax",
+ par->maxParMax);
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1,
+ "maxParMaxIntrinsic", par->maxParMaxIntrinsic);
}
- DBG_OBJ_MSGF ("construct.paragraph", 1, "last par: %d",
- paragraphs->size() - 1);
Paragraph *lastPar = paragraphs->getLastRef();
int corrDiffMin, corrDiffMax;
@@ -1289,19 +1296,6 @@ void Textblock::handleWordExtremes (int wordIndex)
} else
corrDiffMin = corrDiffMax = 0;
- DBG_OBJ_MSGF ("construct.paragraph", 1,
- "(lastPar from %d to %d; corrDiffMin = %d, corDiffMax = %d)",
- lastPar->firstWord, lastPar->lastWord, corrDiffMin,
- corrDiffMax);
-
- DBG_OBJ_MSGF ("construct.paragraph", 1,
- "before: parMin = %d (%d) (max = %d (%d)), "
- "parMax = %d (%d) (max = %d (%d))",
- lastPar->parMin, lastPar->parMinIntrinsic,
- lastPar->maxParMin, lastPar->maxParMinIntrinsic,
- lastPar->parMax, lastPar->parMaxIntrinsic,
- lastPar->maxParMax, lastPar->maxParMaxIntrinsic);
-
// Minimum: between two *possible* breaks.
// Shrinkability could be considered, but really does not play a role.
lastPar->parMin += wordExtremes.minWidth + word->hyphenWidth + corrDiffMin;
@@ -1310,10 +1304,26 @@ void Textblock::handleWordExtremes (int wordIndex)
lastPar->maxParMin = misc::max (lastPar->maxParMin, lastPar->parMin);
lastPar->maxParMinIntrinsic =
misc::max (lastPar->maxParMinIntrinsic, lastPar->parMinIntrinsic);
+
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1, "parMin",
+ lastPar->parMin);
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1,
+ "parMinIntrinsic", lastPar->parMinIntrinsic);
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1, "maxParMin",
+ lastPar->maxParMin);
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1,
+ "maxParMinIntrinsic", lastPar->maxParMinIntrinsic);
+
if (word->badnessAndPenalty.lineCanBeBroken (1) &&
- (word->flags & Word::UNBREAKABLE_FOR_MIN_WIDTH) == 0)
+ (word->flags & Word::UNBREAKABLE_FOR_MIN_WIDTH) == 0) {
lastPar->parMin = lastPar->parMinIntrinsic = 0;
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1, "parMin",
+ lastPar->parMin);
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1,
+ "parMinIntrinsic", lastPar->parMinIntrinsic);
+ }
+
// Maximum: between two *necessary* breaks.
lastPar->parMax += wordExtremes.maxWidth + word->hyphenWidth + corrDiffMax;
lastPar->parMaxIntrinsic +=
@@ -1322,14 +1332,15 @@ void Textblock::handleWordExtremes (int wordIndex)
lastPar->maxParMaxIntrinsic =
misc::max (lastPar->maxParMaxIntrinsic, lastPar->parMaxIntrinsic);
- DBG_OBJ_MSGF ("construct.paragraph", 1,
- "after: parMin = %d (%d) (max = %d (%d)), "
- "parMax = %d (%d) (max = %d (%d))",
- lastPar->parMin, lastPar->parMinIntrinsic,
- lastPar->maxParMin, lastPar->maxParMinIntrinsic,
- lastPar->parMax, lastPar->parMaxIntrinsic,
- lastPar->maxParMax, lastPar->maxParMaxIntrinsic);
-
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1, "parMax",
+ lastPar->parMax);
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1,
+ "parMaxIntrinsic", lastPar->parMaxIntrinsic);
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1, "maxParMax",
+ lastPar->maxParMax);
+ DBG_OBJ_ARRATTRSET_NUM ("paragraphs", paragraphs->size() - 1,
+ "maxParMaxIntrinsic", lastPar->maxParMaxIntrinsic);
+
lastPar->lastWord = wordIndex;
DBG_OBJ_LEAVE ();
}
@@ -1925,6 +1936,7 @@ void Textblock::fillParagraphs ()
parNo = misc::max (0, findParagraphOfWord (firstWordOfLine));
paragraphs->setSize (parNo);
+ DBG_OBJ_SET_NUM ("paragraphs.size", paragraphs->size ());
int firstWord;
if (paragraphs->size () > 0)
diff --git a/dw/widget.cc b/dw/widget.cc
index ca6abb37..757452a4 100644
--- a/dw/widget.cc
+++ b/dw/widget.cc
@@ -734,8 +734,15 @@ void Widget::sizeRequest (Requisition *requisition)
*/
int Widget::getMinWidth (Extremes *extremes, bool forceValue)
{
- DBG_OBJ_ENTER ("resize", 0, "getMinWidth", "..., %s",
- forceValue ? "true" : "false");
+ if (extremes)
+ DBG_OBJ_ENTER ("resize", 0, "getMinWidth", "[%d (%d) / %d (%d), %s",
+ extremes->minWidth, extremes->minWidthIntrinsic,
+ extremes->maxWidth, extremes->maxWidthIntrinsic,
+ forceValue ? "true" : "false");
+ else
+ DBG_OBJ_ENTER ("resize", 0, "getMinWidth", "(nil), %s",
+ forceValue ? "true" : "false");
+
int minWidth;
if (getAdjustMinWidth ()) {
diff --git a/src/IO/about.c b/src/IO/about.c
index 5c3ca973..0cc3b427 100644
--- a/src/IO/about.c
+++ b/src/IO/about.c
@@ -266,70 +266,28 @@ const char *const AboutSplash=
"<tr>\n"
" <td bgcolor='#CCCCCC'>\n"
" <h4>Release overview</h4>\n"
-" April 09, 2014\n"
+" December 24, 2014\n"
"<tr>\n"
" <td bgcolor='#FFFFFF'>\n"
" <table border='0' cellspacing='0' cellpadding='5'>\n"
" <tr>\n"
" <td>\n"
"<p>\n"
-"dillo-3.0.4 adds some nice new features, as listed below.\n"
-"<p>\n"
-"This release comes with better <b>text rendering</b> in the form of\n"
-"some linebreaking fixes, and optimization for non-justified text,\n"
-"including a new preference stretchability_factor.\n"
-"<p>\n"
-"It also comes with support for a few <b>HTML5</b> elements and better CSS\n"
-"including background <b>images</b> (enable load_background_images in\n"
-"dillorc or the tools menu).\n"
-"<p>\n"
-"It has enhanced <b>security</b> by fixing a set of potentially exploitable\n"
-"code patterns reported by the Oulu University Secure Programming Group.\n"
-"<p>\n"
-"Finally it also fixes compiling on HURD and IRIX.\n"
-"<p>\n"
-"The core team welcomes developers willing to join our workforce.\n"
-"<p>\n"
-" </table>\n"
-"</table>\n"
-"</table>\n"
-"\n"
-"<br>\n"
-"\n"
-"<table border='0' cellpadding='0' cellspacing='0' align='center' bgcolor='#000000' width='100%'><tr><td>\n"
-"<table border='0' cellpadding='5' cellspacing='1' width='100%'>\n"
-"<tr>\n"
-" <td bgcolor='#CCCCCC'>\n"
-" <h4>ChangeLog highlights</h4>\n"
-" (Extracted from the\n"
-" <a href='http://hg.dillo.org/dillo/raw-file/tip/ChangeLog'>full\n"
-" ChangeLog</a>)\n"
-"<tr>\n"
-" <td bgcolor='#FFFFFF'>\n"
-" <table border='0' cellspacing='0' cellpadding='5'>\n"
-" <tr>\n"
-" <td>\n"
+"The dillo-3.0.4.1 release brings you fixes:\n"
"<ul>\n"
-"<li> OPTGROUP and INS elements.\n"
-"<li> Added some HTML5 elements.\n"
-"<li> Added <b>show_ui_tooltip</b> preference (BUG#1140).\n"
-"<li> Make embedding into other applications more reliable (BUG#1127).\n"
-"<li> Add search from address bar.\n"
-"<li> Better scaling (down) of images, even with consideration of gamma \n"
-" correction.\n"
-"<li> Some linebreaking fixes, and optimization for non-justified text,\n"
-" including new preference <b>stretchability_factor</b>.\n"
-"<li> Added <b>white_bg_replacement</b> preference.\n"
-"<li> Implemented background images (except 'background-attachment'), added\n"
-" <b>load_background_images</b> preference, as well as a new entry in the\n"
-" tools menu.\n"
-"<li> Fix a set of bugs reported by Oulu Univ. Secure Programming Group\n"
-" (HTML parsing, URL resolution, GIF processing, etc.)\n"
-"<li> Made <b>show_url</b> dillorc option work again (BUG#1128)\n"
-"<li> Fix compiling on Hurd.\n"
-"<li> Avoid Dpid children becoming zombies.\n"
-"<li> Fix compiling on IRIX with MIPSpro compiler.\n"
+"<li> for linking with the recently-released fltk-1.3.3\n"
+" (we don't use <tt>fl_oldfocus</tt> anymore).\n"
+"<li> to make sure that windows are resizable with fltk-1.3.3.\n"
+"<li> not to load background images, or follow redirections or meta refresh,\n"
+" in <tt>--local</tt> mode (security).\n"
+"<li> to permit linking on OS X (remove our <tt>Fl_Printer</tt> stub).\n"
+"<li> for a crash when searching from the address bar and no search urls are\n"
+" found in dillorc.\n"
"</ul>\n"
+"<p>\n"
+"...that shouldn't have to wait until dillo-3.1 is ready with its floating\n"
+"elements and assorted good things.\n"
+"<p>\n"
" </table>\n"
"</table>\n"
"</table>\n"
diff --git a/src/cache.c b/src/cache.c
index ee424c58..189e18d5 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1001,14 +1001,20 @@ static int Cache_redirect(CacheEntry_t *entry, int Flags, BrowserWindow *bw)
_MSG(" Cache_redirect: redirect_level = %d\n", bw->redirect_level);
+ /* Don't allow redirection for SpamSafe/local URLs */
+ if (URL_FLAGS(entry->Url) & URL_SpamSafe) {
+ a_UIcmd_set_msg(bw, "WARNING: local URL with redirection. Aborting.");
+ return 0;
+ }
+
/* if there's a redirect loop, stop now */
if (bw->redirect_level >= 5)
entry->Flags |= CA_RedirectLoop;
if (entry->Flags & CA_RedirectLoop) {
- a_UIcmd_set_msg(bw, "ERROR: redirect loop for: %s", URL_STR_(entry->Url));
- bw->redirect_level = 0;
- return 0;
+ a_UIcmd_set_msg(bw, "ERROR: redirect loop for: %s", URL_STR_(entry->Url));
+ bw->redirect_level = 0;
+ return 0;
}
if ((entry->Flags & CA_Redirect && entry->Location) &&
diff --git a/src/dillo.cc b/src/dillo.cc
index f4925dd2..0e49e7b5 100644
--- a/src/dillo.cc
+++ b/src/dillo.cc
@@ -92,8 +92,8 @@ static const CLI_options Options[] = {
{"-h", "--help", 0, DILLO_CLI_HELP,
" -h, --help Display this help text and exit."},
{"-l", "--local", 0, DILLO_CLI_LOCAL,
- " -l, --local Don't load images or stylesheets for these "
- "URL(s)."},
+ " -l, --local Don't load images or stylesheets, or follow\n"
+ " redirections, for these FILEs or URLs."},
{"-v", "--version", 0, DILLO_CLI_VERSION,
" -v, --version Display version info and exit."},
{"-x", "--xid", 1, DILLO_CLI_XID,
diff --git a/src/html.cc b/src/html.cc
index c17db53a..be4d3526 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -3202,8 +3202,12 @@ static void Html_tag_open_meta(DilloHtml *html, const char *tag, int tagsize)
} else if (delay == 0) {
/* zero-delay redirection */
html->stop_parser = true;
- if (a_Capi_dpi_verify_request(html->bw, new_url))
+ if (URL_FLAGS(html->base_url) & URL_SpamSafe) {
+ a_UIcmd_set_msg(html->bw,
+ "WARNING: local URL with META refresh. Aborting.");
+ } else if (a_Capi_dpi_verify_request(html->bw, new_url)) {
a_UIcmd_redirection0((void*)html->bw, new_url);
+ }
} else {
/* Send a custom HTML message.
* TODO: This is a hairy hack,
diff --git a/src/jpeg.c b/src/jpeg.c
index 5652aa56..c6ee472c 100644
--- a/src/jpeg.c
+++ b/src/jpeg.c
@@ -273,9 +273,8 @@ static void Jpeg_write(DilloJpeg *jpeg, void *Buf, uint_t BufSize)
} else if (jpeg->cinfo.num_components == 3) {
type = DILLO_IMG_TYPE_RGB;
} else {
- MSG("4-component JPEG!\n");
if (jpeg->cinfo.jpeg_color_space == JCS_YCCK)
- MSG("YCCK. Are the colors wrong?\n");
+ MSG("YCCK JPEG. Are the colors wrong?\n");
if (!jpeg->cinfo.saw_Adobe_marker)
MSG("No adobe marker! Is the image shown in reverse video?\n");
type = DILLO_IMG_TYPE_CMYK_INV;
diff --git a/src/prefs.c b/src/prefs.c
index 67cbaa79..abcbfcd0 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -18,7 +18,7 @@
#define PREFS_FONT_CURSIVE "URW Chancery L"
#define PREFS_FONT_FANTASY "DejaVu Sans" /* TODO: find good default */
#define PREFS_FONT_MONOSPACE "DejaVu Sans Mono"
-#define PREFS_SEARCH_URL "http://duckduckgo.com/lite/?kp=-1&q=%s"
+#define PREFS_SEARCH_URL "dd http://duckduckgo.com/lite/?kp=-1&q=%s"
#define PREFS_NO_PROXY "localhost 127.0.0.1"
#define PREFS_SAVE_DIR "/tmp/"
#define PREFS_HTTP_REFERER "host"
@@ -82,7 +82,6 @@ void a_Prefs_init(void)
prefs.save_dir = dStrdup(PREFS_SAVE_DIR);
prefs.search_urls = dList_new(16);
dList_append(prefs.search_urls, dStrdup(PREFS_SEARCH_URL));
- dList_append(prefs.search_urls, NULL); /* flags a default search URL */
prefs.search_url_idx = 0;
prefs.show_back = TRUE;
prefs.show_bookmarks = TRUE;
diff --git a/src/uicmd.cc b/src/uicmd.cc
index c849a130..5225be75 100644
--- a/src/uicmd.cc
+++ b/src/uicmd.cc
@@ -552,10 +552,10 @@ BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh,
win->box(FL_NO_BOX);
CustTabs *DilloTabs = new CustTabs(ww, wh, 16);
win->end();
+ win->resizable(DilloTabs->wizard());
int focus = 1;
new_bw = UIcmd_tab_new(DilloTabs, old_ui, focus);
- win->resizable(DilloTabs->wizard());
win->show();
if (old_bw == NULL && prefs.xpos >= 0 && prefs.ypos >= 0) {
@@ -682,7 +682,7 @@ static char *UIcmd_find_search_str(const char *str)
for (p = 0; p < dList_length(prefs.search_urls); p++) {
const char *search =
(const char *)dList_nth_data(prefs.search_urls, p);
- if (strncasecmp(str, search, len) == 0) {
+ if (search && strncasecmp(str, search, len) == 0) {
prefs.search_url_idx = p;
url = UIcmd_make_search_str(str + len + 1);
break;
@@ -933,7 +933,7 @@ static int UIcmd_save_file_check(const char *name)
int ch;
ds = dStr_sized_new(128);
dStr_sprintf(ds,
- "The file:\n %s (%d Bytes)\nalready exists. What do we do?",
+ "The file:\n %s (%d Bytes)\nalready exists. What do we do?",
name, (int)ss.st_size);
ch = a_Dialog_choice("Dillo Save: File exists!", ds->str,
"Abort", "Continue", "Rename", NULL);