[Qt] Fix libxml2 config test
https://bugs.webkit.org/show_bug.cgi?id=106317

Patch by Heikki Paajanen <heikki.paajanen@palm.com> on 2013-01-08
Reviewed by Simon Hausmann.

Don't assume standard include/libxml2, libxml-2.0.pc should know
where it's headers are.

* qmake/config.tests/libxml2/libxml2.cpp: Fix include

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Introduce a compositing trigger for scrollable frames
https://bugs.webkit.org/show_bug.cgi?id=105573

Reviewed by James Robinson.
Patch by Antonio Gomes <a1.gomes@sisa.samsung.com>

Source/WebCore:

Make requiresCompositingForScrollableFrame to check the
newly added compositing trigger instead of the associated setting.

It introduces no have behavior change, so no new tests. Patch basically
does some preparation work for adding support to composite scrollable inner
frames independently from "force compositing mode" bit.

* page/ChromeClient.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
(WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):

Source/WebKit/chromium:

Set the newly added scrollable-inner-frames bit to compositing-trigger
bitset in accordance to the respective setting value.

* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::allowedCompositingTriggers):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make RenderLayer::updateNeedsCompositedScrolling scrollbars agnostic
https://bugs.webkit.org/show_bug.cgi?id=95494

Reviewed by James Robinson.
Patch by Antonio Gomes <a1.gomes@sisa.samsung.com>

Some ports (including Qt-wk1 and BlackBerry) allow disabling
scrollbars at FrameView creation level. That said, cheking for the
scrollbars presence in order to determine if we should promote a
RenderLayer to use composited scrolling is not ideal, as done in
RenderLayerCompositor::updateNeedsCompositedScrolling()

Instead, this patch makes the RenderLayer class to query its FrameView
if it has been cached as scrollable by the later.

Least, patch also takes this opportunity to remove RenderLayer::allowsScrolling,
which became unused.

No new tests added, since there is no *practical* behavior change: ports
like Chromium and others who currently check for the scrollbars presence
in order to determine either to promote or not layers to benefit of composited
scrolling should not be affected.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateNeedsCompositedScrolling):
* rendering/RenderLayer.h:
(RenderLayer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139054 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Don't confine page popups to root view on Mac
https://bugs.webkit.org/show_bug.cgi?id=106315

Reviewed by Kent Tamura.

Source/WebCore:

No new tests.

* Resources/pagepopups/pickerCommon.js:
(adjustWindowRect): Remove code to confine to root view.

Source/WebKit/chromium:

Page popups on Mac no longer get clipped to the web view so we can
remove the code to confine to root view.

* src/ColorChooserPopupUIController.cpp:
(WebKit::ColorChooserPopupUIController::writeDocument): Removing parameters confineToRootView and rootViewRectInScreen.
* src/DateTimeChooserImpl.cpp:
(WebKit::DateTimeChooserImpl::writeDocument): Ditto.

LayoutTests:

* platform/chromium/fast/forms/page-popup/page-popup-adjust-rect.html: Remove setting parameters confineToRootView and rootViewRectInScreen.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Changing a timeout expectation for inspector/timeline/timeline-decode-resize.html
to a failure expectation. The test doesn't time out anymore due to added WebP support.

Adding a timeout expectation for two proximity layout tests added in r139050.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139056 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Can't select text out of current focused input
https://bugs.webkit.org/show_bug.cgi?id=106322

Patch by Sean Wang <Xuewen.Wang@torchmobile.com.cn> on 2013-01-08
Reviewed by Rob Buis.

PR270755
Internally reviewed by Mike Fenton

When selection changed, the selection handler clips new selection with
current focused node's boundary. So we clear focus before selectObject.
This patch clear focus when selectObject is at a point but not at a node.

* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::selectObject):

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

Removing failure expectations/skip entries for fast/dom/Window/window-postmessage-arrays.html.
The test was fixed by r138964.

Also further remove failure expectations for now-passing tests on the GTK builders.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Login & password shown in browsers' URL entry after successful HTTP authentication
https://bugs.webkit.org/show_bug.cgi?id=105190

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Test: http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url.html

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::restartedCallback): After sending a redirect with credentials to libsoup, strip
the credentials from the request. This ensures that the credentials do not show up in
the user agent or in document.location.

LayoutTests:

Add a new test that checks that the URL of a page that redirects and uses
authentication. This verifies correct behavior for ports that communicates
a request's credentials to the platform networking layer by setting them in the URL.
The credentials should not remain in the URL string itself.

* http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url-expected.txt: Added.
* http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url.html: Added.
* http/tests/misc/authentication-redirect-4/resources/auth-echo.php: Added.
* http/tests/misc/authentication-redirect-4/resources/auth-then-redirect.php: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix build with --web-audio
https://bugs.webkit.org/show_bug.cgi?id=106328

Reviewed by Philippe Normand.

