CSP 1.1: Tweak the script interface to match the spec.
https://bugs.webkit.org/show_bug.cgi?id=101321

Reviewed by Adam Barth.

Source/WebCore:

       This patch brings WebKit in line with the changes made to the spec in
       https://dvcs.w3.org/hg/content-security-policy/rev/5a29424a37d4.
       Specifically, the following:

       - Renamed 'document.SecurityPolicy' to 'document.securityPolicy'
       - Converted the following to read-only boolean attributes:
 - 'allowsEval'
 - 'allowsInlineScript'
 - 'allowsInlineStyle'
 - 'isActive'

These changes only have effect for ports with CSP_NEXT enabled.

Tests: http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinescript.html
       http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinestyle.html

* dom/Document.idl:
* page/DOMSecurityPolicy.idl:
    Tweaking the IDL files to match the new definition of the
    functionlity in the spec.

LayoutTests:

* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowconnectionto.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-alloweval.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowfontfrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowformaction.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowframefrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowimagefrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowmediafrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowobjectfrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowplugintype.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowscriptfrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowstylefrom.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-isactive-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-isactive.html:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-reporturi-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-reporturi.html:
* http/tests/security/contentSecurityPolicy/resources/securitypolicy-tests-base.js:
    s/document.SecurityPolicy/document.securityPolicy/g
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinescript-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinescript.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinestyle-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinestyle.html: Added.
    For whatever reason, we never wrote tests for these methods. Now we
    have, which is good.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] fast/dom/Window/customized-property-survives-gc.html slow on debug
https://bugs.webkit.org/show_bug.cgi?id=101362

Unreviewed gardening.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening, add pixel expectation for test.

* platform/efl/svg/dynamic-updates/SVGUseElement-dom-requiredFeatures-expected.png: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor setting TEXTURE_MAPPER_GL
https://bugs.webkit.org/show_bug.cgi?id=99758

Patch by Laszlo Gombos <l.gombos@samsung.com> on 2012-11-06
Reviewed by Noam Rosenthal.

Make the rule that sets the default for USE(3D_GRAPHICS) port independent.

If not set, set USE(TEXTURE_MAPPER_GL) when USE(TEXTURE_MAPPER) and
USE(3D_GRAPHICS) is enabled.

* wtf/Platform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Fit-to-width broken on pages with viewport meta tag
https://bugs.webkit.org/show_bug.cgi?id=99715

Reviewed by Jocelyn Turcotte.

Source/WebCore:

Add a bool that indicates if the content had an explicit
initial-scale in the viewport meta tag.

* dom/ViewportArguments.cpp:
(WebCore::computeViewportAttributes):
* dom/ViewportArguments.h:
(ViewportAttributes):

Source/WebKit2:

The initial scale from the viewport attributes should only
be applied if the scale was explicitly specified in the
viewport meta tag.
If the initial scale is auto it should be calculated using
the final contents size, which might be larger than the
layout size, so that the content fits horizontally into
the view.

Also add QML unit tests that cover this functionality.

* UIProcess/API/qt/tests/qmltests/WebView/tst_fitToView.qml:
* UIProcess/API/qt/tests/qmltests/common/test5.html: Added.
* UIProcess/PageViewportController.cpp:
(WebKit::PageViewportController::PageViewportController):
(WebKit::PageViewportController::pageTransitionViewportReady):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
quoteCSSString() always creates a 16 bit string
https://bugs.webkit.org/show_bug.cgi?id=101004

Reviewed by Darin Adler.

Added a new templated helper based on character type from the logic of quoteCSSString() to process
the argument string based on its native bitness.

Functionality covered by existing tests.

* css/CSSParser.cpp:
(WebCore::quoteCSSStringInternal):
(WebCore::quoteCSSString):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] MediaStream API: Remove the valgrind issue with MockWebRTCPeerConnectionHandler
https://bugs.webkit.org/show_bug.cgi?id=101336

Reviewed by Andreas Kling.

This patch changes the delete to delete [] to match the new[].

* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening - more rebaselines following bug 101115.

* platform/chromium-mac-lion/fast/block/lineboxcontain/block-glyphs-expected.png: Added.
* platform/chromium-mac-lion/fast/block/lineboxcontain/block-glyphs-replaced-expected.png: Added.
* platform/chromium-mac-lion/fast/block/lineboxcontain/glyphs-expected.png: Added.
* platform/chromium-mac-lion/fast/repaint/stacked-diacritics-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix RenderGeometryMap assertion when layers are scrolled during layout
https://bugs.webkit.org/show_bug.cgi?id=101292

Reviewed by Beth Dakin.

Source/WebCore:

When we set RenderLayer scroll positions as part of layout, we don't want
to update compositing layers right away. Updating compositing layers
requires that the entire layer tree has been updated from renderers,
so that the geometry of all RenderLayers can be trusted. When this state
was violated, RenderGeometryMap asserts.

Fix by bailing from updateCompositingLayersAfterScroll() if FrameView
tells us that we're doing layout. A full update of the compositing layers
will happen later anyway.

Test: compositing/geometry/geometry-map-scroll-during-layout-assertion.html

* rendering/RenderLayer.cpp:
(WebCore::frameViewFromLayer):
(WebCore::RenderLayer::updateCompositingLayersAfterScroll):

LayoutTests:

Test that hit the assertion before the fix.

* compositing/geometry/geometry-map-scroll-during-layout-assertion-expected.txt: Added.
* compositing/geometry/geometry-map-scroll-during-layout-assertion.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Page can't back to whole screen after zoom out and orientation change
https://bugs.webkit.org/show_bug.cgi?id=101350

Reviewed by Rob Buis.
Patch by Jacky Jiang  <zhajiang@rim.com>.
Internally reviewed by Arvid Nilsson.

PR: 229321
When rotating device during touch interaction, bitmap zooming was
unexpected ended by resetBitmapZoomScale() so that it couldn't bounce
back. The call resetBitmapZoomScale() is ancient, which just resets the
scale of the bitmap before. Right now it only ends the bitmap zooming
which caused the issue. As UI viewport will be updated by zoomChanged()
right after that, we can remove this trouble maker.
Update the interaction views if the rotation is being changed so that
ZoomHandler can get the updated views.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
* Api/WebPageClient.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] css3/line-break/line-break-strict-sound-marks.html image flaky on Mac 10.7
https://bugs.webkit.org/show_bug.cgi?id=101368

Unreviewed gardening.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
canonicalizedTitle() shouldn't convert 8 bit title strings to 16 bit
https://bugs.webkit.org/show_bug.cgi?id=101105

Reviewed by Darin Adler.

Turned canonicalizedTitle() into a templated function based on character type.
Changed call in updateTitle() to check the bitness of the title string to call
the right template flavor of canonicalizedTitle().
Made supporting changes by adding displayBufferModifiedByEncoding(LChar*, ...)
and made TextEncoding::displayBuffer() a templated function as well.

No new tests needed, as functionality is unchanged.

* dom/Document.cpp:
(WebCore::canonicalizedTitle):
(WebCore::Document::updateTitle):
(WebCore::Document::displayBufferModifiedByEncodingInternal):
* dom/Document.h:
(WebCore::Document::displayBufferModifiedByEncoding):
* platform/text/TextEncoding.h:
(TextEncoding):
(WebCore::TextEncoding::displayBuffer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Update BB10 form theme.
https://bugs.webkit.org/show_bug.cgi?id=100760

Patch by Tiancheng Jiang <tijiang@rim.com> on 2012-11-06
Reviewed by Rob Buis.

Revert webkit/ce306dcc698199a6f7ce679daf0a30c25d3a3d43 slider theme
change which break media control and vertical slider.

RIM PR 236993
Internal Reviewed by Jeff Rogers.

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintSliderTrackRect):
(WebCore::RenderThemeBlackBerry::paintSliderThumb):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ScriptWrappable should work for more than just Node
https://bugs.webkit.org/show_bug.cgi?id=101319

Reviewed by Eric Seidel.

This patch generalizes the inline cached wrapper code path to work with
all subclasses of ScriptWrappable, not just Node.

* bindings/js/JSDOMBinding.h:
(WebCore::setInlineCachedWrapper):
(WebCore::getInlineCachedWrapper):
(WebCore):
(WebCore::clearInlineCachedWrapper):
(WebCore::cacheWrapper):
* bindings/js/JSNodeCustom.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Adding window.external to our port
https://bugs.webkit.org/show_bug.cgi?id=100868

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-11-06
Reviewed by Rob Buis.

Patching the method names to match the ones in the spec.

* WebCoreSupport/ExternalExtension.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Two touchadjustment tests are failing on mac
https://bugs.webkit.org/show_bug.cgi?id=100833

Patch by Rick Byers <rbyers@chromium.org> on 2012-11-06
Reviewed by Antonio Gomes.

Re-enable these two tests with appropriate tweaks.  Also avoid the platform dependant
behavior by switching to the Ahem font.

* platform/chromium/TestExpectations: Remove the failure expectations.
* touchadjustment/html-label.html: Tweak one very borderline case to be closer to pass
reliably.  Previously this passed only due to a bug in the test infrastructure fixed in r132929.
* touchadjustment/nested-touch.html: Tweak borderline case to compensate for inclusion of
the border in the measurement of the size of the div.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Hook up the remote layer tree drawing area to an environment variable
https://bugs.webkit.org/show_bug.cgi?id=101267

Reviewed by Andreas Kling.

* UIProcess/API/mac/WKView.mm:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::sizeDidChange):
(WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add new test cases to layout test effect-reference and effect-reference-hw.
https://bugs.webkit.org/show_bug.cgi?id=101366

Reviewed by Dean Jackson.

* css3/filters/effect-reference-hw.html:
* css3/filters/effect-reference.html:
Add some test cases for feBlend and feSpecularLighting.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
(r133351): Number of test failures from enabling SUBPIXEL_LAYOUT on Mac
https://bugs.webkit.org/show_bug.cgi?id=101220

New baselines for two more tests whose output was affected by enabling subpixel layout.

* platform/mac/fast/dynamic/subtree-parent-static-y-expected.txt:
* platform/mac/fast/images/repaint-subrect-grid-expected.txt:

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