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

Issue 52713005: Decouple tokenizer/tree builder state from WebVTTParser (Closed)

Created:
7 years, 1 month ago by fs
Modified:
7 years, 1 month ago
CC:
blink-reviews, dglazkov+blink, nessy, vcarbune.chromium, philipj_slow, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Decouple tokenizer/tree builder state from WebVTTParser The WebVTTTokenizer owned by the WebVTTParser (m_tokenizer) is only used by the WebVTTParser::createDocumentFragmentFromCueText method on WebVTTParser. The same is true for other state like the current token (m_token), the current (subtree root) node (m_currentNode) and the stack of language tags (m_languageStack). Transplant this state together with it's mutator method - constructTreeFromToken - onto a new helper class, WebVTTTreeBuilder, and then use that in WebVTTParser::createDocumentFragmentFromCueText. With the above in place, WebVTTParser::createDocumentFragmentFromCueText can be made static, avoiding the contorted (and unnecessary) allocation in TextTrackCue::createWebVTTNodeTree. BUG=305317 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161073

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -23 lines) Patch
M Source/core/html/track/TextTrackCue.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/track/WebVTTParser.h View 4 chunks +3 lines, -10 lines 0 comments Download
M Source/core/html/track/WebVTTParser.cpp View 4 chunks +35 lines, -12 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
fs
7 years, 1 month ago (2013-10-31 15:36:12 UTC) #1
Nate Chapin
LGTM!
7 years, 1 month ago (2013-10-31 16:42:07 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/52713005/1
7 years, 1 month ago (2013-10-31 17:00:11 UTC) #3
commit-bot: I haz the power
7 years, 1 month ago (2013-10-31 18:00:19 UTC) #4
Message was sent while issue was closed.
Change committed as 161073

Powered by Google App Engine
This is Rietveld 408576698