Build fix, no new tests required.

* Target.pri: addded missing OfflineAudioContext.[cpp|h].

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Shadow DOM] Refactoring: invalidateParentDistributionIfNecessary() calls are too intrusive
https://bugs.webkit.org/show_bug.cgi?id=106305

Reviewed by Dimitri Glazkov.

Scattering invalidateParentDistributionIfNecessary() looks bad because
- it has long name whose terminology is cryptic for people who don't know much about Shadow DOM standard.
- its calls are always paired with setNeedsStyleRecalc() and people do setNeedsStyleRecalc()
  need to be aware about distribution feature bit tracking. Separate invalidateParentDistributionIfNecessary()
  call doesn't help that recognition.

This change introduces Element::didAffectSelector() to replace a setNeedsStyleRecalc()-i37y() call sequence.
SelectRuleFeatureSet::FeatureRule is renamed AffectedSelectorType so that it explains its purpose
in a bit more plain WebKit term.

No new tests. Refactoring.

* dom/Document.cpp:
(WebCore::Document::setCSSTarget): Adopted didAffectSelector.
* dom/Element.cpp:
(WebCore::Element::didAffectSelector): Added.
(WebCore):
* dom/Element.h:
(Element):
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::didAffectSelector): Morphed from invalidateParentDistributionIfNecessary().
* dom/ElementShadow.h:
(ElementShadow):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute): Adopted didAffectSelector
* html/HTMLDetailsElement.cpp:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::disabledAttributeChanged): Adopted didAffectSelector
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setChecked): Adopted didAffectSelector
(WebCore::HTMLInputElement::setIndeterminate): Adopted didAffectSelector
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::parseAttribute): Adopted didAffectSelector
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::parseAttribute): Adopted didAffectSelector
(WebCore::HTMLOptionElement::setSelectedState): Adopted didAffectSelector
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::didElementStateChange): Adopted didAffectSelector
* html/HTMLSummaryElement.cpp:
* html/shadow/HTMLContentElement.cpp:
* html/shadow/SelectRuleFeatureSet.cpp:
(WebCore::SelectRuleFeatureSet::collectFeaturesFromSelector): Followed renaming.
* html/shadow/SelectRuleFeatureSet.h: Followed renaming.
(WebCore::SelectRuleFeatureSet::hasSelectorForChecked):
(WebCore::SelectRuleFeatureSet::hasSelectorForEnabled):
(WebCore::SelectRuleFeatureSet::hasSelectorForDisabled):
(WebCore::SelectRuleFeatureSet::hasSelectorForIndeterminate):
(WebCore::SelectRuleFeatureSet::hasSelectorForLink):
(WebCore::SelectRuleFeatureSet::hasSelectorForTarget):
(WebCore::SelectRuleFeatureSet::hasSelectorForVisited):
(WebCore::SelectRuleFeatureSet::hasSelectorFor):
(WebCore::SelectRuleFeatureSet::setSelectRuleFeature):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make the override-feature-defines script compatible with Python v3
https://bugs.webkit.org/show_bug.cgi?id=105742

Reviewed by Martin Robinson.

Instead of printing output through a statement, use the print function and format
the output using the str.format method. This makes the script runnable with Python v3.

* gtk/override-feature-defines:
(adjust_feature_defines_makefile):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [WK2] NetworkProcess should have a Keychain shim
        https://bugs.webkit.org/show_bug.cgi?id=106286

        Reviewed by Sam Weinig.

        Renamed WebProcessShim to SecItemShim. Use it with NetworkProcess, too.

        * WebProcess/mac/SecItemShimLibrary.h: Copied from Source/WebKit2/WebProcess/mac/WebProcessShim.h.
        * WebProcess/mac/SecItemShimLibrary.mm: Copied from Source/WebKit2/WebProcess/mac/WebProcessShim.mm.
        This code lives in SecItemShim.dylib.
        "Library" in the name is to avoid conflicting with SecItemShim class in WebKit2.

        * Shared/mac/SecItemShim.cpp:
        (WebKit::sendSecItemRequest):
        (WebKit::SecItemShim::initialize):
        * Shared/mac/SecItemShim.h:
        Take a ChildProcess pointer at initialization instead of using using WebProcess::shared().

        * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::addDYLDEnvironmentAdditions):
        Use SecItemShim with NetworkProcess too.

        * NetworkProcess/NetworkProcess.cpp:
        (WebKit::NetworkProcess::initializeConnection):
        * NetworkProcess/NetworkProcess.h:
        * NetworkProcess/mac/NetworkProcessMac.mm:
        (WebKit::NetworkProcess::platformInitializeNetworkProcess):
        * UIProcess/Network/NetworkProcessProxy.cpp:
        (WebKit::NetworkProcessProxy::didFinishLaunching):
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::initializeConnection):
        * WebProcess/mac/WebProcessMac.mm:
        (WebKit::WebProcess::platformInitializeProcess):
        * WebProcess/mac/WebProcessMainMac.mm:
        (WebKit::WebProcessMainDelegate::doPreInitializationWork):
        * WebProcess/mac/WebProcessServiceEntryPoints.mm:
        (webProcessServiceMain):
        (initializeWebProcessForWebProcessServiceForWebKitDevelopment):
        * WebProcess/mac/WebProcessShim.h: Removed.
        * WebProcess/mac/WebProcessShim.mm: Removed.
        * WebProcessService/Info.plist:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Skip http/tests/misc/authentication-redirect-4/authentication-sent-to-redirect-same-origin-url.html, because
