OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class Document; | 44 class Document; |
45 class ExceptionState; | 45 class ExceptionState; |
46 class Node; | 46 class Node; |
47 | 47 |
48 class DOMPatchSupport { | 48 class DOMPatchSupport { |
49 WTF_MAKE_NONCOPYABLE(DOMPatchSupport); | 49 WTF_MAKE_NONCOPYABLE(DOMPatchSupport); |
50 public: | 50 public: |
51 static void patchDocument(Document&, const String& markup); | 51 static void patchDocument(Document&, const String& markup); |
52 | 52 |
53 DOMPatchSupport(DOMEditor*, Document&); | 53 DOMPatchSupport(DOMEditor*, Document&); |
54 virtual ~DOMPatchSupport(); | |
55 | 54 |
56 void patchDocument(const String& markup); | 55 void patchDocument(const String& markup); |
57 Node* patchNode(Node*, const String& markup, ExceptionState&); | 56 Node* patchNode(Node*, const String& markup, ExceptionState&); |
58 | 57 |
59 private: | 58 private: |
60 struct Digest; | 59 struct Digest; |
61 typedef Vector<pair<Digest*, size_t> > ResultMap; | 60 typedef Vector<pair<Digest*, size_t> > ResultMap; |
62 typedef HashMap<String, Digest*> UnusedNodesMap; | 61 typedef HashMap<String, Digest*> UnusedNodesMap; |
63 | 62 |
64 bool innerPatchNode(Digest* oldNode, Digest* newNode, ExceptionState&); | 63 bool innerPatchNode(Digest* oldNode, Digest* newNode, ExceptionState&); |
(...skipping 10 matching lines...) Expand all Loading... |
75 DOMEditor* m_domEditor; | 74 DOMEditor* m_domEditor; |
76 Document& m_document; | 75 Document& m_document; |
77 | 76 |
78 UnusedNodesMap m_unusedNodesMap; | 77 UnusedNodesMap m_unusedNodesMap; |
79 }; | 78 }; |
80 | 79 |
81 | 80 |
82 } // namespace WebCore | 81 } // namespace WebCore |
83 | 82 |
84 #endif // !defined(DOMPatchSupport_h) | 83 #endif // !defined(DOMPatchSupport_h) |
OLD | NEW |