AX: HTML spec change indicates @aria-required should trump @required on any element
https://bugs.webkit.org/show_bug.cgi?id=122145

Reviewed by Mario Sanchez Prada.

Source/WebCore:

aria-required should win over the native "required" attribute.

Updated tests: accessibility/aria-required.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isRequired):

LayoutTests:

* accessibility/aria-required-expected.txt:
* accessibility/aria-required.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RenderElement-ize adjustForAbsoluteZoom() and friends.
<https://webkit.org/b/125921>

Make adjustForAbsoluteZoom() take a const RenderElement& instead
of a RenderObject* so we can avoid the extra branch in style().
All call sites already had RenderElements.

Reviewed by Antti Koivisto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use range for syntax in Frame and FrameView.
<https://webkit.org/b/125922>

Convert code in Frame and FrameView to use C++11's range for syntax.

Reviewed by Antti Koivisto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make more computed style helpers return values by PassRef.
<https://webkit.org/b/125923>

Tighten yet another handful of CSS computed style helper functions
to return their CSSValues by PassRef where we never return null.

Reviewed by Antti Koivisto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS: Null-pointer dereference with negative 'orphans' value.
https://bugs.webkit.org/show_bug.cgi?id=125924

Patch by Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com> on 2013-12-18
Reviewed by Andreas Kling.

Source/WebCore:

orphans and widows should be positive integer.

spec link:
http://www.w3.org/TR/CSS2/page.html#propdef-orphans

Backported from Blink: https://codereview.chromium.org/108663009

Test: fast/css/negative-orphans-crash.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):

LayoutTests:

Test with negative orphans value.

* fast/css/negative-orphans-crash-expected.txt: Added.
* fast/css/negative-orphans-crash.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
prepare-ChangeLog doesn't handle templates properly
https://bugs.webkit.org/show_bug.cgi?id=125853

Patch by Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com> on 2013-12-18
Reviewed by Daniel Bates.

* Scripts/prepare-ChangeLog:
(get_function_line_ranges_for_cpp):
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt:
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests.cpp:
(Class110<TemplateClass>::func36):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-12-18  Rob Buis  <rob.buis@samsung.com>

        [CSS Shapes] Implement interpolation between keywords in basic shapes
        https://bugs.webkit.org/show_bug.cgi?id=125108

        Reviewed by Simon Fraser.

        Allow blending for all center coordinates since top/left and bottom/right default to correct
        Length values of 0% and 100%. For mixed keyword and value positions compute the length's used
        for blending to percentages. This is possible since we compute the reference box bounds given the
        renderer.

        * page/animation/CSSPropertyAnimation.cpp:
        (WebCore::blendFunc): Pass additional RenderBox parameter.
        * rendering/style/BasicShapes.cpp:
        (WebCore::BasicShape::canBlend): Don't check circle/ellipse center anymore, but do check that both
        shapes use the same reference box.
        (WebCore::BasicShape::referenceBoxSize): Compute box dimension depending on reference box.
        (WebCore::BasicShapeCenterCoordinate::lengthForBlending): Convert to percentage for Bottom/Right.
        (WebCore::BasicShapeRectangle::blend):
        (WebCore::DeprecatedBasicShapeCircle::blend):
        (WebCore::BasicShapeCircle::blend):
        (WebCore::DeprecatedBasicShapeEllipse::blend):
        (WebCore::BasicShapeEllipse::blend):
        (WebCore::BasicShapePolygon::blend):
        (WebCore::BasicShapeInsetRectangle::blend):
        (WebCore::BasicShapeInset::blend):
        * rendering/style/BasicShapes.h:
        (WebCore::BasicShapeCenterCoordinate::blend): Use new lengthForBlending.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160770 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Additional refinement in MathMLSelectElement toggle implementation
https://bugs.webkit.org/show_bug.cgi?id=125785

Reviewed by Andreas Kling.

Source/WebCore:

* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::defaultEventHandler): Call setDefaultHandled
so this will be handled by only one element.
(WebCore::MathMLSelectElement::willRespondToMouseClickEvents): Return true
only when action is set to toggle, since other select elements will not
respond to mouse click events.
(WebCore::MathMLSelectElement::toggle): Simplified code a bit and gave
local a clearer variable name.

LayoutTests:

* mathml/presentation/maction-toggle-expected.html: Updated incorrect expected
result, which expected an already-handled event to be re-handled by a parent
element during the bubbling process.
* mathml/presentation/maction-toggle.html: Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
False webkit-check-style warnings on *.
https://bugs.webkit.org/show_bug.cgi?id=125915

Patch by Gergo Balogh <geryxyz@inf.u-szeged.hu> on 2013-12-18
Reviewed by Darin Adler.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_pointer_reference_marker_location):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Should not have identifiers with underscores in them, especially not leading underscores.
https://bugs.webkit.org/show_bug.cgi?id=125847

Patch by Gergo Balogh <geryxyz@inf.u-szeged.hu> on 2013-12-18
Reviewed by Darin Adler.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_identifier_name_in_declaration):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_runtime_selfinit):
(WebKitStyleTest.test_names):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix ASSERTION FAILED in WebCore::SVGLengthContext::determineViewport
https://bugs.webkit.org/show_bug.cgi?id=120284

Patch by Tamas Gergely <tgergely.u-szeged@partner.samsung.com> on 2013-12-18
Reviewed by Philip Rogers.

Source/WebCore:

Added handling of root <svg> elements.
Blink merge: https://chromium.googlesource.com/chromium/blink/+/a7dedf81eb7008276bb6854f0e46465e039788f8

SVGLengthContext::determineViewport() currently asserts that we're not
resolving lengths for the topmost element, but there's nothing to
prevent such calls.

The patch updates determineViewport() to handle root elements geracefully
(using their current viewport). It also changes the signature slightly
to operate directly on a FloatSize, reducing some of the boiler-plate
client code.

Tests: svg/custom/svg-length-value-handled.svg
       svg/dom/svg-root-lengths.html

* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::convertValueFromUserUnitsToPercentage):
(WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits):
(WebCore::SVGLengthContext::determineViewport):
* svg/SVGLengthContext.h:
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):

LayoutTests:

Added tests of handling root <svg> elements.
Blink merge: https://chromium.googlesource.com/chromium/blink/+/a7dedf81eb7008276bb6854f0e46465e039788f8

* svg/custom/svg-length-value-handled-expected.txt: Added.
* svg/custom/svg-length-value-handled.svg: Added.
    Tests whether root svg elements sizes are handled.
* svg/dom/svg-root-lengths-expected.txt: Added.
* svg/dom/svg-root-lengths.html: Added.
    Tests the correct handling of root svg elements sizes.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove JSInlineGetOwnPropertySlot attribute as it is no longer necessary
https://bugs.webkit.org/show_bug.cgi?id=125875

Reviewed by Brady Eidson.

Tested this on dromaeo and acid3 (the original reason for this attribute)
and it no longer provided any benefit. This makes it easier to reason about
creation of getOwnPropertySlot during binding generation.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* dom/Document.idl:
* dom/Element.idl:
* dom/Node.idl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix Dictionary encoding
https://bugs.webkit.org/show_bug.cgi?id=125930

Reviewed by Andreas Kling.

Encode the HashMap size as a 64-bit unsigned integer.

* Shared/UserData.cpp:
(WebKit::UserData::encode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Do not create cue subtree just to delete it
https://bugs.webkit.org/show_bug.cgi?id=125904

Reviewed by Jer Noble.

No new tests, covered by existing tests.

* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::setIsActive): Return early if display tree is NULL.
(WebCore::TextTrackCue::removeDisplayTree): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: WebKit not sending AXMenuClosed notification
https://bugs.webkit.org/show_bug.cgi?id=125783

Reviewed by Mario Sanchez Prada.

Source/WebCore: 

When an object with a role=menu is removed, we need to send out a notification informing that the menu has closed.
This means detecting the right kind of destruction event for an element, because we do not want to 
send this notification when the entire cache is being torn down.

Test: platform/mac/accessibility/aria-menu-closed-notification.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::~AXObjectCache):
(WebCore::AXObjectCache::remove):
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::document):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::detach):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::detach):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::detach):
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::detach):
* accessibility/AccessibilityScrollView.h:
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):

LayoutTests: 

* platform/mac/accessibility/aria-menu-closed-notification-expected.txt: Added.
* platform/mac/accessibility/aria-menu-closed-notification.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r155536): Broken error recovery in @media at-rule
https://bugs.webkit.org/show_bug.cgi?id=125637

Patch by Martin Hodovan <mhodovan@inf.u-szeged.hu> on 2013-12-18
Reviewed by Darin Adler.

Source/WebCore:

Error recovery in @media is broken if any of its rules misses the opening '{'.
The problem is that when the parser recognises the mistake it removes only the last
WHITESPACE token instead of the whole selector and tries to recover the selector again.
it swallows everything until it finds the next opening bracket. thats why the '}' brackets
of both subrules and even the @media rule are ignored, and the whole @media will be
considered invalid. By joining the selector and its trailing whitespace the error recovery
ignores the bad selector only and keep the @media rule.

Test: fast/css/media-error-recovery.html

* css/CSSGrammar.y.in:

LayoutTests:

Test with broken @media rule.

* fast/css/media-error-recovery-expected.txt: Added.
* fast/css/media-error-recovery.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Some basic DebuggerAgent cleanup
https://bugs.webkit.org/show_bug.cgi?id=125901

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-18
Reviewed by Timothy Hatcher.

* inspector/InspectorDebuggerAgent.h:
Remove virtual from not really virtual method.

* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::enable):
(WebCore::InspectorDebuggerAgent::disable):
Use member variable instead of private function.

(WebCore::InspectorDebuggerAgent::setPauseOnExceptions):
Inline the three lines from the private function.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
API to set a favicon
https://bugs.webkit.org/show_bug.cgi?id=125892

Patch by Conrad Shultz <conrad_shultz@apple.com> on 2013-12-18
Reviewed by Brian Weinstein.

* UIProcess/API/C/WKIconDatabase.cpp:
(WKIconDatabaseSetIconDataForIconURL):
Call WebIconDatabase::setIconDataForIconURL().

* UIProcess/API/C/WKIconDatabase.h:
Declare WKIconDatabaseSetIconDataForIconURL().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AudioSessionManagerMac.cpp: kLowPowerVideoBufferSize unused before OS X 10.9
https://bugs.webkit.org/show_bug.cgi?id=125935

Patch by Conrad Shultz <conrad_shultz@apple.com> on 2013-12-18
Reviewed by Jer Noble.

* platform/audio/mac/AudioSessionManagerMac.cpp:
Add __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 guard.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Flaky Test: media/video-buffered.html
https://bugs.webkit.org/show_bug.cgi?id=116277

* platform/mac/TestExpectations: Mark it as such.



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