MCPcopy Create free account
hub / github.com/dillo-browser/dillo / handOverBreak

Method handOverBreak

dw/textblock.cc:2955–2968  ·  view source on GitHub ↗

* This function "hands" the last break of a page "over" to a parent * page. This is used for "collapsing spaces". */

Source from the content-addressed store, hash-verified

2953 * page. This is used for "collapsing spaces".
2954 */
2955void Textblock::handOverBreak (core::style::Style *style)
2956{
2957 if (lines->size() > 0) {
2958 Widget *parent;
2959 Line *lastLine = lines->getRef (lines->size () - 1);
2960
2961 if (lastLine->breakSpace != 0 && (parent = getParent()) &&
2962 parent->instanceOf (Textblock::CLASS_ID) &&
2963 parent->getStyle()->display != core::style::DISPLAY_BLOCK) {
2964 Textblock *textblock2 = (Textblock*) parent;
2965 textblock2->addParbreak(lastLine->breakSpace, style);
2966 }
2967 }
2968}
2969
2970/*
2971 * Any words added by addWord() are not immediately (queued to

Callers 1

Html_eventually_pop_dwFunction · 0.80

Calls 6

getParentFunction · 0.85
instanceOfMethod · 0.80
addParbreakMethod · 0.80
sizeMethod · 0.45
getRefMethod · 0.45
getStyleMethod · 0.45

Tested by

no test coverage detected