[Webkit-unassigned] [Bug 90603] [EFL] Support the permission function of the Web Notification.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 17 21:51:59 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=90603





--- Comment #17 from Kihong Kwon <kihong.kwon at samsung.com>  2012-07-17 21:51:58 PST ---
(In reply to comment #16)
> (From update of attachment 152903 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=152903&action=review
> 
> > Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.cpp:80
> > +    PermissionsMap::iterator iter = m_cachedPermissions.find(context->securityOrigin()->toString());
> > +
> > +    if (iter == m_cachedPermissions.end())
> > +        return PermissionNotAllowed;
> > +
> > +    if (iter->second)
> > +        return PermissionAllowed;
> > +
> >      return PermissionDenied;
> >  }
> 
> So this will never reach the last return? What is the difference between Denied and NotAllowed?

Denied means user already select deny when requestPermission has been called.
But, NotAllowed means there haven't been requested to the user yet, in this case requestPermission need to be called.

Last return statement can be called when iter->second(Permission allowed) is false.

> 
> > Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.cpp:82
> > +void NotificationPresenterClientEfl::addPermissionCache(const char* domain, const bool isAllowed)
> 
> addTo ?
OK. I'will change it.

> 
> > Source/WebKit/efl/WebCoreSupport/NotificationPresenterClientEfl.cpp:89
> > +    PermissionsMap::iterator iter = m_cachedPermissions.find(String(domain));
> > +
> > +    if (iter == m_cachedPermissions.end())
> > +        return;
> > +
> > +    m_cachedPermissions.add(String(domain), isAllowed);
> 
> So you check whehter is is already cached. If it is not you return, thus never cache :-(

I don't think so, permission cache is added in the requestPermission.
If we want to use notification, we need to call requestPermission to get a permission.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list