Speculative iOS build fix after r164184.

* dom/Node.cpp:
(WebCore::Node::defaultEventHandler):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop using PLATFORM(MAC) in Source except where it means “OS X but not iOS”
https://bugs.webkit.org/show_bug.cgi?id=128885

Reviewed by Anders Carlsson.

Source/WebCore: 

* loader/FrameLoaderClient.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* platform/Cursor.h: Changed PLATFORM(MAC) to USE(APPKIT) around uses of NSCursor.
* platform/LocalizedStrings.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* platform/graphics/PlatformLayer.h: Ditto.
* platform/graphics/cg/PDFDocumentImage.cpp: Ditto.
* rendering/RenderLayerCompositor.cpp: Ditto.
(WebCore::RenderLayerCompositor::requiresContentShadowLayer):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):

Source/WebKit2: 

* Configurations/WebKit2.xcconfig: Removed PageBannerMac.mm and WKBundlePageBannerMac.mm
from EXCLUDED_SOURCE_FILE_NAMES_iphoneos, now that these files are guarded with
!PLATFORM(IOS).
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: Changed PLATFORM(MAC) to
PLATFORM(COCOA).
(WKBundleFrameCopyWebArchiveFilteringSubframes):
* WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: Guarded with !PLATFORM(IOS).
* WebProcess/InjectedBundle/InjectedBundle.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
* WebProcess/InjectedBundle/InjectedBundle.h: Changed PLATFORM(MAC) to USE(FOUNDATION)
around use of NSBundle.
* WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h: Changed PLATFORM(MAC) to
PLATFORM(COCOA).
(WebKit::InjectedBundleUserMessageEncoder::encode):
(WebKit::InjectedBundleUserMessageDecoder::decode):
* WebProcess/Network/WebResourceLoader.cpp: Ditto.
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: Ditto.
(WebKit::NPN_GetValue):
(WebKit::NPN_SetValue):
(WebKit::initializeBrowserFuncs):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Ditto.
(WebKit::NetscapePlugin::NetscapePlugin):
(WebKit::NetscapePlugin::supportsSnapshotting):
* WebProcess/Plugins/Netscape/NetscapePlugin.h: Ditto.
* WebProcess/Plugins/Plugin.cpp: Ditto.
(WebKit::Plugin::Parameters::encode):
(WebKit::Plugin::Parameters::decode):
* WebProcess/Plugins/Plugin.h: Ditto.
* WebProcess/Plugins/PluginController.h: Ditto.
* WebProcess/Plugins/PluginProcessConnectionManager.cpp: Changed PLATFORM(MAC) to
USE(DARWIN) around use of Mach-based IPC.
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
* WebProcess/Plugins/PluginProxy.cpp: Chanegd PLATFORM(MAC) to PLATFORM(COCOA).
* WebProcess/Plugins/PluginProxy.h: Ditto.
* WebProcess/Plugins/PluginProxy.messages.in: Ditto.
* WebProcess/Plugins/PluginView.cpp: Ditto.
(WebKit::PluginView::destroyPluginAndReset):
(WebKit::PluginView::viewStateDidChange):
(WebKit::PluginView::didInitializePlugin):
(WebKit::PluginView::invalidateRect):
(WebKit::PluginView::pluginSnapshotTimerFired):
* WebProcess/Plugins/PluginView.h: Ditto.
* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: Ditto.
* WebProcess/WebCoreSupport/WebChromeClient.cpp: Ditto.
(WebKit::WebChromeClient::windowRect):
* WebProcess/WebCoreSupport/WebChromeClient.h: Ditto.
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp: Ditto.
* WebProcess/WebCoreSupport/WebContextMenuClient.h: Ditto.
* WebProcess/WebCoreSupport/WebDragClient.cpp: Ditto.
* WebProcess/WebCoreSupport/WebDragClient.h: Ditto.
* WebProcess/WebCoreSupport/WebEditorClient.cpp: Ditto.
(WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
* WebProcess/WebCoreSupport/WebEditorClient.h: Ditto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Ditto.
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
(WebKit::WebFrameLoaderClient::createPlugin):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Ditto.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Ditto.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h: Ditto.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Removed PLATFORM(MAC).
(InitWebCoreSystemInterface):
* WebProcess/WebPage/DrawingArea.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebKit::DrawingArea::create):
* WebProcess/WebPage/DrawingArea.h: Ditto.
* WebProcess/WebPage/DrawingArea.messages.in: Ditto.
* WebProcess/WebPage/EventDispatcher.cpp: Ditto.
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/LayerTreeHost.h: Ditto.
* WebProcess/WebPage/PageBanner.cpp: Added !PLATFORM(IOS)
* WebProcess/WebPage/PageBanner.h: Ditto.
* WebProcess/WebPage/WebFrame.cpp: Changed PLATFORM(MAC) to PLATFORM(COCOA).
* WebProcess/WebPage/WebFrame.h: Ditto.
* WebProcess/WebPage/WebInspector.cpp: Ditto.
(WebKit::WebInspector::WebInspector):
* WebProcess/WebPage/WebInspector.h: Ditto.
* WebProcess/WebPage/WebPage.cpp: Ditto.
(WebKit::WebPage::WebPage):
(WebKit::isContextClick):
(WebKit::WebPage::getSelectionAsWebArchiveData):
(WebKit::WebPage::getWebArchiveOfFrame):
(WebKit::WebPage::updatePreferences):
(WebKit::WebPage::sendSetWindowFrame):
(WebKit::WebPage::beginPrinting):
(WebKit::WebPage::computePagesForPrinting):
* WebProcess/WebPage/WebPage.h: Ditto.
* WebProcess/WebPage/WebPage.messages.in: Ditto.
* WebProcess/WebPage/mac/PageBannerMac.mm: Guarded with !PLATFORM(IOS).
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Changed PLATFORM(MAC) to PLATFORM(COCOA).
(WebKit::WebProcess::initializeWebProcess): Ditto.
(WebKit::WebProcess::ensureNetworkProcessConnection): Changed PLATFORM(MAC) to OS(DARWIN).
(WebKit::WebProcess::ensurePrivateBrowsingSession): Changed PLATFORM(MAC) to
PLATFORM(COCOA).
(WebKit::WebProcess::destroyPrivateBrowsingSession): Ditto.
(WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Changed PLATFORM(MAC) to
OS(DARWIN).
(WebKit::WebProcess::nonVisibleProcessCleanupTimerFired): Changed PLATFORM(MAC) to
PLATFORM(COCOA)
* WebProcess/WebProcess.h: Ditto.
* WebProcess/WebProcess.messages.in: Removed PLATFORM(MAC) guard around
SetProcessSuppressionEnabled. Changed it to PLATFORM(COCOA) around SetQOS.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speculative iOS build fix.

* WebProcess/WebPage/PageBanner.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
setSelectionRange shouldn't directly instantiate VisibleSelection
https://bugs.webkit.org/show_bug.cgi?id=128881

Reviewed by Andreas Kling.

Added a new version of moveTo for setSelectionRange.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::moveTo): Added.
* editing/FrameSelection.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionRange): Use the newly added FrameSelection::moveTo
instead of manually instantiating VisibleSelection here.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move document life time management from TreeScope to Document
https://bugs.webkit.org/show_bug.cgi?id=128877

