Title: [127622] branches/chromium/1229
- Revision
- 127622
- Author
- cev...@google.com
- Date
- 2012-09-05 12:03:24 -0700 (Wed, 05 Sep 2012)
Log Message
Merge 125448
BUG=135173
Review URL: https://chromiumcodereview.appspot.com/10911108
Modified Paths
Added Paths
Diff
Modified: branches/chromium/1229/LayoutTests/fast/css-generated-content/close-quote-negative-depth-expected.html (127621 => 127622)
--- branches/chromium/1229/LayoutTests/fast/css-generated-content/close-quote-negative-depth-expected.html 2012-09-05 18:54:28 UTC (rev 127621)
+++ branches/chromium/1229/LayoutTests/fast/css-generated-content/close-quote-negative-depth-expected.html 2012-09-05 19:03:24 UTC (rev 127622)
@@ -1,5 +1,7 @@
<!DOCTYPE html>
-There should be no quotes when the depth of the quote is negative, but this is currently broken. See WKBug 92690.
+<p>There should be no quotes when the depth of the quote is negative, and the depth
+should restart from 0 next. Should see the same line printed twice.</p>
-<q></q>
+ACDABAB<br>
+ACDABAB
Modified: branches/chromium/1229/LayoutTests/fast/css-generated-content/close-quote-negative-depth.html (127621 => 127622)
--- branches/chromium/1229/LayoutTests/fast/css-generated-content/close-quote-negative-depth.html 2012-09-05 18:54:28 UTC (rev 127621)
+++ branches/chromium/1229/LayoutTests/fast/css-generated-content/close-quote-negative-depth.html 2012-09-05 19:03:24 UTC (rev 127622)
@@ -1,11 +1,14 @@
<!DOCTYPE html>
<style type="text/css">
+ * { quotes: "A" "B" "C" "D"; }
q:before {
- content: close-quote;
+ content: close-quote open-quote open-quote close-quote no-close-quote open-quote close-quote close-quote open-quote;
}
</style>
-There should be no quotes when the depth of the quote is negative, but this is currently broken. See WKBug 92690.
+<p>There should be no quotes when the depth of the quote is negative, and the depth
+should restart from 0 next. Should see the same line printed twice.</p>
+ACDABAB<br>
<q></q>
Copied: branches/chromium/1229/LayoutTests/fast/css-generated-content/nested-quote-more-than-pairs-expected.html (from rev 125448, trunk/LayoutTests/fast/css-generated-content/nested-quote-more-than-pairs-expected.html) (0 => 127622)
--- branches/chromium/1229/LayoutTests/fast/css-generated-content/nested-quote-more-than-pairs-expected.html (rev 0)
+++ branches/chromium/1229/LayoutTests/fast/css-generated-content/nested-quote-more-than-pairs-expected.html 2012-09-05 19:03:24 UTC (rev 127622)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+
+<p>
+ The last pair should be repeated when nested beyond the number of pairs.
+ You should see the below line printed twice.
+</p>
+
+ACCCDDDB<br>
+ACCCDDDB
Copied: branches/chromium/1229/LayoutTests/fast/css-generated-content/nested-quote-more-than-pairs.html (from rev 125448, trunk/LayoutTests/fast/css-generated-content/nested-quote-more-than-pairs.html) (0 => 127622)
--- branches/chromium/1229/LayoutTests/fast/css-generated-content/nested-quote-more-than-pairs.html (rev 0)
+++ branches/chromium/1229/LayoutTests/fast/css-generated-content/nested-quote-more-than-pairs.html 2012-09-05 19:03:24 UTC (rev 127622)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+
+<style>
+ q { quotes: "A" "B" "C" "D"; }
+</style>
+
+<p>
+ The last pair should be repeated when nested beyond the number of pairs.
+ You should see the below line printed twice.
+</p>
+
+ACCCDDDB<br>
+<q><q><q><q></q></q></q></q>
Modified: branches/chromium/1229/Source/WebCore/rendering/RenderQuote.cpp (127621 => 127622)
--- branches/chromium/1229/Source/WebCore/rendering/RenderQuote.cpp 2012-09-05 18:54:28 UTC (rev 127621)
+++ branches/chromium/1229/Source/WebCore/rendering/RenderQuote.cpp 2012-09-05 19:03:24 UTC (rev 127622)
@@ -77,8 +77,7 @@
case NO_CLOSE_QUOTE:
return StringImpl::empty();
case CLOSE_QUOTE:
- // FIXME: When m_depth is 0 we should return empty string.
- return quotesData()->getCloseQuote(std::max(m_depth - 1, 0)).impl();
+ return quotesData()->getCloseQuote(m_depth - 1).impl();
case OPEN_QUOTE:
return quotesData()->getOpenQuote(m_depth).impl();
}
Modified: branches/chromium/1229/Source/WebCore/rendering/style/QuotesData.cpp (127621 => 127622)
--- branches/chromium/1229/Source/WebCore/rendering/style/QuotesData.cpp 2012-09-05 18:54:28 UTC (rev 127621)
+++ branches/chromium/1229/Source/WebCore/rendering/style/QuotesData.cpp 2012-09-05 19:03:24 UTC (rev 127622)
@@ -47,7 +47,7 @@
const String QuotesData::getOpenQuote(int index) const
{
ASSERT(index >= 0);
- if (!m_quotePairs.size())
+ if (!m_quotePairs.size() || index < 0)
return emptyString();
if ((size_t)index >= m_quotePairs.size())
return m_quotePairs.last().first;
@@ -56,8 +56,8 @@
const String QuotesData::getCloseQuote(int index) const
{
- ASSERT(index >= 0);
- if (!m_quotePairs.size())
+ ASSERT(index >= -1);
+ if (!m_quotePairs.size() || index < 0)
return emptyString();
if ((size_t)index >= m_quotePairs.size())
return m_quotePairs.last().second;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes