- Revision
- 127540
- Author
- commit-qu...@webkit.org
- Date
- 2012-09-04 18:43:42 -0700 (Tue, 04 Sep 2012)
Log Message
Make chromium-linux build without WTF_DEPRECATED_STRING_OPERATORS
https://bugs.webkit.org/show_bug.cgi?id=95798
Patch by Adam Barth <aba...@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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (127539 => 127540)
--- trunk/Source/WebCore/ChangeLog 2012-09-05 01:38:29 UTC (rev 127539)
+++ trunk/Source/WebCore/ChangeLog 2012-09-05 01:43:42 UTC (rev 127540)
@@ -1,3 +1,23 @@
+2012-09-04 Adam Barth <aba...@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 <t...@chromium.org>
Use TrackedRendererListHashSet typedef for percentHeightDescendants()
Modified: trunk/Source/WebCore/css/StylePropertySet.cpp (127539 => 127540)
--- trunk/Source/WebCore/css/StylePropertySet.cpp 2012-09-05 01:38:29 UTC (rev 127539)
+++ trunk/Source/WebCore/css/StylePropertySet.cpp 2012-09-05 01:43:42 UTC (rev 127540)
@@ -19,6 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
+#define WTF_DEPRECATED_STRING_OPERATORS
+
#include "config.h"
#include "StylePropertySet.h"
Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (127539 => 127540)
--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp 2012-09-05 01:38:29 UTC (rev 127539)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp 2012-09-05 01:43:42 UTC (rev 127540)
@@ -50,6 +50,7 @@
#include "ScriptValue.h"
#include "Settings.h"
#include "StyledElement.h"
+#include <wtf/text/StringBuilder.h>
namespace WebCore {
@@ -351,7 +352,7 @@
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 @@
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();
Modified: trunk/Source/WebCore/platform/graphics/filters/CustomFilterValidatedProgram.cpp (127539 => 127540)
--- trunk/Source/WebCore/platform/graphics/filters/CustomFilterValidatedProgram.cpp 2012-09-05 01:38:29 UTC (rev 127539)
+++ trunk/Source/WebCore/platform/graphics/filters/CustomFilterValidatedProgram.cpp 2012-09-05 01:43:42 UTC (rev 127540)
@@ -115,7 +115,7 @@
// 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 @@
css_main();
css_v_texCoord = css_a_texCoord;
}
- );
+ ));
}
void CustomFilterValidatedProgram::rewriteMixFragmentShader()
Modified: trunk/Source/WebKit/chromium/ChangeLog (127539 => 127540)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-09-05 01:38:29 UTC (rev 127539)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-09-05 01:43:42 UTC (rev 127540)
@@ -1,3 +1,17 @@
+2012-09-04 Adam Barth <aba...@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 <alecfl...@chromium.org>
IndexedDB: remove final createIndex backend glue
Modified: trunk/Source/WebKit/chromium/src/WebAccessibilityObject.cpp (127539 => 127540)
--- trunk/Source/WebKit/chromium/src/WebAccessibilityObject.cpp 2012-09-05 01:38:29 UTC (rev 127539)
+++ trunk/Source/WebKit/chromium/src/WebAccessibilityObject.cpp 2012-09-05 01:43:42 UTC (rev 127540)
@@ -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 @@
// 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);
Modified: trunk/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp (127539 => 127540)
--- trunk/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp 2012-09-05 01:38:29 UTC (rev 127539)
+++ trunk/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp 2012-09-05 01:43:42 UTC (rev 127540)
@@ -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"