<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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, #msg p { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul { overflow: auto; }
#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>
<title>[28298] trunk/WebCore</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/28298">28298</a></dd>
<dt>Author</dt> <dd>mitz@apple.com</dd>
<dt>Date</dt> <dd>2007-12-01 08:28:57 -0800 (Sat, 01 Dec 2007)</dd>
</dl>

<h3>Log Message</h3>
<pre>        Reviewed by Darin Adler.

        - fold FontStyle into TextRun

        * WebCore.xcodeproj/project.pbxproj:
        * platform/graphics/Font.cpp:
        (WebCore::WidthIterator::WidthIterator):
        (WebCore::WidthIterator::advance):
        (WebCore::Font::width):
        (WebCore::Font::drawSimpleText):
        (WebCore::Font::drawGlyphBuffer):
        (WebCore::Font::drawText):
        (WebCore::Font::floatWidth):
        (WebCore::Font::floatWidthForSimpleText):
        (WebCore::Font::selectionRectForText):
        (WebCore::Font::selectionRectForSimpleText):
        (WebCore::Font::offsetForPosition):
        (WebCore::Font::offsetForPositionForSimpleText):
        * platform/graphics/Font.h:
        (WebCore::TextRun::TextRun):
        (WebCore::TextRun::setText):
        (WebCore::TextRun::allowTabs):
        (WebCore::TextRun::xPos):
        (WebCore::TextRun::padding):
        (WebCore::TextRun::rtl):
        (WebCore::TextRun::ltr):
        (WebCore::TextRun::directionalOverride):
        (WebCore::TextRun::applyRunRounding):
        (WebCore::TextRun::applyWordRounding):
        (WebCore::TextRun::spacingDisabled):
        (WebCore::TextRun::disableSpacing):
        (WebCore::TextRun::disableRoundingHacks):
        (WebCore::TextRun::setRTL):
        (WebCore::TextRun::setDirectionalOverride):
        * platform/graphics/FontStyle.h: Removed.
        * platform/graphics/GraphicsContext.cpp:
        (WebCore::GraphicsContext::drawText):
        (WebCore::GraphicsContext::drawBidiText):
        (WebCore::GraphicsContext::drawHighlightForText):
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/StringTruncator.cpp:
        (WebCore::stringWidth):
        * platform/graphics/gtk/FontGtk.cpp:
        (WebCore::Font::drawComplexText):
        (WebCore::Font::floatWidthForComplexText):
        (WebCore::Font::offsetForPositionForComplexText):
        (WebCore::Font::selectionRectForComplexText):
        * platform/graphics/mac/FontMac.mm:
        (WebCore::ATSULayoutParameters::ATSULayoutParameters):
        (WebCore::addDirectionalOverride):
        (WebCore::overrideLayoutOperation):
        (WebCore::ATSULayoutParameters::initialize):
        (WebCore::Font::selectionRectForComplexText):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::floatWidthForComplexText):
        (WebCore::Font::offsetForPositionForComplexText):
        * platform/graphics/qt/FontQt.cpp:
        (WebCore::generateComponents):
        (WebCore::Font::drawText):
        (WebCore::Font::width):
        (WebCore::Font::offsetForPosition):
        (WebCore::cursorToX):
        (WebCore::Font::selectionRectForText):
        * platform/graphics/win/FontWin.cpp:
        (WebCore::Font::selectionRectForComplexText):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::floatWidthForComplexText):
        (WebCore::Font::offsetForPositionForComplexText):
        * platform/graphics/wx/FontWx.cpp:
        (WebCore::Font::selectionRectForComplexText):
        (WebCore::Font::drawComplexText):
        (WebCore::Font::floatWidthForComplexText):
        (WebCore::Font::offsetForPositionForComplexText):
        * platform/mac/WebCoreTextRenderer.mm:
        (WebCoreDrawTextAtPoint):
        (WebCoreTextFloatWidth):
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::paint):
        * platform/win/UniscribeController.cpp:
        (WebCore::UniscribeController::UniscribeController):
        (WebCore::UniscribeController::offsetForPosition):
        (WebCore::UniscribeController::advance):
        (WebCore::UniscribeController::itemizeShapeAndPlace):
        (WebCore::UniscribeController::resetControlAndState):
        (WebCore::UniscribeController::shapeAndPlaceItem):
        * platform/win/UniscribeController.h:
        * platform/win/WebCoreTextRenderer.cpp:
        (WebCore::doDrawTextAtPoint):
        * rendering/EllipsisBox.cpp:
        (WebCore::EllipsisBox::paint):
        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::selectionRect):
        (WebCore::InlineTextBox::paint):
        (WebCore::InlineTextBox::paintSelection):
        (WebCore::InlineTextBox::paintCompositionBackground):
        (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
        (WebCore::InlineTextBox::paintTextMatchMarker):
        (WebCore::InlineTextBox::offsetForPosition):
        (WebCore::InlineTextBox::positionForOffset):
        * rendering/RenderFileUploadControl.cpp:
        (WebCore::RenderFileUploadControl::paintObject):
        (WebCore::RenderFileUploadControl::calcPrefWidths):
        * rendering/RenderImage.cpp:
        * rendering/RenderListBox.cpp:
        (WebCore::RenderListBox::updateFromElement):
        (WebCore::RenderListBox::paintItemForeground):
        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::updateOptionsWidth):
        * rendering/RenderText.cpp:
        (WebCore::RenderText::widthFromCache):
        (WebCore::RenderText::calcPrefWidths):
        (WebCore::RenderText::width):
        * rendering/RenderText.h:
        (WebCore::RenderText::allowTabs):
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::calcPrefWidths):
        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::calculateGlyphWidth):
        (WebCore::SVGInlineTextBox::paintCharacters):
        (WebCore::SVGInlineTextBox::paintSelection):
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
        (WebCore::cummulatedWidthOfInlineBoxCharacterRange):
        (WebCore::svgTextRunForInlineTextBox):
        * rendering/SVGRootInlineBox.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreWebCorexcodeprojprojectpbxproj">trunk/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkWebCoreplatformgraphicsFontcpp">trunk/WebCore/platform/graphics/Font.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicsFonth">trunk/WebCore/platform/graphics/Font.h</a></li>
