diff options
-rw-r--r-- | .rtfl | 12 | ||||
-rw-r--r-- | dw/textblock.cc | 7 | ||||
-rw-r--r-- | dw/tools.cc | 6 | ||||
-rw-r--r-- | dw/tools.hh | 27 | ||||
-rw-r--r-- | dw/widget.cc | 2 | ||||
-rw-r--r-- | src/cssparser.cc | 1 | ||||
-rw-r--r-- | src/dillo.cc | 14 |
7 files changed, 35 insertions, 34 deletions
@@ -0,0 +1,12 @@ +[rtfl-obj-1.0]:0:0:class-color:dw\:\:*:#c0ff80 +[rtfl-obj-1.0]:0:0:class-color:dw\:\:fltk\:\:*:#c0c0ff +[rtfl-obj-1.0]:0:0:class-color:dw\:\:core\:\:*:#ffa0a0 +[rtfl-obj-1.0]:0:0:class-color:dw\:\:core\:\:style\:\:*:#ffe0a0 +[rtfl-obj-1.0]:0:0:class-color:dw\:\:core\:\:SizeParams:#e0e0a0 +[rtfl-obj-1.0]:0:0:class-color:dw\:\:Image:#80ffa0 +[rtfl-obj-1.0]:0:0:class-color:dw\:\:Textblock:#f0ff80 +[rtfl-obj-1.0]:0:0:class-color:dw\:\:OutOfFlowMgr:#d0ff80 +[rtfl-obj-1.0]:0:0:class-color:dw\:\:AlignedTextblock:#e0ff80 +[rtfl-obj-1.0]:0:0:class-color:dw\:\:ListItem:#b0ff80 +[rtfl-obj-1.0]:0:0:class-color:dw\:\:TableCell:#80ff80 +[rtfl-obj-1.0]:0:0:class-color:dw\:\:Table:#80ffc0 diff --git a/dw/textblock.cc b/dw/textblock.cc index 8ccaf74b..2086a7f4 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -218,7 +218,7 @@ Textblock::Textblock (bool limitTextWidth) lastWordDrawn = -1; DBG_OBJ_SET_NUM ("lastWordDrawn", lastWordDrawn); - DBG_SET_SIZE_PARAMS ("sizeRequestParams", sizeRequestParams); + DBG_OBJ_ASSOC_CHILD (&sizeRequestParams); /* * The initial sizes of lines and words should not be @@ -302,10 +302,9 @@ Textblock::~Textblock () void Textblock::sizeRequestImpl (core::Requisition *requisition, int numPos, Widget **references, int *x, int *y) { - DBG_OBJ_ENTER0 ("resize", 0, "sizeRequestImpl"); + DBG_OBJ_ENTER ("resize", 0, "sizeRequestImpl", "%d, ...", numPos); sizeRequestParams.fill (numPos, references, x, y); - DBG_SET_SIZE_PARAMS ("sizeRequestParams", sizeRequestParams); int newLineBreakWidth = getAvailWidth (true); if (newLineBreakWidth != lineBreakWidth) { @@ -2304,6 +2303,8 @@ bool Textblock::calcSizeOfWidgetInFlow (int wordIndex, Widget *widget, + max (lastMargin, widget->getStyle()->margin.top); core::SizeParams childParams; + DBG_OBJ_ASSOC_CHILD (&childParams); + sizeRequestParams.forChild (this, widget, xRel, yRel, &childParams); widget->sizeRequest (size, childParams.getNumPos (), childParams.getReferences (), childParams.getX (), diff --git a/dw/tools.cc b/dw/tools.cc index 8f36069a..9a998976 100644 --- a/dw/tools.cc +++ b/dw/tools.cc @@ -5,12 +5,15 @@ namespace core { SizeParams::SizeParams () { + DBG_OBJ_CREATE ("dw::core::SizeParams"); init (); + debugPrint (); } SizeParams::~SizeParams () { cleanup (); + DBG_OBJ_DELETE (); } void SizeParams::init () @@ -47,6 +50,8 @@ void SizeParams::fill (int numPos, Widget **references, int *x, int *y) this->x[i] = x[i]; this->y[i] = y[i]; } + + debugPrint (); } void SizeParams::forChild (Widget *parent, Widget *child, int xRel, int yRel, @@ -80,6 +85,7 @@ void SizeParams::forChild (Widget *parent, Widget *child, int xRel, int yRel, } } + childParams->debugPrint (); } bool SizeParams::findReference (Widget *reference, int *x, int *y) diff --git a/dw/tools.hh b/dw/tools.hh index 04084a60..973881af 100644 --- a/dw/tools.hh +++ b/dw/tools.hh @@ -20,6 +20,17 @@ private: void init (); void cleanup (); + + inline void debugPrint () { + DBG_IF_RTFL { + DBG_OBJ_SET_NUM ("numPos", numPos); + for (int i = 0; i < numPos; i++) { + DBG_OBJ_ARRSET_PTR ("references", i, references[i]); + DBG_OBJ_ARRSET_NUM ("x", i, x[i]); + DBG_OBJ_ARRSET_NUM ("y", i, y[i]); + } + } + } public: SizeParams (); @@ -38,21 +49,7 @@ public: inline int getX (int i) { return x[i]; } inline int getY (int i) { return y[i]; } }; - -#define DBG_SET_SIZE_PARAMS(prefix, params) \ - D_STMT_START { \ - DBG_IF_RTFL { \ - DBG_OBJ_SET_NUM (prefix ".numPos", params.getNumPos ()); \ - for (int i = 0; i < params.getNumPos (); i++) { \ - DBG_OBJ_ARRSET_PTR (prefix ".references", i, \ - params.getReference (i)); \ - DBG_OBJ_ARRSET_NUM (prefix ".x", i, params.getX (i)); \ - DBG_OBJ_ARRSET_NUM (prefix ".y", i, params.getY (i)); \ - } \ - } \ - } D_STMT_END - - + } // namespace core } // namespace dw diff --git a/dw/widget.cc b/dw/widget.cc index b3d47efb..1e538eb0 100644 --- a/dw/widget.cc +++ b/dw/widget.cc @@ -572,7 +572,7 @@ void Widget::sizeRequest (Requisition *requisition, int numPos, { assert (!queueResizeEntered ()); - DBG_OBJ_ENTER0 ("resize", 0, "sizeRequest"); + DBG_OBJ_ENTER ("resize", 0, "sizeRequest", "%d, ...", numPos); enterSizeRequest (); diff --git a/src/cssparser.cc b/src/cssparser.cc index f4291797..b4a6a305 100644 --- a/src/cssparser.cc +++ b/src/cssparser.cc @@ -19,7 +19,6 @@ #include <stdlib.h> #include <stdio.h> -#include "lout/debug.hh" #include "msg.h" #include "colors.h" #include "html_common.hh" diff --git a/src/dillo.cc b/src/dillo.cc index 17747c59..62ff9685 100644 --- a/src/dillo.cc +++ b/src/dillo.cc @@ -55,7 +55,6 @@ #include "auth.h" #include "styleengine.hh" -#include "lout/debug.hh" #include "dw/fltkcore.hh" #include "dw/widget.hh" #include "dw/textblock.hh" @@ -380,19 +379,6 @@ static DilloUrl *makeStartUrl(char *str, bool local) */ int main(int argc, char **argv) { - DBG_OBJ_CLASS_COLOR ("dw::*", "#c0ff80"); - DBG_OBJ_CLASS_COLOR ("dw::fltk::*", "#c0c0ff"); - DBG_OBJ_CLASS_COLOR ("dw::core::*", "#ffa0a0"); - DBG_OBJ_CLASS_COLOR ("dw::core::style::*", "#ffe0a0"); - - DBG_OBJ_CLASS_COLOR ("dw::Image", "#80ffa0"); - DBG_OBJ_CLASS_COLOR ("dw::Textblock", "#f0ff80"); - DBG_OBJ_CLASS_COLOR ("dw::OutOfFlowMgr", "#d0ff80"); - DBG_OBJ_CLASS_COLOR ("dw::AlignedTextblock", "#e0ff80"); - DBG_OBJ_CLASS_COLOR ("dw::ListItem", "#b0ff80"); - DBG_OBJ_CLASS_COLOR ("dw::TableCell", "#80ff80"); - DBG_OBJ_CLASS_COLOR ("dw::Table", "#80ffc0"); - uint_t opt_id; uint_t options_got = 0; uint32_t xid = 0; |