WebKit-https.git
7 years agoIndexedDB: Use WeakPtr for Factory-to-BackingStore reference
jsbell@chromium.org [Fri, 8 Mar 2013 01:42:17 +0000 (01:42 +0000)]
IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
https://bugs.webkit.org/show_bug.cgi?id=111459

Reviewed by Adam Barth.

Source/WebCore:

IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
origin is opened, the backing store instance must be re-used). This was a map to raw
pointers so that the backing store can be collected when all database references are
dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
would add/remove itself on creation/destruction.

Replace this with a HashMap<WeakPtr<>>. This simplifies the plumbing; map entries
"leak" but are purged on subsequent opens.

Added webkit_unit_test (Chromium port) to verify refcounts.

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
(WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
(WebCore::IDBBackingStore::open): Ditto.
* Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
(WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
(WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
(WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
* Modules/indexeddb/IDBFactoryBackendImpl.h:
(IDBFactoryBackendImpl): Remove plumbing methods.

Source/WebKit/chromium:

Added tests to verify refcounts on backing stores, update method signatures.

* tests/IDBBackingStoreTest.cpp:
(WebCore::IDBBackingStoreTest::SetUp): No dummy factory needed.
(MockIDBFactoryBackend): Expose protected method to tests.
(WebCore::TEST): Added BackingStoreLifetime test.
* tests/IDBCleanupOnIOErrorTest.cpp: No dummy factory needed.

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

7 years agoFix commented out code in LayoutTests/http/tests/misc/delete-frame-during-readystatec...
acolwell@chromium.org [Fri, 8 Mar 2013 01:36:42 +0000 (01:36 +0000)]
Fix commented out code in LayoutTests/http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html
https://bugs.webkit.org/show_bug.cgi?id=111800

Unreviewed.

* http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html:

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

7 years agoWebPageProxy::exceededDatabaseQuota() needs to be serialized.
mark.lam@apple.com [Fri, 8 Mar 2013 01:31:19 +0000 (01:31 +0000)]
WebPageProxy::exceededDatabaseQuota() needs to be serialized.
https://bugs.webkit.org/show_bug.cgi?id=111631.

Reviewed by Geoffrey Garen.

Previously, WebPageProxy::exceededDatabaseQuota() is called synchronously
with script execution in the WebProcess. Hence, it is never called in a
recursive manner.

In webkit2, we can have multiple WebProcesses concurrently triggering a
call to this function. While the function is waiting on feedback from a
UI dialog, the wait loop may re-enter the function to service a second
request to call this function from another WebProcess. This results in
problems where some of the WebProcesses will not get a proper reply, and
therefore hangs perpetually waiting for a non-forthcoming reply.

This changeset changes the function to queue the requests and ensure
that we do not recursively callback to the UI client.

* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction):
* UIProcess/WebPageProxy.cpp:
(ExceededDatabaseQuotaRecords):
(Record):
(WebKit::ExceededDatabaseQuotaRecords::areBeingProcessed):
(WebKit::ExceededDatabaseQuotaRecords::ExceededDatabaseQuotaRecords):
(WebKit::ExceededDatabaseQuotaRecords::~ExceededDatabaseQuotaRecords):
(WebKit::ExceededDatabaseQuotaRecords::shared):
(WebKit::ExceededDatabaseQuotaRecords::createRecord):
(WebKit::ExceededDatabaseQuotaRecords::add):
(WebKit::ExceededDatabaseQuotaRecords::next):
(WebKit::WebPageProxy::exceededDatabaseQuota):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:

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

7 years ago[BlackBerry] RefCounting ParsedCookie to avoid SegFaults
commit-queue@webkit.org [Fri, 8 Mar 2013 01:31:02 +0000 (01:31 +0000)]
[BlackBerry] RefCounting ParsedCookie to avoid SegFaults
https://bugs.webkit.org/show_bug.cgi?id=111761

Patch by Otto Derek Cheung <otcheung@rim.com> on 2013-03-07
Reviewed by Rob Buis.

Source/WebCore:

Making necessary changes to ref count the ParsedCookie object.

Tested using the opera cookie test suite and the BB Browser cookie test suite.
Tested using the browser, visiting popular sites such as facebook, reddit, google etc
to ensure cookie functionality isn't changed.

* loader/blackberry/CookieJarBlackBerry.cpp:
(WebCore::getRawCookies):
* platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
(WebCore::CookieDatabaseBackingStore::insert):
(WebCore::CookieDatabaseBackingStore::update):
(WebCore::CookieDatabaseBackingStore::remove):
(WebCore::CookieDatabaseBackingStore::getCookiesFromDatabase):
(WebCore::CookieDatabaseBackingStore::invokeGetCookiesWithLimit):
(WebCore::CookieDatabaseBackingStore::invokeSendChangesToDatabase):
(WebCore::CookieDatabaseBackingStore::addToChangeQueue):
* platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
(CookieDatabaseBackingStore):
* platform/blackberry/CookieManager.cpp:
(WebCore::cookieSorter):
(WebCore::CookieManager::setCookies):
(WebCore::CookieManager::getCookie):
(WebCore::CookieManager::generateHtmlFragmentForCookies):
(WebCore::CookieManager::getRawCookies):
(WebCore::CookieManager::checkAndTreatCookie):
(WebCore::CookieManager::addCookieToMap):
(WebCore::CookieManager::getBackingStoreCookies):
(WebCore::CookieManager::findOrCreateCookieMap):
(WebCore::CookieManager::removeCookieWithName):
(WebCore::CookieManager::cookieLimitCleanUp):
* platform/blackberry/CookieManager.h:
* platform/blackberry/CookieMap.cpp:
(WebCore::CookieMap::addOrReplaceCookie):
(WebCore::CookieMap::removeCookieAtIndex):
(WebCore::CookieMap::removeCookie):
(WebCore::CookieMap::getAllCookies):
(WebCore::CookieMap::removeOldestCookie):
(WebCore::CookieMap::deleteAllCookiesAndDomains):
(WebCore::CookieMap::getAllChildCookies):
* platform/blackberry/CookieMap.h:
(CookieMap):
* platform/blackberry/CookieParser.cpp:
(WebCore):
(WebCore::CookieParser::parse):
(WebCore::CookieParser::parseOneCookie):
* platform/blackberry/CookieParser.h:
(CookieParser):
* platform/blackberry/ParsedCookie.cpp:
* platform/blackberry/ParsedCookie.h:
(ParsedCookie):
(WebCore::ParsedCookie::create):

Source/WebKit/blackberry:

Making necessary changes to ref-count the ParsedCookie object.

* Api/WebCookieJar.cpp:
(BlackBerry::WebKit::WebCookieJar::cookies):

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

7 years agoHeap-use-after-free in WebCore::HTMLMediaElement::~HTMLMediaElement
acolwell@chromium.org [Fri, 8 Mar 2013 01:12:44 +0000 (01:12 +0000)]
Heap-use-after-free in WebCore::HTMLMediaElement::~HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=110623

Reviewed by Kentaro Hara.

Source/WebCore:

Test: http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html

* bindings/v8/V8GCController.cpp: Fix MinorGCWrapperVisitor so it doesn't collect ActiveDOMObjects
                                  that have pending activity.
* html/HTMLAudioElement.h:
(HTMLAudioElement): Removed hasPendingActivity() now that this is handled by the base class.
* html/HTMLAudioElement.idl: Removed ActiveDOMObject annotation since HTMLMediaElement now has it.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::hasPendingActivity): Update implementation to return true if the media
                                                 has audio and is playing. This brings the code into
                                                 compliance with the detached element behavior outlined
                                                 in the HTML5 spec.
* html/HTMLMediaElement.idl: Added ActiveDOMObject annotation so that all derived classes are
                             considered ActiveDOMObjects.

LayoutTests:

* http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal-expected.txt: Added.
* http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html: Added.
* http/tests/misc/resources/delete-frame-during-readystatechange-frame-with-gc-after-video-removal.html: Added.

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

7 years agoCFNetwork cache partitioning does not work properly on subdomains
jpfau@apple.com [Fri, 8 Mar 2013 01:10:54 +0000 (01:10 +0000)]
CFNetwork cache partitioning does not work properly on subdomains
https://bugs.webkit.org/show_bug.cgi?id=111772

Reviewed by David Kilzer.

Source/WebCore:

Ensure that the cache partitioning is done over the top privately-controlled domain for the NSURLRequest.

Not possible to test with current automated test tools, must be tested manually.

* loader/cache/MemoryCache.cpp: Remove extraneous calls to partitionName
(WebCore):
(WebCore::MemoryCache::add):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequest):
(WebCore::MemoryCache::evict):
(WebCore::MemoryCache::removeResourcesWithOrigin):
* platform/network/cf/ResourceRequest.h: Put top privately-controlled domain reduction code into ResourceRequest::partitionName
(ResourceRequest):
(WebCore::ResourceRequest::cachePartition):
(WebCore::ResourceRequest::setCachePartition): Pre-process the partition name
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore):
(WebCore::ResourceRequest::partitionName):
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::doUpdatePlatformRequest): Use a UTF-8 version of the cache partition name

Source/WebKit2:

Ensure that the CFString is UTF-8 so that WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition will always work.

* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
(WebKit::partitionName): Create a UTF-8 CFString explicitly

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

7 years ago Roll out an accidentally committed change I made for local testing.
ap@apple.com [Fri, 8 Mar 2013 01:06:58 +0000 (01:06 +0000)]
    Roll out an accidentally committed change I made for local testing.

        * http/tests/misc/empty-file-formdata.html:

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

7 years agoCompute WebGL context attributes from DrawingBuffer when it is used
kbr@google.com [Fri, 8 Mar 2013 01:06:47 +0000 (01:06 +0000)]
Compute WebGL context attributes from DrawingBuffer when it is used
https://bugs.webkit.org/show_bug.cgi?id=111666

Reviewed by James Robinson.

Fixed computation of antialias flag when DrawingBuffer is used.

No new tests; covered by existing tests. Ran WebGL conformance
tests on desktop Linux and Android to test.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::getContextAttributes):
    Query DrawingBuffer, when used, for antialias flag.

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

7 years agoAdd myself to reviewers.py
commit-queue@webkit.org [Fri, 8 Mar 2013 00:59:21 +0000 (00:59 +0000)]
Add myself to reviewers.py
https://bugs.webkit.org/show_bug.cgi?id=111757

Patch by Christian Biesinger <cbiesinger@chromium.org> on 2013-03-07
Reviewed by Eric Seidel.

* Scripts/webkitpy/common/config/committers.py:

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

7 years agoUnreviewed gardening.
rafaelw@chromium.org [Fri, 8 Mar 2013 00:59:15 +0000 (00:59 +0000)]
Unreviewed gardening.

* platform/chromium/TestExpectations: fast/events/before-unload-adopt-subframe-to-outside.html

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

7 years agoNeed API to draw custom overhang area
bdakin@apple.com [Fri, 8 Mar 2013 00:57:00 +0000 (00:57 +0000)]
Need API to draw custom overhang area
https://bugs.webkit.org/show_bug.cgi?id=111679
-and corresponding-
<rdar://problem/13291415>

Reviewed by Simon Fraser.

Source/WebCore:

This will allow clients to put custom images into the top or bottom overhang area.

New FrameView API takes a bool indicating whether the client wants a top/bottom
overhang layer. If the bool is true, the overhang layer will be returned.
* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::setWantsLayerForTopOverHangArea):
(WebCore::FrameView::setWantsLayerForBottomOverHangArea):
* page/FrameView.h:
(FrameView):

Keep member variables for the top and bottom overhang layers. Create them if
necessary, and update them if the root layer changes.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::reportMemoryUsage):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):

Source/WebKit2:

The new API is WKBundlePageSetTopOverhangImage() and
WKBundlePageSetBottomOverhangImage(). When the API is called, WebPage will get
GraphicsLayers for the appropriate area from FrameView, and then set the image as
the contents of the layer.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetTopOverhangImage):
(WKBundlePageSetBottomOverhangImage):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setTopOverhangImage):
(WebKit):
(WebKit::WebPage::setBottomOverhangImage):

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

7 years agoUnreviewed gardening.
rafaelw@chromium.org [Fri, 8 Mar 2013 00:54:35 +0000 (00:54 +0000)]
Unreviewed gardening.

* platform/chromium-linux/compositing/overflow/composited-scrolling-paint-phases-expected.txt: Added.
* platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-paint-phases-expected.txt: Added.
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/overflow/composited-scrolling-paint-phases-expected.txt: Added.

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

7 years agoReduce page cache size on Mac
barraclough@apple.com [Fri, 8 Mar 2013 00:53:42 +0000 (00:53 +0000)]
Reduce page cache size on Mac
https://bugs.webkit.org/show_bug.cgi?id=111795

Rubber stamped by Geoff Garen

5 entries is unnecessarily large; research show 3 should suffice.
On a low memory warning we should clear this completely.

Source/WebCore:

* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::releaseMemory):
    - clear the page cache completely

Source/WebKit2:

* Shared/CacheModel.cpp:
(WebKit::calculateCacheSizes):
    - reduce maximum to 3.

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

7 years agoAdding id attribute test for MediaStream
li.yin@intel.com [Fri, 8 Mar 2013 00:44:04 +0000 (00:44 +0000)]
Adding id attribute test for MediaStream
https://bugs.webkit.org/show_bug.cgi?id=111526

Reviewed by Kentaro Hara.

Spec: http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaStream-id
The id strings must only use characters in the ranges U+0021, U+0023 to U+0027,
U+002A to U+002B, U+002D to U+002E, U+0030 to U+0039, U+0041 to U+005A,
U+005E to U+007E, and must be 36 characters long.

* fast/mediastream/MediaStreamConstructor-expected.txt:
* fast/mediastream/MediaStreamConstructor.html:

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

7 years agorun-perf-tests should have a --repeat option
glenn@skynav.com [Fri, 8 Mar 2013 00:38:45 +0000 (00:38 +0000)]
run-perf-tests should have a --repeat option
https://bugs.webkit.org/show_bug.cgi?id=100030

Reviewed by Ryosuke Niwa.

Add --repeat option to run-perf-tests, with default value of 1. When greater
than 1, runs test set specified number of times. Note that multiple runs are
not aggregated for statistical purposes.

Incidentally fixed typo: s/suceeds/succeeds/.

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._parse_args): Add repeat option.
(PerfTestsRunner.run): Add outer repeat loop.
(PerfTestsRunner._generate_results): Split from original _generate_and_show_results.
(PerfTestsRunner._upload_and_show_results): Split from original _generate_and_show_results.
* Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
(MainTest._test_run_with_json_output): Add repeat optional argument for generating expected logs. Fix typo.
(MainTest._test_run_with_json_output.mock_upload_json): Fix typo.
(MainTest.test_run_with_json_output): Fix typo.
(MainTest.test_run_with_description): Fix typo.
(MainTest.test_run_respects_no_results): Fix typo.
(MainTest.test_run_with_slave_config_json): Fix typo.
(MainTest.test_run_with_multiple_repositories): Fix typo.
(MainTest.test_run_with_upload_json): Fix typo.
(MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Fix typo.
(MainTest.test_run_with_repeat): Added new test for repeat count semantics.
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(MainTest.test_parse_args): Add test for repeat option parsing.

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

7 years agoborder-fit should happen at layout time rather than paint time
dino@apple.com [Fri, 8 Mar 2013 00:26:06 +0000 (00:26 +0000)]
border-fit should happen at layout time rather than paint time
https://bugs.webkit.org/show_bug.cgi?id=111606

Unreviewed. Skipping some broken tests.

* platform/mac/TestExpectations:

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

7 years agoCrash when updating predictions below JSC::arrayProtoFuncForEach on tuaw.com article
msaboff@apple.com [Fri, 8 Mar 2013 00:19:39 +0000 (00:19 +0000)]
Crash when updating predictions below JSC::arrayProtoFuncForEach on tuaw.com article
https://bugs.webkit.org/show_bug.cgi?id=111777

Reviewed by Filip Pizlo.

Moved register allocations to be above any generated control flow so that any
resulting spill would be visible to all subsequently generated code.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::compile):

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

