Make chromium-linux build without WTF_DEPRECATED_STRING_OPERATORS

https://bugs.webkit.org/show_bug.cgi?id=95798

Patch by Adam Barth <abarth@chromium.org> on 2012-09-04
Reviewed by Eric Seidel.

Source/WebCore:

This patch makes the chromium-linux port build without
WTF::String::operator+=.  There are a couple places that require some
more careful study, and I've whitelisted those uses by defining
WTF_DEPRECATED_STRING_OPERATORS at the top of the files. (See
https://bugs.webkit.org/show_bug.cgi?id=95797 for an explanation of
WTF_DEPRECATED_STRING_OPERATORS.)

* css/StylePropertySet.cpp:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::drawNodeHighlight):
* platform/graphics/filters/CustomFilterValidatedProgram.cpp:
(WebCore::CustomFilterValidatedProgram::rewriteMixVertexShader):

Source/WebKit/chromium:

* src/WebAccessibilityObject.cpp:
(WebKit::WebAccessibilityObject::keyboardShortcut):
  - Remove use of WTF::String::operator+=
* src/WebPageSerializerImpl.cpp:
  - Whitelist use of WTF::String::operator+=. Remove this use will take
    some more careful thought.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 77c06592
2012-09-04 Adam Barth <abarth@chromium.org>
Make chromium-linux build without WTF_DEPRECATED_STRING_OPERATORS
https://bugs.webkit.org/show_bug.cgi?id=95798
Reviewed by Eric Seidel.
This patch makes the chromium-linux port build without
WTF::String::operator+=. There are a couple places that require some
more careful study, and I've whitelisted those uses by defining
WTF_DEPRECATED_STRING_OPERATORS at the top of the files. (See
https://bugs.webkit.org/show_bug.cgi?id=95797 for an explanation of
WTF_DEPRECATED_STRING_OPERATORS.)
* css/StylePropertySet.cpp:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::drawNodeHighlight):
* platform/graphics/filters/CustomFilterValidatedProgram.cpp:
(WebCore::CustomFilterValidatedProgram::rewriteMixVertexShader):
2012-09-04 Tony Chang <tony@chromium.org>
Use TrackedRendererListHashSet typedef for percentHeightDescendants()
......@@ -19,6 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
#define WTF_DEPRECATED_STRING_OPERATORS
#include "config.h"
#include "StylePropertySet.h"
......
......@@ -50,6 +50,7 @@
#include "ScriptValue.h"
#include "Settings.h"
#include "StyledElement.h"
#include <wtf/text/StringBuilder.h>
namespace WebCore {
......@@ -351,7 +352,7 @@ void InspectorOverlay::drawNodeHighlight()
elementInfo->setString("idValue", element->getIdAttribute());
HashSet<AtomicString> usedClassNames;
if (element->hasClass() && element->isStyledElement()) {
String classNames;
StringBuilder classNames;
const SpaceSplitString& classNamesString = static_cast<StyledElement*>(element)->classNames();
size_t classNameCount = classNamesString.size();
for (size_t i = 0; i < classNameCount; ++i) {
......@@ -359,9 +360,10 @@ void InspectorOverlay::drawNodeHighlight()
if (usedClassNames.contains(className))
continue;
usedClassNames.add(className);
classNames += makeString(".", className);
classNames.append('.');
classNames.append(className);
}
elementInfo->setString("className", classNames);
elementInfo->setString("className", classNames.toString());
}
RenderObject* renderer = node->renderer();
......
......@@ -115,7 +115,7 @@ void CustomFilterValidatedProgram::rewriteMixVertexShader()
// During validation, ANGLE renamed the author's "main" function to "css_main".
// We write our own "main" function and call "css_main" from it.
// This makes rewriting easy and ensures that our code runs after all author code.
m_validatedVertexShader += SHADER(
m_validatedVertexShader.append(SHADER(
attribute mediump vec2 css_a_texCoord;
varying mediump vec2 css_v_texCoord;
......@@ -124,7 +124,7 @@ void CustomFilterValidatedProgram::rewriteMixVertexShader()
css_main();
css_v_texCoord = css_a_texCoord;
}
);
));
}
void CustomFilterValidatedProgram::rewriteMixFragmentShader()
......
2012-09-04 Adam Barth <abarth@chromium.org>
Make chromium-linux build without WTF_DEPRECATED_STRING_OPERATORS
https://bugs.webkit.org/show_bug.cgi?id=95798
Reviewed by Eric Seidel.
* src/WebAccessibilityObject.cpp:
(WebKit::WebAccessibilityObject::keyboardShortcut):
- Remove use of WTF::String::operator+=
* src/WebPageSerializerImpl.cpp:
- Whitelist use of WTF::String::operator+=. Remove this use will take
some more careful thought.
2012-09-04 Alec Flett <alecflett@chromium.org>
IndexedDB: remove final createIndex backend glue
......
......@@ -50,6 +50,7 @@
#include "platform/WebRect.h"
#include "platform/WebString.h"
#include "platform/WebURL.h"
#include <wtf/text/StringBuilder.h>
using namespace WebCore;
......@@ -522,14 +523,16 @@ WebString WebAccessibilityObject::keyboardShortcut() const
// Follow the same order as Mozilla MSAA implementation:
// Ctrl+Alt+Shift+Meta+key. MSDN states that keyboard shortcut strings
// should not be localized and defines the separator as "+".
StringBuilder modifierStringBuilder;
if (modifiers & PlatformEvent::CtrlKey)
modifierString += "Ctrl+";
modifierStringBuilder.appendLiteral("Ctrl+");
if (modifiers & PlatformEvent::AltKey)
modifierString += "Alt+";
modifierStringBuilder.appendLiteral("Alt+");
if (modifiers & PlatformEvent::ShiftKey)
modifierString += "Shift+";
modifierStringBuilder.appendLiteral("Shift+");
if (modifiers & PlatformEvent::MetaKey)
modifierString += "Win+";
modifierStringBuilder.appendLiteral("Win+");
modifierString = modifierStringBuilder.toString();
}
return String(modifierString + accessKey);
......
......@@ -75,6 +75,8 @@
// override the incorrect base URL and make sure we alway load correct local
// saved resource files.
#define WTF_DEPRECATED_STRING_OPERATORS
#include "config.h"
#include "WebPageSerializerImpl.h"
......
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