[prev in list] [next in list] [prev in thread] [next in thread]
List: webkit-changes
Subject: [webkit-changes] [82643] branches/chromium/696
From: cevans () google ! com
Date: 2011-03-31 23:51:08
Message-ID: 20110331235108.C1E4115803DD () lists ! macosforge ! org
[Download RAW message or body]
[Attachment #2 (text/html)]
<!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>[82643] branches/chromium/696</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/82643">82643</a></dd> \
<dt>Author</dt> <dd>cevans@google.com</dd> <dt>Date</dt> <dd>2011-03-31 16:51:08 \
-0700 (Thu, 31 Mar 2011)</dd> </dl>
<h3>Log Message</h3>
<pre>Merge 82503
BUG=77765</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#brancheschromium696SourceWebCorecssCSSStyleSelectorcpp">branches/chromium/696/Source/WebCore/css/CSSStyleSelector.cpp</a></li>
<li><a href="#brancheschromium696SourceWebCoreeditingApplyStyleCommandcpp">branches/chromium/696/Source/WebCore/editing/ApplyStyleCommand.cpp</a></li>
<li><a href="#brancheschromium696SourceWebCoreeditingDeleteButtonControllercpp">branches/chromium/696/Source/WebCore/editing/DeleteButtonController.cpp</a></li>
<li><a href="#brancheschromium696SourceWebCoreeditingEditingStylecpp">branches/chromium/696/Source/WebCore/editing/EditingStyle.cpp</a></li>
<li><a href="#brancheschromium696SourceWebCoreeditingEditorcpp">branches/chromium/696/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#brancheschromium696SourceWebCoreeditingFormatBlockCommandcpp">branches/chromium/696/Source/WebCore/editing/FormatBlockCommand.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#brancheschromium696LayoutTestseditingexecCommandremoveformatnonhtmleleme \
ntcrashexpectedtxt">branches/chromium/696/LayoutTests/editing/execCommand/remove-format-non-html-element-crash-expected.txt</a></li>
<li><a href="#brancheschromium696LayoutTestseditingexecCommandremoveformatnonhtmlelem \
entcrashhtml">branches/chromium/696/LayoutTests/editing/execCommand/remove-format-non-html-element-crash.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="brancheschromium696LayoutTestseditingexecCommandremoveformatnonhtmlelementcrash \
expectedtxtfromrev82503trunkLayoutTestseditingexecCommandremoveformatnonhtmlelementcrashexpectedtxt"></a>
<div class="copfile"><h4>Copied: \
branches/chromium/696/LayoutTests/editing/execCommand/remove-format-non-html-element-crash-expected.txt \
(from rev 82503, trunk/LayoutTests/editing/execCommand/remove-format-non-html-element-crash-expected.txt) \
(0 => 82643)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/chromium/696/LayoutTests/editing/execCommand/remove-format-non-html-element-crash-expected.txt \
(rev 0)
+++ branches/chromium/696/LayoutTests/editing/execCommand/remove-format-non-html-element-crash-expected.txt 2011-03-31 \
23:51:08 UTC (rev 82643) </span><span class="lines">@@ -0,0 +1 @@
</span><ins>+Test passes if it does not crash.
</ins></span></pre></div>
<a id="brancheschromium696LayoutTestseditingexecCommandremoveformatnonhtmlelementcrash \
htmlfromrev82503trunkLayoutTestseditingexecCommandremoveformatnonhtmlelementcrashhtml"></a>
<div class="copfile"><h4>Copied: \
branches/chromium/696/LayoutTests/editing/execCommand/remove-format-non-html-element-crash.html \
(from rev 82503, trunk/LayoutTests/editing/execCommand/remove-format-non-html-element-crash.html) \
(0 => 82643)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/chromium/696/LayoutTests/editing/execCommand/remove-format-non-html-element-crash.html \
(rev 0)
+++ branches/chromium/696/LayoutTests/editing/execCommand/remove-format-non-html-element-crash.html 2011-03-31 \
23:51:08 UTC (rev 82643) </span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+<html>
+<body>
+Test passes if it does not crash.
+<div id="test" contenteditable="true">
+<ins><math>ABCD</math></ins>
+</div>
+<script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ var test = document.getElementById("test");
+ test.focus();
+ document.execCommand("SelectAll");
+ document.execCommand("RemoveFormat");
+ document.body.removeChild(test);
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="brancheschromium696SourceWebCorecssCSSStyleSelectorcpp"></a>
<div class="modfile"><h4>Modified: \
branches/chromium/696/Source/WebCore/css/CSSStyleSelector.cpp (82642 => 82643)</h4> \
<pre class="diff"><span> <span class="info">--- \
branches/chromium/696/Source/WebCore/css/CSSStyleSelector.cpp 2011-03-31 23:50:06 UTC \
(rev 82642)
+++ branches/chromium/696/Source/WebCore/css/CSSStyleSelector.cpp 2011-03-31 23:51:08 \
UTC (rev 82643) </span><span class="lines">@@ -6174,8 +6174,11 @@
</span><span class="cx"> if (list->length() != 2)
</span><span class="cx"> return;
</span><span class="cx"> for (unsigned i = 0; i < 2; ++i) {
</span><del>- \
ASSERT(list->itemWithoutBoundsCheck(i)->isPrimitiveValue());
- CSSPrimitiveValue* value = \
static_cast<CSSPrimitiveValue*>(list->itemWithoutBoundsCheck(i)); \
</del><ins>+ CSSValue* item = list->itemWithoutBoundsCheck(i); + \
if (!item->isPrimitiveValue()) + continue;
+
+ CSSPrimitiveValue* value = \
static_cast<CSSPrimitiveValue*>(item); </ins><span class="cx"> \
if (value->getIdent() == CSSValueFilled || value->getIdent() == CSSValueOpen) \
</span><span class="cx"> m_style->setTextEmphasisFill(*value); \
</span><span class="cx"> else </span></span></pre></div>
<a id="brancheschromium696SourceWebCoreeditingApplyStyleCommandcpp"></a>
<div class="modfile"><h4>Modified: \
branches/chromium/696/Source/WebCore/editing/ApplyStyleCommand.cpp (82642 => \
82643)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/chromium/696/Source/WebCore/editing/ApplyStyleCommand.cpp 2011-03-31 \
23:50:06 UTC (rev 82642)
+++ branches/chromium/696/Source/WebCore/editing/ApplyStyleCommand.cpp 2011-03-31 \
23:51:08 UTC (rev 82643) </span><span class="lines">@@ -57,11 +57,9 @@
</span><span class="cx"> static RGBA32 getRGBAFontColor(CSSStyleDeclaration* style)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<CSSValue> colorValue = \
style->getPropertyCSSValue(CSSPropertyColor); </span><del>- if (!colorValue)
</del><ins>+ if (!colorValue || !colorValue->isPrimitiveValue())
</ins><span class="cx"> return Color::transparent;
</span><span class="cx">
</span><del>- ASSERT(colorValue->isPrimitiveValue());
-
</del><span class="cx"> CSSPrimitiveValue* primitiveColor = \
static_cast<CSSPrimitiveValue*>(colorValue.get()); </span><span class="cx"> \
RGBA32 rgba = 0; </span><span class="cx"> if (primitiveColor->primitiveType() \
!= CSSPrimitiveValue::CSS_RGBCOLOR) { </span><span class="lines">@@ -1312,7 +1310,6 \
@@ </span><span class="cx"> Vector<RefPtr<Element> > \
elementsToPushDown; </span><span class="cx"> while (current != targetNode) {
</span><span class="cx"> ASSERT(current);
</span><del>- ASSERT(current->isHTMLElement());
</del><span class="cx"> ASSERT(current->contains(targetNode));
</span><span class="cx"> Node* child = current->firstChild();
</span><span class="cx"> Node* lastChild = current->lastChild();
</span><span class="lines">@@ -1321,8 +1318,10 @@
</span><span class="cx"> styledElement = \
static_cast<StyledElement*>(current); </span><span class="cx"> \
elementsToPushDown.append(styledElement); </span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> RefPtr<EditingStyle> styleToPushDown = \
EditingStyle::create(); </span><del>- removeInlineStyleFromElement(style, \
toHTMLElement(current), RemoveIfNeeded, styleToPushDown.get()); </del><ins>+ \
if (current->isHTMLElement()) + removeInlineStyleFromElement(style, \
toHTMLElement(current), RemoveIfNeeded, styleToPushDown.get()); </ins><span \
class="cx"> </span><span class="cx"> // The inner loop will go through \
children on each level </span><span class="cx"> // FIXME: we should aggregate \
inline child elements together so that we don't wrap each child separately. \
</span></span></pre></div> <a \
id="brancheschromium696SourceWebCoreeditingDeleteButtonControllercpp"></a> <div \
class="modfile"><h4>Modified: \
branches/chromium/696/Source/WebCore/editing/DeleteButtonController.cpp (82642 => \
82643)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/chromium/696/Source/WebCore/editing/DeleteButtonController.cpp 2011-03-31 \
23:50:06 UTC (rev 82642)
+++ branches/chromium/696/Source/WebCore/editing/DeleteButtonController.cpp 2011-03-31 \
23:51:08 UTC (rev 82643) </span><span class="lines">@@ -164,11 +164,7 @@
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> Node* element = \
enclosingNodeOfType(firstPositionInNode(container), &isDeletableElement); \
</span><del>- if (!element)
- return 0;
-
- ASSERT(element->isHTMLElement());
- return toHTMLElement(element);
</del><ins>+ return element && element->isHTMLElement() ? \
toHTMLElement(element) : 0; </ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DeleteButtonController::respondToChangedSelection(const \
VisibleSelection& oldSelection) </span></span></pre></div>
<a id="brancheschromium696SourceWebCoreeditingEditingStylecpp"></a>
<div class="modfile"><h4>Modified: \
branches/chromium/696/Source/WebCore/editing/EditingStyle.cpp (82642 => 82643)</h4> \
<pre class="diff"><span> <span class="info">--- \
branches/chromium/696/Source/WebCore/editing/EditingStyle.cpp 2011-03-31 23:50:06 UTC \
(rev 82642)
+++ branches/chromium/696/Source/WebCore/editing/EditingStyle.cpp 2011-03-31 23:51:08 \
UTC (rev 82643) </span><span class="lines">@@ -377,15 +377,13 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> unicodeBidi = \
m_mutableStyle->getPropertyCSSValue(CSSPropertyUnicodeBidi); </span><del>- if \
(!unicodeBidi) </del><ins>+ if (!unicodeBidi || \
!unicodeBidi->isPrimitiveValue()) </ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- ASSERT(unicodeBidi->isPrimitiveValue());
</del><span class="cx"> int unicodeBidiValue = \
static_cast<CSSPrimitiveValue*>(unicodeBidi.get())->getIdent(); </span><span \
class="cx"> if (unicodeBidiValue == CSSValueEmbed) { </span><span class="cx"> \
RefPtr<CSSValue> direction = \
m_mutableStyle->getPropertyCSSValue(CSSPropertyDirection); </span><del>- \
ASSERT(!direction || direction->isPrimitiveValue());
- if (!direction)
</del><ins>+ if (!direction || !direction->isPrimitiveValue())
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> writingDirection = \
static_cast<CSSPrimitiveValue*>(direction.get())->getIdent() == CSSValueLtr \
? LeftToRightWritingDirection : RightToLeftWritingDirection; </span><span \
class="lines">@@ -702,13 +700,10 @@ </span><span class="cx"> \
m_mutableStyle->removeProperty(CSSPropertyBackgroundColor, ec); </span><span \
class="cx"> } </span><span class="cx">
</span><del>- if (unicodeBidi) {
- ASSERT(unicodeBidi->isPrimitiveValue());
</del><ins>+ if (unicodeBidi && unicodeBidi->isPrimitiveValue()) {
</ins><span class="cx"> \
m_mutableStyle->setProperty(CSSPropertyUnicodeBidi, \
static_cast<CSSPrimitiveValue*>(unicodeBidi.get())->getIdent()); \
</span><del>- if (direction) {
- ASSERT(direction->isPrimitiveValue());
</del><ins>+ if (direction && direction->isPrimitiveValue())
</ins><span class="cx"> \
m_mutableStyle->setProperty(CSSPropertyDirection, \
static_cast<CSSPrimitiveValue*>(direction.get())->getIdent()); </span><del>- \
} </del><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="brancheschromium696SourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: \
branches/chromium/696/Source/WebCore/editing/Editor.cpp (82642 => 82643)</h4> <pre \
class="diff"><span> <span class="info">--- \
branches/chromium/696/Source/WebCore/editing/Editor.cpp 2011-03-31 23:50:06 UTC (rev \
82642)
+++ branches/chromium/696/Source/WebCore/editing/Editor.cpp 2011-03-31 23:51:08 UTC \
(rev 82643) </span><span class="lines">@@ -653,10 +653,9 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSComputedStyleDeclaration> style \
= computedStyle(n); </span><span class="cx"> RefPtr<CSSValue> \
unicodeBidi = style->getPropertyCSSValue(CSSPropertyUnicodeBidi); </span><del>- \
if (!unicodeBidi) </del><ins>+ if (!unicodeBidi || \
!unicodeBidi->isPrimitiveValue()) </ins><span class="cx"> \
continue; </span><span class="cx">
</span><del>- ASSERT(unicodeBidi->isPrimitiveValue());
</del><span class="cx"> int unicodeBidiValue = \
static_cast<CSSPrimitiveValue*>(unicodeBidi.get())->getIdent(); </span><span \
class="cx"> if (unicodeBidiValue == CSSValueEmbed || unicodeBidiValue == \
CSSValueBidiOverride) </span><span class="cx"> return \
NaturalWritingDirection; </span><span class="lines">@@ -684,10 +683,9 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSComputedStyleDeclaration> style = \
computedStyle(node); </span><span class="cx"> RefPtr<CSSValue> \
unicodeBidi = style->getPropertyCSSValue(CSSPropertyUnicodeBidi); </span><del>- \
if (!unicodeBidi) </del><ins>+ if (!unicodeBidi || \
!unicodeBidi->isPrimitiveValue()) </ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- ASSERT(unicodeBidi->isPrimitiveValue());
</del><span class="cx"> int unicodeBidiValue = \
static_cast<CSSPrimitiveValue*>(unicodeBidi.get())->getIdent(); </span><span \
class="cx"> if (unicodeBidiValue == CSSValueNormal) </span><span class="cx"> \
continue; </span><span class="lines">@@ -697,10 +695,9 @@
</span><span class="cx">
</span><span class="cx"> ASSERT(unicodeBidiValue == CSSValueEmbed);
</span><span class="cx"> RefPtr<CSSValue> direction = \
style->getPropertyCSSValue(CSSPropertyDirection); </span><del>- if \
(!direction) </del><ins>+ if (!direction || !direction->isPrimitiveValue())
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- ASSERT(direction->isPrimitiveValue());
</del><span class="cx"> int directionValue = \
static_cast<CSSPrimitiveValue*>(direction.get())->getIdent(); </span><span \
class="cx"> if (directionValue != CSSValueLtr && directionValue != \
CSSValueRtl) </span><span class="cx"> continue;
</span></span></pre></div>
<a id="brancheschromium696SourceWebCoreeditingFormatBlockCommandcpp"></a>
<div class="modfile"><h4>Modified: \
branches/chromium/696/Source/WebCore/editing/FormatBlockCommand.cpp (82642 => \
82643)</h4> <pre class="diff"><span>
<span class="info">--- \
branches/chromium/696/Source/WebCore/editing/FormatBlockCommand.cpp 2011-03-31 \
23:50:06 UTC (rev 82642)
+++ branches/chromium/696/Source/WebCore/editing/FormatBlockCommand.cpp 2011-03-31 \
23:51:08 UTC (rev 82643) </span><span class="lines">@@ -112,8 +112,7 @@
</span><span class="cx"> if (!rootEditableElement || \
commonAncestor->contains(rootEditableElement)) </span><span class="cx"> \
return 0; </span><span class="cx">
</span><del>- ASSERT(commonAncestor->isElementNode());
- return static_cast<Element*>(commonAncestor);
</del><ins>+ return commonAncestor->isElementNode() ? toElement(commonAncestor) \
: 0; </ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool isElementForFormatBlock(const QualifiedName& \
tagName) </span></span></pre>
</div>
</div>
</body>
</html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic