[Qt] Add missing support for tiled shadow blur on fillRect
https://bugs.webkit.org/show_bug.cgi?id=90082

Patch by Bruno de Oliveira Abinader <bruno.abinader@basyskom.com> on 2012-06-29
Reviewed by Noam Rosenthal.

This overloaded fillRect implementation also supports this optimization in
certain situations.

* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::fillRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r121562.
http://trac.webkit.org/changeset/121562
https://bugs.webkit.org/show_bug.cgi?id=89945

Broke a couple of editing/pasteboard tests.

* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::length):
(WebCore::PropertySetCSSStyleDeclaration::item):
(WebCore::PropertySetCSSStyleDeclaration::cssText):
(WebCore::PropertySetCSSStyleDeclaration::setCssText):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand):
(WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit):
(WebCore::PropertySetCSSStyleDeclaration::setProperty):
(WebCore::PropertySetCSSStyleDeclaration::removeProperty):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
(WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
(WebCore::PropertySetCSSStyleDeclaration::copy):
(WebCore::PropertySetCSSStyleDeclaration::makeMutable):
(WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches):
(WebCore::InlineCSSStyleDeclaration::didMutate):
(WebCore::InlineCSSStyleDeclaration::parentStyleSheet):
* css/PropertySetCSSStyleDeclaration.h:
(WebCore::PropertySetCSSStyleDeclaration::clearParentElement):
(PropertySetCSSStyleDeclaration):
(WebCore::InlineCSSStyleDeclaration::InlineCSSStyleDeclaration):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::ensureInlineCSSStyleDeclaration):
(WebCore::StylePropertySet::clearParentElement):
(WebCore):
* css/StylePropertySet.h:
(StylePropertySet):
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::destroyInlineStyle):
(WebCore):
* dom/ElementAttributeData.h:
(ElementAttributeData):
* dom/StyledElement.cpp:
(WebCore::StyledElement::~StyledElement):
(WebCore):
(WebCore::StyledElement::styleAttributeChanged):
* dom/StyledElement.h:
(StyledElement):
(WebCore::StyledElement::destroyInlineStyle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for --force parameter to run-performance-tests
https://bugs.webkit.org/show_bug.cgi?id=90279

Reviewed by Dirk Pranke.

It's helpful to be able to run tests from the Skipped list of the performance tests.

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._parse_args):
(PerfTestsRunner._collect_tests):
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py: Add test.
(test_collect_tests_with_skipped_list):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove BUILDING_ON_LEOPARD now that no ports build on Leopard
https://bugs.webkit.org/show_bug.cgi?id=90249

Reviewed by Ryosuke Niwa.

Source/WebCore:

I don't think I quite got it all yet, but this is another step towards
removing Leopard support in WebCore.

* WebCore.exp.in:
* page/AlternativeTextClient.h:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
* platform/graphics/cg/ImageBufferDataCG.h:
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawLineForDocumentMarker):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible):
* platform/mac/WebCoreSystemInterface.h:
* platform/network/Credential.h:
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore):
(WebCore::initializeMaximumHTTPConnectionCountPerHost):
* platform/text/TextChecking.h:
(WebCore):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::containsPaintedContent):

Source/WebKit2:

* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
* WebProcess/WebCoreSupport/WebEditorClient.h:

Source/WTF:

* wtf/ThreadingPthreads.cpp:
(WTF::initializeCurrentThreadInternal):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Adding PrioritizedTexture and replacing ContentsTextureManager
https://bugs.webkit.org/show_bug.cgi?id=84308

Patch by Eric Penner <epenner@google.com> on 2012-06-29
Reviewed by Adrienne Walker.

Source/WebCore:

PrioritizedTextures have a priority such that all texture requests can be
prioritized. There are three steps involved:
    - Call setRequestPriority()
    - Check if the request succeeded with canAcquireBackingTexture()
    - Call acquireBackingTexture() when uploading a new texture.

Internally both the texture requests and the backing textures get sorted.
Requests are sorted so they can be prioritized. Backing textures are sorted
so that they can be recycled/evicted in the right order (lowest priority first).

