Crash in media/unsupported-rtsp.html.
https://bugs.webkit.org/show_bug.cgi?id=106038

Reviewed by Eric Carlson.

Fixes media/unsupported-rtsp.html on Mac platforms which support AVAssetResourceLoadingRequest.

Check that the CachedResource passed in the notifyFinished method didn't fail or error before
passing its (possibly nil) contents to the AVAssetResourceLoadingRequest.

* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::notifyFinished):
(WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSP: Blocked 'track' sources should only log once to the console.
https://bugs.webkit.org/show_bug.cgi?id=106091

Reviewed by Eric Carlson.

Source/WebCore:

HTMLTrackElement posts a message to the console when track data is
blocked by Content Security Policy. Now that we're logging inside the
ContentSecurityPolicy object itself, there's no need for the
duplication. This patch drops the extra log message (and, as a
side-effect, adds a test that ensures that 'track' content is governed
by the 'media-src' directive).

Test: http/tests/security/contentSecurityPolicy/media-src-track-block.html

* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::canLoadUrl):

LayoutTests:

* http/tests/security/contentSecurityPolicy/media-src-track-block-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/media-src-track-block.html: Added.
* http/tests/security/contentSecurityPolicy/resources/track.srt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clamp font sizes to valid range in RenderStyle::setFontSize
https://bugs.webkit.org/show_bug.cgi?id=106014

Patch by John Mellor <johnme@chromium.org> on 2013-01-04
Reviewed by Emil A Eklund.

There is a test-case attached to http://crbug.com/167443, but I can't
think of a good way of automatically testing this. Functionality
shouldn't change on normal pages.

* rendering/style/RenderStyleConstants.h:
    Add constant for maximum allowed font size.
* css/StyleBuilder.cpp:
(WebCore::ApplyPropertyFontSize::applyValue):
    Use constant from RenderStyleConstants.h instead of hardcoding.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::getComputedSizeFromSpecifiedSize):
    Use constant from RenderStyleConstants.h instead of hardcoding.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setFontSize):
    Clamp non-finite and out of range font sizes.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove unneeded WebDelegatedRendererLayer and WebCompositorTransferableResourceList headers
https://bugs.webkit.org/show_bug.cgi?id=105263

Patch by James Robinson <jamesr@chromium.org> on 2013-01-04
Reviewed by Darin Fisher.

These aren't needed any more since the delegation will be set up on the chromium side.

* Platform.gypi:
* chromium/public/WebCompositorSupport.h:
(WebKit):
* chromium/public/WebCompositorTransferableResourceList.h: Removed.
* chromium/public/WebDelegatedRendererLayer.h: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS url() filters with forward references don't work
https://bugs.webkit.org/show_bug.cgi?id=90405

Based on a patch by Keyar Hood.

Reviewed by Dirk Schulze.

Source/WebCore:

In order for CSS to reference SVG filters that will occur later in
the document, or will be added at a future time, we need a way to
notify the target element (the one the filter style is applied to)
when the correct SVG filter is added to the DOM.
There is already code for SVG elements that handles this problem, in
SVGResourcesCache. This patch allows any element to have a reference to
an SVG element in SVGResourceCache.

Tests: css3/filters/effect-reference-after.html
       css3/filters/effect-reference-delete-crash.html
       css3/filters/effect-reference-delete.html
       css3/filters/effect-reference-removed-while-pending-resources.html
       css3/filters/effect-reference-rename.html
       css3/filters/effect-reference-reset-style-delete-crash.html
       svg/filters/filter-cycle.html

* dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::removedFrom):
When an Element is deleted or removed from its container, and it
has pending resources, remove it from the SVGResourceCache resources
on deletion or when removed from its container.
(WebCore::Element::hasPendingResources):
(WebCore::Element::setHasPendingResources):
(WebCore::Element::clearHasPendingResources):
Accessors for ElementRareData's new bit flag.
* dom/Element.h:
(WebCore::Element::buildPendingResource):
Virtual function to override for referenced elements (moved from SVGElement).
* dom/ElementRareData.h:
(WebCore::ElementRareData::hasPendingResources):
(WebCore::ElementRareData::setHasPendingResources):
(WebCore::ElementRareData::ElementRareData):
Add a new bit flag to indicate whether the element depends on pending resources or not, and accessors.
* dom/NodeRareData.h:
(WebCore::NodeRareData::NodeRareData):
(NodeRareData):
The actual flag bit lives in NodeRareData, so it compacts better with
other flags.
* platform/graphics/texmap/TextureMapperImageBuffer.cpp:
(WebCore::BitmapTextureImageBuffer::applyFilters):
Changed to the new function signature for FilterEffectRenderer::build().
* rendering/FilterEffectRenderer.cpp:
(WebCore::createCustomFilterEffect):
(WebCore::FilterEffectRenderer::buildReferenceFilter):
Changed signature to accept a RenderObject rather than a Document, so we know which node to notify when the SVG filter arrives.  If the referenced filter cannot be found, add its id as a pending reference.
(WebCore::FilterEffectRenderer::build):
* rendering/FilterEffectRenderer.h:
Change to signatures of build() and buildReferenceFilter() to pass
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):
Use the new semantics for FilterEffectRenderer::build().
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::registerResource):
Call clearHasPendingResourceIfPossible on the SVGDocumentExtensions, not
on the element, since we want to support generic Elements.
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::addResourcesFromRenderObject):
(WebCore::SVGResourcesCache::clientStyleChanged):
For non-SVG elements, set a synthetic style change when parent resources
are invalidated.
(WebCore::SVGResourcesCache::resourceDestroyed):
Add support for non-SVG Elements.
* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::addPendingResource):
(WebCore::SVGDocumentExtensions::isElementPendingResources):
(WebCore::SVGDocumentExtensions::isElementPendingResource):
Changed to allow use of Element instead of SVGElement.
(WebCore::SVGDocumentExtensions::clearHasPendingResourcesIfPossible):
Moved from SVGElement, and made to work on any Element.  This way,
we avoid adding this function to Element itself.
(WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
(WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
Changed to allow use of Element instead of SVGElement.
* svg/SVGDocumentExtensions.h:
SVGElement -> Element.
* svg/SVGElement.cpp:
(WebCore::SVGElement::~SVGElement):
(WebCore::SVGElement::removedFrom):
Don't handle pending resource notifications (Element will do it).
* svg/SVGElement.h:
All functions moved to Element, except for clearHasPendingResourcesIfPossible() moved to SVGDocumentExtensions.
* svg/SVGElementRareData.h:
(WebCore::SVGElementRareData::SVGElementRareData):
m_hasPendingResources and accessors moved to ElementRareData.
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
SVGElement -> Element, and call SVGDocumentExtensions for
clearHasPendingResourcesIfPossible().

LayoutTests:

* css3/filters/effect-reference-after-expected.html: Added.
* css3/filters/effect-reference-after.html: Added.
* css3/filters/effect-reference-delete-crash.html: Added.
* css3/filters/effect-reference-delete-expected.html: Added.
* css3/filters/effect-reference-delete.html: Added.
* css3/filters/effect-reference-removed-while-pending-resources-expected.html: Added.
* css3/filters/effect-reference-removed-while-pending-resources.html: Added.
* css3/filters/effect-reference-rename-expected.html: Added.
* css3/filters/effect-reference-rename.html: Added.
* css3/filters/effect-reference-reset-style-delete-crash-expected.txt: Added.
* css3/filters/effect-reference-reset-style-delete-crash.html: Added.
* css3/filters/script-tests/effect-reference-delete-crash.js: Added.
* css3/filters/script-tests/effect-reference-reset-style-delete-crash.js: Added.
* svg/filters/filter-cycle-expected.html: Added.
* svg/filters/filter-cycle.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add Mac baselines for subpixel tests added in r125794, r137945, and r138200.
https://bugs.webkit.org/show_bug.cgi?id=106070

Reviewed by Emil A Eklund.

Added baselines.

* platform/mac/fast/sub-pixel: Added.
* platform/mac/fast/sub-pixel/sub-pixel-accumulates-to-layers-expected.png: Added.
* platform/mac/fast/sub-pixel/sub-pixel-accumulates-to-layers-expected.txt: Added.
* platform/mac/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.png: Added.
* platform/mac/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.txt: Added.
* platform/mac/fast/sub-pixel/transformed-iframe-copy-on-scroll-expected.png: Added.
* platform/mac/fast/sub-pixel/transformed-iframe-copy-on-scroll-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] WebTransformationMatrix shouldn't alias memory for TransformationMatrix
https://bugs.webkit.org/show_bug.cgi?id=106025

Patch by James Robinson <jamesr@chromium.org> on 2013-01-04
Reviewed by Adrienne Walker.

Source/Platform:

* chromium/public/WebTransformationMatrix.h:
(WebCore):
(WebKit::WebTransformationMatrix::~WebTransformationMatrix):
(WebTransformationMatrix):

Source/WebCore:

* platform/chromium/support/WebTransformationMatrix.cpp:
(WebKit::WebTransformationMatrix::WebTransformationMatrix):
(WebKit::WebTransformationMatrix::reset):
(WebKit):
(WebKit::WebTransformationMatrix::operator=):
(WebKit::WebTransformationMatrix::operator==):
(WebKit::WebTransformationMatrix::inverse):
(WebKit::WebTransformationMatrix::to2dTransform):
(WebKit::WebTransformationMatrix::multiply):
(WebKit::WebTransformationMatrix::makeIdentity):
(WebKit::WebTransformationMatrix::translate):
(WebKit::WebTransformationMatrix::translate3d):
(WebKit::WebTransformationMatrix::translateRight3d):
(WebKit::WebTransformationMatrix::scale):
(WebKit::WebTransformationMatrix::scaleNonUniform):
(WebKit::WebTransformationMatrix::scale3d):
(WebKit::WebTransformationMatrix::rotate):
(WebKit::WebTransformationMatrix::rotate3d):
(WebKit::WebTransformationMatrix::skewX):
(WebKit::WebTransformationMatrix::skewY):
(WebKit::WebTransformationMatrix::applyPerspective):
(WebKit::WebTransformationMatrix::blend):
(WebKit::WebTransformationMatrix::hasPerspective):
(WebKit::WebTransformationMatrix::isInvertible):
(WebKit::WebTransformationMatrix::isBackFaceVisible):
(WebKit::WebTransformationMatrix::isIdentity):
(WebKit::WebTransformationMatrix::isIdentityOrTranslation):
(WebKit::WebTransformationMatrix::isIntegerTranslation):
(WebKit::WebTransformationMatrix::m11):
(WebKit::WebTransformationMatrix::setM11):
(WebKit::WebTransformationMatrix::m12):
(WebKit::WebTransformationMatrix::setM12):
(WebKit::WebTransformationMatrix::m13):
(WebKit::WebTransformationMatrix::setM13):
(WebKit::WebTransformationMatrix::m14):
(WebKit::WebTransformationMatrix::setM14):
(WebKit::WebTransformationMatrix::m21):
(WebKit::WebTransformationMatrix::setM21):
(WebKit::WebTransformationMatrix::m22):
(WebKit::WebTransformationMatrix::setM22):
(WebKit::WebTransformationMatrix::m23):
(WebKit::WebTransformationMatrix::setM23):
(WebKit::WebTransformationMatrix::m24):
(WebKit::WebTransformationMatrix::setM24):
(WebKit::WebTransformationMatrix::m31):
(WebKit::WebTransformationMatrix::setM31):
(WebKit::WebTransformationMatrix::m32):
(WebKit::WebTransformationMatrix::setM32):
(WebKit::WebTransformationMatrix::m33):
(WebKit::WebTransformationMatrix::setM33):
(WebKit::WebTransformationMatrix::m34):
(WebKit::WebTransformationMatrix::setM34):
(WebKit::WebTransformationMatrix::m41):
(WebKit::WebTransformationMatrix::setM41):
(WebKit::WebTransformationMatrix::m42):
(WebKit::WebTransformationMatrix::setM42):
(WebKit::WebTransformationMatrix::m43):
(WebKit::WebTransformationMatrix::setM43):
(WebKit::WebTransformationMatrix::m44):
(WebKit::WebTransformationMatrix::setM44):
(WebKit::WebTransformationMatrix::a):
(WebKit::WebTransformationMatrix::setA):
(WebKit::WebTransformationMatrix::b):
(WebKit::WebTransformationMatrix::setB):
(WebKit::WebTransformationMatrix::c):
(WebKit::WebTransformationMatrix::setC):
(WebKit::WebTransformationMatrix::d):
(WebKit::WebTransformationMatrix::setD):
(WebKit::WebTransformationMatrix::e):
(WebKit::WebTransformationMatrix::setE):
(WebKit::WebTransformationMatrix::f):
(WebKit::WebTransformationMatrix::setF):
(WebKit::WebTransformationMatrix::toWebCoreTransform):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FlakyTestReporter should be re-enabled and taught how to post patches
https://bugs.webkit.org/show_bug.cgi?id=103839

Reviewed by Adam Barth.

This moves LayoutTestResultsReader off of the DeprecatedPort object.
It also adds a real Port object to the EWS and CommitQueue objects
using a new PatchProcessingQueue superclass.
PatchProcessingQueue doesn't seem to be the cleanest insertion point
but works for this purpose.
I also moved _upload_results_archive_for_patch into PatchProcessingQueue
to resolve a FIXME.

This required some hacks/shiming between the non-specific "old"
port names which the EWS system is currently using, and the new
port objects.  This shimming is done in PatchProcessingQueue._new_port_name_from_old.

Hopefully this will fix the flaky test reporter and results uploading.
Certainly it's another small step towards getting rid of the old ports.py
infrastructure and making the NRWT Port class common webkitpy infrastructure.

Now that DeprecatedPort is no longer used for the results directory
I removed all the explicit results-dir code which webkit-patch was using
in --non-interactive mode to tell NRWT to use a results-dir it understood. :)

* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.run_perl_unittests_command):
* Scripts/webkitpy/common/config/ports_mock.py:
(MockPort.name):
* Scripts/webkitpy/common/system/outputcapture.py:
(OutputCapture.assert_outputs):
* Scripts/webkitpy/layout_tests/port/apple.py:
(ApplePort.determine_full_port_name):
* Scripts/webkitpy/tool/bot/layouttestresultsreader.py:
(LayoutTestResultsReader.__init__):
(LayoutTestResultsReader):
(LayoutTestResultsReader._read_file_contents):
(LayoutTestResultsReader._create_layout_test_results):
(LayoutTestResultsReader._create_unit_test_results):
(LayoutTestResultsReader.results):
(LayoutTestResultsReader.archive):
* Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
(LayoutTestResultsReaderTest.test_missing_layout_test_results):
(LayoutTestResultsReaderTest.test_create_unit_test_results):
(test_missing_unit_test_results_path):
(test_layout_test_results):
(test_archive_last_layout_test_results):
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem):
(AbstractEarlyWarningSystem.__init__):
(AbstractEarlyWarningSystem.begin_work_queue):
(AbstractEarlyWarningSystem.run_command):
* Scripts/webkitpy/tool/commands/queues.py:
(AbstractPatchQueue.work_item_log_path):
(PatchProcessingQueue):
(PatchProcessingQueue._new_port_name_from_old):
(PatchProcessingQueue.begin_work_queue):
(PatchProcessingQueue._upload_results_archive_for_patch):
(CommitQueue):
(CommitQueue.begin_work_queue):
(CommitQueue.run_command):
(AbstractReviewQueue):
(AbstractReviewQueue.__init__):
(AbstractReviewQueue.begin_work_queue):
* Scripts/webkitpy/tool/commands/queues_unittest.py:
(AbstractPatchQueueTest.test_next_patch):
(PatchProcessingQueueTest):
(PatchProcessingQueueTest.test_upload_results_archive_for_patch):
* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests.run):
* Scripts/webkitpy/tool/steps/runtests_unittest.py:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The following two tests are starting to fail while on the verge of
timing out. Adding Failure to their modifiers.

