Fix for bug 7586, eliminate QFontMetrics.
Reviewed by eric
* WebCore.xcodeproj/project.pbxproj:
* css/css_valueimpl.cpp:
(WebCore::CSSPrimitiveValueImpl::computeLengthFloat):
* ksvg2/svg/SVGLengthImpl.cpp:
(SVGLengthImpl::updateValue):
* kwq/KWQFontMetrics.h: Removed.
* kwq/KWQFontMetrics.mm: Removed.
* platform/Font.cpp:
(WebCore::m_wordSpacing):
(WebCore::Font::Font):
(WebCore::Font::operator=):
(WebCore::Font::~Font):
(WebCore::Font::update):
(WebCore::Font::width):
* platform/Font.h:
(WebCore::Font::operator==):
(WebCore::Font::width):
(WebCore::Font::height):
* platform/FontRenderer.h: Added.
(WebCore::FontRenderer::isFixedPitch):
* platform/GraphicsContext.h:
* platform/mac/FontMac.mm: Added.
(WebCore::m_renderer):
(WebCore::FontRenderer::getWebCoreFont):
(WebCore::FontRenderer::getRenderer):
(WebCore::FontRenderer::determinePitch):
(WebCore::FontRenderer::update):
(WebCore::Font::getWebCoreFont):
(WebCore::Font::ascent):
(WebCore::Font::descent):
(WebCore::Font::lineSpacing):
(WebCore::Font::xHeight):
(WebCore::Font::isFixedPitch):
(WebCore::Font::selectionRectForText):
(WebCore::Font::drawHighlightForText):
(WebCore::Font::drawText):
(WebCore::Font::floatWidth):
(WebCore::Font::checkSelectionPoint):
* platform/mac/GraphicsContextMac.mm:
* rendering/InlineTextBox.h:
* rendering/RenderBlock.cpp:
(WebCore::stripTrailingSpace):
* rendering/RenderText.cpp:
(WebCore::RenderText::trimmedMinMaxWidth):
* rendering/RenderText.h:
* rendering/RenderTextField.cpp:
(WebCore::RenderTextField::calcMinMaxWidth):
* rendering/bidi.cpp:
(khtml::RenderBlock::tabWidth):
(khtml::RenderBlock::checkLinesForTextOverflow):
* rendering/render_box.cpp:
(WebCore::RenderBox::caretRect):
* rendering/render_br.cpp:
(WebCore::RenderBR::lineHeight):
* rendering/render_flow.cpp:
(WebCore::RenderFlow::lineHeight):
(WebCore::RenderFlow::caretRect):
* rendering/render_image.cpp:
(WebCore::RenderImage::imageChanged):
(WebCore::RenderImage::paint):
* rendering/render_line.cpp:
(WebCore::InlineFlowBox::placeBoxesVertically):
* rendering/render_list.cpp:
(WebCore::toHebrew):
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::calcMinMaxWidth):
(WebCore::RenderListMarker::baselinePosition):
(WebCore::RenderListMarker::getRelativeMarkerRect):
* rendering/render_object.cpp:
(WebCore::RenderObject::getVerticalPosition):
(WebCore::RenderObject::lineHeight):
(WebCore::RenderObject::baselinePosition):
* rendering/render_object.h:
* rendering/render_style.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/rendering/bidi.cpp b/WebCore/rendering/bidi.cpp
index da2d66e..09017de 100644
--- a/WebCore/rendering/bidi.cpp
+++ b/WebCore/rendering/bidi.cpp
@@ -837,7 +837,7 @@
if (!m_tabWidth) {
QChar spaceChar(' ');
const Font& font = style()->font();
- int spaceWidth = font.width(&spaceChar, 1, 0, 0);
+ int spaceWidth = font.width(&spaceChar, 1);
m_tabWidth = spaceWidth * 8;
assert(m_tabWidth != 0);
}
@@ -2527,8 +2527,8 @@
static AtomicString ellipsisStr(ellipsis);
const Font& firstLineFont = firstLineStyle()->font();
const Font& font = style()->font();
- int firstLineEllipsisWidth = firstLineFont.width(&ellipsis, 1, 0, 0);
- int ellipsisWidth = (font == firstLineFont) ? firstLineEllipsisWidth : font.width(&ellipsis, 1, 0, 0);
+ int firstLineEllipsisWidth = firstLineFont.width(&ellipsis, 1);
+ int ellipsisWidth = (font == firstLineFont) ? firstLineEllipsisWidth : font.width(&ellipsis, 1);
// For LTR text truncation, we want to get the right edge of our padding box, and then we want to see
// if the right edge of a line box exceeds that. For RTL, we use the left edge of the padding box and