| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
reserved. |
| 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 #include "core/dom/Element.h" | 32 #include "core/dom/Element.h" |
| 33 #include "core/style/ComputedStyleConstants.h" | 33 #include "core/style/ComputedStyleConstants.h" |
| 34 #include "platform/LinkHash.h" | 34 #include "platform/LinkHash.h" |
| 35 #include "wtf/HashSet.h" | 35 #include "wtf/HashSet.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 class Document; | 39 class Document; |
| 40 | 40 |
| 41 class VisitedLinkState : public NoBaseWillBeGarbageCollectedFinalized<VisitedLin
kState> { | 41 class VisitedLinkState : public GarbageCollectedFinalized<VisitedLinkState> { |
| 42 USING_FAST_MALLOC_WILL_BE_REMOVED(VisitedLinkState); | |
| 43 public: | 42 public: |
| 44 static PassOwnPtrWillBeRawPtr<VisitedLinkState> create(const Document& docum
ent) | 43 static RawPtr<VisitedLinkState> create(const Document& document) |
| 45 { | 44 { |
| 46 return adoptPtrWillBeNoop(new VisitedLinkState(document)); | 45 return new VisitedLinkState(document); |
| 47 } | 46 } |
| 48 | 47 |
| 49 void invalidateStyleForAllLinks(bool invalidateVisitedLinkHashes); | 48 void invalidateStyleForAllLinks(bool invalidateVisitedLinkHashes); |
| 50 void invalidateStyleForLink(LinkHash); | 49 void invalidateStyleForLink(LinkHash); |
| 51 | 50 |
| 52 EInsideLink determineLinkState(const Element& element) | 51 EInsideLink determineLinkState(const Element& element) |
| 53 { | 52 { |
| 54 if (element.isLink()) | 53 if (element.isLink()) |
| 55 return determineLinkStateSlowCase(element); | 54 return determineLinkStateSlowCase(element); |
| 56 return NotInsideLink; | 55 return NotInsideLink; |
| 57 } | 56 } |
| 58 | 57 |
| 59 DECLARE_TRACE(); | 58 DECLARE_TRACE(); |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 explicit VisitedLinkState(const Document&); | 61 explicit VisitedLinkState(const Document&); |
| 63 const Document& document() const { return *m_document; } | 62 const Document& document() const { return *m_document; } |
| 64 | 63 |
| 65 EInsideLink determineLinkStateSlowCase(const Element&); | 64 EInsideLink determineLinkStateSlowCase(const Element&); |
| 66 | 65 |
| 67 RawPtrWillBeMember<const Document> m_document; | 66 Member<const Document> m_document; |
| 68 HashSet<LinkHash, LinkHashHash> m_linksCheckedForVisitedState; | 67 HashSet<LinkHash, LinkHashHash> m_linksCheckedForVisitedState; |
| 69 }; | 68 }; |
| 70 | 69 |
| 71 } // namespace blink | 70 } // namespace blink |
| 72 | 71 |
| 73 #endif | 72 #endif |
| 74 | 73 |
| OLD | NEW |