WebKit-https.git
4 years ago2015-02-26 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Thu, 26 Feb 2015 20:20:07 +0000 (20:20 +0000)]
2015-02-26  Geoffrey Garen  <ggaren@apple.com>

        Try to fix the Mac build.

        Unreviewed.

        * bmalloc.xcodeproj/project.pbxproj: Make FreeList.h available.

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

4 years agobmalloc: Refactored SegregatedFreeList and BoundaryTag::init
ggaren@apple.com [Thu, 26 Feb 2015 20:05:14 +0000 (20:05 +0000)]
bmalloc: Refactored SegregatedFreeList and BoundaryTag::init
https://bugs.webkit.org/show_bug.cgi?id=142049

Reviewed by Anders Carlsson.

Split out a FreeList class from SegregatedFreeList. This will make it
easier to add behaviors on free list insertion and removal -- and it's
probably how I should have designed things at the start.

Moved BoundaryTag::init into LargeObject, since all the related logic
lives in LargeObject now too, and this allows us to remove BoundaryTagInlines.h.

* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/BoundaryTagInlines.h: Removed.
* bmalloc/FreeList.cpp: Copied from Source/bmalloc/bmalloc/SegregatedFreeList.cpp.
(bmalloc::FreeList::takeGreedy):
(bmalloc::FreeList::take):
(bmalloc::SegregatedFreeList::SegregatedFreeList): Deleted.
(bmalloc::SegregatedFreeList::insert): Deleted.
(bmalloc::SegregatedFreeList::takeGreedy): Deleted.
(bmalloc::SegregatedFreeList::take): Deleted.
* bmalloc/FreeList.h: Copied from Source/bmalloc/bmalloc/SegregatedFreeList.h.
(bmalloc::FreeList::push):
* bmalloc/LargeObject.h:
(bmalloc::LargeObject::init):
* bmalloc/SegregatedFreeList.cpp:
(bmalloc::SegregatedFreeList::SegregatedFreeList):
(bmalloc::SegregatedFreeList::insert):
(bmalloc::SegregatedFreeList::takeGreedy):
(bmalloc::SegregatedFreeList::take):
* bmalloc/SegregatedFreeList.h:
* bmalloc/Sizes.h:
* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::grow):

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

4 years agoDFG SSA stack accesses shouldn't speak of VariableAccessDatas
fpizlo@apple.com [Thu, 26 Feb 2015 19:51:52 +0000 (19:51 +0000)]
DFG SSA stack accesses shouldn't speak of VariableAccessDatas
https://bugs.webkit.org/show_bug.cgi?id=142036

Reviewed by Michael Saboff.

VariableAccessData is a useful thing in LoadStore and ThreadedCPS, but it's purely harmful in
SSA because you can't cook up new VariableAccessDatas. So, if you know that you want to load
or store to the stack, and you know what format to use as well as the location, then prior to
this patch you couldn't do it unless you found some existing VariableAccessData that matched
your requirements. That can be a hard task.

It's better if SSA doesn't speak of VariableAccessDatas but instead just has stack accesses
that speak of the things that a stack access needs: local, machineLocal, and format. This
patch changes the SSA way of accessing the stack to do just that.

Also add more IR validation.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGFlushFormat.h:
(JSC::DFG::isConcrete):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGGraph.h:
* dfg/DFGMayExit.cpp:
(JSC::DFG::mayExit):
* dfg/DFGNode.cpp:
(JSC::DFG::Node::hasVariableAccessData):
* dfg/DFGNode.h:
(JSC::DFG::StackAccessData::StackAccessData):
(JSC::DFG::StackAccessData::flushedAt):
(JSC::DFG::Node::convertToPutStack):
(JSC::DFG::Node::convertToGetStack):
(JSC::DFG::Node::hasUnlinkedLocal):
(JSC::DFG::Node::hasStackAccessData):
(JSC::DFG::Node::stackAccessData):
(JSC::DFG::Node::willHaveCodeGenOrOSR):
* dfg/DFGNodeType.h:
* dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
(JSC::DFG::LocalOSRAvailabilityCalculator::executeNode):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGPutLocalSinkingPhase.cpp: Removed.
* dfg/DFGPutLocalSinkingPhase.h: Removed.
* dfg/DFGPutStackSinkingPhase.cpp: Copied from Source/JavaScriptCore/dfg/DFGPutLocalSinkingPhase.cpp.
(JSC::DFG::performPutStackSinking):
(JSC::DFG::performPutLocalSinking): Deleted.
* dfg/DFGPutStackSinkingPhase.h: Copied from Source/JavaScriptCore/dfg/DFGPutLocalSinkingPhase.h.
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStackLayoutPhase.cpp:
(JSC::DFG::StackLayoutPhase::run):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
(JSC::DFG::Validate::validateCPS):
(JSC::DFG::Validate::validateSSA):
* dfg/DFGVirtualRegisterAllocationPhase.cpp:
(JSC::DFG::VirtualRegisterAllocationPhase::run):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::lower):
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileGetStack):
(JSC::FTL::LowerDFGToLLVM::compilePutStack):
(JSC::FTL::LowerDFGToLLVM::compileGetLocal): Deleted.
(JSC::FTL::LowerDFGToLLVM::compilePutLocal): Deleted.
* ftl/FTLOSRExit.h:
* tests/stress/many-sunken-locals.js: Added. This failure mode was caught by some miscellaneous test, so I figured I should write an explicit test for it.
(foo):
(bar):
(baz):
(fuzz):
(buzz):

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

4 years agoRolling out r180602, r180608, r180613, r180617, r180671.
mark.lam@apple.com [Thu, 26 Feb 2015 19:44:08 +0000 (19:44 +0000)]
Rolling out r180602, r180608, r180613, r180617, r180671.
<https://webkit.org/b/141990>

Not reviewed.

The r180602 solution does result in more work for GC when worker
threads are in use.  Filip is uncomfortable with that.
The EFL and GTK ports also seem to be unhappy with this change.
Rolling out while we investigate.

Source/JavaScriptCore:

* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::gatherStackRoots):
(JSC::Heap::machineThreads): Deleted.
* heap/Heap.h:
(JSC::Heap::machineThreads):
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::addCurrentThread):
* heap/MachineStackMarker.h:
* runtime/JSLock.cpp:
(JSC::JSLock::didAcquireLock):

Source/WebCore:

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):

LayoutTests:

* platform/efl/TestExpectations:

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

4 years agoSource/JavaScriptCore:
mmaxfield@apple.com [Thu, 26 Feb 2015 19:39:11 +0000 (19:39 +0000)]
Source/JavaScriptCore:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

This patch implements initial parsing support for the -apple-trailing-word CSS property.
This property has two possible (mutually exclusive) values: auto and
-apple-partially-balanced. This property is inherited.

The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.

This is an internal property that will allow us to control line breaking behavior for
short paragraphs.

Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
the new value must be implemented as -webkit-partially-balanced. Using the -apple-
prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
version.

Test: platform/mac/fast/text/trailing-word-parse.html

* Configurations/FeatureDefines.xcconfig:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
CSS value.
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
pair.
(WebCore::isKeywordPropertyID): New property is a keyword property.
(WebCore::CSSParser::parseValue): Use the keyword property codepath.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
representation and CSS values.
(WebCore::CSSPrimitiveValue::operator TrailingWord):
* css/CSSPropertyNames.in: New property.
* css/CSSValueKeywords.in: New value.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
* rendering/style/RenderStyle.h: Getter, setter and initial value.
* rendering/style/RenderStyleConstants.h: Internal data type.
* rendering/style/StyleRareInheritedData.h: One bit to control this style property.
* rendering/style/StyleRareInheritedData.cpp: Update constructors and operators.

Source/WebKit/mac:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

LayoutTests:
Parsing support for -webkit-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

Test parsing using getComputedStyle().

* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html: Updated.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt: Updated.
* platform/mac/fast/text/trailing-word-parse-expected.txt: Added.
* platform/mac/fast/text/trailing-word-parse.html: Added.

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

4 years agobmalloc: free up a bit in BoundaryTag
ggaren@apple.com [Thu, 26 Feb 2015 19:30:11 +0000 (19:30 +0000)]
bmalloc: free up a bit in BoundaryTag
https://bugs.webkit.org/show_bug.cgi?id=142048

Reviewed by Brady Eidson.

We were wasting a bit by accident, and I need one now.

* bmalloc/Algorithm.h:
(bmalloc::rightShift): Deleted. Not needed, now that I've simplified
the math.

* bmalloc/BoundaryTag.h: Since each boundary tag bucket is 1024 bytes
long, the maximum offset into a bucket is 1023.

You need 5 bits to count up to 1024, but only 4 to count up to 1023.

Math is hard.

(bmalloc::BoundaryTag::compactBegin): Switched to division because it
is simpler, and easier to match up with our ASSERT. The compiler will
turn division by constant power of two into a shift for us.

(bmalloc::BoundaryTag::setRange): Added an ASSERT for compactBegin
because we do encode it, so we should ASSERT that encoding did not
lose information.

* bmalloc/Sizes.h: Shifting is no longer used since we use division
instead.

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

4 years agoMake WKPageGroupRemoveAllUserContentFilters actually remove all user content filters
beidson@apple.com [Thu, 26 Feb 2015 19:29:48 +0000 (19:29 +0000)]
Make WKPageGroupRemoveAllUserContentFilters actually remove all user content filters
https://bugs.webkit.org/show_bug.cgi?id=142047

Reviewed by Geoff Garen.

Source/WebKit2:

* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupRemoveAllUserContentFilters): Remove all content filters instead of removing all user scripts.

LayoutTests:

* platform/mac-wk2/TestExpectations: Renable content filter tests, as they should no longer interfere with others.

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

4 years agoUnreviewed. Fix a accidental deletion from r178674.
roger_fong@apple.com [Thu, 26 Feb 2015 19:16:30 +0000 (19:16 +0000)]
Unreviewed. Fix a accidental deletion from r178674.
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
Return the fake WebGL context.

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

4 years agoCleanup RenderSVGResourceClipper class.
commit-queue@webkit.org [Thu, 26 Feb 2015 18:37:14 +0000 (18:37 +0000)]
Cleanup RenderSVGResourceClipper class.
https://bugs.webkit.org/show_bug.cgi?id=142032.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-02-26
Reviewed by Darin Adler.
Source/WebCore:

This is a follow up for r180643: <http://trac.webkit.org/changeset/180643>.
It includes cleanup for RenderSVGResourceClipper class.

* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
* rendering/svg/RenderSVGResourceClipper.h: Change ClipperData to be a
typedef instead of a class and rename it to ClipperMaskImage. The purpose
of having it a class even though it includes only one member was because
we wanted it to be WTF_MAKE_FAST_ALLOCATED. We do not need to allocate it
as a separate object on the heap anymore.

(WebCore::RenderSVGResourceClipper::addRendererToClipper): Instead of doing
double hash table lookups by calling HashMap::contains() and then HashMap::get(),
we can use HashMap::add() instead.

LayoutTests:

* svg/clip-path/clip-path-line-use-before-defined-expected.svg:
* svg/clip-path/clip-path-line-use-before-defined.svg: Simplify the test
and make separate drawings for different cases.

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

4 years ago[Win] Debug-only JavaScriptCore failures
msaboff@apple.com [Thu, 26 Feb 2015 18:36:43 +0000 (18:36 +0000)]
[Win] Debug-only JavaScriptCore failures
https://bugs.webkit.org/show_bug.cgi?id=142045

Rubber stamped by Filip Pizlo.

Reduced loop count to a more reasonable value of 10,000.  This still gets us to tier up
to the FTL, but doesn't take too long to run.

* tests/stress/repeated-arity-check-fail.js:

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

4 years agoSetting any of the <object> element plugin controlling attributes does not have any...
commit-queue@webkit.org [Thu, 26 Feb 2015 18:34:51 +0000 (18:34 +0000)]
Setting any of the <object> element plugin controlling attributes does not have any affect.
https://bugs.webkit.org/show_bug.cgi?id=141936.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-02-26
Reviewed by Zalan Bujtas.

Source/WebCore:

When setting any of the <object> element plugin controlling attributes
dynamically we need to mark the the element to be dirty by calling
setNeedsStyleRecalc(), so it has to recreate its renderer when needed.

Test: svg/as-object/svg-in-object-dynamic-attribute-change.html

* dom/Element.h: Delete unimplemented function.

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute): Dirty the element by calling
setNeedsStyleRecalc() when one of the plugin controlling attributes gets
changed. We have to clear the m_useFallbackContent because the attribute's
new value might fix the object rendering.

* html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::willRecalcStyle): We might need to
reconstruct the object renderer in the image case. This can happen if the
image was rendering fallback content and the attribute's new value fixes
the object rendering.

LayoutTests:

