Timeline



Mar 6, 2016:

11:54 PM Changeset in webkit [197660] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.4/Source/JavaScriptCore

Merge r173886 - [CLoop] - Fix CLoop on the 32-bit Big-Endians
https://bugs.webkit.org/show_bug.cgi?id=137020

Patch by Tomas Popela <tpopela@redhat.com> on 2014-09-23
Reviewed by Mark Lam.

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
10:41 PM Changeset in webkit [197659] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Use half-pixel borders for data grids
https://bugs.webkit.org/show_bug.cgi?id=154437
<rdar://problem/24736365>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/DataGrid.css:

(.data-grid.inline):
(.data-grid th):
(.data-grid :matches(th, td):not(:last-child)):
Half-pixel borders round to 1px on 1x (non-retina) screens since r192444.

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid.prototype._positionResizerElements):
Use getBoundingClientRect for better precision since it provides subpixel values.

7:52 PM Changeset in webkit [197658] by BJ Burg
  • 12 edits in trunk/Source/JavaScriptCore

Web Inspector: the protocol generator should have separate prefix options for Objective-C classes and filenames
https://bugs.webkit.org/show_bug.cgi?id=155101
<rdar://problem/25000053>

Reviewed by Timothy Hatcher.

It should be possible to generate Objective-C protocol types without prefixing all class names.
The prefixes are only necessary when the generated files are part of a framework, but this isn't
how the generated Objective-C frontend files are used.

Add a separate framework setting and switch over code to use the 'protocol_group' in filenames,
and the 'objc_prefix' for Objective-C enum and class prefixes.

No tests need to be rebaselined because tests always set the protocol_group and objc_prefix
to the same value.

  • inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py:

(ObjCBackendDispatcherHeaderGenerator.output_filename):

  • inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py:

(ObjCConfigurationImplementationGenerator.output_filename):
(ObjCConfigurationImplementationGenerator.generate_output):

  • inspector/scripts/codegen/generate_objc_configuration_header.py:

(ObjCConfigurationHeaderGenerator.output_filename):
(ObjCConfigurationHeaderGenerator.generate_output):
(ObjCConfigurationHeaderGenerator._generate_configuration_interface_for_domains):

  • inspector/scripts/codegen/generate_objc_configuration_implementation.py:

(ObjCBackendDispatcherImplementationGenerator.output_filename):
(ObjCBackendDispatcherImplementationGenerator.generate_output):
(ObjCBackendDispatcherImplementationGenerator._generate_configuration_implementation_for_domains):

  • inspector/scripts/codegen/generate_objc_conversion_helpers.py:

(ObjCConversionHelpersGenerator.output_filename):

  • inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py:

(ObjCFrontendDispatcherImplementationGenerator.output_filename):
(ObjCFrontendDispatcherImplementationGenerator.generate_output):

  • inspector/scripts/codegen/generate_objc_header.py:

(ObjCHeaderGenerator.output_filename):

  • inspector/scripts/codegen/generate_objc_internal_header.py:

(ObjCInternalHeaderGenerator.output_filename):
(ObjCInternalHeaderGenerator.generate_output):

  • inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:

(ObjCProtocolTypesImplementationGenerator.output_filename):
(ObjCProtocolTypesImplementationGenerator.generate_output):

  • inspector/scripts/codegen/models.py:
  • inspector/scripts/codegen/objc_generator.py:

(ObjCGenerator):
(ObjCGenerator.protocol_name):
(ObjCGenerator.objc_prefix):

7:37 PM Changeset in webkit [197657] by BJ Burg
  • 6 edits in trunk/Source/JavaScriptCore

Unreviewed, rebaseline inspector protocol generator tests after r197563.

  • inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
  • inspector/scripts/tests/expected/enum-values.json-result:
  • inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
7:36 PM Changeset in webkit [197656] by enrica@apple.com
  • 3 edits in trunk/Source/WebKit2

Support preview on attachment elements.
https://bugs.webkit.org/show_bug.cgi?id=155074
rdar://problem/24806079

Reviewed by Sam Weinig.

Allowing preview to start on attachment elements.
Adding a private UIDelegate method to provide the data for the preview.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):

7:21 PM Changeset in webkit [197655] by benjamin@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Improve DFG's Int32 ArithMul if one operand is a constant
https://bugs.webkit.org/show_bug.cgi?id=155066

Reviewed by Filip Pizlo.

When multiplying an integer by a constant, DFG was doing quite
a bit worse than baseline JIT.
We were loading the constant into a register, doing the multiply,
the checking the result and both operands for negative zero.

This patch changes:
-Use the multiply-by-immediate form on x86.
-Do as few checks as possible to detect negative-zero.

In most cases, this reduce the negative-zero checks
to zero or one TEST+JUMP.

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::mul32):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArithMul):

6:43 PM Changeset in webkit [197654] by benjamin@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Remove a superfluous Move in front of every double unboxing
https://bugs.webkit.org/show_bug.cgi?id=155064

Reviewed by Saam Barati.

Double unboxing was always doing:

Move source, scratch
Add64 tag, scratch
IntToDouble scratch, fp

We do not need to "Move" to copy the source.
Both x86 and ARM64 have an efficient 3 operands Add instruction.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileValueToInt32):
(JSC::DFG::SpeculativeJIT::compileDoubleRep):
(JSC::DFG::SpeculativeJIT::speculateRealNumber):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::unboxDouble):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::unboxDoubleWithoutAssertions):
(JSC::AssemblyHelpers::unboxDouble):
(JSC::AssemblyHelpers::unboxDoubleNonDestructive):

6:42 PM Changeset in webkit [197653] by benjamin@webkit.org
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Use 3 operands Add in more places
https://bugs.webkit.org/show_bug.cgi?id=155082

Reviewed by Filip Pizlo.

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::addPtr):
(JSC::MacroAssembler::add32):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::add32):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArithAdd):
The case with child1 constant is useless.
The canonical form will have the constant as child2.

Also add register reuse for the fast-add.
Registers are a scarce resource on x86.

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::prepareForTailCallSlow):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::generate):

6:40 PM Changeset in webkit [197652] by commit-queue@webkit.org
  • 14 edits in trunk/Source

[JSC] Improve codegen of Compare and Test
https://bugs.webkit.org/show_bug.cgi?id=155055

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

Source/JavaScriptCore:

This patch introduces a few improvements on how we lower
Compare and Test with immediates:

-Add certain Immediate forms of ARM64.
-Use CBZ/CBNZ when possible on ARM64.
-When possible, convert a CMP into a TST

On some hardware, we can issue more TST simultaneously.

On x86, any TST+Jump is candidate for macro-fusion.
They are also smaller.
(sections 3.4.2.2 and 3.5.1.9)

-Do not load the mask immediate of a TST

if it only contains ones (mostly useful for ARM64
since that would not have been a valid immediate).

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::compare32):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::moveConditionallyAfterFloatingPointCompare):
(JSC::MacroAssemblerARM64::moveDoubleConditionallyAfterFloatingPointCompare):
This is somewhat unrelated but I found that out while working
on moveDoubleConditionallyTest32:

If "thenCase" and "dest" are assigned the same register
by the allocator, then the first (f)fcsel would override
the "thenCase" and the second fcsel would always be "elseCase".

This is covered by testb3 but was only uncovered
after recent "Move" removals in lowering.

(JSC::MacroAssemblerARM64::moveConditionally32):
(JSC::MacroAssemblerARM64::moveConditionally64):
(JSC::MacroAssemblerARM64::moveConditionallyTest32):
(JSC::MacroAssemblerARM64::moveDoubleConditionally32):
(JSC::MacroAssemblerARM64::moveDoubleConditionally64):
(JSC::MacroAssemblerARM64::moveDoubleConditionallyTest32):
(JSC::MacroAssemblerARM64::branch32):
(JSC::MacroAssemblerARM64::branch64):
(JSC::MacroAssemblerARM64::branchTest32):
(JSC::MacroAssemblerARM64::test32):
The version taking an immediate was guarded by

(cond == Zero)
(cond == NonZero). That is overzealous,

and only needed for CBZ/CBNZ.

(JSC::MacroAssemblerARM64::branchTest64):
(JSC::MacroAssemblerARM64::compare32):
(JSC::MacroAssemblerARM64::compare64):
(JSC::MacroAssemblerARM64::commuteCompareToZeroIntoTest):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::moveConditionally32):
(JSC::MacroAssemblerX86Common::moveConditionallyTest32):
(JSC::MacroAssemblerX86Common::branch32):
(JSC::MacroAssemblerX86Common::test32):
(JSC::MacroAssemblerX86Common::branchTest32):
(JSC::MacroAssemblerX86Common::compare32):
(JSC::MacroAssemblerX86Common::commuteCompareToZeroIntoTest):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::compare64):
(JSC::MacroAssemblerX86_64::branch64):
(JSC::MacroAssemblerX86_64::moveConditionally64):

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::createGenericCompare):
Unfortunately this cannot be abstracted by the MacroAssembler.
Those immediates are not valid, we have to pick the better
for right away.

  • b3/air/AirOpcode.opcodes:
  • b3/testb3.cpp:

(JSC::B3::int64Operands):
(JSC::B3::modelCompare):
(JSC::B3::testCompareImpl):
(JSC::B3::testCompare):
(JSC::B3::b3Pow):
(JSC::B3::testPowDoubleByIntegerLoop):
Some versions of pow(double, int) do not return
the exact same bits as our integer loop.
Added a new version to have the same behavior
as the B3 loop.

(JSC::B3::run):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compilePeepHoleBooleanBranch):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileInt32Compare):
Comparing to an immediate is super common. Do not waste
a register for that!

Source/WebCore:

  • cssjit/FunctionCall.h:

(WebCore::FunctionCall::callAndBranchOnCondition):

6:40 PM Changeset in webkit [197651] by jonlee@apple.com
  • 2 edits in trunk/PerformanceTests

Make sure multiply test particles have at least some opacity
https://bugs.webkit.org/show_bug.cgi?id=155027

Reviewed by Simon Fraser.

  • Animometer/tests/master/resources/multiply.js:

(initialize): Have the elements spin a little faster to make it
more obvious when the system is being stressed.
(_addTile):
(animate): Make sure each element being animated has at least 1%
opacity.

6:22 PM Changeset in webkit [197650] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix build. This was a messed up merge.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):

6:07 PM Changeset in webkit [197649] by fpizlo@apple.com
  • 15 edits in trunk/Source/JavaScriptCore

DFG should know how to speculate StringOrOther
https://bugs.webkit.org/show_bug.cgi?id=155094

Reviewed by Saam Barati.

Any code that processes the regexp matches array was previously doing a relatively expensive
Branch(Untyped:). This introduces a new use kind called StringOrOther, which is perfect for
code that loops over the matches array and branches on the entries being non-empty.

To do this, I needed to introduce code into the FTL that creates new blocks. We still had that
awful FTL_NEW_BLOCK idiom since the only way to debug LLVM IR was to ascribe names to basic
blocks. B3 IR is inherently more debuggable since unlike LLVM, B3 knows how to always respect
code origin, and it knows how to print the code origin nicely in the dumps. So, rather than
continue using FTL_NEW_BLOCK(m_out, ("things")), I replaced all of that stuff with
m_out.newBlock(). It's much nicer that way.

This is a tiny speed-up on Octane/regexp at best. I was hoping for more. Oh well.

  • bytecode/SpeculatedType.h:

(JSC::isStringSpeculation):
(JSC::isStringOrOtherSpeculation):
(JSC::isSymbolSpeculation):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::shouldSpeculateString):
(JSC::DFG::Node::shouldSpeculateStringOrOther):
(JSC::DFG::Node::shouldSpeculateStringObject):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::SafeToExecuteEdge::operator()):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileStringZeroLength):
(JSC::DFG::SpeculativeJIT::compileLogicalNotStringOrOther):
(JSC::DFG::SpeculativeJIT::emitStringBranch):
(JSC::DFG::SpeculativeJIT::emitStringOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compileConstantStoragePointer):
(JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
(JSC::DFG::SpeculativeJIT::speculateString):
(JSC::DFG::SpeculativeJIT::speculateStringOrOther):
(JSC::DFG::SpeculativeJIT::speculateStringIdentAndLoadStorage):
(JSC::DFG::SpeculativeJIT::speculate):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitBranch):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitBranch):

  • dfg/DFGUseKind.cpp:

(WTF::printInternal):

  • dfg/DFGUseKind.h:

(JSC::DFG::typeFilterFor):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):
(JSC::FTL::DFG::LowerDFGToB3::compileDoubleRep):
(JSC::FTL::DFG::LowerDFGToB3::compileBooleanToNumber):
(JSC::FTL::DFG::LowerDFGToB3::compileToThis):
(JSC::FTL::DFG::LowerDFGToB3::compileArithMul):
(JSC::FTL::DFG::LowerDFGToB3::compileArithDiv):
(JSC::FTL::DFG::LowerDFGToB3::compileArithMod):
(JSC::FTL::DFG::LowerDFGToB3::compileArithMinOrMax):
(JSC::FTL::DFG::LowerDFGToB3::compileArithPow):
(JSC::FTL::DFG::LowerDFGToB3::compileArithRound):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckStructure):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayifyToStructure):
(JSC::FTL::DFG::LowerDFGToB3::compileGetById):
(JSC::FTL::DFG::LowerDFGToB3::compileGetIndexedPropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayPush):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayPop):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateActivation):
(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateDirectArguments):
(JSC::FTL::DFG::LowerDFGToB3::compileCopyRest):
(JSC::FTL::DFG::LowerDFGToB3::compileGetRestLength):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize):
(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::compileToStringOrCallStringConstructor):
(JSC::FTL::DFG::LowerDFGToB3::compileToPrimitive):
(JSC::FTL::DFG::LowerDFGToB3::compileMakeRope):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharCodeAt):
(JSC::FTL::DFG::LowerDFGToB3::compileStringFromCharCode):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiGetByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiPutByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileNotifyWrite):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
(JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileSwitch):
(JSC::FTL::DFG::LowerDFGToB3::compileIsString):
(JSC::FTL::DFG::LowerDFGToB3::compileIsObject):
(JSC::FTL::DFG::LowerDFGToB3::compileIsObjectOrNull):
(JSC::FTL::DFG::LowerDFGToB3::compileIsFunction):
(JSC::FTL::DFG::LowerDFGToB3::compileTypeOf):
(JSC::FTL::DFG::LowerDFGToB3::compileOverridesHasInstance):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
(JSC::FTL::DFG::LowerDFGToB3::compileHasIndexedProperty):
(JSC::FTL::DFG::LowerDFGToB3::compileHasStructureProperty):
(JSC::FTL::DFG::LowerDFGToB3::compileGetDirectPname):
(JSC::FTL::DFG::LowerDFGToB3::compileGetEnumeratorStructurePname):
(JSC::FTL::DFG::LowerDFGToB3::compileGetEnumeratorGenericPname):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckWatchdogTimer):
(JSC::FTL::DFG::LowerDFGToB3::checkStructure):
(JSC::FTL::DFG::LowerDFGToB3::numberOrNotCellToInt32):
(JSC::FTL::DFG::LowerDFGToB3::checkInferredType):
(JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorageWithSizeImpl):
(JSC::FTL::DFG::LowerDFGToB3::loadVectorWithBarrier):
(JSC::FTL::DFG::LowerDFGToB3::copyBarrier):
(JSC::FTL::DFG::LowerDFGToB3::loadVectorReadOnly):
(JSC::FTL::DFG::LowerDFGToB3::compareEqObjectOrOtherToObject):
(JSC::FTL::DFG::LowerDFGToB3::nonSpeculativeCompare):
(JSC::FTL::DFG::LowerDFGToB3::stringsEqual):
(JSC::FTL::DFG::LowerDFGToB3::allocateCell):
(JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedObject):
(JSC::FTL::DFG::LowerDFGToB3::allocateBasicStorageAndGetEnd):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::allocateJSArray):
(JSC::FTL::DFG::LowerDFGToB3::boolify):
(JSC::FTL::DFG::LowerDFGToB3::equalNullOrUndefined):
(JSC::FTL::DFG::LowerDFGToB3::contiguousPutByValOutOfBounds):
(JSC::FTL::DFG::LowerDFGToB3::switchString):
(JSC::FTL::DFG::LowerDFGToB3::switchStringRecurse):
(JSC::FTL::DFG::LowerDFGToB3::buildTypeOf):
(JSC::FTL::DFG::LowerDFGToB3::doubleToInt32):
(JSC::FTL::DFG::LowerDFGToB3::sensibleDoubleToInt32):
(JSC::FTL::DFG::LowerDFGToB3::strictInt52ToJSValue):
(JSC::FTL::DFG::LowerDFGToB3::jsValueToStrictInt52):
(JSC::FTL::DFG::LowerDFGToB3::convertDoubleToInt32):
(JSC::FTL::DFG::LowerDFGToB3::speculate):
(JSC::FTL::DFG::LowerDFGToB3::speculateCellOrOther):
(JSC::FTL::DFG::LowerDFGToB3::speculateObjectOrOther):
(JSC::FTL::DFG::LowerDFGToB3::speculateString):
(JSC::FTL::DFG::LowerDFGToB3::speculateStringOrOther):
(JSC::FTL::DFG::LowerDFGToB3::speculateStringIdent):
(JSC::FTL::DFG::LowerDFGToB3::speculateStringOrStringObject):
(JSC::FTL::DFG::LowerDFGToB3::speculateRealNumber):
(JSC::FTL::DFG::LowerDFGToB3::speculateNotStringVar):
(JSC::FTL::DFG::LowerDFGToB3::emitStoreBarrier):
(JSC::FTL::DFG::LowerDFGToB3::callCheck):

  • ftl/FTLOutput.cpp:

(JSC::FTL::Output::initialize):
(JSC::FTL::Output::newBlock):
(JSC::FTL::Output::check):

  • ftl/FTLOutput.h:

(JSC::FTL::Output::setFrequency):
(JSC::FTL::Output::insertNewBlocksBefore):

5:00 PM Changeset in webkit [197648] by sbarati@apple.com
  • 90 edits in trunk/Source

GetPrototypeOf? should be a fully virtual method in the method table
https://bugs.webkit.org/show_bug.cgi?id=155002

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This patch makes us more consistent with how the ES6 specification models the
GetPrototypeOf? trap. Moving this method into ClassInfo::methodTable
is a prerequisite for implementing Proxy.GetPrototypeOf?. This patch
still allows directly accessing the prototype for situations where this
is the desired behavior. This is equivalent to getting the internal
Prototype? field as described in the specification.

  • API/JSObjectRef.cpp:

(JSObjectGetPrototype):
(JSObjectSetPrototype):

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
(JSC::DFG::SpeculativeJIT::compileCheckTypeInfoFlags):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOfCustom):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jsc.cpp:

(functionCreateProxy):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArrayPrototype.cpp:

(JSC::speciesConstructArray):

  • runtime/ClassInfo.h:
  • runtime/FunctionPrototype.cpp:

(JSC::functionProtoFuncBind):

  • runtime/IntlCollatorPrototype.cpp:

(JSC::IntlCollatorPrototypeGetterCompare):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototypeGetterFormat):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototypeGetterFormat):

  • runtime/JSBoundFunction.cpp:

(JSC::hasInstanceBoundFunction):
(JSC::getBoundFunctionStructure):
(JSC::JSBoundFunction::create):

  • runtime/JSBoundFunction.h:
  • runtime/JSCJSValue.cpp:

(JSC::JSValue::putToPrimitive):

  • runtime/JSCell.cpp:

(JSC::JSCell::setPrototype):
(JSC::JSCell::getPrototype):

  • runtime/JSCell.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::hasLegacyProfiler):
(JSC::lastInPrototypeChain):
(JSC::JSGlobalObject::objectPrototypeIsSane):
(JSC::JSGlobalObject::arrayPrototypeChainIsSane):
(JSC::JSGlobalObject::stringPrototypeChainIsSane):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::finishCreation):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::GlobalFuncProtoGetterFunctor::GlobalFuncProtoGetterFunctor):
(JSC::GlobalFuncProtoGetterFunctor::operator()):
(JSC::globalFuncProtoGetter):

  • runtime/JSLexicalEnvironment.cpp:

(JSC::JSLexicalEnvironment::getOwnPropertySlot):

  • runtime/JSObject.cpp:

(JSC::JSObject::calculatedClassName):
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::setPrototype):
(JSC::JSObject::getPrototype):
(JSC::JSObject::defaultHasInstance):
(JSC::objectPrivateFuncInstanceOf):
(JSC::JSObject::getPropertyNames):
(JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype):
(JSC::JSObject::attemptToInterceptPutByIndexOnHole):
(JSC::JSObject::getGenericPropertyNames):

  • runtime/JSObject.h:

(JSC::JSObject::finishCreation):
(JSC::JSObject::JSObject):
(JSC::JSObject::getPrototypeDirect):
(JSC::JSObject::getPrototype):
(JSC::JSObject::getOwnNonIndexPropertySlot):
(JSC::JSObject::getPropertySlot):
(JSC::JSObject::getNonIndexPropertySlot):
(JSC::JSObject::prototype): Deleted.

  • runtime/JSObjectInlines.h:

(JSC::JSObject::canPerformFastPutInline):

  • runtime/JSProxy.cpp:

(JSC::JSProxy::setTarget):

  • runtime/JSTypedArrayViewConstructor.cpp:

(JSC::constructTypedArrayView):

  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructorGetPrototypeOfFunctor::ObjectConstructorGetPrototypeOfFunctor):
(JSC::ObjectConstructorGetPrototypeOfFunctor::operator()):
(JSC::objectConstructorGetPrototypeOf):

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncIsPrototypeOf):

  • runtime/ProxyObject.cpp:

(JSC::performProxyGet):
(JSC::ProxyObject::performSetPrototype):

  • runtime/StructureInlines.h:

(JSC::Structure::isValid):

  • tests/stress/proxy-has-property.js:

(assert.let.h1.has):
(assert.let.h2.has):
(assert):

Source/WebCore:

Change ::getPrototype(.) to ::prototype(.) in various places to prevent
a naming conflict with JSC.

No new tests because no new functionality was added.

  • bindings/js/JSDOMWindowShell.cpp:

(WebCore::JSDOMWindowShell::setWindow):

  • bindings/js/JSImageConstructor.cpp:

(WebCore::JSImageConstructor::initializeProperties):
(WebCore::JSImageConstructor::prototypeForStructure):

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::initScript):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorHelperMethods):

  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:

(WebCore::JSTestActiveDOMObjectConstructor::initializeProperties):
(WebCore::JSTestActiveDOMObject::createPrototype):
(WebCore::JSTestActiveDOMObject::prototype):
(WebCore::JSTestActiveDOMObject::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestActiveDOMObject.h:
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:

(WebCore::JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties):
(WebCore::JSTestClassWithJSBuiltinConstructor::createPrototype):
(WebCore::JSTestClassWithJSBuiltinConstructor::prototype):
(WebCore::JSTestClassWithJSBuiltinConstructor::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:

(WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties):
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::createPrototype):
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::prototype):
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:

(WebCore::JSTestCustomNamedGetterConstructor::initializeProperties):
(WebCore::JSTestCustomNamedGetter::createPrototype):
(WebCore::JSTestCustomNamedGetter::prototype):
(WebCore::JSTestCustomNamedGetter::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:

(WebCore::JSTestEventConstructorConstructor::initializeProperties):
(WebCore::JSTestEventConstructor::createPrototype):
(WebCore::JSTestEventConstructor::prototype):
(WebCore::JSTestEventConstructor::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestEventConstructor.h:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:

(WebCore::JSTestEventTargetConstructor::initializeProperties):
(WebCore::JSTestEventTarget::createPrototype):
(WebCore::JSTestEventTarget::prototype):
(WebCore::JSTestEventTarget::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestEventTarget.h:
  • bindings/scripts/test/JS/JSTestException.cpp:

(WebCore::JSTestExceptionConstructor::initializeProperties):
(WebCore::JSTestException::createPrototype):
(WebCore::JSTestException::prototype):
(WebCore::JSTestException::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestException.h:
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:

(WebCore::JSTestGenerateIsReachableConstructor::initializeProperties):
(WebCore::JSTestGenerateIsReachable::createPrototype):
(WebCore::JSTestGenerateIsReachable::prototype):
(WebCore::JSTestGenerateIsReachable::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
  • bindings/scripts/test/JS/JSTestInterface.cpp:

(WebCore::JSTestInterfaceConstructor::initializeProperties):
(WebCore::JSTestInterface::createPrototype):
(WebCore::JSTestInterface::prototype):
(WebCore::JSTestInterface::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:

(WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties):
(WebCore::JSTestJSBuiltinConstructor::createPrototype):
(WebCore::JSTestJSBuiltinConstructor::prototype):
(WebCore::JSTestJSBuiltinConstructor::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:

(WebCore::JSTestMediaQueryListListenerConstructor::initializeProperties):
(WebCore::JSTestMediaQueryListListener::createPrototype):
(WebCore::JSTestMediaQueryListListener::prototype):
(WebCore::JSTestMediaQueryListListener::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:

(WebCore::JSTestNamedConstructorConstructor::initializeProperties):
(WebCore::JSTestNamedConstructorNamedConstructor::initializeProperties):
(WebCore::JSTestNamedConstructor::createPrototype):
(WebCore::JSTestNamedConstructor::prototype):
(WebCore::JSTestNamedConstructor::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestNamedConstructor.h:
  • bindings/scripts/test/JS/JSTestNode.cpp:

(WebCore::JSTestNodeConstructor::initializeProperties):
(WebCore::JSTestNode::createPrototype):
(WebCore::JSTestNode::prototype):
(WebCore::JSTestNode::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestNode.h:
  • bindings/scripts/test/JS/JSTestNondeterministic.cpp:

(WebCore::JSTestNondeterministicConstructor::initializeProperties):
(WebCore::JSTestNondeterministic::createPrototype):
(WebCore::JSTestNondeterministic::prototype):
(WebCore::JSTestNondeterministic::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestNondeterministic.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::JSTestObjConstructor::initializeProperties):
(WebCore::JSTestObj::createPrototype):
(WebCore::JSTestObj::prototype):
(WebCore::JSTestObj::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:

(WebCore::JSTestOverloadedConstructorsConstructor::initializeProperties):
(WebCore::JSTestOverloadedConstructors::createPrototype):
(WebCore::JSTestOverloadedConstructors::prototype):
(WebCore::JSTestOverloadedConstructors::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:

(WebCore::JSTestOverrideBuiltinsConstructor::initializeProperties):
(WebCore::JSTestOverrideBuiltins::createPrototype):
(WebCore::JSTestOverrideBuiltins::prototype):
(WebCore::JSTestOverrideBuiltins::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:

(WebCore::JSTestSerializedScriptValueInterfaceConstructor::initializeProperties):
(WebCore::JSTestSerializedScriptValueInterface::createPrototype):
(WebCore::JSTestSerializedScriptValueInterface::prototype):
(WebCore::JSTestSerializedScriptValueInterface::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

(WebCore::JSTestTypedefsConstructor::initializeProperties):
(WebCore::JSTestTypedefs::createPrototype):
(WebCore::JSTestTypedefs::prototype):
(WebCore::JSTestTypedefs::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSTestTypedefs.h:
  • bindings/scripts/test/JS/JSattribute.cpp:

(WebCore::JSattributeConstructor::initializeProperties):
(WebCore::JSattribute::createPrototype):
(WebCore::JSattribute::prototype):
(WebCore::JSattribute::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSattribute.h:
  • bindings/scripts/test/JS/JSreadonly.cpp:

(WebCore::JSreadonlyConstructor::initializeProperties):
(WebCore::JSreadonly::createPrototype):
(WebCore::JSreadonly::prototype):
(WebCore::JSreadonly::getPrototype): Deleted.

  • bindings/scripts/test/JS/JSreadonly.h:
3:40 PM Changeset in webkit [197647] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[iOS] Some more gardening after r197627.

Unreviewed.

  • platform/ios-simulator/TestExpectations: skip a test.
3:12 PM Changeset in webkit [197646] by commit-queue@webkit.org
  • 40 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r197645.
https://bugs.webkit.org/show_bug.cgi?id=155097

"Doesn't build properly when building entire webkit"
(Requested by saamyjoon on #webkit).

Reverted changeset:

"GetPrototypeOf? should be a fully virtual method in the
method table"
https://bugs.webkit.org/show_bug.cgi?id=155002
http://trac.webkit.org/changeset/197645

3:05 PM Changeset in webkit [197645] by sbarati@apple.com
  • 40 edits in trunk/Source/JavaScriptCore

GetPrototypeOf? should be a fully virtual method in the method table
https://bugs.webkit.org/show_bug.cgi?id=155002

Reviewed by Filip Pizlo.

This patch makes us more consistent with how the ES6 specification models the
GetPrototypeOf? trap. Moving this method into ClassInfo::methodTable
is a prerequisite for implementing Proxy.GetPrototypeOf?. This patch
still allows directly accessing the prototype for situations where this
is the desired behavior. This is equivalent to getting the internal
Prototype? field as described in the specification.

  • API/JSObjectRef.cpp:

(JSObjectGetPrototype):
(JSObjectSetPrototype):

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
(JSC::DFG::SpeculativeJIT::compileCheckTypeInfoFlags):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOfCustom):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jsc.cpp:

(functionCreateProxy):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArrayPrototype.cpp:

(JSC::speciesConstructArray):

  • runtime/ClassInfo.h:
  • runtime/FunctionPrototype.cpp:

(JSC::functionProtoFuncBind):

  • runtime/IntlCollatorPrototype.cpp:

(JSC::IntlCollatorPrototypeGetterCompare):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototypeGetterFormat):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototypeGetterFormat):

  • runtime/JSBoundFunction.cpp:

(JSC::hasInstanceBoundFunction):
(JSC::getBoundFunctionStructure):
(JSC::JSBoundFunction::create):

  • runtime/JSBoundFunction.h:
  • runtime/JSCJSValue.cpp:

(JSC::JSValue::putToPrimitive):

  • runtime/JSCell.cpp:

(JSC::JSCell::setPrototype):
(JSC::JSCell::getPrototype):

  • runtime/JSCell.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::hasLegacyProfiler):
(JSC::lastInPrototypeChain):
(JSC::JSGlobalObject::objectPrototypeIsSane):
(JSC::JSGlobalObject::arrayPrototypeChainIsSane):
(JSC::JSGlobalObject::stringPrototypeChainIsSane):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::finishCreation):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::GlobalFuncProtoGetterFunctor::GlobalFuncProtoGetterFunctor):
(JSC::GlobalFuncProtoGetterFunctor::operator()):
(JSC::globalFuncProtoGetter):

  • runtime/JSLexicalEnvironment.cpp:

(JSC::JSLexicalEnvironment::getOwnPropertySlot):

  • runtime/JSObject.cpp:

(JSC::JSObject::calculatedClassName):
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::setPrototype):
(JSC::JSObject::getPrototype):
(JSC::JSObject::defaultHasInstance):
(JSC::objectPrivateFuncInstanceOf):
(JSC::JSObject::getPropertyNames):
(JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype):
(JSC::JSObject::attemptToInterceptPutByIndexOnHole):
(JSC::JSObject::getGenericPropertyNames):

  • runtime/JSObject.h:

(JSC::JSObject::finishCreation):
(JSC::JSObject::JSObject):
(JSC::JSObject::getPrototypeDirect):
(JSC::JSObject::getPrototype):
(JSC::JSObject::getOwnNonIndexPropertySlot):
(JSC::JSObject::getPropertySlot):
(JSC::JSObject::getNonIndexPropertySlot):
(JSC::JSObject::prototype): Deleted.

  • runtime/JSObjectInlines.h:

(JSC::JSObject::canPerformFastPutInline):

  • runtime/JSProxy.cpp:

(JSC::JSProxy::setTarget):

  • runtime/JSTypedArrayViewConstructor.cpp:

(JSC::constructTypedArrayView):

  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructorGetPrototypeOfFunctor::ObjectConstructorGetPrototypeOfFunctor):
(JSC::ObjectConstructorGetPrototypeOfFunctor::operator()):
(JSC::objectConstructorGetPrototypeOf):

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncIsPrototypeOf):

  • runtime/ProxyObject.cpp:

(JSC::performProxyGet):
(JSC::ProxyObject::performSetPrototype):

  • runtime/StructureInlines.h:

(JSC::Structure::isValid):

  • tests/stress/proxy-has-property.js:

(assert.let.h1.has):
(assert.let.h2.has):
(assert):

2:57 PM Changeset in webkit [197644] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[iOS] Gardening after r197627.

Unreviewed.

  • platform/ios-simulator/TestExpectations:
2:30 PM Changeset in webkit [197643] by sbarati@apple.com
  • 2 edits in trunk/Websites/webkit.org

Update style guide to reflect our style of only using "override" or "final" when overriding virtual methods
https://bugs.webkit.org/show_bug.cgi?id=154978

Reviewed by Darin Adler.

  • code-style.md:
12:44 PM Changeset in webkit [197642] by youenn.fablet@crf.canon.fr
  • 7 edits in trunk/Source/WebCore

Enable DOM class create functions to take parameters in case of JSBuiltinConstructor
https://bugs.webkit.org/show_bug.cgi?id=155022

Reviewed by Darin Adler.

Introducing JSDOMObjectInspector to check whether a given JS class is built-in (no DOM class).
If that is not the case, the JS class wraps a DOM class.
The inspector detects whether the DOM class create static method takes no parameter or some parameters.
This is used in JSDOMConstructor.h to generate correctly the createJSObject functions needed by JSBuiltinConstructor.

Updated binding generator to not generate anymore createJSObject as it is handled directly in JSDOMConstructor.h.

Covered by existing tests.

  • bindings/js/JSDOMConstructor.h:

(WebCore::JSBuiltinConstructor<JSClass>::callConstructor):
(WebCore::createJSObject):
(WebCore::JSBuiltinConstructor<JSClass>::construct):

  • bindings/js/JSDOMWrapper.h:
  • bindings/js/JSKeyValueIterator.h: Taking benefit of JSClass::DOMWrapper type declaration.
  • bindings/js/JSReadableStreamPrivateConstructors.cpp:

(WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::initializeExecutable): Deleted.
(WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::initializeExecutable): Deleted.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateConstructorDefinition): Deleted.

  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:

(WebCore::JSTestClassWithJSBuiltinConstructorConstructor::prototypeForStructure): Deleted.

12:11 PM Changeset in webkit [197641] by fpizlo@apple.com
  • 33 edits
    5 adds in trunk

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.
12:08 PM Changeset in webkit [197640] by Yusuke Suzuki
  • 3 edits
    1 add in trunk/Source/JavaScriptCore

[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):

7:00 AM Changeset in webkit [197639] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[iOS] Gardening after r197627.

Unreviewed.

  • platform/ios-simulator/css2.1/20110323/border-conflict-style-088-expected.txt:
4:04 AM Changeset in webkit [197638] by akling@apple.com
  • 4 edits in trunk/Source

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):

2:17 AM Changeset in webkit [197637] by Antti Koivisto
  • 11 edits in trunk/Source/WebCore

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:
12:33 AM Changeset in webkit [197636] by ap@apple.com
  • 3 edits in trunk/Tools

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.

Mar 5, 2016:

11:46 PM Changeset in webkit [197635] by Alan Bujtas
  • 148 edits
    1 add in trunk/LayoutTests

[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:
9:07 PM Changeset in webkit [197634] by rniwa@webkit.org
  • 14 edits
    3 adds in trunk

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:
9:02 PM Changeset in webkit [197633] by timothy_horton@apple.com
  • 4 edits
    1 add in trunk

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.

8:34 PM Changeset in webkit [197632] by weinig@apple.com
  • 2 edits in trunk/Source/WebKit2

Revert usage of autofill field name for use with UITextInputTraits
until our bots can catch up.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView textInputTraits]):

8:25 PM Changeset in webkit [197631] by weinig@apple.com
  • 5 edits in trunk/LayoutTests

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.

8:25 PM Changeset in webkit [197630] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

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.
8:18 PM Changeset in webkit [197629] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Fix two minor typos from http://trac.webkit.org/changeset/197626 that were causing some test failures.

  • html/Autofill.cpp:

(WebCore::fieldNameMap):
(WebCore::AutofillData::createFromHTMLFormControlElement):

7:28 PM Changeset in webkit [197628] by Chris Dumez
  • 40 edits
    1 add
    3 deletes in trunk/Source

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):

7:10 PM Changeset in webkit [197627] by Alan Bujtas
  • 8 edits
    2 adds in trunk

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:
6:17 PM Changeset in webkit [197626] by weinig@apple.com
  • 18 edits
    2 adds in trunk

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.

5:52 PM Changeset in webkit [197625] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk/Source/WebInspectorUI

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 <Joseph Pecoraro> 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.

5:23 PM Changeset in webkit [197624] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Build fix after r197612 (under ASAN/GuardMalloc).

  • dom/CustomElementDefinitions.cpp:

(WebCore::CustomElementDefinitions::findInterface):

5:20 PM Changeset in webkit [197623] by Michael Catanzaro
  • 6 edits in trunk

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:
4:48 PM Changeset in webkit [197622] by fpizlo@apple.com
  • 11 edits in trunk/Source/JavaScriptCore

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:
4:40 PM Changeset in webkit [197621] by timothy@apple.com
  • 9 edits in trunk/Source/WebKit2

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.

4:40 PM Changeset in webkit [197620] by timothy@apple.com
  • 4 edits in trunk/Source/WebKit2

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:
4:28 PM Changeset in webkit [197619] by Joseph Pecoraro
  • 15 edits
    2 moves
    6 adds in trunk/Source/WebInspectorUI

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.

4:01 PM Changeset in webkit [197618] by Simon Fraser
  • 4 edits
    17 adds in trunk

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.
3:23 PM Changeset in webkit [197617] by Simon Fraser
  • 13 edits
    5 adds in trunk

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.
1:35 PM Changeset in webkit [197616] by jdiggs@igalia.com
  • 18 edits
    21 adds in trunk

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.
11:44 AM Changeset in webkit [197615] by clopez@igalia.com
  • 2 edits in trunk/Tools

[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.

9:01 AM Changeset in webkit [197614] by Yusuke Suzuki
  • 114 edits
    1 add in trunk/Source

[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):

12:50 AM Changeset in webkit [197613] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix the bindings test after r197611.

  • bindings/scripts/test/TestObj.idl:
12:31 AM Changeset in webkit [197612] by rniwa@webkit.org
  • 7 edits in trunk/Source/WebCore

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.

Mar 4, 2016:

11:50 PM Changeset in webkit [197611] by rniwa@webkit.org
  • 14 edits
    6 adds in trunk

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.
11:31 PM Changeset in webkit [197610] by timothy_horton@apple.com
  • 2 edits in trunk/LayoutTests

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.

10:25 PM Changeset in webkit [197609] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

[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:
9:24 PM Changeset in webkit [197608] by Brent Fulgham
  • 5 edits in trunk/Source/WebCore

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.

7:42 PM Changeset in webkit [197607] by Lucas Forschler
  • 1 edit in trunk/Tools/BuildSlaveSupport/build.webkit.org-config/config.json

config.json fix to remove duplicate scheduler.

7:30 PM Changeset in webkit [197606] by commit-queue@webkit.org
  • 5 edits in trunk/Source

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.

5:35 PM Changeset in webkit [197605] by weinig@apple.com
  • 10 edits in trunk/Source

[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.

5:34 PM Changeset in webkit [197604] by barraclough@apple.com
  • 2 edits in trunk/Source/WebCore

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):

5:32 PM Changeset in webkit [197603] by barraclough@apple.com
  • 2 edits in trunk/Source/WebCore

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):

5:23 PM Changeset in webkit [197602] by rniwa@webkit.org
  • 18 edits
    2 moves in trunk

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:
5:06 PM Changeset in webkit [197601] by ap@apple.com
  • 2 edits in trunk/Tools

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:
4:57 PM Changeset in webkit [197600] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebCore

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.

4:56 PM Changeset in webkit [197599] by barraclough@apple.com
  • 11 edits in trunk/Source/WebCore

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):

4:40 PM Changeset in webkit [197598] by Brent Fulgham
  • 5 edits in trunk/Source/WebKit2

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:
4:36 PM Changeset in webkit [197597] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit/mac

Unreviewed test fix for null global WebResourceLoadStatisticsStore.

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):
(+[WebView _applicationWillTerminate]):

3:55 PM Changeset in webkit [197596] by enrica@apple.com
  • 12 edits in trunk/Source

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):

3:33 PM Changeset in webkit [197595] by akling@apple.com
  • 7 edits in trunk/Source

[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):

3:32 PM Changeset in webkit [197594] by Simon Fraser
  • 26 edits in trunk

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:
3:32 PM Changeset in webkit [197593] by Simon Fraser
  • 4 edits
    1 delete in trunk/Source/WebCore

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:
3:29 PM Changeset in webkit [197592] by Brent Fulgham
  • 43 edits
    5 adds in trunk

[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.

3:28 PM Changeset in webkit [197591] by commit-queue@webkit.org
  • 13 edits in trunk/Source/WebCore

Added missing override specifiers under Source/WebCore.
https://bugs.webkit.org/show_bug.cgi?id=155021

Patch by Konstantin Tokarev <Konstantin Tokarev> 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:
2:18 PM Changeset in webkit [197590] by ddkilzer@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

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.

2:07 PM Changeset in webkit [197589] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit2

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):

1:56 PM Changeset in webkit [197588] by barraclough@apple.com
  • 2 edits in trunk/Source/WebCore

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().
1:48 PM Changeset in webkit [197587] by bshafiei@apple.com
  • 1 copy in branches/safari-601.5-branch

New Branch.

1:36 PM Changeset in webkit [197586] by achristensen@apple.com
  • 1 edit
    31 deletes in trunk/Tools

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.
1:27 PM Changeset in webkit [197585] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

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:
1:19 PM Changeset in webkit [197584] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip fast/text/all-small-caps-whitespace.html on ios-simulator

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
1:05 PM Changeset in webkit [197583] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

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:
1:00 PM Changeset in webkit [197582] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

Release build fix after r197572.
https://bugs.webkit.org/show_bug.cgi?id=154993

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):

12:58 PM Changeset in webkit [197581] by barraclough@apple.com
  • 3 edits in trunk/Source/WebCore

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
12:19 PM Changeset in webkit [197580] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

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):