it's been timing out since it was added.
https://bugs.webkit.org/show_bug.cgi?id=106332

* platform/chromium/TestExpectations: Adjusted expectations.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG should backwards-propagate NodeUsedAsValue for Phantom
https://bugs.webkit.org/show_bug.cgi?id=106299

Reviewed by Mark Hahnenberg.
        
This is currently benign because Phantom is only inserted by the bytecode parser for
things that already happen to be used in contexts that backwards propagate
NodeUsedAsValue. But that doesn't change the fact that the semantics of Phantom are
that the value can be arbitrarily used by the baseline JIT.

* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Tweak expectations for random-array-gc-stress.html to reflect reality.
https://bugs.webkit.org/show_bug.cgi?id=84802

* platform/chromium/TestExpectations: Tweaked expectations.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
transition-delay and transition-duration return incorrect values when querying using the computed style.
https://bugs.webkit.org/show_bug.cgi?id=105432

Reviewed by Dean Jackson.

Source/WebCore:

When setting the transition-delay to 10ms for example the value of transition-delay
on the computed style was incorrect, it should return 0.01s but it was
returning something like 0.0099999999...s. In fact the bug was after
the parsing step when creating the Animation object where a conversion
from a double to float was done. This conversion is not needed as the
animation class expects double for delay and transition times.

Test: transitions/transitions-parsing.html

* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDuration):

LayoutTests:

Uncomment existing tests to cover the bug.

* transitions/transitions-parsing-expected.txt:
* transitions/transitions-parsing.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools: Add Apache 2.4 support for Fedora 18
https://bugs.webkit.org/show_bug.cgi?id=104478

Reviewed by Martin Robinson.

Apache 2.4's httpd.conf is slightly incompatible with 2.2's, so we
need a separate config.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port._apache_version):
(Port._apache_config_file_name_for_platform):
* Scripts/webkitpy/layout_tests/port/port_testcase.py:
* Scripts/run-webkit-httpd:
* Scripts/webkitperl/httpd.pm:
(getApacheVersion):
(getDefaultConfigForTestDirectory):
(getHTTPDConfigPathForTestDirectory):

LayoutTests: Updates for Apache 2.4
https://bugs.webkit.org/show_bug.cgi?id=104478

Reviewed by Martin Robinson.

Apache 2.4 requires a slightly different config from 2.2, so split
fedora-httpd.conf into separate 2.2 and 2.4 versions.

2.4 is also more picky about passing request headers to CGI
scripts, and will ignore headers that aren't valid according to
the HTTP grammar, so change underscores to hyphens to fix them.

* http/conf/fedora-httpd-2.2.conf: Renamed from
LayoutTests/http/conf/fedora-httpd.conf.
* http/conf/fedora-httpd-2.4.conf: Based on
LayoutTests/http/conf/fedora-httpd.conf and updated for 2.4.
* http/tests/cookies/resources/cookies-test-pre.js:
(setCookies):
(clearCookies):
* http/tests/navigation/ping-cookie.html:
* http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] context-creation-and-destruction.html is slow and flaky.
https://bugs.webkit.org/show_bug.cgi?id=92287

* platform/chromium/TestExpectations: Adjusted expectations.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update expectations for webaudio/realtimeanalyser-fft-sizing.html.

* platform/chromium-linux/webaudio/realtimeanalyser-fft-sizing-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update expectations for fast/text/justify-ideograph*.

* platform/chromium-linux-x86/fast/text/justify-ideograph-vertical-expected.txt: Added.
* platform/chromium-linux/fast/text/justify-ideograph-vertical-expected.png: Added.
* platform/chromium-linux/fast/text/justify-ideograph-vertical-expected.txt: Added.
* platform/chromium-mac-lion/fast/text/justify-ideograph-simple-expected.png:
* platform/chromium-mac-lion/fast/text/justify-ideograph-vertical-expected.png:
* platform/chromium-mac-snowleopard/fast/text/justify-ideograph-simple-expected.png:
* platform/chromium-mac-snowleopard/fast/text/justify-ideograph-vertical-expected.png:
* platform/chromium-mac/fast/text/justify-ideograph-simple-expected.png:
* platform/chromium-mac/fast/text/justify-ideograph-vertical-expected.png:

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