Prioritizing textures doesn't assign backing textures to texture requests but
rather just marks which textures can have a backing texture "when needed". This
allows us to keep the old textures in use as long as possible.

The unit tests support all the use cases from the original texture manager
but also adds assumptions about priority order throughout all the tests. The
function assertInvariants() is added to test the validity of the manager
and all textures/allocations within it.

The TiledLayerChromium tests are updated to request textures first with
prioritizeTextures(), and update them with the updater (such that allocate
gets called) before pushPropertiesTo is called (when they need to be valid).

* WebCore.gypi:
* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
(WebCore::BitmapCanvasLayerTextureUpdater::Texture::Texture):
(WebCore::BitmapCanvasLayerTextureUpdater::createTexture):
(WebCore::BitmapCanvasLayerTextureUpdater::updateTextureRect):
* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
(WebCore):
(Texture):
(BitmapCanvasLayerTextureUpdater):
* platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture):
(WebCore::BitmapSkPictureCanvasLayerTextureUpdater::createTexture):
* platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
(Texture):
(BitmapSkPictureCanvasLayerTextureUpdater):
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::setTexturePriorities):
(WebCore):
(WebCore::ContentLayerChromium::update):
* platform/graphics/chromium/ContentLayerChromium.h:
(ContentLayerChromium):
* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
(WebCore::createAcceleratedCanvas):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::Texture):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::createTexture):
(WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
* platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
(Texture):
(FrameBufferSkPictureCanvasLayerTextureUpdater):
* platform/graphics/chromium/ImageLayerChromium.cpp:
(WebCore::ImageLayerTextureUpdater::Texture::Texture):
(WebCore::ImageLayerTextureUpdater::createTexture):
(WebCore::ImageLayerTextureUpdater::updateTextureRect):
(WebCore::ImageLayerChromium::setTexturePriorities):
(WebCore):
* platform/graphics/chromium/ImageLayerChromium.h:
(ImageLayerChromium):
* platform/graphics/chromium/LayerChromium.h:
(LayerChromium):
(WebCore::LayerChromium::setTexturePriorities):
* platform/graphics/chromium/LayerTextureUpdater.h:
(WebCore::LayerTextureUpdater::Texture::texture):
(WebCore::LayerTextureUpdater::Texture::swapTextureWith):
(WebCore::LayerTextureUpdater::Texture::Texture):
(Texture):
* platform/graphics/chromium/ScrollbarLayerChromium.cpp:
(WebCore::ScrollbarLayerChromium::pushPropertiesTo):
(WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
(WebCore::ScrollbarLayerChromium::updatePart):
(WebCore):
(WebCore::ScrollbarLayerChromium::setTexturePriorities):
* platform/graphics/chromium/ScrollbarLayerChromium.h:
(ScrollbarLayerChromium):
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::UpdatableTile::managedTexture):
(WebCore::TiledLayerChromium::pushPropertiesTo):
(WebCore::TiledLayerChromium::textureManager):
(WebCore::TiledLayerChromium::createTile):
(WebCore::TiledLayerChromium::tileNeedsBufferedUpdate):
(WebCore::TiledLayerChromium::updateTiles):
(WebCore::TiledLayerChromium::setTexturePriorities):
(WebCore):
(WebCore::TiledLayerChromium::setTexturePrioritiesInRect):
(WebCore::TiledLayerChromium::resetUpdateState):
(WebCore::TiledLayerChromium::updateLayerRect):
(WebCore::TiledLayerChromium::idleUpdateLayerRect):
(WebCore::TiledLayerChromium::needsIdlePaint):
(WebCore::TiledLayerChromium::idlePaintRect):
* platform/graphics/chromium/TiledLayerChromium.h:
(TiledLayerChromium):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::initializeLayerRenderer):
(WebCore::CCLayerTreeHost::deleteContentsTexturesOnImplThread):
(WebCore::CCLayerTreeHost::beginCommitOnImplThread):
(WebCore::CCLayerTreeHost::commitComplete):
(WebCore::CCLayerTreeHost::evictAllContentTextures):
(WebCore::CCLayerTreeHost::contentsTextureManager):
(WebCore::CCLayerTreeHost::updateLayers):
(WebCore::CCLayerTreeHost::prioritizeTextures):
(WebCore::CCLayerTreeHost::deleteTextureAfterCommit):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore):
(CCLayerTreeHost):
* platform/graphics/chromium/cc/CCPrioritizedTexture.cpp: Added.
(WebCore):
(WebCore::CCPrioritizedTexture::CCPrioritizedTexture):
(WebCore::CCPrioritizedTexture::~CCPrioritizedTexture):
(WebCore::CCPrioritizedTexture::setTextureManager):
(WebCore::CCPrioritizedTexture::setDimensions):
(WebCore::CCPrioritizedTexture::requestLate):
(WebCore::CCPrioritizedTexture::acquireBackingTexture):
(WebCore::CCPrioritizedTexture::textureId):
(WebCore::CCPrioritizedTexture::bindTexture):
(WebCore::CCPrioritizedTexture::framebufferTexture2D):
(WebCore::CCPrioritizedTexture::setCurrentBacking):
* platform/graphics/chromium/cc/CCPrioritizedTexture.h: Added.
(WebCore):
(CCPrioritizedTexture):
(WebCore::CCPrioritizedTexture::create):
(WebCore::CCPrioritizedTexture::textureManager):
(WebCore::CCPrioritizedTexture::format):
(WebCore::CCPrioritizedTexture::size):
(WebCore::CCPrioritizedTexture::memorySizeBytes):
(WebCore::CCPrioritizedTexture::setRequestPriority):
(WebCore::CCPrioritizedTexture::requestPriority):
(WebCore::CCPrioritizedTexture::canAcquireBackingTexture):
(WebCore::CCPrioritizedTexture::haveBackingTexture):
(Backing):
(WebCore::CCPrioritizedTexture::Backing::size):
(WebCore::CCPrioritizedTexture::Backing::format):
(WebCore::CCPrioritizedTexture::Backing::memorySizeBytes):
(WebCore::CCPrioritizedTexture::Backing::textureId):
(WebCore::CCPrioritizedTexture::Backing::currentTexture):
(WebCore::CCPrioritizedTexture::Backing::setCurrentTexture):
(WebCore::CCPrioritizedTexture::Backing::Backing):
(WebCore::CCPrioritizedTexture::Backing::~Backing):
(WebCore::CCPrioritizedTexture::isAbovePriorityCutoff):
(WebCore::CCPrioritizedTexture::setAbovePriorityCutoff):
(WebCore::CCPrioritizedTexture::setManagerInternal):
(WebCore::CCPrioritizedTexture::currentBacking):
* platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: Added.
(WebCore):
(WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager):
(WebCore::CCPrioritizedTextureManager::~CCPrioritizedTextureManager):
(WebCore::CCPrioritizedTextureManager::setMemoryAllocationLimitBytes):
(WebCore::CCPrioritizedTextureManager::prioritizeTextures):
(WebCore::CCPrioritizedTextureManager::clearPriorities):
(WebCore::CCPrioritizedTextureManager::requestLate):
(WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
(WebCore::CCPrioritizedTextureManager::reduceMemory):
(WebCore::CCPrioritizedTextureManager::clearAllMemory):
(WebCore::CCPrioritizedTextureManager::allBackingTexturesWereDeleted):
(WebCore::CCPrioritizedTextureManager::unlink):
(WebCore::CCPrioritizedTextureManager::link):
(WebCore::CCPrioritizedTextureManager::registerTexture):
(WebCore::CCPrioritizedTextureManager::unregisterTexture):
(WebCore::CCPrioritizedTextureManager::returnBackingTexture):
(WebCore::CCPrioritizedTextureManager::createBacking):
(WebCore::CCPrioritizedTextureManager::destroyBacking):
(WebCore::CCPrioritizedTextureManager::assertInvariants):
* platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: Added.
(WebCore):
(CCPrioritizedTextureManager):
(WebCore::CCPrioritizedTextureManager::create):
(WebCore::CCPrioritizedTextureManager::createTexture):
(WebCore::CCPrioritizedTextureManager::memoryUseBytes):
(WebCore::CCPrioritizedTextureManager::memoryAboveCutoffBytes):
(WebCore::CCPrioritizedTextureManager::setMaxMemoryLimitBytes):
(WebCore::CCPrioritizedTextureManager::maxMemoryLimitBytes):
(WebCore::CCPrioritizedTextureManager::setPreferredMemoryLimitBytes):
(WebCore::CCPrioritizedTextureManager::preferredMemoryLimitBytes):
(WebCore::CCPrioritizedTextureManager::setMaxMemoryPriorityCutoff):
(WebCore::CCPrioritizedTextureManager::maxMemoryPriorityCutoff):
(WebCore::CCPrioritizedTextureManager::compareTextures):
(WebCore::CCPrioritizedTextureManager::compareBackings):
* platform/graphics/chromium/cc/CCPriorityCalculator.cpp: Added.
(WebCore):
(WebCore::CCPriorityCalculator::uiPriority):
(WebCore::CCPriorityCalculator::visiblePriority):
(WebCore::CCPriorityCalculator::lingeringPriority):
(WebCore::CCPriorityCalculator::priorityFromDistance):
(WebCore::CCPriorityCalculator::priorityFromVisibility):
* platform/graphics/chromium/cc/CCPriorityCalculator.h: Added.
(WebCore):
(CCPriorityCalculator):
(WebCore::CCPriorityCalculator::highestPriority):
(WebCore::CCPriorityCalculator::lowestPriority):
(WebCore::CCPriorityCalculator::priorityIsLower):
(WebCore::CCPriorityCalculator::priorityIsHigher):
* platform/graphics/chromium/cc/CCTextureUpdater.cpp:

Source/WebKit/chromium:

* WebKit.gypi:
* tests/CCLayerTreeHostTest.cpp:
(WTF::CCLayerTreeHostTestAtomicCommitWithPartialUpdate::commitCompleteOnCCThread):
* tests/CCPrioritizedTextureTest.cpp: Added.
(WTF):
(CCPrioritizedTextureTest):
(WTF::CCPrioritizedTextureTest::CCPrioritizedTextureTest):
(WTF::CCPrioritizedTextureTest::~CCPrioritizedTextureTest):
(WTF::CCPrioritizedTextureTest::texturesMemorySize):
(WTF::CCPrioritizedTextureTest::createManager):
(WTF::CCPrioritizedTextureTest::validateTexture):
(WTF::CCPrioritizedTextureTest::allocator):
(WTF::TEST_F):
* tests/CCTiledLayerTestCommon.cpp:
(WebKitTests::FakeLayerTextureUpdater::Texture::Texture):
(WebKitTests::FakeLayerTextureUpdater::Texture::updateRect):
(WebKitTests::FakeLayerTextureUpdater::createTexture):
(WebKitTests::FakeTiledLayerChromium::FakeTiledLayerChromium):
(WebKitTests::FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds):
* tests/CCTiledLayerTestCommon.h:
(Texture):
(FakeLayerTextureUpdater):
(FakeTiledLayerChromium):
(FakeTiledLayerWithScaledBounds):
* tests/TiledLayerChromiumTest.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r121547.
http://trac.webkit.org/changeset/121547
https://bugs.webkit.org/show_bug.cgi?id=90256

Breaks Chromium Mac build

* platform/LocalizedStrings.cpp:
(WebCore::imageTitle):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setAllowsFontSmoothing):
* platform/graphics/cg/ImageCG.cpp:
(WebCore::Image::drawPattern):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::clear):
* platform/graphics/cg/PathCG.cpp:
(WebCore::Path::boundingRect):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore):
(WebCore::canSetCascadeListForCustomFont):
(WebCore::FontPlatformData::ctFont):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
* platform/graphics/mac/ComplexTextController.cpp:
* platform/graphics/mac/FontCacheMac.mm:
(WebCore):
(WebCore::fontCacheATSNotificationCallback):
(WebCore::FontCache::platformInit):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::~FontCustomPlatformData):
(WebCore::createFontCustomPlatformData):
* platform/graphics/mac/FontCustomPlatformData.h:
(WebCore::FontCustomPlatformData::FontCustomPlatformData):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::platformInit):
* platform/graphics/mac/WebLayer.h:
* platform/mac/CursorMac.mm:
(WebCore::Cursor::ensurePlatformCursor):
* platform/mac/DisplaySleepDisabler.cpp:
(WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
(WebCore):
(WebCore::DisplaySleepDisabler::systemActivityTimerFired):
* platform/mac/DisplaySleepDisabler.h:
(DisplaySleepDisabler):
* platform/mac/HTMLConverter.h:
* platform/mac/HTMLConverter.mm:
* platform/mac/PopupMenuMac.mm:
(WebCore::PopupMenuMac::populate):
* platform/mac/ScrollElasticityController.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add blitVisibleContents() as public API.
https://bugs.webkit.org/show_bug.cgi?id=90211

Reviewed by Adam Treat.

We keep blitContents() (with src/dst rectangles)
for compatibility with older Cascades sprints for now,
but want to switch to always blitting the full viewport
and this is a good first step.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):
(BlackBerry::WebKit::BackingStore::blitVisibleContents):
(WebKit):
* Api/BackingStore.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix rebaselining for Qt and Apple ports
https://bugs.webkit.org/show_bug.cgi?id=90204

Reviewed by Dirk Pranke.

-Apporpriately put wk2 results in the -wk2 directories.
-Since Qt and Apple-Win don't have bots that correspond to the
platform/qt and platform/win directories, we need to fudge it
and always put the results in those directories for those ports.

* Scripts/webkitpy/layout_tests/port/builders.py:
(rebaseline_override_dir):
* Scripts/webkitpy/layout_tests/port/factory.py:
(_builder_options):
Identify webkit2 builders by the WK2 in the builder name.
* Scripts/webkitpy/tool/commands/rebaseline.py:
(RebaselineTest._baseline_directory):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(TestRebaseline.test_baseline_directory):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r121572.
http://trac.webkit.org/changeset/121572
https://bugs.webkit.org/show_bug.cgi?id=90249

Breaks Mac build since it depends on r121547, which was rolled
out

Source/WebCore:

* WebCore.exp.in:
* page/AlternativeTextClient.h:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
* platform/graphics/cg/ImageBufferDataCG.h:
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawLineForDocumentMarker):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible):
* platform/mac/WebCoreSystemInterface.h:
* platform/network/Credential.h:
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore):
(WebCore::initializeMaximumHTTPConnectionCountPerHost):
* platform/text/TextChecking.h:
(WebCore):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::containsPaintedContent):

Source/WebKit2:

* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
* WebProcess/WebCoreSupport/WebEditorClient.h:

Source/WTF:

* wtf/ThreadingPthreads.cpp:
(WTF::initializeCurrentThreadInternal):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] [GTK] [QT] fast/viewport/viewport-91.html is failing after r121555
https://bugs.webkit.org/show_bug.cgi?id=90287

Unreviewed gardening. Skip fast/viewport/viewport-91.html
for EFL, GTK and QT ports. The test is failing after r121555.

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-06-29

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Share the same cache in HTMLCollection and DynamicNodeLists
https://bugs.webkit.org/show_bug.cgi?id=90118

Reviewed by Anders Carlsson.

This patch introduces two new base classes DynamicNodeListCacheBase and HTMLCollectionCacheBase to share
the cache object between DynamicNodeList and HTMLCollection. HTMLCollectionCacheBase inherits from
DynamicNodeListCacheBase and contains extra caches and bit flags for HTMLCollection. DynamicNodeList::Cache
and HTMLCollection::Cache had been removed and flattened into these two classes for the easy inheritance.

In DynamicNodeList, we have a very straight forward one-to-one mapping from old Caches member variables:

m_caches.lastItem -> cachedItem()
m_caches.lastItemOffset -> cachedItemOffset()
m_caches.cachedLength -> cachedLength()
m_caches.isItemCacheValid -> isItemCacheValid()
m_caches.isLengthCacheValid -> isLengthCacheValid()
m_caches.type -> removed because it was never used.
m_caches.rootedAtDocument -> isRootedAtDocument()
m_caches.shouldInvalidateOnAttributeChange -> shouldInvalidateOnAttributeChange()

