REGRESSION (r131836): failures in list styles tests on EFL, GTK
https://bugs.webkit.org/show_bug.cgi?id=99824

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

Saved start of string since it is modified by call convertUTF8ToUTF16().

* API/JSStringRef.cpp:
(JSStringCreateWithUTF8CString):

Source/WTF:

Fixed ASCII check.
Added placeholder argument for new argument added to convertUTF8ToUTF16() in http://trac.webkit.org/changeset/131836.

* wtf/unicode/UTF8.cpp:
(WTF::Unicode::convertUTF8ToUTF16):
* wtf/unicode/glib/UnicodeGLib.cpp:
(WTF::Unicode::convertCase):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove SK_DISABLE_EXTRACTSUBSET_OPAQUE_FIX define from skia_webkit.gyp, as it has been rebaselined.
https://bugs.webkit.org/show_bug.cgi?id=100394

Patch by Ben Wagner <bungeman@chromium.org> on 2012-10-25
Reviewed by Dirk Pranke.

The define has been removed from the Skia code and the Chromium skia.gyp.
The pixel tests affected have already been rebaselined.

* skia_webkit.gyp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Touch adjustment snaps to wrong target at a plugin boundary.
https://bugs.webkit.org/show_bug.cgi?id=99938

Patch by Kevin Ellis <kevers@chromium.org> on 2012-10-25
Reviewed by Antonio Gomes.

Source/WebCore:

Inidcate that an <embed> element can respond to
mouse click events, since mouse events are forwarded
to the plugin.  Fixes touch adjustment at a plugin
boundary.  Prior to the patch a clickable element
adjacent to the plugin would capture synthetic mouse
events from tap gestures that spanned the plugin
boundary.

Test: touchadjustment/plugin.html

* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::willRespondToMouseClickEvents):
(WebCore):
* html/HTMLEmbedElement.h:

LayoutTests:

Test for touch adjustment at a plugin boundary.
Prior to the patch, plugins were not considered
candidates for touch adjustment.

* touchadjustment/plugin-expected.txt: Added.
* touchadjustment/plugin.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Plugin test gardening
https://bugs.webkit.org/show_bug.cgi?id=100359

Unreviewed, EFL gardening.

fast/frames/sandboxed-iframe-plugins.html and userscripts/user-script-
plugin-document.html are passing on WK2 now.

Patch by KwangYong Choi <ky0.choi@samsung.com> on 2012-10-25

* platform/efl-wk1/TestExpectations:
* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
XSSAuditor must replace form action with about:blank when reflected action detected.
https://bugs.webkit.org/show_bug.cgi?id=100280

Reviewed by Daniel Bates.

Source/WebCore:

Changes empty string form-action replacement to about:blank.
Existing form-action.html test modified to check this case.

* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::filterFormToken):

LayoutTests:

Update tests to log form action attribute.

* http/tests/security/xssAuditor/form-action-expected.txt:
* http/tests/security/xssAuditor/form-action.html:
* http/tests/security/xssAuditor/resources/echo-intertag.pl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Only full-page PDFPlugins should purport to handle page scale changes
https://bugs.webkit.org/show_bug.cgi?id=99635

Reviewed by Sam Weinig.

PDFPlugin should only handle page scale factor changes itself if it's in the main frame.
Subframe PDFs will act like images, zooming with the page.

* WebProcess/Plugins/PDF/PDFPlugin.h:
(PDFPlugin): Move implementation of handlesPageScaleFactor() to PDFPlugin.mm.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::pdfDocumentDidLoad): Only copy PDFLayerController's default autoscale magnification to PluginView's
notion of the current scale factor if we're supposed to be handling page scale factor changes.
(WebKit::PDFPlugin::geometryDidChange): Only update PDFLayerController's magnification from the page scale factor
if we're supposed to be handling page scale factor changes.
(WebKit::PDFPlugin::handlesPageScaleFactor): We should only handle page scale factor changes if we're in the main frame.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
.: Adding feature for XHR_TIMEOUT

Conditionalize XHR timeout support
https://bugs.webkit.org/show_bug.cgi?id=100356

Reviewed by Adam Barth.

Adding feature for XHR_TIMEOUT to disable it on ports that don't have
network backend support for setTimeoutInterval.

* Source/cmake/OptionsEfl.cmake: Default ON on EFL.
* Source/cmake/WebKitFeatures.cmake: Default OFF for any CMAKE based port.
* Source/cmakeconfig.h.cmake: Adding define.
* configure.ac: Make autogen.sh support the --enable/--disable-xhr-timeout parameter.

Source/JavaScriptCore: Conditionalize XHR timeout support
https://bugs.webkit.org/show_bug.cgi?id=100356

Reviewed by Adam Barth.

Adding XHR_TIMEOUT feature to conditionalize this on ports without network backend support.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore: Conditionalize XHR timeout support
https://bugs.webkit.org/show_bug.cgi?id=100356

Reviewed by Adam Barth.

Adding feature for XHR_TIMEOUT to disable it on ports that don't have
network backend support for setTimeoutInterval.

No new tests, covered by http/tests/xmlhttprequest/timeout/*

* Configurations/FeatureDefines.xcconfig: Default ON on mac.
* GNUmakefile.am:
* GNUmakefile.features.am:
  Autotools support for the flag.
* xml/XMLHttpRequest.cpp: #if ENABLE(XHR_TIMEOUT) wrapping
(WebCore::XMLHttpRequest::XMLHttpRequest):
(WebCore):
(WebCore::XMLHttpRequest::open):
(WebCore::XMLHttpRequest::createRequest):
(WebCore::XMLHttpRequest::didFail):
* xml/XMLHttpRequest.h: #if ENABLE(XHR_TIMEOUT) wrapping
(XMLHttpRequest):
* xml/XMLHttpRequest.idl: Conditional properties timeout and ontimeout (event handler).

Source/WebKit/chromium: Conditionalize XHR timeout support
https://bugs.webkit.org/show_bug.cgi?id=100356

Reviewed by Adam Barth.

Adding XHR_TIMEOUT feature to conditionalize this on ports without network backend support.
Defaults to off on chromium until webkit.org/b/98397 is solved.

* features.gypi:

Source/WebKit/mac: Conditionalize XHR timeout support
https://bugs.webkit.org/show_bug.cgi?id=100356

Reviewed by Adam Barth.

Adding XHR_TIMEOUT feature to conditionalize this on ports without network backend support.
Defaults to ON on Mac since the Mac NSUrlConnection based backend has setTimeoutInterval support.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2: Conditionalize XHR timeout support
https://bugs.webkit.org/show_bug.cgi?id=100356

Reviewed by Adam Barth.

Adding XHR_TIMEOUT feature to conditionalize this on ports without network backend support.
Defaults to ON on Mac since the Mac NSUrlConnection based backend has setTimeoutInterval support.

* Configurations/FeatureDefines.xcconfig:

Tools: Conditionalize XHR timeout support
https://bugs.webkit.org/show_bug.cgi?id=100356

Reviewed by Adam Barth.

Adding XHR_TIMEOUT feature in perl and qmake files.

* Scripts/webkitperl/FeatureList.pm:
* qmake/mkspecs/features/features.pri:

WebKitLibraries: Conditionalize XHR timeout support
https://bugs.webkit.org/show_bug.cgi?id=100356

Reviewed by Adam Barth.

Adding ENABLE_XHR_TIMEOUT feature, which is default off for Apple Win.
See also https://bugs.webkit.org/show_bug.cgi?id=100349 for an attempt
to fix timeout support for CF Network.

* win/tools/vsprops/FeatureDefines.vsprops:
* win/tools/vsprops/FeatureDefinesCairo.vsprops:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Notification should be sent when accessibilityIsIgnored changes
https://bugs.webkit.org/show_bug.cgi?id=99547

Reviewed by Chris Fleizach.

Source/WebCore:

Adds a new flag in AccessibilityObject that keeps track of the most recent
value of accessibilityIsIgnored(). After certain events such as an ARIA
attribute change or content change, checks the new value of
accessibilityIsIgnored() and posts a "children changed" notification on the
parent node if it changed, making sure the parent recomputes its vector of
(unignored) children.

Also moves handling of attribute changes to AXObjectCache, and sends
notifications for some attribute changes that were previously silent. On
Chromium, all changes to an accessibility object's attributes should
result in some notification.

Some tests would have broken because an AccessibilityScrollView was created
and holding a reference to a ScrollView for an iframe after it was deleted,
so this change switches AccessibilityScrollView to hold a weak reference
to ScrollView instead.

Tests: platform/chromium/accessibility/is-ignored-change-sends-notification.html
       platform/chromium/accessibility/other-aria-attribute-change-sends-notification.html
       platform/chromium/accessibility/text-change-notification.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedUIElementForPage):
(WebCore::AXObjectCache::getOrCreate):
(WebCore::AXObjectCache::textChanged):
(WebCore):
(WebCore::AXObjectCache::childrenChanged):
(WebCore::AXObjectCache::handleAriaRoleChanged):
(WebCore::AXObjectCache::handleAttributeChanged):
(WebCore::AXObjectCache::labelChanged):
(WebCore::AXObjectCache::recomputeIsIgnored):
* accessibility/AXObjectCache.h:
(AXObjectCache):
(WebCore::AXObjectCache::childrenChanged):
(WebCore::AXObjectCache::textChanged):
(WebCore::AXObjectCache::handleAttributeChanged):
(WebCore::AXObjectCache::recomputeIsIgnored):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::insertChild):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::AccessibilityObject):
(WebCore::AccessibilityObject::cachedIsIgnoredValue):
(WebCore):
(WebCore::AccessibilityObject::setCachedIsIgnoredValue):
(WebCore::AccessibilityObject::notifyIfIgnoredValueChanged):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::textChanged):
(AccessibilityObject):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::correspondingControlForLabelElement):
(WebCore::AccessibilityRenderObject::textChanged):
(WebCore::AccessibilityRenderObject::addHiddenChildren):
(WebCore::AccessibilityRenderObject::addChildren):
* accessibility/AccessibilityRenderObject.h:
(AccessibilityRenderObject):
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::~AccessibilityScrollView):
(WebCore):
(WebCore::AccessibilityScrollView::detach):
(WebCore::AccessibilityScrollView::isAttachment):
(WebCore::AccessibilityScrollView::widgetForAttachmentView):
(WebCore::AccessibilityScrollView::updateScrollbars):
(WebCore::AccessibilityScrollView::webAreaObject):
(WebCore::AccessibilityScrollView::elementRect):
(WebCore::AccessibilityScrollView::documentFrameView):
(WebCore::AccessibilityScrollView::parentObject):
(WebCore::AccessibilityScrollView::parentObjectIfExists):
(WebCore::AccessibilityScrollView::getScrollableAreaIfScrollable):
(WebCore::AccessibilityScrollView::scrollTo):
* accessibility/AccessibilityScrollView.h:
(WebCore::AccessibilityScrollView::scrollView):
(AccessibilityScrollView):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* accessibility/chromium/AXObjectCacheChromium.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::deleteLineBoxTree):
(WebCore::RenderBlock::createAndAppendRootInlineBox):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::styleWillChange):
* rendering/RenderText.cpp:
(WebCore::RenderText::setText):

Source/WebKit/chromium:

Adds new accessibility notifications.

* public/WebAccessibilityNotification.h:
* src/AssertMatchingEnums.cpp:

Tools:

Add additional accessibility notifications.

* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::postAccessibilityNotification):

LayoutTests:

Adds 3 new test to ensure:
1. A "children changed" notification is fired on the parent object when an
   object that was previously ignored becomes unignored.
2. A notification is sent when an element's text (incl. title or label) changes.
3. A notification is sent when another ARIA attribute changes.

Modifies add-to-menu-list-crashes because it was too brittle; it was
    referencing a stale object rather than retrieving its latest handle.
Modifies aria-checkbox-sends-notification to listen on the correct
    object on all platforms.
Simplifies notification-listeners so it doesn't generate additional
    notifications that are inconsistent between platforms now.

* accessibility/aria-checkbox-sends-notification.html:
* accessibility/notification-listeners.html:
* platform/chromium/accessibility/add-to-menu-list-crashes-expected.txt:
* platform/chromium/accessibility/add-to-menu-list-crashes.html:
* platform/chromium/accessibility/is-ignored-change-sends-notification-expected.txt: Added.
* platform/chromium/accessibility/is-ignored-change-sends-notification.html: Added.
* platform/chromium/accessibility/other-aria-attribute-change-sends-notification-expected.txt: Added.
* platform/chromium/accessibility/other-aria-attribute-change-sends-notification.html: Added.
* platform/chromium/accessibility/text-change-notification-expected.txt: Added.
* platform/chromium/accessibility/text-change-notification.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Skip failing accessibility tests.
accessibility/title-ui-element-correctness.html
accessibility/aria-slider-value.html
accesibility/hidden-legend.html

* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid unnecessary style recalcs on id attribute mutation.
https://bugs.webkit.org/show_bug.cgi?id=100395

Reviewed by Andreas Kling.

There is no need to invalidate element style on id attribute change if neither the old nor the new id were 
mentioned in any stylesheet. This is similar to the optimization we already have for class attributes.
        
Recalculating element style is expensive. It seems id attribute mutation is often used in scripts for purposes other than styling. 

* css/StyleResolver.cpp:
(WebCore::StyleResolver::hasSelectorForId):
(WebCore):
* css/StyleResolver.h:
* dom/Element.cpp:
(WebCore::makeIdForStyleResolution):
(WebCore):
(WebCore::Element::attributeChanged):



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