WebKit.git
4 years agoRegExpMatchesArray doesn't know how to have a bad time
fpizlo@apple.com [Sun, 6 Mar 2016 20:11:09 +0000 (20:11 +0000)]
RegExpMatchesArray doesn't know how to have a bad time
https://bugs.webkit.org/show_bug.cgi?id=155069

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

In trunk if we are having a bad time, the regexp matches array is still allocated with a
non-slow-put indexing shape, which makes it have the wrong behavior on indexed setters on
the prototype chain.

Getting this to work right requires introducing bad time code paths into the regexp matches
array. It also requires something more drastic: making this code not play games with the
global object. The code that creates the matches array needs to have the actual global
object of the regexp native function that it's logically created by.

This is totally different from how we've handled global objects in the past because it means
that the global object is not a constant. Normally we can make it a constant because a
script executable will know its global object. But with native functions, it's the function
instance that knows the global object - not the native executable. When we inline a native
intrinsic, we are guaranteed to know the native executable but we're not guaranteed to know
the functon instance. This means that the global object may be a variable that gets computed
by looking at the instance at run-time. So, the RegExpExec/RegExpTest nodes in DFG IR now
take a global object child. That also meant adding a new node type, GetGlobalObject, which
does the thing to the callee that CallFrame::lexicalGlobalObject() would have done.
Eventually, we'll probably have to make other native intrinsics also use GetGlobalObject. It
turns out that this really isn't so bad because usually it's constant-folded anyway, since
although the intrinsic code supports executable-based inlining (which leaves the callee
instance as an unknown), it happens rarely for intrinsics. So, conveying the global object
via a child isn't any worse than conveying it via meta-data, and it's probably better than
telling the inliner not to do executable-based inlining of native intrinsics. That would
have been a confusing special-case.

This is perf-neutral on my machines but it fixes a bug and it unlocks some interesting
possibilities. For example, RegExpExec can now make a firm promise about the type of array
it's creating.

This also contains some other changes:

- We are now using Structure::addPropertyTransition() in a lot of places even though it was
  meant to be an internal method with a quirky contract - for example if only works if you
  know that there is not existing transition. This relaxes this constraint.

- Restores the use of "*" for heap references in JSString.h. It's very unusual to have heap
  references pointed at with "&", since we don't currently do that anywhere. The fact that
  it was using the wrong reference type also meant that the code couldn't elegantly make use
  of some our GC pointer helpers like jsCast<>.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::attemptToInlineCall):
(JSC::DFG::ByteCodeParser::handleMinMax):
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* 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::compileSkipScope):
(JSC::DFG::SpeculativeJIT::compileGetGlobalObject):
(JSC::DFG::SpeculativeJIT::compileGetArrayLength):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileSkipScope):
(JSC::FTL::DFG::LowerDFGToB3::compileGetGlobalObject):
(JSC::FTL::DFG::LowerDFGToB3::compileGetClosureVar):
(JSC::FTL::DFG::LowerDFGToB3::compileRegExpExec):
(JSC::FTL::DFG::LowerDFGToB3::compileRegExpTest):
(JSC::FTL::DFG::LowerDFGToB3::compileNewRegexp):
* jit/JITOperations.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::haveABadTime):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
* runtime/JSObject.h:
(JSC::JSObject::putDirectInternal):
* runtime/JSString.h:
(JSC::jsString):
(JSC::jsSubstring):
* runtime/RegExpCachedResult.cpp:
(JSC::RegExpCachedResult::lastResult):
* runtime/RegExpMatchesArray.cpp:
(JSC::tryCreateUninitializedRegExpMatchesArray):
(JSC::createRegExpMatchesArray):
(JSC::createStructureImpl):
(JSC::createRegExpMatchesArrayStructure):
(JSC::createRegExpMatchesArraySlowPutStructure):
* runtime/RegExpMatchesArray.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::put):
(JSC::RegExpObject::exec):
(JSC::RegExpObject::match):
* runtime/RegExpObject.h:
(JSC::RegExpObject::getLastIndex):
(JSC::RegExpObject::test):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncTest):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncCompile):
* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncMatch):
* runtime/Structure.cpp:
(JSC::Structure::suggestedArrayStorageTransition):
(JSC::Structure::addPropertyTransition):
(JSC::Structure::addNewPropertyTransition):
* runtime/Structure.h:
* tests/stress/regexp-matches-array-bad-time.js: Added.
* tests/stress/regexp-matches-array-slow-put.js: Added.

LayoutTests:

* js/regress/regexp-exec-expected.txt: Added.
* js/regress/regexp-exec.html: Added.
* js/regress/script-tests/regexp-exec.js: Added.

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

4 years ago[JSC] RegExp#lastIndex should handle writable attribute when defining in defineOwnPro...
utatane.tea@gmail.com [Sun, 6 Mar 2016 20:08:28 +0000 (20:08 +0000)]
[JSC] RegExp#lastIndex should handle writable attribute when defining in defineOwnProperty path
https://bugs.webkit.org/show_bug.cgi?id=155093

Reviewed by Filip Pizlo.

Before this patch, `setLastIndex(ExecState* exec, size_t lastIndex)` always overwrites the existing value
regardless of writable attribute.
And when defining RegExp#lastIndex in defineOwnProperty, we need to define the value first
before making the attribute readonly. After changing the writable attribute, we cannot define the value.

* runtime/RegExpObject.cpp:
(JSC::RegExpObject::defineOwnProperty):
* runtime/RegExpObject.h:
(JSC::RegExpObject::setLastIndex):
* tests/stress/regexp-last-index-writable.js: Added.
(shouldBe):
(shouldThrow):
(regExpLastIndex):

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

4 years ago[iOS] Gardening after r197627.
zalan@apple.com [Sun, 6 Mar 2016 15:00:29 +0000 (15:00 +0000)]
[iOS] Gardening after r197627.

Unreviewed.

* platform/ios-simulator/css2.1/20110323/border-conflict-style-088-expected.txt:

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

4 years agoReduce page cache capacity from 3 to 2.
akling@apple.com [Sun, 6 Mar 2016 12:04:30 +0000 (12:04 +0000)]
Reduce page cache capacity from 3 to 2.
<https://webkit.org/b/155087>

Reviewed by Antti Koivisto.

Source/WebKit/mac:

Trim WebKit1 page cache capacities consistently with WebKit2.

* WebView/WebView.mm:
(+[WebView _setCacheModel:]):

Source/WebKit2:

It's extremely rare that users go back more than 2 pages in the page cache,
and nowadays the network cache makes even un-cached pages fast to reload.

Trimming the page cache from 3 to 2 entries has a very nice effect on heap
fragmentation. I'm seeing a ~5% progression on the iPad PLUM test locally;
average memory usage across 300 loads goes from ~121MB to ~114MB.

* Shared/CacheModel.cpp:
(WebKit::calculateCacheSizes):

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

4 years agoRenderTextControlSingleLine shouldn't mutate placeholder element inline style
antti@apple.com [Sun, 6 Mar 2016 10:17:52 +0000 (10:17 +0000)]
RenderTextControlSingleLine shouldn't mutate placeholder element inline style
https://bugs.webkit.org/show_bug.cgi?id=155086

Reviewed by Andreas Kling.

Text field placeholder element is currently managed by changing its inline style
from the host renderer based on the host style and state. Rendering poking
into DOM is wrong.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setRangeText):
(WebCore::HTMLInputElement::shouldTruncateText):

    Add a helper.

(WebCore::HTMLInputElement::createInnerTextStyle):
* html/HTMLInputElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
(WebCore::HTMLTextAreaElement::placeholderElement):
(WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass):
(WebCore::HTMLTextAreaElement::updatePlaceholderText):

    Use the new shadow element.

* html/HTMLTextAreaElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):

    No more poking to inline style.

(WebCore::HTMLTextFormControlElement::setSelectionStart):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::updatePlaceholderText):

    Use the new shadow element.

* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlPlaceholderElement::TextControlPlaceholderElement):

    Add a subclass for the placeholder element instead of just using div.

(WebCore::TextControlPlaceholderElement::customStyleForRenderer):

    Compute style base on the host state and style.

(WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
* html/shadow/TextControlInnerElements.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::styleDidChange):

    No more setInlineStyleProperty.
    This now needs to trigger layout like it does with other inner elements.

(WebCore::RenderTextControlSingleLine::computeControlLogicalHeight):
(WebCore::RenderTextControlSingleLine::autoscroll):
(WebCore::RenderTextControlSingleLine::textShouldBeTruncated): Deleted.
* rendering/RenderTextControlSingleLine.h:

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

4 years agobuild-webkit prints an error on iOS simulator bots
ap@apple.com [Sun, 6 Mar 2016 08:33:29 +0000 (08:33 +0000)]
build-webkit prints an error on iOS simulator bots
https://bugs.webkit.org/show_bug.cgi?id=155078

Reviewed by Dan Bernstein.

This happens when build-layouttestrelay sets $xcodeSDK to undefined, to use host SDK.

* Scripts/webkitdirs.pm: (buildXCodeProject): There is no need to pass -sdk, because
XcodeOptions() already passes SDKROOT as appropriate.

* Scripts/build-layouttestrelay: Added a FIXME. Resetting $xcodeSDK doesn't reset
any other configuration variables that were derived from its initial value, like $portName.

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

4 years ago[iOS] Gardening after r197627.
zalan@apple.com [Sun, 6 Mar 2016 07:46:06 +0000 (07:46 +0000)]
[iOS] Gardening after r197627.

Unreviewed.

* platform/ios-simulator/css2.1/20110323/border-conflict-style-079-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-01-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-02-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-03-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-04-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-05-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-06-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-07-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-08-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-11-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-12-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-13-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-14-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-15-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-16-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-17-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-18-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-21-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-22-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-23-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-24-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-25-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-26-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-27-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-28-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-31-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-32-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-33-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-34-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-35-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-36-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-37-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-38-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-41-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-42-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-43-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-44-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-45-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-46-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-47-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-48-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-51-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-52-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-53-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-54-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-55-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-56-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-57-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-58-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-61-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-62-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-63-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-64-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-65-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-66-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-67-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-68-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-71-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-72-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-73-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-74-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-75-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-76-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-77-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-78-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-81-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-82-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-83-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-84-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-85-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-86-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-87-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-88-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-91-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-92-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-93-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-94-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-95-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-96-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-97-d-expected.txt:
* platform/ios-simulator/css2.1/t170602-bdr-conflct-w-98-d-expected.txt:
* platform/ios-simulator/fast/borders/border-antialiasing-expected.txt:
* platform/ios-simulator/fast/dynamic/create-renderer-for-whitespace-only-text-expected.txt:
* platform/ios-simulator/fast/table/border-collapsing/002-expected.txt:
* platform/ios-simulator/fast/table/border-collapsing/002-vertical-expected.txt:
* platform/ios-simulator/fast/table/border-collapsing/border-collapsing-head-foot-expected.txt:
* platform/ios-simulator/fast/table/border-collapsing/border-collapsing-head-foot-vertical-expected.txt:
* platform/ios-simulator/fast/table/border-collapsing/cached-69296-expected.txt:
* platform/ios-simulator/fast/table/border-collapsing/cached-change-row-border-width-expected.txt:
* platform/ios-simulator/fast/table/border-collapsing/cached-change-tbody-border-width-expected.txt:
* platform/ios-simulator/fast/table/border-collapsing/equal-precedence-resolution-expected.txt:
* platform/ios-simulator/fast/table/border-collapsing/rtl-border-collapsing-expected.txt:
* platform/ios-simulator/fast/table/border-collapsing/rtl-border-collapsing-vertical-expected.txt:
* platform/ios-simulator/fast/table/colgroup-spanning-groups-rules-expected.txt:
* platform/ios-simulator/fast/table/frame-and-rules-expected.txt:
* platform/ios-simulator/fast/table/overflowHidden-expected.txt:
* platform/ios-simulator/fast/table/rules-attr-dynchange1-expected.txt:
* platform/ios-simulator/fast/table/rules-attr-dynchange2-expected.txt:
* platform/ios-simulator/fast/text/international/bidi-override-expected.txt:
* platform/ios-simulator/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-009-expected.txt:
* platform/ios-simulator/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-012-expected.txt:
* platform/ios-simulator/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-013-expected.txt:
* platform/ios-simulator/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-014-expected.txt:
* platform/ios-simulator/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-015-expected.txt:
* platform/ios-simulator/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-016-expected.txt:
* platform/ios-simulator/tables/mozilla/bugs/bug24200-expected.txt:
* platform/ios-simulator/tables/mozilla/bugs/bug43854-2-expected.txt:
* platform/ios-simulator/tables/mozilla/bugs/bug9024-expected.txt: Added.
* platform/ios-simulator/tables/mozilla/collapsing_borders/bug41262-3-expected.txt:
* platform/ios-simulator/tables/mozilla/collapsing_borders/bug41262-4-expected.txt:
* platform/ios-simulator/tables/mozilla/core/table_rules-expected.txt:
* platform/ios-simulator/tables/mozilla/marvin/backgr_layers-opacity-expected.txt:
* platform/ios-simulator/tables/mozilla/marvin/backgr_position-table-expected.txt:
* platform/ios-simulator/tables/mozilla/marvin/backgr_simple-table-cell-expected.txt:
* platform/ios-simulator/tables/mozilla/marvin/backgr_simple-table-column-expected.txt:
* platform/ios-simulator/tables/mozilla/marvin/backgr_simple-table-column-group-expected.txt:
* platform/ios-simulator/tables/mozilla/marvin/backgr_simple-table-expected.txt:
* platform/ios-simulator/tables/mozilla/marvin/backgr_simple-table-row-expected.txt:
* platform/ios-simulator/tables/mozilla/marvin/backgr_simple-table-row-group-expected.txt:
* platform/ios-simulator/tables/mozilla/marvin/table_rules_all-expected.txt:
* platform/ios-simulator/tables/mozilla/marvin/table_rules_none-expected.txt:
* platform/ios-simulator/tables/mozilla/marvin/x_table_rules_groups-expected.txt:
* platform/ios-simulator/tables/mozilla/marvin/x_table_rules_none-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/bugs/bug1055-2-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/bugs/bug89315-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/collapsing_borders/bug41262-1-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/collapsing_borders/bug41262-5-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/collapsing_borders/bug41262-6-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_border-table-cell-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_border-table-column-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_border-table-column-group-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_border-table-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_border-table-quirks-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_border-table-row-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_border-table-row-group-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_fixed-bg-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_layers-hide-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_layers-show-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_position-table-cell-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_position-table-column-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_position-table-column-group-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_position-table-row-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/backgr_position-table-row-group-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/table_rules_cols-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/table_rules_rows-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/x_table_rules_all-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/x_table_rules_cols-expected.txt:
* platform/ios-simulator/tables/mozilla_expected_failures/marvin/x_table_rules_rows-expected.txt:

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

4 years agoAdd the support for upgrading custom elements in cloneNode
rniwa@webkit.org [Sun, 6 Mar 2016 05:07:47 +0000 (05:07 +0000)]
Add the support for upgrading custom elements in cloneNode
https://bugs.webkit.org/show_bug.cgi?id=155062

Reviewed by Antti Koivisto.

Source/WebCore:

Implement https://w3c.github.io/webcomponents/spec/custom/#upgrading and steps 6 through 11 in
https://w3c.github.io/webcomponents/spec/custom/#htmlelement-constructor to support upgrading elements
created by Node.prototype.cloneNode.

Tests: fast/custom-elements/lifecycle-callback-timing.html
       fast/custom-elements/upgrading/Node-cloneNode.html

* bindings/js/JSCustomElementInterface.cpp:
(WebCore::JSCustomElementInterface::upgradeElement): Added. Implements
 https://w3c.github.io/webcomponents/spec/custom/#dfn-upgrade-a-custom-element
(WebCore::JSCustomElementInterface::didUpgradeLastElementInConstructionStack): Added. Implements step 10
 "Replace the last entry in definition's construction stacka with an already constructed marker."
 in https://w3c.github.io/webcomponents/spec/custom/#dom-htmlelement-constructor
* bindings/js/JSCustomElementInterface.h:
(WebCore::JSCustomElementInterface::isUpgradingElement):
(WebCore::JSCustomElementInterface::lastElementInConstructionStack):
(WebCore::JSCustomElementInterface): Added m_constructionStack. This is the construction stack:
 https://w3c.github.io/webcomponents/spec/custom/#dfn-element-definition-construction-stack
* bindings/js/JSDOMBinding.cpp:
(WebCore::throwInvalidStateError): Added.
* bindings/js/JSDOMBinding.h:
* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement): Implement the upgrading case in:
 https://w3c.github.io/webcomponents/spec/custom/#htmlelement-constructor
* dom/Document.cpp:
(WebCore::createFallbackHTMLElement): Added. Enqueues upgrades of custom elements (enqueueElementUpgrade
 currently does nothing if there is no InvokesCustomElementLifecycleCallbacks; e.g. in other DOM APIs).
 This function implements https://w3c.github.io/webcomponents/spec/custom/#dfn-element-upgrade-algorithm
(WebCore::Document::createElement):
* dom/LifecycleCallbackQueue.cpp:
(WebCore::LifecycleQueueItem::LifecycleQueueItem): Added a generic constructor.
(WebCore::LifecycleQueueItem::invoke): Call upgradeElement when m_type is Type::ElementUpgrade.
(WebCore::LifecycleCallbackQueue::enqueueElementUpgrade): Added.
* dom/LifecycleCallbackQueue.h:
* dom/Node.idl: Added InvokesCustomElementLifecycleCallbacks on cloneNode.
* dom/make_names.pl:
(printFactoryCppFile): Added a variant of createKnownElement which takes QualifiedName. Also directly call
 find(HTML|SVG|MathML)ElementConstructorFunction in createElement that takes AtomicString to avoid an extra
 function call.
(printFactoryHeaderFile): Added a function declaration for createKnownElement that takes QualifiedName and
 outdented class and function declarations to match the modern code style guideline.

LayoutTests:

Added test cases for upgrading elements with Node.prototype.cloneNode.

* fast/custom-elements/lifecycle-callback-timing-expected.txt:
* fast/custom-elements/lifecycle-callback-timing.html:

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

4 years agoCreate a DOMHTMLVideoElement when wrapping <video> elements
timothy_horton@apple.com [Sun, 6 Mar 2016 05:02:49 +0000 (05:02 +0000)]
Create a DOMHTMLVideoElement when wrapping <video> elements
https://bugs.webkit.org/show_bug.cgi?id=155084
<rdar://problem/24997193>

Reviewed by Dan Bernstein.

* bindings/objc/DOM.mm:
(WebCore::createElementClassMap):
Add <video> to the mapping.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/DOMHTMLVideoElementWrapper.mm: Added.
(-[VideoWrapperFrameLoadDelegate webView:didFinishLoadForFrame:]):
(TestWebKitAPI::TEST):
Add an API test for this behavior.

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

4 years agoRevert usage of autofill field name for use with UITextInputTraits
weinig@apple.com [Sun, 6 Mar 2016 04:34:16 +0000 (04:34 +0000)]
Revert usage of autofill field name for use with UITextInputTraits
until our bots can catch up.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textInputTraits]):

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

4 years agoUpdate tests to match the latest version of the HTML5 spec.
weinig@apple.com [Sun, 6 Mar 2016 04:25:44 +0000 (04:25 +0000)]
Update tests to match the latest version of the HTML5 spec.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/forms/the-form-element/form-autocomplete.html:
Fields that don't have any value set for their autocomplete attribute should return the the empty string.

LayoutTests:

* fast/forms/autocomplete-expected.txt:
* fast/forms/autocomplete.html:
Fields that don't have any value set for their autocomplete attribute should return the the empty string.

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

4 years agoMinor cleans up in custom elements' code per Darin's comments
rniwa@webkit.org [Sun, 6 Mar 2016 04:25:32 +0000 (04:25 +0000)]
Minor cleans up in custom elements' code per Darin's comments
https://bugs.webkit.org/show_bug.cgi?id=155081

Reviewed by Darin Adler.

Cleanup per Darin's comments.

* dom/CustomElementDefinitions.cpp:
(WebCore::CustomElementDefinitions::findInterface): Use get instead of explicitly checking against end().
* dom/LifecycleCallbackQueue.h: Remove unecessary header includes.

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

4 years agoFix two minor typos from http://trac.webkit.org/changeset/197626 that were causing...
weinig@apple.com [Sun, 6 Mar 2016 04:18:54 +0000 (04:18 +0000)]
Fix two minor typos from trac.webkit.org/changeset/197626 that were causing some test failures.

* html/Autofill.cpp:
(WebCore::fieldNameMap):
(WebCore::AutofillData::createFromHTMLFormControlElement):

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

4 years agoConsolidate RuntimeApplicationChecks and RuntimeApplicationChecksIOS
cdumez@apple.com [Sun, 6 Mar 2016 03:28:54 +0000 (03:28 +0000)]
Consolidate RuntimeApplicationChecks and RuntimeApplicationChecksIOS
https://bugs.webkit.org/show_bug.cgi?id=155035

