diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile.am | 1 | ||||
-rw-r--r-- | doc/dw-interrupted-drawing.doc | 5 | ||||
-rw-r--r-- | doc/dw-miscellaneous.doc | 36 | ||||
-rw-r--r-- | doc/dw-out-of-flow.doc | 31 | ||||
-rw-r--r-- | doc/dw-stacking-context.doc | 114 |
5 files changed, 182 insertions, 5 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index 8ade3d15..7f627d09 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -13,6 +13,7 @@ EXTRA_DIST = \ dw-images-and-backgrounds.doc \ dw-dw-out-of-flow.doc \ dw-dw-out-of-flow-2.doc \ + dw-stacking-context.doc \ fltk-problems.doc \ rounding-errors.doc \ uml-legend.doc \ diff --git a/doc/dw-interrupted-drawing.doc b/doc/dw-interrupted-drawing.doc new file mode 100644 index 00000000..a0e2d5e7 --- /dev/null +++ b/doc/dw-interrupted-drawing.doc @@ -0,0 +1,5 @@ +/** \page dw-interrupted-drawing Interrupted drawing + +... + +*/ diff --git a/doc/dw-miscellaneous.doc b/doc/dw-miscellaneous.doc new file mode 100644 index 00000000..4f47b5a4 --- /dev/null +++ b/doc/dw-miscellaneous.doc @@ -0,0 +1,36 @@ +/** \page dw-miscellaneous Miscellaneous Notes on Dw + +This is a barely sorted list of issues which I consider noteworthy, +but have yet to be moved to other parts of the documentation (which is +partly to be created). + +General +======= + +A **widget allocation outside of the allocation of the parent** is +allowed, but the part outside is not visible. + +**Interrupted drawing:** \ref dw-interrupted-drawing. + + +Floats +====== + +**Handling collisions:** The CSS specification allows two strategies +to deal with colliding floats: placing the second float beside or +below the first one. Many other browsers implement the first approach, +while dillo implements the second one, which may cause problems when +the author assumes the first. Example: the "tabs" at the top of every +page at Wikipedia ("Article", "Talk", ...). + + +Positioned elements +=================== + +**Positioned elements outside of the container:** ... + +**Relative positions:** ... + +**Fixed positions:** ... + +*/ diff --git a/doc/dw-out-of-flow.doc b/doc/dw-out-of-flow.doc index ea4a52bc..f5eade21 100644 --- a/doc/dw-out-of-flow.doc +++ b/doc/dw-out-of-flow.doc @@ -1,9 +1,30 @@ /** \page dw-out-of-flow Handling Elements Out Of Flow - -<div style="border: 2px solid #ffff00; margin-bottom: 0.5em; -padding: 0.5em 1em; background-color: #ffffe0"><b>Info:</b> -Should be incorporated into dw::Textblock.</div> +<div style="border: 2px solid #ff4040; margin-bottom: 0.5em; +padding: 0.5em 1em; background-color: #fff0f0"><b>Info:</b> +Not up to date; incorporate these two changes: (i) there are different +containing blocks for floats and absolutely (furthermore also fixedly) +positioned elements; (ii) dw::OutOfFlowMgr is now only the base class: +floats and absolutely positioned elements are seperated: +\dot +digraph G { + node [shape=record, fontname=Helvetica, fontsize=10]; + edge [arrowhead="none", arrowtail="empty", dir="both"]; + fontname=Helvetica; fontsize=8; + + OutOfFlowMgr [URL="\ref dw::OutOfFlowMgr"]; + OOFFloatsMgr [URL="\ref dw::OOFFloatsMgr"]; + OOFPositionedMgr [URL="\ref dw::OOFPositionedMgr"]; + OOFPosAbsMgr [URL="\ref dw::OOFPosAbsMgr"]; + OOFPosFixedMgr [URL="\ref dw::OOFPosFixedMgr"]; + + OutOfFlowMgr -> OOFFloatsMgr; + OutOfFlowMgr -> OOFPositionedMgr; + OOFPositionedMgr -> OOFPosAbsMgr; + OOFPositionedMgr -> OOFPosFixedMgr; +} +\enddot +</div> Introduction ============ @@ -209,6 +230,6 @@ Integration of line breaking and floats Absolute and fixed positiones ============================= -See <http://flpsed.org/hgweb/dillo_grows>. +To be documented. */
\ No newline at end of file diff --git a/doc/dw-stacking-context.doc b/doc/dw-stacking-context.doc new file mode 100644 index 00000000..6138ca5d --- /dev/null +++ b/doc/dw-stacking-context.doc @@ -0,0 +1,114 @@ +/** \page dw-stacking-context Handling stacking contexts + +Stacking Context and dw::core::StackingContextMgr +================================================= + +For the definition of stacking contexts, see CSS 2.1 specification, + +- <a href="http://www.w3.org/TR/CSS2/visuren.html#z-index">section + 9.9.1: Specifying the stack level: the 'z-index' property</a> and +- <a href="http://www.w3.org/TR/CSS2/zindex.html">appendix E</a>. + +A widget establishes a stacking context when it is positioned and its +style value of *z-index* is different from *auto* (see +dw::core::StackingContextMgr::isEstablishingStackingContext). In this +case, it is assigned an instance of dw::core::StackingContextMgr, +which has also access to the widgets establishing the child contexts. + + +Stacking Order +============== + +The stacking order influences + +1. the order in which child widgets are drawn (dw::core::Widget::draw), + and +2. the order in which mouse events are dispatched to child widgets + (dw::core::Widget::getWidgetAtPoint). + +The first is done from bottom to top, the latter from top to bottom. + +I'm here referring to the simplified description in +<a href="http://www.w3.org/TR/CSS2/visuren.html#z-index">section +9.9.1</a>. The table shows a recommended order for the implementations +of dw::core::Widget::draw and dw::core::Widget::getWidgetAtPoint +(for the latter, read from bottom to top): + +<table> +<tr> +<th> CSS specification <th> Drawing <th> Mouse events +<tr> +<td> *1. the background and borders of the element forming the + stacking context.* +<td> dw::core::Widget::drawBox +<td> Nothing necessary. +<tr> +<td> *2. the child stacking contexts with negative stack levels (most + negative first).* +<td> dw::core::StackingContextMgr::drawBottom (when defined) +<td> dw::core::StackingContextMgr::getBottomWidgetAtPoint (when defined) +<tr> +<td> *3. the in-flow, non-inline-level, non-positioned descendants.* + +<td rowspan="4"> When (i) widget specific content is drawn, then (ii) + dw::oof::OOFAwareWidget::drawOOF is called, this will + have this effect: + + 1. all in-flow elements are drawn, + 2. floats are drawn and + 3. positioned elements with *z-index: auto* are drawn + (latter two done by + dw::oof::OOFAwareWidget::drawOOF, in this order). + + This order differs from the specified order, but + since floats and in-flow elements do not overlap, + this difference has no effect. + + Drawing in-line elements, floats and positioned + elements with *z-index: auto* and should avoid + duplicate calls: Widgets drawn by + dw::core::StackingContextMgr::drawBottom and by + dw::core::StackingContextMgr::drawTop should be + excluded here. This can be tested with + dw::core::StackingContextMgr::handledByStackingContextMgr. + +<td rowspan="4"> Likewise, the implementation should (i) test + dw::oof::OOFAwareWidget::getWidgetOOFAtPoint, and + (ii) search through the chilren. Also, duplicate + calls should be avoided using + dw::core::StackingContextMgr::handledByStackingContextMgr. + + There are already the implementations + dw::core::Widget::getWidgetAtPoint (ignoring + dw::oof::OutOfFlowMgr) and + dw::oof::OOFAwareWidget::getWidgetAtPoint (including + dw::oof::OutOfFlowMgr). + +<tr> +<td> *4. the non-positioned floats.* +<tr> +<td> *5. the in-flow, inline-level, non-positioned descendants, + including inline tables and inline blocks.* +<tr> +<td> (What about positioned elements with *z-index: auto*? Seems to be + missing in + <a href="http://www.w3.org/TR/CSS2/visuren.html#z-index">section + 9.9.1</a>, but mentioned in + <a href="http://www.w3.org/TR/CSS2/zindex.html">appendix E</a>, + item 8. +<tr> +<td> *6. the child stacking contexts with stack level 0 and the + positioned descendants with stack level 0.* +<td rowspan="2"> dw::core::StackingContextMgr::drawTop (when defined) +<td rowspan="2"> dw::core::StackingContextMgr::getTopWidgetAtPoint + (when defined) +<tr> +<td> *7. the child stacking contexts with positive stack levels (least + positive first).* +</table> + +Note: This is not quite in conformance with the specification: this +description refers to any widget, not only widgets establishing a +stacking context. Does this make a difference? + +*/
\ No newline at end of file |