The problem appears in revision 153701. I have attached simple one-line patches that fixes it. In method ustomFilterValidatedProgram::rewriteMixVertexShader() in WebCore/platform/graphics/filters/CustomFilterValidatedProgram.cpp, the loop on line 228 should break immediately after "texCoordAttributeDefined" is set to "true". All the iterations after "texCoordAttributeDefined" is set to "true" do not perform any useful work, at best they just set "texCoordAttributeDefined" again to "true". Similarly, method MediaController::hasEnded() in WebCore/html/MediaController.cpp, the loop on line 528 should break immediately after "allHaveEnded" is set to "false". Method ArrayBuffer::transfer() in WTF/wtf/ArrayBuffer.cpp, the loop on line 46 should break immediately after "allViewsAreNeuterable" is set to "false".
Created attachment 208105 [details] Suggested patch part 1
Created attachment 208106 [details] Suggested patch part 2
Created attachment 208107 [details] Suggested patch part 3
Custom shaders don't exist anymore. Is the bug still valid for the other two types? Removing custom shader text from title.
Comment on attachment 208106 [details] Suggested patch part 2 View in context: https://bugs.webkit.org/attachment.cgi?id=208106&action=review > WebCore/html/MediaController.cpp:534 > bool allHaveEnded = true; > for (size_t index = 0; index < m_mediaElements.size(); ++index) { > - if (!m_mediaElements[index]->ended()) > + if (!m_mediaElements[index]->ended()) { > allHaveEnded = false; > + break; > + } > } > return allHaveEnded; Actually, we can do away with the variable completely and just "return false" when the loop finds an element that hasn't ended, and "return true" if the loop completes.