Reviewed by Darin Adler.

Source/WebCore:

Consolidate RuntimeApplicationChecks and RuntimeApplicationChecksIOS into
one file. The following changes were made:
- The checks now all rely on applicationBundleIdentifier(), which has the
  benefit of working in WK1 and WK2 UI/WebContent/Networking processes.
- Use namespaces to distinguish Mac and iOS applications instead of relying
  on the method name. So, applicationIsIBooksForIOS() becomes
  IOSApplication::isIBooks().
- Use NSBundle API on both iOS and Mac instead of using the CF API on Mac
  and the NS API on iOS.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityWebDocumentView]):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::putDelegate):
* html/HTMLMediaElement.cpp:
* html/HTMLObjectElement.cpp:
(WebCore::shouldNotPerformURLAdjustment):
* html/MediaElementSession.cpp:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::currentRunLoop):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::willLoadMediaElementURL):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::create):
(WebCore::SubresourceLoader::startLoading):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::shouldIgnoreHTTPStatusCodeErrors):
* platform/RuntimeApplicationChecks.cpp: Removed.
* platform/RuntimeApplicationChecks.h:
* platform/RuntimeApplicationChecks.mm: Added.
(WebCore::applicationBundleIdentifier):
(WebCore::applicationBundleIsEqualTo):
(WebCore::MacApplication::isSafari):
(WebCore::MacApplication::isAppleMail):
(WebCore::MacApplication::isIBooks):
(WebCore::MacApplication::isITunes):
(WebCore::MacApplication::isMicrosoftMessenger):
(WebCore::MacApplication::isAdobeInstaller):
(WebCore::MacApplication::isAOLInstantMessenger):
(WebCore::MacApplication::isMicrosoftMyDay):
(WebCore::MacApplication::isMicrosoftOutlook):
(WebCore::MacApplication::isQuickenEssentials):
(WebCore::MacApplication::isAperture):
(WebCore::MacApplication::isVersions):
(WebCore::MacApplication::isHRBlock):
(WebCore::MacApplication::isSolidStateNetworksDownloader):
(WebCore::MacApplication::isHipChat):
(WebCore::IOSApplication::isMobileMail):
(WebCore::IOSApplication::isMobileSafari):
(WebCore::IOSApplication::isDumpRenderTree):
(WebCore::IOSApplication::isMobileStore):
(WebCore::IOSApplication::isWebApp):
(WebCore::IOSApplication::isOkCupid):
(WebCore::IOSApplication::isFacebook):
(WebCore::IOSApplication::isDaijisenDictionary):
(WebCore::IOSApplication::isNASAHD):
(WebCore::IOSApplication::isTheEconomistOnIphone):
(WebCore::IOSApplication::isWebProcess):
(WebCore::IOSApplication::isIBooks):
(WebCore::setApplicationBundleIdentifier):
* platform/RuntimeApplicationChecksIOS.h: Removed.
* platform/RuntimeApplicationChecksIOS.mm: Removed.
* platform/audio/ios/AudioDestinationIOS.cpp:
* platform/cf/URLCF.cpp:
* platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp:
(WebCore::currentRunLoop):
* platform/ios/PasteboardIOS.mm:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
* platform/ios/wak/WebCoreThread.mm:
(WebThreadEnable):
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
* platform/network/ios/QuickLook.mm:
* platform/network/mac/ResourceHandleMac.mm:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack):

Source/WebKit:

Update runtime application checks.

* WebCoreSupport/WebResourceLoadScheduler.cpp:
(WebResourceLoadScheduler::servePendingRequests):

Source/WebKit/ios:

Update runtime application checks.

* WebCoreSupport/WebChromeClientIOS.mm:

Source/WebKit/mac:

Update runtime application checks.

* Plugins/WebPluginController.mm:
(initializeAudioSession):
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebView/WebFrame.mm:
(needsMicrosoftMessengerDOMDocumentWorkaround):
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _updateImmediateActionItem]):
* WebView/WebView.mm:
(WebKitInitializeApplicationCachePathIfNecessary):
(shouldEnableLoadDeferring):
(shouldRestrictWindowFocus):
(needsOutlookQuirksScript):
(shouldTransformsAffectOverflow):
(shouldDispatchJavaScriptWindowOnErrorEvents):
(shouldUseLegacyBackgroundSizeShorthandBehavior):
(-[WebView _commonInitializationWithFrameName:groupName:]):
(+[WebView enableWebThread]):
(+[WebView registerForMemoryNotifications]):
(-[WebView _needsKeyboardEventDisambiguationQuirks]):
(needsSelfRetainWhileLoadingQuirk):
(-[WebView _needsPreHTML5ParserQuirks]):

Source/WebKit2:

Update runtime application checks.

* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultApplicationCacheDirectory):
* UIProcess/Cocoa/VersionChecks.mm:
(WebKit::linkedOnOrAfter):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
* UIProcess/ios/WKContentViewInteraction.mm:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::expectsLegacyImplicitRubberBandControl):
(WebKit::WebPageProxy::appleMailPaginationQuirkEnabled):

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

4 years agoMake table collapsed borders subpixel aware.
zalan@apple.com [Sun, 6 Mar 2016 03:10:21 +0000 (03:10 +0000)]
Make table collapsed borders subpixel aware.
https://bugs.webkit.org/show_bug.cgi?id=150383

Reviewed by Simon Fraser.

This patch enables authors to
- set subpixel width on collapsed borders
- and push those borders to subpixel positions.

Source/WebCore:

Test: fast/table/collapsed-border-with-odd-pixel-width.html

* rendering/RenderTable.cpp:
(WebCore::RenderTable::calcBorderStart):
(WebCore::RenderTable::calcBorderEnd):
(WebCore::RenderTable::outerBorderBefore):
(WebCore::RenderTable::outerBorderAfter):
(WebCore::RenderTable::outerBorderStart):
(WebCore::RenderTable::outerBorderEnd):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::borderHalfStart):
(WebCore::RenderTableCell::borderHalfEnd):
(WebCore::RenderTableCell::borderHalfBefore):
(WebCore::RenderTableCell::borderHalfAfter):
(WebCore::RenderTableCell::paintCollapsedBorders):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcOuterBorderBefore):
(WebCore::RenderTableSection::calcOuterBorderAfter):
(WebCore::RenderTableSection::calcOuterBorderStart):
(WebCore::RenderTableSection::calcOuterBorderEnd):
* rendering/style/CollapsedBorderValue.h:
(WebCore::CollapsedBorderValue::adjustedCollapsedBorderWidth):

LayoutTests:

* fast/table/collapsed-border-with-odd-pixel-width-expected.html: Added.
* fast/table/collapsed-border-with-odd-pixel-width.html: Added.
* fast/table/hidpi-collapsed-border-with-odd-pixel-width-expected.html:

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

4 years agoAdd support for processing the autofill field name out of form control elements ultim...
weinig@apple.com [Sun, 6 Mar 2016 02:17:29 +0000 (02:17 +0000)]
Add support for processing the autofill field name out of form control elements ultimately to aid input methods
<rdar://problem/23041180>
https://bugs.webkit.org/show_bug.cgi?id=155079

Reviewed by Enrica Casucci.

Source/WebCore:

Added additional cases to fast/forms/autocomplete-tokens.html.

* WebCore.xcodeproj/project.pbxproj:
Add Autofill.h/cpp

* html/Autofill.cpp: Added.
(WebCore::fieldNameMap):
(WebCore::toAutofillFieldName):
(WebCore::isContactToken):
(WebCore::maxTokensForAutofillFieldCategory):
(WebCore::AutofillData::createFromHTMLFormControlElement):
* html/Autofill.h: Added.
(WebCore::AutofillData::AutofillData):
Refactored the autofill data processing algorithm into it's own file and added support
returning not just the IDL-exposed autofill value but also the autofill field name. The
code is structured simply enough that if we find a need for the hint set or scope information
we could return it as well.

* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::autocomplete):
(WebCore::HTMLFormControlElement::setAutocomplete):
(WebCore::HTMLFormControlElement::autofillMantle):
(WebCore::HTMLFormControlElement::autofillData):
Use AutofillData to implement these.

* html/HTMLFormControlElement.h:
Expose accessor for mantle and AutofillData.

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::autocomplete):
* html/HTMLFormElement.h:
Switch to return an AtomicString as it will always
return one of two known values.

* testing/Internals.cpp:
(WebCore::Internals::autofillFieldName):
* testing/Internals.h:
* testing/Internals.idl:
Add accessor of the field name for testing purposes.

Source/WebKit2:

* Shared/AssistedNodeInformation.cpp:
(WebKit::AssistedNodeInformation::encode):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h:
Add AutofillFieldName. Convert some coders to use encodeEnum/decodeEnum instead of casting.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textInputTraits]):
Map AutofillFieldNames to the associated UITextContentTypes.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):
Extract the AutofillFieldNames onto the AssistedNodeInformation for <input> elements
and <textarea> elements.

LayoutTests:

* fast/forms/autocomplete-tokens-expected.txt:
* fast/forms/autocomplete-tokens.html:
Update test to also test field names, as they are now exposed via internals.

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

4 years agoWeb Inspector: Have separate path component for Script Timeline content views
commit-queue@webkit.org [Sun, 6 Mar 2016 01:52:38 +0000 (01:52 +0000)]
Web Inspector: Have separate path component for Script Timeline content views
https://bugs.webkit.org/show_bug.cgi?id=155075
<rdar://problem/24996564>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-03-05
Reviewed by Timothy Hatcher.

* UserInterface/Images/CallTrees.svg: Added.
* UserInterface/Images/Events.svg: Added.
New icons based off of ResultLine.svg.

* UserInterface/Views/PathComponentIcons.css:
(.events-icon .icon):
(.call-trees-icon .icon):
(body:not(.mac-platform, .windows-platform) .call-trees-icon .icon):
Use the new icons and fallback to ResultLine.svg for other ports.

* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView):
(WebInspector.ScriptClusterTimelineView.prototype.get eventsContentView):
(WebInspector.ScriptClusterTimelineView.prototype.showEvents):
(WebInspector.ScriptClusterTimelineView.prototype.showProfile):
(WebInspector.ScriptClusterTimelineView.prototype._pathComponentForContentView):
(WebInspector.ScriptClusterTimelineView.prototype._identifierForContentView):
(WebInspector.ScriptClusterTimelineView.prototype._showContentViewForIdentifier):
(WebInspector.ScriptClusterTimelineView.prototype._scriptClusterViewCurrentContentViewDidChange):
(WebInspector.ScriptClusterTimelineView.prototype.get detailsContentView): Deleted.
(WebInspector.ScriptClusterTimelineView.prototype.showDetails): Deleted.
Rename "Details" to "Events".

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject): Deleted.
Always include the top level "Details" component.

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

4 years agoBuild fix after r197612 (under ASAN/GuardMalloc).
rniwa@webkit.org [Sun, 6 Mar 2016 01:23:49 +0000 (01:23 +0000)]
Build fix after r197612 (under ASAN/GuardMalloc).

* dom/CustomElementDefinitions.cpp:
(WebCore::CustomElementDefinitions::findInterface):

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

4 years agoUnreviewed, fix GTK/EFL build after r197575 and add mandatory GnuTLS dependency
mcatanzaro@igalia.com [Sun, 6 Mar 2016 01:20:45 +0000 (01:20 +0000)]
Unreviewed, fix GTK/EFL build after r197575 and add mandatory GnuTLS dependency

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:

Source/WebCore:

* PlatformEfl.cmake:
* PlatformGTK.cmake:

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

4 years agoThe most aggressive form of RegExpTest/RegExpExec should speculate more aggressively...
fpizlo@apple.com [Sun, 6 Mar 2016 00:48:11 +0000 (00:48 +0000)]
The most aggressive form of RegExpTest/RegExpExec should speculate more aggressively than just cell
https://bugs.webkit.org/show_bug.cgi?id=154900

Reviewed by Saam Barati.

These old operations used to speculate cell. That's what they did when they were first
introduced. That was probably about as good as they could do back then because we didn't have
very powerful checks. Now we have powerful checks, so we can do this right.

The most profitable thing to check is that child1 is a RegExpObject and child2 is a JSString.
Sometimes though, we will not know what child2 is even though we know that child1 is a
RegExpObject. So, this patch means that RegExpExec/RegExpTest have the following overloads:

    RegExpExec(RegExpObject:, String:)
    RegExpExec(RegExpObject:, Untyped:)
    RegExpExec(Untyped:, Untyped:)

This shaves off some type checks in Octane/regexp. It also cleans up some problems in our
modeling of the effectfulness of these operations.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileRegExpExec):
(JSC::FTL::DFG::LowerDFGToB3::compileRegExpTest):
* jit/JITOperations.h:

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

4 years agoImplement the Automation protocol commands by tracking WebPageProxy objects
timothy@apple.com [Sun, 6 Mar 2016 00:40:09 +0000 (00:40 +0000)]
Implement the Automation protocol commands by tracking WebPageProxy objects
that are controlled by automation and assigning them a UUID handle.

https://bugs.webkit.org/show_bug.cgi?id=154953
rdar://problem/24947489

Reviewed by Brian Burg.

* UIProcess/API/APIAutomationSessionClient.h:
(API::AutomationSessionClient::didRequestNewWindow):
Return a WebPageProxy instead of void so it can be assigned a UUID handle.

* UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
Return a WKPageRef from _automationSessionDidRequestNewWindow:.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::webPageProxyForHandle):
(WebKit::WebAutomationSession::handleForWebPageProxy):
(WebKit::WebAutomationSession::getBrowsingContexts):
(WebKit::WebAutomationSession::createBrowsingContext):
(WebKit::WebAutomationSession::closeBrowsingContext):
(WebKit::WebAutomationSession::switchToBrowsingContext):

* UIProcess/Automation/WebAutomationSession.h:
Added new methods and maps to track pages and handles.

* UIProcess/Cocoa/AutomationSessionClient.h:
* UIProcess/Cocoa/AutomationSessionClient.mm:
(WebKit::AutomationSessionClient::didRequestNewWindow):
Return a WebPageProxy from the WKPageRef.

* UIProcess/WebPageProxy.h: Make setFocus public.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setAutomationSession):
Set the WebProcessPool on the WebAutomationSession so it can be used to find
WebPageProxy objects controlled by automation.

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

4 years agoRename Automation protocol methods to use "BrowsingContext" instead of "Window".
timothy@apple.com [Sun, 6 Mar 2016 00:40:01 +0000 (00:40 +0000)]
Rename Automation protocol methods to use "BrowsingContext" instead of "Window".
Also flesh out the protocol commands more by adding switchToBrowsingContext
and return a BrowsingContextHandle for createBrowsingContext.

https://bugs.webkit.org/show_bug.cgi?id=154953
rdar://problem/24947489

Reviewed by Brian Burg.

* UIProcess/Automation/Automation.json:
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::getBrowsingContexts):
(WebKit::WebAutomationSession::createBrowsingContext):
(WebKit::WebAutomationSession::closeBrowsingContext):
(WebKit::WebAutomationSession::switchToBrowsingContext):
(WebKit::WebAutomationSession::getWindows): Deleted.
(WebKit::WebAutomationSession::openWindow): Deleted.
(WebKit::WebAutomationSession::closeWindow): Deleted.
* UIProcess/Automation/WebAutomationSession.h:

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

4 years agoWeb Inspector: Add back support for a heavy / bottom up profile view
joepeck@webkit.org [Sun, 6 Mar 2016 00:28:39 +0000 (00:28 +0000)]
Web Inspector: Add back support for a heavy / bottom up profile view
https://bugs.webkit.org/show_bug.cgi?id=140578
<rdar://problem/19506794>

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New strings and resources.

* UserInterface/Base/Utilities.js:
(Number.secondsToMillisecondsString):
Helper for providing a consistent milliseconds string used in profiles.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted):
The calling context tree should be stored on a Recording, not on the global
TimelineManager. Also create two trees, one top down and one bottom up.

* UserInterface/Models/CallingContextTree.js:
(WebInspector.CallingContextTree):
(WebInspector.CallingContextTree.prototype.get type):
(WebInspector.CallingContextTree.prototype.get totalExecutionTime):
(WebInspector.CallingContextTree.prototype.reset):
(WebInspector.CallingContextTree.prototype.numberOfSamplesInTimeRange):
(WebInspector.CallingContextTree.prototype.increaseExecutionTime):
Give a CallingContextTree a type (TopDown / BottomUp) and some getters.

(WebInspector.CallingContextTree.prototype.updateTreeWithStackTrace):
Build a bottom up or top down tree from samples.

(WebInspector.CallingContextTree.prototype.forEachChild):
Allow iterating from the root.

(WebInspector.CCTNode):
(WebInspector.CCTNode.prototype.hasChildrenInTimeRange):
(WebInspector.CCTNode.prototype.numberOfLeafTimestamps):
(WebInspector.CCTNode.prototype.addTimestampAndExpressionLocation):
(WebInspector.CCTNode.prototype.equals):
(WebInspector.CCTNode.prototype.hasChildren): Deleted.
Give a CCTNode a list of leaf timestamps alongside the list of all timestamps.
Leaf timestamps will count as "self time" in a profile view.

* UserInterface/Models/SourceCodeLocation.js:
(WebInspector.SourceCodeLocation.prototype._locationString):
Nobody was using "ColumnStyle.Hidden" so repurpose it to be even simpler.

* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording):
(WebInspector.TimelineRecording.prototype.get topDownCallingContextTree):
(WebInspector.TimelineRecording.prototype.get bottomUpCallingContextTree):
(WebInspector.TimelineRecording.prototype.reset):
Store the two types of calling context trees and allow reseting them.

* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.contextMenuItemSelected):
Helper for debugging uncaught exceptions in context menus.

* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.createFromRepresentedObject):
(WebInspector.ContentView.isViewable):
A ScriptTimeline now has a cluster view.
A CallingContextTree now has a ProfileView.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.insertChild):
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
(WebInspector.DataGridNode.prototype.refreshRecursively):
(WebInspector.DataGridNode.prototype.elementWithColumnIdentifier):
(WebInspector.DataGridNode.prototype.forEachImmediateChild):
(WebInspector.DataGridNode.prototype.forEachChildInSubtree):
(WebInspector.DataGridNode.prototype.isInSubtreeOfNode):
Provide some helpers for iterating DataGridNodes, useful when the
actual DataGrid comes from a DataGridTree.

(WebInspector.DataGridNode.prototype.select):
(WebInspector.DataGridNode.prototype.deselect):
The indent width of DataGridNodes was not getting reset when a
node was removed and re-added to a tree due to a cached padding.

(WebInspector.DataGridNode.prototype.appendContextMenuItems):
Allow DataGridNodes to provide context menu items by overriding this method.

* UserInterface/Views/PathComponentIcons.css:
(.function-icon .icon):
(.native-icon .icon):
(.program-icon .icon):
Icons for profile nodes in path components.

