[New Multicolumn] Table cells and list items need to work as multicolumn blocks.
https://bugs.webkit.org/show_bug.cgi?id=127365
        
This patch is a first step towards eliminating RenderMultiColumnBlock and moving
all its functionality into RenderBlockFlow. Doing so will allow table cells, list
items and the RenderView to use the new multi-column layout.
        
Reviewed by Simon Fraser.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::setMultiColumnFlowThread):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderBlockFlow::multiColumnFlowThread):
Add the flow thread pointer to the multi-column flow thread to RenderBlockFlow's
rare data. This lets us use only one pointer in the rare data to point to an object
that can hold all of the rest of the multi-column info.

* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
Move the construction of the flow thread to the constructor. This ensures we
never have a null flow thread and lets us avoid having to null check it for
empty multi-column blocks.

(WebCore::RenderMultiColumnBlock::columnHeightAvailable):
(WebCore::RenderMultiColumnBlock::columnWidth):
(WebCore::RenderMultiColumnBlock::columnCount):
(WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth):
The above functions now call through to the multi-column flow thread for results.

(WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
 Set the column height available on the flow thread.

(WebCore::RenderMultiColumnBlock::relayoutForPagination):
The balancing pass and guard is in the multi-column flow thread now.

(WebCore::RenderMultiColumnBlock::addChild):
Don't have to create the flow thread here any longer, since we do it up front
in the constructor of RenderMultiColumnBlock.

(WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
Don't need the null check of the flow thread any more.

* rendering/RenderMultiColumnBlock.h:
Change the inlined functions to not be inlined, since they need to call
RenderMultiColumnFlowThread functions now.

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
Init the new member variables we moved here from RenderMultiColumnBlock.

(WebCore::RenderMultiColumnFlowThread::computeColumnCountAndWidth):
Moved from RenderMultiColumnBlock.

* rendering/RenderMultiColumnFlowThread.h:
Add public getters/setters to the member variables so that RenderMultiColumnBlock can
still see them. Move the member variables here from RenderMultiColumnBlock.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::calculateBalancedHeight):
(WebCore::RenderMultiColumnSet::prepareForLayout):
(WebCore::RenderMultiColumnSet::columnCount):
Call through to the flow thread instead.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Bindings generation tests hit an error trying to include wtf/Platform.h after r161638
https://bugs.webkit.org/show_bug.cgi?id=127293

Reviewed by Alexey Proskuryakov.

Include TargetConditionals.h instead of wtf/Platform.h as the latter isn't available
in the public SDK.

As a side effect of this change, replace usage of PLATFORM(IOS) with TARGET_OS_IPHONE.

* bindings/objc/PublicDOMInterfaces.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the Windows build after <http://trac.webkit.org/changeset/162704>
(https://bugs.webkit.org/show_bug.cgi?id=127293)

Only include TargetConditionals.h when building on a Darwin-based OS.
Also, check that TARGET_OS_IPHONE is defined before referencing its value
since it will be undefined when building on Windows.

* bindings/objc/PublicDOMInterfaces.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify Compiler.h
https://bugs.webkit.org/show_bug.cgi?id=127491

Patch by Darin Adler <darin@apple.com> on 2014-01-24
Reviewed by Anders Carlsson.

* wtf/Assertions.h: Remove COMPILER_SUPPORTS(CXX_STATIC_ASSERT), since
we now have that for all compilers that can build WebKit.

* wtf/Compiler.h: Removed always true feature flags, including:
COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES), COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES),
COMPILER_SUPPORTS(CXX_DELETED_FUNCTIONS), COMPILER_SUPPORTS(CXX_NULLPTR),
COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS), COMPILER_SUPPORTS(CXX_STATIC_ASSERT),
COMPILER_SUPPORTS(CXX_OVERRIDE_CONTROL), COMPILER_SUPPORTS(CXX_STRONG_ENUMS), and
COMPILER_SUPPORTS(CXX_AUTO_TYPE). Sorted sections alphabetically. Separated out
nested #if and #else into separate checks for greater readability. Removed obsolete
check for COMPILER(RVCT). Removed unused COMPILER(GCCE) detection.

* wtf/RefPtr.h: Remove COMPILER_SUPPORTS(CXX_NULLPTR), since we now have
that for all compilers that can build WebKit.
* wtf/RetainPtr.h: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The CXX_EXPLICIT_CONVERSIONS COMPILER_SUPPORTS macro has been removed, and all
compilers support explicit conversions now so simply remove the #ifdef.

* wtf/RetainPtr.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162708 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: support createIndex/deleteIndex messaging
https://bugs.webkit.org/show_bug.cgi?id=127546

Reviewed by Tim Horton.

Source/WebCore:

* WebCore.exp.in: Export a needed CrossThreadCopier

Source/WebKit2:

Message create/delete requests over to the DatabaseProcess, and listen to its replies:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::createIndex):
(WebKit::WebIDBServerConnection::didCreateIndex):
(WebKit::WebIDBServerConnection::deleteIndex):
(WebKit::WebIDBServerConnection::didDeleteIndex):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

Pass create/delete requests to the appropriate unique IDB database:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::createIndex):
(WebKit::DatabaseProcessIDBConnection::deleteIndex):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:

Message the create/delete request to the database thread for the backing store to handle:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::didCreateIndex):
(WebKit::UniqueIDBDatabase::didDeleteIndex):
(WebKit::UniqueIDBDatabase::createIndex):
(WebKit::UniqueIDBDatabase::deleteIndex):
(WebKit::UniqueIDBDatabase::createIndexInBackingStore):
(WebKit::UniqueIDBDatabase::deleteIndexInBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

* Scripts/webkit2/messages.py:
(struct_or_class):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2 View Gestures (Swipe): Add a simple cache of view snapshots
https://bugs.webkit.org/show_bug.cgi?id=127438

Reviewed by Sam Weinig.

Add a cache of bitmap snapshots of the WKView, taken via OS X's window server
snapshotting mechanism. For now, we store all snapshots; refinements to the
caching strategy (or really having one at all) will come in future patches.

Snapshots are stored in a side map, with a UUID that allows references
to be stored inside WebBackForwardListItem (and serialized along with
the back-forward list when it is copied).

* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setSnapshotUUID):
(WebKit::WebBackForwardListItem::snapshotUUID):
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
(WebKit::extractBackForwardListEntriesFromArray):
Store and serialize a UUID along with each back-forward list item which
identifies that item's view snapshot in the ViewSnapshotStore.

* UIProcess/cf/WebPageProxyCF.cpp:
Bump the session state data version, as we changed the WebBackForwardList format.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::takeViewSnapshot):

* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Add _takeViewSnapshot IPI, which is used by ViewSnapshotStore via the PageClient
to take a snapshot of the view.

(-[WKView saveBackForwardSnapshotForCurrentItem]):
Add saveBackForwardSnapshotForCurrentItem SPI, which clients could potentially
use when they know they're about to manipulate the view hierarchy in such a way
that they want the current back-forward item's snapshot to be up to date.

* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::recordNavigationSnapshot):
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
Update the current back-forward item's snapshot immediately before navigating.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::shouldRecordNavigationSnapshots):
(WebKit::WebPageProxy::setShouldRecordNavigationSnapshots):
Expose the ability to enable taking view snapshots on every navigation.
This is off by default, so we won't be taking any snapshots yet.

* UIProcess/mac/ViewSnapshotStore.h: Added.
(WebKit::ViewSnapshotStore::disableSnapshotting):
(WebKit::ViewSnapshotStore::enableSnapshotting):
* UIProcess/mac/ViewSnapshotStore.mm: Added.
(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::~ViewSnapshotStore):
(WebKit::ViewSnapshotStore::shared):
(WebKit::ViewSnapshotStore::recordSnapshot):
(WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::takeViewSnapshot):
* WebKit2.xcodeproj/project.pbxproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removing the need for Debugger* and m_shouldPause op_debug check.
<https://webkit.org/b/127532>

Reviewed by Geoffrey Garen.

This patch replaces the checking of the Debugger::m_shouldPause flag
with a procedure to set a SteppingMode flag on all CodeBlocks under
the management of the debugger. This simplifies the op_debug checking
logic in all the execution engines.

* bytecode/CodeBlock.cpp:
* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasDebuggerRequests):
(JSC::CodeBlock::debuggerRequestsAddress):
(JSC::CodeBlock::setSteppingMode):
(JSC::CodeBlock::clearDebuggerRequests):
- CodeBlock::m_debuggerRequests is a union of m_numBreakpoints and the
  new m_steppingMode. The debugger can add/remove breakpoints to the
  CodeBlock as well as set the stepping mode. By having
  m_debuggerRequests as a union of the 2 bit fields, the op_debug code
  can now check if any of the 2 requests made on the CodeBlock is still
  in effect just by testing a single int.

* debugger/Debugger.cpp:
(JSC::Debugger::Debugger):
(JSC::Debugger::detach):
- This was bug from before where I forgot to clear the CodeBlock
  breakpoints before detaching. We now take care of it by clearing all
  debugger requests made to the CodeBlock.

(JSC::Debugger::SetSteppingModeFunctor::SetSteppingModeFunctor):
(JSC::Debugger::SetSteppingModeFunctor::operator()):
(JSC::Debugger::setSteppingMode):
(JSC::Debugger::ClearCodeBlockDebuggerRequestsFunctor::ClearCodeBlockDebuggerRequestsFunctor):
(JSC::Debugger::ClearCodeBlockDebuggerRequestsFunctor::operator()):
(JSC::Debugger::clearBreakpoints):

(JSC::Debugger::ClearDebuggerRequestsFunctor::ClearDebuggerRequestsFunctor):
(JSC::Debugger::ClearDebuggerRequestsFunctor::operator()):
(JSC::Debugger::clearDebuggerRequests):
- We need a distinct clearDebuggerRequests() from clearBreakpoints()
  because:
  1. When we detach a globalObject, we only want to clear the debugger
     requests in CodeBlocks from that global.
  2. Clearing the debugger requests in the CodeBlocks is not the same
     as clearing the breakpoints. The breakpoints are still in effect
     for the next time a globalObject is attached, or for other
     globalObjects that are still attached.

(JSC::Debugger::setPauseOnNextStatement):
(JSC::Debugger::breakProgram):
(JSC::Debugger::stepIntoStatement):
(JSC::Debugger::updateCallFrameAndPauseIfNeeded):
(JSC::Debugger::pauseIfNeeded):
(JSC::Debugger::exception):
(JSC::Debugger::willExecuteProgram):
(JSC::Debugger::didReachBreakpoint):
* debugger/Debugger.h:
- We're always going to support the debugger. So, there's no longer
  a need to check ENABLE(JAVASCRIPT_DEBUGGER). Removed the unneeded code.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::debug):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_debug):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_debug):
* llint/LowLevelInterpreter.asm:
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::setDebugger):



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