11:59 AM Changeset in webkit [197579] by achristensen@apple.com
  • 3 edits
    95 deletes in trunk/Source

Remove vcxproj build system
https://bugs.webkit.org/show_bug.cgi?id=154388

Rubber-stamped by Brent Fulgham.

Source/JavaScriptCore:

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.
11:48 AM Changeset in webkit [197578] by achristensen@apple.com
  • 1 edit
    23 deletes in trunk/Source/WTF

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.
11:42 AM Changeset in webkit [197577] by beidson@apple.com
  • 2 edits in trunk/Source/WebCore

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.

11:30 AM Changeset in webkit [197576] by Chris Dumez
  • 3 edits
    2 adds in trunk

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.
11:26 AM Changeset in webkit [197575] by dbates@webkit.org
  • 12 edits
    3 moves
    3 adds in trunk/Source/WebCore

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.

11:13 AM Changeset in webkit [197574] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline inspector/model/remote-object.html for mac after r197539

Unreviewed test gardening.

  • platform/mac/inspector/model/remote-object-expected.txt:
11:09 AM Changeset in webkit [197573] by mmaxfield@apple.com
  • 8 edits
    2 adds in trunk

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.

11:05 AM Changeset in webkit [197572] by achristensen@apple.com
  • 4 edits in trunk/Source

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:
10:48 AM Changeset in webkit [197571] by Simon Fraser
  • 26 edits in trunk/LayoutTests

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:
10:30 AM Changeset in webkit [197570] by mmaxfield@apple.com
  • 4 edits
    4 adds in trunk

[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:]):

10:27 AM Changeset in webkit [197569] by adachan@apple.com
  • 2 edits in trunk/Source/WebCore

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):

10:01 AM Changeset in webkit [197568] by achristensen@apple.com
  • 3 edits
    1 add in trunk/Source/WebKit2

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:
9:58 AM Changeset in webkit [197567] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[check-webkit-style] Added checks for redundant virtual specifiers.
https://bugs.webkit.org/show_bug.cgi?id=155017

Patch by Konstantin Tokarev <Konstantin Tokarev> 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):

9:20 AM Changeset in webkit [197566] by Darin Adler
  • 165 edits in trunk

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.

9:02 AM Changeset in webkit [197565] by Darin Adler
  • 3 edits in trunk/LayoutTests

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.
8:55 AM Changeset in webkit [197564] by timothy@apple.com
  • 14 edits in trunk/Source

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:
8:47 AM Changeset in webkit [197563] by Darin Adler
  • 1432 edits in trunk

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.
5:26 AM Changeset in webkit [197562] by Carlos Garcia Campos
  • 1 edit in releases/WebKitGTK/webkit-2.4/Source/JavaScriptCore/interpreter/JSStack.cpp

Merge r193648 - Crashes on PPC64 due to mprotect() on address not aligned to the page size
https://bugs.webkit.org/show_bug.cgi?id=130237

Reviewed by Mark Lam.

Make sure that commitSize is at least as big as the page size.

  • interpreter/JSStack.cpp:

(JSC::commitSize):
(JSC::JSStack::JSStack):
(JSC::JSStack::growSlowCase):

  • interpreter/JSStack.h:
5:20 AM Changeset in webkit [197561] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.4/Source/JavaScriptCore

Merge r193648 - Crashes on PPC64 due to mprotect() on address not aligned to the page size
https://bugs.webkit.org/show_bug.cgi?id=130237

Reviewed by Mark Lam.

Make sure that commitSize is at least as big as the page size.

  • interpreter/JSStack.cpp:

(JSC::commitSize):
(JSC::JSStack::JSStack):
(JSC::JSStack::growSlowCase):

  • interpreter/JSStack.h:
5:17 AM WebKitGTK/2.4.x edited by Carlos Garcia Campos
(diff)
5:06 AM WebKitGTK/2.4.x edited by Carlos Garcia Campos
(diff)
5:04 AM Changeset in webkit [197560] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.4/Source/WTF

Merge r185863 - [WTF] Platform.h: use _ABI64 instead of _MIPS_SIM_ABI64 to determine MIPS N64
https://bugs.webkit.org/show_bug.cgi?id=145113

Patch by YunQiang Su <wzssyqa@gmail.com> on 2015-06-22
Reviewed by Csaba Osztrogonác.

  • wtf/Platform.h:
5:03 AM Changeset in webkit [197559] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.4/Source/WebCore

Merge r169665 - Initialize a char* that needs to be initialized.
<rdar://problem/15840022> and https://bugs.webkit.org/show_bug.cgi?id=133585

Reviewed by Mark Rowe.

r152134 (erroneously) removed this initialization.

  • platform/sql/SQLiteStatement.cpp:

(WebCore::SQLiteStatement::prepare): tail should start out initialized to 0.

5:01 AM Changeset in webkit [197558] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.4/Source/JavaScriptCore

Merge r167031 - Ensure that LLINT accessing of the ProtoCallFrame is big endian friendly.
<https://webkit.org/b/131449>

Reviewed by Mark Hahnenberg.

Change ProtoCallFrame::paddedArgCount to be of type uint32_t. The argCount
that it pads is of type int anyway. It doesn't need to be 64 bit. This
also makes it work with the LLINT which is loading it with a loadi
instruction.

We should add the PayLoadOffset to ProtoCallFrame::argCountAndCodeOriginValue
when loading the argCount.

  • interpreter/ProtoCallFrame.h:

(JSC::ProtoCallFrame::setPaddedArgCount):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
4:57 AM Changeset in webkit [197557] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.4/Source

Merge r176519 - Webkit2 doesnt build on powerpc 32 bits
https://bugs.webkit.org/show_bug.cgi?id=130837

Reviewed by Carlos Garcia Campos.

Check if libatomic is needed in order to use std::atomic, and add
it to the list of WebKit2 libraries.

  • PlatformGTK.cmake:
4:54 AM Changeset in webkit [197556] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.4

Merge r166232 - [EFL] Add ARM64 build support
https://bugs.webkit.org/show_bug.cgi?id=130506

Rubber stamped by Gyuyoung Kim.

.:

  • CMakeLists.txt: Set WTF_CPU_ARM64 when aarch64 is defined.

Source/ThirdParty:

  • leveldb/port/atomic_pointer.h: Set ARCH_CPU_ARM_FAMILY when aarch64 is defined.

Source/WTF:

  • wtf/Platform.h: Set WTF_CPU_ARM64 when aarch64 is defined.

Tools:

  • Scripts/webkitdirs.pm:

(isARM): Detect aarch64 as ARM.

4:51 AM Changeset in webkit [197555] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.4/Tools

Merge r164794 - [gtk-doc] UnicodeEncodeError: 'ascii' codec can't encode character
https://bugs.webkit.org/show_bug.cgi?id=128927

Reviewed by Philippe Normand.

Encode manually the data for sys.{stdout,stderr}.write.

  • gtk/gtkdoc.py:

(GTKDoc._run_command):

1:52 AM Changeset in webkit [197554] by gskachkov@gmail.com
  • 9 edits in trunk

[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:
1:29 AM Changeset in webkit [197553] by Antti Koivisto
  • 4 edits
    2 adds in trunk

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.
1:03 AM Changeset in webkit [197552] by akling@apple.com
  • 3 edits in trunk/Source/WebCore

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:
12:27 AM Changeset in webkit [197551] by youenn.fablet@crf.canon.fr
  • 7 edits in trunk/Source/WebCore

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:

Mar 3, 2016:

11:41 PM Changeset in webkit [197550] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Let XCode have its own way and also sort the file.

  • WebCore.xcodeproj/project.pbxproj:
10:36 PM Changeset in webkit [197549] by fpizlo@apple.com
  • 22 edits
    6 adds in trunk

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.
10:00 PM Changeset in webkit [197548] by Chris Dumez
  • 9 edits in trunk/Source

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):

9:49 PM Changeset in webkit [197547] by fpizlo@apple.com
  • 1 edit
    3 deletes in trunk/LayoutTests

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.
8:40 PM Changeset in webkit [197546] by commit-queue@webkit.org
  • 5 edits in trunk/Source/JavaScriptCore

[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):

8:02 PM Changeset in webkit [197545] by ggaren@apple.com
  • 16 edits
    4 adds in trunk/Source/bmalloc

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

7:43 PM Changeset in webkit [197544] by sbarati@apple.com
  • 5 edits
    1 add in trunk/Source/JavaScriptCore

[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):

7:19 PM Changeset in webkit [197543] by keith_miller@apple.com
  • 14 edits
    3 adds in trunk

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):

6:43 PM Changeset in webkit [197542] by fpizlo@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

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):

6:26 PM Changeset in webkit [197541] by Simon Fraser
  • 43 edits
    4 copies
    5 adds in trunk

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:
6:26 PM Changeset in webkit [197540] by Simon Fraser
  • 13 edits in trunk/LayoutTests

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:
6:25 PM Changeset in webkit [197539] by sbarati@apple.com
  • 20 edits
    1 add in trunk/Source/JavaScriptCore

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):

5:58 PM Changeset in webkit [197538] by bshafiei@apple.com
  • 5 edits in tags/Safari-602.1.21.0.1/Source

Versioning.

5:57 PM Changeset in webkit [197537] by timothy@apple.com
  • 2 edits in trunk/Source/WebInspectorUI

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.

5:56 PM Changeset in webkit [197536] by keith_miller@apple.com
  • 10 edits
    2 adds in trunk

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.
5:56 PM Changeset in webkit [197535] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.1.21.0.1

New tag.

5:24 PM Changeset in webkit [197534] by msaboff@apple.com
  • 12 edits in trunk

[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:
5:07 PM Changeset in webkit [197533] by sbarati@apple.com
  • 6 edits
    1 add in trunk/Source/JavaScriptCore

[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.):

4:54 PM Changeset in webkit [197532] by Gyuyoung Kim
  • 4 edits in trunk/Source/WebKit2

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):

4:47 PM Changeset in webkit [197531] by keith_miller@apple.com
  • 22 edits
    3 adds in trunk

[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:
4:39 PM Changeset in webkit [197530] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Selected range path component should be zero time corrected
https://bugs.webkit.org/show_bug.cgi?id=154950
<rdar://problem/24947022>

Reviewed by Timothy Hatcher.

Subtracts zero time from TimelineRange start and end values, and corrects
a cosmetic issue in TimelineRuler which showed selection handle tooltips
that weren't adjusted for the ruler's zero time.

  • UserInterface/Views/TimelineRecordingContentView.js:

(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):

  • UserInterface/Views/TimelineRuler.js:

(WebInspector.TimelineRuler.prototype._updateSelection):

4:33 PM Changeset in webkit [197529] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Events and Frames mode switch does not fully switch until first zoom
https://bugs.webkit.org/show_bug.cgi?id=154971
<rdar://problem/24955871>

Reviewed by Timothy Hatcher.

Switching modes toggles the visibility of the tree outline, which changes
the width of the overview's ruler, graphs, and scroll container. When the
view mode changes, the overview needs a forced "resize" layout.

  • UserInterface/Views/TimelineOverview.js:

(WebInspector.TimelineOverview.prototype._viewModeDidChange):

4:28 PM Changeset in webkit [197528] by rniwa@webkit.org
  • 9 edits
    4 adds in trunk

Source/WebCore:
Disallow custom elements inside a window-less documents
https://bugs.webkit.org/show_bug.cgi?id=154944
<rdar://problem/24944875>

Reviewed by Antti Koivisto.

Disallow custom elements inside a window-less documents such as the shared inert document of template elements
and the ones created by DOMImplementation.createDocument and DOMImplementation.createHTMLDocument.

Throw NotSupportedError in defineCustomElement when it's called in such a document as discussed in:
https://github.com/w3c/webcomponents/issues/369

Tests: fast/custom-elements/parser/parser-constructs-custom-element-in-document-write.html

fast/custom-elements/parser/parser-uses-registry-of-owner-document.html

  • bindings/js/JSDOMBinding.cpp:

(WebCore::throwNotSupportedError): Added.

  • bindings/js/JSDOMBinding.h:
  • bindings/js/JSDocumentCustom.cpp:

(WebCore::JSDocument::defineCustomElement): Throw NotSupportedError when the context object's document doesn't
have a browsing context (i.e. window-less).

  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): Replaced a FIXME with an assertion now that we
disallow instantiation of custom elements inside a template element.

LayoutTests:
Disallow custom elements inside template elements and share the registry for windowless documents
https://bugs.webkit.org/show_bug.cgi?id=154944
<rdar://problem/24944875>

Reviewed by Antti Koivisto.

Added various tests to ensure the custom elements registry is not shared between documents with
distinct browsing context (e.g. iframes) but shared among the ones that share a single browsing context
(e.g. documents created by DOMImplementation).

Also added a test case for defineCustomElement to ensure it throws NotSupportedError when it's called on
a template element's inert owner document as well as a basic test case for document.write.

  • fast/custom-elements/Document-defineCustomElement-expected.txt:
  • fast/custom-elements/Document-defineCustomElement.html: Added a new test case.
  • fast/custom-elements/parser/parser-constructs-custom-element-in-document-write-expected.txt: Added.
  • fast/custom-elements/parser/parser-constructs-custom-element-in-document-write.html: Added.
  • fast/custom-elements/parser/parser-uses-registry-of-owner-document-expected.txt: Added.
  • fast/custom-elements/parser/parser-uses-registry-of-owner-document.html: Added.
4:26 PM Changeset in webkit [197527] by achristensen@apple.com
  • 4 edits in trunk/Source

Move SPI to CFNetworkSPI.h
https://bugs.webkit.org/show_bug.cgi?id=154992

Reviewed by Andy Estes.

Source/WebCore:

  • platform/spi/cf/CFNetworkSPI.h:

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::applyBasicAuthorizationHeader):

4:21 PM Changeset in webkit [197526] by achristensen@apple.com
  • 11 edits in trunk/Source

Use CredentialStorage with NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=154939

Reviewed by Darin Adler.

Source/WebCore:

This makes the credential-based http tests pass when using NetworkSession.

  • platform/network/CredentialBase.h:

(WebCore::CredentialBase::encodingRequiresPlatformData):

  • platform/network/CredentialStorage.h:

WEBCORE_EXPORT more things that are newly used in WebKit2.

Source/WebKit2:

  • config.h:

Added compile-time flag to help us be able to keep track and remove this code when we can.

  • NetworkProcess/NetworkDataTask.h:

(WebKit::NetworkDataTask::pendingDownloadLocation):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::clearCachedCredentials):
(WebKit::NetworkProcess::ensurePrivateBrowsingSession):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::sessionID):

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::applyBasicAuthorizationHeader):
(WebKit::NetworkDataTask::NetworkDataTask):
Use a credential storage and preemptively apply basic authentication headers if we have credentials from the storage.
This is analogous to code in ResourceHandle::createNSURLConnection.

(WebKit::NetworkDataTask::didReceiveChallenge):
Make this look more like ResourceHandle::didReceiveAuthenticationChallenge.
The call to tryPasswordBasedAuthentication was moved from the delegate callback to here.

(WebKit::NetworkDataTask::willPerformHTTPRedirection):
Use credentials from the credential storage if they exist. This is analogous to code in ResourceHandle::willSendRequest.

(WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
Use credentials from the credential storage if they exist. This is analogous to code in ResourceHandle::tryHandlePasswordBasedAuthentication.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
If we are given a credential with CredentialPersistenceForSession, put it in the credential storage and give
CFNetwork a credential with CredentialPersistenceNone so it won't automatically be used again until the credential
storage says its ok to use again. This gives us the ability to clear session credentials when logout credentials are used.
This is analogous to code in ResourceHandle::receivedCredential.

(WebKit::NetworkSession::defaultSession):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::~NetworkSession):
(WebKit::NetworkSession::dataTaskForIdentifier):
(WebKit::NetworkSession::clearCredentials): Deleted.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::clearCachedCredentials):
(WebKit::WebProcess::focusedWebPage):
We no longer need to clear credentials from the NSURLSessions because we don't store session credentials in them.
Instead, calling CredentialStorage.clearCredentials is sufficient.

3:57 PM Changeset in webkit [197525] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK] Unreviewed fix after r197505 (Run the run-benchmark script on the performance bot.)
https://bugs.webkit.org/show_bug.cgi?id=154595

Unreviewed fix after r197505.

  • BuildSlaveSupport/build.webkit.org-config/master.cfg:

(RunBenchmarkTests.start):

3:55 PM Changeset in webkit [197524] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Subpixel rendering: Make collapsed borders painting subpixel aware.
https://bugs.webkit.org/show_bug.cgi?id=154980

Reviewed by David Hyatt.

This patch enables collapsed borders with odd pixel width paint on subpixel position.
Currently borders with odd pixels are split at integral position so that border-width: 3px;
paints 1px on the left(top) and 2px on the right(bottom) side. With this patch
we paint 1.5px on both sides(on 2x display).

Source/WebCore:

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

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::paintCollapsedBorders):

LayoutTests:

  • fast/table/hidpi-collapsed-border-with-odd-pixel-width-expected.html: Added.
  • fast/table/hidpi-collapsed-border-with-odd-pixel-width.html: Added.
3:49 PM Changeset in webkit [197523] by dbates@webkit.org
  • 6 edits
    1 add in trunk

Add unit tests for WTF::OptionSet
https://bugs.webkit.org/show_bug.cgi?id=154925
<rdar://problem/24964211>

Reviewed by Darin Adler.

Source/WTF:

  • wtf/CMakeLists.txt: Add header OptionSet.h to the list of WTF headers.
  • wtf/OptionSet.h: Use in-class initialization to initialize m_storage and declare

the trivial constexpr constructor as default.
(WTF::OptionSet::OptionSet): For convenience add a constructor that takes a std::initializer_list.
This code was written by Anders Carlsson.

Tools:

Add tests to ensure that we do not regress the behavior of WTF::OptionSet.

  • TestWebKitAPI/CMakeLists.txt: Add file TestWebKitAPI/Tests/WTF/OptionSet.cpp.
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.
  • TestWebKitAPI/Tests/WTF/OptionSet.cpp: Added.

(TestWebKitAPI::TEST):

3:42 PM Changeset in webkit [197522] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601-branch/Tools

Merge r188607. rdar://problem/24937998

3:32 PM Changeset in webkit [197521] by bshafiei@apple.com
  • 2 edits in tags/Safari-602.1.21/Source/WebCore

Roll out r197149.

3:30 PM Changeset in webkit [197520] by fpizlo@apple.com
  • 8 edits
    3 adds in trunk

DFG should be able to compile StringReplace
https://bugs.webkit.org/show_bug.cgi?id=154979

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Adds support for StringReplace to the DFG tier. This is a 3% speed-up on Octane/regexp.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::speculateFinalObject):
(JSC::DFG::SpeculativeJIT::speculateRegExpObject):
(JSC::DFG::SpeculativeJIT::speculateObjectOrOther):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • jit/JITOperations.h:

LayoutTests:

Add a microbenchmark for a case of StringReplace that we hadn't covered with a microbenchmark
yet: using something absurd for the replace value. This is interesting for implementing the
32_64 version of StringReplace, which gets really weird in the absurd case because of how it
consumes the entire register file while making the call on x86-32.

  • js/regress/script-tests/string-replace-generic.js: Added.
  • js/regress/string-replace-generic-expected.txt: Added.
  • js/regress/string-replace-generic.html: Added.
1:49 PM Changeset in webkit [197519] by hyatt@apple.com
  • 7 edits
    10 adds in trunk

Add support for the "last" value of hanging-punctuation
https://bugs.webkit.org/show_bug.cgi?id=154977

Reviewed by Darin Adler and Simon Fraser.

Source/WebCore:

New tests in fast/text.

This patch adds support for the new "last" value and also fixes up both
"first" and "last" to work with leading and trailing whitespace that ends
up getting collapsed away.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::inlineAncestorHasStartBorderPaddingOrMargin):
(WebCore::inlineAncestorHasEndBorderPaddingOrMargin):
(WebCore::isLastInFlowRun):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):

  • rendering/RenderText.cpp:

(WebCore::isHangablePunctuationAtLineEnd):
(WebCore::RenderText::hangablePunctuationStartWidth):
(WebCore::RenderText::hangablePunctuationEndWidth):
(WebCore::RenderText::firstCharacterIndexStrippingSpaces):
(WebCore::RenderText::lastCharacterIndexStrippingSpaces):
(WebCore::RenderText::trimmedPrefWidths):

  • rendering/RenderText.h:
  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::handleText):