* UserInterface/Views/ProfileDataGridNode.js: Added.
(WebInspector.ProfileDataGridNode):
(WebInspector.ProfileDataGridNode.prototype.get node):
(WebInspector.ProfileDataGridNode.prototype.displayName):
(WebInspector.ProfileDataGridNode.prototype.iconClassName):
(WebInspector.ProfileDataGridNode.prototype.get data):
(WebInspector.ProfileDataGridNode.prototype.createCellContent):
(WebInspector.ProfileDataGridNode.prototype.sort):
(WebInspector.ProfileDataGridNode.prototype.refresh):
(WebInspector.ProfileDataGridNode.prototype.appendContextMenuItems):
(WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
(WebInspector.ProfileDataGridNode.prototype._recalculateData):
(WebInspector.ProfileDataGridNode.prototype._totalTimeContent):
(WebInspector.ProfileDataGridNode.prototype._displayContent):
(WebInspector.ProfileDataGridNode.prototype._populate):
CCTNode DataGridNode. A row in the ProfileDataGridTree. Handles
tree modifiers like charge to caller.

* UserInterface/Views/ProfileDataGridTree.js: Added.
(WebInspector.ProfileDataGridTree):
(WebInspector.ProfileDataGridTree.buildSortComparator):
(WebInspector.ProfileDataGridTree.prototype.get callingContextTree):
(WebInspector.ProfileDataGridTree.prototype.get sampleInterval):
(WebInspector.ProfileDataGridTree.prototype.get focusNodes):
(WebInspector.ProfileDataGridTree.prototype.get currentFocusNode):
(WebInspector.ProfileDataGridTree.prototype.get modifiers):
(WebInspector.ProfileDataGridTree.prototype.get startTime):
(WebInspector.ProfileDataGridTree.prototype.get endTime):
(WebInspector.ProfileDataGridTree.prototype.get numberOfSamples):
(WebInspector.ProfileDataGridTree.prototype.get children):
(WebInspector.ProfileDataGridTree.prototype.appendChild):
(WebInspector.ProfileDataGridTree.prototype.insertChild):
(WebInspector.ProfileDataGridTree.prototype.removeChildren):
(WebInspector.ProfileDataGridTree.prototype.set sortComparator):
(WebInspector.ProfileDataGridTree.prototype.sort):
(WebInspector.ProfileDataGridTree.prototype.refresh):
(WebInspector.ProfileDataGridTree.prototype.addFocusNode):
(WebInspector.ProfileDataGridTree.prototype.rollbackFocusNode):
(WebInspector.ProfileDataGridTree.prototype.clearFocusNodes):
(WebInspector.ProfileDataGridTree.prototype.hasModifiers):
(WebInspector.ProfileDataGridTree.prototype.addModifier):
(WebInspector.ProfileDataGridTree.prototype.clearModifiers):
(WebInspector.ProfileDataGridTree.prototype._repopulate):
(WebInspector.ProfileDataGridTree.prototype._focusChanged):
(WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
(WebInspector.ProfileDataGridTree.prototype._restoreFocusedNodeToOriginalParent):
(WebInspector.ProfileDataGridTree.prototype._modifiersChanged):
Start of a DataGridTree for a CallingContextTree.
Contains special logic for focused nodes and modifiers.

* UserInterface/Views/ProfileView.css: Added.
(.profile > .data-grid):
(.profile > .data-grid th):
(.profile > .data-grid td .icon):
(.profile > .data-grid td .percentage):
(.profile > .data-grid td .location):
(.profile > .data-grid:matches(:focus, .force-focus) tr.selected td .location):
(.profile > .data-grid td .icon.function-icon):
(.profile > .data-grid td .icon.native-icon):
(.profile > .data-grid td .icon.program-icon):
(.profile > .data-grid tr:matches(.selected, :hover) .go-to-arrow):
(.profile > .data-grid td.function-column):
(.profile > .data-grid td .guidance):
(.profile > .data-grid td .guidance.hover):
(.profile > .data-grid td .guidance.base):
(.profile > .data-grid tr:not(.expanded) td .guidance.base):
(.profile > .data-grid tr.expanded td .guidance.base):
* UserInterface/Views/ProfileView.js: Added.
(WebInspector.ProfileView):
(WebInspector.ProfileView.prototype.get callingContextTree):
(WebInspector.ProfileView.prototype.get startTime):
(WebInspector.ProfileView.prototype.get endTime):
(WebInspector.ProfileView.prototype.setStartAndEndTime):
(WebInspector.ProfileView.prototype.hasFocusNodes):
(WebInspector.ProfileView.prototype.clearFocusNodes):
(WebInspector.ProfileView.prototype.get selectionPathComponents):
(WebInspector.ProfileView.prototype._recreate):
(WebInspector.ProfileView.prototype._repopulateDataGridFromTree):
(WebInspector.ProfileView.prototype._pathComponentClicked):
(WebInspector.ProfileView.prototype._dataGridTreeFocusChanged):
(WebInspector.ProfileView.prototype._dataGridTreeModifiersChanged):
(WebInspector.ProfileView.prototype._dataGridSortChanged):
(WebInspector.ProfileView.prototype._dataGridNodeSelected):
(WebInspector.ProfileView.prototype._dataGridNodeExpanded):
(WebInspector.ProfileView.prototype._mouseOverDataGrid):
(WebInspector.ProfileView.prototype._mouseLeaveDataGrid):
(WebInspector.ProfileView.prototype._guidanceElementKey):
(WebInspector.ProfileView.prototype._removeGuidanceElement):
(WebInspector.ProfileView.prototype._appendGuidanceElement):
ProfileView holds a data grid which is populated from the data grid tree.
Special handing for guidance markers when hovering / selecting parts of the tree.

* UserInterface/Views/ScriptClusterTimelineView.js: Added.
(WebInspector.ScriptClusterTimelineView.createPathComponent):
(WebInspector.ScriptClusterTimelineView):
(WebInspector.ScriptClusterTimelineView.prototype.get zeroTime):
(WebInspector.ScriptClusterTimelineView.prototype.set zeroTime):
(WebInspector.ScriptClusterTimelineView.prototype.get startTime):
(WebInspector.ScriptClusterTimelineView.prototype.set startTime):
(WebInspector.ScriptClusterTimelineView.prototype.get endTime):
(WebInspector.ScriptClusterTimelineView.prototype.set endTime):
(WebInspector.ScriptClusterTimelineView.prototype.get currentTime):
(WebInspector.ScriptClusterTimelineView.prototype.set currentTime):
(WebInspector.ScriptClusterTimelineView.prototype.get navigationSidebarTreeOutline):
(WebInspector.ScriptClusterTimelineView.prototype.reset):
(WebInspector.ScriptClusterTimelineView.prototype.filterDidChange):
(WebInspector.ScriptClusterTimelineView.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.ScriptClusterTimelineView.prototype.get detailsContentView):
(WebInspector.ScriptClusterTimelineView.prototype.get profileContentView):
(WebInspector.ScriptClusterTimelineView.prototype.get selectionPathComponents):
(WebInspector.ScriptClusterTimelineView.prototype.saveToCookie):
(WebInspector.ScriptClusterTimelineView.prototype.restoreFromCookie):
(WebInspector.ScriptClusterTimelineView.prototype.showDetails):
(WebInspector.ScriptClusterTimelineView.prototype.showProfile):
(WebInspector.ScriptClusterTimelineView.prototype._pathComponentForContentView):
(WebInspector.ScriptClusterTimelineView.prototype._identifierForContentView):
(WebInspector.ScriptClusterTimelineView.prototype._showContentViewForIdentifier):
(WebInspector.ScriptClusterTimelineView.prototype._pathComponentSelected):
(WebInspector.ScriptClusterTimelineView.prototype._scriptClusterViewCurrentContentViewDidChange):
Script Timeline ClusterContentView. Toggle between the normal "Details" data grid
and the new "Call Tree" profile view. Currently the recording expects child content
views to be TimelineViews, this ClusterContentView forwards TimelineView relevant
methods to the real TimelineView children.

* UserInterface/Views/ScriptDetailsTimelineView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ScriptTimelineView.js.
(WebInspector.ScriptDetailsTimelineView):
(WebInspector.ScriptDetailsTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
(WebInspector.ScriptDetailsTimelineView.prototype.shown):
(WebInspector.ScriptDetailsTimelineView.prototype.hidden):
(WebInspector.ScriptDetailsTimelineView.prototype.closed):
(WebInspector.ScriptDetailsTimelineView.prototype.get selectionPathComponents):
(WebInspector.ScriptDetailsTimelineView.prototype.reset):
(WebInspector.ScriptDetailsTimelineView.prototype.canShowContentViewForTreeElement):
(WebInspector.ScriptDetailsTimelineView.prototype.showContentViewForTreeElement):
(WebInspector.ScriptDetailsTimelineView.prototype.treeElementPathComponentSelected):
(WebInspector.ScriptDetailsTimelineView.prototype.treeElementSelected):
(WebInspector.ScriptDetailsTimelineView.prototype.dataGridNodeForTreeElement):
(WebInspector.ScriptDetailsTimelineView.prototype.populateProfileNodeTreeElement):
(WebInspector.ScriptDetailsTimelineView.prototype.layout):
(WebInspector.ScriptDetailsTimelineView.prototype._processPendingRecords):
(WebInspector.ScriptDetailsTimelineView.prototype._scriptTimelineRecordAdded):
(WebInspector.ScriptDetailsTimelineView.prototype._scriptTimelineRecordRefreshed):
(WebInspector.ScriptDetailsTimelineView.prototype._dataGridFiltersDidChange):
(WebInspector.ScriptDetailsTimelineView.prototype._dataGridNodeSelected):
* UserInterface/Views/ScriptProfileTimelineView.js: Added.
(WebInspector.ScriptProfileTimelineView):
(WebInspector.ScriptProfileTimelineView.prototype.closed):
(WebInspector.ScriptProfileTimelineView.prototype.get navigationItems):
(WebInspector.ScriptProfileTimelineView.prototype.get selectionPathComponents):
(WebInspector.ScriptProfileTimelineView.prototype.layout):
(WebInspector.ScriptProfileTimelineView.prototype._callingContextTreeForOrientation):
(WebInspector.ScriptProfileTimelineView.prototype._profileViewSelectionPathComponentsDidChange):
(WebInspector.ScriptProfileTimelineView.prototype._scriptTimelineRecordRefreshed):
(WebInspector.ScriptProfileTimelineView.prototype._updateProfileOrientationButtonItem):
(WebInspector.ScriptProfileTimelineView.prototype._toggleProfileOrientation):
(WebInspector.ScriptProfileTimelineView.prototype._updateClearFocusNodesButtonItem):
(WebInspector.ScriptProfileTimelineView.prototype._clearFocusNodes):
The two TimelineViews.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.get currentTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject):
The timeline content browser may now hold a ClusterContentView. It is not exactly a TimelineView,
but it holds TimelineViews, so treat it like one. Assume the ClusterContentView will add its own
path components.

(WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
Add extra information other than the sidebar to TimelineViews. The ProfileView looks
at the recording for the calling context trees.

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

4 years agoAdd support for the object-position CSS property
simon.fraser@apple.com [Sun, 6 Mar 2016 00:01:17 +0000 (00:01 +0000)]
Add support for the object-position CSS property
https://bugs.webkit.org/show_bug.cgi?id=122811
rdar://problem/15836338

Reviewed by Sam Weinig.

Source/WebCore:

Take object-position into account when rendering replaced elements.
RenderReplaced::replacedContentRect() is the one place where we compute
the content rect for replaced elements.

Also return false from foregroundIsKnownToBeOpaqueInRect() if we have
any non-default object-position, as the foreground may no longer fill the box.

Tests: compositing/video/video-object-position.html
       fast/css/object-position/object-position-canvas.html
       fast/css/object-position/object-position-embed.html
       fast/css/object-position/object-position-img-svg.html
       fast/css/object-position/object-position-img.html
       fast/css/object-position/object-position-input-image.html
       fast/css/object-position/object-position-object.html
       fast/css/object-position/object-position-video-poster.html

* rendering/RenderImage.cpp:
(WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::replacedContentRect):

LayoutTests:

Various object-position tests.

* compositing/video/video-object-position-expected.txt: Added.
* compositing/video/video-object-position.html: Added.
* fast/css/object-position/object-position-embed-expected.html: Added.
* fast/css/object-position/object-position-embed.html: Added.
* fast/css/object-position/object-position-img-expected.html: Added.
* fast/css/object-position/object-position-img-svg-expected.html: Added.
* fast/css/object-position/object-position-img-svg.html: Added.
* fast/css/object-position/object-position-img.html: Added.
* fast/css/object-position/object-position-input-image-expected.html: Added.
* fast/css/object-position/object-position-input-image.html: Added.
* fast/css/object-position/object-position-object-expected.html: Added.
* fast/css/object-position/object-position-object.html: Added.
* fast/css/object-position/object-position-video-poster-expected.html: Added.
* fast/css/object-position/object-position-video-poster.html: Added.
* fast/css/object-position/resources/expected.css: Added.
* fast/css/object-position/resources/test.css: Added.

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

4 years agoAdd parsing support for object-position
simon.fraser@apple.com [Sat, 5 Mar 2016 23:23:40 +0000 (23:23 +0000)]
Add parsing support for object-position
https://bugs.webkit.org/show_bug.cgi?id=155065

Reviewed by Sam Weinig.

Source/WebCore:

Add parsing support for object-position. This is the first property with
CSS <position> values which does not have equivalent -x and -y shorthands,
so we can store it as a new LengthPoint type.

Per the CSS Values spec, bottom- and right-relative values are translated
into calc() expressions, which are exposed via computed style. For example,
"right 10px bottom" becomes "calc(100% - 10px) 100%". This also allows transitions
between, say, "left 10px bottom" and "right 10px bottom".

Test: fast/css/object-position/parsing-object-position.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isPair):
* css/CSSPropertyNames.in:
* css/CSSValue.h:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertLength):
(WebCore::StyleBuilderConverter::convertTo100PercentMinusLength):
(WebCore::StyleBuilderConverter::convertPositionComponent):
(WebCore::StyleBuilderConverter::convertObjectPosition):
* platform/LengthPoint.cpp: Added.
(WebCore::operator<<):
* platform/LengthPoint.h: Added.
(WebCore::LengthPoint::LengthPoint):
(WebCore::LengthPoint::operator==):
(WebCore::LengthPoint::setX):
(WebCore::LengthPoint::x):
(WebCore::LengthPoint::setY):
(WebCore::LengthPoint::y):
(WebCore::LengthPoint::blend):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaint):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

LayoutTests:

object-position parsing test.

* fast/css/object-position/parsing-object-position-expected.txt: Added.
* fast/css/object-position/parsing-object-position.html: Added.

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

4 years agoAX: Implement missing/different accessibility API mappings for SVG
jdiggs@igalia.com [Sat, 5 Mar 2016 21:35:57 +0000 (21:35 +0000)]
AX: Implement missing/different accessibility API mappings for SVG
https://bugs.webkit.org/show_bug.cgi?id=155034

Reviewed by Chris Fleizach.

Source/WebCore:

Create an AccessibilitySVGElement class for the SVG-specific mappings;
fix name and description mappings for ATK; add new AccessibilityRole
types (SVGTextRole, SVGTSpanRole, SVGTextPathRole) and map them for
ATK and AX API.

Tests: accessibility/w3c-svg-description-calculation.html
       accessibility/w3c-svg-elements-not-exposed.html
       accessibility/w3c-svg-name-calculation.html
       accessibility/w3c-svg-presentational-role.html
       accessibility/w3c-svg-roles.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityAllInOne.cpp:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeText): Deleted.
(WebCore::AccessibilityNodeObject::accessibilityDescription): Deleted.
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isAccessibilitySVGElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole): Deleted.
* accessibility/AccessibilitySVGElement.cpp: Added.
(WebCore::AccessibilitySVGElement::AccessibilitySVGElement):
(WebCore::AccessibilitySVGElement::~AccessibilitySVGElement):
(WebCore::AccessibilitySVGElement::create):
(WebCore::AccessibilitySVGElement::targetForUseElement):
(WebCore::AccessibilitySVGElement::accessibilityText):
(WebCore::AccessibilitySVGElement::accessibilityDescription):
(WebCore::AccessibilitySVGElement::helpText):
(WebCore::AccessibilitySVGElement::computeAccessibilityIsIgnored):
(WebCore::AccessibilitySVGElement::inheritsPresentationalRole):
(WebCore::AccessibilitySVGElement::determineAriaRoleAttribute):
(WebCore::AccessibilitySVGElement::determineAccessibilityRole):
* accessibility/AccessibilitySVGElement.h: Added.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetName):
(webkitAccessibleGetDescription):
(atkRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
* rendering/RenderObject.h:
(WebCore::RenderObject::isSVGTSpan):
* rendering/svg/RenderSVGTSpan.h:

LayoutTests:

* accessibility/svg-group-element-with-title.html: Modified to reflect correct ATK results.
* accessibility/svg-image.html: Modified to reflect correct ATK results.
* accessibility/svg-labelledby.html: Modified to reflect correct ATK results.
* accessibility/svg-remote-element.html: Modified to reflect correct ATK results.
* accessibility/w3c-svg-description-calculation.html: Added.
* accessibility/w3c-svg-elements-not-exposed.html: Added.
* accessibility/w3c-svg-name-calculation.html: Added.
* accessibility/w3c-svg-presentational-role.html: Added.
* accessibility/w3c-svg-roles.html: Added.
* platform/gtk/accessibility/svg-group-element-with-title-expected.txt: Added.
* platform/gtk/accessibility/svg-image-expected.txt: Added.
* platform/gtk/accessibility/svg-labelledby-expected.txt: Added.
* platform/gtk/accessibility/svg-remote-element-expected.txt: Added.
* platform/gtk/accessibility/w3c-svg-description-calculation-expected.txt: Added.
* platform/gtk/accessibility/w3c-svg-elements-not-exposed-expected.txt: Added.
* platform/gtk/accessibility/w3c-svg-name-calculation-expected.txt: Added.
* platform/gtk/accessibility/w3c-svg-presentational-role-expected.txt: Added.
* platform/gtk/accessibility/w3c-svg-roles-expected.txt: Added.
* platform/mac/accessibility/w3c-svg-description-calculation-expected.txt: Added.
* platform/mac/accessibility/w3c-svg-elements-not-exposed-expected.txt: Added.
* platform/mac/accessibility/w3c-svg-name-calculation-expected.txt: Added.
* platform/mac/accessibility/w3c-svg-presentational-role-expected.txt: Added.
* platform/mac/accessibility/w3c-svg-roles-expected.txt: Added.

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

4 years ago[GTK] Fix logging details after r197505 (Run the run-benchmark script on the performa...
clopez@igalia.com [Sat, 5 Mar 2016 19:44:37 +0000 (19:44 +0000)]
[GTK] Fix logging details after r197505 (Run the run-benchmark script on the performance bot.)
https://bugs.webkit.org/show_bug.cgi?id=154595

Unreviewed.

* Scripts/webkitpy/benchmark_runner/run_benchmark.py:
(start): Use logging.exception when a test fails in order to get the details about the error.

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

4 years ago[ES6] Support Reflect.construct
utatane.tea@gmail.com [Sat, 5 Mar 2016 17:01:04 +0000 (17:01 +0000)]
[ES6] Support Reflect.construct
https://bugs.webkit.org/show_bug.cgi?id=147330

Reviewed by Saam Barati.

Source/JavaScriptCore:

Based on Saam's r196868, this patch adds support for Reflect.construct.
This patch implements OrdinaryCreateFromConstructor[1] for fallback cases.
This path is rarely taken. For example,

    Reflect.construct(function () { }, [], Map);

In this case, the `new.target` becomes `Map`.
So we should create an object that `__proto__` is `Map.prototype`.

And to allow forward declaration (and encouraging strong type checking), we change
ConstructType, CallType to C++11 enum class.

[1]: http://ecma-international.org/ecma-262/6.0/#sec-ordinarycreatefromconstructor

* API/JSCallbackConstructor.cpp:
(JSC::JSCallbackConstructor::getConstructData):
* API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::getCallData):
* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject<Parent>::getConstructData):
(JSC::JSCallbackObject<Parent>::getCallData):
* API/JSObjectRef.cpp:
(JSObjectIsFunction):
(JSObjectCallAsFunction):
(JSObjectIsConstructor):
(JSObjectCallAsConstructor):
* API/ObjCCallbackFunction.mm:
(JSC::ObjCCallbackFunction::getCallData):
(JSC::ObjCCallbackFunction::getConstructData):
* bindings/ScriptFunctionCall.cpp:
(Deprecated::ScriptFunctionCall::call):
* bindings/ScriptValue.cpp:
(Deprecated::ScriptValue::isFunction):
* builtins/ReflectObject.js:
* dfg/DFGOperations.cpp:
* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::createInjectedScript):
* interpreter/Interpreter.cpp:
(JSC::sizeOfVarargs):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::handleHostCall):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::getConstructData):
(JSC::ArrayConstructor::getCallData):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::getLength): Deleted.
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::getConstructData):
(JSC::BooleanConstructor::getCallData):
* runtime/CallData.cpp:
(JSC::call):
* runtime/CallData.h:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/ConstructData.cpp:
(JSC::construct):
* runtime/ConstructData.h:
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::getConstructData):
(JSC::DateConstructor::getCallData):
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncToJSON):
* runtime/Error.h:
(JSC::StrictModeTypeErrorFunction::getConstructData):
(JSC::StrictModeTypeErrorFunction::getCallData):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::getConstructData):
(JSC::ErrorConstructor::getCallData):
* runtime/ExceptionHelpers.cpp:
(JSC::errorDescriptionForValue):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::getConstructData):
(JSC::FunctionConstructor::getCallData):
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::getCallData):
(JSC::functionProtoFuncToString):
(JSC::functionProtoFuncBind):
* runtime/GeneratorFunctionConstructor.cpp:
(JSC::GeneratorFunctionConstructor::getCallData):
(JSC::GeneratorFunctionConstructor::getConstructData):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::getCallData):
* runtime/IntlCollatorConstructor.cpp:
(JSC::IntlCollatorConstructor::getConstructData):
(JSC::IntlCollatorConstructor::getCallData):
* runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::IntlDateTimeFormatConstructor::getConstructData):
(JSC::IntlDateTimeFormatConstructor::getCallData):
* runtime/IntlNumberFormatConstructor.cpp:
(JSC::IntlNumberFormatConstructor::getConstructData):
(JSC::IntlNumberFormatConstructor::getCallData):
* runtime/IteratorOperations.cpp:
(JSC::iteratorNext):
(JSC::iteratorClose):
* runtime/JSArray.h:
(JSC::getLength):
* runtime/JSArrayBufferConstructor.cpp:
(JSC::JSArrayBufferConstructor::getConstructData):
(JSC::JSArrayBufferConstructor::getCallData):
* runtime/JSBoundFunction.cpp:
(JSC::boundFunctionCall):
(JSC::boundFunctionConstruct):
(JSC::JSBoundFunction::create):
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::isFunction):
(JSC::JSValue::isConstructor):
* runtime/JSCell.cpp:
(JSC::JSCell::getCallData):
(JSC::JSCell::getConstructData):
* runtime/JSFunction.cpp:
(JSC::JSFunction::getCallData):
(JSC::JSFunction::getConstructData):
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayViewWithArguments):
(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::getConstructData):
(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::getCallData):
* runtime/JSInternalPromise.cpp:
(JSC::JSInternalPromise::then):
* runtime/JSInternalPromiseConstructor.cpp:
(JSC::JSInternalPromiseConstructor::getConstructData):
(JSC::JSInternalPromiseConstructor::getCallData):
* runtime/JSJob.cpp:
(JSC::JSJobMicrotask::run):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Stringifier):
(JSC::Stringifier::toJSONImpl):
(JSC::Stringifier::appendStringifiedValue):
(JSC::JSONProtoFuncParse):
* runtime/JSObject.cpp:
(JSC::callToPrimitiveFunction):
(JSC::JSObject::hasInstance):
(JSC::JSObject::getMethod):
* runtime/JSObject.h:
(JSC::getCallData):
(JSC::getConstructData):
* runtime/JSPromise.cpp:
(JSC::JSPromise::initialize):
* runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::getConstructData):
(JSC::JSPromiseConstructor::getCallData):
* runtime/JSPromiseDeferred.cpp:
(JSC::newPromiseCapability):
(JSC::callFunction):
* runtime/JSTypedArrayViewConstructor.cpp:
(JSC::constructTypedArrayView):
(JSC::JSTypedArrayViewConstructor::getConstructData):
(JSC::JSTypedArrayViewConstructor::getCallData):
* runtime/MapConstructor.cpp:
(JSC::constructMap):
(JSC::MapConstructor::getConstructData):
(JSC::MapConstructor::getCallData):
* runtime/ModuleLoaderObject.cpp:
(JSC::ModuleLoaderObject::provide):
(JSC::ModuleLoaderObject::loadAndEvaluateModule):
(JSC::ModuleLoaderObject::loadModule):
(JSC::ModuleLoaderObject::linkAndEvaluateModule):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::getConstructData):
(JSC::NativeErrorConstructor::getCallData):
* runtime/NullGetterFunction.cpp:
(JSC::NullGetterFunction::getCallData):
(JSC::NullGetterFunction::getConstructData):
* runtime/NullSetterFunction.cpp:
(JSC::NullSetterFunction::getCallData):
(JSC::NullSetterFunction::getConstructData):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::getConstructData):
(JSC::NumberConstructor::getCallData):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::getConstructData):
(JSC::ObjectConstructor::getCallData):
(JSC::toPropertyDescriptor):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncToLocaleString):
* runtime/Operations.cpp:
(JSC::jsTypeStringForValue):
(JSC::jsIsObjectTypeOrNull):
(JSC::jsIsFunctionType):
* runtime/ProxyConstructor.cpp:
(JSC::ProxyConstructor::getConstructData):
(JSC::ProxyConstructor::getCallData):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::finishCreation):
(JSC::performProxyCall):
(JSC::ProxyObject::getCallData):
(JSC::performProxyConstruct):
(JSC::ProxyObject::getConstructData):
* runtime/ReflectObject.cpp:
(JSC::reflectObjectConstruct):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::getConstructData):
(JSC::RegExpConstructor::getCallData):
* runtime/RuntimeType.h:
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::processUnverifiedStackTraces):
* runtime/SetConstructor.cpp:
(JSC::constructSet):
(JSC::SetConstructor::getConstructData):
(JSC::SetConstructor::getCallData):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::getConstructData):
(JSC::StringConstructor::getCallData):
* runtime/StringPrototype.cpp:
(JSC::replaceUsingRegExpSearch):
(JSC::operationStringProtoFuncReplaceRegExpEmptyStr):
(JSC::operationStringProtoFuncReplaceRegExpString):
(JSC::replaceUsingStringSearch):
* runtime/SymbolConstructor.cpp:
(JSC::SymbolConstructor::getConstructData):
(JSC::SymbolConstructor::getCallData):
* runtime/WeakMapConstructor.cpp:
(JSC::constructWeakMap):
(JSC::WeakMapConstructor::getConstructData):
(JSC::WeakMapConstructor::getCallData):
* runtime/WeakSetConstructor.cpp:
(JSC::constructWeakSet):
(JSC::WeakSetConstructor::getConstructData):
(JSC::WeakSetConstructor::getCallData):
* tests/es6.yaml:
* tests/stress/reflect-construct.js: Added.
(shouldBe):
(shouldThrow):
(shouldThrow.array.get length):
(shouldThrow.array.get 0):
(array.get length):
(array.get 0):
(shouldBe.Reflect.construct):
(shouldBe.Reflect.construct.Hello):
(3.shouldBe.Reflect.construct.Hello):
(3.newTarget):
(0.shouldBe.Reflect.construct):
(shouldBe.A):
(shouldBe.B):
(nativeConstructorTest.DerivedMap):
(nativeConstructorTest.FailedMap):
(set noInline):

