WebKit-https.git
6 years agoDashboard cleanup: Create ui.Errors
jparent@chromium.org [Tue, 12 Mar 2013 01:07:10 +0000 (01:07 +0000)]
Dashboard cleanup: Create ui.Errors
https://bugs.webkit.org/show_bug.cgi?id=111785

Reviewed by Ojan Vafai.

Create ui.Errors for handling errors the dashboards
encounter. Loader now has a Error object that it can add to,
and individual dashboards can show errors when desired.
Currently, only flakiness_db shows errors, but this is
generic and there is no reason why other dbs wouldn't want to
show errors.

* TestResultServer/static-dashboards/dashboard_base.js:
(resourceLoadingComplete):
* TestResultServer/static-dashboards/flakiness_dashboard.js:
(generatePage):
* TestResultServer/static-dashboards/loader.js:
(.):
* TestResultServer/static-dashboards/ui.js:
(.):

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

6 years agoMore chromium layer tree rebaselines for r145422
jamesr@google.com [Tue, 12 Mar 2013 00:53:06 +0000 (00:53 +0000)]
More chromium layer tree rebaselines for r145422

* platform/chromium-mac-lion/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt: Copied from LayoutTests/platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt.
* platform/chromium-mac-lion/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt: Copied from LayoutTests/platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt.
* platform/chromium-mac-snowleopard/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt: Copied from LayoutTests/platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt.
* platform/chromium-mac-snowleopard/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt: Copied from LayoutTests/platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt.
* platform/chromium-mac/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt: Copied from LayoutTests/platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt.
* platform/chromium-mac/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt: Copied from LayoutTests/platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt.
* platform/chromium-win/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt: Copied from LayoutTests/platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt.
* platform/chromium-win/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt: Copied from LayoutTests/platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt.
* platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt:
* platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt:

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

6 years agoReplace static_cast with to* helper functions.
inferno@chromium.org [Tue, 12 Mar 2013 00:50:46 +0000 (00:50 +0000)]
Replace static_cast with to* helper functions.
https://bugs.webkit.org/show_bug.cgi?id=112045

Reviewed by Eric Seidel.

Source/WebCore:

* bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
(WebCore::V8HTMLOptionsCollection::removeMethodCustom):
(WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
* bindings/v8/custom/V8NamedNodesCollection.cpp:
(WebCore::V8NamedNodesCollection::namedItem):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::wrap):
* editing/BreakBlockquoteCommand.cpp:
(WebCore::BreakBlockquoteCommand::doApply):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::insertNodeAt):
(WebCore::CompositeEditCommand::pushAnchorElementDown):
(WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
(WebCore::CompositeEditCommand::splitTreeToNode):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* platform/chromium/PasteboardChromium.cpp:
(WebCore::Pasteboard::writeImage):
* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::frameContentsCompositor):
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::plugInImageElement):
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::updateFromElement):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::idChanged):

Source/WebKit/chromium:

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::findChildByExpression):
(WebKit::WebFrameImpl::fromFrameOwnerElement):
* src/WebHelperPluginImpl.cpp:
(WebKit::WebHelperPluginImpl::getPlugin):
* src/WebMediaPlayerClientImpl.cpp:
(WebKit::WebMediaPlayerClientImpl::loadInternal):
(WebKit::WebMediaPlayerClientImpl::create):
* src/WebPageSerializerImpl.cpp:
(WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag):
(WebKit::WebPageSerializerImpl::endTagToString):
(WebKit::WebPageSerializerImpl::buildContentForNode):
(WebKit::WebPageSerializerImpl::collectTargetFrames):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::autocompleteHandleKeyEvent):
(WebKit::WebViewImpl::enterFullScreenForElement):

Source/WebKit/mac:

* WebView/WebRenderLayer.mm:
(+[WebRenderLayer nameForLayer:]):

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

6 years ago[chromium] Use SkMatrix44 instead of WebTransformationMatrix in animation APIs
commit-queue@webkit.org [Tue, 12 Mar 2013 00:45:33 +0000 (00:45 +0000)]
[chromium] Use SkMatrix44 instead of WebTransformationMatrix in animation APIs
https://bugs.webkit.org/show_bug.cgi?id=111791

Patch by James Robinson <jamesr@chromium.org> on 2013-03-11
Reviewed by Adrienne Walker.

Source/Platform:

This adds SkMatrix44 overrides for animation APIs that deal with matrices and slims the interface
down for WebTransformationMatrix to the minimum needed to compile. With this patch, there are no
live codepaths that use WebTransformationMatrix but some downstream code still needs a type and a
few functions to compile. After the downstream code is patched this type can go away completely.

* chromium/public/WebLayer.h:
(WebKit):
(WebLayer):
* chromium/public/WebTransformAnimationCurve.h:
(WebTransformAnimationCurve):
* chromium/public/WebTransformOperations.h:
(WebTransformOperations):
* chromium/public/WebTransformationMatrix.h:
(WebTransformationMatrix):

Source/WebCore:

Adds a new utility function to convert a TransformationMatrix to an SkMatrix44 and
uses it in AnimationTranslationUtil and GraphicsLayerChromium.

* WebCore.gypi:
* platform/chromium/support/WebTransformationMatrix.cpp:
(WebKit::WebTransformationMatrix::WebTransformationMatrix):
* platform/graphics/chromium/AnimationTranslationUtil.cpp:
(WebCore::toWebTransformOperations):
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::updateTransform):
(WebCore::GraphicsLayerChromium::updateChildrenTransform):
* platform/graphics/chromium/TransformSkMatrix44Conversions.cpp:
(WebCore::TransformSkMatrix44Conversions::convert):
* platform/graphics/chromium/TransformSkMatrix44Conversions.h:
(TransformSkMatrix44Conversions):

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

6 years agoUnreviewed, rolling out r145435.
commit-queue@webkit.org [Tue, 12 Mar 2013 00:16:50 +0000 (00:16 +0000)]
Unreviewed, rolling out r145435.
http://trac.webkit.org/changeset/145435
https://bugs.webkit.org/show_bug.cgi?id=112082

Still does not compile (Requested by jamesr on #webkit).

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

Source/WebCore:

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::getObjectStores):
(WebCore::IDBBackingStore::createObjectStore):
(WebCore::IDBBackingStore::deleteObjectStore):
(WebCore::IDBBackingStore::getRecord):
(WebCore::IDBBackingStore::putRecord):
(WebCore::IDBBackingStore::clearObjectStore):
(WebCore::IDBBackingStore::deleteRecord):
(WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStore::keyExistsInObjectStore):
(WebCore::IDBBackingStore::getIndexes):
(WebCore::IDBBackingStore::createIndex):
(WebCore::IDBBackingStore::deleteIndex):
(WebCore::IDBBackingStore::putIndexDataForRecord):
(WebCore::IDBBackingStore::findKeyInIndex):
(WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
(WebCore::IDBBackingStore::keyExistsInIndex):
(WebCore::indexCursorOptions):
* Modules/indexeddb/IDBBackingStore.h:
(IDBBackingStore):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::DeleteIndexOperation::create):
(WebCore::DeleteIndexOperation::DeleteIndexOperation):
(DeleteIndexOperation):
(WebCore::IDBDatabaseBackendImpl::openInternal):
(WebCore::IDBDatabaseBackendImpl::deleteIndex):
(WebCore::DeleteIndexOperation::perform):
(WebCore::DeleteRangeOperation::perform):
(WebCore::ClearOperation::perform):
* Modules/indexeddb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
(WebCore::IDBLevelDBCoding::KeyPrefix::encode):
(WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
(WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
(WebCore::IDBLevelDBCoding::DataVersionKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
(WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
(WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
(WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
* Modules/indexeddb/IDBLevelDBCoding.h:
(IDBLevelDBCoding):
(KeyPrefix):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::IndexWriter::writeIndexKeys):

Source/WebKit/chromium:

* tests/IDBBackingStoreTest.cpp:
(WebCore::IDBBackingStoreTest::SetUp):
(IDBBackingStoreTest):
(WebCore::TEST_F):
* tests/IDBFakeBackingStore.h:
* tests/IDBLevelDBCodingTest.cpp:
(IDBLevelDBCoding):
(IDBLevelDBCoding::TEST):

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

6 years agoFirst (of probably many) layer tree rebaselines for r145422
jamesr@google.com [Tue, 12 Mar 2013 00:07:40 +0000 (00:07 +0000)]
First (of probably many) layer tree rebaselines for r145422

* platform/chromium-linux-x86/compositing/overflow/composited-scrolling-paint-phases-expected.txt: Copied from LayoutTests/platform/chromium-linux/compositing/overflow/composited-scrolling-paint-phases-expected.txt.
* platform/chromium-linux/compositing/iframes/become-overlapped-iframe-expected.txt:
* platform/chromium-linux/compositing/iframes/composited-parent-iframe-expected.txt:
* platform/chromium-linux/compositing/iframes/connect-compositing-iframe-delayed-expected.txt:
* platform/chromium-linux/compositing/iframes/connect-compositing-iframe-expected.txt:
* platform/chromium-linux/compositing/iframes/connect-compositing-iframe2-expected.txt:
* platform/chromium-linux/compositing/iframes/connect-compositing-iframe3-expected.txt:
* platform/chromium-linux/compositing/iframes/enter-compositing-iframe-expected.txt:
* platform/chromium-linux/compositing/iframes/iframe-resize-expected.txt:
* platform/chromium-linux/compositing/iframes/iframe-size-from-zero-expected.txt:
* platform/chromium-linux/compositing/iframes/invisible-nested-iframe-show-expected.txt:
* platform/chromium-linux/compositing/iframes/overlapped-iframe-expected.txt:
* platform/chromium-linux/compositing/iframes/resizer-expected.txt:
* platform/chromium-linux/compositing/iframes/scrolling-iframe-expected.txt:
* platform/chromium-linux/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt: Added.
* platform/chromium-linux/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt: Added.
* platform/chromium-linux/compositing/overflow/composited-scrolling-paint-phases-expected.txt:
* platform/chromium-linux/compositing/overflow/textarea-scroll-touch-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-paint-phases-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/textarea-scroll-touch-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/iframes/become-overlapped-iframe-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/iframes/composited-parent-iframe-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/iframes/connect-compositing-iframe-delayed-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/iframes/connect-compositing-iframe-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/iframes/connect-compositing-iframe2-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/iframes/connect-compositing-iframe3-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/iframes/enter-compositing-iframe-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/iframes/iframe-resize-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/iframes/iframe-size-from-zero-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/iframes/invisible-nested-iframe-show-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/iframes/overlapped-iframe-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/iframes/resizer-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/iframes/scrolling-iframe-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt: Added.
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt: Added.
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/overflow/composited-scrolling-paint-phases-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/overflow/textarea-scroll-touch-expected.txt:

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

6 years agoIndexedDB: Protect against key prefix overflows
alecflett@chromium.org [Mon, 11 Mar 2013 23:57:21 +0000 (23:57 +0000)]
IndexedDB: Protect against key prefix overflows
https://bugs.webkit.org/show_bug.cgi?id=111138

Reviewed by Tony Chang.

Source/WebCore:

This reworks the boundary checking for all databaseId,
objectStoreId, and indexId, including negative and
zero-based ids. All entrypoints into IDBLevelDBCoding
are protected with explicit checks and all internal
uses of KeyPrefix are protected with ASSERTs in the
various constructors.

Tests: WebKit unit tests IDBBackingStoreTest.cpp in WebKit/chromium

* Modules/indexeddb/IDBBackingStore.h: Make all public methods boolean-based for errors.
* Modules/indexeddb/IDBLevelDBCoding.h: Add methods for checking databaseId, objectStoreId, and indexId.

Source/WebKit/chromium:

Add tests for invalid indexIds in basic get/put operations.

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

6 years agoReplace static_cast<SVGStyledElement> with toSVGStyledElement()
pdr@google.com [Mon, 11 Mar 2013 23:48:37 +0000 (23:48 +0000)]
Replace static_cast<SVGStyledElement> with toSVGStyledElement()
https://bugs.webkit.org/show_bug.cgi?id=111651

Reviewed by Abhishek Arya.

toSVGStyledElement is preferred over static_cast<SVGStyledElement*> because bad casts
can be caught on our testing infrastructure. This patch replaces all
static_cast<SVGStyledElement> instances with toSVGStyledElement.

Additionally, this patch renames SVGElement::isStyled to SVGElement::isSVGStyledElement to
remove a confusing overlap with html styled elements. This name differs slighly from the
other is*() functions in SVGElement but this will be resolved up with webkit.org/b/107386.

No new tests as this is covered with existing tests.

* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::getElementCTM):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):
* rendering/svg/SVGResources.cpp:
(WebCore::registerPendingResource):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::isTargetAttributeCSSProperty):
(WebCore::SVGAnimationElement::computeCSSPropertyValue):
(WebCore::SVGAnimationElement::adjustForInheritance):
(WebCore::inheritsFromProperty):
* svg/SVGElement.cpp:
(WebCore::collectInstancesForSVGElement):
(WebCore::SVGElement::isAnimatableAttribute):
* svg/SVGElement.h:
(WebCore::SVGElement::isSVGStyledElement):
* svg/SVGElementInstance.cpp:
(WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
(WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker):
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::computeCTM):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::updateRelativeLengthsInformation):
* svg/SVGStyledElement.h:
(WebCore::SVGStyledElement::isSVGStyledElement):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::selfHasRelativeLengths):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):

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

6 years agoPDFPlugin: Make scrolling between pages in non-continuous modes work
timothy_horton@apple.com [Mon, 11 Mar 2013 23:47:20 +0000 (23:47 +0000)]
PDFPlugin: Make scrolling between pages in non-continuous modes work
https://bugs.webkit.org/show_bug.cgi?id=111415
<rdar://problem/12555320>

Reviewed by Alexey Proskuryakov.

* WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
Add some more PDFLayerController SPI.

* WebProcess/Plugins/PDF/PDFPlugin.h:
(PDFPlugin): Override handleWheelEvent.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::handleWheelEvent):
If PDFLayerController is in non-continuous mode, allow scrolling between
pages by intercepting scroll events, and checking whether we're at the
top or bottom of a page. If we are, and a single event exceeds the threshold
of 20px (0px for legacy scroll wheels), we jump to the next or previous
page and scroll to the right place. Do not allow momentum scrolling to
switch pages.

* WebCore.exp.in: Export ScrollableArea::scrollToOffsetWithoutAnimation.

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

6 years agoRemove the use of the quotaMap cache in DatabaseTracker.
mark.lam@apple.com [Mon, 11 Mar 2013 23:44:01 +0000 (23:44 +0000)]
Remove the use of the quotaMap cache in DatabaseTracker.
https://bugs.webkit.org/show_bug.cgi?id=111805.

Reviewed by Geoffrey Garen.

This change is needed because using the quotaMap cache can result in
an inaccurate read (in a multi-process system) on what database files
are actually present on the filesystem. Instead of using the quotaMap
cache, we rely on the tracker database and query it every time we need
the origin/quota information.

No new tests.

* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
(WebCore::DatabaseTracker::hasEntryForOriginNoLock):
(WebCore::DatabaseTracker::origins):
(WebCore::DatabaseTracker::quotaForOriginNoLock):
(WebCore::DatabaseTracker::setQuota):
(WebCore::DatabaseTracker::addDatabase):
(WebCore::DatabaseTracker::deleteOrigin):
* Modules/webdatabase/DatabaseTracker.h:

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

6 years agoDe-flake fast/dom/title-directionality.html
jamesr@google.com [Mon, 11 Mar 2013 23:40:36 +0000 (23:40 +0000)]
De-flake fast/dom/title-directionality.html
https://bugs.webkit.org/show_bug.cgi?id=112075

Reviewed by Adam Barth.

This moves the test logic from an inline script to an onload handler. Otherwise, the whitespace collapsing logic
creates a race between the style recalc timer and the HTML parser which sometimes produces an extra newline at
the end of the text output.

* fast/dom/title-directionality-expected.txt:
* fast/dom/title-directionality.html:

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

6 years agoDon't rely on the fact that StaticPosition happens to be defined as 0
commit-queue@webkit.org [Mon, 11 Mar 2013 23:40:19 +0000 (23:40 +0000)]
Don't rely on the fact that StaticPosition happens to be defined as 0
https://bugs.webkit.org/show_bug.cgi?id=110123

Also made the expression slightly less convoluted.

Patch by Morten Stenshorne <mstensho@opera.com> on 2013-03-11
Reviewed by Alexey Proskuryakov.

No new tests. This is just code cleanup.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock):

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

6 years ago[Autotools] Set ENABLE_GTK_DOC to false if gtk-doc is not installed
commit-queue@webkit.org [Mon, 11 Mar 2013 23:39:05 +0000 (23:39 +0000)]
[Autotools] Set ENABLE_GTK_DOC to false if gtk-doc is not installed
https://bugs.webkit.org/show_bug.cgi?id=111980

Patch by Tobias Mueller <tobiasmue@gnome.org> on 2013-03-11
Reviewed by Martin Robinson.

WebKit did not configure if gtk-doc-am was not installed with the error:
Tools/GNUmakefile.am:419: ENABLE_GTK_DOC does not appear in AM_CONDITIONAL

* Source/autotools/FindDependencies.m4:

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

6 years agoFix some WebDatabaseManagerProxy methods to only send to one WebProcsess
mark.lam@apple.com [Mon, 11 Mar 2013 23:36:07 +0000 (23:36 +0000)]
Fix some WebDatabaseManagerProxy methods to only send to one WebProcsess
instead of broadcasting to all WebProcesses.
https://bugs.webkit.org/show_bug.cgi?id=112074.

Reviewed by Alexey Proskuryakov.

The reason for this is because the intent of these messages is to act on
the tracker database that is shared between all WebProcesses. It is
redundant and inefficient for multiple WebProcesses to service the same
request/message. And because of multi-process contention on accessing
the tracker database, the results returned to the UIProcess may also be
erroneous.

For example, if getDatabaseOrigins() is broadcasted to all WebProcesses,
they will contend to open the tracker database at the same time. If one
of these processes fails because the database is already in use, then
it may return with an empty list when it should not be empty.

With this fix, only one WebProcess gets the message and will perform the
requested query/action on behalf of all WebProcesses.

* UIProcess/WebContext.h:
(WebKit::WebContext::sendToOneProcess):
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
(WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
(WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
(WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
(WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):

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

6 years agoUnreviewed attempt to fix build after http://trac.webkit.org/changeset/145421.
abarth@webkit.org [Mon, 11 Mar 2013 23:25:41 +0000 (23:25 +0000)]
Unreviewed attempt to fix build after trac.webkit.org/changeset/145421.

* html/HTMLPlugInImageElement.cpp:

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

6 years agoIntrinsic width keyword values don't work for tables
ojan@chromium.org [Mon, 11 Mar 2013 23:20:56 +0000 (23:20 +0000)]
Intrinsic width keyword values don't work for tables
https://bugs.webkit.org/show_bug.cgi?id=111515

Reviewed by Julien Chaffraix.

Source/WebCore:

Tests: fast/css-intrinsic-dimensions/css-tables.html
       fast/css-intrinsic-dimensions/tables.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
* rendering/RenderBox.h:
Pass in the border and padding as an argument since RenderTable needs
to pass in a different value. Unfortunately, the math doesn't work out right
in the positioned/replaced cases if we just pass 0. We need to pass in the correct
border and padding and then subtract it from the result.

* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
Compute intrinsic widths as well as specified ones. Down the road
we may want to consider having intrinsic width values return true for
isSpecified.

(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
Compute intrinsic widths as well.

(WebCore::RenderTable::computeIntrinsicLogicalWidths):
Implement this method so that the RenderBox::computeIntrinsicLogicalWidthUsing
gets the right intrinsic values instead of the preferred values.

(WebCore::RenderTable::computePreferredLogicalWidths):
* rendering/RenderTable.h:

LayoutTests:

* fast/css-intrinsic-dimensions/css-tables-expected.txt: Added.
* fast/css-intrinsic-dimensions/css-tables.html: Added.
* fast/css-intrinsic-dimensions/tables-expected.txt: Added.
* fast/css-intrinsic-dimensions/tables.html: Added.

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

6 years agoHTMLInputElement can delete an ImageLoader while it's still needed
schenney@chromium.org [Mon, 11 Mar 2013 23:18:44 +0000 (23:18 +0000)]
HTMLInputElement can delete an ImageLoader while it's still needed
https://bugs.webkit.org/show_bug.cgi?id=110621

Reviewed by Darin Adler.

Source/WebCore:

ImageLoader objects may fire events for HTMLInputElements that are of
type ImageInputType that own the loader. These events may cause script
to run that changes the type of the input element and hence causes the
ImageLoader to be deleted, while the image loader is still processing
the event dispatch. Bad things ensue.

This change moves ownership of the ImageLoader from the ImageInputType
onto the HTMLImageElement which is already protected from deletion during
event processing.

Test: fast/forms/image/image-error-event-modifies-type-crash.html

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::imageLoader): Method to return the
  ImageLoader, creating it if not already created.
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::hasImageLoader): Return true if the
  ImageLoader has been created.
(HTMLInputElement): Define ImageLoader access methods and the OwnPtr
  for the HTMLImageLoader.
* html/ImageInputType.cpp:
(WebCore::ImageInputType::srcAttributeChanged): Use the element's ImageLoader.
(WebCore::ImageInputType::attach): Use the element's ImageLoader.
(WebCore::ImageInputType::willMoveToNewOwnerDocument): Use the element's ImageLoader.
(WebCore::ImageInputType::height): Use the element's ImageLoader.
(WebCore::ImageInputType::width): Use the element's ImageLoader.
* html/ImageInputType.h:
(ImageInputType): Remove the declaration of the ImageLoader.

LayoutTests:

* fast/forms/image/image-error-event-modifies-type-crash-expected.txt: Added.
* fast/forms/image/image-error-event-modifies-type-crash.html: Added.

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

6 years agoRevert "Mark GraphicsLayers as opaque when possible"
alokp@chromium.org [Mon, 11 Mar 2013 22:59:58 +0000 (22:59 +0000)]
Revert "Mark GraphicsLayers as opaque when possible"

This reverts commit 0a4d3c2d8a0373aa9e5bd9209885137a13a7f0e0.

REGRESSION (r143626): http://chainlove.com shows garbage tiles on Mac
https://bugs.webkit.org/show_bug.cgi?id=112043

Unreviewed, rolling out r143626.

Source/WebCore:

* rendering/RenderBox.cpp:
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderBoxModelObject.h:
(RenderBoxModelObject):
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
(RenderLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
* rendering/RenderLayerModelObject.h:
(RenderLayerModelObject):

LayoutTests:

* compositing/absolute-inside-out-of-view-fixed-expected.txt:
* compositing/backing/no-backing-for-clip-expected.txt:
* compositing/backing/no-backing-for-clip-overlap-expected.txt:
* compositing/backing/no-backing-for-perspective-expected.txt:
* compositing/clip-child-by-non-stacking-ancestor-expected.txt:
* compositing/columns/composited-in-paginated-expected.txt:
* compositing/contents-opaque/contents-opaque-background-clip-expected.txt: Removed.
* compositing/contents-opaque/contents-opaque-background-clip.html: Removed.
* compositing/contents-opaque/contents-opaque-background-color-expected.txt: Removed.
* compositing/contents-opaque/contents-opaque-background-color.html: Removed.
* compositing/contents-opaque/contents-opaque-layer-opacity-expected.txt: Removed.
* compositing/contents-opaque/contents-opaque-layer-opacity.html: Removed.
* compositing/contents-opaque/contents-opaque-layer-transform-expected.txt: Removed.
* compositing/contents-opaque/contents-opaque-layer-transform.html: Removed.
* compositing/filters/sw-layer-overlaps-hw-shadow-expected.txt:
* compositing/filters/sw-shadow-overlaps-hw-layer-expected.txt:
* compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt:
* compositing/geometry/bounds-ignores-hidden-dynamic-expected.txt:
* compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt:
* compositing/geometry/bounds-ignores-hidden-expected.txt:
* compositing/geometry/clip-expected.txt:
* compositing/geometry/clip-inside-expected.txt:
* compositing/geometry/fixed-position-composited-switch-expected.txt:
* compositing/geometry/flipped-writing-mode-expected.txt:
* compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt:
* compositing/geometry/layer-due-to-layer-children-switch-expected.txt:
* compositing/geometry/limit-layer-bounds-clipping-ancestor-expected.txt:
* compositing/geometry/limit-layer-bounds-fixed-expected.txt:
* compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt:
* compositing/geometry/limit-layer-bounds-overflow-root-expected.txt:
* compositing/geometry/limit-layer-bounds-positioned-expected.txt:
* compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt:
* compositing/geometry/limit-layer-bounds-transformed-expected.txt:
* compositing/geometry/limit-layer-bounds-transformed-overflow-expected.txt:
* compositing/geometry/preserve-3d-switching-expected.txt:
* compositing/iframes/become-composited-nested-iframes-expected.txt:
* compositing/iframes/become-overlapped-iframe-expected.txt:
* compositing/iframes/composited-parent-iframe-expected.txt:
* compositing/iframes/connect-compositing-iframe-delayed-expected.txt:
* compositing/iframes/connect-compositing-iframe-expected.txt:
* compositing/iframes/connect-compositing-iframe2-expected.txt:
* compositing/iframes/connect-compositing-iframe3-expected.txt:
* compositing/iframes/enter-compositing-iframe-expected.txt:
* compositing/iframes/iframe-resize-expected.txt:
* compositing/iframes/invisible-nested-iframe-hide-expected.txt:
* compositing/iframes/invisible-nested-iframe-show-expected.txt:
* compositing/iframes/overlapped-iframe-expected.txt:
* compositing/iframes/overlapped-iframe-iframe-expected.txt:
* compositing/iframes/overlapped-nested-iframes-expected.txt:
* compositing/iframes/page-cache-layer-tree-expected.txt:
* compositing/iframes/scrolling-iframe-expected.txt:
* compositing/layer-creation/animation-overlap-with-children-expected.txt:
* compositing/layer-creation/fixed-position-and-transform-expected.txt:
* compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt:
* compositing/layer-creation/fixed-position-out-of-view-expected.txt:
* compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt:
* compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt:
* compositing/layer-creation/fixed-position-under-transform-expected.txt:
* compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt:
* compositing/layer-creation/overflow-scroll-overlap-expected.txt:
* compositing/layer-creation/overlap-animation-clipping-expected.txt:
* compositing/layer-creation/overlap-animation-expected.txt:
* compositing/layer-creation/overlap-child-layer-expected.txt:
* compositing/layer-creation/overlap-clipping-expected.txt:
* compositing/layer-creation/overlap-transformed-3d-expected.txt:
* compositing/layer-creation/overlap-transformed-and-clipped-expected.txt:
* compositing/layer-creation/overlap-transformed-layer-expected.txt:
* compositing/layer-creation/overlap-transformed-preserved-3d-expected.txt:
* compositing/layer-creation/overlap-transforms-expected.txt:
* compositing/layer-creation/spanOverlapsCanvas-expected.txt:
* compositing/layer-creation/stacking-context-overlap-expected.txt:
* compositing/layer-creation/translatez-overlap-expected.txt:
* compositing/masks/mask-layer-size-expected.txt:
* compositing/overflow-trumps-transform-style-expected.txt:
* compositing/overflow/clip-descendents-expected.txt:
* compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:
* compositing/overflow/textarea-scroll-touch-expected.txt:
* compositing/plugins/no-backing-store-expected.txt:
* compositing/repaint/invalidations-on-composited-layers-expected.txt:
* compositing/rtl/rtl-absolute-expected.txt:
* compositing/rtl/rtl-absolute-overflow-expected.txt:
* compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt:
* compositing/rtl/rtl-fixed-expected.txt:
* compositing/rtl/rtl-fixed-overflow-expected.txt:
* compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* compositing/rtl/rtl-iframe-absolute-expected.txt:
* compositing/rtl/rtl-iframe-absolute-overflow-expected.txt:
* compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt:
* compositing/rtl/rtl-iframe-fixed-expected.txt:
* compositing/rtl/rtl-iframe-fixed-overflow-expected.txt:
* compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt:
* compositing/rtl/rtl-iframe-relative-expected.txt:
* compositing/rtl/rtl-relative-expected.txt:
* compositing/tiled-layers-hidpi-expected.txt:
* compositing/tiling/backface-preserve-3d-tiled-expected.txt:
* compositing/tiling/crash-reparent-tiled-layer-expected.txt:
* compositing/tiling/huge-layer-add-remove-child-expected.txt:
* compositing/tiling/huge-layer-with-layer-children-expected.txt:
* compositing/tiling/huge-layer-with-layer-children-resize-expected.txt:
* compositing/tiling/rotated-tiled-clamped-expected.txt:
* compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
* compositing/tiling/tile-cache-zoomed-expected.txt:
* compositing/tiling/tiled-layer-resize-expected.txt:
* compositing/visible-rect/2d-transformed-expected.txt:
* compositing/visible-rect/3d-transform-style-expected.txt:
* compositing/visible-rect/3d-transformed-expected.txt:
* compositing/visible-rect/animated-expected.txt:
* compositing/visible-rect/animated-from-none-expected.txt:
* compositing/visible-rect/clipped-by-viewport-expected.txt:
* compositing/visible-rect/clipped-visible-rect-expected.txt:
* compositing/visible-rect/iframe-and-layers-expected.txt:
* compositing/visible-rect/iframe-no-layers-expected.txt:
* compositing/visible-rect/nested-transform-expected.txt:
* compositing/visible-rect/scrolled-expected.txt:
* css3/filters/filtered-compositing-descendant-expected.txt:
* platform/chromium-linux-x86/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt:
* platform/chromium-linux-x86/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt:
* platform/chromium-linux-x86/platform/chromium/virtual/softwarecompositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* platform/chromium-linux-x86/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-absolute-expected.txt:
* platform/chromium-linux-x86/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-fixed-expected.txt:
* platform/chromium-linux-x86/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-relative-expected.txt:
* platform/chromium-linux/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt:
* platform/chromium-linux/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-absolute-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-fixed-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-relative-expected.txt:
* platform/chromium-mac-lion/platform/chromium/virtual/softwarecompositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* platform/chromium-mac-lion/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-absolute-expected.txt:
* platform/chromium-mac-lion/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-fixed-expected.txt:
* platform/chromium-mac-lion/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-relative-expected.txt:
* platform/chromium-mac-snowleopard/platform/chromium/virtual/softwarecompositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* platform/chromium-mac-snowleopard/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-absolute-expected.txt:
* platform/chromium-mac-snowleopard/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-fixed-expected.txt:
* platform/chromium-mac-snowleopard/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-relative-expected.txt:
* platform/chromium-mac/compositing/iframes/invisible-nested-iframe-show-expected.txt:
* platform/chromium-mac/compositing/overflow/textarea-scroll-touch-expected.txt:
* platform/chromium-mac/compositing/repaint/invalidations-on-composited-layers-expected.txt:
* platform/chromium-mac/compositing/tiling/crash-reparent-tiled-layer-expected.txt:
* platform/chromium-mac/compositing/tiling/huge-layer-add-remove-child-expected.txt:
* platform/chromium-mac/compositing/tiling/huge-layer-with-layer-children-expected.txt:
* platform/chromium-mac/compositing/tiling/huge-layer-with-layer-children-resize-expected.txt:
* platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/overflow/textarea-scroll-touch-expected.txt:
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/overflow/textarea-scroll-touch-expected.txt:
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/repaint/invalidations-on-composited-layers-expected.txt:
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-absolute-expected.txt:
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-fixed-expected.txt:
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-relative-expected.txt:
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/tiling/huge-layer-add-remove-child-expected.txt:
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/tiling/huge-layer-with-layer-children-expected.txt:
* platform/chromium-win-xp/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt:
* platform/chromium-win-xp/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt:
* platform/chromium-win-xp/platform/chromium/virtual/softwarecompositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* platform/chromium-win-xp/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-absolute-expected.txt:
* platform/chromium-win-xp/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-fixed-expected.txt:
* platform/chromium-win-xp/platform/chromium/virtual/softwarecompositing/rtl/rtl-iframe-relative-expected.txt:
* platform/chromium-win/compositing/backing/no-backing-for-clip-expected.txt:
* platform/chromium-win/compositing/backing/no-backing-for-clip-overlap-expected.txt:
* platform/chromium-win/compositing/backing/no-backing-for-perspective-expected.txt:
* platform/chromium-win/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt:
* platform/chromium-win/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt:
* platform/chromium-win/compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt:
* platform/chromium-win/compositing/geometry/layer-due-to-layer-children-switch-expected.txt:
* platform/chromium-win/compositing/geometry/limit-layer-bounds-overflow-root-expected.txt:
* platform/chromium-win/compositing/geometry/preserve-3d-switching-expected.txt:
* platform/chromium-win/compositing/iframes/invisible-nested-iframe-show-expected.txt:
* platform/chromium-win/compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt:
* platform/chromium-win/compositing/tiling/crash-reparent-tiled-layer-expected.txt:
* platform/chromium-win/compositing/tiling/huge-layer-add-remove-child-expected.txt:
* platform/chromium-win/compositing/tiling/huge-layer-with-layer-children-expected.txt:
* platform/chromium-win/compositing/tiling/huge-layer-with-layer-children-resize-expected.txt:
* platform/chromium/TestExpectations:
* platform/chromium/compositing/backing/no-backing-for-clip-expected.txt:
* platform/chromium/compositing/backing/no-backing-for-clip-overlap-expected.txt:
* platform/chromium/compositing/backing/no-backing-for-perspective-expected.txt:
* platform/chromium/compositing/columns/composited-in-paginated-expected.txt:
* platform/chromium/compositing/filters/sw-layer-overlaps-hw-shadow-expected.txt:
* platform/chromium/compositing/filters/sw-shadow-overlaps-hw-layer-expected.txt:
* platform/chromium/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt:
* platform/chromium/compositing/geometry/bounds-ignores-hidden-dynamic-negzindex-expected.txt:
* platform/chromium/compositing/geometry/clip-expected.txt:
* platform/chromium/compositing/geometry/clip-inside-expected.txt:
* platform/chromium/compositing/geometry/fixed-position-composited-switch-expected.txt:
* platform/chromium/compositing/geometry/flipped-writing-mode-expected.txt:
* platform/chromium/compositing/geometry/layer-due-to-layer-children-deep-switch-expected.txt:
* platform/chromium/compositing/geometry/limit-layer-bounds-fixed-positioned-expected.txt:
* platform/chromium/compositing/geometry/limit-layer-bounds-overflow-root-expected.txt:
* platform/chromium/compositing/geometry/limit-layer-bounds-positioned-expected.txt:
* platform/chromium/compositing/geometry/limit-layer-bounds-positioned-transition-expected.txt:
* platform/chromium/compositing/geometry/limit-layer-bounds-transformed-expected.txt:
* platform/chromium/compositing/geometry/limit-layer-bounds-transformed-overflow-expected.txt:
* platform/chromium/compositing/geometry/preserve-3d-switching-expected.txt:
* platform/chromium/compositing/iframes/become-composited-nested-iframes-expected.txt:
* platform/chromium/compositing/iframes/become-overlapped-iframe-expected.txt:
* platform/chromium/compositing/iframes/composited-parent-iframe-expected.txt:
* platform/chromium/compositing/iframes/connect-compositing-iframe-delayed-expected.txt:
* platform/chromium/compositing/iframes/connect-compositing-iframe-expected.txt:
* platform/chromium/compositing/iframes/connect-compositing-iframe2-expected.txt:
* platform/chromium/compositing/iframes/connect-compositing-iframe3-expected.txt:
* platform/chromium/compositing/iframes/enter-compositing-iframe-expected.txt:
* platform/chromium/compositing/iframes/iframe-resize-expected.txt:
* platform/chromium/compositing/iframes/iframe-size-from-zero-expected.txt:
* platform/chromium/compositing/iframes/invisible-nested-iframe-hide-expected.txt:
* platform/chromium/compositing/iframes/overlapped-iframe-expected.txt:
* platform/chromium/compositing/iframes/overlapped-iframe-iframe-expected.txt:
* platform/chromium/compositing/iframes/overlapped-nested-iframes-expected.txt:
* platform/chromium/compositing/iframes/resizer-expected.txt:
* platform/chromium/compositing/iframes/scrolling-iframe-expected.txt:
* platform/chromium/compositing/layer-creation/fixed-position-and-transform-expected.txt:
* platform/chromium/compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt:
* platform/chromium/compositing/layer-creation/fixed-position-out-of-view-expected.txt:
* platform/chromium/compositing/layer-creation/fixed-position-under-transform-expected.txt:
* platform/chromium/compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt:
* platform/chromium/compositing/layer-creation/overflow-scroll-overlap-expected.txt:
* platform/chromium/compositing/layer-creation/overlap-animation-clipping-expected.txt:
* platform/chromium/compositing/layer-creation/overlap-animation-expected.txt:
* platform/chromium/compositing/layer-creation/overlap-child-layer-expected.txt:
* platform/chromium/compositing/layer-creation/overlap-clipping-expected.txt:
* platform/chromium/compositing/layer-creation/overlap-transformed-3d-expected.txt:
* platform/chromium/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt:
* platform/chromium/compositing/layer-creation/overlap-transformed-layer-expected.txt:
* platform/chromium/compositing/layer-creation/overlap-transformed-preserved-3d-expected.txt:
* platform/chromium/compositing/layer-creation/overlap-transforms-expected.txt:
* platform/chromium/compositing/layer-creation/spanOverlapsCanvas-expected.txt:
* platform/chromium/compositing/layer-creation/stacking-context-overlap-expected.txt:
* platform/chromium/compositing/layer-creation/translatez-overlap-expected.txt:
* platform/chromium/compositing/overflow-trumps-transform-style-expected.txt:
* platform/chromium/compositing/overflow/clip-descendents-expected.txt:
* platform/chromium/compositing/rtl/rtl-absolute-expected.txt:
* platform/chromium/compositing/rtl/rtl-absolute-overflow-expected.txt:
* platform/chromium/compositing/rtl/rtl-absolute-overflow-scrolled-expected.txt:
* platform/chromium/compositing/rtl/rtl-fixed-expected.txt:
* platform/chromium/compositing/rtl/rtl-fixed-overflow-expected.txt:
* platform/chromium/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* platform/chromium/compositing/rtl/rtl-iframe-absolute-expected.txt:
* platform/chromium/compositing/rtl/rtl-iframe-fixed-expected.txt:
* platform/chromium/compositing/rtl/rtl-iframe-relative-expected.txt:
* platform/chromium/compositing/rtl/rtl-relative-expected.txt:
* platform/chromium/css3/filters/filtered-compositing-descendant-expected.txt:
* platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt:
* platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-expected.txt:
* platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt:
* platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt:
* platform/efl/TestExpectations:
* platform/efl/compositing/repaint/invalidations-on-composited-layers-expected.txt:
* platform/mac-wk2/compositing/visible-rect/iframe-no-layers-expected.txt:
* platform/mac/TestExpectations:
* platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt:
* platform/mac/compositing/iframes/resizer-expected.txt:
* platform/mac/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:
* platform/mac/compositing/repaint/invalidations-on-composited-layers-expected.txt:
* platform/mac/compositing/tiling/backface-preserve-3d-tiled-expected.txt:
* platform/mac/compositing/tiling/crash-reparent-tiled-layer-expected.txt:
* platform/mac/compositing/tiling/huge-layer-add-remove-child-expected.txt:
* platform/mac/compositing/tiling/huge-layer-with-layer-children-expected.txt:
* platform/mac/compositing/tiling/huge-layer-with-layer-children-resize-expected.txt:
* platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
* platform/mac/compositing/tiling/tile-cache-zoomed-expected.txt:
* platform/mac/compositing/tiling/tiled-layer-resize-expected.txt:
* platform/mac/compositing/visible-rect/iframe-no-layers-expected.txt:
* platform/qt-5.0-wk2/compositing/columns/composited-in-paginated-expected.txt:
* platform/qt-5.0-wk2/compositing/geometry/bounds-ignores-hidden-composited-descendant-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/become-composited-nested-iframes-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/become-overlapped-iframe-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/composited-parent-iframe-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/connect-compositing-iframe-delayed-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/connect-compositing-iframe-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/connect-compositing-iframe2-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/connect-compositing-iframe3-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/enter-compositing-iframe-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/iframe-resize-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/invisible-nested-iframe-show-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/overlapped-iframe-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/overlapped-nested-iframes-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/page-cache-layer-tree-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/resizer-expected.txt:
* platform/qt-5.0-wk2/compositing/iframes/scrolling-iframe-expected.txt:
* platform/qt-5.0-wk2/compositing/layer-creation/fixed-position-and-transform-expected.txt:
* platform/qt-5.0-wk2/compositing/layer-creation/fixed-position-under-transform-expected.txt:
* platform/qt-5.0-wk2/compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt:
* platform/qt-5.0-wk2/compositing/rtl/rtl-absolute-overflow-expected.txt:
* platform/qt-5.0-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:
* platform/qt-5.0-wk2/compositing/rtl/rtl-fixed-overflow-scrolled-expected.txt:
* platform/qt-5.0-wk2/compositing/tiled-layers-hidpi-expected.txt:
* platform/qt-5.0-wk2/compositing/tiling/crash-reparent-tiled-layer-expected.txt:
* platform/qt-5.0-wk2/compositing/tiling/huge-layer-add-remove-child-expected.txt:
* platform/qt-5.0-wk2/compositing/tiling/huge-layer-with-layer-children-expected.txt:
* platform/qt-5.0-wk2/compositing/tiling/huge-layer-with-layer-children-resize-expected.txt:
* platform/qt/TestExpectations:
* platform/qt/compositing/backing/no-backing-for-clip-expected.txt:
* platform/qt/compositing/backing/no-backing-for-clip-overlap-expected.txt:
* platform/qt/compositing/backing/no-backing-for-perspective-expected.txt:
* platform/qt/compositing/geometry/preserve-3d-switching-expected.txt:
* platform/qt/compositing/iframes/invisible-nested-iframe-show-expected.txt:
* platform/qt/compositing/layer-creation/no-compositing-for-preserve-3d-expected.txt:
* platform/qt/compositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:
* platform/win/compositing/iframes/overlapped-iframe-iframe-expected.txt:
* platform/win/compositing/tiling/huge-layer-add-remove-child-expected.txt:
* platform/win/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/win/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:

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

6 years agoPlugins created during user gestures (or soon after) should not be snapshotted
dino@apple.com [Mon, 11 Mar 2013 22:51:43 +0000 (22:51 +0000)]
Plugins created during user gestures (or soon after) should not be snapshotted
https://bugs.webkit.org/show_bug.cgi?id=111975

Reviewed by Tim Horton.

There are sites which create plugins in response to user actions, such as clicking
on an image that is acting like a poster frame. In those cases we should never snapshot.

There are some other sites which also create plugins in response to user actions,
but don't necessarily create the content themselves. Instead they run some script
that injects an iframe, and the frame loads a plugin. In order to make sure we don't
snapshot in those cases, we're adding the concept of a blessed plugin. Anything that
is created soon after a *handled* user gesture is not snapshotted. To do this we
mark a timestamp in the document when we've called an event listener for a user
gesture. The plugin element then compares its creation time with the most recent
user action time.

* dom/Document.cpp:
(WebCore::Document::Document): Initialise new timestamp.
(WebCore::Document::resetLastHandledUserGestureTimestamp): Sets the member variable
    to the current time.
* dom/Document.h:
(WebCore::Document::lastHandledUserGestureTimestamp): Getter.

* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners): If there were some event listeners and
    we were processing a user gesture, then reset the timestamp in the document.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Remember if we were created
    during a user gesture.
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Start the plugin
    if we were created during a user gesture, or if we are close enough in time
    to a listener that fired in relation to a user gesture.
* html/HTMLPlugInImageElement.h: New private member flag indicating if we were
    in a user gesture when constructed.

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

6 years agoUnreviewed build fix. Rolling out inadvertent setting of DATA_LOG_TO_FILE.
msaboff@apple.com [Mon, 11 Mar 2013 22:45:06 +0000 (22:45 +0000)]
Unreviewed build fix.  Rolling out inadvertent setting of DATA_LOG_TO_FILE.

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

6 years agoList cache partitions as units instead of as their contents
jpfau@apple.com [Mon, 11 Mar 2013 22:38:27 +0000 (22:38 +0000)]
List cache partitions as units instead of as their contents
https://bugs.webkit.org/show_bug.cgi?id=111909

Reviewed by Maciej Stachowiak.

Source/WebCore:

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

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::getOriginsWithCache): List a cache item as a member of a partition, if possible

Source/WebKit2:

* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
(WebKit::WebResourceCacheManager::cfURLCacheHostNames): Attempt to enumerate cache partitions based on information we have

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

6 years agoUpdate chromium render tree baselines for track cue changes in r145397.
jamesr@google.com [Mon, 11 Mar 2013 22:37:41 +0000 (22:37 +0000)]
Update chromium render tree baselines for track cue changes in r145397.

* platform/chromium-linux/media/track/track-cue-rendering-horizontal-expected.txt: Added.
* platform/chromium-linux/media/track/track-cue-rendering-vertical-expected.txt: Added.
* platform/chromium-mac-lion/media/track/track-cue-rendering-vertical-expected.txt:
* platform/chromium-mac/media/track/track-cue-rendering-horizontal-expected.txt:
* platform/chromium-mac/media/track/track-cue-rendering-vertical-expected.txt:

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

6 years agoCrash beneath operationCreateInlinedArguments running fast/js/dfg-create-inlined...
msaboff@apple.com [Mon, 11 Mar 2013 22:36:28 +0000 (22:36 +0000)]
Crash beneath operationCreateInlinedArguments running fast/js/dfg-create-inlined-arguments-in-closure-inline.html (32-bit only)
https://bugs.webkit.org/show_bug.cgi?id=112067

Reviewed by Geoffrey Garen.

We weren't setting the tag in SetCallee.  Therefore set it to CellTag.

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

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

6 years ago Chromium build fix. Forked files strike again.
ap@apple.com [Mon, 11 Mar 2013 22:32:29 +0000 (22:32 +0000)]
    Chromium build fix. Forked files strike again.

        * platform/network/chromium/ResourceHandle.cpp:
        (WebCore::ResourceHandle::firstRequest):

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

6 years ago[BlackBerry] Add a method to find the ScrollView for a text selection.
commit-queue@webkit.org [Mon, 11 Mar 2013 22:25:51 +0000 (22:25 +0000)]
[BlackBerry] Add a method to find the ScrollView for a text selection.
https://bugs.webkit.org/show_bug.cgi?id=112061

Patch by Genevieve Mak <gmak@rim.com> on 2013-03-11
Reviewed by Rob Buis.

Internally reviewed by Mike Fenton and Jakob Petsovits.
PR #278490

Refactor the code in InRegionScroller so that we can add a method to find
the InRegionScrollableArea for a text selection.

* Api/InRegionScroller.cpp:
(BlackBerry::WebKit::InRegionScrollerPrivate::clipToRect):
    - Pull out recursive clipping code into its own function.
(WebKit):
(BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
(BlackBerry::WebKit::InRegionScrollerPrivate::firstScrollableInRegionForNode):
    - This new method allows us to get just the first scrollable region instead of looking
      for more nested ones. We may want to refactor in the future because some of the code is
      very similar to calculateInRegionScrollableAreasForPoint.
(BlackBerry::WebKit::InRegionScrollerPrivate::clipAndCreateInRegionScrollableArea):
    - Add a convenience method for the previous function
* Api/InRegionScroller.h:
(WebKit):
* Api/InRegionScroller_p.h:
(InRegionScrollerPrivate):

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

6 years agoUnreviewed build fix. Remove stray brace which crept into r145409.
jer.noble@apple.com [Mon, 11 Mar 2013 22:22:33 +0000 (22:22 +0000)]
Unreviewed build fix.  Remove stray brace which crept into r145409.

* WebView/WebFullScreenController.mm:
(-[WebFullScreenController performClose:]):

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

6 years agoFix typo from r145399. Rubber stamped by Abhishek Arya.
jamesr@google.com [Mon, 11 Mar 2013 22:18:58 +0000 (22:18 +0000)]
Fix typo from r145399. Rubber stamped by Abhishek Arya.

* rendering/svg/RenderSVGViewportContainer.h:
(WebCore::toRenderSVGViewportContainer):

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

6 years agoSome StringHasher tests are broken because of missing null termination
ggaren@apple.com [Mon, 11 Mar 2013 22:15:06 +0000 (22:15 +0000)]
Some StringHasher tests are broken because of missing null termination
https://bugs.webkit.org/show_bug.cgi?id=111284

Reviewed by Darin Adler.

* TestWebKitAPI/Tests/WTF/StringHasher.cpp:
(TestWebKitAPI): Added null termination since C strings are null-terminated.
(TestWebKitAPI::TEST): Removed #ifdef's that disabled this testing since
the bug caught by it is now fixed.

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

6 years ago[CSS Exclusions] Refactor the ExclusionPolygon class to enable storing multiple bound...
hmuller@adobe.com [Mon, 11 Mar 2013 22:12:19 +0000 (22:12 +0000)]
[CSS Exclusions] Refactor the ExclusionPolygon class to enable storing multiple boundaries
https://bugs.webkit.org/show_bug.cgi?id=111766

Reviewed by Dirk Schulze.

Refactored the ExclusionPolygon class to enable adding support for shape-margin and shape-padding.
Extracted a new FloatPolygon class which is now used by ExclusionPolygon to represent the shape's
boundary. It will be used to add m_paddedPolygon and m_marginPolygon members to ExclusionPolygon
in a subsequent patch.

No new tests. This is strictly a refactoring of the existing code.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FloatPolygon.cpp: Factored out of Source/WebCore/rendering/ExclusionPolygon.cpp.
(WebCore::determinant):
(WebCore::areCollinearPoints):
(WebCore::areCoincidentPoints):
(WebCore::isPointOnLineSegment):
(WebCore::nextVertexIndex):
(WebCore::FloatPolygon::FloatPolygon):
(WebCore::FloatPolygon::findNextEdgeVertexIndex):
(WebCore::FloatPolygon::overlappingEdges):
(WebCore::leftSide):
(WebCore::FloatPolygon::contains):
(WebCore::VertexPair::overlapsRect):
(WebCore::VertexPair::intersection):
* platform/graphics/FloatPolygon.h: Factored out of Source/WebCore/rendering/ExclusionPolygon.h.
(FloatPolygon):
(WebCore::FloatPolygon::vertexAt):
(WebCore::FloatPolygon::numberOfVertices):
(WebCore::FloatPolygon::fillRule):
(WebCore::FloatPolygon::edgeAt):
(WebCore::FloatPolygon::numberOfEdges):
(WebCore::FloatPolygon::boundingBox):
(WebCore::FloatPolygon::isEmpty):
(VertexPair):
(WebCore::VertexPair::~VertexPair):
(WebCore::VertexPair::minX):
(WebCore::VertexPair::minY):
(WebCore::VertexPair::maxX):
(WebCore::VertexPair::maxY):
(FloatPolygonEdge):
(WebCore::FloatPolygonEdge::previousEdge):
(WebCore::FloatPolygonEdge::nextEdge):
(WebCore::FloatPolygonEdge::polygon):
(WebCore::FloatPolygonEdge::vertexIndex1):
(WebCore::FloatPolygonEdge::vertexIndex2):
(WebCore::FloatPolygonEdge::edgeIndex):
* rendering/ExclusionPolygon.cpp: Now depends on FloatPolygon.
(EdgeIntersection):
(WebCore::leftSide):
(WebCore::computeXIntersection):
(WebCore::getVertexIntersectionVertices):
(WebCore::computeXIntersections):
(WebCore::computeOverlappingEdgeXProjections):
(WebCore::ExclusionPolygon::getExcludedIntervals):
(WebCore::ExclusionPolygon::getIncludedIntervals):
(WebCore::firstFitRectInPolygon):
(WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop):
* rendering/ExclusionPolygon.h: Now depends on FloatPolygon.
(WebCore::OffsetPolygonEdge::OffsetPolygonEdge):
(ExclusionPolygon):
(WebCore::ExclusionPolygon::ExclusionPolygon):

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

6 years ago Roll out part of r144671.
ap@apple.com [Mon, 11 Mar 2013 21:53:58 +0000 (21:53 +0000)]
    Roll out part of r144671.

        ResourceHandle::firstRequest() should not be const(), because it returns a
        non-const reference.

        * platform/network/ResourceHandle.cpp:
        (WebCore::ResourceHandle::firstRequest):
        * platform/network/ResourceHandle.h:

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

6 years agoSource/WebCore: Mac: Cmd-w should close full screen window.
jer.noble@apple.com [Mon, 11 Mar 2013 21:51:19 +0000 (21:51 +0000)]
Source/WebCore: Mac: Cmd-w should close full screen window.
https://bugs.webkit.org/show_bug.cgi?id=108406

Reviewed by Darin Adler.

Pass performClose: requests on to the owning window controller.

* platform/mac/WebCoreFullScreenWindow.mm:
(-[WebCoreFullScreenWindow performClose:]):

Source/WebKit/mac: Mac: Cmd-w should close full screen window.
https://bugs.webkit.org/show_bug.cgi?id=108406

Reviewed by Darin Adler.

Allow the user to close the full screen window with Cmd-w by making the full screen window
closable, and by intercepting performClose:.

* WebView/WebFullScreenController.mm:
(-[WebFullScreenController init]): Create a closable full screen window.
(-[WebFullScreenController performClose:]): When we receive a close request in full screen mode,
    animate out of full screen.

Source/WebKit2: Full screen mode should not exit when application resigns active state.
https://bugs.webkit.org/show_bug.cgi?id=106129

Reviewed by Darin Adler.

Allow the user to close the full screen window with Cmd-w by making the full screen window
closable, and by intercepting performClose:.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController init]): Create a closable full screen window.
(-[WKFullScreenWindowController performClose:]): When we receive a close request in full screen mode,
    animate out of full screen.

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

6 years agoModernize the test visited-link-background-color.html
benjamin@webkit.org [Mon, 11 Mar 2013 21:48:19 +0000 (21:48 +0000)]
Modernize the test visited-link-background-color.html
https://bugs.webkit.org/show_bug.cgi?id=111931

Reviewed by Sam Weinig.

Make the test a ref-test instead of a pixel test.

Use Internals' computedStyleIncludingVisitedInfo to make the test reliable
on platforms where the visited link list is updated asynchronously.

* fast/history/visited-link-background-color-expected.html: Copied from LayoutTests/fast/history/visited-link-background-color.html.
* fast/history/visited-link-background-color.html:
* platform/chromium-linux/fast/history/visited-link-background-color-expected.png: Removed.
* platform/chromium-win/fast/history/visited-link-background-color-expected.png: Removed.
* platform/chromium/TestExpectations:
* platform/chromium/fast/history/visited-link-background-color-expected.png: Removed.
* platform/chromium/fast/history/visited-link-background-color-expected.txt: Removed.
* platform/efl-wk1/fast/history/visited-link-background-color-expected.png: Removed.
* platform/efl/fast/history/visited-link-background-color-expected.png: Removed.
* platform/efl/fast/history/visited-link-background-color-expected.txt: Removed.
* platform/gtk/fast/history/visited-link-background-color-expected.png: Removed.
* platform/gtk/fast/history/visited-link-background-color-expected.txt: Removed.
* platform/mac-wk2/fast/history/visited-link-background-color-expected.png: Removed.
* platform/mac-wk2/fast/history/visited-link-background-color-expected.txt: Removed.
* platform/mac/fast/history/visited-link-background-color-expected.png: Removed.
* platform/mac/fast/history/visited-link-background-color-expected.txt: Removed.
* platform/qt/fast/history/visited-link-background-color-expected.png: Removed.
* platform/qt/fast/history/visited-link-background-color-expected.txt: Removed.

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

6 years ago[GTK] Bump version
csaavedra@igalia.com [Mon, 11 Mar 2013 21:37:44 +0000 (21:37 +0000)]
[GTK] Bump version
https://bugs.webkit.org/show_bug.cgi?id=112055

Reviewed by Martin Robinson.

* Source/autotools/Versions.m4: Bump to 2.1.0

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

6 years ago[Chromium] chromium/linux breaks expectation of select popup background due to bad...
commit-queue@webkit.org [Mon, 11 Mar 2013 21:35:18 +0000 (21:35 +0000)]
[Chromium] chromium/linux breaks expectation of select popup background due to bad UA css rules
https://bugs.webkit.org/show_bug.cgi?id=111873

Patch by Xiyuan Xia <xiyuan@chromium.org> on 2013-03-11
Reviewed by Tony Chang.

Source/WebCore:

On linux the default <select> background color is too dark to use as the
popup background color.  Last fixes:
https://bugs.webkit.org/show_bug.cgi?id=54115 and
https://bugs.webkit.org/show_bug.cgi?id=56023
attempt to fix the problem by applying a lighter background using
special <option> selector. This breaks expectations of some websites.

This CL reverts the bad UA css rules above and provides the lighter
background color if <select> and <option> elements are using the default
background.

No new tests, this tests <select> popups and can be verified by ManualTests/select-scroll.html.

* css/themeChromiumLinux.css:
(select):
* platform/PopupMenuStyle.h:
(WebCore::PopupMenuStyle::PopupMenuStyle):
(WebCore::PopupMenuStyle::backgroundColorType):
(PopupMenuStyle):
* platform/chromium/PopupListBox.cpp:
(WebCore::PopupListBox::paintRow):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::itemStyle):
(WebCore::RenderMenuList::getItemBackgroundColor):
* rendering/RenderMenuList.h:
(RenderMenuList):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::menuStyle):
* rendering/RenderThemeChromiumDefault.cpp:
(WebCore::RenderThemeChromiumDefault::systemColor):

Source/WebKit/chromium:

Update PopupMenuStyle constructor call sites.

* src/AutofillPopupMenuClient.cpp:
(WebKit::AutofillPopupMenuClient::initialize):

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

6 years agoCompile fix. Rubber-stamp by Eric Seidel.
jamesr@google.com [Mon, 11 Mar 2013 21:26:30 +0000 (21:26 +0000)]
Compile fix. Rubber-stamp by Eric Seidel.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):

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

6 years agoFix build for r145397 (part 2)
dgorbik@apple.com [Mon, 11 Mar 2013 21:20:36 +0000 (21:20 +0000)]
Fix build for r145397 (part 2)

Unreviewed.

* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::getDisplayTree):

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

6 years agoFix build for r145397
dgorbik@apple.com [Mon, 11 Mar 2013 21:06:44 +0000 (21:06 +0000)]
Fix build for r145397

Unreviewed.

* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::createTextTrackDisplay):
* html/shadow/MediaControlsChromium.cpp:
(WebCore::MediaControlsChromium::createTextTrackDisplay):
* html/shadow/MediaControlsGtk.cpp:
(WebCore::MediaControlsGtk::createTextTrackDisplay):

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

6 years agoUnreviewed, rolling out r144818.
commit-queue@webkit.org [Mon, 11 Mar 2013 21:03:58 +0000 (21:03 +0000)]
Unreviewed, rolling out r144818.
http://trac.webkit.org/changeset/144818
https://bugs.webkit.org/show_bug.cgi?id=112062

Preparing to rollout r143626, which broke a few websites on
Mac (Requested by alokp on #webkit).

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

* compositing/contents-opaque/contents-opaque-background-color-expected.txt:
* compositing/contents-opaque/contents-opaque-layer-opacity-expected.txt:
* compositing/contents-opaque/contents-opaque-layer-transform-expected.txt:
* platform/chromium/TestExpectations:
* platform/chromium/compositing/contents-opaque/contents-opaque-background-color-expected.txt: Removed.
* platform/chromium/compositing/contents-opaque/contents-opaque-layer-opacity-expected.txt: Removed.
* platform/chromium/compositing/contents-opaque/contents-opaque-layer-transform-expected.txt: Removed.
* platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt: Renamed from LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-out-of-view-scaled-expected.txt.
* platform/chromium/platform/chromium/virtual/softwarecompositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt: Renamed from LayoutTests/platform/chromium/compositing/layer-creation/fixed-position-out-of-view-scaled-scroll-expected.txt.
* platform/efl/TestExpectations:
* platform/efl/compositing/layer-creation/fixed-position-change-out-of-view-in-view-expected.txt:
* platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt:
* platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:

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

6 years agoMake SegmentedVector Noncopyable
oliver@apple.com [Mon, 11 Mar 2013 21:02:39 +0000 (21:02 +0000)]
Make SegmentedVector Noncopyable
https://bugs.webkit.org/show_bug.cgi?id=112059

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Copying a SegmentedVector is very expensive, and really shouldn't
be necessary.  So I've taken the one place where we currently copy
and replaced it with a regular Vector, and replaced the address
dependent logic with a indexing ref instead.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::newLabelScope):
(JSC::BytecodeGenerator::emitComplexJumpScopes):
* bytecompiler/BytecodeGenerator.h:
(BytecodeGenerator):
* bytecompiler/LabelScope.h:
(JSC):
(JSC::LabelScopePtr::LabelScopePtr):
(LabelScopePtr):
(JSC::LabelScopePtr::operator=):
(JSC::LabelScopePtr::~LabelScopePtr):
(JSC::LabelScopePtr::operator*):
(JSC::LabelScopePtr::operator->):
* bytecompiler/NodesCodegen.cpp:
(JSC::DoWhileNode::emitBytecode):
(JSC::WhileNode::emitBytecode):
(JSC::ForNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
(JSC::LabelNode::emitBytecode):

Source/WTF:

Copying a SegmentedVector can be extraordinarily expensive, so we beat
it with the Noncopyable stick - that way we can ensure that if anyone
wants an actual copy they know what they're doing.

* wtf/SegmentedVector.h:
(SegmentedVector):

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

6 years agoUnreviewed, rolling out r145200.
zandobersek@gmail.com [Mon, 11 Mar 2013 21:01:53 +0000 (21:01 +0000)]
Unreviewed, rolling out r145200.
http://trac.webkit.org/changeset/145200
https://bugs.webkit.org/show_bug.cgi?id=112063

Broke a couple of unit tests (Requested by zdobersek on
#webkit).

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

* Scripts/webkitperl/FeatureList.pm:

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

6 years agoAdd ASSERT_WITH_SECURITY_IMPLICATION to catch bad casts.
inferno@chromium.org [Mon, 11 Mar 2013 20:57:44 +0000 (20:57 +0000)]
Add ASSERT_WITH_SECURITY_IMPLICATION to catch bad casts.
https://bugs.webkit.org/show_bug.cgi?id=112060

Reviewed by Eric Seidel.

Source/WebCore:

* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::document):
* accessibility/AccessibilityMenuList.h:
(WebCore::toAccessibilityMenuList):
* accessibility/AccessibilityNodeObject.h:
(WebCore::toAccessibilityNodeObject):
* accessibility/AccessibilityRenderObject.h:
(WebCore::toAccessibilityRenderObject):
* accessibility/AccessibilitySVGRoot.h:
(WebCore::toAccessibilitySVGRoot):
* accessibility/AccessibilitySpinButton.h:
(WebCore::toAccessibilitySpinButton):
(WebCore::toAccessibilitySpinButtonPart):
* accessibility/AccessibilityTable.h:
(WebCore::toAccessibilityTable):
* css/StyleRule.h:
(WebCore::toStyleRuleMedia):
(WebCore::toStyleRuleSupports):
(WebCore::toStyleRuleRegion):
* dom/EventContext.h:
(WebCore::toTouchEventContext):
* fileapi/File.h:
(WebCore::toFile):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::insertAdjacentElement):
(WebCore::contextElementForInsertion):
* html/HTMLMediaElement.h:
(WebCore::toMediaElement):
* html/HTMLMeterElement.h:
(WebCore::toHTMLMeterElement):
* html/HTMLOptionElement.cpp:
(WebCore::toHTMLOptionElement):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::renderProgress):
* html/HTMLProgressElement.h:
(WebCore::toHTMLProgressElement):
* html/HTMLSelectElement.h:
(WebCore::toHTMLSelectElement):
* html/HTMLTableCellElement.cpp:
(WebCore::toHTMLTableCellElement):
* html/HTMLTextFormControlElement.h:
(WebCore::toHTMLTextFormControlElement):
* html/PluginDocument.h:
(WebCore::toPluginDocument):
* html/shadow/DetailsMarkerControl.cpp:
(WebCore::DetailsMarkerControl::summaryElement):
* html/shadow/HTMLContentElement.h:
(WebCore::toHTMLContentElement):
* html/shadow/HTMLShadowElement.h:
(WebCore::toHTMLShadowElement):
* html/shadow/TextFieldDecorationElement.cpp:
(WebCore::TextFieldDecorationElement::hostInput):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::document):
* rendering/InlineTextBox.h:
(WebCore::toInlineTextBox):
* rendering/RenderHTMLCanvas.h:
(WebCore::toRenderHTMLCanvas):
* rendering/RenderScrollbar.h:
(WebCore::toRenderScrollbar):
* rendering/RenderTextFragment.h:
(WebCore::toRenderTextFragment):
* rendering/mathml/RenderMathMLOperator.h:
(WebCore::toRenderMathMLOperator):
* rendering/svg/RenderSVGTextPath.h:
(WebCore::toRenderSVGTextPath):
* rendering/svg/RenderSVGViewportContainer.h:
(WebCore::toRenderSVGViewportContainer):
* svg/graphics/SVGImageChromeClient.h:
(WebCore::toSVGImageChromeClient):

Source/WebKit/chromium:

* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::redirectDataToPlugin):

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

6 years agoFactor HTMLTreeBuilderSimulator out of BackgroundHTMLParser
abarth@webkit.org [Mon, 11 Mar 2013 20:53:47 +0000 (20:53 +0000)]
Factor HTMLTreeBuilderSimulator out of BackgroundHTMLParser
https://bugs.webkit.org/show_bug.cgi?id=112057

Reviewed by Eric Seidel.

Simulating the HTML tree builder is a separate concern from parsing on
the background thread. We plan to re-use the tree builder simulator for
the view-source parser, for example. Also, having the simulator as a
separate object will make it easier to fix
https://bugs.webkit.org/show_bug.cgi?id=109764.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* html/parser/BackgroundHTMLParser.cpp:
(WebCore):
(WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
(WebCore::BackgroundHTMLParser::pumpTokenizer):
* html/parser/BackgroundHTMLParser.h:
(BackgroundHTMLParser):

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

6 years agoNot all properties apply to the '::cue' pseudo-element
dgorbik@apple.com [Mon, 11 Mar 2013 20:43:43 +0000 (20:43 +0000)]
Not all properties apply to the '::cue' pseudo-element
https://bugs.webkit.org/show_bug.cgi?id=110705

Reviewed by Eric Carlson.

Source/WebCore:

Background properties are not inherited and they were not applied to right elements.
Now we apply all ::cue properties to WebVTT cue background box, which -webkit-media-text-track-all-nodes
container was corresponding to. Now it has 'cue' pseudoId instead of '-webkit-media-text-track-all-nodes'.
Property filtering is turned off for user agent rules so that we are still able to apply filtered rules
to this container internally. m_cueContainer is removed because it is no longer needed.
m_allDocumentNodes container was renamed to m_cueBackgroundBox.

Existing tests modified to cover this case.

* css/RuleSet.h:
(WebCore::RuleData::propertyWhitelistType): disable filtering for UA rules.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::sortAndTransferMatchedRules): pass the UA scope to propertyWhitelistType().
* css/mediaControls.css: rename -webkit-media-text-track-all-nodes to 'cue'
(video::cue):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
* html/shadow/MediaControlElements.h:
(MediaControlTextTrackContainerElement):
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::createTextTrackDisplay):
* html/shadow/MediaControlsChromium.cpp:
(WebCore::MediaControlsChromium::createTextTrackDisplay):
* html/shadow/MediaControlsGtk.cpp:
(WebCore::MediaControlsGtk::createTextTrackDisplay):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::TextTrackCue):
(WebCore::TextTrackCue::updateDisplayTree):
(WebCore::TextTrackCue::getDisplayTree):
* html/track/TextTrackCue.h:
(WebCore::TextTrackCue::element):
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride):

LayoutTests:

* media/media-controls.js:
(textTrackDisplayElement):
* media/track/track-css-all-cues-expected.txt:
* media/track/track-css-all-cues.html:
* media/track/track-css-cue-lifetime.html:
* media/track/track-css-matching-default.html:
* media/track/track-css-matching-lang.html:
* media/track/track-css-matching-timestamps.html:
* media/track/track-css-matching.html:
* media/track/track-css-property-whitelist.html:
* media/track/track-in-band-style.html:
* platform/mac/media/track/track-cue-rendering-horizontal-expected.txt:

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

6 years ago[BlackBerry] Set the documentViewportRect and viewport size.
commit-queue@webkit.org [Mon, 11 Mar 2013 20:40:50 +0000 (20:40 +0000)]
[BlackBerry] Set the documentViewportRect and viewport size.
https://bugs.webkit.org/show_bug.cgi?id=112056

Patch by Genevieve Mak <gmak@rim.com> on 2013-03-11
Reviewed by Rob Buis.

Internally reviewed by Mike Fenton and Jakob Petsovits.
PR #278490

* WebKitSupport/InRegionScrollableArea.cpp:
(BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):

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

6 years ago[GTK] WebKit2-only build fails
zandobersek@gmail.com [Mon, 11 Mar 2013 20:22:24 +0000 (20:22 +0000)]
[GTK] WebKit2-only build fails
https://bugs.webkit.org/show_bug.cgi?id=112033

Reviewed by Gustavo Noronha Silva.

Source/WebKit2:

* GNUmakefile.am: Introduce the artifical dependency of libwebkit2gtk on libwebkitgtk only
if building WebKit1 as well. Similarly with the WebKitPluginProcess, depend on libwebkitgtk
only if building WebKit1, the dependency is otherwise not necessary.

Tools:

* GNUmakefile.am: Split the list of files the docs-build.stamp target depends on into the
generic part, WebKit1-specific part and WebKit2-specific part.
* TestWebKitAPI/GNUmakefile.am: The TestGtk executable should not link agains libwebkitgtk
as it is not WebKit1-specific, but should rather link to libWebCore.la and libWebCoreGtk.la
directly.

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

6 years agoUpdate chromium expectations.
jamesr@google.com [Mon, 11 Mar 2013 20:17:33 +0000 (20:17 +0000)]
Update chromium expectations.

* platform/chromium/TestExpectations:

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

6 years agoChromeClient.h doesn’t need to include RenderSnapshottedPlugIn
timothy_horton@apple.com [Mon, 11 Mar 2013 20:03:10 +0000 (20:03 +0000)]
ChromeClient.h doesn’t need to include RenderSnapshottedPlugIn
https://bugs.webkit.org/show_bug.cgi?id=111981

Reviewed by Kentaro Hara.

* page/ChromeClient.h: Remove the extraneous #include.

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

6 years agoVertical writing doesn't work with form controls.
hyatt@apple.com [Mon, 11 Mar 2013 20:00:37 +0000 (20:00 +0000)]
Vertical writing doesn't work with form controls.
https://bugs.webkit.org/show_bug.cgi?id=70211

Reviewed by Simon Fraser.

This is just some basic plumbing work to make textfields and
textareas work with vertical writing modes. This patch leaves the
html.css override alone, so authors can't enable vertical
writing yet.

The changes consist of converting uses of x/y/width/height to
logicalLeft/Top/Width/Height.

* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::paddingLogicalLeft):
(WebCore::RenderBoxModelObject::paddingLogicalRight):
(RenderBoxModelObject):
(WebCore::RenderBoxModelObject::marginLogicalHeight):
(WebCore::RenderBoxModelObject::marginLogicalWidth):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::computeControlLogicalHeight):
(WebCore::RenderSearchField::computeLogicalHeightLimit):
(WebCore::RenderSearchField::centerContainerIfNeeded):
* rendering/RenderSearchField.h:
(RenderSearchField):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::textBlockLogicalHeight):
(WebCore::RenderTextControl::textBlockLogicalWidth):
(WebCore::RenderTextControl::computeLogicalHeight):
(WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
(WebCore::RenderTextControl::computePreferredLogicalWidths):
* rendering/RenderTextControl.h:
(RenderTextControl):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
(WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):
(WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
* rendering/RenderTextControlMultiLine.h:
(RenderTextControlMultiLine):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
(WebCore::RenderTextControlSingleLine::paint):
(WebCore::RenderTextControlSingleLine::computeLogicalHeightLimit):
(WebCore::RenderTextControlSingleLine::layout):
(WebCore::RenderTextControlSingleLine::styleDidChange):
(WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
(WebCore::RenderTextControlSingleLine::computeControlLogicalHeight):
(WebCore::RenderTextControlSingleLine::createInnerTextStyle):
* rendering/RenderTextControlSingleLine.h:
(RenderTextControlSingleLine):
* rendering/style/RenderStyle.h:

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

6 years ago[wk2] Search With [your search provider here] should use NSPerformService in WebKit2/Mac
timothy_horton@apple.com [Mon, 11 Mar 2013 19:59:07 +0000 (19:59 +0000)]
[wk2] Search With [your search provider here] should use NSPerformService in WebKit2/Mac
https://bugs.webkit.org/show_bug.cgi?id=111995
<rdar://problem/12975669>

Reviewed by Sam Weinig.

* UIProcess/WebPageProxy.h:
(WebPageProxy): Add searchTheWeb().
* UIProcess/WebPageProxy.messages.in: Add SearchTheWeb message.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::searchTheWeb): Added. Call out to NSPerformService to search with the system default
search provider, in the browser.

* WebProcess/Plugins/PDF/PDFPlugin.h:
(PDFPlugin): Add performWebSearch().
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFLayerControllerDelegate performWebSearch:]): Added, forward the delegate callback to PDFPlugin.
(WebKit::PDFPlugin::performWebSearch): Added, forward the search string to WebPageProxy.
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::searchWithGoogle): Don't build the old load-Google-in-the-main-frame code on Mac.
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::searchWithGoogle): Instead, send the search string to WebPageProxy.

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

6 years agoTiledBacking scrolling coverage can be unfairly limited for clients who do scrolling...
timothy_horton@apple.com [Mon, 11 Mar 2013 19:57:23 +0000 (19:57 +0000)]
TiledBacking scrolling coverage can be unfairly limited for clients who do scrolling outside the web view
https://bugs.webkit.org/show_bug.cgi?id=111958
<rdar://problem/13356896>

Reviewed by Darin Adler.

Don't limit TiledBacking coverage if the client has opted into using
its exposed rect to allow scrolling above the web view.

* platform/graphics/TiledBacking.h:
* platform/graphics/ca/mac/TileController.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::adjustTiledBackingCoverage):

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

6 years agoAdding myself to the committers.py
dgorbik@apple.com [Mon, 11 Mar 2013 19:54:06 +0000 (19:54 +0000)]
Adding myself to the committers.py

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

6 years agoGetnUniform*vEXT (Robustness extension) passed incorrect parameter in WebGLRenderingC...
commit-queue@webkit.org [Mon, 11 Mar 2013 19:49:56 +0000 (19:49 +0000)]
GetnUniform*vEXT (Robustness extension) passed incorrect parameter in WebGLRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=111450

Patch by Rajeev Sarvaria <rsarvaria@blackberry.com> on 2013-03-11
Reviewed by Rob Buis.

Bufsize argument corrected to size in bytes instead of number of integers or floats.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::getUniform):

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

6 years ago[WK2] Add C API preference: accelerated compositing for overflow scroll
commit-queue@webkit.org [Mon, 11 Mar 2013 19:48:52 +0000 (19:48 +0000)]
[WK2] Add C API preference: accelerated compositing for overflow scroll
https://bugs.webkit.org/show_bug.cgi?id=111916

Patch by Helder Correia <helder.correia@nokia.com> on 2013-03-11
Reviewed by Simon Fraser.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetAcceleratedCompositingForOverflowScrollEnabled):
(WKPreferencesGetAcceleratedCompositingForOverflowScrollEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:

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

6 years agoUnreviewed, rolling out r145375.
commit-queue@webkit.org [Mon, 11 Mar 2013 19:42:02 +0000 (19:42 +0000)]
Unreviewed, rolling out r145375.
http://trac.webkit.org/changeset/145375
https://bugs.webkit.org/show_bug.cgi?id=112050

Does not compile (Requested by jamesr on #webkit).

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

Source/WebCore:

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::getObjectStores):
(WebCore::IDBBackingStore::createObjectStore):
(WebCore::IDBBackingStore::deleteObjectStore):
(WebCore::IDBBackingStore::getRecord):
(WebCore::IDBBackingStore::putRecord):
(WebCore::IDBBackingStore::clearObjectStore):
(WebCore::IDBBackingStore::deleteRecord):
(WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStore::keyExistsInObjectStore):
(WebCore::IDBBackingStore::getIndexes):
(WebCore::IDBBackingStore::createIndex):
(WebCore::IDBBackingStore::deleteIndex):
(WebCore::IDBBackingStore::putIndexDataForRecord):
(WebCore::IDBBackingStore::findKeyInIndex):
(WebCore::IDBBackingStore::getPrimaryKeyViaIndex):
(WebCore::IDBBackingStore::keyExistsInIndex):
(WebCore::indexCursorOptions):
* Modules/indexeddb/IDBBackingStore.h:
(IDBBackingStore):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::DeleteIndexOperation::create):
(WebCore::DeleteIndexOperation::DeleteIndexOperation):
(DeleteIndexOperation):
(WebCore::IDBDatabaseBackendImpl::openInternal):
(WebCore::IDBDatabaseBackendImpl::deleteIndex):
(WebCore::DeleteIndexOperation::perform):
(WebCore::DeleteRangeOperation::perform):
(WebCore::ClearOperation::perform):
* Modules/indexeddb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
(WebCore::IDBLevelDBCoding::KeyPrefix::encode):
(WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
(WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
(WebCore::IDBLevelDBCoding::DataVersionKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
(WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
(WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
(WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
* Modules/indexeddb/IDBLevelDBCoding.h:
(IDBLevelDBCoding):
(KeyPrefix):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::IndexWriter::writeIndexKeys):

Source/WebKit/chromium:

* tests/IDBBackingStoreTest.cpp:
(WebCore::IDBBackingStoreTest::SetUp):
(IDBBackingStoreTest):
(WebCore::TEST_F):
* tests/IDBFakeBackingStore.h:

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

6 years agoCoreIPC crash in NetworkProcess after WebProcess crash.
beidson@apple.com [Mon, 11 Mar 2013 19:24:46 +0000 (19:24 +0000)]
CoreIPC crash in NetworkProcess after WebProcess crash.
<rdar://problem/13124146> and https://bugs.webkit.org/show_bug.cgi?id=112046

Reviewed by Alexey Proskuryakov.

* NetworkProcess/SchedulableLoader.cpp:
(WebKit::SchedulableLoader::connectionToWebProcessDidClose): Don't null out the connection backpointer on crash.

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

6 years agoMutationCallback should be a WebIDL 'callback', not a [Callback] interface
adamk@chromium.org [Mon, 11 Mar 2013 19:16:01 +0000 (19:16 +0000)]
MutationCallback should be a WebIDL 'callback', not a [Callback] interface
https://bugs.webkit.org/show_bug.cgi?id=91406

Reviewed by Adam Barth.

Source/WebCore:

Spec: http://dom.spec.whatwg.org/#mutationcallback

Besides no longer calling handleEvent methods on passed-in objects,
throw a TypeError if a non-function is passed to the MutationObserver constructor.
This is per WebIDL: http://www.w3.org/TR/WebIDL/#es-callback-function

Updated MutationObserver constructor tests to exercise TypeError-throwing behavior.

* bindings/js/JSMutationCallback.cpp:
(WebCore::JSMutationCallback::call): Call the callback directly instead of handing off to JSCallbackData; make return value void.
Use jsArray() to convert from WTF::Vector -> JSArray.
* bindings/js/JSMutationCallback.h:
(JSMutationCallback): Rename handleEvent() to call(), make it void.
* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::JSMutationObserverConstructor::constructJSMutationObserver): Throw if passed a non-function.
* bindings/v8/V8MutationCallback.cpp:
(WebCore::V8MutationCallback::V8MutationCallback): Take a v8::Function instead of a v8::Object.
(WebCore::V8MutationCallback::call): Call the callback directly instead of handing off to invokeCallback(); make return value void.
Use v8Array() to convert form WTF::Vector -> JSArray.
* bindings/v8/V8MutationCallback.h:
(WebCore::V8MutationCallback::create): Take a v8::Function instead of a v8::Object.
(V8MutationCallback): ditto
* bindings/v8/custom/V8MutationObserverCustom.cpp:
(WebCore::V8MutationObserver::constructorCustom): Throw if passed a non-function, cast to a v8::Function when constructing callback.
* dom/MutationCallback.h:
(WebCore): Remove unnecessary typedef.
(MutationCallback): Rename handleEvent() to call(), make it void.
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::deliver): Update MutationCallback method name.

LayoutTests:

* fast/dom/MutationObserver/mutation-observer-constructor-expected.txt:
* fast/dom/MutationObserver/mutation-observer-constructor.html: Add test for TypeError-throwing.
Note that the Number and String cases already threw before this patch.

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

6 years ago[CSS Grid Layout] Handle spanning grid items over specified grid tracks
jchaffraix@webkit.org [Mon, 11 Mar 2013 19:07:54 +0000 (19:07 +0000)]
[CSS Grid Layout] Handle spanning grid items over specified grid tracks
https://bugs.webkit.org/show_bug.cgi?id=111918

Reviewed by Tony Chang.

Source/WebCore:

This change updates the containing block override logic to handle multiple
spanned tracks. This makes the multiple specified grid tracks case work and
will enable us to handle the minmax case once the computation logic has been
updated.

Test: fast/css-grid-layout/grid-item-spanning-resolution.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::logicalContentHeightForChild):
(WebCore::RenderGrid::layoutGridItems):
Updated these functions to use gridAreaBreadthForChild.

(WebCore::RenderGrid::gridAreaBreadthForChild):
Added this helper function to handle multiple spanned grid tracks.

* rendering/RenderGrid.h: Added the previous function.

LayoutTests:

* fast/css-grid-layout/grid-item-spanning-resolution-expected.txt:
We now pass all the tests.

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

6 years agoReplace SVG's static_cast<SVGElement> with toSVGElement()
pdr@google.com [Mon, 11 Mar 2013 18:43:48 +0000 (18:43 +0000)]
Replace SVG's static_cast<SVGElement> with toSVGElement()
https://bugs.webkit.org/show_bug.cgi?id=111651

Reviewed by Abhishek Arya.

toSVGElement is preferred over static_cast because bad casts can be caught on
our testing infrastructure. This patch replaces all static_cast<SVGElement>
instances with toSVGElement.

No new tests as this is just a refactoring.

* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::matchAllRules):
(WebCore::StyleResolver::locateCousinList):
(WebCore::StyleResolver::canShareStyleWithElement):
(WebCore::StyleResolver::locateSharedStyle):
* dom/Element.cpp:
(WebCore::Element::synchronizeAllAttributes):
(WebCore::Element::synchronizeAttribute):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::getElementCTM):
(WebCore::RenderSVGModelObject::checkIntersection):
(WebCore::RenderSVGModelObject::checkEnclosure):
* rendering/svg/RenderSVGResource.cpp:
(WebCore::removeFromCacheAndInvalidateDependencies):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::pathOnlyClipping):
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::buildPrimitives):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::strokeWidth):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::strokeBoundingBox):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):
(WebCore::SVGRenderSupport::applyStrokeStyleToContext):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGPaintingResource):
(WebCore::writeStyle):
(WebCore::operator<<):
* rendering/svg/SVGResources.cpp:
(WebCore::SVGResources::buildCachedResources):
* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::createRenderer):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::adjustForInheritance):
* svg/SVGElement.cpp:
(WebCore::SVGElement::viewportElement):
(WebCore::SVGElement::haveLoadedRequiredResources):
(WebCore::SVGElement::sendSVGLoadEventIfPossible):
(WebCore::SVGElement::childShouldCreateRenderer):
* svg/SVGElement.h:
(WebCore::toSVGElement):
(WebCore):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::buildPendingResource):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::childShouldCreateRenderer):
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::buildStops):
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::nearestViewportElement):
(WebCore::SVGLocatable::farthestViewportElement):
(WebCore::SVGLocatable::computeCTM):
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::buildPendingResource):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::updateRelativeLengthsInformation):
* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::childShouldCreateRenderer):
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::buildPendingResource):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::buildPendingResource):
(WebCore::SVGUseElement::toClipPath):
(WebCore::SVGUseElement::rendererClipChild):
(WebCore::SVGUseElement::buildInstanceTree):
(WebCore::SVGUseElement::hasCycleUseReferencing):
(WebCore::SVGUseElement::expandUseElementsInShadowTree):
(WebCore::SVGUseElement::associateInstancesWithShadowTreeElements):
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::viewTarget):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::buildPendingResource):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):

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

6 years ago[SOUP] ResourceRequest::updateSoupMessage doesn't update the URI of the soup message
commit-queue@webkit.org [Mon, 11 Mar 2013 18:24:21 +0000 (18:24 +0000)]
[SOUP] ResourceRequest::updateSoupMessage doesn't update the URI of the soup message
https://bugs.webkit.org/show_bug.cgi?id=112040

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-03-11
Reviewed by Gustavo Noronha Silva.

* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessage): Update the soup
message URI with the ResourceRequest URL.

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

6 years agoIndexedDB: Protect against key prefix overflows
alecflett@chromium.org [Mon, 11 Mar 2013 17:37:53 +0000 (17:37 +0000)]
IndexedDB: Protect against key prefix overflows
https://bugs.webkit.org/show_bug.cgi?id=111138

Reviewed by Tony Chang.

Source/WebCore:

This reworks the boundary checking for all databaseId,
objectStoreId, and indexId, including negative and
zero-based ids. All entrypoints into IDBLevelDBCoding
are protected with explicit checks and all internal
uses of KeyPrefix are protected with ASSERTs in the
various constructors.

Tests: WebKit unit tests IDBBackingStoreTest.cpp in WebKit/chromium

* Modules/indexeddb/IDBBackingStore.h: Make all public methods boolean-based for errors.
* Modules/indexeddb/IDBLevelDBCoding.h: Add methods for checking databaseId, objectStoreId, and indexId.

Source/WebKit/chromium:

Add tests for invalid indexIds in basic get/put operations.

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

6 years ago[BlackBerry] Disable MathML support
commit-queue@webkit.org [Mon, 11 Mar 2013 17:17:34 +0000 (17:17 +0000)]
[BlackBerry] Disable MathML support
https://bugs.webkit.org/show_bug.cgi?id=111929

Patch by Jeff Rogers <jrogers@rim.com> on 2013-03-11
Reviewed by Rob Buis.

.:

* Source/cmake/OptionsBlackBerry.cmake:

Tools:

* Scripts/webkitperl/FeatureList.pm:

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

6 years ago[BlackBerry] PlatformBlackBerry.cmake: create thin AR archives
commit-queue@webkit.org [Mon, 11 Mar 2013 17:07:51 +0000 (17:07 +0000)]
[BlackBerry] PlatformBlackBerry.cmake: create thin AR archives
https://bugs.webkit.org/show_bug.cgi?id=110580

Patch by Xan Lopez <xlopez@igalia.com> on 2013-03-11
Reviewed by Rob Buis.

Otherwise libwebcore.a goes beyond the 4Gb file size limit and the
link phase fails.

* PlatformBlackBerry.cmake:

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

6 years agoWeb Inspector: fix styles toolbar in the vertical mode.
pfeldman@chromium.org [Mon, 11 Mar 2013 16:07:41 +0000 (16:07 +0000)]
Web Inspector: fix styles toolbar in the vertical mode.
Not reviewed: swapped two lines.

* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype._splitVertically):

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

6 years agoWeb Inspector: [CodeMirror] add token highlight feature
commit-queue@webkit.org [Mon, 11 Mar 2013 15:59:24 +0000 (15:59 +0000)]
Web Inspector: [CodeMirror] add token highlight feature
https://bugs.webkit.org/show_bug.cgi?id=112009

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

Handle CodeMirror's "cursorActivity" event, check selection for being
a word and highlight all its occurrences via CodeMirror.addOverlay method.

No new tests.

* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor):
(WebInspector.CodeMirrorTextEditor.TokenHighlighter):
(WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._cursorChange):
(WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._isWord):
(WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._removeHighlight):
(WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight.nextToken):
(WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight):
* inspector/front-end/cm/cmdevtools.css:
(.cm-token-highlight):

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

6 years agoMake it possible to reuse sandbox extensions
ap@apple.com [Mon, 11 Mar 2013 15:51:56 +0000 (15:51 +0000)]
Make it possible to reuse sandbox extensions
https://bugs.webkit.org/show_bug.cgi?id=111883

Reviewed by Anders Carlsson.

This allows for properly keeping extensions in NetworkBlobRegistry for as long as
they are needed.

The patch also fixes a bug where extensions would leak when navigating between
file:// pages.

* NetworkProcess/SchedulableLoader.cpp:
Revoke the extensions, but don't invalidate - we may need them later.

* Shared/Downloads/Download.cpp:
(WebKit::Download::didFinish):
(WebKit::Download::didFail):
(WebKit::Download::didCancel):
Replaced invalidate() with revoke() and clearing out. SandboxExtension destructor
now requires revocations wto be balanced, as otherwise understanding dual reference
counting in SandboxExtension would be too difficult.

* Shared/SandboxExtension.h: We now keep track of how many times the extension
was consumed. Eventually, we should refactor the class to not have such duplicate
reference counting.
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::SandboxExtension): Initialize use count.
(WebKit::SandboxExtension::~SandboxExtension): We now require consume/revoke calls
to be balanced. This is not hard to do in existing usage, and makes the design much
more reliable.
(WebKit::SandboxExtension::revoke): Don't permanently destroy the extension when
invalidatid, we may need it in the future.
(WebKit::SandboxExtension::consume): Added use counting.

* Shared/WebMemorySampler.cpp: (WebKit::WebMemorySampler::stop): This extension
is not going to be reused.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction): Pending extensions are not consumed,
so there is no need to revoke.
(WebKit::WebPage::SandboxExtensionTracker::invalidate): Pending extension is not
consumed, and the other two always are.
(WebKit::WebPage::SandboxExtensionTracker::setPendingProvisionalSandboxExtension):
Pending extension is never consumed in place, no need to revoke.
(WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): Do not unset
reused committed extension yet - we may need it later if provisional load fails.
Thanks to use counting, we can now consume the same extension as both committed
and provisional.
(WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad): Now the
committed extension can be revoked and replaced.
(WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad): Just revoke
provisional extension, committed one is still in place.

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

6 years agoWeb Inspector: [CodeMirror] set indentation size according to devtools settings
commit-queue@webkit.org [Mon, 11 Mar 2013 15:49:30 +0000 (15:49 +0000)]
Web Inspector: [CodeMirror] set indentation size according to devtools settings
https://bugs.webkit.org/show_bug.cgi?id=111717

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

Set up codemirror indent size according to devtools settings.

No new tests.

* inspector/front-end/CodeMirrorTextEditor.js:
(.get if):
(WebInspector.CodeMirrorTextEditor):

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

6 years agoWeb Inspector: add per image statistics to the native memory snapshot
yurys@chromium.org [Mon, 11 Mar 2013 15:47:44 +0000 (15:47 +0000)]
Web Inspector: add per image statistics to the native memory snapshot
https://bugs.webkit.org/show_bug.cgi?id=112011

Reviewed by Pavel Feldman.

Added per-image statistics to the native memory distribution table.

* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotWorker):
(WebInspector.HeapSnapshotWorker.prototype.createLoader):
(WebInspector.HeapSnapshotWorker.prototype.wrapCallback):
(WebInspector.HeapSnapshotWorker.prototype.callFactoryMethod):
(WebInspector.HeapSnapshotProxyObject.prototype.callFactoryMethod): the method now accepts
proxy constructor function instead of its name. This eliminates unnecessary function lookup.
(WebInspector.HeapSnapshotLoaderProxy):
(WebInspector.HeapSnapshotLoaderProxy.prototype.close):
(WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
(WebInspector.HeapSnapshotProxy.prototype.createRetainingEdgesProvider):
(WebInspector.HeapSnapshotProxy.prototype.createAddedNodesProvider):
(WebInspector.HeapSnapshotProxy.prototype.createDeletedNodesProvider):
(WebInspector.HeapSnapshotProxy.prototype.createNodesProvider):
(WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForClass):
(WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForDominator):
(WebInspector.NativeHeapSnapshotProxy):
(WebInspector.NativeHeapSnapshotProxy.prototype.images):
* inspector/front-end/HeapSnapshotView.js:
(WebInspector.HeapProfileHeader.prototype.snapshotProxyConstructor):
(WebInspector.HeapProfileHeader.prototype._setupWorker):
* inspector/front-end/NativeHeapSnapshot.js:
(WebInspector.NativeHeapSnapshot.prototype.images):
* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.NativeSnapshotNode):
(WebInspector.NativeSnapshotNode.prototype._createSizeCell):
(WebInspector.NativeSnapshotNode.prototype._populate):
(WebInspector.NativeSnapshotNode.prototype._addChildrenFromGraph):
(WebInspector.NativeSnapshotNode.prototype._addImageDetails.didLoad.didReceiveImages):
(WebInspector.NativeSnapshotNode.prototype._addImageDetails):
(WebInspector.NativeSnapshotProfileHeader.prototype.snapshotProxyConstructor):

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

6 years ago[Qt] Enable tiled shadow blur for inset box shadows
allan.jensen@digia.com [Mon, 11 Mar 2013 15:43:06 +0000 (15:43 +0000)]
[Qt] Enable tiled shadow blur for inset box shadows
https://bugs.webkit.org/show_bug.cgi?id=111736

Reviewed by Noam Rosenthal.

Paint inset box-shadows using the optimized tiled shadow blur, instead of
applying shadow blur to the entire painted rect.

This optimizes the default CSS on common pastebin sites.

Tested by existing tests.

* platform/graphics/GraphicsContext.cpp:
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::drawInsetShadowWithTiling):
    Must set fill color before calling clearShadow, as that might clear m_color.
(WebCore::ShadowBlur::drawLayerPieces):
    Ditto.
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::fillRectWithRoundedHole):

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

6 years ago[BlackBerry] SelectionHandler: bring back m_lastSelection attribute
commit-queue@webkit.org [Mon, 11 Mar 2013 15:33:35 +0000 (15:33 +0000)]
[BlackBerry] SelectionHandler: bring back m_lastSelection attribute
https://bugs.webkit.org/show_bug.cgi?id=111972

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-11
Reviewed by Rob Buis.

This was removed in r144515 but is still needed by
SelectionHandler::selectionPositionChanged().

* WebKitSupport/SelectionHandler.h:
(SelectionHandler):

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

6 years ago(tests) make nodesFromRect.js print a list of nodes that were found
commit-queue@webkit.org [Mon, 11 Mar 2013 15:31:36 +0000 (15:31 +0000)]
(tests) make nodesFromRect.js print a list of nodes that were found
https://bugs.webkit.org/show_bug.cgi?id=111793

Patch by Christian Biesinger <cbiesinger@chromium.org> on 2013-03-11
Reviewed by Allan Sandfeld Jensen.

* fast/dom/nodesFromRect/resources/nodesFromRect.js:
(nodeToString):
(nodeListToString):
(check):
(nodesFromRectAsString):
Move node prettyprinting code from nodesFromRectAsString to new
functions nodeToString and nodeListToString, and make use of it in
check().
I've also converted the nodeType checks to use the constants on Node
instead of using magic numbers.

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

6 years ago[BlackBerry] GraphicsLayer: rename notifySyncRequired to notifyFlushRequired
commit-queue@webkit.org [Mon, 11 Mar 2013 15:26:17 +0000 (15:26 +0000)]
[BlackBerry] GraphicsLayer: rename notifySyncRequired to notifyFlushRequired
https://bugs.webkit.org/show_bug.cgi?id=111997

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-11
Reviewed by Rob Buis.

This changed in r130439 but the old name was introduced again by
mistake in r144465.

* platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
(WebCore::GraphicsLayerBlackBerry::notifyFlushRequired):
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::setNeedsCommit):

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

6 years agoInappropriate validation message for required number/date input elements
tkent@chromium.org [Mon, 11 Mar 2013 14:43:40 +0000 (14:43 +0000)]
Inappropriate validation message for required number/date input elements
https://bugs.webkit.org/show_bug.cgi?id=111982

Reviewed by Kentaro Hara.

Source/WebCore:

For validation message, badInput messages should take precedence
over valueMissing messages because users already filled out the
field with a bad value.

Tests: Update fast/forms/validationMessage.html

* html/InputType.cpp:
(WebCore::InputType::validationMessage):
Check badInput first.

LayoutTests:

* fast/forms/validationMessage-expected.txt:
* fast/forms/validationMessage.html:
* platform/chromium/fast/forms/validationMessage-expected.txt:

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

6 years ago[EFL][GTK][WKTR] Regression(r145231): Undefined symbol in libTestRunnerInjectedBundle.so
ch.dumez@sisa.samsung.com [Mon, 11 Mar 2013 14:19:29 +0000 (14:19 +0000)]
[EFL][GTK][WKTR] Regression(r145231): Undefined symbol in libTestRunnerInjectedBundle.so
https://bugs.webkit.org/show_bug.cgi?id=111970

Reviewed by Chris Fleizach.

Provide dummy implementation for AccessibilityUIElement::supportedActions() in ATK
or libTestRunnerInjectedBundle.so cannot be loaded in EFL / GTK otherwise, due to
undefined symbol.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::supportedActions):
(WTR):

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

6 years ago[EFL] Build fix after r143192 when SPELLCHECK is off
g.czajkowski@samsung.com [Mon, 11 Mar 2013 13:54:11 +0000 (13:54 +0000)]
[EFL] Build fix after r143192 when SPELLCHECK is off

Unreviewed build fix when SPELLCHECK macro is off.

* UIProcess/efl/TextCheckerEfl.cpp:
(WebKit):

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

6 years agoWeb Inspector: extract common parts of native profiles
yurys@chromium.org [Mon, 11 Mar 2013 12:43:10 +0000 (12:43 +0000)]
Web Inspector: extract common parts of native profiles
https://bugs.webkit.org/show_bug.cgi?id=111965

Reviewed by Alexander Pavlov.

Extracted common parts of native profiles into NativeProfileTypeBase. Memory
domain dispatcher is now a separate class as it is shared by two native memory
profile types.

Both native memory profile types now capture native heap graph.

* inspector/front-end/NativeMemorySnapshotView.js:
(WebInspector.MemoryAgentDispatcher.instance):
(WebInspector.NativeProfileTypeBase.prototype.buttonClicked.didReceiveMemorySnapshot):
(WebInspector.NativeProfileTypeBase.prototype.buttonClicked):
(WebInspector.NativeSnapshotProfileType):
(WebInspector.NativeSnapshotProfileHeader.prototype._didReceiveMemorySnapshot):
(WebInspector.NativeMemoryProfileType):
(WebInspector.NativeMemoryProfileHeader.prototype._updateSnapshotStatus):
(WebInspector.NativeMemoryProfileHeader.prototype._didReceiveMemorySnapshot):

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

6 years agoUnreviewed EFL gardening.
ch.dumez@sisa.samsung.com [Mon, 11 Mar 2013 12:06:37 +0000 (12:06 +0000)]
Unreviewed EFL gardening.

Unskip most of the websocket hybi test cases on EFL port as they
are passing nowadays.

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

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

6 years ago[chromium] Android apk targets should depend directly on Java library targets
commit-queue@webkit.org [Mon, 11 Mar 2013 11:11:49 +0000 (11:11 +0000)]
[chromium] Android apk targets should depend directly on Java library targets
https://bugs.webkit.org/show_bug.cgi?id=111746

Patch by Chris Hopman <cjhopman@chromium.org> on 2013-03-11
Reviewed by Eric Seidel.

Source/WebKit/chromium:

* WebKitUnitTests.gyp:
Make webkit_unit_tests_apk depend directly on base_java and net_java.

Tools:

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
Make DumpRenderTree_apk depend directly on base_java and net_java.
* TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp:
Make TestWebKitAPI_apk depend directly on base_java.

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

6 years agoUnreviewed, rolling out r145349.
commit-queue@webkit.org [Mon, 11 Mar 2013 10:56:27 +0000 (10:56 +0000)]
Unreviewed, rolling out r145349.
http://trac.webkit.org/changeset/145349
https://bugs.webkit.org/show_bug.cgi?id=111966

Missing code history of Element,PageRuleCollector. (Requested
by tasak on #webkit).

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

* 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@145354 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years ago[V8] Fix V8InjectedScriptManager
commit-queue@webkit.org [Mon, 11 Mar 2013 10:44:33 +0000 (10:44 +0000)]
[V8] Fix V8InjectedScriptManager
https://bugs.webkit.org/show_bug.cgi?id=111968

Patch by Marja Hölttä <marja@chromium.org> on 2013-03-11
Reviewed by Kentaro Hara.

This is needed to make the inspector work after templates for main world
and non-main worlds are separated (bug 111724).

No new tests (no changes in functionality).

* bindings/v8/custom/V8InjectedScriptManager.cpp:
(WebCore::InjectedScriptManager::canAccessInspectedWindow):

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

6 years agoMake sure that CSSSelector::setValue() is never called after parsing its pseudoType.
hayato@chromium.org [Mon, 11 Mar 2013 10:36:21 +0000 (10:36 +0000)]
Make sure that CSSSelector::setValue() is never called after parsing its pseudoType.
https://bugs.webkit.org/show_bug.cgi?id=111957

Reviewed by Hajime Morrita.

It'd be nice to have an assertion here since
CSSSelector::pseudoType() will never parse a new value after it
parses a value and m_pseudoType is set to non-PseudoNotParsed.

No new tests (no change in behaviour).

* css/CSSSelector.h:
(WebCore::CSSSelector::setValue):

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

6 years ago[Chromium] Mark LayoutTests/html5lib/generated/run-tests16-data.html as slow
commit-queue@webkit.org [Mon, 11 Mar 2013 09:55:50 +0000 (09:55 +0000)]
[Chromium] Mark LayoutTests/html5lib/generated/run-tests16-data.html as slow
https://bugs.webkit.org/show_bug.cgi?id=111960

Patch by Alan Cutter <alancutter@chromium.org> on 2013-03-11
Reviewed by Eric Seidel.

Related to V8 performance issue: https://code.google.com/p/v8/issues/detail?id=2567

* platform/chromium/TestExpectations:

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

6 years ago[Qt] Unrewieved gardening. Cleaning up some skip.
zarvai@inf.u-szeged.hu [Mon, 11 Mar 2013 09:53:23 +0000 (09:53 +0000)]
[Qt] Unrewieved gardening. Cleaning up some skip.

* platform/qt-5.0-wk1/TestExpectations:
* platform/qt-5.0-wk2/TestExpectations:
* platform/qt/TestExpectations:
* platform/qt/editing/pasteboard/paste-text-016-expected.txt: Rebaselining after r145296.
* platform/qt/fast/dynamic/002-expected.txt: Rebaselining after r145296.

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

6 years ago[Refactoring] Implement RuleCollector
tasak@google.com [Mon, 11 Mar 2013 09:50:30 +0000 (09:50 +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@145349 268f45cc-cd09-0410-ab3c-d52691b4dbfc

6 years agoXSSAuditor doesn't need a copy of the original document's body.
mkwst@chromium.org [Mon, 11 Mar 2013 09:48:14 +0000 (09:48 +0000)]
XSSAuditor doesn't need a copy of the original document's body.
https://bugs.webkit.org/show_bug.cgi?id=111946

Reviewed by Darin Adler.

The XSSAuditor currently copies the original HTTP body of the document
that's being audited in order to include it into a violation report if
reflected XSS is detected. We don't actually need to do this, as we
have access to the original request information from inside the
XSSAuditorDelegate where the report is generated.
XSSAuditorDelegate::didBlockScript ASSERTs that it's running on the
main thread, so it should be safe to reach through the document's
loader to get that information directly, rather than passing it from
thread to thread via XSSInfo object properties.

* html/parser/XSSAuditor.h:
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init):
(WebCore::XSSAuditor::filterToken):
(WebCore::XSSAuditor::isSafeToSendToAnotherThread):
* html/parser/XSSAuditorDelegate.h:
(WebCore::XSSInfo::create):
(WebCore::XSSInfo::XSSInfo):
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSInfo::isSafeToSendToAnotherThread):
    Drop the XSSInfo and XSSAuditor properties that held an
    isolatedCopy of the the original HTTP body. Depending on the
    document's size, this could be a significant savings.
(WebCore::XSSAuditorDelegate::didBlockScript):
    Reach into the document's loader's original request in order to
    grab the body as a String, and feed that into the violation report
    object.

    As a drive-by, this patch creates a FrameLoader* temporary
    variable to minimize repetition in this area of the code. We use
    the loader a few times, but should only have to grab it once.

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

6 years ago[Chromium] REGRESSION: Closed Captions button not showing properly
silviapf@chromium.org [Mon, 11 Mar 2013 09:40:08 +0000 (09:40 +0000)]
[Chromium] REGRESSION: Closed Captions button not showing properly
https://bugs.webkit.org/show_bug.cgi?id=109871

Reviewed by Jer Noble.

No new tests - covered by existing tests.

Most of the patch was in the meantime covered by a patch to
https://bugs.webkit.org/show_bug.cgi?id=111109 .
This changes a static Chromium-only function name to be consistent with
parent class function names.

* rendering/RenderMediaControlsChromium.cpp:
(WebCore::paintMediaToggleClosedCaptionsButton):
(WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
Rename paintMediaClosedCaptionsButton to paintMediaToggleClosedCaptionsButton.

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

6 years agoRenderSnapshottedPlugIn paints in PaintPhaseBlockBackground instead of PaintPhaseFore...
timothy_horton@apple.com [Mon, 11 Mar 2013 08:43:22 +0000 (08:43 +0000)]
RenderSnapshottedPlugIn paints in PaintPhaseBlockBackground instead of PaintPhaseForeground
https://bugs.webkit.org/show_bug.cgi?id=111962
<rdar://problem/13289335>

Reviewed by Dean Jackson.

RenderSnapshottedPlugIn should paint its snapshot during the foreground
painting phase, instead of BlockBackground, to match normal plugin painting.

* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paint):

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

6 years ago[chromium] remove obsolete user gesture methods from WebFrame
jochen@chromium.org [Mon, 11 Mar 2013 08:32:10 +0000 (08:32 +0000)]
[chromium] remove obsolete user gesture methods from WebFrame
https://bugs.webkit.org/show_bug.cgi?id=111696

Reviewed by Adam Barth.

Source/WebKit/chromium:

* public/WebFrame.h:
(WebFrame):
* src/FrameLoaderClientImpl.cpp:
(WebKit::FrameLoaderClientImpl::dispatchDidNavigateWithinPage):
* src/WebFrameImpl.cpp:
* src/WebFrameImpl.h:
(WebFrameImpl):

Tools:

* DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
(WebTestRunner::TestPlugin::handleInputEvent):
* DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:

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

6 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Mon, 11 Mar 2013 07:49:31 +0000 (07:49 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Removing a few expectations for tests that were rolled out in r145296.
* platform/gtk/editing/pasteboard/paste-text-016-expected.txt: Rebaselining after r145296.
* platform/gtk/fast/dynamic/002-expected.txt: Ditto.

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

6 years agoWeb Inspector: [Elements] XSLT transformation result from the xml-stylesheet PI not...
apavlov@chromium.org [Mon, 11 Mar 2013 07:16:56 +0000 (07:16 +0000)]
Web Inspector: [Elements] XSLT transformation result from the xml-stylesheet PI not rendered
https://bugs.webkit.org/show_bug.cgi?id=111313

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Frame document update upon XSL transformation was never instrumented.
This change instruments the Document::applyXSLTransform() method to that end.

Test: http/tests/inspector/styles/xsl-transformed.xml

* dom/Document.cpp:
(WebCore::Document::applyXSLTransform): Instrumented.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::frameDocumentUpdated): Invoked upon applyXSLTransform().
* inspector/InspectorDOMAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl): Added.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didCommitLoad): Drive-by: simplified.
(WebCore::InspectorInstrumentation::frameDocumentUpdated): Added.

