[chromium] Simplify computation of screenRect/windowRect.
https://bugs.webkit.org/show_bug.cgi?id=110456

Patch by John Mellor <johnme@chromium.org> on 2013-02-21
Reviewed by Adam Barth.

This patch removes applyDeviceScaleFactorInCompositor checks
added by http://trac.webkit.org/changeset/139356 because
Chrome for Android now sizes its screen and window in DIP
units (like other platforms), so they are no longer necessary.

Source/WebCore:

No new tests, since this is just removing an unused codepath.

* platform/chromium/PlatformScreenChromium.cpp:
(WebCore::screenRect):
(WebCore::screenAvailableRect):
* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processSubtree):

Source/WebKit/chromium:

* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::windowRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert buttons from DeprecatedFlexBox to nondeprecated FlexibleBox
https://bugs.webkit.org/show_bug.cgi?id=109994

Patch by Christian Biesinger <cbiesinger@chromium.org> on 2013-02-21
Reviewed by Ojan Vafai.

Source/WebCore:

Covered by existing tests for <button> and <input
type="button|submit|reset">

* css/html.css:
(input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::-webkit-file-upload-button, button):
Convert from box-align to align-items. We are using flex-start here in
conjunction with an auto margin for correct centering. See
RenderButton.cpp below for the margin & more explanation.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
Add a case for creating a non-deprecated flex box.

* rendering/RenderButton.cpp:
(WebCore::RenderButton::RenderButton):
(WebCore::RenderButton::addChild):
(WebCore::RenderButton::removeChild):
Forward to new base class
(WebCore::RenderButton::styleWillChange):
(WebCore::RenderButton::setupInnerStyle):
We are now using flexbox properties.
- min-width is needed for correct shrinking of the contents
- margin-top and margin-bottom are used for correct centering. We
can't use align-items: center because results are incorrect when the
content overflows. See LayoutTests/fast/forms/control-clip.html

* rendering/RenderButton.h:
Inherit from RenderFlexibleBox

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::createAnonymous):
(WebCore):
* rendering/RenderFlexibleBox.h:
(RenderFlexibleBox):
Add a createAnonymous function to RenderFlexibleBox.

LayoutTests:

* fast/flexbox/box-orient-button.html: Change -webkit-box to
-webkit-flex, and related changes.
* fast/flexbox/resources/box-orient-button.js:
(setFlexDirection): webkitBoxOrient -> webkitFlexDirection

* fast/replaced/table-percent-height.html: Give a value to the
<input type="button"> so that the layout doesn't change. No need to
change expectations because this test uses dumpAsText() and just
compares one button's height to another.

* http/tests/security/isolatedWorld/userGestureEvents.html: Add text
to the button so that sending the click event doesn't miss the
now-smaller button.
* http/tests/security/isolatedWorld/userGestureEvents-expected.txt:
Add that text to the expectation too.

* fast/forms/button-generated-content-expected.txt:
* platform/chromium-linux/css2.1/20110323/replaced-elements-001-expected.png:
* platform/chromium-linux/css2.1/20110323/replaced-elements-001-expected.txt:
* platform/chromium-linux/fast/forms/button-generated-content-expected.png:
* platform/chromium-linux/fast/forms/button-generated-content-expected.txt:
* platform/chromium-linux/fast/forms/select-baseline-expected.png:
* platform/chromium-linux/fast/forms/select-baseline-expected.txt:
* platform/chromium-linux/svg/custom/foreign-object-skew-expected.png:
* platform/chromium-linux/svg/custom/foreign-object-skew-expected.txt:
* platform/chromium-linux/tables/mozilla/bugs/bug92647-2-expected.png:
* platform/chromium-linux/tables/mozilla/bugs/bug92647-2-expected.txt:
* platform/mac/css2.1/20110323/replaced-elements-001-expected.txt:
* platform/mac/fast/forms/select-baseline-expected.txt:
* platform/mac/svg/custom/foreign-object-skew-expected.txt:
Rebaseline. Most changes come from the fact that an empty button now
consistently has a small height, when previously it would sometimes
have the height of the line. See this testcase:
https://bugs.webkit.org/attachment.cgi?id=188679
The new behavior is consistent with Firefox.

The only other difference is fast/forms/button-generated-content.html:
The empty buttons are now aligned on the baseline instead of being
vertically centered in the line. This is consistent with Firefox.

* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
Mark tests for rebaselining.

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