LayoutTests:

  • fast/text/hanging-punctuation-first-and-last-together-expected.html: Added.
  • fast/text/hanging-punctuation-first-and-last-together.html: Added.
  • fast/text/hanging-punctuation-first-ws-expected.html: Added.
  • fast/text/hanging-punctuation-first-ws.html: Added.
  • fast/text/hanging-punctuation-last-expected.html: Added.
  • fast/text/hanging-punctuation-last-rtl-expected.html: Added.
  • fast/text/hanging-punctuation-last-rtl.html: Added.
  • fast/text/hanging-punctuation-last-ws-expected.html: Added.
  • fast/text/hanging-punctuation-last-ws.html: Added.
  • fast/text/hanging-punctuation-last.html: Added.
1:46 PM Changeset in webkit [197518] by aestes@apple.com
  • 12 edits in trunk/Source

Adopt CFNetwork storage partitioning SPI
https://bugs.webkit.org/show_bug.cgi?id=154957
rdar://problem/23614620

Reviewed by Darin Adler.

Source/WebCore:

Adopt CFNetwork SPI for creating storage partitions. If Settings::cookieStoragePartitioningEnabled() is true,
create cookie storage partitions for third-party contexts. This feature is disabled by default.

No new tests. Test support is tracked by <https://webkit.org/b/154958>.

  • page/Settings.cpp:

(WebCore::Settings::setCookieStoragePartitioningEnabled): Controls whether storage partitioning for cookies is enabled.

  • page/Settings.h:

(WebCore::Settings::cookieStoragePartitioningEnabled):

  • platform/network/NetworkStorageSession.h:
  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::cookieStoragePartition): Computes a storage partition identifier by determining the top
privately-controlled domain of the cookie's first-party (main frame document) URL, then determining whether the
cookie's document hostname is a subdomain of it. If is is not, the first-party top domain is the partition name.
Otherwise, there is no partition name.

  • platform/network/mac/CookieJarMac.mm:

(WebCore::applyPartitionToCookies): Returns a deep copy of the given cookie array after adding a storage
partition property to each copied cookie.
(WebCore::cookiesInPartitionForURL): Returns cookies for the partition computed by the given URLs. If no
partition can be determined, nil is returned.
(WebCore::cookiesForURL): Returns cookiesInPartitionForURL() if non-nil, otherwise returns wkHTTPCookiesForURL().
(WebCore::cookiesForSession): Started calling cookiesForURL().
(WebCore::setCookiesFromDOM): Called applyPartitionToCookies() if a partition can be computed from the given URLs.
(WebCore::getRawCookies): Started calling cookiesForURL().

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::createNSURLConnection): Computed the storage partition identifier for the new request.
If non-empty, set it as a property on the NSURLRequest where CFNetwork knows to find it.

  • platform/spi/cf/CFNetworkSPI.h: Declare new SPI for building with the public SDK.

Source/WebKit2:

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTask::NetworkDataTask): Computed the storage partition identifier for the new session task.
If non-empty, set it using a NSURLSessionTask SPI.

Source/WTF:

  • wtf/Platform.h: Defined HAVE_CFNETWORK_STORAGE_PARTITIONING.
1:43 PM Changeset in webkit [197517] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601-branch/LayoutTests

Merge r195688. None

1:25 PM Changeset in webkit [197516] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebKit2

[WK2] testRunner.setPrivateBrowsingEnabled doesn't work with NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=115274

Patch by Alex Christensen <achristensen@webkit.org> on 2016-03-03
Reviewed by Darin Adler.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::blobSize):
(WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkProcess.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setPrivateBrowsingEnabled):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::destroyPrivateBrowsingSession):
(WebKit::WebProcess::ensureLegacyPrivateBrowsingSessionInNetworkProcess):
(WebKit::WebProcess::pluginProcessConnectionManager):

  • WebProcess/WebProcess.h:
12:34 PM Changeset in webkit [197515] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Assertion Failed: Cannot show timeline because it does not belong to the shown recording. – "overview"
https://bugs.webkit.org/show_bug.cgi?id=154972
<rdar://problem/24956233>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/TimelineTabContentView.js:

(WebInspector.TimelineTabContentView.prototype._showTimelineViewForType):
Just show the overview if the recording has no timeline of the given type.

12:26 PM Changeset in webkit [197514] by jonlee@apple.com
  • 3 edits
    13 adds in trunk/PerformanceTests

Update image test
https://bugs.webkit.org/show_bug.cgi?id=154962

Rubber-stamped by Darin Adler.

  • Animometer/tests/master/image-data.html: Make each canvas have a compositing layer.
  • Animometer/tests/master/resources/image-data.js:

(initialize): Update to load multiple images serially.
(_loadImage):
(tune): Use display instead of visibility. When showing an element anew, move it somewhere else.
(_createTestElement): Set up the element, refactor out placement of element to _refreshElement.
(_refreshElement): Place element in a tile grid.
(animate):
(_getRandomNeighboringPixelIndex): Use a more conservative distribution to make the effect last a little longer.

  • Animometer/tests/master/resources/compass.svg: Added.
  • Animometer/tests/master/resources/console.svg: Added.
  • Animometer/tests/master/resources/contribute.svg: Added.
  • Animometer/tests/master/resources/debugger.svg: Added.
  • Animometer/tests/master/resources/inspector.svg: Added.
  • Animometer/tests/master/resources/layout.svg: Added.
  • Animometer/tests/master/resources/performance.svg: Added.
  • Animometer/tests/master/resources/script.svg: Added.
  • Animometer/tests/master/resources/shortcuts.svg: Added.
  • Animometer/tests/master/resources/standards.svg: Added.
  • Animometer/tests/master/resources/storage.svg: Added.
  • Animometer/tests/master/resources/styles.svg: Added.
  • Animometer/tests/master/resources/timeline.svg: Added.
11:46 AM Changeset in webkit [197513] by beidson@apple.com
  • 4 edits in trunk/LayoutTests

storage/indexeddb/delete-in-upgradeneeded-close-in-open-success.html flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=154747

Reviewed by Alex Christensen.

This callback coming out of order like this is okay, so the test should just allow it.

It makes sense that the flake is WK2-only, since WK1 has a much more well defined order
with thread-hopping versus process-hopping.

  • storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-expected.txt:
  • storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private-expected.txt:
  • storage/indexeddb/resources/delete-in-upgradeneeded-close-in-open-success.js:
11:18 AM Changeset in webkit [197512] by sbarati@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

SetPrototypeOf? isn't properly implemented everywhere
https://bugs.webkit.org/show_bug.cgi?id=154943

Reviewed by Benjamin Poulain.

We were copy-pasting implememntation bits that belong in OrdinarySetPrototypeOf
in a few different places that call O.SetPrototypeOf?(v)
rather than having those bits in OrdinarySetPrototypeOf itself.
We need to put those copy-pasted bits into OrdinarySetPrototypeOf
and not the call sites of O.SetPrototypeOf?(v) because
O.SetPrototypeOf?(v) won't always call into OrdinarySetPrototypeOf.
This is needed for correctness because this behavior is now observable
with the ES6 Proxy object.

  • runtime/ClassInfo.h:
  • runtime/JSCell.cpp:

(JSC::JSCell::isExtensible):
(JSC::JSCell::setPrototype):

  • runtime/JSCell.h:
  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncProtoSetter):

  • runtime/JSObject.cpp:

(JSC::JSObject::setPrototypeDirect):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::setPrototype):
(JSC::JSObject::allowsAccessFrom):

  • runtime/JSObject.h:

(JSC::JSObject::mayInterceptIndexedAccesses):

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorSetPrototypeOf):

  • runtime/ReflectObject.cpp:

(JSC::reflectObjectSetPrototypeOf):

10:34 AM Changeset in webkit [197511] by Manuel Rego Casasnovas
  • 2 edits in trunk/Source/WebCore

[css-grid] Fix order of grid shorthands in CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=154915

Reviewed by Darin Adler.

The order of columns and rows in grid and grid-template shorthands
has been swapped recently (r196906 & r196934).
However the order was not updated in CSSPropertyNames.in file.

  • css/CSSPropertyNames.in:
10:30 AM Changeset in webkit [197510] by beidson@apple.com
  • 2 edits in trunk/LayoutTests

storage/indexeddb/intversion-open-in-upgradeneeded.html is flaky on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=154706

Rubberstamped by Alex Christensen.

This test was fixed by http://trac.webkit.org/changeset/197474.

Unskipping it now.

  • platform/mac-wk2/TestExpectations:
9:40 AM Changeset in webkit [197509] by ap@apple.com
  • 3 edits in trunk/Source/WebCore

AllInOne build fix.

  • rendering/RenderFlexibleBox.cpp:
  • rendering/RenderGrid.cpp:

Don't have two static functions with the same name.

9:28 AM Changeset in webkit [197508] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Unreviewed, rolling out r197442.
https://bugs.webkit.org/show_bug.cgi?id=154967

Broke tests, and also uses a wrong approach (Requested by ap
on #webkit).

Reverted changeset:

"Disable FTL JIT testing on 32-bit JSC tester bots"
https://bugs.webkit.org/show_bug.cgi?id=154858
http://trac.webkit.org/changeset/197442

9:25 AM Changeset in webkit [197507] by Chris Dumez
  • 15 edits in trunk

Drop [TreatNullAs=EmptyString] from URL interface attributes
https://bugs.webkit.org/show_bug.cgi?id=154951

Reviewed by Darin Adler.

Source/WebCore:

Drop [TreatNullAs=EmptyString] from URL interface attributes to match
the specification:

Firefox and Chrome both already follow the specification and convert
null to the "null" string.

No new tests, already covered by existing tests.

  • html/URLUtils.idl:

LayoutTests:

Update existing tests now that URL interface attributes no longer treat
null as the empty string.

  • fast/dom/DOMURL/set-href-attribute-hash-expected.txt:
  • fast/dom/DOMURL/set-href-attribute-hash.html:
  • fast/dom/DOMURL/set-href-attribute-host-expected.txt:
  • fast/dom/DOMURL/set-href-attribute-host.html:
  • fast/dom/DOMURL/set-href-attribute-hostname-expected.txt:
  • fast/dom/DOMURL/set-href-attribute-hostname.html:
  • fast/dom/DOMURL/set-href-attribute-pathname-expected.txt:
  • fast/dom/DOMURL/set-href-attribute-pathname.html:
  • fast/dom/DOMURL/set-href-attribute-protocol-expected.txt:
  • fast/dom/DOMURL/set-href-attribute-protocol.html:
  • fast/dom/DOMURL/set-href-attribute-search-expected.txt:
  • fast/dom/DOMURL/set-href-attribute-search.html:
9:09 AM Changeset in webkit [197506] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

[TextureMapper] Use RGBA format for textures attached to framebuffers
https://bugs.webkit.org/show_bug.cgi?id=154965

Patch by Miguel Gomez <magomez@igalia.com> on 2016-03-03
Reviewed by Žan Doberšek.

Use RGBA format when allocating textures that will be used as framebuffer
attachments. This means adding a new flag to BitmapTexture and modifying
BitmapTextureGL to use the appropriate format according to the flag. Also,
BitmapTexturePool needs to use two vectors to handle both types of textures
separately, as we want to avoid constantly switching the format of a reused
texture.

No new tests since the behavior change is covered by existing tests.

  • platform/graphics/texmap/BitmapTexture.h: Add new flag.
  • platform/graphics/texmap/BitmapTextureGL.cpp:

(WebCore::BitmapTextureGL::BitmapTextureGL): Receive flags on constructor and use RGBA
when the FBOAttachment flag is enabled.
(WebCore::BitmapTextureGL::applyFilters): Use FBOAttachemt flag to request a texture.

  • platform/graphics/texmap/BitmapTextureGL.h: Add flags to the constructor.
  • platform/graphics/texmap/BitmapTexturePool.cpp: Add a new vector of textures to hold

those in RGBA format.
(WebCore::BitmapTexturePool::acquireTexture): Return a texture for the usage specified
in the incoming flags.
(WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired): Release textures from
both vectors.
(WebCore::BitmapTexturePool::createTexture): Pass the usage flag when creating a new
texture.

  • platform/graphics/texmap/BitmapTexturePool.h: Add new texture vector and add flags to

the needed headers.

  • platform/graphics/texmap/TextureMapper.cpp:

(WebCore::TextureMapper::acquireTextureFromPool): Pass the received flags to the BitmapTexturePool.

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::paintIntoSurface): Use FBOAttachemt flag to request a texture.

8:40 AM Changeset in webkit [197505] by clopez@igalia.com
  • 6 edits in trunk/Tools

[GTK] Run the run-benchmark script on the performance bot.
https://bugs.webkit.org/show_bug.cgi?id=154595

Reviewed by Carlos Garcia Campos.

  • BuildSlaveSupport/build.webkit.org-config/master.cfg: Add new RunBenchmarkTests step on the perf bots (only for the GTK+ port at this moment).

(RunBenchmarkTests):
(RunBenchmarkTests.start):
(RunBenchmarkTests.getText):
(RunBenchmarkTests.getText2):
(BuildAndPerfTestFactory.init):
(DownloadAndPerfTestFactory.init):

  • BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py: Add new test for RunBenchmarkTests and update expected steps of GTK+ perf bot.

(RunBenchmarkTest):
(RunBenchmarkTest.assertResults):
(RunBenchmarkTest.test_success):
(RunBenchmarkTest.test_tests_failed):

  • Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Log both the current iteration as also the total iterations for the current benchmark/plan.

(BenchmarkRunner._run_benchmark):

  • Scripts/webkitpy/benchmark_runner/browser_driver/gtk_minibrowser_driver.py: Use python logging also for errors.

(GTKMiniBrowserDriver.close_browsers):

  • Scripts/webkitpy/benchmark_runner/run_benchmark.py: Implement support for running all available benchmark plans.

(parse_args):
(start):
(main):

6:59 AM WebKitGTK/2.4.x edited by tpopela@redhat.com
(diff)
6:09 AM Changeset in webkit [197504] by Gyuyoung Kim
  • 3 edits in trunk/Tools

[EFL] Remove u-szeged.hu SVN mirror in EFL perf bot
https://bugs.webkit.org/show_bug.cgi?id=154960

Reviewed by Csaba Osztrogonác.

  • BuildSlaveSupport/build.webkit.org-config/config.json: Remove szeged univ's svn mirror.
  • BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
4:15 AM WebKitGTK/2.4.x edited by berto@igalia.com
(diff)
4:05 AM WebKitGTK/2.4.x edited by berto@igalia.com
(diff)
4:00 AM WebKitGTK/2.4.x edited by berto@igalia.com
(diff)
3:05 AM Changeset in webkit [197503] by jfernandez@igalia.com
  • 57 edits in trunk

[CSS Box Alignment] New CSS Value 'normal' for Content Alignment
https://bugs.webkit.org/show_bug.cgi?id=154282

Source/WebCore:

Reviewed by David Hyatt.

The Box Alignment specification defines a new value 'normal' to be used
as default for the different layout models, which will define the
specific behavior for each case. This patch adds a new CSS value in the
parsing logic and adapts the Content Alignment properties to the new
value.

The 'auto' value is no longer valid and the Computed Value will be
always the specified value. Hence, I removed the StyleResolver logic
because is not required now; the specific behavior of the 'normal'
value will be resolved at layout time.

Computed value of both align-content and justify-content is the
specified value, we don't have to resolve any 'auto' value now.

Additionally, this patch updates the layout logic as well, for both
Flexbox and Grid layout models.

No new tests, since we only need to rebaseline those test cases
affected by the new default computed value.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Deleted.
(WebCore::CSSComputedStyleDeclaration::copyProperties): Deleted.
(WebCore::nodeOrItsAncestorNeedsStyleRecalc): Deleted.
(WebCore::isFlexOrGrid): Deleted.
(WebCore::ComputedStyleExtractor::customPropertyValue): Deleted.

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseContentDistributionOverflowPosition):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ContentPosition):

  • rendering/RenderFlexibleBox.cpp:

(WebCore::normalValueBehavior):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::layoutColumnReverse):
(WebCore::RenderFlexibleBox::alignFlexLines):
(WebCore::alignContentSpaceBetweenChildren): Deleted.

  • rendering/RenderGrid.cpp:

(WebCore::normalValueBehavior):
(WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::resolveContentDistributionFallback):
(WebCore::contentDistributionOffset):
(WebCore::RenderGrid::computeContentPositionAndDistributionOffset):

  • rendering/style/RenderStyle.cpp:

(WebCore::resolvedContentAlignmentPosition):
(WebCore::resolvedContentAlignmentDistribution):
(WebCore::RenderStyle::resolvedJustifyContentPosition):
(WebCore::RenderStyle::resolvedJustifyContentDistribution):
(WebCore::RenderStyle::resolvedAlignContentPosition):
(WebCore::RenderStyle::resolvedAlignContentDistribution):

  • rendering/style/RenderStyle.h:
  • rendering/style/RenderStyleConstants.h:

LayoutTests:

The Box Alignment specification defines a new value 'normal' to be used
as default for the different layout models, which will define the
specific behavior for each case. This patch adds a new CSS value in the
parsing logic and adapts the Content Alignment properties to the new
value.

Since the 'normal' vlaue, initial/default for both justify-content
and align-content CSS properties, behaves now as 'stretch' instead
of o'start' we have to rebaseline those tests affected by the new
default value.

Reviewed by David Hyatt.

  • css3/flexbox/css-properties-expected.txt:
  • css3/flexbox/css-properties.html:
  • css3/parse-align-content-expected.txt:
  • css3/parse-align-content.html:
  • css3/parse-justify-content-expected.txt:
  • css3/parse-justify-content.html:
  • css3/resources/alignment-parsing-utils.js:

(checkBadValues):

  • fast/css-grid-layout/auto-content-resolution-columns.html:
  • fast/css-grid-layout/grid-auto-columns-rows-update.html:
  • fast/css-grid-layout/grid-auto-flow-resolution.html:
  • fast/css-grid-layout/grid-columns-rows-get-set-multiple.html:
  • fast/css-grid-layout/grid-columns-rows-get-set.html:
  • fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html:
  • fast/css-grid-layout/grid-content-sized-columns-resolution.html:
  • fast/css-grid-layout/grid-dynamic-updates-relayout.html:
  • fast/css-grid-layout/grid-element-min-max-width.html:
  • fast/css-grid-layout/grid-element-repeat-get-set.html:
  • fast/css-grid-layout/grid-initialize-span-one-items.html:
  • fast/css-grid-layout/grid-item-addition-auto-placement-update.html:
  • fast/css-grid-layout/grid-item-addition-track-breadth-update.html:
  • fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html:
  • fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-ltr.html:
  • fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-rtl.html:
  • fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-ltr.html:
  • fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-rtl.html:
  • fast/css-grid-layout/grid-item-multiple-minmax-content-resolution.html:
  • fast/css-grid-layout/grid-item-named-grid-area-resolution.html:
  • fast/css-grid-layout/grid-item-negative-indexes.html:
  • fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution.html:
  • fast/css-grid-layout/grid-item-removal-auto-placement-update.html:
  • fast/css-grid-layout/grid-item-removal-track-breadth-update.html:
  • fast/css-grid-layout/grid-update-sizes-after-distributing-all.html:
  • fast/css-grid-layout/implicit-columns-auto-resolution.html:
  • fast/css-grid-layout/implicit-position-dynamic-change.html:
  • fast/css-grid-layout/mark-as-infinitely-growable.html:
  • fast/css-grid-layout/maximize-tracks-definite-indefinite-width.html:
  • fast/css-grid-layout/minmax-spanning-resolution-columns.html:
  • fast/css-grid-layout/named-grid-line-get-set.html:
  • fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html:
  • fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html:
  • fast/css-grid-layout/percent-intrinsic-track-breadth.html:
  • fast/css-grid-layout/percent-track-breadths-regarding-container-size.html:
  • fast/css-grid-layout/resources/grid-definitions-parsing-utils.js:

(checkGridTemplatesSetJSValues):

  • fast/css-grid-layout/resources/grid-template-shorthand-parsing-utils.js:

(checkGridDefinitionsSetJSValues):
(testGridDefinitionsSetBadJSValues):

  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • svg/css/getComputedStyle-basic-expected.txt:
2:53 AM WebKitGTK/2.4.x edited by tpopela@redhat.com
(diff)
2:48 AM Changeset in webkit [197502] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

Slider thumb style should not depend on renderers
https://bugs.webkit.org/show_bug.cgi?id=154961

Reviewed by Andreas Kling.

Currently slider thumb pseudo id is computed based on host element renderer.
Style is the input for building a render tree and should be computable without having one.

  • html/shadow/SliderThumbElement.cpp:

(WebCore::SliderThumbElement::hostInput):
(WebCore::SliderThumbElement::customStyleForRenderer):

Compute pseudo id based on the host style.
Return nullptr so style recalc will otherwise proceed normally.

(WebCore::SliderThumbElement::shadowPseudoId):
(WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren):
(WebCore::SliderContainerElement::SliderContainerElement):
(WebCore::SliderContainerElement::create):
(WebCore::SliderContainerElement::createElementRenderer):
(WebCore::SliderContainerElement::customStyleForRenderer):

Here too.

(WebCore::SliderContainerElement::shadowPseudoId):
(WebCore::sliderThumbShadowPseudoId): Deleted.
(WebCore::mediaSliderThumbShadowPseudoId): Deleted.

  • html/shadow/SliderThumbElement.h:
2:23 AM Changeset in webkit [197501] by Manuel Rego Casasnovas
  • 4 edits in trunk/Source/WebCore

[css-grid] Simplify method to resolve auto-placed items
https://bugs.webkit.org/show_bug.cgi?id=154911

Reviewed by Sergio Villar Senin.

Refactor the method to resolve auto-placed items
as we're only interested in knowing the span size.

Adapt the calls to use the span size instead of a GridSpan.

No new tests, no change of behavior.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):

  • rendering/style/GridResolvedPosition.cpp:

(WebCore::GridResolvedPosition::spanSizeForAutoPlacedItem):
(WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
Renamed to spanSizeForAutoPlacedItem().

  • rendering/style/GridResolvedPosition.h:
1:12 AM Changeset in webkit [197500] by achristensen@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix Windows build after r197489.

  • jsc.cpp:
12:22 AM Changeset in webkit [197499] by jonlee@apple.com
  • 4 edits in trunk/PerformanceTests

Add some new controllers, and refine tests
https://bugs.webkit.org/show_bug.cgi?id=154914

Reviewed by Simon Fraser.

Improve tests.

  • Animometer/tests/master/focus.html: Move each particle into a layer. Put the particle

in a container element. Expand the container element by the max blur radius, and clip
overflow. This way, when the blur is applied, it avoids causing layer resizes.

  • Animometer/tests/master/resources/focus.js:

(FocusElement.Utilities.createClass): Create a container element, and put the particle
inside.
(hide): Set display:none.
(show): Set display:block.
(animate): Apply filters to the container element.
(FocusStage.call.initialize): Instead of inserting and removing elements from the DOM,
keep them in the stage, but set the display style instead. Use this._offsetIndex to
keep track of which elements are displayed.
(FocusStage.call.animate): Move some calculations around to avoid doing unneeded math.
(FocusStage.call.getBlurValue): Make sure elements are always blurred.
(FocusStage.call.getOpacityValue): Make sure elements have some opacity.

  • Animometer/tests/master/resources/multiply.js: Have the particles on the edge of the

stage appear less black when the complexity gets large enough.
(tune): Have this._distanceFactor calculate the factor. Avoid calculating square root each
frame.

12:15 AM Changeset in webkit [197498] by jonlee@apple.com
  • 7 edits in trunk/PerformanceTests

Add some new controllers, and refine tests
https://bugs.webkit.org/show_bug.cgi?id=154914

Reviewed by Simon Fraser.

Add a controller that centers around 30 fps instead of 60 fps.

  • Animometer/developer.html: Add a new option.
  • Animometer/resources/debug-runner/animometer.js:
  • Animometer/resources/runner/animometer.js:

(this._processData.findRegression): When calculating the complexity-frameLength regression,
check the controller, and use a 30 fps baseline if needed.

  • Animometer/resources/statistics.js:

(Regression.Utilities.createClass): Update to allow clients to specify the baseline
frame length.

  • Animometer/tests/resources/main.js:

(tune): Override some of the constants in RampController. Move those constants out for
easier reading.

Add a fixed controller, with no step.

  • Animometer/developer.html: Add a controller that takes no step.
  • Animometer/resources/debug-runner/animometer.js:
  • Animometer/tests/resources/main.js:

(Rotater.Utilities.createClass):

Switch to ramp controller as default.

  • Animometer/developer.html: Increase the test length to 20 seconds.
  • Animometer/resources/debug-runner/animometer.js: Rename the "adjustment" field to "controller"

since that is a more accurate description.

  • Animometer/resources/debug-runner/graph.js:
  • Animometer/resources/runner/animometer.js: Update preferences for release suite.

Mar 2, 2016:

11:44 PM Changeset in webkit [197497] by Chris Dumez
  • 3 edits
    2 adds in trunk

HTMLFormElement's named property getter does not return a RadioNodelist
https://bugs.webkit.org/show_bug.cgi?id=154949

Reviewed by Ryosuke Niwa.

Source/WebCore:

HTMLFormElement's named property getter should return a RadioNodeList
when there are several matches:
https://html.spec.whatwg.org/multipage/forms.html#the-form-element

Previously, WebKit returned a generic NodeList. As a result, users
cannot create a white-and-gold hat in the MAKE A HAT GREAT AGAIN
section at:
https://www.washingtonpost.com/news/the-fix/wp/2015/10/06/hey-lets-all-make-our-own-donald-trump-hats/

Chrome and Firefox already match the specification. Edge will soon.

Test: fast/dom/HTMLFormElement/named-property-getter-radionodelist.html

  • bindings/js/JSHTMLFormElementCustom.cpp:

(WebCore::JSHTMLFormElement::nameGetter):

LayoutTests:

Add layout test to confirm that HTMLFormElement's named property getter
does indeed return a RadioNodeList when there are several matches.

  • fast/dom/HTMLFormElement/named-property-getter-radionodelist-expected.txt: Added.
  • fast/dom/HTMLFormElement/named-property-getter-radionodelist.html: Added.
11:36 PM Changeset in webkit [197496] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit2

Properly cancel downloads when using NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=154893

Patch by Alex Christensen <achristensen@webkit.org> on 2016-03-02
Reviewed by Brady Eidson.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::Download):

  • NetworkProcess/Downloads/Download.h:
  • NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:

(WebKit::Download::cancel):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):

10:37 PM Changeset in webkit [197495] by fred.wang@free.fr
  • 2 edits in trunk/Tools

[jhbuild] Remove LLVM dependency.
https://bugs.webkit.org/show_bug.cgi?id=153274

Patch by Frederic Wang <fwang@igalia.com> on 2016-03-03
Reviewed by Carlos Garcia Campos.

  • gtk/jhbuild.modules:
10:31 PM Changeset in webkit [197494] by Chris Dumez
  • 5 edits in trunk

Drop [TreatNullAs=LegacyNullString] from HTMLBaseElement.href
https://bugs.webkit.org/show_bug.cgi?id=154952

Reviewed by Ryosuke Niwa.

Source/WebCore:

Drop [TreatNullAs=LegacyNullString] from HTMLBaseElement.href as this
does not match the specification:

Firefox and Chrome both convert null to the string "null".

No new tests, updated the following existing test:
fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document.html

  • html/HTMLBaseElement.idl:

LayoutTests:

Update existing layout test now that HTMLBaseElement.href setter no
longer treats null as the empty string.

  • fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document-expected.txt:
  • fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document.html:
10:26 PM Changeset in webkit [197493] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Update MemoryTimelineView for new ruler height
https://bugs.webkit.org/show_bug.cgi?id=153904
<rdar://problem/24517259>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/MemoryTimelineView.css:

(.timeline-view.memory > .content > .details > .timeline-ruler):
(.timeline-view.memory > .content > .details > .subtitle):
Adjust ruler top and subtitle padding for shorter timeline ruler.
Also reduced padding in the Categories heading area to tighen up
the layout a bit.

9:58 PM Changeset in webkit [197492] by fpizlo@apple.com
  • 7 edits
    1 add in trunk/Source/JavaScriptCore

RegExpExec/RegExpTest should not unconditionally speculate cell
https://bugs.webkit.org/show_bug.cgi?id=154901

Reviewed by Benjamin Poulain.

This is a three part change. It all started with a simple goal: end the rage-recompiles in
Octane/regexp by enabling the DFG and FTL to do untyped RegExpExec/RegExpTest. This keeps us
in the optimized code when you do a regexp match on a number, for example.

While implementing this, I realized that DFGOperations.cpp was bad at exception checking. When
it did check for exceptions, it used exec->hadException() instead of vm.exception(). So I
fixed that. I also made sure that the regexp operations checked for exception after doing
toString().

Unfortunately, the introduction of untyped RegExpExec/RegExpTest caused a regression on
Octane/regexp. This was because we were simultaneously scheduling replacement and OSR compiles
of some large functions with the FTL JIT. The OSR compiles were not useful. This was a
regression from the previous changes to make OSR compiles happen sooner. The problem is that
this change also removed the throttling of OSR compiles even in those cases where we suspect
that replacement is more likely. This patch reintroduces that throttling, but only in the
replacement path.

This change ends up being neutral overall.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • 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):
(JSC::FTL::DFG::LowerDFGToB3::compileNewRegexp):

  • tests/stress/regexp-exec-effect-after-exception.js: Added.
9:29 PM Changeset in webkit [197491] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] JSCell_freeListNext and JSCell_structureID are considered not overlapping
https://bugs.webkit.org/show_bug.cgi?id=154947

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

This bug was discovered while testing https://bugs.webkit.org/show_bug.cgi?id=154894.

The problem was that JSCell_freeListNext and JSCell_structureID were
considered as disjoint. When reordering instructions, the scheduler
could move the write of the StructureID first to reduce dependencies.
This would erase half of JSCell_freeListNext before we get a chance
to load the value.

This patch changes the hierarchy to make sure nothing is written
until JSCell_freeListNext is processed.

All credits for this patch go to Filip.

  • ftl/FTLAbstractHeapRepository.cpp:

(JSC::FTL::AbstractHeapRepository::AbstractHeapRepository):

  • ftl/FTLAbstractHeapRepository.h:
9:19 PM Changeset in webkit [197490] by commit-queue@webkit.org
  • 8 edits in trunk/Source/JavaScriptCore

[JSC] Improve Select of Doubles based on Double condition
https://bugs.webkit.org/show_bug.cgi?id=154572

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

Octane has a bunch of Select on Double based on comparing Doubles.
A few nodes generate that: ValueRep, Min, Max, etc.

On ARM64, we can improve our code a lot. ARM can do a select
based on flags with the FCSEL instruction.

On x86, this patch adds aggressive aliasing for moveDoubleConditionallyXXX.
This has obviously a much more limited impact.

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::moveDoubleConditionally32): Deleted.
(JSC::MacroAssembler::moveDoubleConditionally64): Deleted.
(JSC::MacroAssembler::moveDoubleConditionallyTest32): Deleted.
(JSC::MacroAssembler::moveDoubleConditionallyTest64): Deleted.
(JSC::MacroAssembler::moveDoubleConditionallyDouble): Deleted.
(JSC::MacroAssembler::moveDoubleConditionallyFloat): Deleted.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::moveDoubleConditionallyAfterFloatingPointCompare):
(JSC::MacroAssemblerARM64::moveDoubleConditionallyDouble):
(JSC::MacroAssemblerARM64::moveDoubleConditionallyFloat):
(JSC::MacroAssemblerARM64::moveConditionally32):
(JSC::MacroAssemblerARM64::moveDoubleConditionally32):
(JSC::MacroAssemblerARM64::moveDoubleConditionally64):
(JSC::MacroAssemblerARM64::moveDoubleConditionallyTest32):
(JSC::MacroAssemblerARM64::moveDoubleConditionallyTest64):
(JSC::MacroAssemblerARM64::branch64):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::moveConditionally32):
(JSC::MacroAssemblerX86Common::moveDoubleConditionally32):
(JSC::MacroAssemblerX86Common::moveDoubleConditionallyTest32):
(JSC::MacroAssemblerX86Common::moveDoubleConditionallyDouble):
(JSC::MacroAssemblerX86Common::moveDoubleConditionallyFloat):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::moveDoubleConditionally64):
(JSC::MacroAssemblerX86_64::moveDoubleConditionallyTest64):

  • b3/air/AirInstInlines.h:

(JSC::B3::Air::Inst::shouldTryAliasingDef):

  • b3/air/AirOpcode.opcodes:
  • b3/testb3.cpp:

(JSC::B3::populateWithInterestingValues):
(JSC::B3::floatingPointOperands):
(JSC::B3::int64Operands):
(JSC::B3::int32Operands):
(JSC::B3::testSelectCompareFloat):
(JSC::B3::testSelectCompareFloatToDouble):
(JSC::B3::testSelectDoubleCompareDouble):
(JSC::B3::testSelectDoubleCompareDoubleWithAliasing):
(JSC::B3::testSelectFloatCompareFloat):
(JSC::B3::testSelectFloatCompareFloatWithAliasing):
(JSC::B3::run):

9:15 PM Changeset in webkit [197489] by commit-queue@webkit.org
  • 12 edits
    12 adds in trunk/Source/JavaScriptCore

Add ability to generate a Heap Snapshot
https://bugs.webkit.org/show_bug.cgi?id=154847

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-03-02
Reviewed by Mark Lam.

This adds HeapSnapshot, HeapSnapshotBuilder, and HeapProfiler.

HeapProfiler hangs off of the VM and holds the list of snapshots.
I expect to add other HeapProfiling features, such as allocation
tracking, to the profiler.

HeapSnapshot contains a collection of live cells and their identifiers.
It can point to a previous HeapSnapshot, to ensure that a cell that
already received an identifier maintains the same identifier across
multiple snapshots. When a snapshotted cell gets garbage collected,
the cell will be swept from the HeapSnapshot at the end of collection
to ensure the list contains only live cells.

When building a HeapSnapshot nodes are added in increasing node
identifier order. When done building, the list of nodes is complete
and the snapshot is finalized. At this point the nodes are sorted
by JSCell* address to allow for quick lookup of a JSCell*.

HeapSnapshotBuilder is where snapshotting begins. The builder
will initiate a specialized heap snapshotting garbage collection.
During this collection the builder will be notified of all marked
(live) cells, and connections between cells, as seen by SlotVisitors.
The builder can reference the previous, readonly, HeapSnapshots to
avoid creating new nodes for cells that have already been snapshotted.
When it is determined that we are visiting a live cell for the first
time, we give the cell a unique identifier and add it to the the
snapshot we are building.

Since edge data is costly, and of little long term utility, this
data is only held by the builder for serialization, and not stored
long term with the HeapSnapshot node data.

The goals of HeapSnapshotting at this time are:

  • minimal impact on performance when not profiling the heap
  • unique identifier for cells, so they may be identified across multiple snapshots
  • nodes and edges to be able to construct a graph of which nodes reference/retain which other nodes
  • node data - identifier, type (class name), size
  • edge data - from cell, to cell, type / data (to come in a follow-up patch)

Add new files to the build.

  • heap/Heap.cpp:

(JSC::Heap::isHeapSnapshotting):
(JSC::RemoveDeadHeapSnapshotNodes::RemoveDeadHeapSnapshotNodes):
(JSC::RemoveDeadHeapSnapshotNodes::operator()):
(JSC::Heap::removeDeadHeapSnapshotNodes):
(JSC::Heap::collectImpl):
After every collection, sweep dead cells from in memory snapshots.

  • runtime/VM.cpp:

(JSC::VM::ensureHeapProfiler):

  • runtime/VM.h:

(JSC::VM::heapProfiler):

  • heap/Heap.h:
  • heap/HeapProfiler.cpp: Added.

(JSC::HeapProfiler::HeapProfiler):
(JSC::HeapProfiler::~HeapProfiler):
(JSC::HeapProfiler::mostRecentSnapshot):
(JSC::HeapProfiler::appendSnapshot):
(JSC::HeapProfiler::clearSnapshots):
(JSC::HeapProfiler::setActiveSnapshotBuilder):

  • heap/HeapProfiler.h: Added.

(JSC::HeapProfiler::vm):
(JSC::HeapProfiler::activeSnapshotBuilder):
VM and Heap can look at the profiler to determine if we are building a
snapshot, or the "head" snapshot to use for sweeping.

  • heap/HeapSnapshot.cpp: Added.

(JSC::HeapSnapshot::HeapSnapshot):
(JSC::HeapSnapshot::~HeapSnapshot):
(JSC::HeapSnapshot::appendNode):
Add a node to the unfinalized list of new cells.

(JSC::HeapSnapshot::sweepCell):
(JSC::HeapSnapshot::shrinkToFit):
Collect a list of cells for sweeping and then remove them all at once
in shrinkToFit. This is done to avoid thrashing of individual removes
that could cause many overlapping moves within the Vector.

(JSC::HeapSnapshot::finalize):
Sort the list, and also cache the bounding start/stop identifiers.
No other snapshot can contain an identifier in this range, so it will
improve lookup of a node from an identifier.

(JSC::HeapSnapshot::nodeForCell):
(JSC::HeapSnapshot::nodeForObjectIdentifier):
Search helpers.

  • heap/HeapSnapshotBuilder.h: Added.

(JSC::HeapSnapshotNode::HeapSnapshotNode):
(JSC::HeapSnapshotEdge::HeapSnapshotEdge):
Node and Edge struct types the builder creates.

  • heap/HeapSnapshotBuilder.cpp: Added.

(JSC::HeapSnapshotBuilder::getNextObjectIdentifier):
(JSC::HeapSnapshotBuilder::HeapSnapshotBuilder):
(JSC::HeapSnapshotBuilder::~HeapSnapshotBuilder):
(JSC::HeapSnapshotBuilder::buildSnapshot):
(JSC::HeapSnapshotBuilder::appendNode):
(JSC::HeapSnapshotBuilder::appendEdge):
When building the snapshot, generating the next identifier, and
appending to any of the lists must be guarded by a lock because
SlotVisitors running in parallel may be accessing the builder.

(JSC::HeapSnapshotBuilder::hasExistingNodeForCell):
Looking up if a node already exists in a previous snapshot can be
done without a lock because at this point the data is readonly.

(JSC::edgeTypeToNumber):
(JSC::edgeTypeToString):
(JSC::HeapSnapshotBuilder::json):
JSON serialization of a heap snapshot contains node and edge data.

  • heap/SlotVisitor.h:
  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::didStartMarking):
(JSC::SlotVisitor::reset):
Set/clear the active snapshot builder to know if this will be a
snapshotting GC or not.

(JSC::SlotVisitor::append):
(JSC::SlotVisitor::setMarkedAndAppendToMarkStack):
Inform the builder of a new node or edge.

(JSC::SlotVisitor::visitChildren):
Remember the current cell we are visiting so that if we need to
inform the builder of edges we know the "from" cell.

  • jsc.cpp:

(SimpleObject::SimpleObject):
(SimpleObject::create):
(SimpleObject::finishCreation):
(SimpleObject::visitChildren):
(SimpleObject::createStructure):
(SimpleObject::hiddenValue):
(SimpleObject::setHiddenValue):
Create a new class "SimpleObject" that can be used by heap snapshotting
tests. It is easy to filter for this new class name and test internal
edge relationships created by garbage collection visiting the cell.

(functionCreateSimpleObject):
(functionGetHiddenValue):
(functionSetHiddenValue):
Expose methods to create and interact with a SimpleObject.

(functionGenerateHeapSnapshot):
Expose methods to create a heap snapshot. This currently automatically
turns the serialized string into a JSON object. That may change.

  • tests/heapProfiler.yaml: Added.
  • tests/heapProfiler/basic-edges.js: Added.

(excludeStructure):

  • tests/heapProfiler/basic-nodes.js: Added.

(hasDifferentSizeNodes):
(hasAllInternalNodes):
Add tests for basic node and edge data.

  • tests/heapProfiler/driver/driver.js: Added.

(assert):
(CheapHeapSnapshotNode):
(CheapHeapSnapshotEdge):
(CheapHeapSnapshotEdge.prototype.get from):
(CheapHeapSnapshotEdge.prototype.get to):
(CheapHeapSnapshot):
(CheapHeapSnapshot.prototype.get nodes):
(CheapHeapSnapshot.prototype.get edges):
(CheapHeapSnapshot.prototype.nodeWithIdentifier):
(CheapHeapSnapshot.prototype.nodesWithClassName):
(CheapHeapSnapshot.prototype.classNameFromTableIndex):
(CheapHeapSnapshot.prototype.edgeTypeFromTableIndex):
(createCheapHeapSnapshot):
(HeapSnapshotNode):
(HeapSnapshotEdge):
(HeapSnapshot):
(HeapSnapshot.prototype.nodesWithClassName):
(createHeapSnapshot):
Add two HeapSnapshot representations.
CheapHeapSnapshot creates two lists of node and edge data that
lazily creates objects as needed.
HeapSnapshot creates an object for each node and edge. This
is wasteful but easier to use.

7:50 PM Changeset in webkit [197488] by Matt Baker
  • 9 edits
    2 copies in trunk/Source/WebInspectorUI

Web Inspector: Timelines UI redesign: replace content view container with a content browser
https://bugs.webkit.org/show_bug.cgi?id=153033
<rdar://problem/24195565>

Reviewed by Timothy Hatcher.

This patch replaces the ContentViewContainer in the Timelines tab with a ContentBrowser,
moves filtering controls from the sidebar to the new browser's navigation bar, and adds
a new leaf path component for the current ruler selection to the main content browser's
navigation bar.

  • Localizations/en.lproj/localizedStrings.js:

New UI strings.

  • UserInterface/Base/Utilities.js:

Added global en dash string.

  • UserInterface/Main.html:
  • UserInterface/Test.html:

New files.

  • UserInterface/Models/TimelineRange.js:

(WebInspector.TimelineRange):
(WebInspector.TimelineRange.prototype.get startValue):
(WebInspector.TimelineRange.prototype.set startValue):
(WebInspector.TimelineRange.prototype.get endValue):
(WebInspector.TimelineRange.prototype.set endValue):
New represented object used by ruler selection path components.

  • UserInterface/Views/FilterBarNavigationItem.js:

(WebInspector.FilterBarNavigationItem):
(WebInspector.FilterBarNavigationItem.prototype.get filterBar):
Adapter class for using a FilterBar as a NavigationItem.

  • UserInterface/Views/TimelineIcons.css:

(.time-icon .icon):
Icon class used by ruler selection path component.

  • UserInterface/Views/TimelineRecordingContentView.css:

(.content-view.timeline-recording > .content-browser):
(.content-view.timeline-recording > .content-browser > .navigation-bar):
(.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple):
(.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple .arrows):
(.content-view.timeline-recording > .content-browser > .content-view-container > .timeline-view > .data-grid td):
(.content-view.timeline-recording > .content-browser > .content-view-container > .timeline-view > .data-grid table.data):
(.content-view.timeline-recording > .content-view-container): Deleted.
(.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid td): Deleted.
(.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid table.data): Deleted.
New styles for the ContentBrowser that replaces the ContentViewContainer.

  • UserInterface/Views/TimelineRecordingContentView.js:

(WebInspector.TimelineRecordingContentView):
Create the ContentBrowser, ruler selection path components, and the browser's filter bar.

(WebInspector.TimelineRecordingContentView.prototype.showOverviewTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.showTimelineViewForTimeline):
Implemented by the content browser instead of the view container.

(WebInspector.TimelineRecordingContentView.prototype.get selectionPathComponents):
Add timeline and selection path components. Components for the current TimelineView
are now located in the lower content browser's navigation bar.

(WebInspector.TimelineRecordingContentView.prototype.get supplementalRepresentedObjects):
(WebInspector.TimelineRecordingContentView.prototype.get handleCopyEvent):
(WebInspector.TimelineRecordingContentView.prototype.get supportsSave):
(WebInspector.TimelineRecordingContentView.prototype.get saveData):
(WebInspector.TimelineRecordingContentView.prototype.get currentTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.shown):
(WebInspector.TimelineRecordingContentView.prototype.hidden):
(WebInspector.TimelineRecordingContentView.prototype.closed):
(WebInspector.TimelineRecordingContentView.prototype.canGoBack):
(WebInspector.TimelineRecordingContentView.prototype.canGoForward):
(WebInspector.TimelineRecordingContentView.prototype.goBack):
(WebInspector.TimelineRecordingContentView.prototype.goForward):
(WebInspector.TimelineRecordingContentView.prototype.saveToCookie):
Implemented by the content browser instead of the view container.

(WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject):
Create the root tree element for the lower content browser's navigation bar.

(WebInspector.TimelineRecordingContentView.prototype._timeRangePathComponentSelected):
Update the ruler selection based on the new path component.

(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.TimelineRecordingContentView.prototype._contentViewSupplementalRepresentedObjectsDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
Implemented by the content browser instead of the view container.

(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
Update the currently selected path component when the ruler selection changes.
If the entire range is selected, show the "Entire Recording" path component,
otherwise update the TimelineRange of the path component for the user-defined
selection and refresh all timeline range path components.

(WebInspector.TimelineRecordingContentView.prototype._updateTimeRangePathComponents):
Update title text and sibling relationships for ruler selection path components.

(WebInspector.TimelineRecordingContentView.prototype._createTimelineRangePathComponent):
Helper function for creating TimelineRange path components.

(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
The TimelineView scope bar is no longer added to the sidebar. The UI has been moved
to the lower content browser navigation bar.

(WebInspector.TimelineRecordingContentView.prototype._updateFrameSelection): Deleted.
No longer needed since the selected range is shown in the navigation bar.

  • UserInterface/Views/TimelineView.js:

(WebInspector.TimelineView.prototype.get navigationItems):
Adds the TimelineView's scope bar (if any) to the lower content browser's navigation
bar. Items are inserted before the filter bar, which is always the right-most item.

7:45 PM Changeset in webkit [197487] by Matt Baker
  • 21 edits in trunk/Source/WebInspectorUI

Web Inspector: Timelines UI redesign: show content tree outline records in timeline data grids
https://bugs.webkit.org/show_bug.cgi?id=153032
<rdar://problem/24195317>

Reviewed by Timothy Hatcher.

This patch relocates the data shown in the Timelines navigation sidebar content tree outline
to a new grid column in each TimelineDataGrid. Logic for creating subtitles, goto arrow buttons,
and status elements (the progress spinner used for network resources) has been replicated in
the appropriate TimelineDataGridNode classes.

Duplicate logic contained in TimelineRecordTreeElement classes is left in place for now, but
will be removed in <https://webkit.org/b/153036>.

  • UserInterface/Views/DataGrid.css:

(.data-grid td.error):
Use --error-text-color CSS variable.

  • UserInterface/Views/DataGrid.js:

Removed GoToArrowClicked event.
(WebInspector.DataGridNode.prototype.createGoToArrowButton.buttonClicked): Deleted.
(WebInspector.DataGridNode.prototype.createGoToArrowButton): Deleted.
Now part of TimelineDataGridNode.

  • UserInterface/Views/LayoutTimelineDataGridNode.js:

(WebInspector.LayoutTimelineDataGridNode):
(WebInspector.LayoutTimelineDataGridNode.prototype.get data):
Add name cell to row data.
(WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
Create name cell.

  • UserInterface/Views/LayoutTimelineView.css:

(.timeline-view.layout > .data-grid .eventType-column): Deleted.
Column border no longer hidden.

  • UserInterface/Views/LayoutTimelineView.js:

(WebInspector.LayoutTimelineView):
Setup name column.

  • UserInterface/Views/NetworkTimelineView.css:

(.timeline-view.network > .data-grid .name-column .subtitle):
Don't show subtitles in the Network grid's name column.

  • UserInterface/Views/NetworkTimelineView.js:

(WebInspector.NetworkTimelineView):
Setup name column.

  • UserInterface/Views/OverviewTimelineView.css:

(.timeline-view.overview > .data-grid th.graph-column > .timeline-ruler):
(.timeline-view.overview > .data-grid th.graph-column > .timeline-ruler > .header):
(.timeline-view.overview > .data-grid th):
(body.window-inactive .timeline-view.overview > .data-grid th):
(.timeline-view.overview .timeline-ruler > .event-markers):
(.timeline-view.overview > .data-grid):
(.timeline-view.overview > .timeline-ruler): Deleted.
(.timeline-view.overview > .timeline-ruler > .header): Deleted.
(body.window-inactive .timeline-view.overview > .timeline-ruler > .header): Deleted.
(.timeline-view.overview > .timeline-ruler > .event-markers): Deleted.
New styles for adding grid column headers and using a TimelineRuler as the
graph column header.

  • UserInterface/Views/OverviewTimelineView.js:

(WebInspector.OverviewTimelineView):
Setup name column and add ruler to graph column header.

  • UserInterface/Views/ProfileNodeDataGridNode.js:

(WebInspector.ProfileNodeDataGridNode):
Use cached data instead of creating row data at construction time.
(WebInspector.ProfileNodeDataGridNode.prototype.get data):
Add name cell to row data.
(WebInspector.ProfileNodeDataGridNode.prototype.createCellContent):
Create name cell.
(WebInspector.ProfileNodeDataGridNode.prototype._iconClassNameForProfileNode):
(WebInspector.ProfileNodeDataGridNode.prototype._titleForProfileNode):
Copied from ProfileNodeTreeElement.

  • UserInterface/Views/RenderingFrameTimelineDataGridNode.js:

(WebInspector.RenderingFrameTimelineDataGridNode):
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.get data):
Add name cell to row data.
(WebInspector.RenderingFrameTimelineDataGridNode.prototype.createCellContent):
Create name cell.

  • UserInterface/Views/RenderingFrameTimelineView.js:

(WebInspector.RenderingFrameTimelineView):
Setup name column.

  • UserInterface/Views/ResourceTimelineDataGridNode.js:

(WebInspector.ResourceTimelineDataGridNode):
Renamed "graphOnly" to "includesGraph", since resource rows in the overview
now show the name column in addition to the graph column. Resource events
LoadingDidFinish and LoadingDidFail now need to be handled for both types
of resource rows.

(WebInspector.ResourceTimelineDataGridNode.prototype.get data):
(WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
Update resource status element and create name cell content.
(WebInspector.ResourceTimelineDataGridNode.prototype._createNameCellDocumentFragment):
Create DOM fragment with titles. Based on code in TimelineRecordTreeElement.
(WebInspector.ResourceTimelineDataGridNode.prototype._dataGridNodeGoToArrowClicked):
Show resource when goto arrow is clicked.
(WebInspector.ResourceTimelineDataGridNode.prototype._updateStatus):
Update name cell's text color and progress spinner.

  • UserInterface/Views/ResourceTreeElement.css:

(.item.resource.failed):
(.item.resource.failed .subtitle):
Use --error-text-color CSS variable.

  • UserInterface/Views/ScriptTimelineDataGridNode.js:

(WebInspector.ScriptTimelineDataGridNode):
(WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
(WebInspector.ScriptTimelineDataGridNode.prototype._createNameCellDocumentFragment):
Create DOM fragment with titles. Based on code in TimelineRecordTreeElement.

  • UserInterface/Views/ScriptTimelineView.js:

(WebInspector.ScriptTimelineView):
Setup name column.

  • UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:

(WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype.createCellContent):
Added now that this node type is no longer "graph only".
(WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype._createNameCellContent):
Create DOM fragment with titles. Based on code in TimelineRecordTreeElement.

  • UserInterface/Views/TimelineDataGridNode.js:

(WebInspector.TimelineDataGridNode):
Renamed graphOnly to includesGraph.
(WebInspector.TimelineDataGridNode.prototype.createCellContent):
Removed icon element creation. This is now handled by the DataGrid.
(WebInspector.TimelineDataGridNode.prototype.refresh):
Refresh of all node cells after updating the graph.
(WebInspector.TimelineDataGridNode.prototype.createGoToArrowButton):
(WebInspector.TimelineDataGridNode.prototype.createGoToArrowButton.buttonClicked):
Relocated from DataGrid, as it's only used by TimelineDataGridNodes.

  • UserInterface/Views/TimelineView.css:

(.timeline-view > .data-grid .indeterminate-progress-spinner):
Styles for grid cell progress spinners.

  • UserInterface/Views/Variables.css:

(:root):
Added --error-text-color variable to remove duplication.

7:30 PM Changeset in webkit [197486] by Alan Bujtas
  • 4 edits
    2 adds in trunk

Paint table borders on empty cells even in quirks mode.
https://bugs.webkit.org/show_bug.cgi?id=154928

Reviewed by David Hyatt.

Enable border painting for empty cells unless 'empty-cells: hide' is set.
This is inline with FF and Chrome behaviour.

Source/WebCore:

Test: fast/table/border-on-empty-table-cells-quirks-mode.html

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::paintBoxDecorations):

LayoutTests:

  • fast/table/border-on-empty-table-cells-quirks-mode-expected.html: Added.
  • fast/table/border-on-empty-table-cells-quirks-mode.html: Added.
6:06 PM Changeset in webkit [197485] by fpizlo@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

RegExpPrototype should check for exceptions after calling toString and doing so should not be expensive
https://bugs.webkit.org/show_bug.cgi?id=154927

Reviewed by Saam Barati.

While working on regexp optimizations, I found that RegExpPrototype calls toString(), an
effectful operation that could do anything, without then checking for hadException().

So I added a call to hadException().

But that regressed Octane/regexp by 5%! That's a lot! It turns out that
exec->hadException() is soooper slow. So, I made it cheaper to check for exceptions from
toString(): there is now a variant called toStringFast() that returns null iff it throws an
exception.

This allowed me to add the exception check without regressing perf.

Note that toString() must retain its old behavior of returning an empty string on exception.
There is just too much code that relies on that behavior.

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::isValidCallee):
(JSC::JSValue::toStringSlowCase):
(JSC::JSValue::toWTFStringSlowCase):

  • runtime/JSCJSValue.h:

(JSC::JSValue::asValue):

  • runtime/JSString.h:

(JSC::JSValue::toString):
(JSC::JSValue::toStringFast):
(JSC::JSValue::toWTFString):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoFuncTest):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncCompile):

6:04 PM Changeset in webkit [197484] by sbarati@apple.com
  • 15 edits in trunk/Source/JavaScriptCore

clean up JSObject::isExtensibleInline and JSObject::setPrototypeOfInline, and rename setPrototypeOf to setPrototype
https://bugs.webkit.org/show_bug.cgi?id=154942

Reviewed by Benjamin Poulain.

These don't need to be inlined in the way they are.
Doing dynamic dispatch is ok performance wise until
we have evidence stating otherwise.

  • API/JSObjectRef.cpp:

(JSObjectSetPrototype):
(JSObjectHasProperty):

  • runtime/ClassInfo.h:
  • runtime/IntlCollatorConstructor.cpp:

(JSC::constructIntlCollator):

  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::constructIntlDateTimeFormat):

  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::constructIntlNumberFormat):

  • runtime/JSCell.cpp:

(JSC::JSCell::isExtensible):
(JSC::JSCell::setPrototype):
(JSC::JSCell::setPrototypeOf): Deleted.

  • runtime/JSCell.h:
  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncProtoSetter):

  • runtime/JSObject.cpp:

(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::setPrototype):
(JSC::JSObject::allowsAccessFrom):
(JSC::JSObject::isExtensible):
(JSC::JSObject::reifyAllStaticProperties):
(JSC::JSObject::defineOwnNonIndexProperty):
(JSC::JSObject::setPrototypeOf): Deleted.

  • runtime/JSObject.h:

(JSC::JSObject::mayInterceptIndexedAccesses):
(JSC::JSObject::indexingShouldBeSparse):
(JSC::JSObject::setPrototypeOfInline): Deleted.
(JSC::JSObject::isExtensibleInline): Deleted.

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorSetPrototypeOf):
(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):
(JSC::objectConstructorIsExtensible):

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::performInternalMethodGetOwnProperty):
(JSC::ProxyObject::performHasProperty):
(JSC::ProxyObject::performPreventExtensions):
(JSC::ProxyObject::performIsExtensible):

  • runtime/ReflectObject.cpp:

(JSC::reflectObjectIsExtensible):
(JSC::reflectObjectSetPrototypeOf):

  • runtime/StringObject.cpp:

(JSC::StringObject::defineOwnProperty):

5:29 PM Changeset in webkit [197483] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking storage/indexeddb/odd-strings.html as flaky on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=154619

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
5:22 PM Changeset in webkit [197482] by beidson@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening.

  • platform/wk2/TestExpectations: Mark two tests that are very slow as [ Slow ].
5:20 PM Changeset in webkit [197481] by rniwa@webkit.org
  • 6 edits
    8 deletes in trunk

HTML parser instantiates a custom element inside a template element with a wrong owner document
https://bugs.webkit.org/show_bug.cgi?id=154936

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Updated the expected results for newly passing test cases.

One test case in additions-to-parsing-xhtml-documents/node-document.html starts failing due to a bug in the test.
The bug in the test will be fixed in https://github.com/w3c/web-platform-tests/pull/2651

Finally, remove duplicated HTML template element tests in html-templates since there is a new copy under
web-platform-tests/html/semantics/scripting-1/the-template-element/. Unfortunately, we can't remove
html-templates/parsing-html-templates/ because we haven't imported web-platform-tests/html/syntax yet.

  • html-templates/additions-to-parsing-xhtml-documents: Removed.
  • html-templates/additions-to-serializing-xhtml-documents: Removed.
  • html-templates/additions-to-the-css-user-agent-style-sheet: Removed.
  • html-templates/additions-to-the-steps-to-clone-a-node: Removed.
  • html-templates/definitions: Removed.
  • html-templates/innerhtml-on-templates: Removed.
  • html-templates/serializing-html-templates: Removed.
  • html-templates/template-element: Removed.
  • web-platform-tests/html/semantics/scripting-1/the-template-element/additions-to-parsing-xhtml-documents/node-document.html:
  • web-platform-tests/html/semantics/scripting-1/the-template-element/definitions/template-contents-owner-test-001-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/node-document-changes-expected.txt:

Source/WebCore:

The bug was caused by our implementation following the old spec which didn't create a appropriate template
contents owner document [1] for a document without a browsing context. The new spec no longer has this clause,
and we should be always creating the appropriate template contents owner document unless the document itself
is an appropriate template contents owner document for another document (comes up in nested template elements).

No new tests since the behavior change is covered by existing tests.

[1] https://html.spec.whatwg.org/#appropriate-template-contents-owner-document

  • dom/Document.h:

(WebCore::Document::templateDocument):

5:19 PM Changeset in webkit [197480] by barraclough@apple.com
  • 3 edits in trunk/Source/WebCore

PageThrottler should apply hysteresis to media activity
https://bugs.webkit.org/show_bug.cgi?id=154940

Reviewed by Ryosuke Niwa.

Currently PageThrottler keeps a track of audible plugin activity and HTML media element
activity separately. Audible plugin activity also gets an extra 5s hysteresis applied,
so that after audio playback has completed there is a chance to queue up more audio
before timer throttling kicks in. HTML audio does not get this grace. Funnel both
together into a single activity flag, such that the hysteresis is applied to both.

  • page/PageThrottler.cpp:

(WebCore::PageThrottler::PageThrottler):
(WebCore::m_mediaActivityHysteresis):

  • PageActivityState::AudiblePlugin -> PageActivityState::MediaActivity.

(WebCore::m_mediaActivityCounter):

  • when m_mediaActivityCounter value changes call mediaActivityCounterChanged().

(WebCore::PageThrottler::mediaActivityCounterChanged):

  • Drive PageActivityState::MediaActivity indirectly via m_mediaActivityHysteresis, such that a 5s hysteresis is applied.
  • page/PageThrottler.h:
    • Removed AudiblePlugin (merged in with MediaActivity).

(WebCore::PageThrottler::pluginDidEvaluateWhileAudioIsPlaying):

  • m_audiblePluginHysteresis.impulse -> m_mediaActivityHysteresis.impulse.
4:34 PM Changeset in webkit [197479] by Matt Baker
  • 6 edits
    1 add in trunk/Source/WebInspectorUI

Web Inspector: Timelines UI redesign: relocate recording controls to TimelineTabContentView's content browser
https://bugs.webkit.org/show_bug.cgi?id=153532
<rdar://problem/24361611>

Reviewed by Timothy Hatcher.

This patch shifts UI controller responsibilities from the sidebar panel
to the tab content view. Controls for starting/stopping the recording and
switching view modes are now located in the tab's navigation bar, as is
the hidden tree outline of open timeline recordings.

  • Localizations/en.lproj/localizedStrings.js:

New UI strings. Renamed view-mode radio buttons located from the sidebar
to "Events" and "Frames". UI for switching modes isn't final, and the
labels may change or be removed entirely in favor of image-only buttons.

  • UserInterface/Main.html:

New file.

  • UserInterface/Views/ContentBrowserTabContentView.js:

(WebInspector.ContentBrowserTabContentView.prototype.contentBrowserTreeElementForRepresentedObject):
(WebInspector.ContentBrowserTabContentView.prototype.treeElementForRepresentedObject):
Allow subclasses to override behavior for retrieving the tree element
for a represented object. Default behavior delegates the implementation
to the navigation sidebar.