Reviewed by Andreas Kling.

Document life time is managed in confusing manner by TreeScopes which are also inherited to ShadowRoots.
        
This patches moves the life time management to Document. Nodes in shadow trees selfOnlyRef the Document instead
of the ShadowRoot. ShadowRoot is treated like any other node and selfOnlyRefs the Document as well (which it
also did earlier, indirectly).
        
TreeScope is devirtualized.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRules):
        
    Author stylesheets never match in UA shadow trees.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::~ContainerNode):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::removedLastRef):
* dom/Document.h:
(WebCore::Document::selfOnlyRef):
(WebCore::Document::selfOnlyDeref):

    To avoid branches Document self-refs itself like all other Nodes. This is why deletion will now happen on ref count of 1.

(WebCore::Node::isDocumentNode):
(WebCore::Node::Node):
* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::add):
* dom/Element.cpp:
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
* dom/Node.cpp:
(WebCore::Node::~Node):
(WebCore::Node::removedLastRef):
* dom/Node.h:
(WebCore::Node::document):
(WebCore::Node::inDocument):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):
(WebCore::ShadowRoot::~ShadowRoot):
* dom/ShadowRoot.h:
* dom/TreeScope.cpp:
(WebCore::TreeScope::TreeScope):
(WebCore::TreeScope::~TreeScope):
(WebCore::TreeScope::setParentTreeScope):
* dom/TreeScope.h:
(WebCore::TreeScope::documentScope):
        
    Document can no longer ever be null.

