[V8] Add "stack" property to DOMException
https://bugs.webkit.org/show_bug.cgi?id=85057

Reviewed by Kentaro Hara.

When we create a DOM exception we define a V8 accessor for the stack property. This
accessor uses a new Error object to get the underlying stack string.

Source/WebCore:

Test: fast/dom/DOMException/stack-trace.html

* bindings/v8/V8Proxy.cpp:
(WebCore::DOMExceptionStackGetter):
(WebCore):
(WebCore::DOMExceptionStackSetter):
(WebCore::V8Proxy::setDOMException):

LayoutTests:

* fast/dom/DOMException/stack-trace-expected.txt: Added.
* fast/dom/DOMException/stack-trace.html: Added.
* platform/chromium/fast/dom/DOMException/stack-trace-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move the parts of RunLoopMac.mm that aren't Mac-specific into RunLoopCF.cpp
https://bugs.webkit.org/show_bug.cgi?id=86411

Reviewed by Anders Carlsson.

Most of RunLoopMac.mm was written in terms of CF API. Move these bits
to a new file called RunLoopCF.cpp, leaving only the bits dealing with
NSApplication.

* WebCore.xcodeproj/project.pbxproj: Xcode decided to give
VisitedLinks.* new UUIDs. I'll allow it.
* platform/cf/RunLoopCF.cpp: Copied from Source/WebCore/platform/mac/RunLoopMac.mm.
* platform/mac/RunLoopMac.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117018 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix RunLoopCF.cpp's copyright string.

* platform/cf/RunLoopCF.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117019 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/chromium: Unreviewed, roll Chromium DEPS to r136942.

LayoutTests: fast/loader/javascript-url-in-embed.html is failing after r115646
https://bugs.webkit.org/show_bug.cgi?id=86414

Unreviewed, expectations change.

* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=86420
ScrollbarPainter should support expansionTransitionProgress

Reviewed by Sam Weinig.

expansionTransitionProgress works the same as 
uiStateTransitionProgress. This code just echoes that code, but for 
expansion instead of uiState.
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/ScrollAnimatorMac.mm:
(supportsExpansionTransitionProgress):
(-[WebScrollbarPartAnimation setCurrentProgress:]):
(-[WebScrollbarPainterDelegate cancelAnimations]):
(-[WebScrollbarPainterDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
(-[WebScrollbarPainterDelegate invalidate]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Prevent KeyCodeConversionAndroid from breaking on next NDK roll
https://bugs.webkit.org/show_bug.cgi?id=86415

Patch by Alexandre Elias <aelias@google.com> on 2012-05-14
Reviewed by Adam Barth.

The new enum values added in this file have been added in recent
versions of the NDK, so this file will fail to compile with duplicate
enum error when we roll NDK to r7c or higher.  A workaround is
to move our enum values to the WebCore namespace.  When the NDK
upgrade is complete, we can delete them.

No new tests. (No-op change.)

* platform/chromium/KeyCodeConversionAndroid.cpp:
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] remove skia/third_party/glu from DEPS
https://bugs.webkit.org/show_bug.cgi?id=86431

Chromium rev 136872 removed skia/third_party/glu, but nobody updated it in WebKit.  This
patch fixes that.

Unreviewed, remove bad Chromium repo.

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Update text expectations.

* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Renamed from LayoutTests/platform/efl/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt.
* platform/chromium-linux-x86/fast/replaced/replaced-breaking-expected.txt: Removed.
* platform/chromium-linux/fast/replaced/replaced-breaking-expected.txt:
* platform/chromium-mac-snowleopard/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
* platform/chromium-mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium/test_expectations.txt:
* platform/gtk/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cannot login to iCloud
https://bugs.webkit.org/show_bug.cgi?id=86321

Reviewed by Filip Pizlo.

This is a bug introduced by bug#85853, we shouldn't allow assignment to
the prototype property of functions to be cached, since we need to clear
the cached inheritorID.

* runtime/JSFunction.cpp:
(JSC::JSFunction::put):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Styles are not recalculated when the seamless attribute is dynamically added/removed
https://bugs.webkit.org/show_bug.cgi?id=86315

Reviewed by Andreas Kling.

Source/WebCore:

Covered by fast/frames/seamless/seamless-css-cascade.html.

* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::isPresentationAttribute):
 - Make seamless a presentational attribute, which means style on the <iframe> will
   be forced to recalculate when it changes.  This is correct, but not observable
   until the layout changes are landed (as then the iframe should correctly revert to not
   being sized to fit its content if seamless is removed).
(WebCore::HTMLIFrameElement::parseAttribute):
 - When the seamless attribute is added or remove, force the content document to recalc
   its style resolver, which will refresh the list of inherited stylesheets from the
   parent.  This doesn't need to happen synchronously.  When the layout changes land
   the content document will actually cause that recalc to redirect to the parent document
   in the seamless case anyway, but it's more correct to ask the content document directly.

LayoutTests:

Add a subtest to cover this case.

* fast/frames/seamless/seamless-css-cascade-expected.txt:
* fast/frames/seamless/seamless-css-cascade.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add WTF_USE_APPKIT to differentiate platforms that use AppKit.framework from other Darwin platforms
https://bugs.webkit.org/show_bug.cgi?id=86432

Reviewed by Maciej Stachowiak.

* wtf/Platform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Introduce ENABLE_CSS_VARIABLES compile flag.
https://bugs.webkit.org/show_bug.cgi?id=86338

Reviewed by Dimitri Glazkov.

Add a configuration option for CSS Variables support, disabling it by default.

.:

* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No new tests. This patch only introduces an unused build flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/chromium:

* features.gypi:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* Scripts/webkitperl/FeatureList.pm:
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitPort._missing_symbol_to_skipped_tests):
* qmake/mkspecs/features/features.pri:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add Prerenderer, PrerenderHandle and a chromium interface for Prerendering.
https://bugs.webkit.org/show_bug.cgi?id=85005

