Changeset 237182 in webkit
- Timestamp:
- Oct 16, 2018 8:39:42 AM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r237181 r237182 1 2018-10-16 Alex Christensen <achristensen@webkit.org> 2 3 Remove unused WebHistoryItem._transientPropertyForKey 4 https://bugs.webkit.org/show_bug.cgi?id=190606 5 6 Reviewed by Chris Dumez. 7 8 This is unnecessary complexity in HistoryItem. 9 10 * history/HistoryItem.h: 11 * history/mac/HistoryItemMac.mm: 12 (WebCore::HistoryItem::getTransientProperty const): Deleted. 13 (WebCore::HistoryItem::setTransientProperty): Deleted. 14 1 15 2018-10-16 Basuke Suzuki <Basuke.Suzuki@sony.com> 2 16 -
trunk/Source/WebCore/history/HistoryItem.h
r231704 r237182 170 170 WEBCORE_EXPORT id viewState() const; 171 171 WEBCORE_EXPORT void setViewState(id); 172 173 // Transient properties may be of any ObjC type. They are intended to be used to store state per back/forward list entry.174 // The properties will not be persisted; when the history item is removed, the properties will be lost.175 WEBCORE_EXPORT id getTransientProperty(const String&) const;176 WEBCORE_EXPORT void setTransientProperty(const String&, id);177 172 #endif 178 173 … … 287 282 #if PLATFORM(COCOA) 288 283 RetainPtr<id> m_viewState; 289 std::unique_ptr<HashMap<String, RetainPtr<id>>> m_transientProperties;290 284 #endif 291 285 -
trunk/Source/WebCore/history/mac/HistoryItemMac.mm
r165676 r237182 43 43 } 44 44 45 id HistoryItem::getTransientProperty(const String& key) const46 {47 if (!m_transientProperties)48 return nil;49 return m_transientProperties->get(key).get();50 }51 52 void HistoryItem::setTransientProperty(const String& key, id value)53 {54 if (!value) {55 if (m_transientProperties) {56 m_transientProperties->remove(key);57 if (m_transientProperties->isEmpty())58 m_transientProperties = nullptr;59 }60 } else {61 if (!m_transientProperties)62 m_transientProperties = std::make_unique<HashMap<String, RetainPtr<id>>>();63 m_transientProperties->set(key, value);64 }65 }66 67 45 } // namespace WebCore -
trunk/Source/WebKitLegacy/mac/ChangeLog
r237170 r237182 1 2018-10-16 Alex Christensen <achristensen@webkit.org> 2 3 Remove unused WebHistoryItem._transientPropertyForKey 4 https://bugs.webkit.org/show_bug.cgi?id=190606 5 6 Reviewed by Chris Dumez. 7 8 * History/WebHistoryItem.mm: 9 * History/WebHistoryItemPrivate.h: 10 1 11 2018-10-15 Justin Fan <justin_fan@apple.com> 2 12 -
trunk/Source/WebKitLegacy/mac/History/WebHistoryItem.mm
r235935 r237182 526 526 #endif 527 527 528 - (id)_transientPropertyForKey:(NSString *)key529 {530 return core(_private)->getTransientProperty(key);531 }532 533 - (void)_setTransientProperty:(id)property forKey:(NSString *)key534 {535 core(_private)->setTransientProperty(key, property);536 }537 538 528 - (BOOL)lastVisitWasFailure 539 529 { -
trunk/Source/WebKitLegacy/mac/History/WebHistoryItemPrivate.h
r219057 r237182 68 68 #endif 69 69 70 // Transient properties may be of any ObjC type. They are intended to be used to store state per back/forward list entry.71 // The properties will not be persisted; when the history item is removed, the properties will be lost.72 - (id)_transientPropertyForKey:(NSString *)key;73 - (void)_setTransientProperty:(id)property forKey:(NSString *)key;74 75 70 #if TARGET_OS_IPHONE 76 71 - (void)_setScale:(float)scale isInitial:(BOOL)aFlag;
Note: See TracChangeset
for help on using the changeset viewer.