fast/canvas/webgl/context-creation-and-destruction.html
platform/chromium/virtual/gpu/fast/canvas/webgl/context-creation-and-destruction.html

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a crash test expectation for the crashing test on Mac WebKit1 after r138782,
which attempted to fix the crash but appears to did so only on WebKit2.

The failure is tracked by the bug 106123.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138828 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKitCSSTransformValue::customCssText() should always allocate once
https://bugs.webkit.org/show_bug.cgi?id=105445

Reviewed by Alexis Menard.

When converting a WebKitCSSTransformValue to a String representation,
it was typically done with 2 memory allocations due to the string size in StringBuilder.

This patch changes the code to use the String Concatenate operations in order
to create the string at once.

The opening parenthesis is also moved in the prefix name in order to maximize
the range copied with memcopy.

* css/WebKitCSSTransformValue.cpp:
(WebCore::transformValueToCssString): New generic function for boxing values.
(WebCore::WebKitCSSTransformValue::customCssText):
(WebCore::WebKitCSSTransformValue::customSerializeResolvingVariables):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Adding Lion image baseline for
fast/regions/full-screen-video-from-region.html

* platform/chromium-mac-lion/fast/regions/full-screen-video-from-region-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove static create functions from types WebCompositorSupport can construct
https://bugs.webkit.org/show_bug.cgi?id=99877

