Title: [148984] trunk/Source/WebCore
- Revision
- 148984
- Author
- [email protected]
- Date
- 2013-04-23 12:59:13 -0700 (Tue, 23 Apr 2013)
Log Message
Inline SelectorQuery::matches, SelectorQuery::queryAll, SelectorQuery::queryFirst
https://bugs.webkit.org/show_bug.cgi?id=115012
Patch by Benjamin Poulain <[email protected]> on 2013-04-23
Reviewed by Andreas Kling.
Each of these function has a single call site:
-SelectorQuery::matches from Element::webkitMatchesSelector.
-SelectorQuery::queryAll from Node::querySelectorAll.
-SelectorQuery::queryFirst from Node::querySelector.
Having a dedicated method to jump to was a little overkill.
* dom/SelectorQuery.cpp:
* dom/SelectorQuery.h:
(WebCore::SelectorQuery::matches):
(WebCore::SelectorQuery::queryAll):
(WebCore::SelectorQuery::queryFirst):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (148983 => 148984)
--- trunk/Source/WebCore/ChangeLog 2013-04-23 19:51:42 UTC (rev 148983)
+++ trunk/Source/WebCore/ChangeLog 2013-04-23 19:59:13 UTC (rev 148984)
@@ -1,5 +1,25 @@
2013-04-23 Benjamin Poulain <[email protected]>
+ Inline SelectorQuery::matches, SelectorQuery::queryAll, SelectorQuery::queryFirst
+ https://bugs.webkit.org/show_bug.cgi?id=115012
+
+ Reviewed by Andreas Kling.
+
+ Each of these function has a single call site:
+ -SelectorQuery::matches from Element::webkitMatchesSelector.
+ -SelectorQuery::queryAll from Node::querySelectorAll.
+ -SelectorQuery::queryFirst from Node::querySelector.
+
+ Having a dedicated method to jump to was a little overkill.
+
+ * dom/SelectorQuery.cpp:
+ * dom/SelectorQuery.h:
+ (WebCore::SelectorQuery::matches):
+ (WebCore::SelectorQuery::queryAll):
+ (WebCore::SelectorQuery::queryFirst):
+
+2013-04-23 Benjamin Poulain <[email protected]>
+
Remove wxWebKit's folders from WebCore
https://bugs.webkit.org/show_bug.cgi?id=115007
Modified: trunk/Source/WebCore/dom/SelectorQuery.cpp (148983 => 148984)
--- trunk/Source/WebCore/dom/SelectorQuery.cpp 2013-04-23 19:51:42 UTC (rev 148983)
+++ trunk/Source/WebCore/dom/SelectorQuery.cpp 2013-04-23 19:59:13 UTC (rev 148984)
@@ -169,21 +169,6 @@
m_selectors.initialize(m_selectorList);
}
-bool SelectorQuery::matches(Element* element) const
-{
- return m_selectors.matches(element);
-}
-
-PassRefPtr<NodeList> SelectorQuery::queryAll(Node* rootNode) const
-{
- return m_selectors.queryAll(rootNode);
-}
-
-PassRefPtr<Element> SelectorQuery::queryFirst(Node* rootNode) const
-{
- return m_selectors.queryFirst(rootNode);
-}
-
SelectorQuery* SelectorQueryCache::add(const AtomicString& selectors, Document* document, ExceptionCode& ec)
{
HashMap<AtomicString, OwnPtr<SelectorQuery> >::iterator it = m_entries.find(selectors);
Modified: trunk/Source/WebCore/dom/SelectorQuery.h (148983 => 148984)
--- trunk/Source/WebCore/dom/SelectorQuery.h 2013-04-23 19:51:42 UTC (rev 148983)
+++ trunk/Source/WebCore/dom/SelectorQuery.h 2013-04-23 19:59:13 UTC (rev 148984)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,7 +27,9 @@
#define SelectorQuery_h
#include "CSSSelectorList.h"
+#include "NodeList.h"
#include <wtf/HashMap.h>
+#include <wtf/PassRefPtr.h>
#include <wtf/Vector.h>
#include <wtf/text/AtomicStringHash.h>
@@ -86,6 +88,21 @@
HashMap<AtomicString, OwnPtr<SelectorQuery> > m_entries;
};
+inline bool SelectorQuery::matches(Element* element) const
+{
+ return m_selectors.matches(element);
}
+inline PassRefPtr<NodeList> SelectorQuery::queryAll(Node* rootNode) const
+{
+ return m_selectors.queryAll(rootNode);
+}
+
+inline PassRefPtr<Element> SelectorQuery::queryFirst(Node* rootNode) const
+{
+ return m_selectors.queryFirst(rootNode);
+}
+
+}
+
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes