Summary: | TextTrackList not sorted correctly | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Eric Carlson <eric.carlson> | ||||
Component: | Media | Assignee: | Eric Carlson <eric.carlson> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | annacc, dglazkov, webkit-bug-importer, webkit.review.bot | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 43668 | ||||||
Attachments: |
|
Description
Eric Carlson
2011-11-16 14:07:01 PST
Created attachment 115451 [details]
Proposed patch
Comment on attachment 115451 [details] Proposed patch Attachment 115451 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10483897 Comment on attachment 115451 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=115451&action=review > Source/WebCore/html/LoadableTextTrack.cpp:128 > + for (Node* node = m_trackElement->parentNode()->firstChild(); node; node = node->nextSibling()) { What guarantees the track element has a non-zero parent? > Source/WebCore/html/LoadableTextTrack.cpp:131 > + if (static_cast<HTMLTrackElement*>(node) == m_trackElement) This cast shouldn’t be needed because m_trackElement should automatically convert to a Node*. (In reply to comment #4) > (From update of attachment 115451 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=115451&action=review > > > Source/WebCore/html/LoadableTextTrack.cpp:128 > > + for (Node* node = m_trackElement->parentNode()->firstChild(); node; node = node->nextSibling()) { > > What guarantees the track element has a non-zero parent? > That should not happen because a track element are only added to the list when insertedIntoTree is called, and it is always removed from the list when willRemove is called, but I added an ASSERT. > > Source/WebCore/html/LoadableTextTrack.cpp:131 > > + if (static_cast<HTMLTrackElement*>(node) == m_trackElement) > > This cast shouldn’t be needed because m_trackElement should automatically convert to a Node*. Thanks. Comment on attachment 115451 [details]
Proposed patch
Clearing flags, changes committed.
|