Changeset 148854 in webkit


Ignore:
Timestamp:
Apr 21, 2013 10:54:11 PM (11 years ago)
Author:
benjamin@webkit.org
Message:

Fix some minor bad use of strings in WebCore
https://bugs.webkit.org/show_bug.cgi?id=114907

Reviewed by Darin Adler.

  • editing/Editor.cpp:

(WebCore::Editor::selectedText): This was implicitly getting the emptyString()
for the argument "".

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::takeResults): ditto.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r148852 r148854  
     12013-04-21  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Fix some minor bad use of strings in WebCore
     4        https://bugs.webkit.org/show_bug.cgi?id=114907
     5
     6        Reviewed by Darin Adler.
     7
     8        * editing/Editor.cpp:
     9        (WebCore::Editor::selectedText): This was implicitly getting the emptyString()
     10        for the argument "".
     11        * editing/markup.cpp:
     12        (WebCore::StyledMarkupAccumulator::takeResults): ditto.
     13
    1142013-04-21  Dirk Schulze  <krit@webkit.org>
    215
  • trunk/Source/WebCore/editing/Editor.cpp

    r148395 r148854  
    11/*
    2  * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2008, 2011, 2013 Apple Inc. All rights reserved.
    33 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
    44 *
     
    26482648{
    26492649    // We remove '\0' characters because they are not visibly rendered to the user.
    2650     return plainText(m_frame->selection()->toNormalizedRange().get(), behavior).replace(0, "");
     2650    return plainText(m_frame->selection()->toNormalizedRange().get(), behavior).replaceWithLiteral('\0', "");
    26512651}
    26522652
  • trunk/Source/WebCore/editing/markup.cpp

    r148770 r148854  
    11/*
    2  * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
    33 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved.
    44 * Copyright (C) 2011 Igalia S.L.
     
    219219
    220220    // We remove '\0' characters because they are not visibly rendered to the user.
    221     return result.toString().replace(0, "");
     221    return result.toString().replaceWithLiteral('\0', "");
    222222}
    223223
Note: See TracChangeset for help on using the changeset viewer.