(WebInspector.ContentBrowserTabContentView.prototype._contentBrowserCurrentContentViewDidChange):
(WebInspector.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
(WebInspector.ContentBrowserTabContentView):
(WebInspector.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObjectInNavigationSidebar): Deleted.
Renamed to _revealAndSelectRepresentedObject as it's no longer specific
to the sidebar.

  • UserInterface/Views/TabContentView.js:

(WebInspector.TabContentView):
(WebInspector.TabContentView.prototype.restoreStateFromCookie):
(WebInspector.TabContentView.prototype.saveStateToCookie):
A navigation sidebar shouldn't be required to save/restore cookie state.

  • UserInterface/Views/TimelineTabContentView.css: Added.

(.timeline.tab.content-view .navigation-bar > .item.toggle-navigation-sidebar.activate.button):
(.timeline.tab.content-view .navigation-bar > .item.record-start-stop):
(.timeline.tab.content-view .navigation-bar > .item.record-start-stop:hover):
(.timeline.tab.content-view .navigation-bar > .item.record-start-stop:active):
(.timeline.tab.content-view .navigation-bar > .item.record-start-stop *):
(.timeline.tab.content-view .navigation-bar > .item.radio):
Styles for new navigation items: record button and view mode radio buttons.

  • UserInterface/Views/TimelineTabContentView.js:

Logic for maintaining the timeline recording hierarchy and the state
of the active recording has been added to the tab content view.

(WebInspector.TimelineTabContentView):
(WebInspector.TimelineTabContentView.prototype.shown):
(WebInspector.TimelineTabContentView.prototype.hidden):
(WebInspector.TimelineTabContentView.prototype.canShowRepresentedObject):
Objects other than recordings are no longer shown in the tab's content
browser. Displaying other objects (such as timeline resources) in the
content browser will be addressed in a follow-up patch: https://bugs.webkit.org/show_bug.cgi?id=154920.

(WebInspector.TimelineTabContentView.prototype.get supportsSplitContentBrowser):
(WebInspector.TimelineTabContentView.prototype.restoreFromCookie):
(WebInspector.TimelineTabContentView.prototype.saveToCookie):
Persist view state that was previously located in the sidebar.

(WebInspector.TimelineTabContentView.prototype.treeElementForRepresentedObject):
Implements logic previously limited to the navigation sidebar. Only tree
elements for timeline recordings are supported, since other represented
objects (timeline resources) no longer have content tree outline tree elements.

(WebInspector.TimelineTabContentView.prototype._capturingStartedOrStopped):
(WebInspector.TimelineTabContentView.prototype._toggleRecordingOnSpacebar):
(WebInspector.TimelineTabContentView.prototype._toggleNewRecordingOnSpacebar):
(WebInspector.TimelineTabContentView.prototype._toggleRecording):
(WebInspector.TimelineTabContentView.prototype._recordButtonClicked):
(WebInspector.TimelineTabContentView.prototype._recordingsTreeSelectionDidChange):
(WebInspector.TimelineTabContentView.prototype._recordingCreated):
(WebInspector.TimelineTabContentView.prototype._addRecording):
(WebInspector.TimelineTabContentView.prototype._recordingCountChanged):
(WebInspector.TimelineTabContentView.prototype._recordingLoaded):
Implementations copied from the sidebar panel.

(WebInspector.TimelineTabContentView.prototype._recordingSelected):
Implementation similar to that which existed in the sidebar panel, except
that logic related to instruments isn't needed. Updates to timeline view
filters will be implemented in a follow-up patch: https://bugs.webkit.org/show_bug.cgi?id=154924.

(WebInspector.TimelineTabContentView.prototype._viewModeSelected):
This method is now limited to the handling of the radio button event only.
Additional logic which existed in the sidebar panel's implementation has
been pushed into _changeViewMode, which does the actual work of toggling
view modes.

(WebInspector.TimelineTabContentView.prototype._changeViewMode):
Updates the current view mode state. If triggered by a user selection (was
called by the radio button event handler), the correct timeline view for
the new mode is shown.

(WebInspector.TimelineTabContentView.prototype._showTimelineViewForType):
Helper function for showing the view for the specified timeline type, if
the timeline exists in the current recording. Otherwise the overview timeline
view is displayed.

(WebInspector.TimelineTabContentView.prototype._displayedContentViewNavigationItemsDidChange):
Keep the view mode in sync with the content browser.

(WebInspector.TimelineTabContentView.prototype._getTimelineForCurrentContentView):
Helper function for getting the currently displayed timeline.

4:34 PM Changeset in webkit [197478] by adachan@apple.com
  • 19 edits in trunk/Source

Update the media element's presentation mode properly after going in and out of full screen via the Full Screen API
https://bugs.webkit.org/show_bug.cgi?id=154834

Reviewed by Simon Fraser.

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::webkitWillEnterFullScreenForElement):

  • dom/Element.cpp:

(WebCore::Element::willBecomeFullscreenElement):

  • dom/Element.h:

(WebCore::Element::ancestorWillEnterFullscreen):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::enterFullscreen):
If the Full Screen API is enabled and this media element is entering a mode other than standard
full screen, see if it's currently contained in a full screen element. If so, exit full screen.
(WebCore::HTMLMediaElement::willBecomeFullscreenElement):
If this media element is going to standard full screen, update its presentation mode. If
this media element also supports presentation mode and it currently has a presentation mode
that's not standard full screen, exit that presentation mode directly without animation.
(WebCore::HTMLMediaElement::willStopBeingFullscreenElement):
Set the presentation mode back to inline unless it's already changed to a different
presentation mode.

  • html/HTMLMediaElement.h:
  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::ancestorWillEnterFullscreen):
Reset this video element's presentation state to inline if its ancestor is going to full screen.
(WebCore::HTMLVideoElement::exitToFullscreenModeWithoutAnimationIfPossible):
If the fullscreen mode the video element is exiting from is supported, exit that mode to the new mode.

  • html/HTMLVideoElement.h:
  • page/ChromeClient.h:
  • platform/mac/WebVideoFullscreenInterfaceMac.h:
  • platform/mac/WebVideoFullscreenInterfaceMac.mm:

(WebCore::WebVideoFullscreenInterfaceMac::exitFullscreenWithoutAnimationToMode):

Source/WebKit2:

  • UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
  • UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
  • UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:

(WebKit::WebVideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode):
Call the new exitFullscreenWithoutAnimationToMode() method on WebVideoFullscreenInterfaceMac.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::exitVideoFullscreenToModeWithoutAnimation):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/cocoa/WebVideoFullscreenManager.h:
  • WebProcess/cocoa/WebVideoFullscreenManager.mm:

(WebKit::WebVideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):

4:29 PM Changeset in webkit [197477] by bshafiei@apple.com
  • 5 edits in tags/Safari-601.5.17.4/Source

Versioning.

4:26 PM Changeset in webkit [197476] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip unsupported test fast/text/complex-small-caps-non-bmp-capitalize.html on ios-simulator

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
4:24 PM Changeset in webkit [197475] by bshafiei@apple.com
  • 1 copy in tags/Safari-601.5.17.4

New tag.

4:23 PM Changeset in webkit [197474] by beidson@apple.com
  • 14 edits
    6 adds in trunk

Modern IDB: Close UniqueIDBDatabases once they become unused.
https://bugs.webkit.org/show_bug.cgi?id=154922

Reviewed by Alex Christensen.

Source/WebCore:

Tests: storage/indexeddb/modern/256-open-databases.html

storage/indexeddb/modern/exceed-open-file-limit.html

Without this change, attempts to open a 256th database in the DatabaseProcess will fail on Mac.

Due to SQLite journal files, this limit could come up as early as 128 databases if they are all
in active use.

This is because launchd - by default - limits xpc services to having 256 open file handles by default.

While we should explore raising the limit, we should also close databases we no longer need.

  • Modules/indexeddb/server/IDBBackingStore.h:
  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::closeUniqueIDBDatabase):
(WebCore::IDBServer::IDBServer::deleteUniqueIDBDatabase): Deleted.

  • Modules/indexeddb/server/IDBServer.h:
  • Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:

(WebCore::IDBServer::MemoryBackingStoreTransaction::MemoryBackingStoreTransaction):

  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::getOrEstablishDatabaseInfo):

  • Modules/indexeddb/server/MemoryIDBBackingStore.h:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): Handle the case where opening

the backing store failed by firing an error event instead of pretending everything is okay.

(WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::isCurrentlyInUse):
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired): If the database is not

currently in use, close it.

(WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted):

  • Modules/indexeddb/server/UniqueIDBDatabase.h:

(WebCore::IDBServer::UniqueIDBDatabase::deletePending): Deleted.

  • Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:

(WebCore::IDBObjectStoreInfo::isolatedCopy): Actually get this right.

LayoutTests:

  • platform/mac-wk1/TestExpectations:
  • storage/indexeddb/modern/256-open-databases-expected.txt: Added.
  • storage/indexeddb/modern/256-open-databases.html: Added.
  • storage/indexeddb/modern/exceed-open-file-limit-expected.txt: Added.
  • storage/indexeddb/modern/exceed-open-file-limit.html: Added.
  • storage/indexeddb/modern/resources/256-open-databases.js: Added.
  • storage/indexeddb/modern/resources/exceed-open-file-limit.js: Added.
4:21 PM Changeset in webkit [197473] by Matt Baker
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: Timelines UI redesign: add the timelines tree outline to the TimelineOverview
https://bugs.webkit.org/show_bug.cgi?id=153034
<rdar://problem/24195628>

Reviewed by Timothy Hatcher.

Move the Timelines tree outline to the overview, in preparation for <https://webkit.org/b/153036>.

  • UserInterface/Views/OverviewTimelineView.css:

(.timeline-view.overview > .timeline-ruler > .header): Deleted.
(.timeline-view.overview > .timeline-ruler > .event-markers): Deleted.
These are now part of the default ruler style.

  • UserInterface/Views/TimelineOverview.css:

(.timeline-overview > .tree-outline.timelines):
(.timeline-overview > .tree-outline.timelines::before):
(body.window-inactive .timeline-overview > .tree-outline.timelines):
(.timeline-overview.frames > .tree-outline.timelines):
(.timeline-overview > .tree-outline.timelines .close-button):
(.timeline-overview > .tree-outline.timelines .item.selected .close-button):
(.timeline-overview > .tree-outline.timelines .item:not(.selected):nth-child(even)):
(.timeline-overview > .tree-outline.timelines .item:not(.selected):not(:first-child)):
(.timeline-overview > .tree-outline.timelines .item.selected + .item):
(body.window-inactive .timeline-overview > .tree-outline.timelines .item.selected + .item):
(.timeline-overview > .tree-outline.timelines :focus .item.selected + .item):
(.timeline-overview > .scroll-container):
(.timeline-overview.frames > .scroll-container):
(.timeline-overview > .timeline-ruler):
(.timeline-overview.frames > .timeline-ruler):
(.timeline-overview > .timeline-ruler > .markers):
(.timeline-overview > .graphs-container):
(.timeline-overview.frames > .graphs-container):
Styles for the timelines tree outline. A content element is inserted before the
tree to fill the gap created by the timeline ruler. For now the tree has a fixed
width of 185px, and is hidden when displaying the FPS instrument.

  • UserInterface/Views/TimelineOverview.js:

(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype.get selectedTimeline):
(WebInspector.TimelineOverview.prototype.set selectedTimeline):
Make the selected timeline accessible to the parent view, since the overview doesn't
have a "represented object", or receive ContentView change notifications.

(WebInspector.TimelineOverview.prototype._instrumentAdded):
(WebInspector.TimelineOverview.prototype._instrumentRemoved):
(WebInspector.TimelineOverview.prototype._viewModeDidChange):
Add and remove instrument tree elements. Each tree element is created with a height
equal to it's overview graph, and is shown/hidden based on the current view mode.

(WebInspector.TimelineOverview.prototype._timelinesTreeSelectionDidChange):
Update the selected timeline and dispatch change event.

  • UserInterface/Views/TimelineRecordingContentView.js:

(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
(WebInspector.TimelineRecordingContentView.prototype._timelineSelected):
Sync the overview's timeline selection with the current ContentView's represented object.

  • UserInterface/Views/TimelineRuler.css:

(.timeline-ruler > .header):
(.timeline-ruler > .header > .divider > .label):
(.timeline-ruler > .selection-drag):
(.timeline-ruler > .selection-handle):
Ruler height changed to 23px, to be consistent with the DataGrid header.

  • UserInterface/Views/TreeOutline.css:

(.tree-outline.large .item .icon):
Large icon style updated to match TimelineSidebarPanel.css. The 32px
size is outdated and no longer used.

  • UserInterface/Views/Variables.css:

(:root):
New color variables, used by TimelineOverview.css.

4:19 PM Changeset in webkit [197472] by barraclough@apple.com
  • 2 edits in trunk/Source/WebCore

Disable timer throttling increases for visually idle / active pages.
https://bugs.webkit.org/show_bug.cgi?id=154935

Reviewed by Chris Dumez.

Currently any page that is visually idle can timer throttle, and all are eligible for throttling
allow throttling to increase.

Instead, still allow any visually idle page to timer throttle, but only allow increasing in those
that are fully hidden & inactive (no page loading or media activity).

  • page/Page.cpp:

(WebCore::Page::setTimerThrottlingState):

  • Updated policy per commet above.

(WebCore::Page::setPageActivityState):
(WebCore::Page::setIsVisible):

  • We now may need to updated timer throttling when these change.
4:17 PM Changeset in webkit [197471] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline fast/transforms/bounding-rect-zoom.html for ios-simulator after r197450

Unreviewed test gardening.

  • platform/ios-simulator/fast/transforms/bounding-rect-zoom-expected.txt:
4:10 PM Changeset in webkit [197470] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline imported/w3c/web-platform-tests/html/dom/reflection-forms.html for ios-simulator after r197458

Unreviewed test gardening.

  • platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
3:48 PM Changeset in webkit [197469] by Beth Dakin
  • 3 edits in trunk/Source/WebKit2

Crashes in media tests after http://trac.webkit.org/changeset/197461
https://bugs.webkit.org/show_bug.cgi?id=154933

Reviewed by Eric Carlson.

Since the controlsManagerInterface is not guaranteed to exist, it doesn't
make sense to return a reference. Return a pointer instead.

  • UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
  • UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:

(WebKit::WebVideoFullscreenManagerProxy::isVisible):
(WebKit::WebVideoFullscreenManagerProxy::controlsManagerInterface):
(WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):

2:45 PM Changeset in webkit [197468] by commit-queue@webkit.org
  • 8 edits in trunk

[cmake] Moved PRE/POST_BUILD_COMMAND to WEBKIT_FRAMEWORK.
https://bugs.webkit.org/show_bug.cgi?id=154651

Patch by Konstantin Tokarev <Konstantin Tokarev> on 2016-03-02
Reviewed by Alex Christensen.

.:

  • Source/cmake/WebKitMacros.cmake: Used phony target instead of

CMake's PRE_BUILD COMMAND feature because the latter actually
generates pre-link target instead of pre-build.

Source/JavaScriptCore:

  • CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.

Source/WebCore:

No new tests needed.

  • CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.

Source/WTF:

  • CMakeLists.txt: Moved shared code to WEBKIT_FRAMEWORK macro.
2:39 PM Changeset in webkit [197467] by sbarati@apple.com
  • 17 edits in trunk/Source/JavaScriptCore

SetPrototypeOf? should be a fully virtual method in ClassInfo::methodTable
https://bugs.webkit.org/show_bug.cgi?id=154897

Reviewed by Filip Pizlo.

This patch makes us more consistent with how the ES6 specification models the
SetPrototypeOf? trap. Moving this method into ClassInfo::methodTable
is a prerequisite for implementing Proxy.SetPrototypeOf?. This patch
still allows directly setting the prototype for situations where this
is the desired behavior. This is equivalent to setting the internal
Prototype? field as described in the specification.

  • API/JSClassRef.cpp:

(OpaqueJSClass::prototype):

  • API/JSObjectRef.cpp:

(JSObjectMake):
(JSObjectSetPrototype):
(JSObjectHasProperty):

  • API/JSWrapperMap.mm:

(makeWrapper):

  • runtime/ClassInfo.h:
  • runtime/IntlCollatorConstructor.cpp:

(JSC::constructIntlCollator):

  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::constructIntlDateTimeFormat):

  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::constructIntlNumberFormat):

  • runtime/JSCell.cpp:

(JSC::JSCell::isExtensible):
(JSC::JSCell::setPrototypeOf):

  • runtime/JSCell.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::resetPrototype):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncProtoSetter):

  • runtime/JSObject.cpp:

(JSC::JSObject::switchToSlowPutArrayStorage):
(JSC::JSObject::setPrototypeDirect):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::setPrototypeOf):
(JSC::JSObject::allowsAccessFrom):
(JSC::JSObject::setPrototype): Deleted.

  • runtime/JSObject.h:

(JSC::JSObject::setPrototypeOfInline):
(JSC::JSObject::mayInterceptIndexedAccesses):

  • runtime/JSProxy.cpp:

(JSC::JSProxy::setTarget):

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorSetPrototypeOf):

  • runtime/ReflectObject.cpp:

(JSC::reflectObjectSetPrototypeOf):

2:37 PM Changeset in webkit [197466] by rniwa@webkit.org
  • 1 edit
    2 adds in trunk/LayoutTests

Add a custom element test for synchronous element construction in HTML parser
https://bugs.webkit.org/show_bug.cgi?id=154932

Reviewed by Antti Koivisto.

Added a test.

  • fast/custom-elements/parser/parser-constructs-custom-element-synchronously-expected.txt: Added.
  • fast/custom-elements/parser/parser-constructs-custom-element-synchronously.html: Added.
2:30 PM Changeset in webkit [197465] by fpizlo@apple.com
  • 1 edit
    3 adds in trunk/LayoutTests

Add a benchmark for string transcoding.

Rubber stamped by Saam Barati.

I wrote some code like this while working on
https://github.com/WebAssembly/design/pull/573. I thought I'd add it as a benchmark since
it stresses things that we may not have good bench coverage for.

  • js/regress/script-tests/string-transcoding.js: Added.

(decodeUTF8):
(encodeUTF8):
(arraysEqual):
(arrayToString):
(setHeader):
(print):
(tryArray):
(doSteps):

  • js/regress/string-transcoding-expected.txt: Added.
  • js/regress/string-transcoding.html: Added.
2:29 PM Changeset in webkit [197464] by hyatt@apple.com
  • 9 edits
    4 adds in trunk

Add support for the "first" value of the hanging-punctuation property.
https://bugs.webkit.org/show_bug.cgi?id=154919

Reviewed by Simon Fraser.

Source/WebCore:

New tests added in fast/text.

Implement the "first" value for hanging-punctuation as described here:
https://drafts.csswg.org/css-text-3/#propdef-hanging-punctuation

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
Update the preferred logical width computation to factor in hanging punctuation.
This check is similar to the text-indent logic in that we only want to do it for
the first formatted line.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::simpleLineLayout):
Make sure to turn off simple line layout when hanging punctuation is present. Eventually
it should be feasible to support this in simple line layout, but since the full line
layout model has to work with it anyway, we are starting there.

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::inlineAncestorHasStartBorderPaddingOrMargin):
(WebCore::isLastInFlowRun):
Helper functions that are needed to determine whether or not we're allowed to apply
hanging punctuation "first" to a text run.

(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
This function manipulates logicalLeft and availableWidth when hanging punctuation
is present to shift the line as needed and to expand the availableWidth of the line.

  • rendering/RenderText.cpp:

(WebCore::isHangablePunctuationAtLineStart):
(WebCore::isHangablePunctuationAtLineEnd):
(WebCore::RenderText::hangablePunctuationStartWidth):
(WebCore::RenderText::trimmedPrefWidths):

  • rendering/RenderText.h:

RenderText has a helper function for handing back the hangable punctuation width. This
is used everywhere line layout wants to apply that offset. There are also helper functions
that detect whether the character is a hangable punctuation character.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForWithReason):
(WebCore::SimpleLineLayout::printReason):
Turn off simple line layout when hanging punctuation is enabled.

  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::handleText):
Modified to expand the available width when hanging punctuation is present so that we
know we have more room on the line.

  • rendering/line/LineWidth.h:

(WebCore::LineWidth::isFirstLine):
Add an accessor for whether or not we're the first line.

LayoutTests:

  • fast/text/hanging-punctuation-first-expected.html: Added.
  • fast/text/hanging-punctuation-first-rtl-expected.html: Added.
  • fast/text/hanging-punctuation-first-rtl.html: Added.
  • fast/text/hanging-punctuation-first.html: Added.
1:56 PM Changeset in webkit [197463] by rniwa@webkit.org
  • 12 edits
    9 adds in trunk

Make HTML parser construct custom elements
https://bugs.webkit.org/show_bug.cgi?id=154908
Source/WebCore:

<rdar://problem/24923735>

Reviewed by Antti Koivisto.

Added the support for instantiating custom elements inside the parser. Based on Jan F2F discussion,
the HTML parser is going to synchronously construct custom elements. When a custom element constructor
throws, the HTML parser creates a HTMLUnknownElement instead.

In our implementation, we pause the parser completely and construct custom elements using the same
mechanism used to run author scripts. It's possible that we may want to apply some optimizations to
to make custom element construction but it's probably a good idea to get semantics right first.

Tests: 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

  • bindings/js/JSCustomElementInterface.cpp:

(WebCore::JSCustomElementInterface::constructElement): Added ShouldClearException as an argument
to be used by the HTML parser since the parser can't re-throw to anywhere or fail parsing.

  • bindings/js/JSCustomElementInterface.h:

(WebCore::JSCustomElementInterface::ShouldClearException): Added.

  • dom/Document.cpp:

(WebCore::createHTMLElementWithNameValidation): Do not clear the exception here since createElement
must re-throw the exception thrown by a custom element constructor.
(WebCore::Document::createElementForBindings):

  • dom/make_names.pl:

(printFactoryCppFile): Added ConstructorFunctionMapEntry which contains the constructor function
as well as the qualified name.
(printFactoryHeaderFile): Added a variant of createKnownElement and createElement that takes
AtomicString instead of QualifiedName.

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::setAttributes): Added a variant that takes Vector<Attribute>.
(WebCore::HTMLConstructionSite::insertHTMLElementOrFindCustomElementInterface): Added. Returns a
custom element interface when the element doesn't match any builtin element and there is a custom
element definition that matches the specified name.
(WebCore::HTMLConstructionSite::insertCustomElement): Added. Like insertElement but also sets the
attributes on the newly created custom element.
(WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface): Extracted from
createHTMLElement. When customElementInterface is not nullptr, we optionally find the custom
element interface and return nullptr.
(WebCore::HTMLConstructionSite::createHTMLElement):

  • html/parser/HTMLConstructionSite.h:
  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): Create a custom element when there
is a pending custom element to create (i.e. m_customElementToConstruct is not empty).
(WebCore::HTMLDocumentParser::isWaitingForScripts):

  • html/parser/HTMLStackItem.h:

(WebCore::HTMLStackItem::create): Added a variant used for custom elements.
(WebCore::HTMLStackItem::HTMLStackItem): Ditto.

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::CustomElementConstructionData::CustomElementConstructionData): Added. It needs to be in
the cpp file to avoid introducing more header dependencies in HTMLTreeBuilder.h.
(WebCore::CustomElementConstructionData::~CustomElementConstructionData): Ditto.
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Use insertGenericHTMLElement when creating
a generic element that could be custom elements.
(WebCore::HTMLTreeBuilder::insertGenericHTMLElement): Added. Create and insert a new element
or set m_customElementToConstruct so that the HTMLDocumentParser will create a custom element later.
(WebCore::HTMLTreeBuilder::didCreateCustomOrCallbackElement): Added. Called by HTMLDocumentParser
when it finishes creating a new custom element.

  • html/parser/HTMLTreeBuilder.h:

(WebCore::HTMLTreeBuilder::takeCustomElementConstructionData): Added.
(WebCore::HTMLTreeBuilder::hasParserBlockingScriptWork): Renamed from hasParserBlockingScript.
Checks the existence of m_customElementToConstruct as well as m_scriptToProcess.

LayoutTests:

Reviewed by Antti Koivisto.

Added W3C testharness.js based tests for instantiating custom elements inside the HTML parser.

  • fast/custom-elements/parser: Added.
  • fast/custom-elements/parser/parser-constructs-custom-elements-expected.txt: Added.
  • fast/custom-elements/parser/parser-constructs-custom-elements.html: Added.
  • fast/custom-elements/parser/parser-fallsback-to-unknown-element-expected.txt: Added.
  • fast/custom-elements/parser/parser-fallsback-to-unknown-element.html: Added.
  • fast/custom-elements/parser/parser-sets-attributes-and-children-expected.txt: Added.
  • fast/custom-elements/parser/parser-sets-attributes-and-children.html: Added.
  • fast/custom-elements/parser/parser-uses-constructed-element-expected.txt: Added.
  • fast/custom-elements/parser/parser-uses-constructed-element.html: Added.
1:42 PM Changeset in webkit [197462] by Alan Bujtas
  • 13 edits in trunk/Source/WebCore

Use IndentTextOrNot instead of passing isFirstLine/shouldIndentText as bool.
https://bugs.webkit.org/show_bug.cgi?id=154628

Reviewed by Simon Fraser.

No change in behaviour.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
(WebCore::RenderBlock::logicalLeftSelectionOffset):
(WebCore::RenderBlock::logicalRightSelectionOffset):

  • rendering/RenderBlock.h:

(WebCore::RenderBlock::availableLogicalWidthForLineInRegion):
(WebCore::RenderBlock::logicalRightOffsetForLineInRegion):
(WebCore::RenderBlock::logicalLeftOffsetForLineInRegion):
(WebCore::RenderBlock::startOffsetForLineInRegion):
(WebCore::RenderBlock::endOffsetForLineInRegion):
(WebCore::RenderBlock::availableLogicalWidthForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::startOffsetForLine):
(WebCore::RenderBlock::endOffsetForLine):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::getClearDelta):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::updateLogicalInlinePositions):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
(WebCore::RenderBlockFlow::checkLinesForTextOverflow):
(WebCore::RenderBlockFlow::startAlignedOffsetForLine):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):

  • rendering/RenderDeprecatedFlexibleBox.cpp:

(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):

  • rendering/RenderListItem.cpp:

(WebCore::RenderListItem::positionListMarker):

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::selectionTop):
(WebCore::RootInlineBox::selectionBottom):

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForWithReason):
(WebCore::SimpleLineLayout::updateLineConstrains):

  • rendering/line/LineBreaker.cpp:

(WebCore::LineBreaker::skipLeadingWhitespace):

  • rendering/line/LineWidth.cpp:

(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
(WebCore::availableWidthAtOffset):

  • rendering/line/LineWidth.h:

(WebCore::LineWidth::shouldIndentText):

12:59 PM Changeset in webkit [197461] by Beth Dakin
  • 24 edits in trunk/Source

Add support for playbackControlsManager
https://bugs.webkit.org/show_bug.cgi?id=154742
-and corresponding-
rdar://problem/23833753

Reviewed by Jer Noble.

Source/WebCore:

Make AVKitSPI.h private so that it can be used from other projects.

  • WebCore.xcodeproj/project.pbxproj:

Right now, set up a controls manager for a video when it starts playing. In
the future, this is something that should be handled by the
PlatformMediaSessionManager since we only want a controls for the
currentSession.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::playInternal):

New function setUpVideoControlsManager.

  • page/ChromeClient.h:

Make these CoreMedia functions available on Mac and iOS instead of just iOS.

  • platform/cf/CoreMediaSoftLink.cpp:
  • platform/cf/CoreMediaSoftLink.h:

This patch fleshes out an implementation for a bunch of these interface
functions since they need to communicate to the playbackControlsManager. This
is also where the playbackControlsManager lives.

  • platform/mac/WebVideoFullscreenInterfaceMac.h:

Define an interface and implementation for WebPlaybackControlsManager.

  • platform/mac/WebVideoFullscreenInterfaceMac.mm:

(-[WebPlaybackControlsManager initWithWebVideoFullscreenInterfaceMac:]):
(-[WebPlaybackControlsManager isSeeking]):
(-[WebPlaybackControlsManager seekToTime:toleranceBefore:toleranceAfter:]):
(-[WebPlaybackControlsManager audioMediaSelectionOptions]):
(-[WebPlaybackControlsManager currentAudioMediaSelectionOption]):
(-[WebPlaybackControlsManager setCurrentAudioMediaSelectionOption:]):
(-[WebPlaybackControlsManager legibleMediaSelectionOptions]):
(-[WebPlaybackControlsManager currentLegibleMediaSelectionOption]):
(-[WebPlaybackControlsManager setCurrentLegibleMediaSelectionOption:]):
(-[WebPlaybackControlsManager cancelThumbnailAndAudioAmplitudeSampleGeneration]):

Relay this information to the playbackControlsManager.
(WebCore::WebVideoFullscreenInterfaceMac::setDuration):
(WebCore::WebVideoFullscreenInterfaceMac::setCurrentTime):
(WebCore::WebVideoFullscreenInterfaceMac::setRate):
(WebCore::WebVideoFullscreenInterfaceMac::setSeekableRanges):
(WebCore::WebVideoFullscreenInterfaceMac::ensureControlsManager):
(WebCore::WebVideoFullscreenInterfaceMac::playBackControlsManager):
(WebCore::WebVideoFullscreenInterfaceMac::setupFullscreen):

New SPI needed.

  • platform/spi/cocoa/AVKitSPI.h:
  • platform/spi/mac/AVFoundationSPI.h:

Source/WebKit2:

WebVideoFullscreenManagerProxy ensures the model and interface for the
UIProcess side of the playbackControlsManager. It also caches the
m_controlsManagerContextId so that it can return the
controlsManagerInterface.

  • UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
  • UIProcess/Cocoa/WebVideoFullscreenManagerProxy.messages.in:
  • UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:

(WebKit::WebVideoFullscreenManagerProxy::setUpVideoControlsManagerWithID):
(WebKit::WebVideoFullscreenManagerProxy::controlsManagerInterface):

Pipe isPlayingMediaDidChange() to WebViewImpl, and use that information to
update WebViewImplAdditions.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::isPlayingMediaDidChange):

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::isPlayingMediaDidChange):
(WebKit::WebPageProxy::isPlayingVideoWithAudio):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::isPlayingAudio):

  • UIProcess/mac/PageClientImpl.h:
  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::isPlayingMediaDidChange):

Pipe setUpVideoControlsManager to the WebVideoFullscreenManager.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::setUpVideoControlsManager):

  • WebProcess/WebCoreSupport/WebChromeClient.h:

Ensure the model an interface for the playbackControlsManager on the
WebProcess side and pass the message to the UIProcess to do the same.

  • WebProcess/cocoa/WebVideoFullscreenManager.h:
  • WebProcess/cocoa/WebVideoFullscreenManager.mm:

(WebKit::WebVideoFullscreenManager::setUpVideoControlsManager):

12:49 PM Changeset in webkit [197460] by Ryan Haddad
  • 2 edits in branches/safari-601-branch/LayoutTests

Merge r194336. rdar://problem/24935448

12:39 PM Changeset in webkit [197459] by barraclough@apple.com
  • 3 edits in trunk/Source/WebCore

Add Page::TimerThrottlingState
https://bugs.webkit.org/show_bug.cgi?id=154926

Reviewed by Chris Dumez.

Hidden page timer throttling is currently a boolean state, indicated by whether the Optional
m_timerThrottlingEnabledTime is in a set/unset state. When enabled, the increasing mechanism
may or may not be enabled, this is controlled directly by the setting.

Refactor to add an enum tracking timer throttling being in one of three states - disabled,
enabled, or enabled-increasing. This cleans things up, and will enabled up to introduce a
dynamic policy for when enabled-throttling is enabled. (Behavior is unchanged in this patch.)

  • page/Page.cpp:

(WebCore::Page::Page):
(WebCore::Page::setIsVisuallyIdleInternal):
(WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged):

  • setTimerThrottlingEnabled -> updateTimerThrottlingState.

(WebCore::Page::updateTimerThrottlingState):

  • policy decision (currently enabled if visually-idle) was scattered across all call sites to setTimerThrottlingState. Unify in one place.

(WebCore::Page::setTimerThrottlingState):

  • Was setTimerThrottlingEnabled.

(WebCore::Page::setTimerAlignmentIntervalIncreaseLimit):
(WebCore::Page::setDOMTimerAlignmentInterval):
(WebCore::Page::timerAlignmentIntervalIncreaseTimerFired):

  • updated to check m_timerThrottlingState.

(WebCore::Page::setTimerThrottlingEnabled): Deleted.

  • This became updateTimerThrottlingState.
  • page/Page.h:

(WebCore::Page::timerThrottlingEnabled): Deleted.

  • Removed, it's easy enough now to just check m_timerThrottlingState.
12:38 PM Changeset in webkit [197458] by Chris Dumez
  • 17 edits in trunk

Align HTMLInputElement.maxLength with the specification
https://bugs.webkit.org/show_bug.cgi?id=154906

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C tests now that more checks are passing.

  • web-platform-tests/html/dom/reflection-forms-expected.txt:
  • web-platform-tests/html/semantics/forms/the-input-element/maxlength-expected.txt:

Source/WebCore:

Align HTMLInputElement.maxLength with the specification:

In particular, the following Web-facing change was made:

Note that HTMLTextAreaElement.maxLength was already returning -1 in
this case.

The new behavior matches Firefox. Chrome however, still seems to
return 524288.

Note that we keep using 524288 as a maximum maxLength internally for
performance reasons. However, we stop exposing this arbitrary value to
the Web as this is an internal limitation.

No new tests, already covered by existing tests.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::HTMLInputElement):
Initialize m_maxLength to -1 initially, instead of 524288.

(WebCore::HTMLInputElement::tooLong):
Call effectiveMaxLength() instead of maxLength(), which no longer
exists. effectiveMaxLength() makes sure of returning a value in
the range [0, 524288].

(WebCore::HTMLInputElement::parseAttribute):

(WebCore::HTMLInputElement::effectiveMaxLength):
Split maxLength() into maxLengthForBindings() and effectiveMaxLength().
effectiveMaxLength() returns a value in the range [0, 524288], while
maxLengthForBindings() returns values in the range [-1, 2147483647].

(WebCore::HTMLInputElement::setMaxLength): Deleted.
The implementation was moved to the parent class so that it can be
shared with HTMLTextAreaElement.

(WebCore::HTMLInputElement::maxLengthAttributeChanged):
Rename for clarity.

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::parseAttribute):
(WebCore::HTMLTextAreaElement::maxLengthAttributeChanged):
Cache the parsed maxLength when the content attribute changes, similarly
to what is already done in HTMLInputElement.

(WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
(WebCore::HTMLTextAreaElement::validationMessage):
(WebCore::HTMLTextAreaElement::tooLong):
Call effectiveMaxLength() instead of maxLength() which no longer exists.
effectiveMaxLength() returns a cached value and is therefore a lot more
efficient.

  • html/HTMLTextAreaElement.h:
  • html/HTMLTextAreaElement.idl:
  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setMaxLengthForBindings):
This was moved up from HTMLInputElement / HTMLTextAreaElement to avoid code
duplication.

  • html/HTMLTextFormControlElement.h:
  • html/InputType.cpp:

(WebCore::InputType::validationMessage):

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
Call HTMLInputElement::effectiveMaxLength() instead of
HTMLInputElement::maxLength() which no longer exists.

LayoutTests:

Update test now that input.maxLength initially returns -1
instead of 524288.

  • fast/forms/input-maxlength-expected.txt:
  • fast/forms/input-maxlength.html:
11:17 AM Changeset in webkit [197457] by sbarati@apple.com
  • 2 edits
    1 add in trunk/Source/JavaScriptCore

SIGSEGV in Proxy Get? and Set? recursion
https://bugs.webkit.org/show_bug.cgi?id=154854

Reviewed by Yusuke Suzuki.

We need to be aware of the possibility that the VM
may recurse and that we can stack overflow.

  • runtime/ProxyObject.cpp:

(JSC::performProxyGet):
(JSC::ProxyObject::performPut):

  • tests/stress/proxy-get-and-set-recursion-stack-overflow.js: Added.

(assert):
(testStackOverflowGet):
(testStackOverflowIndexedGet):
(testStackOverflowSet):
(testStackOverflowIndexedSet):

10:54 AM Changeset in webkit [197456] by commit-queue@webkit.org
  • 10 edits in trunk/Source/WebCore

Unreviewed, rolling out r197434 and r197436.
https://bugs.webkit.org/show_bug.cgi?id=154921

This change caused a LayoutTest assertion in debug (Requested
by ryanhaddad on #webkit).

Reverted changesets:

"Extend CSSFontSelector's lifetime to be longer than the
Document's lifetime"
https://bugs.webkit.org/show_bug.cgi?id=154101
http://trac.webkit.org/changeset/197434

"Unreviewed build fix after r197434."
http://trac.webkit.org/changeset/197436

10:31 AM Changeset in webkit [197455] by bshafiei@apple.com
  • 5 edits in trunk/Source

Versioning.

10:29 AM Changeset in webkit [197454] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.1.21

New tag.

10:05 AM Changeset in webkit [197453] by Ryan Haddad
  • 2 edits in branches/safari-601-branch/LayoutTests

Update TestExpectations for media/controls/track-menu.html. rdar://problem/24745197

  • platform/mac/TestExpectations:
9:59 AM Changeset in webkit [197452] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit2

REGRESSION(r197409): [GTK] Web process always crashes on WebPage construction after r197409
https://bugs.webkit.org/show_bug.cgi?id=154918

Reviewed by Žan Doberšek.

We have an incorrect check in DrawingAreaImpl constructor that has
never actually worked because it uses the page settings before
they were initialized. But that has been fixed in r197409 and now
we are always forcing accelerated compositing mode incorrectly,
because m_alwaysUseCompositing is set in the constructor and never
changed again.

  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::DrawingAreaImpl): Remove code to set
settings and m_alwaysUseCompositing, since that should be done in
updatePreferences().
(WebKit::DrawingAreaImpl::updatePreferences): Update the settings
accordingly and always update m_alwaysUseCompositing when AC is
enabled and forced in the settings.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage): WebPage::updatePreferences() calls
DrawingArea::updatePreferences(), but since r197409 it happens
before the drawing area has been created. So, call
DrawingArea::updatePreferences() in the constructor right after
the main frame has been created, since
DrawingArea::updatePreferences() uses the main frame.

9:32 AM Changeset in webkit [197451] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.4/Source/WebCore

Fix the build with VIDEO disabled.

Patch by Milan Crha <mcrha@redhat.com> on 2016-03-02
Reviewed by Carlos Garcia Campos.

  • platform/gtk/RenderThemeGtk2.cpp:
  • platform/gtk/RenderThemeGtk3.cpp:
9:16 AM Changeset in webkit [197450] by Alan Bujtas
  • 14 edits
    2 adds in trunk

Subpixel layout: Enable vertical/horizontal subpixel spacing for tables.
https://bugs.webkit.org/show_bug.cgi?id=154899

Reviewed by Simon Fraser.

This patch enables authors to specify device pixel values for table border spacing.
(see border-spacing)

Source/WebCore:

Test: fast/table/hidpi-vertical-and-horizontal-spacing.html

  • css/CSSPropertyNames.in:
  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::offsetLeftForColumn):
(WebCore::RenderTable::offsetWidthForColumn):
(WebCore::RenderTable::RenderTable): Deleted.

  • rendering/RenderTable.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::horizontalBorderSpacing):
(WebCore::RenderStyle::verticalBorderSpacing):
(WebCore::RenderStyle::setHorizontalBorderSpacing):
(WebCore::RenderStyle::setVerticalBorderSpacing):

  • rendering/style/RenderStyle.h:
  • rendering/style/StyleInheritedData.h:

LayoutTests:

  • fast/table/hidpi-vertical-and-horizontal-spacing-expected.html: Added.
  • fast/table/hidpi-vertical-and-horizontal-spacing.html: Added.
9:12 AM Changeset in webkit [197449] by Chris Dumez
  • 9 edits in trunk/Source/WebCore

Have parseHTMLInteger() / parseHTMLNonNegativeInteger() use WTF::Optional
https://bugs.webkit.org/show_bug.cgi?id=154845

Reviewed by Darin Adler.

Take into consideration review comments made after landing r197389.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::parseBorderWidthAttribute):
(WebCore::HTMLElement::parseAttribute):

  • html/HTMLInputElement.cpp:
  • html/HTMLInputElement.h:
  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::maxLength):

  • html/ImageInputType.cpp:

(WebCore::ImageInputType::height):
(WebCore::ImageInputType::width):

  • html/parser/HTMLParserIdioms.cpp:

(WebCore::parseHTMLNonNegativeInteger):

  • html/parser/HTMLParserIdioms.h:

(WebCore::limitToOnlyHTMLNonNegativeNumbersGreaterThanZero):
(WebCore::limitToOnlyHTMLNonNegative):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::parseAttribute):

9:08 AM Changeset in webkit [197448] by jdiggs@igalia.com
  • 8 edits in trunk/LayoutTests

[AX][GTK] Position-related tests need new baseline after r196439
https://bugs.webkit.org/show_bug.cgi?id=154917

The tests in question include the position accessed via the component
interface. The result changed by one pixel after r196439.

Unreviewed gardening.

  • platform/gtk/accessibility/image-link-expected.txt: new baseline
  • platform/gtk/accessibility/math-multiscript-attributes-expected.txt: new baseline
  • platform/gtk/accessibility/table-attributes-expected.txt: new baseline
  • platform/gtk/accessibility/table-cell-spans-expected.txt: new baseline
  • platform/gtk/accessibility/table-cells-expected.txt: new baseline
  • platform/gtk/accessibility/table-detection-expected.txt: new baseline
  • platform/gtk/accessibility/table-sections-expected.txt: new baseline
5:40 AM Changeset in webkit [197447] by alex
  • 2 edits in trunk/Tools

Unreviewed build fix for media-stream after r197114.

  • TestWebKitAPI/Tests/WebKit2/UserMedia.cpp:

(TestWebKitAPI::decidePolicyForUserMediaPermissionRequestCallBack):

2:22 AM Changeset in webkit [197446] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Use a Move without REX byte when possible
https://bugs.webkit.org/show_bug.cgi?id=154801

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-03-02
Reviewed by Alex Christensen.

Filip wrote an optimization in the register allocator
to use 32bit "Move" when we don't care about the top bytes.

When I moved the commutative ops to the fake 3 operands instruction
I largely destroyed this since all the "Moves" became full register.

In this patch, I switch back to 32bit "Moves" for 32bit operations.

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::and32):
(JSC::MacroAssemblerX86Common::lshift32):
(JSC::MacroAssemblerX86Common::mul32):
(JSC::MacroAssemblerX86Common::or32):
(JSC::MacroAssemblerX86Common::rshift32):
(JSC::MacroAssemblerX86Common::urshift32):
(JSC::MacroAssemblerX86Common::xor32):
(JSC::MacroAssemblerX86Common::branchAdd32):
(JSC::MacroAssemblerX86Common::branchMul32):
(JSC::MacroAssemblerX86Common::branchSub32):
(JSC::MacroAssemblerX86Common::move32IfNeeded):

Note: See TracTimeline for information about the timeline view.