Changeset 206540 in webkit


Ignore:
Timestamp:
Sep 28, 2016, 1:35:52 PM (9 years ago)
Author:
commit-queue@webkit.org
Message:

WKSharedAPICast should not warn about acceptable custom context menu tag values
https://bugs.webkit.org/show_bug.cgi?id=162597
<rdar://problem/28487627>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-28
Reviewed by Tim Horton.

  • Shared/API/c/WKSharedAPICast.h:

(WebKit::toAPI):
(WebKit::toImpl):
Don't log an error when casting ContextMenu types if it is within
the Custom ContextMenu tag range.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r206527 r206540  
     12016-09-28  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        WKSharedAPICast should not warn about acceptable custom context menu tag values
     4        https://bugs.webkit.org/show_bug.cgi?id=162597
     5        <rdar://problem/28487627>
     6
     7        Reviewed by Tim Horton.
     8
     9        * Shared/API/c/WKSharedAPICast.h:
     10        (WebKit::toAPI):
     11        (WebKit::toImpl):
     12        Don't log an error when casting ContextMenu types if it is within
     13        the Custom ContextMenu tag range.
     14
    1152016-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
    216
  • trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h

    r203618 r206540  
    508508        return kWKContextMenuItemTagShareMenu;
    509509    default:
    510         if (action < WebCore::ContextMenuItemBaseApplicationTag)
    511             LOG_ERROR("ContextMenuAction %i is an unknown tag but is below the allowable custom tag value of %i", action, WebCore::  ContextMenuItemBaseApplicationTag);
     510        if (action < WebCore::ContextMenuItemBaseApplicationTag && !(action >= WebCore::ContextMenuItemBaseCustomTag && action <= WebCore::ContextMenuItemLastCustomTag))
     511            LOG_ERROR("ContextMenuAction %i is an unknown tag but is below the allowable custom tag value of %i", action, WebCore::ContextMenuItemBaseApplicationTag);
    512512        return static_cast<WKContextMenuItemTag>(action);
    513513    }
     
    703703    case kWKContextMenuItemTagOpenLinkInThisWindow:
    704704    default:
    705         if (tag < kWKContextMenuItemBaseApplicationTag)
     705        if (tag < kWKContextMenuItemBaseApplicationTag && !(tag >= WebCore::ContextMenuItemBaseCustomTag && tag <= WebCore::ContextMenuItemLastCustomTag))
    706706            LOG_ERROR("WKContextMenuItemTag %i is an unknown tag but is below the allowable custom tag value of %i", tag, kWKContextMenuItemBaseApplicationTag);
    707707        return static_cast<WebCore::ContextMenuAction>(tag);
Note: See TracChangeset for help on using the changeset viewer.