[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:34:27 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 843a0de022fdd4eebd804173e6facb3907143f6f
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Apr 15 23:15:19 2004 +0000
Fix for 3603455, block truncation support.
Reviewed by kocienda
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssproperties.c:
(hash_prop):
(findProp):
* khtml/css/cssproperties.h:
* khtml/css/cssproperties.in:
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyProperty):
* khtml/ecma/kjs_css.cpp:
(cssPropertyName):
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::lineCount):
(khtml::RenderBlock::heightForLineCount):
* khtml/rendering/render_block.h:
* khtml/rendering/render_flexbox.cpp:
(khtml::RenderFlexibleBox::layoutHorizontalBox):
(khtml::RenderFlexibleBox::layoutVerticalBox):
* khtml/rendering/render_style.cpp:
(marquee):
(StyleCSS3NonInheritedData::operator==):
(RenderStyle::diff):
* khtml/rendering/render_style.h:
(khtml::RenderStyle::lineClamp):
(khtml::RenderStyle::setLineClamp):
(khtml::RenderStyle::initialLineClamp):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 80295eb..ea900e7 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,36 @@
+2004-04-15 David Hyatt <hyatt at apple.com>
+
+ Fix for 3603455, block truncation support.
+
+ Reviewed by kocienda
+
+ * khtml/css/cssparser.cpp:
+ (CSSParser::parseValue):
+ * khtml/css/cssproperties.c:
+ (hash_prop):
+ (findProp):
+ * khtml/css/cssproperties.h:
+ * khtml/css/cssproperties.in:
+ * khtml/css/cssstyleselector.cpp:
+ (khtml::CSSStyleSelector::applyProperty):
+ * khtml/ecma/kjs_css.cpp:
+ (cssPropertyName):
+ * khtml/rendering/render_block.cpp:
+ (khtml::RenderBlock::lineCount):
+ (khtml::RenderBlock::heightForLineCount):
+ * khtml/rendering/render_block.h:
+ * khtml/rendering/render_flexbox.cpp:
+ (khtml::RenderFlexibleBox::layoutHorizontalBox):
+ (khtml::RenderFlexibleBox::layoutVerticalBox):
+ * khtml/rendering/render_style.cpp:
+ (marquee):
+ (StyleCSS3NonInheritedData::operator==):
+ (RenderStyle::diff):
+ * khtml/rendering/render_style.h:
+ (khtml::RenderStyle::lineClamp):
+ (khtml::RenderStyle::setLineClamp):
+ (khtml::RenderStyle::initialLineClamp):
+
2004-04-13 Chris Blumenberg <cblu at apple.com>
- Removed WebCoreElementIsEditableKey. This functionality is available via [DOMNode isContentEditable].
diff --git a/WebCore/khtml/css/cssparser.cpp b/WebCore/khtml/css/cssparser.cpp
index 8e326ac..088ba18 100644
--- a/WebCore/khtml/css/cssparser.cpp
+++ b/WebCore/khtml/css/cssparser.cpp
@@ -1095,7 +1095,15 @@ bool CSSParser::parseValue( int propId, bool important )
valid_primitive = true;
break;
// End of CSS3 properties
-
+
+#if APPLE_CHANGES
+ // Apple specific properties. These will never be standardized and are purely to
+ // support custom WebKit-based Apple applications.
+ case CSS_PROP__APPLE_LINE_CLAMP:
+ valid_primitive = (!id && validUnit(value, FPercent, false));
+ break;
+#endif
+
/* shorthand properties */
case CSS_PROP_BACKGROUND:
// ['background-color' || 'background-image' ||'background-repeat' ||
diff --git a/WebCore/khtml/css/cssproperties.c b/WebCore/khtml/css/cssproperties.c
index 9de2459..be5c8ae 100644
--- a/WebCore/khtml/css/cssproperties.c
+++ b/WebCore/khtml/css/cssproperties.c
@@ -7,7 +7,7 @@ struct props {
const char *name;
int id;
};
-/* maximum key range = 1007, duplicates = 0 */
+/* maximum key range = 1258, duplicates = 0 */
#ifdef __GNUC__
__inline
@@ -21,32 +21,32 @@ hash_prop (register const char *str, register unsigned int len)
{
static const unsigned short asso_values[] =
{
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 0, 1012, 1012, 1012, 1012,
- 1012, 0, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 15, 10, 0,
- 0, 0, 100, 50, 0, 0, 10, 10, 0, 10,
- 310, 0, 60, 50, 0, 30, 0, 5, 15, 260,
- 165, 190, 0, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012,
- 1012, 1012, 1012, 1012, 1012, 1012
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 0, 1263, 1263, 1263, 1263,
+ 1263, 0, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 15, 10, 0,
+ 0, 0, 270, 50, 0, 0, 0, 10, 0, 10,
+ 410, 0, 60, 50, 0, 30, 0, 5, 15, 260,
+ 220, 190, 25, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263
};
register int hval = len;
@@ -130,11 +130,11 @@ findProp (register const char *str, register unsigned int len)
{
enum
{
- TOTAL_KEYWORDS = 131,
+ TOTAL_KEYWORDS = 132,
MIN_WORD_LENGTH = 3,
MAX_WORD_LENGTH = 32,
MIN_HASH_VALUE = 5,
- MAX_HASH_VALUE = 1011
+ MAX_HASH_VALUE = 1262
};
static const struct props wordlist_prop[] =
@@ -144,12 +144,12 @@ findProp (register const char *str, register unsigned int len)
{"clear", CSS_PROP_CLEAR},
{"border-color", CSS_PROP_BORDER_COLOR},
{"bottom", CSS_PROP_BOTTOM},
- {"size", CSS_PROP_SIZE},
{"cursor", CSS_PROP_CURSOR},
{"border-bottom", CSS_PROP_BORDER_BOTTOM},
{"border-bottom-color", CSS_PROP_BORDER_BOTTOM_COLOR},
{"right", CSS_PROP_RIGHT},
{"height", CSS_PROP_HEIGHT},
+ {"size", CSS_PROP_SIZE},
{"top", CSS_PROP_TOP},
{"clip", CSS_PROP_CLIP},
{"border-right", CSS_PROP_BORDER_RIGHT},
@@ -158,118 +158,119 @@ findProp (register const char *str, register unsigned int len)
{"border-top-color", CSS_PROP_BORDER_TOP_COLOR},
{"quotes", CSS_PROP_QUOTES},
{"scrollbar-track-color", CSS_PROP_SCROLLBAR_TRACK_COLOR},
- {"left", CSS_PROP_LEFT},
{"-khtml-marquee", CSS_PROP__KHTML_MARQUEE},
- {"float", CSS_PROP_FLOAT},
- {"border-left", CSS_PROP_BORDER_LEFT},
- {"border-left-color", CSS_PROP_BORDER_LEFT_COLOR},
{"scrollbar-3dlight-color", CSS_PROP_SCROLLBAR_3DLIGHT_COLOR},
{"page", CSS_PROP_PAGE},
{"border-collapse", CSS_PROP_BORDER_COLLAPSE},
{"scrollbar-highlight-color", CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR},
- {"scrollbar-face-color", CSS_PROP_SCROLLBAR_FACE_COLOR},
{"-khtml-marquee-speed", CSS_PROP__KHTML_MARQUEE_SPEED},
{"border-style", CSS_PROP_BORDER_STYLE},
{"table-layout", CSS_PROP_TABLE_LAYOUT},
- {"max-height", CSS_PROP_MAX_HEIGHT},
{"visibility", CSS_PROP_VISIBILITY},
{"list-style", CSS_PROP_LIST_STYLE},
{"width", CSS_PROP_WIDTH},
{"border-bottom-style", CSS_PROP_BORDER_BOTTOM_STYLE},
{"opacity", CSS_PROP_OPACITY},
+ {"left", CSS_PROP_LEFT},
{"border-width", CSS_PROP_BORDER_WIDTH},
- {"page-break-before", CSS_PROP_PAGE_BREAK_BEFORE},
- {"page-break-after", CSS_PROP_PAGE_BREAK_AFTER},
- {"-khtml-box-pack", CSS_PROP__KHTML_BOX_PACK},
+ {"float", CSS_PROP_FLOAT},
+ {"border-left", CSS_PROP_BORDER_LEFT},
+ {"border-left-color", CSS_PROP_BORDER_LEFT_COLOR},
{"border-right-style", CSS_PROP_BORDER_RIGHT_STYLE},
{"empty-cells", CSS_PROP_EMPTY_CELLS},
{"display", CSS_PROP_DISPLAY},
+ {"max-height", CSS_PROP_MAX_HEIGHT},
{"border-top-style", CSS_PROP_BORDER_TOP_STYLE},
{"border-bottom-width", CSS_PROP_BORDER_BOTTOM_WIDTH},
- {"direction", CSS_PROP_DIRECTION},
- {"outline", CSS_PROP_OUTLINE},
- {"outline-color", CSS_PROP_OUTLINE_COLOR},
- {"unicode-bidi", CSS_PROP_UNICODE_BIDI},
{"border-right-width", CSS_PROP_BORDER_RIGHT_WIDTH},
{"-khtml-marquee-style", CSS_PROP__KHTML_MARQUEE_STYLE},
{"list-style-image", CSS_PROP_LIST_STYLE_IMAGE},
{"border-top-width", CSS_PROP_BORDER_TOP_WIDTH},
- {"border-left-style", CSS_PROP_BORDER_LEFT_STYLE},
+ {"-khtml-box-pack", CSS_PROP__KHTML_BOX_PACK},
{"scrollbar-arrow-color", CSS_PROP_SCROLLBAR_ARROW_COLOR},
+ {"scrollbar-face-color", CSS_PROP_SCROLLBAR_FACE_COLOR},
+ {"white-space", CSS_PROP_WHITE_SPACE},
+ {"scrollbar-shadow-color", CSS_PROP_SCROLLBAR_SHADOW_COLOR},
+ {"scrollbar-darkshadow-color", CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR},
+ {"direction", CSS_PROP_DIRECTION},
+ {"outline", CSS_PROP_OUTLINE},
+ {"outline-color", CSS_PROP_OUTLINE_COLOR},
+ {"unicode-bidi", CSS_PROP_UNICODE_BIDI},
+ {"page-break-before", CSS_PROP_PAGE_BREAK_BEFORE},
{"counter-reset", CSS_PROP_COUNTER_RESET},
+ {"page-break-after", CSS_PROP_PAGE_BREAK_AFTER},
{"line-height", CSS_PROP_LINE_HEIGHT},
- {"-khtml-user-modify", CSS_PROP__KHTML_USER_MODIFY},
- {"white-space", CSS_PROP_WHITE_SPACE},
{"min-height", CSS_PROP_MIN_HEIGHT},
- {"scrollbar-shadow-color", CSS_PROP_SCROLLBAR_SHADOW_COLOR},
- {"overflow", CSS_PROP_OVERFLOW},
- {"border-left-width", CSS_PROP_BORDER_LEFT_WIDTH},
{"margin", CSS_PROP_MARGIN},
- {"-khtml-flow-mode", CSS_PROP__KHTML_FLOW_MODE},
{"position", CSS_PROP_POSITION},
{"background", CSS_PROP_BACKGROUND},
- {"scrollbar-darkshadow-color", CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR},
- {"font", CSS_PROP_FONT},
+ {"max-width", CSS_PROP_MAX_WIDTH},
+ {"list-style-type", CSS_PROP_LIST_STYLE_TYPE},
{"background-color", CSS_PROP_BACKGROUND_COLOR},
+ {"border-left-style", CSS_PROP_BORDER_LEFT_STYLE},
{"margin-bottom", CSS_PROP_MARGIN_BOTTOM},
{"vertical-align", CSS_PROP_VERTICAL_ALIGN},
{"orphans", CSS_PROP_ORPHANS},
{"caption-side", CSS_PROP_CAPTION_SIDE},
{"-khtml-marquee-direction", CSS_PROP__KHTML_MARQUEE_DIRECTION},
+ {"text-shadow", CSS_PROP_TEXT_SHADOW},
{"padding", CSS_PROP_PADDING},
+ {"-khtml-user-modify", CSS_PROP__KHTML_USER_MODIFY},
{"margin-right", CSS_PROP_MARGIN_RIGHT},
- {"font-size", CSS_PROP_FONT_SIZE},
- {"font-stretch", CSS_PROP_FONT_STRETCH},
+ {"overflow", CSS_PROP_OVERFLOW},
{"margin-top", CSS_PROP_MARGIN_TOP},
- {"max-width", CSS_PROP_MAX_WIDTH},
+ {"widows", CSS_PROP_WIDOWS},
+ {"border-left-width", CSS_PROP_BORDER_LEFT_WIDTH},
{"padding-bottom", CSS_PROP_PADDING_BOTTOM},
- {"-khtml-box-flex", CSS_PROP__KHTML_BOX_FLEX},
+ {"-khtml-flow-mode", CSS_PROP__KHTML_FLOW_MODE},
{"letter-spacing", CSS_PROP_LETTER_SPACING},
- {"text-shadow", CSS_PROP_TEXT_SHADOW},
- {"z-index", CSS_PROP_Z_INDEX},
{"border-spacing", CSS_PROP_BORDER_SPACING},
{"background-image", CSS_PROP_BACKGROUND_IMAGE},
{"background-repeat", CSS_PROP_BACKGROUND_REPEAT},
{"-khtml-marquee-repetition", CSS_PROP__KHTML_MARQUEE_REPETITION},
- {"margin-left", CSS_PROP_MARGIN_LEFT},
{"padding-right", CSS_PROP_PADDING_RIGHT},
- {"text-decoration", CSS_PROP_TEXT_DECORATION},
{"padding-top", CSS_PROP_PADDING_TOP},
- {"text-decoration-color", CSS_PROP_TEXT_DECORATION_COLOR},
- {"list-style-type", CSS_PROP_LIST_STYLE_TYPE},
- {"font-size-adjust", CSS_PROP_FONT_SIZE_ADJUST},
{"page-break-inside", CSS_PROP_PAGE_BREAK_INSIDE},
+ {"-apple-line-clamp", CSS_PROP__APPLE_LINE_CLAMP},
+ {"outline-style", CSS_PROP_OUTLINE_STYLE},
+ {"-khtml-border-vertical-spacing", CSS_PROP__KHTML_BORDER_VERTICAL_SPACING},
+ {"text-decoration", CSS_PROP_TEXT_DECORATION},
+ {"z-index", CSS_PROP_Z_INDEX},
+ {"text-decoration-color", CSS_PROP_TEXT_DECORATION_COLOR},
{"-khtml-box-orient", CSS_PROP__KHTML_BOX_ORIENT},
{"-khtml-box-direction", CSS_PROP__KHTML_BOX_DIRECTION},
- {"padding-left", CSS_PROP_PADDING_LEFT},
- {"outline-style", CSS_PROP_OUTLINE_STYLE},
+ {"font", CSS_PROP_FONT},
+ {"outline-width", CSS_PROP_OUTLINE_WIDTH},
+ {"min-width", CSS_PROP_MIN_WIDTH},
{"text-align", CSS_PROP_TEXT_ALIGN},
{"-khtml-box-lines", CSS_PROP__KHTML_BOX_LINES},
- {"-khtml-border-vertical-spacing", CSS_PROP__KHTML_BORDER_VERTICAL_SPACING},
- {"widows", CSS_PROP_WIDOWS},
- {"outline-offset", CSS_PROP_OUTLINE_OFFSET},
+ {"font-stretch", CSS_PROP_FONT_STRETCH},
{"-khtml-box-align", CSS_PROP__KHTML_BOX_ALIGN},
- {"outline-width", CSS_PROP_OUTLINE_WIDTH},
- {"min-width", CSS_PROP_MIN_WIDTH},
- {"-khtml-box-flex-group", CSS_PROP__KHTML_BOX_FLEX_GROUP},
+ {"font-size", CSS_PROP_FONT_SIZE},
+ {"-khtml-box-flex", CSS_PROP__KHTML_BOX_FLEX},
+ {"margin-left", CSS_PROP_MARGIN_LEFT},
+ {"list-style-position", CSS_PROP_LIST_STYLE_POSITION},
+ {"font-size-adjust", CSS_PROP_FONT_SIZE_ADJUST},
+ {"-khtml-box-ordinal-group", CSS_PROP__KHTML_BOX_ORDINAL_GROUP},
+ {"padding-left", CSS_PROP_PADDING_LEFT},
{"content", CSS_PROP_CONTENT},
+ {"word-spacing", CSS_PROP_WORD_SPACING},
+ {"-khtml-box-flex-group", CSS_PROP__KHTML_BOX_FLEX_GROUP},
{"font-style", CSS_PROP_FONT_STYLE},
- {"text-transform", CSS_PROP_TEXT_TRANSFORM},
- {"-khtml-box-ordinal-group", CSS_PROP__KHTML_BOX_ORDINAL_GROUP},
- {"list-style-position", CSS_PROP_LIST_STYLE_POSITION},
{"-khtml-binding", CSS_PROP__KHTML_BINDING},
- {"font-weight", CSS_PROP_FONT_WEIGHT},
- {"font-family", CSS_PROP_FONT_FAMILY},
- {"word-spacing", CSS_PROP_WORD_SPACING},
{"-khtml-marquee-increment", CSS_PROP__KHTML_MARQUEE_INCREMENT},
+ {"text-transform", CSS_PROP_TEXT_TRANSFORM},
{"background-attachment", CSS_PROP_BACKGROUND_ATTACHMENT},
- {"font-variant", CSS_PROP_FONT_VARIANT},
- {"text-indent", CSS_PROP_TEXT_INDENT},
+ {"outline-offset", CSS_PROP_OUTLINE_OFFSET},
+ {"font-weight", CSS_PROP_FONT_WEIGHT},
{"background-position", CSS_PROP_BACKGROUND_POSITION},
+ {"text-indent", CSS_PROP_TEXT_INDENT},
{"-khtml-border-horizontal-spacing", CSS_PROP__KHTML_BORDER_HORIZONTAL_SPACING},
- {"counter-increment", CSS_PROP_COUNTER_INCREMENT},
+ {"font-variant", CSS_PROP_FONT_VARIANT},
+ {"font-family", CSS_PROP_FONT_FAMILY},
+ {"background-position-y", CSS_PROP_BACKGROUND_POSITION_Y},
{"background-position-x", CSS_PROP_BACKGROUND_POSITION_X},
- {"background-position-y", CSS_PROP_BACKGROUND_POSITION_Y}
+ {"counter-increment", CSS_PROP_COUNTER_INCREMENT}
};
static const short lookup[] =
@@ -277,105 +278,130 @@ findProp (register const char *str, register unsigned int len)
-1, -1, -1, -1, -1, 0, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 1, -1, -1, -1,
2, -1, 3, -1, -1, -1, 4, -1, -1, -1,
- -1, -1, -1, -1, 5, -1, -1, -1, -1, -1,
- -1, 6, -1, 7, -1, -1, -1, -1, -1, 8,
- -1, -1, -1, -1, -1, 9, 10, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5, -1, 6, -1, -1, -1, -1, -1, 7,
+ -1, -1, -1, -1, -1, 8, 9, -1, -1, 10,
-1, -1, -1, 11, 12, -1, -1, -1, -1, -1,
-1, -1, 13, -1, -1, -1, -1, -1, 14, -1,
15, -1, -1, -1, -1, -1, 16, -1, -1, -1,
-1, 17, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 18, -1, -1, 19, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 20, -1, -1, -1, -1, -1,
- 21, 22, -1, -1, -1, -1, -1, 23, 24, 25,
- 26, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 18, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 19, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 20, 21,
+ 22, -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,
+ 23, -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,
+ 24, -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, 25, -1, -1, -1, -1, 26, -1, -1,
+ -1, -1, -1, -1, -1, 27, -1, -1, -1, -1,
+ 28, -1, -1, -1, -1, 29, -1, -1, -1, 30,
+ -1, -1, 31, -1, 32, -1, -1, -1, -1, -1,
+ -1, -1, 33, -1, -1, -1, -1, -1, -1, -1,
+ 34, 35, -1, -1, -1, -1, -1, 36, 37, -1,
+ -1, 38, 39, -1, -1, 40, 41, -1, -1, 42,
+ -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, 43, -1,
+ 44, 45, -1, -1, -1, -1, 46, -1, -1, -1,
+ 47, 48, -1, -1, -1, -1, -1, -1, -1, -1,
+ 49, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 50, -1, -1, -1,
+ -1, -1, 51, -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, 52, -1, -1, -1, -1, -1, -1, -1, 53,
+ -1, -1, 54, -1, -1, -1, -1, -1, 55, -1,
+ -1, -1, -1, -1, -1, -1, -1, 56, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 57, 58, -1,
+ -1, 59, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 60, -1, -1, -1, -1, -1, -1, -1, -1,
+ 61, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 62, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 64, -1, -1, -1, 65, 66, 67, 68, 69, 70,
+ -1, -1, 71, -1, -1, -1, -1, 72, -1, -1,
+ -1, -1, -1, -1, 73, -1, 74, -1, -1, -1,
+ -1, -1, 75, 76, -1, -1, -1, 77, -1, -1,
+ -1, -1, -1, 78, -1, 79, 80, 81, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 82,
+ -1, -1, -1, -1, -1, -1, 83, -1, -1, 84,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 85,
+ -1, 86, 87, -1, -1, 88, -1, -1, 89, -1,
+ -1, -1, -1, -1, -1, -1, 90, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 91, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 27, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 28, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 29, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 92, 93, -1,
+ -1, -1, -1, -1, -1, 94, -1, -1, -1, -1,
+ 95, -1, 96, -1, -1, -1, 97, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 98, -1, -1,
+ 99, -1, -1, -1, 100, -1, -1, -1, 101, 102,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 103, 104, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 30, -1, -1, -1, -1, 31, -1, -1,
- 32, -1, -1, -1, -1, 33, -1, -1, -1, -1,
- 34, -1, -1, -1, -1, 35, -1, -1, -1, 36,
- -1, -1, 37, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 38, -1, -1, -1, -1, 39, -1, -1,
- -1, 40, -1, -1, -1, 41, -1, -1, 42, -1,
- -1, 43, 44, -1, -1, -1, 45, -1, -1, 46,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 47,
- -1, -1, 48, -1, -1, -1, -1, -1, 49, -1,
- -1, -1, -1, -1, -1, -1, -1, 50, 51, -1,
- 52, 53, -1, -1, -1, -1, 54, 55, -1, -1,
- -1, 56, -1, -1, -1, -1, -1, -1, 57, -1,
+ -1, -1, 105, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 58, -1, 59, -1, -1, 60, -1, -1, -1,
- 61, -1, 62, 63, -1, -1, -1, 64, -1, -1,
- -1, 65, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 66, -1, 67, -1,
- 68, 69, -1, -1, 70, -1, 71, -1, 72, 73,
- -1, -1, 74, -1, -1, -1, -1, 75, -1, -1,
- -1, -1, -1, -1, 76, -1, -1, -1, -1, -1,
- -1, -1, 77, -1, -1, -1, -1, 78, -1, 79,
- -1, -1, 80, -1, -1, 81, -1, -1, -1, 82,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 83,
- -1, -1, -1, -1, -1, 84, -1, -1, -1, 85,
- -1, 86, 87, -1, -1, -1, -1, -1, -1, 88,
- -1, 89, 90, -1, -1, 91, 92, -1, 93, -1,
- -1, -1, -1, -1, -1, 94, 95, -1, -1, -1,
- -1, 96, -1, -1, -1, 97, 98, 99, -1, -1,
- -1, -1, 100, -1, -1, 101, -1, -1, -1, -1,
+ -1, 106, -1, -1, 107, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 108, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 109, -1, -1, 110,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 102, 103, -1,
- 104, 105, -1, -1, -1, 106, 107, -1, -1, 108,
-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, 109, -1, 110, 111,
- -1, -1, -1, -1, -1, -1, 112, -1, -1, -1,
+ -1, 111, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 112, -1, -1, 113, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 114, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 115, -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, 113, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 114, -1, -1, -1, 115, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 116,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 117,
+ -1, -1, -1, -1, -1, -1, 116, -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,
+ 117, -1, -1, -1, 118, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 118, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 119, -1, -1, -1, -1, 120, 121, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 122, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 119, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
+ -1, 121, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 123, -1, -1, -1, -1, -1, 124, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
+ -1, 123, -1, -1, -1, -1, -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, 125, -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, -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, 126, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 127, -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, -1, -1, -1, 127, -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, 128, -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, 128, -1, -1, -1, -1, -1, -1, -1,
+ -1, 129, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 129, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 130, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 130
+ -1, -1, 131
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -454,6 +480,7 @@ static const char * const propertyList[] = {
"height",
"left",
"letter-spacing",
+"-apple-line-clamp",
"line-height",
"list-style-image",
"list-style-position",
diff --git a/WebCore/khtml/css/cssproperties.h b/WebCore/khtml/css/cssproperties.h
index 7f29941..f2c90c1 100644
--- a/WebCore/khtml/css/cssproperties.h
+++ b/WebCore/khtml/css/cssproperties.h
@@ -62,84 +62,85 @@
#define CSS_PROP_HEIGHT 53
#define CSS_PROP_LEFT 54
#define CSS_PROP_LETTER_SPACING 55
-#define CSS_PROP_LINE_HEIGHT 56
-#define CSS_PROP_LIST_STYLE_IMAGE 57
-#define CSS_PROP_LIST_STYLE_POSITION 58
-#define CSS_PROP_LIST_STYLE_TYPE 59
-#define CSS_PROP_MARGIN_TOP 60
-#define CSS_PROP_MARGIN_RIGHT 61
-#define CSS_PROP_MARGIN_BOTTOM 62
-#define CSS_PROP_MARGIN_LEFT 63
-#define CSS_PROP__KHTML_MARQUEE 64
-#define CSS_PROP__KHTML_MARQUEE_DIRECTION 65
-#define CSS_PROP__KHTML_MARQUEE_INCREMENT 66
-#define CSS_PROP__KHTML_MARQUEE_REPETITION 67
-#define CSS_PROP__KHTML_MARQUEE_SPEED 68
-#define CSS_PROP__KHTML_MARQUEE_STYLE 69
-#define CSS_PROP__KHTML_USER_MODIFY 70
-#define CSS_PROP_MAX_HEIGHT 71
-#define CSS_PROP_MAX_WIDTH 72
-#define CSS_PROP_MIN_HEIGHT 73
-#define CSS_PROP_MIN_WIDTH 74
-#define CSS_PROP_OPACITY 75
-#define CSS_PROP_ORPHANS 76
-#define CSS_PROP_OUTLINE_COLOR 77
-#define CSS_PROP_OUTLINE_OFFSET 78
-#define CSS_PROP_OUTLINE_STYLE 79
-#define CSS_PROP_OUTLINE_WIDTH 80
-#define CSS_PROP_OVERFLOW 81
-#define CSS_PROP_PADDING_TOP 82
-#define CSS_PROP_PADDING_RIGHT 83
-#define CSS_PROP_PADDING_BOTTOM 84
-#define CSS_PROP_PADDING_LEFT 85
-#define CSS_PROP_PAGE 86
-#define CSS_PROP_PAGE_BREAK_AFTER 87
-#define CSS_PROP_PAGE_BREAK_BEFORE 88
-#define CSS_PROP_PAGE_BREAK_INSIDE 89
-#define CSS_PROP_POSITION 90
-#define CSS_PROP_QUOTES 91
-#define CSS_PROP_RIGHT 92
-#define CSS_PROP_SIZE 93
-#define CSS_PROP_TABLE_LAYOUT 94
-#define CSS_PROP_TEXT_ALIGN 95
-#define CSS_PROP_TEXT_DECORATION 96
-#define CSS_PROP_TEXT_DECORATION_COLOR 97
-#define CSS_PROP_TEXT_INDENT 98
-#define CSS_PROP_TEXT_SHADOW 99
-#define CSS_PROP_TEXT_TRANSFORM 100
-#define CSS_PROP_TOP 101
-#define CSS_PROP_UNICODE_BIDI 102
-#define CSS_PROP_VERTICAL_ALIGN 103
-#define CSS_PROP_VISIBILITY 104
-#define CSS_PROP_WHITE_SPACE 105
-#define CSS_PROP_WIDOWS 106
-#define CSS_PROP_WIDTH 107
-#define CSS_PROP_WORD_SPACING 108
-#define CSS_PROP_Z_INDEX 109
-#define CSS_PROP_BACKGROUND 110
-#define CSS_PROP_BORDER 111
-#define CSS_PROP_BORDER_COLOR 112
-#define CSS_PROP_BORDER_STYLE 113
-#define CSS_PROP_BORDER_TOP 114
-#define CSS_PROP_BORDER_RIGHT 115
-#define CSS_PROP_BORDER_BOTTOM 116
-#define CSS_PROP_BORDER_LEFT 117
-#define CSS_PROP_BORDER_WIDTH 118
-#define CSS_PROP_FONT 119
-#define CSS_PROP_LIST_STYLE 120
-#define CSS_PROP_MARGIN 121
-#define CSS_PROP_OUTLINE 122
-#define CSS_PROP_PADDING 123
-#define CSS_PROP_SCROLLBAR_FACE_COLOR 124
-#define CSS_PROP_SCROLLBAR_SHADOW_COLOR 125
-#define CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR 126
-#define CSS_PROP_SCROLLBAR_3DLIGHT_COLOR 127
-#define CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR 128
-#define CSS_PROP_SCROLLBAR_TRACK_COLOR 129
-#define CSS_PROP_SCROLLBAR_ARROW_COLOR 130
-#define CSS_PROP__KHTML_FLOW_MODE 131
+#define CSS_PROP__APPLE_LINE_CLAMP 56
+#define CSS_PROP_LINE_HEIGHT 57
+#define CSS_PROP_LIST_STYLE_IMAGE 58
+#define CSS_PROP_LIST_STYLE_POSITION 59
+#define CSS_PROP_LIST_STYLE_TYPE 60
+#define CSS_PROP_MARGIN_TOP 61
+#define CSS_PROP_MARGIN_RIGHT 62
+#define CSS_PROP_MARGIN_BOTTOM 63
+#define CSS_PROP_MARGIN_LEFT 64
+#define CSS_PROP__KHTML_MARQUEE 65
+#define CSS_PROP__KHTML_MARQUEE_DIRECTION 66
+#define CSS_PROP__KHTML_MARQUEE_INCREMENT 67
+#define CSS_PROP__KHTML_MARQUEE_REPETITION 68
+#define CSS_PROP__KHTML_MARQUEE_SPEED 69
+#define CSS_PROP__KHTML_MARQUEE_STYLE 70
+#define CSS_PROP__KHTML_USER_MODIFY 71
+#define CSS_PROP_MAX_HEIGHT 72
+#define CSS_PROP_MAX_WIDTH 73
+#define CSS_PROP_MIN_HEIGHT 74
+#define CSS_PROP_MIN_WIDTH 75
+#define CSS_PROP_OPACITY 76
+#define CSS_PROP_ORPHANS 77
+#define CSS_PROP_OUTLINE_COLOR 78
+#define CSS_PROP_OUTLINE_OFFSET 79
+#define CSS_PROP_OUTLINE_STYLE 80
+#define CSS_PROP_OUTLINE_WIDTH 81
+#define CSS_PROP_OVERFLOW 82
+#define CSS_PROP_PADDING_TOP 83
+#define CSS_PROP_PADDING_RIGHT 84
+#define CSS_PROP_PADDING_BOTTOM 85
+#define CSS_PROP_PADDING_LEFT 86
+#define CSS_PROP_PAGE 87
+#define CSS_PROP_PAGE_BREAK_AFTER 88
+#define CSS_PROP_PAGE_BREAK_BEFORE 89
+#define CSS_PROP_PAGE_BREAK_INSIDE 90
+#define CSS_PROP_POSITION 91
+#define CSS_PROP_QUOTES 92
+#define CSS_PROP_RIGHT 93
+#define CSS_PROP_SIZE 94
+#define CSS_PROP_TABLE_LAYOUT 95
+#define CSS_PROP_TEXT_ALIGN 96
+#define CSS_PROP_TEXT_DECORATION 97
+#define CSS_PROP_TEXT_DECORATION_COLOR 98
+#define CSS_PROP_TEXT_INDENT 99
+#define CSS_PROP_TEXT_SHADOW 100
+#define CSS_PROP_TEXT_TRANSFORM 101
+#define CSS_PROP_TOP 102
+#define CSS_PROP_UNICODE_BIDI 103
+#define CSS_PROP_VERTICAL_ALIGN 104
+#define CSS_PROP_VISIBILITY 105
+#define CSS_PROP_WHITE_SPACE 106
+#define CSS_PROP_WIDOWS 107
+#define CSS_PROP_WIDTH 108
+#define CSS_PROP_WORD_SPACING 109
+#define CSS_PROP_Z_INDEX 110
+#define CSS_PROP_BACKGROUND 111
+#define CSS_PROP_BORDER 112
+#define CSS_PROP_BORDER_COLOR 113
+#define CSS_PROP_BORDER_STYLE 114
+#define CSS_PROP_BORDER_TOP 115
+#define CSS_PROP_BORDER_RIGHT 116
+#define CSS_PROP_BORDER_BOTTOM 117
+#define CSS_PROP_BORDER_LEFT 118
+#define CSS_PROP_BORDER_WIDTH 119
+#define CSS_PROP_FONT 120
+#define CSS_PROP_LIST_STYLE 121
+#define CSS_PROP_MARGIN 122
+#define CSS_PROP_OUTLINE 123
+#define CSS_PROP_PADDING 124
+#define CSS_PROP_SCROLLBAR_FACE_COLOR 125
+#define CSS_PROP_SCROLLBAR_SHADOW_COLOR 126
+#define CSS_PROP_SCROLLBAR_HIGHLIGHT_COLOR 127
+#define CSS_PROP_SCROLLBAR_3DLIGHT_COLOR 128
+#define CSS_PROP_SCROLLBAR_DARKSHADOW_COLOR 129
+#define CSS_PROP_SCROLLBAR_TRACK_COLOR 130
+#define CSS_PROP_SCROLLBAR_ARROW_COLOR 131
+#define CSS_PROP__KHTML_FLOW_MODE 132
#define CSS_PROP_MAX CSS_PROP_Z_INDEX
-#define CSS_PROP_TOTAL 132
+#define CSS_PROP_TOTAL 133
#endif
diff --git a/WebCore/khtml/css/cssproperties.in b/WebCore/khtml/css/cssproperties.in
index 9c6a119..336fe1d 100644
--- a/WebCore/khtml/css/cssproperties.in
+++ b/WebCore/khtml/css/cssproperties.in
@@ -67,6 +67,7 @@ font-weight
height
left
letter-spacing
+-apple-line-clamp
line-height
list-style-image
list-style-position
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index 84b74e0..d974928 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -3412,6 +3412,17 @@ void CSSStyleSelector::applyProperty( int id, DOM::CSSValueImpl *value )
style->setUserModify(EUserModify(primitiveValue->getIdent() - CSS_VAL_READ_ONLY));
break;
}
+
+#if APPLE_CHANGES
+ // Apple-specific changes. Do not merge these properties into KHTML.
+ case CSS_PROP__APPLE_LINE_CLAMP: {
+ HANDLE_INHERIT_AND_INITIAL(lineClamp, LineClamp)
+ if (!primitiveValue) return;
+ style->setLineClamp((int)primitiveValue->getFloatValue(CSSPrimitiveValue::CSS_PERCENTAGE));
+ break;
+ }
+#endif
+
default:
return;
}
diff --git a/WebCore/khtml/ecma/kjs_css.cpp b/WebCore/khtml/ecma/kjs_css.cpp
index a55f1ae..c765ffe 100644
--- a/WebCore/khtml/ecma/kjs_css.cpp
+++ b/WebCore/khtml/ecma/kjs_css.cpp
@@ -57,7 +57,7 @@ static QString cssPropertyName(const Identifier &p, bool *hadPixelOrPosPrefix =
prop = prop.mid(4);
if (hadPixelOrPosPrefix)
*hadPixelOrPosPrefix = true;
- } else if (prop.startsWith("khtml-")) {
+ } else if (prop.startsWith("khtml-") || prop.startsWith("apple-")) {
prop.insert(0, '-');
}
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index e76b4a4..c914059 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -2664,6 +2664,47 @@ bool RenderBlock::inRootBlockContext() const
return containingBlock()->inRootBlockContext();
}
+// Helper methods for computing line counts and heights for line counts.
+int RenderBlock::lineCount()
+{
+ int count = 0;
+ if (style()->visibility() == VISIBLE) {
+ if (childrenInline())
+ for (RootInlineBox* box = firstRootBox(); box; box = box->nextRootBox())
+ count++;
+ else
+ for (RenderObject* obj = firstChild(); obj; obj = obj->nextSibling())
+ if (!obj->isFloatingOrPositioned() && !obj->isCompact() && !obj->isRunIn() &&
+ obj->isBlockFlow() && obj->style()->height().isVariable())
+ count += static_cast<RenderBlock*>(obj)->lineCount();
+ }
+ return count;
+}
+
+int RenderBlock::heightForLineCount(int l, bool includeBottom)
+{
+ if (style()->visibility() == VISIBLE) {
+ int c = 0;
+ if (childrenInline())
+ for (RootInlineBox* box = firstRootBox(); c < l && box; box = box->nextRootBox()) {
+ if (++c == l)
+ return box->bottomOverflow() + (includeBottom ? (borderBottom() + paddingBottom()) : 0);
+ }
+ else
+ for (RenderObject* obj = firstChild(); obj; obj = obj->nextSibling())
+ if (!obj->isFloatingOrPositioned() && !obj->isCompact() && !obj->isRunIn() &&
+ obj->isBlockFlow() && obj->style()->height().isVariable()) {
+ int childCount = static_cast<RenderBlock*>(obj)->lineCount();
+ if (c + childCount >= l)
+ return obj->yPos() + static_cast<RenderBlock*>(obj)->heightForLineCount(l - c, false) +
+ (includeBottom ? (borderBottom() + paddingBottom()) : 0);
+ else
+ c += childCount;
+ }
+ }
+ return m_height;
+}
+
const char *RenderBlock::renderName() const
{
if (isBody())
diff --git a/WebCore/khtml/rendering/render_block.h b/WebCore/khtml/rendering/render_block.h
index 5f51f47..d922d67 100644
--- a/WebCore/khtml/rendering/render_block.h
+++ b/WebCore/khtml/rendering/render_block.h
@@ -195,11 +195,15 @@ public:
virtual void printTree(int indent=0) const;
virtual void dump(QTextStream *stream, QString ind = "") const;
#endif
+
+ // Helper methods for computing line counts and heights for line counts.
+ int lineCount();
+ int heightForLineCount(int l, bool includeBottom = true);
protected:
void newLine();
void removeChildrenFromLineBoxes();
-
+
protected:
struct FloatingObject {
enum Type {
diff --git a/WebCore/khtml/rendering/render_flexbox.cpp b/WebCore/khtml/rendering/render_flexbox.cpp
index 30586c2..e05388e 100644
--- a/WebCore/khtml/rendering/render_flexbox.cpp
+++ b/WebCore/khtml/rendering/render_flexbox.cpp
@@ -358,7 +358,7 @@ void RenderFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
// We always have to lay out flexible objects again, since the flex distribution
// may have changed, and we need to reallocate space.
if (!relayoutChildren)
- child->setNeedsLayout(true);
+ child->setChildNeedsLayout(true);
haveFlex = true;
unsigned int flexGroup = child->style()->boxFlexGroup();
if (lowestFlexGroup == 0)
@@ -671,6 +671,49 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
continue;
}
+#if APPLE_CHANGES
+ // We confine the line clamp ugliness to vertical flexible boxes (thus keeping it out of
+ // mainstream block layout) and put it all inside APPLE_CHANGES to denote that this is not
+ // really part of the XUL box model.
+ bool haveLineClamp = style()->lineClamp() >= 0 && style()->lineClamp() <= 100;
+ if (haveLineClamp) {
+ int maxLineCount = 1;
+ child = iterator.first();
+ while (child) {
+ if (!child->isPositioned()) {
+ if (relayoutChildren || (child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent())) ||
+ (child->style()->height().isVariable() && child->isBlockFlow() && !child->needsLayout()))
+ child->setChildNeedsLayout(true);
+ child->layoutIfNeeded();
+ if (child->style()->height().isVariable() && child->isBlockFlow())
+ maxLineCount = kMax(maxLineCount, static_cast<RenderBlock*>(child)->lineCount());
+ }
+ child = iterator.next();
+ }
+
+ // Get the # of lines and then alter all block flow children with auto height to use the
+ // specified height.
+ int numLines = kMax(1, int(maxLineCount*style()->lineClamp()/100.0));
+ if (numLines < maxLineCount) {
+ child = iterator.first();
+ while (child) {
+ if (!child->isPositioned() && child->style()->height().isVariable() && child->isBlockFlow() &&
+ static_cast<RenderBlock*>(child)->lineCount() > numLines) {
+ int newHeight = static_cast<RenderBlock*>(child)->heightForLineCount(numLines);
+ if (newHeight != child->height()) {
+ child->setChildNeedsLayout(true);
+ child->style()->setBoxFlexedHeight(newHeight);
+ m_flexingChildren = true;
+ child->layoutIfNeeded();
+ m_flexingChildren = false;
+ }
+ }
+ child = iterator.next();
+ }
+ }
+ }
+#endif
+
// We do 2 passes. The first pass is simply to lay everyone out at
// their preferred widths. The second pass handles flexing the children.
// Our first pass is done without flexing. We simply lay the children
@@ -681,11 +724,10 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
m_overflowHeight = m_height;
child = iterator.first();
- while (child)
- {
+ while (child) {
// make sure we relayout children if we need it.
- if ( relayoutChildren || (child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent())))
- child->setNeedsLayout(true);
+ if (!haveLineClamp && (relayoutChildren || (child->isReplaced() && (child->style()->width().isPercent() || child->style()->height().isPercent()))))
+ child->setChildNeedsLayout(true);
if (child->isPositioned())
{
diff --git a/WebCore/khtml/rendering/render_style.cpp b/WebCore/khtml/rendering/render_style.cpp
index 64301a0..db1e575 100644
--- a/WebCore/khtml/rendering/render_style.cpp
+++ b/WebCore/khtml/rendering/render_style.cpp
@@ -181,7 +181,11 @@ bool StyleFlexibleBoxData::operator==(const StyleFlexibleBoxData& o) const
}
StyleCSS3NonInheritedData::StyleCSS3NonInheritedData()
-:Shared<StyleCSS3NonInheritedData>(), opacity(RenderStyle::initialOpacity())
+:Shared<StyleCSS3NonInheritedData>(),
+#if APPLE_CHANGES
+lineClamp(RenderStyle::initialLineClamp()),
+#endif
+opacity(RenderStyle::initialOpacity())
#ifndef KHTML_NO_XBL
, bindingURI(0)
#endif
@@ -189,7 +193,11 @@ StyleCSS3NonInheritedData::StyleCSS3NonInheritedData()
}
StyleCSS3NonInheritedData::StyleCSS3NonInheritedData(const StyleCSS3NonInheritedData& o)
-:Shared<StyleCSS3NonInheritedData>(), opacity(o.opacity), flexibleBox(o.flexibleBox), marquee(o.marquee)
+:Shared<StyleCSS3NonInheritedData>(),
+#if APPLE_CHANGES
+lineClamp(o.lineClamp),
+#endif
+opacity(o.opacity), flexibleBox(o.flexibleBox), marquee(o.marquee)
{
#ifndef KHTML_NO_XBL
bindingURI = o.bindingURI ? o.bindingURI->copy() : 0;
@@ -221,6 +229,9 @@ bool StyleCSS3NonInheritedData::operator==(const StyleCSS3NonInheritedData& o) c
#ifndef KHTML_NO_XBL
&& bindingsEquivalent(o)
#endif
+#if APPLE_CHANGES
+ && lineClamp == o.lineClamp
+#endif
;
}
@@ -517,6 +528,9 @@ RenderStyle::Diff RenderStyle::diff( const RenderStyle *other ) const
!(surround->margin == other->surround->margin) ||
!(surround->padding == other->surround->padding) ||
*css3NonInheritedData->flexibleBox.get() != *other->css3NonInheritedData->flexibleBox.get() ||
+#if APPLE_CHANGES
+ (css3NonInheritedData->lineClamp != other->css3NonInheritedData->lineClamp) ||
+#endif
!(inherited->indent == other->inherited->indent) ||
!(inherited->line_height == other->inherited->line_height) ||
!(inherited->style_image == other->inherited->style_image) ||
diff --git a/WebCore/khtml/rendering/render_style.h b/WebCore/khtml/rendering/render_style.h
index ee1cb95..3dc077c 100644
--- a/WebCore/khtml/rendering/render_style.h
+++ b/WebCore/khtml/rendering/render_style.h
@@ -545,6 +545,9 @@ public:
return !(*this == o);
}
+#if APPLE_CHANGES
+ int lineClamp; // An Apple extension. Not really CSS3 but not worth making a new struct over.
+#endif
float opacity; // Whether or not we're transparent.
DataRef<StyleFlexibleBoxData> flexibleBox; // Flexible box properties
DataRef<StyleMarqueeData> marquee; // Marquee properties
@@ -1079,6 +1082,11 @@ public:
EUserModify userModify() const { return css3InheritedData->userModify; }
// End CSS3 Getters
+#if APPLE_CHANGES
+ // Apple-specific property getter methods
+ int lineClamp() { return css3NonInheritedData->lineClamp; }
+#endif
+
// attribute setter methods
void setDisplay(EDisplay v) { noninherited_flags._effectiveDisplay = v; }
@@ -1250,7 +1258,12 @@ public:
void setMarqueeLoopCount(int i) { SET_VAR(css3NonInheritedData.access()->marquee, loops, i); }
void setUserModify(EUserModify u) { SET_VAR(css3InheritedData, userModify, u); }
// End CSS3 Setters
-
+
+#if APPLE_CHANGES
+ // Apple-specific property setters
+ void setLineClamp(int c) { SET_VAR(css3NonInheritedData, lineClamp, c); }
+#endif
+
QPalette palette() const { return visual->palette; }
void setPaletteColor(QPalette::ColorGroup g, QColorGroup::ColorRole r, const QColor& c);
void resetPalette() // Called when the desktop color scheme changes.
@@ -1339,6 +1352,10 @@ public:
static EMarqueeBehavior initialMarqueeBehavior() { return MSCROLL; }
static EMarqueeDirection initialMarqueeDirection() { return MAUTO; }
static EUserModify initialUserModify() { return READ_ONLY; }
+#if APPLE_CHANGES
+ // Keep these at the end.
+ static int initialLineClamp() { return -1; }
+#endif
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list