Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: Source/WebCore/rendering/style/QuotesData.cpp

Issue 10911108: Merge 125448 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderQuote.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/style/QuotesData.cpp
===================================================================
--- Source/WebCore/rendering/style/QuotesData.cpp (revision 127621)
+++ Source/WebCore/rendering/style/QuotesData.cpp (working copy)
@@ -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;
« no previous file with comments | « Source/WebCore/rendering/RenderQuote.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698