7 years agoRename Mac's TileCache to TileController, and WebTileCacheLayer to WebTiledBackingLayer
simon.fraser@apple.com [Thu, 7 Mar 2013 23:54:13 +0000 (23:54 +0000)]
Rename Mac's TileCache to TileController, and WebTileCacheLayer to WebTiledBackingLayer
https://bugs.webkit.org/show_bug.cgi?id=111779

Reviewed by Tim Horton.

"TileCache" was a name conflict in downstream code, so rename it to TileController.
The layer that has a TileController is now a WebTiledBackingLayer (which fits with
the TiledBacking API that TileController exposes).

Also renamed the flags in PlatformCALayer to match.

Rename only, no behavior change.

* WebCore.xcodeproj/project.pbxproj:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::shouldUseTiledBacking):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
(WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
(WebCore::GraphicsLayerCA::updateVisibleRect):
(WebCore::GraphicsLayerCA::getDebugBorderInfo):
(WebCore::GraphicsLayerCA::requiresTiledLayer):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayer.h:
(WebCore::PlatformCALayer::usesTiledBackingLayer):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::PlatformCALayer):
(PlatformCALayer::~PlatformCALayer):
(PlatformCALayer::tiledBacking):
* platform/graphics/ca/mac/TileController.h: Renamed from Source/WebCore/platform/graphics/ca/mac/TileCache.h.
* platform/graphics/ca/mac/WebTileLayer.h:
(TileController):
* platform/graphics/ca/mac/WebTileLayer.mm:
(-[WebTileLayer drawInContext:]):
(-[WebTileLayer setTileController:WebCore::]):
(-[WebTileLayer logFilledFreshTile]):
* platform/graphics/ca/mac/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.h.
* platform/graphics/ca/mac/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.mm.
* platform/graphics/mac/WebLayer.mm:
(drawLayerContents):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::RenderLayerBacking::shouldUseTiledBacking):
(WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
* rendering/RenderLayerBacking.h:
(WebCore::RenderLayerBacking::usingTiledBacking):
(RenderLayerBacking):
(WebCore::RenderLayerBacking::hasTiledBackingFlatteningLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::frameViewDidLayout):
(WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):
(WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing):

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

7 years agoshowAllRuns checkbox no longer works on the stats dashboard
jparent@chromium.org [Thu, 7 Mar 2013 23:48:40 +0000 (23:48 +0000)]
showAllRuns checkbox no longer works on the stats dashboard
https://bugs.webkit.org/show_bug.cgi?id=111673

Reviewed by Ojan Vafai.

Stats dashboard does not have any DB_SPECIFIC_INVALIDATING_PARAMETERS,
so we were trying to index into an undefined object.

* TestResultServer/static-dashboards/dashboard_base.js:
(invalidateQueryParameters):

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

7 years agoDFG should not get corrupted IR in the case of code that is dead, unreachable, and...
fpizlo@apple.com [Thu, 7 Mar 2013 23:45:27 +0000 (23:45 +0000)]
DFG should not get corrupted IR in the case of code that is dead, unreachable, and contains a chain of nodes that use each other in an untyped way
https://bugs.webkit.org/show_bug.cgi?id=111783

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg.

Unreachable code is not touched by CFA and so thinks that even untyped uses are checked.
But dead untyped uses don't need checks and hence don't need to be Phantom'd. The DCE knew
this in findTypeCheckRoot() but not in eliminateIrrelevantPhantomChildren(), leading to a
Phantom node that had another Phantom node as one of its kids.

* dfg/DFGDCEPhase.cpp:
(JSC::DFG::DCEPhase::eliminateIrrelevantPhantomChildren):

LayoutTests:

Reviewed by Mark Hahnenberg.

* fast/js/dfg-dead-unreachable-code-with-chain-of-dead-unchecked-nodes-expected.txt: Added.
* fast/js/dfg-dead-unreachable-code-with-chain-of-dead-unchecked-nodes.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-dead-unreachable-code-with-chain-of-dead-unchecked-nodes.js: Added.
(foo.bar):
(foo):

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

7 years ago[Chromium] Update #include for WebStorageNamespace.h
pilgrim@chromium.org [Thu, 7 Mar 2013 23:42:31 +0000 (23:42 +0000)]
[Chromium] Update #include for WebStorageNamespace.h
https://bugs.webkit.org/show_bug.cgi?id=111748

Reviewed by Adam Barth.

In anticipation of removing
WK/chromium/public/WebStorageNamespace.h (once downstream
references have been updated)

* DumpRenderTree/chromium/WebViewHost.cpp:

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

7 years agoThe DFG fixpoint is not strictly profitable, and should be straight-lined
fpizlo@apple.com [Thu, 7 Mar 2013 23:11:22 +0000 (23:11 +0000)]
The DFG fixpoint is not strictly profitable, and should be straight-lined
https://bugs.webkit.org/show_bug.cgi?id=111764

Reviewed by Oliver Hunt and Geoffrey Garen.

The DFG previously ran optimizations to fixpoint because there exists a circular dependency:

CSE depends on CFG simplification: CFG simplification merges blocks, and CSE is block-local.

CFG simplification depends on CFA and constant folding: constant folding reveals branches on
constants.

CFA depends on CSE: CSE reveals must-alias relationships by proving that two operations
always produce identical values.

Arguments simplification also depends on CSE, but it ought not depend on anything else.

Hence we get a cycle like: CFA -> folding -> CFG -> CSE -> CFA.

Note that before we had sparse conditional CFA, we also had CFA depending on CFG. This ought
not be the case anymore: CFG simplification should not by itself lead to better CFA results.

My guess is that the weakest link in this cycle is CFG -> CSE. CSE cuts both ways: if you
CSE too much then you increase register pressure. Hence it's not clear that you always want
to CSE after simplifying control flow. This leads to an order of optimization as follows:

CSE -> arguments -> CFA -> folding -> CFG

This is a 2.5% speed-up on SunSpider, a 4% speed-up on V8Spider, a possible 0.3% slow-down
on V8v7, nothing on Kraken, and 1.2% speed-up in the JSRegress geomean. I'll take a 2.5%
speed-up over a 0.3% V8v7 speed-up.

* dfg/DFGDriver.cpp:
(JSC::DFG::compile):

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

7 years ago FormData should allow setting filename to empty
ap@apple.com [Thu, 7 Mar 2013 22:52:59 +0000 (22:52 +0000)]
    FormData should allow setting filename to empty
        https://bugs.webkit.org/show_bug.cgi?id=111687

        Reviewed by Brady Eidson.

        Tests: http/tests/local/formdata/send-form-data-with-empty-blob-filename.html
               http/tests/local/formdata/send-form-data-with-empty-file-filename.html

        * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems):
        Missing value is a null string. If the string is empty, we should treat is as
        authoritative.

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

7 years agorun-perf-tests fails due to svn_revision not working on a pure git clone
dpranke@chromium.org [Thu, 7 Mar 2013 22:40:05 +0000 (22:40 +0000)]
run-perf-tests fails due to svn_revision not working on a pure git clone
https://bugs.webkit.org/show_bug.cgi?id=110839

Reviewed by Ryosuke Niwa.

Previously we would call git svn find-rev to look up the commit for
a given revision, and that'll hang in a pure git checkout.

This patch changes the way we look up svn revisions in a git
repository to use git log --grep 'git-svn-id', which is much faster
than grepping ourselves. It also renames timestamp_of_latest_commit()
to timestamp_of_revision() in order to accurately reflect what
the method is doing. Note that this patch only changes the logic
inside latest_revision() and svn_revision(). I'll file a separate
bug to change git_commit_from_svn_revision().

This patch also contains some fixes to unit tests that had bit-rotted
or were otherwise fragile, so that test-webkitpy --all would pass
cleanly, and a fix to outputcapture so that
test-webkitpy -p would work correctly again.

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.svn_revision):
(Git.timestamp_of_revision):
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.svn_revision):
(SCM.timestamp_of_revision):
* Scripts/webkitpy/common/checkout/scm/scm_mock.py:
(MockSCM.timestamp_of_revision):
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
(_shared_test_commit_with_message):
(test_commit_without_authorization):
(test_timestamp_of_revision):
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVN.timestamp_of_revision):
* Scripts/webkitpy/common/system/outputcapture.py:
  Importing unittest2 directly may not be safe if this module is
  imported before the autoinstaller gets a chance to set things up
  properly. We don't actually need unittest2 here.
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._generate_results_dict):

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

7 years agoUnreviewed gardening AppleWin port.
roger_fong@apple.com [Thu, 7 Mar 2013 22:37:02 +0000 (22:37 +0000)]
Unreviewed gardening AppleWin port.

* platform/win/TestExpectations:

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

7 years agoREGRESSION: fast/border/border-fit-2.html needs updating
hyatt@apple.com [Thu, 7 Mar 2013 22:33:25 +0000 (22:33 +0000)]
REGRESSION: fast/border/border-fit-2.html needs updating
https://bugs.webkit.org/show_bug.cgi?id=111776

Reviewed by Simon Fraser.

Source/WebCore:

This test is incorrectly shrinking the border image now.
We need to apply some clamping to the border-fit like the
old code did. The pixel results *are* still changing though,
since a layout-time shrinkage will not result in right-aligned
boxes in an LTR block when the left edge gets chopped. We'll
have to see if this behavioral change ends up being a problem,
but for now we'll rebaseline and assume it will be ok.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::fitBorderToLinesIfNeeded):

LayoutTests:

* platform/mac/fast/borders/border-fit-2-expected.png:
* platform/mac/fast/borders/border-fit-2-expected.txt:

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

7 years agoWeb Inspector: provide reasons why a layer was composited in the LayerTreeAgent
graouts@apple.com [Thu, 7 Mar 2013 22:21:43 +0000 (22:21 +0000)]
Web Inspector: provide reasons why a layer was composited in the LayerTreeAgent
https://bugs.webkit.org/show_bug.cgi?id=111703

Source/WebCore:

Introduce a new LayerTree.reasonsForCompositingLayer(layerId) method which returns
the list of reasons why the provided layer was composited as an object with an
optional property for each possible reason. The RenderLayerCompositor already knows
how to provide this information via its own reasonsForCompositing() method, and we
process the returned bitmask to populate the object sent to the front-end.

Reviewed by Timothy Hatcher.

Test: inspector-protocol/layers/layers-compositing-reasons.html

* inspector/Inspector.json:
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
(WebCore):
* inspector/InspectorLayerTreeAgent.h:
(InspectorLayerTreeAgent):

LayoutTests:

New test for LayerTree.reasonsForCompositingLayer(layerId).

Reviewed by Timothy Hatcher.

* inspector-protocol/layers/layers-compositing-reasons-expected.txt: Added.
* inspector-protocol/layers/layers-compositing-reasons.html: Added.

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

7 years agoUnreviewed gardening.
rafaelw@chromium.org [Thu, 7 Mar 2013 22:13:54 +0000 (22:13 +0000)]
Unreviewed gardening.

* platform/chromium/TestExpectations: http/tests/security/cross-origin-css.html

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

7 years agoUnreviewed gardening.
rafaelw@chromium.org [Thu, 7 Mar 2013 22:07:29 +0000 (22:07 +0000)]
Unreviewed gardening.

* platform/chromium-mac/fast/repaint/border-fit-lines-expected.txt: Renamed from LayoutTests/platform/chromium/fast/repaint/border-fit-lines-expected.txt.
* platform/chromium-win/fast/repaint/border-fit-lines-expected.txt:

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

7 years agoAdd a didFocusTextField callback to the injected bundle form client
andersca@apple.com [Thu, 7 Mar 2013 22:02:48 +0000 (22:02 +0000)]
Add a didFocusTextField callback to the injected bundle form client
https://bugs.webkit.org/show_bug.cgi?id=111771

Reviewed by Andreas Kling.

Source/WebCore:

Export a symbol needed by WebKit2.

* WebCore.exp.in:

Source/WebKit2:

Add a new client callback that's invoked whenever a text input field is focused.

* Shared/APIClientTraits.cpp:
(WebKit):
* Shared/APIClientTraits.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
(WebKit::InjectedBundlePageFormClient::didFocusTextField):
(WebKit):
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
(InjectedBundlePageFormClient):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedNodeChanged):

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

7 years agoUnreviewed gardening.
rafaelw@chromium.org [Thu, 7 Mar 2013 22:01:38 +0000 (22:01 +0000)]
Unreviewed gardening.

* fast/borders/border-fit-expected.txt: Renamed from LayoutTests/platform/chromium/fast/borders/border-fit-expected.txt.
* platform/chromium-mac/fast/borders/border-fit-expected.txt: Renamed from LayoutTests/platform/mac/fast/borders/border-fit-expected.txt.
* platform/chromium-win/fast/borders/border-fit-expected.txt:
* platform/efl/fast/borders/border-fit-expected.txt: Removed.
* platform/gtk/fast/borders/border-fit-expected.txt: Removed.

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

7 years ago[chromium] Stop using WebTransformationMatrix on WebLayer
jamesr@google.com [Thu, 7 Mar 2013 21:53:48 +0000 (21:53 +0000)]
[chromium] Stop using WebTransformationMatrix on WebLayer
https://bugs.webkit.org/show_bug.cgi?id=111635

Reviewed by Adrienne Walker.

Source/Platform:

WebLayer supports setting transforms by using either SkMatrix44 or WebTransformationMatrix,
both of which are wrappers around 16 doubles. There's no need to have both.

* chromium/public/WebLayer.h:
(WebKit):
(WebLayer):

Source/WebCore:

Switches over to the SkMatrix44 transform setters.

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::transformToSkMatrix44):
  Utility for convering a WebCore::TransformationMatrix to an SkMatrix44.
  Will move to a more common location once it gets more callers.
(WebCore::GraphicsLayerChromium::updateTransform):
(WebCore::GraphicsLayerChromium::updateChildrenTransform):

Source/WebKit/chromium:

* src/LinkHighlight.cpp:
(WebKit::LinkHighlight::computeEnclosingCompositingLayer):
* tests/GraphicsLayerChromiumTest.cpp:
(GraphicsLayerChromiumTest):

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

7 years ago[EFL] Bump libsoup dependency to 2.40.3 to fix regressions
ch.dumez@sisa.samsung.com [Thu, 7 Mar 2013 21:50:51 +0000 (21:50 +0000)]
[EFL] Bump libsoup dependency to 2.40.3 to fix regressions
https://bugs.webkit.org/show_bug.cgi?id=111756

Reviewed by Kenneth Rohde Christiansen.

.:

Update libsoup required version to v2.40.3 for EFL port.

* Source/cmake/OptionsEfl.cmake:

Tools:

Bump libsoup to v2.40.3 to fix the regressions introduced by
previous v2.40.0 bump.

* efl/jhbuild.modules:

LayoutTests:

Unskip several tests that are passing after the libsoup dependency
bump to 2.40.3.

* platform/efl/TestExpectations:

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

7 years agoBuild fix for AppleWin VS2010.
roger_fong@apple.com [Thu, 7 Mar 2013 21:40:09 +0000 (21:40 +0000)]
Build fix for AppleWin VS2010.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:

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

7 years agoRe-enable Win EWS tests.
roger_fong@apple.com [Thu, 7 Mar 2013 21:29:30 +0000 (21:29 +0000)]
Re-enable Win EWS tests.

* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(WinEWS):

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

7 years ago[Mac] allow iOS to use CaptionUserPreferencesMac
eric.carlson@apple.com [Thu, 7 Mar 2013 21:27:42 +0000 (21:27 +0000)]
[Mac] allow iOS to use CaptionUserPreferencesMac
https://bugs.webkit.org/show_bug.cgi?id=111770

Reviewed by Dean Jackson.

No new tests, covered by existing tests.

