1#include "html.h"
2#include "document.h"
3#include "el_space.h"
4
5litehtml::el_space::el_space(const tchar_t* text, const std::shared_ptr<litehtml::document>& doc) : el_text(text, doc)
6{
7}
8
9bool litehtml::el_space::is_white_space() const
10{
11 white_space ws = get_white_space();
12 if( ws == white_space_normal ||
13 ws == white_space_nowrap ||
14 ws == white_space_pre_line )
15 {
16 return true;
17 }
18 return false;
19}
20
21bool litehtml::el_space::is_break() const
22{
23 white_space ws = get_white_space();
24 if( ws == white_space_pre ||
25 ws == white_space_pre_line ||
26 ws == white_space_pre_wrap)
27 {
28 if(m_text == _t("\n"))
29 {
30 return true;
31 }
32 }
33 return false;
34}
35
36bool litehtml::el_space::is_space() const
37{
38 return true;
39}
40
41

source code of qttools/src/assistant/qlitehtml/src/3rdparty/litehtml/src/el_space.cpp