[Qt] Unreviewed gardening.
https://bugs.webkit.org/show_bug.cgi?id=120595

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-09-02

* platform/qt/TestExpectations: Skipping failing xss-DENIED tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Leak: Leaks in testatk.c
https://bugs.webkit.org/show_bug.cgi?id=118675

Patch by Brian Holt <brian.holt@samsung.com> on 2013-09-02
Reviewed by Mario Sanchez Prada.

Fixed memory leaks by matching ref calls with unrefs.

* tests/testatk.c:
(testWebkitAtkCaretOffsets):
(testWebkitAtkCaretOffsetsAndExtranousWhiteSpaces):
(testWebkitAtkGetTextAtOffset):
(testWebkitAtkGetTextAtOffsetNewlines):
(testWebkitAtkGetTextAtOffsetTextarea):
(testWebkitAtkGetTextAtOffsetTextInput):
(testWebkitAtkGetTextInParagraphAndBodySimple):
(testWebkitAtkGetTextInParagraphAndBodyModerate):
(testWebkitAtkTextAttributes):
(testWebkitAtkTextSelections):
(testWebkitAtkListsOfItems):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use edgeMode=duplicate for blurring on filter() function
https://bugs.webkit.org/show_bug.cgi?id=120590

Reviewed by Antti Koivisto.

Source/WebCore:

Filters on the CSS Image function filter() are not allowed to extend the
dimension of the input image. This causes weird results on blurring an image,
where the fading on the edges is clipped at the half of the fading.
We shouldn't fade edges at all and use the edgeMode=duplicate instead.
This will duplicate the pixel value on the nearest edge of the input image
instead of taking transparent black and results in nice blurred images with
sharp edges.

Spec: http://dev.w3.org/fxtf/filters/#blurEquivalent

Test: fast/filter-image/filter-image-blur.html

* css/CSSFilterImageValue.cpp: Pass consumer information to the renderer.
(WebCore::CSSFilterImageValue::image):
* rendering/FilterEffectRenderer.cpp: Set edgeMode for feGaussianBlur to
    'duplicate' or 'none' depending on the consumer.
(WebCore::FilterEffectRenderer::build):
* rendering/FilterEffectRenderer.h: Add enumeration to differ between the
    different consumers of the renderer.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):  Pass consumer
    information to the renderer.

LayoutTests:

Added test to check that filter(<image>, blur(<value>)) takes
the edgeMode 'duplicate' instead of none.

* fast/filter-image/filter-image-blur-expected.html: Added.
* fast/filter-image/filter-image-blur.html: Added.
* fast/filter-image/resources/svg-blur.svg: Added.
* fast/filter-image/resources/svg-noblur.svg: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Generate isFooElement() functions from tagname data.
<https://webkit.org/b/120584>

Reviewed by Antti Koivisto.

Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
This also outputs an isElementOfType<T> check for the Element iterators.

Removed all the hand-written isFooElement() functions that only checked tag name.

* html/HTMLTagNames.in:
* svg/svgtags.in:

    Added "generateTypeChecks" attribute as appropriate.

* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:

    Added to build systems based on how HTMLNames.h was done.
    We're just outputting an additional header file in the generated code directory
    so I suspect most ports will just pick this up automagically.

* dom/make_names.pl:
(defaultTagPropertyHash):
(printLicenseHeader):
(printTypeChecks):
(printTypeChecksHeaderFile):

    Generate a separate file for each namespace with isFooElement() helpers for
    elements with "generateTypeChecks" attribute set.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening. Skip some failing tests.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean up ContainerNode::childrenChanged
https://bugs.webkit.org/show_bug.cgi?id=120599

Reviewed by Andreas Kling.

- Make childrenChanged take a single struct argument instead of a long list of arguments.
- Use enum instead of childCountDelta. It was always -1, 0, 1 or the total number of children (in case of removing them all).
- Remove use of Node*, give the change range as Elements.
- Related cleanups.

* dom/Attr.cpp:
(WebCore::Attr::childrenChanged):
* dom/Attr.h:
* dom/CharacterData.cpp:
(WebCore::CharacterData::parserAppendData):
(WebCore::CharacterData::dispatchModifiedEvent):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::notifyChildInserted):
(WebCore::ContainerNode::notifyChildRemoved):
        
    Add private helpers for setting up the struct.

