Index: third_party/WebKit/Source/modules/notifications/Notification.cpp |
diff --git a/third_party/WebKit/Source/modules/notifications/Notification.cpp b/third_party/WebKit/Source/modules/notifications/Notification.cpp |
index 75705784223a12196359d4c6b1b8bc99aaf7cf25..b254e9b85ff941cb1f0fa2a10dc34c5287f04c7f 100644 |
--- a/third_party/WebKit/Source/modules/notifications/Notification.cpp |
+++ b/third_party/WebKit/Source/modules/notifications/Notification.cpp |
@@ -68,8 +68,8 @@ Notification* Notification::create(ExecutionContext* context, |
const String& title, |
const NotificationOptions& options, |
ExceptionState& exceptionState) { |
- // The Web Notification constructor may be disabled through a runtime feature. The |
- // behavior of the constructor is changing, but not completely agreed upon yet. |
+ // The Notification constructor may be disabled through a runtime feature when |
+ // the platform does not support non-persistent notifications. |
if (!RuntimeEnabledFeatures::notificationConstructorEnabled()) { |
exceptionState.throwTypeError( |
"Illegal constructor. Use ServiceWorkerRegistration.showNotification() " |
@@ -77,7 +77,7 @@ Notification* Notification::create(ExecutionContext* context, |
return nullptr; |
} |
- // The Web Notification constructor may not be used in Service Worker contexts. |
+ // The Notification constructor may not be used in Service Worker contexts. |
if (context->isServiceWorkerGlobalScope()) { |
exceptionState.throwTypeError("Illegal constructor."); |
return nullptr; |
@@ -218,8 +218,8 @@ void Notification::dispatchErrorEvent() { |
} |
void Notification::dispatchCloseEvent() { |
- // The notification will be showing when the user initiated the close, or it will be |
- // closing if the developer initiated the close. |
+ // The notification should be Showing when the user initiated the close, or it |
harkness
2016/10/04 14:31:16
How about "if a" instead of "when the"?
Peter Beverloo
2016/10/04 14:38:04
Done ("if the")
|
+ // should be Closing when the developer initiated the close. |
if (m_state != State::Showing && m_state != State::Closing) |
return; |
@@ -325,8 +325,8 @@ Vector<v8::Local<v8::Value>> Notification::actions( |
action.setIcon(m_data.actions[i].icon.string()); |
action.setPlaceholder(m_data.actions[i].placeholder); |
- // Not just the sequence of actions itself, but also the actions contained within the |
- // sequence should be frozen per the Web Notification specification. |
+ // Both the Action dictionaries themselves and the sequence they'll be |
+ // returned in are expected to the frozen. This cannot be done with WebIDL. |
actions[i] = |
freezeV8Object(toV8(action, scriptState), scriptState->isolate()); |
} |