(WebCore::TreeScope::rootNode):
(WebCore::TreeScope::setDocumentScope):
* dom/TreeScopeAdopter.cpp:
(WebCore::TreeScopeAdopter::moveTreeToNewScope):
(WebCore::TreeScopeAdopter::moveShadowTreeToNewDocument):
        
    Manage Document selfOnlyRefs for nodes in shadow trees too.

(WebCore::TreeScopeAdopter::updateTreeScope):
(WebCore::TreeScopeAdopter::moveNodeToNewDocument):
* dom/TreeScopeAdopter.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speculative iOS build fix.

* dom/Document.cpp:
(WebCore::Document::Document):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speculative iOS build fix.

* WebProcess/WebPage/mac/PageBannerMac.mm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Atomicize frequently identical ResourceResponse string members.
<https://webkit.org/b/128887>

Store the mime type, text encoding and HTTP response status text in
AtomicStrings instead of Strings to deduplicate frequently occurring
values (e.g "text/html", "utf-8" and "OK".)

Reviewed by Geoffrey Garen.

* platform/network/ResourceResponseBase.h:
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::cfURLResponse):
(WebCore::ResourceResponse::platformLazyInit):
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::platformLazyInit):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] WebKit crashes if text is copied to pasteboard with style containing text-shadow
https://bugs.webkit.org/show_bug.cgi?id=128888
<rdar://problem/16065699>

Reviewed by Anders Carlsson.

Use the correct class on iOS so that we don't crash.

* platform/mac/HTMLConverter.mm:
(_shadowForShadowStyle):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Coordinated Graphics] Make AreaAllocator fast allocated
https://bugs.webkit.org/show_bug.cgi?id=124995

Reviewed by Anders Carlsson.

AreaAllocator can be created and destroyed frequently (at least once per
frame) in case of animation with changing width or height. So, it's
better to make AreaAllocator fast allocated.

* platform/graphics/texmap/coordinated/AreaAllocator.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The FTP view is squished to the left
https://bugs.webkit.org/show_bug.cgi?id=128856

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-16
Reviewed by Andreas Kling.

* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::createBasicDocument):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Split compilation state between querySelector and CSS matching
https://bugs.webkit.org/show_bug.cgi?id=128869

Reviewed by Antti Koivisto.

Cleanup after recent changes:
-SelectorCompiler now has a SelectorContext defining if the code is compiled for QuerySelector
 or for ElementRuleCollector.
-Generalize m_selectorCannotMatchAnything by making it part of the FunctionType. FunctionType now
 fully represent the type of code generation and we don't rely implicitly on m_selectorFragments being
 empty.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::compileSelector):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
There is no tree marking for QuerySelector, so we can generate a simple selector
for the sibling selectors.

(WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
The code is split to make it simpler. The classic code generation has been moved
to generateSelectorChecker().
The decision on what to generate is reduced to a simple switch-case.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
The code that was previously in compile().

(WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
We should not generate tree marking on querySelector traversal. Since the constructor
now generate a SimpleChecker, it would also be incorrect to attempt to access the checkingContext
on the stack.
We can just skip the marking entierly.

* cssjit/SelectorCompiler.h:
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):
With the changes of SelectorContext, we can no longer generate a complex checker for querySelector.
This code may come back in the future but at the moment it is useless.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
When applying style, attribute value matching should be case sensitive for SVG
https://bugs.webkit.org/show_bug.cgi?id=128882

Reviewed by Andreas Kling.

Source/WebCore: 

SelectorChecker was incorrectly matching attribute values with a case insensitve comparison
in some cases.

The choice to use case sensitive matching was taking into account the document type but not
the element type. As a result, SVG (and likely MHTML) elements were incorrectly being tested
as if they were HTML element.

With the patch, WebKit also matches the behavior of Firefox, which is great.

Tests: fast/css/case-insensitive-attribute-with-svg.html
       fast/selectors/querySelector-case-insensitive-attribute-match-with-svg.html

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):