Source/WebCore:

* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::QuickTimePluginReplacement::installReplacement):
* bindings/js/CallbackFunction.cpp:
(WebCore::checkFunctionOnlyCallback):
* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSCustomElementInterface.cpp:
(WebCore::JSCustomElementInterface::constructElement):
(WebCore::JSCustomElementInterface::attributeChanged):
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* bindings/js/JSDOMBinding.cpp:
(WebCore::callFunctionWithCurrentArguments):
(WebCore::DOMConstructorObject::getCallData):
* bindings/js/JSDOMConstructor.h:
(WebCore::JSDOMConstructorNotConstructable::getCallData):
(WebCore::JSDOMConstructor<JSClass>::getConstructData):
(WebCore::JSDOMNamedConstructor<JSClass>::getConstructData):
(WebCore::JSBuiltinConstructor<JSClass>::getConstructData):
* bindings/js/JSDOMPromise.cpp:
(WebCore::DeferredWrapper::callFunction):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::defineElement):
* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::JSHTMLAllCollection::getCallData):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::open):
* bindings/js/JSKeyValueIterator.h:
(WebCore::keyValueIteratorForEach):
* bindings/js/JSMainThreadExecStateInstrumentation.h:
(WebCore::JSMainThreadExecState::instrumentFunctionCall):
(WebCore::JSMainThreadExecState::instrumentFunctionConstruct):
* bindings/js/JSMutationCallback.cpp:
(WebCore::JSMutationCallback::call):
* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::constructJSMutationObserver):
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::callPlugin):
(WebCore::pluginElementGetCallData):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::create):
(WebCore::ScheduledAction::executeFunctionInContext):
* bindings/objc/WebScriptObject.mm:
(-[WebScriptObject callWebScriptMethod:withArguments:]):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64ArrayConstructor::getConstructData):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::getConstructData):
* bridge/NP_jsobject.cpp:
(_NPN_InvokeDefault):
(_NPN_Invoke):
(_NPN_Construct):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcFallbackObjectImp::getCallData):
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::getCallData):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::getCallData):
(JSC::Bindings::RuntimeObject::getConstructData):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateCaptionContainer):
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
(WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
* testing/Internals.cpp:
(WebCore::Internals::isReadableStreamDisturbed):

Source/WebKit/mac:

* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::invoke):
(WebKit::NetscapePluginInstanceProxy::invokeDefault):
(WebKit::NetscapePluginInstanceProxy::construct):

Source/WebKit/win:

* Plugins/PluginPackage.cpp:
(WebCore::NPN_Invoke):

Source/WebKit2:

* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::JSNPMethod::getCallData):
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::getCallData):
(WebKit::JSNPObject::getConstructData):
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::hasMethod):
(WebKit::NPJSObject::construct):
(WebKit::NPJSObject::invoke):

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

4 years agoFix the bindings test after r197611.
rniwa@webkit.org [Sat, 5 Mar 2016 08:50:55 +0000 (08:50 +0000)]
Fix the bindings test after r197611.

* bindings/scripts/test/TestObj.idl:

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

4 years agoMove QualifiedName from CustomElementInfo to JSCustomElementInterface
rniwa@webkit.org [Sat, 5 Mar 2016 08:31:38 +0000 (08:31 +0000)]
Move QualifiedName from CustomElementInfo to JSCustomElementInterface
https://bugs.webkit.org/show_bug.cgi?id=155061

Reviewed by Antti Koivisto.

Store QualifiedName of custom elements in JSCustomElementInterface instead of CustomElementInfo
now that each interface is associated with exactly one custom element as of r197602.

No new tests since this is a refactoring.

* bindings/js/JSCustomElementInterface.cpp:
(WebCore::JSCustomElementInterface::JSCustomElementInterface): Now takes QualifiedName as the
first argument.
* bindings/js/JSCustomElementInterface.h:
(WebCore::JSCustomElementInterface::create):
(WebCore::JSCustomElementInterface::name): Added.
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::defineElement):
* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement): Use findInterface instead of the deleted findName.
* dom/CustomElementDefinitions.cpp:
(WebCore::CustomElementDefinitions::checkName):
(WebCore::CustomElementDefinitions::addElementDefinition): Renamed from defineElement.
(WebCore::CustomElementDefinitions::findInterface): Add a variant that finds the interface object
by a JS constructor.
(WebCore::CustomElementDefinitions::containsConstructor):
(WebCore::CustomElementDefinitions::findName): Deleted.
* dom/CustomElementDefinitions.h:
(WebCore::CustomElementDefinitions::CustomElementInfo::CustomElementInfo): Deleted.

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

4 years agoAdd basic support for attributeChanged lifecycle callback
rniwa@webkit.org [Sat, 5 Mar 2016 07:50:54 +0000 (07:50 +0000)]
Add basic support for attributeChanged lifecycle callback
https://bugs.webkit.org/show_bug.cgi?id=155011

Reviewed by Antti Koivisto.

Source/WebCore:

Add basic support for attributeChangedCallback in setAttribute, removeAttribute, setAttributeNS,
remoteAttributeNS, setAttributeNode, and removeAttributeNS. There are many other DOM APIs that
could modify attributes but we would annotate those APIs in a separate patch to limit the scope
of this change.

In order to invoke the lifecycle callback right before returning to the author script, allocate
an instance of CustomElementLifecycleProcessingStack in each of these functions' binding code.
The stack object's destructor invokes all callbacks enqueued by the DOM API if there are any.

Spec: https://w3c.github.io/webcomponents/spec/custom/#dfn-attribute-changed-callback

Tests: fast/custom-elements/attribute-changed-callback.html
       fast/custom-elements/lifecycle-callback-timing.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCustomElementInterface.cpp:
(WebCore::JSCustomElementInterface::attributeChanged): Added. Invokes attributeChangedCallback.
* bindings/js/JSCustomElementInterface.h:
* bindings/js/JSMainThreadExecState.h:
(JSMainThreadNullState): Allocate an instance of CustomElementLifecycleProcessingStack in GObject
and Objective-C binding code for consistency with JavaScript. We can't do this in JavaScript
because there is no RAII object all functions, getters, and setters allocate (for a good reason).

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Generate an instance of CustomElementLifecycleProcessingStack when
NeedsLifecycleProcessingStack is specified as an extended IDL attribute.
* bindings/scripts/IDLAttributes.txt: Added NeedsLifecycleProcessingStack.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionMethodWithNeedsLifecycleProcessingStack):
* bindings/scripts/test/TestObj.idl: Added a test for NeedsLifecycleProcessingStack.

* dom/DOMAllInOne.cpp:
* dom/Element.cpp:
(WebCore::Element::attributeChanged): Enqueue attributeChanged callback if the context object
is a custom element and there is a CustomElementLifecycleProcessingStack allocated in the stack.
* dom/Element.idl:

* dom/LifecycleCallbackQueue.cpp: Added.
(WebCore::LifecycleQueueItem): Added.
(WebCore::LifecycleQueueItem::LifecycleQueueItem): Added.
(WebCore::LifecycleQueueItem::invoke): Added.
(WebCore::LifecycleCallbackQueue::LifecycleCallbackQueue): Added.
(WebCore::LifecycleCallbackQueue::~LifecycleCallbackQueue): Added.
(WebCore::LifecycleCallbackQueue::enqueueAttributeChangedCallback): Added.
(WebCore::LifecycleCallbackQueue::invokeAll): Added.
(WebCore::CustomElementLifecycleProcessingStack::ensureCurrentQueue): Added. As noted in FIXME,
the early exit in the code is necessary only because we haven't added NeedsLifecycleProcessingStack
in all places. It should go away in a follow up patch.
(WebCore::CustomElementLifecycleProcessingStack::processQueue): Added.
* dom/LifecycleCallbackQueue.h: Added.
(WebCore::CustomElementLifecycleProcessingStack): This is a light weight RAII object the binding
code will allocate in order to queue up lifecycle callbacks. We don't use Ref or std::unique_ptr
in m_queue to avoid generating the code to destruct LifecycleCallbackQueue everywhere.
(WebCore::CustomElementLifecycleProcessingStack::CustomElementLifecycleProcessingStack): Added.
(WebCore::CustomElementLifecycleProcessingStack::~CustomElementLifecycleProcessingStack): Added.
(WebCore::CustomElementLifecycleProcessingStack::hasCurrentProcessingStack): Added.

LayoutTests:

Added a test for attributeChangedCallback and a test for the timing of lifecycle callbacks in general.

* fast/custom-elements/attribute-changed-callback-expected.txt: Added.
* fast/custom-elements/attribute-changed-callback.html: Added.
* fast/custom-elements/lifecycle-callback-timing-expected.txt: Added.
* fast/custom-elements/lifecycle-callback-timing.html: Added.

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

4 years agoTemporarily skip attachment tests on iOS
timothy_horton@apple.com [Sat, 5 Mar 2016 07:31:32 +0000 (07:31 +0000)]
Temporarily skip attachment tests on iOS

* platform/ios-simulator/TestExpectations:
There's no point in running these quite yet (I'm surprised they weren't already skipped).
We'll turn them back on soon.

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

4 years ago[GTK] Scrollbars are broken again with GTK+ >= 3.19.11
carlosgc@webkit.org [Sat, 5 Mar 2016 06:25:30 +0000 (06:25 +0000)]
[GTK] Scrollbars are broken again with GTK+ >= 3.19.11
https://bugs.webkit.org/show_bug.cgi?id=154890

Reviewed by Michael Catanzaro.

Scrollbar style properties have been deprecated in GTK+, and it
seems that now deprecating means keeping the properties but
ignoring them. So, this reworks the whole scrollbars theme code
again to not cache style properties anymore, but retrieve them
from the GtkStyleContext. Previous GTK+ versions still need to
query the style properties, so I've added helper functions to get
all the style properties with the ifdefs, trying to keep the
common render code free of GTK+ versions ifdefs.

* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::backButtonRect):
(WebCore::ScrollbarThemeGtk::forwardButtonRect):
(WebCore::ScrollbarThemeGtk::trackRect):
(WebCore::ScrollbarThemeGtk::thumbRect):
(WebCore::ScrollbarThemeGtk::paintTrackBackground):
(WebCore::ScrollbarThemeGtk::paintThumb):
(WebCore::ScrollbarThemeGtk::paint):
(WebCore::ScrollbarThemeGtk::scrollbarThickness):
(WebCore::ScrollbarThemeGtk::buttonSize):
(WebCore::ScrollbarThemeGtk::stepperSize):
(WebCore::ScrollbarThemeGtk::getStepperSpacing):
(WebCore::ScrollbarThemeGtk::troughUnderSteppers):
(WebCore::ScrollbarThemeGtk::minimumThumbLength):
(WebCore::ScrollbarThemeGtk::thumbFatness):
(WebCore::ScrollbarThemeGtk::getTroughBorder):
(WebCore::ScrollbarThemeGtk::getOrCreateStyleContext):
(WebCore::ScrollbarThemeGtk::updateThemeProperties):
(WebCore::ScrollbarThemeGtk::handleMousePressEvent):
* platform/gtk/ScrollbarThemeGtk.h:

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

4 years agoResource load statistics are not honoring private browsing
bfulgham@apple.com [Sat, 5 Mar 2016 05:24:51 +0000 (05:24 +0000)]
Resource load statistics are not honoring private browsing
https://bugs.webkit.org/show_bug.cgi?id=155054
<rdar://problem/24987873>

Reviewed by Andy Estes.

Modify the points where we capture resource load statistics to ignore
loads made during private browsing. Do this by moving more of the logic
about whether to gather statistics into the logging functions, passing
the raw input types (frame, ResourceRequest, ResourceResponse) internally
so that we don't pay any cost until we decide we want to gather data.s

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest): Revise for the new API on
ResourceLoadObserver.
* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::logFrameNavigation): Revise signature and
check for private browsing.
(WebCore::ResourceLoadObserver::logSubresourceLoading): Ditto.
(WebCore::ResourceLoadObserver::logUserInteraction): Ditto.
* loader/ResourceLoadObserver.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequestInternal): Ditto.

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

4 years agoconfig.json fix to remove duplicate scheduler.
lforschler@apple.com [Sat, 5 Mar 2016 03:42:06 +0000 (03:42 +0000)]
config.json fix to remove duplicate scheduler.

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

4 years agoFix file mime-types when using NetworkSession
commit-queue@webkit.org [Sat, 5 Mar 2016 03:30:19 +0000 (03:30 +0000)]
Fix file mime-types when using NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=155058

Patch by Alex Christensen <achristensen@webkit.org> on 2016-03-04
Reviewed by Andy Estes.

Source/WebCore:

This fixes platform/mac/fast/loader/file-url-mimetypes-3.html
and platform/mac/fast/loader/file-url-mimetypes.html.

* platform/network/mac/WebCoreURLResponse.h:

Source/WebKit2:

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTask::NetworkDataTask):
Call adjustMIMETypeIfNecessary like we do in connection didReceiveResponse in
WebCoreResourceHandleAsOperationQueueDelegate.mm.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
Don't content sniff file urls.  This check is analogous to ResourceHandle::shouldContentSniffURL.

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

4 years ago[WebKit2] Add WebKit2 equivalent of -[WebView _insertNewlineInQuotedContent]
weinig@apple.com [Sat, 5 Mar 2016 01:35:12 +0000 (01:35 +0000)]
[WebKit2] Add WebKit2 equivalent of -[WebView _insertNewlineInQuotedContent]
<rdar://problem/24943591>
https://bugs.webkit.org/show_bug.cgi?id=155057

Reviewed by Tim Horton.

Source/WebCore:

Move Editor::insertParagraphSeparatorInQuotedContent() into Editor.cpp
and remove the duplicated code in EditorIOS.mm and EditorMac.mm.

* editing/Editor.cpp:
(WebCore::Editor::insertParagraphSeparatorInQuotedContent):
* editing/Editor.h:
* editing/ios/EditorIOS.mm:
(WebCore::Editor::insertParagraphSeparatorInQuotedContent): Deleted.
* editing/mac/EditorMac.mm:
(WebCore::Editor::insertParagraphSeparatorInQuotedContent): Deleted.

Source/WebKit2:

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageInsertNewlineInQuotedContent):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::insertNewlineInQuotedContent):
* WebProcess/WebPage/WebPage.h:
Expose WKBundlePageInsertNewlineInQuotedContent as SPI.

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

4 years agoConvert DOMTimer interval from int to std::chromo::milliseconds
barraclough@apple.com [Sat, 5 Mar 2016 01:34:21 +0000 (01:34 +0000)]
Convert DOMTimer interval from int to std::chromo::milliseconds
https://bugs.webkit.org/show_bug.cgi?id=155051

Speculative build fix.

* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createTimerInstallData):

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

4 years agoConvert DOMTimer interval from int to std::chromo::milliseconds
barraclough@apple.com [Sat, 5 Mar 2016 01:32:04 +0000 (01:32 +0000)]
Convert DOMTimer interval from int to std::chromo::milliseconds
https://bugs.webkit.org/show_bug.cgi?id=155051

iOS build fix

* page/DOMTimer.cpp:
(WebCore::DOMTimer::install):

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

4 years agoUpdate defineCustomElement according to the spec rewrite
rniwa@webkit.org [Sat, 5 Mar 2016 01:23:42 +0000 (01:23 +0000)]
Update defineCustomElement according to the spec rewrite
https://bugs.webkit.org/show_bug.cgi?id=155010
<rdar://problem/24970878>

Reviewed by Chris Dumez.

Source/WebCore:

Updated the implementation of defineCustomElement and HTMLConstructor per recent rewrite of the spec:
https://w3c.github.io/webcomponents/spec/custom/#dom-document-defineelement
https://w3c.github.io/webcomponents/spec/custom/#htmlelement-constructor

defineCustomElement is now called defineElement and we disallow defining multiple custom elements with
a single class and throw an exception in defineElement.

Test: fast/custom-elements/Document-defineElement.html

* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::defineElement): Renamed from defineCustomElement. Throw an exception when the interface
already defines another custom element. Also added FIXME's for missing steps.

* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement): Removed the support for specifying a tag name in the first argument when
a single class defines multiple custom elements since that now results in an exception (in defineElement).

