Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameSerializer.h

Issue 2538953002: Remove hidden elements from MHTML (Closed)
Patch Set: Fix trybots Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 STACK_ALLOCATED(); 62 STACK_ALLOCATED();
63 63
64 public: 64 public:
65 enum ResourceHasCacheControlNoStoreHeader { 65 enum ResourceHasCacheControlNoStoreHeader {
66 NoCacheControlNoStoreHeader, 66 NoCacheControlNoStoreHeader,
67 HasCacheControlNoStoreHeader 67 HasCacheControlNoStoreHeader
68 }; 68 };
69 69
70 class Delegate { 70 class Delegate {
71 public: 71 public:
72 // Controls whether HTML serialization should skip the given element.
73 virtual bool shouldIgnoreElement(const Element&) { return false; }
74
72 // Controls whether HTML serialization should skip the given attribute. 75 // Controls whether HTML serialization should skip the given attribute.
73 virtual bool shouldIgnoreAttribute(const Element&, const Attribute&) { 76 virtual bool shouldIgnoreAttribute(const Element&, const Attribute&) {
74 return false; 77 return false;
75 } 78 }
76 79
77 // Method allowing the Delegate control which URLs are written into the 80 // Method allowing the Delegate control which URLs are written into the
78 // generated html document. 81 // generated html document.
79 // 82 //
80 // When URL of the element needs to be rewritten, this method should 83 // When URL of the element needs to be rewritten, this method should
81 // return true and populate |rewrittenLink| with a desired value of the 84 // return true and populate |rewrittenLink| with a desired value of the
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 HashSet<KURL> m_resourceURLs; 146 HashSet<KURL> m_resourceURLs;
144 147
145 bool m_isSerializingCss; 148 bool m_isSerializingCss;
146 149
147 Delegate& m_delegate; 150 Delegate& m_delegate;
148 }; 151 };
149 152
150 } // namespace blink 153 } // namespace blink
151 154
152 #endif // FrameSerializer_h 155 #endif // FrameSerializer_h
OLDNEW
« no previous file with comments | « chrome/test/data/save_page/style.htm ('k') | third_party/WebKit/Source/core/frame/FrameSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698