Title: [237182] trunk/Source
Revision
237182
Author
[email protected]
Date
2018-10-16 08:39:42 -0700 (Tue, 16 Oct 2018)

Log 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:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (237181 => 237182)


--- trunk/Source/WebCore/ChangeLog	2018-10-16 15:21:16 UTC (rev 237181)
+++ trunk/Source/WebCore/ChangeLog	2018-10-16 15:39:42 UTC (rev 237182)
@@ -1,3 +1,17 @@
+2018-10-16  Alex Christensen  <[email protected]>
+
+        Remove unused WebHistoryItem._transientPropertyForKey
+        https://bugs.webkit.org/show_bug.cgi?id=190606
+
+        Reviewed by Chris Dumez.
+
+        This is unnecessary complexity in HistoryItem.
+
+        * history/HistoryItem.h:
+        * history/mac/HistoryItemMac.mm:
+        (WebCore::HistoryItem::getTransientProperty const): Deleted.
+        (WebCore::HistoryItem::setTransientProperty): Deleted.
+
 2018-10-16  Basuke Suzuki  <[email protected]>
 
         [Curl] Separate SSL Class for platform dependent way of setup.

Modified: trunk/Source/WebCore/history/HistoryItem.h (237181 => 237182)


--- trunk/Source/WebCore/history/HistoryItem.h	2018-10-16 15:21:16 UTC (rev 237181)
+++ trunk/Source/WebCore/history/HistoryItem.h	2018-10-16 15:39:42 UTC (rev 237182)
@@ -169,11 +169,6 @@
 #if PLATFORM(COCOA)
     WEBCORE_EXPORT id viewState() const;
     WEBCORE_EXPORT void setViewState(id);
-    
-    // Transient properties may be of any ObjC type.  They are intended to be used to store state per back/forward list entry.
-    // The properties will not be persisted; when the history item is removed, the properties will be lost.
-    WEBCORE_EXPORT id getTransientProperty(const String&) const;
-    WEBCORE_EXPORT void setTransientProperty(const String&, id);
 #endif
 
 #ifndef NDEBUG
@@ -286,7 +281,6 @@
 
 #if PLATFORM(COCOA)
     RetainPtr<id> m_viewState;
-    std::unique_ptr<HashMap<String, RetainPtr<id>>> m_transientProperties;
 #endif
 
     BackForwardItemIdentifier m_identifier;

Modified: trunk/Source/WebCore/history/mac/HistoryItemMac.mm (237181 => 237182)


--- trunk/Source/WebCore/history/mac/HistoryItemMac.mm	2018-10-16 15:21:16 UTC (rev 237181)
+++ trunk/Source/WebCore/history/mac/HistoryItemMac.mm	2018-10-16 15:39:42 UTC (rev 237182)
@@ -42,26 +42,4 @@
     [newState release];
 }
 
-id HistoryItem::getTransientProperty(const String& key) const
-{
-    if (!m_transientProperties)
-        return nil;
-    return m_transientProperties->get(key).get();
-}
-
-void HistoryItem::setTransientProperty(const String& key, id value)
-{
-    if (!value) {
-        if (m_transientProperties) {
-            m_transientProperties->remove(key);
-            if (m_transientProperties->isEmpty())
-                m_transientProperties = nullptr;
-        }
-    } else {
-        if (!m_transientProperties)
-            m_transientProperties = std::make_unique<HashMap<String, RetainPtr<id>>>();
-        m_transientProperties->set(key, value);
-    }
-}
-
 } // namespace WebCore

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (237181 => 237182)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2018-10-16 15:21:16 UTC (rev 237181)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2018-10-16 15:39:42 UTC (rev 237182)
@@ -1,3 +1,13 @@
+2018-10-16  Alex Christensen  <[email protected]>
+
+        Remove unused WebHistoryItem._transientPropertyForKey
+        https://bugs.webkit.org/show_bug.cgi?id=190606
+
+        Reviewed by Chris Dumez.
+
+        * History/WebHistoryItem.mm:
+        * History/WebHistoryItemPrivate.h:
+
 2018-10-15  Justin Fan  <[email protected]>
 
         Add WebGPU 2018 feature flag and experimental feature flag

Modified: trunk/Source/WebKitLegacy/mac/History/WebHistoryItem.mm (237181 => 237182)


--- trunk/Source/WebKitLegacy/mac/History/WebHistoryItem.mm	2018-10-16 15:21:16 UTC (rev 237181)
+++ trunk/Source/WebKitLegacy/mac/History/WebHistoryItem.mm	2018-10-16 15:39:42 UTC (rev 237182)
@@ -525,16 +525,6 @@
 }
 #endif
 
-- (id)_transientPropertyForKey:(NSString *)key
-{
-    return core(_private)->getTransientProperty(key);
-}
-
-- (void)_setTransientProperty:(id)property forKey:(NSString *)key
-{
-    core(_private)->setTransientProperty(key, property);
-}
-
 - (BOOL)lastVisitWasFailure
 {
     return core(_private)->lastVisitWasFailure();

Modified: trunk/Source/WebKitLegacy/mac/History/WebHistoryItemPrivate.h (237181 => 237182)


--- trunk/Source/WebKitLegacy/mac/History/WebHistoryItemPrivate.h	2018-10-16 15:21:16 UTC (rev 237181)
+++ trunk/Source/WebKitLegacy/mac/History/WebHistoryItemPrivate.h	2018-10-16 15:39:42 UTC (rev 237182)
@@ -67,11 +67,6 @@
 - (NSDictionary *)dictionaryRepresentationIncludingChildren:(BOOL)includesChildren;
 #endif
 
-// Transient properties may be of any ObjC type.  They are intended to be used to store state per back/forward list entry.
-// The properties will not be persisted; when the history item is removed, the properties will be lost.
-- (id)_transientPropertyForKey:(NSString *)key;
-- (void)_setTransientProperty:(id)property forKey:(NSString *)key;
-
 #if TARGET_OS_IPHONE
 - (void)_setScale:(float)scale isInitial:(BOOL)aFlag;
 - (float)_scale;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to