* dom/CustomElementDefinitions.cpp:
(WebCore::CustomElementDefinitions::containsConstructor): Added.
* dom/CustomElementDefinitions.h:
* dom/Document.idl: Renamed defineCustomElement to defineElement.
* html/HTMLElement.idl: Removed the optional tag name from the constructor.

LayoutTests:

Update the tests for the rename and semantics change of defineCustomElement and HTMLElement constructor.

* fast/custom-elements/Document-createElement.html:
* fast/custom-elements/Document-defineCustomElement-expected.txt: Removed.
* fast/custom-elements/Document-defineCustomElement.html: Removed.
* fast/custom-elements/Document-defineElement-expected.txt: Renamed from LayoutTests/fast/custom-elements/Document-defineCustomElement-expected.txt.
* fast/custom-elements/Document-defineElement.html: Renamed from LayoutTests/fast/custom-elements/Document-defineCustomElement.html.
Also added a test case for defining multiple custom elements with a single class, which must throw.
* fast/custom-elements/HTMLElement-constructor-expected.txt:
* fast/custom-elements/HTMLElement-constructor.html:
Removed test cases for the tag name in the first argument as well as ones that associate a single class with multiple tag names.
* fast/custom-elements/parser/parser-constructs-custom-element-in-document-write.html:
* fast/custom-elements/parser/parser-constructs-custom-element-synchronously.html:
* fast/custom-elements/parser/parser-constructs-custom-elements.html:
* fast/custom-elements/parser/parser-fallsback-to-unknown-element.html:
* fast/custom-elements/parser/parser-sets-attributes-and-children.html:
* fast/custom-elements/parser/parser-uses-constructed-element.html:
* fast/custom-elements/parser/parser-uses-registry-of-owner-document.html:

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

4 years agoAdd iOS simulator debug bots
ap@apple.com [Sat, 5 Mar 2016 01:06:19 +0000 (01:06 +0000)]
Add iOS simulator debug bots
https://bugs.webkit.org/show_bug.cgi?id=155053

Reviewed by Lucas Forschler.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

4 years agoBegin implementing <attachment> painting on iOS
timothy_horton@apple.com [Sat, 5 Mar 2016 00:57:19 +0000 (00:57 +0000)]
Begin implementing <attachment> painting on iOS
https://bugs.webkit.org/show_bug.cgi?id=155046
<rdar://problem/24805991>

Reviewed by Enrica Casucci.

No new tests; there are existing tests that I will unskip and rebaseline
in the near future.

* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::AttachmentInfo::addLine):
(WebCore::AttachmentInfo::buildTitleLines):
(WebCore::AttachmentInfo::buildSingleLine):
(WebCore::getAttachmentProgress):
(WebCore::iconForAttachment):
(WebCore::AttachmentInfo::AttachmentInfo):
(WebCore::RenderThemeIOS::attachmentIntrinsicSize):
(WebCore::RenderThemeIOS::attachmentBaseline):
(WebCore::paintAttachmentIcon):
(WebCore::paintAttachmentText):
(WebCore::paintAttachmentProgress):
(WebCore::paintAttachmentBorder):
(WebCore::RenderThemeIOS::paintAttachment):
There are still a few missing pieces, but get <attachment> painting a bit on iOS.
We will paint an icon, action, title, and subtitle - in that order - depending on what we have.
The content is vertically and horizontally centered.

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

4 years agoConvert DOMTimer interval from int to std::chromo::milliseconds
barraclough@apple.com [Sat, 5 Mar 2016 00:56:07 +0000 (00:56 +0000)]
Convert DOMTimer interval from int to std::chromo::milliseconds
https://bugs.webkit.org/show_bug.cgi?id=155051

Reviewed by Ryosuke Niwa.

This change is pretty much mechanical, replacing int with std::chrono::milliseconds.

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
(WebCore::InspectorInstrumentation::didInstallTimerImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
(WebCore::InspectorInstrumentation::didInstallTimer):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didPaint):
(WebCore::InspectorTimelineAgent::didInstallTimer):
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericTimerData):
(WebCore::TimelineRecordFactory::createTimerInstallData):
* inspector/TimelineRecordFactory.h:
* page/DOMTimer.cpp:
(WebCore::shouldForwardUserGesture):
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::~DOMTimer):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::intervalClampedToMinimum):
* page/DOMTimer.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::clearTimeout):
(WebCore::DOMWindow::setInterval):
(WebCore::DOMWindow::clearInterval):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::clearTimeout):
(WebCore::WorkerGlobalScope::setInterval):
(WebCore::WorkerGlobalScope::clearInterval):

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

4 years agoStub API to support a debug menu option for measuring resource load statistics
bfulgham@apple.com [Sat, 5 Mar 2016 00:40:14 +0000 (00:40 +0000)]
Stub API to support a debug menu option for measuring resource load statistics
https://bugs.webkit.org/show_bug.cgi?id=154998
<rdar://problem/24944604>

Reviewed by Andy Estes.

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::resourceLoadStatisticsEnabled): Added stub.
(API::WebsiteDataStore::setResourceLoadStatisticsEnabled): Ditto.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreSetResourceLoadStatisticsEnabled): Added method that calls through
to the underlying APIWebsiteDataStore class.
(WKWebsiteDataStoreGetResourceLoadStatisticsEnabled): Ditto.
* UIProcess/API/C/WKWebsiteDataStoreRef.h:

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

4 years agoUnreviewed test fix for null global WebResourceLoadStatisticsStore.
bfulgham@apple.com [Sat, 5 Mar 2016 00:36:48 +0000 (00:36 +0000)]
Unreviewed test fix for null global WebResourceLoadStatisticsStore.

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
(+[WebView _applicationWillTerminate]):

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

4 years agoAdd a mechanism to customize the long press action.
enrica@apple.com [Fri, 4 Mar 2016 23:55:55 +0000 (23:55 +0000)]
Add a mechanism to customize the long press action.
https://bugs.webkit.org/show_bug.cgi?id=154995
rdar://problem/24823732

Reviewed by Tim Horton.

Source/WebCore:

We want to allow long press on attachment elements as well.

* WebCore.xcodeproj/project.pbxproj: Making HTMLAttachmentElement.h private.
* html/HTMLAttachmentElement.h: Adding exported functions.

Source/WebKit2:

Adding a new private delegate method to allow clients to
replace the action sheet displayed for images and links.
The change also adds support for attachment elements.

* Shared/ios/InteractionInformationAtPosition.h:
* Shared/ios/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _showImageSheet]):
(-[WKContentView _showAttachmentSheet]):
(-[WKContentView _showLinkSheet]):
(-[WKContentView _actionForLongPress]):
(-[WKContentView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
(-[WKContentView actionSheetAssistant:showCustomSheetForElement:]):
(-[WKContentView actionSheetAssistant:decideActionsForElement:defaultActions:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):

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

4 years ago[iOS] Throw away compiled RegExp code when navigating to a new page.
akling@apple.com [Fri, 4 Mar 2016 23:33:22 +0000 (23:33 +0000)]
[iOS] Throw away compiled RegExp code when navigating to a new page.
<https://webkit.org/b/155015>

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

Add a mechanism to have the VM discard all RegExp bytecode and JIT code.

* runtime/VM.cpp:
(JSC::VM::deleteAllRegExpCode):
* runtime/VM.h:

Source/WebCore:

Discard RegExp code when doing a top-level navigation.
This frees up a couple hundred kilobytes on many pages.

* bindings/js/GCController.cpp:
(WebCore::GCController::deleteAllRegExpCode):
* bindings/js/GCController.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):

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

4 years agoUse larger tiles when possible to reduce per-tile painting overhead
simon.fraser@apple.com [Fri, 4 Mar 2016 23:32:22 +0000 (23:32 +0000)]
Use larger tiles when possible to reduce per-tile painting overhead
https://bugs.webkit.org/show_bug.cgi?id=154985

Reviewed by Zalan Bujtas.

Source/WebCore:

r197541 inadvertently missed FrameView changes that push scrollability data
onto the TiledBacking, so didn't actually change behavior (hence the 512x512 tiles
in the failing tests).

Also remove m_tileSizeAtLastRevalidate from TileGrid; it's replaced by a simpler test.

* page/FrameView.cpp:
(WebCore::FrameView::addedOrRemovedScrollbar):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::revalidateTiles):
(WebCore::TileGrid::TileGrid): Deleted.
* platform/graphics/ca/TileGrid.h:

LayoutTests:

* tiled-drawing/background-transparency-toggle-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt:
* tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt:
* tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
* tiled-drawing/tile-coverage-speculative-expected.txt:
* tiled-drawing/tile-size-unscrollable-expected.txt:
* tiled-drawing/tile-size-vertically-scrollable-expected.txt:
* tiled-drawing/visible-rect-content-inset-expected.txt:

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

4 years agoUse BoxExtent instead of EdgeSet in TileController
simon.fraser@apple.com [Fri, 4 Mar 2016 23:32:14 +0000 (23:32 +0000)]
Use BoxExtent instead of EdgeSet in TileController
https://bugs.webkit.org/show_bug.cgi?id=155040

Reviewed by Zalan Bujtas.

Remove EdgeSet, which was very similar to the existing BoxExtent, and use BoxExtent
in TileController.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/EdgeSet.h: Removed.
(WebCore::EdgeSet::EdgeSet): Deleted.
(WebCore::EdgeSet::top): Deleted.
(WebCore::EdgeSet::setTop): Deleted.
(WebCore::EdgeSet::right): Deleted.
(WebCore::EdgeSet::setRight): Deleted.
(WebCore::EdgeSet::bottom): Deleted.
(WebCore::EdgeSet::setBottom): Deleted.
(WebCore::EdgeSet::left): Deleted.
(WebCore::EdgeSet::setLeft): Deleted.
(WebCore::EdgeSet::operator==): Deleted.
(WebCore::EdgeSet::operator!=): Deleted.
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setHasMargins):
* platform/graphics/ca/TileController.h:

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

4 years ago[WK2] Gather resource load statistics
bfulgham@apple.com [Fri, 4 Mar 2016 23:29:31 +0000 (23:29 +0000)]
[WK2] Gather resource load statistics
https://bugs.webkit.org/show_bug.cgi?id=154278
<rdar://problem/24702892>

Reviewed by Andy Estes.

Source/WebCore:

Tested (now under WK2) by http/tests/navigation/statistics.html

Split part of the ResourceLoadObserver into a new class (ResourceLoadStatisticsStore)
that manages the collection of ResourceLoadStatistic objects, and that can be used
in the UIProcess without touching various WebProcess-specific WebCore classes.

Have the WebProcess only fire a message to the UIProcess if data has been modified. Otherwise,
no messages should be sent. When new data is encountered, start a 5 second timer. If more
data is found during this delay, just accumulate it. When the timer fires, all data is sent
and the timer stops until a new batch of data arrives.

* CMakeLists.txt: Add the new ResourceLoadStatisticsStore class.
* WebCore.xcodeproj/project.pbxproj: Adjust visibility of ResourceLoadStatistics header,
and add new ResourceLoadStatisticsStore class.
* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::setResourceLoadStatisticsEnabled): Deleted.
(WebCore::ResourceLoadObserver::resourceLoadStatisticsEnabled): Deleted.
(WebCore::ResourceLoadObserver::setStatisticsStore): Added.
(WebCore::ResourceLoadObserver::logFrameNavigation): Tell the ResourceLoadStatisticsStore to fire its 'data changed'
handler if necessary.
(WebCore::ResourceLoadObserver::logSubresourceLoading): Ditto.
(WebCore::ResourceLoadObserver::logUserInteraction): Ditto.
(WebCore::ResourceLoadObserver::statisticsForOrigin): Use new ResourceLoadStatisticsStore.
(WebCore::ResourceLoadObserver::isPrevalentResource): Deleted.
(WebCore::ResourceLoadObserver::resourceStatisticsForPrimaryDomain): Deleted.
(WebCore::ResourceLoadObserver::writeDataToDisk): Deleted.
(WebCore::ResourceLoadObserver::setStatisticsStorageDirectory): Deleted.
(WebCore::ResourceLoadObserver::persistentStoragePath): Deleted.
(WebCore::ResourceLoadObserver::readDataFromDiskIfNeeded): Deleted.
(WebCore::ResourceLoadObserver::createDecoderFromDisk): Deleted.
(WebCore::ResourceLoadObserver::writeEncoderToDisk): Deleted.
* loader/ResourceLoadObserver.h:
* loader/ResourceLoadStatistics.cpp:
(WebCore::ResourceLoadStatistics::encode): Get rid of unneeded argument.
(WebCore::ResourceLoadStatistics::decode): Ditto.
(WebCore::mergeHashCountedSet): Added helper function.
(WebCore::ResourceLoadStatistics::merge): Added.
* loader/ResourceLoadStatistics.h:
(WebCore::ResourceLoadStatistics::ResourceLoadStatistics):
* loader/ResourceLoadStatisticsStore.cpp: Added.
(WebCore::ResourceLoadStatisticsStore::create):
(WebCore::ResourceLoadStatisticsStore::ResourceLoadStatisticsStore):
(WebCore::ResourceLoadStatisticsStore::isPrevalentResource):
(WebCore::ResourceLoadStatisticsStore::resourceStatisticsForPrimaryDomain):
(WebCore::ResourceLoadStatisticsStore::writeDataToDisk):
(WebCore::ResourceLoadStatisticsStore::setStatisticsStorageDirectory):
(WebCore::ResourceLoadStatisticsStore::persistentStoragePath):
(WebCore::ResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
(WebCore::ResourceLoadStatisticsStore::createDecoderFromDisk):
(WebCore::ResourceLoadStatisticsStore::writeEncoderToDisk):
(WebCore::ResourceLoadStatisticsStore::statisticsForOrigin):
(WebCore::ResourceLoadStatisticsStore::takeStatistics):
(WebCore::ResourceLoadStatisticsStore::mergeStatistics):
(WebCore::ResourceLoadStatisticsStore::setNotificationCallback):
(WebCore::ResourceLoadStatisticsStore::fireDataModificationHandler):
* loader/ResourceLoadStatisticsStore.h: Added.

Source/WebKit/mac:

Switch to maintaining a global WebCore::ResourceLoadStatisticsStore in the WebKit process,
and hand it off to the WebCore layer to use during data gathering. The ResourceLoadStatisticsStore
is now responsible for reading/writing to disk, and tracking the collection of load data.

* WebView/WebView.mm:
(WebKitInitializeApplicationStatisticsStoragePathIfNecessary): Initialize singleton
ResourceLoadStatisticsStore object for tracking state.
(-[WebView _preferencesChanged:]): Revise for new singleton.
(+[WebView _applicationWillTerminate]): Ditto.

Source/WebKit2:

Revise the WebProcess to notify the UIProcess about resource load statistics. These
updates are not time-critical, and do not need to be done in concert with the actual
load. As resource loads are made, each WebProcess notifies the UIProcess of the new
load counts, then clears its local state. These statistics are then aggregated in
the UIProcess.

* CMakeLists.txt: Add new ResourceLoadStatisticsState files to build.
* DerivedSources.make: Ditto.
* Platform/IPC/ArgumentCoders.h: Update to support HashCountedSets.
* PlatformEfl.cmake: Add new ResourceLoadStatisticsState files to build.
* PlatformGTK.cmake: Ditto.
* PlatformMac.cmake: Ditto.
* Shared/API/APIObject.h: Add new ResourceLoadStatistics type.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ExceptionDetails>::decode): Support new ResourceLoadStatistics type.
(IPC::ArgumentCoder<ResourceLoadStatistics>::encode): Added.
(IPC::ArgumentCoder<ResourceLoadStatistics>::decode): Added.
* Shared/WebCoreArgumentCoders.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Handle 'resourceLoadStatisticsEnabled' flag.
(WebKit::WebProcessCreationParameters::decode): Ditto.
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::ProcessPoolConfiguration): Add storage location for the
resource load statistics.
(API::ProcessPoolConfiguration::copy): Handle the new storage location and the feature flag.
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): Added stub.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): Added.
(API::WebsiteDataStore::defaultDataStoreConfiguration): Added support for the new resource
load statistics storage location.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]): Sync Process Pool configuration parameters
with the state of our websiteData object's "ResourceLoadStatisticsEnabled" flag, so that
new processes are created in the right state.
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _resourceLoadStatisticsEnabled]): Added.
(-[WKWebsiteDataStore _setResourceLoadStatisticsEnabled:]): Added.
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess): Handle new flag for enabling resource
load statistics.
* UIProcess/WebResourceLoadStatisticsStore.cpp: Added.
(WebKit::WebResourceLoadStatisticsStore::create):
(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
(WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore):
(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
(WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsEnabled):
(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsEnabled):
(WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
(WebKit::WebResourceLoadStatisticsStore::writeToDisk):
(WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate):
* UIProcess/WebResourceLoadStatisticsStore.h: Added.
(WebKit::WebResourceLoadStatisticsStore::coreStore):
* UIProcess/WebResourceLoadStatisticsStore.messages.in: Added.
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::platformInitialize): Register a termination handler
to close down the resource load statistics store.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore): Initialize the new WebResourceLoadStatisticsStore
member.
(WebKit::WebsiteDataStore::webProcessWillOpenConnection): Register the WebResourceLoadStatisticsStore
object as a work queue message receiver
(WebKit::WebsiteDataStore::webProcessDidCloseConnection): Unregister WebResourceLoadStatisticsStore.
(WebKit::WebsiteDataStore::resourceLoadStatisticsEnabled): Added.
(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled): Ditto.
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::resourceLoadStatisticsStore): Added.
* WebKit2.xcodeproj/project.pbxproj: Add new ResourceLoadStatisticsState files to build.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Take into account the new parameter
specifying whether resource load statistics are being captured.
(WebKit::WebProcess::WebProcess): Initialized statistics changed notification timer.
(WebKit::WebProcess::statisticsChangedTimerFired): Added. Send bundles of site load
statistics to the UIProcess on a set interval. Clear out local cache after each send.
(WebKit::WebProcess::setResourceLoadStatisticsEnabled): Added.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: Add new SetResourceLoadStatisticsEnabled message.

Tools:

* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration): Retrieve state of the ResourceLoadStatisticsEnabled setting.
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]): Move setting from WK1-only to be
universally applicable.
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController didChangeSettings]): Recognize when the
Resource Load Statistics flag has changed.

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

4 years agoAdded missing override specifiers under Source/WebCore.
commit-queue@webkit.org [Fri, 4 Mar 2016 23:28:22 +0000 (23:28 +0000)]
Added missing override specifiers under Source/WebCore.
https://bugs.webkit.org/show_bug.cgi?id=155021

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-03-04
Reviewed by Michael Catanzaro.

No new tests needed.

* bridge/NP_jsobject.cpp:
* css/CSSStyleSheet.cpp:
* dom/MutationObserver.cpp:
* editing/DictationCommand.cpp:
* editing/EditingStyle.cpp:
* loader/EmptyClients.cpp:
* loader/SinkDocument.cpp:
* page/DOMWindow.cpp:
* page/animation/CSSPropertyAnimation.cpp:
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
Also added #if(SOUP) guard to
ResourceHandleStreamingClient::getOrCreateReadBuffer
because it is not an overridden method otherwise.
* platform/text/LineEnding.cpp:
* xml/parser/XMLDocumentParserLibxml2.cpp:

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

4 years agoREGRESSION (r197531): JavaScriptCore ASan build fails due to weak external symbol
ddkilzer@apple.com [Fri, 4 Mar 2016 22:18:10 +0000 (22:18 +0000)]
REGRESSION (r197531): JavaScriptCore ASan build fails due to weak external symbol
<http://webkit.org/b/155033>
<rdar://problem/24979661>

Reviewed by Alexey Proskuryakov.

* runtime/JSObject.cpp:
(JSC::JSObject::ordinaryToPrimitive): Don't mark this method
inline since it's also used in DatePrototype.cpp, and is
declared as a public class method.
* runtime/JSObject.h:
(JSC::JSObject::ordinaryToPrimitive): Don't export this method
since it is not used outside of JavaScriptCore.

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

4 years agoTemporarily use bundle identifier as part of user directory suffix
dbates@webkit.org [Fri, 4 Mar 2016 22:07:39 +0000 (22:07 +0000)]
Temporarily use bundle identifier as part of user directory suffix
https://bugs.webkit.org/show_bug.cgi?id=155042
<rdar://problem/24983174>

Reviewed by Brent Fulgham and Brady Eidson.

* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::initializeSandbox):

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

4 years agoMax out timer throttling immediately for pre-render pages
barraclough@apple.com [Fri, 4 Mar 2016 21:56:46 +0000 (21:56 +0000)]
Max out timer throttling immediately for pre-render pages
https://bugs.webkit.org/show_bug.cgi?id=155038

Reviewed by Chris Dumez.

If a hidden page has never been visible, no need to gently ramp into throttling - treat it
the same as a page that has been viewed, but has been in the background for a long time.