* page/CaptionUserPreferencesMac.h:
* page/CaptionUserPreferencesMac.mm:
(WebCore::userCaptionPreferencesChangedNotificationCallback): Respond to notifications on
    the web thread.

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

7 years agoMove side-effects on hover/active state out of hit-testing
mkwst@chromium.org [Thu, 7 Mar 2013 21:24:18 +0000 (21:24 +0000)]
Move side-effects on hover/active state out of hit-testing
https://bugs.webkit.org/show_bug.cgi?id=98168

Reviewed by Julien Chaffraix.

Original patch by Allan Sandfeld Jensen; I'm just tweaking things.

Document::updateHoverActiveState is currently called during hit testing
to update the hover and active states of elements effected by mouse
movements (or their keyboard equivalents). This conflates the hit test
algorithm itself with side-effects associated with specific use-cases.

This conflation makes it very difficult to reuse the hover/active logic
for things other than hit testing. 'mouseenter'/'mouseleave' events[1]
are one example of a feature that would be simple to implement on top of
this existing logic if we split it out from the hit testing path, and
instead call it explicitly when necessary. An explicit split between
hit testing and its side-effects will also enable us to simplify the
logic in future patches with well-named parameters, rather than relying
on stuffing properties into HitTestRequest.

This patch drops the call to Document::updateHoverActiveState from
RenderView::hitTest, and adjusts the three call-sites in EventHandler
to explicitly call out to it rather than Document::updateStyleIfNeeded.
The latter call is still necessary but has been folded into
updateHoverActiveState, as the former is never called without calling
the latter.

[1]: http://wkbug.com/18930

* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
    First, this function must now only be called from contexts that were
    performing a read/write hit-test: the code asserts this
    precondition.

    Second, rather than accepting a HitTestResult, the function accepts
    an Element* from which to begin the hover/active chain changes.

    Third, we have to explicitly update the hover/active states for
    documents between the updated element and the top-level document.
    The hit-testing logic was taking care of this for us, now we need to
    take care of it ourselves.

    Fourth, call out to updateStyleIfNeeded rather than making our
    caller do so. The calls were always paired; now that's explicit.
(WebCore::Document::prepareMouseEvent):
* page/EventHandler.cpp:
(WebCore::EventHandler::hitTestResultAtPoint):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::hoverTimerFired):
    Call out to updateHoverActiveState rather than updateStyleIfNeeded.
* rendering/RenderView.cpp:
(WebCore::RenderView::hitTest):
    Drop the call to updateHoverActiveState.

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

7 years ago[Chromium] Update some #includes for WebMessagePortChannel.h
pilgrim@chromium.org [Thu, 7 Mar 2013 21:18:53 +0000 (21:18 +0000)]
[Chromium] Update some #includes for WebMessagePortChannel.h
https://bugs.webkit.org/show_bug.cgi?id=111752

Reviewed by James Robinson.

In anticipation of removing
WK/chromium/public/WebMessagePortChannel.h (once all downstream
references have been updated)

* public/WebDOMMessageEvent.h:
* public/WebFrame.h:
* public/WebSharedWorkerClient.h:

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

7 years agoUnreviewed gardening.
rafaelw@chromium.org [Thu, 7 Mar 2013 21:08:21 +0000 (21:08 +0000)]
Unreviewed gardening.

* platform/chromium/compositing/overflow/composited-scrolling-paint-phases-expected.txt: Added.
* platform/chromium/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-paint-phases-expected.txt: Added.
* platform/chromium/platform/chromium/virtual/softwarecompositing/overflow/composited-scrolling-paint-phases-expected.txt: Added.

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

7 years agoUnreviewed, rolling out r145097.
commit-queue@webkit.org [Thu, 7 Mar 2013 20:59:42 +0000 (20:59 +0000)]
Unreviewed, rolling out r145097.
http://trac.webkit.org/changeset/145097
https://bugs.webkit.org/show_bug.cgi?id=111765

Triggers an ASSERT in the Chromium port (Requested by abarth
on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-07

Source/WebCore:

* html/FileInputType.cpp:
(WebCore::FileInputType::appendFormData):
* platform/network/FormData.cpp:
(WebCore::FormData::appendKeyValuePairItems):

LayoutTests:

* http/tests/local/formdata/send-form-data-with-empty-blob-filename-expected.txt: Removed.
* http/tests/local/formdata/send-form-data-with-empty-blob-filename.html: Removed.
* http/tests/local/formdata/send-form-data-with-empty-file-filename-expected.txt: Removed.
* http/tests/local/formdata/send-form-data-with-empty-file-filename.html: Removed.
* http/tests/xmlhttprequest/resources/multipart-post-echo-filenames.php: Removed.
* platform/wk2/TestExpectations:

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

7 years ago[nrwt] handle corrupt http server pid files cleanly
dpranke@chromium.org [Thu, 7 Mar 2013 20:58:57 +0000 (20:58 +0000)]
[nrwt] handle corrupt http server pid files cleanly
https://bugs.webkit.org/show_bug.cgi?id=111628

Reviewed by Eric Seidel.

If the pid file from a previous http server is corrupt for some
reason, NRWT will just raise errors and not clean it up or recover.
This patch fixes that to at least delete the pid file and
not throw; not that we may still have stale http servers left on
the system, since there's no way to know which pid to kill if
the file was corrupted.

* Scripts/webkitpy/layout_tests/servers/http_server_base.py:
(HttpServerBase.start):
(HttpServerBase.stop):
(HttpServerBase._remove_pid_file):
* Scripts/webkitpy/layout_tests/servers/http_server_base_unittest.py: Added.
(TestHttpServerBase):
(TestHttpServerBase.test_corrupt_pid_file):

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

7 years ago[BlackBerry] Prevent text selection inside Colour and Date/Time input fields
mifenton@rim.com [Thu, 7 Mar 2013 20:55:29 +0000 (20:55 +0000)]
[BlackBerry] Prevent text selection inside Colour and Date/Time input fields
https://bugs.webkit.org/show_bug.cgi?id=111733

Reviewed by Rob Buis.

PR 305194.

Prevent selection for popup input fields as they are buttons.

Informally Reviewed Gen Mak.

* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):

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

7 years agoObjective-C API: Need a good way to reference event handlers without causing cycles
mhahnenberg@apple.com [Thu, 7 Mar 2013 20:43:05 +0000 (20:43 +0000)]
Objective-C API: Need a good way to reference event handlers without causing cycles
https://bugs.webkit.org/show_bug.cgi?id=111088

Reviewed by Geoffrey Garen.

JSManagedValue is like a special kind of weak value. When you create a JSManagedValue, you can
supply an Objective-C object as its "owner". As long as the Objective-C owner object remains
alive and its wrapper remains accessible to the JSC garbage collector (e.g. by being marked by
the global object), the reference to the JavaScript value is strong. As soon as the Objective-C
owner is deallocated or its wrapper becomes inaccessible to the garbage collector, the reference
becomes weak.

If you do not supply an owner or you use the weakValueWithValue: convenience class method, the
returned JSManagedValue behaves as a normal weak reference.

This new class allows clients to maintain references to JavaScript values in the Objective-C
heap without creating reference cycles/leaking memory.

* API/JSAPIWrapperObject.cpp: Added.
(JSC):
(JSC::::createStructure):
(JSC::JSAPIWrapperObject::JSAPIWrapperObject): This is a special JSObject for the Objective-C API that knows
for the purposes of garbage collection/marking that it wraps an opaque Objective-C object.
(JSC::JSAPIWrapperObject::visitChildren): We add the pointer to the wrapped Objective-C object to the set of
opaque roots so that the weak handle owner for JSManagedValues can find it later.
* API/JSAPIWrapperObject.h: Added.
(JSC):
(JSAPIWrapperObject):
(JSC::JSAPIWrapperObject::wrappedObject):
(JSC::JSAPIWrapperObject::setWrappedObject):
* API/JSBase.cpp:
(JSSynchronousGarbageCollect):
* API/JSBasePrivate.h:
* API/JSCallbackObject.cpp:
(JSC):
* API/JSCallbackObject.h:
(JSC::JSCallbackObject::destroy): Moved this to the header so that we don't get link errors with JSAPIWrapperObject.
* API/JSContext.mm:
(-[JSContext initWithVirtualMachine:]): We weren't adding manually allocated/initialized JSVirtualMachine objects to
the global cache of virtual machines. The init methods handle this now rather than contextWithGlobalContextRef, since
not everyone is guaranteed to use the latter.
(-[JSContext initWithGlobalContextRef:]):
(+[JSContext contextWithGlobalContextRef:]):
* API/JSManagedValue.h: Added.
* API/JSManagedValue.mm: Added.
(JSManagedValueHandleOwner):
(managedValueHandleOwner):
(+[JSManagedValue weakValueWithValue:]):
(+[JSManagedValue managedValueWithValue:owner:]):
(-[JSManagedValue init]): We explicitly call the ARC entrypoints to initialize/get the weak owner field since we don't
use ARC when building our framework.
(-[JSManagedValue initWithValue:]):
(-[JSManagedValue initWithValue:owner:]):
(-[JSManagedValue dealloc]):
(-[JSManagedValue value]):
(-[JSManagedValue weakOwner]):
(JSManagedValueHandleOwner::isReachableFromOpaqueRoots): If the Objective-C owner is still alive (i.e. loading the weak field
returns non-nil) and that value was added to the set of opaque roots by the wrapper for that Objective-C owner, then the the
JSObject to which the JSManagedObject refers is still alive.
* API/JSObjectRef.cpp: We have to add explicit checks for the JSAPIWrapperObject, just like the other types of JSCallbackObjects.
(JSObjectGetPrivate):
(JSObjectSetPrivate):
(JSObjectGetPrivateProperty):
(JSObjectSetPrivateProperty):
(JSObjectDeletePrivateProperty):
* API/JSValue.mm:
(objectToValueWithoutCopy):
* API/JSValueRef.cpp:
(JSValueIsObjectOfClass):
* API/JSVirtualMachine.mm:
(-[JSVirtualMachine initWithContextGroupRef:]):
(+[JSVirtualMachine virtualMachineWithContextGroupRef:]):
* API/JSWrapperMap.mm:
(wrapperFinalize):
(makeWrapper): This is our own internal version of JSObjectMake which creates JSAPIWrapperObjects, the Obj-C API
version of JSCallbackObjects.
(createObjectWithCustomBrand):
(-[JSObjCClassInfo wrapperForObject:]):
(tryUnwrapObjcObject):
* API/JavaScriptCore.h:
* API/tests/testapi.mm: Added new tests for the strong and weak uses of JSManagedValue in the context of an
onclick handler for an Objective-C object inserted into a JSContext.
(-[TextXYZ setWeakOnclick:]):
(-[TextXYZ setOnclick:]):
(-[TextXYZ weakOnclick]):
(-[TextXYZ onclick]):
(-[TextXYZ click]):
* CMakeLists.txt: Various build system additions.
* GNUmakefile.list.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSGlobalObject.cpp: Added the new canonical Structure for the JSAPIWrapperObject class.
(JSC::JSGlobalObject::reset):
(JSC):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSGlobalObject):
(JSC::JSGlobalObject::objcWrapperObjectStructure):

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

7 years agoImage rebaselines after r145104.
ojan@chromium.org [Thu, 7 Mar 2013 20:08:31 +0000 (20:08 +0000)]
Image rebaselines after r145104.

* platform/chromium-mac/fast/table/border-collapsing/cached-change-row-border-width-expected.png:
* platform/chromium-mac/fast/table/border-collapsing/cached-change-tbody-border-width-expected.png:

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

7 years agoAX: Can't activate links with VoiceOver in Safari
cfleizach@apple.com [Thu, 7 Mar 2013 20:04:22 +0000 (20:04 +0000)]
AX: Can't activate links with VoiceOver in Safari
https://bugs.webkit.org/show_bug.cgi?id=111755

Reviewed by Tim Horton.

Source/WebCore:

VoiceOver is relying on the press action being the first action in the list. We changed
that order inadvertently recently, which confuses VoiceOver.

Test: platform/mac/accessibility/press-action-is-first.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityActionNames]):

Tools:

* DumpRenderTree/AccessibilityUIElement.cpp:
(supportedActionsCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
(AccessibilityUIElement):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::supportedActions):

LayoutTests:

* platform/mac/accessibility/press-action-is-first-expected.txt: Added.
* platform/mac/accessibility/press-action-is-first.html: Added.

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

7 years agoUnreviewed, rolling out r145083.
rafaelw@chromium.org [Thu, 7 Mar 2013 20:03:45 +0000 (20:03 +0000)]
Unreviewed, rolling out r145083.
http://trac.webkit.org/changeset/145083
https://bugs.webkit.org/show_bug.cgi?id=110733

