| 207 | } |
| 208 | |
| 209 | int litehtml::element::get_inline_shift_left() |
| 210 | { |
| 211 | int ret = 0; |
| 212 | element::ptr el_parent = parent(); |
| 213 | if (el_parent) |
| 214 | { |
| 215 | if (el_parent->get_display() == display_inline) |
| 216 | { |
| 217 | style_display disp = get_display(); |
| 218 | |
| 219 | if (disp == display_inline_text || disp == display_inline_block) |
| 220 | { |
| 221 | element::ptr el = shared_from_this(); |
| 222 | while (el_parent && el_parent->get_display() == display_inline) |
| 223 | { |
| 224 | if (el_parent->is_first_child_inline(el)) |
| 225 | { |
| 226 | ret += el_parent->padding_left() + el_parent->border_left() + el_parent->margin_left(); |
| 227 | } |
| 228 | el = el_parent; |
| 229 | el_parent = el_parent->parent(); |
| 230 | } |
| 231 | } |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | return ret; |
| 236 | } |
| 237 | |
| 238 | int litehtml::element::get_inline_shift_right() |
| 239 | { |
no test coverage detected