[css3-text] Add parsing support for -webkit-text-decoration-style
https://bugs.webkit.org/show_bug.cgi?id=94093

Patch by Bruno de Oliveira Abinader <bruno.abinader@basyskom.com> on 2012-08-20
Reviewed by Julien Chaffraix.

This patch implements the "text-decoration-style" property parsing as specified
in CSS3 working draft, with "-webkit-" prefix. The specification can be found
here: http://dev.w3.org/csswg/css3-text/#text-decoration-style

Additionally, Mozilla implementation details can be found here:
https://developer.mozilla.org/en-US/docs/CSS/text-decoration-style

This is an individual task for bug 90958. Rendering support will be handled on a
different bug.

Source/WebCore:

Test: fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-style.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationStyleFlagsToCSSValue):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator TextDecorationStyle):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h: Added non-bitwise TextDecorationStyle enum.
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Added m_textDecorationStyle to default and copy constructors.
(WebCore::StyleRareNonInheritedData::operator==): Include m_textDecorationStyle in comparison.
* rendering/style/StyleRareNonInheritedData.h:
(StyleRareNonInheritedData):
Added m_textDecorationStyle here as it won't be used regularly.

LayoutTests:

* fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-style-expected.txt: Added.
* fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-style.html: Added.
* fast/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-style.js: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Schedule texture uploads based on hard-coded timer and vsync.
https://bugs.webkit.org/show_bug.cgi?id=84281

Patch by David Reveman <reveman@chromium.org> on 2012-08-20
Reviewed by James Robinson.

Source/WebCore:

Improve interaction between vsync and texture uploads by performing
uploads in smaller batches and use a hard-coded timer to emulate
upload completion. This greatly reduces the chance of the compositor
missing a vsync due to being busy with texture uploads.

The CCScheduler client is now given a time limit when told to update
more resources. This time limit is passed to an instance of the
CCTextureUpdateController class, which is responsible for performing
texture updates until the limit is reached.

Unit tests: CCSchedulerTest.RequestCommit
            CCTextureUpdateControllerTest.UpdateMoreTextures
            CCTextureUpdateControllerTest.HasMoreUpdates

* platform/graphics/chromium/cc/CCFrameRateController.cpp:
(WebCore::CCFrameRateController::nextTickTime):
(WebCore):
* platform/graphics/chromium/cc/CCFrameRateController.h:
(CCFrameRateController):
* platform/graphics/chromium/cc/CCScheduler.cpp:
(WebCore::CCScheduler::processScheduledActions):
* platform/graphics/chromium/cc/CCScheduler.h:
(CCSchedulerClient):
* platform/graphics/chromium/cc/CCTextureUpdateController.cpp:
(WebCore::CCTextureUpdateController::maxPartialTextureUpdates):
(WebCore::CCTextureUpdateController::CCTextureUpdateController):
(WebCore::CCTextureUpdateController::updateMoreTextures):
(WebCore):
(WebCore::CCTextureUpdateController::onTimerFired):
(WebCore::CCTextureUpdateController::monotonicTimeNow):
(WebCore::CCTextureUpdateController::updateMoreTexturesTime):
(WebCore::CCTextureUpdateController::updateMoreTexturesSize):
(WebCore::CCTextureUpdateController::updateMoreTexturesIfEnoughTimeRemaining):
(WebCore::CCTextureUpdateController::updateMoreTexturesNow):
* platform/graphics/chromium/cc/CCTextureUpdateController.h:
(WebCore::CCTextureUpdateController::create):
(CCTextureUpdateController):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::beginFrameCompleteOnImplThread):
(WebCore::CCThreadProxy::scheduledActionUpdateMoreResources):
* platform/graphics/chromium/cc/CCThreadProxy.h:

Source/WebKit/chromium:

* tests/CCSchedulerTest.cpp:
(WebKitTests::TEST):
* tests/CCSchedulerTestCommon.h:
(WebKitTests::FakeCCTimeSource::FakeCCTimeSource):
(WebKitTests::FakeCCTimeSource::setNextTickTime):
(FakeCCTimeSource):
* tests/CCTextureUpdateControllerTest.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove incorrect getBBox() code
https://bugs.webkit.org/show_bug.cgi?id=94419

Reviewed by Dirk Schulze.

SVGPathElement defines a getBBox() function that is wrong and
should use objectBoundingBox(). This patch cleans this up.

No new tests as this is just a cleanup of old code.

