Changeset 126230 in webkit
- Timestamp:
- Aug 21, 2012 5:14:41 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 13 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r126227 r126230 1 2012-08-21 Lianghui Chen <liachen@rim.com> 2 3 [BlackBerry] Add RSS content handling support 4 https://bugs.webkit.org/show_bug.cgi?id=93496 5 6 Reviewed by Rob Buis. 7 8 Add code to filter RSS content, and properly convert them to HTML 9 content so they can display nicely, instead of as plain text. 10 11 Following modules are included: 12 13 RSSFilterStream: the code for detecting RSS content, and controlling 14 the handling of these content. 15 16 RSSParserBase: the base class for the following 3 RSS parser. 17 RSS10Parser: the code for decoding RSS 1.0 content. 18 RSS20Parser: the code for decoding RSS 2.0 content. 19 RSSAtomParser: the code for decoding Atom format RSS content. 20 RSSGenerator: the code for generating HTML content based on RSS feed. 21 22 No new tests as it's not changing how HTML content is handled. 23 24 * PlatformBlackBerry.cmake: 25 * platform/network/blackberry/NetworkJob.cpp: 26 (WebCore::NetworkJob::initialize): 27 * platform/network/blackberry/rss/RSS10Parser.cpp: Added. 28 (WebCore): 29 (WebCore::RSS10Parser::RSS10Parser): 30 (WebCore::RSS10Parser::parseBuffer): 31 (WebCore::RSS10Parser::parseXmlDoc): 32 (WebCore::RSS10Parser::parseItemBaseAttribute): 33 (WebCore::RSS10Parser::parseItem): 34 (WebCore::RSS10Parser::parseFeed): 35 * platform/network/blackberry/rss/RSS10Parser.h: Added. 36 (WebCore): 37 (RSS10Parser): 38 * platform/network/blackberry/rss/RSS20Parser.cpp: Added. 39 (WebCore): 40 (WebCore::RSS20Parser::RSS20Parser): 41 (WebCore::RSS20Parser::parseBuffer): 42 (WebCore::RSS20Parser::parseXmlDoc): 43 (WebCore::RSS20Parser::parseItemBaseAttribute): 44 (WebCore::RSS20Parser::parseItem): 45 (WebCore::RSS20Parser::parseFeed): 46 (WebCore::RSS20Parser::parseEnclosure): 47 * platform/network/blackberry/rss/RSS20Parser.h: Added. 48 (WebCore): 49 (RSS20Parser): 50 * platform/network/blackberry/rss/RSSAtomParser.cpp: Added. 51 (WebCore): 52 (WebCore::isRelativePath): 53 (WebCore::RSSAtomLink::relType): 54 (WebCore::RSSAtomParser::RSSAtomParser): 55 (WebCore::RSSAtomParser::parseBuffer): 56 (WebCore::RSSAtomParser::parseXmlDoc): 57 (WebCore::RSSAtomParser::parseItemBaseAttribute): 58 (WebCore::RSSAtomParser::parseItem): 59 (WebCore::RSSAtomParser::parseFeed): 60 (WebCore::RSSAtomParser::parseLink): 61 (WebCore::RSSAtomParser::enclosureFromLink): 62 (WebCore::RSSAtomParser::parseContent): 63 (WebCore::RSSAtomParser::parseAuthor): 64 (WebCore::RSSAtomParser::parseCategory): 65 * platform/network/blackberry/rss/RSSAtomParser.h: Added. 66 (WebCore): 67 (RSSAtomLink): 68 (WebCore::RSSAtomLink::RSSAtomLink): 69 (RSSAtomParser): 70 * platform/network/blackberry/rss/RSSFilterStream.cpp: Added. 71 (WebCore): 72 (WebCore::isASCIISpaceLowerByte): 73 (WebCore::stripWhiteSpace): 74 (WebCore::equalIgnoringCase): 75 (WebCore::isAtomMIMEType): 76 (WebCore::isRSSMIMEType): 77 (WebCore::isPotentialRSSMIMEType): 78 (WebCore::isRSSContent): 79 (WebCore::RSSTypeFromContentType): 80 (WebCore::RSSTypeFromContent): 81 (WebCore::createParser): 82 (WebCore::findXMLEncodingPosition): 83 (WebCore::findXMLLanguagePosition): 84 (WebCore::defaultEncodingForLanguage): 85 (WebCore::isTranscodingNeeded): 86 (WebCore::transcode): 87 (WebCore::transcodeContent): 88 (WebCore::RSSFilterStream::RSSFilterStream): 89 (WebCore::RSSFilterStream::notifyStatusReceived): 90 (WebCore::RSSFilterStream::notifyHeadersReceived): 91 (WebCore::RSSFilterStream::notifyDataReceived): 92 (WebCore::RSSFilterStream::notifyClose): 93 (WebCore::RSSFilterStream::convertContentToHtml): 94 (WebCore::RSSFilterStream::handleRSSContent): 95 (WebCore::RSSFilterStream::charset): 96 (WebCore::RSSFilterStream::encoding): 97 (WebCore::RSSFilterStream::saveHeaders): 98 (WebCore::RSSFilterStream::removeHeader): 99 (WebCore::RSSFilterStream::updateHeader): 100 (WebCore::RSSFilterStream::updateRSSHeaders): 101 (WebCore::RSSFilterStream::sendSavedHeaders): 102 (WebCore::RSSFilterStream::appendData): 103 * platform/network/blackberry/rss/RSSFilterStream.h: Added. 104 (WebCore): 105 (RSSFilterStream): 106 * platform/network/blackberry/rss/RSSGenerator.cpp: Added. 107 (WebCore): 108 (WebCore::RSSGenerator::RSSGenerator): 109 (WebCore::RSSGenerator::~RSSGenerator): 110 (WebCore::RSSGenerator::generateHtml): 111 * platform/network/blackberry/rss/RSSGenerator.h: Added. 112 (WebCore): 113 (RSSGenerator): 114 * platform/network/blackberry/rss/RSSParserBase.cpp: Added. 115 (WebCore): 116 (WebCore::RSSEnclosure::RSSEnclosure): 117 (WebCore::RSSEnclosure::typeInEnum): 118 (WebCore::RSSEnclosure::suggestedName): 119 (WebCore::RSSFeed::RSSFeed): 120 (WebCore::RSSFeed::~RSSFeed): 121 (WebCore::RSSFeed::clear): 122 (WebCore::RSSItem::RSSItem): 123 (WebCore::RSSItem::~RSSItem): 124 (WebCore::RSSItem::clear): 125 (WebCore::RSSParserBase::RSSParserBase): 126 (WebCore::RSSParserBase::~RSSParserBase): 127 (WebCore::textFromXMLAttr): 128 (WebCore::textFromXMLNode): 129 * platform/network/blackberry/rss/RSSParserBase.h: Added. 130 (WebCore): 131 (RSSEnclosure): 132 (RSSItemBase): 133 (RSSParserBase): 134 1 135 2012-08-21 Andrew Lo <anlo@rim.com> 2 136 -
trunk/Source/WebCore/PlatformBlackBerry.cmake
r125563 r126230 7 7 "${WEBCORE_DIR}/bindings/cpp" 8 8 "${WEBCORE_DIR}/platform/blackberry/CookieDatabaseBackingStore" 9 "${WEBCORE_DIR}/platform/network/blackberry"10 9 "${WEBCORE_DIR}/platform/graphics/blackberry/skia" 11 10 "${WEBCORE_DIR}/platform/graphics/harfbuzz" … … 14 13 "${WEBCORE_DIR}/platform/image-decoders/skia" 15 14 "${WEBCORE_DIR}/platform/image-encoders/skia" 15 "${WEBCORE_DIR}/platform/network/blackberry" 16 "${WEBCORE_DIR}/platform/network/blackberry/rss" 16 17 ) 17 18 … … 103 104 platform/network/blackberry/ResourceResponseBlackBerry.cpp 104 105 platform/network/blackberry/SocketStreamHandleBlackBerry.cpp 106 platform/network/blackberry/rss/RSSAtomParser.cpp 107 platform/network/blackberry/rss/RSS10Parser.cpp 108 platform/network/blackberry/rss/RSS20Parser.cpp 109 platform/network/blackberry/rss/RSSFilterStream.cpp 110 platform/network/blackberry/rss/RSSGenerator.cpp 111 platform/network/blackberry/rss/RSSParserBase.cpp 105 112 ) 106 113 -
trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp
r125718 r126230 32 32 #include "NetworkManager.h" 33 33 #include "Page.h" 34 #include "RSSFilterStream.h" 34 35 #include "ResourceHandleClient.h" 35 36 #include "ResourceHandleInternal.h" … … 134 135 if (!wrappedStream) 135 136 return false; 137 138 BlackBerry::Platform::NetworkRequest::TargetType targetType = request.getTargetType(); 139 if ((targetType == BlackBerry::Platform::NetworkRequest::TargetIsMainFrame 140 || targetType == BlackBerry::Platform::NetworkRequest::TargetIsSubframe) 141 && !m_isOverrideContentType) { 142 RSSFilterStream* filter = new RSSFilterStream(); 143 filter->setWrappedStream(wrappedStream); 144 wrappedStream = filter; 145 } 146 136 147 setWrappedStream(wrappedStream); 137 148
Note: See TracChangeset
for help on using the changeset viewer.