Changeset 150668 in webkit
- Timestamp:
- May 24, 2013 4:52:21 PM (11 years ago)
- Location:
- trunk/Source/WebKit/mac
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r150665 r150668 1 2013-05-24 Anders Carlsson <andersca@apple.com> 2 3 Remove using namespace std from Mac WebKit1 4 https://bugs.webkit.org/show_bug.cgi?id=116747 5 6 Reviewed by Sam Weinig. 7 8 Use explicit std:: qualifiers instead. 9 10 * History/BinaryPropertyList.cpp: 11 (IntegerArray::deletedValueSize): 12 (BinaryPropertyListPlan::invalidObjectReference): 13 (bytesNeeded): 14 * History/WebHistory.mm: 15 (-[WebHistoryPrivate orderedLastVisitedDays]): 16 (WebHistoryWriter::WebHistoryWriter): 17 * History/WebHistoryItem.mm: 18 (-[WebHistoryItem initFromDictionaryRepresentation:]): 19 * Plugins/Hosted/NetscapePluginHostManager.mm: 20 (WebKit::NetscapePluginHostManager::instantiatePlugin): 21 * Plugins/Hosted/NetscapePluginHostProxy.mm: 22 * Plugins/Hosted/NetscapePluginInstanceProxy.mm: 23 (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::idForObject): 24 (WebKit::NetscapePluginInstanceProxy::wheelEvent): 25 (WebKit::NetscapePluginInstanceProxy::print): 26 (WebKit::NetscapePluginInstanceProxy::snapshot): 27 (WebKit::NetscapePluginInstanceProxy::loadURL): 28 (WebKit::NetscapePluginInstanceProxy::createBindingsInstance): 29 * Plugins/Hosted/ProxyInstance.mm: 30 (WebKit::ProxyInstance::invoke): 31 (WebKit::ProxyInstance::supportsInvokeDefaultMethod): 32 (WebKit::ProxyInstance::supportsConstruct): 33 (WebKit::ProxyInstance::getPropertyNames): 34 (WebKit::ProxyInstance::methodNamed): 35 (WebKit::ProxyInstance::fieldNamed): 36 (WebKit::ProxyInstance::fieldValue): 37 (WebKit::ProxyInstance::setFieldValue): 38 * Plugins/WebBasePluginPackage.mm: 39 (-[WebBasePluginPackage supportsExtension:]): 40 (-[WebBasePluginPackage MIMETypeForExtension:]): 41 * Plugins/WebNetscapePluginStream.mm: 42 (WebNetscapePluginStream::deliverData): 43 * Plugins/WebNetscapePluginView.mm: 44 (PluginTimer::start): 45 (-[WebNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]): 46 * WebCoreSupport/WebFrameLoaderClient.mm: 47 * WebView/WebFrame.mm: 48 * WebView/WebHTMLView.mm: 49 (-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]): 50 * WebView/WebTextCompletionController.mm: 51 (-[WebTextCompletionController _placePopupWindow:]): 52 1 53 2013-05-24 Anders Carlsson <andersca@apple.com> 2 54 -
trunk/Source/WebKit/mac/History/BinaryPropertyList.cpp
r150665 r150668 31 31 #include <wtf/text/StringHash.h> 32 32 33 using namespace std;34 35 33 static const size_t headerSize = 8; 36 34 static const size_t trailerSize = 32; … … 63 61 64 62 private: 65 static size_t deletedValueSize() { return numeric_limits<size_t>::max(); }63 static size_t deletedValueSize() { return std::numeric_limits<size_t>::max(); } 66 64 67 65 friend bool operator==(const IntegerArray&, const IntegerArray&); … … 139 137 void writeStringObject(const char*); 140 138 141 static ObjectReference invalidObjectReference() { return numeric_limits<ObjectReference>::max(); }139 static ObjectReference invalidObjectReference() { return std::numeric_limits<ObjectReference>::max(); } 142 140 143 141 typedef HashMap<IntegerArray, ObjectReference, IntegerArrayHash, IntegerArrayHashTraits> IntegerArrayMap; … … 415 413 ASSERT(count); 416 414 int bytesNeeded = 1; 417 for (size_t mask = numeric_limits<size_t>::max() << 8; count & mask; mask <<= 8)415 for (size_t mask = std::numeric_limits<size_t>::max() << 8; count & mask; mask <<= 8) 418 416 ++bytesNeeded; 419 417 return bytesNeeded; -
trunk/Source/WebKit/mac/History/WebHistory.mm
r150665 r150668 38 38 39 39 using namespace WebCore; 40 using namespace std;41 40 42 41 typedef int64_t WebHistoryDateKey; … … 445 444 daysAsTimeIntervals.append(it->key); 446 445 447 s ort(daysAsTimeIntervals.begin(), daysAsTimeIntervals.end());446 std::sort(daysAsTimeIntervals.begin(), daysAsTimeIntervals.end()); 448 447 size_t count = daysAsTimeIntervals.size(); 449 448 _orderedLastVisitedDays = [[NSMutableArray alloc] initWithCapacity:count]; … … 901 900 for (DateToEntriesMap::const_iterator it = m_entriesByDate->begin(); it != end; ++it) 902 901 m_dateKeys.append(it->key); 903 s ort(m_dateKeys.begin(), m_dateKeys.end());902 std::sort(m_dateKeys.begin(), m_dateKeys.end()); 904 903 } 905 904 -
trunk/Source/WebKit/mac/History/WebHistoryItem.mm
r145789 r150668 74 74 75 75 using namespace WebCore; 76 using namespace std;77 76 78 77 typedef HashMap<HistoryItem*, WebHistoryItem*> HistoryItemMap; … … 376 375 // Daily and weekly counts < 0 are errors in the data read from disk, so reset to 0. 377 376 for (size_t i = 0; i < coreDailyCounts.size(); ++i) 378 coreDailyCounts[i] = max([[dailyCounts _webkit_numberAtIndex:i] intValue], 0);377 coreDailyCounts[i] = std::max([[dailyCounts _webkit_numberAtIndex:i] intValue], 0); 379 378 for (size_t i = 0; i < coreWeeklyCounts.size(); ++i) 380 coreWeeklyCounts[i] = max([[weeklyCounts _webkit_numberAtIndex:i] intValue], 0);379 coreWeeklyCounts[i] = std::max([[weeklyCounts _webkit_numberAtIndex:i] intValue], 0); 381 380 382 381 core(_private)->adoptVisitCounts(coreDailyCounts, coreWeeklyCounts); -
trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
r149255 r150668 45 45 } 46 46 47 using namespace std;48 47 using namespace WebCore; 49 48 … … 269 268 } 270 269 271 auto_ptr<NetscapePluginInstanceProxy::InstantiatePluginReply> reply = instance->waitForReply<NetscapePluginInstanceProxy::InstantiatePluginReply>(requestID);270 std::auto_ptr<NetscapePluginInstanceProxy::InstantiatePluginReply> reply = instance->waitForReply<NetscapePluginInstanceProxy::InstantiatePluginReply>(requestID); 272 271 if (!reply.get() || reply->m_resultCode != KERN_SUCCESS) { 273 272 instance->cleanup(); -
trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
r149665 r150668 46 46 } 47 47 48 using namespace std;49 48 using namespace JSC; 50 49 using namespace WebCore; -
trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
r149665 r150668 74 74 using namespace JSC; 75 75 using namespace JSC::Bindings; 76 using namespace std;77 76 using namespace WebCore; 78 77 … … 153 152 154 153 m_idToJSObjectMap.set(objectID, Strong<JSObject>(vm, object)); 155 m_jsObjectToIDMap.set(object, make_pair(objectID, 1));154 m_jsObjectToIDMap.set(object, std::make_pair(objectID, 1)); 156 155 157 156 return objectID; … … 484 483 [event deltaX], [event deltaY], [event deltaZ]); 485 484 486 auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);485 std::auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); 487 486 if (!reply.get() || !reply->m_result) 488 487 return false; … … 496 495 _WKPHPluginInstancePrint(m_pluginHostProxy->port(), m_pluginID, requestID, width, height); 497 496 498 auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);497 std::auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); 499 498 if (!reply.get() || !reply->m_returnValue) 500 499 return; … … 519 518 _WKPHPluginInstanceSnapshot(m_pluginHostProxy->port(), m_pluginID, requestID, width, height); 520 519 521 auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);520 std::auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); 522 521 if (!reply.get() || !reply->m_returnValue) 523 522 return; … … 597 596 598 597 if (contentLength) 599 dataLength = min(static_cast<unsigned>([contentLength intValue]), dataLength);598 dataLength = std::min(static_cast<unsigned>([contentLength intValue]), dataLength); 600 599 [header removeObjectForKey:@"Content-Length"]; 601 600 … … 1424 1423 return 0; 1425 1424 1426 auto_ptr<GetScriptableNPObjectReply> reply = waitForReply<GetScriptableNPObjectReply>(requestID);1425 std::auto_ptr<GetScriptableNPObjectReply> reply = waitForReply<GetScriptableNPObjectReply>(requestID); 1427 1426 if (!reply.get()) 1428 1427 return 0; -
trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
r148696 r150668 44 44 using namespace JSC; 45 45 using namespace JSC::Bindings; 46 using namespace std;47 46 using namespace WebCore; 48 47 … … 164 163 } 165 164 166 auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);165 std::auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); 167 166 NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec); 168 167 … … 243 242 return false; 244 243 245 auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);244 std::auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); 246 245 if (reply.get() && reply->m_result) 247 246 return true; … … 267 266 return false; 268 267 269 auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);268 std::auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); 270 269 if (reply.get() && reply->m_result) 271 270 return true; … … 321 320 return; 322 321 323 auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);322 std::auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); 324 323 NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec); 325 324 if (!reply.get() || !reply->m_returnValue) … … 368 367 return 0; 369 368 370 auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);369 std::auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); 371 370 if (!reply.get()) 372 371 return 0; … … 405 404 return 0; 406 405 407 auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);406 std::auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); 408 407 if (!reply.get()) 409 408 return 0; … … 432 431 return jsUndefined(); 433 432 434 auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID);433 std::auto_ptr<NetscapePluginInstanceProxy::BooleanAndDataReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanAndDataReply>(requestID); 435 434 NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec); 436 435 if (!reply.get() || !reply->m_returnValue) … … 462 461 return; 463 462 464 auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID);463 std::auto_ptr<NetscapePluginInstanceProxy::BooleanReply> reply = waitForReply<NetscapePluginInstanceProxy::BooleanReply>(requestID); 465 464 NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(exec); 466 465 } -
trunk/Source/WebKit/mac/Plugins/WebBasePluginPackage.mm
r150227 r150668 61 61 @end; 62 62 63 using namespace std;64 63 using namespace WebCore; 65 64 … … 311 310 const Vector<String>& extensions = pluginInfo.mimes[i].extensions; 312 311 313 if ( find(extensions.begin(), extensions.end(), extension) != extensions.end())312 if (std::find(extensions.begin(), extensions.end(), extension) != extensions.end()) 314 313 return YES; 315 314 } … … 338 337 const Vector<String>& extensions = mimeClassInfo.extensions; 339 338 340 if ( find(extensions.begin(), extensions.end(), extension) != extensions.end())339 if (std::find(extensions.begin(), extensions.end(), extension) != extensions.end()) 341 340 return mimeClassInfo.type; 342 341 } -
trunk/Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm
r149423 r150668 55 55 56 56 using namespace WebCore; 57 using namespace std;58 57 59 58 #define WEB_REASON_NONE -1 … … 524 523 break; 525 524 } else { 526 deliveryBytes = min(deliveryBytes, totalBytes - totalBytesDelivered);525 deliveryBytes = std::min(deliveryBytes, totalBytes - totalBytesDelivered); 527 526 NSData *subdata = [m_deliveryData.get() subdataWithRange:NSMakeRange(totalBytesDelivered, deliveryBytes)]; 528 527 PluginStopDeferrer deferrer(m_pluginView.get()); … … 533 532 return; 534 533 } 535 deliveryBytes = min<int32_t>(deliveryBytes, [subdata length]);534 deliveryBytes = std::min<int32_t>(deliveryBytes, [subdata length]); 536 535 m_offset += deliveryBytes; 537 536 totalBytesDelivered += deliveryBytes; -
trunk/Source/WebKit/mac/Plugins/WebNetscapePluginView.mm
r149562 r150668 92 92 using namespace WebCore; 93 93 using namespace WebKit; 94 using namespace std;95 94 96 95 static inline bool isDrawingModelQuickDraw(NPDrawingModel drawingModel) … … 137 136 138 137 if (throttle) 139 timeInterval = max(timeInterval, ThrottledTimerInterval);138 timeInterval = std::max(timeInterval, ThrottledTimerInterval); 140 139 141 140 if (m_repeat) … … 1852 1851 1853 1852 if (contentLength != nil) 1854 dataLength = min<unsigned>([contentLength intValue], dataLength);1853 dataLength = std::min<unsigned>([contentLength intValue], dataLength); 1855 1854 [header removeObjectForKey:@"Content-Length"]; 1856 1855 -
trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
r150609 r150668 141 141 using namespace WebCore; 142 142 using namespace HTMLNames; 143 using namespace std;144 143 145 144 // For backwards compatibility with older WebKit plug-ins. -
trunk/Source/WebKit/mac/WebView/WebFrame.mm
r150353 r150668 105 105 #import <wtf/CurrentTime.h> 106 106 107 using namespace std;108 107 using namespace WebCore; 109 108 using namespace HTMLNames; -
trunk/Source/WebKit/mac/WebView/WebHTMLView.mm
r150530 r150668 139 139 using namespace HTMLNames; 140 140 using namespace WTF; 141 using namespace std;142 141 143 142 @interface WebMenuTarget : NSObject { … … 2216 2215 // If the new bottom is equal to the old bottom (when both are treated as floats), we just return the original 2217 2216 // bottom. This prevents rounding errors that can occur when converting newBottom to a double. 2218 if (fabs(static_cast<float>(bottom) - newBottom) <= numeric_limits<float>::epsilon())2217 if (fabs(static_cast<float>(bottom) - newBottom) <= std::numeric_limits<float>::epsilon()) 2219 2218 return bottom; 2220 2219 else -
trunk/Source/WebKit/mac/WebView/WebTextCompletionController.mm
r85864 r150668 42 42 43 43 using namespace WebCore; 44 using namespace std;45 44 46 45 // This class handles the complete: operation. … … 149 148 maxWidth = ceilf([NSWindow frameRectForContentRect:NSMakeRect(0.0f, 0.0f, maxWidth, 100.0f) styleMask:NSBorderlessWindowMask].size.width); 150 149 maxWidth += 5.0f; 151 windowFrame.size.width = max(maxWidth, windowFrame.size.width);152 maxWidth = min<CGFloat>(400, windowFrame.size.width);150 windowFrame.size.width = std::max(maxWidth, windowFrame.size.width); 151 maxWidth = std::min<CGFloat>(400, windowFrame.size.width); 153 152 } 154 153 [_popupWindow setFrame:windowFrame display:NO];
Note: See TracChangeset
for help on using the changeset viewer.