[Text Autosizing] Provide an API for influencing the font scale factor
https://bugs.webkit.org/show_bug.cgi?id=92882

Reviewed by Adam Barth.

Source/WebCore:

Add the font scale factor to settings, and provide an API in
window.internal.settings to change it from layout tests.

The font scale factor applied to Text Autosizing influences the sizing
of text, and will influence the scaling of boosted blocks once the
implementation progresses. For Android, it will be set to the font size
chosen in the user's system-wide preferences.

Test: fast/text-autosizing/font-scale-factor.html

* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore):
(WebCore::Settings::setTextAutosizingFontScaleFactor):
* page/Settings.h:
(Settings):
(WebCore::Settings::textAutosizingFontScaleFactor):
* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processBlock):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setTextAutosizingFontScaleFactor):
(WebCore):
* testing/InternalSettings.h:
(Backup):
(InternalSettings):
* testing/InternalSettings.idl:

Source/WebKit/chromium:

Add an API to change Text Autosizing's font scale factor.

The font scale factor applied to Text Autosizing influences the sizing
of text, and will influence the scaling of boosted blocks once the
implementation progresses. For Android, it will be set to the font size
chosen in the user's system-wide preferences.

* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setTextAutosizingFontScaleFactor):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):

LayoutTests:

Add a basic test. More usable tests should be added later, as it's
really hard to test this accurately in this phase of the implementation,
and Text Autosizing is still subject to various bugs.

The font scale factor applied to Text Autosizing influences the sizing
of text, and will influence the scaling of boosted blocks once the
implementation progresses. For Android, it will be set to the font size
chosen in the user's system-wide preferences.

* fast/text-autosizing/font-scale-factor-expected.html: Added.
* fast/text-autosizing/font-scale-factor.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Generalize SheriffIRCBot to prepare for PerfBot
https://bugs.webkit.org/show_bug.cgi?id=92912

Reviewed by Adam Barth.

Renamed SheriffIRCBot to IRCBot and generalized to support non-sheriffbot IRC bot in the future.
This will be useful when I add an experimental perf EWS IRC bot.

* Scripts/webkitpy/tool/bot/irc_command.py:
(Whois.execute):
* Scripts/webkitpy/tool/bot/irc_command_unittest.py:
(IRCCommandTest):
* Scripts/webkitpy/tool/bot/ircbot.py: Moved from Tools/Scripts/webkitpy/tool/bot/sheriffircbot.py.
(Eliza): Moved from irc_command.
(Eliza.__init__):
(Eliza.execute):
(IRCBot):
(IRCBot.__init__):
(IRCBot.irc_delegate):
(IRCBot._parse_command_and_args):
(IRCBot.process_message):
* Scripts/webkitpy/tool/bot/ircbot_unittest.py: Moved from Tools/Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py.
(run):
(IRCBotTest):
(IRCBotTest.test_eliza): Moved from IRCCommandTest.
(IRCBotTest.test_parse_command_and_args):
(IRCBotTest.test_exception_during_command):
* Scripts/webkitpy/tool/bot/sheriffircbot.py: Removed.
* Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py: Removed.
* Scripts/webkitpy/tool/commands/sheriffbot.py:
(SheriffBot.begin_work_queue):
* Scripts/webkitpy/webkitpy.pyproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Race condition between first layout and viewport attributes initialization
https://bugs.webkit.org/show_bug.cgi?id=92902

Patch by Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> on 2012-08-01
Reviewed by Noam Rosenthal.

Initializing m_rawAttributes from QtViewportHandler to avoid calculation of random
scale factors on the first layout is triggered.

* UIProcess/qt/QtViewportHandler.cpp:
(WebKit::QtViewportHandler::QtViewportHandler):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Move compositor HUD font atlas generation out of compositor core
https://bugs.webkit.org/show_bug.cgi?id=92901

Reviewed by Adrienne Walker.

This moves the font atlas generation out of CCFontAtlas into a separate helper class and ports the CCFontAtlas
text drawing code over to use skia directly.

* WebCore.gypi:
* platform/graphics/chromium/CompositorHUDFontAtlas.cpp: Added.
(WebCore):
(WebCore::wrapPositionIfNeeded):
(WebCore::CompositorHUDFontAtlas::generateFontAtlas):
* platform/graphics/chromium/CompositorHUDFontAtlas.h: Added.
(WebCore):
(CompositorHUDFontAtlas):
* platform/graphics/chromium/cc/CCFontAtlas.cpp:
(WebCore::CCFontAtlas::CCFontAtlas):
(WebCore::CCFontAtlas::~CCFontAtlas):
(WebCore::CCFontAtlas::initialize):
(WebCore::CCFontAtlas::drawText):
(WebCore::CCFontAtlas::drawOneLineOfTextInternal):
(WebCore::CCFontAtlas::drawDebugAtlas):
* platform/graphics/chromium/cc/CCFontAtlas.h:
(WebCore):
(CCFontAtlas):
* platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] remove unused fields from LayerRendererCapabilities
https://bugs.webkit.org/show_bug.cgi?id=92906

Reviewed by James Robinson.

No new tests (just removing dead code).

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
(LayerRendererCapabilities):


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