Why? The throttling mechanism scales with the amount of background work by shifting the
limit - once all background pages have maxed out the limit, they should no longer be burden
of the system. However the mechanism doesn't currently do anything to accelerate towards
the limit based on the number of pages in the ramp up phase, and ramp up duration is
proportional to limit (so ramping up to a high limit takes a long time). So if you quickly
create a large number of hidden pages the system may be under excessive load for a while,
as we slowly ramp up to a limit that will adequately constrain resource consumption.
In cases where a large number of hidden pages are rapidly generated, many likely remain in
the pre-render state, so this mitigation should typically help.

* page/Page.cpp:
(WebCore::Page::updateDOMTimerAlignmentInterval):
    - if m_isPrerender then m_timerAlignmentInterval is set to the limit.
(WebCore::Page::setIsPrerender):
    - When this changes updateDOMTimerAlignmentInterval().

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

4 years agoRemove vcxproj build system
achristensen@apple.com [Fri, 4 Mar 2016 21:36:03 +0000 (21:36 +0000)]
Remove vcxproj build system
https://bugs.webkit.org/show_bug.cgi?id=154388

Rubber-stamped by Brent Fulgham.

* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree.sln: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj.filters: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeApple.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeCommon.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebug.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebugWinCairo.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherCommon.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherDebug.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherProduction.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherRelease.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePostBuild.cmd: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePreBuild.cmd: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeProduction.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeRelease.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeReleaseWinCairo.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommon.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommonWinCairo.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebug.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebugWinCairo.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherCommon.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherDebug.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherProduction.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherRelease.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPostBuild.cmd: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPreBuild.cmd: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffProduction.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffRelease.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffReleaseWinCairo.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj.filters: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginCommon.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginDebug.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPostBuild.cmd: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPreBuild.cmd: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginProduction.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginRelease.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowser.vcxproj: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowser.vcxproj.filters: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserCF.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserCFLite.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserCommon.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserDebug.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLib.vcxproj: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLib.vcxproj.filters: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibCommon.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibDebug.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibPostBuild.cmd: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibPreBuild.cmd: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibProduction.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibRelease.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserPostBuild.cmd: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserPreBuild.cmd: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserProduction.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserRelease.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.sln: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommon.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommonWinCairo.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebug.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebugWinCairo.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPostBuild.cmd: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPreBuild.cmd: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIProduction.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIRelease.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIReleaseWinCairo.props: Removed.
* win/AssembleBuildLogs: Removed.
* win/AssembleBuildLogs/AssembleBuildLogs.vcxproj: Removed.
* win/AssembleBuildLogs/AssembleBuildLogs.vcxproj.filters: Removed.
* win/AssembleBuildLogs/AssembleLogs.cmd: Removed.
* win/AssembleBuildLogs/README: Removed.

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

4 years agoTemporarily skip fast/table/table-overflow.html on ios-simulator
ryanhaddad@apple.com [Fri, 4 Mar 2016 21:27:44 +0000 (21:27 +0000)]
Temporarily skip fast/table/table-overflow.html on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=155036

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoSkip fast/text/all-small-caps-whitespace.html on ios-simulator
ryanhaddad@apple.com [Fri, 4 Mar 2016 21:19:19 +0000 (21:19 +0000)]
Skip fast/text/all-small-caps-whitespace.html on ios-simulator

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoSkip storage/indexeddb/modern/256-open-databases.html on mac
ryanhaddad@apple.com [Fri, 4 Mar 2016 21:05:06 +0000 (21:05 +0000)]
Skip storage/indexeddb/modern/256-open-databases.html on mac
https://bugs.webkit.org/show_bug.cgi?id=155028

Unreviewed test gardening.

* platform/wk2/TestExpectations:

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

4 years agoRelease build fix after r197572.
achristensen@apple.com [Fri, 4 Mar 2016 21:00:02 +0000 (21:00 +0000)]
Release build fix after r197572.
https://bugs.webkit.org/show_bug.cgi?id=154993

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):

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

4 years agoUnify determination of page timer alignment
barraclough@apple.com [Fri, 4 Mar 2016 20:58:50 +0000 (20:58 +0000)]
Unify determination of page timer alignment
https://bugs.webkit.org/show_bug.cgi?id=155031

Reviewed by Chris Dumez.

Currently this is scattered throughout Page - sites that call setDOMTimerAlignmentInterval have
to determine the correct alignment interval. Instead, replace setDOMTimerAlignmentInterval with
updateDOMTimerAlignmentInterval, and unify the policy decision here.

* page/Page.cpp:
(WebCore::Page::setTimerThrottlingState):
    - setDOMTimerAlignmentInterval -> updateDOMTimerAlignmentInterval
      Also, to simplify always record the timestamp when the state changes.
(WebCore::Page::setTimerAlignmentIntervalIncreaseLimit):
    - setDOMTimerAlignmentInterval -> updateDOMTimerAlignmentInterval
(WebCore::Page::updateDOMTimerAlignmentInterval):
    - Was setDOMTimerAlignmentInterval, now determines the new alignment value.
(WebCore::Page::timerAlignmentIntervalIncreaseTimerFired):
    - setDOMTimerAlignmentInterval -> updateDOMTimerAlignmentInterval
(WebCore::Page::setDOMTimerAlignmentInterval): Deleted.
    - Removed, became updateDOMTimerAlignmentInterval.
* page/Page.h:
    - setDOMTimerAlignmentInterval -> updateDOMTimerAlignmentInterval
      m_timerThrottlingEnabledTime -> m_timerThrottlingStateLastChangedTime

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

4 years agoFix crash seen in iOS simulator tests
simon.fraser@apple.com [Fri, 4 Mar 2016 20:19:45 +0000 (20:19 +0000)]
Fix crash seen in iOS simulator tests
https://bugs.webkit.org/show_bug.cgi?id=155030

Reviewed by Tim Horton.

owningGraphicsLayer() can be null when the tileSizeChangeTimer fires, so null check
it and return, as we do for the tileRevalidationTimer.

* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::tileSizeChangeTimerFired):

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

4 years agoRemove vcxproj build system
achristensen@apple.com [Fri, 4 Mar 2016 19:59:59 +0000 (19:59 +0000)]
Remove vcxproj build system
https://bugs.webkit.org/show_bug.cgi?id=154388

Rubber-stamped by Brent Fulgham.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCore.sln: Removed.
* JavaScriptCore.vcxproj/JavaScriptCore.submit.sln: Removed.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Removed.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreCF.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreCFLite.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreDLL.cpp: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreDebug.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreDebugCFLite.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGeneratedCommon.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGeneratedDebug.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGeneratedProduction.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCorePostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreProduction.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreRelease.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreReleaseCFLite.props: Removed.
* JavaScriptCore.vcxproj/build-generated-files.pl: Removed.
* JavaScriptCore.vcxproj/copy-files.cmd: Removed.

Source/WebCore:

* WebCore.vcxproj/WebCore.submit.sln: Removed.
* WebCore.vcxproj/WebCore.vcxproj: Removed.
* WebCore.vcxproj/WebCore.vcxproj.filters: Removed.
* WebCore.vcxproj/WebCoreCFNetwork.props: Removed.
* WebCore.vcxproj/WebCoreCG.props: Removed.
* WebCore.vcxproj/WebCoreCURL.props: Removed.
* WebCore.vcxproj/WebCoreCairo.props: Removed.
* WebCore.vcxproj/WebCoreCommon.props: Removed.
* WebCore.vcxproj/WebCoreDebug.props: Removed.
* WebCore.vcxproj/WebCoreDebugWinCairo.props: Removed.
* WebCore.vcxproj/WebCoreGenerated.make: Removed.
* WebCore.vcxproj/WebCoreGenerated.vcxproj: Removed.
* WebCore.vcxproj/WebCoreGenerated.vcxproj.filters: Removed.
* WebCore.vcxproj/WebCoreGeneratedCommon.props: Removed.
* WebCore.vcxproj/WebCoreGeneratedDebug.props: Removed.
* WebCore.vcxproj/WebCoreGeneratedDebugWinCairo.props: Removed.
* WebCore.vcxproj/WebCoreGeneratedProduction.props: Removed.
* WebCore.vcxproj/WebCoreGeneratedRelease.props: Removed.
* WebCore.vcxproj/WebCoreGeneratedReleaseWinCairo.props: Removed.
* WebCore.vcxproj/WebCoreGeneratedWinCairo.make: Removed.
* WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props: Removed.
* WebCore.vcxproj/WebCoreIncludeCommon.props: Removed.
* WebCore.vcxproj/WebCoreMediaQT.props: Removed.
* WebCore.vcxproj/WebCorePostBuild.cmd: Removed.
* WebCore.vcxproj/WebCorePreBuild.cmd: Removed.
* WebCore.vcxproj/WebCoreProduction.props: Removed.
* WebCore.vcxproj/WebCoreQuartzCore.props: Removed.
* WebCore.vcxproj/WebCoreRelease.props: Removed.
* WebCore.vcxproj/WebCoreReleaseWinCairo.props: Removed.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj: Removed.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Removed.
* WebCore.vcxproj/WebCoreTestSupportCommon.props: Removed.
* WebCore.vcxproj/WebCoreTestSupportDebug.props: Removed.
* WebCore.vcxproj/WebCoreTestSupportDebugWinCairo.props: Removed.
* WebCore.vcxproj/WebCoreTestSupportProduction.props: Removed.
* WebCore.vcxproj/WebCoreTestSupportRelease.props: Removed.
* WebCore.vcxproj/WebCoreTestSupportReleaseWinCairo.props: Removed.
* WebCore.vcxproj/build-generated-files.pl: Removed.
* WebCore.vcxproj/copyForwardingHeaders.cmd: Removed.
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd: Removed.
* WebCore.vcxproj/migrate-scripts.pl: Removed.

Source/WebKit:

* WebKit.vcxproj/Interfaces/FixMIDLHeaders.pl: Removed.
* WebKit.vcxproj/Interfaces/Interfaces.vcxproj: Removed.
* WebKit.vcxproj/Interfaces/Interfaces.vcxproj.filters: Removed.
* WebKit.vcxproj/Interfaces/InterfacesCommon.props: Removed.
* WebKit.vcxproj/Interfaces/InterfacesDebug.props: Removed.
* WebKit.vcxproj/Interfaces/InterfacesDebugWinCairo.props: Removed.
* WebKit.vcxproj/Interfaces/InterfacesPostBuild.cmd: Removed.
* WebKit.vcxproj/Interfaces/InterfacesPreBuild.cmd: Removed.
* WebKit.vcxproj/Interfaces/InterfacesProduction.props: Removed.
* WebKit.vcxproj/Interfaces/InterfacesRelease.props: Removed.
* WebKit.vcxproj/Interfaces/InterfacesReleaseWinCairo.props: Removed.
* WebKit.vcxproj/WebKit.sln: Removed.
* WebKit.vcxproj/WebKit.submit.sln: Removed.
* WebKit.vcxproj/WebKit/WebKit.vcxproj: Removed.
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters: Removed.
* WebKit.vcxproj/WebKit/WebKitANGLE.props: Removed.
* WebKit.vcxproj/WebKit/WebKitApple.props: Removed.
* WebKit.vcxproj/WebKit/WebKitCFLite.props: Removed.
* WebKit.vcxproj/WebKit/WebKitCommon.props: Removed.
* WebKit.vcxproj/WebKit/WebKitDebug.props: Removed.
* WebKit.vcxproj/WebKit/WebKitDebugWinCairo.props: Removed.
* WebKit.vcxproj/WebKit/WebKitDirectX.props: Removed.
* WebKit.vcxproj/WebKit/WebKitPostBuild.cmd: Removed.
* WebKit.vcxproj/WebKit/WebKitPreBuild.cmd: Removed.
* WebKit.vcxproj/WebKit/WebKitPreLink.cmd: Removed.
* WebKit.vcxproj/WebKit/WebKitProduction.props: Removed.
* WebKit.vcxproj/WebKit/WebKitRelease.props: Removed.
* WebKit.vcxproj/WebKit/WebKitReleaseWinCairo.props: Removed.
* WebKit.vcxproj/WebKit/WebKitVersion.cmd: Removed.

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

4 years agoRemove vcxproj build system
achristensen@apple.com [Fri, 4 Mar 2016 19:48:51 +0000 (19:48 +0000)]
Remove vcxproj build system
https://bugs.webkit.org/show_bug.cgi?id=154388

Rubber-stamped by Brent Fulgham.

* WTF.vcxproj/WTF.submit.sln: Removed.
* WTF.vcxproj/WTF.vcxproj: Removed.
* WTF.vcxproj/WTF.vcxproj.filters: Removed.
* WTF.vcxproj/WTFCFLite.props: Removed.
* WTF.vcxproj/WTFCommon.props: Removed.
* WTF.vcxproj/WTFCoreFoundation.props: Removed.
* WTF.vcxproj/WTFDebug.props: Removed.
* WTF.vcxproj/WTFDebugWinCairo.props: Removed.
* WTF.vcxproj/WTFGenerated.make: Removed.
* WTF.vcxproj/WTFGenerated.vcxproj: Removed.
* WTF.vcxproj/WTFGenerated.vcxproj.filters: Removed.
* WTF.vcxproj/WTFGeneratedCommon.props: Removed.
* WTF.vcxproj/WTFGeneratedDebug.props: Removed.
* WTF.vcxproj/WTFGeneratedProduction.props: Removed.
* WTF.vcxproj/WTFGeneratedRelease.props: Removed.
* WTF.vcxproj/WTFPostBuild.cmd: Removed.
* WTF.vcxproj/WTFPreBuild.cmd: Removed.
* WTF.vcxproj/WTFProduction.props: Removed.
* WTF.vcxproj/WTFRelease.props: Removed.
* WTF.vcxproj/WTFReleaseWinCairo.props: Removed.
* WTF.vcxproj/build-generated-files.pl: Removed.
* WTF.vcxproj/copy-files.cmd: Removed.
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py: Removed.

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

4 years agoRemove use of deprecated sqlite3_expired
beidson@apple.com [Fri, 4 Mar 2016 19:42:54 +0000 (19:42 +0000)]
Remove use of deprecated sqlite3_expired
https://bugs.webkit.org/show_bug.cgi?id=155025

Reviewed by Tim Horton.

Since we exclusively use sqlite3_prepare_v2 and don't use sqlite3_prepare,
manually checking for expired statements is not necessary.

* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::isExpired): Null check the statement, but don't bother
  with sqlite3_expired.

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

4 years agoLocation.reload should not be writable
cdumez@apple.com [Fri, 4 Mar 2016 19:30:36 +0000 (19:30 +0000)]
Location.reload should not be writable
https://bugs.webkit.org/show_bug.cgi?id=154989

Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

After r196770, operations marked as [Unforgeable] in the IDL (such as
Location.reload) are correctly reported as not writable by
Object.getOwnPropertyDescriptor(). Trying to set such property in JS
is correctly ignored (or throws in strict mode) if the object has
previously been reified. However, due to a bug in putEntry(), it was
still possible to override the property if the object was not reified
yet. This patch fixes the issue by checking in putEntry() that entries
that are functions are not ReadOnly before calling putDirect().

* runtime/Lookup.h:
(JSC::putEntry):

LayoutTests:

Add a layout test to verify that operations marked as [Unforgeable] in
IDL are indeed not writable.

* fast/html/unforgeable-operations-readonly-expected.txt: Added.
* fast/html/unforgeable-operations-readonly.html: Added.

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

4 years agoMove CryptoDigest to WebCore/platform
dbates@webkit.org [Fri, 4 Mar 2016 19:26:23 +0000 (19:26 +0000)]
Move CryptoDigest to WebCore/platform
https://bugs.webkit.org/show_bug.cgi?id=155008
<rdar://problem/24969787>

Reviewed by Brent Fulgham.

CryptoDigest provides a platform-independent interface for interacting with platform-
specific cryptographic hashing services. We currently make use of this code as part
of the implementation of Web Crypto. This code will also be beneficial as part of
implementing support for Content Security Policy inline script and inline stylesheet
hashes. We should move CryptoDigest to WebCore/platform to convey that it a general
purpose platform abstraction.

* CMakeLists.txt: Add include directory WebCore/platform/crypto.
* PlatformEfl.cmake: Add file platform/crypto/gnutls/CryptoDigestGnuTLS.cpp and
remove file crypto/gnutls/CryptoDigestGnuTLS.cpp.
* PlatformGTK.cmake: Ditto.
* PlatformMac.cmake: Add file platform/crypto/mac/CryptoDigestMac.cpp and
remove file crypto/mac/CryptoDigestMac.cpp.
* WebCore.xcodeproj/project.pbxproj:
* crypto/algorithms/CryptoAlgorithmSHA1.cpp:
(WebCore::CryptoAlgorithmSHA1::digest): Substitute "CryptoDigest::Algorithm" for "CryptoAlgorithmIdentifier".
* crypto/algorithms/CryptoAlgorithmSHA224.cpp:
(WebCore::CryptoAlgorithmSHA224::digest): Ditto.
* crypto/algorithms/CryptoAlgorithmSHA256.cpp:
(WebCore::CryptoAlgorithmSHA256::digest): Ditto.
* crypto/algorithms/CryptoAlgorithmSHA384.cpp:
(WebCore::CryptoAlgorithmSHA384::digest): Ditto.
* crypto/algorithms/CryptoAlgorithmSHA512.cpp:
(WebCore::CryptoAlgorithmSHA512::digest): Ditto.
* crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
(WebCore::getCryptoDigestAlgorithm): Converts a CryptoAlgorithmIdentifier enumerator to a
CryptoDigest::Algorithm enumerator, if applicable.
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign): Write in terms of WebCore::getCryptoDigestAlgorithm().
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify): Ditto.
* platform/crypto/CryptoDigest.h: Renamed from Source/WebCore/crypto/CryptoDigest.h. Also added enum CryptoDigest::Algorithm
and changed constructor to take this enum.
* platform/crypto/gnutls/CryptoDigestGnuTLS.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoDigestGnuTLS.cpp.
(WebCore::CryptoDigest::CryptoDigest): Substitute "CryptoDigest::Algorithm" for "CryptoAlgorithmIdentifier".
(WebCore::CryptoDigest::~CryptoDigest): Ditto.
(WebCore::CryptoDigest::create): Ditto.
(WebCore::CryptoDigest::addBytes): Ditto.
(WebCore::CryptoDigest::computeHash): Ditto.
* platform/crypto/mac/CryptoDigestMac.cpp: Renamed from Source/WebCore/crypto/mac/CryptoDigestMac.cpp.
(WebCore::toSHA1Context): Ditto.
(WebCore::toSHA224Context): Ditto.
(WebCore::toSHA256Context): Ditto.
(WebCore::toSHA384Context): Ditto.
(WebCore::toSHA512Context): Ditto.
(WebCore::CryptoDigest::CryptoDigest): Ditto.
(WebCore::CryptoDigest::~CryptoDigest): Ditto.
(WebCore::CryptoDigest::create): Ditto.
(WebCore::CryptoDigest::addBytes): Ditto.
(WebCore::CryptoDigest::computeHash): Ditto.

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

4 years agoRebaseline inspector/model/remote-object.html for mac after r197539
ryanhaddad@apple.com [Fri, 4 Mar 2016 19:13:25 +0000 (19:13 +0000)]
Rebaseline inspector/model/remote-object.html for mac after r197539

Unreviewed test gardening.

* platform/mac/inspector/model/remote-object-expected.txt:

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

4 years agoWhitespace causes font-variant: all-small-caps to synthesize
mmaxfield@apple.com [Fri, 4 Mar 2016 19:09:37 +0000 (19:09 +0000)]
Whitespace causes font-variant: all-small-caps to synthesize
https://bugs.webkit.org/show_bug.cgi?id=155004
<rdar://problem/24630796>

Reviewed by Darin Adler.

Source/WebCore:

Many fonts (such as Avenir Next) don't report to support whitespace characters under
smcp or c2sc. Previously, we were using this as a signal to synthesize small caps
instead of true small caps. However, a better solution is for whitespace to never
cause synthesis with all-small-caps.

Test: fast/text/all-small-caps-whitespace.html

* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::shouldSynthesize):
(WebCore::ComplexTextController::collectComplexTextRuns):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(allowedFontFamilySet):
* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
(WTR::allowedFontFamilySet):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::allowedFontFamilySet):

LayoutTests:

* fast/text/all-small-caps-whitespace-expected.html: Added.
* fast/text/all-small-caps-whitespace.html: Added.
* platform/mac/TestExpectations: Skip on platforms which don't support proper coverage
queries.

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

4 years agoUse NSURLSession for loading in WebKit2
achristensen@apple.com [Fri, 4 Mar 2016 19:05:00 +0000 (19:05 +0000)]
Use NSURLSession for loading in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=154993

Reviewed by Sam Weinig.

Source/WebKit2:

* config.h:

Source/WTF:

* wtf/Platform.h:

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

4 years agoREGRESSION (r197541): many tiled drawing tests failing after new "large tile size...
simon.fraser@apple.com [Fri, 4 Mar 2016 18:48:57 +0000 (18:48 +0000)]
REGRESSION (r197541): many tiled drawing tests failing after new "large tile size" logic was added
https://bugs.webkit.org/show_bug.cgi?id=155020

