Renderers should receive their style at construction.
<https://webkit.org/b/123396>

Pass the RenderStyle to all non-text renderer constructors.
After construction, initializeStyle() must be called (as a stopgap
measure) until we are able to do style-derived initialization
without virtual function calls.

With this change, RenderElement::m_style is never null. Subsequent
patches will add enforcement for this and also make style() return
a RenderStyle&.

I'm adding three FIXME's in this patch:

    - createRendererIfNeeded() calls AnimationController to set up
      the initial style manually instead of asking RenderElement's
      setAnimatedStyle() to do it. This can probably be done in a
      nicer way, but it's not clear yet how.

    - ImageContentData::createRenderer() does a bit of unnecessary
      work. This should be easy to clean up but got too distracting
      to be part of this patch.

    - Document::createRenderTree() creates the RenderView with an
      initial dummy RenderStyle. I've done this because resolving
      the document style assumes we already have a RenderView.

For styleWillChange() implementations to detect that they are
reacting to the initial style, I've added a hasInitializedStyle()
function on RenderElement. This will return false until you've
called initializeStyle() on the renderer. This should go away
along with initializeStyle() eventually.

Reviewed by Antti Koivisto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enable center and right text alignment for simple lines
https://bugs.webkit.org/show_bug.cgi?id=123398

Reviewed by Andreas Kling.

Support text-align:center and text-align:right on simple line layout path.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
        
    text-align:justify is still not supported.

(WebCore::SimpleLineLayout::computeLineLeft):
(WebCore::SimpleLineLayout::createLines):
        
    Do a rounding dance that matches the line boxes.

* rendering/SimpleLineLayout.h:
        
    Add left position to lines.

* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::Resolver::Line::rect):
        
    We now do rounding during layout.

(WebCore::SimpleLineLayout::Resolver::Line::baseline):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158098 268f45cc-cd09-0410-ab3c-d52691b4dbfc