caused lots crashes in http/tests/security/xssAuditor/* tests

Source/WebCore:

* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::XSSAuditor):
(WebCore::XSSAuditor::init):
(WebCore::XSSAuditor::filterToken):
* html/parser/XSSAuditor.h:
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::didBlockScript):
* html/parser/XSSAuditorDelegate.h:
(WebCore::XSSInfo::create):
(XSSInfo):
(WebCore::XSSInfo::XSSInfo):

LayoutTests:

* fast/frames/xss-auditor-handles-file-urls-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-allow-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-allow-filter-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-allow-invalid-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-filter-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-invalid-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-unset-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-filter-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-filter-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-filter-filter-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-filter-invalid-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-filter-unset-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-invalid-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-invalid-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-invalid-filter-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-invalid-invalid-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-invalid-unset-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-unset-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-unset-filter-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-unset-invalid-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-unset-unset-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-empty-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-filter-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-invalid-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-null-char-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location-javascript-URL-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location2-expected.txt:
* http/tests/security/xssAuditor/base-href-control-char-expected.txt:
* http/tests/security/xssAuditor/base-href-expected.txt:
* http/tests/security/xssAuditor/base-href-null-char-expected.txt:
* http/tests/security/xssAuditor/base-href-scheme-relative-expected.txt:
* http/tests/security/xssAuditor/block-does-not-leak-location-expected.txt:
* http/tests/security/xssAuditor/block-does-not-leak-referrer-expected.txt:
* http/tests/security/xssAuditor/cached-frame-expected.txt:
* http/tests/security/xssAuditor/cookie-injection-expected.txt:
* http/tests/security/xssAuditor/dom-write-URL-expected.txt:
* http/tests/security/xssAuditor/dom-write-location-expected.txt:
* http/tests/security/xssAuditor/dom-write-location-inline-event-expected.txt:
* http/tests/security/xssAuditor/dom-write-location-javascript-URL-expected.txt:
* http/tests/security/xssAuditor/embed-tag-code-attribute-2-expected.txt:
* http/tests/security/xssAuditor/embed-tag-code-attribute-expected.txt:
* http/tests/security/xssAuditor/embed-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/embed-tag-expected.txt:
* http/tests/security/xssAuditor/embed-tag-javascript-url-expected.txt:
* http/tests/security/xssAuditor/embed-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/form-action-expected.txt:
* http/tests/security/xssAuditor/formaction-on-button-expected.txt:
* http/tests/security/xssAuditor/formaction-on-input-expected.txt:
* http/tests/security/xssAuditor/full-block-base-href-expected.txt:
* http/tests/security/xssAuditor/full-block-get-from-iframe-expected.txt:
* http/tests/security/xssAuditor/full-block-iframe-javascript-url-expected.txt:
* http/tests/security/xssAuditor/full-block-iframe-no-inherit-expected.txt:
* http/tests/security/xssAuditor/full-block-javascript-link-expected.txt:
* http/tests/security/xssAuditor/full-block-link-onclick-expected.txt:
* http/tests/security/xssAuditor/full-block-object-tag-expected.txt:
* http/tests/security/xssAuditor/full-block-post-from-iframe-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-cross-domain-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-with-source-expected.txt:
* http/tests/security/xssAuditor/get-from-iframe-expected.txt:
* http/tests/security/xssAuditor/iframe-injection-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-more-encoding-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode2-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode3-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-url-encoded-expected.txt:
* http/tests/security/xssAuditor/iframe-onload-GBK-char-expected.txt:
* http/tests/security/xssAuditor/iframe-onload-in-svg-tag-expected.txt:
* http/tests/security/xssAuditor/iframe-srcdoc-expected.txt:
* http/tests/security/xssAuditor/img-onerror-GBK-char-expected.txt:
* http/tests/security/xssAuditor/img-onerror-accented-char-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char-default-encoding-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char2-default-encoding-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char2-expected.txt:
* http/tests/security/xssAuditor/inline-event-HTML-entities-expected.txt:
* http/tests/security/xssAuditor/javascript-link-HTML-entities-control-char-expected.txt:
* http/tests/security/xssAuditor/javascript-link-HTML-entities-expected.txt:
* http/tests/security/xssAuditor/javascript-link-HTML-entities-named-expected.txt:
* http/tests/security/xssAuditor/javascript-link-HTML-entities-null-char-expected.txt:
* http/tests/security/xssAuditor/javascript-link-ampersand-expected.txt:
* http/tests/security/xssAuditor/javascript-link-control-char-expected.txt:
* http/tests/security/xssAuditor/javascript-link-expected.txt:
* http/tests/security/xssAuditor/javascript-link-null-char-expected.txt:
* http/tests/security/xssAuditor/javascript-link-one-plus-one-expected.txt:
* http/tests/security/xssAuditor/javascript-link-url-encoded-expected.txt:
* http/tests/security/xssAuditor/link-onclick-ampersand-expected.txt:
* http/tests/security/xssAuditor/link-onclick-control-char-expected.txt:
* http/tests/security/xssAuditor/link-onclick-entities-expected.txt:
* http/tests/security/xssAuditor/link-onclick-expected.txt:
* http/tests/security/xssAuditor/link-onclick-null-char-expected.txt:
* http/tests/security/xssAuditor/link-opens-new-window-expected.txt:
* http/tests/security/xssAuditor/malformed-HTML-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-1-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-2-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-3-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-4-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-5-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-6-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-7-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-8-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-9-expected.txt:
* http/tests/security/xssAuditor/meta-tag-http-refresh-javascript-url-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/object-tag-expected.txt:
* http/tests/security/xssAuditor/object-tag-javascript-url-expected.txt:
* http/tests/security/xssAuditor/open-attribute-body-expected.txt:
* http/tests/security/xssAuditor/open-event-handler-iframe-expected.txt:
* http/tests/security/xssAuditor/open-iframe-src-01-expected.txt:
* http/tests/security/xssAuditor/open-iframe-src-02-expected.txt:
* http/tests/security/xssAuditor/open-iframe-src-03-expected.txt:
* http/tests/security/xssAuditor/open-script-src-01-expected.txt:
* http/tests/security/xssAuditor/open-script-src-02-expected.txt:
* http/tests/security/xssAuditor/open-script-src-03-expected.txt:
* http/tests/security/xssAuditor/open-script-src-04-expected.txt:
* http/tests/security/xssAuditor/post-from-iframe-expected.txt:
* http/tests/security/xssAuditor/property-escape-comment-01-expected.txt:
* http/tests/security/xssAuditor/property-escape-comment-02-expected.txt:
* http/tests/security/xssAuditor/property-escape-comment-03-expected.txt:
* http/tests/security/xssAuditor/property-escape-entity-01-expected.txt:
* http/tests/security/xssAuditor/property-escape-entity-02-expected.txt:
* http/tests/security/xssAuditor/property-escape-entity-03-expected.txt:
* http/tests/security/xssAuditor/property-escape-expected.txt:
* http/tests/security/xssAuditor/property-escape-long-expected.txt:
* http/tests/security/xssAuditor/property-escape-quote-01-expected.txt:
* http/tests/security/xssAuditor/property-escape-quote-02-expected.txt:
* http/tests/security/xssAuditor/property-escape-quote-03-expected.txt:
* http/tests/security/xssAuditor/report-script-tag-expected.txt:
* http/tests/security/xssAuditor/report-script-tag-full-block-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode-16bit-unicode-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char2-expected.txt:
* http/tests/security/xssAuditor/script-tag-addslashes-backslash-expected.txt:
* http/tests/security/xssAuditor/script-tag-addslashes-double-quote-expected.txt:
* http/tests/security/xssAuditor/script-tag-addslashes-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-addslashes-single-quote-expected.txt:
* http/tests/security/xssAuditor/script-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-convoluted-expected.txt:
* http/tests/security/xssAuditor/script-tag-entities-expected.txt:
* http/tests/security/xssAuditor/script-tag-expected.txt:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag-expected.txt:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag2-expected.txt:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag3-expected.txt:
* http/tests/security/xssAuditor/script-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-open-redirect-expected.txt:
* http/tests/security/xssAuditor/script-tag-post-control-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-post-expected.txt:
* http/tests/security/xssAuditor/script-tag-post-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-redirect-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode2-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode3-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode4-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode5-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-actual-comma-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-callbacks-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-comma-01-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-comma-02-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-fancy-unicode-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-invalid-closing-tag-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-invalid-url-encoding-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-control-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-data-url-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-data-url2-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-data-url3-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-double-quote-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-entities-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-no-quote-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-relative-scheme-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-01-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-02-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-03-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment-U2028-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment2-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment3-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment4-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment5-expected.txt:
* http/tests/security/xssAuditor/svg-animate-expected.txt:
* http/tests/security/xssAuditor/svg-script-tag-expected.txt:
* http/tests/security/xssAuditor/xss-filter-bypass-big5-expected.txt:
* http/tests/security/xssAuditor/xss-filter-bypass-long-string-expected.txt:
* http/tests/security/xssAuditor/xss-filter-bypass-sjis-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-01-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-02-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-03-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-04-expected.txt:
* platform/chromium/http/tests/security/xssAuditor/javascript-link-control-char2-expected.txt:

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

7 years ago[CSS Shaders] Implement hue and saturation non-separable blend modes
michelangelo@webkit.org [Thu, 7 Mar 2013 20:00:48 +0000 (20:00 +0000)]
[CSS Shaders] Implement hue and saturation non-separable blend modes
https://bugs.webkit.org/show_bug.cgi?id=109464

Source/WebCore:

Added the following GLSL helper functions to the CustomFilterValidatedProgram:

    - css_Sat(C): returns the saturation for the color C
    - css_SetSat(C, s): sets the saturation s on the color C
    - css_SetSatHelper(Cmin, Cmid, Cmax, s): helper function for css_SetSat

The above functions are being used for the "hue" and "saturation" non-separable
blend modes, the relevant spec for such modes is at URL:
https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blendingnonseparable

Reviewed by Dean Jackson.

Tests: css3/filters/custom/custom-filter-nonseparable-blend-mode-hue.html
       css3/filters/custom/custom-filter-nonseparable-blend-mode-saturation.html

* platform/graphics/filters/CustomFilterValidatedProgram.cpp:
(WebCore::CustomFilterValidatedProgram::blendFunctionString):

LayoutTests:

Added relevant tests for the "hue" and "saturation" non-separable blend modes.
These tests are currently skipped on Mac due to a slight color difference; please see relevant bug: http://webkit.org/b/107487.

Reviewed by Dean Jackson.

* css3/filters/custom/custom-filter-nonseparable-blend-mode-hue-expected.html: Added.
* css3/filters/custom/custom-filter-nonseparable-blend-mode-hue.html: Added.
* css3/filters/custom/custom-filter-nonseparable-blend-mode-saturation-expected.html: Added.
* css3/filters/custom/custom-filter-nonseparable-blend-mode-saturation.html: Added.
* platform/mac/TestExpectations:

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

7 years agoUnreviewed gardening.
rafaelw@chromium.org [Thu, 7 Mar 2013 19:53:34 +0000 (19:53 +0000)]
Unreviewed gardening.

* platform/chromium-mac/fast/borders/border-radius-with-box-shadow-01-expected.png: Added.
* platform/chromium-win/fast/borders/border-radius-with-box-shadow-01-expected.png: Added.

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

7 years agoIndexedDB: Make test behavior deterministic in multiprocess ports
jsbell@chromium.org [Thu, 7 Mar 2013 19:40:36 +0000 (19:40 +0000)]
IndexedDB: Make test behavior deterministic in multiprocess ports
https://bugs.webkit.org/show_bug.cgi?id=111643

Reviewed by Tony Chang.

Root cause is documented in wkbug.com/111642 but as a stop-gap - ensure
that this test doesn't fail flakily in multiprocess ports by moving the
last part of the test out of a limbo zone.

* storage/indexeddb/resources/index-multientry.js: Run subsequent part of
test in open's "success" handler rather than transaction's "complete" handler.

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

7 years agoWindows debug layout tests are crashing like crazy again.
roger_fong@apple.com [Thu, 7 Mar 2013 19:20:27 +0000 (19:20 +0000)]
Windows debug layout tests are crashing like crazy again.
Disable tests on Win EWS bots temporarily.

* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(WinEWS):

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

7 years ago[Chromium] Remove WK/chromium/public/WebStorageArea.h
pilgrim@chromium.org [Thu, 7 Mar 2013 19:18:05 +0000 (19:18 +0000)]
[Chromium] Remove WK/chromium/public/WebStorageArea.h
https://bugs.webkit.org/show_bug.cgi?id=111744

Reviewed by James Robinson.

File moved to new Platform/ directory. All references have already
been updated (including downstream).

* public/WebStorageArea.h: Removed.

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

7 years ago[Chromium] Update some #includes for WebFileInfo.h in WK/chromium/src/
pilgrim@chromium.org [Thu, 7 Mar 2013 19:13:39 +0000 (19:13 +0000)]
[Chromium] Update some #includes for WebFileInfo.h in WK/chromium/src/
https://bugs.webkit.org/show_bug.cgi?id=111741

Reviewed by James Robinson.

In preparation for removing WK/chromium/public/WebFileInfo.h.

* src/AssertMatchingEnums.cpp:

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

7 years agoMake EWS bots build and test in release.
roger_fong@apple.com [Thu, 7 Mar 2013 19:07:20 +0000 (19:07 +0000)]
Make EWS bots build and test in release.

* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(WinEWS):
* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests.run):

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

7 years agoWeb Inspector: [ACE] set correct font
commit-queue@webkit.org [Thu, 7 Mar 2013 19:03:38 +0000 (19:03 +0000)]
Web Inspector: [ACE] set correct font
https://bugs.webkit.org/show_bug.cgi?id=111747

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-07
Reviewed by Pavel Feldman.

No new tests.

Set class "source-code" for the ace editor element.

* inspector/front-end/AceTextEditor.js:
(WebInspector.AceTextEditor):

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

7 years agoRecalculate borders at the beginning of table layout
ojan@chromium.org [Thu, 7 Mar 2013 18:59:41 +0000 (18:59 +0000)]
Recalculate borders at the beginning of table layout
https://bugs.webkit.org/show_bug.cgi?id=111634

Reviewed by Julien Chaffraix.

Source/WebCore:

Doing it in convertStyleLogicalWidthToComputedWidth missed some dynamic
relayout cases. I confirmed that the new results match the results we
would get if we set the border width initially instead of dynamically.

* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
(WebCore::RenderTable::layout):

LayoutTests:

* fast/table/border-collapsing/cached-change-row-border-width-expected.png:
* fast/table/border-collapsing/cached-change-row-border-width-expected.txt:
* fast/table/border-collapsing/cached-change-tbody-border-width-expected.png:
* fast/table/border-collapsing/cached-change-tbody-border-width-expected.txt:

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

7 years agoUnreviewed gardening.
rafaelw@chromium.org [Thu, 7 Mar 2013 18:57:19 +0000 (18:57 +0000)]
Unreviewed gardening.

* platform/chromium/TestExpectations: http/tests/css/shared-stylesheet-mutation-preconstruct.html

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

7 years ago[Chromium] Remove WK/chromium/public/WebWorkerRunLoop.h
pilgrim@chromium.org [Thu, 7 Mar 2013 18:47:11 +0000 (18:47 +0000)]
[Chromium] Remove WK/chromium/public/WebWorkerRunLoop.h
https://bugs.webkit.org/show_bug.cgi?id=111740

Reviewed by James Robinson.

No longer needed; all references have been updated to new version
in top-level Platform/ directory.

* public/WebWorkerRunLoop.h: Removed.

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

7 years agoUnreviewed. Rolled Chromium DEPS to r186592. Requested by
commit-queue@webkit.org [Thu, 7 Mar 2013 18:45:21 +0000 (18:45 +0000)]
Unreviewed.  Rolled Chromium DEPS to r186592.  Requested by
"Dana Jansens" <danakj@chromium.org> via sheriffbot.

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-07

* DEPS:

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

7 years agoSource/WebCore: border-fit-adjust should happen at layout time rather than paint...
hyatt@apple.com [Thu, 7 Mar 2013 18:41:16 +0000 (18:41 +0000)]
Source/WebCore: border-fit-adjust should happen at layout time rather than paint time
https://bugs.webkit.org/show_bug.cgi?id=111606
<rdar://problem/13101714>

Reviewed by Antti Koivisto.

In order for border-fit-adjust to be accurate in more cases, it needs
to be a layout-time adjustment rather than a paint-time adjustment.
Specifically there are cases where an LTR adjusted box was right-aligned
by its container, and without genuinely shrinking the size of the box,
we end up chopping off the right edge but not shifting the box to the
right to compensate.

This patch changes border-fit-adjust to now do the adjustment using
the override width mechanism and a second layout pass instead of just
hacking painting.

Test: fast/block/border-fit-with-right-alignment.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
Calls fitBorderToLinesIfNeeded at the end of layout to do a second
layout pass if the adjustment needs to be made.

(WebCore::RenderBlock::fitBorderToLinesIfNeeded):
Renamed borderFitAdjust to fitBorderToLinesIfNeeded and made it
non-virtual, since it's no longer called from RenderBox code. Changed it
to do a relayout using override widths if an adjustment is needed.

* rendering/RenderBlock.h:
(RenderBlock):
Renamed borderFitAdjust to fitBorderToLinesIfNeeded and made it
non-virtual.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::paintMask):
Removed the paint-time border-fit adjustment.

(WebCore::RenderBox::computeLogicalWidthInRegion):
Use the override width when border-fit is set to lines.

* rendering/RenderBox.h:
(RenderBox):
Remove the virtual borderFitAdjust method.

LayoutTests: border-fit should happen at layout time rather than paint time
https://bugs.webkit.org/show_bug.cgi?id=111606
<rdar://problem/13101714>

Reviewed by Antti Koivisto.

* fast/block/border-fit-with-right-alignment-expected.html: Added.
* fast/block/border-fit-with-right-alignment.html: Added.

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

7 years ago[Chromium] Update some #includes for WebVideoFrame.h
pilgrim@chromium.org [Thu, 7 Mar 2013 18:37:33 +0000 (18:37 +0000)]
[Chromium] Update some #includes for WebVideoFrame.h
https://bugs.webkit.org/show_bug.cgi?id=111739

Reviewed by James Robinson.

In anticipation of removing WebVideoFrame.h from WK/chromium/public/.

* public/WebMediaPlayer.h:

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

7 years agoREGRESSION(r143727): Clicking / selecting inside an <embed> is broken
allan.jensen@digia.com [Thu, 7 Mar 2013 18:35:02 +0000 (18:35 +0000)]
REGRESSION(r143727): Clicking / selecting inside an <embed> is broken
https://bugs.webkit.org/show_bug.cgi?id=111217

Reviewed by Julien Chaffraix.

Source/WebCore:

Hit-testing into child frames need to happen in RenderPart, otherwise
we will miss frame views in <embed> and <object> elements.

Test: fast/dom/nodesFromRect/nodesFromRect-embedded-frame-content.html

* rendering/RenderFrameBase.cpp:
* rendering/RenderFrameBase.h:
(RenderFrameBase):
* rendering/RenderPart.cpp:
(WebCore::RenderPart::nodeAtPoint):
* rendering/RenderPart.h:
(RenderPart):

LayoutTests:

Test rect and point based hit-testing inside embed and object child frames.

* fast/dom/nodesFromRect/nodesFromRect-embedded-frame-content-expected.txt: Added.
* fast/dom/nodesFromRect/nodesFromRect-embedded-frame-content.html: Added.
* fast/dom/nodesFromRect/resources/nodesFromRect.js:
(checkPoint):

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

7 years ago FormData should allow setting filename to empty
ap@apple.com [Thu, 7 Mar 2013 18:25:10 +0000 (18:25 +0000)]
    FormData should allow setting filename to empty
        https://bugs.webkit.org/show_bug.cgi?id=111687

        Reviewed by Brady Eidson.

        Tests: http/tests/local/formdata/send-form-data-with-empty-blob-filename.html
               http/tests/local/formdata/send-form-data-with-empty-file-filename.html

        * html/FileInputType.cpp: (WebCore::FileInputType::appendFormData):
        Use a Blob for empty file input, not a hacky File with empty path.

        * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems):
        Missing value is a null string. If the string is empty, we should treat is as
        authoritative.

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

7 years agoNull-check the page overlay before trying to use it.
timothy_horton@apple.com [Thu, 7 Mar 2013 18:23:47 +0000 (18:23 +0000)]
Null-check the page overlay before trying to use it.

Reviewed by Simon Fraser.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::scroll):

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

7 years agoinspector/debugger/debugger-expand-scope.html sometimes fails on Apple MountainLion...
dino@apple.com [Thu, 7 Mar 2013 18:17:59 +0000 (18:17 +0000)]
inspector/debugger/debugger-expand-scope.html sometimes fails on Apple MountainLion Release WK1 (Tests)
https://bugs.webkit.org/show_bug.cgi?id=111754

Skipping this test so that Mac EWS can catch up.

* platform/mac/TestExpectations:

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

7 years agoWeb Inspector: [CodeMirror] dublicated horizontal scroll
commit-queue@webkit.org [Thu, 7 Mar 2013 18:12:42 +0000 (18:12 +0000)]
Web Inspector: [CodeMirror] dublicated horizontal scroll
https://bugs.webkit.org/show_bug.cgi?id=111712

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-07
Reviewed by Pavel Feldman.

Set a box-sizing css property on all codemirror elements to
"content-box".

No new tests.

* inspector/front-end/cm/cmdevtools.css:
(.CodeMirror *):

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

7 years agoChromium, mac-wk2 and mac need new baselines after fixing paint phases for composited...
dino@apple.com [Thu, 7 Mar 2013 18:03:27 +0000 (18:03 +0000)]
Chromium, mac-wk2 and mac need new baselines after fixing paint phases for composited scrolling.
https://bugs.webkit.org/show_bug.cgi?id=107952

New baseline for Mac.

* platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:

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

7 years ago[chromium] Remove WebView's sharedGraphicsContext3D method.
danakj@chromium.org [Thu, 7 Mar 2013 17:58:35 +0000 (17:58 +0000)]
[chromium] Remove WebView's sharedGraphicsContext3D method.
https://bugs.webkit.org/show_bug.cgi?id=111499

Reviewed by James Robinson.

* public/WebView.h:
(WebView):
* src/WebViewImpl.cpp:
* src/WebViewImpl.h:
(WebViewImpl):

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

7 years agoRemove GC code duplication in http/tests LayoutTests.
acolwell@chromium.org [Thu, 7 Mar 2013 17:39:43 +0000 (17:39 +0000)]
Remove GC code duplication in http/tests LayoutTests.
https://bugs.webkit.org/show_bug.cgi?id=111589

Reviewed by Kentaro Hara, Alexey Proskuryakov.

Replaced duplicated GC logic in various tests with a function call to the implementation
in /js-test-resources/js-test-pre.js

* http/tests/appcache/destroyed-frame.html:
* http/tests/media/media-source/video-media-source-sourcebufferlist-crash.html:
* http/tests/misc/async-script.html:
* http/tests/misc/embed-image-load-outlives-gc-without-crashing.html:
* http/tests/misc/image-input-type-outlives-gc-without-crashing.html:
* http/tests/misc/image-load-outlives-gc-without-crashing.html:
* http/tests/misc/javascript-url-stop-loaders.html:
* http/tests/misc/object-image-load-outlives-gc-without-crashing.html:
* http/tests/misc/svg-image-load-outlives-gc-without-crashing.html:
* http/tests/misc/video-poster-image-load-outlives-gc-without-crashing.html:
* http/tests/security/detached-sandboxed-frame-access.html:
* http/tests/websocket/tests/hybi/websocket-pending-activity.html:
* http/tests/xmlhttprequest/event-listener-gc.html:

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

7 years agoWeb Inspector: Styles sidebar pane toolbar disappears in horizontal split mode.
vsevik@chromium.org [Thu, 7 Mar 2013 17:15:12 +0000 (17:15 +0000)]
Web Inspector: Styles sidebar pane toolbar disappears in horizontal split mode.
https://bugs.webkit.org/show_bug.cgi?id=111735

Reviewed by Pavel Feldman.

* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype._splitVertically):
* inspector/front-end/elementsPanel.css:
(.sidebar-pane.composite .metrics-and-computed .sidebar-pane-toolbar):

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

7 years ago[Qt] QWebSettings::clearMemoryCaches should clear JS garbage
commit-queue@webkit.org [Thu, 7 Mar 2013 17:11:57 +0000 (17:11 +0000)]
[Qt] QWebSettings::clearMemoryCaches should clear JS garbage
https://bugs.webkit.org/show_bug.cgi?id=111094

Patch by Arunprasad Rajkumar <arunprasadr@nds.com> on 2013-03-07
Reviewed by Jocelyn Turcotte.

* Api/qwebsettings.cpp:
(QWebSettings::clearMemoryCaches):

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

7 years ago[GTK] Limit the supported compilers to GCC >= 4.7 and Clang >= 3.0
zandobersek@gmail.com [Thu, 7 Mar 2013 16:58:23 +0000 (16:58 +0000)]
[GTK] Limit the supported compilers to GCC >= 4.7 and Clang >= 3.0
https://bugs.webkit.org/show_bug.cgi?id=109932

Patch by Zan Dobersek <zdobersek@igalia.com> on 2013-03-07
Reviewed by Martin Robinson.

.:

* Source/autotools/CheckSystemAndBasicDependencies.m4: Strictly check for one of the two compilers.
* Source/autotools/SetupCompilerFlags.m4: Set up C++11-specific compiler flags. Force the C99 standard for the C code.
Use the -Qunused-arguments flag when using Clang, it reduces irrelevant errors when using ccache.

Source/WebCore:

* GNUmakefile.am: Replace references to SYMBOL_VISIBILITY_INLINES and SYMBOL_VISIBILITY variables with the actual flags.
They are now available by default due to the limited set of supported compilers.
* bindings/gobject/GNUmakefile.am: Ditto.

Source/WebKit/gtk:

* GNUmakefile.am: Replace references to SYMBOL_VISIBILITY_INLINES and SYMBOL_VISIBILITY variables with the actual flags.
They are now available by default due to the limited set of supported compilers.

Source/WebKit2:

* GNUmakefile.am: Replace references to SYMBOL_VISIBILITY_INLINES and SYMBOL_VISIBILITY variables with the actual flags.
They are now available by default due to the limited set of supported compilers.

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

7 years agoXSSAuditor should send only one console error when blocking a page.
mkwst@chromium.org [Thu, 7 Mar 2013 16:39:46 +0000 (16:39 +0000)]
XSSAuditor should send only one console error when blocking a page.
https://bugs.webkit.org/show_bug.cgi?id=110733

Reviewed by Daniel Bates.

Source/WebCore:

Currently, we send two console errors when XSSAuditor blocks a page:
"Refused to execute a JavaScript script. Source code of script found
within request.\n", and "Entire page will be blocked.".

We should only send one message, tuning it properly for the context, and
including the URL of the page effected by the XSSAuditor's work.

Covered by rebaselines of all the XSSAuditor and 'reflected-xss' tests.

* html/parser/XSSAuditor.cpp:
* html/parser/XSSAuditor.h:
(WebCore::XSSAuditor::XSSAuditor):
    Add two booleans to track the headers used to set the XSSAuditor state.
(WebCore::XSSAuditor::init):
    Save a copy of the document's URL even if we're not generating a
    report upon violation: we'll need it for the console messages. Also
    populate the didSendValidXXXHeader booleans for use later.
(WebCore::XSSAuditor::filterToken):
    Add detail about the header status to the constructed XSSInfo object.
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::buildConsoleError):
    Move message construction out into a separate inlined function, as
    it's becoming complex.
(WebCore::XSSAuditorDelegate::didBlockScript):
    Fold the "Entire page will be blocked" message into the main console
    error.
* html/parser/XSSAuditorDelegate.h:
(WebCore::XSSInfo::create):
(WebCore::XSSInfo::XSSInfo):
    Add detail about header status to XSSInfo in order to correctly
    construct the console error.

LayoutTests:

* fast/frames/xss-auditor-handles-file-urls-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-allow-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-allow-filter-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-allow-invalid-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-filter-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-invalid-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-unset-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-filter-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-filter-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-filter-filter-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-filter-invalid-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-filter-unset-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-invalid-allow-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-invalid-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-invalid-filter-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-invalid-invalid-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-invalid-unset-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-unset-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-unset-filter-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-unset-invalid-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-unset-unset-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-block-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-empty-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-filter-expected.txt:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-invalid-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location-inline-event-null-char-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location-javascript-URL-expected.txt:
* http/tests/security/xssAuditor/anchor-url-dom-write-location2-expected.txt:
* http/tests/security/xssAuditor/base-href-control-char-expected.txt:
* http/tests/security/xssAuditor/base-href-expected.txt:
* http/tests/security/xssAuditor/base-href-null-char-expected.txt:
* http/tests/security/xssAuditor/base-href-scheme-relative-expected.txt:
* http/tests/security/xssAuditor/block-does-not-leak-location-expected.txt:
* http/tests/security/xssAuditor/block-does-not-leak-referrer-expected.txt:
* http/tests/security/xssAuditor/cached-frame-expected.txt:
* http/tests/security/xssAuditor/cookie-injection-expected.txt:
* http/tests/security/xssAuditor/dom-write-URL-expected.txt:
* http/tests/security/xssAuditor/dom-write-location-expected.txt:
* http/tests/security/xssAuditor/dom-write-location-inline-event-expected.txt:
* http/tests/security/xssAuditor/dom-write-location-javascript-URL-expected.txt:
* http/tests/security/xssAuditor/embed-tag-code-attribute-2-expected.txt:
* http/tests/security/xssAuditor/embed-tag-code-attribute-expected.txt:
* http/tests/security/xssAuditor/embed-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/embed-tag-expected.txt:
* http/tests/security/xssAuditor/embed-tag-javascript-url-expected.txt:
* http/tests/security/xssAuditor/embed-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/formaction-on-button-expected.txt:
* http/tests/security/xssAuditor/formaction-on-input-expected.txt:
* http/tests/security/xssAuditor/form-action-expected.txt:
* http/tests/security/xssAuditor/full-block-base-href-expected.txt:
* http/tests/security/xssAuditor/full-block-get-from-iframe-expected.txt:
* http/tests/security/xssAuditor/full-block-iframe-javascript-url-expected.txt:
* http/tests/security/xssAuditor/full-block-iframe-no-inherit-expected.txt:
* http/tests/security/xssAuditor/full-block-javascript-link-expected.txt:
* http/tests/security/xssAuditor/full-block-link-onclick-expected.txt:
* http/tests/security/xssAuditor/full-block-object-tag-expected.txt:
* http/tests/security/xssAuditor/full-block-post-from-iframe-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-cross-domain-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-with-source-expected.txt:
* http/tests/security/xssAuditor/get-from-iframe-expected.txt:
* http/tests/security/xssAuditor/iframe-injection-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-more-encoding-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode2-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode3-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-url-encoded-expected.txt:
* http/tests/security/xssAuditor/iframe-onload-GBK-char-expected.txt:
* http/tests/security/xssAuditor/iframe-onload-in-svg-tag-expected.txt:
* http/tests/security/xssAuditor/iframe-srcdoc-expected.txt:
* http/tests/security/xssAuditor/img-onerror-GBK-char-expected.txt:
* http/tests/security/xssAuditor/img-onerror-accented-char-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char-default-encoding-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char2-default-encoding-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char2-expected.txt:
* http/tests/security/xssAuditor/inline-event-HTML-entities-expected.txt:
* http/tests/security/xssAuditor/javascript-link-HTML-entities-control-char-expected.txt:
* http/tests/security/xssAuditor/javascript-link-HTML-entities-expected.txt:
* http/tests/security/xssAuditor/javascript-link-HTML-entities-named-expected.txt:
* http/tests/security/xssAuditor/javascript-link-HTML-entities-null-char-expected.txt:
* http/tests/security/xssAuditor/javascript-link-ampersand-expected.txt:
* http/tests/security/xssAuditor/javascript-link-control-char-expected.txt:
* http/tests/security/xssAuditor/javascript-link-expected.txt:
* http/tests/security/xssAuditor/javascript-link-null-char-expected.txt:
* http/tests/security/xssAuditor/javascript-link-one-plus-one-expected.txt:
* http/tests/security/xssAuditor/javascript-link-url-encoded-expected.txt:
* http/tests/security/xssAuditor/link-onclick-ampersand-expected.txt:
* http/tests/security/xssAuditor/link-onclick-control-char-expected.txt:
* http/tests/security/xssAuditor/link-onclick-entities-expected.txt:
* http/tests/security/xssAuditor/link-onclick-expected.txt:
* http/tests/security/xssAuditor/link-onclick-null-char-expected.txt:
* http/tests/security/xssAuditor/link-opens-new-window-expected.txt:
* http/tests/security/xssAuditor/malformed-HTML-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-1-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-2-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-3-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-4-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-5-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-6-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-7-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-8-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-9-expected.txt:
* http/tests/security/xssAuditor/meta-tag-http-refresh-javascript-url-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/object-tag-expected.txt:
* http/tests/security/xssAuditor/object-tag-javascript-url-expected.txt:
* http/tests/security/xssAuditor/open-attribute-body-expected.txt:
* http/tests/security/xssAuditor/open-event-handler-iframe-expected.txt:
* http/tests/security/xssAuditor/open-iframe-src-01-expected.txt:
* http/tests/security/xssAuditor/open-iframe-src-02-expected.txt:
* http/tests/security/xssAuditor/open-script-src-01-expected.txt:
* http/tests/security/xssAuditor/open-script-src-02-expected.txt:
* http/tests/security/xssAuditor/open-script-src-03-expected.txt:
* http/tests/security/xssAuditor/open-script-src-04-expected.txt:
* http/tests/security/xssAuditor/post-from-iframe-expected.txt:
* http/tests/security/xssAuditor/property-escape-comment-01-expected.txt:
* http/tests/security/xssAuditor/property-escape-comment-02-expected.txt:
* http/tests/security/xssAuditor/property-escape-comment-03-expected.txt:
* http/tests/security/xssAuditor/property-escape-entity-01-expected.txt:
* http/tests/security/xssAuditor/property-escape-entity-02-expected.txt:
* http/tests/security/xssAuditor/property-escape-entity-03-expected.txt:
* http/tests/security/xssAuditor/property-escape-expected.txt:
* http/tests/security/xssAuditor/property-escape-long-expected.txt:
* http/tests/security/xssAuditor/property-escape-quote-01-expected.txt:
* http/tests/security/xssAuditor/property-escape-quote-02-expected.txt:
* http/tests/security/xssAuditor/property-escape-quote-03-expected.txt:
* http/tests/security/xssAuditor/report-script-tag-expected.txt:
* http/tests/security/xssAuditor/report-script-tag-full-block-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode-16bit-unicode-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char2-expected.txt:
* http/tests/security/xssAuditor/script-tag-addslashes-backslash-expected.txt:
* http/tests/security/xssAuditor/script-tag-addslashes-double-quote-expected.txt:
* http/tests/security/xssAuditor/script-tag-addslashes-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-addslashes-single-quote-expected.txt:
* http/tests/security/xssAuditor/script-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-convoluted-expected.txt:
* http/tests/security/xssAuditor/script-tag-entities-expected.txt:
* http/tests/security/xssAuditor/script-tag-expected.txt:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag-expected.txt:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag2-expected.txt:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag3-expected.txt:
* http/tests/security/xssAuditor/script-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-open-redirect-expected.txt:
* http/tests/security/xssAuditor/script-tag-post-control-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-post-expected.txt:
* http/tests/security/xssAuditor/script-tag-post-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-redirect-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode2-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode3-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode4-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode5-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-actual-comma-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-callbacks-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-comma-01-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-comma-02-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-fancy-unicode-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-invalid-closing-tag-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-invalid-url-encoding-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-control-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-data-url-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-data-url2-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-data-url3-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-double-quote-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-entities-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-no-quote-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-relative-scheme-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-01-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-02-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-03-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment-U2028-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment2-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment3-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment4-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment5-expected.txt:
* http/tests/security/xssAuditor/svg-script-tag-expected.txt:
* http/tests/security/xssAuditor/xss-filter-bypass-big5-expected.txt:
* http/tests/security/xssAuditor/xss-filter-bypass-long-string-expected.txt:
* http/tests/security/xssAuditor/xss-filter-bypass-sjis-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-01-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-02-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-03-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-04-expected.txt:
* platform/chromium/http/tests/security/xssAuditor/javascript-link-control-char2-expected.txt:

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

7 years agoWeb Inspector: Add some more compilation annotations to NavigatorView
vsevik@chromium.org [Thu, 7 Mar 2013 16:28:28 +0000 (16:28 +0000)]
Web Inspector: Add some more compilation annotations to NavigatorView
https://bugs.webkit.org/show_bug.cgi?id=111730

Reviewed by Alexander Pavlov.

* inspector/front-end/NavigatorView.js:

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

7 years ago[GTK] Enable translations for WebKit2
kov@webkit.org [Thu, 7 Mar 2013 16:25:25 +0000 (16:25 +0000)]
[GTK] Enable translations for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=111398

Patch by Gustavo Noronha Silva <gns@gnome.org> on 2013-03-07.
Reviewed by Martin Robinson.

* GNUmakefile.am: adjust path for i18n GNUmakefile.am.
* configure.ac: generate the i18n makefile unconditionally, the translations are
used by both WebKitGTK+ and WebKit2GTK+.

Source/WebCore:

* GNUmakefile.am: distribute po files.
* platform/gtk/po/POTFILES.in: adjust paths for translatable files.

Source/WebCore/platform/gtk/po:

* GNUmakefile.am: Renamed from Source/WebKit/gtk/po/GNUmakefile.am.
* POTFILES.in: Renamed from Source/WebKit/gtk/po/POTFILES.in.
* README: Renamed from Source/WebKit/gtk/po/README.
* ar.po: Renamed from Source/WebKit/gtk/po/ar.po.
* as.po: Renamed from Source/WebKit/gtk/po/as.po.
* bg.po: Renamed from Source/WebKit/gtk/po/bg.po.
* cs.po: Renamed from Source/WebKit/gtk/po/cs.po.
* de.po: Renamed from Source/WebKit/gtk/po/de.po.
* el.po: Renamed from Source/WebKit/gtk/po/el.po.
* en_CA.po: Renamed from Source/WebKit/gtk/po/en_CA.po.
* en_GB.po: Renamed from Source/WebKit/gtk/po/en_GB.po.
* eo.po: Renamed from Source/WebKit/gtk/po/eo.po.
* es.po: Renamed from Source/WebKit/gtk/po/es.po.
* et.po: Renamed from Source/WebKit/gtk/po/et.po.
* eu.po: Renamed from Source/WebKit/gtk/po/eu.po.
* fr.po: Renamed from Source/WebKit/gtk/po/fr.po.
* gl.po: Renamed from Source/WebKit/gtk/po/gl.po.
* gu.po: Renamed from Source/WebKit/gtk/po/gu.po.
* he.po: Renamed from Source/WebKit/gtk/po/he.po.
* hi.po: Renamed from Source/WebKit/gtk/po/hi.po.
* hu.po: Renamed from Source/WebKit/gtk/po/hu.po.
* id.po: Renamed from Source/WebKit/gtk/po/id.po.
* it.po: Renamed from Source/WebKit/gtk/po/it.po.
* ko.po: Renamed from Source/WebKit/gtk/po/ko.po.
* lt.po: Renamed from Source/WebKit/gtk/po/lt.po.
* lv.po: Renamed from Source/WebKit/gtk/po/lv.po.
* mr.po: Renamed from Source/WebKit/gtk/po/mr.po.
* nb.po: Renamed from Source/WebKit/gtk/po/nb.po.
* nl.po: Renamed from Source/WebKit/gtk/po/nl.po.
* pa.po: Renamed from Source/WebKit/gtk/po/pa.po.
* pl.po: Renamed from Source/WebKit/gtk/po/pl.po.
* pt.po: Renamed from Source/WebKit/gtk/po/pt.po.
* pt_BR.po: Renamed from Source/WebKit/gtk/po/pt_BR.po.
* ro.po: Renamed from Source/WebKit/gtk/po/ro.po.
* ru.po: Renamed from Source/WebKit/gtk/po/ru.po.
* sl.po: Renamed from Source/WebKit/gtk/po/sl.po.
* sr.po: Renamed from Source/WebKit/gtk/po/sr.po.
* sr@latin.po: Renamed from Source/WebKit/gtk/po/sr@latin.po.
* sv.po: Renamed from Source/WebKit/gtk/po/sv.po.
* uk.po: Renamed from Source/WebKit/gtk/po/uk.po.
* vi.po: Renamed from Source/WebKit/gtk/po/vi.po.
* zh_CN.po: Renamed from Source/WebKit/gtk/po/zh_CN.po.

Source/WebKit2:

* GNUmakefile.am: define PACKAGE_LOCALE_DIR when building WebProcess's main module.
* WebProcess/gtk/WebProcessMainGtk.cpp:
(WebKit::WebProcessMainGtk): register the i18n domain name, and prefer UTF-8, since
we're GTK+; at the moment we're just using the same name as WebKitGTK+, pro: the
translation module can be reused, con: you can't have different versions of
WebKitGTK+ and WebKit2GTK+ installed, because the module would not be fit for reuse
in that case.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::childSetupFunction): do not set LC_ALL environment variable explicitly,
the child process will already inherit the environment of the parent, which should
have all the variables set properly.

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

7 years agoWeb Inspector: [CodeMirror] update codemirror to version 3.1
commit-queue@webkit.org [Thu, 7 Mar 2013 16:09:58 +0000 (16:09 +0000)]
Web Inspector: [CodeMirror] update codemirror to version 3.1
https://bugs.webkit.org/show_bug.cgi?id=111711

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-07
Reviewed by Vsevolod Vlasov.

Update code mirror experimental editor to version 3.1

No new tests.

* inspector/front-end/cm/codemirror.css:
(.CodeMirror div.CodeMirror-cursor):
(.CodeMirror div.CodeMirror-secondarycursor):
(.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor):
(.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor:not(#nonsense_id)):
(.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite):
(.CodeMirror-gutters):
(.CodeMirror-linewidget):
(.CodeMirror-widget):
(.CodeMirror-focused div.CodeMirror-cursor):
(@media print):
* inspector/front-end/cm/codemirror.js:
(window.CodeMirror):
(window.CodeMirror.):

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

7 years agoOpenGLShims: fix check for ANGLE GLES2 extensions
commit-queue@webkit.org [Thu, 7 Mar 2013 15:54:34 +0000 (15:54 +0000)]
OpenGLShims: fix check for ANGLE GLES2 extensions
https://bugs.webkit.org/show_bug.cgi?id=111656

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-03-07
Reviewed by Simon Hausmann.

The check for ANGLE GLES2 extensions is currently being overriden
with checks for APPLE extensions in lookupOpenGLFunctionAddress().

No new tests. No user visible behavior changed.

* platform/graphics/OpenGLShims.cpp:
(WebCore::lookupOpenGLFunctionAddress):

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

7 years agoRename visible_units.h to VisibleUnits.h in WebCore.vcxproj.filters
ddkilzer@apple.com [Thu, 7 Mar 2013 15:43:16 +0000 (15:43 +0000)]
Rename visible_units.h to VisibleUnits.h in WebCore.vcxproj.filters
<http://webkit.org/b/111426>

* WebCore.vcxproj/WebCore.vcxproj.filters: Rename visible_units.h
to VisibleUnits.h and re-sort.

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

7 years agoWeb Inspector: Support a shortcut for reloading front-end in debug mode.
vsevik@chromium.org [Thu, 7 Mar 2013 15:36:59 +0000 (15:36 +0000)]
Web Inspector: Support a shortcut for reloading front-end in debug mode.
https://bugs.webkit.org/show_bug.cgi?id=111709

Reviewed by Pavel Feldman.

Source/WebCore:

* inspector/front-end/buildSystemOnly.js:
* inspector/front-end/inspector.js:
(WebInspector.documentKeyDown):

Source/WebKit/chromium:

* src/js/DevTools.js:

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

7 years agoWeb Inspector: Support setting up file system mappings from scripts panel context...
vsevik@chromium.org [Thu, 7 Mar 2013 15:35:12 +0000 (15:35 +0000)]
Web Inspector: Support setting up file system mappings from scripts panel context menu.
https://bugs.webkit.org/show_bug.cgi?id=111583

Reviewed by Pavel Feldman.

Added context menu items to set up network - file system mappings from sources panel.
Implemented mapping add/remove methods on Workspace.
Added a dialog suggesting to reload front-end after making such changes.

* English.lproj/localizedStrings.js:
* inspector/front-end/FileSystemMapping.js:
(WebInspector.FileSystemMappingImpl.prototype.fileSystemPath):
* inspector/front-end/FileSystemProjectDelegate.js:
(WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
(WebInspector.FileSystemWorkspaceProvider.prototype.fileSystemPath):
* inspector/front-end/FilteredItemSelectionDialog.js:
(WebInspector.FilteredItemSelectionDialog.prototype.onEnter):
(WebInspector.FilteredItemSelectionDialog.prototype.setQuery):
(WebInspector.SelectUISourceCodeDialog):
(WebInspector.SelectUISourceCodeDialog.prototype.uiSourceCodeSelected):
(WebInspector.SelectUISourceCodeDialog.prototype.filterProject):
(WebInspector.SelectUISourceCodeDialog.prototype.filterUISourceCode):
(WebInspector.SelectUISourceCodeDialog.prototype.selectItem):
(WebInspector.SelectUISourceCodeDialog.prototype._uiSourceCodeAdded):
(WebInspector.OpenResourceDialog):
(WebInspector.OpenResourceDialog.prototype.uiSourceCodeSelected):
(WebInspector.OpenResourceDialog.prototype.filterProject):
(WebInspector.SelectUISourceCodeForProjectTypeDialog):
(WebInspector.SelectUISourceCodeForProjectTypeDialog.prototype.uiSourceCodeSelected):
(WebInspector.SelectUISourceCodeForProjectTypeDialog.prototype.filterProject):
(WebInspector.SelectUISourceCodeForProjectTypeDialog.show):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork.mapFileSystemToNetwork):
(WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork):
(WebInspector.ScriptsPanel.prototype._removeNetworkMapping):
(WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem.mapNetworkToFileSystem):
(WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem):
(WebInspector.ScriptsPanel.prototype.):
(WebInspector.ScriptsPanel.prototype._appendUISourceCodeMappingItems):
(WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
* inspector/front-end/SettingsScreen.js:
(WebInspector.WorkspaceSettingsTab):
(WebInspector.WorkspaceSettingsTab.prototype.wasShown):
(WebInspector.WorkspaceSettingsTab.prototype._reset):
* inspector/front-end/ViewportControl.js:
(WebInspector.ViewportControl.prototype.refresh):
* inspector/front-end/Workspace.js:
(WebInspector.Workspace.prototype.addMapping):
(WebInspector.Workspace.prototype.removeMapping):
* inspector/front-end/externs.js:
(WebInspector.suggestReload):
* inspector/front-end/inspector.js:
(WebInspector.suggestReload):

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

7 years agoWeb Inspector: Add support for frontend reloading
vsevik@chromium.org [Thu, 7 Mar 2013 15:32:20 +0000 (15:32 +0000)]
Web Inspector: Add support for frontend reloading
https://bugs.webkit.org/show_bug.cgi?id=111727

Reviewed by Pavel Feldman.

This patch adds support for frontend reloading including:
  - making sure no messages are sent to backend once frontend started reloading
  - updating frontend url with up-to-date dockSide query parameter value.

* inspector/front-end/InspectorBackend.js:
(InspectorBackendClass.prototype.sendMessageObjectToBackend):
(InspectorBackendClass.prototype.disconnect):
* inspector/front-end/externs.js:
(WebInspector.reload):
* inspector/front-end/inspector.js:
(WebInspector.reload):

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

7 years agoWeb Inspector: Change profile start button caption depending on profile type.
commit-queue@webkit.org [Thu, 7 Mar 2013 15:28:32 +0000 (15:28 +0000)]
Web Inspector: Change profile start button caption depending on profile type.
https://bugs.webkit.org/show_bug.cgi?id=111698

Change the start profiling button caption to "Snapshot" for
snapshot-like profile types, e.g. JS heap snapshot, native memory snapshot.

Patch by Alexei Filippov <alph@chromium.org> on 2013-03-07
Reviewed by Yury Semikhatsky.

* English.lproj/localizedStrings.js:
* inspector/front-end/HeapSnapshotView.js:
(WebInspector.HeapSnapshotProfileType.prototype.isInstantProfile):
* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.NativeSnapshotProfileType.prototype.isInstantProfile):
(WebInspector.NativeMemoryProfileType.prototype.isInstantProfile):
* inspector/front-end/ProfileLauncherView.js:
(WebInspector.ProfileLauncherView):
(WebInspector.ProfileLauncherView.prototype.addProfileType):
(WebInspector.ProfileLauncherView.prototype._updateControls):
(WebInspector.MultiProfileLauncherView.prototype._updateControls):
(WebInspector.MultiProfileLauncherView.prototype._profileTypeChanged):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfileType.prototype.isInstantProfile):

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

7 years ago[texmap] Remove direct access to clip state from clip stack
bruno.abinader@basyskom.com [Thu, 7 Mar 2013 15:25:54 +0000 (15:25 +0000)]
[texmap] Remove direct access to clip state from clip stack
https://bugs.webkit.org/show_bug.cgi?id=111630

Reviewed by Allan Sandfeld Jensen.

As we are now monitoring the clip state from
TextureMapperGL/BitmapTextureGL, have direct access to clip state object
would eventually make it dirty without properly setting the
'clipStateDirty' flag. This bug intends to substitute direct access with
auxiliary functions which would set the clip state dirty when necessary.

No new tests. No user visible behavior changed.

* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::ClipStack::intersect):
(WebCore::TextureMapperGL::ClipStack::setStencilIndex):
(WebCore::TextureMapperGL::drawBorder):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::beginScissorClip):
(WebCore::TextureMapperGL::beginClip):
Replaced direct access with auxiliary functions.

* platform/graphics/texmap/TextureMapperGL.h:
(ClipStack): Removed ClipStack::current() function.
(WebCore::TextureMapperGL::ClipStack::getStencilIndex): Added.
(WebCore::TextureMapperGL::ClipStack::isCurrentScissorBoxEmpty): Added.

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

7 years ago[chromium] don't track the top loading frame if no layout test is currently running
jochen@chromium.org [Thu, 7 Mar 2013 15:20:00 +0000 (15:20 +0000)]
[chromium] don't track the top loading frame if no layout test is currently running
https://bugs.webkit.org/show_bug.cgi?id=111716

Reviewed by Kentaro Hara.

In DRT, we synchronously stop the test and start loading the next test
URL. However, in content_shell, this happens asynchronously. It's
important that the top loading frame is not changed due to stray
navigation events before the next test starts.

* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
(WebTestRunner::TestRunner::setTopLoadingFrame):

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

7 years ago[Texturemapper] transform-style 'flat' value is broken
bruno.abinader@basyskom.com [Thu, 7 Mar 2013 14:23:27 +0000 (14:23 +0000)]
[Texturemapper] transform-style 'flat' value is broken
https://bugs.webkit.org/show_bug.cgi?id=111566

Reviewed by Allan Sandfeld Jensen.

After changes from r144290, the CSS3 'transform-styles' property, when
used with 'flat' value, resulted in non-stenciled rendering inside
clipped area - vide example from Surfin' Safari blog:
https://www.webkit.org/blog-files/3d-transforms/transform-style.html

This patch forces the clip state to be applied when binding the default
surface.

No new tests. No user visible behavior changed.

* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::ClipStack::apply):
(WebCore::TextureMapperGL::ClipStack::applyIfNeeded): Added.
Moved state cache check from apply() to applyIfNeeded().

(WebCore::BitmapTextureGL::clearIfNeeded):
(WebCore::BitmapTextureGL::bind):
(WebCore::TextureMapperGL::beginScissorClip):
(WebCore::TextureMapperGL::beginClip):
(WebCore::TextureMapperGL::endClip):
* platform/graphics/texmap/TextureMapperGL.h:
(ClipStack):
Use applyIfNeeded() to check for clip state before clipping.

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

7 years ago[GTK] Expose "ShouldRespectImageOrientation" setting into WebKitWebSettings
commit-queue@webkit.org [Thu, 7 Mar 2013 14:22:48 +0000 (14:22 +0000)]
[GTK] Expose "ShouldRespectImageOrientation" setting into WebKitWebSettings
https://bugs.webkit.org/show_bug.cgi?id=111414

Patch by Tomas Popela <tpopela@redhat.com> on 2013-03-07
Reviewed by Carlos Garcia Campos.

We should expose ShouldRespectImageOrientation setting into
WebKitWebSettings. When it is enabled, the images are shown with right
orientation regarding to images EXIF data.

* webkit/webkitwebsettings.cpp:
(webkit_web_settings_class_init):
(webkit_web_settings_set_property):
(webkit_web_settings_get_property):
* webkit/webkitwebsettingsprivate.h:
* webkit/webkitwebview.cpp:
(webkit_web_view_update_settings):
(webkit_web_view_settings_notify):

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

7 years agoWeb Inspector: refactoring: move TextEditorModel.Indent enum into TextUtils
commit-queue@webkit.org [Thu, 7 Mar 2013 14:22:01 +0000 (14:22 +0000)]
Web Inspector: refactoring: move TextEditorModel.Indent enum into TextUtils
https://bugs.webkit.org/show_bug.cgi?id=111715

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-07
Reviewed by Pavel Feldman.

Move WebInspector.TextEditorModel.Indent into WebInspector.TextUtils namespace.

No new tests: no change in behaviour.

* inspector/front-end/SettingsScreen.js:
(WebInspector.GenericSettingsTab):
* inspector/front-end/TextEditorModel.js:
(WebInspector.TextEditorModel.endsWithBracketRegex.):
* inspector/front-end/TextUtils.js:

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

7 years agoWeb Inspector: Add more diagnostics output to testRendererProcessNativeMemorySize
commit-queue@webkit.org [Thu, 7 Mar 2013 14:17:25 +0000 (14:17 +0000)]
Web Inspector: Add more diagnostics output to testRendererProcessNativeMemorySize
https://bugs.webkit.org/show_bug.cgi?id=111599

Patch by Alexei Filippov <alph@chromium.org> on 2013-03-07
Reviewed by Yury Semikhatsky.

Add the process size to the test output.

* src/js/Tests.js:

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

7 years agoFix painting phases for composited scrolling
vollick@chromium.org [Thu, 7 Mar 2013 14:00:57 +0000 (14:00 +0000)]
Fix painting phases for composited scrolling
https://bugs.webkit.org/show_bug.cgi?id=107618

Reviewed by Simon Fraser.

With composited scrolling, the scrolling contents layer paints the
foreground and the main graphics layer paints the background. This
causes a few problems:

  1) If we create a foreground layer, we end up with two layers painting
     the foreground phase.
  2) Focus rings / outlines paint into the foreground layer, so they end
     up moving around with the scrolling contents.
  3) Neg z-order descendants paint in the the main graphics layer and
     will therefore not scroll.

To deal with 1) we need to stop painting the foreground into both the
foreground and scrolling contents layers. We also need to ensure that
the foreground layer is the right size and has the right offset from
renderer if we're on the composited scrolling path.

To deal with 2) and 3), I have added a new graphics layer painting phase
flag -- GraphicsLayerPaintCompositedScroll -- and applied it to two
layers in the subtree created by RenderLayerBacking. This ultimately
affects the paint phase passed to RenderLayer::paintLayerContents and
allows us to paint the focus rings, outlines and negative z-order
descendants into the proper layers.

Source/WebCore:

Tests: compositing/overflow/composited-scrolling-paint-phases.html
       compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html
       compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html

* page/Frame.h:
  Added a flag for including painting phases in the layer tree dump.
(WebCore::GraphicsLayer::dumpProperties):
  Can now dump painting phase information, but only if requested.
* platform/graphics/GraphicsLayerClient.h:
  Added a new entry to GraphicsLayerPaintingPhaseFlags for comp-scroll.
(WebCore::RenderLayer::paintLayerContents):
  Updated the logic to account for the new comp-scroll-related paint
  phase flag.
* rendering/RenderLayer.h:
  Added the RenderLayer painting phase counterpart to
  GraphicsLayerPaintCompositedScroll.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
  Ensures that the foreground layer is sized correctly for comp-scroll.
(WebCore::RenderLayerBacking::updateScrollingLayers):
  If we have a foreground layer, the scrolling contents layer no
  longer gets assigned the foreground painting phase.
(WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer):
  If we're comp-scrolling, then the primary layer gets the new phase.
(WebCore::RenderLayerBacking::paintIntoLayer):
  Simply translates the new graphics layer painting phase to its
  render layer counterpart.
(WebCore::RenderLayerCompositor::layerTreeAsText):
* testing/Internals.cpp:
(WebCore::Internals::layerTreeAsText):
* testing/Internals.h:
* testing/Internals.idl:
  The above changes are solely plumbing to allow layout tests to
  request that paint phase information be included in the layer tree
  dump.

LayoutTests:

* compositing/overflow/composited-scrolling-paint-phases-expected.txt: Added.
* compositing/overflow/composited-scrolling-paint-phases.html: Added.
* platform/mac/compositing/overflom/composited-scrolling-paint-phases-expected.txt: Added.
  This is a text-based test that checks that the graphics layer
  painting phases are correct with composited scrolling + foreground
  layers.
* compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html: Added.
* compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html: Added.
  These tests cover cases 2) and 3) above.
* platform/chromium/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
  These have been updated to reflect the missing baselines.

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

7 years ago[Qt] Use Qt5.1 supportedMimeTypes methods.
allan.jensen@digia.com [Thu, 7 Mar 2013 13:52:35 +0000 (13:52 +0000)]
[Qt] Use Qt5.1 supportedMimeTypes methods.
https://bugs.webkit.org/show_bug.cgi?id=111185

Reviewed by Jocelyn Turcotte.

Uses the supportedMimeTypes() methods from QImageReader and QImageWriter when available.

* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes):
(WebCore::initializeSupportedImageMIMETypesForEncoding):

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

7 years agoWeb Inspector: Flame Chart. Stick item color to the function.
loislo@chromium.org [Thu, 7 Mar 2013 13:36:43 +0000 (13:36 +0000)]
Web Inspector: Flame Chart. Stick item color to the function.
https://bugs.webkit.org/show_bug.cgi?id=111697

Reviewed by Yury Semikhatsky.

Different nodes associated with a single function have to use the same color.
Minor polish: do not filter out (idle) and (program) items. They were big due to an error on v8 side.
Set minimum width to 0 for more precise picture.

* inspector/front-end/FlameChart.js:
(WebInspector.FlameChart):
(WebInspector.FlameChart.prototype._rootNodes):
(WebInspector.FlameChart.prototype.draw):
(WebInspector.FlameChart.prototype._drawNode):
(WebInspector.FlameChart.prototype._drawBar):

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

7 years agoWeb Inspector: [ACE] gutter size should be fixed.
commit-queue@webkit.org [Thu, 7 Mar 2013 12:55:51 +0000 (12:55 +0000)]
Web Inspector: [ACE] gutter size should be fixed.
https://bugs.webkit.org/show_bug.cgi?id=111576

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-07
Reviewed by Pavel Feldman.

Add a custom ace editor build that supports setFixedGutterWidth configuration
parameter and switch this setting on.

No new tests.

* inspector/front-end/AceTextEditor.js:
(WebInspector.AceTextEditor): Switch fixedGutterWidth setting on.
* inspector/front-end/ace/ace.js:
(.):

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

7 years agoUnreviewed, rolling out r145059.
commit-queue@webkit.org [Thu, 7 Mar 2013 11:49:33 +0000 (11:49 +0000)]
Unreviewed, rolling out r145059.
http://trac.webkit.org/changeset/145059
https://bugs.webkit.org/show_bug.cgi?id=111707

crash webkit build (Requested by tasak on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-07

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSAllInOne.cpp:
* css/DocumentRuleSets.cpp:
(WebCore::ShadowDistributedRules::collectMatchRequests):
* css/DocumentRuleSets.h:
* css/ElementRuleCollector.cpp: Removed.
* css/ElementRuleCollector.h: Removed.
* css/PageRuleCollector.cpp: Removed.
* css/PageRuleCollector.h: Removed.
* css/StyleResolver.cpp:
(WebCore::leftToRightDeclaration):
(WebCore):
(WebCore::rightToLeftDeclaration):
(WebCore::StyleResolver::State::ensureRuleList):
(WebCore::StyleResolver::State::clear):
(WebCore::StyleResolver::addMatchedProperties):
(WebCore::StyleResolver::addElementStyleProperties):
(MatchingUARulesScope):
(WebCore::MatchingUARulesScope::MatchingUARulesScope):
(WebCore::MatchingUARulesScope::~MatchingUARulesScope):
(WebCore::MatchingUARulesScope::isMatchingUARules):
(WebCore::StyleResolver::collectMatchingRules):
(WebCore::StyleResolver::collectMatchingRulesForRegion):
(WebCore::StyleResolver::sortAndTransferMatchedRules):
(WebCore::StyleResolver::matchScopedAuthorRules):
(WebCore::StyleResolver::matchHostRules):
(WebCore::StyleResolver::matchAuthorRules):
(WebCore::StyleResolver::matchUserRules):
(WebCore::StyleResolver::matchUARules):
(WebCore::StyleResolver::collectMatchingRulesForList):
(WebCore::compareRules):
(WebCore::StyleResolver::sortMatchedRules):
(WebCore::StyleResolver::matchAllRules):
(WebCore::StyleResolver::State::initForStyleResolve):
(WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::pseudoStyleRulesForElement):
(WebCore::StyleResolver::ruleMatches):
(WebCore::StyleResolver::checkRegionSelector):
(WebCore::comparePageRules):
(WebCore::StyleResolver::matchPageRules):
(WebCore::checkPageSelectorComponents):
(WebCore::StyleResolver::matchPageRulesForList):
(WebCore::StyleResolver::isLeftPage):
(WebCore::StyleResolver::isFirstPage):
(WebCore::StyleResolver::pageName):
* css/StyleResolver.h:
(WebCore::MatchRequest::MatchRequest):
(MatchRequest):
(StyleResolver):
(MatchResult):
(WebCore::StyleResolver::State::State):
(State):
(WebCore::StyleResolver::State::takeRuleList):
(WebCore::StyleResolver::State::setSameOriginOnly):
(WebCore::StyleResolver::State::isSameOriginOnly):
(WebCore::StyleResolver::State::pseudoStyleRequest):
(WebCore::StyleResolver::State::setMode):
(WebCore::StyleResolver::State::mode):
(WebCore::StyleResolver::State::matchedRules):
(WebCore::StyleResolver::State::addMatchedRule):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::willMatchRule):
* inspector/InspectorCSSAgent.h:
(WebCore):
(InspectorCSSAgent):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::willMatchRuleImpl):
* inspector/InspectorInstrumentation.h:
(WebCore):
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::willMatchRule):

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

7 years agoUnreviewed. Rebaselined run-bindings-tests.
haraken@chromium.org [Thu, 7 Mar 2013 11:43:54 +0000 (11:43 +0000)]
Unreviewed. Rebaselined run-bindings-tests.

* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore):

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

7 years ago[Refactoring] Implement RuleCollector
tasak@google.com [Thu, 7 Mar 2013 11:19:30 +0000 (11:19 +0000)]
[Refactoring] Implement RuleCollector
https://bugs.webkit.org/show_bug.cgi?id=109916

Reviewed by Antti Koivisto.

Implemented rule collector for an element and collector for a page.
Not all members in class State are required entire while resolving
a style.

No new tests, because just refactoring.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSAllInOne.cpp:
Added ElementRuleCollector and PageRuleCollector.
* css/DocumentRuleSets.cpp:
(WebCore::ShadowDistributedRules::collectMatchRequests):
Since behaviorAtBoundary is a state owned by ElementRuleCollector,
removed from here.
* css/DocumentRuleSets.h:
(WebCore::ShadowDistributedRules::isEmpty):
Added to quickly check whether there exist any ShadowDistributedRules
or not.
* css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
(WebCore):
(WebCore::ElementRuleCollector::matchedResult):
(WebCore::ElementRuleCollector::matchedRuleList):
(WebCore::ElementRuleCollector::addMatchedRule):
(WebCore::ElementRuleCollector::clearMatchedRules):
(WebCore::ElementRuleCollector::ensureRuleList):
(WebCore::ElementRuleCollector::addElementStyleProperties):
(WebCore::ElementRuleCollector::collectMatchingRules):
(WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
(WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
(WebCore::ElementRuleCollector::matchScopedAuthorRules):
(WebCore::ElementRuleCollector::matchHostRules):
(WebCore::ElementRuleCollector::matchShadowDistributedRules):
(WebCore::ElementRuleCollector::matchAuthorRules):
(WebCore::ElementRuleCollector::matchUserRules):
(WebCore::ElementRuleCollector::matchUARules):
(WebCore::ElementRuleCollector::ruleMatches):
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
(WebCore::ElementRuleCollector::sortMatchedRules):
(WebCore::ElementRuleCollector::matchAllRules):
Moved these methods from StyleResolver to this class.
(WebCore::ElementRuleCollector::hasAnyMatchingRules):
This method is used for checking whether a given element can share
a cache.
* css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
(WebCore):
(WebCore::ElementRuleCollector::ElementRuleCollector):
Use styleResolver instance to initialize its member variables, i.e.
SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
StyleScopedResolver.
(ElementRuleCollector):
(WebCore::ElementRuleCollector::setMode):
(WebCore::ElementRuleCollector::setPseudoStyleRequest):
(WebCore::ElementRuleCollector::setSameOriginOnly):
(WebCore::ElementRuleCollector::setRegionForStyling):
Mode, SameOriginOnly, RegionForStyling are only used while collecting
matched rules.
(WebCore::ElementRuleCollector::setMedium):
Need to know which default stylesheet should be looked up.
(WebCore::ElementRuleCollector::document):
* css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
(WebCore::comparePageRules):
(WebCore::PageRuleCollector::isLeftPage):
(WebCore::PageRuleCollector::isFirstPage):
(WebCore::PageRuleCollector::pageName):
(WebCore::PageRuleCollector::matchAllPageRules):
(WebCore::PageRuleCollector::matchPageRules):
(WebCore::checkPageSelectorComponents):
(WebCore::PageRuleCollector::matchPageRulesForList):
Moved from StyleResolver.
* css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
(WebCore):
(WebCore::PageRuleCollector::PageRuleCollector):
(PageRuleCollector):
(WebCore::PageRuleCollector::matchedResult):
* css/StyleResolver.cpp:
(WebCore):
(WebCore::StyleResolver::State::clear):
(WebCore::StyleResolver::MatchResult::addMatchedProperties):
(WebCore::StyleResolver::State::initForStyleResolve):
(WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::pseudoStyleRulesForElement):
(WebCore::StyleResolver::applyMatchedProperties):
* css/StyleResolver.h:
(WebCore::MatchRequest::MatchRequest):
Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
state.
(MatchRequest):
(WebCore::StyleResolver::selectorFilter):
Added to obtain SelectorFilter in ElementRuleCollector's constructor.
(StyleResolver):
(MatchResult):
(WebCore::StyleResolver::State::State):
To pass ASSERT in StyleResolver::applyProperties, need to keep
m_regionForStyling.
(State):
(WebCore::StyleResolver::State::regionForStyling):
(WebCore::StyleResolver::State::useSVGZoomRules):
(WebCore::StyleResolver::hasSelectorForId):
(WebCore):
(WebCore::checkRegionSelector):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::willMatchRule):
Removed StyleResolver from its parameter list. Instead, added
InspectorCSSOMWrappers and DocumentStyleSheetCollection.
* inspector/InspectorCSSAgent.h:
(WebCore):
(InspectorCSSAgent):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::willMatchRuleImpl):
* inspector/InspectorInstrumentation.h:
(WebCore):
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::willMatchRule):

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

7 years agoWeb Inspector: [ACE] add experimental breakpoint support
commit-queue@webkit.org [Thu, 7 Mar 2013 10:41:25 +0000 (10:41 +0000)]
Web Inspector: [ACE] add experimental breakpoint support
https://bugs.webkit.org/show_bug.cgi?id=111573

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-03-07
Reviewed by Pavel Feldman.

No new tests.

- Implement attributes model for ace editor. Update attribute
locations by handling onTextChange event from editor.
- Implement breakpoints atop of attributes model.

* inspector/front-end/AceTextEditor.js:
(WebInspector.AceTextEditor):
(WebInspector.AceTextEditor.prototype._updateBreakpoints):
(WebInspector.AceTextEditor.prototype._updateLineAttributes):
(WebInspector.AceTextEditor.prototype._onTextChange):
(WebInspector.AceTextEditor.prototype.addBreakpoint):
(WebInspector.AceTextEditor.prototype.removeBreakpoint):
(WebInspector.AceTextEditor.prototype.getAttribute):
(WebInspector.AceTextEditor.prototype.setAttribute):
(WebInspector.AceTextEditor.prototype.removeAttribute):
* inspector/front-end/ace/acedevtools.css:
(.ace-editor-container):
(.ace_gutter-cell.webkit-breakpoint):
(.ace_gutter-cell.webkit-breakpoint-conditional):
(.ace_gutter-cell.webkit-breakpoint-disabled):
(.ace_gutter-cell):

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

7 years agoWeb Inspector: identify layers for CSS generated content in LayerTreeAgent
graouts@apple.com [Thu, 7 Mar 2013 10:39:15 +0000 (10:39 +0000)]
Web Inspector: identify layers for CSS generated content in LayerTreeAgent
https://bugs.webkit.org/show_bug.cgi?id=111551

Source/WebCore:

Layers can be associated with pseudo elements, elements that are generated
when ::before or ::after pseudo-classes are used to style an element and
provide additional rendering using the CSS "content" property. In order to
identify that a layer is associated to a pseudo element, we add a new set of
optional properties on the Layer object: "isGeneratedContent", "pseudoElementId"
and "pseudoClass".

We need to provide the "pseudoElementId" for the same reason we provide a
"nodeId" for the Layer. This is so that the front-end can identify that a
layer whose "layerId" may have changed between two layer tree updates is
used to render content for the same pseudo element.

In the instance that a layer is rendering generated content, we also set
the "nodeId" to be the generating node's id. The generating node is the
node in the DOM that the user styled using ::before or ::after pseudo-classes.
We also add the pseudo-class used as the "pseudoClass" property such that the
front-end may provide useful information to the user about what type of
pseudo-class yielded the generation of this layer. We also deal with the
possibility that the layer is a reflection for a pseudo element.

Since pseudo elements are not part of the user-visible DOM, and thus can't be
pushed to the front-end, we maintain a special ID hash map in the LayerTreeAgent.
In order to be able to unbind a pseudo element id and a pseudo element, we add a
destructor method to PseudoElement and provide a new instrumentation call so that
the LayerTreeAgent may be notified of a PseudoElement being destroyed. This
reflects the principle we use to update the RenderLayer bindings when a
RenderLayer is destroyed, as notified by the RenderLayerCompositor.

Reviewed by Simon Fraser.

Test: inspector-protocol/layers/layers-generated-content.html

* dom/PseudoElement.cpp:
(WebCore::PseudoElement::~PseudoElement): New destructor used to notify
InspectorInstrumentation of a PseudoElement being destroyed, such that
it can eventually be relayed to the InspectorLayerTreeAgent.
(WebCore):
* dom/PseudoElement.h:
(PseudoElement):
* inspector/Inspector.json: Add the new PseudoElementId type used for
the new "pseudoElementId" property on Layer, to which we also add the
"isGeneratedContent" and "pseudoClass" properties.
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::pseudoElementDestroyedImpl):
* inspector/InspectorInstrumentation.h:
(WebCore):
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::pseudoElementDestroyed): New method
called in the PseudoElement destructor used to relay the fact that a
PseudoElement was destroyed to the InspectorLayerTreeAgent.
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::reset): Clear the new PseudoElement
identifier maps.
(WebCore::InspectorLayerTreeAgent::pseudoElementDestroyed): Remove any
identifier binding for the provided PseudoElement being destroyed.
(WebCore):
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer): Set the new
"isGeneratedContent", "pseudoElementId" and "pseudoClass" properties on
the Layer object for layers associated with a pseudo element.
(WebCore::InspectorLayerTreeAgent::bind): Use emptyString() instead of "".
(WebCore::InspectorLayerTreeAgent::unbind): Use an iterator instead of a
get() and remove() combination in order to reduce lookups and mimick the
code written for unbindPseudoElement().
(WebCore::InspectorLayerTreeAgent::bindPseudoElement): Binds the provided
PseudoElement to a unique identifier.
(WebCore::InspectorLayerTreeAgent::unbindPseudoElement): Unbinds the
provided PseudoElement from its unique identifier.
* inspector/InspectorLayerTreeAgent.h:
(InspectorLayerTreeAgent):

LayoutTests:

New tests for layers associated with pseudo elements.

Reviewed by Simon Fraser.

* inspector-protocol/layers/layers-generated-content-expected.txt: Added.
* inspector-protocol/layers/layers-generated-content.html: Added.

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

7 years ago[Qt] Unreviewed gardneing. Skipped some failing tests.
kadam@inf.u-szeged.hu [Thu, 7 Mar 2013 10:08:03 +0000 (10:08 +0000)]
[Qt] Unreviewed gardneing. Skipped some failing tests.

* platform/qt-5.0-wk2/TestExpectations:
* platform/qt/TestExpectations:

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

7 years agoAdd clear button to date/time input types
keishi@webkit.org [Thu, 7 Mar 2013 10:06:19 +0000 (10:06 +0000)]
Add clear button to date/time input types
https://bugs.webkit.org/show_bug.cgi?id=111319

Reviewed by Kent Tamura.

Source/WebCore:

We want to remove the clear button from the calendar picker (Bug 109439)
so we are adding the clear button to the right side of the input element.

Tests: fast/forms/date-multiple-fields/date-multiple-fields-clearbutton-change-and-input-events.html
       fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-clearbutton-change-and-input-events.html
       fast/forms/month-multiple-fields/month-multiple-fields-clearbutton-change-and-input-events.html
       fast/forms/time-multiple-fields/time-multiple-fields-clearbutton-change-and-input-events.html
       fast/forms/week-multiple-fields/week-multiple-fields-clearbutton-change-and-input-events.html

* CMakeLists.txt: Added ClearButtonElement.cpp
* GNUmakefile.list.am: Ditto.
* Target.pri: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* css/html.css:
(input::-webkit-clear-button): Styles for the clear button.
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::editControlValueChanged):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::~BaseMultipleFieldsDateAndTimeInputType):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::destroyShadowSubtree):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::disabledAttributeChanged):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::requiredAttributeChanged): Hide clear button if the value is required.
(WebCore):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::readonlyAttributeChanged):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::focusAndSelectClearButtonOwner): Called on mouse down on clear button.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldClearButtonRespondToMouseEvents):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::clearValue):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::updateClearButtonVisibility): We want to hide the clear button if the value is required or the value is empty.
* html/BaseMultipleFieldsDateAndTimeInputType.h:
(BaseMultipleFieldsDateAndTimeInputType):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateClearButtonVisibility):
(WebCore):
(WebCore::HTMLInputElement::requiredAttributeChanged):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/InputType.cpp:
(WebCore::InputType::requiredAttributeChanged): Notifies the InputType that the required attribute has changed.
(WebCore):
(WebCore::InputType::updateClearButtonVisibility):
* html/InputType.h:
(InputType):
* html/shadow/ClearButtonElement.cpp: Added.
(WebCore):
(WebCore::ClearButtonElement::ClearButtonElement):
(WebCore::ClearButtonElement::create):
(WebCore::ClearButtonElement::detach):
(WebCore::ClearButtonElement::releaseCapture): Stop capturing mouse events.
(WebCore::ClearButtonElement::defaultEventHandler):
* html/shadow/ClearButtonElement.h: Added.
(WebCore):
(ClearButtonElement):
(ClearButtonOwner):
(WebCore::ClearButtonElement::ClearButtonOwner::~ClearButtonOwner):
(WebCore::ClearButtonElement::removeClearButtonOwner):
(WebCore::ClearButtonElement::isMouseFocusable):

LayoutTests:

* fast/forms/date-multiple-fields/date-multiple-fields-clearbutton-change-and-input-events-expected.txt: Added.
* fast/forms/date-multiple-fields/date-multiple-fields-clearbutton-change-and-input-events.html: Added.
* fast/forms/date-multiple-fields/date-multiple-fields-mouse-events-expected.txt:
* fast/forms/date-multiple-fields/date-multiple-fields-mouse-events.html:
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-clearbutton-change-and-input-events-expected.txt: Added.
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-clearbutton-change-and-input-events.html: Added.
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-mouse-events-expected.txt:
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-mouse-events.html:
* fast/forms/month-multiple-fields/month-multiple-fields-clearbutton-change-and-input-events-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-clearbutton-change-and-input-events.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-mouse-events-expected.txt:
* fast/forms/month-multiple-fields/month-multiple-fields-mouse-events.html:
* fast/forms/resources/common-clearbutton-change-and-input-events.js: Added.
(.testInput.onchange):
(.testInput.oninput):
(testClearButtonChangeAndInputEvents):
* fast/forms/time-multiple-fields/time-multiple-fields-clearbutton-change-and-input-events-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-clearbutton-change-and-input-events.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-mouse-events-expected.txt:
* fast/forms/time-multiple-fields/time-multiple-fields-mouse-events.html:
* fast/forms/time-multiple-fields/time-multiple-fields-narrow-width-scroll.html:
* fast/forms/week-multiple-fields/week-multiple-fields-clearbutton-change-and-input-events-expected.txt: Added.
* fast/forms/week-multiple-fields/week-multiple-fields-clearbutton-change-and-input-events.html: Added.
* fast/forms/week-multiple-fields/week-multiple-fields-mouse-events-expected.txt:
* fast/forms/week-multiple-fields/week-multiple-fields-mouse-events.html:
* platform/chromium/TestExpectations:

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

7 years agoWeb Inspector: Refactorings: Prepare SuggestBox for reuse.
eustas@chromium.org [Thu, 7 Mar 2013 09:49:44 +0000 (09:49 +0000)]
Web Inspector: Refactorings: Prepare SuggestBox for reuse.
https://bugs.webkit.org/show_bug.cgi?id=111301

Reviewed by Alexander Pavlov.

1) Remove userEnteredText from delegate interface.
   Pass prefix to updateSuggestions instead.
2) Clarify that suggestions array is never null.

* inspector/front-end/SuggestBox.js:
(WebInspector.SuggestBox): Renamed parameter/member.
(WebInspector.SuggestBox.prototype._updateItems):
Minor readability changes.
(WebInspector.SuggestBox.prototype._canShowBox):
Use userEnteredText parameter.
(WebInspector.SuggestBox.prototype.updateSuggestions):
Pass userEnteredText to _canShowBox.
* inspector/front-end/DatabaseQueryView.js: Fix JSDocs.
* inspector/front-end/RuntimeModel.js: Ditto.
* inspector/front-end/TextPrompt.js: Ditto.
(WebInspector.TextPrompt.prototype._completionsReady):
Pass userEnteredText to updateSuggestions.

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

7 years agoTextTrackRegion Constructor
vcarbune@chromium.org [Thu, 7 Mar 2013 09:29:10 +0000 (09:29 +0000)]
TextTrackRegion Constructor
https://bugs.webkit.org/show_bug.cgi?id=110511

Reviewed by Adam Barth.

Source/WebCore:

This is an initial patch for implementing the TextTrackRegion
defined in the "WebVTT Extension: Regions for rendering cue groups":
https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/region.html

The feature components are hidden behind the WEBVTT_REGIONS flag
and is currently disabled by default in all ports and tests skipped.

Test: media/track/regions-webvtt/text-track-region-constructor.html

* WebCore.gypi: Added files to be included for building Chromium with
feature enabled (it is disabled by default).
* html/track/TextTrackRegion.cpp: Added.
(WebCore):
(WebCore::TextTrackRegion::TextTrackRegion):
(WebCore::TextTrackRegion::~TextTrackRegion):
(WebCore::TextTrackRegion::setId): Setter.
(WebCore::TextTrackRegion::setWidth): Setter.
(WebCore::TextTrackRegion::setHeight): Setter.
(WebCore::TextTrackRegion::setRegionAnchorX): Setter.
(WebCore::TextTrackRegion::setRegionAnchorY): Setter.
(WebCore::TextTrackRegion::setViewportAnchorX): Setter.
(WebCore::TextTrackRegion::setViewportAnchorY): Setter.
(WebCore::TextTrackRegion::scroll): Getter. Internally, the scroll
value is stored as a boolean, but when returned is converted to either
the empty string or "up".
(WebCore::TextTrackRegion::setScroll): Setter.
(WebCore::TextTrackRegion::setRegionSettings): Not used yet (see b/109818)
* html/track/TextTrackRegion.h: Added.
(WebCore):
(TextTrackRegion):
(WebCore::TextTrackRegion::create):
(WebCore::TextTrackRegion::track): Getter.
(WebCore::TextTrackRegion::id): Getter.
(WebCore::TextTrackRegion::width): Getter.
(WebCore::TextTrackRegion::height): Getter.
(WebCore::TextTrackRegion::regionAnchorX): Getter.
(WebCore::TextTrackRegion::regionAnchorY): Getter.
(WebCore::TextTrackRegion::viewportAnchorX): Getter.
(WebCore::TextTrackRegion::viewportAnchorY): Getter.
(WebCore::TextTrackRegion::regionSettings): Getter, used only internally (see b/109818).
* html/track/TextTrackRegion.idl: Added.
* page/DOMWindow.idl: Constructor support.

LayoutTests:

* TestExpectations:
* media/track/regions-webvtt/text-track-region-constructor-expected.txt: Added.
* media/track/regions-webvtt/text-track-region-constructor.html: Added.

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