Patch by James Robinson <jamesr@chromium.org> on 2013-01-04
Reviewed by Adrienne Walker.

* chromium/public/WebAnimation.h:
* chromium/public/WebContentLayer.h:
* chromium/public/WebExternalTextureLayer.h:
* chromium/public/WebFloatAnimationCurve.h:
* chromium/public/WebIOSurfaceLayer.h:
* chromium/public/WebImageLayer.h:
* chromium/public/WebLayer.h:
* chromium/public/WebLayerTreeView.h:
* chromium/public/WebScrollbarLayer.h:
* chromium/public/WebSolidColorLayer.h:
* chromium/public/WebTransformAnimationCurve.h:
* chromium/public/WebVideoLayer.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PseudoElement should never dispatch events
https://bugs.webkit.org/show_bug.cgi?id=106048

Reviewed by Ojan Vafai.

Source/WebCore:

The new DOM based generated content can sometimes dispatch events
as a result of animations or transitions which is incorrect as it
exposes the PseudoElement to script. All event dispatch from a
PseudoElement should be ignored.

Per discussions with Tab Atkins in the future we might add support
by making events dispatched from a pseudo element fire with the
target as the parent element and add a new pseudo property to
events that has the value "before" or "after".

Test: fast/css-generated-content/pseudo-element-events.html

* dom/PseudoElement.h:

LayoutTests:

Add a test that events don't get dispatched from pseudo elements. The
only way right now to cause this is with transitions or animations.

* fast/css-generated-content/pseudo-element-events-expected.txt: Added.
* fast/css-generated-content/pseudo-element-events.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS3 calc: working with translate and scale transforms
https://bugs.webkit.org/show_bug.cgi?id=105985

Reviewed by Ojan Vafai.

Source/WebCore:

Allow convertTo[Float|Int]Length functions to process calculated values.

Tests: css3/calc/transforms-scale.html
       css3/calc/transforms-translate.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::convertToIntLength):
(WebCore::StyleResolver::convertToFloatLength):

LayoutTests:

* css3/calc/transforms-scale-expected.html: Added.
* css3/calc/transforms-scale.html: Added.
* css3/calc/transforms-translate-expected.html: Added.
* css3/calc/transforms-translate.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSP 1.1: Experiment with adding line numbers to violation reports.
https://bugs.webkit.org/show_bug.cgi?id=105374

Reviewed by Adam Barth.

Source/WebCore:

Line numbers and URLs were added to the CSP 1.1 spec in
https://dvcs.w3.org/hg/content-security-policy/rev/e0270baace3d, and
already exist (and have for quite some time) in Firefox's
implementation. Based on developer feedback, it seems reasonable to
experiment a bit with adding them to WebKit's violation reports.
This patch generates a stack trace when constructing the violation
report object (iff a violation report object ought to be generated)
and adds a line number and URL to the object if possible.

Tests: http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript.html
       http/tests/security/contentSecurityPolicy/report-uri-from-javascript.html

* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation):
    Generate a stack trace when building the violation report: if it
    has relevant detail, add the line number and URL to the report
    object.

LayoutTests:

* http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript.html: Added.
* http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/report-uri-from-javascript.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Invalidation of some SVG filter attributes on HTML content doesn't work
https://bugs.webkit.org/show_bug.cgi?id=105635

Reviewed by Dirk Schulze.

Source/WebCore:

Since HTML elements with filters are only added to m_clientLayers, not
m_clients, and do not use the FilterInfo used by SVG filters on SVG
elements, they must be invalidated separately.  Some filter attribute
invalidations call markAllClientsForInvalidation(), but some call
markClientForInvalidation() directly.  These invaldations must also
invalidate m_clientLayers.

Test: css3/filters/reference-filter-update-on-attribute-change.html

* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
(WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):
* rendering/svg/RenderSVGResourceContainer.h:
Refactor client layer invalidation out into its own function.
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
Mark all client layers for invalidation when a filter primitve attribute is
changed.

LayoutTests:

