Changeset 127540 in webkit


Ignore:
Timestamp:
Sep 4, 2012 6:43:42 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

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.
Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r127538 r127540  
     12012-09-04  Adam Barth  <abarth@chromium.org>
     2
     3        Make chromium-linux build without WTF_DEPRECATED_STRING_OPERATORS
     4        https://bugs.webkit.org/show_bug.cgi?id=95798
     5
     6        Reviewed by Eric Seidel.
     7
     8        This patch makes the chromium-linux port build without
     9        WTF::String::operator+=.  There are a couple places that require some
     10        more careful study, and I've whitelisted those uses by defining
     11        WTF_DEPRECATED_STRING_OPERATORS at the top of the files. (See
     12        https://bugs.webkit.org/show_bug.cgi?id=95797 for an explanation of
     13        WTF_DEPRECATED_STRING_OPERATORS.)
     14
     15        * css/StylePropertySet.cpp:
     16        * inspector/InspectorOverlay.cpp:
     17        (WebCore::InspectorOverlay::drawNodeHighlight):
     18        * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
     19        (WebCore::CustomFilterValidatedProgram::rewriteMixVertexShader):
     20
    1212012-09-04  Tony Chang  <tony@chromium.org>
    222
  • trunk/Source/WebCore/css/StylePropertySet.cpp

    r127375 r127540  
    1919 * Boston, MA 02110-1301, USA.
    2020 */
     21
     22#define WTF_DEPRECATED_STRING_OPERATORS
    2123
    2224#include "config.h"
  • trunk/Source/WebCore/inspector/InspectorOverlay.cpp

    r127240 r127540  
    5151#include "Settings.h"
    5252#include "StyledElement.h"
     53#include <wtf/text/StringBuilder.h>
    5354
    5455namespace WebCore {
     
    352353        HashSet<AtomicString> usedClassNames;
    353354        if (element->hasClass() && element->isStyledElement()) {
    354             String classNames;
     355            StringBuilder classNames;
    355356            const SpaceSplitString& classNamesString = static_cast<StyledElement*>(element)->classNames();
    356357            size_t classNameCount = classNamesString.size();
     
    360361                    continue;
    361362                usedClassNames.add(className);
    362                 classNames += makeString(".", className);
     363                classNames.append('.');
     364                classNames.append(className);
    363365            }
    364             elementInfo->setString("className", classNames);
     366            elementInfo->setString("className", classNames.toString());
    365367        }
    366368
  • trunk/Source/WebCore/platform/graphics/filters/CustomFilterValidatedProgram.cpp

    r127517 r127540  
    116116    // We write our own "main" function and call "css_main" from it.
    117117    // This makes rewriting easy and ensures that our code runs after all author code.
    118     m_validatedVertexShader += SHADER(
     118    m_validatedVertexShader.append(SHADER(
    119119        attribute mediump vec2 css_a_texCoord;
    120120        varying mediump vec2 css_v_texCoord;
     
    125125            css_v_texCoord = css_a_texCoord;
    126126        }
    127     );
     127    ));
    128128}
    129129
  • trunk/Source/WebKit/chromium/ChangeLog

    r127535 r127540  
     12012-09-04  Adam Barth  <abarth@chromium.org>
     2
     3        Make chromium-linux build without WTF_DEPRECATED_STRING_OPERATORS
     4        https://bugs.webkit.org/show_bug.cgi?id=95798
     5
     6        Reviewed by Eric Seidel.
     7
     8        * src/WebAccessibilityObject.cpp:
     9        (WebKit::WebAccessibilityObject::keyboardShortcut):
     10          - Remove use of WTF::String::operator+=
     11        * src/WebPageSerializerImpl.cpp:
     12          - Whitelist use of WTF::String::operator+=. Remove this use will take
     13            some more careful thought.
     14
    1152012-09-04  Alec Flett  <alecflett@chromium.org>
    216
  • trunk/Source/WebKit/chromium/src/WebAccessibilityObject.cpp

    r126932 r127540  
    5151#include "platform/WebString.h"
    5252#include "platform/WebURL.h"
     53#include <wtf/text/StringBuilder.h>
    5354
    5455using namespace WebCore;
     
    523524        // Ctrl+Alt+Shift+Meta+key. MSDN states that keyboard shortcut strings
    524525        // should not be localized and defines the separator as "+".
     526        StringBuilder modifierStringBuilder;
    525527        if (modifiers & PlatformEvent::CtrlKey)
    526             modifierString += "Ctrl+";
     528            modifierStringBuilder.appendLiteral("Ctrl+");
    527529        if (modifiers & PlatformEvent::AltKey)
    528             modifierString += "Alt+";
     530            modifierStringBuilder.appendLiteral("Alt+");
    529531        if (modifiers & PlatformEvent::ShiftKey)
    530             modifierString += "Shift+";
     532            modifierStringBuilder.appendLiteral("Shift+");
    531533        if (modifiers & PlatformEvent::MetaKey)
    532             modifierString += "Win+";
     534            modifierStringBuilder.appendLiteral("Win+");
     535        modifierString = modifierStringBuilder.toString();
    533536    }
    534537
  • trunk/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp

    r122115 r127540  
    7676// saved resource files.
    7777
     78#define WTF_DEPRECATED_STRING_OPERATORS
     79
    7880#include "config.h"
    7981#include "WebPageSerializerImpl.h"
Note: See TracChangeset for help on using the changeset viewer.