* svg/as-object/resources/lime100x100.html: Added.
* svg/as-object/resources/lime100x100.png: Added.
* svg/as-object/resources/lime100x100.svg: Added.
* svg/as-object/resources/red100x100.svg: Added.
* svg/as-object/svg-in-object-dynamic-attribute-change-expected.html: Added.
* svg/as-object/svg-in-object-dynamic-attribute-change.html: Added.
Ensure that changing the 'type' and the 'data' attributes of the <object>
element will have the expected outcome. Also make sure that the <object>
element renderer falls back correctly when setting any of the attributes
to some unexpected value.

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

4 years agoCheck in missing WebEditingTester.xcconfig file.
weinig@apple.com [Thu, 26 Feb 2015 18:33:38 +0000 (18:33 +0000)]
Check in missing WebEditingTester.xcconfig file.

* WebEditingTester/Configurations/WebEditingTester.xcconfig: Added.

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

4 years ago[webkitpy] Remove skipped file related crufts
ossy@webkit.org [Thu, 26 Feb 2015 18:32:48 +0000 (18:32 +0000)]
[webkitpy] Remove skipped file related crufts
https://bugs.webkit.org/show_bug.cgi?id=142046

Reviewed by Ryosuke Niwa.

* Scripts/webkitpy/port/base.py:
(Port.skipped_layout_tests):
(Port._tests_from_skipped_file_contents): Deleted.
(Port): Deleted.
(Port._expectations_from_skipped_files): Deleted.
* Scripts/webkitpy/port/mac_unittest.py:
(MacTest.test_default_timeout_ms):
(MacTest): Deleted.
(test_tests_from_skipped_file_contents): Deleted.

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

4 years ago[Win] Unreviewed build fix after r180676.
bfulgham@apple.com [Thu, 26 Feb 2015 18:19:41 +0000 (18:19 +0000)]
[Win] Unreviewed build fix after r180676.

I forgot to checkin one of the more important changes!

* win/tools/vsprops/common.props:

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

4 years ago[Win] Unreviewed test updates for Debug bots.
bfulgham@apple.com [Thu, 26 Feb 2015 17:30:37 +0000 (17:30 +0000)]
[Win] Unreviewed test updates for Debug bots.

* platform/win/TestExpectations:

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

4 years ago[Win] Unreviewed WinCairo build fix after r180653.
bfulgham@apple.com [Thu, 26 Feb 2015 17:04:41 +0000 (17:04 +0000)]
[Win] Unreviewed WinCairo build fix after r180653.

TestWebKitAPI should know about proper WEBCORE_EXPORT definitions.

* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommon.props:
* TestWebKitAPI/win/TestWebKitAPIPrefix.cpp: Added.
* TestWebKitAPI/win/TestWebKitAPIPrefix.h: Added.

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

4 years ago[Win] Make build logs more legible by reducing noise
bfulgham@apple.com [Thu, 26 Feb 2015 16:51:10 +0000 (16:51 +0000)]
[Win] Make build logs more legible by reducing noise
https://bugs.webkit.org/show_bug.cgi?id=142034

Reviewed by Alexey Proskuryakov.

Modify batch files, makefiles, and DOS commands to remove
uninteresting/unhelpful output.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd:
* JavaScriptCore.vcxproj/copy-files.cmd:
* JavaScriptCore.vcxproj/jsc/jscLauncherPreBuild.cmd:
* JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd:
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncherPreBuild.cmd:
* JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd:
* JavaScriptCore.vcxproj/testapi/testapiLauncherPostBuild.cmd:
* JavaScriptCore.vcxproj/testapi/testapiLauncherPreBuild.cmd:
* JavaScriptCore.vcxproj/testapi/testapiPostBuild.cmd:
* JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd:

Source/WebCore:

* WebCore.vcxproj/WebCoreGenerated.make:
* WebCore.vcxproj/WebCorePreBuild.cmd:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd:

Source/WebInspectorUI:

* WebInspectorUI.vcxproj/WebInspectorUI.make:

Source/WebKit:

* WebKit.vcxproj/Interfaces/InterfacesPostBuild.cmd:
* WebKit.vcxproj/Interfaces/InterfacesPreBuild.cmd:
* WebKit.vcxproj/WebKit/WebKitPostBuild.cmd:
* WebKit.vcxproj/WebKit/WebKitPreBuild.cmd:
* WebKit.vcxproj/WebKitGUID/WebKitGUIDPreBuild.cmd:

Source/WTF:

* WTF.vcxproj/WTFGenerated.make:
* WTF.vcxproj/WTFPreBuild.cmd:
* WTF.vcxproj/copy-files.cmd:

WebKitLibraries:

* win/tools/vsprops/common.props:

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

4 years ago[FreeType] REGRESSION(r180563): Introduced crashes
commit-queue@webkit.org [Thu, 26 Feb 2015 16:24:41 +0000 (16:24 +0000)]
[FreeType] REGRESSION(r180563): Introduced crashes
https://bugs.webkit.org/show_bug.cgi?id=142044

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2015-02-26
Reviewed by Martin Robinson.

No new tests, should be caught by any woff font test.

Use optionsPattern, not m_pattern, when m_pattern may be null.

* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::FontPlatformData::initializeWithFontFace):

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

4 years agoRevert bug 19975, now that gcc 4.7 is required.
commit-queue@webkit.org [Thu, 26 Feb 2015 15:21:13 +0000 (15:21 +0000)]
Revert bug 19975, now that gcc 4.7 is required.
https://bugs.webkit.org/show_bug.cgi?id=129927

Patch by Landry Breuil <landry@openbsd.org> on 2015-02-26
Reviewed by Andreas Kling.

isfinite() and signbit() are provided by gcc's cmath header.

* wtf/MathExtras.h:

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

4 years ago[EFL] Remove unnecessary comment after r179110
ossy@webkit.org [Thu, 26 Feb 2015 13:53:59 +0000 (13:53 +0000)]
[EFL] Remove unnecessary comment after r179110
https://bugs.webkit.org/show_bug.cgi?id=142042

Reviewed by Gyuyoung Kim.

* Source/cmake/OptionsEfl.cmake:

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

4 years ago[WK2] Unreviewed gardening, skip failing tests related to missing
ossy@webkit.org [Thu, 26 Feb 2015 13:44:40 +0000 (13:44 +0000)]
[WK2] Unreviewed gardening, skip failing tests related to missing
EventSender.beginDragWithFiles implementation in wk2/TestExpectations.

There is no good reason to wait for 30 seconds timeout, let's skip them everywhere.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/wk2/TestExpectations:

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

4 years ago[EFL] Unreviewed gardening, skip fast/workers tests to unbreak the buildbot.
ossy@webkit.org [Thu, 26 Feb 2015 11:44:06 +0000 (11:44 +0000)]
[EFL] Unreviewed gardening, skip fast/workers tests to unbreak the buildbot.
https://bugs.webkit.org/show_bug.cgi?id=142041

* platform/efl/TestExpectations:

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

4 years ago[EFL] Unreviewed gardening, comment out old expectations
ossy@webkit.org [Thu, 26 Feb 2015 11:33:23 +0000 (11:33 +0000)]
[EFL] Unreviewed gardening, comment out old expectations
of WebGL tests to really skip them as we expected.

* platform/efl/TestExpectations:

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

4 years agoASSERTION FAILED: !length.isUndefined() in WebCore::GridLength::GridLength
svillar@igalia.com [Thu, 26 Feb 2015 10:58:15 +0000 (10:58 +0000)]
ASSERTION FAILED: !length.isUndefined() in WebCore::GridLength::GridLength
https://bugs.webkit.org/show_bug.cgi?id=141645

Reviewed by Chris Dumez.

Source/WebCore:

This bug has been here since r110484 but was uncovered by
r180140. The problem r110484 was trying to fix was that
CSSPrimitiveValue::convertToLength<Length> ended up calling
CSSPrimitiveValue::computeLengthDouble() which was apparently
dereferencing conversionData.style() and
conversionData.rootStyle() pointers without checking them. That's
why that fix added this condition to convertToLength():

isFontRelativeLength() && (!conversionData.style() || !conversionData.rootStyle())

which is not correct, because for the 4 possible font relative
length types, 3 of them just use the style() pointer and the other
one just uses rootStyle() which BTW could be NULL. This erroneous
condition makes that function to return Length(Undefined) more
often than it should.

From now on it only returns Length(Undefined) if the style()
pointer is NULL and the font relative length type is one in the
set (CSS_EMS, CSS_EXS, CSS_CHS);

Test: fast/css-grid-layout/grid-with-relative-font-length-crash.html

* css/CSSPrimitiveValue.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle):
(WebCore::CSSPrimitiveValue::convertToLength):

LayoutTests:

* fast/css-grid-layout/grid-with-relative-font-length-crash-expected.txt: Added.
* fast/css-grid-layout/grid-with-relative-font-length-crash.html: Added.

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

4 years agoUNREACHABLE_FOR_PLATFORM() should be release assert
ossy@webkit.org [Thu, 26 Feb 2015 10:50:57 +0000 (10:50 +0000)]
UNREACHABLE_FOR_PLATFORM() should be release assert
https://bugs.webkit.org/show_bug.cgi?id=141904

Reviewed by Darin Adler.

* wtf/Assertions.h:
(UNREACHABLE_FOR_PLATFORM):

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

4 years agoAdd calleeSaveRegisters() implementation for ARM Traditional
ossy@webkit.org [Thu, 26 Feb 2015 09:20:24 +0000 (09:20 +0000)]
Add calleeSaveRegisters() implementation for ARM Traditional
https://bugs.webkit.org/show_bug.cgi?id=141903

Reviewed by Darin Adler.

* jit/RegisterSet.cpp:
(JSC::RegisterSet::calleeSaveRegisters):

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

4 years ago[Cocoa] Prod libcache to drop caches in memory pressure relief handler.
akling@apple.com [Thu, 26 Feb 2015 08:15:04 +0000 (08:15 +0000)]
[Cocoa] Prod libcache to drop caches in memory pressure relief handler.
<https://webkit.org/b/142024>
<rdar://problem/19966096>

Reviewed by Antti Koivisto.

libcache already listens to the OS memory pressure notifications, but we still
need to manually request a cleanup when doing an iOS process suspension, or when
simulating memory pressure.

* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::platformReleaseMemory): Call out to libcache's
cache_simulate_memory_warning_event() to make sure that nonessential objects
being kept alive by NSCaches get dropped when we need the memory.

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

4 years agoBlack line across screen on Adobe Illustrator detail page (non-retina only)
zalan@apple.com [Thu, 26 Feb 2015 06:56:01 +0000 (06:56 +0000)]
Black line across screen on Adobe Illustrator detail page (non-retina only)
https://bugs.webkit.org/show_bug.cgi?id=141866

Reviewed by Simon Fraser.

Phase is relative to the destination origin. We need to take location information into account
while snapping so that the result is inline with the snapped destination rect.
(location affects the snapped size.)

Source/WebCore:

Test: fast/backgrounds/gradient-background-on-subpixel-position.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::pixelSnapBackgroundImageGeometryForPainting):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

LayoutTests:

* fast/backgrounds/gradient-background-on-subpixel-position-expected.html: Added.
* fast/backgrounds/gradient-background-on-subpixel-position.html: Added.

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

4 years agoWeb Inspector: CRASH when debugger pauses inside a Promise handler
msaboff@apple.com [Thu, 26 Feb 2015 06:05:02 +0000 (06:05 +0000)]
Web Inspector: CRASH when debugger pauses inside a Promise handler
https://bugs.webkit.org/show_bug.cgi?id=141396

Reviewed by Mark Lam.

Source/JavaScriptCore:

For frames that don't have a scope, typically native frames, use the lexicalGlobalObject to
create the DebuggerScope for that frame.

* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::scope):

LayoutTests:

New test.

* inspector/debugger/breakpoint-scope-expected.txt: Added.
* inspector/debugger/breakpoint-scope.html: Added.
* inspector/debugger/resources/scope.js: Added.

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

4 years ago[Win] Make Windows green again after r180654.
bfulgham@apple.com [Thu, 26 Feb 2015 05:43:59 +0000 (05:43 +0000)]
[Win] Make Windows green again after r180654.

* platform/win/TestExpectations:

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

4 years agoDFG abstract heaps should respect the difference between heap and stack
fpizlo@apple.com [Thu, 26 Feb 2015 04:29:26 +0000 (04:29 +0000)]
DFG abstract heaps should respect the difference between heap and stack
https://bugs.webkit.org/show_bug.cgi?id=142022

Reviewed by Geoffrey Garen.

