Commit 2b0d51ac authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

Source/JavaScriptCore: Rename "makeSecure" to "fill" and remove the support...

Source/JavaScriptCore: Rename "makeSecure" to "fill" and remove the support for displaying last character
to avoid layering violatation.
https://bugs.webkit.org/show_bug.cgi?id=59114

Patch by Chang Shu <cshu@webkit.org> on 2011-07-08
Reviewed by Alexey Proskuryakov.

* JavaScriptCore.exp:
* JavaScriptCore.order:
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::fill):
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
(WTF::String::fill):

Source/WebCore: Update calling sites after function renamed.
https://bugs.webkit.org/show_bug.cgi?id=59114

Patch by Chang Shu <cshu@webkit.org> on 2011-07-08
Reviewed by Alexey Proskuryakov.

No new tests, just refactoring.

* editing/visible_units.cpp:
(WebCore::previousBoundary):
(WebCore::nextBoundary):
* rendering/RenderText.cpp:
(WebCore::RenderText::setTextInternal):

Source/WebKit/win: Update calling sites after function renamed.
https://bugs.webkit.org/show_bug.cgi?id=59114

Patch by Chang Shu <cshu@webkit.org> on 2011-07-08
Reviewed by Alexey Proskuryakov.

* WebKitGraphics.cpp:
(WebDrawText):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d490dc65
2011-07-08 Chang Shu <cshu@webkit.org>
Rename "makeSecure" to "fill" and remove the support for displaying last character
to avoid layering violatation.
https://bugs.webkit.org/show_bug.cgi?id=59114
Reviewed by Alexey Proskuryakov.
* JavaScriptCore.exp:
* JavaScriptCore.order:
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::fill):
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
(WTF::String::fill):
2011-07-08 Benjamin Poulain <benjamin@webkit.org>
 
[WK2] Do not forward touch events to the web process when it does not need them
......
......@@ -368,7 +368,7 @@ __ZN3WTF10StringImpl5upperEv
__ZN3WTF10StringImpl6createEPKc
__ZN3WTF10StringImpl6createEPKcj
__ZN3WTF10StringImpl6createEPKtj
__ZN3WTF10StringImpl6secureEtNS0_21LastCharacterBehaviorE
__ZN3WTF10StringImpl4fillEt
__ZN3WTF10StringImpl7replaceEPS0_S1_
__ZN3WTF10StringImpl7replaceEjjPS0_
__ZN3WTF10StringImpl7replaceEtPS0_
......
......@@ -1480,7 +1480,7 @@ __ZN3JSCL26stringProtoFuncToUpperCaseEPNS_9ExecStateE
__ZN3JSCL26stringProtoFuncLastIndexOfEPNS_9ExecStateE
__ZNK3JSC7JSValue20toIntegerPreserveNaNEPNS_9ExecStateE
__ZN3WTFeqERKNS_7CStringES2_
__ZN3WTF10StringImpl6secureEtNS0_21LastCharacterBehaviorE
__ZN3WTF10StringImpl4fillEt
__ZN3WTF22charactersToUIntStrictEPKtmPbi
__ZNK3WTF6String5upperEv
__ZNK3JSC11Interpreter18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_7JSValueE
......
......@@ -270,17 +270,15 @@ PassRefPtr<StringImpl> StringImpl::upper()
return newImpl.release();
}
PassRefPtr<StringImpl> StringImpl::secure(UChar character, LastCharacterBehavior behavior)
PassRefPtr<StringImpl> StringImpl::fill(UChar character)
{
if (!m_length)
return this;
UChar* data;
RefPtr<StringImpl> newImpl = createUninitialized(m_length, data);
unsigned lastCharacterIndex = m_length - 1;
for (unsigned i = 0; i < lastCharacterIndex; ++i)
for (unsigned i = 0; i < m_length; ++i)
data[i] = character;
data[lastCharacterIndex] = (behavior == ObscureLastCharacter) ? character : m_data[lastCharacterIndex];
return newImpl.release();
}
......
......@@ -284,9 +284,7 @@ public:
PassRefPtr<StringImpl> lower();
PassRefPtr<StringImpl> upper();
enum LastCharacterBehavior { ObscureLastCharacter, DisplayLastCharacter };
PassRefPtr<StringImpl> secure(UChar, LastCharacterBehavior = ObscureLastCharacter);
PassRefPtr<StringImpl> fill(UChar);
PassRefPtr<StringImpl> foldCase();
PassRefPtr<StringImpl> stripWhiteSpace();
......
......@@ -219,7 +219,7 @@ public:
void makeLower() { if (m_impl) m_impl = m_impl->lower(); }
void makeUpper() { if (m_impl) m_impl = m_impl->upper(); }
void makeSecure(UChar aChar) { if (m_impl) m_impl = m_impl->secure(aChar); }
void fill(UChar c) { if (m_impl) m_impl = m_impl->fill(c); }
WTF_EXPORT_PRIVATE void truncate(unsigned len);
WTF_EXPORT_PRIVATE void remove(unsigned pos, int len = 1);
......
2011-07-08 Chang Shu <cshu@webkit.org>
Update calling sites after function renamed.
https://bugs.webkit.org/show_bug.cgi?id=59114
Reviewed by Alexey Proskuryakov.
No new tests, just refactoring.
* editing/visible_units.cpp:
(WebCore::previousBoundary):
(WebCore::nextBoundary):
* rendering/RenderText.cpp:
(WebCore::RenderText::setTextInternal):
2011-07-08 Mihnea Ovidenie <mihnea@adobe.com>
 