(WebCore::ContainerNode::parserInsertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeChild):
(WebCore::ContainerNode::parserRemoveChild):
(WebCore::ContainerNode::removeChildren):
(WebCore::ContainerNode::appendChild):
(WebCore::ContainerNode::parserAppendChild):
(WebCore::ContainerNode::childrenChanged):
(WebCore::ContainerNode::updateTreeAfterInsertion):
* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::childrenChanged):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::checkForSiblingStyleChanges):
        
    Clean up and simplify. Since we now get element range automatically we don't need to compute it.

(WebCore::Element::childrenChanged):
(WebCore::Element::finishParsingChildren):
* dom/Element.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::childrenChanged):
* dom/ShadowRoot.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::childrenChanged):
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
        
    Try to keep the existing behavior. This code needs  more cleanup to be sane. It shouldn't operate on Nodes
    as it only really cares about Elements.

* html/HTMLElement.h:
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::childrenChanged):
* html/HTMLFieldSetElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::childrenChanged):
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::childrenChanged):
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::childrenChanged):
* html/HTMLOptionElement.h:
* html/HTMLOutputElement.cpp:
(WebCore::HTMLOutputElement::childrenChanged):
* html/HTMLOutputElement.h:
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::childrenChanged):
* html/HTMLScriptElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::childrenChanged):
* html/HTMLSelectElement.h:
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::childrenChanged):
* html/HTMLStyleElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::childrenChanged):
* html/HTMLTextAreaElement.h:
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::childrenChanged):
* html/HTMLTitleElement.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::childrenChanged):
* html/shadow/InsertionPoint.h:
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::childrenChanged):
* svg/SVGClipPathElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::childrenChanged):
* svg/SVGElement.h:
* svg/SVGFELightElement.cpp:
(WebCore::SVGFELightElement::childrenChanged):
* svg/SVGFELightElement.h:
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::childrenChanged):
* svg/SVGFilterElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
* svg/SVGFilterPrimitiveStandardAttributes.h:
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::childrenChanged):
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceFormatElement.cpp:
(WebCore::SVGFontFaceFormatElement::childrenChanged):
* svg/SVGFontFaceFormatElement.h:
* svg/SVGFontFaceSrcElement.cpp:
(WebCore::SVGFontFaceSrcElement::childrenChanged):
* svg/SVGFontFaceSrcElement.h:
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::childrenChanged):
* svg/SVGFontFaceUriElement.h:
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::childrenChanged):
* svg/SVGGradientElement.h:
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::childrenChanged):
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::childrenChanged):
* svg/SVGMaskElement.h:
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::childrenChanged):
* svg/SVGPatternElement.h:
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::childrenChanged):
* svg/SVGScriptElement.h:
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::childrenChanged):
* svg/SVGStyleElement.h:
* svg/SVGTitleElement.cpp:
(WebCore::SVGTitleElement::childrenChanged):
* svg/SVGTitleElement.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r154955.
http://trac.webkit.org/changeset/154955
https://bugs.webkit.org/show_bug.cgi?id=120605