We will soon (https://bugs.webkit.org/show_bug.cgi?id=141174) be in a world where a "world
clobbering" operation cannot write to our stack, but may be able to read from it. This
means that we need to change the DFG abstract heap hierarchy to have a notion of Heap that
subsumes all that World previously subsumed, and a new notion of Stack that is a subtype
of World and a sibling of Heap.

So, henceforth "clobbering the world" means reading World and writing Heap.

This makes a bunch of changes to make this work, including changing the implementation of
disjointness in AbstractHeap to make it support a more general hierarchy. I was expecting
a slow-down, but I measured the heck out of this and found no perf difference.

* dfg/DFGAbstractHeap.cpp:
(JSC::DFG::AbstractHeap::dump):
* dfg/DFGAbstractHeap.h:
(JSC::DFG::AbstractHeap::supertype):
(JSC::DFG::AbstractHeap::isStrictSubtypeOf):
(JSC::DFG::AbstractHeap::isSubtypeOf):
(JSC::DFG::AbstractHeap::overlaps):
(JSC::DFG::AbstractHeap::isDisjoint):
* dfg/DFGClobberize.cpp:
(JSC::DFG::clobbersHeap):
(JSC::DFG::clobbersWorld): Deleted.
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):

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

4 years agoUpdate fast/regions/region-overflow-break.html after r177774
mmaxfield@apple.com [Thu, 26 Feb 2015 04:18:47 +0000 (04:18 +0000)]
Update fast/regions/region-overflow-break.html after r177774

Unreviewed.

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2015-02-25

* fast/regions/region-overflow-break-expected.html:
* platform/mac/TestExpectations:

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

4 years agoUpdate 3 more tests after r177774
mmaxfield@apple.com [Thu, 26 Feb 2015 04:08:38 +0000 (04:08 +0000)]
Update 3 more tests after r177774

Unreviewed.

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2015-02-25

* fast/multicol/newmulticol/spanner-table-expected.html:
* fast/multicol/newmulticol/spanner-table.html:
* fast/regions/scrolling/wheel-scroll-abspos-expected.html:
* fast/regions/scrolling/wheel-scroll-expected.html:
* platform/mac/TestExpectations:

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

4 years ago[Win] Use WEBCORE_EXPORT instead of Definition file
bfulgham@apple.com [Thu, 26 Feb 2015 04:04:11 +0000 (04:04 +0000)]
[Win] Use WEBCORE_EXPORT instead of Definition file
https://bugs.webkit.org/show_bug.cgi?id=141734

Reviewed by Alex Christensen.

Source/WebCore:

No change in functionality.

* WebCore.vcxproj/WebCore.vcxproj: Correct bad Precompiled header
settings on certain files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Automatically updated
by Visual Studio.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
* WebCore.vcxproj/WebCoreTestSupportCommon.props: Added.
* WebCore.vcxproj/WebCoreTestSupportDebug.props: Added.
* WebCore.vcxproj/WebCoreTestSupportDebugWinCairo.props: Added.
* WebCore.vcxproj/WebCoreTestSupportProduction.props: Added.
* WebCore.vcxproj/WebCoreTestSupportRelease.props: Added.
* WebCore.vcxproj/WebCoreTestSupportReleaseWinCairo.props: Added.
* WebCorePrefix.h: Provide proper export definitions for Windows.
* bindings/js/JSCustomXPathNSResolver.cpp: Add missing #include
needed by the new export style.
* bindings/js/JSDOMWindowBase.h: Export class since DRT needs
access to parts of it.
* bindings/js/ScriptCachedFrameData.cpp: Add missing #include
needed by the new export style.
* bindings/scripts/CodeGeneratorJS.pm: Use different export macro
when generating WebCoreTestSupport files, so that we don't confuse
the linker when WebCore.lib and WebCoreTestSupport.lib try to
both export WEBCORE_EXPORT symbols.
(ExportLabelForClass):
(GenerateHeader):
* bridge/jsc/BridgeJSC.cpp: Add missing #include needed by the new
export style.
* css/CSSParser.cpp: Ditto.
* dom/Document.cpp: Ditto.
* html/HTMLImageLoader.cpp: Ditto.
* inspector/CommandLineAPIModule.cpp: Ditto.
* inspector/PageDebuggerAgent.cpp: Ditto.
* inspector/PageRuntimeAgent.cpp: Ditto.
* inspector/WorkerRuntimeAgent.cpp: Ditto.
* page/DOMWindow.cpp: Ditto.
* page/DOMWindow.h: Export the destructor, as it is needed by
DumpRenderTree (on Windows).
* page/Page.cpp: Add missing #include needed by the new export style.
* platform/Logging.h: Remove conflicting export declaration.
* platform/PlatformExportMacros.h: Update for Windows use.
* testing/Internals.cpp: Add missing #include needed by the new export style.
* testing/Internals.h: Use WEBCORE_TESTSUPPORT_EXPORT for things that
are supposed to be exported by WebCoreTestSupport, not WebCore.
* testing/js/WebCoreTestSupport.cpp: Add missing #include needed by
new export style.
* testing/js/WebCoreTestSupportPrefix.cpp: Added.
* testing/js/WebCoreTestSupportPrefix.h: Added.
* xml/XMLHttpRequest.h: Export the destructor.
* xml/XSLStyleSheetLibxslt.cpp: Add missing #include needed by the new
export style.
* xml/XSLTProcessorLibxslt.cpp: Ditto.

Source/WebKit:

* WebKit.vcxproj/WebKit/WebKit.vcxproj: Visual studio automatic
file cleanup.
* WebKit.vcxproj/WebKit/WebKitCommon.props: Don't use the export definition
file any longer.

Source/WebKit/win:

* CFDictionaryPropertyBag.h: Add required export macros.
* Interfaces/WebKit.idl: Ditto.
* WebCoreStatistics.cpp: Add missing #include (required
now that we are exporting more symbols.)
* WebKitCOMAPI.h: Add required export macros.
* WebKitDLL.h: Ditto.
* WebKitPrefix.h: Ditto.
* WebView.cpp: Add missing #include required using new
due to new export mechanism.

Tools:

* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj:
Use a precompiled header so we can define our export macros properly.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj.filters:
Visual studio automatic update stuff.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeCommon.props:
Set up Precompiled Header use for project..
* DumpRenderTree/win/DumpRenderTreePrefix.cpp: Added.
* DumpRenderTree/DumpRenderTreePrefix.h: Update with proper export
declarations for building DumpRenderTree as a client of
WebCore/WebKit.

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

4 years agoUpdate css3/flexbox/csswg/flexbox_direction-row-reverse.html after r177774
mmaxfield@apple.com [Thu, 26 Feb 2015 03:46:07 +0000 (03:46 +0000)]
Update css3/flexbox/csswg/flexbox_direction-row-reverse.html after r177774

Unreviewed.

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2015-02-25

* css3/flexbox/csswg/flexbox_direction-row-reverse-expected.html:
* css3/flexbox/csswg/flexbox_direction-row-reverse.html:
* platform/mac/TestExpectations:

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

4 years agoREGRESSION(r180595): construct varargs fails in FTL
rniwa@webkit.org [Thu, 26 Feb 2015 01:24:33 +0000 (01:24 +0000)]
REGRESSION(r180595): construct varargs fails in FTL
https://bugs.webkit.org/show_bug.cgi?id=142030

Reviewed by Geoffrey Garen.

The bug was caused by IC size being too small for construct_varargs even though we've added a new argument.
Fixed the bug by increasing the IC size to match call_varargs.

* ftl/FTLInlineCacheSize.cpp:
(JSC::FTL::sizeOfConstructVarargs):

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

4 years ago[Win] Skip timing-out test after r180646.
bfulgham@apple.com [Thu, 26 Feb 2015 01:16:21 +0000 (01:16 +0000)]
[Win] Skip timing-out test after r180646.

* platform/win/TestExpectations:

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

4 years agoASan does not like JSC::MachineThreads::tryCopyOtherThreadStack.
mark.lam@apple.com [Thu, 26 Feb 2015 00:24:25 +0000 (00:24 +0000)]
ASan does not like JSC::MachineThreads::tryCopyOtherThreadStack.
<https://webkit.org/b/141672>

Reviewed by Alexey Proskuryakov.

ASan does not like the fact that we memcpy the stack for GC scans.  So,
we're working around this by using our own memcpy (asanUnsafeMemcpy)
implementation that we can tell ASan to ignore.

Source/JavaScriptCore:

* heap/MachineStackMarker.cpp:
(JSC::asanUnsafeMemcpy):

Tools:

Also removed the previous added directive to ignore *tryCopyOtherThreadStack*
which isn't effective for working around this issue.

* asan/webkit-asan-ignore.txt:

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

4 years agoRemove unnecessary DatabaseFooTask::create
gyuyoung.kim@samsung.com [Thu, 26 Feb 2015 00:18:49 +0000 (00:18 +0000)]
Remove unnecessary DatabaseFooTask::create
https://bugs.webkit.org/show_bug.cgi?id=142002

Reviewed by Darin Adler.

DatabaseFooTask::create can be replaced with std::make_unique<>.

No new tests, no behavior changes.

* Modules/webdatabase/Database.cpp:
(WebCore::Database::scheduleTransaction):
(WebCore::Database::scheduleTransactionStep):
(WebCore::Database::markAsDeletedAndClose):
(WebCore::Database::closeImmediately):
(WebCore::Database::tableNames):
* Modules/webdatabase/DatabaseTask.h:
(WebCore::DatabaseBackend::DatabaseCloseTask::create): Deleted.
(WebCore::DatabaseBackend::DatabaseTransactionTask::create): Deleted.
(WebCore::DatabaseBackend::DatabaseTableNamesTask::create): Deleted.

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

4 years ago[iOS Media] incorrect front padding on time values
dino@apple.com [Thu, 26 Feb 2015 00:05:50 +0000 (00:05 +0000)]
[iOS Media] incorrect front padding on time values
https://bugs.webkit.org/show_bug.cgi?id=142027
<rdar://problem/19960790>

Reviewed by Brent Fulgham.

We don't want to prefix times with a "0".

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.formatTime):

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

4 years agoMake PublicURLManager suspendable
cdumez@apple.com [Wed, 25 Feb 2015 23:49:08 +0000 (23:49 +0000)]
Make PublicURLManager suspendable
https://bugs.webkit.org/show_bug.cgi?id=141977
<rdar://problem/19923085>

Reviewed by Andreas Kling.

Source/WebCore:

Make PublicURLManager suspendable by overriding ActiveDOMObject::canSuspend()
and returning true. Nothing prevents suspending the PublicURLManager as its
implementation never causes JS to be executed. No implementation for
suspend() / resume() needs to be provided for the same reason.

The fact that PublicURLManager wasn't suspendable was preventing pages using
URL.createObjectURL() from entering the PageCache. Baidu.com search results
pages are using the API for example.

Test: fast/history/page-cache-createObjectURL.html

* html/PublicURLManager.cpp:
(WebCore::PublicURLManager::canSuspend):
* html/PublicURLManager.h:

LayoutTests:

Add a layout test to check that a page using URL.createObjectURL() API
can enter the PageCache.

* fast/history/page-cache-createObjectURL-expected.txt: Added.
* fast/history/page-cache-createObjectURL.html: Added.

* platform/wk2/TestExpectations:
  The new test is skipped on WK2 because WKTR does not support
  eventSender.beginDragWithFiles().

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

4 years ago<rdar://problem/19949665> Some queues fail to build because of WebKitPluginHost.app...
ap@apple.com [Wed, 25 Feb 2015 23:42:38 +0000 (23:42 +0000)]
<rdar://problem/19949665> Some queues fail to build because of WebKitPluginHost.app symlink

Fix by Dan Bernstein, reviewed by me.

* WebKit.xcodeproj/project.pbxproj:

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

4 years agoCleanup BackgroundImageGeometry class.
zalan@apple.com [Wed, 25 Feb 2015 23:19:17 +0000 (23:19 +0000)]
Cleanup BackgroundImageGeometry class.
https://bugs.webkit.org/show_bug.cgi?id=141997

Reviewed by Simon Fraser.

This patch attempts to improve RenderBoxModelObject::calculateBackgroundImageGeometry() readability by
removing redundant code and making image geometry operations explicit. BackgroundImageGeometry
becomes a read only class (with the exception of the clip() method).

No change in functionality.

