Speculative fix for crbug.com/339075 (print preview not loading)

This is believe to have been regressed in http://src.chromium.org/viewvc/blink?revision=164466&view=revision.
That would seem logical, as it removed a guard that likely prevented a
cancelled provisional load from calling DOMWindow::finishedLoading(), which
can trigger a print.

BUG=339075

Review URL: https://codereview.chromium.org/175343005

git-svn-id: svn://svn.chromium.org/blink/trunk@167731 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Consider text alignment and direction when computing the left offset for horizontal writing modes.

To properly layout a positioned box, we need to consider special cases where the direction of
the text for that object flows towards the opposite direction the text inside that box would be
aligned to (e.g. right aligned text for LTR boxes and left aligned text for RTL boxes).

Not doing this this ways yields to undesired effects, such as having the absolutely positioned
text inside a table cell with relative positioned being wrongly rendered outside of the cell.

BUG=157539
TEST=Try rendering absolutely positioned text inside table cells with relative positioning.
R=eae@chromium.org

Review URL: https://codereview.chromium.org/150403003

git-svn-id: svn://svn.chromium.org/blink/trunk@167732 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Check for m_page when switching page popups in and out of compositing.

The popup can be closed as it's being initialized, so check that m_page still exists before trying to do anything with it.

BUG=346131

Review URL: https://codereview.chromium.org/178713002

git-svn-id: svn://svn.chromium.org/blink/trunk@167733 bbb929c8-8fbe-4397-9dbb-9b2b20218538