summaryrefslogtreecommitdiffstats
path: root/WebCore/css
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2010-11-10 15:31:59 -0800
committerTeng-Hui Zhu <ztenghui@google.com>2010-11-17 13:35:59 -0800
commit28040489d744e0c5d475a88663056c9040ed5320 (patch)
treec463676791e4a63e452a95f0a12b2a8519730693 /WebCore/css
parenteff9be92c41913c92fb1d3b7983c071f3e718678 (diff)
downloadexternal_webkit-28040489d744e0c5d475a88663056c9040ed5320.zip
external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.gz
external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.bz2
Merge WebKit at r71558: Initial merge by git.
Change-Id: Ib345578fa29df7e4bc72b4f00e4a6fddcb754c4c
Diffstat (limited to 'WebCore/css')
-rw-r--r--WebCore/css/CSSComputedStyleDeclaration.cpp208
-rw-r--r--WebCore/css/CSSCursorImageValue.cpp4
-rw-r--r--WebCore/css/CSSImageValue.cpp2
-rw-r--r--WebCore/css/CSSMediaRule.cpp3
-rw-r--r--WebCore/css/CSSMutableStyleDeclaration.cpp4
-rw-r--r--WebCore/css/CSSParser.cpp16
-rw-r--r--WebCore/css/CSSPrimitiveValueMappings.h32
-rw-r--r--WebCore/css/CSSPropertyNames.in3
-rw-r--r--WebCore/css/CSSStyleSelector.cpp35
-rw-r--r--WebCore/css/CSSValueKeywords.in4
-rw-r--r--WebCore/css/html.css4
-rw-r--r--WebCore/css/quirks.css2
-rw-r--r--WebCore/css/view-source.css2
-rw-r--r--WebCore/css/wml.css4
14 files changed, 235 insertions, 88 deletions
diff --git a/WebCore/css/CSSComputedStyleDeclaration.cpp b/WebCore/css/CSSComputedStyleDeclaration.cpp
index 3f6aa4a..35a0b4a 100644
--- a/WebCore/css/CSSComputedStyleDeclaration.cpp
+++ b/WebCore/css/CSSComputedStyleDeclaration.cpp
@@ -80,6 +80,7 @@ static const int computedProperties[] = {
CSSPropertyBorderTopStyle,
CSSPropertyBorderTopWidth,
CSSPropertyBottom,
+ CSSPropertyBoxSizing,
CSSPropertyCaptionSide,
CSSPropertyClear,
CSSPropertyClip,
@@ -177,7 +178,6 @@ static const int computedProperties[] = {
CSSPropertyWebkitBoxPack,
CSSPropertyWebkitBoxReflect,
CSSPropertyWebkitBoxShadow,
- CSSPropertyWebkitBoxSizing,
CSSPropertyWebkitColorCorrection,
CSSPropertyWebkitColumnBreakAfter,
CSSPropertyWebkitColumnBreakBefore,
@@ -215,6 +215,7 @@ static const int computedProperties[] = {
CSSPropertyWebkitPerspective,
CSSPropertyWebkitPerspectiveOrigin,
CSSPropertyWebkitRtlOrdering,
+ CSSPropertyWebkitTextCombine,
CSSPropertyWebkitTextDecorationsInEffect,
CSSPropertyWebkitTextFillColor,
CSSPropertyWebkitTextSecurity,
@@ -720,6 +721,20 @@ static PassRefPtr<CSSValue> fillRepeatToCSSValue(EFillRepeat xRepeat, EFillRepea
return list.release();
}
+static PassRefPtr<CSSValue> fillSizeToCSSValue(const FillSize& fillSize)
+{
+ if (fillSize.type == Contain)
+ return CSSPrimitiveValue::createIdentifier(CSSValueContain);
+
+ if (fillSize.type == Cover)
+ return CSSPrimitiveValue::createIdentifier(CSSValueCover);
+
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ list->append(CSSPrimitiveValue::create(fillSize.size.width()));
+ list->append(CSSPrimitiveValue::create(fillSize.size.height()));
+ return list.release();
+}
+
static void logUnimplementedPropertyID(int propertyID)
{
DEFINE_STATIC_LOCAL(HashSet<int>, propertyIDSet, ());
@@ -766,47 +781,141 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
case CSSPropertyBackgroundColor:
return CSSPrimitiveValue::createColor(m_allowVisitedStyle? style->visitedDependentColor(CSSPropertyBackgroundColor).rgb() : style->backgroundColor().rgb());
case CSSPropertyBackgroundImage:
- // FIXME: Broken for multiple backgrounds. https://bugs.webkit.org/show_bug.cgi?id=44853
- if (style->backgroundImage())
- return style->backgroundImage()->cssValue();
- return CSSPrimitiveValue::createIdentifier(CSSValueNone);
+ case CSSPropertyWebkitMaskImage: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskImage ? style->maskLayers() : style->backgroundLayers();
+ if (!layers)
+ return CSSPrimitiveValue::createIdentifier(CSSValueNone);
+
+ if (!layers->next()) {
+ if (layers->image())
+ return layers->image()->cssValue();
+
+ return CSSPrimitiveValue::createIdentifier(CSSValueNone);
+ }
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next()) {
+ if (currLayer->image())
+ list->append(currLayer->image()->cssValue());
+ else
+ list->append(CSSPrimitiveValue::createIdentifier(CSSValueNone));
+ }
+ return list.release();
+ }
case CSSPropertyBackgroundSize:
- case CSSPropertyWebkitBackgroundSize: {
- EFillSizeType size = style->backgroundSizeType();
- if (size == Contain)
- return CSSPrimitiveValue::createIdentifier(CSSValueContain);
- if (size == Cover)
- return CSSPrimitiveValue::createIdentifier(CSSValueCover);
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
- list->append(CSSPrimitiveValue::create(style->backgroundSizeLength().width()));
- list->append(CSSPrimitiveValue::create(style->backgroundSizeLength().height()));
+ case CSSPropertyWebkitBackgroundSize:
+ case CSSPropertyWebkitMaskSize: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskSize ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next())
+ return fillSizeToCSSValue(layers->size());
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
+ list->append(fillSizeToCSSValue(currLayer->size()));
+
return list.release();
- }
+ }
case CSSPropertyBackgroundRepeat:
- return fillRepeatToCSSValue(style->backgroundRepeatX(), style->backgroundRepeatY());
+ case CSSPropertyWebkitMaskRepeat: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskRepeat ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next())
+ return fillRepeatToCSSValue(layers->repeatX(), layers->repeatY());
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
+ list->append(fillRepeatToCSSValue(currLayer->repeatX(), currLayer->repeatY()));
+
+ return list.release();
+ }
case CSSPropertyWebkitBackgroundComposite:
- return CSSPrimitiveValue::create(style->backgroundComposite());
+ case CSSPropertyWebkitMaskComposite: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskComposite ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next())
+ return CSSPrimitiveValue::create(layers->composite());
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
+ list->append(CSSPrimitiveValue::create(currLayer->composite()));
+
+ return list.release();
+ }
case CSSPropertyBackgroundAttachment:
- return CSSPrimitiveValue::create(style->backgroundAttachment());
+ case CSSPropertyWebkitMaskAttachment: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskAttachment ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next())
+ return CSSPrimitiveValue::create(layers->attachment());
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
+ list->append(CSSPrimitiveValue::create(currLayer->attachment()));
+
+ return list.release();
+ }
case CSSPropertyBackgroundClip:
case CSSPropertyBackgroundOrigin:
case CSSPropertyWebkitBackgroundClip:
- case CSSPropertyWebkitBackgroundOrigin: {
- EFillBox box = (propertyID == CSSPropertyWebkitBackgroundClip || propertyID == CSSPropertyBackgroundClip) ? style->backgroundClip() : style->backgroundOrigin();
- return CSSPrimitiveValue::create(box);
+ case CSSPropertyWebkitBackgroundOrigin:
+ case CSSPropertyWebkitMaskClip:
+ case CSSPropertyWebkitMaskOrigin: {
+ const FillLayer* layers = (propertyID == CSSPropertyWebkitMaskClip || propertyID == CSSPropertyWebkitMaskOrigin) ? style->maskLayers() : style->backgroundLayers();
+ bool isClip = propertyID == CSSPropertyBackgroundClip || propertyID == CSSPropertyWebkitBackgroundClip || propertyID == CSSPropertyWebkitMaskClip;
+ if (!layers->next()) {
+ EFillBox box = isClip ? layers->clip() : layers->origin();
+ return CSSPrimitiveValue::create(box);
+ }
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next()) {
+ EFillBox box = isClip ? currLayer->clip() : currLayer->origin();
+ list->append(CSSPrimitiveValue::create(box));
+ }
+
+ return list.release();
}
- case CSSPropertyBackgroundPosition: {
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ case CSSPropertyBackgroundPosition:
+ case CSSPropertyWebkitMaskPosition: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskPosition ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next()) {
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ list->append(CSSPrimitiveValue::create(layers->xPosition()));
+ list->append(CSSPrimitiveValue::create(layers->yPosition()));
+ return list.release();
+ }
- list->append(CSSPrimitiveValue::create(style->backgroundXPosition()));
- list->append(CSSPrimitiveValue::create(style->backgroundYPosition()));
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next()) {
+ RefPtr<CSSValueList> positionList = CSSValueList::createSpaceSeparated();
+ positionList->append(CSSPrimitiveValue::create(currLayer->xPosition()));
+ positionList->append(CSSPrimitiveValue::create(currLayer->yPosition()));
+ list->append(positionList);
+ }
return list.release();
}
case CSSPropertyBackgroundPositionX:
- return CSSPrimitiveValue::create(style->backgroundXPosition());
+ case CSSPropertyWebkitMaskPositionX: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskPositionX ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next())
+ return CSSPrimitiveValue::create(layers->xPosition());
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
+ list->append(CSSPrimitiveValue::create(currLayer->xPosition()));
+
+ return list.release();
+ }
case CSSPropertyBackgroundPositionY:
- return CSSPrimitiveValue::create(style->backgroundYPosition());
+ case CSSPropertyWebkitMaskPositionY: {
+ const FillLayer* layers = propertyID == CSSPropertyWebkitMaskPositionY ? style->maskLayers() : style->backgroundLayers();
+ if (!layers->next())
+ return CSSPrimitiveValue::create(layers->yPosition());
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
+ list->append(CSSPrimitiveValue::create(currLayer->yPosition()));
+
+ return list.release();
+ }
case CSSPropertyBorderCollapse:
if (style->borderCollapse())
return CSSPrimitiveValue::createIdentifier(CSSValueCollapse);
@@ -1059,44 +1168,6 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
return CSSPrimitiveValue::create(style->marqueeLoopCount(), CSSPrimitiveValue::CSS_NUMBER);
case CSSPropertyWebkitMarqueeStyle:
return CSSPrimitiveValue::create(style->marqueeBehavior());
- case CSSPropertyWebkitMaskImage:
- if (style->maskImage())
- return style->maskImage()->cssValue();
- return CSSPrimitiveValue::createIdentifier(CSSValueNone);
- case CSSPropertyWebkitMaskSize: {
- EFillSizeType size = style->maskSizeType();
- if (size == Contain)
- return CSSPrimitiveValue::createIdentifier(CSSValueContain);
- if (size == Cover)
- return CSSPrimitiveValue::createIdentifier(CSSValueCover);
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
- list->append(CSSPrimitiveValue::create(style->maskSizeLength().width()));
- list->append(CSSPrimitiveValue::create(style->maskSizeLength().height()));
- return list.release();
- }
- case CSSPropertyWebkitMaskRepeat:
- return fillRepeatToCSSValue(style->maskRepeatX(), style->maskRepeatY());
- case CSSPropertyWebkitMaskAttachment:
- return CSSPrimitiveValue::create(style->maskAttachment());
- case CSSPropertyWebkitMaskComposite:
- return CSSPrimitiveValue::create(style->maskComposite());
- case CSSPropertyWebkitMaskClip:
- case CSSPropertyWebkitMaskOrigin: {
- EFillBox box = (propertyID == CSSPropertyWebkitMaskClip ? style->maskClip() : style->maskOrigin());
- return CSSPrimitiveValue::create(box);
- }
- case CSSPropertyWebkitMaskPosition: {
- RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
-
- list->append(CSSPrimitiveValue::create(style->maskXPosition()));
- list->append(CSSPrimitiveValue::create(style->maskYPosition()));
-
- return list.release();
- }
- case CSSPropertyWebkitMaskPositionX:
- return CSSPrimitiveValue::create(style->maskXPosition());
- case CSSPropertyWebkitMaskPositionY:
- return CSSPrimitiveValue::create(style->maskYPosition());
case CSSPropertyWebkitUserModify:
return CSSPrimitiveValue::create(style->userModify());
case CSSPropertyMaxHeight: {
@@ -1284,7 +1355,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
return CSSPrimitiveValue::create(style->zIndex(), CSSPrimitiveValue::CSS_NUMBER);
case CSSPropertyZoom:
return CSSPrimitiveValue::create(style->zoom(), CSSPrimitiveValue::CSS_NUMBER);
- case CSSPropertyWebkitBoxSizing:
+ case CSSPropertyBoxSizing:
if (style->boxSizing() == CONTENT_BOX)
return CSSPrimitiveValue::createIdentifier(CSSValueContentBox);
return CSSPrimitiveValue::createIdentifier(CSSValueBorderBox);
@@ -1381,9 +1452,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const AnimationList* t = style->animations();
if (t) {
- for (size_t i = 0; i < t->size(); ++i) {
+ for (size_t i = 0; i < t->size(); ++i)
list->append(CSSPrimitiveValue::create(t->animation(i)->name(), CSSPrimitiveValue::CSS_STRING));
- }
} else
list->append(CSSPrimitiveValue::createIdentifier(CSSValueNone));
return list.release();
@@ -1518,6 +1588,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
return CSSPrimitiveValue::create(style->colorSpace());
case CSSPropertyWebkitWritingMode:
return CSSPrimitiveValue::create(style->writingMode());
+ case CSSPropertyWebkitTextCombine:
+ return CSSPrimitiveValue::create(style->textCombine());
/* Shorthand properties, currently not supported see bug 13658*/
case CSSPropertyBackground:
diff --git a/WebCore/css/CSSCursorImageValue.cpp b/WebCore/css/CSSCursorImageValue.cpp
index 2b09ab3..b0dda58 100644
--- a/WebCore/css/CSSCursorImageValue.cpp
+++ b/WebCore/css/CSSCursorImageValue.cpp
@@ -116,8 +116,8 @@ StyleCachedImage* CSSCursorImageValue::cachedImage(CachedResourceLoader* loader)
String url = getStringValue();
#if ENABLE(SVG)
- if (isSVGCursorIdentifier(url) && loader && loader->doc()) {
- if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(url, loader->doc()))
+ if (isSVGCursorIdentifier(url) && loader && loader->document()) {
+ if (SVGCursorElement* cursorElement = resourceReferencedByCursorElement(url, loader->document()))
url = cursorElement->href();
}
#endif
diff --git a/WebCore/css/CSSImageValue.cpp b/WebCore/css/CSSImageValue.cpp
index e657fcc..f09a35f 100644
--- a/WebCore/css/CSSImageValue.cpp
+++ b/WebCore/css/CSSImageValue.cpp
@@ -22,7 +22,7 @@
#include "CSSImageValue.h"
#include "CSSValueKeywords.h"
-#include "Cache.h"
+#include "MemoryCache.h"
#include "CachedImage.h"
#include "CachedResourceLoader.h"
#include "StyleCachedImage.h"
diff --git a/WebCore/css/CSSMediaRule.cpp b/WebCore/css/CSSMediaRule.cpp
index d1c220b..6348762 100644
--- a/WebCore/css/CSSMediaRule.cpp
+++ b/WebCore/css/CSSMediaRule.cpp
@@ -33,6 +33,9 @@ CSSMediaRule::CSSMediaRule(CSSStyleSheet* parent, PassRefPtr<MediaList> media, P
, m_lstMedia(media)
, m_lstCSSRules(rules)
{
+ int length = m_lstCSSRules->length();
+ for (int i = 0; i < length; i++)
+ m_lstCSSRules->item(i)->setParent(this);
}
CSSMediaRule::~CSSMediaRule()
diff --git a/WebCore/css/CSSMutableStyleDeclaration.cpp b/WebCore/css/CSSMutableStyleDeclaration.cpp
index 708e2eb..38aee50 100644
--- a/WebCore/css/CSSMutableStyleDeclaration.cpp
+++ b/WebCore/css/CSSMutableStyleDeclaration.cpp
@@ -350,7 +350,9 @@ String CSSMutableStyleDeclaration::getLayeredShorthandValue(const int* propertie
// then it was written with only one value. Here we figure out which value that was so we can
// report back correctly.
if (properties[j] == CSSPropertyBackgroundRepeatX && isPropertyImplicit(properties[j])) {
- if (j < number - 1 && properties[j + 1] == CSSPropertyBackgroundRepeatY) {
+
+ // BUG 49055: make sure the value was not reset in the layer check just above.
+ if (j < number - 1 && properties[j + 1] == CSSPropertyBackgroundRepeatY && value) {
RefPtr<CSSValue> yValue;
RefPtr<CSSValue> nextValue = values[j + 1];
if (nextValue->isValueList())
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index e75e017..f98036f 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -1330,7 +1330,7 @@ bool CSSParser::parseValue(int propId, bool important)
case CSSPropertyWebkitBoxOrdinalGroup:
validPrimitive = validUnit(value, FInteger | FNonNeg, true);
break;
- case CSSPropertyWebkitBoxSizing:
+ case CSSPropertyBoxSizing:
validPrimitive = id == CSSValueBorderBox || id == CSSValueContentBox;
break;
case CSSPropertyWebkitColorCorrection:
@@ -1840,6 +1840,7 @@ bool CSSParser::parseValue(int propId, bool important)
validPrimitive = true;
break;
+<<<<<<< HEAD
#ifdef ANDROID_CSS_RING
case CSSPropertyWebkitRing:
{
@@ -1877,6 +1878,12 @@ bool CSSParser::parseValue(int propId, bool important)
m_valueList->next();
break;
#endif
+=======
+ case CSSPropertyWebkitTextCombine:
+ if (id == CSSValueNone || id == CSSValueCluster || id == CSSValueUpright)
+ validPrimitive = true;
+ break;
+>>>>>>> webkit.org at r71558
#if ENABLE(SVG)
default:
@@ -5928,7 +5935,12 @@ static int cssPropertyID(const UChar* propertyName, unsigned length)
}
if (hasPrefix(buffer, length, "-webkit")) {
- if (strcmp(buffer, "-webkit-opacity") == 0) {
+ if (!strcmp(buffer, "-webkit-box-sizing")) {
+ // -webkit-box-sizing worked in Safari 4 and earlier.
+ const char* const boxSizing = "box-sizing";
+ name = boxSizing;
+ length = strlen(boxSizing);
+ } else if (!strcmp(buffer, "-webkit-opacity")) {
// Honor -webkit-opacity as a synonym for opacity.
// This was the only syntax that worked in Safari 1.1, and may be in use on some websites and widgets.
const char* const opacity = "opacity";
diff --git a/WebCore/css/CSSPrimitiveValueMappings.h b/WebCore/css/CSSPrimitiveValueMappings.h
index a57a882..c055875 100644
--- a/WebCore/css/CSSPrimitiveValueMappings.h
+++ b/WebCore/css/CSSPrimitiveValueMappings.h
@@ -2040,6 +2040,38 @@ template<> inline CSSPrimitiveValue::operator WritingMode() const
}
}
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextCombine e)
+ : m_type(CSS_IDENT)
+ , m_hasCachedCSSText(false)
+{
+ switch (e) {
+ case TextCombineNone:
+ m_value.ident = CSSValueNone;
+ break;
+ case TextCombineCluster:
+ m_value.ident = CSSValueCluster;
+ break;
+ case TextCombineUpright:
+ m_value.ident = CSSValueUpright;
+ break;
+ }
+}
+
+template<> inline CSSPrimitiveValue::operator TextCombine() const
+{
+ switch (m_value.ident) {
+ case CSSValueNone:
+ return TextCombineNone;
+ case CSSValueCluster:
+ return TextCombineCluster;
+ case CSSValueUpright:
+ return TextCombineUpright;
+ default:
+ ASSERT_NOT_REACHED();
+ return TextCombineNone;
+ }
+}
+
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPointerEvents e)
: m_type(CSS_IDENT)
, m_hasCachedCSSText(false)
diff --git a/WebCore/css/CSSPropertyNames.in b/WebCore/css/CSSPropertyNames.in
index 9fd2d2c..ab75404 100644
--- a/WebCore/css/CSSPropertyNames.in
+++ b/WebCore/css/CSSPropertyNames.in
@@ -70,6 +70,7 @@ border-top-style
border-top-width
border-width
bottom
+box-sizing
caption-side
clear
clip
@@ -209,7 +210,6 @@ z-index
-webkit-box-pack
-webkit-box-reflect
-webkit-box-shadow
--webkit-box-sizing
-webkit-color-correction
-webkit-column-break-after
-webkit-column-break-before
@@ -276,6 +276,7 @@ z-index
-webkit-perspective-origin-x
-webkit-perspective-origin-y
-webkit-rtl-ordering
+-webkit-text-combine
-webkit-text-decorations-in-effect
-webkit-text-fill-color
-webkit-text-security
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index b0201a3..ec56916 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -1034,6 +1034,13 @@ bool CSSStyleSelector::canShareStyleWithElement(Node* n)
if (style->transitions() || style->animations())
return false;
+#if USE(ACCELERATED_COMPOSITING)
+ // Turn off style sharing for elements that can gain layers for reasons outside of the style system.
+ // See comments in RenderObject::setStyle().
+ if (s->hasTagName(iframeTag) || s->hasTagName(embedTag) || s->hasTagName(objectTag) || s->hasTagName(appletTag))
+ return false;
+#endif
+
bool classesMatch = true;
if (s->hasClass()) {
const AtomicString& class1 = m_element->fastGetAttribute(classAttr);
@@ -1753,15 +1760,18 @@ void CSSStyleSelector::adjustRenderStyle(RenderStyle* style, RenderStyle* parent
style->display() == TABLE_FOOTER_GROUP || style->display() == TABLE_ROW || style->display() == TABLE_CELL) &&
style->position() == RelativePosition)
style->setPosition(StaticPosition);
-
- // FIXME: Since we don't support block-flow on either tables or flexible boxes yet, disallow setting
+
+ // writing-mode does not apply to table row groups, table column groups, table rows, and table columns.
+ // FIXME: Table cells should be allowed to be perpendicular or flipped with respect to the table, though.
+ if (style->display() == TABLE_COLUMN || style->display() == TABLE_COLUMN_GROUP || style->display() == TABLE_FOOTER_GROUP
+ || style->display() == TABLE_HEADER_GROUP || style->display() == TABLE_ROW || style->display() == TABLE_ROW_GROUP
+ || style->display() == TABLE_CELL)
+ style->setWritingMode(parentStyle->writingMode());
+
+ // FIXME: Since we don't support block-flow on flexible boxes yet, disallow setting
// of block-flow to anything other than TopToBottomWritingMode.
- // https://bugs.webkit.org/show_bug.cgi?id=46417 - Tables support
// https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support.
- if (style->writingMode() != TopToBottomWritingMode && (style->display() == TABLE || style->display() == INLINE_TABLE
- || style->display() == TABLE_HEADER_GROUP || style->display() == TABLE_ROW_GROUP
- || style->display() == TABLE_FOOTER_GROUP || style->display() == TABLE_ROW || style->display() == TABLE_CELL
- || style->display() == BOX || style->display() == INLINE_BOX))
+ if (style->writingMode() != TopToBottomWritingMode && (style->display() == BOX || style->display() == INLINE_BOX))
style->setWritingMode(TopToBottomWritingMode);
}
@@ -3093,7 +3103,8 @@ void CSSStyleSelector::applyPropertyToStyle(int id, CSSValue *value, RenderStyle
initElement(0);
initForStyleResolve(0, style);
m_style = style;
- applyProperty(id, value);
+ if (value)
+ applyProperty(id, value);
}
inline bool isValidVisitedLinkProperty(int id)
@@ -4970,7 +4981,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
return; // Error case.
m_style->setBoxOrdinalGroup((unsigned int)(primitiveValue->getDoubleValue()));
return;
- case CSSPropertyWebkitBoxSizing:
+ case CSSPropertyBoxSizing:
HANDLE_INHERIT_AND_INITIAL(boxSizing, BoxSizing)
if (!primitiveValue)
return;
@@ -5605,6 +5616,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
return;
}
+<<<<<<< HEAD
#ifdef ANDROID_CSS_RING
case CSSPropertyWebkitRing:
if (valueType != CSSValue::CSS_INHERIT || !m_parentNode) return;
@@ -5748,6 +5760,11 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
return;
}
#endif
+=======
+ case CSSPropertyWebkitTextCombine:
+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(textCombine, TextCombine)
+ return;
+>>>>>>> webkit.org at r71558
#if ENABLE(SVG)
default:
diff --git a/WebCore/css/CSSValueKeywords.in b/WebCore/css/CSSValueKeywords.in
index fa0a214..cd37519 100644
--- a/WebCore/css/CSSValueKeywords.in
+++ b/WebCore/css/CSSValueKeywords.in
@@ -764,3 +764,7 @@ horizontal-tb
vertical-rl
vertical-lr
horizontal-bt
+
+# -webkit-text-combine
+cluster
+upright
diff --git a/WebCore/css/html.css b/WebCore/css/html.css
index 02fa620..a201adc 100644
--- a/WebCore/css/html.css
+++ b/WebCore/css/html.css
@@ -530,6 +530,10 @@ option {
font-weight: normal;
}
+output {
+ display: inline;
+}
+
/* meter */
meter {
diff --git a/WebCore/css/quirks.css b/WebCore/css/quirks.css
index 4477708..52d07e6 100644
--- a/WebCore/css/quirks.css
+++ b/WebCore/css/quirks.css
@@ -44,7 +44,7 @@ table {
/* This will apply only to text fields, since all other inputs already use border box sizing */
input:not([type=image]), textarea {
- -webkit-box-sizing: border-box;
+ box-sizing: border-box;
}
/* Set margin-bottom for form element in quirks mode. */
diff --git a/WebCore/css/view-source.css b/WebCore/css/view-source.css
index 60467b9..afceef5 100644
--- a/WebCore/css/view-source.css
+++ b/WebCore/css/view-source.css
@@ -44,7 +44,7 @@ td {
.webkit-line-gutter-backdrop, .webkit-line-number {
/* Keep this in sync with inspector.css (.webkit-line-gutter-backdrop) */
- -webkit-box-sizing: border-box;
+ box-sizing: border-box;
padding: 0 4px !important;
width: 31px;
background-color: rgb(240, 240, 240);
diff --git a/WebCore/css/wml.css b/WebCore/css/wml.css
index 54e5a97..4bcf08f 100644
--- a/WebCore/css/wml.css
+++ b/WebCore/css/wml.css
@@ -109,7 +109,7 @@ do {
padding: 2px 6px 3px 6px;
border: 2px outset ButtonFace;
background-color: ButtonFace;
- -webkit-box-sizing: border-box
+ box-sizing: border-box
}
input, select, do {
@@ -163,7 +163,7 @@ do:active:disabled {
select {
-webkit-appearance: menulist;
- -webkit-box-sizing: border-box;
+ box-sizing: border-box;
-webkit-box-align: center;
border: 1px solid;
-webkit-border-radius: 5px;