Changeset 128537 in webkit


Ignore:
Timestamp:
Sep 13, 2012 6:15:39 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL][WK2] Implement missing initializeLogChannel function
https://bugs.webkit.org/show_bug.cgi?id=96478

Patch by KwangYong Choi <ky0.choi@samsung.com> on 2012-09-13
Reviewed by Gyuyoung Kim.

Implemented log channel initialization function for EFL platform in WebKit2.

  • Platform/Logging.cpp:

(WebKit):

  • Platform/Logging.h:

(WebKit):

  • Platform/efl/LoggingEfl.cpp: Added.

(WebKit):
(WebKit::initializeLogChannel): Channel is initialized if its name is found in WEBKIT_DEBUG.

  • PlatformEfl.cmake:
Location:
trunk/Source/WebKit2
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r128527 r128537  
     12012-09-13  KwangYong Choi  <ky0.choi@samsung.com>
     2
     3        [EFL][WK2] Implement missing initializeLogChannel function
     4        https://bugs.webkit.org/show_bug.cgi?id=96478
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        Implemented log channel initialization function for EFL platform in WebKit2.
     9
     10        * Platform/Logging.cpp:
     11        (WebKit):
     12        * Platform/Logging.h:
     13        (WebKit):
     14        * Platform/efl/LoggingEfl.cpp: Added.
     15        (WebKit):
     16        (WebKit::initializeLogChannel): Channel is initialized if its name is found in WEBKIT_DEBUG.
     17        * PlatformEfl.cmake:
     18
    1192012-09-13  Mark Rowe  <mrowe@apple.com>
    220
  • trunk/Source/WebKit2/Platform/Logging.cpp

    r121707 r128537  
    3939WTFLogChannel LogKeyHandling  = { 0x00000020, "WebKit2LogLevel", WTFLogChannelOff };
    4040
    41 #if !PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(QT)
     41#if !PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(QT) && !PLATFORM(EFL)
    4242void initializeLogChannel(WTFLogChannel* channel)
    4343{
     
    4646#endif
    4747
    48 #if PLATFORM(GTK) || PLATFORM(QT)
     48#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
    4949WTFLogChannel* getChannelFromName(const String& channelName)
    5050{
  • trunk/Source/WebKit2/Platform/Logging.h

    r121707 r128537  
    4747void initializeLogChannel(WTFLogChannel*);
    4848void initializeLogChannelsIfNecessary(void);
    49 #if PLATFORM(GTK) || PLATFORM(QT)
     49#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
    5050WTFLogChannel* getChannelFromName(const String& channelName);
    5151#endif
  • trunk/Source/WebKit2/Platform/efl/LoggingEfl.cpp

    r128536 r128537  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #ifndef WebKitLogging_h
    27 #define WebKitLogging_h
    28 
    29 #include <wtf/Assertions.h>
    30 #include <wtf/text/WTFString.h>
     26#include "config.h"
     27#include "Logging.h"
    3128
    3229#if !LOG_DISABLED
    3330
    34 #ifndef LOG_CHANNEL_PREFIX
    35 #define LOG_CHANNEL_PREFIX Log
    36 #endif
    37 
    3831namespace WebKit {
    3932
    40 extern WTFLogChannel LogContextMenu;
    41 extern WTFLogChannel LogIconDatabase;
    42 extern WTFLogChannel LogKeyHandling;
    43 extern WTFLogChannel LogSessionState;
    44 extern WTFLogChannel LogTextInput;
    45 extern WTFLogChannel LogView;
     33void initializeLogChannel(WTFLogChannel* channel)
     34{
     35    DEFINE_STATIC_LOCAL(Vector<WTFLogChannel*>, activatedChannels, ());
    4636
    47 void initializeLogChannel(WTFLogChannel*);
    48 void initializeLogChannelsIfNecessary(void);
    49 #if PLATFORM(GTK) || PLATFORM(QT)
    50 WTFLogChannel* getChannelFromName(const String& channelName);
    51 #endif
     37    // Fill activatedChannels vector only once based on names set in logValue.
     38    if (activatedChannels.isEmpty()) {
     39        const String logValue = getenv("WEBKIT_DEBUG");
     40        if (logValue.isEmpty())
     41            return;
     42
     43        Vector<String> activatedNames;
     44        logValue.split(',', activatedNames);
     45        for (size_t i = 0; i < activatedNames.size(); i++) {
     46            WTFLogChannel* activeChannel = getChannelFromName(activatedNames[i]);
     47            if (activeChannel)
     48                activatedChannels.append(activeChannel);
     49        }
     50    }
     51
     52    if (activatedChannels.contains(channel))
     53        channel->state = WTFLogChannelOn;
     54}
    5255
    5356} // namespace WebKit
    5457
    5558#endif // !LOG_DISABLED
    56 
    57 #endif // Logging_h
  • trunk/Source/WebKit2/PlatformEfl.cmake

    r128436 r128537  
    11LIST(APPEND WebKit2_SOURCES
     2    Platform/efl/LoggingEfl.cpp
    23    Platform/efl/ModuleEfl.cpp
    34    Platform/efl/WorkQueueEfl.cpp
Note: See TracChangeset for help on using the changeset viewer.