Merge commit 1170303 from the Enterprise branch

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1171389 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent c5415f6983
commit d0abc1a165

@ -1 +1 @@
Revision 1170137
Revision 1170313

@ -1076,6 +1076,13 @@ bool CSSParser::parseValue( int propId, bool important )
CSS_PROP_LIST_STYLE_IMAGE };
return parseShortHand(propId, properties, 3, important);
}
case CSS_PROP_WORD_WRAP:
{
// normal | break-word
if ( id == CSS_VAL_NORMAL || id == CSS_VAL_BREAK_WORD )
valid_primitive = true;
break;
}
default:
// #ifdef CSS_DEBUG
// kdDebug( 6080 ) << "illegal or CSS2 Aural property: " << val << endl;

@ -1,4 +1,4 @@
/* ANSI-C code produced by gperf version 3.0.1 */
/* ANSI-C code produced by gperf version 3.0.2 */
/* Command-line: gperf -a -L ANSI-C -E -C -c -o -t -k '*' -NfindProp -Hhash_prop -Wwordlist_prop -D -s 2 cssproperties.gperf */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@ -40,7 +40,7 @@ struct props {
};
static const struct props * findProp (register const char *str, register unsigned int len);
/* maximum key range = 508, duplicates = 0 */
/* maximum key range = 469, duplicates = 0 */
#ifdef __GNUC__
__inline
@ -54,32 +54,32 @@ hash_prop (register const char *str, register unsigned int len)
{
static const unsigned short asso_values[] =
{
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 0, 511, 511, 511, 511,
511, 0, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 10, 0, 0,
5, 5, 160, 0, 0, 0, 511, 15, 5, 0,
25, 0, 0, 15, 0, 30, 0, 40, 5, 190,
5, 135, 120, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511, 511, 511, 511, 511, 511
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 0, 472, 472, 472, 472,
472, 0, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 10, 0, 0,
5, 5, 120, 0, 0, 0, 472, 15, 5, 0,
25, 0, 0, 50, 0, 30, 0, 40, 0, 140,
35, 180, 80, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
472, 472, 472, 472, 472, 472
};
register int hval = len;
@ -193,11 +193,11 @@ findProp (register const char *str, register unsigned int len)
{
enum
{
TOTAL_KEYWORDS = 128,
TOTAL_KEYWORDS = 129,
MIN_WORD_LENGTH = 3,
MAX_WORD_LENGTH = 32,
MIN_HASH_VALUE = 3,
MAX_HASH_VALUE = 510
MAX_HASH_VALUE = 471
};
static const struct props wordlist_prop[] =
@ -214,20 +214,18 @@ findProp (register const char *str, register unsigned int len)
{"color", CSS_PROP_COLOR},
#line 58 "cssproperties.gperf"
{"height", CSS_PROP_HEIGHT},
#line 118 "cssproperties.gperf"
#line 119 "cssproperties.gperf"
{"border", CSS_PROP_BORDER},
#line 121 "cssproperties.gperf"
{"border-top", CSS_PROP_BORDER_TOP},
#line 122 "cssproperties.gperf"
{"border-right", CSS_PROP_BORDER_RIGHT},
{"border-top", CSS_PROP_BORDER_TOP},
#line 123 "cssproperties.gperf"
{"border-right", CSS_PROP_BORDER_RIGHT},
#line 124 "cssproperties.gperf"
{"border-bottom", CSS_PROP_BORDER_BOTTOM},
#line 42 "cssproperties.gperf"
{"clear", CSS_PROP_CLEAR},
#line 119 "cssproperties.gperf"
#line 120 "cssproperties.gperf"
{"border-color", CSS_PROP_BORDER_COLOR},
#line 76 "cssproperties.gperf"
{"max-height", CSS_PROP_MAX_HEIGHT},
#line 28 "cssproperties.gperf"
{"border-top-color", CSS_PROP_BORDER_TOP_COLOR},
#line 29 "cssproperties.gperf"
@ -236,7 +234,7 @@ findProp (register const char *str, register unsigned int len)
{"border-bottom-color", CSS_PROP_BORDER_BOTTOM_COLOR},
#line 78 "cssproperties.gperf"
{"min-height", CSS_PROP_MIN_HEIGHT},
#line 129 "cssproperties.gperf"
#line 130 "cssproperties.gperf"
{"margin", CSS_PROP_MARGIN},
#line 49 "cssproperties.gperf"
{"direction", CSS_PROP_DIRECTION},
@ -248,7 +246,7 @@ findProp (register const char *str, register unsigned int len)
{"margin-bottom", CSS_PROP_MARGIN_BOTTOM},
#line 61 "cssproperties.gperf"
{"line-height", CSS_PROP_LINE_HEIGHT},
#line 131 "cssproperties.gperf"
#line 132 "cssproperties.gperf"
{"padding", CSS_PROP_PADDING},
#line 89 "cssproperties.gperf"
{"padding-top", CSS_PROP_PADDING_TOP},
@ -256,53 +254,53 @@ findProp (register const char *str, register unsigned int len)
{"padding-right", CSS_PROP_PADDING_RIGHT},
#line 91 "cssproperties.gperf"
{"padding-bottom", CSS_PROP_PADDING_BOTTOM},
#line 102 "cssproperties.gperf"
{"text-align", CSS_PROP_TEXT_ALIGN},
#line 76 "cssproperties.gperf"
{"max-height", CSS_PROP_MAX_HEIGHT},
#line 45 "cssproperties.gperf"
{"content", CSS_PROP_CONTENT},
#line 97 "cssproperties.gperf"
{"position", CSS_PROP_POSITION},
#line 103 "cssproperties.gperf"
{"text-decoration", CSS_PROP_TEXT_DECORATION},
#line 80 "cssproperties.gperf"
{"orphans", CSS_PROP_ORPHANS},
#line 48 "cssproperties.gperf"
{"cursor", CSS_PROP_CURSOR},
#line 110 "cssproperties.gperf"
{"vertical-align", CSS_PROP_VERTICAL_ALIGN},
#line 48 "cssproperties.gperf"
{"cursor", CSS_PROP_CURSOR},
#line 24 "cssproperties.gperf"
{"border-collapse", CSS_PROP_BORDER_COLLAPSE},
#line 104 "cssproperties.gperf"
{"text-indent", CSS_PROP_TEXT_INDENT},
#line 130 "cssproperties.gperf"
#line 131 "cssproperties.gperf"
{"outline", CSS_PROP_OUTLINE},
#line 135 "cssproperties.gperf"
#line 136 "cssproperties.gperf"
{"scrollbar-highlight-color", CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR},
#line 41 "cssproperties.gperf"
{"caption-side", CSS_PROP_CAPTION_SIDE},
#line 136 "cssproperties.gperf"
#line 137 "cssproperties.gperf"
{"scrollbar-3dlight-color", CSS_PROP_SCROLLBAR_3DLIGHT_COLOR},
#line 25 "cssproperties.gperf"
{"border-spacing", CSS_PROP_BORDER_SPACING},
#line 102 "cssproperties.gperf"
{"text-align", CSS_PROP_TEXT_ALIGN},
#line 109 "cssproperties.gperf"
{"unicode-bidi", CSS_PROP_UNICODE_BIDI},
#line 82 "cssproperties.gperf"
{"outline-color", CSS_PROP_OUTLINE_COLOR},
#line 60 "cssproperties.gperf"
{"letter-spacing", CSS_PROP_LETTER_SPACING},
#line 98 "cssproperties.gperf"
{"quotes", CSS_PROP_QUOTES},
#line 138 "cssproperties.gperf"
#line 103 "cssproperties.gperf"
{"text-decoration", CSS_PROP_TEXT_DECORATION},
#line 139 "cssproperties.gperf"
{"scrollbar-track-color", CSS_PROP_SCROLLBAR_TRACK_COLOR},
#line 117 "cssproperties.gperf"
#line 118 "cssproperties.gperf"
{"background", CSS_PROP_BACKGROUND},
#line 70 "cssproperties.gperf"
{"-khtml-marquee", CSS_PROP__KHTML_MARQUEE},
#line 104 "cssproperties.gperf"
{"text-indent", CSS_PROP_TEXT_INDENT},
#line 69 "cssproperties.gperf"
{"-khtml-margin-start", CSS_PROP__KHTML_MARGIN_START},
#line 14 "cssproperties.gperf"
{"background-color", CSS_PROP_BACKGROUND_COLOR},
#line 132 "cssproperties.gperf"
#line 100 "cssproperties.gperf"
{"size", CSS_PROP_SIZE},
#line 133 "cssproperties.gperf"
{"scrollbar-base-color", CSS_PROP_SCROLLBAR_BASE_COLOR},
#line 47 "cssproperties.gperf"
{"counter-reset", CSS_PROP_COUNTER_RESET},
@ -312,208 +310,208 @@ findProp (register const char *str, register unsigned int len)
{"background-image", CSS_PROP_BACKGROUND_IMAGE},
#line 96 "cssproperties.gperf"
{"page-break-inside", CSS_PROP_PAGE_BREAK_INSIDE},
#line 98 "cssproperties.gperf"
{"quotes", CSS_PROP_QUOTES},
#line 16 "cssproperties.gperf"
{"background-repeat", CSS_PROP_BACKGROUND_REPEAT},
#line 21 "cssproperties.gperf"
{"-khtml-background-clip", CSS_PROP__KHTML_BACKGROUND_CLIP},
#line 46 "cssproperties.gperf"
{"counter-increment", CSS_PROP_COUNTER_INCREMENT},
#line 27 "cssproperties.gperf"
{"-khtml-border-vertical-spacing", CSS_PROP__KHTML_BORDER_VERTICAL_SPACING},
#line 81 "cssproperties.gperf"
{"opacity", CSS_PROP_OPACITY},
#line 71 "cssproperties.gperf"
{"-khtml-marquee-direction", CSS_PROP__KHTML_MARQUEE_DIRECTION},
#line 73 "cssproperties.gperf"
{"-khtml-marquee-repetition", CSS_PROP__KHTML_MARQUEE_REPETITION},
#line 100 "cssproperties.gperf"
{"size", CSS_PROP_SIZE},
#line 74 "cssproperties.gperf"
{"-khtml-marquee-speed", CSS_PROP__KHTML_MARQUEE_SPEED},
#line 22 "cssproperties.gperf"
{"-khtml-background-origin", CSS_PROP__KHTML_BACKGROUND_ORIGIN},
#line 17 "cssproperties.gperf"
{"background-attachment", CSS_PROP_BACKGROUND_ATTACHMENT},
#line 116 "cssproperties.gperf"
{"z-index", CSS_PROP_Z_INDEX},
#line 18 "cssproperties.gperf"
{"background-position", CSS_PROP_BACKGROUND_POSITION},
#line 59 "cssproperties.gperf"
{"left", CSS_PROP_LEFT},
#line 19 "cssproperties.gperf"
{"background-position-x", CSS_PROP_BACKGROUND_POSITION_X},
#line 141 "cssproperties.gperf"
{"-khtml-user-input", CSS_PROP__KHTML_USER_INPUT},
#line 72 "cssproperties.gperf"
{"-khtml-marquee-increment", CSS_PROP__KHTML_MARQUEE_INCREMENT},
#line 52 "cssproperties.gperf"
{"float", CSS_PROP_FLOAT},
#line 111 "cssproperties.gperf"
{"visibility", CSS_PROP_VISIBILITY},
#line 127 "cssproperties.gperf"
#line 21 "cssproperties.gperf"
{"-khtml-background-clip", CSS_PROP__KHTML_BACKGROUND_CLIP},
#line 70 "cssproperties.gperf"
{"-khtml-marquee", CSS_PROP__KHTML_MARQUEE},
#line 27 "cssproperties.gperf"
{"-khtml-border-vertical-spacing", CSS_PROP__KHTML_BORDER_VERTICAL_SPACING},
#line 46 "cssproperties.gperf"
{"counter-increment", CSS_PROP_COUNTER_INCREMENT},
#line 128 "cssproperties.gperf"
{"font", CSS_PROP_FONT},
#line 126 "cssproperties.gperf"
{"box-sizing", CSS_PROP_BOX_SIZING},
#line 124 "cssproperties.gperf"
{"border-left", CSS_PROP_BORDER_LEFT},
#line 50 "cssproperties.gperf"
{"display", CSS_PROP_DISPLAY},
#line 51 "cssproperties.gperf"
{"empty-cells", CSS_PROP_EMPTY_CELLS},
#line 120 "cssproperties.gperf"
{"border-style", CSS_PROP_BORDER_STYLE},
#line 114 "cssproperties.gperf"
{"width", CSS_PROP_WIDTH},
#line 32 "cssproperties.gperf"
{"border-top-style", CSS_PROP_BORDER_TOP_STYLE},
#line 125 "cssproperties.gperf"
{"border-left", CSS_PROP_BORDER_LEFT},
#line 117 "cssproperties.gperf"
{"z-index", CSS_PROP_Z_INDEX},
#line 31 "cssproperties.gperf"
{"border-left-color", CSS_PROP_BORDER_LEFT_COLOR},
#line 33 "cssproperties.gperf"
{"border-right-style", CSS_PROP_BORDER_RIGHT_STYLE},
#line 34 "cssproperties.gperf"
{"border-bottom-style", CSS_PROP_BORDER_BOTTOM_STYLE},
#line 68 "cssproperties.gperf"
{"margin-left", CSS_PROP_MARGIN_LEFT},
#line 125 "cssproperties.gperf"
#line 22 "cssproperties.gperf"
{"-khtml-background-origin", CSS_PROP__KHTML_BACKGROUND_ORIGIN},
#line 17 "cssproperties.gperf"
{"background-attachment", CSS_PROP_BACKGROUND_ATTACHMENT},
#line 126 "cssproperties.gperf"
{"border-width", CSS_PROP_BORDER_WIDTH},
#line 77 "cssproperties.gperf"
{"max-width", CSS_PROP_MAX_WIDTH},
#line 128 "cssproperties.gperf"
{"list-style", CSS_PROP_LIST_STYLE},
#line 18 "cssproperties.gperf"
{"background-position", CSS_PROP_BACKGROUND_POSITION},
#line 36 "cssproperties.gperf"
{"border-top-width", CSS_PROP_BORDER_TOP_WIDTH},
#line 101 "cssproperties.gperf"
{"table-layout", CSS_PROP_TABLE_LAYOUT},
#line 37 "cssproperties.gperf"
{"border-right-width", CSS_PROP_BORDER_RIGHT_WIDTH},
#line 38 "cssproperties.gperf"
{"border-bottom-width", CSS_PROP_BORDER_BOTTOM_WIDTH},
#line 92 "cssproperties.gperf"
{"padding-left", CSS_PROP_PADDING_LEFT},
#line 68 "cssproperties.gperf"
{"margin-left", CSS_PROP_MARGIN_LEFT},
#line 142 "cssproperties.gperf"
{"-khtml-user-input", CSS_PROP__KHTML_USER_INPUT},
#line 79 "cssproperties.gperf"
{"min-width", CSS_PROP_MIN_WIDTH},
#line 127 "cssproperties.gperf"
{"box-sizing", CSS_PROP_BOX_SIZING},
#line 92 "cssproperties.gperf"
{"padding-left", CSS_PROP_PADDING_LEFT},
#line 71 "cssproperties.gperf"
{"-khtml-marquee-direction", CSS_PROP__KHTML_MARQUEE_DIRECTION},
#line 73 "cssproperties.gperf"
{"-khtml-marquee-repetition", CSS_PROP__KHTML_MARQUEE_REPETITION},
#line 95 "cssproperties.gperf"
{"page-break-before", CSS_PROP_PAGE_BREAK_BEFORE},
#line 74 "cssproperties.gperf"
{"-khtml-marquee-speed", CSS_PROP__KHTML_MARQUEE_SPEED},
#line 94 "cssproperties.gperf"
{"page-break-after", CSS_PROP_PAGE_BREAK_AFTER},
#line 62 "cssproperties.gperf"
{"list-style-image", CSS_PROP_LIST_STYLE_IMAGE},
#line 81 "cssproperties.gperf"
{"opacity", CSS_PROP_OPACITY},
#line 77 "cssproperties.gperf"
{"max-width", CSS_PROP_MAX_WIDTH},
#line 112 "cssproperties.gperf"
{"white-space", CSS_PROP_WHITE_SPACE},
#line 56 "cssproperties.gperf"
{"font-variant", CSS_PROP_FONT_VARIANT},
#line 107 "cssproperties.gperf"
{"text-transform", CSS_PROP_TEXT_TRANSFORM},
#line 133 "cssproperties.gperf"
#line 19 "cssproperties.gperf"
{"background-position-x", CSS_PROP_BACKGROUND_POSITION_X},
#line 134 "cssproperties.gperf"
{"scrollbar-face-color", CSS_PROP_SCROLLBAR_FACE_COLOR},
#line 112 "cssproperties.gperf"
{"white-space", CSS_PROP_WHITE_SPACE},
#line 106 "cssproperties.gperf"
{"text-shadow", CSS_PROP_TEXT_SHADOW},
#line 84 "cssproperties.gperf"
{"outline-style", CSS_PROP_OUTLINE_STYLE},
#line 115 "cssproperties.gperf"
#line 72 "cssproperties.gperf"
{"-khtml-marquee-increment", CSS_PROP__KHTML_MARQUEE_INCREMENT},
#line 116 "cssproperties.gperf"
{"word-spacing", CSS_PROP_WORD_SPACING},
#line 139 "cssproperties.gperf"
#line 111 "cssproperties.gperf"
{"visibility", CSS_PROP_VISIBILITY},
#line 140 "cssproperties.gperf"
{"scrollbar-arrow-color", CSS_PROP_SCROLLBAR_ARROW_COLOR},
#line 85 "cssproperties.gperf"
{"outline-width", CSS_PROP_OUTLINE_WIDTH},
#line 63 "cssproperties.gperf"
{"list-style-position", CSS_PROP_LIST_STYLE_POSITION},
#line 106 "cssproperties.gperf"
{"text-shadow", CSS_PROP_TEXT_SHADOW},
#line 50 "cssproperties.gperf"
{"display", CSS_PROP_DISPLAY},
#line 107 "cssproperties.gperf"
{"text-transform", CSS_PROP_TEXT_TRANSFORM},
#line 51 "cssproperties.gperf"
{"empty-cells", CSS_PROP_EMPTY_CELLS},
#line 121 "cssproperties.gperf"
{"border-style", CSS_PROP_BORDER_STYLE},
#line 32 "cssproperties.gperf"
{"border-top-style", CSS_PROP_BORDER_TOP_STYLE},
#line 26 "cssproperties.gperf"
{"-khtml-border-horizontal-spacing", CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING},
#line 75 "cssproperties.gperf"
{"-khtml-marquee-style", CSS_PROP__KHTML_MARQUEE_STYLE},
#line 33 "cssproperties.gperf"
{"border-right-style", CSS_PROP_BORDER_RIGHT_STYLE},
#line 34 "cssproperties.gperf"
{"border-bottom-style", CSS_PROP_BORDER_BOTTOM_STYLE},
#line 23 "cssproperties.gperf"
{"-khtml-background-size", CSS_PROP__KHTML_BACKGROUND_SIZE},
#line 20 "cssproperties.gperf"
{"background-position-y", CSS_PROP_BACKGROUND_POSITION_Y},
#line 134 "cssproperties.gperf"
#line 135 "cssproperties.gperf"
{"scrollbar-shadow-color", CSS_PROP_SCROLLBAR_SHADOW_COLOR},
#line 137 "cssproperties.gperf"
{"scrollbar-darkshadow-color", CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR},
#line 129 "cssproperties.gperf"
{"list-style", CSS_PROP_LIST_STYLE},
#line 101 "cssproperties.gperf"
{"table-layout", CSS_PROP_TABLE_LAYOUT},
#line 54 "cssproperties.gperf"
{"font-size", CSS_PROP_FONT_SIZE},
#line 64 "cssproperties.gperf"
{"list-style-type", CSS_PROP_LIST_STYLE_TYPE},
#line 55 "cssproperties.gperf"
{"font-style", CSS_PROP_FONT_STYLE},
#line 35 "cssproperties.gperf"
{"border-left-style", CSS_PROP_BORDER_LEFT_STYLE},
#line 86 "cssproperties.gperf"
{"overflow", CSS_PROP_OVERFLOW},
#line 87 "cssproperties.gperf"
{"overflow-x", CSS_PROP_OVERFLOW_X},
#line 105 "cssproperties.gperf"
{"text-overflow", CSS_PROP_TEXT_OVERFLOW},
#line 62 "cssproperties.gperf"
{"list-style-image", CSS_PROP_LIST_STYLE_IMAGE},
#line 138 "cssproperties.gperf"
{"scrollbar-darkshadow-color", CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR},
#line 57 "cssproperties.gperf"
{"font-weight", CSS_PROP_FONT_WEIGHT},
#line 39 "cssproperties.gperf"
{"border-left-width", CSS_PROP_BORDER_LEFT_WIDTH},
#line 140 "cssproperties.gperf"
#line 115 "cssproperties.gperf"
{"word-wrap", CSS_PROP_WORD_WRAP},
#line 84 "cssproperties.gperf"
{"outline-style", CSS_PROP_OUTLINE_STYLE},
#line 141 "cssproperties.gperf"
{"-khtml-flow-mode", CSS_PROP__KHTML_FLOW_MODE},
#line 87 "cssproperties.gperf"
{"overflow-x", CSS_PROP_OVERFLOW_X},
#line 113 "cssproperties.gperf"
{"widows", CSS_PROP_WIDOWS},
#line 105 "cssproperties.gperf"
{"text-overflow", CSS_PROP_TEXT_OVERFLOW},
#line 63 "cssproperties.gperf"
{"list-style-position", CSS_PROP_LIST_STYLE_POSITION},
#line 20 "cssproperties.gperf"
{"background-position-y", CSS_PROP_BACKGROUND_POSITION_Y},
#line 83 "cssproperties.gperf"
{"outline-offset", CSS_PROP_OUTLINE_OFFSET},
#line 53 "cssproperties.gperf"
{"font-family", CSS_PROP_FONT_FAMILY},
#line 75 "cssproperties.gperf"
{"-khtml-marquee-style", CSS_PROP__KHTML_MARQUEE_STYLE},
#line 55 "cssproperties.gperf"
{"font-style", CSS_PROP_FONT_STYLE},
#line 35 "cssproperties.gperf"
{"border-left-style", CSS_PROP_BORDER_LEFT_STYLE},
#line 64 "cssproperties.gperf"
{"list-style-type", CSS_PROP_LIST_STYLE_TYPE},
#line 88 "cssproperties.gperf"
{"overflow-y", CSS_PROP_OVERFLOW_Y}
{"overflow-y", CSS_PROP_OVERFLOW_Y},
#line 53 "cssproperties.gperf"
{"font-family", CSS_PROP_FONT_FAMILY}
};
static const signed char lookup[] =
static const short lookup[] =
{
-1, -1, -1, 0, -1, 1, 2, -1, -1, 3,
4, 5, -1, -1, -1, -1, 6, -1, -1, -1,
7, -1, 8, 9, -1, 10, -1, 11, -1, -1,
12, 13, -1, 14, 15, -1, -1, -1, -1, -1,
16, 17, -1, -1, 18, 19, -1, 20, 21, -1,
-1, 22, 23, -1, -1, -1, 24, -1, 25, 26,
27, -1, 28, 29, -1, -1, -1, -1, -1, -1,
30, -1, 31, -1, -1, -1, 32, -1, -1, 33,
34, 35, 36, -1, -1, 37, -1, 38, 39, 40,
-1, -1, 41, 42, 43, -1, 44, -1, -1, -1,
-1, 45, -1, -1, -1, 46, -1, -1, -1, 47,
-1, -1, -1, -1, 48, -1, 49, -1, -1, -1,
50, -1, -1, 51, -1, 52, 53, 54, -1, -1,
-1, -1, 55, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 56, -1, -1, -1, -1, 57, -1, -1,
58, -1, 59, -1, 60, 61, -1, -1, -1, 62,
63, -1, -1, -1, 64, -1, 65, 66, -1, 67,
-1, -1, -1, -1, 68, -1, 69, 70, -1, 71,
72, -1, -1, -1, -1, 73, -1, -1, -1, 74,
75, 76, 77, -1, -1, -1, 78, 79, -1, -1,
80, 81, 82, 83, 84, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 85, 86, -1, 87,
88, 89, 90, 91, 92, -1, -1, 93, -1, 94,
-1, -1, 95, -1, -1, -1, 96, -1, -1, -1,
-1, 97, -1, -1, -1, -1, -1, 98, -1, 99,
100, 101, -1, -1, -1, -1, 102, -1, -1, -1,
-1, -1, -1, 103, -1, -1, -1, -1, -1, -1,
-1, -1, 104, -1, -1, -1, 105, -1, -1, -1,
-1, -1, -1, 106, 107, -1, -1, 108, -1, -1,
109, -1, 110, -1, -1, -1, -1, -1, -1, -1,
-1, 12, -1, 13, 14, -1, -1, -1, -1, -1,
15, 16, -1, -1, 17, 18, -1, 19, 20, -1,
-1, 21, 22, -1, -1, -1, 23, -1, 24, 25,
26, -1, 27, 28, -1, -1, -1, -1, -1, -1,
-1, -1, 29, -1, 30, -1, 31, -1, -1, -1,
32, -1, 33, -1, -1, 34, -1, 35, 36, 37,
38, -1, 39, 40, 41, -1, -1, -1, -1, -1,
42, 43, -1, -1, -1, 44, -1, -1, -1, -1,
-1, 45, -1, -1, 46, -1, 47, -1, -1, 48,
49, -1, -1, 50, -1, 51, 52, 53, -1, -1,
-1, 54, 55, -1, 56, -1, -1, -1, -1, -1,
57, -1, 58, -1, 59, 60, -1, 61, -1, 62,
63, 64, -1, -1, -1, -1, -1, 65, -1, -1,
-1, -1, 66, -1, 67, -1, 68, 69, -1, 70,
-1, 71, -1, 72, 73, -1, 74, 75, -1, 76,
77, -1, -1, -1, -1, -1, -1, 78, -1, 79,
80, -1, 81, -1, -1, 82, 83, 84, -1, 85,
-1, 86, 87, -1, -1, -1, 88, -1, -1, -1,
89, -1, -1, -1, 90, -1, -1, -1, -1, -1,
-1, -1, 91, -1, -1, 92, 93, -1, -1, -1,
-1, -1, -1, 94, -1, -1, 95, 96, -1, 97,
-1, 98, 99, -1, -1, -1, 100, 101, 102, 103,
-1, -1, 104, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 105, -1, -1, 106, -1, 107, -1, 108,
-1, -1, -1, -1, -1, -1, -1, -1, 109, -1,
-1, -1, -1, -1, -1, -1, 110, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 111, -1, -1, -1,
-1, -1, 112, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 112, 113, -1, 114, -1, -1, -1, 115, -1,
-1, 116, -1, -1, -1, 117, -1, -1, -1, -1,
-1, 118, -1, 119, -1, -1, -1, -1, -1, 120,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 113, -1, -1, 114,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 115, -1, -1, -1, -1,
116, -1, 117, 118, -1, -1, -1, -1, -1, -1,
119, -1, -1, -1, -1, -1, -1, -1, 120, -1,
-1, 121, 122, -1, -1, -1, -1, -1, -1, -1,
-1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 121, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 122, -1, -1, -1, -1, -1,
123, -1, -1, -1, -1, 124, -1, 125, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 124, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 125, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 126, -1, -1, -1,
127
-1, -1, -1, -1, -1, 126, -1, -1, -1, -1,
127, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 128
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@ -535,7 +533,7 @@ findProp (register const char *str, register unsigned int len)
}
return 0;
}
#line 142 "cssproperties.gperf"
#line 143 "cssproperties.gperf"
static const char * const propertyList[] = {
"",
@ -640,6 +638,7 @@ static const char * const propertyList[] = {
"white-space",
"widows",
"width",
"word-wrap",
"word-spacing",
"z-index",
"background",

@ -109,35 +109,36 @@ DOM::DOMString getPropertyName(unsigned short id) KDE_NO_EXPORT;
#define CSS_PROP_WHITE_SPACE 99
#define CSS_PROP_WIDOWS 100
#define CSS_PROP_WIDTH 101
#define CSS_PROP_WORD_SPACING 102
#define CSS_PROP_Z_INDEX 103
#define CSS_PROP_BACKGROUND 104
#define CSS_PROP_BORDER 105
#define CSS_PROP_BORDER_COLOR 106
#define CSS_PROP_BORDER_STYLE 107
#define CSS_PROP_BORDER_TOP 108
#define CSS_PROP_BORDER_RIGHT 109
#define CSS_PROP_BORDER_BOTTOM 110
#define CSS_PROP_BORDER_LEFT 111
#define CSS_PROP_BORDER_WIDTH 112
#define CSS_PROP_BOX_SIZING 113
#define CSS_PROP_FONT 114
#define CSS_PROP_LIST_STYLE 115
#define CSS_PROP_MARGIN 116
#define CSS_PROP_OUTLINE 117
#define CSS_PROP_PADDING 118
#define CSS_PROP_SCROLLBAR_BASE_COLOR 119
#define CSS_PROP_SCROLLBAR_FACE_COLOR 120
#define CSS_PROP_SCROLLBAR_SHADOW_COLOR 121
#define CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR 122
#define CSS_PROP_SCROLLBAR_3DLIGHT_COLOR 123
#define CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR 124
#define CSS_PROP_SCROLLBAR_TRACK_COLOR 125
#define CSS_PROP_SCROLLBAR_ARROW_COLOR 126
#define CSS_PROP__KHTML_FLOW_MODE 127
#define CSS_PROP__KHTML_USER_INPUT 128
#define CSS_PROP_WORD_WRAP 102
#define CSS_PROP_WORD_SPACING 103
#define CSS_PROP_Z_INDEX 104
#define CSS_PROP_BACKGROUND 105
#define CSS_PROP_BORDER 106
#define CSS_PROP_BORDER_COLOR 107
#define CSS_PROP_BORDER_STYLE 108
#define CSS_PROP_BORDER_TOP 109
#define CSS_PROP_BORDER_RIGHT 110
#define CSS_PROP_BORDER_BOTTOM 111
#define CSS_PROP_BORDER_LEFT 112
#define CSS_PROP_BORDER_WIDTH 113
#define CSS_PROP_BOX_SIZING 114
#define CSS_PROP_FONT 115
#define CSS_PROP_LIST_STYLE 116
#define CSS_PROP_MARGIN 117
#define CSS_PROP_OUTLINE 118
#define CSS_PROP_PADDING 119
#define CSS_PROP_SCROLLBAR_BASE_COLOR 120
#define CSS_PROP_SCROLLBAR_FACE_COLOR 121
#define CSS_PROP_SCROLLBAR_SHADOW_COLOR 122
#define CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR 123
#define CSS_PROP_SCROLLBAR_3DLIGHT_COLOR 124
#define CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR 125
#define CSS_PROP_SCROLLBAR_TRACK_COLOR 126
#define CSS_PROP_SCROLLBAR_ARROW_COLOR 127
#define CSS_PROP__KHTML_FLOW_MODE 128
#define CSS_PROP__KHTML_USER_INPUT 129
#define CSS_PROP_MAX CSS_PROP_Z_INDEX
#define CSS_PROP_TOTAL 129
#define CSS_PROP_TOTAL 130
#endif

@ -116,6 +116,7 @@ visibility
white-space
widows
width
word-wrap
word-spacing
z-index
background

@ -175,6 +175,26 @@ if (id == propID) \
return;\
}
#define HANDLE_INHERIT_ON_INHERITED_PROPERTY(prop, Prop) \
if (isInherit) \
{\
style->set##Prop(parentStyle->prop());\
return;\
}
#define HANDLE_INITIAL(prop, Prop) \
if (isInitial) \
{\
style->set##Prop(RenderStyle::initial##Prop());\
return;\
}
#define HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(prop, Prop) \
HANDLE_INITIAL(prop, Prop) \
else \
HANDLE_INHERIT_ON_INHERITED_PROPERTY(prop, Prop)
namespace khtml {
CSSStyleSelectorList *CSSStyleSelector::s_defaultStyle;
@ -3953,6 +3973,13 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value )
break;
}
}
case CSS_PROP_WORD_WRAP: {
HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(wordWrap, WordWrap)
if (!primitiveValue)
return;
style->setWordWrap(primitiveValue->getIdent() == CSS_VAL_NORMAL ? WWNORMAL : WWBREAKWORD);
break;
}
default:
return;
}