Rebaseline these tests.

* platform/mac-wk2/TestExpectations:
* tiled-drawing/background-transparency-toggle-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow-expected.txt:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders-expected.txt:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt:
* tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt:
* tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
* tiled-drawing/tile-coverage-speculative-expected.txt:
* tiled-drawing/tile-size-unscrollable-expected.txt:
* tiled-drawing/tile-size-vertically-scrollable-expected.txt:
* tiled-drawing/visible-rect-content-inset-expected.txt:

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

4 years ago[iOS] Crash during font loading when injected bundle cancels load
mmaxfield@apple.com [Fri, 4 Mar 2016 18:30:52 +0000 (18:30 +0000)]
[iOS] Crash during font loading when injected bundle cancels load
https://bugs.webkit.org/show_bug.cgi?id=155001

Reviewed by Tim Horton.

Source/WebCore:

If a injected bundle cancels the load, the fontLoaded() callback will be
called twice. We can simply detect this condition.

Test: CancelLoading.CancelFontSubresource API test

* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::fontLoaded):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/Ahem.ttf: Added.
* TestWebKitAPI/Tests/WebKit2/webfont.html: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/CancelFontSubresource.mm: Added.
(-[Myles webView:didFinishNavigation:]):
(TEST):
* TestWebKitAPI/Tests/WebKit2Cocoa/CancelFontSubresourcePlugIn.mm: Added.
(-[CancelFontSubresourcePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[CancelFontSubresourcePlugIn webProcessPlugInBrowserContextController:frame:willSendRequestForResource:request:redirectResponse:]):

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

4 years agoThe visibility of the airplay menu also depends on whether there's a custom menu...
adachan@apple.com [Fri, 4 Mar 2016 18:27:04 +0000 (18:27 +0000)]
The visibility of the airplay menu also depends on whether there's a custom menu item.
https://bugs.webkit.org/show_bug.cgi?id=154987

Reviewed by Darin Adler.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):

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

4 years agoUse NetworkSession for pings
achristensen@apple.com [Fri, 4 Mar 2016 18:01:37 +0000 (18:01 +0000)]
Use NetworkSession for pings
https://bugs.webkit.org/show_bug.cgi?id=154984

Reviewed by Antti Koivisto.

Before this patch, we were using NSURLConnection for pings when the rest of the loading was being
done with NSURLSession.  To fix this, I implemented PingLoad, which is the NetworkSession equivalent
of PingHandle.

This fixes http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https.html

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::loadPing):
(WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
* NetworkProcess/PingLoad.h: Added.
(WebKit::PingLoad::PingLoad):
(WebKit::PingLoad::willPerformHTTPRedirection):
(WebKit::PingLoad::didReceiveChallenge):
(WebKit::PingLoad::didReceiveResponseNetworkSession):
(WebKit::PingLoad::didReceiveData):
(WebKit::PingLoad::didCompleteWithError):
(WebKit::PingLoad::didBecomeDownload):
(WebKit::PingLoad::didSendData):
(WebKit::PingLoad::wasBlocked):
(WebKit::PingLoad::cannotShowURL):
(WebKit::PingLoad::timeoutTimerFired):
(WebKit::PingLoad::~PingLoad):
* WebKit2.xcodeproj/project.pbxproj:

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

4 years ago[check-webkit-style] Added checks for redundant virtual specifiers.
commit-queue@webkit.org [Fri, 4 Mar 2016 17:58:51 +0000 (17:58 +0000)]
[check-webkit-style] Added checks for redundant virtual specifiers.
https://bugs.webkit.org/show_bug.cgi?id=155017

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-03-04
Reviewed by Darin Adler.

Added 3 new checks related to virtual, override, and final specifiers:

1. When "override" is present, "virtual" is redundant.
2. When "final" is present, "virtual" is redundant.
3. When "final" is present, "override" is redundant.

* Scripts/webkitpy/style/checkers/cpp.py:
(_FunctionState.begin):
(_FunctionState.is_virtual):
(_check_parameter_name_against_text):
(_error_redundant_specifier):
(check_function_definition):
(CppChecker):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(FunctionDetectionTest.perform_function_detection):
(FunctionDetectionTest.test_basic_function_detection):
(FunctionDetectionTest.test_function_declaration_detection):
(FunctionDetectionTest.test_pure_function_detection):
(FunctionDetectionTest.test_override_and_final_function_detection):
(FunctionDetectionTest.test_non_functions):
(FunctionDetectionTest.test_parameter_list):

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

4 years agoFollowup to:
darin@apple.com [Fri, 4 Mar 2016 17:20:46 +0000 (17:20 +0000)]
Followup to:
Remove "virtual" from all lines that have both "virtual" and "override".
https://bugs.webkit.org/show_bug.cgi?id=155005

Reviewed by Geoffrey Garen.

* Scripts/do-webcore-rename: Added more regular expressions to make sure we always
use either override or final, not both, and to remove virtual from all lines that
have both virtual and final.

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

4 years agoREGRESSION (r197541): many tiled drawing tests failing after new "large tile size...
darin@apple.com [Fri, 4 Mar 2016 17:02:25 +0000 (17:02 +0000)]
REGRESSION (r197541): many tiled drawing tests failing after new "large tile size" logic was added
https://bugs.webkit.org/show_bug.cgi?id=155020

* platform/mac-wk2/TestExpectations: Added failure expectations for tiled drawing tests.
* platform/wk2/TestExpectations: Moved some expectations to a more appropriate section in the file.

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

4 years agoInform WebKit and WebCore if a page is controlled by automation.
timothy@apple.com [Fri, 4 Mar 2016 16:55:55 +0000 (16:55 +0000)]
Inform WebKit and WebCore if a page is controlled by automation.

https://bugs.webkit.org/show_bug.cgi?id=154991
rdar://problem/24965784

Reviewed by Joseph Pecoraro.

Source/WebCore:

* page/Page.h:
(WebCore::Page::isControlledByAutomation): Added.
(WebCore::Page::setControlledByAutomation): Added.

Source/WebKit2:

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetIsControlledByAutomation):
(WKPageSetControlledByAutomation):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setControlledByAutomation):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isControlledByAutomation):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageIsControlledByAutomation):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_shouldDispatchFakeMouseMoveEvents):
(WebKit::WebPage::isControlledByAutomation):
(WebKit::WebPage::setControlledByAutomation):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

4 years agoRemove "virtual" from all lines that have both "virtual" and "override".
darin@apple.com [Fri, 4 Mar 2016 16:47:55 +0000 (16:47 +0000)]
Remove "virtual" from all lines that have both "virtual" and "override".
https://bugs.webkit.org/show_bug.cgi?id=155005

Reviewed by Geoffrey Garen.

* Scripts/do-webcore-rename: Added a regular expression to this script to do the job.

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

4 years ago[ES6] Arrow function syntax. Lexical bind super inside of the arrow function in gener...
gskachkov@gmail.com [Fri, 4 Mar 2016 09:52:39 +0000 (09:52 +0000)]
[ES6] Arrow function syntax. Lexical bind super inside of the arrow function in generator.
https://bugs.webkit.org/show_bug.cgi?id=152575

Reviewed by Yusuke Suzuki.

Added support of the 'SuperProperty' in arrow function within of the generator
method of class. Before patch parser  did not recognize that current arrow function
is declated inside of the generator and raise SyntaxError.

Source/JavaScriptCore:

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo):
* parser/Parser.h:
(JSC::Scope::Scope):
(JSC::Scope::isGeneratorBoundary):
(JSC::Scope::setIsFunction):
(JSC::Scope::setIsGenerator):
(JSC::Parser::closestParentOrdinaryFunctionNonLexicalScope):
* tests/stress/arrowfunction-lexical-bind-superproperty.js:

LayoutTests:

* js/arrowfunction-superproperty-expected.txt:
* js/arrowfunction-syntax-errors-expected.txt:
* js/script-tests/arrowfunction-superproperty.js:
* js/script-tests/arrowfunction-syntax-errors.js:

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

4 years agoComposedTreeIterator may traverse slotted nodes multiple times
antti@apple.com [Fri, 4 Mar 2016 09:29:12 +0000 (09:29 +0000)]
ComposedTreeIterator may traverse slotted nodes multiple times
https://bugs.webkit.org/show_bug.cgi?id=154983

Reviewed by Ryosuke Niwa.

Source/WebCore:

Traversal of slotted nodes can escape to real siblings. Those siblings are then traversed again as slotted nodes.

Test: fast/shadow-dom/composed-tree-slots.html

* dom/ComposedTreeIterator.cpp:
(WebCore::ComposedTreeIterator::initializeContextStack):
(WebCore::ComposedTreeIterator::traverseNextInShadowTree):
(WebCore::ComposedTreeIterator::traverseNextLeavingContext):
(WebCore::ComposedTreeIterator::advanceInSlot):
* dom/ComposedTreeIterator.h:
(WebCore::ComposedTreeIterator::Context::Context):

    Include end iterator to the context.
    For slotted nodes set it up to point to the next sibling of the node.

(WebCore::ComposedTreeIterator::context):
(WebCore::ComposedTreeIterator::traverseNextSkippingChildren):

LayoutTests:

* fast/shadow-dom/composed-tree-slots-expected.txt: Added.
* fast/shadow-dom/composed-tree-slots.html: Added.

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

4 years agoDrop DocumentSharedObjectPool immediately when going into PageCache.
akling@apple.com [Fri, 4 Mar 2016 09:03:00 +0000 (09:03 +0000)]
Drop DocumentSharedObjectPool immediately when going into PageCache.
<https://webkit.org/b/154986>

Reviewed by Antti Koivisto.

The DocumentSharedObjectPool is a weirdly efficient little optimization
that deduplicates ElementData during the first 10s of a Document's lifetime.
While it's up, every ElementData created will persist so it can be used for
deduplication.

If a Document goes into the PageCache while its shared object pool is still
alive, we can just kill it right away. This will sometimes allow us to free
a bunch of ElementData sooner.

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setInPageCache):
(WebCore::Document::clearSharedObjectPool):
(WebCore::Document::sharedObjectPoolClearTimerFired): Deleted.
* dom/Document.h:

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

4 years agoRemove PassRefPtr from ThreadableLoader and relatives
youenn.fablet@crf.canon.fr [Fri, 4 Mar 2016 08:27:36 +0000 (08:27 +0000)]
Remove PassRefPtr from ThreadableLoader and relatives
https://bugs.webkit.org/show_bug.cgi?id=154966

Reviewed by Darin Adler.

Covered by existing tests.

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::create):
* loader/DocumentThreadableLoader.h:
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoader::create):
* loader/ThreadableLoader.h:
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
* loader/WorkerThreadableLoader.h:

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

4 years agoLet XCode have its own way and also sort the file.
rniwa@webkit.org [Fri, 4 Mar 2016 07:41:45 +0000 (07:41 +0000)]
Let XCode have its own way and also sort the file.

* WebCore.xcodeproj/project.pbxproj:

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

4 years agoDFG/FTL should inline accesses to RegExpObject::m_lastIndex
fpizlo@apple.com [Fri, 4 Mar 2016 06:36:24 +0000 (06:36 +0000)]
DFG/FTL should inline accesses to RegExpObject::m_lastIndex
https://bugs.webkit.org/show_bug.cgi?id=155003

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

The Octane/regexp benchmark sets RegExps' lastIndex a lot. I could imagine this being
something that people want to do. Right now, I'm not convinced that making the RegExp object
be more plain-JS would be a good idea considering that pretty much all uses of it will
require some special compiler magic. Also, it's good that this patch teaches the compiler
how to reason about lastIndex since some of my other plans for regexp involve having the
compiler treat more regexp stuff as intrinsic.

This is a smaller Octane/regexp speed-up than I hoped - maybe around 1%. It's an enormous
speed-up on the microbenchmarks attached to this patch.

* dfg/DFGAbstractHeap.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGHeapLocation.h:
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compilePutAccessorByVal):
(JSC::DFG::SpeculativeJIT::compileGetRegExpObjectLastIndex):
(JSC::DFG::SpeculativeJIT::compileSetRegExpObjectLastIndex):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStoreBarrierInsertionPhase.cpp:
* ftl/FTLAbstractHeapRepository.cpp:
* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileStringReplace):
(JSC::FTL::DFG::LowerDFGToB3::compileGetRegExpObjectLastIndex):
(JSC::FTL::DFG::LowerDFGToB3::compileSetRegExpObjectLastIndex):
(JSC::FTL::DFG::LowerDFGToB3::didOverflowStack):
(JSC::FTL::DFG::LowerDFGToB3::lowObject):
(JSC::FTL::DFG::LowerDFGToB3::lowRegExpObject):
(JSC::FTL::DFG::LowerDFGToB3::lowString):
* runtime/RegExpObject.h:
(JSC::RegExpObject::createStructure):
(JSC::RegExpObject::offsetOfLastIndex):

LayoutTests:

* js/regress/regexp-last-index-expected.txt: Added.
* js/regress/regexp-last-index.html: Added.
* js/regress/regexp-set-last-index-expected.txt: Added.
* js/regress/regexp-set-last-index.html: Added.
* js/regress/script-tests/regexp-last-index.js: Added.
* js/regress/script-tests/regexp-set-last-index.js: Added.

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

4 years agoRegression(r196770): Unable to use HipChat Mac app
cdumez@apple.com [Fri, 4 Mar 2016 06:00:02 +0000 (06:00 +0000)]
Regression(r196770): Unable to use HipChat Mac app
https://bugs.webkit.org/show_bug.cgi?id=154999
<rdar://problem/24931959>

Reviewed by Darin Adler.

Source/JavaScriptCore:

Add a setter to PutPropertySlot to override the 'isStrictMode' flag.

* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setStrictMode):

Source/WebCore:

r196770 made [Unforgeable] operations such as Location.reload()
non-writable as per the Web IDL specification. As a result,
trying to set such properties will be ignored in non-strict
mode and will throw an exception is strict mode. This also matches
Firefox and Chrome.

However, this broke the HipChat Mac App (the Web App seems fine)
because it sets Location.reload() and is using strict mode, therefore
causing an exception to be thrown.

This patch adds a quirk to JSLocation::putDelegate() which disable
strict mode when we detect that the application is HipChat. As a
result, we no longer throw when HipChat tries to set Location.reload
and the application is able to connect again.

* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::putDelegate):
Add a quirk which disables strict mode if the application is HipChat.

* platform/RuntimeApplicationChecks.cpp:
(WebCore::mainBundleIdentifier):
Extract this from mainBundleIsEqualTo() so it can be shared with
applicationBundleIdentifier().

(WebCore::applicationBundleIdentifier):
Returns the application bundle identifier, which is a static variable.
For the WebContent / Networking processes, the application bundle
identifier gets set to the UIProcess bundle identifier upon
initialization. If unset, we fall back to using mainBundleIdentifier()
which will do the right thing for the WK2 UIProcess and WK1.

(WebCore::mainBundleIsEqualTo):
Extract part of the code to mainBundleIdentifier() to better share
code.

(WebCore::applicationIsHipChat):
Add utility function that checks if the application is HipChat. This
will do the right thing whether it is called from the UIProcess, the
WebProcess or the UIProcess.

(WebCore::setApplicationBundleIdentifier):
Add utility function to set the application bundle identifier. It gets
called with the UIProcess bundle identifier by the NetworkProcess and
the WebProcess upon initialization.

* platform/RuntimeApplicationChecks.h:

Source/WebKit2:

Have the NetworkProcess and the WebProcess pass the UIProcess bundle
identifier to WebCore so that we can do app detection of applications
using a WK2 WebView (such as HipChat).

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

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

4 years agoUnreviewed, remove test with flaky timeout that doesn't test anything anymore. This...
fpizlo@apple.com [Fri, 4 Mar 2016 05:49:23 +0000 (05:49 +0000)]
Unreviewed, remove test with flaky timeout that doesn't test anything anymore. This test
was relevant back when arguments got torn off; something that we don't do anymore. It
uses a loop that waits for the top-tier compiler to compile it. We don't write tests
like that anymore.

* js/dfg-osr-exit-between-create-and-tearoff-arguments-expected.txt: Removed.
* js/dfg-osr-exit-between-create-and-tearoff-arguments.html: Removed.
* js/script-tests/dfg-osr-exit-between-create-and-tearoff-arguments.js: Removed.

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

4 years ago[JSC] Add support for MADD, MSUB and MNEG to Air
commit-queue@webkit.org [Fri, 4 Mar 2016 04:40:17 +0000 (04:40 +0000)]
[JSC] Add support for MADD, MSUB and MNEG to Air
https://bugs.webkit.org/show_bug.cgi?id=154997

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-03-03
Reviewed by Filip Pizlo.

ARM64 can do an Add/Sub in the Multiply units.
LLVM was doing so but we lost that when switching to B3.

This patch adds those instructions in Air.

There are more ALUs than multiply units, thus we are more
likely to successfully schedule a Multiply+Add than 2 Multiply.
I am conservative and only emit a multiply-add if the value
can be interned. As far as I can tell from what is generated
by LLVM, that backend had the same rule.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::multiplyAdd32):
(JSC::MacroAssemblerARM64::multiplySub32):
(JSC::MacroAssemblerARM64::multiplyNeg32):
(JSC::MacroAssemblerARM64::multiplyAdd64):
(JSC::MacroAssemblerARM64::multiplySub64):
(JSC::MacroAssemblerARM64::multiplyNeg64):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::populateWithInterestingValues):
(JSC::B3::floatingPointOperands):
(JSC::B3::int64Operands):
(JSC::B3::int32Operands):
(JSC::B3::testMulAddArgsLeft):
(JSC::B3::testMulAddArgsRight):
(JSC::B3::testMulAddArgsLeft32):
(JSC::B3::testMulAddArgsRight32):
(JSC::B3::testMulSubArgsLeft):
(JSC::B3::testMulSubArgsRight):
(JSC::B3::testMulSubArgsLeft32):
(JSC::B3::testMulSubArgsRight32):
(JSC::B3::testMulNegArgs):
(JSC::B3::testMulNegArgs32):
(JSC::B3::run):

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

4 years agoUnreviewed, rolling in r197174.
ggaren@apple.com [Fri, 4 Mar 2016 04:02:25 +0000 (04:02 +0000)]
Unreviewed, rolling in r197174.
https://bugs.webkit.org/show_bug.cgi?id=154762

The right calculation for alignment is actually:

    vmAlignment - getpagesize() + vmSize

instead of:

    vmAlignment - vmPageSize + vmSize

The vmPageSize might be larger than getpagesize().

Restored changeset:

"bmalloc: Added a fast XLarge allocator"
https://bugs.webkit.org/show_bug.cgi?id=154720
http://trac.webkit.org/changeset/197174

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

4 years ago[ES6] Implement Proxy.[[SetPrototypeOf]]
sbarati@apple.com [Fri, 4 Mar 2016 03:43:06 +0000 (03:43 +0000)]
[ES6] Implement Proxy.[[SetPrototypeOf]]
https://bugs.webkit.org/show_bug.cgi?id=154931

Reviewed by Ryosuke Niwa.

This patch is a straight forward implementation of Proxy.[[SetPrototypeOf]]
with respect to section 9.5.2 of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-setprototypeof-v

* runtime/JSObject.cpp:
(JSC::JSObject::putInlineSlow):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::put):
(JSC::ProxyObject::getGenericPropertyNames):
(JSC::ProxyObject::performSetPrototype):
(JSC::ProxyObject::setPrototype):
(JSC::ProxyObject::visitChildren):
* runtime/ProxyObject.h:
* tests/es6.yaml:
* tests/stress/proxy-set-prototype-of.js: Added.
(assert):
(throw.new.Error.let.handler.get setPrototypeOf):
(throw.new.Error.set let):
(throw.new.Error.set catch):
(throw.new.Error):
(assert.let.handler.setPrototypeOf):
(assert.set let):
(assert.set catch):
(let.handler.setPrototypeOf):
(set let):
(set catch):

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

4 years agoJSArrayBuffers should be collected less aggressively
keith_miller@apple.com [Fri, 4 Mar 2016 03:19:11 +0000 (03:19 +0000)]
JSArrayBuffers should be collected less aggressively
https://bugs.webkit.org/show_bug.cgi?id=154982

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

We are currently too aggressive in our collection of ArrayBuffer wrappers.
There are three cases where we need to avoid collecting ArrayBuffer wrappers.
1. If the wrapper has custom properties.
2. If the wrapper is a subclass of ArrayBuffer.
3. If the wrapper is in a WeakMap/WeakSet.

Currently, we only pass the first case in WebCore and none in the jsc CLI.
This patch removes some optimizations that cause us to collect when we
should not. Namely, always skipping the object unless it has custom
properties. Additionally, in the case of subclassing, we also need a way
for custom JSArrayBuffer objects to register themselves as the wrapper for
an ArrayBuffer class.