Reviewed by Adam Barth.

Source/Platform:

* Platform.gypi:
* chromium/public/WebPrerender.h:
(WebKit::WebPrerender::referrer):
(WebCore):
(WebPrerender):
* chromium/public/WebPrerenderingSupport.h:
(WebKit):
(WebPrerenderingSupport):
* chromium/public/WebURLRequest.h:
* chromium/src/WebPrerenderingSupport.cpp: Added.
(WebKit):
(WebKit::WebPrerenderingSupport::initialize):
(WebKit::WebPrerenderingSupport::shutdown):
(WebKit::WebPrerenderingSupport::current):

Source/WebCore:

The prerender case isn't quite a resource load, and using resource loading to
retrieve them has constrained the API, and unnecessarily complicated the loader.

The new Prerenderer and PrerenderHandle let <link rel=prerender...> elements signal
removal and unload to their platform.

No new tests, as this interface requires a full platform to work, and doesn't affect layout.  Test
it with your platform when implemented for it.

* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore):
(Document):
(WebCore::Document::prerenderer):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::removedFrom):
* html/LinkRelAttribute.cpp:
(WebCore::LinkRelAttribute::LinkRelAttribute):
* html/LinkRelAttribute.h:
(LinkRelAttribute):
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLink):
(WebCore::LinkLoader::released):
* loader/LinkLoader.h:
(WebCore):
(LinkLoader):
* loader/Prerenderer.cpp: Added.
(WebCore):
(WebCore::Prerenderer::create):
(WebCore::Prerenderer::Prerenderer):
(WebCore::Prerenderer::~Prerenderer):
(WebCore::Prerenderer::render):
(WebCore::Prerenderer::stop):
(WebCore::Prerenderer::suspend):
(WebCore::Prerenderer::resume):
(WebCore::Prerenderer::document):
(WebCore::Prerenderer::client):
* loader/Prerenderer.h: Copied from Source/Platform/chromium/public/WebPrerender.h.
(WebCore):
(Prerenderer):
* loader/PrerendererClient.cpp: Copied from Source/WebCore/html/LinkRelAttribute.h.
(WebCore):
(WebCore::PrerendererClient::supplementName):
(WebCore::PrerendererClient::from):
(WebCore::providePrerendererClientTo):
* loader/PrerendererClient.h: Copied from Source/WebCore/html/LinkRelAttribute.h.
(WebCore):
(PrerendererClient):
(WebCore::PrerendererClient::~PrerendererClient):
(WebCore::PrerendererClient::PrerendererClient):
* loader/cache/CachedResource.cpp:
(WebCore::defaultPriorityForResourceType):
(WebCore::cachedResourceTypeToTargetType):
(WebCore::CachedResource::load):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::ignoreForRequestCount):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::createResource):
(WebCore::CachedResourceLoader::requestLinkResource):
(WebCore::CachedResourceLoader::checkInsecureContent):
(WebCore::CachedResourceLoader::canRequest):
* platform/PrerenderHandle.h: Copied from Source/Platform/chromium/public/WebPrerender.h.
(WebCore):
(PrerenderHandle):
* platform/chromium/Prerender.cpp: Added.
(WebCore):
(WebCore::Prerender::Prerender):
(WebCore::Prerender::~Prerender):
(WebCore::Prerender::setState):
(WebCore::Prerender::add):
(WebCore::Prerender::cancel):
(WebCore::Prerender::abandon):
(WebCore::Prerender::suspend):
(WebCore::Prerender::resume):
* platform/chromium/Prerender.h: Copied from Source/Platform/chromium/public/WebPrerender.h.
(WebCore):
(Prerender):
(ExtraData):
(WebCore::Prerender::ExtraData::~ExtraData):
(WebCore::Prerender::url):
(WebCore::Prerender::referrer):
(WebCore::Prerender::referrerPolicy):
(WebCore::Prerender::setExtraData):
(WebCore::Prerender::extraData):
* platform/chromium/PrerenderHandle.cpp: Copied from Source/Platform/chromium/public/WebPrerender.h.
(WebCore):
(WebCore::PrerenderHandle::create):
(WebCore::PrerenderHandle::PrerenderHandle):
(WebCore::PrerenderHandle::~PrerenderHandle):
(WebCore::PrerenderHandle::prerender):
(WebCore::PrerenderHandle::add):
(WebCore::PrerenderHandle::cancel):
(WebCore::PrerenderHandle::abandon):
(WebCore::PrerenderHandle::suspend):
(WebCore::PrerenderHandle::resume):
(WebCore::PrerenderHandle::url):
(WebCore::PrerenderHandle::referrer):
(WebCore::PrerenderHandle::referrerPolicy):
* platform/chromium/support/WebPrerender.cpp: Copied from Source/Platform/chromium/public/WebPrerender.h.
(WebKit::WebPrerender::WebPrerender):
(WebKit):
(WebKit::WebPrerender::~WebPrerender):
(WebKit::WebPrerender::url):
(WebKit::WebPrerender::referrer):
(WebKit::WebPrerender::referrerPolicy):
(WebKit::WebPrerender::setExtraData):
(WebKit::WebPrerender::extraData):
* platform/network/blackberry/ResourceRequest.h:
* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore::platformTargetTypeForRequest):
* platform/network/chromium/ResourceRequest.h:

Source/WebKit/chromium:

The prerender case isn't quite a resource load, and using resource loading to
retrieve them has constrained the API, and unnecessarily complicated the loader.

The new Prerenderer and PrerenderHandle let <link rel=prerender...> elements signal
removal and unload to their platform.

* WebKit.gyp:
* public/WebView.h:
* src/PrerendererClientImpl.cpp: Copied from Source/WebCore/html/LinkRelAttribute.h.
(WebKit):
(WebKit::PrerendererClientImpl::PrerendererClientImpl):
(WebKit::PrerendererClientImpl::willAddPrerender):
* src/PrerendererClientImpl.h: Copied from Source/WebCore/html/LinkRelAttribute.h.
(WebCore):
(WebKit):
(PrerendererClientImpl):
* src/WebKit.cpp:
(WebKit::shutdown):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setPrerendererClient):
(WebKit):
* src/WebViewImpl.h:
(WebKit):
(WebViewImpl):

LayoutTests:

The prerender case isn't quite a resource load, and using resource loading to
retrieve them has constrained the API, and unnecessarily complicated the loader.

The new Prerenderer and PrerenderHandle let <link rel=prerender...> elements signal
removal and unload to their platform.

These tests are being removed, and expectations updated, because the old phantom-load
prerendering interface was susceptible to layout testing, and the new interface requires
a full platform to test, so it can't really be a layout test.

* fast/dom/HTMLLinkElement/prerender-expected.txt: Removed.
* fast/dom/HTMLLinkElement/prerender.html: Removed.
* platform/gtk/test_expectations.txt:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Update test expectations.

* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed morning gardening to paint the Qt bots green.