File diff suppressed because it is too large Load Diff

@ -227,63 +227,64 @@ DOM::DOMString getValueName(unsigned short id) KDE_NO_EXPORT;
#define CSS_VAL_PRE_WRAP 216
#define CSS_VAL_PRE_LINE 217
#define CSS_VAL__KHTML_NOWRAP 218
#define CSS_VAL_ABOVE 219
#define CSS_VAL_ABSOLUTE 220
#define CSS_VAL_ALWAYS 221
#define CSS_VAL_AVOID 222
#define CSS_VAL_BELOW 223
#define CSS_VAL_BIDI_OVERRIDE 224
#define CSS_VAL_BLINK 225
#define CSS_VAL_BOTH 226
#define CSS_VAL_CROP 227
#define CSS_VAL_CROSS 228
#define CSS_VAL_EMBED 229
#define CSS_VAL_FIXED 230
#define CSS_VAL_HAND 231
#define CSS_VAL_HIDE 232
#define CSS_VAL_HIGHER 233
#define CSS_VAL_INVERT 234
#define CSS_VAL_LANDSCAPE 235
#define CSS_VAL_LEVEL 236
#define CSS_VAL_LINE_THROUGH 237
#define CSS_VAL_LOUD 238
#define CSS_VAL_LOWER 239
#define CSS_VAL_MARQUEE 240
#define CSS_VAL_MIX 241
#define CSS_VAL_OVERLINE 242
#define CSS_VAL_PORTRAIT 243
#define CSS_VAL_RELATIVE 244
#define CSS_VAL_SCROLL 245
#define CSS_VAL_SEPARATE 246
#define CSS_VAL_SHOW 247
#define CSS_VAL_STATIC 248
#define CSS_VAL_THICK 249
#define CSS_VAL_THIN 250
#define CSS_VAL_UNDERLINE 251
#define CSS_VAL__KHTML_NORMAL 252
#define CSS_VAL__KHTML_AROUND_FLOATS 253
#define CSS_VAL_BORDER_BOX 254
#define CSS_VAL_CONTENT_BOX 255
#define CSS_VAL_ENABLED 256
#define CSS_VAL_DISABLED 257
#define CSS_VAL_FORWARDS 258
#define CSS_VAL_BACKWARDS 259
#define CSS_VAL_AHEAD 260
#define CSS_VAL_REVERSE 261
#define CSS_VAL_UP 262
#define CSS_VAL_DOWN 263
#define CSS_VAL_SLOW 264
#define CSS_VAL_FAST 265
#define CSS_VAL_INFINITE 266
#define CSS_VAL_SLIDE 267
#define CSS_VAL_ALTERNATE 268
#define CSS_VAL_UNFURL 269
#define CSS_VAL_CLIP 270
#define CSS_VAL_ELLIPSIS 271
#define CSS_VAL_BORDER 272
#define CSS_VAL_CONTENT 273
#define CSS_VAL_PADDING 274
#define CSS_VAL_BREAK_WORD 219
#define CSS_VAL_ABOVE 220
#define CSS_VAL_ABSOLUTE 221
#define CSS_VAL_ALWAYS 222
#define CSS_VAL_AVOID 223
#define CSS_VAL_BELOW 224
#define CSS_VAL_BIDI_OVERRIDE 225
#define CSS_VAL_BLINK 226
#define CSS_VAL_BOTH 227
#define CSS_VAL_CROP 228
#define CSS_VAL_CROSS 229
#define CSS_VAL_EMBED 230
#define CSS_VAL_FIXED 231
#define CSS_VAL_HAND 232
#define CSS_VAL_HIDE 233
#define CSS_VAL_HIGHER 234
#define CSS_VAL_INVERT 235
#define CSS_VAL_LANDSCAPE 236
#define CSS_VAL_LEVEL 237
#define CSS_VAL_LINE_THROUGH 238
#define CSS_VAL_LOUD 239
#define CSS_VAL_LOWER 240
#define CSS_VAL_MARQUEE 241
#define CSS_VAL_MIX 242
#define CSS_VAL_OVERLINE 243
#define CSS_VAL_PORTRAIT 244
#define CSS_VAL_RELATIVE 245
#define CSS_VAL_SCROLL 246
#define CSS_VAL_SEPARATE 247
#define CSS_VAL_SHOW 248
#define CSS_VAL_STATIC 249
#define CSS_VAL_THICK 250
#define CSS_VAL_THIN 251
#define CSS_VAL_UNDERLINE 252
#define CSS_VAL__KHTML_NORMAL 253
#define CSS_VAL__KHTML_AROUND_FLOATS 254
#define CSS_VAL_BORDER_BOX 255
#define CSS_VAL_CONTENT_BOX 256
#define CSS_VAL_ENABLED 257
#define CSS_VAL_DISABLED 258
#define CSS_VAL_FORWARDS 259
#define CSS_VAL_BACKWARDS 260
#define CSS_VAL_AHEAD 261
#define CSS_VAL_REVERSE 262
#define CSS_VAL_UP 263
#define CSS_VAL_DOWN 264
#define CSS_VAL_SLOW 265
#define CSS_VAL_FAST 266
#define CSS_VAL_INFINITE 267
#define CSS_VAL_SLIDE 268
#define CSS_VAL_ALTERNATE 269
#define CSS_VAL_UNFURL 270
#define CSS_VAL_CLIP 271
#define CSS_VAL_ELLIPSIS 272
#define CSS_VAL_BORDER 273
#define CSS_VAL_CONTENT 274
#define CSS_VAL_PADDING 275
#define CSS_VAL_TOTAL 275
#define CSS_VAL_TOTAL 276
#endif