In HTMLCollection, there is one semantic change in the way item cache is managed. Previously, we only had
m_cache.current which was used as both cachedItem() and isItemCacheValid() (not valid when current is null).
There are some asymmetric code changes due to one-to-many relationship. Also, all method names have been updated
to use that of DynamicNodeList terminology. Thus we have the following correspondence:

m_cache.current -> cachedItem() / isItemCacheValid()
m_cache.position -> cachedItemOffset()
m_cache.length -> cachedLength()
m_cache.elementsArrayPosition -> cachedElementsArrayOffset()
m_cache.hasLength -> isLengthCacheValid()
m_cache.hasNameCache -> hasNameCache() / setHasNameCache()
m_cache.idCache -> idCache() / addIdCache()
m_cache.nameCache -> idCache() / addNameCache()

In addition, we had to rename HTMLCollection::clearCache to invalidateCache to avoid the name collision with
HTMLCollectionCacheBase::clearCache.

* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::length):
(WebCore::ChildNodeList::item):
* dom/DynamicNodeList.cpp:
(WebCore::DynamicSubtreeNodeList::length):
(WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
(WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
(WebCore::DynamicSubtreeNodeList::item):
* dom/DynamicNodeList.h:
(DynamicNodeListCacheBase):
(WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
(WebCore::DynamicNodeListCacheBase::isRootedAtDocument):
(WebCore::DynamicNodeListCacheBase::shouldInvalidateOnAttributeChange):
(WebCore::DynamicNodeListCacheBase::isItemCacheValid):
(WebCore::DynamicNodeListCacheBase::cachedItem):
(WebCore::DynamicNodeListCacheBase::cachedItemOffset):
(WebCore::DynamicNodeListCacheBase::isLengthCacheValid):
(WebCore::DynamicNodeListCacheBase::cachedLength):
(WebCore::DynamicNodeListCacheBase::setLengthCache):
(WebCore::DynamicNodeListCacheBase::setItemCache):
(WebCore::DynamicNodeListCacheBase::clearCache):
(WebCore):
(WebCore::DynamicNodeList::DynamicNodeList):
(WebCore::DynamicNodeList::invalidateCache):
(WebCore::DynamicNodeList::rootNode):
(DynamicNodeList):
* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::namedItemWithIndex):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::invalidateCacheIfNeeded):
(WebCore::HTMLCollection::invalidateCache):
(WebCore::HTMLCollection::isAcceptableElement):
(WebCore::HTMLCollection::itemAfter):
(WebCore::HTMLCollection::length):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::checkForNameMatch):
(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
(WebCore::HTMLCollection::hasNamedItem):
(WebCore::HTMLCollection::namedItems):
(WebCore::HTMLCollectionCacheBase::append):
* html/HTMLCollection.h:
(HTMLCollectionCacheBase):
(WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
(WebCore::HTMLCollectionCacheBase::type):
(WebCore::HTMLCollectionCacheBase::clearCache):
(WebCore::HTMLCollectionCacheBase::setItemCache):
(WebCore::HTMLCollectionCacheBase::cachedElementsArrayOffset):
(WebCore::HTMLCollectionCacheBase::includeChildren):
(WebCore::HTMLCollectionCacheBase::cacheTreeVersion):
(WebCore::HTMLCollectionCacheBase::idCache):
(WebCore::HTMLCollectionCacheBase::nameCache):
(WebCore::HTMLCollectionCacheBase::appendIdCache):
(WebCore::HTMLCollectionCacheBase::appendNameCache):
(WebCore::HTMLCollectionCacheBase::hasNameCache):
(WebCore::HTMLCollectionCacheBase::setHasNameCache):
(WebCore):
(WebCore::HTMLCollection::isEmpty):
(WebCore::HTMLCollection::hasExactlyOneItem):
(WebCore::HTMLCollection::base):
(HTMLCollection):
* html/HTMLFormCollection.cpp:
(WebCore::HTMLFormCollection::item):
(WebCore::HTMLFormCollection::updateNameCache):
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::itemAfter):
* html/HTMLNameCollection.h:
(HTMLNameCollection):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::invalidateSelectedItems):
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::itemAfter):
* html/HTMLTableRowsCollection.h:
(HTMLTableRowsCollection):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening, adding a new baseline required after r121555.

* platform/gtk/fast/viewport/viewport-91-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mac build fix after r121575. It rolls out r121547 but didn't roll out the follow up build fix r121553.

* platform/graphics/mac/FontCustomPlatformData.h:
(FontCustomPlatformData):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove mapRect and mapQuad from WebTransformationMatrix
https://bugs.webkit.org/show_bug.cgi?id=90230

Reviewed by Adrienne Walker.

Source/Platform:

Removes clipping-unaware mapRect, mapQuad and projectPoint functions from the WebTransformationMatrix interface.

* chromium/public/WebTransformationMatrix.h:
(WebTransformationMatrix):

Source/WebCore:

Replaces calls to WebTransformationMatrix::mapRect/mapQuad with clipping-aware calls to CCMathUtils. In most
cases, we do not expect clipping to happen. For others (such as area calculations in CCOverdrawMetrics) we can
handle a clipped quad easily.

* platform/chromium/support/WebTransformationMatrix.cpp:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawRenderPassQuad):
(WebCore::LayerRendererChromium::drawTileQuad):
* platform/graphics/chromium/RenderSurfaceChromium.cpp:
(WebCore::RenderSurfaceChromium::drawableContentRect):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::getDrawRect):
* platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
(WebCore::transformSurfaceOpaqueRegion):
(WebCore::addOcclusionBehindLayer):
* platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
(WebCore):
(WebCore::polygonArea):
(WebCore::areaOfMappedQuad):
(WebCore::CCOverdrawMetrics::didUpload):
(WebCore::CCOverdrawMetrics::didCullForDrawing):
(WebCore::CCOverdrawMetrics::didDraw):
* platform/graphics/chromium/cc/CCRenderPass.cpp:
(WebCore::CCRenderPass::appendQuadsToFillScreen):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::drawableContentRect):
* platform/graphics/chromium/cc/CCSharedQuadState.cpp:
(WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Can’t get basic element info from a WKRenderObject
https://bugs.webkit.org/show_bug.cgi?id=90301

Reviewed by Anders Carlsson.

Moved the element info (tag name, id and class names) from WebRenderLayer to WebRenderObject,
and gave WebRenderLayer a reference to a (shallow) WebRenderObject. Added WKRenderObject API
for getting element info, while leaving the WKRenderLayer API in place for now for Safari.

* Shared/API/c/WKRenderLayer.cpp:
(WKRenderLayerGetRenderer): Added this wrapper.
(WKRenderLayerCopyRendererName): Changed to get the name from the renderer.
(WKRenderLayerCopyElementTagName): Changed to go through the renderer.
(WKRenderLayerCopyElementID): Ditto.
(WKRenderLayerGetElementClassNames): Ditto.
* Shared/API/c/WKRenderLayer.h: Added declaration of WKRenderLayerGetRenderer() and comments
about removing older API.
* Shared/API/c/WKRenderObject.cpp:
(WKRenderObjectCopyElementTagName): Added this wrapper.
(WKRenderObjectCopyElementID): Ditto.
(WKRenderObjectGetElementClassNames): Ditto.
* Shared/API/c/WKRenderObject.h:
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode): Removed the element info from the encoding of
WebRenderLayer, and added the renderer. Added the element info to the encoding of
WebRenderObject.
(WebKit::UserMessageDecoder::baseDecode): Updated to match the encoding changes.
* Shared/WebRenderLayer.cpp:
(WebKit::WebRenderLayer::WebRenderLayer): Changed to initialize the m_renderer member
variable with a WebRenderObject for the layer’s renderer, and removed the initialization of
the element-related member variables that were removed.
* Shared/WebRenderLayer.h:
(WebKit::WebRenderLayer::create): Changed to take a renderer instead of renderer and element
info.
(WebKit::WebRenderLayer::renderer): Added this getter.
(WebKit::WebRenderLayer::WebRenderLayer): Changed to take a renderer instead of renderer and
element info.
* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::create): Changed to pass true for the shouldIncludeDescendants
parameter.
(WebKit::WebRenderObject::WebRenderObject): Added a shouldIncludeDescdendants boolean
parameter. When it is false, the m_children array remains null. Added initialization of
member variables with the element’s tag name, id and class list.
* Shared/WebRenderObject.h:
(WebKit::WebRenderObject::create): Added an overload that takes a RenderObject and creates
a shallow WebRenderObject.
(WebRenderObject): Changed to take element tag name, id and class list.
(WebKit::WebRenderObject::elementTagName): Added this getter.
(WebKit::WebRenderObject::elementID): Ditto.
(WebKit::WebRenderObject::elementClassNames): Ditto.
(WebKit::WebRenderObject::WebRenderObject): 



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline some tests where Chrome differs due to V8's different toString implementation
for some built-ins. We should probably get V8 and JSC to agree here, but that's not terribly
pressing since the web clearly doesn't depend on the specifics here.