broke xcode4 build :| (Requested by kling on #webkit).

Patch by Commit Queue <commit-queue@webkit.org> on 2013-09-02

* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/make_names.pl:
(defaultTagPropertyHash):
(printLicenseHeader):
* html/HTMLAnchorElement.h:
(WebCore::isHTMLAnchorElement):
(WebCore::HTMLAnchorElement):
* html/HTMLAreaElement.h:
(WebCore::isHTMLAreaElement):
(WebCore::HTMLAreaElement):
* html/HTMLAudioElement.h:
(WebCore::isHTMLAudioElement):
* html/HTMLBaseElement.h:
(WebCore::isHTMLBaseElement):
(WebCore::HTMLBaseElement):
* html/HTMLCanvasElement.h:
(WebCore::isHTMLCanvasElement):
* html/HTMLElement.h:
* html/HTMLFieldSetElement.h:
(WebCore::isHTMLFieldSetElement):
(WebCore::HTMLFieldSetElement):
* html/HTMLFormElement.h:
(WebCore::isHTMLFormElement):
* html/HTMLFrameSetElement.h:
(WebCore::isHTMLFrameSetElement):
(WebCore::HTMLFrameSetElement):
* html/HTMLImageElement.h:
(WebCore::isHTMLImageElement):
* html/HTMLInputElement.h:
(WebCore::isHTMLInputElement):
* html/HTMLLabelElement.h:
(WebCore::isHTMLLabelElement):
(WebCore::HTMLLabelElement):
* html/HTMLLegendElement.h:
(WebCore::isHTMLLegendElement):
(WebCore::HTMLLegendElement):
* html/HTMLMapElement.h:
(WebCore::isHTMLMapElement):
* html/HTMLMeterElement.h:
(WebCore::isHTMLMeterElement):
* html/HTMLOptGroupElement.h:
(WebCore::isHTMLOptGroupElement):
* html/HTMLOptionElement.h:
(WebCore::isHTMLOptionElement):
* html/HTMLParamElement.h:
(WebCore::isHTMLParamElement):
(WebCore::HTMLParamElement):
* html/HTMLProgressElement.h:
(WebCore::isHTMLProgressElement):
* html/HTMLScriptElement.h:
(WebCore::isHTMLScriptElement):
* html/HTMLSourceElement.h:
(WebCore::isHTMLSourceElement):
(WebCore::HTMLSourceElement):
* html/HTMLStyleElement.h:
(WebCore::isHTMLStyleElement):
(WebCore::HTMLStyleElement):
* html/HTMLTableElement.h:
(WebCore::isHTMLTableElement):
* html/HTMLTableRowElement.h:
(WebCore::isHTMLTableRowElement):
(WebCore::HTMLTableRowElement):
* html/HTMLTagNames.in:
* html/HTMLTextAreaElement.h:
(WebCore::isHTMLTextAreaElement):
* html/HTMLTitleElement.h:
(WebCore::isHTMLTitleElement):
(WebCore::HTMLTitleElement):
* html/HTMLTrackElement.h:
(WebCore::isHTMLTrackElement):
(WebCore::HTMLTrackElement):
* svg/SVGElement.h:
* svg/SVGFontElement.h:
(WebCore::isSVGFontElement):
* svg/SVGFontFaceElement.h:
(WebCore::isSVGFontFaceElement):
(WebCore::SVGFontFaceElement):
* svg/SVGForeignObjectElement.h:
(WebCore::isSVGForeignObjectElement):
(WebCore::SVGForeignObjectElement):
* svg/SVGImageElement.h:
(WebCore::isSVGImageElement):
* svg/SVGScriptElement.h:
(WebCore::isSVGScriptElement):
* svg/svgtags.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r154909): caused many crashes on Qt WK2, EFL WK2
https://bugs.webkit.org/show_bug.cgi?id=120600

Reviewed by Andreas Kling.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::::decode): keyTime should be double here too.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/98350> [GTK] accessibility/aria-invalid.html times out

Patch by Anton Obzhirov <a.obzhirov@samsung.com> on 2013-09-02
Reviewed by Mario Sanchez Prada.

Source/WebCore:

The patch exposes aria-invalid attribute to ATK.

* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
Added emitting state-change signal for aria-invalid event.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
Added aria-invalid attribute.

Tools:

Added few mappings in DumpRenderTree and WebKitTestRunner for aria-invalid in order to get the tests run properly.

* DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
(axObjectEventListener):
Added mapping for invalid-entry event parameter.
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(coreAttributeToAtkAttribute):
Added mapping to aria-invalid.
(AccessibilityUIElement::stringAttributeValue):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::coreAttributeToAtkAttribute):
Added mapping to aria-invalid.

LayoutTests:

Unskipped accessibility/aria-invalid.html which is passing now.

* platform/gtk/TestExpectations: Removed passing test.
* platform/gtk-wk2/TestExpectations: Added test timing out in WK2 only.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify DocumentType handling.
<https://webkit.org/b/120529>

Reviewed by Antti Koivisto.

Removed the insertedInto()/removedFrom() handlers from DocumentType.

Document no longer keeps a pointer to its doctype node, it was only used for the
document.doctype DOM API, which now just looks through the list of (<=2) children.

The ENABLE(LEGACY_VIEWPORT_ADAPTION) hunk from Document::setDocType() was moved
into Document::childrenChanged().

We no longer clear the style resolver on doctype insertion/removal since it
doesn't actually affect style anyway.

Also made doctype() return a PassRefPtr<DocumentType> instead of a raw pointer.

* dom/Document.cpp:
(WebCore::Document::dispose):
(WebCore::Document::doctype):
(WebCore::Document::childrenChanged):
* dom/Document.h:
* dom/DocumentType.cpp:
* dom/DocumentType.h:
* editing/markup.cpp:
(WebCore::documentTypeString):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Ref: A smart pointer for the reference age.
<https://webkit.org/b/120570>

Reviewed by Antti Koivisto.

Source/WebCore:

Use Ref<T> for various stack guards where null checking isn't needed.

Source/WTF:

Add a very simple simple Ref<T> smart pointer class that is never null.
It's initialized by passing a T& to the constructor and cannot be assigned to.

operator-> is not overloaded, to prevent unsafe-looking code.
The value is extracted by "T& get()", since C++ does not let you override operator.()

* wtf/Ref.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] No need for HardAutorelease, which is same as CFBridgingRelease
https://bugs.webkit.org/show_bug.cgi?id=120569

Reviewed by Andy Estes.

Source/JavaScriptCore:

* API/JSValue.mm:
(valueToString): Use CFBridgingRelease.

Source/WebCore:

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXTextMarkerRange):
(AXTextMarkerRangeStart):
(AXTextMarkerRangeEnd):
(textMarkerForVisiblePosition):
Use CFBridgingRelease.

* platform/mac/KURLMac.mm:
(WebCore::KURL::operator NSURL *): Use CFBridgingRelease.
(WebCore::KURL::createCFURL): Get rid of needless local variable.

* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::mapHostNameWithRange):
(WebCore::URLWithData):
(WebCore::userVisibleString):
* platform/text/mac/StringImplMac.mm:
(WTF::StringImpl::operator NSString *):
Use CFBridgingRelease.

Source/WebKit/mac:

* Misc/WebNSFileManagerExtras.mm:
(-[NSFileManager _webkit_startupVolumeName]): Removed some unneeded locals.
Got rid of the pointless ref/leakRef/HardAutorelease dance, and replaced it
with a [[x copy] autorelease].

* Misc/WebNSURLExtras.mm:
(-[NSURL _web_URLWithLowercasedScheme]): Use CFBridgingRelease, and got rid
of unneeded type casts.

* Plugins/WebBasePluginPackage.mm:
(+[WebBasePluginPackage preferredLocalizationName]): Use CFBridgingRelease.
* WebView/WebPDFRepresentation.mm:
(-[WebPDFRepresentation convertPostScriptDataSourceToPDF:]): Ditto.

* WebView/WebView.mm:
(+[WebView _setCacheModel:]): Use CFBridgingRelease and got rid of unneeded
type cast.

Source/WebKit2:

* Platform/mac/StringUtilities.mm:
(WebKit::nsStringFromWebCoreString): Use CFBridgingRelease. Also
changed condition to be a little cleaner and use a constant string for empty
strings as well as null strings.

* UIProcess/API/mac/WKBrowsingContextController.mm:
(autoreleased): Switched from autorelease to CFBridgingRelease for strings,
which eliminates a type cast and makes this work under GC, although I don't
think we should compile WebKit2 for GC.

* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
Use CFBridgingRelease.

Source/WTF:

* wtf/ObjcRuntimeExtras.h: Added a FIXME about miscapitalization of ObjC.
Deleted HardAutorelease.
(wtfObjcMsgSend): Dropped the use of abbreviations in local class and argument names.
(wtfCallIMP): Ditto.

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(dump): Use CFBridgingRelease.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Actually add Ref.h

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Generate isFooElement() functions from tagname data.
<https://webkit.org/b/120584>

Reviewed by Antti Koivisto.

Add a "generateTypeChecks" attribute that can be used in HTMLTagNames.in & friends.
If present, isFooElement() style helpers will be added to HTMLElementTypeChecks.h.
This also outputs an isElementOfType<T> check for the Element iterators.

Removed all the hand-written isFooElement() functions that only checked tag name.

* html/HTMLTagNames.in:
* svg/svgtags.in:

    Added "generateTypeChecks" attribute as appropriate.

* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:

    Added to build systems based on how HTMLNames.h was done.
    We're just outputting an additional header file in the generated code directory
    so I suspect most ports will just pick this up automagically.

* dom/make_names.pl:
(defaultTagPropertyHash):
(printLicenseHeader):
(printTypeChecks):
(printTypeChecksHeaderFile):

    Generate a separate file for each namespace with isFooElement() helpers for
    elements with "generateTypeChecks" attribute set.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove duplicate entries found by Xcode in WTF project

Platform.h was duplicated in r111778 after being added in
r111504.

A dangling reference to Ref.h was added in r154962.

* WTF.xcodeproj/project.pbxproj: Remove duplicate entries for
Platform.h and Ref.h.

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