* rendering/RenderBoxModelObject.cpp:
(WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
(WebCore::BackgroundImageGeometry::pixelSnapBackgroundImageGeometryForPainting):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
(WebCore::BackgroundImageGeometry::setNoRepeatX): Deleted.
(WebCore::BackgroundImageGeometry::setNoRepeatY): Deleted.
(WebCore::BackgroundImageGeometry::useFixedAttachment): Deleted.
(WebCore::BackgroundImageGeometry::clip): Deleted.
(WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting): Deleted.
* rendering/RenderBoxModelObject.h:
(WebCore::BackgroundImageGeometry::clip):
(WebCore::BackgroundImageGeometry::BackgroundImageGeometry): Deleted.
(WebCore::BackgroundImageGeometry::setDestRect): Deleted.
(WebCore::BackgroundImageGeometry::setPhase): Deleted.
(WebCore::BackgroundImageGeometry::setPhaseX): Deleted.
(WebCore::BackgroundImageGeometry::setPhaseY): Deleted.
(WebCore::BackgroundImageGeometry::setTileSize): Deleted.
(WebCore::BackgroundImageGeometry::setSpaceSize): Deleted.
(WebCore::BackgroundImageGeometry::setHasNonLocalGeometry): Deleted.

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

4 years agoHorizontal and vertical lines are clipped completely if clip-path is included in...
said@apple.com [Wed, 25 Feb 2015 23:05:20 +0000 (23:05 +0000)]
Horizontal and vertical lines are clipped completely if clip-path is included in the tag but the referenced element is defined later.
https://bugs.webkit.org/show_bug.cgi?id=141776.

Reviewed by Dean Jackson.
Source/WebCore:

Tests: svg/clip-path/clip-path-line-use-before-defined-expected.svg
       svg/clip-path/clip-path-line-use-before-defined.svg

* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext): Ensure the renderer
is added to m_clipper if it does not exist. The same renderer might have been
added to m_clipper in resourceBoundingBox().

(WebCore::RenderSVGResourceClipper::addRendererToClipper): Add the renderer to
m_clipper if it does not exist. Return the associated ClipperData.

(WebCore::RenderSVGResourceClipper::resourceBoundingBox): If the clipper is
referenced before it is defined, add the renderer to m_clipper. While doing the
layout() for the clipper, we can check if m_clipper has values or not. If it does
have, we are going to mark the clipper for client invalidation which is done by
the SVG root.

* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.h:
(WebCore::RenderSVGResourceContainer::selfNeedsClientInvalidation): Define a
new function selfNeedsClientInvalidation() which controls marking the clipper
for client invalidation. In RenderSVGResourceClipper, override it so it checks
m_clipper to force clients validation even if it the first time we do layout
for this clipper.

* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::layout): Call the virtual function
selfNeedsClientInvalidation() to check whether we need to mark the clipper for
client invalidation.

* svg/SVGElement.cpp: Delete unneeded header file.

LayoutTests:

New test cases for SVG lines which are clipped to a <clipPath>. The <clipPath>
is referenced before it is defined.

* svg/clip-path/clip-path-line-use-before-defined-expected.svg: Added.
* svg/clip-path/clip-path-line-use-before-defined.svg: Added.

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

4 years ago[WinCairo] WinLauncher is not starting on Vista.
commit-queue@webkit.org [Wed, 25 Feb 2015 22:37:09 +0000 (22:37 +0000)]
[WinCairo] WinLauncher is not starting on Vista.
https://bugs.webkit.org/show_bug.cgi?id=141905

Patch by peavo@outlook.com <peavo@outlook.com> on 2015-02-25
Reviewed by Alex Christensen.

We have to soft link with Media Foundation functions to be able
to start on Vista and WinXP.

Source/WebCore:

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::createSession):
(WebCore::MediaPlayerPrivateMediaFoundation::endSession):
(WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
(WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
(WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
(WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
(WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
(WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):

WebKitLibraries:

* win/tools/vsprops/WinCairo.props: Remove Media Foundation input libraries.

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

4 years agoCodeBlock crashes when dumping op_push_name_scope
benjamin@webkit.org [Wed, 25 Feb 2015 22:32:58 +0000 (22:32 +0000)]
CodeBlock crashes when dumping op_push_name_scope
https://bugs.webkit.org/show_bug.cgi?id=141953

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-02-25
PerformanceTests/SunSpider:

Reviewed by Filip Pizlo.

* profiler-test.yaml:

Source/JavaScriptCore:

Reviewed by Filip Pizlo and Csaba Osztrogonác.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* tests/stress/op-push-name-scope-crashes-profiler.js: Added.

Tools:

Reviewed by Filip Pizlo.

* Scripts/run-jsc-stress-tests:

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

4 years agoTest gardening
mmaxfield@apple.com [Wed, 25 Feb 2015 22:32:45 +0000 (22:32 +0000)]
Test gardening

Unreviewed.

Getting the bots green after r180633 until Brady fixes the underlying issue.

* platform/mac-wk2/TestExpectations:

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

4 years agoMake ParserError immutable by design
benjamin@webkit.org [Wed, 25 Feb 2015 22:29:26 +0000 (22:29 +0000)]
Make ParserError immutable by design
https://bugs.webkit.org/show_bug.cgi?id=141955

Reviewed by Geoffrey Garen.

This patch enforce that no field of ParserError can
be modified after the constructor.

* parser/ParserError.h:
Move the attributes to pack the integer + 2 bytes together.
This is irrelevant for memory impact, it is to remve a load-store
when copying by value.

Also move the attributes to be private.

(JSC::ParserError::isValid):
To client of the interface cared about the type of the error,
the only information needed was: is there an error.

(JSC::ParserError::ParserError):
(JSC::ParserError::syntaxErrorType):
(JSC::ParserError::token):
(JSC::ParserError::message):
(JSC::ParserError::line):
(JSC::ParserError::toErrorObject):
* API/JSScriptRef.cpp:
* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createBuiltinExecutable):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::fromGlobalCode):
(JSC::UnlinkedFunctionExecutable::codeBlockFor):
* bytecode/UnlinkedCodeBlock.h:
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::parse):
* jsc.cpp:
(runInteractive):
* parser/Parser.h:
(JSC::parse):
* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getFunctionExecutableFromGlobalCode):
* runtime/CodeCache.h:
* runtime/Completion.h:
* runtime/Executable.cpp:
(JSC::ProgramExecutable::checkSyntax):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::createProgramCodeBlock):
(JSC::JSGlobalObject::createEvalCodeBlock):

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

4 years agoGet rid of TestInvocation::pathOrURL
beidson@apple.com [Wed, 25 Feb 2015 21:27:37 +0000 (21:27 +0000)]
Get rid of TestInvocation::pathOrURL
https://bugs.webkit.org/show_bug.cgi?id=142021

Reviewed by Tim Horton.

The pathOrURL string is a relative path used as an argument to WebKitTestRunner,
but most code that uses it expected an absolute path.

This gets rid of the member and replaces all uses with a more descriptive "urlContains" method.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::updateWebViewSizeForTest):
(WTR::TestController::updateWindowScaleForTest):
(WTR::shouldUseFixedLayout):
(WTR::TestController::updateLayoutTypeForTest):

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::TestInvocation):
(WTR::TestInvocation::urlContains):
(WTR::TestInvocation::shouldLogFrameLoadDelegates):
(WTR::TestInvocation::shouldLogHistoryClientCallbacks):
(WTR::TestInvocation::invoke):
(WTR::shouldLogFrameLoadDelegates): Deleted.
(WTR::shouldLogHistoryClientCallbacks): Deleted.
* WebKitTestRunner/TestInvocation.h:
(WTR::TestInvocation::pathOrURL): Deleted.

* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::shouldMakeViewportFlexible):
(WTR::TestController::platformConfigureViewForTest):

* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::shouldUseThreadedScrolling):
(WTR::TestController::platformConfigureViewForTest):

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

4 years agoW3C test importer should use argparse instead of optparse
youenn.fablet@crf.canon.fr [Wed, 25 Feb 2015 21:05:34 +0000 (21:05 +0000)]
W3C test importer should use argparse instead of optparse
https://bugs.webkit.org/show_bug.cgi?id=142013

Reviewed by Bem Jones-Bey.

* Scripts/webkitpy/w3c/test_importer.py:
(main): Updating according argparse.
(parse_args): Moving from optparse to argparse.

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

4 years agoREGRESSION (r180018 ): Holding a rubber-band in place can get stuck
bdakin@apple.com [Wed, 25 Feb 2015 20:54:35 +0000 (20:54 +0000)]
REGRESSION (r180018 ): Holding a rubber-band in place can get stuck
https://bugs.webkit.org/show_bug.cgi?id=142020
-and corresponding-
rdar://problem/19945216

Reviewed by Tom Horton.

It was a mistaken assumption that it was necessary to return false in the zero-
delta case. That is clearly conceptually wrong since false represents the DOM
doing something special with the event, which is clearly not the case if we never
even send the event to the DOM. Returning true will allow the rest of the
scrolling machinery the ability to handle the event.
* dom/Element.cpp:
(WebCore::Element::dispatchWheelEvent):

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

4 years agoLayout test support for user content filters
beidson@apple.com [Wed, 25 Feb 2015 20:42:28 +0000 (20:42 +0000)]
Layout test support for user content filters
https://bugs.webkit.org/show_bug.cgi?id=142018

Reviewed by Tim Horton.

Tools:

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues): Clear all user content filters between tests.

* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformConfigureViewForTest): For all tests with usercontentfilter/ in their path try to load a matching .json
  file before loading the test itself.

LayoutTests:

* TestExpectations:
* http/tests/usercontentfilter/basic-filter.html: Added.
* http/tests/usercontentfilter/basic-filter.html.json: Added.
* platform/mac-wk2/TestExpectations:

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

4 years agoAdd (unused for now) code to delete website data for a set of origins
andersca@apple.com [Wed, 25 Feb 2015 18:56:48 +0000 (18:56 +0000)]
Add (unused for now) code to delete website data for a set of origins
https://bugs.webkit.org/show_bug.cgi?id=142019

Reviewed by Beth Dakin.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::~WebProcessProxy):
Assert that there are no pending callbacks.

(WebKit::WebProcessProxy::connectionDidClose):
Invoke all the didDeleteWebsiteDataForOrigins callbacks.

(WebKit::WebProcessProxy::didDeleteWebsiteDataForOrigins):
Grab the didDeleteWebsiteDataForOrigins and invoke it.

(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
Add the pending callback and send a DeleteWebsiteDataForOrigins to the web process.

* UIProcess/WebProcessProxy.h:
Add new members.

* UIProcess/WebProcessProxy.messages.in:
Add a DidDeleteWebsiteDataForOrigins message.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::deleteWebsiteDataForOrigins):
For now, just send back a DidDeleteWebsiteDataForOrigins message.

* WebProcess/WebProcess.h:
Add new members.

* WebProcess/WebProcess.messages.in:
Add a DeleteWebsiteDataForOrigins message.

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

4 years agoHTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for conten...
rniwa@webkit.org [Wed, 25 Feb 2015 18:42:04 +0000 (18:42 +0000)]
HTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for contentEditableAttr
https://bugs.webkit.org/show_bug.cgi?id=142003

Reviewed by Sam Weinig.

Utilized contentEditableType to reduce the code duplication.

* html/HTMLElement.cpp:
(WebCore::contentEditableType): Moved and added a version that takes AtomicString.
(WebCore::HTMLElement::collectStyleForPresentationAttribute):

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

4 years agoFix build warning in WebKit2/UIProcess module.
shiva.jm@samsung.com [Wed, 25 Feb 2015 17:43:40 +0000 (17:43 +0000)]
Fix build warning in WebKit2/UIProcess module.
https://bugs.webkit.org/show_bug.cgi?id=142014

Reviewed by Anders Carlsson.

Fix build warning by using UNUSED_PARAM macro.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeWebProcessAccessTypeForDataFetch):

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

4 years ago[Win] Skip new <attachment> test since it's not working on Windows.
bfulgham@apple.com [Wed, 25 Feb 2015 17:35:39 +0000 (17:35 +0000)]
[Win] Skip new <attachment> test since it's not working on Windows.

* platform/win/TestExpectations:

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

4 years ago[Win] Skip ARIA 1.1 tests for unsupported feature.
bfulgham@apple.com [Wed, 25 Feb 2015 17:26:30 +0000 (17:26 +0000)]
[Win] Skip ARIA 1.1 tests for unsupported feature.

* platform/win/TestExpectations:

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

4 years agoVersioning.
bshafiei@apple.com [Wed, 25 Feb 2015 16:18:35 +0000 (16:18 +0000)]
Versioning.

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

4 years agoWeb Inspector: Improve Regex/Error output in Object Tree and Previews
commit-queue@webkit.org [Wed, 25 Feb 2015 15:10:04 +0000 (15:10 +0000)]
Web Inspector: Improve Regex/Error output in Object Tree and Previews
https://bugs.webkit.org/show_bug.cgi?id=142010

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-02-25
Reviewed by Timothy Hatcher.

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView):
(WebInspector.ObjectPreviewView.prototype._initTitleElement):
Since some object types may be formatted as simple values, ensure they get
the formatted style even in the title view.

(WebInspector.ObjectPreviewView.prototype._appendPreview):
Those object types that can be formatted as simple values should skip
to the value formatting phase.

(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
Do not show property previews for error objects. Always assume lossy
so that it can be expanded.

* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView):
Make a similiar improvement for ObjectTree titles when previews are
unavailable. This will make dir(value) show a stylized value in the
title of the Object Tree.

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

4 years agoWeb Inspector: Improve PropertyPath display strings for getters / values
commit-queue@webkit.org [Wed, 25 Feb 2015 15:03:48 +0000 (15:03 +0000)]
Web Inspector: Improve PropertyPath display strings for getters / values
https://bugs.webkit.org/show_bug.cgi?id=142008

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-02-25
Reviewed by Timothy Hatcher.