* svg/SVGPathElement.cpp:
(WebCore):
* svg/SVGPathElement.h:
(SVGPathElement):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Respect runtime flags for Device Orientation and Device Motion
https://bugs.webkit.org/show_bug.cgi?id=94479

Reviewed by Adam Barth.

Source/WebCore:

There are flags that allows disabling of device orientation and device
motion at runtime. These flags determine the availability of the
corresponding event constructors in DOMWindow.

However, the flags should also control the ability to add event
listeners for these events, otherwise the feature can be used even if
it is disabled.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener):

Source/WebKit/chromium:

WebRuntimeFeatures::enableDeviceMotion should not be hard-coded to
false.

* src/WebViewImpl.cpp:
(WebKit::WebView::create):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Text Autosizing: Only take into account block width <= document layout width.
https://bugs.webkit.org/show_bug.cgi?id=93862

Patch by John Mellor <johnme@chromium.org> on 2012-08-20
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Instead of calculating the textAutosizingMultiplier purely based on the
width of each block, we now work out the maximum width of the block
that could be displayed onscreen at any one time, and use that value.
This avoids excessive text size multiplication (there's no point making
text bigger than this, since you wouldn't be able to zoom out far
enough to read it!).

To determine the maximum onscreen block width, we take the minimum of
the block width and the layoutWidth of the narrowest non-flattened
ancestor frame. Flattened frames are ignored since they don't impose a
hard limit on the maximum width that can be displayed, instead they can
stretch to fit their contents. Note that on mobile the layoutWidth of
the main frame is the fixed layout width aka viewport width.

In practice this caps the maximum multiplier to a value that depends
on the metrics of the device. For example on a Nexus S (480 x 800px
and 1.5x devicePixelRatio) with a 980px default fixed layout width,
this limits the multiplier to: 980 / (480/1.5) = 3.0625

Most pages won't have blocks that actually hit this cap, or they will
only slightly exceed it (so their multiplier will only be slightly
reduced). For example it's not uncommon for desktop pages to be
slightly wider than 980px, but they would have to additionally have
text that spans the full width of the page for this to affect them, and
even then it would merely slightly decrease their multiplier).

This will have more dramatic effects on the rare desktop pages which
give a width=device-width (or similar) mobile viewport tag (on ports
which support viewports). A follow-up patch will hopefully address this
by wrapping the text in such excessively wide blocks to the layoutWidth.

Tests: fast/text-autosizing/narrow-iframe-flattened.html
       fast/text-autosizing/narrow-iframe.html
       fast/text-autosizing/wide-block.html
       fast/text-autosizing/wide-iframe.html

* page/FrameView.cpp:
(WebCore::FrameView::isInChildFrameWithFrameFlattening):

    Made public and const, so can be used from TextAutosizer.

* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processSubtree):

    Computes the minimum layout width of the parent frames, as described
    above.

(WebCore::TextAutosizer::processBlock):

    Limits used block width to this min layout width.

LayoutTests:

Added 4 tests: a block wider than the main frame, iframes both narrower
than and wider than the main frame, both also containing wide blocks,
and a narrow iframe expanded by frame flattening.

I verified experimentally that narrow-iframe-flattened.html passes, by
enabling frame flattening in Settings.cpp, but unfortunately it won't
get run by any bots since the only platform which currently enables
Text Autosizing (Chromium), doesn't enable frame flattening (or have
the DRT methods required to test it).

* fast/text-autosizing/font-scale-factor-expected.html:
* fast/text-autosizing/font-scale-factor.html:
* fast/text-autosizing/narrow-iframe-expected.html: Added.
* fast/text-autosizing/narrow-iframe-flattened-expected.html: Added.
* fast/text-autosizing/narrow-iframe-flattened.html: Added.
* fast/text-autosizing/narrow-iframe.html: Added.
* fast/text-autosizing/wide-block-expected.html: Added.
* fast/text-autosizing/wide-block.html: Added.
* fast/text-autosizing/wide-iframe-expected.html: Added.
* fast/text-autosizing/wide-iframe.html: Added.
* platform/chromium/TestExpectations:
* platform/win/Skipped:
* platform/wincairo/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
NRWT reports unexpected EOF
https://bugs.webkit.org/show_bug.cgi?id=94387

Reviewed by Adam Barth.

Stop logging "Unexpected EOF" when we are reading the last few
bytes from stdout/stderr after stopping the subprocess.

* Scripts/webkitpy/layout_tests/port/server_process.py:
(ServerProcess._wait_for_data_and_update_buffers_using_select):
(ServerProcess.stop):

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