From the history of WebKit, I also got the feeling that Apple did one of the most important work to modernize it to compete with IE, Firefox, Opera at the time it was released. Afaik, KHTML was not really as far.
Under this view, I don't really see your point. This work by Apple (WebKit/Safari) and by KDE is now part/base of one of the most important browsers, Chrome.
Code may be important, but it's not the only thing that matters. You could write the most beautiful, efficient, useful code in the world and it wouldn't matter if nobody ever saw it.
Besides, this is straying further and further from the point that Apple ships and maintains a web rendering engine as a core component of the system. It's so firmly embedded that it actually powers most text rendering on iOS. In light of this, saying Apple should discontinue their browser which is built upon this engine is preposterous.
By that standard UC Berkeley "created" BSD and Tim Berners-Lee "created" HTML.