Changeset 237182 in webkit


Ignore:
Timestamp:
Oct 16, 2018 8:39:42 AM (6 years ago)
Author:
achristensen@apple.com
Message:

Remove unused WebHistoryItem._transientPropertyForKey
https://bugs.webkit.org/show_bug.cgi?id=190606

Reviewed by Chris Dumez.

Source/WebCore:

This is unnecessary complexity in HistoryItem.

  • history/HistoryItem.h:
  • history/mac/HistoryItemMac.mm:

(WebCore::HistoryItem::getTransientProperty const): Deleted.
(WebCore::HistoryItem::setTransientProperty): Deleted.

Source/WebKitLegacy/mac:

  • History/WebHistoryItem.mm:
  • History/WebHistoryItemPrivate.h:
Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r237181 r237182  
     12018-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
    1152018-10-16  Basuke Suzuki  <Basuke.Suzuki@sony.com>
    216
  • trunk/Source/WebCore/history/HistoryItem.h

    r231704 r237182  
    170170    WEBCORE_EXPORT id viewState() const;
    171171    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);
    177172#endif
    178173
     
    287282#if PLATFORM(COCOA)
    288283    RetainPtr<id> m_viewState;
    289     std::unique_ptr<HashMap<String, RetainPtr<id>>> m_transientProperties;
    290284#endif
    291285
  • trunk/Source/WebCore/history/mac/HistoryItemMac.mm

    r165676 r237182  
    4343}
    4444
    45 id HistoryItem::getTransientProperty(const String& key) const
    46 {
    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 
    6745} // namespace WebCore
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r237170 r237182  
     12018-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
    1112018-10-15  Justin Fan  <justin_fan@apple.com>
    212
  • trunk/Source/WebKitLegacy/mac/History/WebHistoryItem.mm

    r235935 r237182  
    526526#endif
    527527
    528 - (id)_transientPropertyForKey:(NSString *)key
    529 {
    530     return core(_private)->getTransientProperty(key);
    531 }
    532 
    533 - (void)_setTransientProperty:(id)property forKey:(NSString *)key
    534 {
    535     core(_private)->setTransientProperty(key, property);
    536 }
    537 
    538528- (BOOL)lastVisitWasFailure
    539529{
  • trunk/Source/WebKitLegacy/mac/History/WebHistoryItemPrivate.h

    r219057 r237182  
    6868#endif
    6969
    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 
    7570#if TARGET_OS_IPHONE
    7671- (void)_setScale:(float)scale isInitial:(BOOL)aFlag;
Note: See TracChangeset for help on using the changeset viewer.