* UserInterface/Base/Utilities.js:
(doubleQuotedString):
Helper to double quote a string and escape double quotes with-in it.

* UserInterface/Models/PropertyPath.js:
(WebInspector.PropertyPath.prototype.get reducedPath):
Compute the path eliminating unnecessary __proto__s. Note we don't
property handle the case where a .__proto__.x is override earlier
by a .x, but that case is rare.

(WebInspector.PropertyPath.prototype.displayPath):
Helper for choosing fullPath or reducedPath display strings.

(WebInspector.PropertyPath.prototype.appendPropertyName):
(WebInspector.PropertyPath.prototype.appendGetterPropertyName):
(WebInspector.PropertyPath.prototype.appendSetterPropertyName):
(WebInspector.PropertyPath.prototype.appendPropertyDescriptor):
When appending a descriptor, specify if it is for a getter/setter or value.
For getters / setters the actual function can be directly fetched via
__lookupGetter__/__lookupSetter__. Continue to use the property name for values.

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForTypesAndValue):

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._propertyPathType):
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath):
(WebInspector.ObjectTreePropertyTreeElement.prototype._thisPropertyPath):
(WebInspector.ObjectTreePropertyTreeElement.prototype):

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

4 years ago[CSS Grid Layout] Tracks growing beyond limits when they should not
svillar@igalia.com [Wed, 25 Feb 2015 10:53:57 +0000 (10:53 +0000)]
[CSS Grid Layout] Tracks growing beyond limits when they should not
https://bugs.webkit.org/show_bug.cgi?id=140883

Reviewed by Darin Adler.

Source/WebCore:

Our track sizing algorithm implementation incorrectly grew some
tracks beyond limits when handling min-content and max-content
base sizes. In those cases we should only grow "any affected track
that happens to also have an intrinsic max track sizing function"
or all of them if there are none.

The problem was that we're using a vector of indexes pointing to
the vector with the list of affected tracks. Those indexes become
easily incorrect because the first thing we do in
distributeSpaceToTracks() is to sort the vector with the affected
tracks by growth potential.

Instead of that we now pass a vector with pointers to the list of
tracks allowed to grow over the limits. The size changes are now
directly stored in the GridTracks (it's called plannedSize)
instead of in a separate vector, so we don't need to worry about
tracks being rearranged (and we also get rid of the ugly vector of
indexes pointing to another vector).

* rendering/RenderGrid.cpp:
(WebCore::GridTrack::plannedSize): New member with getter/setter.
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
Pass a setXXX() function instead of a growXXX() one to ForItems().
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
Renamed additionalBreadthSpace to extraSpace which is the term
used by specs.
(WebCore::RenderGrid::distributeSpaceToTracks): Use GridTrack's
plannedSize instead of the old distribution vector.
(WebCore::GridTrack::growBaseSize): Deleted.
(WebCore::GridTrack::growGrowthLimit): Deleted.
* rendering/RenderGrid.h:

LayoutTests:

* fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt:
* fast/css-grid-layout/grid-content-sized-columns-resolution.html:

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

4 years agoNeed to pass RTLD_DEEPBIND to dlopen() to ensure that our LLVMOverrides take effect...
fpizlo@apple.com [Wed, 25 Feb 2015 10:18:41 +0000 (10:18 +0000)]
Need to pass RTLD_DEEPBIND to dlopen() to ensure that our LLVMOverrides take effect on Linux
https://bugs.webkit.org/show_bug.cgi?id=142006

Reviewed by Csaba Osztrogonác.

This fixes hard-to-reproduce concurrency-related crashes when running stress tests with FTL and
concurrent JIT enabled.

* llvm/InitializeLLVMPOSIX.cpp:
(JSC::initializeLLVMPOSIX):

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

4 years agoAX: Implement support for ARIA 1.1 'searchbox' role
jdiggs@igalia.com [Wed, 25 Feb 2015 10:04:16 +0000 (10:04 +0000)]
AX: Implement support for ARIA 1.1 'searchbox' role
https://bugs.webkit.org/show_bug.cgi?id=142004

Reviewed by Chris Fleizach.

Source/WebCore:

Add a new accessible SearchFieldRole to handle both the ARIA role
and the "search" input type.

No new tests. Instead, added a new test case to roles-exposed.html
for the mapping, and updated roles-computedRoleString.html because
there is now a one-to-one mapping between the "search" input type
and an ARIA role.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::isSearchField):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isARIATextControl):
(WebCore::AccessibilityObject::isARIAInput):
(WebCore::initializeRoleMap):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
(-[WebAccessibilityObjectWrapper accessibilityTraits]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):

LayoutTests:

* accessibility/roles-computedRoleString-expected.txt: Updated for new role.
* accessibility/roles-computedRoleString.html: Updated for new role.
* accessibility/roles-exposed.html: New test case added.
* platform/efl/accessibility/roles-exposed-expected.txt: Updated for new test case.
* platform/gtk/accessibility/roles-exposed-expected.txt: Updated for new test case.
* platform/mac-mavericks/accessibility/roles-exposed-expected.txt: Updated for new test case.
* platform/mac/accessibility/roles-exposed-expected.txt: Updated for new test case.

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

4 years agoEnable concurrent JIT on GTK
fpizlo@apple.com [Wed, 25 Feb 2015 09:08:26 +0000 (09:08 +0000)]
Enable concurrent JIT on GTK
https://bugs.webkit.org/show_bug.cgi?id=142007

Reviewed by Benjamin Poulain.

Seems weird that GTK keeps it off. No good reason for that as far as I can tell.

* wtf/Platform.h:

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

4 years agoConvert WebEditingTester to use xcconfig files
commit-queue@webkit.org [Wed, 25 Feb 2015 07:23:48 +0000 (07:23 +0000)]
Convert WebEditingTester to use xcconfig files
https://bugs.webkit.org/show_bug.cgi?id=141879

Patch by Sam Weinig <sam@webkit.org> on 2015-02-24
Reviewed by Darin Adler.

Add xcconfig files to WebEditingTester based on the ones used by MiniBrowser.

* WebEditingTester/Configurations: Added.
* WebEditingTester/Configurations/Base.xcconfig: Added.
* WebEditingTester/Configurations/DebugRelease.xcconfig: Added.
* WebEditingTester/WebEditingTester.xcodeproj/project.pbxproj:

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

4 years agoCMake build of libllvmForJSC.so should limit its export list like the Xcode build...
fpizlo@apple.com [Wed, 25 Feb 2015 06:59:55 +0000 (06:59 +0000)]
CMake build of libllvmForJSC.so should limit its export list like the Xcode build does
https://bugs.webkit.org/show_bug.cgi?id=141989

Reviewed by Gyuyoung Kim.

* CMakeLists.txt:
* llvm/library/libllvmForJSC.version: Added.

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

4 years agoMore iOS build fix after r180602.
ap@apple.com [Wed, 25 Feb 2015 05:52:24 +0000 (05:52 +0000)]
More iOS build fix after r180602.

* heap/Heap.h: Export Heap::machineThreads().

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

4 years agoUpdating js/dom/global-constructors-attributes.html results for HTMLAttachmentElement.
ap@apple.com [Wed, 25 Feb 2015 05:37:25 +0000 (05:37 +0000)]
Updating js/dom/global-constructors-attributes.html results for HTMLAttachmentElement.

* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:

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

4 years agoClarify some resizing terminology in ScrollView/FrameView
simon.fraser@apple.com [Wed, 25 Feb 2015 05:35:38 +0000 (05:35 +0000)]
Clarify some resizing terminology in ScrollView/FrameView
https://bugs.webkit.org/show_bug.cgi?id=141996

Reviewed by Zalan Bujtas.

ScrollableArea/ScrollView/FrameView had some confusing terminology around
contentsResized/visibleContentsResized/fixedLayoutSizeChanged.

Clarify this by distinguishing between:
1. Available size changes because of
    i) non-overlay scrollbar presence
   ii) ScrollableArea frame change
2. Removing fixedLayoutSizeChanged() and just treating it like an
   available size change.

contentsResized() is relegated to simply being a hook that allows Mac to
flash overlay scrollbars.

The confusingly named visibleContentsResized() is now updateContentsSize(),
and is the way that a ScrollableArea tells its subclasss that it should recompute
the size of the contents (i.e. do a layout).

Source/WebCore:

* page/FrameView.cpp:
(WebCore::FrameView::setContentsSize): No longer mysteriously skip the
FrameView implementation of contentsResized(), which used to do a setNeedsLayout()
which we didn't want to do from setContentsSize(), which itself happens as a result of layout.
(WebCore::FrameView::adjustViewSize): Whitespace.
(WebCore::FrameView::layout): Ditto.
(WebCore::FrameView::availableContentSizeChanged): Called on frame size change, or scrollbar
change.
(WebCore::FrameView::updateContentsSize): This actually does the layout.
(WebCore::FrameView::scrollbarStyleChanged): Always call the base class;  ScrollView::scrollbarStyleChanged
will bail if not a forced update.
(WebCore::FrameView::setCustomFixedPositionLayoutRect): Forces a layout via updateContentsSize() now.
(WebCore::FrameView::contentsResized): Deleted.
(WebCore::FrameView::fixedLayoutSizeChanged): Deleted.
(WebCore::FrameView::visibleContentsResized): Deleted.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::setFixedLayoutSize): Calls availableContentSizeChanged() now.
(WebCore::ScrollView::setUseFixedLayout): Ditto.
(WebCore::ScrollView::availableContentSizeChanged): Update scrollbars if that's not
the reason we are being called.
(WebCore::ScrollView::updateScrollbars): contentsResized() was the thing that caused setNeedsLayout();
replace it with availableContentSizeChanged(). visibleContentsResized() did the layout, and
replace with updateContentsSize().
(WebCore::ScrollView::setFrameRect): Call availableContentSizeChanged() now. This takes care of
updating scrollbars, so no need to explicitly do that.
(WebCore::ScrollView::scrollbarStyleChanged): Call the base class.
(WebCore::ScrollView::fixedLayoutSizeChanged): Deleted.
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::availableContentSizeChanged): Call scrollAnimator->contentsResized()
to flash the scrollbars.
(WebCore::ScrollableArea::scrolledToRight):
(WebCore::ScrollableArea::scrollbarStyleChanged): Call availableContentSizeChanged() since
scrollbar style affects available space.
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::updateContentsSize):
(WebCore::ScrollableArea::scrollbarStyleChanged): Deleted.

Source/WebKit2:

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::scrollbarStyleChanged): Call the base class method,
which takes care of

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

4 years agoUnreviewed Mavericks build attempt fix after r180609.
rniwa@webkit.org [Wed, 25 Feb 2015 05:11:36 +0000 (05:11 +0000)]
Unreviewed Mavericks build attempt fix after r180609.

* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::checkGPUStatusIfNecessary):

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

4 years agoUnreviewed build fix after r180602.
bfulgham@apple.com [Wed, 25 Feb 2015 04:53:44 +0000 (04:53 +0000)]
Unreviewed build fix after r180602.

* heap/MachineStackMarker.h: Add missing 'no return'
declaration for Windows.

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

4 years agoTeach MiniBrowser how to disable per-window web processes
aestes@apple.com [Wed, 25 Feb 2015 04:53:43 +0000 (04:53 +0000)]
Teach MiniBrowser how to disable per-window web processes
https://bugs.webkit.org/show_bug.cgi?id=141988

Reviewed by Darin Adler.

* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration): Created a _WKProcessPoolConfiguration with maximumProcessCount == 1 if per-window web processes are disabled.
* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]): Added a new Settings menu item.
(-[SettingsController validateMenuItem:]): Validated the new Settings menu item.
(-[SettingsController togglePerWindowWebProcessesDisabled:]): Displayed an alert informing the user that MiniBrowser must be restarted for the setting to take effect.
(-[SettingsController perWindowWebProcessesDisabled]): Returned the value from user defaults.

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

4 years agoBot watcher's dashboard sometimes hits an assertion: data.num_missing === this.layout...
ap@apple.com [Wed, 25 Feb 2015 04:32:49 +0000 (04:32 +0000)]
Bot watcher's dashboard sometimes hits an assertion: data.num_missing === this.layoutTestResults.testsWithMissingResults.length
https://bugs.webkit.org/show_bug.cgi?id=141889

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:

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

4 years agoUnreviewed Windows build fix after r180601.
bfulgham@apple.com [Wed, 25 Feb 2015 04:28:52 +0000 (04:28 +0000)]
Unreviewed Windows build fix after r180601.

Export some missing symbols.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

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

