Reviewed by Geoff.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=9109
Remove bogus assertion in RenderBlock::tabWidth
Changed the uninitialized value of m_tabWidth to -1 and removed the
assertion that it cannot be 0.
* rendering/RenderBlock.cpp:
(WebCore:::RenderBlock::RenderBlock):
(WebCore::RenderBlock::setStyle):
* rendering/bidi.cpp:
(WebCore::RenderBlock::tabWidth):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/rendering/bidi.cpp b/WebCore/rendering/bidi.cpp
index 48ffd9d..0898a35 100644
--- a/WebCore/rendering/bidi.cpp
+++ b/WebCore/rendering/bidi.cpp
@@ -843,12 +843,11 @@
if (!isWhitespacePre)
return 0;
- if (!m_tabWidth) {
+ if (m_tabWidth == -1) {
const UChar spaceChar = ' ';
const Font& font = style()->font();
int spaceWidth = font.width(TextRun(&spaceChar, 1));
m_tabWidth = spaceWidth * 8;
- assert(m_tabWidth != 0);
}
return m_tabWidth;