| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012, 2013 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2012, 2013 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "wtf/PassOwnPtr.h" | 31 #include "wtf/PassOwnPtr.h" |
| 32 #include "wtf/PassRefPtr.h" | 32 #include "wtf/PassRefPtr.h" |
| 33 #include "wtf/RefPtr.h" | 33 #include "wtf/RefPtr.h" |
| 34 #include "wtf/Vector.h" | 34 #include "wtf/Vector.h" |
| 35 #include "wtf/text/StringHash.h" | 35 #include "wtf/text/StringHash.h" |
| 36 | 36 |
| 37 namespace WebCore { | 37 namespace WebCore { |
| 38 | 38 |
| 39 class Attribute; | 39 class Attribute; |
| 40 class ShareableElementData; | 40 class ShareableElementData; |
| 41 class ShareableElementDataCacheEntry; | |
| 42 | 41 |
| 43 class ElementDataCache { | 42 class ElementDataCache { |
| 44 public: | 43 public: |
| 45 static PassOwnPtr<ElementDataCache> create() { return adoptPtr(new ElementDa
taCache); } | 44 static PassOwnPtr<ElementDataCache> create() { return adoptPtr(new ElementDa
taCache); } |
| 46 ~ElementDataCache(); | 45 ~ElementDataCache(); |
| 47 | 46 |
| 48 PassRefPtr<ShareableElementData> cachedShareableElementDataWithAttributes(co
nst Vector<Attribute>&); | 47 PassRefPtr<ShareableElementData> cachedShareableElementDataWithAttributes(co
nst Vector<Attribute>&); |
| 49 | 48 |
| 50 private: | 49 private: |
| 51 ElementDataCache(); | 50 ElementDataCache(); |
| 52 | 51 |
| 53 typedef HashMap<unsigned, RefPtr<ShareableElementData>, AlreadyHashed> Share
ableElementDataCache; | 52 typedef HashMap<unsigned, RefPtr<ShareableElementData>, AlreadyHashed> Share
ableElementDataCache; |
| 54 ShareableElementDataCache m_shareableElementDataCache; | 53 ShareableElementDataCache m_shareableElementDataCache; |
| 55 }; | 54 }; |
| 56 | 55 |
| 57 } | 56 } |
| 58 | 57 |
| 59 #endif | 58 #endif |
| OLD | NEW |