@ -309,6 +309,11 @@ pre-wrap
pre-line
-khtml-nowrap
#
# CSS_PROP_WORD_WRAP
#
#normal
break-word
#
# Unordered rest
#
above

@ -44,10 +44,10 @@ namespace khtml {
// an iterator which goes through a BidiParagraph
struct BidiIterator
{
BidiIterator() : par(0), obj(0), pos(0) {}
BidiIterator(RenderBlock *_par, RenderObject *_obj, unsigned int _pos) : par(_par), obj(_obj), pos(_pos) {}
BidiIterator() : par(0), obj(0), pos(0), endOfInline(0) {}
BidiIterator(RenderBlock *_par, RenderObject *_obj, unsigned int _pos, bool eoi=false) : par(_par), obj(_obj), pos(_pos), endOfInline(eoi) {}
void increment( BidiState &bidi );
void increment( BidiState &bidi, bool skipInlines=true );
bool atEnd() const;
@ -57,6 +57,7 @@ struct BidiIterator
RenderBlock *par;
RenderObject *obj;
unsigned int pos;
bool endOfInline;
};
@ -128,21 +129,6 @@ static int getBorderPaddingMargin(RenderObject* child, bool endOfInline)
return result;
}
static int inlineWidth(RenderObject* child, bool start = true, bool end = true)
{
int extraWidth = 0;
RenderObject* parent = child->parent();
while (parent->isInline() && !parent->isInlineBlockOrInlineTable()) {
if (start && parent->firstChild() == child)
extraWidth += getBorderPaddingMargin(parent, false);
if (end && parent->lastChild() == child)
extraWidth += getBorderPaddingMargin(parent, true);
child = parent;
parent = child->parent();
}
return extraWidth;
}
#ifndef NDEBUG
static bool inBidiRunDetach;
#endif
@ -241,15 +227,19 @@ inline bool operator!=( const BidiIterator &it1, const BidiIterator &it2 )
return false;
}
// when modifying this function, make sure you check InlineMinMaxIterator::next() as well.
static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, BidiState &bidi,
bool skipInlines = true)
bool skipInlines = true, bool *endOfInline = 0 )
{
RenderObject *next = 0;
bool oldEndOfInline = endOfInline ? *endOfInline : false;
if (oldEndOfInline)
*endOfInline = false;
while(current != 0)
{
//kdDebug( 6040 ) << "current = " << current << endl;
if (!current->isFloating() && !current->isReplaced() && !current->isPositioned()) {
if (!oldEndOfInline && !current->isFloating() && !current->isReplaced() && !current->isPositioned()) {
next = current->firstChild();
if ( next && adjustEmbedding ) {
EUnicodeBidi ub = next->style()->unicodeBidi();
@ -262,6 +252,12 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B
}
}
if (!next) {
if (!skipInlines && !oldEndOfInline && current->isInlineFlow() && endOfInline) {
next = current;
*endOfInline = true;
break;
}
while (current && current != par) {
next = current->nextSibling();
if (next) break;
@ -269,6 +265,11 @@ static inline RenderObject *Bidinext(RenderObject *par, RenderObject *current, B
embed( TQChar::DirPDF, bidi );
}
current = current->parent();
if (!skipInlines && current && current != par && current->isInlineFlow() && endOfInline) {
next = current;
*endOfInline = true;
break;
}
}
}
@ -300,17 +301,17 @@ static RenderObject *first( RenderObject *par, BidiState &bidi, bool skipInlines
return o;
}
inline void BidiIterator::increment (BidiState &bidi)
inline void BidiIterator::increment (BidiState &bidi, bool skipInlines)
{
if(!obj) return;
if(obj->isText()) {
pos++;
if(pos >= static_cast<RenderText *>(obj)->stringLength()) {
obj = Bidinext( par, obj, bidi );
obj = Bidinext( par, obj, bidi, skipInlines );
pos = 0;
}
} else {
obj = Bidinext( par, obj, bidi );
obj = Bidinext( par, obj, bidi, skipInlines, &endOfInline );
pos = 0;
}
}
@ -1322,45 +1323,6 @@ void RenderBlock::bidiReorderLine(const BidiIterator &start, const BidiIterator
#endif
}
#ifdef APPLE_CHANGES // KDE handles compact blocks differently
static void buildCompactRuns(RenderObject* compactObj, BidiState &bidi)
{
sBuildingCompactRuns = true;
if (!compactObj->isRenderBlock()) {
// Just append a run for our object.
isLineEmpty = false;
addRun(new (compactObj->renderArena()) BidiRun(0, compactObj->length(), compactObj, bidi.context, dir));
}
else {
// Format the compact like it is its own single line. We build up all the runs for
// the little compact and then reorder them for bidi.
RenderBlock* compactBlock = static_cast<RenderBlock*>(compactObj);
adjustEmbedding = true;
BidiIterator start(compactBlock, first(compactBlock, bidi), 0);
adjustEmbedding = false;
BidiIterator end = start;
betweenMidpoints = false;
isLineEmpty = true;
previousLineBrokeAtBR = true;
end = compactBlock->findNextLineBreak(start, bidi);
if (!isLineEmpty)
compactBlock->bidiReorderLine(start, end, bidi);
}
sCompactFirstBidiRun = sFirstBidiRun;
sCompactLastBidiRun = sLastBidiRun;
sCompactBidiRunCount = sBidiRunCount;
sNumMidpoints = 0;
sCurrMidpoint = 0;
betweenMidpoints = false;
sBuildingCompactRuns = false;
}
#endif
void RenderBlock::layoutInlineChildren(bool relayoutChildren, int breakBeforeLine)
{
BidiState bidi;
@ -1470,13 +1432,6 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren, int breakBeforeLin
oldStart = start;
oldBidi = bidi;
}
#ifdef APPLE_CHANGES // KDE handles compact blocks differently
if (m_firstLine && firstChild() && firstChild()->isCompact()) {
buildCompactRuns(firstChild(), bidi);
start.obj = firstChild()->nextSibling();
end = start;
}
#endif
if (lineCount == breakBeforeLine) {
m_height = pageTopAfter(oldPos);
pagebreakHint = true;
@ -1491,15 +1446,6 @@ redo_linebreak:
// At the same time we figure out where border/padding/margin should be applied for
// inline flow boxes.
#ifdef APPLE_CHANGES // KDE handles compact blocks differently
if (sCompactFirstBidiRun) {
// We have a compact line sharing this line. Link the compact runs
// to our runs to create a single line of runs.
sCompactLastBidiRun->nextRun = sFirstBidiRun;
sFirstBidiRun = sCompactFirstBidiRun;
sBidiRunCount += sCompactBidiRunCount;
}
#endif
if (sBidiRunCount) {
InlineFlowBox* lineBox = constructLine(start, end);
if (lineBox) {
@ -1698,7 +1644,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
}
}
adjustEmbedding = true;
start.increment(bidi);
start.increment(bidi, false /*skipInlines*/);
adjustEmbedding = false;
}
@ -1714,6 +1660,11 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
return start;
}
// This variable says we have encountered an object after which initial whitespace should be ignored (e.g. InlineFlows at the begining of a line).
// Either we have nothing to do, if there is no whitespace after the object... or we have to enter the ignoringSpaces state.
// This dilemma will be resolved when we have a peek at the next object.
bool checkShouldIgnoreInitialWhitespace = false;
// This variable is used only if whitespace isn't set to PRE, and it tells us whether
// or not we are currently ignoring whitespace.
bool ignoringSpaces = false;
@ -1727,13 +1678,14 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
BidiIterator lBreak = start;
RenderObject *o = start.obj;
RenderObject *last = o;
InlineMinMaxIterator it(start.par, start.obj, start.endOfInline, false /*skipPositioned*/);
InlineMinMaxIterator lastIt = it;
int pos = start.pos;
bool prevLineBrokeCleanly = previousLineBrokeAtBR;
previousLineBrokeAtBR = false;
RenderObject* o = it.current;
while( o ) {
#ifdef DEBUG_LINEBREAKS
kdDebug(6041) << "new object "<< o <<" width = " << w <<" tmpw = " << tmpW << endl;
@ -1742,6 +1694,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
if( w + tmpW <= width ) {
lBreak.obj = o;
lBreak.pos = 0;
lBreak.endOfInline = it.endOfInline;
// A <br> always breaks a line, so don't let the line be collapsed
// away. Also, the space at the end of a line with a <br> does not
@ -1792,13 +1745,22 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
}
}
} else if (o->isInlineFlow()) {
// Only empty inlines matter. We treat those similarly to replaced elements.
KHTMLAssert(!o->firstChild());
tmpW += o->marginLeft()+o->borderLeft()+o->paddingLeft()+
o->marginRight()+o->borderRight()+o->paddingRight();
tmpW += getBorderPaddingMargin(o, it.endOfInline);
if (isLineEmpty) isLineEmpty = !tmpW;
if (o->isWordBreak()) { // #### shouldn't be an InlineFlow!
w += tmpW;
tmpW = 0;
lBreak.obj = o;
lBreak.pos = 0;
lBreak.endOfInline = it.endOfInline;
} else if (!it.endOfInline) {
// this is the beginning of the line (other non-initial inline flows are handled directly when
// incrementing the iterator below). We want to skip initial whitespace as much as possible.
checkShouldIgnoreInitialWhitespace = true;
}
} else if ( o->isReplaced() || o->isGlyph() ) {
EWhiteSpace currWS = o->style()->whiteSpace();
EWhiteSpace lastWS = last->style()->whiteSpace();
EWhiteSpace lastWS = lastIt.current->style()->whiteSpace();
// WinIE marquees have different whitespace characteristics by default when viewed from
// the outside vs. the inside. Text inside is NOWRAP, and so we altered the marquee's
@ -1806,8 +1768,8 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
// for the marquee when checking for line breaking.
if (o->isHTMLMarquee() && o->layer() && o->layer()->marquee())
currWS = o->layer()->marquee()->whiteSpace();
if (last->isHTMLMarquee() && last->layer() && last->layer()->marquee())
lastWS = last->layer()->marquee()->whiteSpace();
if (lastIt.current->isHTMLMarquee() && lastIt.current->layer() && lastIt.current->layer()->marquee())
lastWS = lastIt.current->layer()->marquee()->whiteSpace();
// Break on replaced elements if either has normal white-space.
if (currWS == NORMAL || lastWS == NORMAL) {
@ -1815,9 +1777,10 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
tmpW = 0;
lBreak.obj = o;
lBreak.pos = 0;
lBreak.endOfInline = false;
}
tmpW += o->width()+o->marginLeft()+o->marginRight()+inlineWidth(o);
tmpW += o->width()+o->marginLeft()+o->marginRight();
if (ignoringSpaces) {
BidiIterator startMid( 0, o, 0 );
addMidpoint(startMid);
@ -1828,21 +1791,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
trailingSpaceObject = 0;
if (o->isListMarker() && o->style()->listStylePosition() == OUTSIDE) {
// The marker must not have an effect on whitespace at the start
// of the line. We start ignoring spaces to make sure that any additional
// spaces we see will be discarded.
//
// Optimize for a common case. If we can't find whitespace after the list
// item, then this is all moot. -dwh
RenderObject* next = Bidinext( start.par, o, bidi );
if (!style()->preserveWS() && next && next->isText() && static_cast<RenderText*>(next)->stringLength() > 0 &&
(static_cast<RenderText*>(next)->text()[0].category() == TQChar::Separator_Space ||
static_cast<RenderText*>(next)->text()[0] == '\n')) {
currentCharacterIsSpace = true;
ignoringSpaces = true;
BidiIterator endMid( 0, o, 0 );
addMidpoint(endMid);
}
checkShouldIgnoreInitialWhitespace = true;
}
} else if ( o->isText() ) {
RenderText *t = static_cast<RenderText *>(o);
@ -1859,10 +1808,8 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
#ifdef APPLE_CHANGES
int wordSpacing = o->style()->wordSpacing();
#endif
bool appliedStartWidth = pos > 0; // If the span originated on a previous line,
// then assume the start width has been applied.
bool appliedEndWidth = false;
bool nextIsSoftBreakable = false;
bool checkBreakWord = autoWrap && (o->style()->wordWrap() == WWBREAKWORD);
while(len) {
bool previousCharacterIsSpace = currentCharacterIsSpace;
@ -1870,6 +1817,8 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
nextIsSoftBreakable = false;
const TQChar c = str[pos];
currentCharacterIsSpace = c == ' ';
checkBreakWord &= !w; // only break words when no other breaking opportunity exists earlier
// on the line (even within the text object we are currently processing)
if (preserveWS || !currentCharacterIsSpace)
isLineEmpty = false;
@ -1921,13 +1870,11 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
}
}
if ( (preserveLF && c == '\n') || (autoWrap && (isBreakable( str, pos, strlen ) || isSoftBreakable)) ) {
const bool isbreakablePosition = (preserveLF && c == '\n') || (autoWrap &&
(isBreakable( str, pos, strlen ) || isSoftBreakable));
if ( isbreakablePosition || checkBreakWord ) {
tmpW += t->width(lastSpace, pos - lastSpace, f);
if (!appliedStartWidth) {
tmpW += inlineWidth(o, true, false);
appliedStartWidth = true;
}
#ifdef APPLE_CHANGES
applyWordSpacing = (wordSpacing && currentCharacterIsSpace && !previousCharacterIsSpace &&
!t->containsOnlyWhitespace(pos+1, strlen-(pos+1)));
@ -1957,9 +1904,14 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
}
if (autoWrap) {
if (w+tmpW > width)
if (w+tmpW > width) {
if (checkBreakWord && pos) {
lBreak.obj = o;
lBreak.pos = pos-1;
lBreak.endOfInline = false;
}
goto end;
else if ( (pos > 1 && str[pos-1].unicode() == SOFT_HYPHEN) )
} else if ( (pos > 1 && str[pos-1].unicode() == SOFT_HYPHEN) )
// Subtract the width of the soft hyphen out since we fit on a line.
tmpW -= t->width(pos-1, 1, f);
}
@ -1967,6 +1919,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
if( preserveLF && *(str+pos) == '\n' ) {
lBreak.obj = o;
lBreak.pos = pos;
lBreak.endOfInline = false;
#ifdef DEBUG_LINEBREAKS
kdDebug(6041) << "forced break sol: " << start.obj << " " << start.pos << " end: " << lBreak.obj << " " << lBreak.pos << " width=" << w << endl;
@ -1974,11 +1927,12 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
return lBreak;
}
if ( autoWrap ) {
if ( autoWrap && isbreakablePosition ) {
w += tmpW;
tmpW = 0;
lBreak.obj = o;
lBreak.pos = pos;
lBreak.endOfInline = false;
}
lastSpace = pos;
@ -2016,31 +1970,63 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
len--;
}
// IMPORTANT: pos is > length here!
if (!ignoringSpaces)
if (!ignoringSpaces) {
// We didn't find any space that would be beyond the line |width|.
// Lets add to |tmpW| the remaining width since the last space we found.
// Before we test this new |tmpW| however, we will have to look ahead to check
// if the next object/position can serve as a line breaking opportunity.
tmpW += t->width(lastSpace, pos - lastSpace, f);
if (!appliedStartWidth)
tmpW += inlineWidth(o, true, false);
if (!appliedEndWidth)
tmpW += inlineWidth(o, false, true);
if (checkBreakWord && !w && pos && tmpW > width) {
// Avoid doing the costly lookahead for break-word,
// since we know we are allowed to break.
lBreak.obj = o;
lBreak.pos = pos-1;
lBreak.endOfInline = false;
goto end;
}
}
} else
KHTMLAssert( false );
RenderObject* next = Bidinext(start.par, o, bidi);
bool autoWrap = o->style()->autoWrap();
InlineMinMaxIterator savedIt = lastIt;
lastIt = it;
o = it.next();
// advance the iterator to the next non-inline-flow
while (o && o->isInlineFlow() && !o->isWordBreak()) {
tmpW += getBorderPaddingMargin(o, it.endOfInline);
if (isLineEmpty) isLineEmpty = !tmpW;
o = it.next();
}
if (checkShouldIgnoreInitialWhitespace) {
// Check if we should switch to ignoringSpaces state
if (!style()->preserveWS() && it.current && it.current->isText()) {
const RenderText* rt = static_cast<RenderText*>(it.current);
if (rt->stringLength() > 0 && (rt->text()[0].category() == TQChar::Separator_Space || rt->text()[0] == '\n')) {
currentCharacterIsSpace = true;
ignoringSpaces = true;
BidiIterator endMid( 0, lastIt.current, 0 );
addMidpoint(endMid);
}
}
checkShouldIgnoreInitialWhitespace = false;
}
bool autoWrap = lastIt.current->style()->autoWrap();
bool checkForBreak = autoWrap;
if (w && w + tmpW > width && lBreak.obj && !o->style()->preserveLF() && !autoWrap)
if (w && w + tmpW > width && lBreak.obj && !lastIt.current->style()->preserveLF() && !autoWrap)
checkForBreak = true;
else if (next && o->isText() && next->isText() && !next->isBR()) {
if (autoWrap || next->style()->autoWrap()) {
else if (it.current && lastIt.current->isText() && it.current->isText() && !it.current->isBR()) {
if (autoWrap || it.current->style()->autoWrap()) {
if (currentCharacterIsSpace)
checkForBreak = true;
else {
checkForBreak = false;
RenderText* nextText = static_cast<RenderText*>(next);
RenderText* nextText = static_cast<RenderText*>(it.current);
if (nextText->stringLength() != 0) {
TQChar c = nextText->text()[0];
if (c == ' ' || c == '\t' || (c == '\n' && !next->style()->preserveLF())) {
if (c == ' ' || c == '\t' || (c == '\n' && !it.current->style()->preserveLF())) {
// If the next item on the line is text, and if we did not end with
// a space, then the next text run continues our word (and so it needs to
// keep adding to |tmpW|. Just update and continue.
@ -2052,8 +2038,9 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
if (canPlaceOnLine && checkForBreak) {
w += tmpW;
tmpW = 0;
lBreak.obj = next;
lBreak.obj = it.current;
lBreak.pos = 0;
lBreak.endOfInline = it.endOfInline;
}
}
}
@ -2063,7 +2050,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
//kdDebug() << " too wide w=" << w << " tmpW = " << tmpW << " width = " << width << endl;
//kdDebug() << "start=" << start.obj << " current=" << o << endl;
// if we have floats, try to get below them.
if (currentCharacterIsSpace && !ignoringSpaces && !o->style()->preserveWS())
if (currentCharacterIsSpace && !ignoringSpaces && !lastIt.current->style()->preserveWS())
trailingSpaceObject = 0;
int fb = nearestFloatBottom(m_height);
@ -2087,24 +2074,26 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
// |width| may have been adjusted because we got shoved down past a float (thus
// giving us more room), so we need to retest, and only jump to
// the end label if we still don't fit on the line. -dwh
if (w + tmpW > width)
if (w + tmpW > width) {
it = lastIt;
lastIt = savedIt;
o = it.current;
goto end;
}
}
last = o;
o = next;
if (!last->isFloatingOrPositioned() && last->isReplaced() && last->style()->autoWrap()) {
if (!lastIt.current->isFloatingOrPositioned() && lastIt.current->isReplaced() && lastIt.current->style()->autoWrap()) {
// Go ahead and add in tmpW.
w += tmpW;
tmpW = 0;
lBreak.obj = o;
lBreak.pos = 0;
lBreak.endOfInline = it.endOfInline;
}
// Clear out our character space bool, since inline <pre>s don't collapse whitespace
// with adjacent inline normal/nowrap spans.
if (last->style()->preserveWS())
if (lastIt.current->style()->preserveWS())
currentCharacterIsSpace = false;
pos = 0;
@ -2113,9 +2102,10 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
#ifdef DEBUG_LINEBREAKS
kdDebug( 6041 ) << "end of par, width = " << width << " linewidth = " << w + tmpW << endl;
#endif
if( w + tmpW <= width || (last && !last->style()->autoWrap())) {
if( w + tmpW <= width || (lastIt.current && !lastIt.current->style()->autoWrap())) {
lBreak.obj = 0;
lBreak.pos = 0;
lBreak.endOfInline = false;
}
end:
@ -2127,21 +2117,25 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
if(pos != 0) {
lBreak.obj = o;
lBreak.pos = pos - 1;
lBreak.endOfInline = it.endOfInline;
} else {
lBreak.obj = last;
lBreak.pos = last->isText() ? last->length() : 0;
lBreak.obj = lastIt.current;
lBreak.pos = lastIt.current->isText() ? lastIt.current->length() : 0;
lBreak.endOfInline = lastIt.endOfInline;
}
} else if( lBreak.obj ) {
if( last != o ) {
if( lastIt.current != o ) {
// better to break between object boundaries than in the middle of a word
lBreak.obj = o;
lBreak.pos = 0;
lBreak.endOfInline = it.endOfInline;
} else {
// Don't ever break in the middle of a word if we can help it.
// There's no room at all. We just have to be on this line,
// even though we'll spill out.
lBreak.obj = o;
lBreak.pos = pos;
lBreak.endOfInline = it.endOfInline;
}
}
}
@ -2150,8 +2144,11 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start, BidiState &bidi
start = posStart;
// make sure we consume at least one char/object.
if( lBreak == start )
// and avoid returning an InlineFlow
// (FIXME: turn those wordbreaks into empty text objects - they shouldn't be inline flows!)
if( lBreak == start || (lBreak.obj && lBreak.obj->isInlineFlow() && !lBreak.obj->isWordBreak())) {
lBreak.increment(bidi);
}
#ifdef DEBUG_LINEBREAKS
kdDebug(6041) << "regular break sol: " << start.obj << " " << start.pos << " end: " << lBreak.obj << " " << lBreak.pos << " width=" << w << endl;

@ -24,6 +24,7 @@
#define BIDI_H
#include <tqstring.h>
#include "rendering/render_object.h"
namespace khtml {
class RenderArena;
@ -101,6 +102,71 @@ public:
struct BidiIterator;
struct BidiState;
struct InlineMinMaxIterator
{
/* InlineMinMaxIterator is a class that will iterate over all render objects that contribute to
inline min/max width calculations. Note the following about the way it walks:
(1) Positioned content is skipped (since it does not contribute to min/max width of a block)
(2) We do not drill into the children of floats or replaced elements, since you can't break
in the middle of such an element.
(3) Inline flows (e.g., <a>, <span>, <i>) are walked twice, since each side can have
distinct borders/margin/padding that contribute to the min/max width.
*/
RenderObject* parent;
RenderObject* current;
bool endOfInline;
bool skipPositioned;
InlineMinMaxIterator(RenderObject* p, RenderObject* o, bool eOI=false, bool skipPos=true)
:parent(p), current(o), endOfInline(eOI), skipPositioned(skipPos) {}
inline RenderObject* next();
};
inline RenderObject* InlineMinMaxIterator::next()
{
RenderObject* result = 0;
bool oldEndOfInline = endOfInline;
endOfInline = false;
while (current != 0 || (current == parent))
{
//kDebug( 6040 ) << "current = " << current;
if (!oldEndOfInline &&
(current == parent ||
(!current->isFloating() && !current->isReplaced() && !current->isPositioned())))
result = current->firstChild();
if (!result) {
// We hit the end of our inline. (It was empty, e.g., <span></span>.)
if (!oldEndOfInline && current->isInlineFlow()) {
result = current;
endOfInline = true;
break;
}
while (current && current != parent) {
result = current->nextSibling();
if (result) break;
current = current->parent();
if (current && current != parent && current->isInlineFlow()) {
result = current;
endOfInline = true;
break;
}
}
}
if (!result) break;
if ((!skipPositioned || !result->isPositioned()) && (result->isText() || result->isBR() ||
result->isFloatingOrPositioned() || result->isReplaced() || result->isGlyph() || result->isInlineFlow()))
break;
current = result;
result = 0;
}
// Update our position.
current = result;
return current;
}
}
#endif

@ -2623,74 +2623,6 @@ void RenderBlock::calcMinMaxWidth()
// ### compare with min/max width set in style sheet...
}
struct InlineMinMaxIterator
{
/* InlineMinMaxIterator is a class that will iterate over all render objects that contribute to
inline min/max width calculations. Note the following about the way it walks:
(1) Positioned content is skipped (since it does not contribute to min/max width of a block)
(2) We do not drill into the children of floats or replaced elements, since you can't break
in the middle of such an element.
(3) Inline flows (e.g., <a>, <span>, <i>) are walked twice, since each side can have
distinct borders/margin/padding that contribute to the min/max width.
*/
RenderObject* parent;
RenderObject* current;
bool endOfInline;
InlineMinMaxIterator(RenderObject* p, RenderObject* o, bool end = false)
:parent(p), current(o), endOfInline(end) {}
RenderObject* next();
};
RenderObject* InlineMinMaxIterator::next()
{
RenderObject* result = 0;
bool oldEndOfInline = endOfInline;
endOfInline = false;
while (current != 0 || (current == parent))
{
//kdDebug( 6040 ) << "current = " << current << endl;
if (!oldEndOfInline &&
(current == parent ||
(!current->isFloating() && !current->isReplaced() && !current->isPositioned())))
result = current->firstChild();
if (!result) {
// We hit the end of our inline. (It was empty, e.g., <span></span>.)
if (!oldEndOfInline && current->isInlineFlow()) {
result = current;
endOfInline = true;
break;
}
while (current && current != parent) {
result = current->nextSibling();
if (result) break;
current = current->parent();
if (current && current != parent && current->isInlineFlow()) {
result = current;
endOfInline = true;
break;
}
}
}
if (!result) break;
if (!result->isPositioned() && (result->isText() || result->isBR() ||
result->isFloating() || result->isReplaced() ||
result->isInlineFlow()))
break;
current = result;
result = 0;
}
// Update our position.
current = result;
return current;
}
// bidi.cpp defines the following functions too.
// Maybe these should not be static, after all...

@ -271,8 +271,8 @@ bool InlineFlowBox::onEndChain(RenderObject* endObject)
RenderObject* curr = endObject;
RenderObject* parent = curr->parent();
while (parent && !parent->isRenderBlock() || parent == object()) {
if (parent->lastChild() != curr)
while (parent && !parent->isRenderBlock()) {
if (parent->lastChild() != curr || parent == object())
return false;
curr = parent;

@ -244,6 +244,11 @@ bool RenderObject::isHR() const
return element() && element()->id() == ID_HR;
}
bool RenderObject::isWordBreak() const
{
return element() && element()->id() == ID_WBR;
}
bool RenderObject::isHTMLMarquee() const
{
return element() && element()->renderer() == this && element()->id() == ID_MARQUEE;

@ -282,6 +282,7 @@ public:
virtual bool isApplet() const { return false; }
bool isHTMLMarquee() const;
bool isWordBreak() const;
bool isAnonymous() const { return m_isAnonymous; }
void setIsAnonymous(bool b) { m_isAnonymous = b; }

@ -429,7 +429,7 @@ bool StyleCSS3NonInheritedData::operator==(const StyleCSS3NonInheritedData& o) c
}
StyleCSS3InheritedData::StyleCSS3InheritedData()
:Shared<StyleCSS3InheritedData>(), textShadow(0)
:Shared<StyleCSS3InheritedData>(), textShadow(0), wordWrap(RenderStyle::initialWordWrap())
#ifdef APPLE_CHANGES
, userModify(READ_ONLY), textSizeAdjust(RenderStyle::initialTextSizeAdjust())
#endif
@ -441,6 +441,7 @@ StyleCSS3InheritedData::StyleCSS3InheritedData(const StyleCSS3InheritedData& o)
:Shared<StyleCSS3InheritedData>()
{
textShadow = o.textShadow ? new ShadowData(*o.textShadow) : 0;
wordWrap = o.wordWrap;
#ifdef APPLE_CHANGES
userModify = o.userModify;
textSizeAdjust = o.textSizeAdjust;
@ -454,7 +455,7 @@ StyleCSS3InheritedData::~StyleCSS3InheritedData()
bool StyleCSS3InheritedData::operator==(const StyleCSS3InheritedData& o) const
{
return shadowDataEquivalent(o)
return shadowDataEquivalent(o) && (wordWrap == o.wordWrap)
#ifdef APPLE_CHANGES
&& (userModify == o.userModify) && (textSizeAdjust == o.textSizeAdjust)
#endif

@ -192,6 +192,9 @@ enum EFloat {
FNONE = 0, FLEFT = 0x01, FRIGHT = 0x02, FLEFT_ALIGN = 0x05, FRIGHT_ALIGN = 0x06
};
enum EWordWrap {
WWNORMAL = 0, WWBREAKWORD = 0x01
};
//------------------------------------------------
// Border attributes. Not inherited.
@ -702,6 +705,7 @@ class StyleCSS3InheritedData : public Shared<StyleCSS3InheritedData>
EUserModify userModify : 2; // Flag used for editing state
bool textSizeAdjust : 1; // An Apple extension. Not really CSS3 but not worth making a new struct over.
#endif
EWordWrap wordWrap : 1;
private:
StyleCSS3InheritedData &operator=(const StyleCSS3InheritedData &);
};
@ -1195,6 +1199,7 @@ public:
return background->m_outline._offset;
}
ShadowData* textShadow() const { return css3InheritedData->textShadow; }
EWordWrap wordWrap() const { return css3InheritedData->wordWrap; }
float opacity() { return css3NonInheritedData->opacity; }
EUserInput userInput() const { return inherited_flags.f._user_input; }
@ -1346,6 +1351,7 @@ public:
// CSS3 Setters
void setBoxSizing( EBoxSizing b ) { SET_VAR(box,box_sizing,b); }
void setOutlineOffset(unsigned short v) { SET_VAR(background,m_outline._offset,v) }
void setWordWrap(EWordWrap w) { SET_VAR(css3InheritedData, wordWrap, w); }
void setTextShadow(ShadowData* val, bool add=false);
void setOpacity(float f) { SET_VAR(css3NonInheritedData, opacity, f); }
void setUserInput(EUserInput ui) { inherited_flags.f._user_input = ui; }
@ -1424,6 +1430,7 @@ public:
static EDisplay initialDisplay() { return INLINE; }
static EEmptyCell initialEmptyCells() { return SHOW; }
static EFloat initialFloating() { return FNONE; }
static EWordWrap initialWordWrap() { return WWNORMAL; }
static EListStylePosition initialListStylePosition() { return OUTSIDE; }
static EListStyleType initialListStyleType() { return LDISC; }
static EOverflow initialOverflowX() { return OVISIBLE; }

Loading…
Cancel
Save