WebKit2 View Gestures: Two smart magnifications in a row without moving the mouse should zoom out
https://bugs.webkit.org/show_bug.cgi?id=128108
<rdar://problem/15914539>

Reviewed by Darin Adler.

* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureController.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::handleMagnificationGesture):
Clear the bit that tells us that we should do "smart" things (because the
last gesture was also a smart magnification gesture) when the user manually pinch-magnifies.

(WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
Zoom out if the mouse hasn't moved since the last pinch-magnification gesture.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Added GetTypedArrayByteOffset to FTL
https://bugs.webkit.org/show_bug.cgi?id=127589

Patch by Matthew Mirman <mmirman@apple.com> on 2014-02-03
Reviewed by Filip Pizlo.

* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileGetTypedArrayByteOffset):
* tests/stress/ftl-gettypedarrayoffset-simple.js: Added.
(foo):
* tests/stress/ftl-gettypedarrayoffset-wasteful.js: Added.
(foo):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update JS whitespace definition for changes in Unicode 6.3
https://bugs.webkit.org/show_bug.cgi?id=127450

Reviewed by Oliver Hunt.

* parser/Lexer.h: (JSC::Lexer<UChar>::isWhiteSpace): Part 2 of the fix, update lexer too.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Consolidate StringImpl tail handling into two functions
https://bugs.webkit.org/show_bug.cgi?id=128122

Reviewed by Andreas Kling.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createUninitializedInternalNonEmpty):
(WTF::StringImpl::reallocateInternal):
* wtf/text/StringImpl.h:
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::allocationSize):
(WTF::StringImpl::tailPointer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Reorder my e-mail addresses in contributors.json,
so bugzilla will auto complete my actual bugzilla username.


* Scripts/webkitpy/common/config/contributors.json:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Deconstructed parameters aren't being placed in the correct scope
https://bugs.webkit.org/show_bug.cgi?id=128126

Reviewed by Antti Koivisto.

Source/JavaScriptCore:

Make sure we declare the bound parameter names as variables when
we reparse.  In the BytecodeGenerator we now also directly ensure
that bound parameters are placed in the symbol table of the function
we're currently compiling.  We then delay binding until just before
we start codegen for the body of the function so that we can ensure
the function has completely initialised all scope details.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
* bytecompiler/BytecodeGenerator.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::createBindingPattern):

LayoutTests:

Added tests for correct behaviour.

* js/deconstructing-parameters-should-be-locals-expected.txt: Added.
* js/deconstructing-parameters-should-be-locals.html: Added.
* js/script-tests/deconstructing-parameters-should-be-locals.js: Added.
(description.value.string_appeared_here.readDeconstructedParameter):
(overwriteDeconstructedParameter):
(readCapturedDeconstructedParameter):
(overwriteCapturedDeconstructedParameter):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r163018): Can’t scroll in <select> lists
https://bugs.webkit.org/show_bug.cgi?id=128090

Source/WebCore: 

The regression was caused by the fact that a new method scrollWithWheelEventLocation() was added
to RenderBox to replace the generic scroll() method for the particular case of scrolling using 
the mouse wheel. This turned out to be a mistake because in the case of some elements, like select lists, 
the scroll method was overriden and now the incorrect method was being called.
The solution was to remove the new method and just add two default parameters to the generic
scroll method.

Patch by Radu Stavila <stavila@adobe.com> on 2014-02-03
Reviewed by Simon Fraser.

Test: fast/scrolling/scroll-select-list.html

* page/EventHandler.cpp:
(WebCore::scrollNode):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::scroll):
* rendering/RenderBox.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::scroll):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::scroll):
* rendering/RenderListBox.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::scroll):
* rendering/RenderTextControlSingleLine.h:

LayoutTests: 

New test validates scrolling using the mouse wheel inside a select list.
This test is for the moment added as a ImageOnlyFailure expectation
because the current implementation of eventSender cannot simulate mouse wheel events.

Patch by Radu Stavila <stavila@adobe.com> on 2014-02-03
Reviewed by Simon Fraser.

* TestExpectations:
* fast/scrolling/scroll-select-list-expected.html: Added.
* fast/scrolling/scroll-select-list.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Turn GenGC on
https://bugs.webkit.org/show_bug.cgi?id=128109

Reviewed by Oliver Hunt.

* wtf/Platform.h: Initially it will only be enabled for X86-64.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
NavigationState should be a PageLoadState::Observer
https://bugs.webkit.org/show_bug.cgi?id=128130

Reviewed by Darin Adler.

This will make it easier to provide load related KVO properties on WKWebView.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h: Added.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationState):
(WebKit::NavigationState::~NavigationState):
(WebKit::NavigationState::willChangeIsLoading):
(WebKit::NavigationState::didChangeIsLoading):
(WebKit::NavigationState::willChangeTitle):
(WebKit::NavigationState::didChangeTitle):
(WebKit::NavigationState::willChangeActiveURL):
(WebKit::NavigationState::didChangeActiveURL):
(WebKit::NavigationState::willChangeHasOnlySecureContent):
(WebKit::NavigationState::didChangeHasOnlySecureContent):
(WebKit::NavigationState::willChangeEstimatedProgress):
(WebKit::NavigationState::didChangeEstimatedProgress):
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Feature flag for shape-inside
https://bugs.webkit.org/show_bug.cgi?id=128001

Reviewed by Simon Fraser.

Source/JavaScriptCore:

Add CSS_SHAPE_INSIDE flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Add CSS_SHAPE_INSIDE flag.

I wrapped everything that is specific to shape-inside in
this flag. It is now possible to build with CSS Shapes enabled
but shape-inside disabled. CSS_SHAPE_INSIDE is dependent on
CSS_SHAPES, so disabling the latter should also disable the former.

* Configurations/FeatureDefines.xcconfig:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseShapeProperty):
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::loadPendingImages):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::updateShapesBeforeBlockLayout):
(WebCore::RenderBlock::updateShapesAfterBlockLayout):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
(WebCore::constructBidiRunsForLine):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::~RenderElement):
(WebCore::RenderElement::initializeStyle):
(WebCore::RenderElement::setStyle):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::createStyle):
* rendering/RenderView.h:
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::handleEndOfLine):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::nextLineBreak):
* rendering/line/LineWidth.cpp:
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::updateAvailableWidth):
(WebCore::LineWidth::fitBelowFloats):
* rendering/line/LineWidth.h:
* rendering/shapes/ShapeInsideInfo.cpp:
* rendering/shapes/ShapeInsideInfo.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

Source/WebKit/mac:

Add CSS_SHAPE_INSIDE flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Add CSS_SHAPE_INSIDE flag.

* Configurations/FeatureDefines.xcconfig:

Tools:

Add CSS_SHAPE_INSIDE flag, and -css-shape-inside build
flag.

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the LLInt C loop

Rubber stamped by Mark Lam.

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::llint_write_barrier_slow):
* llint/LLIntSlowPaths.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Remove the VideoPluginProxyEnabled preference in WK2
https://bugs.webkit.org/show_bug.cgi?id=128128

Reviewed by Brady Eidson.

The plugin proxy is iOS WK1 only, and has no meaning in WebKit2. Just set the preference to false.

* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
* UIProcess/API/C/WKPreferencesRef.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):


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