<rdar://problem/12283706> WebKit looks for some files on the system even when building against an SDK.

Reviewed by David Kilzer.

If an SDK is being used, pass it through to our custom invocations of the preprocessor.

Source/WebCore:

* DerivedSources.make:

Source/WebKit2:

* DerivedSources.make:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening for r128516/r128517:
  remove the now-unnecessary cr-mac expectations for fast/writing-mode test.
  fix baseline for fast/table/bad-replaced-sizing-preferred-logical-widths.html

* platform/chromium-mac/fast/writing-mode/percentage-height-orthogonal-writing-modes-quirks-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Lots of repaints in the top left tile on this site
https://bugs.webkit.org/show_bug.cgi?id=96698

Reviewed by Anders Carlsson.

When given a rect outside of the current tile coverage rect,
TileCache::setNeedsDisplayInRect() would try to invalidate the
top left tile. This would normally be a no-op, except when repaint
counters are visible, in which case it would invalidate the counter
area.

Fix by doing an early return if the intersection between the repaint
rect and the tile coverage rect is empty.

* platform/graphics/ca/mac/TileCache.mm:
(WebCore::TileCache::setNeedsDisplayInRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove lines for fast/table/bad-replaced-sizing-preferred-logical-widths.html
fixed in http://trac.webkit.org/changeset/128528.

* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
suspend/resumeWidgetHierarchyUpdates should be a RAII object
https://bugs.webkit.org/show_bug.cgi?id=96706

Reviewed by Simon Fraser.

Source/WebCore: 

Replaced suspendWidgetHierarchyUpdates and resumeWidgetHierarchyUpdates by WidgetHierarchyUpdatesSuspensionScope.

* WebCore.exp.in: Export new symbols.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChild):
(WebCore::ContainerNode::removeChildren):
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::detach):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passMouseDownEventToWidget):
* rendering/RenderWidget.cpp:
(WebCore):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
(WebCore::moveWidgetToParentSoon):
* rendering/RenderWidget.h:
(WidgetHierarchyUpdatesSuspensionScope):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::WidgetHierarchyUpdatesSuspensionScope):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::~WidgetHierarchyUpdatesSuspensionScope):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::isSuspended):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::scheduleWidgetToMove):
(WebCore):
(RenderWidget):

Source/WebKit/mac: 

* WebView/WebHTMLView.mm:
(-[WebHTMLView _invalidateGStatesForTree]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        https://bugs.webkit.org/show_bug.cgi?id=93654
        REGRESSION(r125126): It made fast/events/keyevent-iframe-removed-crash.html assert

        Unskipped tests that should not assert any more (there were more than the one in
        bug title). Re-attributed some remaining failures that were tracked together with that.

        * platform/gtk/TestExpectations:
        * platform/mac/Skipped:
        * platform/qt/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Consolidate two-phase connection to avoid race conditions
https://bugs.webkit.org/show_bug.cgi?id=90411

Reviewed by Tony Chang.

Source/WebCore:

Previously, IDB connections were opened by having the front-end (1) call through to
a back-end open() method, eventually receive a success message with a back-end object
handle, and (2) call into the back-end object to register front-end callbacks. This left
the back-end's notion of an open connection in a limbo state between these two calls.
In multi-process ports, a crash of the front-end process could leave the back-end wedged
waiting for this second call (e.g. can't delete until all connections are closed).

Simplify this by having the front-end pass through the callbacks into the back-end
during the initial open() call, which eliminates the limbo state.

No new tests - no functional changes. Chromium port's webkit_unit_tests updated.

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::create):
(WebCore::IDBDatabase::IDBDatabase): Db-callbacks is available at creation time.
(WebCore::IDBDatabase::~IDBDatabase):
* Modules/indexeddb/IDBDatabase.h:
(IDBDatabase):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create): Need to track db-callbacks as well.
(WebCore::IDBDatabaseBackendImpl::PendingOpenCall::databaseCallbacks):
(WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall):
(IDBDatabaseBackendImpl::PendingOpenCall):
(WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::create): Ditto.
(WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::databaseCallbacks):
(WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::PendingOpenWithVersionCall):
(IDBDatabaseBackendImpl::PendingOpenWithVersionCall):
(WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
(WebCore::IDBDatabaseBackendImpl::setVersion):
(WebCore::IDBDatabaseBackendImpl::connectionCount): Don't need to count limbo connections any more.
(WebCore::IDBDatabaseBackendImpl::processPendingCalls): Pass through db-callbacks.
(WebCore::IDBDatabaseBackendImpl::openConnection): No more limbo connections (yay!).
(WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction): Pass through db-callbacks.
(WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion): Ditto.
(WebCore::IDBDatabaseBackendImpl::deleteDatabase): Style.
(WebCore::IDBDatabaseBackendImpl::close): Resolve FIXME about connectionCount.
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
(IDBDatabaseBackendInterface):
* Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
(WebCore::IDBDatabaseCallbacksImpl::create):
(WebCore::IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl):
(WebCore::IDBDatabaseCallbacksImpl::connect):
* Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
(IDBDatabaseCallbacksImpl):
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open): Mint the db-callbacks here...
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::open): ...passed through to here...
* Modules/indexeddb/IDBFactoryBackendImpl.h:
(IDBFactoryBackendImpl):
* Modules/indexeddb/IDBFactoryBackendInterface.h:
(IDBFactoryBackendInterface):
* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::create): ...all the way to here...
(WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
(WebCore::IDBOpenDBRequest::onUpgradeNeeded): ...and finally hooked up here.
(WebCore::IDBOpenDBRequest::onSuccess): (or here, if no upgrade needed).
* Modules/indexeddb/IDBOpenDBRequest.h:
(WebCore):
(IDBOpenDBRequest):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::onAbort): Tweak event/notification ordering; the
notifying the database that the transaction is finished may unblock closing,
which fires more events, and the delivery matters. Previously the close would
be blocked by the transaction which gave the desired order.
(WebCore::IDBTransaction::onComplete): Ditto.
* inspector/InspectorIndexedDBAgent.cpp: New hookup logic.
(WebCore):

Source/WebKit/chromium:

API plumbing for simplified single-phase connection opening, and tests updated
to exercise the new APIs.

* public/WebIDBDatabase.h:
(WebIDBDatabase): Just a FIXME to remove the old second-phase hookup API.
* public/WebIDBFactory.h:
(WebKit):
(WebIDBFactory):
(WebKit::WebIDBFactory::open): New overload that takes db-callbacks.
* src/IDBCallbacksProxy.cpp: The db-callbacks plumbing is needed earlier.
(WebKit::IDBCallbacksProxy::onSuccess):
(WebKit::IDBCallbacksProxy::onUpgradeNeeded):
(WebKit):
(WebKit::IDBCallbacksProxy::setDatabaseCallbacks): Needs to hold on to
the db-callbacks and hook it up when the onSuccess callback comes through.
* src/IDBCallbacksProxy.h:
(WebKit):
(IDBCallbacksProxy):
* src/IDBDatabaseBackendProxy.cpp:
* src/IDBDatabaseBackendProxy.h:
(IDBDatabaseBackendProxy):
* src/IDBFactoryBackendProxy.cpp:
(WebKit::IDBFactoryBackendProxy::open):
* src/IDBFactoryBackendProxy.h:
(IDBFactoryBackendProxy):
* src/WebIDBDatabaseImpl.cpp:
(WebKit::WebIDBDatabaseImpl::WebIDBDatabaseImpl):
(WebKit::WebIDBDatabaseImpl::close):
* src/WebIDBDatabaseImpl.h:
(WebIDBDatabaseImpl):
* src/WebIDBFactoryImpl.cpp:
(WebKit::WebIDBFactoryImpl::open):
* src/WebIDBFactoryImpl.h:
(WebIDBFactoryImpl):
* tests/IDBAbortOnCorruptTest.cpp:
(FakeIDBDatabaseCallbacks):
(WebCore::FakeIDBDatabaseCallbacks::create):
(WebCore::FakeIDBDatabaseCallbacks::~FakeIDBDatabaseCallbacks):
(WebCore::FakeIDBDatabaseCallbacks::FakeIDBDatabaseCallbacks):
(WebCore):
(WebCore::TEST): Updated connection sequence.
* tests/IDBDatabaseBackendTest.cpp: Ditto.


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