LayoutTests:

* http/tests/inspector/styles/resources/xsl-transformed.xsl: Added.
* http/tests/inspector/styles/xsl-transformed-expected.txt: Added.
* http/tests/inspector/styles/xsl-transformed.xml: Added.

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

6 years agoWebPage::scaledSnapshotWithOptions returns a corrupt snapshot if you request a rect...
timothy_horton@apple.com [Mon, 11 Mar 2013 06:29:59 +0000 (06:29 +0000)]
WebPage::scaledSnapshotWithOptions returns a corrupt snapshot if you request a rect larger than the FrameView’s size
https://bugs.webkit.org/show_bug.cgi?id=111820
<rdar://problem/13375785>

Reviewed by Simon Fraser.

We have to clear the image - there could be area that won’t be painted by the FrameView,
or the FrameView could have a transparent background.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotWithOptions):

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

6 years agoImplement inert subtrees needed for modal <dialog>
falken@chromium.org [Mon, 11 Mar 2013 06:13:05 +0000 (06:13 +0000)]
Implement inert subtrees needed for modal <dialog>
https://bugs.webkit.org/show_bug.cgi?id=110952

Reviewed by Hajime Morrita.

Source/WebCore:

This changes Node::disabled() to return true when a modal dialog is
open and the node is not in the dialog.

Reusing disabled for inertness is useful because then event
targeting and focus control automatically have the desired behavior:
inert nodes are skipped over.

Tests: fast/dom/HTMLDialogElement/closed-dialog-does-not-block-mouse-events.html
       fast/dom/HTMLDialogElement/modal-dialog-blocks-mouse-events.html
       fast/dom/HTMLDialogElement/non-modal-dialog-does-not-block-mouse-events.html

* dom/Document.h:
(WebCore::Document::activeModalDialog): Returns the topmost element in the top layer.
Since now the only elements in the top layer are modal dialogs, it is the active modal dialog.
* dom/Node.cpp:
(WebCore):
(WebCore::Node::isInert): As per the spec, a node that is not an ancestor or descendant of the modal dialog is inert.
(WebCore::Node::disabled): Return false when inert.
* dom/Node.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::disabled): Fall back to the superclass so inert is taken into account.

LayoutTests:

* fast/dom/HTMLDialogElement/closed-dialog-does-not-block-mouse-events-expected.txt: Added.
* fast/dom/HTMLDialogElement/closed-dialog-does-not-block-mouse-events.html: Added.
* fast/dom/HTMLDialogElement/modal-dialog-blocks-mouse-events-expected.txt: Added.
* fast/dom/HTMLDialogElement/modal-dialog-blocks-mouse-events.html: Added.
* fast/dom/HTMLDialogElement/non-modal-dialog-does-not-block-mouse-events-expected.txt: Added.
* fast/dom/HTMLDialogElement/non-modal-dialog-does-not-block-mouse-events.html: Added.

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

6 years agoAdd myself to committers.py
silviapf@chromium.org [Mon, 11 Mar 2013 05:42:02 +0000 (05:42 +0000)]
Add myself to committers.py

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

6 years agoLine breaking opportunities at the end of a text node are missed
glenn@skynav.com [Mon, 11 Mar 2013 03:30:57 +0000 (03:30 +0000)]
Line breaking opportunities at the end of a text node are missed
https://bugs.webkit.org/show_bug.cgi?id=17427

Reviewed by Darin Adler.

Source/WebCore:

When initializing context for determining next break position,
reuse last two characters from previous text node(s) within block.
This additional state is stored in the current LazyLineBreakIterator
as an optimization to prevent having to add two new parameters to
isBreakable().

At present, this fixes only the ASCII shortcut code path, but
does not yet handle the non-ASCII path. Since the ASCII path is
the most performant critical, the handling of this latter path
will be addressed by webkit.org/b/105692.

Additionally test for case where last two characters context
is derived from distinct nodes, possibly with intervening empty
inline node(s).

Test: fast/text/line-break-between-text-nodes.html

* platform/text/TextBreakIterator.h:
(WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
(WebCore::LazyLineBreakIterator::lastCharacter):
(WebCore::LazyLineBreakIterator::secondToLastCharacter):
(WebCore::LazyLineBreakIterator::setLastTwoCharacters):
(WebCore::LazyLineBreakIterator::resetLastTwoCharacters):
(WebCore::LazyLineBreakIterator::updateLastTwoCharacters):
(LazyLineBreakIterator):
Add state variables to retain last two characters of previous text node(s)
for reuse when initializing nextBreakPosition<>() context.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
Record and reset retained last two characters of previous text node(s) as
appropriate.
* rendering/break_lines.cpp:
(WebCore::nextBreakablePosition):
Use state variables holding retained last two characters of previous text node(s)
for when initializing nextBreakPosition<>() context.

LayoutTests:

* fast/text/line-break-between-text-nodes-expected.html: Added.
* fast/text/line-break-between-text-nodes.html: Added.

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

6 years agoFix a typo in http://trac.webkit.org/changeset/145332.
timothy_horton@apple.com [Mon, 11 Mar 2013 01:21:36 +0000 (01:21 +0000)]
Fix a typo in trac.webkit.org/changeset/145332.

Unreviewed.

ENABLE() doesn't use the WTF_ prefix.

* WebProcess/WebPage/WebPage.h:

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

6 years agoNetworkStorageSession leaks its CFURLStorageSessionRef
darin@apple.com [Mon, 11 Mar 2013 01:19:10 +0000 (01:19 +0000)]
NetworkStorageSession leaks its CFURLStorageSessionRef
https://bugs.webkit.org/show_bug.cgi?id=111950
<rdar://problem/13384134>

Reviewed by Sam Weinig.

* platform/network/NetworkStorageSession.h:
Change the argument type of the constructor to a RetainPtr.
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession): Changed
the argument type to a RetainPtr.
(WebCore::NetworkStorageSession::switchToNewTestingSession): Added
calls to adoptCF to adopt the value returned by wkCreatePrivateStorageSession.
(WebCore::NetworkStorageSession::createPrivateBrowsingSession): Ditto.
(WebCore::NetworkStorageSession::cookieStorage): Changed to use adoptCF
instead of the RetainPtr constructor with AdoptCF since the former is
far easier to read.

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

6 years agoAdd bundle API to get the current selection as a WKDOMRange
weinig@apple.com [Sun, 10 Mar 2013 23:12:02 +0000 (23:12 +0000)]
Add bundle API to get the current selection as a WKDOMRange
https://bugs.webkit.org/show_bug.cgi?id=111947
<rdar://problem/13205460>

Reviewed by Gavin Barraclough.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController selectedRange]):
Add new selectedRange property.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::frameWithSelection):
(WebKit::WebPage::currentSelectionAsRange):
* WebProcess/WebPage/WebPage.h:
Get the range by finding the frame that has a selection, and then normalizing it.

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

6 years agoConformance Test 1.0.3 (Beta) function: bufferData undefined value failed.
commit-queue@webkit.org [Sun, 10 Mar 2013 22:37:37 +0000 (22:37 +0000)]
Conformance Test 1.0.3 (Beta) function: bufferData undefined value failed.
https://bugs.webkit.org/show_bug.cgi?id=111641

Patch by Jason Anderssen <janderssen@gmail.com> on 2013-03-10
Reviewed by Dean Jackson.

The WebGL specification requires that a size of 0 is not valid. In javascript, passing in undefined
as a parameter to a long long is the same as passing in 0, so we must check for this incorrect
value and fail.
The test suite in Kronos 1.0.3 failed, test to verify conformance is as follows:
https://www.khronos.org/registry/webgl/sdk/tests/conformance/more/functions/bufferDataBadArgs.html.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::bufferData):
Synthesize error and returned if size is 0.

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

6 years agoSVGDocumentExtensions should use OwnPtr for pending resource maps.
akling@apple.com [Sun, 10 Mar 2013 21:00:46 +0000 (21:00 +0000)]
SVGDocumentExtensions should use OwnPtr for pending resource maps.
<http://webkit.org/b/111943>

Reviewed by Anders Carlsson.

* svg/SVGDocumentExtensions.cpp:
(WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
(WebCore::SVGDocumentExtensions::addPendingResource):
(WebCore::SVGDocumentExtensions::isElementPendingResources):
(WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
(WebCore::SVGDocumentExtensions::removePendingResource):
(WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
(WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval):
* svg/SVGDocumentExtensions.h:
(SVGDocumentExtensions):

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

6 years agoAdd a heuristic to determine the “primary” snapshotted plugin
timothy_horton@apple.com [Sun, 10 Mar 2013 20:40:47 +0000 (20:40 +0000)]
Add a heuristic to determine the “primary” snapshotted plugin
https://bugs.webkit.org/show_bug.cgi?id=111932
<rdar://problem/13270208>

Reviewed by Dean Jackson.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
Forward didCommitLoad to WebPage. Move existing code that manipulated WebPage
itself during didCommitLoad into WebPage, where it belongs.
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoad): Forward didFinishLoad to WebPage.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize m_didFindPrimarySnapshottedPlugin to false.
(WebKit::WebPage::didCommitLoad): Move code from WebPageFrameLoaderClient.
Reset the flag that says we've already found a snapshotted plugin.
(WebKit::WebPage::didFinishLoad):
Call determinePrimarySnapshottedPlugIn when any frame finishes loading. We call this for subframes,
not just the main frame, in case the main frame loads with no "primary" plugins, but a subframe later loads with one.
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
Attempt to find the primary snapshotted plugin on the page, by hit-testing a grid of points spaced 200px apart.
A plugin is considered if it is snapshotted and > 450x300. We scan vertically and left-to-right, only discarding
a previous candidate if another candidate is at least 110% the size of the previous candidate.
This tends to select plugins near the top left of the page, unless there is a significantly larger plugin elsewhere.
(WebKit::WebPage::resetPrimarySnapshottedPlugIn):
* WebProcess/WebPage/WebPage.h:
(WebPage):

* WebCore.exp.in: Export a few things.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::classNameForShadowRoot): If we've been informed that we are the primary snapshotted plugin, add the 'primary' class.
(WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Added
(WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Hand classNameForShadowRoot our primary-ness.
* html/HTMLPlugInImageElement.h:
(HTMLPlugInImageElement): Add storage for m_isPrimarySnapshottedPlugIn.

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

6 years agoXSSAuditor doesn't need a copy of the original document URL.
mkwst@chromium.org [Sun, 10 Mar 2013 19:57:08 +0000 (19:57 +0000)]
XSSAuditor doesn't need a copy of the original document URL.
https://bugs.webkit.org/show_bug.cgi?id=111944

Reviewed by Adam Barth.

When creating an XSSInfo object in response to detecting reflected XSS
on a page, the Auditor was passing in a copy of the document's
original URL for reporting. It doesn't look like we need this, as
XSSInfo's only consumer, XSSAuditorDelegate, runs on the main thread
with access to the document. We can obtain access to the same
information by reading the URL directly from the delegate's Document
object if and when we need it.

* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::didBlockScript):
    Read the document's URL directly in order to create a violation
    report.
(WebCore::XSSInfo::isSafeToSendToAnotherThread):
* html/parser/XSSAuditorDelegate.h:
(WebCore::XSSInfo::create):
(WebCore::XSSInfo::XSSInfo):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init):
(WebCore::XSSAuditor::filterToken):
(WebCore::XSSAuditor::isSafeToSendToAnotherThread):
* html/parser/XSSAuditor.h:
    Remove the copied original URL from both XSSInfo objects and the
    XSSAuditor.

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