<!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" />
<title>[205614] releases/WebKitGTK/webkit-2.14/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/205614">205614</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-09-08 02:54:24 -0700 (Thu, 08 Sep 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/205282">r205282</a> - Clean up TextRun-related code
https://bugs.webkit.org/show_bug.cgi?id=161473
Reviewed by Simon Fraser.
Source/WebCore:
Some assorted cleanup, including:
- Renaming "AllowTrailingExpansion | ForbidLeadingExpansion" to "DefaultExpansion"
- Migrating from pointers to references
- Migrating from ints to unsigneds
- Using proper character names from CharacterNames.h
- Simplifying CoreTextSPI.h
No new tests because there is no behavior change.
* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::TextLayout::isNeeded):
(WebCore::TextLayout::constructTextRun):
* platform/spi/cocoa/CoreTextSPI.h:
* platform/text/TextFlags.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::constructTextRun):
* rendering/RenderBlock.h:
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::getRelativeMarkerRect):
* rendering/RenderMenuList.cpp:
(RenderMenuList::updateOptionsWidth):
* rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache):
(WebCore::RenderText::trimmedPrefWidths):
(WebCore::hyphenWidth):
(WebCore::maxWordFragmentWidth):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::RenderText::width):
* rendering/RenderText.h:
* rendering/RenderThemeIOS.mm:
* rendering/line/BreakingContext.h:
(WebCore::textWidth):
(WebCore::tryHyphenating):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::offsetForPositionInFragment):
(WebCore::SVGInlineTextBox::selectionRectForTextFragment):
(WebCore::SVGInlineTextBox::localSelectionRect):
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paint):
(WebCore::SVGInlineTextBox::acquirePaintingResource):
(WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
(WebCore::SVGInlineTextBox::constructTextRun):
(WebCore::SVGInlineTextBox::paintDecorationWithStyle):
(WebCore::SVGInlineTextBox::paintTextWithShadows):
(WebCore::SVGInlineTextBox::paintText):
* rendering/svg/SVGInlineTextBox.h:
Source/WebKit/mac:
Remove unused #includes.
* WebCoreSupport/WebDragClient.mm:
* WebView/WebView.mm:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreplatformgraphicsTextRunh">releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/graphics/TextRun.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreplatformgraphicsmacComplexTextControllercpp">releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreplatformspicocoaCoreTextSPIh">releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCoreplatformtextTextFlagsh">releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/text/TextFlags.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCorerenderingRenderBlockcpp">releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCorerenderingRenderBlockh">releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCorerenderingRenderListMarkercpp">releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListMarker.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCorerenderingRenderMenuListcpp">releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderMenuList.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCorerenderingRenderTextcpp">releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderText.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCorerenderingRenderTexth">releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderText.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCorerenderingRenderThemeIOSmm">releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderThemeIOS.mm</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCorerenderinglineBreakingContexth">releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/line/BreakingContext.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCorerenderingsvgSVGInlineTextBoxcpp">releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebCorerenderingsvgSVGInlineTextBoxh">releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/svg/SVGInlineTextBox.h</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKitmacChangeLog">releases/WebKitGTK/webkit-2.14/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKitmacWebCoreSupportWebDragClientmm">releases/WebKitGTK/webkit-2.14/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm</a></li>
<li><a href="#releasesWebKitGTKwebkit214SourceWebKitmacWebViewWebViewmm">releases/WebKitGTK/webkit-2.14/Source/WebKit/mac/WebView/WebView.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit214SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -1,3 +1,60 @@
</span><ins>+2016-09-01 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Clean up TextRun-related code
+ https://bugs.webkit.org/show_bug.cgi?id=161473
+
+ Reviewed by Simon Fraser.
+
+ Some assorted cleanup, including:
+ - Renaming "AllowTrailingExpansion | ForbidLeadingExpansion" to "DefaultExpansion"
+ - Migrating from pointers to references
+ - Migrating from ints to unsigneds
+ - Using proper character names from CharacterNames.h
+ - Simplifying CoreTextSPI.h
+
+ No new tests because there is no behavior change.
+
+ * platform/graphics/TextRun.h:
+ (WebCore::TextRun::TextRun):
+ * platform/graphics/mac/ComplexTextController.cpp:
+ (WebCore::TextLayout::isNeeded):
+ (WebCore::TextLayout::constructTextRun):
+ * platform/spi/cocoa/CoreTextSPI.h:
+ * platform/text/TextFlags.h:
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::constructTextRun):
+ * rendering/RenderBlock.h:
+ * rendering/RenderListMarker.cpp:
+ (WebCore::RenderListMarker::computePreferredLogicalWidths):
+ (WebCore::RenderListMarker::getRelativeMarkerRect):
+ * rendering/RenderMenuList.cpp:
+ (RenderMenuList::updateOptionsWidth):
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::widthFromCache):
+ (WebCore::RenderText::trimmedPrefWidths):
+ (WebCore::hyphenWidth):
+ (WebCore::maxWordFragmentWidth):
+ (WebCore::RenderText::computePreferredLogicalWidths):
+ (WebCore::RenderText::width):
+ * rendering/RenderText.h:
+ * rendering/RenderThemeIOS.mm:
+ * rendering/line/BreakingContext.h:
+ (WebCore::textWidth):
+ (WebCore::tryHyphenating):
+ * rendering/svg/SVGInlineTextBox.cpp:
+ (WebCore::SVGInlineTextBox::offsetForPositionInFragment):
+ (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
+ (WebCore::SVGInlineTextBox::localSelectionRect):
+ (WebCore::SVGInlineTextBox::paintSelectionBackground):
+ (WebCore::SVGInlineTextBox::paint):
+ (WebCore::SVGInlineTextBox::acquirePaintingResource):
+ (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
+ (WebCore::SVGInlineTextBox::constructTextRun):
+ (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
+ (WebCore::SVGInlineTextBox::paintTextWithShadows):
+ (WebCore::SVGInlineTextBox::paintText):
+ * rendering/svg/SVGInlineTextBox.h:
+
</ins><span class="cx"> 2016-08-31 Yusuke Suzuki <utatane.tea@gmail.com>
</span><span class="cx">
</span><span class="cx"> [JSC] Add initiator parameter to module pipeline
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCoreplatformgraphicsTextRunh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/graphics/TextRun.h (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/graphics/TextRun.h        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/graphics/TextRun.h        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> class TextRun {
</span><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>- explicit TextRun(StringView text, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true)
</del><ins>+ explicit TextRun(StringView text, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = DefaultExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true)
</ins><span class="cx"> : m_text(text)
</span><span class="cx"> , m_charactersLength(text.length())
</span><span class="cx"> , m_tabSize(0)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCoreplatformgraphicsmacComplexTextControllercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> public:
</span><span class="cx"> static bool isNeeded(RenderText& text, const FontCascade& font)
</span><span class="cx"> {
</span><del>- TextRun run = RenderBlock::constructTextRun(&text, text.style());
</del><ins>+ TextRun run = RenderBlock::constructTextRun(text, text.style());
</ins><span class="cx"> return font.codePath(run) == FontCascade::Complex;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> private:
</span><span class="cx"> static TextRun constructTextRun(RenderText& text, float xPos)
</span><span class="cx"> {
</span><del>- TextRun run = RenderBlock::constructTextRun(&text, text.style());
</del><ins>+ TextRun run = RenderBlock::constructTextRun(text, text.style());
</ins><span class="cx"> run.setCharactersLength(text.textLength());
</span><span class="cx"> ASSERT(run.charactersLength() >= run.length());
</span><span class="cx"> run.setXPos(xPos);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCoreplatformspicocoaCoreTextSPIh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -42,6 +42,18 @@
</span><span class="cx"> kCTFontUIFontSystemUltraLight = 104,
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+typedef CF_OPTIONS(uint32_t, CTFontTransformOptions)
+{
+ kCTFontTransformApplyShaping = (1 << 0),
+ kCTFontTransformApplyPositioning = (1 << 1)
+};
+
+typedef CF_OPTIONS(uint32_t, CTFontDescriptorOptions)
+{
+ kCTFontDescriptorOptionSystemUIFont = 1 << 1,
+ kCTFontDescriptorOptionPreferAppleSystemFont = kCTFontOptionsPreferSystemFont
+};
+
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> extern "C" {
</span><span class="lines">@@ -52,16 +64,7 @@
</span><span class="cx"> extern const CFStringRef kCTFontReferenceURLAttribute;
</span><span class="cx"> extern const CFStringRef kCTFontOpticalSizeAttribute;
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
-#if !USE(APPLE_INTERNAL_SDK)
-typedef CF_OPTIONS(uint32_t, CTFontTransformOptions)
-{
- kCTFontTransformApplyShaping = (1 << 0),
- kCTFontTransformApplyPositioning = (1 << 1)
-};
-#endif
</del><span class="cx"> bool CTFontTransformGlyphs(CTFontRef, CGGlyph glyphs[], CGSize advances[], CFIndex count, CTFontTransformOptions);
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> CGSize CTRunGetInitialAdvance(CTRunRef run);
</span><span class="cx"> CTLineRef CTLineCreateWithUniCharProvider(CTUniCharProviderCallback provide, CTUniCharDisposeCallback dispose, void* refCon);
</span><span class="lines">@@ -73,26 +76,15 @@
</span><span class="cx"> CTFontDescriptorRef CTFontDescriptorCreateCopyWithSymbolicTraits(CTFontDescriptorRef original, CTFontSymbolicTraits symTraitValue, CTFontSymbolicTraits symTraitMask);
</span><span class="cx"> CFBitVectorRef CTFontCopyGlyphCoverageForFeature(CTFontRef, CFDictionaryRef feature);
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
-#if !USE(APPLE_INTERNAL_SDK)
-typedef CF_OPTIONS(uint32_t, CTFontDescriptorOptions)
-{
- kCTFontDescriptorOptionSystemUIFont = 1 << 1,
- kCTFontDescriptorOptionPreferAppleSystemFont = kCTFontOptionsPreferSystemFont
-};
-
</del><span class="cx"> CTFontDescriptorRef CTFontDescriptorCreateWithAttributesAndOptions(CFDictionaryRef attributes, CTFontDescriptorOptions);
</span><span class="cx">
</span><span class="cx"> extern const CFStringRef kCTFontDescriptorTextStyleAttribute;
</span><span class="cx"> extern const CFStringRef kCTFontUIFontDesignTrait;
</span><del>-#endif
-#endif
</del><span class="cx">
</span><span class="cx"> bool CTFontDescriptorIsSystemUIFont(CTFontDescriptorRef);
</span><span class="cx"> CTFontRef CTFontCreateForCSS(CFStringRef name, uint16_t weight, CTFontSymbolicTraits, CGFloat size);
</span><span class="cx"> CTFontRef CTFontCreateForCharactersWithLanguage(CTFontRef currentFont, const UTF16Char *characters, CFIndex length, CFStringRef language, CFIndex *coveredLength);
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
</del><span class="cx"> extern const CFStringRef kCTUIFontTextStyleShortHeadline;
</span><span class="cx"> extern const CFStringRef kCTUIFontTextStyleShortBody;
</span><span class="cx"> extern const CFStringRef kCTUIFontTextStyleShortSubhead;
</span><span class="lines">@@ -118,14 +110,11 @@
</span><span class="cx"> extern const CGFloat kCTFontWeightBold;
</span><span class="cx"> extern const CGFloat kCTFontWeightHeavy;
</span><span class="cx"> extern const CGFloat kCTFontWeightBlack;
</span><del>-#endif
</del><span class="cx">
</span><del>-#if PLATFORM(IOS)
</del><span class="cx"> extern const CFStringRef kCTUIFontTextStyleTitle1;
</span><span class="cx"> extern const CFStringRef kCTUIFontTextStyleTitle2;
</span><span class="cx"> extern const CFStringRef kCTUIFontTextStyleTitle3;
</span><span class="cx"> CTFontDescriptorRef CTFontCreatePhysicalFontDescriptorForCharactersWithLanguage(CTFontRef currentFont, const UTF16Char* characters, CFIndex length, CFStringRef language, CFIndex* coveredLength);
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> CTFontRef CTFontCreatePhysicalFontForCharactersWithLanguage(CTFontRef, const UTF16Char* characters, CFIndex length, CFStringRef language, CFIndex* coveredLength);
</span><span class="cx"> bool CTFontIsAppleColorEmoji(CTFontRef);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCoreplatformtextTextFlagsh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/text/TextFlags.h (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/text/TextFlags.h        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/text/TextFlags.h        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -52,6 +52,8 @@
</span><span class="cx"> AllowLeadingExpansion = 1 << 2,
</span><span class="cx"> ForceLeadingExpansion = 2 << 2,
</span><span class="cx"> LeadingExpansionMask = 3 << 2,
</span><ins>+
+ DefaultExpansion = AllowTrailingExpansion | ForbidLeadingExpansion,
</ins><span class="cx"> };
</span><span class="cx"> typedef unsigned ExpansionBehavior;
</span><span class="cx">
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCorerenderingRenderBlockcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.cpp (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.cpp        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.cpp        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -3801,24 +3801,24 @@
</span><span class="cx"> return constructTextRun(StringView(string), style, expansion, flags);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-TextRun RenderBlock::constructTextRun(const RenderText* text, const RenderStyle& style, ExpansionBehavior expansion)
</del><ins>+TextRun RenderBlock::constructTextRun(const RenderText& text, const RenderStyle& style, ExpansionBehavior expansion)
</ins><span class="cx"> {
</span><del>- return constructTextRun(text->stringView(), style, expansion);
</del><ins>+ return constructTextRun(text.stringView(), style, expansion);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-TextRun RenderBlock::constructTextRun(const RenderText* text, unsigned offset, unsigned length, const RenderStyle& style, ExpansionBehavior expansion)
</del><ins>+TextRun RenderBlock::constructTextRun(const RenderText& text, unsigned offset, unsigned length, const RenderStyle& style, ExpansionBehavior expansion)
</ins><span class="cx"> {
</span><span class="cx"> unsigned stop = offset + length;
</span><del>- ASSERT(stop <= text->textLength());
- return constructTextRun(text->stringView(offset, stop), style, expansion);
</del><ins>+ ASSERT(stop <= text.textLength());
+ return constructTextRun(text.stringView(offset, stop), style, expansion);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-TextRun RenderBlock::constructTextRun(const LChar* characters, int length, const RenderStyle& style, ExpansionBehavior expansion)
</del><ins>+TextRun RenderBlock::constructTextRun(const LChar* characters, unsigned length, const RenderStyle& style, ExpansionBehavior expansion)
</ins><span class="cx"> {
</span><span class="cx"> return constructTextRun(StringView(characters, length), style, expansion);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-TextRun RenderBlock::constructTextRun(const UChar* characters, int length, const RenderStyle& style, ExpansionBehavior expansion)
</del><ins>+TextRun RenderBlock::constructTextRun(const UChar* characters, unsigned length, const RenderStyle& style, ExpansionBehavior expansion)
</ins><span class="cx"> {
</span><span class="cx"> return constructTextRun(StringView(characters, length), style, expansion);
</span><span class="cx"> }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCorerenderingRenderBlockh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.h (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.h        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderBlock.h        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -204,17 +204,17 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static TextRun constructTextRun(StringView, const RenderStyle&,
</span><del>- ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextRunFlags = DefaultTextRunFlags);
</del><ins>+ ExpansionBehavior = DefaultExpansion, TextRunFlags = DefaultTextRunFlags);
</ins><span class="cx"> static TextRun constructTextRun(const String&, const RenderStyle&,
</span><del>- ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextRunFlags = DefaultTextRunFlags);
- static TextRun constructTextRun(const RenderText*, const RenderStyle&,
- ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
- static TextRun constructTextRun(const RenderText*, unsigned offset, unsigned length, const RenderStyle&,
- ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
- static TextRun constructTextRun(const LChar* characters, int length, const RenderStyle&,
- ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
- static TextRun constructTextRun(const UChar* characters, int length, const RenderStyle&,
- ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
</del><ins>+ ExpansionBehavior = DefaultExpansion, TextRunFlags = DefaultTextRunFlags);
+ static TextRun constructTextRun(const RenderText&, const RenderStyle&,
+ ExpansionBehavior = DefaultExpansion);
+ static TextRun constructTextRun(const RenderText&, unsigned offset, unsigned length, const RenderStyle&,
+ ExpansionBehavior = DefaultExpansion);
+ static TextRun constructTextRun(const LChar* characters, unsigned length, const RenderStyle&,
+ ExpansionBehavior = DefaultExpansion);
+ static TextRun constructTextRun(const UChar* characters, unsigned length, const RenderStyle&,
+ ExpansionBehavior = DefaultExpansion);
</ins><span class="cx">
</span><span class="cx"> LayoutUnit paginationStrut() const;
</span><span class="cx"> void setPaginationStrut(LayoutUnit);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCorerenderingRenderListMarkercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListMarker.cpp (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListMarker.cpp        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderListMarker.cpp        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -1543,7 +1543,7 @@
</span><span class="cx"> break;
</span><span class="cx"> case Asterisks:
</span><span class="cx"> case Footnotes: {
</span><del>- TextRun run = RenderBlock::constructTextRun(m_text, style(), AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
</del><ins>+ TextRun run = RenderBlock::constructTextRun(m_text, style());
</ins><span class="cx"> logicalWidth = font.width(run); // no suffix for these types
</span><span class="cx"> }
</span><span class="cx"> break;
</span><span class="lines">@@ -1630,7 +1630,7 @@
</span><span class="cx"> if (m_text.isEmpty())
</span><span class="cx"> logicalWidth = 0;
</span><span class="cx"> else {
</span><del>- TextRun run = RenderBlock::constructTextRun(m_text, style(), AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
</del><ins>+ TextRun run = RenderBlock::constructTextRun(m_text, style());
</ins><span class="cx"> LayoutUnit itemWidth = font.width(run);
</span><span class="cx"> UChar suffixSpace[2] = { listMarkerSuffix(type, m_listItem.value()), ' ' };
</span><span class="cx"> LayoutUnit suffixSpaceWidth = font.width(RenderBlock::constructTextRun(suffixSpace, 2, style()));
</span><span class="lines">@@ -1763,7 +1763,7 @@
</span><span class="cx"> case Asterisks:
</span><span class="cx"> case Footnotes: {
</span><span class="cx"> const FontCascade& font = style().fontCascade();
</span><del>- TextRun run = RenderBlock::constructTextRun(m_text, style(), AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
</del><ins>+ TextRun run = RenderBlock::constructTextRun(m_text, style());
</ins><span class="cx"> relativeRect = FloatRect(0, 0, font.width(run), font.fontMetrics().height());
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -1857,7 +1857,7 @@
</span><span class="cx"> if (m_text.isEmpty())
</span><span class="cx"> return FloatRect();
</span><span class="cx"> const FontCascade& font = style().fontCascade();
</span><del>- TextRun run = RenderBlock::constructTextRun(m_text, style(), AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
</del><ins>+ TextRun run = RenderBlock::constructTextRun(m_text, style());
</ins><span class="cx"> float itemWidth = font.width(run);
</span><span class="cx"> UChar suffixSpace[2] = { listMarkerSuffix(type, m_listItem.value()), ' ' };
</span><span class="cx"> float suffixSpaceWidth = font.width(RenderBlock::constructTextRun(suffixSpace, 2, style()));
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCorerenderingRenderMenuListcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderMenuList.cpp (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderMenuList.cpp        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderMenuList.cpp        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -219,13 +219,13 @@
</span><span class="cx"> optionWidth += minimumValueForLength(optionStyle->textIndent(), 0);
</span><span class="cx"> if (!text.isEmpty()) {
</span><span class="cx"> const FontCascade& font = style().fontCascade();
</span><del>- TextRun run = RenderBlock::constructTextRun(text, style(), AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
</del><ins>+ TextRun run = RenderBlock::constructTextRun(text, style());
</ins><span class="cx"> optionWidth += font.width(run);
</span><span class="cx"> }
</span><span class="cx"> maxOptionWidth = std::max(maxOptionWidth, optionWidth);
</span><span class="cx"> } else if (!text.isEmpty()) {
</span><span class="cx"> const FontCascade& font = style().fontCascade();
</span><del>- TextRun run = RenderBlock::constructTextRun(text, style(), AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
</del><ins>+ TextRun run = RenderBlock::constructTextRun(text, style());
</ins><span class="cx"> maxOptionWidth = std::max(maxOptionWidth, font.width(run));
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCorerenderingRenderTextcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderText.cpp (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderText.cpp        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderText.cpp        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -452,7 +452,7 @@
</span><span class="cx"> return box.root().computeCaretRect(left, caretWidth, extraWidthToEndOfLine);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ALWAYS_INLINE float RenderText::widthFromCache(const FontCascade& f, int start, int len, float xPos, HashSet<const Font*>* fallbackFonts, GlyphOverflow* glyphOverflow, const RenderStyle& style) const
</del><ins>+ALWAYS_INLINE float RenderText::widthFromCache(const FontCascade& f, unsigned start, unsigned len, float xPos, HashSet<const Font*>* fallbackFonts, GlyphOverflow* glyphOverflow, const RenderStyle& style) const
</ins><span class="cx"> {
</span><span class="cx"> if (style.hasTextCombine() && is<RenderCombineText>(*this)) {
</span><span class="cx"> const RenderCombineText& combineText = downcast<RenderCombineText>(*this);
</span><span class="lines">@@ -466,7 +466,7 @@
</span><span class="cx"> bool isSpace;
</span><span class="cx"> ASSERT(m_text);
</span><span class="cx"> StringImpl& text = *m_text.impl();
</span><del>- for (int i = start; i < start + len; i++) {
</del><ins>+ for (unsigned i = start; i < start + len; i++) {
</ins><span class="cx"> char c = text[i];
</span><span class="cx"> if (c <= ' ') {
</span><span class="cx"> if (c == ' ' || c == '\n') {
</span><span class="lines">@@ -492,7 +492,7 @@
</span><span class="cx"> return w;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- TextRun run = RenderBlock::constructTextRun(this, start, len, style);
</del><ins>+ TextRun run = RenderBlock::constructTextRun(*this, start, len, style);
</ins><span class="cx"> run.setCharactersLength(textLength() - start);
</span><span class="cx"> ASSERT(run.charactersLength() >= run.length());
</span><span class="cx">
</span><span class="lines">@@ -608,7 +608,7 @@
</span><span class="cx"> beginWS = !stripFrontSpaces && m_hasBeginWS;
</span><span class="cx"> endWS = m_hasEndWS;
</span><span class="cx">
</span><del>- int len = textLength();
</del><ins>+ unsigned len = textLength();
</ins><span class="cx">
</span><span class="cx"> if (!len || (stripFrontSpaces && text()->containsOnlyWhitespace())) {
</span><span class="cx"> beginMinW = 0;
</span><span class="lines">@@ -632,10 +632,9 @@
</span><span class="cx">
</span><span class="cx"> ASSERT(m_text);
</span><span class="cx"> StringImpl& text = *m_text.impl();
</span><del>- if (text[0] == ' ' || (text[0] == '\n' && !style.preserveNewline()) || text[0] == '\t') {
</del><ins>+ if (text[0] == space || (text[0] == newlineCharacter && !style.preserveNewline()) || text[0] == '\t') {
</ins><span class="cx"> const FontCascade& font = style.fontCascade(); // FIXME: This ignores first-line.
</span><span class="cx"> if (stripFrontSpaces) {
</span><del>- const UChar space = ' ';
</del><span class="cx"> float spaceWidth = font.width(RenderBlock::constructTextRun(&space, 1, style));
</span><span class="cx"> maxW -= spaceWidth;
</span><span class="cx"> } else
</span><span class="lines">@@ -653,8 +652,8 @@
</span><span class="cx"> bool firstLine = true;
</span><span class="cx"> beginMaxW = maxW;
</span><span class="cx"> endMaxW = maxW;
</span><del>- for (int i = 0; i < len; i++) {
- int linelen = 0;
</del><ins>+ for (unsigned i = 0; i < len; i++) {
+ unsigned linelen = 0;
</ins><span class="cx"> while (i + linelen < len && text[i + linelen] != '\n')
</span><span class="cx"> linelen++;
</span><span class="cx">
</span><span class="lines">@@ -726,13 +725,14 @@
</span><span class="cx"> m_knownToHaveNoOverflowAndNoFallbackFonts = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline float hyphenWidth(RenderText* renderer, const FontCascade& font)
</del><ins>+static inline float hyphenWidth(RenderText& renderer, const FontCascade& font)
</ins><span class="cx"> {
</span><del>- const RenderStyle& style = renderer->style();
- return font.width(RenderBlock::constructTextRun(style.hyphenString().string(), style));
</del><ins>+ const RenderStyle& style = renderer.style();
+ auto textRun = RenderBlock::constructTextRun(style.hyphenString().string(), style);
+ return font.width(textRun);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-static float maxWordFragmentWidth(RenderText* renderer, const RenderStyle& style, const FontCascade& font, StringView word, int minimumPrefixLength, unsigned minimumSuffixLength, int& suffixStart, HashSet<const Font*>& fallbackFonts, GlyphOverflow& glyphOverflow)
</del><ins>+static float maxWordFragmentWidth(RenderText& renderer, const RenderStyle& style, const FontCascade& font, StringView word, unsigned minimumPrefixLength, unsigned minimumSuffixLength, unsigned& suffixStart, HashSet<const Font*>& fallbackFonts, GlyphOverflow& glyphOverflow)
</ins><span class="cx"> {
</span><span class="cx"> suffixStart = 0;
</span><span class="cx"> if (word.length() <= minimumSuffixLength)
</span><span class="lines">@@ -739,7 +739,8 @@
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="cx"> Vector<int, 8> hyphenLocations;
</span><del>- int hyphenLocation = word.length() - minimumSuffixLength;
</del><ins>+ ASSERT(word.length() >= minimumSuffixLength);
+ unsigned hyphenLocation = word.length() - minimumSuffixLength;
</ins><span class="cx"> while ((hyphenLocation = lastHyphenLocation(word, hyphenLocation, style.locale())) >= minimumPrefixLength)
</span><span class="cx"> hyphenLocations.append(hyphenLocation);
</span><span class="cx">
</span><span class="lines">@@ -758,7 +759,7 @@
</span><span class="cx">
</span><span class="cx"> TextRun run = RenderBlock::constructTextRun(fragmentWithHyphen.toString(), style);
</span><span class="cx"> run.setCharactersLength(fragmentWithHyphen.length());
</span><del>- run.setCharacterScanForCodePath(!renderer->canUseSimpleFontCodePath());
</del><ins>+ run.setCharacterScanForCodePath(!renderer.canUseSimpleFontCodePath());
</ins><span class="cx"> float fragmentWidth = font.width(run, &fallbackFonts, &glyphOverflow);
</span><span class="cx">
</span><span class="cx"> // Narrow prefixes are ignored. See tryHyphenating in RenderBlockLineLayout.cpp.
</span><span class="lines">@@ -807,19 +808,17 @@
</span><span class="cx"> // If automatic hyphenation is allowed, we keep track of the width of the widest word (or word
</span><span class="cx"> // fragment) encountered so far, and only try hyphenating words that are wider.
</span><span class="cx"> float maxWordWidth = std::numeric_limits<float>::max();
</span><del>- int minimumPrefixLength = 0;
- int minimumSuffixLength = 0;
</del><ins>+ unsigned minimumPrefixLength = 0;
+ unsigned minimumSuffixLength = 0;
</ins><span class="cx"> if (style.hyphens() == HyphensAuto && canHyphenate(style.locale())) {
</span><span class="cx"> maxWordWidth = 0;
</span><span class="cx">
</span><span class="cx"> // Map 'hyphenate-limit-{before,after}: auto;' to 2.
</span><del>- minimumPrefixLength = style.hyphenationLimitBefore();
- if (minimumPrefixLength < 0)
- minimumPrefixLength = 2;
</del><ins>+ auto before = style.hyphenationLimitBefore();
+ minimumPrefixLength = before < 0 ? 2 : before;
</ins><span class="cx">
</span><del>- minimumSuffixLength = style.hyphenationLimitAfter();
- if (minimumSuffixLength < 0)
- minimumSuffixLength = 2;
</del><ins>+ auto after = style.hyphenationLimitAfter();
+ minimumSuffixLength = after < 0 ? 2 : after;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Optional<int> firstGlyphLeftOverflow;
</span><span class="lines">@@ -906,12 +905,12 @@
</span><span class="cx"> else {
</span><span class="cx"> w = widthFromCache(font, i, wordLen, leadWidth + currMaxWidth, &fallbackFonts, &glyphOverflow, style);
</span><span class="cx"> if (c == softHyphen && style.hyphens() != HyphensNone)
</span><del>- currMinWidth = hyphenWidth(this, font);
</del><ins>+ currMinWidth = hyphenWidth(*this, font);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (w > maxWordWidth) {
</span><del>- int suffixStart;
- float maxFragmentWidth = maxWordFragmentWidth(this, style, font, StringView(m_text).substring(i, wordLen), minimumPrefixLength, minimumSuffixLength, suffixStart, fallbackFonts, glyphOverflow);
</del><ins>+ unsigned suffixStart;
+ float maxFragmentWidth = maxWordFragmentWidth(*this, style, font, StringView(m_text).substring(i, wordLen), minimumPrefixLength, minimumSuffixLength, suffixStart, fallbackFonts, glyphOverflow);
</ins><span class="cx">
</span><span class="cx"> if (suffixStart) {
</span><span class="cx"> float suffixWidth;
</span><span class="lines">@@ -985,7 +984,7 @@
</span><span class="cx"> m_maxWidth = currMaxWidth;
</span><span class="cx"> currMaxWidth = 0;
</span><span class="cx"> } else {
</span><del>- TextRun run = RenderBlock::constructTextRun(this, i, 1, style);
</del><ins>+ TextRun run = RenderBlock::constructTextRun(*this, i, 1, style);
</ins><span class="cx"> run.setCharactersLength(len - i);
</span><span class="cx"> ASSERT(run.charactersLength() >= run.length());
</span><span class="cx"> run.setTabSize(!style.collapseWhiteSpace(), style.tabSize());
</span><span class="lines">@@ -1325,7 +1324,7 @@
</span><span class="cx"> } else
</span><span class="cx"> w = widthFromCache(f, from, len, xPos, fallbackFonts, glyphOverflow, style);
</span><span class="cx"> } else {
</span><del>- TextRun run = RenderBlock::constructTextRun(this, from, len, style);
</del><ins>+ TextRun run = RenderBlock::constructTextRun(*this, from, len, style);
</ins><span class="cx"> run.setCharactersLength(textLength() - from);
</span><span class="cx"> ASSERT(run.charactersLength() >= run.length());
</span><span class="cx">
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCorerenderingRenderTexth"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderText.h (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderText.h        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderText.h        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx">
</span><span class="cx"> bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation&, const LayoutPoint&, HitTestAction) final { ASSERT_NOT_REACHED(); return false; }
</span><span class="cx">
</span><del>- float widthFromCache(const FontCascade&, int start, int len, float xPos, HashSet<const Font*>* fallbackFonts, GlyphOverflow*, const RenderStyle&) const;
</del><ins>+ float widthFromCache(const FontCascade&, unsigned start, unsigned len, float xPos, HashSet<const Font*>* fallbackFonts, GlyphOverflow*, const RenderStyle&) const;
</ins><span class="cx"> bool isAllASCII() const { return m_isAllASCII; }
</span><span class="cx"> bool computeUseBackslashAsYenSymbol() const;
</span><span class="cx">
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCorerenderingRenderThemeIOSmm"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderThemeIOS.mm (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderThemeIOS.mm        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/RenderThemeIOS.mm        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -575,7 +575,7 @@
</span><span class="cx"> }
</span><span class="cx"> float measureText(const String& string) const override
</span><span class="cx"> {
</span><del>- TextRun run = RenderBlock::constructTextRun(string, m_style, AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
</del><ins>+ TextRun run = RenderBlock::constructTextRun(string, m_style);
</ins><span class="cx"> return m_font.width(run);
</span><span class="cx"> }
</span><span class="cx"> private:
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCorerenderinglineBreakingContexth"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/line/BreakingContext.h (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/line/BreakingContext.h        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/line/BreakingContext.h        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -644,7 +644,7 @@
</span><span class="cx"> if (layout)
</span><span class="cx"> return FontCascade::width(*layout, from, len, &fallbackFonts);
</span><span class="cx">
</span><del>- TextRun run = RenderBlock::constructTextRun(&text, from, len, style);
</del><ins>+ TextRun run = RenderBlock::constructTextRun(text, from, len, style);
</ins><span class="cx"> run.setCharactersLength(text.textLength() - from);
</span><span class="cx"> ASSERT(run.charactersLength() >= run.length());
</span><span class="cx">
</span><span class="lines">@@ -693,7 +693,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> const RenderStyle& style = text.style();
</span><del>- TextRun run = RenderBlock::constructTextRun(&text, lastSpace, pos - lastSpace, style);
</del><ins>+ TextRun run = RenderBlock::constructTextRun(text, lastSpace, pos - lastSpace, style);
</ins><span class="cx"> run.setCharactersLength(text.textLength() - lastSpace);
</span><span class="cx"> ASSERT(run.charactersLength() >= run.length());
</span><span class="cx">
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCorerenderingsvgSVGInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> float scalingFactor = renderer().scalingFactor();
</span><span class="cx"> ASSERT(scalingFactor);
</span><span class="cx">
</span><del>- TextRun textRun = constructTextRun(&renderer().style(), fragment);
</del><ins>+ TextRun textRun = constructTextRun(renderer().style(), fragment);
</ins><span class="cx">
</span><span class="cx"> // Eventually handle lengthAdjust="spacingAndGlyphs".
</span><span class="cx"> // FIXME: Handle vertical text.
</span><span class="lines">@@ -107,10 +107,9 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-FloatRect SVGInlineTextBox::selectionRectForTextFragment(const SVGTextFragment& fragment, unsigned startPosition, unsigned endPosition, const RenderStyle* style) const
</del><ins>+FloatRect SVGInlineTextBox::selectionRectForTextFragment(const SVGTextFragment& fragment, unsigned startPosition, unsigned endPosition, const RenderStyle& style) const
</ins><span class="cx"> {
</span><span class="cx"> ASSERT_WITH_SECURITY_IMPLICATION(startPosition < endPosition);
</span><del>- ASSERT(style);
</del><span class="cx">
</span><span class="cx"> float scalingFactor = renderer().scalingFactor();
</span><span class="cx"> ASSERT(scalingFactor);
</span><span class="lines">@@ -157,7 +156,7 @@
</span><span class="cx"> if (!mapStartEndPositionsIntoFragmentCoordinates(fragment, fragmentStartPosition, fragmentEndPosition))
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- FloatRect fragmentRect = selectionRectForTextFragment(fragment, fragmentStartPosition, fragmentEndPosition, &style);
</del><ins>+ FloatRect fragmentRect = selectionRectForTextFragment(fragment, fragmentStartPosition, fragmentEndPosition, style);
</ins><span class="cx"> fragment.buildFragmentTransform(fragmentTransform);
</span><span class="cx"> if (!fragmentTransform.isIdentity())
</span><span class="cx"> fragmentRect = fragmentTransform.mapRect(fragmentRect);
</span><span class="lines">@@ -225,7 +224,7 @@
</span><span class="cx"> paintInfo.context().concatCTM(fragmentTransform);
</span><span class="cx">
</span><span class="cx"> paintInfo.context().setFillColor(backgroundColor);
</span><del>- paintInfo.context().fillRect(selectionRectForTextFragment(fragment, fragmentStartPosition, fragmentEndPosition, &style), backgroundColor);
</del><ins>+ paintInfo.context().fillRect(selectionRectForTextFragment(fragment, fragmentStartPosition, fragmentEndPosition, style), backgroundColor);
</ins><span class="cx">
</span><span class="cx"> m_paintingResourceMode = ApplyToDefaultMode;
</span><span class="cx"> }
</span><span class="lines">@@ -306,13 +305,15 @@
</span><span class="cx"> if (!hasFill)
</span><span class="cx"> continue;
</span><span class="cx"> m_paintingResourceMode = ApplyToFillMode | ApplyToTextMode;
</span><del>- paintText(paintInfo.context(), &style, selectionStyle, fragment, hasSelection, paintSelectedTextOnly);
</del><ins>+ ASSERT(selectionStyle);
+ paintText(paintInfo.context(), style, *selectionStyle, fragment, hasSelection, paintSelectedTextOnly);
</ins><span class="cx"> break;
</span><span class="cx"> case PaintTypeStroke:
</span><span class="cx"> if (!hasVisibleStroke)
</span><span class="cx"> continue;
</span><span class="cx"> m_paintingResourceMode = ApplyToStrokeMode | ApplyToTextMode;
</span><del>- paintText(paintInfo.context(), &style, selectionStyle, fragment, hasSelection, paintSelectedTextOnly);
</del><ins>+ ASSERT(selectionStyle);
+ paintText(paintInfo.context(), style, *selectionStyle, fragment, hasSelection, paintSelectedTextOnly);
</ins><span class="cx"> break;
</span><span class="cx"> case PaintTypeMarkers:
</span><span class="cx"> continue;
</span><span class="lines">@@ -333,17 +334,16 @@
</span><span class="cx"> ASSERT(!m_paintingResource);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool SVGInlineTextBox::acquirePaintingResource(GraphicsContext*& context, float scalingFactor, RenderBoxModelObject& renderer, const RenderStyle* style)
</del><ins>+bool SVGInlineTextBox::acquirePaintingResource(GraphicsContext*& context, float scalingFactor, RenderBoxModelObject& renderer, const RenderStyle& style)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(scalingFactor);
</span><del>- ASSERT(style);
</del><span class="cx"> ASSERT(m_paintingResourceMode != ApplyToDefaultMode);
</span><span class="cx">
</span><span class="cx"> Color fallbackColor;
</span><span class="cx"> if (m_paintingResourceMode & ApplyToFillMode)
</span><del>- m_paintingResource = RenderSVGResource::fillPaintingResource(renderer, *style, fallbackColor);
</del><ins>+ m_paintingResource = RenderSVGResource::fillPaintingResource(renderer, style, fallbackColor);
</ins><span class="cx"> else if (m_paintingResourceMode & ApplyToStrokeMode)
</span><del>- m_paintingResource = RenderSVGResource::strokePaintingResource(renderer, *style, fallbackColor);
</del><ins>+ m_paintingResource = RenderSVGResource::strokePaintingResource(renderer, style, fallbackColor);
</ins><span class="cx"> else {
</span><span class="cx"> // We're either called for stroking or filling.
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="lines">@@ -352,13 +352,13 @@
</span><span class="cx"> if (!m_paintingResource)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (!m_paintingResource->applyResource(renderer, *style, context, m_paintingResourceMode)) {
</del><ins>+ if (!m_paintingResource->applyResource(renderer, style, context, m_paintingResourceMode)) {
</ins><span class="cx"> if (fallbackColor.isValid()) {
</span><span class="cx"> RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::sharedSolidPaintingResource();
</span><span class="cx"> fallbackResource->setColor(fallbackColor);
</span><span class="cx">
</span><span class="cx"> m_paintingResource = fallbackResource;
</span><del>- m_paintingResource->applyResource(renderer, *style, context, m_paintingResourceMode);
</del><ins>+ m_paintingResource->applyResource(renderer, style, context, m_paintingResourceMode);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -376,7 +376,7 @@
</span><span class="cx"> m_paintingResource = nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool SVGInlineTextBox::prepareGraphicsContextForTextPainting(GraphicsContext*& context, float scalingFactor, const RenderStyle* style)
</del><ins>+bool SVGInlineTextBox::prepareGraphicsContextForTextPainting(GraphicsContext*& context, float scalingFactor, const RenderStyle& style)
</ins><span class="cx"> {
</span><span class="cx"> return acquirePaintingResource(context, scalingFactor, parent()->renderer(), style);
</span><span class="cx"> }
</span><span class="lines">@@ -386,16 +386,14 @@
</span><span class="cx"> releasePaintingResource(context, /* path */nullptr);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-TextRun SVGInlineTextBox::constructTextRun(const RenderStyle* style, const SVGTextFragment& fragment) const
</del><ins>+TextRun SVGInlineTextBox::constructTextRun(const RenderStyle& style, const SVGTextFragment& fragment) const
</ins><span class="cx"> {
</span><del>- ASSERT(style);
-
</del><span class="cx"> TextRun run(StringView(renderer().text()).substring(fragment.characterOffset, fragment.length)
</span><span class="cx"> , 0 /* xPos, only relevant with allowTabs=true */
</span><span class="cx"> , 0 /* padding, only relevant for justified text, not relevant for SVG */
</span><span class="cx"> , AllowTrailingExpansion
</span><span class="cx"> , direction()
</span><del>- , dirOverride() || style->rtlOrdering() == VisualOrder /* directionalOverride */);
</del><ins>+ , dirOverride() || style.rtlOrdering() == VisualOrder /* directionalOverride */);
</ins><span class="cx">
</span><span class="cx"> // We handle letter & word spacing ourselves.
</span><span class="cx"> run.disableSpacing();
</span><span class="lines">@@ -538,17 +536,17 @@
</span><span class="cx"> path.addRect(FloatRect(decorationOrigin, FloatSize(width, thickness)));
</span><span class="cx">
</span><span class="cx"> GraphicsContext* contextPtr = &context;
</span><del>- if (acquirePaintingResource(contextPtr, scalingFactor, decorationRenderer, &decorationStyle))
</del><ins>+ if (acquirePaintingResource(contextPtr, scalingFactor, decorationRenderer, decorationStyle))
</ins><span class="cx"> releasePaintingResource(contextPtr, &path);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SVGInlineTextBox::paintTextWithShadows(GraphicsContext& context, const RenderStyle* style, TextRun& textRun, const SVGTextFragment& fragment, unsigned startPosition, unsigned endPosition)
</del><ins>+void SVGInlineTextBox::paintTextWithShadows(GraphicsContext& context, const RenderStyle& style, TextRun& textRun, const SVGTextFragment& fragment, unsigned startPosition, unsigned endPosition)
</ins><span class="cx"> {
</span><span class="cx"> float scalingFactor = renderer().scalingFactor();
</span><span class="cx"> ASSERT(scalingFactor);
</span><span class="cx">
</span><span class="cx"> const FontCascade& scaledFont = renderer().scaledFont();
</span><del>- const ShadowData* shadow = style->textShadow();
</del><ins>+ const ShadowData* shadow = style.textShadow();
</ins><span class="cx">
</span><span class="cx"> FloatPoint textOrigin(fragment.x, fragment.y);
</span><span class="cx"> FloatSize textSize(fragment.width, fragment.height);
</span><span class="lines">@@ -587,11 +585,8 @@
</span><span class="cx"> } while (shadow);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SVGInlineTextBox::paintText(GraphicsContext& context, const RenderStyle* style, const RenderStyle* selectionStyle, const SVGTextFragment& fragment, bool hasSelection, bool paintSelectedTextOnly)
</del><ins>+void SVGInlineTextBox::paintText(GraphicsContext& context, const RenderStyle& style, const RenderStyle& selectionStyle, const SVGTextFragment& fragment, bool hasSelection, bool paintSelectedTextOnly)
</ins><span class="cx"> {
</span><del>- ASSERT(style);
- ASSERT(selectionStyle);
-
</del><span class="cx"> unsigned startPosition = 0;
</span><span class="cx"> unsigned endPosition = 0;
</span><span class="cx"> if (hasSelection) {
</span><span class="lines">@@ -612,12 +607,12 @@
</span><span class="cx">
</span><span class="cx"> // Draw text using selection style from the start to the end position of the selection
</span><span class="cx"> if (style != selectionStyle)
</span><del>- SVGResourcesCache::clientStyleChanged(parent()->renderer(), StyleDifferenceRepaint, *selectionStyle);
</del><ins>+ SVGResourcesCache::clientStyleChanged(parent()->renderer(), StyleDifferenceRepaint, selectionStyle);
</ins><span class="cx">
</span><span class="cx"> paintTextWithShadows(context, selectionStyle, textRun, fragment, startPosition, endPosition);
</span><span class="cx">
</span><span class="cx"> if (style != selectionStyle)
</span><del>- SVGResourcesCache::clientStyleChanged(parent()->renderer(), StyleDifferenceRepaint, *style);
</del><ins>+ SVGResourcesCache::clientStyleChanged(parent()->renderer(), StyleDifferenceRepaint, style);
</ins><span class="cx">
</span><span class="cx"> // Eventually draw text using regular style from the end position of the selection to the end of the current chunk part
</span><span class="cx"> if (endPosition < fragment.length && !paintSelectedTextOnly)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebCorerenderingsvgSVGInlineTextBoxh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/svg/SVGInlineTextBox.h (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/svg/SVGInlineTextBox.h        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/rendering/svg/SVGInlineTextBox.h        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -64,23 +64,23 @@
</span><span class="cx"> void setStartsNewTextChunk(bool newTextChunk) { m_startsNewTextChunk = newTextChunk; }
</span><span class="cx">
</span><span class="cx"> int offsetForPositionInFragment(const SVGTextFragment&, float position, bool includePartialGlyphs) const;
</span><del>- FloatRect selectionRectForTextFragment(const SVGTextFragment&, unsigned fragmentStartPosition, unsigned fragmentEndPosition, const RenderStyle*) const;
</del><ins>+ FloatRect selectionRectForTextFragment(const SVGTextFragment&, unsigned fragmentStartPosition, unsigned fragmentEndPosition, const RenderStyle&) const;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> bool isSVGInlineTextBox() const override { return true; }
</span><span class="cx">
</span><del>- TextRun constructTextRun(const RenderStyle*, const SVGTextFragment&) const;
</del><ins>+ TextRun constructTextRun(const RenderStyle&, const SVGTextFragment&) const;
</ins><span class="cx">
</span><del>- bool acquirePaintingResource(GraphicsContext*&, float scalingFactor, RenderBoxModelObject&, const RenderStyle*);
</del><ins>+ bool acquirePaintingResource(GraphicsContext*&, float scalingFactor, RenderBoxModelObject&, const RenderStyle&);
</ins><span class="cx"> void releasePaintingResource(GraphicsContext*&, const Path*);
</span><span class="cx">
</span><del>- bool prepareGraphicsContextForTextPainting(GraphicsContext*&, float scalingFactor, const RenderStyle*);
</del><ins>+ bool prepareGraphicsContextForTextPainting(GraphicsContext*&, float scalingFactor, const RenderStyle&);
</ins><span class="cx"> void restoreGraphicsContextAfterTextPainting(GraphicsContext*&);
</span><span class="cx">
</span><span class="cx"> void paintDecoration(GraphicsContext&, TextDecoration, const SVGTextFragment&);
</span><span class="cx"> void paintDecorationWithStyle(GraphicsContext&, TextDecoration, const SVGTextFragment&, RenderBoxModelObject& decorationRenderer);
</span><del>- void paintTextWithShadows(GraphicsContext&, const RenderStyle*, TextRun&, const SVGTextFragment&, unsigned startPosition, unsigned endPosition);
- void paintText(GraphicsContext&, const RenderStyle*, const RenderStyle* selectionStyle, const SVGTextFragment&, bool hasSelection, bool paintSelectedTextOnly);
</del><ins>+ void paintTextWithShadows(GraphicsContext&, const RenderStyle&, TextRun&, const SVGTextFragment&, unsigned startPosition, unsigned endPosition);
+ void paintText(GraphicsContext&, const RenderStyle&, const RenderStyle& selectionStyle, const SVGTextFragment&, bool hasSelection, bool paintSelectedTextOnly);
</ins><span class="cx">
</span><span class="cx"> bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom, HitTestAction) override;
</span><span class="cx">
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit/mac/ChangeLog (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit/mac/ChangeLog        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit/mac/ChangeLog        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-09-01 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Clean up TextRun-related code
+ https://bugs.webkit.org/show_bug.cgi?id=161473
+
+ Reviewed by Simon Fraser.
+
+ Remove unused #includes.
+
+ * WebCoreSupport/WebDragClient.mm:
+ * WebView/WebView.mm:
+
</ins><span class="cx"> 2016-08-30 Mark Lam <mark.lam@apple.com>
</span><span class="cx">
</span><span class="cx"> Introduce the ThrowScope and force every throw site to instantiate a ThrowScope.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKitmacWebCoreSupportWebDragClientmm"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -38,7 +38,6 @@
</span><span class="cx"> #import "WebKitNSStringExtras.h"
</span><span class="cx"> #import "WebNSPasteboardExtras.h"
</span><span class="cx"> #import "WebNSURLExtras.h"
</span><del>-#import "WebStringTruncator.h"
</del><span class="cx"> #import "WebUIDelegate.h"
</span><span class="cx"> #import "WebUIDelegatePrivate.h"
</span><span class="cx"> #import "WebViewInternal.h"
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit214SourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit/mac/WebView/WebView.mm (205613 => 205614)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.14/Source/WebKit/mac/WebView/WebView.mm        2016-09-08 09:40:13 UTC (rev 205613)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit/mac/WebView/WebView.mm        2016-09-08 09:54:24 UTC (rev 205614)
</span><span class="lines">@@ -260,7 +260,6 @@
</span><span class="cx"> #import <WebCore/ResourceLoadStatisticsStore.h>
</span><span class="cx"> #import <WebCore/SQLiteDatabaseTracker.h>
</span><span class="cx"> #import <WebCore/SmartReplace.h>
</span><del>-#import <WebCore/TextRun.h>
</del><span class="cx"> #import <WebCore/TileControllerMemoryHandlerIOS.h>
</span><span class="cx"> #import <WebCore/WAKWindow.h>
</span><span class="cx"> #import <WebCore/WKView.h>
</span></span></pre>
</div>
</div>
</body>
</html>