HTMLStyleElement and SVGStyleElement share the StyleElement base class. Some years ago the code was perfectly shared between those two classes. This has been changed since a while, and HTMLStyleElement contains functionality SVGStyleElement lacks (line number reporting for style sheets etc..) Refactor the code, to save virtual function calls, and to make both classes simpler.
Created attachment 63141 [details] Patch
Attachment 63141 [details] did not build on qt: Build output: http://queues.webkit.org/results/3646082
Attachment 63141 [details] did not build on mac: Build output: http://queues.webkit.org/results/3648073
Created attachment 63142 [details] Patch v2 Oops, a last minute change broke the build, restore m_sheet as protected variable.
Attachment 63142 [details] did not build on mac: Build output: http://queues.webkit.org/results/3576716
Attachment 63142 [details] did not build on qt: Build output: http://queues.webkit.org/results/3592647
Created attachment 63143 [details] Patch v3 *sigh* uploaded wrong version.
Attachment 63141 [details] did not build on chromium: Build output: http://queues.webkit.org/results/3635170
Attachment 63141 [details] did not build on gtk: Build output: http://queues.webkit.org/results/3640128
Attachment 63141 [details] did not build on win: Build output: http://queues.webkit.org/results/3559720
Comment on attachment 63143 [details] Patch v3 LGTM. Can you please add ASSERT's for document in StyleElement::insertedIntoDocument, removedFromDocument and sheetLoaded?
Thanks, also added ASSERT(element) while I was at it. Landed in r64420.