4 years agoWebGL: Destroy the GLContext if a GPU restart has been detected.
roger_fong@apple.com [Wed, 25 Feb 2015 04:19:30 +0000 (04:19 +0000)]
WebGL: Destroy the GLContext if a GPU restart has been detected.
https://bugs.webkit.org/show_bug.cgi?id=141567.
<rdar://problem/18507496>
Reviewed by Dean Jackson.
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::setWebGLContext):
Keep track of which WebGLRenderingContext is associated with the current GraphicsContext3D.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): Helper method to check GPU status.
(WebCore::GraphicsContext3D::GraphicsContext3D):
Don’t immediately abort the GPU process when the restart status is kCGLCPGPURestartStatusBlacklisted.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::forceContextLost):
Force the WebGLRenderingContext to be lost.
(WebCore::GraphicsContext3D::drawArrays): Check GPU status after calling drawArrays.
(WebCore::GraphicsContext3D::drawElements): Check GPU status after calling drawElements.
* WebCore.xcodeproj/project.pbxproj: Add SPI header for iOS.
* platform/spi/ios/OpenGLESSPI.h: Added.

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

4 years agoUnreviewed ios build fix after http://trac.webkit.org/changeset/180602.
slewis@apple.com [Wed, 25 Feb 2015 04:10:54 +0000 (04:10 +0000)]
Unreviewed ios build fix after trac.webkit.org/changeset/180602.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):

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

4 years agoUse an enum for scrollbar style
simon.fraser@apple.com [Wed, 25 Feb 2015 04:07:06 +0000 (04:07 +0000)]
Use an enum for scrollbar style
https://bugs.webkit.org/show_bug.cgi?id=141985

Reviewed by Beth Dakin.
Source/WebCore:

Switch to an enum class for the scrollbar style (normal or overlay).

* page/ChromeClient.h:
* page/FrameView.cpp:
(WebCore::FrameView::scrollbarStyleChanged):
* page/FrameView.h:
* platform/ScrollTypes.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollbarStyleChanged):
* platform/ScrollView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::scrollbarStyleChanged):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::updateScrollerStyle):

Source/WebKit2:

Switch to an enum class for the scrollbar style (normal or overlay).

Sadly it still has to be passed as an int across the process boundary.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::scrollbarStyleChanged):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::recommendedScrollbarStyleDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

4 years ago[Mac][WK2] ASSERTION FAILED: m_sendPort in IPC::Connection::open()
cdumez@apple.com [Wed, 25 Feb 2015 03:52:40 +0000 (03:52 +0000)]
[Mac][WK2] ASSERTION FAILED: m_sendPort in IPC::Connection::open()
https://bugs.webkit.org/show_bug.cgi?id=141934

Reviewed by Darin Adler.

Speculative fix for "ASSERTION FAILED: m_sendPort" in
IPC::Connection::open(). This assertion seems to indicate we ended
up in IPC::Connection::open() with MACH_PORT_NULL as port.

I found that in XPCServiceInitializerDelegate::getConnectionIdentifier()
we return true unconditionally, even though
xpc_dictionary_copy_mach_send() can return MACH_PORT_NULL. This patch
updates this method to add a check for MACH_PORT_NULL and return false
in this case.

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::getConnectionIdentifier):

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

4 years agoUnreviewed, rolling out r180599.
commit-queue@webkit.org [Wed, 25 Feb 2015 03:48:53 +0000 (03:48 +0000)]
Unreviewed, rolling out r180599.
https://bugs.webkit.org/show_bug.cgi?id=141998

Lots of new test failures (Requested by smfr on #webkit).

Reverted changeset:

"Parsing support for -webkit-trailing-word"
https://bugs.webkit.org/show_bug.cgi?id=141939
http://trac.webkit.org/changeset/180599

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

4 years agoRolling out http://trac.webkit.org/changeset/180430 as it causes the PLT to crash.
slewis@apple.com [Wed, 25 Feb 2015 03:02:26 +0000 (03:02 +0000)]
Rolling out trac.webkit.org/changeset/180430 as it causes the PLT to crash.
<rdar://problem/19948015>

Unreviewed.

* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::grow):
* bmalloc/VMHeap.h:
* bmalloc/Zone.cpp:
(bmalloc::Zone::Zone):
(bmalloc::Zone::size): Deleted.
* bmalloc/Zone.h:

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

4 years agoFix build break on EFL and GTK port since r180585.
gyuyoung.kim@samsung.com [Wed, 25 Feb 2015 02:31:22 +0000 (02:31 +0000)]
Fix build break on EFL and GTK port since r180585.
https://bugs.webkit.org/show_bug.cgi?id=141994

Reviewed by Joseph Pecoraro.

* UIProcess/WebsiteData/WebsiteDataRecord.cpp:
(WebKit::WebsiteDataRecord::displayNameForOrigin):
* UIProcess/WebsiteData/WebsiteDataRecord.h:
(WebKit::WebsiteDataRecord::WebsiteDataRecord):

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

4 years agoMachineThreads::Thread clean up has a use after free race condition.
mark.lam@apple.com [Wed, 25 Feb 2015 02:28:23 +0000 (02:28 +0000)]
MachineThreads::Thread clean up has a use after free race condition.
<https://webkit.org/b/141990>

Reviewed by Michael Saboff.

MachineThreads::Thread clean up relies on the clean up mechanism
implemented in _pthread_tsd_cleanup_key(), which looks like this:

void _pthread_tsd_cleanup_key(pthread_t self, pthread_key_t key)
{
    void (*destructor)(void *);
    if (_pthread_key_get_destructor(key, &destructor)) {
        void **ptr = &self->tsd[key];
        void *value = *ptr;

        // At this point, this thread has cached "destructor" and "value"
        // (which is a MachineThreads*).  If the VM gets destructed (along
        // with its MachineThreads registry) by another thread, then this
        // thread will have no way of knowing that the MachineThreads* is
        // now pointing to freed memory.  Calling the destructor below will
        // therefore result in a use after free scenario when it tries to
        // access the MachineThreads' data members.

        if (value) {
            *ptr = NULL;
            if (destructor) {
                destructor(value);
            }
        }
    }
}

The solution is simply to change MachineThreads from a per VM thread
registry to a process global singleton thread registry i.e. the
MachineThreads registry is now immortal and we cannot have a use after
free scenario since we never free it.

The cost of this change is that all VM instances will have to scan
stacks of all threads ever touched by a VM, and not just those that
touched a specific VM.  However, stacks tend to be shallow.  Hence,
those additional scans will tend to be cheap.

Secondly, it is not common for there to be multiple JSC VMs in use
concurrently on multiple threads.  Hence, this cost should rarely
manifest in real world applications.

* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::machineThreads):
(JSC::Heap::gatherStackRoots):
* heap/Heap.h:
(JSC::Heap::machineThreads): Deleted.
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::addCurrentThread):
* heap/MachineStackMarker.h:
* runtime/JSLock.cpp:
(JSC::JSLock::didAcquireLock):

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

4 years ago[Attachment] Give <attachment> elements an underlying File
weinig@apple.com [Wed, 25 Feb 2015 01:49:59 +0000 (01:49 +0000)]
[Attachment] Give <attachment> elements an underlying File
https://bugs.webkit.org/show_bug.cgi?id=141993

Reviewed by Tim Horton.

Source/WebCore:

- Add a JS subclass for attachments so that <attachment>s are
  instances of HTMLAttachmentElement rather than HTMLElement.
- Give HTMLAttachmentElements an underlying File that they
  are the representation of. Expose it via a new 'file' property.
- Expose a new Internals function called window.internals.createFile(url)
  that allows creating File objects for testing.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* fileapi/File.h:
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::~HTMLAttachmentElement):
(WebCore::HTMLAttachmentElement::file):
(WebCore::HTMLAttachmentElement::setFile):
* html/HTMLAttachmentElement.h:
* html/HTMLAttachmentElement.idl: Added.
* html/HTMLTagNames.in:
* testing/Internals.cpp:
(WebCore::Internals::createFile):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Update attachment-dom.html to test setting and getting the
underlying file.

* fast/attachment/attachment-dom-expected.txt:
* fast/attachment/attachment-dom.html:
* fast/attachment/resources: Added.
* fast/attachment/resources/test-file.txt: Added.

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

4 years agoAX: Implement support for ARIA 1.1 'switch' role
jdiggs@igalia.com [Wed, 25 Feb 2015 01:43:42 +0000 (01:43 +0000)]
AX: Implement support for ARIA 1.1 'switch' role
https://bugs.webkit.org/show_bug.cgi?id=141986

Reviewed by Chris Fleizach.

Source/WebCore:

Map the role to ATK_ROLE_TOGGLE_BUTTON for Gtk and Efl; on the Mac, to
AXCheckBox with a subrole of AXSwitch. Ensure it looks and acts like a
widget to accessibility APIs (supports and emits notifications when
toggled, doesn't have children, exposes a name and description when
provided).

Tests: accessibility/aria-switch-checked.html
       accessibility/aria-switch-sends-notification.html
       accessibility/aria-switch-text.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren):
(WebCore::AccessibilityNodeObject::isChecked):
(WebCore::AccessibilityNodeObject::visibleText):
(WebCore::AccessibilityNodeObject::title):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isARIAInput):
(WebCore::AccessibilityObject::actionVerb):
(WebCore::initializeRoleMap):
(WebCore::AccessibilityObject::supportsChecked):
(WebCore::AccessibilityObject::checkboxOrRadioValue):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isSwitch):
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
(-[WebAccessibilityObjectWrapper accessibilityTraits]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

* accessibility/aria-switch-checked-expected.txt: Added.
* accessibility/aria-switch-checked.html: Added.
* accessibility/aria-switch-sends-notification-expected.txt: Added.
* accessibility/aria-switch-sends-notification.html: Added.
* accessibility/aria-switch-text.html: Added.
* accessibility/roles-exposed.html: Added a test case for the new role.
* platform/efl/accessibility/aria-fallback-roles-expected.txt: Added.
* platform/efl/accessibility/aria-switch-text-expected.txt: Added.
* platform/efl/accessibility/roles-exposed-expected.txt: Updated for the new role.
* platform/gtk/accessibility/aria-fallback-roles-expected.txt: Added.
* platform/gtk/accessibility/aria-switch-text-expected.txt: Added.
* platform/gtk/accessibility/roles-exposed-expected.txt: Updated for the new role.
* platform/mac-mavericks/accessibility/roles-exposed-expected.txt: Updated for the new role.
* platform/mac/TestExpectations: Skip the 'checked' notifcation as the Mac doesn't have it.
* platform/mac/accessibility/aria-switch-text-expected.txt: Added.
* platform/mac/accessibility/roles-exposed-expected.txt: Updated for the new role.

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

4 years agoSource/JavaScriptCore:
mmaxfield@apple.com [Wed, 25 Feb 2015 01:17:38 +0000 (01:17 +0000)]
Source/JavaScriptCore:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

This patch implements initial parsing support for the -apple-trailing-word CSS property.
This property has two possible (mutually exclusive) values: auto and
-apple-partially-balanced. This property is inherited.

The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.

This is an internal property that will allow us to control line breaking behavior for
short paragraphs.

Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
the new value must be implemented as -webkit-partially-balanced. Using the -apple-
prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
version.

Test: platform/mac/fast/text/trailing-word-parse.html

* Configurations/FeatureDefines.xcconfig:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
CSS value.
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
pair.
(WebCore::isKeywordPropertyID): New property is a keyword property.
(WebCore::CSSParser::parseValue): Use the keyword property codepath.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
representation and CSS values.
(WebCore::CSSPrimitiveValue::operator TrailingWord):
* css/CSSPropertyNames.in: New property.
* css/CSSValueKeywords.in: New value.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
* rendering/style/RenderStyle.h: Getter, setter and initial value.
* rendering/style/RenderStyleConstants.h: Internal data type.
* rendering/style/StyleRareInheritedData.h: One bit to control this style property.

Source/WebKit/mac:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

LayoutTests:
Parsing support for -webkit-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

Test parsing using getComputedStyle().

* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html: Updated.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt: Updated.
* platform/mac/fast/text/trailing-word-parse-expected.txt: Added.
* platform/mac/fast/text/trailing-word-parse.html: Added.

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

4 years agoRemove DecodingTask::create and DatabaseOpenTask::create
gyuyoung.kim@samsung.com [Wed, 25 Feb 2015 01:12:44 +0000 (01:12 +0000)]
Remove DecodingTask::create and DatabaseOpenTask::create
https://bugs.webkit.org/show_bug.cgi?id=141966

Reviewed by Anders Carlsson.

These create() factory functions are redundant. We can use std::make_unique<> directly.

No new tests, no behavior changes.

* Modules/webaudio/AsyncAudioDecoder.cpp:
(WebCore::AsyncAudioDecoder::decodeAsync):
(WebCore::AsyncAudioDecoder::DecodingTask::create): Deleted.
* Modules/webaudio/AsyncAudioDecoder.h:
* Modules/webdatabase/Database.cpp:
(WebCore::Database::openAndVerifyVersion):
* Modules/webdatabase/DatabaseTask.h:
(WebCore::DatabaseBackend::DatabaseOpenTask::create): Deleted.

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

4 years agoWeb Inspector: Eliminate console-formatted-* class names in favor of formatted-*
joepeck@webkit.org [Wed, 25 Feb 2015 00:44:54 +0000 (00:44 +0000)]
Web Inspector: Eliminate console-formatted-* class names in favor of formatted-*
https://bugs.webkit.org/show_bug.cgi?id=141948

Reviewed by Timothy Hatcher.

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForNode):
Helper for formatting a node as a DOMTreeOutline.

* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatParameter):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsString):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.ConsoleMessageImpl.prototype.appendUndefined):
(WebInspector.ConsoleMessageImpl.prototype._printArray):
(WebInspector.ConsoleMessageImpl.prototype.): Deleted.
* UserInterface/Views/LogContentView.css:
(.console-user-command-result):
(.console-formatted-object): Deleted.
(.console-object-preview): Deleted.
(.expanded .console-object-preview): Deleted.
(.console-object-preview .name): Deleted.
(.expanded .console-object-preview > .console-object-preview-body): Deleted.
(.console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.
(.console-object-preview-body .console-object-preview-name.console-object-preview-name-Object): Deleted.
(.expanded .console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.
(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap): Deleted.
(:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .section): Deleted.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._leftArrowWasPressed):
(WebInspector.LogContentView.prototype._rightArrowWasPressed):
Add FIXMEs since this will no longer work with ObjectTree.

* UserInterface/Views/ObjectPreviewView.css:
(.object-preview):
* UserInterface/Views/ObjectTreeView.css:
(.object-tree):
Copy over the font styles from console-formatted-object.

* UserInterface/Views/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertyTreeElement.prototype.update):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForString):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForRegExp):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNumber):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForBoolean):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNull):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForUndefined):
Convert to formatted value class names.

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

4 years agoUnreviewed, rolling out r180578.
commit-queue@webkit.org [Wed, 25 Feb 2015 00:44:00 +0000 (00:44 +0000)]
Unreviewed, rolling out r180578.
https://bugs.webkit.org/show_bug.cgi?id=141992

Broke scrolling in Inspector Console. (Requested by JoePeck on
#webkit).

Reverted changeset:

"[Mac] WebKit abandons overlay scrollbar CALayers."
https://bugs.webkit.org/show_bug.cgi?id=141943
http://trac.webkit.org/changeset/180578

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

4 years agoUse "this" instead of "callee" to get the constructor
rniwa@webkit.org [Wed, 25 Feb 2015 00:41:35 +0000 (00:41 +0000)]
Use "this" instead of "callee" to get the constructor
https://bugs.webkit.org/show_bug.cgi?id=141019

Reviewed by Filip Pizlo.

This patch uses "this" register to pass the constructor (newTarget) to op_create_this from
op_construct or op_construct_varargs. This will allow future patches that implement ES6 class
to pass in the most derived class' constructor through "this" argument.

BytecodeGenerator's emitConstruct and emitConstructVarargs now passes thisRegister like
regular calls and emitCreateThis passes in this register to op_create_this as constructor.

The rest of the code change removes the code for special casing "this" register not being used
in call to construct.

* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCreateThis):
(JSC::BytecodeGenerator::emitConstructVarargs):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::NewExprNode::emitBytecode):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addCallWithoutSettingResult):
(JSC::DFG::ByteCodeParser::handleVarargsCall):
(JSC::DFG::ByteCodeParser::emitArgumentPhantoms):
(JSC::DFG::ByteCodeParser::attemptToInlineCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::reconstruct):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* ftl/FTLJSCallVarargs.cpp:
(JSC::FTL::JSCallVarargs::emit):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNativeCallOrConstruct):
(JSC::FTL::LowerDFGToLLVM::compileCallOrConstruct):
(JSC::FTL::LowerDFGToLLVM::compileCallOrConstructVarargs):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeConstruct):
* jit/JITOperations.cpp:

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

4 years agoWeb Inspector: Make Getter/Setter RemoteObject property and ObjectPreview handling...
joepeck@webkit.org [Wed, 25 Feb 2015 00:31:42 +0000 (00:31 +0000)]
Web Inspector: Make Getter/Setter RemoteObject property and ObjectPreview handling consistent
https://bugs.webkit.org/show_bug.cgi?id=141587

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Convert getProperties(ownAndGetterProperties) to getDisplayableProperties().
Mark PropertyDescriptors that are presumed to be native getters / bindings
separately so that the frontend may display them differently.

* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::getProperties):
(Inspector::InjectedScript::getDisplayableProperties):
* inspector/InjectedScript.h:
* inspector/InjectedScriptSource.js:
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getProperties):
(Inspector::InspectorRuntimeAgent::getDisplayableProperties):
* inspector/agents/InspectorRuntimeAgent.h:
* inspector/protocol/Runtime.json:

Source/WebInspectorUI:

* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.prototype.collectScopeChainVariableNames):
* UserInterface/Models/PropertyDescriptor.js:
(WebInspector.PropertyDescriptor.prototype.get nativeGetter):
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.fromPayload):
(WebInspector.RemoteObject.prototype.getOwnPropertyDescriptors):
(WebInspector.RemoteObject.prototype.getAllPropertyDescriptors):
(WebInspector.RemoteObject.prototype.getDisplayablePropertyDescriptors):
(WebInspector.RemoteObject.prototype._getPropertyDescriptors):
(WebInspector.RemoteObject.prototype.if):
(WebInspector.RemoteObject.prototype.deprecatedGetOwnProperties):
(WebInspector.RemoteObject.prototype.deprecatedGetAllProperties):
(WebInspector.RemoteObject.prototype._deprecatedGetProperties):
(WebInspector.RemoteObject.prototype.getOwnAndGetterPropertyDescriptors): Deleted.
(WebInspector.RemoteObject.prototype.callback): Deleted.
(WebInspector.RemoteObject.prototype.getOwnProperties): Deleted.
(WebInspector.RemoteObject.prototype.getOwnAndGetterProperties): Deleted.
(WebInspector.RemoteObject.prototype.getAllProperties): Deleted.
(WebInspector.RemoteObject.prototype.set else): Deleted.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady):
* UserInterface/Views/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection.prototype.update):
(WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype.):
(WebInspector.ObjectTreePropertyTreeElement.prototype):
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.update):

LayoutTests:

* inspector/model/remote-object-get-properties-expected.txt:
* inspector/model/remote-object-get-properties.html:

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

4 years agoWeb Inspector: New Object Tree View UI
joepeck@webkit.org [Wed, 25 Feb 2015 00:31:38 +0000 (00:31 +0000)]
Web Inspector: New Object Tree View UI
https://bugs.webkit.org/show_bug.cgi?id=141932

Reviewed by Timothy Hatcher.

Part 1: Majority of the UI.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/Eye.svg: Added.
* UserInterface/Images/TypeBoolean.svg: Added.
* UserInterface/Images/TypeNull.svg: Added.
* UserInterface/Images/TypeNumber.svg: Added.
* UserInterface/Images/TypeObject.svg: Added.
* UserInterface/Images/TypeRegex.svg: Added.
* UserInterface/Images/TypeString.svg: Added.
* UserInterface/Images/TypeSymbol.svg: Added.
* UserInterface/Images/TypeUndefined.svg: Added.
* UserInterface/Main.html:
Miscellaneous.

* UserInterface/Views/FormattedValue.css:
(.formatted-boolean):
Give booleans a light purple color.

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForTypesAndValue):
Previously we were truncating function value logging in the console. E.g.
  js> multiLineFunction
  <-  function multiLineFunction() {
No longer truncate so we display the full string.

* UserInterface/Models/PropertyPath.js: Added.
(WebInspector.PropertyPath):
(WebInspector.PropertyPath.prototype.get object):
(WebInspector.PropertyPath.prototype.get parent):
(WebInspector.PropertyPath.prototype.get isPrototype):
(WebInspector.PropertyPath.prototype.get rootObject):
(WebInspector.PropertyPath.prototype.get lastNonPrototypeObject):
(WebInspector.PropertyPath.prototype.get pathComponent):
(WebInspector.PropertyPath.prototype.get fullPath):
(WebInspector.PropertyPath.prototype.isRoot):
(WebInspector.PropertyPath.prototype.isPathComponentImpossible):
(WebInspector.PropertyPath.prototype.isFullPathImpossible):
(WebInspector.PropertyPath.prototype.appendPropertyName):
(WebInspector.PropertyPath.prototype.appendPropertySymbol):
(WebInspector.PropertyPath.prototype.appendInternalPropertyName):
(WebInspector.PropertyPath.prototype.appendArrayIndex):
(WebInspector.PropertyPath.prototype.appendCollectionIndex):
(WebInspector.PropertyPath.prototype.appendPropertyDescriptor):
(WebInspector.PropertyPath.prototype._canPropertyNameBeDotAccess):
PropertyPaths are a linked list of remote object / patch component pairs.
For a property like "foo['property 1'].__proto__.baz" we will have a PropertyPath
chain with the RemoteObject for each component. This allows us to accurately
select the RemoteObject on which we should invoke a getter. It also allows
us to display the property path string from the root object, if possible.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.callFunction):
(WebInspector.RemoteObject.prototype.backendInvokeGetter):
(WebInspector.RemoteObject.prototype.invokeGetter):
Provide a way to invoke a getter function on a remote object if we
have a reference to the getter function. At the same time, improve
the mostly unused callFunction API to automatically convert
RemoteObjects / values to their Runtime.CallArgument format.

* UserInterface/Views/ObjectTreePropertyTreeElement.css: Added.
(.object-tree-property):
(.object-tree-property > .disclosure-button):
(.object-tree-property.parent > .disclosure-button):
(.object-tree-property.parent.expanded > .disclosure-button):
(.object-tree-property > .titles):
Focused styles for the ObjectTree property GeneralTreeElements.
Reuse navigation sidebar disclosure-triangles.

(.object-tree-property > .icon):
(.object-tree-property.boolean > .icon):
(.object-tree-property.function > .icon):
(.object-tree-property.number > .icon):
(.object-tree-property.object > .icon):
(.object-tree-property.object.null > .icon):
(.object-tree-property.object.node > .icon):
(.object-tree-property.regex > .icon):
(.object-tree-property.string > .icon):
(.object-tree-property.symbol > .icon):
(.object-tree-property.undefined > .icon):
Use different icons for different object types. Special case
"accessor" to be undefined.

(.object-tree-property .prototype-name):
(.object-tree-property .property-name.not-enumerable):
Style property names in sans-serif font.
Give non-enumerable properties a slightly transparent look.

(.object-tree-property.prototype-property):
(.object-tree-property.prototype-property > .icon):
(.object-tree-property.prototype-property + ol):
Special styles for prototype properties and their children.

(.object-tree-property .getter):
(.object-tree-property .getter:hover):
(.object-tree-property .read-only):
Styles for clickable getter button and non-interactive read-only indicator.

(.object-tree-property :matches(.formatted-string, .formatted-regexp)):
Do not allow wrapping for values that previously allowed wrapping.

(.object-tree-property .value.error):
If getting a value resulted in an error, display that error in red.

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement):
Extend from GeneralTreeElement and set up class names on the root <li> object.

(WebInspector.ObjectTreePropertyTreeElement.prototype.onattach): Deleted.
No longer needed by using GeneralTreeElement.

(WebInspector.ObjectTreePropertyTreeElement.prototype.onexpand):
(WebInspector.ObjectTreePropertyTreeElement.prototype.oncollapse):
Expand / collapse an associated ObjectPreview if we have one.

(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValue):
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath):
This PropertyTreeElement may be displaying for a value, or a getter that has
gotten a value. Refer to this as the "resolvedValue".

(WebInspector.ObjectTreePropertyTreeElement.prototype._thisPropertyPath):
A PropertyPath leaf used for tooltips.

(WebInspector.ObjectTreePropertyTreeElement.prototype._updateHasChildren):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTooltips):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAndIcon):
Helpers for updating small parts of the UI. When a getter is invoked,
we need to update the entire UI of this TreeElement.

(WebInspector.ObjectTreePropertyTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitle): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitlePropertyStyle): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAPIStyle): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePrototype):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitleAPIStyle):
Create the UI for the mainTitle of this PropertyTreeElement.

(WebInspector.ObjectTreePropertyTreeElement.prototype._createInteractiveGetterElement):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createReadOnlyIconElement):
Helpers for creating the small components of the title UI.

(WebInspector.ObjectTreePropertyTreeElement.prototype._alwaysDisplayAsProperty):
Establish when a property should still be displayed as a "property" even when in API mode.
For example a value property on a prototype, should still display as an expandable property.

