WebKit Bugzilla
Attachment 359006 Details for
Bug 193388
: Minor optimization to RenderText::setRenderedText()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193388-20190113102011.patch (text/plain), 2.30 KB, created by
Simon Fraser (smfr)
on 2019-01-13 10:20:11 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-01-13 10:20:11 PST
Size:
2.30 KB
patch
obsolete
>Subversion Revision: 239903 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3d27a2e6c0dbb7e565f59aa96e0440f80e114b91..cfcd2d35c8d1d4777cc67e441576e18b85439f2d 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2019-01-13 Simon Fraser <simon.fraser@apple.com> >+ >+ Minor optimization to RenderText::setRenderedText() >+ https://bugs.webkit.org/show_bug.cgi?id=193388 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Avoid the call to applyTextTransform() if TextTransform is None, so that we don't >+ have to call previousCharacter() and reassign m_text. >+ >+ Similar optimization in RenderText::textWithoutConvertingBackslashToYenSymbol(). >+ >+ Speedometer profiles show a few samples here, but this isn't going to win any prizes. >+ >+ * rendering/RenderText.cpp: >+ (WebCore::RenderText::setRenderedText): >+ (WebCore::RenderText::textWithoutConvertingBackslashToYenSymbol const): >+ > 2019-01-12 Zalan Bujtas <zalan@apple.com> > > [LFC] Block/InlinFormattingContext should take Block/InlineFormattingState >diff --git a/Source/WebCore/rendering/RenderText.cpp b/Source/WebCore/rendering/RenderText.cpp >index 8c1788a2376d972c9f5960c74fb8cdb186ab2cfa..b675cc8a3bcc6cb3bdd54b106c9a847508db8e42 100644 >--- a/Source/WebCore/rendering/RenderText.cpp >+++ b/Source/WebCore/rendering/RenderText.cpp >@@ -1169,10 +1169,12 @@ void RenderText::setRenderedText(const String& newText) > > if (m_useBackslashAsYenSymbol) > m_text.replace('\\', yenSign); >+ >+ const auto& style = this->style(); >+ if (style.textTransform() != TextTransform::None) >+ m_text = applyTextTransform(style, m_text, previousCharacter()); > >- m_text = applyTextTransform(style(), m_text, previousCharacter()); >- >- switch (style().textSecurity()) { >+ switch (style.textSecurity()) { > case TextSecurity::None: > break; > #if !PLATFORM(IOS_FAMILY) >@@ -1294,6 +1296,10 @@ String RenderText::textWithoutConvertingBackslashToYenSymbol() const > { > if (!m_useBackslashAsYenSymbol || style().textSecurity() != TextSecurity::None) > return text(); >+ >+ if (style().textTransform() == TextTransform::None) >+ return originalText(); >+ > return applyTextTransform(style(), originalText(), previousCharacter()); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193388
: 359006