* http/tests/security/contentSecurityPolicy/shared-worker-connect-src-blocked-expected.txt: Updated after r117006.
* platform/qt/Skipped: Skip new failing/crashing tests.
* platform/qt/http/tests/security/contentSecurityPolicy/xsl-img-blocked-expected.txt: Updated after r117006.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RenderLayer::repaintRectIncludingDescendants shouldn't include repaint rects of composited descendants
https://bugs.webkit.org/show_bug.cgi?id=86429
<rdar://problem/11445132>

Reviewed by Simon Fraser.

Change repaintRectIncludingDescendants to not include repaint rects for composited child layers,
and rename the function to make it more clear that that's what it does now.

No new tests, scrolling performance optimization.

* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsFastPath):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::repaintRectIncludingNonCompositingDescendants):
* rendering/RenderLayer.h:
(RenderLayer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Refactoring] Get rid of ContentDistribution::Item
https://bugs.webkit.org/show_bug.cgi?id=86350

This change replaces the linked list on ContentDistribution with a Vector.
We no longer link item class ContentDistribution::Item.
This simplification also allows ContentDistribution to go.
ContentDistribution is now just a typedef of Vector<RefPtr<Node> >.

Reviewed by Dimitri Glazkov.

No new tests. Covered by existing tests.

* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseNode):
(WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
* dom/ElementShadow.cpp:
* dom/ElementShadow.h:
(ElementShadow):
* dom/NodeRenderingContext.cpp:
(WebCore::nextRendererOfInsertionPoint):
(WebCore::previousRendererOfInsertionPoint):
(WebCore::firstRendererOfInsertionPoint):
(WebCore::lastRendererOfInsertionPoint):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::clearDistribution):
(WebCore::ContentDistributor::findInsertionPointFor):
* html/shadow/ContentDistributor.h:
(WebCore):
(ContentDistributor):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::InsertionPoint):
(WebCore::InsertionPoint::attachDistributedNode):
(WebCore::InsertionPoint::assignShadowRoot):
(WebCore::InsertionPoint::nextTo):
(WebCore):
(WebCore::InsertionPoint::previousTo):
* html/shadow/InsertionPoint.h: Added a set of delegate method to m_distribution.
(WebCore::InsertionPoint::hasDistribution):
(WebCore::InsertionPoint::indexOf):
(WebCore::InsertionPoint::size):
(WebCore::InsertionPoint::at):
(WebCore::InsertionPoint::first):
(WebCore::InsertionPoint::last):
(InsertionPoint):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make StyleResolver::applyMatchedProperties and ::applyProperties use enum template parameter instead of bool.
https://bugs.webkit.org/show_bug.cgi?id=86424

Reviewed by Dimitri Glazkov.

This patch changes from using a boolean template parameter for StyleResolver::applyMatchedProperties and
StyleResolver::applyProperties functions. The motivation for this change is that it paves the way for
CSS Variables to make the value tri-state, which is a requirement because variable definitions must occur
before high priority CSS properties such that they can be referenced by the latter. This change affects
only the type signatures of those functions, and not their behavior.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/StyleResolver.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Content Security Policy console error messages should include the violated directive.
https://bugs.webkit.org/show_bug.cgi?id=86323

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-05-15
Reviewed by Adam Barth.

Update global expectations for 1 Content Security Policy test after r117006.

* http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Node::shadowTreeRootNode() should return ShadowRoot instead of Node.
https://bugs.webkit.org/show_bug.cgi?id=86428

Reviewed by Hajime Morita.

Source/WebCore:

Since Node::shadowTreeRootNode() returns only ShadowRoot or 0 now, its return type should be ShadowRoot.
This patch changes the return type and adds include directive to build.

No new tests, no change in behavior.

* dom/Node.cpp:
(WebCore::Node::shadowAncestorNode):
(WebCore::Node::shadowTreeRootNode):
* dom/Node.h:
(WebCore):
(Node):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
* dom/Range.cpp:
(WebCore::Range::shadowTreeRootNode):
* dom/Range.h:
(Range):
* editing/Editor.cpp:
* editing/TextIterator.cpp:
* editing/htmlediting.cpp:
* html/shadow/ContentSelectorQuery.cpp:
* html/shadow/HTMLContentElement.cpp:
(WebCore::HTMLContentElement::parseAttribute):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::detach):
* page/EventHandler.cpp:

Source/WebKit/chromium:

Adds include directive to build.

* src/WebFrameImpl.cpp:

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