New reftest to verify filter attribute change invalidations.

* css3/filters/reference-filter-update-on-attribute-change-expected.html: Added.
* css3/filters/reference-filter-update-on-attribute-change.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add tests for WebIDL type conversions
https://bugs.webkit.org/show_bug.cgi?id=105927

Reviewed by Adam Barth.

Source/WebCore:

Expose attributes of various WebIDL types for testing ECMAScript value conversion,
including edge cases such as NaNs, Infinities, etc. These attributes hang off
a TypeConversions object created via window.internals.typeConversions().

Test: fast/js/webidl-type-mapping.html

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.vcproj/WebCoreTestSupport.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* testing/Internals.cpp:
(WebCore::Internals::typeConversions):
(WebCore):
* testing/Internals.h:
(WebCore):
* testing/Internals.idl:
* testing/TypeConversions.h: Added.
(WebCore):
(TypeConversions):
(WebCore::TypeConversions::create):
(WebCore::TypeConversions::testLong):
(WebCore::TypeConversions::setTestLong):
(WebCore::TypeConversions::testUnsignedLong):
(WebCore::TypeConversions::setTestUnsignedLong):
(WebCore::TypeConversions::testLongLong):
(WebCore::TypeConversions::setTestLongLong):
(WebCore::TypeConversions::testUnsignedLongLong):
(WebCore::TypeConversions::setTestUnsignedLongLong):
(WebCore::TypeConversions::TypeConversions):
* testing/TypeConversions.idl: Added.

LayoutTests:

This currently fails long long conversions of non-finites (which should map to 0). Patch
in progress at: http://wkbug.com/96798

* fast/js/webidl-type-mapping-expected.txt: Added.
* fast/js/webidl-type-mapping.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Enable Input Focus when handling touch events for JS
https://bugs.webkit.org/show_bug.cgi?id=106109

Reviewed by Yong Li.

PR 273325.

Toggle input mode active when a touch event is
received for JS processing to ensure state
is updated even when event is consumed.

Reviewed Internally by Gen Mak.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::touchEvent):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Vertical writing mode can overflow fixed size grandparent container
https://bugs.webkit.org/show_bug.cgi?id=93655

Reviewed by David Hyatt.

Source/WebCore:

Add a hook to RenderBox::availableHeight to exclude the containing block's
margin, border and padding. This is for auto-sizing perpendicular writing modes
to restrict to the minimum of the fill-available height and the viewport height.

This will be used in a future patch to implement "height: fill-available".

This behavior was recently specced in http://dev.w3.org/csswg/css3-sizing/#extrinsic-sizing.

Test: fast/writing-mode/auto-sizing-orthogonal-flows.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeight):
(WebCore::RenderBox::availableLogicalHeightUsing):
* rendering/RenderBox.h:
(RenderBox):
(WebCore::RenderBox::availableWidth):
(WebCore::RenderBox::availableHeight):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::computeIntrinsicRatioInformation):
* rendering/RenderView.cpp:
(WebCore::RenderView::availableLogicalHeight):
* rendering/RenderView.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight):

LayoutTests:

* fast/writing-mode/auto-sizing-orthogonal-flows-expected.txt: Added.
* fast/writing-mode/auto-sizing-orthogonal-flows.html: Added.
* fast/writing-mode/percentage-height-orthogonal-writing-modes-expected.txt:
* fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks-expected.txt:
* fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks.html:
* fast/writing-mode/percentage-height-orthogonal-writing-modes.html:
* fast/writing-mode/table-percent-width-quirk-expected.png:
* fast/writing-mode/table-percent-width-quirk-expected.txt:
This test now correctly uses the containing blocks's availableHeight instead of the
initial containing block's height to size the perpendicular child.
* platform/chromium-linux/fast/ruby/base-shorter-than-text-expected.txt:
* platform/chromium-linux/fast/table/038-vertical-expected.png:
* platform/chromium-linux/fast/table/border-collapsing/004-vertical-expected.png:
The extra wrapping in this test is just because we subtract the body's margin when
computing the available height. If you force the table's container 16px smaller,
you get the same rendering at tip of tree WebKit.
* platform/chromium-win/fast/table/038-vertical-expected.txt:
* platform/chromium-win/fast/table/border-collapsing/004-vertical-expected.txt:
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
Add tests that will need rebaseline once this patch lands.


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