* platform/chromium-win/fast/js/global-constructors-expected.txt: Removed.
* platform/chromium/TestExpectations:
* platform/chromium/fast/js/function-names-expected.txt: Added.
* platform/chromium/fast/js/global-constructors-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Page jumps after post-pinch-zoom re-render
https://bugs.webkit.org/show_bug.cgi?id=90282

Reviewed by Antonio Gomes.
Patch by Jacky Jiang <zhajiang@rim.com>

PR: 170255
In r120622, we moved ScrollableArea::setConstrainsScrollingToContentEdge(false|true)
from WebPage::setScrollPosition() to BackingStorePrivate::setScrollingOrZooming()
to address an overscroll reset issue.
However, when we are ending bitmap zooming, UI thread can call
BackingStorePrivate::setScrollingOrZooming(false) before WebKit thread
calls WebPage::setScrollPosition(), in which case it will set
ScrollableArea::m_constrainsScrollingToContentEdge to true earlier.
To fix this, we can cache ScrollableArea::m_constrainsScrollingToContentEdge
and always set it to false before we set scroll position in WebKit
thread to avoid scroll position clamping during scrolling, and restore
it to what it was after that.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::setScrollPosition):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed chromium xp rebaseline.

* platform/chromium-win-xp/http/tests/inspector: Added.
* platform/chromium-win-xp/http/tests/inspector/resource-tree: Added.
* platform/chromium-win-xp/http/tests/inspector/resource-tree/resource-request-content-while-loading-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix after 121580.

WebKit Linux debug bots was complaining about signed vs unsigned integer comparison.

* html/HTMLCollection.h:
(WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Move intent delivery code from the frame to the page
https://bugs.webkit.org/show_bug.cgi?id=89974

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-29
Reviewed by Anders Carlsson.

Move the intent delivery code from the frame to the page
and add the corresponding C API for WKPage.

* UIProcess/API/C/WKPage.cpp:
(WKPageDeliverIntentToFrame):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::stopLoading):
* UIProcess/WebFrameProxy.h:
(WebKit):
* UIProcess/WebPageProxy.cpp:
(WebKit):
(WebKit::WebPageProxy::deliverIntentToFrame):
* UIProcess/WebPageProxy.h:
(WebPageProxy):

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