<li><a href="#trunkWebCoreplatformgraphicsGraphicsContextcpp">trunk/WebCore/platform/graphics/GraphicsContext.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicsGraphicsContexth">trunk/WebCore/platform/graphics/GraphicsContext.h</a></li>
<li><a href="#trunkWebCoreplatformgraphicsStringTruncatorcpp">trunk/WebCore/platform/graphics/StringTruncator.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicsgtkFontGtkcpp">trunk/WebCore/platform/graphics/gtk/FontGtk.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicsmacFontMacmm">trunk/WebCore/platform/graphics/mac/FontMac.mm</a></li>
<li><a href="#trunkWebCoreplatformgraphicsqtFontQtcpp">trunk/WebCore/platform/graphics/qt/FontQt.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicswinFontWincpp">trunk/WebCore/platform/graphics/win/FontWin.cpp</a></li>
<li><a href="#trunkWebCoreplatformgraphicswxFontWxcpp">trunk/WebCore/platform/graphics/wx/FontWx.cpp</a></li>
<li><a href="#trunkWebCoreplatformmacWebCoreTextRenderermm">trunk/WebCore/platform/mac/WebCoreTextRenderer.mm</a></li>
<li><a href="#trunkWebCoreplatformwinPopupMenuWincpp">trunk/WebCore/platform/win/PopupMenuWin.cpp</a></li>
<li><a href="#trunkWebCoreplatformwinUniscribeControllercpp">trunk/WebCore/platform/win/UniscribeController.cpp</a></li>
<li><a href="#trunkWebCoreplatformwinUniscribeControllerh">trunk/WebCore/platform/win/UniscribeController.h</a></li>
<li><a href="#trunkWebCoreplatformwinWebCoreTextRenderercpp">trunk/WebCore/platform/win/WebCoreTextRenderer.cpp</a></li>
<li><a href="#trunkWebCorerenderingEllipsisBoxcpp">trunk/WebCore/rendering/EllipsisBox.cpp</a></li>
<li><a href="#trunkWebCorerenderingInlineTextBoxcpp">trunk/WebCore/rendering/InlineTextBox.cpp</a></li>
<li><a href="#trunkWebCorerenderingRenderFileUploadControlcpp">trunk/WebCore/rendering/RenderFileUploadControl.cpp</a></li>
<li><a href="#trunkWebCorerenderingRenderImagecpp">trunk/WebCore/rendering/RenderImage.cpp</a></li>
<li><a href="#trunkWebCorerenderingRenderListBoxcpp">trunk/WebCore/rendering/RenderListBox.cpp</a></li>
<li><a href="#trunkWebCorerenderingRenderMenuListcpp">trunk/WebCore/rendering/RenderMenuList.cpp</a></li>
<li><a href="#trunkWebCorerenderingRenderTextcpp">trunk/WebCore/rendering/RenderText.cpp</a></li>
<li><a href="#trunkWebCorerenderingRenderTexth">trunk/WebCore/rendering/RenderText.h</a></li>
<li><a href="#trunkWebCorerenderingRenderTextControlcpp">trunk/WebCore/rendering/RenderTextControl.cpp</a></li>
<li><a href="#trunkWebCorerenderingSVGInlineTextBoxcpp">trunk/WebCore/rendering/SVGInlineTextBox.cpp</a></li>
<li><a href="#trunkWebCorerenderingSVGRootInlineBoxcpp">trunk/WebCore/rendering/SVGRootInlineBox.cpp</a></li>
<li><a href="#trunkWebCorerenderingSVGRootInlineBoxh">trunk/WebCore/rendering/SVGRootInlineBox.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkWebCoreplatformgraphicsFontStyleh">trunk/WebCore/platform/graphics/FontStyle.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/ChangeLog        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -1,3 +1,131 @@
</span><ins>+2007-12-01  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        Reviewed by Darin Adler.
+
+        - fold FontStyle into TextRun
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/graphics/Font.cpp:
+        (WebCore::WidthIterator::WidthIterator):
+        (WebCore::WidthIterator::advance):
+        (WebCore::Font::width):
+        (WebCore::Font::drawSimpleText):
+        (WebCore::Font::drawGlyphBuffer):
+        (WebCore::Font::drawText):
+        (WebCore::Font::floatWidth):
+        (WebCore::Font::floatWidthForSimpleText):
+        (WebCore::Font::selectionRectForText):
+        (WebCore::Font::selectionRectForSimpleText):
+        (WebCore::Font::offsetForPosition):
+        (WebCore::Font::offsetForPositionForSimpleText):
+        * platform/graphics/Font.h:
+        (WebCore::TextRun::TextRun):
+        (WebCore::TextRun::setText):
+        (WebCore::TextRun::allowTabs):
+        (WebCore::TextRun::xPos):
+        (WebCore::TextRun::padding):
+        (WebCore::TextRun::rtl):
+        (WebCore::TextRun::ltr):
+        (WebCore::TextRun::directionalOverride):
+        (WebCore::TextRun::applyRunRounding):
+        (WebCore::TextRun::applyWordRounding):
+        (WebCore::TextRun::spacingDisabled):
+        (WebCore::TextRun::disableSpacing):
+        (WebCore::TextRun::disableRoundingHacks):
+        (WebCore::TextRun::setRTL):
+        (WebCore::TextRun::setDirectionalOverride):
+        * platform/graphics/FontStyle.h: Removed.
+        * platform/graphics/GraphicsContext.cpp:
+        (WebCore::GraphicsContext::drawText):
+        (WebCore::GraphicsContext::drawBidiText):
+        (WebCore::GraphicsContext::drawHighlightForText):
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/StringTruncator.cpp:
+        (WebCore::stringWidth):
+        * platform/graphics/gtk/FontGtk.cpp:
+        (WebCore::Font::drawComplexText):
+        (WebCore::Font::floatWidthForComplexText):
+        (WebCore::Font::offsetForPositionForComplexText):
+        (WebCore::Font::selectionRectForComplexText):
+        * platform/graphics/mac/FontMac.mm:
+        (WebCore::ATSULayoutParameters::ATSULayoutParameters):
+        (WebCore::addDirectionalOverride):
+        (WebCore::overrideLayoutOperation):
+        (WebCore::ATSULayoutParameters::initialize):
+        (WebCore::Font::selectionRectForComplexText):
+        (WebCore::Font::drawComplexText):
+        (WebCore::Font::floatWidthForComplexText):
+        (WebCore::Font::offsetForPositionForComplexText):
+        * platform/graphics/qt/FontQt.cpp:
+        (WebCore::generateComponents):
+        (WebCore::Font::drawText):
+        (WebCore::Font::width):
+        (WebCore::Font::offsetForPosition):
+        (WebCore::cursorToX):
+        (WebCore::Font::selectionRectForText):
+        * platform/graphics/win/FontWin.cpp:
+        (WebCore::Font::selectionRectForComplexText):
+        (WebCore::Font::drawComplexText):
+        (WebCore::Font::floatWidthForComplexText):
+        (WebCore::Font::offsetForPositionForComplexText):
+        * platform/graphics/wx/FontWx.cpp:
+        (WebCore::Font::selectionRectForComplexText):
+        (WebCore::Font::drawComplexText):
+        (WebCore::Font::floatWidthForComplexText):
+        (WebCore::Font::offsetForPositionForComplexText):
+        * platform/mac/WebCoreTextRenderer.mm:
+        (WebCoreDrawTextAtPoint):
+        (WebCoreTextFloatWidth):
+        * platform/win/PopupMenuWin.cpp:
+        (WebCore::PopupMenu::paint):
+        * platform/win/UniscribeController.cpp:
+        (WebCore::UniscribeController::UniscribeController):
+        (WebCore::UniscribeController::offsetForPosition):
+        (WebCore::UniscribeController::advance):
+        (WebCore::UniscribeController::itemizeShapeAndPlace):
+        (WebCore::UniscribeController::resetControlAndState):
+        (WebCore::UniscribeController::shapeAndPlaceItem):
+        * platform/win/UniscribeController.h:
+        * platform/win/WebCoreTextRenderer.cpp:
+        (WebCore::doDrawTextAtPoint):
+        * rendering/EllipsisBox.cpp:
+        (WebCore::EllipsisBox::paint):
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::selectionRect):
+        (WebCore::InlineTextBox::paint):
+        (WebCore::InlineTextBox::paintSelection):
+        (WebCore::InlineTextBox::paintCompositionBackground):
+        (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
+        (WebCore::InlineTextBox::paintTextMatchMarker):
+        (WebCore::InlineTextBox::offsetForPosition):
+        (WebCore::InlineTextBox::positionForOffset):
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::paintObject):
+        (WebCore::RenderFileUploadControl::calcPrefWidths):
+        * rendering/RenderImage.cpp:
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::updateFromElement):
+        (WebCore::RenderListBox::paintItemForeground):
+        * rendering/RenderMenuList.cpp:
+        (WebCore::RenderMenuList::updateOptionsWidth):
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::widthFromCache):
+        (WebCore::RenderText::calcPrefWidths):
+        (WebCore::RenderText::width):
+        * rendering/RenderText.h:
+        (WebCore::RenderText::allowTabs):
+        * rendering/RenderTextControl.cpp:
+        (WebCore::RenderTextControl::calcPrefWidths):
+        * rendering/SVGInlineTextBox.cpp:
+        (WebCore::SVGInlineTextBox::calculateGlyphWidth):
+        (WebCore::SVGInlineTextBox::paintCharacters):
+        (WebCore::SVGInlineTextBox::paintSelection):
+        * rendering/SVGRootInlineBox.cpp:
+        (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
+        (WebCore::cummulatedWidthOfInlineBoxCharacterRange):
+        (WebCore::svgTextRunForInlineTextBox):
+        * rendering/SVGRootInlineBox.h:
+
</ins><span class="cx"> 2007-12-01  Adam Treat  &lt;treat@kde.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Simon.
</span></span></pre></div>
<a id="trunkWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.xcodeproj/project.pbxproj (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -2971,7 +2971,6 @@
</span><span class="cx">                 B24055650B5BE640002A28C0 /* DOMSVGElementInstanceInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = B24055630B5BE640002A28C0 /* DOMSVGElementInstanceInternal.h */; };
</span><span class="cx">                 B24055660B5BE640002A28C0 /* DOMSVGElementInstanceListInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = B24055640B5BE640002A28C0 /* DOMSVGElementInstanceListInternal.h */; };
</span><span class="cx">                 B25DFAAF0B2E2929000E6510 /* JSSVGMatrixCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25DFAAE0B2E2929000E6510 /* JSSVGMatrixCustom.cpp */; };
</span><del>-                B25E96BE0D00975100CFD296 /* FontStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = B25E96BD0D00975100CFD296 /* FontStyle.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 B26554EA0B80D74900A50EC3 /* RenderSVGTextPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B26554E80B80D74900A50EC3 /* RenderSVGTextPath.cpp */; };
</span><span class="cx">                 B26554EB0B80D74900A50EC3 /* RenderSVGTextPath.h in Headers */ = {isa = PBXBuildFile; fileRef = B26554E90B80D74900A50EC3 /* RenderSVGTextPath.h */; };
</span><span class="cx">                 B266CD4D0C3AEC6500EB08D2 /* JSSVGException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B266CD4B0C3AEC6500EB08D2 /* JSSVGException.cpp */; };
</span><span class="lines">@@ -6960,7 +6959,6 @@
</span><span class="cx">                 B24055630B5BE640002A28C0 /* DOMSVGElementInstanceInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGElementInstanceInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 B24055640B5BE640002A28C0 /* DOMSVGElementInstanceListInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGElementInstanceListInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 B25DFAAE0B2E2929000E6510 /* JSSVGMatrixCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGMatrixCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                B25E96BD0D00975100CFD296 /* FontStyle.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontStyle.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 B26554E80B80D74900A50EC3 /* RenderSVGTextPath.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGTextPath.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 B26554E90B80D74900A50EC3 /* RenderSVGTextPath.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderSVGTextPath.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 B266CD4B0C3AEC6500EB08D2 /* JSSVGException.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGException.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -11007,7 +11005,6 @@
</span><span class="cx">                 B2A015910AF6CD53006BCE0E /* graphics */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                B25E96BD0D00975100CFD296 /* FontStyle.h */,
</del><span class="cx">                                 B23540F00D00782E002382FA /* StringTruncator.cpp */,
</span><span class="cx">                                 B23540F10D00782E002382FA /* StringTruncator.h */,
</span><span class="cx">                                 B2C3DA4F0D006CD600EF6F26 /* Font.cpp */,
</span><span class="lines">@@ -13923,7 +13920,6 @@
</span><span class="cx">                                 B2C3DA6E0D006CD600EF6F26 /* GlyphPageTreeNode.h in Headers */,
</span><span class="cx">                                 B2C3DA700D006CD600EF6F26 /* GlyphWidthMap.h in Headers */,
</span><span class="cx">                                 B23540F30D00782E002382FA /* StringTruncator.h in Headers */,
</span><del>-                                B25E96BE0D00975100CFD296 /* FontStyle.h in Headers */,
</del><span class="cx">                                 B2AFFC7E0D00A5C10030074D /* FontCustomPlatformData.h in Headers */,
</span><span class="cx">                                 B2AFFC810D00A5C10030074D /* FontPlatformData.h in Headers */,
</span><span class="cx">                                 B2AFFC940D00A5DF0030074D /* ShapeArabic.h in Headers */,
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicsFontcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/Font.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/Font.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/graphics/Font.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include &quot;FontFallbackList.h&quot;
</span><span class="cx"> #include &quot;IntPoint.h&quot;
</span><span class="cx"> #include &quot;GlyphBuffer.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> #include &lt;wtf/unicode/Unicode.h&gt;
</span><span class="cx"> #include &lt;wtf/MathExtras.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -62,7 +61,7 @@
</span><span class="cx"> Font::CodePath Font::codePath = Auto;
</span><span class="cx"> 
</span><span class="cx"> struct WidthIterator {
</span><del>-    WidthIterator(const Font* font, const TextRun&amp; run, const FontStyle&amp; style);
</del><ins>+    WidthIterator(const Font* font, const TextRun&amp; run);
</ins><span class="cx"> 
</span><span class="cx">     void advance(int to, GlyphBuffer* glyphBuffer = 0);
</span><span class="cx">     bool advanceOneCharacter(float&amp; width, GlyphBuffer* glyphBuffer = 0);
</span><span class="lines">@@ -72,8 +71,6 @@
</span><span class="cx">     const TextRun&amp; m_run;
</span><span class="cx">     int m_end;
</span><span class="cx"> 
</span><del>-    const FontStyle&amp; m_style;
-    
</del><span class="cx">     unsigned m_currentCharacter;
</span><span class="cx">     float m_runWidthSoFar;
</span><span class="cx">     float m_padding;
</span><span class="lines">@@ -84,18 +81,17 @@
</span><span class="cx">     UChar32 normalizeVoicingMarks(int currentCharacter);
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-WidthIterator::WidthIterator(const Font* font, const TextRun&amp; run, const FontStyle&amp; style)
</del><ins>+WidthIterator::WidthIterator(const Font* font, const TextRun&amp; run)
</ins><span class="cx">     : m_font(font)
</span><span class="cx">     , m_run(run)
</span><span class="cx">     , m_end(run.length())
</span><del>-    , m_style(style)
</del><span class="cx">     , m_currentCharacter(0)
</span><span class="cx">     , m_runWidthSoFar(0)
</span><span class="cx">     , m_finalRoundingWidth(0)
</span><span class="cx"> {
</span><span class="cx">     // If the padding is non-zero, count the number of spaces in the run
</span><span class="cx">     // and divide that by the padding for per space addition.
</span><del>-    m_padding = m_style.padding();
</del><ins>+    m_padding = m_run.padding();
</ins><span class="cx">     if (!m_padding)
</span><span class="cx">         m_padPerSpace = 0;
</span><span class="cx">     else {
</span><span class="lines">@@ -107,7 +103,7 @@
</span><span class="cx">         if (numSpaces == 0)
</span><span class="cx">             m_padPerSpace = 0;
</span><span class="cx">         else
</span><del>-            m_padPerSpace = ceilf(m_style.padding() / numSpaces);
</del><ins>+            m_padPerSpace = ceilf(m_run.padding() / numSpaces);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -119,7 +115,7 @@
</span><span class="cx">     int currentCharacter = m_currentCharacter;
</span><span class="cx">     const UChar* cp = m_run.data(currentCharacter);
</span><span class="cx"> 
</span><del>-    bool rtl = m_style.rtl();
</del><ins>+    bool rtl = m_run.rtl();
</ins><span class="cx">     bool hasExtraSpacing = m_font-&gt;letterSpacing() || m_font-&gt;wordSpacing() || m_padding;
</span><span class="cx"> 
</span><span class="cx">     float runWidthSoFar = m_runWidthSoFar;
</span><span class="lines">@@ -163,20 +159,20 @@
</span><span class="cx"> 
</span><span class="cx">         // Now that we have a glyph and font data, get its width.
</span><span class="cx">         float width;
</span><del>-        if (c == '\t' &amp;&amp; m_style.allowTabs()) {
</del><ins>+        if (c == '\t' &amp;&amp; m_run.allowTabs()) {
</ins><span class="cx">             float tabWidth = m_font-&gt;tabWidth();
</span><del>-            width = tabWidth - fmodf(m_style.xPos() + runWidthSoFar, tabWidth);
</del><ins>+            width = tabWidth - fmodf(m_run.xPos() + runWidthSoFar, tabWidth);
</ins><span class="cx">         } else {
</span><span class="cx">             width = fontData-&gt;widthForGlyph(glyph);
</span><span class="cx">             // We special case spaces in two ways when applying word rounding.
</span><span class="cx">             // First, we round spaces to an adjusted width in all fonts.
</span><span class="cx">             // Second, in fixed-pitch fonts we ensure that all characters that
</span><span class="cx">             // match the width of the space character have the same width as the space character.
</span><del>-            if (width == fontData-&gt;m_spaceWidth &amp;&amp; (fontData-&gt;m_treatAsFixedPitch || glyph == fontData-&gt;m_spaceGlyph) &amp;&amp; m_style.applyWordRounding())
</del><ins>+            if (width == fontData-&gt;m_spaceWidth &amp;&amp; (fontData-&gt;m_treatAsFixedPitch || glyph == fontData-&gt;m_spaceGlyph) &amp;&amp; m_run.applyWordRounding())
</ins><span class="cx">                 width = fontData-&gt;m_adjustedSpaceWidth;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (hasExtraSpacing &amp;&amp; !m_style.spacingDisabled()) {
</del><ins>+        if (hasExtraSpacing &amp;&amp; !m_run.spacingDisabled()) {
</ins><span class="cx">             // Account for letter-spacing.
</span><span class="cx">             if (width &amp;&amp; m_font-&gt;letterSpacing())
</span><span class="cx">                 width += m_font-&gt;letterSpacing();
</span><span class="lines">@@ -215,13 +211,13 @@
</span><span class="cx"> 
</span><span class="cx">         // Force characters that are used to determine word boundaries for the rounding hack
</span><span class="cx">         // to be integer width, so following words will start on an integer boundary.
</span><del>-        if (m_style.applyWordRounding() &amp;&amp; Font::isRoundingHackCharacter(c))
</del><ins>+        if (m_run.applyWordRounding() &amp;&amp; Font::isRoundingHackCharacter(c))
</ins><span class="cx">             width = ceilf(width);
</span><span class="cx"> 
</span><span class="cx">         // Check to see if the next character is a &quot;rounding hack character&quot;, if so, adjust
</span><span class="cx">         // width so that the total run width will be on an integer boundary.
</span><del>-        if ((m_style.applyWordRounding() &amp;&amp; currentCharacter &lt; m_run.length() &amp;&amp; Font::isRoundingHackCharacter(*cp))
-                || (m_style.applyRunRounding() &amp;&amp; currentCharacter &gt;= m_end)) {
</del><ins>+        if ((m_run.applyWordRounding() &amp;&amp; currentCharacter &lt; m_run.length() &amp;&amp; Font::isRoundingHackCharacter(*cp))
+                || (m_run.applyRunRounding() &amp;&amp; currentCharacter &gt;= m_end)) {
</ins><span class="cx">             float totalWidth = runWidthSoFar + width;
</span><span class="cx">             width += ceilf(totalWidth) - totalWidth;
</span><span class="cx">         }
</span><span class="lines">@@ -510,14 +506,9 @@
</span><span class="cx"> 
</span><span class="cx"> int Font::width(const TextRun&amp; run) const
</span><span class="cx"> {
</span><del>-    return width(run, FontStyle());
</del><ins>+    return lroundf(floatWidth(run));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-int Font::width(const TextRun&amp; run, const FontStyle&amp; style) const
-{
-    return lroundf(floatWidth(run, style));
-}
-
</del><span class="cx"> int Font::ascent() const
</span><span class="cx"> {
</span><span class="cx">     return primaryFont()-&gt;ascent();
</span><span class="lines">@@ -618,13 +609,13 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawSimpleText(GraphicsContext* context, const TextRun&amp; run, const FontStyle&amp; style, const FloatPoint&amp; point, int from, int to) const
</del><ins>+void Font::drawSimpleText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     // This glyph buffer holds our glyphs+advances+font data for each glyph.
</span><span class="cx">     GlyphBuffer glyphBuffer;
</span><span class="cx"> 
</span><span class="cx">     float startX = point.x();
</span><del>-    WidthIterator it(this, run, style);
</del><ins>+    WidthIterator it(this, run);
</ins><span class="cx">     it.advance(from);
</span><span class="cx">     float beforeWidth = it.m_runWidthSoFar;
</span><span class="cx">     it.advance(to, &amp;glyphBuffer);
</span><span class="lines">@@ -635,7 +626,7 @@
</span><span class="cx">     
</span><span class="cx">     float afterWidth = it.m_runWidthSoFar;
</span><span class="cx"> 
</span><del>-    if (style.rtl()) {
</del><ins>+    if (run.rtl()) {
</ins><span class="cx">         float finalRoundingWidth = it.m_finalRoundingWidth;
</span><span class="cx">         it.advance(run.length());
</span><span class="cx">         startX += finalRoundingWidth + it.m_runWidthSoFar - afterWidth;
</span><span class="lines">@@ -643,18 +634,18 @@
</span><span class="cx">         startX += beforeWidth;
</span><span class="cx"> 
</span><span class="cx">     // Swap the order of the glyphs if right-to-left.
</span><del>-    if (style.rtl())
</del><ins>+    if (run.rtl())
</ins><span class="cx">         for (int i = 0, end = glyphBuffer.size() - 1; i &lt; glyphBuffer.size() / 2; ++i, --end)
</span><span class="cx">             glyphBuffer.swap(i, end);
</span><span class="cx"> 
</span><span class="cx">     // Calculate the starting point of the glyphs to be displayed by adding
</span><span class="cx">     // all the advances up to the first glyph.
</span><span class="cx">     FloatPoint startPoint(startX, point.y());
</span><del>-    drawGlyphBuffer(context, glyphBuffer, run, style, startPoint);
</del><ins>+    drawGlyphBuffer(context, glyphBuffer, run, startPoint);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Font::drawGlyphBuffer(GraphicsContext* context, const GlyphBuffer&amp; glyphBuffer, 
</span><del>-                           const TextRun&amp; run, const FontStyle&amp; style, const FloatPoint&amp; point) const
</del><ins>+                           const TextRun&amp; run, const FloatPoint&amp; point) const
</ins><span class="cx"> {   
</span><span class="cx">     // Draw each contiguous run of glyphs that use the same font data.
</span><span class="cx">     const FontData* fontData = glyphBuffer.fontDataAt(0);
</span><span class="lines">@@ -679,7 +670,7 @@
</span><span class="cx">     drawGlyphs(context, fontData, glyphBuffer, lastFrom, nextGlyph - lastFrom, startPoint);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawText(GraphicsContext* context, const TextRun&amp; run, const FontStyle&amp; style, const FloatPoint&amp; point, int from, int to) const
</del><ins>+void Font::drawText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     // Don't draw anything while we are using custom fonts that are in the process of loading.
</span><span class="cx">     if (m_fontList &amp;&amp; m_fontList-&gt;loadingCustomFonts())
</span><span class="lines">@@ -687,43 +678,43 @@
</span><span class="cx">     
</span><span class="cx">     to = (to == -1 ? run.length() : to);
</span><span class="cx">     if (canUseGlyphCache(run))
</span><del>-        drawSimpleText(context, run, style, point, from, to);
</del><ins>+        drawSimpleText(context, run, point, from, to);
</ins><span class="cx">     else
</span><del>-        drawComplexText(context, run, style, point, from, to);
</del><ins>+        drawComplexText(context, run, point, from, to);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::floatWidth(const TextRun&amp; run, const FontStyle&amp; style) const
</del><ins>+float Font::floatWidth(const TextRun&amp; run) const
</ins><span class="cx"> {
</span><span class="cx">     if (canUseGlyphCache(run))
</span><del>-        return floatWidthForSimpleText(run, style, 0);
-    return floatWidthForComplexText(run, style);
</del><ins>+        return floatWidthForSimpleText(run, 0);
+    return floatWidthForComplexText(run);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::floatWidthForSimpleText(const TextRun&amp; run, const FontStyle&amp; style, GlyphBuffer* glyphBuffer) const
</del><ins>+float Font::floatWidthForSimpleText(const TextRun&amp; run, GlyphBuffer* glyphBuffer) const
</ins><span class="cx"> {
</span><del>-    WidthIterator it(this, run, style);
</del><ins>+    WidthIterator it(this, run);
</ins><span class="cx">     it.advance(run.length(), glyphBuffer);
</span><span class="cx">     return it.m_runWidthSoFar;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FloatRect Font::selectionRectForText(const TextRun&amp; run, const FontStyle&amp; style, const IntPoint&amp; point, int h, int from, int to) const
</del><ins>+FloatRect Font::selectionRectForText(const TextRun&amp; run, const IntPoint&amp; point, int h, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     to = (to == -1 ? run.length() : to);
</span><span class="cx">     if (canUseGlyphCache(run))
</span><del>-        return selectionRectForSimpleText(run, style, point, h, from, to);
-    return selectionRectForComplexText(run, style, point, h, from, to);
</del><ins>+        return selectionRectForSimpleText(run, point, h, from, to);
+    return selectionRectForComplexText(run, point, h, from, to);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-FloatRect Font::selectionRectForSimpleText(const TextRun&amp; run, const FontStyle&amp; style, const IntPoint&amp; point, int h, int from, int to) const
</del><ins>+FloatRect Font::selectionRectForSimpleText(const TextRun&amp; run, const IntPoint&amp; point, int h, int from, int to) const
</ins><span class="cx"> {
</span><del>-    WidthIterator it(this, run, style);
</del><ins>+    WidthIterator it(this, run);
</ins><span class="cx">     it.advance(from);
</span><span class="cx">     float beforeWidth = it.m_runWidthSoFar;
</span><span class="cx">     it.advance(to);
</span><span class="cx">     float afterWidth = it.m_runWidthSoFar;
</span><span class="cx"> 
</span><span class="cx">     // Using roundf() rather than ceilf() for the right edge as a compromise to ensure correct caret positioning
</span><del>-    if (style.rtl()) {
</del><ins>+    if (run.rtl()) {
</ins><span class="cx">         it.advance(run.length());
</span><span class="cx">         float totalWidth = it.m_runWidthSoFar;
</span><span class="cx">         return FloatRect(point.x() + floorf(totalWidth - afterWidth), point.y(), roundf(totalWidth - beforeWidth) - floorf(totalWidth - afterWidth), h);
</span><span class="lines">@@ -732,22 +723,22 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int Font::offsetForPosition(const TextRun&amp; run, const FontStyle&amp; style, int x, bool includePartialGlyphs) const
</del><ins>+int Font::offsetForPosition(const TextRun&amp; run, int x, bool includePartialGlyphs) const
</ins><span class="cx"> {
</span><span class="cx">     if (canUseGlyphCache(run))
</span><del>-        return offsetForPositionForSimpleText(run, style, x, includePartialGlyphs);
-    return offsetForPositionForComplexText(run, style, x, includePartialGlyphs);
</del><ins>+        return offsetForPositionForSimpleText(run, x, includePartialGlyphs);
+    return offsetForPositionForComplexText(run, x, includePartialGlyphs);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-int Font::offsetForPositionForSimpleText(const TextRun&amp; run, const FontStyle&amp; style, int x, bool includePartialGlyphs) const
</del><ins>+int Font::offsetForPositionForSimpleText(const TextRun&amp; run, int x, bool includePartialGlyphs) const
</ins><span class="cx"> {
</span><span class="cx">     float delta = (float)x;
</span><span class="cx"> 
</span><del>-    WidthIterator it(this, run, style);
</del><ins>+    WidthIterator it(this, run);
</ins><span class="cx">     GlyphBuffer localGlyphBuffer;
</span><span class="cx">     unsigned offset;
</span><del>-    if (style.rtl()) {
-        delta -= floatWidthForSimpleText(run, style, 0);
</del><ins>+    if (run.rtl()) {
+        delta -= floatWidthForSimpleText(run, 0);
</ins><span class="cx">         while (1) {
</span><span class="cx">             offset = it.m_currentCharacter;
</span><span class="cx">             float w;
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicsFonth"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/Font.h (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/Font.h        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/graphics/Font.h        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -46,29 +46,76 @@
</span><span class="cx"> class GlyphPageTreeNode;
</span><span class="cx"> class GraphicsContext;
</span><span class="cx"> class IntPoint;
</span><del>-class FontStyle;
</del><span class="cx"> 
</span><span class="cx"> struct GlyphData;
</span><span class="cx"> 
</span><span class="cx"> class TextRun {
</span><span class="cx"> public:
</span><del>-    TextRun(const UChar* c, int len)
-    :m_characters(c), m_len(len)
-    {}
</del><ins>+    TextRun(const UChar* c, int len, bool allowTabs = false, int xpos = 0, int padding = 0, bool rtl = false, bool directionalOverride = false,
+              bool applyRunRounding = true, bool applyWordRounding = true)
+        : m_characters(c)
+        , m_len(len)
+        , m_allowTabs(allowTabs)
+        , m_xpos(xpos)
+        , m_padding(padding)
+        , m_rtl(rtl)
+        , m_directionalOverride(directionalOverride)
+        , m_applyRunRounding(applyRunRounding)
+        , m_applyWordRounding(applyWordRounding)
+        , m_disableSpacing(false)
+    {
+    }
</ins><span class="cx"> 
</span><del>-    TextRun(const String&amp; s)
-    :m_characters(s.characters()), m_len(s.length())
-    {}
</del><ins>+    TextRun(const String&amp; s, bool allowTabs = false, int xpos = 0, int padding = 0, bool rtl = false, bool directionalOverride = false,
+              bool applyRunRounding = true, bool applyWordRounding = true)
+        : m_characters(s.characters())
+        , m_len(s.length())
+        , m_allowTabs(allowTabs)
+        , m_xpos(xpos)
+        , m_padding(padding)
+        , m_rtl(rtl)
+        , m_directionalOverride(directionalOverride)
+        , m_applyRunRounding(applyRunRounding)
+        , m_applyWordRounding(applyWordRounding)
+        , m_disableSpacing(false)
+    {
+    }
</ins><span class="cx"> 
</span><span class="cx">     const UChar operator[](int i) const { return m_characters[i]; }
</span><span class="cx">     const UChar* data(int i) const { return &amp;m_characters[i]; }
</span><span class="cx"> 
</span><span class="cx">     const UChar* characters() const { return m_characters; }
</span><span class="cx">     int length() const { return m_len; }
</span><del>-   
</del><ins>+
+    void setText(const UChar* c, int len) { m_characters = c; m_len = len; }
+
+    bool allowTabs() const { return m_allowTabs; }
+    int xPos() const { return m_xpos; }
+    int padding() const { return m_padding; }
+    bool rtl() const { return m_rtl; }
+    bool ltr() const { return !m_rtl; }
+    bool directionalOverride() const { return m_directionalOverride; }
+    bool applyRunRounding() const { return m_applyRunRounding; }
+    bool applyWordRounding() const { return m_applyWordRounding; }
+    bool spacingDisabled() const { return m_disableSpacing; }
+
+    void disableSpacing() { m_disableSpacing = true; }
+    void disableRoundingHacks() { m_applyRunRounding = m_applyWordRounding = false; }
+    void setRTL(bool b) { m_rtl = b; }
+    void setDirectionalOverride(bool override) { m_directionalOverride = override; }
+    
</ins><span class="cx"> private:
</span><span class="cx">     const UChar* m_characters;
</span><span class="cx">     int m_len;
</span><ins>+
+    bool m_allowTabs;
+    int m_xpos;
+    int m_padding;
+    bool m_rtl;
+    bool m_directionalOverride;
+    bool m_applyRunRounding;
+    bool m_applyWordRounding;
+    bool m_disableSpacing;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class Font {
</span><span class="lines">@@ -95,15 +142,13 @@
</span><span class="cx">     
</span><span class="cx">     void update(PassRefPtr&lt;FontSelector&gt;) const;
</span><span class="cx"> 
</span><del>-    void drawText(GraphicsContext*, const TextRun&amp;, const FontStyle&amp;, const FloatPoint&amp;, int from = 0, int to = -1) const;
</del><ins>+    void drawText(GraphicsContext*, const TextRun&amp;, const FloatPoint&amp;, int from = 0, int to = -1) const;
</ins><span class="cx"> 
</span><del>-    int width(const TextRun&amp;, const FontStyle&amp;) const;
</del><span class="cx">     int width(const TextRun&amp;) const;
</span><del>-    float floatWidth(const TextRun&amp;, const FontStyle&amp;) const;
</del><span class="cx">     float floatWidth(const TextRun&amp;) const;
</span><span class="cx">     
</span><del>-    int offsetForPosition(const TextRun&amp;, const FontStyle&amp;, int position, bool includePartialGlyphs) const;
-    FloatRect selectionRectForText(const TextRun&amp;, const FontStyle&amp;, const IntPoint&amp;, int h, int from = 0, int to = -1) const;
</del><ins>+    int offsetForPosition(const TextRun&amp;, int position, bool includePartialGlyphs) const;
+    FloatRect selectionRectForText(const TextRun&amp;, const IntPoint&amp;, int h, int from = 0, int to = -1) const;
</ins><span class="cx"> 
</span><span class="cx">     bool isSmallCaps() const { return m_fontDescription.smallCaps(); }
</span><span class="cx"> 
</span><span class="lines">@@ -150,16 +195,16 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     bool canUseGlyphCache(const TextRun&amp;) const;
</span><del>-    void drawSimpleText(GraphicsContext*, const TextRun&amp;, const FontStyle&amp;, const FloatPoint&amp;, int from, int to) const;
</del><ins>+    void drawSimpleText(GraphicsContext*, const TextRun&amp;, const FloatPoint&amp;, int from, int to) const;
</ins><span class="cx">     void drawGlyphs(GraphicsContext*, const FontData*, const GlyphBuffer&amp;, int from, int to, const FloatPoint&amp;) const;
</span><del>-    void drawGlyphBuffer(GraphicsContext*, const GlyphBuffer&amp;, const TextRun&amp;, const FontStyle&amp;, const FloatPoint&amp;) const;
-    void drawComplexText(GraphicsContext*, const TextRun&amp;, const FontStyle&amp;, const FloatPoint&amp;, int from, int to) const;
-    float floatWidthForSimpleText(const TextRun&amp;, const FontStyle&amp;, GlyphBuffer*) const;
-    float floatWidthForComplexText(const TextRun&amp;, const FontStyle&amp;) const;
-    int offsetForPositionForSimpleText(const TextRun&amp;, const FontStyle&amp;, int position, bool includePartialGlyphs) const;
-    int offsetForPositionForComplexText(const TextRun&amp;, const FontStyle&amp;, int position, bool includePartialGlyphs) const;
-    FloatRect selectionRectForSimpleText(const TextRun&amp;, const FontStyle&amp;, const IntPoint&amp;, int h, int from, int to) const;
-    FloatRect selectionRectForComplexText(const TextRun&amp;, const FontStyle&amp;, const IntPoint&amp;, int h, int from, int to) const;
</del><ins>+    void drawGlyphBuffer(GraphicsContext*, const GlyphBuffer&amp;, const TextRun&amp;, const FloatPoint&amp;) const;
+    void drawComplexText(GraphicsContext*, const TextRun&amp;, const FloatPoint&amp;, int from, int to) const;
+    float floatWidthForSimpleText(const TextRun&amp;, GlyphBuffer*) const;
+    float floatWidthForComplexText(const TextRun&amp;) const;
+    int offsetForPositionForSimpleText(const TextRun&amp;, int position, bool includePartialGlyphs) const;
+    int offsetForPositionForComplexText(const TextRun&amp;, int position, bool includePartialGlyphs) const;
+    FloatRect selectionRectForSimpleText(const TextRun&amp;, const IntPoint&amp;, int h, int from, int to) const;
+    FloatRect selectionRectForComplexText(const TextRun&amp;, const IntPoint&amp;, int h, int from, int to) const;
</ins><span class="cx"> #endif
</span><span class="cx">     friend struct WidthIterator;
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicsFontStyleh"></a>
<div class="delfile"><h4>Deleted: trunk/WebCore/platform/graphics/FontStyle.h (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/FontStyle.h        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/graphics/FontStyle.h        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -1,69 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006 Apple Computer, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef FontStyle_h
-#define FontStyle_h
-
-namespace WebCore {
-
-class FontStyle {
-public:
-    FontStyle(bool allowTabs = false, int xpos = 0, int padding = 0, bool rtl = false, bool directionalOverride = false,
-              bool applyRunRounding = true, bool applyWordRounding = true)
-        : m_allowTabs(allowTabs)
-        , m_xpos(xpos)
-        , m_padding(padding)
-        , m_rtl(rtl)
-        , m_directionalOverride(directionalOverride)
-        , m_applyRunRounding(applyRunRounding)
-        , m_applyWordRounding(applyWordRounding)
-        , m_disableSpacing(false)
-    {
-    }
-
-    bool allowTabs() const { return m_allowTabs; }
-    int xPos() const { return m_xpos; }
-    int padding() const { return m_padding; }
-    bool rtl() const { return m_rtl; }
-    bool ltr() const { return !m_rtl; }
-    bool directionalOverride() const { return m_directionalOverride; }
-    bool applyRunRounding() const { return m_applyRunRounding; }
-    bool applyWordRounding() const { return m_applyWordRounding; }
-    bool spacingDisabled() const { return m_disableSpacing; }
-
-    void disableSpacing() { m_disableSpacing = true; }
-    void disableRoundingHacks() { m_applyRunRounding = m_applyWordRounding = false; }
-    void setRTL(bool b) { m_rtl = b; }
-    void setDirectionalOverride(bool override) { m_directionalOverride = override; }
-    
-private:
-    bool m_allowTabs;
-    int m_xpos;
-    int m_padding;
-    bool m_rtl;
-    bool m_directionalOverride;
-    bool m_applyRunRounding;
-    bool m_applyWordRounding;
-    bool m_disableSpacing;
-};
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkWebCoreplatformgraphicsGraphicsContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/GraphicsContext.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/GraphicsContext.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/graphics/GraphicsContext.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;BidiResolver.h&quot;
</span><span class="cx"> #include &quot;Font.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> 
</span><span class="cx"> using namespace std;
</span><span class="cx"> 
</span><span class="lines">@@ -243,26 +242,21 @@
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContext::drawText(const TextRun&amp; run, const IntPoint&amp; point, int from, int to)
</span><span class="cx"> {
</span><del>-    drawText(run, point, FontStyle(), from, to);
-}
-
-void GraphicsContext::drawText(const TextRun&amp; run, const IntPoint&amp; point, const FontStyle&amp; style, int from, int to)
-{
</del><span class="cx">     if (paintingDisabled())
</span><span class="cx">         return;
</span><span class="cx">     
</span><del>-    font().drawText(this, run, style, point, from, to);
</del><ins>+    font().drawText(this, run, point, from, to);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContext::drawBidiText(const TextRun&amp; run, const IntPoint&amp; point, const FontStyle&amp; style)
</del><ins>+void GraphicsContext::drawBidiText(const TextRun&amp; run, const IntPoint&amp; point)
</ins><span class="cx"> {
</span><span class="cx">     if (paintingDisabled())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     BidiResolver&lt;TextRunIterator, BidiCharacterRun&gt; bidiResolver;
</span><del>-    WTF::Unicode::Direction paragraphDirection = style.ltr() ? WTF::Unicode::LeftToRight : WTF::Unicode::RightToLeft;
</del><ins>+    WTF::Unicode::Direction paragraphDirection = run.ltr() ? WTF::Unicode::LeftToRight : WTF::Unicode::RightToLeft;
</ins><span class="cx"> 
</span><del>-    bidiResolver.setStatus(BidiStatus(paragraphDirection, paragraphDirection, paragraphDirection, new BidiContext(style.ltr() ? 0 : 1, paragraphDirection, style.directionalOverride())));
</del><ins>+    bidiResolver.setStatus(BidiStatus(paragraphDirection, paragraphDirection, paragraphDirection, new BidiContext(run.ltr() ? 0 : 1, paragraphDirection, run.directionalOverride())));
</ins><span class="cx"> 
</span><span class="cx">     bidiResolver.createBidiRunsForLine(TextRunIterator(&amp;run, 0), TextRunIterator(&amp;run, run.length()));
</span><span class="cx"> 
</span><span class="lines">@@ -272,29 +266,29 @@
</span><span class="cx">     FloatPoint currPoint = point;
</span><span class="cx">     BidiCharacterRun* bidiRun = bidiResolver.firstRun();
</span><span class="cx">     while (bidiRun) {
</span><del>-        FontStyle subrunStyle(style);
-        subrunStyle.setRTL(bidiRun-&gt;level() % 2);
-        subrunStyle.setDirectionalOverride(bidiRun-&gt;dirOverride(false));
</del><span class="cx"> 
</span><del>-        TextRun subrun(run.data(bidiRun-&gt;start()), bidiRun-&gt;stop() - bidiRun-&gt;start());
</del><ins>+        TextRun subrun = run;
+        subrun.setText(run.data(bidiRun-&gt;start()), bidiRun-&gt;stop() - bidiRun-&gt;start());
+        subrun.setRTL(bidiRun-&gt;level() % 2);
+        subrun.setDirectionalOverride(bidiRun-&gt;dirOverride(false));
</ins><span class="cx"> 
</span><del>-        font().drawText(this, subrun, subrunStyle, currPoint);
</del><ins>+        font().drawText(this, subrun, currPoint);
</ins><span class="cx"> 
</span><span class="cx">         bidiRun = bidiRun-&gt;next();
</span><span class="cx">         // FIXME: Have Font::drawText return the width of what it drew so that we don't have to re-measure here.
</span><span class="cx">         if (bidiRun)
</span><del>-            currPoint.move(font().floatWidth(subrun, subrunStyle), 0.f);
</del><ins>+            currPoint.move(font().floatWidth(subrun), 0.f);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bidiResolver.deleteRuns();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContext::drawHighlightForText(const TextRun&amp; run, const IntPoint&amp; point, int h, const FontStyle&amp; style, const Color&amp; backgroundColor, int from, int to)
</del><ins>+void GraphicsContext::drawHighlightForText(const TextRun&amp; run, const IntPoint&amp; point, int h, const Color&amp; backgroundColor, int from, int to)
</ins><span class="cx"> {
</span><span class="cx">     if (paintingDisabled())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    fillRect(font().selectionRectForText(run, style, point, h, from, to), backgroundColor);
</del><ins>+    fillRect(font().selectionRectForText(run, point, h, from, to), backgroundColor);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContext::initFocusRing(int width, int offset)
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicsGraphicsContexth"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/GraphicsContext.h (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/GraphicsContext.h        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/graphics/GraphicsContext.h        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -86,7 +86,6 @@
</span><span class="cx">     class KURL;
</span><span class="cx">     class Path;
</span><span class="cx">     class TextRun;
</span><del>-    class FontStyle;
</del><span class="cx"> 
</span><span class="cx">     // These bits can be ORed together for a total of 8 possible text drawing modes.
</span><span class="cx">     const int cTextInvisible = 0;
</span><span class="lines">@@ -173,9 +172,8 @@
</span><span class="cx">         void setTextDrawingMode(int);
</span><span class="cx"> 
</span><span class="cx">         void drawText(const TextRun&amp;, const IntPoint&amp;, int from = 0, int to = -1);
</span><del>-        void drawText(const TextRun&amp;, const IntPoint&amp;, const FontStyle&amp;, int from = 0, int to = -1);
-        void drawBidiText(const TextRun&amp;, const IntPoint&amp;, const FontStyle&amp;);
-        void drawHighlightForText(const TextRun&amp;, const IntPoint&amp;, int h, const FontStyle&amp;, const Color&amp; backgroundColor, int from = 0, int to = -1);
</del><ins>+        void drawBidiText(const TextRun&amp;, const IntPoint&amp;);
+        void drawHighlightForText(const TextRun&amp;, const IntPoint&amp;, int h, const Color&amp; backgroundColor, int from = 0, int to = -1);
</ins><span class="cx"> 
</span><span class="cx">         FloatRect roundToDevicePixels(const FloatRect&amp;);
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicsStringTruncatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/StringTruncator.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/StringTruncator.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/graphics/StringTruncator.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #include &quot;Font.h&quot;
</span><span class="cx"> #include &quot;FontPlatformData.h&quot;
</span><span class="cx"> #include &quot;TextBreakIterator.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> #include &lt;wtf/Assertions.h&gt;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -96,10 +95,9 @@
</span><span class="cx"> static float stringWidth(const Font&amp; renderer, const UChar* characters, unsigned length, bool disableRoundingHacks)
</span><span class="cx"> {
</span><span class="cx">     TextRun run(characters, length);
</span><del>-    FontStyle style;
</del><span class="cx">     if (disableRoundingHacks)
</span><del>-        style.disableRoundingHacks();
-    return renderer.floatWidth(run, style);
</del><ins>+        run.disableRoundingHacks();
+    return renderer.floatWidth(run);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static String truncateString(const String&amp; string, float maxWidth, const Font&amp; font, TruncationFunction truncateToBuffer, bool disableRoundingHacks)
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicsgtkFontGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/gtk/FontGtk.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/gtk/FontGtk.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/graphics/gtk/FontGtk.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -61,24 +61,24 @@
</span><span class="cx">     cairo_show_glyphs(context, glyphs, numGlyphs);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawComplexText(GraphicsContext*, const TextRun&amp;, const FontStyle&amp;, const FloatPoint&amp;, int from, int to) const
</del><ins>+void Font::drawComplexText(GraphicsContext*, const TextRun&amp;, const FloatPoint&amp;, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::floatWidthForComplexText(const TextRun&amp;, const FontStyle&amp;) const
</del><ins>+float Font::floatWidthForComplexText(const TextRun&amp;) const
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx">     return 0.0f;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int Font::offsetForPositionForComplexText(const TextRun&amp;, const FontStyle&amp;, int, bool) const
</del><ins>+int Font::offsetForPositionForComplexText(const TextRun&amp;, int, bool) const
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FloatRect Font::selectionRectForComplexText(const TextRun&amp;, const FontStyle&amp;, const IntPoint&amp;, int, int, int) const
</del><ins>+FloatRect Font::selectionRectForComplexText(const TextRun&amp;, const IntPoint&amp;, int, int, int) const
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx">     return FloatRect();
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicsmacFontMacmm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/mac/FontMac.mm (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/mac/FontMac.mm        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/graphics/mac/FontMac.mm        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -34,7 +34,6 @@
</span><span class="cx"> #import &quot;GraphicsContext.h&quot;
</span><span class="cx"> #import &quot;IntRect.h&quot;
</span><span class="cx"> #import &quot;Logging.h&quot;
</span><del>-#import &quot;FontStyle.h&quot;
</del><span class="cx"> #import &quot;WebCoreSystemInterface.h&quot;
</span><span class="cx"> #import &quot;WebCoreTextRenderer.h&quot;
</span><span class="cx"> #import &quot;ShapeArabic.h&quot;
</span><span class="lines">@@ -57,9 +56,8 @@
</span><span class="cx"> 
</span><span class="cx"> struct ATSULayoutParameters
</span><span class="cx"> {
</span><del>-    ATSULayoutParameters(const TextRun&amp; run, const FontStyle&amp; style)
</del><ins>+    ATSULayoutParameters(const TextRun&amp; run)
</ins><span class="cx">         : m_run(run)
</span><del>-        , m_style(style)
</del><span class="cx">         , m_font(0)
</span><span class="cx">         , m_fonts(0)
</span><span class="cx">         , m_charBuffer(0)
</span><span class="lines">@@ -71,7 +69,6 @@
</span><span class="cx">     void initialize(const Font*, const GraphicsContext* = 0);
</span><span class="cx"> 
</span><span class="cx">     const TextRun&amp; m_run;
</span><del>-    const FontStyle&amp; m_style;
</del><span class="cx">     
</span><span class="cx">     const Font* m_font;
</span><span class="cx">     
</span><span class="lines">@@ -92,7 +89,9 @@
</span><span class="cx">     memcpy(&amp;charactersWithOverride[1], run.data(0), sizeof(UChar) * run.length());
</span><span class="cx">     charactersWithOverride[run.length() + 1] = popDirectionalFormatting;
</span><span class="cx"> 
</span><del>-    return TextRun(charactersWithOverride, run.length() + 2);
</del><ins>+    TextRun result = run;
+    result.setText(charactersWithOverride, run.length() + 2);
+    return result;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void initializeATSUStyle(const FontData* fontData)
</span><span class="lines">@@ -156,7 +155,7 @@
</span><span class="cx">     ItemCount count;
</span><span class="cx">     ATSLayoutRecord *layoutRecords;
</span><span class="cx"> 
</span><del>-    if (params-&gt;m_style.applyWordRounding()) {
</del><ins>+    if (params-&gt;m_run.applyWordRounding()) {
</ins><span class="cx">         status = ATSUDirectGetLayoutDataArrayPtrFromLineRef(iLineRef, kATSUDirectDataLayoutRecordATSLayoutRecordCurrent, true, (void **)&amp;layoutRecords, &amp;count);
</span><span class="cx">         if (status != noErr) {
</span><span class="cx">             *oCallbackStatus = kATSULayoutOperationCallbackStatusContinue;
</span><span class="lines">@@ -176,8 +175,8 @@
</span><span class="cx">         bool syntheticBoldPass = params-&gt;m_syntheticBoldPass;
</span><span class="cx">         Fixed syntheticBoldOffset = 0;
</span><span class="cx">         ATSGlyphRef spaceGlyph = 0;
</span><del>-        bool hasExtraSpacing = params-&gt;m_font-&gt;letterSpacing() || params-&gt;m_font-&gt;wordSpacing() | params-&gt;m_style.padding();
-        float padding = params-&gt;m_style.padding();
</del><ins>+        bool hasExtraSpacing = params-&gt;m_font-&gt;letterSpacing() || params-&gt;m_font-&gt;wordSpacing() | params-&gt;m_run.padding();
+        float padding = params-&gt;m_run.padding();
</ins><span class="cx">         // In the CoreGraphics code path, the rounding hack is applied in logical order.
</span><span class="cx">         // Here it is applied in visual left-to-right order, which may be better.
</span><span class="cx">         ItemCount lastRoundingChar = 0;
</span><span class="lines">@@ -213,7 +212,7 @@
</span><span class="cx">                 if (width &amp;&amp; params-&gt;m_font-&gt;letterSpacing())
</span><span class="cx">                     width +=params-&gt;m_font-&gt;letterSpacing();
</span><span class="cx">                 if (Font::treatAsSpace(nextCh)) {
</span><del>-                    if (params-&gt;m_style.padding()) {
</del><ins>+                    if (params-&gt;m_run.padding()) {
</ins><span class="cx">                         if (padding &lt; params-&gt;m_padPerSpace) {
</span><span class="cx">                             width += padding;
</span><span class="cx">                             padding = 0;
</span><span class="lines">@@ -236,8 +235,8 @@
</span><span class="cx">             if (Font::isRoundingHackCharacter(ch))
</span><span class="cx">                 width = ceilf(width);
</span><span class="cx">             lastAdjustedPos = lastAdjustedPos + width;
</span><del>-            if (Font::isRoundingHackCharacter(nextCh) &amp;&amp; (!isLastChar || params-&gt;m_style.applyRunRounding())){
-                if (params-&gt;m_style.ltr())
</del><ins>+            if (Font::isRoundingHackCharacter(nextCh) &amp;&amp; (!isLastChar || params-&gt;m_run.applyRunRounding())){
+                if (params-&gt;m_run.ltr())
</ins><span class="cx">                     lastAdjustedPos = ceilf(lastAdjustedPos);
</span><span class="cx">                 else {
</span><span class="cx">                     float roundingWidth = ceilf(lastAdjustedPos) - lastAdjustedPos;
</span><span class="lines">@@ -352,14 +351,14 @@
</span><span class="cx">     CGContextRef cgContext = graphicsContext ? graphicsContext-&gt;platformContext() : (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
</span><span class="cx">     
</span><span class="cx">     ATSLineLayoutOptions lineLayoutOptions = kATSLineKeepSpacesOutOfMargin | kATSLineHasNoHangers;
</span><del>-    Boolean rtl = m_style.rtl();
</del><ins>+    Boolean rtl = m_run.rtl();
</ins><span class="cx">     overrideSpecifier.operationSelector = kATSULayoutOperationPostLayoutAdjustment;
</span><span class="cx">     overrideSpecifier.overrideUPP = overrideLayoutOperation;
</span><span class="cx">     ATSUAttributeTag tags[] = { kATSUCGContextTag, kATSULineLayoutOptionsTag, kATSULineDirectionTag, kATSULayoutOperationOverrideTag };
</span><span class="cx">     ByteCount sizes[] = { sizeof(CGContextRef), sizeof(ATSLineLayoutOptions), sizeof(Boolean), sizeof(ATSULayoutOperationOverrideSpecifier) };
</span><span class="cx">     ATSUAttributeValuePtr values[] = { &amp;cgContext, &amp;lineLayoutOptions, &amp;rtl, &amp;overrideSpecifier };
</span><span class="cx">     
</span><del>-    status = ATSUSetLayoutControls(layout, (m_style.applyWordRounding() ? 4 : 3), tags, sizes, values);
</del><ins>+    status = ATSUSetLayoutControls(layout, (m_run.applyWordRounding() ? 4 : 3), tags, sizes, values);
</ins><span class="cx">     if (status != noErr)
</span><span class="cx">         LOG_ERROR(&quot;ATSUSetLayoutControls failed(%d)&quot;, status);
</span><span class="cx"> 
</span><span class="lines">@@ -416,7 +415,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 shapeArabic(m_run.characters(), m_charBuffer, runLength, i);
</span><span class="cx">             }
</span><del>-            if (m_style.rtl() &amp;&amp; !r-&gt;m_ATSUMirrors) {
</del><ins>+            if (m_run.rtl() &amp;&amp; !r-&gt;m_ATSUMirrors) {
</ins><span class="cx">                 UChar mirroredChar = u_charMirror(m_run[i]);
</span><span class="cx">                 if (mirroredChar != m_run[i]) {
</span><span class="cx">                     if (!m_charBuffer) {
</span><span class="lines">@@ -455,7 +454,7 @@
</span><span class="cx">         }
</span><span class="cx">         substituteOffset += substituteLength;
</span><span class="cx">     }
</span><del>-    if (m_style.padding()) {
</del><ins>+    if (m_run.padding()) {
</ins><span class="cx">         float numSpaces = 0;
</span><span class="cx">         unsigned k;
</span><span class="cx">         for (k = 0; k &lt; runLength; k++)
</span><span class="lines">@@ -465,7 +464,7 @@
</span><span class="cx">         if (numSpaces == 0)
</span><span class="cx">             m_padPerSpace = 0;
</span><span class="cx">         else
</span><del>-            m_padPerSpace = ceilf(m_style.padding() / numSpaces);
</del><ins>+            m_padPerSpace = ceilf(m_run.padding() / numSpaces);
</ins><span class="cx">     } else
</span><span class="cx">         m_padPerSpace = 0;
</span><span class="cx"> }
</span><span class="lines">@@ -477,15 +476,15 @@
</span><span class="cx">     delete []params-&gt;m_fonts;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FloatRect Font::selectionRectForComplexText(const TextRun&amp; run, const FontStyle&amp; style, const IntPoint&amp; point, int h, int from, int to) const
</del><ins>+FloatRect Font::selectionRectForComplexText(const TextRun&amp; run, const IntPoint&amp; point, int h, int from, int to) const
</ins><span class="cx"> {        
</span><del>-    TextRun adjustedRun = style.directionalOverride() ? addDirectionalOverride(run, style.rtl()) : run;
-    if (style.directionalOverride()) {
</del><ins>+    TextRun adjustedRun = run.directionalOverride() ? addDirectionalOverride(run, run.rtl()) : run;
+    if (run.directionalOverride()) {
</ins><span class="cx">         from++;
</span><span class="cx">         to++;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    ATSULayoutParameters params(adjustedRun, style);
</del><ins>+    ATSULayoutParameters params(adjustedRun);
</ins><span class="cx">     params.initialize(this);
</span><span class="cx"> 
</span><span class="cx">     ATSTrapezoid firstGlyphBounds;
</span><span class="lines">@@ -503,22 +502,22 @@
</span><span class="cx">     
</span><span class="cx">     FloatRect rect(point.x() + floorf(beforeWidth), point.y(), roundf(afterWidth) - floorf(beforeWidth), h);
</span><span class="cx"> 
</span><del>-    if (style.directionalOverride())
</del><ins>+    if (run.directionalOverride())
</ins><span class="cx">         delete []adjustedRun.characters();
</span><span class="cx"> 
</span><span class="cx">     return rect;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawComplexText(GraphicsContext* graphicsContext, const TextRun&amp; run, const FontStyle&amp; style, const FloatPoint&amp; point, int from, int to) const
</del><ins>+void Font::drawComplexText(GraphicsContext* graphicsContext, const TextRun&amp; run, const FloatPoint&amp; point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     OSStatus status;
</span><span class="cx">     
</span><span class="cx">     int drawPortionLength = to - from;
</span><del>-    TextRun adjustedRun = style.directionalOverride() ? addDirectionalOverride(run, style.rtl()) : run;
-    if (style.directionalOverride())
</del><ins>+    TextRun adjustedRun = run.directionalOverride() ? addDirectionalOverride(run, run.rtl()) : run;
+    if (run.directionalOverride())
</ins><span class="cx">         from++;
</span><span class="cx"> 
</span><del>-    ATSULayoutParameters params(TextRun(adjustedRun.characters(), adjustedRun.length()), style);
</del><ins>+    ATSULayoutParameters params(TextRun(adjustedRun.characters(), adjustedRun.length()));
</ins><span class="cx">     params.initialize(this, graphicsContext);
</span><span class="cx">     
</span><span class="cx">     // ATSUI can't draw beyond -32768 to +32767 so we translate the CTM and tell ATSUI to draw at (0, 0).
</span><span class="lines">@@ -540,16 +539,16 @@
</span><span class="cx"> 
</span><span class="cx">     disposeATSULayoutParameters(&amp;params);
</span><span class="cx">     
</span><del>-    if (style.directionalOverride())
</del><ins>+    if (run.directionalOverride())
</ins><span class="cx">         delete []adjustedRun.characters();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::floatWidthForComplexText(const TextRun&amp; run, const FontStyle&amp; style) const
</del><ins>+float Font::floatWidthForComplexText(const TextRun&amp; run) const
</ins><span class="cx"> {
</span><span class="cx">     if (run.length() == 0)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    ATSULayoutParameters params(run, style);
</del><ins>+    ATSULayoutParameters params(run);
</ins><span class="cx">     params.initialize(this);
</span><span class="cx">     
</span><span class="cx">     OSStatus status;
</span><span class="lines">@@ -568,11 +567,11 @@
</span><span class="cx">            MIN(FixedToFloat(firstGlyphBounds.upperLeft.x), FixedToFloat(firstGlyphBounds.lowerLeft.x));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int Font::offsetForPositionForComplexText(const TextRun&amp; run, const FontStyle&amp; style, int x, bool includePartialGlyphs) const
</del><ins>+int Font::offsetForPositionForComplexText(const TextRun&amp; run, int x, bool includePartialGlyphs) const
</ins><span class="cx"> {
</span><del>-    TextRun adjustedRun = style.directionalOverride() ? addDirectionalOverride(run, style.rtl()) : run;
</del><ins>+    TextRun adjustedRun = run.directionalOverride() ? addDirectionalOverride(run, run.rtl()) : run;
</ins><span class="cx">     
</span><del>-    ATSULayoutParameters params(adjustedRun, style);
</del><ins>+    ATSULayoutParameters params(adjustedRun);
</ins><span class="cx">     params.initialize(this);
</span><span class="cx"> 
</span><span class="cx">     UniCharArrayOffset primaryOffset = 0;
</span><span class="lines">@@ -585,7 +584,7 @@
</span><span class="cx">     unsigned offset;
</span><span class="cx">     if (status == noErr) {
</span><span class="cx">         offset = (unsigned)primaryOffset;
</span><del>-        if (style.directionalOverride() &amp;&amp; offset &gt; 0)
</del><ins>+        if (run.directionalOverride() &amp;&amp; offset &gt; 0)
</ins><span class="cx">             offset--;
</span><span class="cx">     } else
</span><span class="cx">         // Failed to find offset!  Return 0 offset.
</span><span class="lines">@@ -593,7 +592,7 @@
</span><span class="cx"> 
</span><span class="cx">     disposeATSULayoutParameters(&amp;params);
</span><span class="cx">     
</span><del>-    if (style.directionalOverride())
</del><ins>+    if (run.directionalOverride())
</ins><span class="cx">         delete []adjustedRun.characters();
</span><span class="cx"> 
</span><span class="cx">     return offset;
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicsqtFontQtcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/qt/FontQt.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/qt/FontQt.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/graphics/qt/FontQt.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -23,7 +23,6 @@
</span><span class="cx"> #include &quot;Font.h&quot;
</span><span class="cx"> #include &quot;FontDescription.h&quot;
</span><span class="cx"> #include &quot;FontSelector.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> 
</span><span class="cx"> #include &quot;GraphicsContext.h&quot;
</span><span class="cx"> #include &lt;QTextLayout&gt;
</span><span class="lines">@@ -157,13 +156,13 @@
</span><span class="cx">     // don't think we need this
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static int generateComponents(Vector&lt;TextRunComponent, 1024&gt;* components, const Font &amp;font, const TextRun &amp;run, const FontStyle &amp;style)
</del><ins>+static int generateComponents(Vector&lt;TextRunComponent, 1024&gt;* components, const Font &amp;font, const TextRun &amp;run)
</ins><span class="cx"> {
</span><span class="cx"> //     qDebug() &lt;&lt; &quot;generateComponents&quot; &lt;&lt; QString((const QChar *)run.characters(), run.length());
</span><span class="cx">     int letterSpacing = font.letterSpacing();
</span><span class="cx">     int wordSpacing = font.wordSpacing();
</span><span class="cx">     bool smallCaps = font.fontDescription().smallCaps();
</span><del>-    int padding = style.padding();
</del><ins>+    int padding = run.padding();
</ins><span class="cx">     int numSpaces = 0;
</span><span class="cx">     if (padding) {
</span><span class="cx">         for (int i = 0; i &lt; run.length(); i++)
</span><span class="lines">@@ -183,7 +182,7 @@
</span><span class="cx">                 padding -= add;
</span><span class="cx">                 --numSpaces;
</span><span class="cx">             }
</span><del>-            components-&gt;append(TextRunComponent(1, style.rtl(), &amp;font.font(), offset));
</del><ins>+            components-&gt;append(TextRunComponent(1, run.rtl(), &amp;font.font(), offset));
</ins><span class="cx">             offset += add + letterSpacing + components-&gt;last().width;
</span><span class="cx">             start = 1;
</span><span class="cx"> //         qDebug() &lt;&lt; &quot;space at 0&quot; &lt;&lt; offset;
</span><span class="lines">@@ -201,7 +200,7 @@
</span><span class="cx"> //                 qDebug() &lt;&lt; &quot;    treatAsSpace:&quot; &lt;&lt; i &lt;&lt; start;
</span><span class="cx">                 if (i - start &gt; 0) {
</span><span class="cx">                     components-&gt;append(TextRunComponent(run.characters() + start, i - start,
</span><del>-                                                        style.rtl(), 
</del><ins>+                                                        run.rtl(), 
</ins><span class="cx">                                                         f, offset, f == &amp;font.scFont()));
</span><span class="cx">                     offset += components-&gt;last().width + letterSpacing;
</span><span class="cx"> //                     qDebug() &lt;&lt; &quot;   appending(1) &quot; &lt;&lt; components-&gt;last().string &lt;&lt; components-&gt;last().width;
</span><span class="lines">@@ -211,7 +210,7 @@
</span><span class="cx">                     padding -= add;
</span><span class="cx">                     --numSpaces;
</span><span class="cx">                 }
</span><del>-                components-&gt;append(TextRunComponent(1, style.rtl(), &amp;font.font(), offset));
</del><ins>+                components-&gt;append(TextRunComponent(1, run.rtl(), &amp;font.font(), offset));
</ins><span class="cx">                 offset += wordSpacing + add + components-&gt;last().width + letterSpacing;
</span><span class="cx">                 start = i + 1;
</span><span class="cx">                 continue;
</span><span class="lines">@@ -228,7 +227,7 @@
</span><span class="cx">             }
</span><span class="cx">             if (i - start &gt; 0) {
</span><span class="cx">                 components-&gt;append(TextRunComponent(run.characters() + start, i - start,
</span><del>-                                                    style.rtl(), 
</del><ins>+                                                    run.rtl(), 
</ins><span class="cx">                                                     f, offset, f == &amp;font.scFont()));
</span><span class="cx">                 offset += components-&gt;last().width + letterSpacing;
</span><span class="cx"> //                 qDebug() &lt;&lt; &quot;   appending(2) &quot; &lt;&lt; components-&gt;last().string &lt;&lt; components-&gt;last().width;
</span><span class="lines">@@ -239,7 +238,7 @@
</span><span class="cx">         }
</span><span class="cx">         if (run.length() - start &gt; 0) {
</span><span class="cx">             components-&gt;append(TextRunComponent(run.characters() + start, run.length() - start,
</span><del>-                                                style.rtl(), 
</del><ins>+                                                run.rtl(), 
</ins><span class="cx">                                                 f, offset, f == &amp;font.scFont()));
</span><span class="cx">             offset += components-&gt;last().width;
</span><span class="cx"> //             qDebug() &lt;&lt; &quot;   appending(3) &quot; &lt;&lt; components-&gt;last().string &lt;&lt; components-&gt;last().width;
</span><span class="lines">@@ -251,7 +250,7 @@
</span><span class="cx">             if (Font::treatAsSpace(run[i])) {
</span><span class="cx">                 if (i - start &gt; 0) {
</span><span class="cx">                     components-&gt;append(TextRunComponent(run.characters() + start, i - start,
</span><del>-                                                        style.rtl(), 
</del><ins>+                                                        run.rtl(), 
</ins><span class="cx">                                                         f, offset));
</span><span class="cx">                     offset += components-&gt;last().width;
</span><span class="cx">                 }
</span><span class="lines">@@ -261,7 +260,7 @@
</span><span class="cx">                     padding -= add;
</span><span class="cx">                     --numSpaces;
</span><span class="cx">                 }
</span><del>-                components-&gt;append(TextRunComponent(1, style.rtl(), &amp;font.font(), offset));
</del><ins>+                components-&gt;append(TextRunComponent(1, run.rtl(), &amp;font.font(), offset));
</ins><span class="cx">                 offset += add + components-&gt;last().width;
</span><span class="cx">                 if (i)
</span><span class="cx">                     offset += wordSpacing;
</span><span class="lines">@@ -270,7 +269,7 @@
</span><span class="cx">         }
</span><span class="cx">         if (run.length() - start &gt; 0) {
</span><span class="cx">             components-&gt;append(TextRunComponent(run.characters() + start, run.length() - start,
</span><del>-                                                style.rtl(), 
</del><ins>+                                                run.rtl(), 
</ins><span class="cx">                                                 f, offset));
</span><span class="cx">             offset += components-&gt;last().width;
</span><span class="cx">         }
</span><span class="lines">@@ -278,7 +277,7 @@
</span><span class="cx">     return offset;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawText(GraphicsContext* ctx, const TextRun&amp; run, const FontStyle&amp; style, const FloatPoint&amp; point, int from, int to) const
</del><ins>+void Font::drawText(GraphicsContext* ctx, const TextRun&amp; run, const FloatPoint&amp; point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     if (to &lt; 0)
</span><span class="cx">         to = run.length();
</span><span class="lines">@@ -287,10 +286,10 @@
</span><span class="cx">     p-&gt;setPen(QColor(color));
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;TextRunComponent, 1024&gt; components;
</span><del>-    int w = generateComponents(&amp;components, *this, run, style);
</del><ins>+    int w = generateComponents(&amp;components, *this, run);
</ins><span class="cx"> 
</span><span class="cx">     if (from &gt; 0 || to &lt; run.length()) {
</span><del>-        FloatRect clip = selectionRectForText(run, style,
</del><ins>+        FloatRect clip = selectionRectForText(run,
</ins><span class="cx">                                               IntPoint(qRound(point.x()), qRound(point.y())),
</span><span class="cx">                                               QFontMetrics(m_font).height(), from, to);
</span><span class="cx">         QRectF rect(clip.x(), clip.y() - ascent(), clip.width(), clip.height());
</span><span class="lines">@@ -298,7 +297,7 @@
</span><span class="cx">         p-&gt;setClipRect(rect.toRect());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (style.rtl()) {
</del><ins>+    if (run.rtl()) {
</ins><span class="cx">         for (int i = 0; i &lt; components.size(); ++i) {
</span><span class="cx">             if (!components.at(i).isSpace()) {
</span><span class="cx">                 p-&gt;setFont(*components.at(i).font);
</span><span class="lines">@@ -319,37 +318,27 @@
</span><span class="cx">         p-&gt;restore();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int Font::width(const TextRun&amp; run, const FontStyle&amp; style) const
</del><ins>+int Font::width(const TextRun&amp; run) const
</ins><span class="cx"> {
</span><span class="cx">     Vector&lt;TextRunComponent, 1024&gt; components;
</span><del>-    int w = generateComponents(&amp;components, *this, run, style);
</del><ins>+    int w = generateComponents(&amp;components, *this, run);
</ins><span class="cx"> 
</span><span class="cx"> //     qDebug() &lt;&lt; &quot;     width=&quot; &lt;&lt; w;
</span><span class="cx">     return w;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int Font::width(const TextRun&amp; run) const
-{
-    return width(run, FontStyle());
-}
-
-float Font::floatWidth(const TextRun&amp; run, const FontStyle&amp; style) const
-{
-    return width(run, style);
-}
-
</del><span class="cx"> float Font::floatWidth(const TextRun&amp; run) const
</span><span class="cx"> {
</span><span class="cx">     return width(run);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int Font::offsetForPosition(const TextRun&amp; run, const FontStyle&amp; style, int position, bool includePartialGlyphs) const
</del><ins>+int Font::offsetForPosition(const TextRun&amp; run, int position, bool includePartialGlyphs) const
</ins><span class="cx"> {
</span><span class="cx">     Vector&lt;TextRunComponent, 1024&gt; components;
</span><del>-    int w = generateComponents(&amp;components, *this, run, style);
</del><ins>+    int w = generateComponents(&amp;components, *this, run);
</ins><span class="cx"> 
</span><span class="cx">     int offset = 0;
</span><del>-    if (style.rtl()) {
</del><ins>+    if (run.rtl()) {
</ins><span class="cx">         for (int i = 0; i &lt; components.size(); ++i) {
</span><span class="cx">             int xe = w - components.at(i).offset;
</span><span class="cx">             int xs = xe - components.at(i).width;
</span><span class="lines">@@ -401,8 +390,7 @@
</span><span class="cx">     return run.length();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static float cursorToX(const Vector&lt;TextRunComponent, 1024&gt;&amp; components, int width,
-                     const FontStyle&amp; style, int cursor)
</del><ins>+static float cursorToX(const Vector&lt;TextRunComponent, 1024&gt;&amp; components, int width, bool rtl, int cursor)
</ins><span class="cx"> {
</span><span class="cx">     int start = 0;
</span><span class="cx">     for (int i = 0; i &lt; components.size(); ++i) {
</span><span class="lines">@@ -411,7 +399,7 @@
</span><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="cx">         int xs = components.at(i).offset;
</span><del>-        if (style.rtl())
</del><ins>+        if (rtl)
</ins><span class="cx">             xs = width - xs - components.at(i).width;
</span><span class="cx">         QTextLayout layout(components.at(i).string, *components.at(i).font);
</span><span class="cx">         layout.beginLayout();
</span><span class="lines">@@ -427,17 +415,17 @@
</span><span class="cx">     return width;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FloatRect Font::selectionRectForText(const TextRun&amp; run, const FontStyle&amp; style, const IntPoint&amp; pt,
</del><ins>+FloatRect Font::selectionRectForText(const TextRun&amp; run, const IntPoint&amp; pt,
</ins><span class="cx">                                      int h, int from, int to) const
</span><span class="cx"> {
</span><span class="cx">     Vector&lt;TextRunComponent, 1024&gt; components;
</span><del>-    int w = generateComponents(&amp;components, *this, run, style);
</del><ins>+    int w = generateComponents(&amp;components, *this, run);
</ins><span class="cx"> 
</span><span class="cx">     if (from == 0 &amp;&amp; to == run.length())
</span><span class="cx">         return FloatRect(pt.x(), pt.y(), w, h);
</span><span class="cx"> 
</span><del>-    float x1 = cursorToX(components, w, style, from);
-    float x2 = cursorToX(components, w, style, to);
</del><ins>+    float x1 = cursorToX(components, w, run.rtl(), from);
+    float x2 = cursorToX(components, w, run.rtl(), to);
</ins><span class="cx">     if (x2 &lt; x1)
</span><span class="cx">         qSwap(x1, x2);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicswinFontWincpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/win/FontWin.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/win/FontWin.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/graphics/win/FontWin.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include &quot;GraphicsContext.h&quot;
</span><span class="cx"> #include &quot;IntRect.h&quot;
</span><span class="cx"> #include &quot;NotImplemented.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> #include &quot;UniscribeController.h&quot;
</span><span class="cx"> #include &lt;ApplicationServices/ApplicationServices.h&gt;
</span><span class="cx"> #include &lt;WebKitSystemInterface/WebKitSystemInterface.h&gt;
</span><span class="lines">@@ -95,17 +94,17 @@
</span><span class="cx">     wkRestoreFontSmoothingStyle(cgContext, oldFontSmoothingStyle);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FloatRect Font::selectionRectForComplexText(const TextRun&amp; run, const FontStyle&amp; style, const IntPoint&amp; point, int h,
</del><ins>+FloatRect Font::selectionRectForComplexText(const TextRun&amp; run, const IntPoint&amp; point, int h,
</ins><span class="cx">                                             int from, int to) const
</span><span class="cx"> {
</span><del>-    UniscribeController it(this, run, style);
</del><ins>+    UniscribeController it(this, run);
</ins><span class="cx">     it.advance(from);
</span><span class="cx">     float beforeWidth = it.runWidthSoFar();
</span><span class="cx">     it.advance(to);
</span><span class="cx">     float afterWidth = it.runWidthSoFar();
</span><span class="cx"> 
</span><span class="cx">     // Using roundf() rather than ceilf() for the right edge as a compromise to ensure correct caret positioning
</span><del>-    if (style.rtl()) {
</del><ins>+    if (run.rtl()) {
</ins><span class="cx">         it.advance(run.length());
</span><span class="cx">         float totalWidth = it.runWidthSoFar();
</span><span class="cx">         return FloatRect(point.x() + floorf(totalWidth - afterWidth), point.y(), roundf(totalWidth - beforeWidth) - floorf(totalWidth - afterWidth), h);
</span><span class="lines">@@ -114,14 +113,14 @@
</span><span class="cx">     return FloatRect(point.x() + floorf(beforeWidth), point.y(), roundf(afterWidth) - floorf(beforeWidth), h);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawComplexText(GraphicsContext* context, const TextRun&amp; run, const FontStyle&amp; style, const FloatPoint&amp; point,
</del><ins>+void Font::drawComplexText(GraphicsContext* context, const TextRun&amp; run, const FloatPoint&amp; point,
</ins><span class="cx">                            int from, int to) const
</span><span class="cx"> {
</span><span class="cx">     // This glyph buffer holds our glyphs + advances + font data for each glyph.
</span><span class="cx">     GlyphBuffer glyphBuffer;
</span><span class="cx"> 
</span><span class="cx">     float startX = point.x();
</span><del>-    UniscribeController controller(this, run, style);
</del><ins>+    UniscribeController controller(this, run);
</ins><span class="cx">     controller.advance(from);
</span><span class="cx">     float beforeWidth = controller.runWidthSoFar();
</span><span class="cx">     controller.advance(to, &amp;glyphBuffer);
</span><span class="lines">@@ -132,7 +131,7 @@
</span><span class="cx">     
</span><span class="cx">     float afterWidth = controller.runWidthSoFar();
</span><span class="cx"> 
</span><del>-    if (style.rtl()) {
</del><ins>+    if (run.rtl()) {
</ins><span class="cx">         controller.advance(run.length());
</span><span class="cx">         startX += controller.runWidthSoFar() - afterWidth;
</span><span class="cx">     } else
</span><span class="lines">@@ -140,19 +139,19 @@
</span><span class="cx"> 
</span><span class="cx">     // Draw the glyph buffer now at the starting point returned in startX.
</span><span class="cx">     FloatPoint startPoint(startX, point.y());
</span><del>-    drawGlyphBuffer(context, glyphBuffer, run, style, startPoint);
</del><ins>+    drawGlyphBuffer(context, glyphBuffer, run, startPoint);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::floatWidthForComplexText(const TextRun&amp; run, const FontStyle&amp; style) const
</del><ins>+float Font::floatWidthForComplexText(const TextRun&amp; run) const
</ins><span class="cx"> {
</span><del>-    UniscribeController controller(this, run, style);
</del><ins>+    UniscribeController controller(this, run);
</ins><span class="cx">     controller.advance(run.length());
</span><span class="cx">     return controller.runWidthSoFar();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int Font::offsetForPositionForComplexText(const TextRun&amp; run, const FontStyle&amp; style, int x, bool includePartialGlyphs) const
</del><ins>+int Font::offsetForPositionForComplexText(const TextRun&amp; run, int x, bool includePartialGlyphs) const
</ins><span class="cx"> {
</span><del>-    UniscribeController controller(this, run, style);
</del><ins>+    UniscribeController controller(this, run);
</ins><span class="cx">     return controller.offsetForPosition(x, includePartialGlyphs);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCoreplatformgraphicswxFontWxcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/graphics/wx/FontWx.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/graphics/wx/FontWx.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/graphics/wx/FontWx.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -74,24 +74,24 @@
</span><span class="cx">     dc-&gt;DrawText(text, (wxCoord)point.x(), ypoint);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FloatRect Font::selectionRectForComplexText(const TextRun&amp; run, const FontStyle&amp; style, const IntPoint&amp; point, int h, int from, int to) const
</del><ins>+FloatRect Font::selectionRectForComplexText(const TextRun&amp; run, const IntPoint&amp; point, int h, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx">     return FloatRect();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Font::drawComplexText(GraphicsContext* graphicsContext, const TextRun&amp; run, const FontStyle&amp; style, const FloatPoint&amp; point, int from, int to) const
</del><ins>+void Font::drawComplexText(GraphicsContext* graphicsContext, const TextRun&amp; run, const FloatPoint&amp; point, int from, int to) const
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-float Font::floatWidthForComplexText(const TextRun&amp; run, const FontStyle&amp; style) const
</del><ins>+float Font::floatWidthForComplexText(const TextRun&amp; run) const
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-int Font::offsetForPositionForComplexText(const TextRun&amp; run, const FontStyle&amp; style, int x, bool includePartialGlyphs) const
</del><ins>+int Font::offsetForPositionForComplexText(const TextRun&amp; run, int x, bool includePartialGlyphs) const
</ins><span class="cx"> {
</span><span class="cx">     notImplemented();
</span><span class="cx">     return 0;
</span></span></pre></div>
<a id="trunkWebCoreplatformmacWebCoreTextRenderermm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/mac/WebCoreTextRenderer.mm (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/mac/WebCoreTextRenderer.mm        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/mac/WebCoreTextRenderer.mm        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> #import &quot;FontData.h&quot;
</span><span class="cx"> #import &quot;GraphicsContext.h&quot;
</span><span class="cx"> #import &quot;IntPoint.h&quot;
</span><del>-#import &quot;FontStyle.h&quot;
</del><span class="cx"> #import &quot;WebFontCache.h&quot;
</span><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -48,12 +47,11 @@
</span><span class="cx">     FontPlatformData f(font);
</span><span class="cx">     Font renderer(f, ![[NSGraphicsContext currentContext] isDrawingToScreen]);
</span><span class="cx">     TextRun run(buffer, length);
</span><del>-    FontStyle style;
-    style.disableRoundingHacks();
</del><ins>+    run.disableRoundingHacks();
</ins><span class="cx">     CGFloat red, green, blue, alpha;
</span><span class="cx">     [[textColor colorUsingColorSpaceName:NSDeviceRGBColorSpace] getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha];
</span><span class="cx">     graphicsContext.setFillColor(makeRGBA((int)(red * 255), (int)(green * 255), (int)(blue * 255), (int)(alpha * 255)));
</span><del>-    renderer.drawText(&amp;graphicsContext, run, style, FloatPoint(point.x, (flipped ? point.y : (-1.0f * point.y))));
</del><ins>+    renderer.drawText(&amp;graphicsContext, run, FloatPoint(point.x, (flipped ? point.y : (-1.0f * point.y))));
</ins><span class="cx">     if (!flipped)
</span><span class="cx">         CGContextScaleCTM(cgContext, 1.0f, -1.0f);
</span><span class="cx"> }
</span><span class="lines">@@ -63,9 +61,8 @@
</span><span class="cx">     FontPlatformData f(font);
</span><span class="cx">     Font renderer(f, ![[NSGraphicsContext currentContext] isDrawingToScreen]);
</span><span class="cx">     TextRun run(buffer, length);
</span><del>-    FontStyle style;
-    style.disableRoundingHacks();
-    return renderer.floatWidth(run, style);
</del><ins>+    run.disableRoundingHacks();
+    return renderer.floatWidth(run);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static bool gShouldUseFontSmoothing = true;
</span></span></pre></div>
<a id="trunkWebCoreplatformwinPopupMenuWincpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/win/PopupMenuWin.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/win/PopupMenuWin.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/win/PopupMenuWin.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> #include &quot;PlatformScrollBar.h&quot;
</span><span class="cx"> #include &quot;RenderTheme.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> #include &lt;tchar.h&gt;
</span><span class="cx"> #include &lt;windows.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -510,8 +509,7 @@
</span><span class="cx">             
</span><span class="cx">         unsigned length = itemText.length();
</span><span class="cx">         const UChar* string = itemText.characters();
</span><del>-        FontStyle fontStyle(0, 0, 0, itemText.defaultWritingDirection() == WTF::Unicode::RightToLeft);
-        TextRun textRun(string, length);
</del><ins>+        TextRun textRun(string, length, false, 0, 0, itemText.defaultWritingDirection() == WTF::Unicode::RightToLeft);
</ins><span class="cx"> 
</span><span class="cx">         context.setFillColor(optionTextColor);
</span><span class="cx">         
</span><span class="lines">@@ -528,7 +526,7 @@
</span><span class="cx">         if (itemStyle-&gt;visibility() != HIDDEN) {
</span><span class="cx">             int textX = max(0, client()-&gt;clientPaddingLeft() - client()-&gt;clientInsetLeft());
</span><span class="cx">             int textY = itemRect.y() + itemFont.ascent() + (itemRect.height() - itemFont.height()) / 2;
</span><del>-            context.drawBidiText(textRun, IntPoint(textX, textY), fontStyle);
</del><ins>+            context.drawBidiText(textRun, IntPoint(textX, textY));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCoreplatformwinUniscribeControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/win/UniscribeController.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/win/UniscribeController.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/win/UniscribeController.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> #include &quot;UniscribeController.h&quot;
</span><span class="cx"> #include &quot;Font.h&quot;
</span><span class="cx"> #include &quot;FontData.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> #include &lt;wtf/MathExtras.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -39,10 +38,9 @@
</span><span class="cx"> // that does stuff in that method instead of doing everything in the constructor.  Have advance()
</span><span class="cx"> // take the GlyphBuffer as an arg so that we don't have to populate the glyph buffer when
</span><span class="cx"> // measuring.
</span><del>-UniscribeController::UniscribeController(const Font* font, const TextRun&amp; run, const FontStyle&amp; style)
</del><ins>+UniscribeController::UniscribeController(const Font* font, const TextRun&amp; run)
</ins><span class="cx"> : m_font(*font)
</span><span class="cx"> , m_run(run)
</span><del>-, m_style(style)
</del><span class="cx"> , m_end(run.length())
</span><span class="cx"> , m_currentCharacter(0)
</span><span class="cx"> , m_runWidthSoFar(0)
</span><span class="lines">@@ -51,7 +49,7 @@
</span><span class="cx"> , m_offsetX(0)
</span><span class="cx"> , m_offsetPosition(0)
</span><span class="cx"> {
</span><del>-    m_padding = m_style.padding();
</del><ins>+    m_padding = m_run.padding();
</ins><span class="cx">     if (!m_padding)
</span><span class="cx">         m_padPerSpace = 0;
</span><span class="cx">     else {
</span><span class="lines">@@ -63,7 +61,7 @@
</span><span class="cx">         if (numSpaces == 0)
</span><span class="cx">             m_padPerSpace = 0;
</span><span class="cx">         else
</span><del>-            m_padPerSpace = ceilf(m_style.padding() / numSpaces);
</del><ins>+            m_padPerSpace = ceilf(m_run.padding() / numSpaces);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Null out our uniscribe structs
</span><span class="lines">@@ -79,7 +77,7 @@
</span><span class="cx">     advance(m_run.length());
</span><span class="cx">     if (m_computingOffsetPosition) {
</span><span class="cx">         // The point is to the left or to the right of the entire run.
</span><del>-        if (m_offsetX &gt;= m_runWidthSoFar &amp;&amp; m_style.ltr() || m_offsetX &lt; 0 &amp;&amp; m_style.rtl())
</del><ins>+        if (m_offsetX &gt;= m_runWidthSoFar &amp;&amp; m_run.ltr() || m_offsetX &lt; 0 &amp;&amp; m_run.rtl())
</ins><span class="cx">             m_offsetPosition = m_end;
</span><span class="cx">     }
</span><span class="cx">     m_computingOffsetPosition = false;
</span><span class="lines">@@ -111,37 +109,37 @@
</span><span class="cx">         Vector&lt;UChar&gt; smallCapsBuffer(length);
</span><span class="cx">         memcpy(smallCapsBuffer.data(), cp, length * sizeof(UChar));
</span><span class="cx">         bool isSmallCaps = false;
</span><del>-        unsigned indexOfCaseShift = m_style.rtl() ? length - 1 : 0;
-        const UChar* curr = m_style.rtl() ? cp + length  - 1: cp;
-        const UChar* end = m_style.rtl() ? cp - 1: cp + length;
</del><ins>+        unsigned indexOfCaseShift = m_run.rtl() ? length - 1 : 0;
+        const UChar* curr = m_run.rtl() ? cp + length  - 1: cp;
+        const UChar* end = m_run.rtl() ? cp - 1: cp + length;
</ins><span class="cx">         while (curr != end) {
</span><span class="cx">             int index = curr - cp;
</span><span class="cx">             UChar c = smallCapsBuffer[index];
</span><span class="cx">             UChar newC;
</span><del>-            curr = m_style.rtl() ? curr - 1 : curr + 1;
</del><ins>+            curr = m_run.rtl() ? curr - 1 : curr + 1;
</ins><span class="cx">             if (U_GET_GC_MASK(c) &amp; U_GC_M_MASK)
</span><span class="cx">                 continue;
</span><span class="cx">             if (!u_isUUppercase(c) &amp;&amp; (newC = u_toupper(c)) != c) {
</span><span class="cx">                 smallCapsBuffer[index] = newC;
</span><span class="cx">                 if (!isSmallCaps) {
</span><span class="cx">                     isSmallCaps = true;
</span><del>-                    int itemStart = m_style.rtl() ? index : indexOfCaseShift;
-                    int itemLength = m_style.rtl() ? indexOfCaseShift - index : index - indexOfCaseShift;
</del><ins>+                    int itemStart = m_run.rtl() ? index : indexOfCaseShift;
+                    int itemLength = m_run.rtl() ? indexOfCaseShift - index : index - indexOfCaseShift;
</ins><span class="cx">                     itemizeShapeAndPlace(smallCapsBuffer.data() + itemStart, itemLength, false, glyphBuffer);
</span><span class="cx">                     indexOfCaseShift = index;
</span><span class="cx">                 }
</span><span class="cx">             } else if (isSmallCaps) {
</span><span class="cx">                 isSmallCaps = false;
</span><del>-                int itemStart = m_style.rtl() ? index : indexOfCaseShift;
-                int itemLength = m_style.rtl() ? indexOfCaseShift - index : index - indexOfCaseShift;
</del><ins>+                int itemStart = m_run.rtl() ? index : indexOfCaseShift;
+                int itemLength = m_run.rtl() ? indexOfCaseShift - index : index - indexOfCaseShift;
</ins><span class="cx">                 itemizeShapeAndPlace(smallCapsBuffer.data() + itemStart, itemLength, true, glyphBuffer);
</span><span class="cx">                 indexOfCaseShift = index;
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        int itemLength = m_style.rtl() ? indexOfCaseShift + 1 : length - indexOfCaseShift;
</del><ins>+        int itemLength = m_run.rtl() ? indexOfCaseShift + 1 : length - indexOfCaseShift;
</ins><span class="cx">         if (itemLength) {
</span><del>-            int itemStart = m_style.rtl() ? 0 : indexOfCaseShift;
</del><ins>+            int itemStart = m_run.rtl() ? 0 : indexOfCaseShift;
</ins><span class="cx">             itemizeShapeAndPlace(smallCapsBuffer.data() + itemStart, itemLength, isSmallCaps, glyphBuffer);
</span><span class="cx">         }
</span><span class="cx">     } else
</span><span class="lines">@@ -160,7 +158,7 @@
</span><span class="cx">     }
</span><span class="cx">     m_items.resize(numItems + 1);
</span><span class="cx"> 
</span><del>-    if (m_style.rtl()) {
</del><ins>+    if (m_run.rtl()) {
</ins><span class="cx">         for (int i = m_items.size() - 2; i &gt;= 0; i--) {
</span><span class="cx">             if (!shapeAndPlaceItem(cp, i, smallCaps, glyphBuffer))
</span><span class="cx">                 return;
</span><span class="lines">@@ -181,10 +179,10 @@
</span><span class="cx">     memset(&amp;m_state, 0, sizeof(SCRIPT_STATE));
</span><span class="cx"> 
</span><span class="cx">     // Set up the correct direction for the run.
</span><del>-    m_state.uBidiLevel = m_style.rtl();
</del><ins>+    m_state.uBidiLevel = m_run.rtl();
</ins><span class="cx">     
</span><span class="cx">     // Lock the correct directional override.
</span><del>-    m_state.fOverrideDirection = m_style.directionalOverride();
</del><ins>+    m_state.fOverrideDirection = m_run.directionalOverride();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool UniscribeController::shapeAndPlaceItem(const UChar* cp, unsigned i, bool smallCaps, GlyphBuffer* glyphBuffer)
</span><span class="lines">@@ -320,7 +318,7 @@
</span><span class="cx">         // Second, in fixed-pitch fonts we ensure that all glyphs that
</span><span class="cx">         // match the width of the space glyph have the same width as the space glyph.
</span><span class="cx">         if (roundedAdvance == roundedSpaceWidth &amp;&amp; (fontData-&gt;m_treatAsFixedPitch || glyph == fontData-&gt;m_spaceGlyph) &amp;&amp;
</span><del>-            m_style.applyWordRounding())
</del><ins>+            m_run.applyWordRounding())
</ins><span class="cx">             advance = fontData-&gt;m_adjustedSpaceWidth;
</span><span class="cx"> 
</span><span class="cx">         if (hasExtraSpacing) {
</span><span class="lines">@@ -357,15 +355,15 @@
</span><span class="cx">         // Force characters that are used to determine word boundaries for the rounding hack
</span><span class="cx">         // to be integer width, so the following words will start on an integer boundary.
</span><span class="cx">         int roundingHackIndex = roundingHackCharacters[k];
</span><del>-        if (m_style.applyWordRounding() &amp;&amp; roundingHackIndex != -1)
</del><ins>+        if (m_run.applyWordRounding() &amp;&amp; roundingHackIndex != -1)
</ins><span class="cx">             advance = ceilf(advance);
</span><span class="cx"> 
</span><span class="cx">         // Check to see if the next character is a &quot;rounding hack character&quot;, if so, adjust the
</span><span class="cx">         // width so that the total run width will be on an integer boundary.
</span><span class="cx">         int position = m_currentCharacter + len;
</span><del>-        bool lastGlyph = (k == glyphs.size() - 1) &amp;&amp; (m_style.rtl() ? i == 0 : i == m_items.size() - 2) &amp;&amp; (position &gt;= m_end);
-        if ((m_style.applyWordRounding() &amp;&amp; roundingHackWordBoundaries[k] != -1) ||
-            (m_style.applyRunRounding() &amp;&amp; lastGlyph)) { 
</del><ins>+        bool lastGlyph = (k == glyphs.size() - 1) &amp;&amp; (m_run.rtl() ? i == 0 : i == m_items.size() - 2) &amp;&amp; (position &gt;= m_end);
+        if ((m_run.applyWordRounding() &amp;&amp; roundingHackWordBoundaries[k] != -1) ||
+            (m_run.applyRunRounding() &amp;&amp; lastGlyph)) { 
</ins><span class="cx">             float totalWidth = m_runWidthSoFar + advance;
</span><span class="cx">             advance += ceilf(totalWidth) - totalWidth;
</span><span class="cx">         }
</span><span class="lines">@@ -392,7 +390,7 @@
</span><span class="cx">                     advances.data(), &amp;item.a, &amp;m_offsetPosition, &amp;trailing);
</span><span class="cx">         if (trailing &amp;&amp; m_includePartialGlyphs &amp;&amp; m_offsetPosition &lt; len - 1) {
</span><span class="cx">             m_offsetPosition += m_currentCharacter + m_items[i].iCharPos;
</span><del>-            m_offsetX += m_style.rtl() ? -trailing : trailing;
</del><ins>+            m_offsetX += m_run.rtl() ? -trailing : trailing;
</ins><span class="cx">         } else {
</span><span class="cx">             m_computingOffsetPosition = false;
</span><span class="cx">             m_offsetPosition += m_currentCharacter + m_items[i].iCharPos;
</span></span></pre></div>
<a id="trunkWebCoreplatformwinUniscribeControllerh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/win/UniscribeController.h (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/win/UniscribeController.h        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/win/UniscribeController.h        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> 
</span><span class="cx"> class UniscribeController {
</span><span class="cx"> public:
</span><del>-    UniscribeController(const Font*, const TextRun&amp;, const FontStyle&amp;);
</del><ins>+    UniscribeController(const Font*, const TextRun&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // Advance and measure/place up to the specified character.
</span><span class="cx">     void advance(unsigned to, GlyphBuffer* = 0);
</span><span class="lines">@@ -60,7 +60,6 @@
</span><span class="cx"> 
</span><span class="cx">     const Font&amp; m_font;
</span><span class="cx">     const TextRun&amp; m_run;
</span><del>-    const FontStyle&amp; m_style;
</del><span class="cx"> 
</span><span class="cx">     SCRIPT_CONTROL m_control;
</span><span class="cx">     SCRIPT_STATE m_state;
</span></span></pre></div>
<a id="trunkWebCoreplatformwinWebCoreTextRenderercpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/platform/win/WebCoreTextRenderer.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/platform/win/WebCoreTextRenderer.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/platform/win/WebCoreTextRenderer.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #include &quot;FontDescription.h&quot;
</span><span class="cx"> #include &quot;GraphicsContext.h&quot;
</span><span class="cx"> #include &quot;StringTruncator.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> #include &lt;wtf/unicode/Unicode.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -47,14 +46,13 @@
</span><span class="cx"> static void doDrawTextAtPoint(GraphicsContext&amp; context, const String&amp; text, const IntPoint&amp; point, const Font&amp; font, const Color&amp; color, int underlinedIndex)
</span><span class="cx"> {
</span><span class="cx">     TextRun run(text.characters(), text.length());
</span><del>-    FontStyle style;
</del><span class="cx"> 
</span><span class="cx">     context.setFillColor(color);
</span><span class="cx">     if (isOneLeftToRightRun(run))
</span><del>-        font.drawText(&amp;context, run, style, point);
</del><ins>+        font.drawText(&amp;context, run, point);
</ins><span class="cx">     else {
</span><span class="cx">         context.setFont(font);
</span><del>-        context.drawBidiText(run, point, style);
</del><ins>+        context.drawBidiText(run, point);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (underlinedIndex &gt;= 0) {
</span><span class="lines">@@ -63,12 +61,12 @@
</span><span class="cx">         int beforeWidth;
</span><span class="cx">         if (underlinedIndex &gt; 0) {
</span><span class="cx">             TextRun beforeRun(text.characters(), underlinedIndex);
</span><del>-            beforeWidth = font.width(beforeRun, style);
</del><ins>+            beforeWidth = font.width(beforeRun);
</ins><span class="cx">         } else
</span><span class="cx">             beforeWidth = 0;
</span><span class="cx"> 
</span><span class="cx">         TextRun underlinedRun(text.characters() + underlinedIndex, 1);
</span><del>-        int underlinedWidth = font.width(underlinedRun, style);
</del><ins>+        int underlinedWidth = font.width(underlinedRun);
</ins><span class="cx"> 
</span><span class="cx">         IntPoint underlinePoint(point);
</span><span class="cx">         underlinePoint.move(beforeWidth, 1);
</span></span></pre></div>
<a id="trunkWebCorerenderingEllipsisBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/EllipsisBox.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/EllipsisBox.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/rendering/EllipsisBox.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -25,7 +25,6 @@
</span><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;GraphicsContext.h&quot;
</span><span class="cx"> #include &quot;HitTestResult.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -47,8 +46,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     const String&amp; str = m_str;
</span><del>-    FontStyle fontStyle(0, 0, 0, false, style-&gt;visuallyOrdered());
-    context-&gt;drawText(TextRun(str.characters(), str.length()), IntPoint(m_x + tx, m_y + ty + m_baseline), fontStyle);
</del><ins>+    context-&gt;drawText(TextRun(str.characters(), str.length(), false, 0, 0, false, style-&gt;visuallyOrdered()), IntPoint(m_x + tx, m_y + ty + m_baseline));
</ins><span class="cx"> 
</span><span class="cx">     if (setShadow)
</span><span class="cx">         context-&gt;clearShadow();
</span></span></pre></div>
<a id="trunkWebCorerenderingInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/InlineTextBox.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/InlineTextBox.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/rendering/InlineTextBox.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include &quot;RenderBlock.h&quot;
</span><span class="cx"> #include &quot;RenderTheme.h&quot;
</span><span class="cx"> #include &quot;Text.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> #include &quot;break_lines.h&quot;
</span><span class="cx"> #include &lt;wtf/AlwaysInline.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -96,8 +95,7 @@
</span><span class="cx">     int selHeight = selectionHeight();
</span><span class="cx">     const Font&amp; f = textObj-&gt;style(m_firstLine)-&gt;font();
</span><span class="cx"> 
</span><del>-    IntRect r = enclosingIntRect(f.selectionRectForText(TextRun(textObj-&gt;text()-&gt;characters() + m_start, m_len),
-                                                        FontStyle(textObj-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride),
</del><ins>+    IntRect r = enclosingIntRect(f.selectionRectForText(TextRun(textObj-&gt;text()-&gt;characters() + m_start, m_len, textObj-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride),
</ins><span class="cx">                                                         IntPoint(tx + m_x, ty + selTop), selHeight, sPos, ePos));
</span><span class="cx">     if (r.x() &gt; tx + m_x + m_width)
</span><span class="cx">         r.setWidth(0);
</span><span class="lines">@@ -374,8 +372,6 @@
</span><span class="cx"> 
</span><span class="cx">     StringImpl* textStr = textObject()-&gt;text();
</span><span class="cx"> 
</span><del>-    FontStyle fontStyle(textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || styleToUse-&gt;visuallyOrdered());
-
</del><span class="cx">     if (!paintSelectedTextOnly &amp;&amp; !paintSelectedTextSeparately) {
</span><span class="cx">         // paint all the text
</span><span class="cx">         // FIXME: Handle RTL direction, handle reversed strings.  For now truncation can only be turned on
</span><span class="lines">@@ -383,19 +379,23 @@
</span><span class="cx">         int endPoint = m_len;
</span><span class="cx">         if (m_truncation != cNoTruncation)
</span><span class="cx">             endPoint = m_truncation;
</span><del>-        paintInfo.context-&gt;drawText(TextRun(textStr-&gt;characters() + m_start, endPoint), IntPoint(m_x + tx, m_y + ty + m_baseline), fontStyle);
</del><ins>+        paintInfo.context-&gt;drawText(TextRun(textStr-&gt;characters() + m_start, endPoint, textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || styleToUse-&gt;visuallyOrdered()),
+                                    IntPoint(m_x + tx, m_y + ty + m_baseline));
</ins><span class="cx">     } else {
</span><span class="cx">         int sPos, ePos;
</span><span class="cx">         selectionStartEnd(sPos, ePos);
</span><span class="cx">         if (paintSelectedTextSeparately) {
</span><span class="cx">             // paint only the text that is not selected
</span><span class="cx">             if (sPos &gt;= ePos)
</span><del>-                paintInfo.context-&gt;drawText(TextRun(textStr-&gt;characters() + m_start, m_len), IntPoint(m_x + tx, m_y + ty + m_baseline), fontStyle);
</del><ins>+                paintInfo.context-&gt;drawText(TextRun(textStr-&gt;characters() + m_start, m_len, textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || styleToUse-&gt;visuallyOrdered()),
+                                            IntPoint(m_x + tx, m_y + ty + m_baseline));
</ins><span class="cx">             else {
</span><span class="cx">                 if (sPos - 1 &gt;= 0)
</span><del>-                    paintInfo.context-&gt;drawText(TextRun(textStr-&gt;characters() + m_start, m_len), IntPoint(m_x + tx, m_y + ty + m_baseline), fontStyle,  0, sPos);
</del><ins>+                    paintInfo.context-&gt;drawText(TextRun(textStr-&gt;characters() + m_start, m_len, textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || styleToUse-&gt;visuallyOrdered()),
+                                                IntPoint(m_x + tx, m_y + ty + m_baseline),  0, sPos);
</ins><span class="cx">                 if (ePos &lt; m_start + m_len)
</span><del>-                    paintInfo.context-&gt;drawText(TextRun(textStr-&gt;characters() + m_start, m_len), IntPoint(m_x + tx, m_y + ty + m_baseline), fontStyle, ePos);
</del><ins>+                    paintInfo.context-&gt;drawText(TextRun(textStr-&gt;characters() + m_start, m_len, textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || styleToUse-&gt;visuallyOrdered()),
+                                                IntPoint(m_x + tx, m_y + ty + m_baseline), ePos);
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -409,7 +409,8 @@
</span><span class="cx">             if (selectionTextShadow)
</span><span class="cx">                 paintInfo.context-&gt;setShadow(IntSize(selectionTextShadow-&gt;x, selectionTextShadow-&gt;y),
</span><span class="cx">                                              selectionTextShadow-&gt;blur, selectionTextShadow-&gt;color);
</span><del>-            paintInfo.context-&gt;drawText(TextRun(textStr-&gt;characters() + m_start, m_len), IntPoint(m_x + tx, m_y + ty + m_baseline), fontStyle, sPos, ePos);
</del><ins>+            paintInfo.context-&gt;drawText(TextRun(textStr-&gt;characters() + m_start, m_len, textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || styleToUse-&gt;visuallyOrdered()),
+                                        IntPoint(m_x + tx, m_y + ty + m_baseline), sPos, ePos);
</ins><span class="cx">             if (selectionTextShadow)
</span><span class="cx">                 paintInfo.context-&gt;clearShadow();
</span><span class="cx">                 
</span><span class="lines">@@ -501,9 +502,8 @@
</span><span class="cx">     int y = selectionTop();
</span><span class="cx">     int h = selectionHeight();
</span><span class="cx">     p-&gt;clip(IntRect(m_x + tx, y + ty, m_width, h));
</span><del>-    p-&gt;drawHighlightForText(TextRun(textObject()-&gt;text()-&gt;characters() + m_start, m_len), IntPoint(m_x + tx, y + ty), h, 
-                            FontStyle(textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || style-&gt;visuallyOrdered()), c,
-                            sPos, ePos);
</del><ins>+    p-&gt;drawHighlightForText(TextRun(textObject()-&gt;text()-&gt;characters() + m_start, m_len, textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || style-&gt;visuallyOrdered()),
+                            IntPoint(m_x + tx, y + ty), h, c, sPos, ePos);
</ins><span class="cx">     p-&gt;restore();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -524,9 +524,8 @@
</span><span class="cx"> 
</span><span class="cx">     int y = selectionTop();
</span><span class="cx">     int h = selectionHeight();
</span><del>-    p-&gt;drawHighlightForText(TextRun(textObject()-&gt;text()-&gt;characters() + m_start, m_len),
-                            IntPoint(m_x + tx, y + ty), h, 
-                            FontStyle(textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || style-&gt;visuallyOrdered()), c, sPos, ePos);
</del><ins>+    p-&gt;drawHighlightForText(TextRun(textObject()-&gt;text()-&gt;characters() + m_start, m_len, textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || style-&gt;visuallyOrdered()),
+                            IntPoint(m_x + tx, y + ty), h, c, sPos, ePos);
</ins><span class="cx">     p-&gt;restore();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -613,11 +612,10 @@
</span><span class="cx">     if (grammar) {
</span><span class="cx">         int y = selectionTop();
</span><span class="cx">         IntPoint startPoint = IntPoint(m_x + tx, y + ty);
</span><del>-        FontStyle fontStyle = FontStyle(textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || style-&gt;visuallyOrdered());
</del><span class="cx">         int startPosition = max(marker.startOffset - m_start, (unsigned)0);
</span><span class="cx">         int endPosition = min(marker.endOffset - m_start, (unsigned)m_len);    
</span><del>-        TextRun run = TextRun(textObject()-&gt;text()-&gt;characters() + m_start, m_len);
-        IntRect markerRect = enclosingIntRect(f-&gt;selectionRectForText(run, fontStyle, startPoint, selectionHeight(), startPosition, endPosition));
</del><ins>+        TextRun run(textObject()-&gt;text()-&gt;characters() + m_start, m_len, textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || style-&gt;visuallyOrdered());
+        IntRect markerRect = enclosingIntRect(f-&gt;selectionRectForText(run, startPoint, selectionHeight(), startPosition, endPosition));
</ins><span class="cx">         object()-&gt;document()-&gt;setRenderedRectForMarker(object()-&gt;node(), marker, markerRect);
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -649,12 +647,11 @@
</span><span class="cx">     
</span><span class="cx">     int sPos = max(marker.startOffset - m_start, (unsigned)0);
</span><span class="cx">     int ePos = min(marker.endOffset - m_start, (unsigned)m_len);    
</span><del>-    TextRun run = TextRun(textObject()-&gt;text()-&gt;characters() + m_start, m_len);
-    FontStyle renderStyle = FontStyle(textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || style-&gt;visuallyOrdered());
</del><ins>+    TextRun run(textObject()-&gt;text()-&gt;characters() + m_start, m_len, textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || style-&gt;visuallyOrdered());
</ins><span class="cx">     IntPoint startPoint = IntPoint(m_x + tx, y + ty);
</span><span class="cx">     
</span><span class="cx">     // Always compute and store the rect associated with this marker
</span><del>-    IntRect markerRect = enclosingIntRect(f-&gt;selectionRectForText(run, renderStyle, startPoint, h, sPos, ePos));
</del><ins>+    IntRect markerRect = enclosingIntRect(f-&gt;selectionRectForText(run, startPoint, h, sPos, ePos));
</ins><span class="cx">     object()-&gt;document()-&gt;setRenderedRectForMarker(object()-&gt;node(), marker, markerRect);
</span><span class="cx">      
</span><span class="cx">     // Optionally highlight the text
</span><span class="lines">@@ -663,7 +660,7 @@
</span><span class="cx">         pt-&gt;save();
</span><span class="cx">         updateGraphicsContext(pt, color, color, 0);  // Don't draw text at all!
</span><span class="cx">         pt-&gt;clip(IntRect(tx + m_x, ty + y, m_width, h));
</span><del>-        pt-&gt;drawHighlightForText(run, startPoint, h, renderStyle, color, sPos, ePos);
</del><ins>+        pt-&gt;drawHighlightForText(run, startPoint, h, color, sPos, ePos);
</ins><span class="cx">         pt-&gt;restore();
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -801,8 +798,7 @@
</span><span class="cx">     RenderText* text = static_cast&lt;RenderText*&gt;(m_object);
</span><span class="cx">     RenderStyle *style = text-&gt;style(m_firstLine);
</span><span class="cx">     const Font* f = &amp;style-&gt;font();
</span><del>-    return f-&gt;offsetForPosition(TextRun(textObject()-&gt;text()-&gt;characters() + m_start, m_len),
-                                FontStyle(textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || style-&gt;visuallyOrdered()),
</del><ins>+    return f-&gt;offsetForPosition(TextRun(textObject()-&gt;text()-&gt;characters() + m_start, m_len, textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride || style-&gt;visuallyOrdered()),
</ins><span class="cx">                                 _x - m_x, includePartialGlyphs);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -816,8 +812,7 @@
</span><span class="cx">     int from = m_reversed ? offset - m_start : 0;
</span><span class="cx">     int to = m_reversed ? m_len : offset - m_start;
</span><span class="cx">     // FIXME: Do we need to add rightBearing here?
</span><del>-    return enclosingIntRect(f.selectionRectForText(TextRun(text-&gt;text()-&gt;characters() + m_start, m_len),
-                                                   FontStyle(textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride),
</del><ins>+    return enclosingIntRect(f.selectionRectForText(TextRun(text-&gt;text()-&gt;characters() + m_start, m_len, textObject()-&gt;allowTabs(), textPos(), m_toAdd, m_reversed, m_dirOverride),
</ins><span class="cx">                                                    IntPoint(m_x, 0), 0, from, to)).right();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderFileUploadControlcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderFileUploadControl.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderFileUploadControl.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/rendering/RenderFileUploadControl.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include &quot;RenderText.h&quot;
</span><span class="cx"> #include &quot;RenderTheme.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> #include &lt;math.h&gt;
</span><span class="cx"> 
</span><span class="cx"> using namespace std;
</span><span class="lines">@@ -176,8 +175,7 @@
</span><span class="cx">         const String&amp; displayedFilename = m_fileChooser-&gt;basenameForWidth(style()-&gt;font(), maxFilenameWidth());        
</span><span class="cx">         unsigned length = displayedFilename.length();
</span><span class="cx">         const UChar* string = displayedFilename.characters();
</span><del>-        FontStyle fontStyle(0, 0, 0, style()-&gt;direction() == RTL, style()-&gt;unicodeBidi() == Override);
-        TextRun textRun(string, length);
</del><ins>+        TextRun textRun(string, length, false, 0, 0, style()-&gt;direction() == RTL, style()-&gt;unicodeBidi() == Override);
</ins><span class="cx">         
</span><span class="cx">         // Determine where the filename should be placed
</span><span class="cx">         int contentLeft = tx + borderLeft() + paddingLeft();
</span><span class="lines">@@ -198,7 +196,7 @@
</span><span class="cx">         paintInfo.context-&gt;setFillColor(style()-&gt;color());
</span><span class="cx">         
</span><span class="cx">         // Draw the filename
</span><del>-        paintInfo.context-&gt;drawBidiText(textRun, IntPoint(textX, textY), fontStyle);
</del><ins>+        paintInfo.context-&gt;drawBidiText(textRun, IntPoint(textX, textY));
</ins><span class="cx">         
</span><span class="cx">         if (m_fileChooser-&gt;icon()) {
</span><span class="cx">             // Determine where the icon should be placed
</span><span class="lines">@@ -235,7 +233,7 @@
</span><span class="cx">         // Figure out how big the filename space needs to be for a given number of characters
</span><span class="cx">         // (using &quot;0&quot; as the nominal character).
</span><span class="cx">         const UChar ch = '0';
</span><del>-        float charWidth = style()-&gt;font().floatWidth(TextRun(&amp;ch, 1), FontStyle(0, 0, 0, false, false, false));
</del><ins>+        float charWidth = style()-&gt;font().floatWidth(TextRun(&amp;ch, 1, false, 0, 0, false, false, false));
</ins><span class="cx">         m_maxPrefWidth = (int)ceilf(charWidth * defaultWidthNumChars);
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderImage.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderImage.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/rendering/RenderImage.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -38,7 +38,6 @@
</span><span class="cx"> #include &quot;HitTestResult.h&quot;
</span><span class="cx"> #include &quot;Page.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> 
</span><span class="cx"> using namespace std;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderListBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderListBox.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderListBox.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/rendering/RenderListBox.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -46,7 +46,6 @@
</span><span class="cx"> #include &quot;PlatformScrollBar.h&quot; 
</span><span class="cx"> #include &quot;RenderTheme.h&quot;
</span><span class="cx"> #include &quot;RenderView.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> #include &lt;math.h&gt;
</span><span class="cx"> 
</span><span class="cx"> using namespace std;
</span><span class="lines">@@ -101,7 +100,6 @@
</span><span class="cx">         int size = numItems();
</span><span class="cx">         
</span><span class="cx">         float width = 0;
</span><del>-        FontStyle fontStyle(0, 0, 0, false, false, false, false);
</del><span class="cx">         for (int i = 0; i &lt; size; ++i) {
</span><span class="cx">             HTMLElement* element = listItems[i];
</span><span class="cx">             String text;
</span><span class="lines">@@ -117,7 +115,7 @@
</span><span class="cx">             }
</span><span class="cx">                 
</span><span class="cx">             if (!text.isEmpty()) {
</span><del>-                float textWidth = itemFont.floatWidth(TextRun(text.impl()), fontStyle);
</del><ins>+                float textWidth = itemFont.floatWidth(TextRun(text.impl(), 0, 0, 0, false, false, false, false));
</ins><span class="cx">                 width = max(width, textWidth);
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="lines">@@ -338,12 +336,11 @@
</span><span class="cx">     
</span><span class="cx">     unsigned length = itemText.length();
</span><span class="cx">     const UChar* string = itemText.characters();
</span><del>-    FontStyle fontStyle(0, 0, 0, itemStyle-&gt;direction() == RTL, itemStyle-&gt;unicodeBidi() == Override, false, false);
-    TextRun textRun(string, length);
</del><ins>+    TextRun textRun(string, length, 0, 0, 0, itemStyle-&gt;direction() == RTL, itemStyle-&gt;unicodeBidi() == Override, false, false);
</ins><span class="cx"> 
</span><span class="cx">     // Draw the item text
</span><span class="cx">     if (itemStyle-&gt;visibility() != HIDDEN)
</span><del>-        paintInfo.context-&gt;drawBidiText(textRun, r.location(), fontStyle);
</del><ins>+        paintInfo.context-&gt;drawBidiText(textRun, r.location());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderListBox::paintItemBackground(PaintInfo&amp; paintInfo, int tx, int ty, int listIndex)
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderMenuListcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderMenuList.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderMenuList.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/rendering/RenderMenuList.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx"> #include &quot;RenderBR.h&quot;
</span><span class="cx"> #include &quot;RenderText.h&quot;
</span><span class="cx"> #include &quot;RenderTheme.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> #include &lt;math.h&gt;
</span><span class="cx"> 
</span><span class="cx"> using namespace std;
</span><span class="lines">@@ -140,7 +139,7 @@
</span><span class="cx">         if (element-&gt;hasTagName(optionTag)) {
</span><span class="cx">             String text = static_cast&lt;HTMLOptionElement*&gt;(element)-&gt;optionText();
</span><span class="cx">             if (!text.isEmpty())
</span><del>-                maxOptionWidth = max(maxOptionWidth, style()-&gt;font().floatWidth(text, FontStyle()));
</del><ins>+                maxOptionWidth = max(maxOptionWidth, style()-&gt;font().floatWidth(text));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderText.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderText.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/rendering/RenderText.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #include &quot;RenderLayer.h&quot;
</span><span class="cx"> #include &quot;Text.h&quot;
</span><span class="cx"> #include &quot;TextBreakIterator.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> #include &quot;break_lines.h&quot;
</span><span class="cx"> #include &lt;wtf/AlwaysInline.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -412,7 +411,7 @@
</span><span class="cx">         return w;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return f.width(TextRun(text()-&gt;characters() + start, len), FontStyle(allowTabs(), xPos));
</del><ins>+    return f.width(TextRun(text()-&gt;characters() + start, len, allowTabs(), xPos));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderText::trimmedPrefWidths(int leadWidth,
</span><span class="lines">@@ -671,7 +670,7 @@
</span><span class="cx">                     m_maxWidth = currMaxWidth;
</span><span class="cx">                 currMaxWidth = 0;
</span><span class="cx">             } else {
</span><del>-                currMaxWidth += f.width(TextRun(txt + i, 1), FontStyle(allowTabs(), leadWidth + currMaxWidth));
</del><ins>+                currMaxWidth += f.width(TextRun(txt + i, 1, allowTabs(), leadWidth + currMaxWidth));
</ins><span class="cx">                 needsWordSpacing = isSpace &amp;&amp; !previousCharacterIsSpace &amp;&amp; i == len - 1;
</span><span class="cx">             }
</span><span class="cx">             ASSERT(lastWordBoundary == i);
</span><span class="lines">@@ -1025,7 +1024,7 @@
</span><span class="cx">         else
</span><span class="cx">             w = widthFromCache(f, from, len, xPos);
</span><span class="cx">     } else
</span><del>-        w = f.width(TextRun(text()-&gt;characters() + from, len), FontStyle(allowTabs(), xPos));
</del><ins>+        w = f.width(TextRun(text()-&gt;characters() + from, len, allowTabs(), xPos));
</ins><span class="cx"> 
</span><span class="cx">     return w;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderTexth"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderText.h (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderText.h        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/rendering/RenderText.h        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> 
</span><span class="cx">     InlineTextBox* findNextInlineTextBox(int offset, int&amp; pos) const;
</span><span class="cx"> 
</span><del>-    int allowTabs() const { return !style()-&gt;collapseWhiteSpace(); }
</del><ins>+    bool allowTabs() const { return !style()-&gt;collapseWhiteSpace(); }
</ins><span class="cx"> 
</span><span class="cx">     void checkConsistency() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCorerenderingRenderTextControlcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/RenderTextControl.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/RenderTextControl.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/rendering/RenderTextControl.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -46,7 +46,6 @@
</span><span class="cx"> #include &quot;Settings.h&quot;
</span><span class="cx"> #include &quot;Text.h&quot;
</span><span class="cx"> #include &quot;TextIterator.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> #include &quot;htmlediting.h&quot;
</span><span class="cx"> #include &quot;visible_units.h&quot;
</span><span class="cx"> #include &lt;math.h&gt;
</span><span class="lines">@@ -849,7 +848,7 @@
</span><span class="cx">         // Figure out how big a text control needs to be for a given number of characters
</span><span class="cx">         // (using &quot;0&quot; as the nominal character).
</span><span class="cx">         const UChar ch = '0';
</span><del>-        float charWidth = style()-&gt;font().floatWidth(TextRun(&amp;ch, 1), FontStyle(0, 0, 0, false, false, false));
</del><ins>+        float charWidth = style()-&gt;font().floatWidth(TextRun(&amp;ch, 1, false, 0, 0, false, false, false));
</ins><span class="cx">         int factor;
</span><span class="cx">         int scrollbarSize = 0;
</span><span class="cx">         if (m_multiLine) {
</span></span></pre></div>
<a id="trunkWebCorerenderingSVGInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/SVGInlineTextBox.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/SVGInlineTextBox.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/rendering/SVGInlineTextBox.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> #include &quot;SVGPaintServer.h&quot;
</span><span class="cx"> #include &quot;SVGRootInlineBox.h&quot;
</span><span class="cx"> #include &quot;Text.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> 
</span><span class="cx"> #include &lt;float.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -74,7 +73,7 @@
</span><span class="cx"> 
</span><span class="cx"> float SVGInlineTextBox::calculateGlyphWidth(RenderStyle* style, int offset) const
</span><span class="cx"> {
</span><del>-    return style-&gt;font().floatWidth(TextRun(textObject()-&gt;text()-&gt;characters() + offset, 1), svgFontStyleForInlineTextBox(style, this, 0));
</del><ins>+    return style-&gt;font().floatWidth(svgTextRunForInlineTextBox(textObject()-&gt;text()-&gt;characters() + offset, 1, style, this, 0));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> float SVGInlineTextBox::calculateGlyphHeight(RenderStyle* style, int offset) const
</span><span class="lines">@@ -379,10 +378,9 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     IntPoint origin((int) svgChar.x, (int) svgChar.y);
</span><del>-    TextRun run(chars, length);
-    FontStyle style = svgFontStyleForInlineTextBox(styleToUse, this, svgChar.x);
</del><ins>+    TextRun run = svgTextRunForInlineTextBox(chars, length, styleToUse, this, svgChar.x);
</ins><span class="cx"> 
</span><del>-    paintInfo.context-&gt;drawText(run, origin, style);
</del><ins>+    paintInfo.context-&gt;drawText(run, origin);
</ins><span class="cx"> 
</span><span class="cx">     if (paintInfo.phase != PaintPhaseSelection) {
</span><span class="cx">         paintDocumentMarkers(paintInfo.context, tx, ty, styleToUse, font, false);
</span><span class="lines">@@ -460,10 +458,9 @@
</span><span class="cx">     p-&gt;save();
</span><span class="cx"> 
</span><span class="cx">     int adjust = startPos &gt;= boxStartOffset ? boxStartOffset : 0;
</span><del>-    p-&gt;drawHighlightForText(TextRun(textObject()-&gt;text()-&gt;characters() + start() + boxStartOffset, length),
-                            IntPoint((int) svgChar.x, (int) svgChar.y - f-&gt;ascent()), f-&gt;ascent() + f-&gt;descent(),
-                            svgFontStyleForInlineTextBox(style, this, svgChar.x), color,
-                            startPos - adjust, endPos - adjust);
</del><ins>+    p-&gt;drawHighlightForText(svgTextRunForInlineTextBox(textObject()-&gt;text()-&gt;characters() + start() + boxStartOffset, length, style, this, svgChar.x),
+                            IntPoint((int) svgChar.x, (int) svgChar.y - f-&gt;ascent()),
+                            f-&gt;ascent() + f-&gt;descent(), color, startPos - adjust, endPos - adjust);
</ins><span class="cx"> 
</span><span class="cx">     p-&gt;restore();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkWebCorerenderingSVGRootInlineBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/SVGRootInlineBox.cpp (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/SVGRootInlineBox.cpp        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/rendering/SVGRootInlineBox.cpp        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -40,7 +40,6 @@
</span><span class="cx"> #include &quot;SVGTextPositioningElement.h&quot;
</span><span class="cx"> #include &quot;SVGURIReference.h&quot;
</span><span class="cx"> #include &quot;Text.h&quot;
</span><del>-#include &quot;FontStyle.h&quot;
</del><span class="cx"> #include &quot;UnicodeRange.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &lt;float.h&gt;
</span><span class="lines">@@ -519,7 +518,7 @@
</span><span class="cx"> 
</span><span class="cx">             // Paint decorations, that have to be drawn before the text gets drawn
</span><span class="cx">             if (textDecorations != TDNONE &amp;&amp; m_paintInfo.phase != PaintPhaseSelection) {
</span><del>-                textWidth = styleToUse-&gt;font().width(TextRun(stringStart, stringLength), styleToUse);
</del><ins>+                textWidth = styleToUse-&gt;font().width(svgTextRunForInlineTextBox(stringStart, stringLength, styleToUse, textBox, (*it).x));
</ins><span class="cx">                 decorationOrigin = IntPoint((int) (*it).x, (int) (*it).y - styleToUse-&gt;font().ascent());
</span><span class="cx">                 info = m_rootBox-&gt;retrievePaintServersForTextDecoration(text);
</span><span class="cx">             }
</span><span class="lines">@@ -622,7 +621,7 @@
</span><span class="cx">     RenderText* text = textBox-&gt;textObject();
</span><span class="cx">     RenderStyle* style = text-&gt;style();
</span><span class="cx"> 
</span><del>-    return style-&gt;font().floatWidth(TextRun(text-&gt;characters() + textBox-&gt;start() + range.startOffset, range.endOffset - range.startOffset), svgFontStyleForInlineTextBox(style, textBox, 0));
</del><ins>+    return style-&gt;font().floatWidth(svgTextRunForInlineTextBox(text-&gt;characters() + textBox-&gt;start() + range.startOffset, range.endOffset - range.startOffset, style, textBox, 0));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> float cummulatedHeightOfInlineBoxCharacterRange(SVGInlineBoxCharacterRange&amp; range)
</span><span class="lines">@@ -638,16 +637,16 @@
</span><span class="cx">     return (range.endOffset - range.startOffset) * (font.ascent() + font.descent());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-FontStyle svgFontStyleForInlineTextBox(RenderStyle* style, const InlineTextBox* textBox, float xPos)
</del><ins>+TextRun svgTextRunForInlineTextBox(const UChar* c, int len, RenderStyle* style, const InlineTextBox* textBox, float xPos)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(textBox);
</span><span class="cx">     ASSERT(style);
</span><span class="cx"> 
</span><del>-    FontStyle fontStyle(false, static_cast&lt;int&gt;(xPos), textBox-&gt;toAdd(), textBox-&gt;m_reversed, textBox-&gt;m_dirOverride || style-&gt;visuallyOrdered());
</del><ins>+    TextRun run(c, len, false, static_cast&lt;int&gt;(xPos), textBox-&gt;toAdd(), textBox-&gt;m_reversed, textBox-&gt;m_dirOverride || style-&gt;visuallyOrdered());
</ins><span class="cx"> 
</span><span class="cx">     // We handle letter &amp; word spacing ourselves
</span><del>-    fontStyle.disableSpacing();
-    return fontStyle;
</del><ins>+    run.disableSpacing();
+    return run;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static float cummulatedWidthOrHeightOfTextChunk(SVGTextChunk&amp; chunk, bool calcWidthOnly)
</span></span></pre></div>
<a id="trunkWebCorerenderingSVGRootInlineBoxh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/rendering/SVGRootInlineBox.h (28297 => 28298)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/rendering/SVGRootInlineBox.h        2007-12-01 12:58:06 UTC (rev 28297)
+++ trunk/WebCore/rendering/SVGRootInlineBox.h        2007-12-01 16:28:57 UTC (rev 28298)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> // Shared with SVGRenderTreeAsText / SVGInlineTextBox
</span><del>-FontStyle svgFontStyleForInlineTextBox(RenderStyle* style, const InlineTextBox* textBox, float xPos);
</del><ins>+TextRun svgTextRunForInlineTextBox(const UChar*, int len, RenderStyle* style, const InlineTextBox* textBox, float xPos);
</ins><span class="cx"> FloatPoint topLeftPositionOfCharacterRange(Vector&lt;SVGChar&gt;::iterator start, Vector&lt;SVGChar&gt;::iterator end);
</span><span class="cx"> float cummulatedWidthOfInlineBoxCharacterRange(SVGInlineBoxCharacterRange&amp; range);
</span><span class="cx"> float cummulatedHeightOfInlineBoxCharacterRange(SVGInlineBoxCharacterRange&amp; range);
</span></span></pre>
</div>
</div>

</body>
</html>