Title: [159500] trunk/Source/WebCore
- Revision
- 159500
- Author
- [email protected]
- Date
- 2013-11-19 06:55:33 -0800 (Tue, 19 Nov 2013)
Log Message
[AX] Use std::unique_ptr to manage AXComputedObjectAttributeCache
https://bugs.webkit.org/show_bug.cgi?id=124404
Patch by Krzysztof Czech <[email protected]> on 2013-11-19
Reviewed by Mario Sanchez Prada.
Convert OwnPtr/PassOwnPtr to std::unique_ptr.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates):
(WebCore::AXObjectCache::stopCachingComputedObjectAttributes):
* accessibility/AXObjectCache.h:
(WebCore::AXComputedObjectAttributeCache::AXComputedObjectAttributeCache):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (159499 => 159500)
--- trunk/Source/WebCore/ChangeLog 2013-11-19 14:01:35 UTC (rev 159499)
+++ trunk/Source/WebCore/ChangeLog 2013-11-19 14:55:33 UTC (rev 159500)
@@ -1,3 +1,18 @@
+2013-11-19 Krzysztof Czech <[email protected]>
+
+ [AX] Use std::unique_ptr to manage AXComputedObjectAttributeCache
+ https://bugs.webkit.org/show_bug.cgi?id=124404
+
+ Reviewed by Mario Sanchez Prada.
+
+ Convert OwnPtr/PassOwnPtr to std::unique_ptr.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates):
+ (WebCore::AXObjectCache::stopCachingComputedObjectAttributes):
+ * accessibility/AXObjectCache.h:
+ (WebCore::AXComputedObjectAttributeCache::AXComputedObjectAttributeCache):
+
2013-11-19 Ryosuke Niwa <[email protected]>
Add more assertions with security implications in DocumentOrderedMap
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (159499 => 159500)
--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2013-11-19 14:01:35 UTC (rev 159499)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2013-11-19 14:55:33 UTC (rev 159500)
@@ -866,13 +866,12 @@
void AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates()
{
if (!m_computedObjectAttributeCache)
- m_computedObjectAttributeCache = AXComputedObjectAttributeCache::create();
+ m_computedObjectAttributeCache = std::make_unique<AXComputedObjectAttributeCache>();
}
void AXObjectCache::stopCachingComputedObjectAttributes()
{
- if (m_computedObjectAttributeCache)
- m_computedObjectAttributeCache.clear();
+ m_computedObjectAttributeCache = nullptr;
}
VisiblePosition AXObjectCache::visiblePositionForTextMarkerData(TextMarkerData& textMarkerData)
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.h (159499 => 159500)
--- trunk/Source/WebCore/accessibility/AXObjectCache.h 2013-11-19 14:01:35 UTC (rev 159499)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.h 2013-11-19 14:55:33 UTC (rev 159500)
@@ -54,14 +54,10 @@
class AXComputedObjectAttributeCache {
public:
- static PassOwnPtr<AXComputedObjectAttributeCache> create() { return adoptPtr(new AXComputedObjectAttributeCache()); }
-
AccessibilityObjectInclusion getIgnored(AXID) const;
void setIgnored(AXID, AccessibilityObjectInclusion);
private:
- AXComputedObjectAttributeCache() { }
-
struct CachedAXObjectAttributes {
CachedAXObjectAttributes() : ignored(DefaultBehavior) { }
@@ -229,7 +225,7 @@
HashMap<Widget*, AXID> m_widgetObjectMapping;
HashMap<Node*, AXID> m_nodeObjectMapping;
HashSet<Node*> m_textMarkerNodes;
- OwnPtr<AXComputedObjectAttributeCache> m_computedObjectAttributeCache;
+ std::unique_ptr<AXComputedObjectAttributeCache> m_computedObjectAttributeCache;
static bool gAccessibilityEnabled;
static bool gAccessibilityEnhancedUserInterfaceEnabled;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes