Run defer scripts in the threaded HTML parser
https://bugs.webkit.org/show_bug.cgi?id=107320

Reviewed by Eric Seidel.

No new tests because covered by http/tests/misc/script-defer.html.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::prepareToStopParsing):
(WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Update test expectations
https://bugs.webkit.org/show_bug.cgi?id=107328

Not reviewed. Mark this test as MISSING:
http/tests/cache/cancel-multiple-post-xhrs.html

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Weak GC maps should be easier to use
https://bugs.webkit.org/show_bug.cgi?id=107312

Patch by Viatcheslav Ostapenko <sl.ostapenko@samsung.com> on 2013-01-18
Reviewed by Ryosuke Niwa.

Build fix for linux platforms after r140194.

* runtime/WeakGCMap.h:
(WeakGCMap):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
BackgroundHTMLParser shouldn't create AtomicStrings
https://bugs.webkit.org/show_bug.cgi?id=107150

Reviewed by Tony Gentilcore.

Previously, we were creating an AtomicString from the HTMLToken for
every start and end tag. This caused us to have a static dependency on
the parser thread's atomic string table. We want to avoid static
dependencies because we want to eventually run the background parser
using a library like libdispatch that will let us run many version in
parallel.

This patch uses a different approach whereby we use the tag name from
the CompactHTMLToken. In order to avoid calling strcmp excessively, we
use StringImpl::hash to quickly reject matches with some common tag
names. As a side effect, the hash value will be cached in the
StringImpl, speeding up atomization once these StringImpls arrive on
the main thread.

This patch also improves the performance on html-parser-srcdoc.html.
With the patch in bug 107236 applied (which focuses the benchmark more
tightly on the parser), we spend 2.3% less time on the main thread
(likely due to pre-caching the hash values) and 11.5% less time on the
parser thread.

* html/parser/BackgroundHTMLParser.cpp:
(WebCore):
(WebCore::threadSafeEqual):
(WebCore::threadSafeMatch):
(WebCore::BackgroundHTMLParser::pumpTokenizer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change RenderStyle::getRoundedInnerBorderFor to take ints for border widths
https://bugs.webkit.org/show_bug.cgi?id=107331

Reviewed by Levi Weintraub.

Borders are always represented as ints yet RenderStyle::
getRoundedInnerBorderFor upcasts from int to LayoutUnit when
calling getRoundedInnerBorderFor.

No new tests, no change in functionality.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::getRoundedInnerBorderFor):
* rendering/style/RenderStyle.h:
Change getRoundedInnerBorderFor to use ints for border widths.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Introduce isHTMLTextFormControlElement and toHTMLTextFormControlElement instead of toTextFormControl
https://bugs.webkit.org/show_bug.cgi?id=107089

Reviewed by Kent Tamura.

Source/WebCore:

toTextFormControl(node) returns 0 if node is not HTMLTextFormControl. In recent coding convention,
we only have ASSERT and statc_cast in this kind of conversion function. So this code looks like
having a bad cast, though it does not.

In this patch, we convert toTextFromControl to isHTMLTextFormControlElement and toHTMLFormControlElement,
which aligns our coding convention.

No new tests, simple refactoring.

* editing/Editor.cpp:
(WebCore::Editor::selectionForCommand):
(WebCore::Editor::setBaseWritingDirection):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::directionality):
* html/HTMLTextFormControlElement.cpp:
(WebCore::enclosingTextFormControl):
* html/HTMLTextFormControlElement.h:
(WebCore::isHTMLTextFormControlElement):
(WebCore):
(WebCore::toHTMLTextFormControlElement):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
(WebCore::RenderTextControl::layoutSpecialExcludedChild):
* testing/Internals.cpp:
(WebCore::Internals::visiblePlaceholder):

Source/WebKit/qt:

Updated code to use isHTMLTextFormControlElement and toHTMLTextFormControlElement combination instead of
toTextFormControl.

* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::inputMethodEvent):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Update test expectations

Unreviewed. Update test expectations to mark test as flaky.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add back 'group' as a default cross dashboard parameter, but with null as its value.
https://bugs.webkit.org/show_bug.cgi?id=107336

We need to have 'group' listed as a parameter, else we never parse it,
as we only parse parameters with defaults.

Reviewed by Ojan Vafai.

* TestResultServer/static-dashboards/dashboard_base.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rework NetworkProcess resource load identifiers.
<rdar://problem/12934449> and https://bugs.webkit.org/show_bug.cgi?id=107192

Reviewed by Alexey Proskuryakov.

Source/WebCore:

No new tests (No effect in tested configs).

* WebCore.exp.in:

Include an identifier argument for synchronous loads:
* loader/LoaderStrategy.cpp:
(WebCore::LoaderStrategy::loadResourceSynchronously):
* loader/LoaderStrategy.h:

Pass along a unique identifier to the synchronous load:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):

Remove the "setIdentifier" method:
* loader/ResourceLoader.cpp:
* loader/ResourceLoader.h:

Source/WebKit2:

Having the NetworkProcess vend out identifiers to WebProcesses was a bad idea.
This patch reverts that so that WebProcesses are in control of their own unique identifiers.

The NetworkProcess doesn't need identifiers at all.
It can represent outstanding loads with the loaders themselves.

This patch adds a "SchedulableLoader" base class for normal and synchronous loaders.
It reworks each use of identifiers into using SchedulableLoaders instead.

This also gave an opportunity to move the serving of pending requests for a host into the
HostRecord itself which cleans certain things up nicely.

Change HostRecord to have queues of SchedulableLoaders instead of identifiers.
Make HostRecord responsible for actually starting the loaders in its queues:
* NetworkProcess/HostRecord.cpp:
(WebKit::HostRecord::~HostRecord):
(WebKit::HostRecord::scheduleResourceLoader):
(WebKit::HostRecord::addLoaderInProgress):
(WebKit::HostRecord::removeLoader):
(WebKit::HostRecord::hasRequests):
(WebKit::HostRecord::servePendingRequestsForQueue):
(WebKit::HostRecord::servePendingRequests):
(WebKit::HostRecord::limitsRequests):
* NetworkProcess/HostRecord.h:
(WebKit::HostRecord::create): HostRecord is now also RefCounted. new and delete are so 2004.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad): Create the loader then schedule
  it with the scheduler, instead of having the scheduler create it.
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
(WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:

Remove maps and sets of identifiers, replacing them with sets of SchedulableLoaders where needed.
Rely on HostRecords to actually manage sets of SchedulableLoaders.
Rely on HostRecord to do the actual serving of its pending requests:
* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler):
(WebKit::NetworkResourceLoadScheduler::scheduleLoader):
(WebKit::NetworkResourceLoadScheduler::hostForURL):
(WebKit::NetworkResourceLoadScheduler::removeLoader):
(WebKit::NetworkResourceLoadScheduler::receivedRedirect):
(WebKit::NetworkResourceLoadScheduler::servePendingRequests):
(WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
(WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader):
* NetworkProcess/NetworkResourceLoadScheduler.h:

A new base class for all loaders that the scheduler and HostRecords might need to know about:
* NetworkProcess/SchedulableLoader.cpp:
(WebKit::SchedulableLoader::SchedulableLoader):
(WebKit::SchedulableLoader::~SchedulableLoader):
* NetworkProcess/SchedulableLoader.h:
(WebKit::SchedulableLoader::loadParameters):
(WebKit::SchedulableLoader::connectionToWebProcess):
(WebKit::SchedulableLoader::isSynchronous):
(WebKit::SchedulableLoader::setHostRecord):
(WebKit::SchedulableLoader::hostRecord):

Change to inherit from SchedulableLoader, removing some of the duplicated data and methods:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::connection):
(WebKit::NetworkResourceLoader::destinationID):
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::stop):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::didFail):
(WebKit::NetworkResourceLoader::willSendRequest):
(WebKit::NetworkResourceLoader::shouldUseCredentialStorage):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::create):

Change to inherit from SchedulableLoader, removing some of the duplicated data and methods:
* NetworkProcess/SyncNetworkResourceLoader.cpp:
(WebKit::SyncNetworkResourceLoader::SyncNetworkResourceLoader):
(WebKit::SyncNetworkResourceLoader::start):
* NetworkProcess/SyncNetworkResourceLoader.h:
(WebKit::SyncNetworkResourceLoader::create):
(WebKit::SyncNetworkResourceLoader::isSynchronous):

Fold the WebProcess resource load identifier in with the load parameters:
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
(WebKit::NetworkResourceLoadParameters::encode):
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:
(WebKit::NetworkResourceLoadParameters::identifier):

The identifier is preset in the WebProcess and doesn't come from the NetworkProcess,
so the message to schedule a load can now be asynchronous:
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):

Update to include a WebProcess generated identifier along with synchronous loads:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Switch to new createTransaction call
https://bugs.webkit.org/show_bug.cgi?id=107311

Reviewed by Tony Chang.

Source/WebCore:

Convert frontend callers to use the new backend createTransaction
call which is the final divorce between the frontend and backend
transaction objects. This allows an asynchronous call in Chromium
and allows the front and backend to have their own lifecycle,
allowing the backend to be cleaned up as soon as a transaction is complete,
rather than waiting for the JS object to get cleaned up.

No new tests, this is a refactor covered by existing tests.

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::transaction):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::commit):
(WebCore::IDBDatabaseBackendImpl::abort):
(WebCore::IDBDatabaseBackendImpl::createTransaction):
(WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
* Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
(WebCore::IDBDatabaseCallbacksImpl::onAbort):
(WebCore::IDBDatabaseCallbacksImpl::onComplete):
* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::onUpgradeNeeded):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::create):
(WebCore::IDBTransaction::IDBTransaction):
(WebCore::IDBTransaction::setActive):
(WebCore::IDBTransaction::abort):
* Modules/indexeddb/IDBTransaction.h:
(WebCore):
(IDBTransaction):
* Modules/indexeddb/IDBTransactionBackendImpl.cpp:
(WebCore::IDBTransactionBackendImpl::create):
(WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
(WebCore::IDBTransactionBackendImpl::abort):
(WebCore::IDBTransactionBackendImpl::commit):
* Modules/indexeddb/IDBTransactionBackendImpl.h:
(IDBTransactionBackendImpl):
(WebCore::IDBTransactionBackendImpl::setCallbacks):

Source/WebKit/chromium:

* public/WebIDBTransaction.h:

Remove an old method that nobody calls.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <rdar://problem/13042826> REGRESSION (r139985): Full Screen Youtube loses keyboard and mouse control
        https://bugs.webkit.org/show_bug.cgi?id=107191

        Reviewed by Darin Adler.

        Moved initialization from platformInitializePluginProcess to platformInitializeProcess,
        because the former is called too late. In r139985, I used a correct location for
        WebProcess, but not for PluginProcess.

        * PluginProcess/mac/PluginProcessMac.mm:
        (WebKit::PluginProcess::platformInitializeProcess):
        (WebKit::PluginProcess::platformInitializePluginProcess):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change set r140201 broke editing/selection/move-by-word-visually-multi-line.html
https://bugs.webkit.org/show_bug.cgi?id=107340

Reviewed by Filip Pizlo.

Due to the change landed in r140201, more nodes might end up
generating Int32ToDouble nodes.  Therefore, changed the JSVALUE64
constant path of compileInt32ToDouble() to use the more
restrictive isInt32Constant() check on the input.  This check was
the same as the existing ASSERT() so the ASSERT was eliminated.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileInt32ToDouble):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Update test expectations
https://bugs.webkit.org/show_bug.cgi?id=107341

Unreviewed. Mark this test as failing on Chromium debug:
inspector/profiler/memory-instrumentation-cached-images.html

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow fixed background layers to be moved by the ScrollingCoordinator
https://bugs.webkit.org/show_bug.cgi?id=107213

Source/WebCore:

Reviewed by Tim Horton.

Start using the RenderView's RenderLayerBacking's background layer for
fixed root backgrounds (those which have background images all of which have
background-attachment: fixed).

The background-layer is contained in the RenderLayer's RenderLayerBacking's
containment view, so it gets page scale applied to it, but scrolling happens
above this layer, so the background has to be counter-scrolled. We plumb
this layer through to the ScrollingCoordinator so that this counter-scrolling
can be done on the scrolling thread.

Test: platform/mac/tiled-drawing/fixed-background/fixed-body-background-positioned.html

* WebCore.xcodeproj/project.pbxproj: Add ScrollingStateScrollingNodeMac.mm
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::counterScrollingLayerForFrameView): New function to get
the counter-scrolling layer.
(WebCore::ScrollingCoordinator::updateMainFrameScrollPosition): Sync or set the position of the
counter-scrolling layer just like we do for the main scrolling layer.
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::updateScrollingNode):
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::ScrollingStateNode): setScrollLayer() renamed to setScrollPlatformLayer(),
and added a FIXME comment because this code is confusing and possibly wrong.
* page/scrolling/ScrollingStateNode.h: Renamed setScrollLayer() to setScrollPlatformLayer().
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
* page/scrolling/ScrollingStateScrollingNode.h:
(ScrollingStateScrollingNode): Track the counter-scrolling layer.
(WebCore::ScrollingStateScrollingNode::counterScrollingLayer):
(WebCore::ScrollingStateScrollingNode::counterScrollingLayerDidChange):
(WebCore::ScrollingStateScrollingNode::setCounterScrollingLayerDidChange):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
(ScrollingCoordinatorMac): Add updateScrollingNode() which is less expensive than frameViewRootLayerDidChange()
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange): Fetch the counter-scrolling layer if we have one.
(WebCore::ScrollingCoordinatorMac::setCounterScrollingLayerForNode):
(WebCore::ScrollingCoordinatorMac::updateScrollingNode):
* page/scrolling/mac/ScrollingStateNodeMac.mm:
(WebCore::ScrollingStateNode::setScrollPlatformLayer):
* page/scrolling/mac/ScrollingStateScrollingNodeMac.mm: New file for implementation of setCounterScrollingLayer().
(WebCore::ScrollingStateScrollingNode::counterScrollingPlatformLayer):
(WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
(ScrollingTreeScrollingNodeMac):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::update):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): If we're painting into the fixed root layer,
we want to always paint with the top,left at 0,0.
* rendering/RenderBoxModelObject.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): In the fixed root background case,
we can make the background layer viewport-sized, and we have to set its counter-scrolled position.
(WebCore::RenderLayerBacking::updateBackgroundLayer): If the background layer was created or destroyed,
we have to tell the ScrollingCoordinator.
(WebCore::RenderLayerBacking::didCommitChangesForLayer): Send the GraphicsLayer down.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::didFlushChangesForLayer): If the background layer changed (e.g. it became
tiled) we need to tell the ScrollingCoordinator.
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): We failed to update the borders on new
layers sometimes; this fixes that.
(WebCore::RenderLayerCompositor::frameViewDidScroll): In the non-threaded scrolling case, if we have
a fixed background layer, we need to update its position.
(WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged): Feed the newly created/destroyed layer
down to the ScrollingCoordinator.
(WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing):
(WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer):
* rendering/RenderLayerCompositor.h:
* rendering/RenderObject.cpp:
(WebCore::rendererHasBackground):
(WebCore::RenderObject::styleWillChange): If the compositor supports fixed root backgrounds, we no longer
treat these as slow repaint objects.
* rendering/RenderView.cpp:
(WebCore::RenderView::rootBackgroundIsEntirelyFixed): Helper function called by RLC.
* rendering/RenderView.h:

