<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[166119] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/166119">166119</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-03-22 11:31:06 -0700 (Sat, 22 Mar 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/166118">r166118</a>.
https://bugs.webkit.org/show_bug.cgi?id=130640
Crashing things (Requested by weinig on #webkit).
Reverted changeset:
"Switch HTMLConverter to use CSSPropertyIDs to refer to CSS
properties"
https://bugs.webkit.org/show_bug.cgi?id=130639
http://trac.webkit.org/changeset/166118</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformmacHTMLConvertermm">trunk/Source/WebCore/platform/mac/HTMLConverter.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166118 => 166119)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-22 18:01:20 UTC (rev 166118)
+++ trunk/Source/WebCore/ChangeLog        2014-03-22 18:31:06 UTC (rev 166119)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-03-22 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r166118.
+ https://bugs.webkit.org/show_bug.cgi?id=130640
+
+ Crashing things (Requested by weinig on #webkit).
+
+ Reverted changeset:
+
+ "Switch HTMLConverter to use CSSPropertyIDs to refer to CSS
+ properties"
+ https://bugs.webkit.org/show_bug.cgi?id=130639
+ http://trac.webkit.org/changeset/166118
+
</ins><span class="cx"> 2014-03-22 Sam Weinig <sam@webkit.org>
</span><span class="cx">
</span><span class="cx"> Switch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacHTMLConvertermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/HTMLConverter.mm (166118 => 166119)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/HTMLConverter.mm        2014-03-22 18:01:20 UTC (rev 166118)
+++ trunk/Source/WebCore/platform/mac/HTMLConverter.mm        2014-03-22 18:31:06 UTC (rev 166119)
</span><span class="lines">@@ -401,15 +401,15 @@
</span><span class="cx">
</span><span class="cx"> class HTMLConverterCaches {
</span><span class="cx"> public:
</span><del>- String propertyValueForNode(Node&, CSSPropertyID );
- bool floatPropertyValueForNode(Node&, CSSPropertyID, float&);
- Color colorPropertyValueForNode(Node&, CSSPropertyID);
</del><ins>+ String propertyValueForNode(Node&, const String& propertyName);
+ bool floatPropertyValueForNode(Node&, const String& propertyName, float&);
+ Color colorPropertyValueForNode(Node&, const String& propertyName);
</ins><span class="cx">
</span><span class="cx"> bool isBlockElement(Element&);
</span><span class="cx"> bool elementHasOwnBackgroundColor(Element&);
</span><span class="cx">
</span><del>- PassRefPtr<CSSValue> computedStylePropertyForElement(Element&, CSSPropertyID);
- PassRefPtr<CSSValue> inlineStylePropertyForElement(Element&, CSSPropertyID);
</del><ins>+ PassRefPtr<CSSValue> computedStylePropertyForElement(Element&, const String&);
+ PassRefPtr<CSSValue> inlineStylePropertyForElement(Element&, const String&);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> HashMap<Element*, std::unique_ptr<ComputedStyleExtractor>> m_computedStyles;
</span><span class="lines">@@ -430,10 +430,9 @@
</span><span class="cx">
</span><span class="cx"> @interface WebHTMLConverter(WebHTMLConverterInternal)
</span><span class="cx">
</span><del>-- (NSString *)_stringForNode:(DOMNode *)node property:(CSSPropertyID)propertyId;
-- (PlatformColor *)_colorForNode:(DOMNode *)node property:(CSSPropertyID)propertyId;
-- (BOOL)_getFloat:(CGFloat *)val forNode:(DOMNode *)node property:(CSSPropertyID)propertyId;
-
</del><ins>+- (NSString *)_stringForNode:(DOMNode *)node property:(NSString *)key;
+- (PlatformColor *)_colorForNode:(DOMNode *)node property:(NSString *)key;
+- (BOOL)_getFloat:(CGFloat *)val forNode:(DOMNode *)node property:(NSString *)key;
</ins><span class="cx"> - (void)_traverseNode:(DOMNode *)node depth:(NSInteger)depth embedded:(BOOL)embedded;
</span><span class="cx"> - (void)_traverseFooterNode:(DOMNode *)node depth:(NSInteger)depth;
</span><span class="cx">
</span><span class="lines">@@ -570,26 +569,28 @@
</span><span class="cx"> return array;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<CSSValue> HTMLConverterCaches::computedStylePropertyForElement(Element& element, CSSPropertyID propertyId)
</del><ins>+PassRefPtr<CSSValue> HTMLConverterCaches::computedStylePropertyForElement(Element& element, const String& propertyName)
</ins><span class="cx"> {
</span><del>- if (propertyId == CSSPropertyInvalid)
</del><ins>+ CSSPropertyID propetyId = cssPropertyID(propertyName);
+ if (propetyId == CSSPropertyInvalid)
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> auto result = m_computedStyles.add(&element, nullptr);
</span><span class="cx"> if (result.isNewEntry)
</span><span class="cx"> result.iterator->value = std::make_unique<ComputedStyleExtractor>(&element, true);
</span><span class="cx"> ComputedStyleExtractor& computedStyle = *result.iterator->value;
</span><del>- return computedStyle.propertyValue(propertyId);
</del><ins>+ return computedStyle.propertyValue(propetyId);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<CSSValue> HTMLConverterCaches::inlineStylePropertyForElement(Element& element, CSSPropertyID propertyId)
</del><ins>+PassRefPtr<CSSValue> HTMLConverterCaches::inlineStylePropertyForElement(Element& element, const String& propertyName)
</ins><span class="cx"> {
</span><del>- if (propertyId == CSSPropertyInvalid || !element.isStyledElement())
</del><ins>+ CSSPropertyID propetyId = cssPropertyID(propertyName);
+ if (propetyId == CSSPropertyInvalid || !element.isStyledElement())
</ins><span class="cx"> return nullptr;
</span><span class="cx"> const StyleProperties* properties = toStyledElement(element).inlineStyle();
</span><span class="cx"> if (!properties)
</span><span class="cx"> return nullptr;
</span><del>- return properties->getPropertyCSSValue(propertyId);
</del><ins>+ return properties->getPropertyCSSValue(propetyId);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool stringFromCSSValue(CSSValue& value, String& result)
</span><span class="lines">@@ -611,23 +612,23 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String HTMLConverterCaches::propertyValueForNode(Node& node, CSSPropertyID propertyId)
</del><ins>+String HTMLConverterCaches::propertyValueForNode(Node& node, const String& propertyName)
</ins><span class="cx"> {
</span><span class="cx"> if (!node.isElementNode()) {
</span><span class="cx"> if (Node* parent = node.parentNode())
</span><del>- return propertyValueForNode(*parent, propertyId);
</del><ins>+ return propertyValueForNode(*parent, propertyName);
</ins><span class="cx"> return String();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool inherit = false;
</span><span class="cx"> Element& element = toElement(node);
</span><del>- if (RefPtr<CSSValue> value = computedStylePropertyForElement(element, propertyId)) {
</del><ins>+ if (RefPtr<CSSValue> value = computedStylePropertyForElement(element, propertyName)) {
</ins><span class="cx"> String result;
</span><span class="cx"> if (stringFromCSSValue(*value, result))
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (RefPtr<CSSValue> value = inlineStylePropertyForElement(element, propertyId)) {
</del><ins>+ if (RefPtr<CSSValue> value = inlineStylePropertyForElement(element, propertyName)) {
</ins><span class="cx"> String result;
</span><span class="cx"> if (value->isInheritedValue())
</span><span class="cx"> inherit = true;
</span><span class="lines">@@ -635,7 +636,7 @@
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- switch (propertyId) {
</del><ins>+ switch (cssPropertyID(propertyName)) {
</ins><span class="cx"> case CSSPropertyDisplay:
</span><span class="cx"> if (element.hasTagName(headTag) || element.hasTagName(scriptTag) || element.hasTagName(appletTag) || element.hasTagName(noframesTag))
</span><span class="cx"> return "none";
</span><span class="lines">@@ -723,18 +724,18 @@
</span><span class="cx">
</span><span class="cx"> if (inherit) {
</span><span class="cx"> if (Node* parent = node.parentNode())
</span><del>- return propertyValueForNode(*parent, propertyId);
</del><ins>+ return propertyValueForNode(*parent, propertyName);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return String();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (NSString *)_stringForNode:(DOMNode *)node property:(CSSPropertyID)propertyId
</del><ins>+- (NSString *)_stringForNode:(DOMNode *)node property:(NSString *)key
</ins><span class="cx"> {
</span><span class="cx"> Node* coreNode = core(node);
</span><span class="cx"> if (!coreNode)
</span><span class="cx"> return nil;
</span><del>- String result = _caches->propertyValueForNode(*coreNode, propertyId);
</del><ins>+ String result = _caches->propertyValueForNode(*coreNode, String(key));
</ins><span class="cx"> if (!result.length())
</span><span class="cx"> return nil;
</span><span class="cx"> return result;
</span><span class="lines">@@ -767,29 +768,29 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool HTMLConverterCaches::floatPropertyValueForNode(Node& node, CSSPropertyID propertyId, float& result)
</del><ins>+bool HTMLConverterCaches::floatPropertyValueForNode(Node& node, const String& propertyName, float& result)
</ins><span class="cx"> {
</span><span class="cx"> if (!node.isElementNode()) {
</span><span class="cx"> if (ContainerNode* parent = node.parentNode())
</span><del>- return floatPropertyValueForNode(*parent, propertyId, result);
</del><ins>+ return floatPropertyValueForNode(*parent, propertyName, result);
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Element& element = toElement(node);
</span><del>- if (RefPtr<CSSValue> value = computedStylePropertyForElement(element, propertyId)) {
</del><ins>+ if (RefPtr<CSSValue> value = computedStylePropertyForElement(element, propertyName)) {
</ins><span class="cx"> if (value->isPrimitiveValue() && floatValueFromPrimitiveValue(toCSSPrimitiveValue(*value), result))
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool inherit = false;
</span><del>- if (RefPtr<CSSValue> value = inlineStylePropertyForElement(element, propertyId)) {
</del><ins>+ if (RefPtr<CSSValue> value = inlineStylePropertyForElement(element, propertyName)) {
</ins><span class="cx"> if (value->isPrimitiveValue() && floatValueFromPrimitiveValue(toCSSPrimitiveValue(*value), result))
</span><span class="cx"> return true;
</span><span class="cx"> if (value->isInheritedValue())
</span><span class="cx"> inherit = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- switch (propertyId) {
</del><ins>+ switch (cssPropertyID(propertyName)) {
</ins><span class="cx"> case CSSPropertyTextIndent:
</span><span class="cx"> case CSSPropertyLetterSpacing:
</span><span class="cx"> case CSSPropertyWordSpacing:
</span><span class="lines">@@ -804,19 +805,19 @@
</span><span class="cx">
</span><span class="cx"> if (inherit) {
</span><span class="cx"> if (ContainerNode* parent = node.parentNode())
</span><del>- return floatPropertyValueForNode(*parent, propertyId, result);
</del><ins>+ return floatPropertyValueForNode(*parent, propertyName, result);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (BOOL)_getFloat:(CGFloat *)val forNode:(DOMNode *)node property:(CSSPropertyID)propertyId
</del><ins>+- (BOOL)_getFloat:(CGFloat *)val forNode:(DOMNode *)node property:(NSString *)key
</ins><span class="cx"> {
</span><span class="cx"> Node* coreNode = core(node);
</span><span class="cx"> if (!coreNode)
</span><span class="cx"> return NO;
</span><span class="cx"> float result;
</span><del>- if (!_caches->floatPropertyValueForNode(*coreNode, propertyId, result))
</del><ins>+ if (!_caches->floatPropertyValueForNode(*coreNode, String(key), result))
</ins><span class="cx"> return NO;
</span><span class="cx"> if (val)
</span><span class="cx"> *val = result;
</span><span class="lines">@@ -910,10 +911,10 @@
</span><span class="cx">
</span><span class="cx"> bool HTMLConverterCaches::isBlockElement(Element& element)
</span><span class="cx"> {
</span><del>- String displayValue = propertyValueForNode(element, CSSPropertyDisplay);
</del><ins>+ String displayValue = propertyValueForNode(element, "display");
</ins><span class="cx"> if (displayValue == "block" || displayValue == "list-item" || displayValue.startsWith("table"))
</span><span class="cx"> return true;
</span><del>- String floatValue = propertyValueForNode(element, CSSPropertyFloat);
</del><ins>+ String floatValue = propertyValueForNode(element, "float");
</ins><span class="cx"> if (floatValue == "left" || floatValue == "right")
</span><span class="cx"> return true;
</span><span class="cx"> return false;
</span><span class="lines">@@ -925,7 +926,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> // In the text system, text blocks (table elements) and documents (body elements)
</span><span class="cx"> // have their own background colors, which should not be inherited.
</span><del>- return element.hasTagName(htmlTag) || element.hasTagName(bodyTag) || propertyValueForNode(element, CSSPropertyDisplay).startsWith("table");
</del><ins>+ return element.hasTagName(htmlTag) || element.hasTagName(bodyTag) || propertyValueForNode(element, "display").startsWith("table");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (BOOL)_elementIsBlockLevel:(DOMElement *)element
</span><span class="lines">@@ -960,29 +961,29 @@
</span><span class="cx"> return color;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Color HTMLConverterCaches::colorPropertyValueForNode(Node& node, CSSPropertyID propertyId)
</del><ins>+Color HTMLConverterCaches::colorPropertyValueForNode(Node& node, const String& propertyName)
</ins><span class="cx"> {
</span><span class="cx"> if (!node.isElementNode()) {
</span><span class="cx"> if (Node* parent = node.parentNode())
</span><del>- return colorPropertyValueForNode(*parent, propertyId);
</del><ins>+ return colorPropertyValueForNode(*parent, propertyName);
</ins><span class="cx"> return Color();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Element& element = toElement(node);
</span><del>- if (RefPtr<CSSValue> value = computedStylePropertyForElement(element, propertyId)) {
</del><ins>+ if (RefPtr<CSSValue> value = computedStylePropertyForElement(element, propertyName)) {
</ins><span class="cx"> if (value->isPrimitiveValue() && toCSSPrimitiveValue(*value).isRGBColor())
</span><del>- return normalizedColor(Color(toCSSPrimitiveValue(*value).getRGBA32Value()), propertyId == CSSPropertyColor);
</del><ins>+ return normalizedColor(Color(toCSSPrimitiveValue(*value).getRGBA32Value()), propertyName == "color");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool inherit = false;
</span><del>- if (RefPtr<CSSValue> value = inlineStylePropertyForElement(element, propertyId)) {
</del><ins>+ if (RefPtr<CSSValue> value = inlineStylePropertyForElement(element, propertyName)) {
</ins><span class="cx"> if (value->isPrimitiveValue() && toCSSPrimitiveValue(*value).isRGBColor())
</span><del>- return normalizedColor(Color(toCSSPrimitiveValue(*value).getRGBA32Value()), propertyId == CSSPropertyColor);
</del><ins>+ return normalizedColor(Color(toCSSPrimitiveValue(*value).getRGBA32Value()), propertyName == "color");
</ins><span class="cx"> if (value->isInheritedValue())
</span><span class="cx"> inherit = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- switch (propertyId) {
</del><ins>+ switch (cssPropertyID(propertyName)) {
</ins><span class="cx"> case CSSPropertyColor:
</span><span class="cx"> inherit = true;
</span><span class="cx"> break;
</span><span class="lines">@@ -1000,18 +1001,18 @@
</span><span class="cx">
</span><span class="cx"> if (inherit) {
</span><span class="cx"> if (Node* parent = node.parentNode())
</span><del>- return colorPropertyValueForNode(*parent, propertyId);
</del><ins>+ return colorPropertyValueForNode(*parent, propertyName);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return Color();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (PlatformColor *)_colorForNode:(DOMNode *)node property:(CSSPropertyID)propertyId
</del><ins>+- (PlatformColor *)_colorForNode:(DOMNode *)node property:(NSString *)key
</ins><span class="cx"> {
</span><span class="cx"> Node* coreNode = core(node);
</span><span class="cx"> if (!coreNode)
</span><span class="cx"> return nil;
</span><del>- Color result = _caches->colorPropertyValueForNode(*coreNode, propertyId);
</del><ins>+ Color result = _caches->colorPropertyValueForNode(*coreNode, String(key));
</ins><span class="cx"> if (!result.isValid())
</span><span class="cx"> return nil;
</span><span class="cx"> PlatformColor *platformResult = _platformColor(result);
</span><span class="lines">@@ -1029,22 +1030,23 @@
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> NSFontManager *fontManager = [NSFontManager sharedFontManager];
</span><span class="cx"> #endif
</span><del>- NSString *textDecoration = [self _stringForNode:element property:CSSPropertyTextDecoration];
- NSString *verticalAlign = [self _stringForNode:element property:CSSPropertyVerticalAlign];
- NSString *textShadow = [self _stringForNode:element property:CSSPropertyTextShadow];
- NSString *fontLigatures = [self _stringForNode:element property:CSSPropertyWebkitFontVariantLigatures];
- NSString *fontKerning = [self _stringForNode:element property:CSSPropertyWebkitFontKerning];
- NSString *letterSpacing = [self _stringForNode:element property:CSSPropertyLetterSpacing];
</del><ins>+ NSString *fontEffect = [self _stringForNode:element property:@"font-effect"];
+ NSString *textDecoration = [self _stringForNode:element property:@"text-decoration"];
+ NSString *verticalAlign = [self _stringForNode:element property:@"vertical-align"];
+ NSString *textShadow = [self _stringForNode:element property:@"text-shadow"];
+ NSString *fontLigatures = [self _stringForNode:element property:@"font-variant-ligatures"];
+ NSString *fontKerning = [self _stringForNode:element property:@"font-kerning"];
+ NSString *letterSpacing = [self _stringForNode:element property:@"letter-spacing"];
</ins><span class="cx"> CGFloat fontSize = 0;
</span><span class="cx"> CGFloat baselineOffset = 0;
</span><span class="cx"> CGFloat strokeWidth = 0.0;
</span><span class="cx"> PlatformFont *font = nil;
</span><span class="cx"> PlatformFont *actualFont = (PlatformFont *)[element _font];
</span><del>- PlatformColor *foregroundColor = [self _colorForNode:element property:CSSPropertyColor];
- PlatformColor *backgroundColor = [self _colorForNode:element property:CSSPropertyBackgroundColor];
- PlatformColor *strokeColor = [self _colorForNode:element property:CSSPropertyWebkitTextStrokeColor];
</del><ins>+ PlatformColor *foregroundColor = [self _colorForNode:element property:@"color"];
+ PlatformColor *backgroundColor = [self _colorForNode:element property:@"background-color"];
+ PlatformColor *strokeColor = [self _colorForNode:element property:@"-webkit-text-stroke-color"];
</ins><span class="cx">
</span><del>- if (![self _getFloat:&fontSize forNode:element property:CSSPropertyFontSize] || fontSize <= 0.0)
</del><ins>+ if (![self _getFloat:&fontSize forNode:element property:@"font-size"] || fontSize <= 0.0)
</ins><span class="cx"> fontSize = _defaultFontSize;
</span><span class="cx"> fontSize *= _textSizeMultiplier;
</span><span class="cx"> if (fontSize < _minimumFontSize) fontSize = _minimumFontSize;
</span><span class="lines">@@ -1064,11 +1066,11 @@
</span><span class="cx"> font = [fontManager convertFont:actualFont toSize:fontSize];
</span><span class="cx"> #endif
</span><span class="cx"> if (!font) {
</span><del>- NSString *fontName = [[self _stringForNode:element property:CSSPropertyFontFamily] capitalizedString];
- NSString *fontStyle = [self _stringForNode:element property:CSSPropertyFontStyle];
- NSString *fontWeight = [self _stringForNode:element property:CSSPropertyFontWeight];
</del><ins>+ NSString *fontName = [[self _stringForNode:element property:@"font-family"] capitalizedString];
+ NSString *fontStyle = [self _stringForNode:element property:@"font-style"];
+ NSString *fontWeight = [self _stringForNode:element property:@"font-weight"];
</ins><span class="cx"> #if !PLATFORM(IOS)
</span><del>- NSString *fontVariant = [self _stringForNode:element property:CSSPropertyFontVariant];
</del><ins>+ NSString *fontVariant = [self _stringForNode:element property:@"font-variant"];
</ins><span class="cx"> #endif
</span><span class="cx"> if (!fontName)
</span><span class="cx"> fontName = _standardFontFamily;
</span><span class="lines">@@ -1114,14 +1116,20 @@
</span><span class="cx"> if (backgroundColor && ![self _elementHasOwnBackgroundColor:element])
</span><span class="cx"> [attrs setObject:backgroundColor forKey:NSBackgroundColorAttributeName];
</span><span class="cx">
</span><del>- if ([self _getFloat:&strokeWidth forNode:element property:CSSPropertyWebkitTextStrokeWidth]) {
</del><ins>+ if ([self _getFloat:&strokeWidth forNode:element property:@"-webkit-text-stroke-width"]) {
</ins><span class="cx"> float textStrokeWidth = strokeWidth / ([font pointSize] * 0.01);
</span><span class="cx"> [attrs setObject:[NSNumber numberWithDouble:textStrokeWidth] forKey:NSStrokeWidthAttributeName];
</span><span class="cx"> }
</span><span class="cx"> if(strokeColor)
</span><span class="cx"> [attrs setObject:strokeColor forKey:NSStrokeColorAttributeName];
</span><ins>+ if (fontEffect) {
+ if ([fontEffect rangeOfString:@"outline"].location != NSNotFound)
+ [attrs setObject:[NSNumber numberWithDouble:3.0] forKey:NSStrokeWidthAttributeName];
+ if ([fontEffect rangeOfString:@"emboss"].location != NSNotFound)
+ [attrs setObject:[[[PlatformNSShadow alloc] init] autorelease] forKey:NSShadowAttributeName];
+ }
</ins><span class="cx"> if (fontKerning || letterSpacing) {
</span><del>- if ([fontKerning rangeOfString:@"none"].location != NSNotFound)
</del><ins>+ if ([fontEffect rangeOfString:@"none"].location != NSNotFound)
</ins><span class="cx"> [attrs setObject:@0.0 forKey:NSKernAttributeName];
</span><span class="cx"> else {
</span><span class="cx"> double kernVal = letterSpacing ? [letterSpacing doubleValue] : 0.0;
</span><span class="lines">@@ -1132,11 +1140,11 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> if (fontLigatures) {
</span><del>- if ([fontLigatures rangeOfString:@"normal"].location != NSNotFound)
</del><ins>+ if ([fontEffect rangeOfString:@"normal"].location != NSNotFound)
</ins><span class="cx"> ; // default: whatever the system decides to do
</span><del>- else if ([fontLigatures rangeOfString:@"common-ligatures"].location != NSNotFound)
</del><ins>+ else if ([fontEffect rangeOfString:@"common-ligatures"].location != NSNotFound)
</ins><span class="cx"> [attrs setObject:@1 forKey:NSLigatureAttributeName]; // explicitly enabled
</span><del>- else if ([fontLigatures rangeOfString:@"no-common-ligatures"].location != NSNotFound)
</del><ins>+ else if ([fontEffect rangeOfString:@"no-common-ligatures"].location != NSNotFound)
</ins><span class="cx"> [attrs setObject:@0 forKey:NSLigatureAttributeName]; // explicitly disabled
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1152,7 +1160,7 @@
</span><span class="cx"> if ([verticalAlign rangeOfString:@"sub"].location != NSNotFound)
</span><span class="cx"> [attrs setObject:[NSNumber numberWithInteger:-1] forKey:NSSuperscriptAttributeName];
</span><span class="cx"> }
</span><del>- if ([self _getFloat:&baselineOffset forNode:element property:CSSPropertyVerticalAlign])
</del><ins>+ if ([self _getFloat:&baselineOffset forNode:element property:@"vertical-align"])
</ins><span class="cx"> [attrs setObject:[NSNumber numberWithDouble:baselineOffset] forKey:NSBaselineOffsetAttributeName];
</span><span class="cx"> if (textShadow && [textShadow length] > 4) {
</span><span class="cx"> NSShadow *shadow = _shadowForShadowStyle(textShadow);
</span><span class="lines">@@ -1166,9 +1174,9 @@
</span><span class="cx"> NSMutableParagraphStyle *paragraphStyle = [[[self class] defaultParagraphStyle] mutableCopy];
</span><span class="cx"> NSString *blockTag = [blockElement tagName];
</span><span class="cx"> BOOL isParagraph = ([@"P" isEqualToString:blockTag] || [@"LI" isEqualToString:blockTag] || ([blockTag hasPrefix:@"H"] && 2 == [blockTag length]));
</span><del>- NSString *textAlign = [self _stringForNode:blockElement property:CSSPropertyTextAlign];
- NSString *direction = [self _stringForNode:blockElement property:CSSPropertyDirection];
- NSString *hyphenation = [self _stringForNode:blockElement property:CSSPropertyWebkitHyphens];
</del><ins>+ NSString *textAlign = [self _stringForNode:blockElement property:@"text-align"];
+ NSString *direction = [self _stringForNode:blockElement property:@"direction"];
+ NSString *hyphenation = [self _stringForNode:blockElement property:@"-webkit-hyphens"];
</ins><span class="cx"> CGFloat leftMargin = 0;
</span><span class="cx"> CGFloat rightMargin = 0;
</span><span class="cx"> CGFloat bottomMargin = 0;
</span><span class="lines">@@ -1203,16 +1211,16 @@
</span><span class="cx"> [paragraphStyle setHeaderLevel:headerLevel];
</span><span class="cx"> }
</span><span class="cx"> if (isParagraph) {
</span><del>- if ([self _getFloat:&leftMargin forNode:blockElement property:CSSPropertyMarginLeft] && leftMargin > 0.0)
</del><ins>+ if ([self _getFloat:&leftMargin forNode:blockElement property:@"margin-left"] && leftMargin > 0.0)
</ins><span class="cx"> [paragraphStyle setHeadIndent:leftMargin];
</span><del>- if ([self _getFloat:&textIndent forNode:blockElement property:CSSPropertyTextIndent])
</del><ins>+ if ([self _getFloat:&textIndent forNode:blockElement property:@"text-indent"])
</ins><span class="cx"> [paragraphStyle setFirstLineHeadIndent:[paragraphStyle headIndent] + textIndent];
</span><del>- if ([self _getFloat:&rightMargin forNode:blockElement property:CSSPropertyMarginRight] && rightMargin > 0.0)
</del><ins>+ if ([self _getFloat:&rightMargin forNode:blockElement property:@"margin-right"] && rightMargin > 0.0)
</ins><span class="cx"> [paragraphStyle setTailIndent:-rightMargin];
</span><del>- if ([self _getFloat:&bottomMargin forNode:blockElement property:CSSPropertyMarginBottom] && bottomMargin > 0.0)
</del><ins>+ if ([self _getFloat:&bottomMargin forNode:blockElement property:@"margin-bottom"] && bottomMargin > 0.0)
</ins><span class="cx"> [paragraphStyle setParagraphSpacing:bottomMargin];
</span><span class="cx"> }
</span><del>- if (_webViewTextSizeMultiplier > 0.0 && [self _getFloat:&lineHeight forNode:element property:CSSPropertyLineHeight] && lineHeight > 0.0)
</del><ins>+ if (_webViewTextSizeMultiplier > 0.0 && [self _getFloat:&lineHeight forNode:element property:@"line-height"] && lineHeight > 0.0)
</ins><span class="cx"> [paragraphStyle setMinimumLineHeight:lineHeight / _webViewTextSizeMultiplier];
</span><span class="cx"> if ([_textLists count] > 0)
</span><span class="cx"> [paragraphStyle setTextLists:_textLists];
</span><span class="lines">@@ -1366,8 +1374,9 @@
</span><span class="cx"> NSUInteger textLength = [_attrStr length];
</span><span class="cx"> RetainPtr<NSTextAttachment> attachment = adoptNS([[PlatformNSTextAttachment alloc] initWithFileWrapper:fileWrapper]);
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>- NSString *vAlign = [self _stringForNode:element property:CSSPropertyVerticalAlign];
- attachment.get().bounds = CGRectMake(0, ([vAlign floatValue] / 100.) * element.clientHeight, element.clientWidth, element.clientHeight);
</del><ins>+ NSString *vAlign = [self _stringForNode:element property:@"vertical-align"];
+ NSString *hAlign = [self _stringForNode:element property:@"horizontal-align"];
+ attachment.get().bounds = CGRectMake(([hAlign floatValue] / 100.) * element.clientWidth, ([vAlign floatValue] / 100.) * element.clientHeight, element.clientWidth, element.clientHeight);
</ins><span class="cx"> #endif
</span><span class="cx"> RetainPtr<NSString> string = adoptNS([[NSString alloc] initWithFormat:(needsParagraph ? @"%C\n" : @"%C"), static_cast<unichar>(NSAttachmentCharacter)]);
</span><span class="cx"> NSRange rangeToReplace = NSMakeRange(textLength, 0);
</span><span class="lines">@@ -1453,57 +1462,57 @@
</span><span class="cx"> NSString *width = isTableCellElement ? [(DOMHTMLTableCellElement *)element width] : [element getAttribute:@"width"];
</span><span class="cx">
</span><span class="cx"> if ((width && [width length]) || !isTable) {
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyWidth])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"width"])
</ins><span class="cx"> [block setValue:val type:NSTextBlockAbsoluteValueType forDimension:NSTextBlockWidth];
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyMinWidth])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"min-width"])
</ins><span class="cx"> [block setValue:val type:NSTextBlockAbsoluteValueType forDimension:NSTextBlockMinimumWidth];
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyMaxWidth])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"max-width"])
</ins><span class="cx"> [block setValue:val type:NSTextBlockAbsoluteValueType forDimension:NSTextBlockMaximumWidth];
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyMinHeight])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"min-height"])
</ins><span class="cx"> [block setValue:val type:NSTextBlockAbsoluteValueType forDimension:NSTextBlockMinimumHeight];
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyMaxHeight])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"max-height"])
</ins><span class="cx"> [block setValue:val type:NSTextBlockAbsoluteValueType forDimension:NSTextBlockMaximumHeight];
</span><span class="cx">
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyPaddingLeft])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"padding-left"])
</ins><span class="cx"> [block setWidth:val + extraPadding type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockPadding edge:NSMinXEdge];
</span><span class="cx"> else [block setWidth:extraPadding type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockPadding edge:NSMinXEdge];
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyPaddingTop])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"padding-top"])
</ins><span class="cx"> [block setWidth:val + extraPadding type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockPadding edge:NSMinYEdge]; else [block setWidth:extraPadding type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockPadding edge:NSMinYEdge];
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyPaddingRight])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"padding-right"])
</ins><span class="cx"> [block setWidth:val + extraPadding type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockPadding edge:NSMaxXEdge]; else [block setWidth:extraPadding type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockPadding edge:NSMaxXEdge];
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyPaddingBottom])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"padding-bottom"])
</ins><span class="cx"> [block setWidth:val + extraPadding type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockPadding edge:NSMaxYEdge]; else [block setWidth:extraPadding type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockPadding edge:NSMaxYEdge];
</span><span class="cx">
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyBorderLeftWidth])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"border-left-width"])
</ins><span class="cx"> [block setWidth:val type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockBorder edge:NSMinXEdge];
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyBorderTopWidth])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"border-top-width"])
</ins><span class="cx"> [block setWidth:val type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockBorder edge:NSMinYEdge];
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyBorderRightWidth])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"border-right-width"])
</ins><span class="cx"> [block setWidth:val type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockBorder edge:NSMaxXEdge];
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyBorderBottomWidth])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"border-bottom-width"])
</ins><span class="cx"> [block setWidth:val type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockBorder edge:NSMaxYEdge];
</span><span class="cx">
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyMarginLeft])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"margin-left"])
</ins><span class="cx"> [block setWidth:val + extraMargin type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockMargin edge:NSMinXEdge]; else [block setWidth:extraMargin type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockMargin edge:NSMinXEdge];
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyMarginTop])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"margin-top"])
</ins><span class="cx"> [block setWidth:val + extraMargin type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockMargin edge:NSMinYEdge]; else [block setWidth:extraMargin type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockMargin edge:NSMinYEdge];
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyMarginRight])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"margin-right"])
</ins><span class="cx"> [block setWidth:val + extraMargin type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockMargin edge:NSMaxXEdge]; else [block setWidth:extraMargin type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockMargin edge:NSMaxXEdge];
</span><del>- if ([self _getFloat:&val forNode:element property:CSSPropertyMarginBottom])
</del><ins>+ if ([self _getFloat:&val forNode:element property:@"margin-bottom"])
</ins><span class="cx"> [block setWidth:val + extraMargin type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockMargin edge:NSMaxYEdge]; else [block setWidth:extraMargin type:NSTextBlockAbsoluteValueType forLayer:NSTextBlockMargin edge:NSMaxYEdge];
</span><span class="cx">
</span><del>- if ((color = [self _colorForNode:element property:CSSPropertyBackgroundColor]))
</del><ins>+ if ((color = [self _colorForNode:element property:@"background-color"]))
</ins><span class="cx"> [block setBackgroundColor:color];
</span><span class="cx"> if (!color && backgroundColor) [block setBackgroundColor:backgroundColor];
</span><del>- if ((color = [self _colorForNode:element property:CSSPropertyBorderLeftColor]))
</del><ins>+ if ((color = [self _colorForNode:element property:@"border-left-color"]))
</ins><span class="cx"> [block setBorderColor:color forEdge:NSMinXEdge];
</span><del>- if ((color = [self _colorForNode:element property:CSSPropertyBorderTopColor]))
</del><ins>+ if ((color = [self _colorForNode:element property:@"border-top-color"]))
</ins><span class="cx"> [block setBorderColor:color forEdge:NSMinYEdge];
</span><del>- if ((color = [self _colorForNode:element property:CSSPropertyBorderRightColor]))
</del><ins>+ if ((color = [self _colorForNode:element property:@"border-right-color"]))
</ins><span class="cx"> [block setBorderColor:color forEdge:NSMaxXEdge];
</span><del>- if ((color = [self _colorForNode:element property:CSSPropertyBorderBottomColor]))
</del><ins>+ if ((color = [self _colorForNode:element property:@"border-bottom-color"]))
</ins><span class="cx"> [block setBorderColor:color forEdge:NSMaxYEdge];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1678,9 +1687,9 @@
</span><span class="cx"> [table setCollapsesBorders:NO];
</span><span class="cx"> [table setHidesEmptyCells:NO];
</span><span class="cx"> if (tableElement) {
</span><del>- NSString *borderCollapse = [self _stringForNode:tableElement property:CSSPropertyBorderCollapse];
- NSString *emptyCells = [self _stringForNode:tableElement property:CSSPropertyEmptyCells];
- NSString *tableLayout = [self _stringForNode:tableElement property:CSSPropertyTableLayout];
</del><ins>+ NSString *borderCollapse = [self _stringForNode:tableElement property:@"border-collapse"];
+ NSString *emptyCells = [self _stringForNode:tableElement property:@"empty-cells"];
+ NSString *tableLayout = [self _stringForNode:tableElement property:@"table-layout"];
</ins><span class="cx"> if ([tableElement respondsToSelector:@selector(cellSpacing)]) {
</span><span class="cx"> NSString *cellSpacing = [(DOMHTMLTableElement *)tableElement cellSpacing];
</span><span class="cx"> if (cellSpacing && [cellSpacing length] > 0 && ![cellSpacing hasSuffix:@"%"]) cellSpacingVal = [cellSpacing floatValue];
</span><span class="lines">@@ -1736,7 +1745,7 @@
</span><span class="cx"> }
</span><span class="cx"> RetainPtr<NSTextTableBlock> block = adoptNS([[PlatformNSTextTableBlock alloc] initWithTable:table startingRow:rowNumber rowSpan:rowSpan startingColumn:columnNumber columnSpan:colSpan]);
</span><span class="cx"> if (tableCellElement) {
</span><del>- NSString *verticalAlign = [self _stringForNode:tableCellElement property:CSSPropertyVerticalAlign];
</del><ins>+ NSString *verticalAlign = [self _stringForNode:tableCellElement property:@"vertical-align"];
</ins><span class="cx"> [self _fillInBlock:block.get() forElement:tableCellElement backgroundColor:color extraMargin:cellSpacingVal / 2 extraPadding:0 isTable:NO];
</span><span class="cx"> if ([@"middle" isEqualToString:verticalAlign])
</span><span class="cx"> [block setVerticalAlignment:NSTextBlockMiddleAlignment];
</span><span class="lines">@@ -1759,16 +1768,16 @@
</span><span class="cx"> if (isBlockLevel)
</span><span class="cx"> [_writingDirectionArray removeAllObjects];
</span><span class="cx"> else {
</span><del>- NSString *bidi = [self _stringForNode:element property:CSSPropertyUnicodeBidi];
</del><ins>+ NSString *bidi = [self _stringForNode:element property:@"unicode-bidi"];
</ins><span class="cx"> if (bidi && [bidi isEqualToString:@"embed"]) {
</span><span class="cx"> NSUInteger val = NSTextWritingDirectionEmbedding;
</span><del>- NSString *direction = [self _stringForNode:element property:CSSPropertyDirection];
</del><ins>+ NSString *direction = [self _stringForNode:element property:@"direction"];
</ins><span class="cx"> if ([direction isEqualToString:@"rtl"])
</span><span class="cx"> val |= NSWritingDirectionRightToLeft;
</span><span class="cx"> [_writingDirectionArray addObject:[NSNumber numberWithUnsignedInteger:val]];
</span><span class="cx"> } else if (bidi && [bidi isEqualToString:@"bidi-override"]) {
</span><span class="cx"> NSUInteger val = NSTextWritingDirectionOverride;
</span><del>- NSString *direction = [self _stringForNode:element property:CSSPropertyDirection];
</del><ins>+ NSString *direction = [self _stringForNode:element property:@"direction"];
</ins><span class="cx"> if ([direction isEqualToString:@"rtl"])
</span><span class="cx"> val |= NSWritingDirectionRightToLeft;
</span><span class="cx"> [_writingDirectionArray addObject:[NSNumber numberWithUnsignedInteger:val]];
</span><span class="lines">@@ -1779,7 +1788,7 @@
</span><span class="cx"> if ([@"table-row-group" isEqualToString:displayVal]) {
</span><span class="cx"> // If we are starting in medias res, the first thing we see may be the tbody, so go up to the table
</span><span class="cx"> tableElement = [self _blockLevelElementForNode:[element parentNode]];
</span><del>- if (![@"table" isEqualToString:[self _stringForNode:tableElement property:CSSPropertyDisplay]])
</del><ins>+ if (![@"table" isEqualToString:[self _stringForNode:tableElement property:@"display"]])
</ins><span class="cx"> tableElement = element;
</span><span class="cx"> }
</span><span class="cx"> while ([_textTables count] > [_textBlocks count])
</span><span class="lines">@@ -1789,7 +1798,7 @@
</span><span class="cx"> [_textTableFooters setObject:element forKey:[NSValue valueWithNonretainedObject:[_textTables lastObject]]];
</span><span class="cx"> retval = NO;
</span><span class="cx"> } else if ([@"table-row" isEqualToString:displayVal] && [_textTables count] > 0) {
</span><del>- PlatformColor *color = [self _colorForNode:element property:CSSPropertyBackgroundColor];
</del><ins>+ PlatformColor *color = [self _colorForNode:element property:@"background-color"];
</ins><span class="cx"> if (!color) color = [PlatformColorClass clearColor];
</span><span class="cx"> [_textTableRowBackgroundColors addObject:color];
</span><span class="cx"> } else if ([@"table-cell" isEqualToString:displayVal]) {
</span><span class="lines">@@ -1861,14 +1870,14 @@
</span><span class="cx"> }
</span><span class="cx"> } else if ([@"UL" isEqualToString:tag]) {
</span><span class="cx"> RetainPtr<NSTextList> list;
</span><del>- NSString *listStyleType = [self _stringForNode:element property:CSSPropertyListStyleType];
</del><ins>+ NSString *listStyleType = [self _stringForNode:element property:@"list-style-type"];
</ins><span class="cx"> if (!listStyleType || [listStyleType length] == 0)
</span><span class="cx"> listStyleType = @"disc";
</span><span class="cx"> list = adoptNS([[PlatformNSTextList alloc] initWithMarkerFormat:[NSString stringWithFormat:@"{%@}", listStyleType] options:0]);
</span><span class="cx"> [_textLists addObject:list.get()];
</span><span class="cx"> } else if ([@"OL" isEqualToString:tag]) {
</span><span class="cx"> RetainPtr<NSTextList> list;
</span><del>- NSString *listStyleType = [self _stringForNode:element property:CSSPropertyListStyleType];
</del><ins>+ NSString *listStyleType = [self _stringForNode:element property:@"list-style-type"];
</ins><span class="cx"> if (!listStyleType || [listStyleType length] == 0) listStyleType = @"decimal";
</span><span class="cx"> list = adoptNS([[PlatformNSTextList alloc] initWithMarkerFormat:[NSString stringWithFormat:@"{%@}.", listStyleType] options:0]);
</span><span class="cx"> if ([element respondsToSelector:@selector(start)]) {
</span><span class="lines">@@ -2003,7 +2012,7 @@
</span><span class="cx"> [self _newParagraphForElement:element tag:tag allowEmpty:(range.length == 0) suppressTrailingSpace:YES];
</span><span class="cx"> }
</span><span class="cx"> } else if ([_writingDirectionArray count] > 0) {
</span><del>- NSString *bidi = [self _stringForNode:element property:CSSPropertyUnicodeBidi];
</del><ins>+ NSString *bidi = [self _stringForNode:element property:@"unicode-bidi"];
</ins><span class="cx"> if (bidi && ([bidi isEqualToString:@"embed"] || [bidi isEqualToString:@"bidi-override"])) {
</span><span class="cx"> [_writingDirectionArray removeLastObject];
</span><span class="cx"> }
</span><span class="lines">@@ -2127,8 +2136,8 @@
</span><span class="cx"> BOOL suppressLeadingSpace = ((_flags.isSoft && lastChar == ' ') || lastChar == '\n' || lastChar == '\r' || lastChar == '\t' || lastChar == NSParagraphSeparatorCharacter || lastChar == NSLineSeparatorCharacter || lastChar == NSFormFeedCharacter || lastChar == WebNextLineCharacter);
</span><span class="cx"> NSRange rangeToReplace = NSMakeRange(textLength, 0);
</span><span class="cx"> CFMutableStringRef mutstr = NULL;
</span><del>- whitespaceVal = [self _stringForNode:text property:CSSPropertyWhiteSpace];
- transformVal = [self _stringForNode:text property:CSSPropertyTextTransform];
</del><ins>+ whitespaceVal = [self _stringForNode:text property:@"white-space"];
+ transformVal = [self _stringForNode:text property:@"text-transform"];
</ins><span class="cx">
</span><span class="cx"> if (_domRange) {
</span><span class="cx"> if (text == [_domRange startContainer]) {
</span><span class="lines">@@ -2261,7 +2270,7 @@
</span><span class="cx"> }
</span><span class="cx"> } else if (nodeType == DOM_ELEMENT_NODE) {
</span><span class="cx"> DOMElement *element = (DOMElement *)node;
</span><del>- NSString *tag = [element tagName], *displayVal = [self _stringForNode:element property:CSSPropertyDisplay];
</del><ins>+ NSString *tag = [element tagName], *displayVal = [self _stringForNode:element property:@"display"];
</ins><span class="cx"> if ([self _enterElement:element tag:tag display:displayVal embedded:embedded]) {
</span><span class="cx"> NSUInteger startIndex = [_attrStr length];
</span><span class="cx"> if ([self _processElement:element tag:tag display:displayVal depth:depth]) {
</span></span></pre>
</div>
</div>
</body>
</html>