Diff
Modified: trunk/Source/WebCore/ChangeLog (190558 => 190559)
--- trunk/Source/WebCore/ChangeLog 2015-10-05 07:13:50 UTC (rev 190558)
+++ trunk/Source/WebCore/ChangeLog 2015-10-05 14:38:50 UTC (rev 190559)
@@ -1,3 +1,23 @@
+2015-10-05 Andreas Kling <[email protected]>
+
+ Remove unused HistoryItem::parent
+ <https://webkit.org/b/149803>
+
+ Reviewed by Anders Carlsson.
+
+ Remove the effectively-unused "parent" field from HistoryItem.
+ This also allows us to get rid of a HistoryItem constructor.
+
+ * history/HistoryItem.cpp:
+ (WebCore::HistoryItem::HistoryItem): Deleted.
+ (WebCore::HistoryItem::reset): Deleted.
+ (WebCore::HistoryItem::parent): Deleted.
+ (WebCore::HistoryItem::setParent): Deleted.
+ * history/HistoryItem.h:
+ (WebCore::HistoryItem::create): Deleted.
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::initializeItem): Deleted.
+
2015-10-05 Zan Dobersek <[email protected]>
GLContext should control ownership of context-related objects
Modified: trunk/Source/WebCore/history/HistoryItem.cpp (190558 => 190559)
--- trunk/Source/WebCore/history/HistoryItem.cpp 2015-10-05 07:13:50 UTC (rev 190558)
+++ trunk/Source/WebCore/history/HistoryItem.cpp 2015-10-05 14:38:50 UTC (rev 190559)
@@ -109,27 +109,6 @@
iconDatabase().retainIconForPageURL(m_urlString);
}
-HistoryItem::HistoryItem(const URL& url, const String& target, const String& parent, const String& title)
- : m_urlString(url.string())
- , m_originalURLString(url.string())
- , m_target(target)
- , m_parent(parent)
- , m_title(title)
- , m_pageScaleFactor(0)
- , m_lastVisitWasFailure(false)
- , m_isTargetItem(false)
- , m_itemSequenceNumber(generateSequenceNumber())
- , m_documentSequenceNumber(generateSequenceNumber())
- , m_pruningReason(PruningReason::None)
-#if PLATFORM(IOS)
- , m_scale(0)
- , m_scaleIsInitial(false)
- , m_bookmarkID(0)
-#endif
-{
- iconDatabase().retainIconForPageURL(m_urlString);
-}
-
HistoryItem::~HistoryItem()
{
ASSERT(!m_cachedPage);
@@ -142,7 +121,6 @@
, m_originalURLString(item.m_originalURLString)
, m_referrer(item.m_referrer)
, m_target(item.m_target)
- , m_parent(item.m_parent)
, m_title(item.m_title)
, m_displayTitle(item.m_displayTitle)
, m_scrollPoint(item.m_scrollPoint)
@@ -185,7 +163,6 @@
m_originalURLString = String();
m_referrer = String();
m_target = String();
- m_parent = String();
m_title = String();
m_displayTitle = String();
@@ -252,11 +229,6 @@
return m_target;
}
-const String& HistoryItem::parent() const
-{
- return m_parent;
-}
-
void HistoryItem::setAlternateTitle(const String& alternateTitle)
{
m_displayTitle = alternateTitle;
@@ -305,11 +277,6 @@
notifyHistoryItemChanged(this);
}
-void HistoryItem::setParent(const String& parent)
-{
- m_parent = parent;
-}
-
const IntPoint& HistoryItem::scrollPoint() const
{
return m_scrollPoint;
Modified: trunk/Source/WebCore/history/HistoryItem.h (190558 => 190559)
--- trunk/Source/WebCore/history/HistoryItem.h 2015-10-05 07:13:50 UTC (rev 190558)
+++ trunk/Source/WebCore/history/HistoryItem.h 2015-10-05 14:38:50 UTC (rev 190559)
@@ -73,10 +73,6 @@
{
return adoptRef(*new HistoryItem(urlString, title, alternateTitle));
}
- static Ref<HistoryItem> create(const URL& url, const String& target, const String& parent, const String& title)
- {
- return adoptRef(*new HistoryItem(url, target, parent, title));
- }
WEBCORE_EXPORT ~HistoryItem();
@@ -95,7 +91,6 @@
WEBCORE_EXPORT void setAlternateTitle(const String&);
WEBCORE_EXPORT const String& alternateTitle() const;
- const String& parent() const;
WEBCORE_EXPORT URL url() const;
WEBCORE_EXPORT URL originalURL() const;
WEBCORE_EXPORT const String& referrer() const;
@@ -126,7 +121,6 @@
WEBCORE_EXPORT void setOriginalURLString(const String&);
WEBCORE_EXPORT void setReferrer(const String&);
WEBCORE_EXPORT void setTarget(const String&);
- void setParent(const String&);
WEBCORE_EXPORT void setTitle(const String&);
WEBCORE_EXPORT void setIsTargetItem(bool);
@@ -216,7 +210,6 @@
WEBCORE_EXPORT HistoryItem();
WEBCORE_EXPORT HistoryItem(const String& urlString, const String& title);
WEBCORE_EXPORT HistoryItem(const String& urlString, const String& title, const String& alternateTitle);
- WEBCORE_EXPORT HistoryItem(const URL&, const String& frameName, const String& parent, const String& title);
HistoryItem(const HistoryItem&);
@@ -228,7 +221,6 @@
String m_originalURLString;
String m_referrer;
String m_target;
- String m_parent;
String m_title;
String m_displayTitle;
Modified: trunk/Source/WebCore/loader/HistoryController.cpp (190558 => 190559)
--- trunk/Source/WebCore/loader/HistoryController.cpp 2015-10-05 07:13:50 UTC (rev 190558)
+++ trunk/Source/WebCore/loader/HistoryController.cpp 2015-10-05 14:38:50 UTC (rev 190559)
@@ -639,13 +639,10 @@
if (originalURL.isEmpty())
originalURL = blankURL();
- Frame* parentFrame = m_frame.tree().parent();
- String parent = parentFrame ? parentFrame->tree().uniqueName() : "";
StringWithDirection title = documentLoader->title();
item.setURL(url);
item.setTarget(m_frame.tree().uniqueName());
- item.setParent(parent);
// FIXME: should store title directionality in history as well.
item.setTitle(title.string());
item.setOriginalURLString(originalURL.string());
Modified: trunk/Source/WebKit/mac/ChangeLog (190558 => 190559)
--- trunk/Source/WebKit/mac/ChangeLog 2015-10-05 07:13:50 UTC (rev 190558)
+++ trunk/Source/WebKit/mac/ChangeLog 2015-10-05 14:38:50 UTC (rev 190559)
@@ -1,3 +1,16 @@
+2015-10-05 Andreas Kling <[email protected]>
+
+ Remove unused HistoryItem::parent
+ <https://webkit.org/b/149803>
+
+ Reviewed by Anders Carlsson.
+
+ Remove the only (unused) client of HistoryItem's with-parent constructor.
+
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem initWithURL:target:parent:title:]): Deleted.
+ * History/WebHistoryItemInternal.h:
+
2015-09-30 Timothy Horton <[email protected]>
Compute document marker rects at use time instead of paint time
Modified: trunk/Source/WebKit/mac/History/WebHistoryItem.mm (190558 => 190559)
--- trunk/Source/WebKit/mac/History/WebHistoryItem.mm 2015-10-05 07:13:50 UTC (rev 190558)
+++ trunk/Source/WebKit/mac/History/WebHistoryItem.mm 2015-10-05 14:38:50 UTC (rev 190559)
@@ -290,11 +290,6 @@
return [[[self alloc] initWithURL:URL title:nil] autorelease];
}
-- (id)initWithURL:(NSURL *)URL target:(NSString *)target parent:(NSString *)parent title:(NSString *)title
-{
- return [self initWithWebCoreHistoryItem:HistoryItem::create(URL, target, parent, title)];
-}
-
- (id)initWithURLString:(NSString *)URLString title:(NSString *)title displayTitle:(NSString *)displayTitle lastVisitedTimeInterval:(NSTimeInterval)time
{
WebHistoryItem *item = [self initWithWebCoreHistoryItem:HistoryItem::create(URLString, title, displayTitle)];
Modified: trunk/Source/WebKit/mac/History/WebHistoryItemInternal.h (190558 => 190559)
--- trunk/Source/WebKit/mac/History/WebHistoryItemInternal.h 2015-10-05 07:13:50 UTC (rev 190558)
+++ trunk/Source/WebKit/mac/History/WebHistoryItemInternal.h 2015-10-05 14:38:50 UTC (rev 190559)
@@ -44,7 +44,6 @@
+ (WebHistoryItem *)entryWithURL:(NSURL *)URL;
-- (id)initWithURL:(NSURL *)URL target:(NSString *)target parent:(NSString *)parent title:(NSString *)title;
- (id)initWithURLString:(NSString *)URLString title:(NSString *)title displayTitle:(NSString *)displayTitle lastVisitedTimeInterval:(NSTimeInterval)time;
- (id)initFromDictionaryRepresentation:(NSDictionary *)dict;
- (id)initWithWebCoreHistoryItem:(PassRefPtr<WebCore::HistoryItem>)item;