LayoutTests:

Reviewed by Tim Horton.

One new test and new layer trees for tests affected by fixed background changes.

* platform/mac/tiled-drawing/fixed-background/fixed-body-background-body-layer-expected.txt:
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-expected.txt:
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-opacity-html-expected.txt:
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-positioned-expected.png: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-positioned-expected.txt: Copied from LayoutTests/platform/mac/tiled-drawing/fixed-background/fixed-html-background-expected.txt.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-positioned.html: Added.
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-transformed-html-expected.txt:
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-zoomed-expected.png:
* platform/mac/tiled-drawing/fixed-background/fixed-body-background-zoomed-expected.txt:
* platform/mac/tiled-drawing/fixed-background/fixed-html-background-expected.txt:
* platform/mac/tiled-drawing/fixed-background/fixed-non-propagated-body-background-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r139071): run-webkit-httpd complains at launch
https://bugs.webkit.org/show_bug.cgi?id=107310

Reviewed by Alexey Proskuryakov.

* Scripts/webkitperl/httpd.pm:
(getApacheVersion): use preferred perl syntax


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r140206.
http://trac.webkit.org/changeset/140206
https://bugs.webkit.org/show_bug.cgi?id=107346

Caused crash on wordpress.com (Requested by smfr on #webkit).

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

Source/WebCore:

* rendering/RenderBox.cpp:
(WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):

LayoutTests:

* fast/block/float/overhanging-float-not-removed-crash-expected.txt: Removed.
* fast/block/float/overhanging-float-not-removed-crash.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix for release builds when DFG_ENABLE_DEBUG_PROPAGATION_VERBOSE is set to 1 in DFGCommon.h.

* dfg/DFGCFAPhase.cpp: Added #include "Operations.h"


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix for building JSC with DFG_ENABLE_DEBUG_PROPAGATION_VERBOSE enabled in DFGCommon.h.
Fixes the case where the argument node in fixupNode is freed due to the Vector storage being reallocated.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[wk2] Intrinsic content size should report a flexible width if the content is not wider than the minimum layout width
https://bugs.webkit.org/show_bug.cgi?id=107334
<rdar://problem/12960009>

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm:
(-[WKView _setIntrinsicContentSize:]): If the content is laid-out at or below the minimum layout width, it's flexible; otherwise, we need to inform autolayout that we require more space via our intrinsic content size.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Allow auto-sizing to expand its width beyond the minimum if needed.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setMinimumLayoutWidth): Allow auto-sizing to expand its width beyond the minimum if needed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=106946
Sticky-position elements can jump around/hide on rubber-banding

Reviewed by Simon Fraser.

Source/WebCore: 

This patch adds a new function called viewportConstrainedVisibleContentRect() 
since there are a number of places where we need a visibleContectRect() that does 
not allow scroll offsets that indicate the rubber-banding that is happening. And 
this patch fixes the bug for sticky by calling this function in two new places.

* page/FrameView.cpp:
(WebCore::FrameView::viewportConstrainedVisibleContentRect):
(WebCore):
* page/FrameView.h:
(FrameView):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::stickyPositionOffset):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
(WebCore::RenderLayerCompositor::computeStickyViewportConstraints):

LayoutTests: 

* platform/mac/tiled-drawing/sticky/negative-scroll-offset-expected.txt: Added.
* platform/mac/tiled-drawing/sticky/negative-scroll-offset.html: Added.



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