Finally, this patch fixes an issue where views would not mark their ArrayBuffer
as an opaque root. This patch also moves an associated ASSERT that the
ArrayBuffer held by a view is not null in JSGenericTypedArrayView::visitChildren
into JSArrayBufferView::visitChildren, where we add the opaque root.

* runtime/JSArrayBuffer.cpp:
(JSC::JSArrayBuffer::finishCreation):
(JSC::JSArrayBuffer::create):
(JSC::JSArrayBuffer::createWithoutWrapping):
* runtime/JSArrayBuffer.h:
* runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::visitChildren):
* runtime/JSArrayBufferView.h:
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::visitChildren): Deleted.
* runtime/SimpleTypedArrayController.cpp:
(JSC::SimpleTypedArrayController::toJS):
(JSC::SimpleTypedArrayController::registerWrapper):
(JSC::SimpleTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
(JSC::SimpleTypedArrayController::JSArrayBufferOwner::finalize):
* runtime/SimpleTypedArrayController.h:
* runtime/TypedArrayController.h:

Source/WebCore:

We are currently too aggressive in our collection of ArrayBuffer wrappers.
There are three cases where we need to avoid collecting ArrayBuffer wrappers.
1. If the wrapper has custom properties.
2. If the wrapper is a subclass of ArrayBuffer.
3. If the wrapper is in a WeakMap/WeakSet.

Currently, we only pass the first case in WebCore and none in the jsc CLI.
This patch removes some optimizations that cause us to collect when we
should not. Namely, always skipping the object unless it has custom
properties. Additionally, in the case of subclassing, we also need a way
for custom JSArrayBuffer objects to register themselves as the wrapper for
an ArrayBuffer class.

Finally, this patch removes an unnecessary ref() and deref() of
ArrayBuffer objects during the creation/destruction of the wrapper.
Since an ArrayBuffer object's GC lifetime will be at least as long
as the lifetime of the wrapper we are creating for it we don't need
to ref() and deref() the ArrayBuffer object. This lifetime is
guaranteed because ArrayBuffer objects are both GCed and refcounted
and any new wrapper will visit the ArrayBuffer object as long as the
wrapper is still alive.

Test: js/arraybuffer-wrappers.html

* bindings/js/JSDOMBinding.h:
(WebCore::toJS):
* bindings/js/WebCoreTypedArrayController.cpp:
(WebCore::WebCoreTypedArrayController::registerWrapper):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots): Deleted.
* bindings/js/WebCoreTypedArrayController.h:

LayoutTests:

* js/arraybuffer-wrappers-expected.txt: Added.
* js/arraybuffer-wrappers.html: Added.
* js/script-tests/arraybuffer-wrappers.js: Added.
(prototype.types.forEach):

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

4 years agoOctane/regexp's Exec function should benefit from array length accessor inlining
fpizlo@apple.com [Fri, 4 Mar 2016 02:43:53 +0000 (02:43 +0000)]
Octane/regexp's Exec function should benefit from array length accessor inlining
https://bugs.webkit.org/show_bug.cgi?id=154994

Reviewed by Benjamin Poulain.

It does:

    var thingy = blahbitty.blah;
    if (thingy)
        foo = thingy.length;

So, 'thingy' is SpecArray | SpecOther, which prevents the array length accessor inlining from
kicking in. Our strategy for this elsewhere in the DFG is to allow a one-time speculation that
we won't see SpecOther, since *usually* we see SpecOther mixed with other stuff in cases like
this where there is some null check guarding the code.

This gives another slight speed-up on Octane/regexp.

* bytecode/SpeculatedType.h:
(JSC::isCellSpeculation):
(JSC::isCellOrOtherSpeculation):
(JSC::isNotCellSpeculation):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::shouldSpeculateCell):
(JSC::DFG::Node::shouldSpeculateCellOrOther):
(JSC::DFG::Node::shouldSpeculateNotCell):

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

4 years agoUse larger tiles when possible to reduce per-tile painting overhead
simon.fraser@apple.com [Fri, 4 Mar 2016 02:26:49 +0000 (02:26 +0000)]
Use larger tiles when possible to reduce per-tile painting overhead
https://bugs.webkit.org/show_bug.cgi?id=154985
rdar://problem/23635219

Reviewed by Tim Horton.
Source/WebCore:

There's no reason to use lots of 512x512 tiles on a non-scrollable page. We can reduce
per-tile painting overhead by using one big tile. On vertically scrolling pages, we
can also use wide tiles to reduce tile-crossing when painting. Have FrameView tell
the TiledBacking about scrollability, allowing TileController to make tile size decisions.

Change the "giant tile" code path to just return whether Settings says we're in giant
tile mode, so that tile size decisions can be made in TileController.

TileController now stores a single margin size, and a per-edge margin flag rather than a size
per edge. It computes tile size based on scrollability, but adjusts tile size with some
hysteresis to avoid size thrashing for content that frequently resizes the document (e.g.
some performance tests).

TileGrid stores a copy of the tile size, so that it remains unchanged from one revalidate
to the next, and the grid can detect when the tile size changes, since it needs to throw away
all tiles in that case.

Tests: tiled-drawing/tile-size-both-scrollable.html
       tiled-drawing/tile-size-horizontally-scrollable.html
       tiled-drawing/tile-size-unscrollable.html
       tiled-drawing/tile-size-vertically-scrollable.html

* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.cpp:
(WebCore::FrameView::addedOrRemovedScrollbar):
(WebCore::FrameView::willStartLiveResize): Tell the tile backing when live resize starts and stops.
(WebCore::FrameView::willEndLiveResize):
* platform/graphics/EdgeSet.h: Added. Template class that just stores some value
per edge.
(WebCore::EdgeSet::EdgeSet):
(WebCore::EdgeSet::top):
(WebCore::EdgeSet::setTop):
(WebCore::EdgeSet::right):
(WebCore::EdgeSet::setRight):
(WebCore::EdgeSet::bottom):
(WebCore::EdgeSet::setBottom):
(WebCore::EdgeSet::left):
(WebCore::EdgeSet::setLeft):
(WebCore::EdgeSet::operator==):
(WebCore::EdgeSet::operator!=):
* platform/graphics/GraphicsLayerClient.h: Rather than have the client return the
tile size, have it return whether we're in giant tile mode.
(WebCore::GraphicsLayerClient::useGiantTiles):
(WebCore::GraphicsLayerClient::tileSize): Deleted.
* platform/graphics/TiledBacking.h:
(WebCore::defaultTileSize): Deleted.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::platformCALayerUseGiantTiles):
(WebCore::GraphicsLayerCA::platformCALayerTileSize): Deleted.
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayerClient.h:
(WebCore::PlatformCALayerClient::platformCALayerUseGiantTiles):
(WebCore::PlatformCALayerClient::platformCALayerTileSize): Deleted.
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::TileController):
(WebCore::TileController::setScrollability):
(WebCore::TileController::willStartLiveResize):
(WebCore::TileController::didEndLiveResize):
(WebCore::TileController::tileSize):
(WebCore::TileController::setHasMargins):
(WebCore::TileController::setMarginSize):
(WebCore::TileController::hasMargins):
(WebCore::TileController::hasHorizontalMargins):
(WebCore::TileController::hasVerticalMargins):
(WebCore::TileController::topMarginHeight):
(WebCore::TileController::bottomMarginHeight):
(WebCore::TileController::leftMarginWidth):
(WebCore::TileController::rightMarginWidth):
(WebCore::TileController::setTileMargins): Deleted.
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::TileGrid):
(WebCore::TileGrid::setNeedsDisplayInRect):
(WebCore::TileGrid::rectForTileIndex):
(WebCore::TileGrid::getTileIndexRangeForRect):
(WebCore::TileGrid::removeAllTiles):
(WebCore::TileGrid::revalidateTiles):
* platform/graphics/ca/TileGrid.h:
(WebCore::TileGrid::tileSize):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setTiledBackingHasMargins):
(WebCore::RenderLayerBacking::useGiantTiles):
(WebCore::RenderLayerBacking::tileSize): Deleted.
* rendering/RenderLayerBacking.h:

Source/WebKit2:

Do a bit of #include cleanup.

* Shared/mac/RemoteLayerBackingStore.mm:
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:

LayoutTests:

Rebaseline tests with new tile sizes. Add new tests that explicitly test tile size on
pages with different scrollability.

* tiled-drawing/background-transparency-toggle-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt:
* tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt:
* tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
* tiled-drawing/tile-coverage-speculative-expected.txt:
* tiled-drawing/tile-size-both-scrollable-expected.txt: Copied from LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt.
* tiled-drawing/tile-size-both-scrollable.html: Added.
* tiled-drawing/tile-size-horizontally-scrollable-expected.txt: Copied from LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt.
* tiled-drawing/tile-size-horizontally-scrollable.html: Added.
* tiled-drawing/tile-size-unscrollable-expected.txt: Added.
* tiled-drawing/tile-size-unscrollable.html: Added.
* tiled-drawing/tile-size-vertically-scrollable-expected.txt: Copied from LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt.
* tiled-drawing/tile-size-vertically-scrollable.html: Added.
* tiled-drawing/visible-rect-content-inset-expected.txt:

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

4 years agoFix an image resource URL in tiled scrolling tests
simon.fraser@apple.com [Fri, 4 Mar 2016 02:26:36 +0000 (02:26 +0000)]
Fix an image resource URL in tiled scrolling tests
https://bugs.webkit.org/show_bug.cgi?id=154981

Reviewed by Tim Horton.

These tests had an incorrect url to compositing/resources/simple_image.png.

* tiled-drawing/scrolling/fixed-background/fixed-background-composited-expected.html:
* tiled-drawing/scrolling/fixed-background/fixed-background-composited.html:
* tiled-drawing/scrolling/fixed-background/fixed-background-negative-z-index-fixed-expected.html:
* tiled-drawing/scrolling/fixed-background/fixed-background-negative-z-index-fixed.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-transformed.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-zoomed.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background.html:
* tiled-drawing/scrolling/fixed-background/fixed-html-background.html:
* tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background.html:

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

4 years agoAdd Proxy tests for exceptions that depend on an object being non-extensible and...
sbarati@apple.com [Fri, 4 Mar 2016 02:25:30 +0000 (02:25 +0000)]
Add Proxy tests for exceptions that depend on an object being non-extensible and having configurable properties
https://bugs.webkit.org/show_bug.cgi?id=154745

Reviewed by Geoffrey Garen.

This patch is mostly an implementation of Proxy.[[OwnPropertyKeys]]
with respect to section 9.5.11 of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys

This patch also changes call sites of getOwnPropertyNames and
getPropertyNames to expect that an exception can be thrown.

* dfg/DFGOperations.cpp:
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::iteratorEntries):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* runtime/IntlObject.cpp:
(JSC::supportedLocales):
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::get):
(JSC::JSValue::put):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::getPropertyNames):
(JSC::JSObject::getGenericPropertyNames):
* runtime/JSObject.h:
(JSC::makeIdentifier):
(JSC::createListFromArrayLike):
* runtime/JSPropertyNameEnumerator.h:
(JSC::propertyNameEnumerator):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::create):
* runtime/MapConstructor.cpp:
(JSC::constructMap):
* runtime/ObjectConstructor.cpp:
(JSC::defineProperties):
(JSC::objectConstructorSeal):
(JSC::objectConstructorFreeze):
(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):
(JSC::ownPropertyKeys):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::getOwnPropertySlotByIndex):
(JSC::ProxyObject::deleteProperty):
(JSC::ProxyObject::deletePropertyByIndex):
(JSC::ProxyObject::defineOwnProperty):
(JSC::ProxyObject::performGetOwnPropertyNames):
(JSC::ProxyObject::getOwnPropertyNames):
(JSC::ProxyObject::getOwnNonIndexPropertyNames):
(JSC::ProxyObject::getStructurePropertyNames):
(JSC::ProxyObject::getGenericPropertyNames):
(JSC::ProxyObject::visitChildren):
* runtime/ProxyObject.h:
(JSC::ProxyObject::create):
(JSC::ProxyObject::createStructure):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::add):
(JSC::Structure::getPropertyNamesFromStructure):
(JSC::Structure::checkConsistency):
(JSC::Structure::canCachePropertyNameEnumerator):
(JSC::Structure::canAccessPropertiesQuicklyForEnumeration):
(JSC::Structure::canAccessPropertiesQuickly): Deleted.
* runtime/Structure.h:
* runtime/WeakMapConstructor.cpp:
(JSC::constructWeakMap):
* tests/es6.yaml:
* tests/stress/proxy-own-keys.js: Added.
(assert):
(throw.new.Error.let.handler.ownKeys):
(throw.new.Error):
(assert.let.handler.get ownKeys):
(assert.let.handler.ownKeys):
(let.handler.ownKeys):
(i.catch):
(shallowEq):
(let.handler.getOwnPropertyDescriptor):
(i.set assert):
(set add):
(set assert):
(set if):

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

4 years agoWeb Inspector: Temporarily hide the TimelineSidebarPanel
timothy@apple.com [Fri, 4 Mar 2016 01:57:29 +0000 (01:57 +0000)]
Web Inspector: Temporarily hide the TimelineSidebarPanel

https://bugs.webkit.org/show_bug.cgi?id=154974
rdar://problem/24956380

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView): Remove _showNavigationSidebarItem and hide the sidebar.

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

4 years agoArray prototype JS builtins should support Symbol.species
keith_miller@apple.com [Fri, 4 Mar 2016 01:56:39 +0000 (01:56 +0000)]
Array prototype JS builtins should support Symbol.species
https://bugs.webkit.org/show_bug.cgi?id=154710

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Add support for Symbol.species in the Array.prototype JS
builtin functions.

* builtins/ArrayPrototype.js:
(filter):
(map):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::finishCreation):
(JSC::arrayConstructorPrivateFuncIsArrayConstructor):
* runtime/ArrayConstructor.h:
(JSC::ArrayConstructor::create):
* runtime/CommonIdentifiers.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* tests/stress/array-species-functions.js:
(id):

LayoutTests:

Add test that checks the Array object created by a species
constructor in Array.prototype functions cannot come from a
different global object without subclassing.

* js/array-species-different-globalobjects-expected.txt: Added.
* js/array-species-different-globalobjects.html: Added.

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

4 years ago[ES6] Make Unicode RegExp pattern parsing conform to the spec
msaboff@apple.com [Fri, 4 Mar 2016 01:24:28 +0000 (01:24 +0000)]
[ES6] Make Unicode RegExp pattern parsing conform to the spec
https://bugs.webkit.org/show_bug.cgi?id=154988

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Updated RegExp pattern processing with 'u' (Unicode) flag to conform to the
spec (https://tc39.github.io/ecma262/2016/#sec-patterns).  In the spec, the
grammar is annotated with [U] annotations.  Productions that are prefixed with
[+U] are only available with the Unicode flags while productions prefixed with
[~U] are only available without the Unicode flag.

Added flags argument to Yarr::checkSyntax() so we can catch Unicode flag related
parsing errors at syntax checking time.  Restricted what escapes are available for
non Unicode patterns.  Most of this is defined in the IdentityEscape rule in the
pattern grammar.

Added \- as a CharacterClass only escape in Unicode patterns.

Updated the tests for these changes.

Made changes suggested in https://bugs.webkit.org/show_bug.cgi?id=154842#c22 after
change set r197426 was landed.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createRegExp):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parsePrimaryExpression):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createRegExp):
* yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::InputStream::readChecked):
(JSC::Yarr::Interpreter::InputStream::readSurrogatePairChecked):
(JSC::Yarr::Interpreter::InputStream::reread):
(JSC::Yarr::Interpreter::InputStream::uncheckInput):
(JSC::Yarr::Interpreter::InputStream::atStart):
(JSC::Yarr::Interpreter::InputStream::atEnd):
(JSC::Yarr::Interpreter::testCharacterClass):
(JSC::Yarr::Interpreter::backtrackPatternCharacter):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::ByteCompiler::atomPatternCharacter):
* yarr/YarrParser.h:
(JSC::Yarr::Parser::Parser):
(JSC::Yarr::Parser::isIdentityEscapeAnError):
(JSC::Yarr::Parser::parseEscape):
(JSC::Yarr::Parser::parse):
* yarr/YarrPattern.cpp:
(JSC::Yarr::CharacterClassConstructor::putChar):
(JSC::Yarr::CharacterClassConstructor::putRange):
(JSC::Yarr::CharacterClassConstructor::addSorted):
(JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets):
* yarr/YarrSyntaxChecker.cpp:
(JSC::Yarr::SyntaxChecker::disjunction):
(JSC::Yarr::checkSyntax):
* yarr/YarrSyntaxChecker.h:

LayoutTests:

Added tests cases.

* js/regexp-unicode-expected.txt:
* js/script-tests/regexp-unicode.js:
(shouldThrowInvalidEscape):

[ES6] Add support for Symbol.toPrimitive
https://bugs.webkit.org/show_bug.cgi?id=154877

Reviewed by Saam Barati.

Update test for Symbol.toPrimitive.

* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:

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

4 years ago[ES6] Implement Proxy.[[DefineOwnProperty]]
sbarati@apple.com [Fri, 4 Mar 2016 01:07:04 +0000 (01:07 +0000)]
[ES6] Implement Proxy.[[DefineOwnProperty]]
https://bugs.webkit.org/show_bug.cgi?id=154759

Reviewed by Geoffrey Garen and Mark Lam.

This patch is a straight forward implementation of Proxy.[[DefineOwnProperty]]
with respect to section 9.5.6 of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc

* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyDescriptors):
* runtime/ObjectConstructor.h:
(JSC::constructEmptyObject):
(JSC::constructObjectFromPropertyDescriptor):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::isExtensible):
(JSC::ProxyObject::performDefineOwnProperty):
(JSC::ProxyObject::defineOwnProperty):
(JSC::ProxyObject::visitChildren):
* runtime/ProxyObject.h:
* tests/es6.yaml:
* tests/stress/proxy-define-own-property.js: Added.
(assert):
(throw.new.Error):
(assert.let.handler.get defineProperty):
(assert.let.handler.defineProperty):
(let.handler.defineProperty):
(i.catch):
(assert.try.):
(assert.set get catch):
(assert.let.setter):
(assert.let.getter):
(assert.set get let.handler.defineProperty):
(assert.set get let):
(assert.):

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

4 years agoUse std::make_unique<> when creating std::unique_ptr<>
gyuyoung.kim@webkit.org [Fri, 4 Mar 2016 00:54:21 +0000 (00:54 +0000)]
Use std::make_unique<> when creating std::unique_ptr<>
https://bugs.webkit.org/show_bug.cgi?id=154574

Reviewed by Darin Adler.

* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::open):
* NetworkProcess/cache/NetworkCacheStatistics.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createColorChooser):

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

4 years ago[ES6] Add support for Symbol.toPrimitive
keith_miller@apple.com [Fri, 4 Mar 2016 00:47:55 +0000 (00:47 +0000)]
[ES6] Add support for Symbol.toPrimitive
https://bugs.webkit.org/show_bug.cgi?id=154877

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch adds suport for Symbol.toPrimitive. Since we don't currently
generate snippits for one side of a binary operation we only need to change
the JSObject::ToPrimitive function and update some optimizations in the DFG
that need to know how conversions to primitive values should work. As of
ES6, the date prototype is also no longer special cased in the ToPrimitive
operation. Instead, Date.prototype has a Symbol.species function that
replicates the old behavior.

* bytecode/ObjectPropertyConditionSet.cpp:
(JSC::generateConditionsForPropertyMissConcurrently):
* bytecode/ObjectPropertyConditionSet.h:
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::watchConditions):
(JSC::DFG::Graph::canOptimizeStringObjectAccess):
* dfg/DFGGraph.h:
* runtime/CommonIdentifiers.h:
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::finishCreation):
(JSC::dateProtoFuncToPrimitiveSymbol):
* runtime/Error.cpp:
(JSC::throwTypeError):
* runtime/Error.h:
* runtime/JSCJSValueInlines.h:
(JSC::toPreferredPrimitiveType):
* runtime/JSObject.cpp:
(JSC::callToPrimitiveFunction):
(JSC::JSObject::ordinaryToPrimitive):
(JSC::JSObject::defaultValue):
(JSC::JSObject::toPrimitive):
(JSC::JSObject::getPrimitiveNumber):
(JSC::callDefaultValueFunction): Deleted.
(JSC::throwTypeError): Deleted.
* runtime/JSObject.h:
(JSC::JSObject::toPrimitive): Deleted.
* runtime/SmallStrings.h:
* runtime/SymbolPrototype.cpp:
(JSC::SymbolPrototype::finishCreation):
* runtime/SymbolPrototype.h:
(JSC::SymbolPrototype::create):
* tests/es6.yaml:
* tests/stress/date-symbol-toprimitive.js: Added.
* tests/stress/ropes-symbol-toprimitive.js: Added.
(ropify):
(String.prototype.Symbol.toPrimitive):
* tests/stress/symbol-toprimitive.js: Added.
(foo.Symbol.toPrimitive):
(catch):

LayoutTests:

Update test for Symbol.toPrimitive.

* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:

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