* UserInterface/Views/ObjectTreeView.css:
(.object-tree > :matches(.title, .object-preview)::before):
(.object-tree:not(.lossless-preview) > :matches(.title, .object-preview)):
(.object-tree.expanded > :matches(.title, .object-preview)::before):
(.object-tree .object-tree-outline):
(.object-tree-outline ol):
(.object-tree-outline li .empty-message):
(:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline):
(.object-tree > .title): Deleted.
(.object-tree-outline): Deleted.
(.object-tree-outline li): Deleted.
(.object-tree-outline li.parent): Deleted.
(.object-tree-outline li.parent::before): Deleted.
(.object-tree-outline li.parent.expanded::before): Deleted.
(.object-tree-property .name): Deleted.
(.object-tree-property .name.not-enumerable): Deleted.
(.object-tree-property .value.error): Deleted.
(.console-group-messages .object-tree:not(.lossless-preview)): Deleted.
(.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)): Deleted.
(.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)::before): Deleted.
(.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree): Deleted.
(.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline): Deleted.
Move most PropertyTreeElement specific styles into ObjectPropertyTreeElement.css.
Plenty of console specific files were eliminated.

* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.update):
(WebInspector.ObjectTreeView.prototype._updateProperties):

Part 2: Provide better parameter lists for native functions.

When expanding an object's prototype chain, with authored code
you will accurately see parameter lists for user authored functions
because we can get this by parsing Function.prototype.toString.
For native code, we don't get any parameter information. In such cases
we can detect we are a native function, and provide our own strings.

This fills in most of the JavaScript built-ins and some DOM
functions, however we should autogenerate the rest of the DOM.

* UserInterface/Base/Utilities.js:
(isFunctionStringNativeCode):
Helper to check if a function is native or not based on its string.

* UserInterface/Main.html:
* UserInterface/Models/NativeFunctionParameters.js: Added.
Dictionary of parameter lists for native constructor functions
and prototype functions.

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement):
(WebInspector.ObjectTreePropertyTreeElement.prototype._functionPropertyString):
(WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):
(WebInspector.ObjectTreePropertyTreeElement.prototype):
When we have a native function, try to provide a better parameter string.

Part 3: Better handle errors when invoking getters.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.callFunction):
(WebInspector.RemoteObject.prototype.invokeGetter):
Pass the error, wasThrown, and result through to the caller so they can
act on all the information possible. Provide encapsulation though
and auto-convert the result to a RemoteObject for the callback.

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady):
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._createTooltipForNode.setTooltip):
(WebInspector.DOMTreeElement.prototype._createTooltipForNode.resolvedNode):
(WebInspector.DOMTreeElement.prototype._createTooltipForNode):
Update current users of callFunctionOn for the new callback parameters.

* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property.had-error > .icon):
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateHasChildren):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAndIcon):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createInteractiveGetterElement.):
Better style getters with errors.

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

4 years agoWeb Inspector: Do not show "{}" after Date description in Object Previews
joepeck@webkit.org [Wed, 25 Feb 2015 00:31:34 +0000 (00:31 +0000)]
Web Inspector: Do not show "{}" after Date description in Object Previews
https://bugs.webkit.org/show_bug.cgi?id=141898

Reviewed by Timothy Hatcher.

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
Only show "{...}" section for Date objects that have user
defined properties. Otherwise, Dates do not have properties.

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

4 years agoRolling out r179753. The fix was invalid.
mark.lam@apple.com [Wed, 25 Feb 2015 00:03:42 +0000 (00:03 +0000)]
Rolling out r179753.  The fix was invalid.
<https://webkit.org/b/141990>

Not reviewed.

* API/tests/testapi.mm:
(threadMain):
(useVMFromOtherThread): Deleted.
(useVMFromOtherThreadAndOutliveVM): Deleted.
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::~Heap):
(JSC::Heap::gatherStackRoots):
* heap/Heap.h:
(JSC::Heap::machineThreads):
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::Thread::Thread):
(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::addCurrentThread):
(JSC::MachineThreads::removeThread):
(JSC::MachineThreads::removeCurrentThread):
* heap/MachineStackMarker.h:

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

4 years agoBuildfix after r180585.
ossy@webkit.org [Tue, 24 Feb 2015 23:31:53 +0000 (23:31 +0000)]
Buildfix after r180585.

* CMakeLists.txt:

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

4 years ago[ios Media] the inline controls are visible after pressing Done on iPhone
dino@apple.com [Tue, 24 Feb 2015 23:21:52 +0000 (23:21 +0000)]
[ios Media] the inline controls are visible after pressing Done on iPhone
https://bugs.webkit.org/show_bug.cgi?id=141987
<rdar://problem/19944110>

Reviewed by Beth Dakin.

When exiting out of a playing video, we should show the
start playback button if we don't allow inline media
(such as on iPhone).

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.shouldHaveStartPlaybackButton): Test for
allowsInline as well.

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

4 years agoConstructor returning null should construct an object instead of null
utatane.tea@gmail.com [Tue, 24 Feb 2015 23:01:58 +0000 (23:01 +0000)]
Constructor returning null should construct an object instead of null
https://bugs.webkit.org/show_bug.cgi?id=141640

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

When constructor code doesn't return object, constructor should return `this` object instead.
Since we used `op_is_object` for this check and `op_is_object` is intended to be used for `typeof`,
it allows `null` as an object.
This patch fixes it by introducing an new bytecode `op_is_object_or_null` for `typeof` use cases.
Instead, constructor uses simplified `is_object`.

As a result, `op_is_object` becomes fairly simple. So we introduce optimization for `op_is_object`.

1. LLInt and baseline JIT support `op_is_object` as a fast path.
2. DFG abstract interpreter support `op_is_object`. And recognize its speculated type and read-write effects.
3. DFG introduces inlined asm for `op_is_object` rather than calling a C++ function.
4. FTL lowers DFG's IsObject into LLVM IR.

And at the same time, this patch fixes isString / isObject predicate used for `op_is_object` and others
in LLInt, JIT, DFG and FTL.
Before introducing ES6 Symbol, JSCell is only used for object and string in user observable area.
So in many places, when the cell is not object, we recognize it as a string, and vice versa.
However, now ES6 Symbol is implemented as a JSCell, this assumption is broken.
So this patch stop using !isString as isObject.
To check whether a cell is an object, instead of seeing that structure ID of a cell is not stringStructure,
we examine typeInfo in JSCell.

* JavaScriptCore.order:
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFor):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitEqualityOp):
(JSC::BytecodeGenerator::emitReturn):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):

IsObject operation only touches JSCell typeInfoType.
And this value would be changed through structure transition.
As a result, IsObject can report that it doesn't read any information.

* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):

Just like IsString, IsObject is also fixed up.

* dfg/DFGHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGHeapLocation.h:
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
(JSC::DFG::SpeculativeJIT::compileStringToUntypedEquality):
(JSC::DFG::SpeculativeJIT::compileStringIdentToNotStringVarEquality):
(JSC::DFG::SpeculativeJIT::compileToStringOnCell):
(JSC::DFG::SpeculativeJIT::speculateObject):
(JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
(JSC::DFG::SpeculativeJIT::speculateString):
(JSC::DFG::SpeculativeJIT::speculateNotStringVar):
(JSC::DFG::SpeculativeJIT::emitSwitchChar):
(JSC::DFG::SpeculativeJIT::emitSwitchString):
(JSC::DFG::SpeculativeJIT::branchIsObject):
(JSC::DFG::SpeculativeJIT::branchNotObject):
(JSC::DFG::SpeculativeJIT::branchIsString):
(JSC::DFG::SpeculativeJIT::branchNotString):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileToString):
(JSC::FTL::LowerDFGToLLVM::compileIsObject):
(JSC::FTL::LowerDFGToLLVM::compileIsObjectOrNull):
(JSC::FTL::LowerDFGToLLVM::speculateTruthyObject):
(JSC::FTL::LowerDFGToLLVM::equalNullOrUndefined):
(JSC::FTL::LowerDFGToLLVM::isObject):
(JSC::FTL::LowerDFGToLLVM::isNotObject):
(JSC::FTL::LowerDFGToLLVM::isNotString):
(JSC::FTL::LowerDFGToLLVM::speculateNonNullObject):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::emitJumpIfCellObject):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_to_primitive):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::compileOpStrictEq):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
* runtime/Operations.cpp:
(JSC::jsIsObjectTypeOrNull):
(JSC::jsIsObjectType): Deleted.
* runtime/Operations.h:
* tests/stress/constructor-with-return.js: Added.
(Test):

When constructor doesn't return an object, `this` should be returned instead.
In this test, we check all primitives. And test object, array and wrappers.

* tests/stress/dfg-to-primitive-pass-symbol.js: Added.
(toPrimitiveTarget):
(doToPrimitive):

op_to_primitive operation passes Symbol in fast path.

LayoutTests:

Follow the old ret_object_or_this semantics.
When constructor returns an object that masquerades as undefined, we see it as an object.

* js/dom/constructor-with-return-masquerades-expected.txt: Added.
* js/dom/constructor-with-return-masquerades.html: Added.
* js/dom/script-tests/constructor-with-return-masquerades.js: Added.
(Constructor):

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

4 years agoPass FillLayer reference instead of pointer to RenderBoxModelObject::calculateBackgro...
zalan@apple.com [Tue, 24 Feb 2015 22:53:09 +0000 (22:53 +0000)]
Pass FillLayer reference instead of pointer to RenderBoxModelObject::calculateBackgroundImageGeometry.
https://bugs.webkit.org/show_bug.cgi?id=141982

Reviewed by Simon Fraser.

There should always be a valid FillLayer.

No change in functionality.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::getBackgroundPaintedExtent):
(WebCore::RenderBox::maskClipRect):
(WebCore::RenderBox::repaintLayerRectsForImage):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateFillTileSize):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
(WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
* rendering/RenderBoxModelObject.h:

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

4 years agoPass _WKWebsiteDataRecord objects to the fetchData completion handler
andersca@apple.com [Tue, 24 Feb 2015 22:40:30 +0000 (22:40 +0000)]
Pass _WKWebsiteDataRecord objects to the fetchData completion handler
https://bugs.webkit.org/show_bug.cgi?id=141984

Reviewed by Andreas Kling.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Create _WKWebsiteDataRecord objects for WebsiteDataRecord API objects.

* UIProcess/API/APIWebsiteDataRecord.h:
Add WebsiteDataRecord getter.

* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
Add displayName and dataTypes properties.

* UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
(dataTypesToString):
Helper function to convert dataTypes bit-fields to strings.

(-[_WKWebsiteDataRecord description]):
Include the display name and data types in the description.

(-[_WKWebsiteDataRecord displayName]):
Return the display name.

(-[_WKWebsiteDataRecord dataTypes]):
Return the data types.

* UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
Move this here from _WKWebsiteDataStore.mm.

(WebKit::toWKWebsiteDataTypes):
Add new function to convert WebsiteDataTypes to WKWebsiteDataTypes.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
Qualify toWebsiteDataTypes calls.

* UIProcess/WebsiteData/WebsiteDataRecord.cpp: Added.
(WebKit::WebsiteDataRecord::displayNameForOrigin):
New helper that returns a display name given an origin.

(WebKit::WebsiteDataRecord::add):
Add the origin as well as the type.

* UIProcess/WebsiteData/WebsiteDataRecord.h:
Add new members.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
Loop through the entries and add them to the m_websiteDataRecords hash map, which
is keyed off of the display name. Pass the m_websiteDataRecords values to the completion handler.

* WebKit2.xcodeproj/project.pbxproj:

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

4 years ago[iOS Media] Be specific about which document to use for the timeline background canvas
dino@apple.com [Tue, 24 Feb 2015 22:24:08 +0000 (22:24 +0000)]
[iOS Media] Be specific about which document to use for the timeline background canvas
https://bugs.webkit.org/show_bug.cgi?id=141981

Reviewed by Eric Carlson.

In some cases, especially with nested iframes, the document
reference for the shadow DOM might not be the one used
to create a -webkit-canvas context for rendering via CSS.
Explicitly get the context from the video's owner
document.

There is still a bug here:
https://bugs.webkit.org/show_bug.cgi?id=141983

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.drawTimelineBackground):

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

4 years agoRemove unused BackgroundImageGeometry::m_destOrigin
zalan@apple.com [Tue, 24 Feb 2015 22:11:13 +0000 (22:11 +0000)]
Remove unused BackgroundImageGeometry::m_destOrigin
https://bugs.webkit.org/show_bug.cgi?id=141980

Reviewed by Simon Fraser.

Remove BackgroundImageGeometry::m_destOrigin and its dependencies.
They are not used at all.

No change in functionality.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
(WebCore::BackgroundImageGeometry::relativePhase): Deleted.
* rendering/RenderBoxModelObject.h:
(WebCore::BackgroundImageGeometry::destOrigin): Deleted.
(WebCore::BackgroundImageGeometry::setDestOrigin): Deleted.
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawMaskForRenderer):

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