Changeset 139005 in webkit
- Timestamp:
- Jan 7, 2013 3:57:30 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r139002 r139005 1 2013-01-07 Joseph Pecoraro <pecoraro@apple.com> 2 3 String improvements in geolocation and notifications modules 4 https://bugs.webkit.org/show_bug.cgi?id=105352 5 6 Reviewed by Sam Weinig. 7 8 * Modules/geolocation/Geolocation.cpp: 9 (WebCore::Geolocation::GeoNotifier::timerFired): 10 (WebCore::Geolocation::startRequest): 11 (WebCore::Geolocation::requestUsesCachedPosition): 12 (WebCore::Geolocation::makeCachedPositionCallbacks): 13 (WebCore::Geolocation::setIsAllowed): 14 (WebCore::Geolocation::cancelRequests): 15 (WebCore::Geolocation::handlePendingPermissionNotifiers): 16 * Modules/geolocation/GeolocationController.cpp: 17 (WebCore::GeolocationController::positionChanged): 18 * Modules/notifications/WorkerContextNotifications.cpp: 19 Use ASCIILiteral for constant strings becoming WTFStrings. 20 21 (WebCore::WorkerContextNotifications::from): 22 Use AtomicString::ConstructFromLiteral for the static local. 23 1 24 2013-01-07 Chris Fleizach <cfleizach@apple.com> 2 25 -
trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp
r136164 r139005 31 31 #if ENABLE(GEOLOCATION) 32 32 33 #include "Chrome.h"34 #include "ChromeClient.h"35 33 #include "Document.h" 36 34 #include "Frame.h" … … 170 168 171 169 if (m_errorCallback) { 172 RefPtr<PositionError> error = PositionError::create(PositionError::TIMEOUT, "Timeout expired");170 RefPtr<PositionError> error = PositionError::create(PositionError::TIMEOUT, ASCIILiteral("Timeout expired")); 173 171 m_errorCallback->handleEvent(error.get()); 174 172 } … … 320 318 // the permission state can not change again in the lifetime of this page. 321 319 if (isDenied()) 322 notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));320 notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage))); 323 321 else if (haveSuitableCachedPosition(notifier->options())) 324 322 notifier->setUseCachedPosition(); … … 332 330 notifier->startTimerIfNeeded(); 333 331 else 334 notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage));332 notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage))); 335 333 } 336 334 … … 350 348 // since we last checked in startRequest. 351 349 if (isDenied()) { 352 notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));350 notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage))); 353 351 return; 354 352 } … … 384 382 notifier->startTimerIfNeeded(); 385 383 else 386 notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage));384 notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage))); 387 385 } 388 386 } … … 446 444 447 445 if (!isAllowed()) { 448 RefPtr<PositionError> error = PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage);446 RefPtr<PositionError> error = PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage)); 449 447 error->setIsFatal(true); 450 448 handleError(error.get()); … … 512 510 GeoNotifierVector::const_iterator end = notifiers.end(); 513 511 for (GeoNotifierVector::const_iterator it = notifiers.begin(); it != end; ++it) 514 (*it)->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, framelessDocumentErrorMessage));512 (*it)->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(framelessDocumentErrorMessage))); 515 513 } 516 514 … … 671 669 notifier->startTimerIfNeeded(); 672 670 else 673 notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, failedToStartServiceErrorMessage));671 notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, ASCIILiteral(failedToStartServiceErrorMessage))); 674 672 } else 675 notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));673 notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, ASCIILiteral(permissionDeniedErrorMessage))); 676 674 } 677 675 } -
trunk/Source/WebCore/Modules/geolocation/GeolocationController.cpp
r133976 r139005 104 104 position = InspectorInstrumentation::overrideGeolocationPosition(m_page, position); 105 105 if (!position) { 106 errorOccurred(GeolocationError::create(GeolocationError::PositionUnavailable, "PositionUnavailable").get());106 errorOccurred(GeolocationError::create(GeolocationError::PositionUnavailable, ASCIILiteral("PositionUnavailable")).get()); 107 107 return; 108 108 } -
trunk/Source/WebCore/Modules/notifications/WorkerContextNotifications.cpp
r121882 r139005 48 48 WorkerContextNotifications* WorkerContextNotifications::from(WorkerContext* context) 49 49 { 50 AtomicString supplementName = "WorkerContextNotifications";50 DEFINE_STATIC_LOCAL(AtomicString, supplementName, ("WorkerContextNotifications", AtomicString::ConstructFromLiteral)); 51 51 WorkerContextNotifications* supplement = static_cast<WorkerContextNotifications*>(Supplement<ScriptExecutionContext>::from(context, supplementName)); 52 52 if (!supplement) {
Note: See TracChangeset
for help on using the changeset viewer.