LayoutTests: 

* fast/css/case-insensitive-attribute-with-svg-expected.html: Added.
* fast/css/case-insensitive-attribute-with-svg.html: Added.
* fast/selectors/querySelector-case-insensitive-attribute-match-with-svg-expected.txt: Added.
* fast/selectors/querySelector-case-insensitive-attribute-match-with-svg.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Ensure that removing an iframe from the DOM tree disconnects its Frame.
<https://webkit.org/b/128889>
<rdar://problem/15671221>

Merged from Blink (patch by Adam Klein):
https://src.chromium.org/viewvc/blink?revision=156174&view=revision

Source/WebCore:

SubframeLoadingDisabler wasn't catching the case when an <iframe> was,
in its unload handler, removed and re-added to the same parent.
Fix this by using a count of SubframeLoadingDisablers that are on the
stack for a given root, rather than a simple boolean.

Test: fast/frames/reattach-in-unload.html

* html/HTMLFrameOwnerElement.h:
(WebCore::SubframeLoadingDisabler::disabledSubtreeRoots):

LayoutTests:

* fast/frames/reattach-in-unload-expected.txt: Added.
* fast/frames/reattach-in-unload.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG::prepareOSREntry should be nice to the stack
https://bugs.webkit.org/show_bug.cgi?id=128883

Reviewed by Oliver Hunt.
        
Previously OSR entry had some FIXME's and some really badly commented-out code for
clearing stack entries to help GC. It also did some permutations on a stack frame
above us, in such a way that it wasn't obviously that we wouldn't clobber our own
stack frame. This function also crashed in ASan.
        
It just seems like there was too much badness to the whole idea of prepareOSREntry
directly editing the stack. So, I changed it to create a stack frame in a scratch
buffer on the side and then have some assembly code just copy it into place. This
works fine, fixes a FIXME, possibly fixes some stack clobbering, and might help us
make more progress with ASan.

* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):
* dfg/DFGOSREntry.h:
* dfg/DFGThunks.cpp:
(JSC::DFG::osrEntryThunkGenerator):
* dfg/DFGThunks.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emitSlow_op_loop_hint):
* jit/JITOperations.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, add a useful comment for this test.

* js/regress/script-tests/marsaglia-osr-entry.js:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FTL should inline polymorphic heap accesses
https://bugs.webkit.org/show_bug.cgi?id=128795

Source/JavaScriptCore: 

Reviewed by Oliver Hunt.
        
We now inline GetByIds that we know are pure but polymorphic. They manifest in DFG IR
as MultiGetByOffset, and in LLVM IR as a switch with a basic block for each kind of
read.
        