[CSSRegions]Parse content: -webkit-from-flow
......
......@@ -103,7 +103,7 @@ static VisiblePosition previousBoundary(const VisiblePosition& c, BoundarySearch
else {
// Treat bullets used in the text security mode as regular characters when looking for boundaries
String iteratorString(it.characters(), it.length());
iteratorString = iteratorString.impl()->secure('x');
iteratorString.fill('x');
string.prepend(iteratorString.characters(), iteratorString.length());
}
next = searchFunction(string.data(), string.size(), string.size() - suffixLength, MayHaveMoreContext, needMoreContext);
......@@ -178,7 +178,7 @@ static VisiblePosition nextBoundary(const VisiblePosition& c, BoundarySearchFunc
else {
// Treat bullets used in the text security mode as regular characters when looking for boundaries
String iteratorString(it.characters(), it.length());
iteratorString = iteratorString.impl()->secure('x');
iteratorString.fill('x');
string.append(iteratorString.characters(), iteratorString.length());
}
next = searchFunction(string.data(), string.size(), prefixLength, MayHaveMoreContext, needMoreContext);
......
......@@ -1170,13 +1170,13 @@ void RenderText::setTextInternal(PassRefPtr<StringImpl> text)
case TSNONE:
break;
case TSCIRCLE:
m_text.makeSecure(whiteBullet);
m_text.fill(whiteBullet);
break;
case TSDISC:
m_text.makeSecure(bullet);
m_text.fill(bullet);
break;
case TSSQUARE:
m_text.makeSecure(blackSquare);
m_text.fill(blackSquare);
}
}
......
2011-07-08 Chang Shu <cshu@webkit.org>
Update calling sites after function renamed.
https://bugs.webkit.org/show_bug.cgi?id=59114
Reviewed by Alexey Proskuryakov.
* WebKitGraphics.cpp:
(WebDrawText):
2011-06-30 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
......
......@@ -104,7 +104,7 @@ void WebDrawText(WebTextRenderInfo* info)
GraphicsContext context(info->cgContext);
String drawString(info->text, info->length);
if (info->drawAsPassword)
drawString = drawString.impl()->secure(WTF::Unicode::bullet);
drawString.fill(WTF::Unicode::bullet);
context.save();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment