AX: Cancel button in search field not accessible.
<https://webkit.org/b/120322>

Source/WebCore:

Expose the cancel button that shows in an input element of
type search to accessibility.

Patch by Sam White <samuel_white@apple.com> on 2013-08-28
Reviewed by Chris Fleizach.

Test: platform/mac/accessibility/search-field-cancel-button.html

* CMakeLists.txt:
* English.lproj/Localizable.strings:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityAllInOne.cpp:
* accessibility/AccessibilitySearchFieldButtons.cpp: Added.
(WebCore::AccessibilitySearchFieldCancelButton::create):
(WebCore::AccessibilitySearchFieldCancelButton::AccessibilitySearchFieldCancelButton):
(WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
(WebCore::AccessibilitySearchFieldCancelButton::accessibilityText):
(WebCore::AccessibilitySearchFieldCancelButton::press):
(WebCore::AccessibilitySearchFieldCancelButton::computeAccessibilityIsIgnored):
* accessibility/AccessibilitySearchFieldButtons.h: Added.
* dom/Element.h:
(WebCore::Element::isSearchFieldCancelButtonElement):
* html/shadow/TextControlInnerElements.h:
* platform/LocalizedStrings.cpp:
(WebCore::AXSearchFieldCancelButtonText):
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::AXSearchFieldCancelButtonText):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::AXSearchFieldCancelButtonText):
* platform/qt/LocalizedStringsQt.cpp:
(WebCore::AXSearchFieldCancelButtonText):

LayoutTests:

Make sure the cancel button that shows in an input element of
type search is accessible and actionable.

Patch by Sam White <samuel_white@apple.com> on 2013-08-28
Reviewed by Chris Fleizach.

* platform/mac/accessibility/search-field-cancel-button-expected.txt: Added.
* platform/mac/accessibility/search-field-cancel-button.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Namespace prefix is blindly followed when serializing
https://bugs.webkit.org/show_bug.cgi?id=19121
Serializer doesn't handling inconsistent prefixes properly
https://bugs.webkit.org/show_bug.cgi?id=117764
Attribute namespaces are serialized as if they were element ones
https://bugs.webkit.org/show_bug.cgi?id=22958

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add code to make sure unique prefixes and namespace declarations are generated.
Unique prefix generation happens when:
- the same prefix is used to map to different namespaces or
- no prefix is given but the attribute is in a namespace.

This is done in order to not violate constraints listed in http://www.w3.org/TR/xml-names11/. In general
the pseudo code listed in http://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#normalizeDocumentAlgo
is used, doing the following for attributes:
if the attribute has a namespace then
  if the attribute has no prefix OR prefix is not declared OR conflicts with existing prefix mapping to different NS then
    try to find the matching in-scope declaration by looking up the prefix in the namespace -> prefix mapping, if found use that prefix
    else if the attribute prefix is not null AND not mapped in-scope, declare the prefix
    else generate a unique prefix for the namespace

To keep track of in-scope namespaces a prefix to namespace mapping is used.

Tests: fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts.html
       fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict.html
       fast/dom/XMLSerializer-setAttributeNS-namespace-no-prefix.html
       svg/custom/xlink-prefix-generation-in-attributes.html

* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::MarkupAccumulator):
(WebCore::MarkupAccumulator::shouldAddNamespaceAttribute):
(WebCore::MarkupAccumulator::appendNamespace):
(WebCore::MarkupAccumulator::generateUniquePrefix):
(WebCore::MarkupAccumulator::appendAttribute):
* editing/MarkupAccumulator.h:

LayoutTests:

Add tests to make sure unique prefixes and namespace declarations are generated for the
case when the same prefix is used to map to different namespaces. All testcases are based
on the testcases attached to the bugs.

* fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts-expected.txt: Added.
* fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts.html: Added.
* fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict-expected.txt: Added.
* fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict.html: Added.
* fast/dom/XMLSerializer-setAttributeNS-namespace-no-prefix-expected.txt: Added.
* fast/dom/XMLSerializer-setAttributeNS-namespace-no-prefix.html: Added.
* svg/custom/xlink-prefix-generation-in-attributes-expected.txt: Added.
* svg/custom/xlink-prefix-generation-in-attributes.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify and clean SpaceSplitString
https://bugs.webkit.org/show_bug.cgi?id=120385

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-08-27
Reviewed by Ryosuke Niwa.

Clean up of SpaceSplitString following the cleaning of the DOMTokenList hierarchy.
This brings the following:
- Fix the coding style of the header.
- Remove the concepts of empty and null. The list can now be empty or have something.
  There is no null state.
- Put the tokens directly following SpaceSplitStringData instead of using a Vector in between.

* WebCore.exp.in:
* dom/ElementData.h:
(WebCore::ElementData::hasClass):
* dom/SpaceSplitString.cpp:
(WebCore::tokenizeSpaceSplitString):
(WebCore::SpaceSplitStringData::containsAll):
(WebCore::SpaceSplitString::set):
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
(WebCore::TokenCounterProcessor::TokenCounterProcessor):
(WebCore::TokenCounterProcessor::processToken):
(WebCore::TokenCounterProcessor::tokenCount):
(WebCore::TokenInitializerProcessor::TokenInitializerProcessor):
(WebCore::TokenInitializerProcessor::processToken):
(WebCore::TokenInitializerProcessor::nextMemoryBucket):
(WebCore::SpaceSplitStringData::create):
(WebCore::SpaceSplitStringData::destroy):
* dom/SpaceSplitString.h:
(WebCore::SpaceSplitStringData::contains):
(WebCore::SpaceSplitStringData::size):
(WebCore::SpaceSplitStringData::operator[]):
(WebCore::SpaceSplitStringData::ref):
(WebCore::SpaceSplitStringData::deref):
(WebCore::SpaceSplitStringData::SpaceSplitStringData):
(WebCore::SpaceSplitStringData::~SpaceSplitStringData):
(WebCore::SpaceSplitStringData::tokenArrayStart):
(WebCore::SpaceSplitString::SpaceSplitString):
(WebCore::SpaceSplitString::operator!=):
(WebCore::SpaceSplitString::clear):
(WebCore::SpaceSplitString::contains):
(WebCore::SpaceSplitString::containsAll):
(WebCore::SpaceSplitString::size):
(WebCore::SpaceSplitString::isEmpty):
(WebCore::SpaceSplitString::operator[]):
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
* html/ClassList.cpp:
(WebCore::ClassList::classNames):
* page/EventHandler.cpp:
(WebCore::findDropZone):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] accessibility/menu-list-sends-change-notification.html has incorrect expected results
https://bugs.webkit.org/show_bug.cgi?id=120419

Patch by Denis Nomiyama <d.nomiyama@samsung.com> on 2013-08-28
Reviewed by Chris Fleizach.

Tools:

Added a notification for AXFocusedUIElementChanged.

* DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
(axObjectEventListener): Added a notification for AXFocusedUIElementChanged.

LayoutTests:

Updated the expected results according to the fix added to AccessibilityCallbacksAtk.cpp
where a notification was added for AXFocusedUIElementChanged.

* platform/gtk/accessibility/menu-list-sends-change-notification-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build after r154780

* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitStringData::create):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Unreviewed build fix.

* WebCore.vcxproj/WebCore.vcxproj: Don't exclude the full screen
window from the build.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Unreviewed build fix.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add
missing Cairo symbols; don't export CG symbols for Cairo build.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix compositing layers in columns
https://bugs.webkit.org/show_bug.cgi?id=120436

Source/WebCore:

Reviewed by Dave Hyatt.

Remove the old hack in RenderLayer::updateLayerPosition() for placing
layers in columns, which changed the layer position for composited
layers; this broke hit-testing.

Fix a better way by moving compositing layers to the correct
positions that take column offsets into account, by fixing
RenderLayer::convertToLayerCoords() to optionally apply column
adjustment, and using this in the code which positions compositing layers.

Tests: compositing/columns/ancestor-clipped-in-paginated.html
       compositing/columns/clipped-in-paginated.html
       compositing/columns/composited-columns-vertical-rl.html
       compositing/columns/composited-columns.html
       compositing/columns/composited-in-paginated-rl.html
       compositing/columns/composited-in-paginated-writing-mode-rl.html
       compositing/columns/composited-lr-paginated-repaint.html
       compositing/columns/composited-rl-paginated-repaint.html
       compositing/columns/hittest-composited-in-paginated.html
       compositing/columns/rotated-in-paginated.html
       compositing/columns/untransformed-composited-in-paginated.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::convertToPixelSnappedLayerCoords):
(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::convertToLayerCoords):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):

LayoutTests:

Reviewed by Dave Hyatt.

Various testcases for compositing in columns.

* compositing/columns/ancestor-clipped-in-paginated-expected.txt: Added.
* compositing/columns/ancestor-clipped-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
* compositing/columns/clipped-in-paginated-expected.txt: Added.
* compositing/columns/clipped-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
* compositing/columns/composited-columns-expected.txt: Added.
* compositing/columns/composited-columns-vertical-rl-expected.txt: Added.
* compositing/columns/composited-columns-vertical-rl.html: Added.
* compositing/columns/composited-columns.html: Added.
* compositing/columns/composited-in-paginated-rl-expected.txt: Added.
* compositing/columns/composited-in-paginated-rl.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
* compositing/columns/composited-in-paginated-writing-mode-rl-expected.txt: Added.
* compositing/columns/composited-in-paginated-writing-mode-rl.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
* compositing/columns/composited-in-paginated.html:
* compositing/columns/composited-lr-paginated-repaint-expected.txt: Added.
* compositing/columns/composited-lr-paginated-repaint.html: Added.
* compositing/columns/composited-nested-columns-expected.txt: Added.
* compositing/columns/composited-nested-columns.html: Added.
* compositing/columns/composited-rl-paginated-repaint-expected.txt: Added.
* compositing/columns/composited-rl-paginated-repaint.html: Added.
* compositing/columns/hittest-composited-in-paginated-expected.txt: Added.
* compositing/columns/hittest-composited-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
* compositing/columns/rotated-in-paginated-expected.txt: Added.
* compositing/columns/rotated-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
* compositing/columns/untransformed-composited-in-paginated-expected.txt: Added.
* compositing/columns/untransformed-composited-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154785 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] HTMLElement lost setID and getID - need to add compatibility symbols
https://bugs.webkit.org/show_bug.cgi?id=120440

Reviewed by Martin Robinson.

No tests, just adding compatibility symbols.

setID and getID were removed, and the parent class (Element) ones should be used instead.
We need to keep our ABI compatible, though, so add compatibility symbols.

* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_element_get_id):
(webkit_dom_html_element_set_id):
* bindings/gobject/WebKitDOMCustom.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Enable maintainer mode configure switch
https://bugs.webkit.org/show_bug.cgi?id=120424

Reviewed by Martin Robinson.

The maintainer mode feature is used by ostree and other automated builders to ensure no autotools
regeneration will happen for a regular tarball build; ostree builders, for instance, are very
conservative with toolchain upgrades, and are still using aclocal 1.12. WebKit's latest tarball
(2.1.90) for some reason tries to regenerate build files, and the build fails because it can't find
the version of aclocal that was used for generating the tarball (1.13).

* configure.ac: enable maintainer mode feature.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] LayoutTests on Windows debug fails and exits early
https://bugs.webkit.org/show_bug.cgi?id=120438

Reviewed by Tim Horton.

Visual Studio mishandles char* containing utf8-content. Must manually
escape non-ASCII characters so the byte stream is correct for localized
string lookup.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::cannotShowURLError): Replace unicode apostrophe
character with utf8-byte equivalent.
(WebFrameLoaderClient::cannotShowMIMETypeError): Ditto.
(WebFrameLoaderClient::dispatchDidFailToStartPlugin): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Please incorporate German translation update
https://bugs.webkit.org/show_bug.cgi?id=120016

Patch by Christian Kirbach <Christian.Kirbach@googlemail.com> on 2013-08-28
Reviewed by Gustavo Noronha.

* de.po: updated.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebGL] CoreGraphics can provide greyscale image data
https://webkit.org/b/120443

Reviewed by Simon Fraser.

Source/WebCore:

CoreGraphics can decode greyscale or greyscale+alpha images
while preserving the format. Our WebGL texture unpacker
was seeing this and assuming it meant the data did not come
from an <img> element. Since that method already special cased
CoreGraphics, the fix was to simply return true for these
extra types.

I also renamed srcFormatComeFromDOMElementOrImageData
to srcFormatComesFromDOMElementOrImageData.

Test: fast/canvas/webgl/tex-image-with-greyscale-image.html

* platform/graphics/GraphicsContext3D.cpp: Call new name.
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::srcFormatComesFromDOMElementOrImageData):
Add support for R8, AR8, A8, and RA8 data formats.

LayoutTests:

New test that attempts to load and draw an image that only has grey
and alpha channels.

* fast/canvas/webgl/resources/greyscale.png: Added.
* fast/canvas/webgl/tex-image-with-greyscale-image-expected.txt: Added.
* fast/canvas/webgl/tex-image-with-greyscale-image.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154793 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix - copy/paste failure, copied too much.

* bindings/gobject/WebKitDOMCustom.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154794 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Remove an unused data member from Page.

        Rubber-stamped by Brady Eidson.

        * page/Page.cpp:
        * page/Page.h:
        Removed m_cookieEnabled. This was completely dead code, long obsoleted by PageSettings.



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