2% speed-up on Octane mostly due to a 18% speed-up on deltablue.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecode/ExitingJITType.cpp: Added.
(WTF::printInternal):
* bytecode/ExitingJITType.h:
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFromLLInt):
(JSC::GetByIdStatus::computeForChain):
(JSC::GetByIdStatus::computeForStubInfo):
(JSC::GetByIdStatus::computeFor):
(JSC::GetByIdStatus::dump):
* bytecode/GetByIdStatus.h:
(JSC::GetByIdStatus::GetByIdStatus):
(JSC::GetByIdStatus::numVariants):
(JSC::GetByIdStatus::variants):
(JSC::GetByIdStatus::at):
(JSC::GetByIdStatus::operator[]):
* bytecode/GetByIdVariant.cpp: Added.
(JSC::GetByIdVariant::dump):
(JSC::GetByIdVariant::dumpInContext):
* bytecode/GetByIdVariant.h: Added.
(JSC::GetByIdVariant::GetByIdVariant):
(JSC::GetByIdVariant::isSet):
(JSC::GetByIdVariant::operator!):
(JSC::GetByIdVariant::structureSet):
(JSC::GetByIdVariant::chain):
(JSC::GetByIdVariant::specificValue):
(JSC::GetByIdVariant::offset):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::emitPrototypeChecks):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::getByOffsetLoadElimination):
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGCommon.h:
(JSC::DFG::verboseCompilationEnabled):
(JSC::DFG::logCompilationChanges):
(JSC::DFG::shouldShowDisassembly):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
(JSC::DFG::ConstantFoldingPhase::emitGetByOffset):
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::convertToConstant):
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToGetByOffset):
(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::hasMultiGetByOffsetData):
(JSC::DFG::Node::multiGetByOffsetData):
* dfg/DFGNodeType.h:
* dfg/DFGPhase.h:
(JSC::DFG::Phase::graph):
(JSC::DFG::runAndLog):
* dfg/DFGPlan.cpp:
(JSC::DFG::dumpAndVerifyGraph):
(JSC::DFG::Plan::compileInThread):
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLCompile.cpp:
(JSC::FTL::fixFunctionBasedOnStackMaps):
(JSC::FTL::compile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileMultiGetByOffset):
* ftl/FTLState.h:
(JSC::FTL::verboseCompilationEnabled):
(JSC::FTL::showDisassembly):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionEffectful42):
* runtime/IntendedStructureChain.cpp:
(JSC::IntendedStructureChain::dump):
(JSC::IntendedStructureChain::dumpInContext):
* runtime/IntendedStructureChain.h:
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
* runtime/Options.h:
* tests/stress/fold-multi-get-by-offset-to-get-by-offset-with-watchpoint.js: Added.
(foo):
(bar):
* tests/stress/fold-multi-get-by-offset-to-get-by-offset.js: Added.
(foo):
(bar):
* tests/stress/multi-get-by-offset-proto-and-self.js: Added.
(foo):
(Foo):

Source/WTF: 

Reviewed by Oliver Hunt.

* wtf/PrintStream.h:
(WTF::PointerDumpInContext::PointerDumpInContext):
(WTF::PointerDumpInContext::dump):
(WTF::pointerDumpInContext):

LayoutTests: 

Reviewed by Oliver Hunt.

* js/regress/polymorphic-get-by-id-expected.txt: Added.
* js/regress/polymorphic-get-by-id.html: Added.
* js/regress/script-tests/polymorphic-get-by-id.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, 32-bit build fix.

* assembler/MacroAssembler.h:
(JSC::MacroAssembler::lshiftPtr):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] Fix missing layout in flexible and content sized columns
https://bugs.webkit.org/show_bug.cgi?id=128672

Reviewed by Sergio Villar Senin.

Source/WebCore:

RenderGrid::logicalContentHeightForChild() is called for some items at the beginning of RenderGrid::layoutGridItems()
from RenderGrid::computeUsedBreadthOfGridTracks(). This causes that the comparison inside the for loop in
RenderGrid::layoutGridItems() does not detect width changes, so elements won't be marked as needsLayout.

So the comparison is done in RenderGrid::logicalContentHeightForChild() and the element is marked to perform a layout if
the width has changed.

The issue can be reproduced easily with a simple grid with one flexible or content sized column, all the available width
is not used. On top of that, when you resize the window the flexible or content sized columns are not updating their
size properly.

CSS Grid Layout perftest results are around 4% worse, which is expected as we're adding a missing layout.

Test: fast/css-grid-layout/flex-content-sized-column-use-available-width.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::logicalContentHeightForChild): Check width changes and mark element as needed layout if required.

LayoutTests:

Add test that reproduce the issue for both cases flexible and content sized columns.

* fast/css-grid-layout/flex-content-sized-column-use-available-width-expected.html: Added.
* fast/css-grid-layout/flex-content-sized-column-use-available-width.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge remote-tracking branch 'upstream/master'