Timeline



Jan 14, 2016:

11:18 PM Changeset in webkit [195092] by achristensen@apple.com
  • 8 edits
    3 deletes in trunk

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

test fails most of the time (Requested by alexchristensen on
#webkit).

Reverted changeset:

"Avoid downloading the wrong image for <picture> elements."
https://bugs.webkit.org/show_bug.cgi?id=153027
http://trac.webkit.org/changeset/195064

Patch by Commit Queue <commit-queue@webkit.org> on 2016-01-14

10:12 PM Changeset in webkit [195091] by rniwa@webkit.org
  • 10 edits in trunk

createElement should not lowercase non-ASCII characters
https://bugs.webkit.org/show_bug.cgi?id=153114

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaselined the tests for document.createElement now that more test cases are passing.

  • web-platform-tests/dom/nodes/Document-createElement-expected.txt:
  • web-platform-tests/dom/nodes/Document-getElementsByTagName-expected.txt:
  • web-platform-tests/dom/nodes/Element-getElementsByTagName-expected.txt:
  • web-platform-tests/dom/nodes/case-expected.txt:

Source/WebCore:

According to step 2 in https://dom.spec.whatwg.org/#dom-document-createelement, document.createElement should not
lowercase non-ASCII letters, and this is also what Firefox does. Match that behavior by lowercasing the tag name
by convertToASCIILowercase() instead of lower() in createElement.

Also merged HTMLDocument::createElement into Document::createElement for simplicity and avoid duplicating
the call to isValidName and setting a DOM exception.

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

  • dom/Document.cpp:

(WebCore::Document::createElement): Create a HTML element with ASCII-lowercased tag name inside a HTML document.

  • dom/Document.h:
  • html/HTMLDocument.cpp:

(WebCore::addLocalNameToSet):
(WebCore::HTMLDocument::createElement): Merged into Document::createElement.

  • html/HTMLDocument.h:
9:40 PM Changeset in webkit [195090] by beidson@apple.com
  • 14 edits
    1 copy in trunk/Source

Modern IDB: Support opening and deleting SQLite databases on disk.
https://bugs.webkit.org/show_bug.cgi?id=153084

Reviewed by Alex Christensen, Sam Weinig and Andy Estes (oh my!).

Source/WebCore:

No new tests (Infrastructure, no testable change in behavior).

  • Modules/indexeddb/IDBDatabaseIdentifier.cpp:

(WebCore::IDBDatabaseIdentifier::databaseDirectoryRelativeToRoot):

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

(WebCore::IDBServer::IDBServer::create):
(WebCore::IDBServer::IDBServer::IDBServer):
(WebCore::IDBServer::IDBServer::createBackingStore):

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

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

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
  • Modules/indexeddb/shared/InProcessIDBServer.cpp:

(WebCore::InProcessIDBServer::create):
(WebCore::InProcessIDBServer::InProcessIDBServer):

  • Modules/indexeddb/shared/InProcessIDBServer.h:

Source/WebKit:

  • Storage/WebDatabaseProvider.cpp:

(WebDatabaseProvider::idbConnectionToServerForSession):

  • Storage/WebDatabaseProvider.h:
  • WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

  • Storage/WebDatabaseProvider.mm: Copied from Source/WebKit/Storage/WebDatabaseProvider.cpp.

(WebDatabaseProvider::indexedDatabaseDirectoryPath):

9:23 PM Changeset in webkit [195089] by mmaxfield@apple.com
  • 2 edits in trunk/LayoutTests

Test gardening after r195088

Unreviewed.

  • http/tests/contentextensions/font-display-none-repeated-layout-expected.txt:
7:31 PM Changeset in webkit [195088] by mmaxfield@apple.com
  • 5 edits
    3 adds in trunk

Mixing Content Blocking of fonts and display:none rules causes battery drain
https://bugs.webkit.org/show_bug.cgi?id=153051
<rdar://problem/23187709>

Reviewed by Alex Christensen.

Source/WebCore:

If we have applied a rule before and we are not applying it again, don't
resolve the style again.

Test: http/tests/contentextensions/font-display-none-repeated-layout.html

  • contentextensions/ContentExtensionStyleSheet.cpp:

(WebCore::ContentExtensions::ContentExtensionStyleSheet::addDisplayNoneSelector):

  • contentextensions/ContentExtensionStyleSheet.h:
  • dom/ExtensionStyleSheets.cpp:

(WebCore::ExtensionStyleSheets::addDisplayNoneSelector):

LayoutTests:

Make sure that layoutCount does not skyrocket.

  • http/tests/contentextensions/font-display-none-repeated-layout-expected.txt: Added.
  • http/tests/contentextensions/font-display-none-repeated-layout.html: Added.
  • http/tests/contentextensions/font-display-none-repeated-layout.html.json: Added.
6:59 PM Changeset in webkit [195087] by rniwa@webkit.org
  • 12 edits
    9 adds in trunk

Add document.defineCustomElement
https://bugs.webkit.org/show_bug.cgi?id=153092

Reviewed by Chris Dumez.

Source/WebCore:

Added document.defineCustomElement and added a constructor to HTMLElement which can be called
as "super" in a subclass of HTMLElement. This is a prototype of new custom elements API and
willfully violates the current specification at http://w3c.github.io/webcomponents/spec/custom/

Each author defined class can define multiple elements using distinct tag names. In such cases,
the super call must specify the tag name. e.g.

class SomeCustomElement extends HTMLElement { constructor(name) { super(name); } }
document.defineCustomElement('some-custom-element', SomeCustomElement);
document.defineCustomElement('other-custom-element', SomeCustomElement);
new SomeCustomElement('some-custom-element');

When a class is associated with exactly one tag name, the argument can be omitted. e.g.

class AnotherCustomElement extends HTMLElement {}
document.defineCustomElement('another-custom-element', AnotherCustomElement);
new AnotherCustomElement();

We allow only subclassing of HTMLElement and only in (X)HTML namespace.

Tests: fast/custom-elements/Document-defineCustomElement.html

fast/custom-elements/HTMLElement-constructor.html

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCustomElementInterface.cpp: Added. Abstracts an author-defined class associated

with a custom element. It's a Active DOM object and lives until the associated document dies.
(WebCore::JSCustomElementInterface::JSCustomElementInterface):
(WebCore::JSCustomElementInterface::~JSCustomElementInterface):

  • bindings/js/JSCustomElementInterface.h: Added.

(WebCore::JSCustomElementInterface::create):
(WebCore::JSCustomElementInterface::scriptExecutionContext):
(WebCore::JSCustomElementInterface::constructor):

  • bindings/js/JSDocumentCustom.cpp:

(WebCore::JSDocument::defineCustomElement): Added. Define a custom element by associating a tag
name with an author defined JS class after validating arguments.

  • bindings/js/JSHTMLElementCustom.cpp:

(WebCore::constructJSHTMLElement): Added. Look up the tag name based on new.target if one is not
specified. If a tag name is specified, check that new.target is associated with the tag name.

  • dom/CustomElementDefinitions.cpp: Added.

(WebCore::CustomElementDefinitions::checkName): Added. Restricts tag names similarly to
http://w3c.github.io/webcomponents/spec/custom/#dfn-custom-element-type
(WebCore::CustomElementDefinitions::defineElement): Added. Associates a JS class with a tag name.
(WebCore::CustomElementDefinitions::findInterface): Added. Finds a JS class by a tag name.
(WebCore::CustomElementDefinitions::findName): Added. Finds a tag name by a JS class.

  • dom/CustomElementDefinitions.h: Added.

(WebCore::CustomElementDefinitions::CustomElementInfo): Added.

  • dom/Document.cpp:

(WebCore::Document::ensureCustomElementDefinitions): Added.

  • dom/Document.h:

(WebCore::Document::customElementDefinitions): Added.

  • dom/Document.idl:
  • html/HTMLElement.idl:

LayoutTests:

Added tests for document.defineCustomElement and instantiating custom elements.

  • TestExpectations: Skipped the tests on non-Mac ports.
  • fast/custom-elements: Added.
  • fast/custom-elements/Document-defineCustomElement-expected.txt: Added.
  • fast/custom-elements/Document-defineCustomElement.html: Added.
  • fast/custom-elements/HTMLElement-constructor-expected.txt: Added.
  • fast/custom-elements/HTMLElement-constructor.html: Added.
  • platform/mac/TestExpectations:
5:04 PM Changeset in webkit [195086] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-601.5.10

New Tag.

4:59 PM Changeset in webkit [195085] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-601.1.46.92

New Tag.

4:58 PM Changeset in webkit [195084] by fpizlo@apple.com
  • 30 edits
    10 adds in trunk/Source/JavaScriptCore

Air needs a Shuffle instruction
https://bugs.webkit.org/show_bug.cgi?id=152952

Reviewed by Saam Barati.

This adds an instruction called Shuffle. Shuffle allows you to simultaneously perform
multiple moves to perform arbitrary permutations over registers and memory. We call these
rotations. It also allows you to perform "shifts", like (a => b, b => c): after the shift,
c will have b's old value, b will have a's old value, and a will be unchanged. Shifts can
use immediates as their source.

Shuffle is added as a custom instruction, since it has a variable number of arguments. It
takes any number of triplets of arguments, where each triplet describes one mapping of the
shuffle. For example, to represent (a => b, b => c), we might say:

Shuffle %a, %b, 64, %b, %c, 64

Note the "64"s, those are width arguments that describe how many bits of the register are
being moved. Each triplet is referred to as a "shuffle pair". We call it a pair because the
most relevant part of it is the pair of registers or memroy locations (i.e. %a, %b form one
of the pairs in the example). For GP arguments, the width follows ZDef semantics.

In the future, we will be able to use Shuffle for a lot of things. This patch is modest about
how to use it:

  • C calling convention argument marshalling. Previously we used move instructions. But that's problematic since it introduces artificial interference between the argument registers and the inputs. Using Shuffle removes that interference. This helps a bit.
  • Cold C calls. This is what really motivated me to write this patch. If we have a C call on a cold path, then we want it to appear to the register allocator like it doesn't clobber any registers. Only after register allocation should we handle the clobbering by simply saving all of the live volatile registers to the stack. If you imagine the saving and the argument marshalling, you can see how before the call, we want to have a Shuffle that does both of those things. This is important. If argument marshalling was separate from the saving, then we'd still appear to clobber argument registers. Doing them together as one Shuffle means that the cold call doesn't appear to even clobber the argument registers.

Unfortunately, I was wrong about cold C calls being the dominant problem with our register
allocator right now. Fixing this revealed other problems in my current tuning benchmark,
Octane/encrypt. Nonetheless, this is a small speed-up across the board, and gives us some
functionality we will need to implement other optimizations.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/AbstractMacroAssembler.h:

(JSC::isX86_64):
(JSC::isIOS):
(JSC::optimizeForARMv7IDIVSupported):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::zeroExtend32ToPtr):
(JSC::MacroAssemblerX86Common::swap32):
(JSC::MacroAssemblerX86Common::moveConditionally32):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::store64WithAddressOffsetPatch):
(JSC::MacroAssemblerX86_64::swap64):
(JSC::MacroAssemblerX86_64::move64ToDouble):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::xchgl_rr):
(JSC::X86Assembler::xchgl_rm):
(JSC::X86Assembler::xchgq_rr):
(JSC::X86Assembler::xchgq_rm):
(JSC::X86Assembler::movl_rr):

  • b3/B3CCallValue.h:
  • b3/B3Compilation.cpp:

(JSC::B3::Compilation::Compilation):
(JSC::B3::Compilation::~Compilation):

  • b3/B3Compilation.h:

(JSC::B3::Compilation::code):

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::run):
(JSC::B3::Air::LowerToAir::createSelect):
(JSC::B3::Air::LowerToAir::lower):
(JSC::B3::Air::LowerToAir::marshallCCallArgument): Deleted.

  • b3/B3OpaqueByproducts.h:

(JSC::B3::OpaqueByproducts::count):

  • b3/B3StackmapSpecial.cpp:

(JSC::B3::StackmapSpecial::isArgValidForValue):
(JSC::B3::StackmapSpecial::isArgValidForRep):

  • b3/air/AirArg.cpp:

(JSC::B3::Air::Arg::isStackMemory):
(JSC::B3::Air::Arg::isRepresentableAs):
(JSC::B3::Air::Arg::usesTmp):
(JSC::B3::Air::Arg::canRepresent):
(JSC::B3::Air::Arg::isCompatibleType):
(JSC::B3::Air::Arg::dump):
(WTF::printInternal):

  • b3/air/AirArg.h:

(JSC::B3::Air::Arg::forEachType):
(JSC::B3::Air::Arg::isWarmUse):
(JSC::B3::Air::Arg::cooled):
(JSC::B3::Air::Arg::isEarlyUse):
(JSC::B3::Air::Arg::imm64):
(JSC::B3::Air::Arg::immPtr):
(JSC::B3::Air::Arg::addr):
(JSC::B3::Air::Arg::special):
(JSC::B3::Air::Arg::widthArg):
(JSC::B3::Air::Arg::operator==):
(JSC::B3::Air::Arg::isImm64):
(JSC::B3::Air::Arg::isSomeImm):
(JSC::B3::Air::Arg::isAddr):
(JSC::B3::Air::Arg::isIndex):
(JSC::B3::Air::Arg::isMemory):
(JSC::B3::Air::Arg::isRelCond):
(JSC::B3::Air::Arg::isSpecial):
(JSC::B3::Air::Arg::isWidthArg):
(JSC::B3::Air::Arg::isAlive):
(JSC::B3::Air::Arg::base):
(JSC::B3::Air::Arg::hasOffset):
(JSC::B3::Air::Arg::offset):
(JSC::B3::Air::Arg::width):
(JSC::B3::Air::Arg::isGPTmp):
(JSC::B3::Air::Arg::isGP):
(JSC::B3::Air::Arg::isFP):
(JSC::B3::Air::Arg::isType):
(JSC::B3::Air::Arg::isGPR):
(JSC::B3::Air::Arg::isValidForm):
(JSC::B3::Air::Arg::forEachTmpFast):

  • b3/air/AirBasicBlock.h:

(JSC::B3::Air::BasicBlock::insts):
(JSC::B3::Air::BasicBlock::appendInst):
(JSC::B3::Air::BasicBlock::append):

  • b3/air/AirCCallingConvention.cpp: Added.

(JSC::B3::Air::computeCCallingConvention):
(JSC::B3::Air::cCallResult):
(JSC::B3::Air::buildCCall):

  • b3/air/AirCCallingConvention.h: Added.
  • b3/air/AirCode.h:

(JSC::B3::Air::Code::proc):

  • b3/air/AirCustom.cpp: Added.

(JSC::B3::Air::CCallCustom::isValidForm):
(JSC::B3::Air::CCallCustom::generate):
(JSC::B3::Air::ShuffleCustom::isValidForm):
(JSC::B3::Air::ShuffleCustom::generate):

  • b3/air/AirCustom.h:

(JSC::B3::Air::PatchCustom::forEachArg):
(JSC::B3::Air::PatchCustom::generate):
(JSC::B3::Air::CCallCustom::forEachArg):
(JSC::B3::Air::CCallCustom::isValidFormStatic):
(JSC::B3::Air::CCallCustom::admitsStack):
(JSC::B3::Air::CCallCustom::hasNonArgNonControlEffects):
(JSC::B3::Air::ColdCCallCustom::forEachArg):
(JSC::B3::Air::ShuffleCustom::forEachArg):
(JSC::B3::Air::ShuffleCustom::isValidFormStatic):
(JSC::B3::Air::ShuffleCustom::admitsStack):
(JSC::B3::Air::ShuffleCustom::hasNonArgNonControlEffects):

  • b3/air/AirEmitShuffle.cpp: Added.

(JSC::B3::Air::ShufflePair::dump):
(JSC::B3::Air::emitShuffle):

  • b3/air/AirEmitShuffle.h: Added.

(JSC::B3::Air::ShufflePair::ShufflePair):
(JSC::B3::Air::ShufflePair::src):
(JSC::B3::Air::ShufflePair::dst):
(JSC::B3::Air::ShufflePair::width):

  • b3/air/AirGenerate.cpp:

(JSC::B3::Air::prepareForGeneration):

  • b3/air/AirGenerate.h:
  • b3/air/AirInsertionSet.cpp:

(JSC::B3::Air::InsertionSet::insertInsts):
(JSC::B3::Air::InsertionSet::execute):

  • b3/air/AirInsertionSet.h:

(JSC::B3::Air::InsertionSet::insertInst):
(JSC::B3::Air::InsertionSet::insert):

  • b3/air/AirInst.h:

(JSC::B3::Air::Inst::operator bool):
(JSC::B3::Air::Inst::append):

  • b3/air/AirLowerAfterRegAlloc.cpp: Added.

(JSC::B3::Air::lowerAfterRegAlloc):

  • b3/air/AirLowerAfterRegAlloc.h: Added.
  • b3/air/AirLowerMacros.cpp: Added.

(JSC::B3::Air::lowerMacros):

  • b3/air/AirLowerMacros.h: Added.
  • b3/air/AirOpcode.opcodes:
  • b3/air/AirRegisterPriority.h:

(JSC::B3::Air::regsInPriorityOrder):

  • b3/air/testair.cpp: Added.

(hiddenTruthBecauseNoReturnIsStupid):
(usage):
(JSC::B3::Air::compile):
(JSC::B3::Air::invoke):
(JSC::B3::Air::compileAndRun):
(JSC::B3::Air::testSimple):
(JSC::B3::Air::loadConstantImpl):
(JSC::B3::Air::loadConstant):
(JSC::B3::Air::loadDoubleConstant):
(JSC::B3::Air::testShuffleSimpleSwap):
(JSC::B3::Air::testShuffleSimpleShift):
(JSC::B3::Air::testShuffleLongShift):
(JSC::B3::Air::testShuffleLongShiftBackwards):
(JSC::B3::Air::testShuffleSimpleRotate):
(JSC::B3::Air::testShuffleSimpleBroadcast):
(JSC::B3::Air::testShuffleBroadcastAllRegs):
(JSC::B3::Air::testShuffleTreeShift):
(JSC::B3::Air::testShuffleTreeShiftBackward):
(JSC::B3::Air::testShuffleTreeShiftOtherBackward):
(JSC::B3::Air::testShuffleMultipleShifts):
(JSC::B3::Air::testShuffleRotateWithFringe):
(JSC::B3::Air::testShuffleRotateWithLongFringe):
(JSC::B3::Air::testShuffleMultipleRotates):
(JSC::B3::Air::testShuffleShiftAndRotate):
(JSC::B3::Air::testShuffleShiftAllRegs):
(JSC::B3::Air::testShuffleRotateAllRegs):
(JSC::B3::Air::testShuffleSimpleSwap64):
(JSC::B3::Air::testShuffleSimpleShift64):
(JSC::B3::Air::testShuffleSwapMixedWidth):
(JSC::B3::Air::testShuffleShiftMixedWidth):
(JSC::B3::Air::testShuffleShiftMemory):
(JSC::B3::Air::testShuffleShiftMemoryLong):
(JSC::B3::Air::testShuffleShiftMemoryAllRegs):
(JSC::B3::Air::testShuffleShiftMemoryAllRegs64):
(JSC::B3::Air::combineHiLo):
(JSC::B3::Air::testShuffleShiftMemoryAllRegsMixedWidth):
(JSC::B3::Air::testShuffleRotateMemory):
(JSC::B3::Air::testShuffleRotateMemory64):
(JSC::B3::Air::testShuffleRotateMemoryMixedWidth):
(JSC::B3::Air::testShuffleRotateMemoryAllRegs64):
(JSC::B3::Air::testShuffleRotateMemoryAllRegsMixedWidth):
(JSC::B3::Air::testShuffleSwapDouble):
(JSC::B3::Air::testShuffleShiftDouble):
(JSC::B3::Air::run):
(run):
(main):

  • b3/testb3.cpp:

(JSC::B3::testCallSimple):
(JSC::B3::testCallRare):
(JSC::B3::testCallRareLive):
(JSC::B3::testCallSimplePure):
(JSC::B3::run):

4:50 PM Changeset in webkit [195083] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[webkitdirs] Replaced grep invocation with perl code
https://bugs.webkit.org/show_bug.cgi?id=153106

Patch by Konstantin Tokarev <Konstantin Tokarev> on 2016-01-14
Reviewed by Alex Christensen.

  • Scripts/webkitdirs.pm:

(determineArchitecture):

4:14 PM Changeset in webkit [195082] by Simon Fraser
  • 5 edits in trunk/Source

Remove workaround for rdar://problem/23623670
https://bugs.webkit.org/show_bug.cgi?id=153107
rdar://problem/23633319

Reviewed by Tim Horton.

Remove the code that uses IOSurfaceAcceleratorTransformSurface() when copying from
back-to-front buffer, now that CGIOSurfaceContextCreate()-code path works correctly.

Source/WebCore:

  • platform/graphics/cocoa/IOSurface.h:
  • platform/graphics/cocoa/IOSurface.mm:

(IOSurface::ensurePlatformContext):
(IOSurface::copyToSurface): Deleted.

Source/WebKit2:

  • Shared/mac/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::display):

4:07 PM Changeset in webkit [195081] by Beth Dakin
  • 9 edits in trunk/Source

WK1 and WK2 should share more candidate request code
https://bugs.webkit.org/show_bug.cgi?id=153108

Reviewed by Simon Fraser.

requestCandidatesForSelection() does not need to be exposed as an
EditorClient function. WK1 can just call invoke this code from the existing
respondToChangedSelection EditorClient function, which is what WK2 does.
Source/WebCore:

  • editing/Editor.cpp:

(WebCore::Editor::respondToChangedSelection):

  • loader/EmptyClients.h:
  • page/EditorClient.h:

(WebCore::EditorClient::supportsGlobalSelection):

Source/WebKit/mac:

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::respondToChangedSelection):

Cleanup — use some code that was moved to WebCore::Editor.
(WebEditorClient::requestCandidatesForSelection):
(WebEditorClient::handleRequestedCandidates):
(textCheckingResultFromNSTextCheckingResult):
(WebEditorClient::handleAcceptedCandidate):
(candidateRangeForSelection): Deleted.
(candidateWouldReplaceText): Deleted.

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebEditorClient.h:
3:07 PM Changeset in webkit [195080] by BJ Burg
  • 2 edits in trunk/Tools

prepare-changelog does not read paths containing spaces properly
https://bugs.webkit.org/show_bug.cgi?id=137982

Reviewed by Joseph Pecoraro.

Escape whitespace in filenames before passing the file path to other functions.

  • Scripts/prepare-ChangeLog:

(generateFunctionLists): Use the more explicit 3-argument form of 'open'.

3:00 PM Changeset in webkit [195079] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Unreviewed, rolling out r195035.

Caused 1-3% PLT regression on iOS

Reverted changeset:

"Part 2/2: Stop using USE(CFNETWORK) path on iOS"
https://bugs.webkit.org/show_bug.cgi?id=142540
http://trac.webkit.org/changeset/195035

2:44 PM Changeset in webkit [195078] by Beth Dakin
  • 15 edits
    2 adds in trunk

WK2: Request completion candidates when needed
https://bugs.webkit.org/show_bug.cgi?id=153040
-and corresponding-
rdar://problem/24155631

Reviewed by Enrica Casucci and Tim Horton.

Source/WebCore:

Helper functions for stringForCandidateRequest() and
handleAcceptedCandidate()

  • editing/Editor.cpp:

(WebCore::candidateRangeForSelection):
(WebCore::candidateWouldReplaceText):

Request candidates for the word that is currently being typed so long as the
candidate would replace that word. Otherwise, use String().
(WebCore::Editor::stringForCandidateRequest):

When a candidate has been accepted, insert the text.
(WebCore::Editor::handleAcceptedCandidate):

  • editing/Editor.h:

Source/WebKit2:

Mac needs to support postLayoutData in order to have some layout-related
editing information to request candidates. This patch re-shuffles some items
in the struct so that they can be shared by Mac and iOS, and it adds 3 new
items for Mac only.

  • Shared/EditorState.cpp:

(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
(WebKit::EditorState::PostLayoutData::encode):
(WebKit::EditorState::PostLayoutData::decode):

  • Shared/EditorState.h:

Request and handle candidates here in WebViewImpl, and cache the
m_lastStringForCandidateRequest so that we can ensure the results we receive
were received in a timely enough manner that they are still for the same
String.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::selectionDidChange):

When selection changes, request new candidates.
(WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):

Once candidates have been received, we ask the sharedSpellChecker to show
them.
(WebKit::WebViewImpl::handleRequestedCandidates):

If a candidate is accepted, we ask the WebProcess to accept it, so we start
by converting the NSTextCheckingResult to a WebCore::TextCheckingResult.
(WebKit::textCheckingResultFromNSTextCheckingResult):
(WebKit::WebViewImpl::handleAcceptedCandidate):

Ask the WebProcess to handle accepting the candidate.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handleAcceptedCandidate):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage:: handleAcceptedCandidate):

  • WebProcess/WebPage/WebPage.messages.in:

Now that Mac has some postLayoutData in the EditorState, fill that in in
platformEditorState().

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::platformEditorState):

Ask WebCore::Editor to handle the accepted candidate.
(WebKit::WebPage::handleAcceptedCandidate):

LayoutTests:

Getting updated EditorState in platformEditorState causes some extra layout
to happen, so now the layout test results for WK2 reflect the results that we
already see on iOS for this test and they reflect the render tree as it is
when you load the page in browser.

  • platform/mac/fast/dom/focus-contenteditable-expected.txt:

WebKit 1 is not affected by these new results, so this adds WK-1 only results
that match the old Mac results.

  • platform/mac-wk1/fast/dom: Added.
  • platform/mac-wk1/fast/dom/focus-contenteditable-expected.txt: Added.
2:44 PM Changeset in webkit [195077] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed mark passing es6 tests as no longer failing.

  • tests/es6.yaml:
2:33 PM Changeset in webkit [195076] by jmarcell@apple.com
  • 4 edits in trunk/Tools

Standardize the usage of "branch" vs. "branchName". https://bugs.webkit.org/show_bug.cgi?id=152982

Reviewed by Daniel Bates.

In an earlier patch we started using the name "branch" to indicate a branch object, whereas
"branchName" implies that the variable or property in question is simply a string.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:

(BuildbotQueueView.prototype._popoverLinesForCommitRange): Change branch to branchName.
(BuildbotQueueView.prototype._presentPopoverForRevisionRange): Change branch to branch.name.
(BuildbotQueueView.prototype._revisionContentWithPopoverForIteration): Change branch to branchName.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:

(Trac.prototype.commitsOnBranch): Change branch to branchName.
(Trac.prototype._convertCommitInfoElementToObject): Ditto.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js:

(MockTrac): Ditto.

1:42 PM Changeset in webkit [195075] by dbates@webkit.org
  • 5 edits
    15 adds in trunk

Disallow use of Geolocation service from unique origins
https://bugs.webkit.org/show_bug.cgi?id=153102
<rdar://problem/23055645>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Tests: fast/dom/Geolocation/dataURL-getCurrentPosition.html

fast/dom/Geolocation/dataURL-watchPosition.html
fast/dom/Geolocation/srcdoc-getCurrentPosition.html
fast/dom/Geolocation/srcdoc-watchPosition.html
http/tests/security/sandboxed-iframe-geolocation-getCurrentPosition.html
http/tests/security/sandboxed-iframe-geolocation-watchPosition.html

  • Modules/geolocation/Geolocation.cpp:

(WebCore::Geolocation::securityOrigin): Convenience function to get the SecurityOrigin object
associated with this script execution context.
(WebCore::Geolocation::startRequest): Notify requester POSITION_UNAVAILABLE when requested
from a document with a unique origin.

  • Modules/geolocation/Geolocation.h:
  • page/SecurityOrigin.h:

(WebCore::SecurityOrigin::canRequestGeolocation): Added.

LayoutTests:

  • fast/dom/Geolocation/dataURL-getCurrentPosition-expected.txt: Added.
  • fast/dom/Geolocation/dataURL-getCurrentPosition.html: Added.
  • fast/dom/Geolocation/dataURL-watchPosition-expected.txt: Added.
  • fast/dom/Geolocation/dataURL-watchPosition.html: Added.
  • fast/dom/Geolocation/srcdoc-getCurrentPosition-expected.txt: Added.
  • fast/dom/Geolocation/srcdoc-getCurrentPosition.html: Added.
  • fast/dom/Geolocation/srcdoc-watchPosition-expected.txt: Added.
  • fast/dom/Geolocation/srcdoc-watchPosition.html: Added.
  • http/tests/security/resources/checkThatPositionErrorCallbackIsCalledWithPositionUnavailableForGeolocationMethod.js: Added.

(done):
(logMessage):
(didReceivePosition):
(didReceiveError):
(checkThatPositionErrorCallbackIsCalledWithPositionUnavailableForGeolocationMethod):
(markupToCheckThatPositionErrorCallbackIsCalledWithPositionUnavailableForGeolocationMethod):
(dataURLToCheckThatPositionErrorCallbackIsCalledWithPositionUnavailableForGeolocationMethod):

  • http/tests/security/resources/sandboxed-iframe-geolocation-getCurrentPosition.html: Added.
  • http/tests/security/resources/sandboxed-iframe-geolocation-watchPosition.html: Added.
  • http/tests/security/sandboxed-iframe-geolocation-getCurrentPosition-expected.txt: Added.
  • http/tests/security/sandboxed-iframe-geolocation-getCurrentPosition.html: Added.
  • http/tests/security/sandboxed-iframe-geolocation-watchPosition-expected.txt: Added.
  • http/tests/security/sandboxed-iframe-geolocation-watchPosition.html: Added.
1:40 PM Changeset in webkit [195074] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

[XSS Auditor] Extract attribute truncation logic and formalize string canonicalization
https://bugs.webkit.org/show_bug.cgi?id=152874

Reviewed by Brent Fulgham.

Derived from Blink patch (by Tom Sepez <tsepez@chromium.org>):
<https://src.chromium.org/viewvc/blink?revision=176339&view=revision>

Extract the src-like and script-like attribute truncation logic into independent functions
towards making it more straightforward to re-purpose this logic. Additionally, formalize the
concept of string canonicalization as a member function that consolidates the process of
decoding URL escape sequences, truncating the decoded string (if applicable), and removing
characters that are considered noise.

  • html/parser/XSSAuditor.cpp:

(WebCore::truncateForSrcLikeAttribute): Extracted from XSSAuditor::decodedSnippetForAttribute().
(WebCore::truncateForScriptLikeAttribute): Ditto.
(WebCore::XSSAuditor::init): Write in terms of XSSAuditor::canonicalize().
(WebCore::XSSAuditor::filterCharacterToken): Updated to make use of formalized canonicalization methods.
(WebCore::XSSAuditor::filterScriptToken): Ditto.
(WebCore::XSSAuditor::filterObjectToken): Ditto.
(WebCore::XSSAuditor::filterParamToken): Ditto.
(WebCore::XSSAuditor::filterEmbedToken): Ditto.
(WebCore::XSSAuditor::filterAppletToken): Ditto.
(WebCore::XSSAuditor::filterFrameToken): Ditto.
(WebCore::XSSAuditor::filterInputToken): Ditto.
(WebCore::XSSAuditor::filterButtonToken): Ditto.
(WebCore::XSSAuditor::eraseDangerousAttributesIfInjected): Ditto.
(WebCore::XSSAuditor::eraseAttributeIfInjected): Updated code to use early return style and avoid an unnecessary string
comparison when we know that a src attribute was injected.
(WebCore::XSSAuditor::canonicalizedSnippetForTagName): Renamed; formerly known as XSSAuditor::decodedSnippetForName(). Updated
to make use of XSSAuditor::canonicalize().
(WebCore::XSSAuditor::snippetFromAttribute): Renamed; formerly known as XSSAuditor::decodedSnippetForAttribute(). Moved
truncation logic from here to WebCore::truncateFor{Script, Src}LikeAttribute.
(WebCore::XSSAuditor::canonicalize): Added.
(WebCore::XSSAuditor::canonicalizedSnippetForJavaScript): Added.
(WebCore::canonicalize): Deleted.
(WebCore::XSSAuditor::decodedSnippetForName): Deleted.
(WebCore::XSSAuditor::decodedSnippetForAttribute): Deleted.
(WebCore::XSSAuditor::decodedSnippetForJavaScript): Deleted.

  • html/parser/XSSAuditor.h: Define enum class for the various attribute truncation styles.
1:37 PM Changeset in webkit [195073] by dbates@webkit.org
  • 4 edits
    2 adds in trunk

[XSS Auditor] Partial bypass when web server collapses path components
https://bugs.webkit.org/show_bug.cgi?id=152872

Reviewed by Brent Fulgham.

Merged from Blink (patch by Tom Sepez <tsepez@chromium.org>):
<https://src.chromium.org/viewvc/blink?revision=167610&view=revision>

Source/WebCore:

Test: http/tests/security/xssAuditor/embed-tag-in-path-unterminated.html

  • html/parser/XSSAuditor.cpp:

(WebCore::isNonCanonicalCharacter):
(WebCore::XSSAuditor::init):
(WebCore::XSSAuditor::decodedSnippetForName):
(WebCore::XSSAuditor::decodedSnippetForAttribute):
(WebCore::XSSAuditor::decodedSnippetForJavaScript):
(WebCore::fullyDecodeString): Deleted.

LayoutTests:

  • http/tests/security/xssAuditor/embed-tag-in-path-unterminated-expected.txt: Added.
  • http/tests/security/xssAuditor/embed-tag-in-path-unterminated.html: Added.
  • http/tests/security/xssAuditor/intercept/.htaccess:
1:31 PM Changeset in webkit [195072] by Beth Dakin
  • 2 edits in trunk/Source/WebCore

imported/blink/editing/text-iterator/read-past-cloned-first-letter.html
crashes
https://bugs.webkit.org/show_bug.cgi?id=153104
-and corresponding-
rdar://problem/24155631

Reviewed by Simon Fraser.

Though we merged the Blink test, we never merged Blink patch that fixed this
bug. So this is a merge of https://github.com/ChromiumWebApps/blink/commit/5a0d23d4368c661f621364339fde66b41ef019e5

  • editing/TextIterator.cpp:

(WebCore::SimplifiedBackwardsTextIterator::handleFirstLetter):

1:11 PM Changeset in webkit [195071] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[iOS Simulator] fast/table/003.html failing
https://bugs.webkit.org/show_bug.cgi?id=152444

Unreviewed gardening.

  • platform/ios-simulator/fast/table/003-expected.txt:
12:45 PM Changeset in webkit [195070] by keith_miller@apple.com
  • 10 edits
    1 add in trunk

[ES6] Support subclassing Function.
https://bugs.webkit.org/show_bug.cgi?id=153081

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This patch enables subclassing the Function object. It also fixes an existing
bug that prevented users from subclassing functions that have a function in
the superclass's prototype property.

  • bytecompiler/NodesCodegen.cpp:

(JSC::ClassExprNode::emitBytecode):

  • runtime/FunctionConstructor.cpp:

(JSC::constructWithFunctionConstructor):
(JSC::constructFunction):
(JSC::constructFunctionSkippingEvalEnabledCheck):

  • runtime/FunctionConstructor.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::create):

  • runtime/JSFunction.h:

(JSC::JSFunction::createImpl):

  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::createWithInvalidatedReallocationWatchpoint):
(JSC::JSFunction::JSFunction): Deleted.

  • tests/stress/class-subclassing-function.js: Added.

LayoutTests:

Rebasline tests with the new clearer error message.

  • js/class-syntax-extends-expected.txt:
  • js/script-tests/class-syntax-extends.js:
12:09 PM Changeset in webkit [195069] by Alan Bujtas
  • 6 edits
    2 adds in trunk
ASSERTION FAILED: !newRelayoutRoot.container()
!newRelayoutRoot.container()->needsLayout() in WebCore::FrameView::scheduleRelayoutOfSubtree

https://bugs.webkit.org/show_bug.cgi?id=151605#c1

Reviewed by David Hyatt.

Do not let RenderMultiColumnSet/RenderFlowThread mark ancestors dirty while updating scrollbars
for overflow content. While updating scrollbars, we only layout descendants so marking parents dirty
is unnecessary and could lead to an invalid dirty state.

Source/WebCore:

Test: fast/multicol/body-stuck-with-dirty-bit-with-columns.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::layoutSpecialExcludedChild):

  • rendering/RenderFlowThread.cpp:

(WebCore::RenderFlowThread::invalidateRegions):

  • rendering/RenderFlowThread.h:
  • rendering/RenderMultiColumnSet.cpp:

(WebCore::RenderMultiColumnSet::prepareForLayout):

LayoutTests:

  • fast/multicol/body-stuck-with-dirty-bit-with-columns-expected.txt: Added.
  • fast/multicol/body-stuck-with-dirty-bit-with-columns.html: Added.
11:19 AM Changeset in webkit [195068] by matthew_hanson@apple.com
  • 15 edits
    2 adds in branches/safari-601-branch

Merge r194672. rdar://problem/24154288

11:19 AM Changeset in webkit [195067] by matthew_hanson@apple.com
  • 43 edits
    3 copies
    1 add in branches/safari-601-branch

Merge r192200. rdar://problem/24154288

11:18 AM Changeset in webkit [195066] by matthew_hanson@apple.com
  • 9 edits in branches/safari-601-branch/Source

Merge r189135. rdar://problem/24154288

11:18 AM Changeset in webkit [195065] by timothy@apple.com
  • 2 edits in branches/safari-601-branch/Source/WebInspectorUI

<rdar://problem/24189668> REGRESSION: The Web Inspector isn't visible when its associated menu item is selected via the "Develop" menu

  • UserInterface/Base/Main.js:

(WebInspector._dockedResizerMouseDown.dockedResizerDrag): Change let to var.

11:13 AM Changeset in webkit [195064] by hyatt@apple.com
  • 8 edits
    3 adds in trunk

Avoid downloading the wrong image for <picture> elements.
https://bugs.webkit.org/show_bug.cgi?id=153027

Reviewed by Dean Jackson.

Source/WebCore:

Added test in fast/picture.

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::~HTMLImageElement):
(WebCore::HTMLImageElement::createForJSConstructor):
(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
(WebCore::HTMLImageElement::pictureElement):
(WebCore::HTMLImageElement::setPictureElement):
(WebCore::HTMLImageElement::width):

  • html/HTMLImageElement.h:

(WebCore::HTMLImageElement::hasShadowControls):

  • html/HTMLPictureElement.h:
  • html/parser/HTMLConstructionSite.cpp:

(WebCore::HTMLConstructionSite::createHTMLElement):

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):

Images that are built underneath a <picture> element are now connected
to that picture element via a setPictureNode call from the parser. This
ensures that the correct <source> elements are examined before checking the image.

This connection between images and their picture owners is handled using a static
HashMap in HTMLImageElement. This connection is made both from the parser and from
DOM insertions, and the map is queried now instead of looking directly at the
image's parentNode().

LayoutTests:

  • fast/picture/image-picture-loads-1x-expected.txt: Added.
  • fast/picture/image-picture-loads-1x.html: Added.
11:05 AM Changeset in webkit [195063] by timothy@apple.com
  • 2 edits in trunk/Websites/webkit.org

Use a 2px border radius instead to look good on 2x devices as well as 1x.

  • wp-content/themes/webkit/style.css:

(.timeline .time):

11:01 AM Changeset in webkit [195062] by jmarcell@apple.com
  • 1 edit
    6 adds in trunk/Tools

Add a unit test to test BuildbotQueueView._appendPendingRevisionCount. https://bugs.webkit.org/show_bug.cgi?id=152910

Reviewed by Daniel Bates.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueue.js: Added.

(MockBuildbotQueue): Added. Mock BuildbotQueue object that doesn't need to talk to an actual Buildbot server.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockBuildbotQueueView.js: Added.

(MockBuildbotQueueView): Added. Mock BuildbotQueueView object that returns a pre-specified _latestProductiveIteration without
the need to talk to a real Buildbot server.
(MockBuildbotQueueView.prototype._latestProductiveIteration): Added. Returns a pre-specified _latestProductiveIteration
without the need to talk to a real Buildbot server.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/MockTrac.js: Added.

(MockTrac): Added. Mock Trac constructor that has pre-populated "recordedCommits" and does not need to talk to a real Trac
server.
(MockTrac.prototype.get oldestRecordedRevisionNumber): Added. Returns a pre-specified revision.
(MockTrac.prototype.get latestRecordedRevisionNumber): Ditto.
(MockTrac.prototype.loadMoreHistoricalData): Added. Overrides the real loadMoreHistoricalData so that we don't waste time
trying to talk to Trac.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/index.html: Added. Web page container for

QUnit unit tests.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js: Added. QUnit unit tests.
11:00 AM Changeset in webkit [195061] by timothy@apple.com
  • 2 edits in trunk/Websites/webkit.org

Fix hairline crack on 1x devices between arrow and time label.

  • wp-content/themes/webkit/style.css:

(.timeline .content):
(.timeline .time):

10:18 AM Changeset in webkit [195060] by youenn.fablet@crf.canon.fr
  • 1 edit
    1 move
    1 add
    1 delete in trunk/LayoutTests

Move streams/webkitGetUserMedia-shadowing-then.html to fast/mediastream
https://bugs.webkit.org/show_bug.cgi?id=152973

Reviewed by Brent Fulgham.

Moved the test, made it asynchronous to ensure that the error callback is called.

  • fast/mediastream/webkitGetUserMedia-shadowing-then-expected.txt: Renamed from LayoutTests/streams/webkitGetUserMedia-shadowing-then-expected.txt.
  • fast/mediastream/webkitGetUserMedia-shadowing-then.html: Renamed from LayoutTests/streams/webkitGetUserMedia-shadowing-then.html.
9:50 AM Changeset in webkit [195059] by commit-queue@webkit.org
  • 15 edits
    1 delete in trunk

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

Crashes many/most editing tests (Requested by ap on #webkit).

Reverted changeset:

"WK2: Request completion candidates when needed"
https://bugs.webkit.org/show_bug.cgi?id=153040
http://trac.webkit.org/changeset/195002

9:32 AM Changeset in webkit [195058] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

[GTK] [EFL] Hyphenation can never work in practice due to requirements on lang tags
https://bugs.webkit.org/show_bug.cgi?id=147310

Patch by Martin Robinson <mrobinson@igalia.com> on 2016-01-14
Reviewed by Michael Catanzaro.

Source/WebCore:

Test: platform/gtk/fast/text/hyphenate-flexible-locales.html

  • platform/text/hyphen/HyphenationLibHyphen.cpp: Make locale matching for dictionary

selection a lot looser by matching case insensitively, matching multiple dictionaries
when only the language is specified, and ignoring the difference between '_' and '-' in
the locale name.
(WebCore::scanDirectoryForDicionaries): Now produce HashMap of Vectors instead of a single
path for each locale. Also add alternate entries to handle different ways of specifying
the locale.
(WebCore::scanTestDictionariesDirectoryIfNecessary): Update to handle the difference
in HashMap type.
(WebCore::availableLocales): Ditto.
(WebCore::canHyphenate): Also look for the lowercased version of the locale.
(WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey):
Key on the dictionary path now so that we can load more than one dictionary per locale.
(WebCore::lastHyphenLocation): Iterate through each matched dictionary in turn.

LayoutTests:

Update some baselines and add a GTK+ specific test for locale variations.

  • platform/gtk/fast/text/hyphenate-flexible-locales-expected.html: Added.
  • platform/gtk/fast/text/hyphenate-flexible-locales.html: Added.
  • platform/gtk/fast/text/hyphenate-locale-expected.png: We now properly hyphenate

text with the 'en' locale.

  • platform/gtk/fast/text/hyphenate-locale-expected.txt:
8:31 AM Changeset in webkit [195057] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[CMake][GTK] CMake Error: Could not create named generator Eclipse CDT4 - Ninja
https://bugs.webkit.org/show_bug.cgi?id=132599

Patch by Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au> on 2016-01-14
Reviewed by Michael Catanzaro.

Check if cmake Ninja generators are installed.

  • Scripts/webkitdirs.pm:

(canUseNinjaGenerator):
(canUseEclipseNinjaGenerator):
(generateBuildSystemFromCMakeProject):
(canUseEclipse): Deleted.

6:42 AM Changeset in webkit [195056] by Gyuyoung Kim
  • 2 edits in trunk/Source/WebKit2

[EFL][GTK][SeccompFilter] Fix build break when enabling --seccomp-filters
https://bugs.webkit.org/show_bug.cgi?id=153094

Reviewed by Csaba Osztrogonác.

diskCacheDirectory and cookiePersistentStoragePath were removed by r192796.
But SyscallPolicy::addDefaultWebProcessPolicy has added directory permission
to the removed paths.

It looks two paths needs to be handled by network process.

  • Shared/linux/SeccompFilters/SyscallPolicy.cpp:

(WebKit::SyscallPolicy::addDefaultWebProcessPolicy): Deleted.

6:22 AM Changeset in webkit [195055] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.10

Merge r192947 - Null dereference loading Blink layout test fast/loader/unload-mutation-crash.html
https://bugs.webkit.org/show_bug.cgi?id=149305
<rdar://problem/22747892>

Reviewed by Brent Fulgham.

Source/WebCore:

Add an extra guard to replaceDocument() against rude JS in unload event handlers.

Test: fast/loader/unload-mutation-crash.html

  • loader/DocumentWriter.cpp:

(WebCore::DocumentWriter::replaceDocument):
(WebCore::DocumentWriter::begin):

LayoutTests:

This test case is from Blink r180918:
https://codereview.chromium.org/495743003

  • fast/loader/unload-mutation-crash-expected.txt: Added.
  • fast/loader/unload-mutation-crash.html: Added.
5:59 AM Changeset in webkit [195054] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.10/Source/WebCore

Merge r192880 - [GTK] ASSERTION FAILED: m_table running /webkit2/BackForwardList/navigation in Debug build
https://bugs.webkit.org/show_bug.cgi?id=151700

Reviewed by Martin Robinson.

This happens when the frame notifies its observers that the page
will be detached. The m_table that asserts is the
FrameDestructionObserver HashSet. It happens when clearing the
GObject DOM cache wrappers during frame destruction, and there's a
Document object wrapped whose last reference is held by the DOM
wrapper. In that case, the Document object is destroyed while the
frame is being destroyed. Deleting the wrapper objects after the
frame destruction fixes the crash.

  • bindings/gobject/DOMObjectCache.cpp:
5:54 AM Changeset in webkit [195053] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.10

Merge r192854 - Amazon.com Additional Information links aren't clickable
https://bugs.webkit.org/show_bug.cgi?id=151401
<rdar://problem/23454261>

Reviewed by Darin Adler.

Source/WebCore:

The cause of this issue is that the painting order is different from the hittest order so we can end up
with visible but unreachable content. To fix this, the executation flow of hittest has been reordered.
According to the paint system, which renders the webpage from the bottom RenderLayer to the top, contents
are rendered before floats. Hence, for the hittest, which determines the hitted location from top RenderLayer
to the bottom, should do it reversedly. Now, hittest will first test floats then contents.

Test: fast/block/float/hit-test-on-overlapping-floats.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::nodeAtPoint):

LayoutTests:

  • fast/block/float/hit-test-on-overlapping-floats-expected.txt: Added.
  • fast/block/float/hit-test-on-overlapping-floats.html: Added.
5:53 AM Changeset in webkit [195052] by Carlos Garcia Campos
  • 7 edits
    3 adds in releases/WebKitGTK/webkit-2.10

Merge r192844 - Null dereference loading Blink layout test http/tests/misc/detach-during-notifyDone.html
https://bugs.webkit.org/show_bug.cgi?id=149309
<rdar://problem/22748363>

Reviewed by Brent Fulgham.

Source/WebCore:

A weird order of event execution introduced by the test case will kill the webpage in a
subframe of the page while executing its |frame.loader().checkLoadCompleteForThisFrame()|.
Therefore, any frames comes after the failing subframe will have no page. Check it before
calling to those frames' |frame.loader().checkLoadCompleteForThisFrame()|, otherwise the
assertion in |frame.loader().checkLoadCompleteForThisFrame()| will fail.

Test: http/tests/misc/detach-during-notifyDone.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkLoadComplete):

Source/WebKit/mac:

  • WebView/WebDataSource.mm:

(WebDataSourcePrivate::~WebDataSourcePrivate):
Refine the assertion to treat <rdar://problem/9673866>.

Source/WebKit2:

Callback of bundle clients could kill the documentloader. Therefore, make a copy
of the navigationID before invoking the callback.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):

LayoutTests:

The test case is from Blink r175601:
https://codereview.chromium.org/317513002
The test case will generate a set of weird ordering events that affects the documentLoader:

  1. The subframe finishes loading, and since the frame’s testRunner is not set to wait until

done, WebKitTestRunner stops the load (by calling WKBundlePageStopLoading()).

  1. This causes the in-progress XHR to be aborted, which causes its readyState to become DONE

(this bug doesn’t always reproduce because sometimes the XHR has already finished before the
frame finishes loading).

  1. The onreadystatechange callback is executed, which sets innerHTML on the parent frame.
  2. Setting innerHTML disconnects the subframe, nulling out its DocumentLoader.
  3. We return to WebFrameLoaderClient::dispatchDidFinishLoad() from step #1, but now the

FrameLoader’s DocumentLoader is null. And WebKit crashes here.

Note that steps 2-4 happen synchronously inside WebFrameLoaderClient::dispatchDidFinishLoad().

  • http/tests/misc/detach-during-notifyDone-expected.txt: Added.
  • http/tests/misc/detach-during-notifyDone.html: Added.
  • http/tests/misc/resources/detached-frame.html: Added.
5:49 AM Changeset in webkit [195051] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.10

Merge r192810 - location.origin is undefined in a web worker
https://bugs.webkit.org/show_bug.cgi?id=151614

Reviewed by Darin Adler.

Source/WebCore:

Expose location.origin to web workers, as per:
https://html.spec.whatwg.org/multipage/workers.html#workerlocation

This behavior is consistent with the behavior of Firefox and Chrome.

Test: fast/workers/worker-location.html

  • workers/WorkerLocation.cpp:

(WebCore::WorkerLocation::origin):

  • workers/WorkerLocation.h:
  • workers/WorkerLocation.idl:

LayoutTests:

Update existing layout test to confirm the existence of location.origin when in a
WorkerGlobalScope.

  • fast/workers/resources/worker-location.js:
  • fast/workers/worker-location-expected.txt:
5:40 AM Changeset in webkit [195050] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.10/Source/WebKit2

Merge r192792 - [GTK] UI process crash when the screensaver DBus proxy is being created while the web view is destroyed
https://bugs.webkit.org/show_bug.cgi?id=151653

Reviewed by Martin Robinson.

We correctly cancel the proxy creation, but when the async ready
callback is called, the view could be destroyed already. In that
case g_dbus_proxy_new_for_bus_finish() will return nullptr and
fail with cancelled error, but we are using the passed web view
without checking first if the creation failed or not.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(screenSaverProxyCreatedCallback):

5:39 AM Changeset in webkit [195049] by Carlos Garcia Campos
  • 5 edits
    4 adds in releases/WebKitGTK/webkit-2.10

Merge r192788 - Browser does not fall back to SVG attribute value when CSS style value is invalid or not supported
https://bugs.webkit.org/show_bug.cgi?id=147932

Patch by Antoine Quint <Antoine Quint> on 2015-11-29
Reviewed by Dean Jackson.

Source/WebCore:

Instead of returning an SVGPaint object of type SVG_PAINTTYPE_UNKNOWN when we encounter an SVG paint
value that cannot be parsed, we now return nullptr which will cause that value to be ignored and
let another paint value in the cascade be used instead. This is the same approach used for SVGColor.
Since we're removing the only call site for SVGPaint::createUnknown(), we remove that function entirely.

Tests: svg/css/invalid-color-cascade.svg

svg/css/invalid-paint-cascade.svg

  • css/SVGCSSParser.cpp:

(WebCore::CSSParser::parseSVGPaint):

  • svg/SVGPaint.h:

(WebCore::SVGPaint::createUnknown): Deleted.

LayoutTests:

Testing that we correctly fall back to the presentation attribute for SVGPaint and SVGColor values
specified with an invalid keyword in a style attribute. We also update the expected output for
svg/css/svg-attribute-parser-mode.html which is now in line with values returned by Firefox and
Chrome, where we correctly use the default value instead of null objects, which was definitely
an error.

  • svg/css/invalid-color-cascade-expected.svg: Added.
  • svg/css/invalid-color-cascade.svg: Added.
  • svg/css/invalid-paint-cascade-expected.svg: Added.
  • svg/css/invalid-paint-cascade.svg: Added.
  • svg/css/script-tests/svg-attribute-parser-mode.js:
  • svg/css/svg-attribute-parser-mode-expected.txt:
5:29 AM Changeset in webkit [195048] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.10/Source/WebCore

Merge r192787 - Use SVGTransform::SVGTransformType instead of an unsigned short
https://bugs.webkit.org/show_bug.cgi?id=151637

Reviewed by Brady Eidson.

Make 'type' more strongly typed.

  • svg/SVGTransformable.cpp:

(WebCore::SVGTransformable::parseTransformValue):
(WebCore::parseAndSkipType):
(WebCore::SVGTransformable::parseTransformType):
(WebCore::SVGTransformable::parseTransformAttribute):

  • svg/SVGTransformable.h:
5:23 AM Changeset in webkit [195047] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.10/Source/WebCore

Merge r192775 - [GTK] Do not use the WebCore garbage collector timer
https://bugs.webkit.org/show_bug.cgi?id=151623

Reviewed by Martin Robinson.

Now that garbage collector timers have been implemented in
JavaScriptCore for glib, we don't need to use another Timer in WebCore.

  • bindings/js/GCController.cpp:

(WebCore::GCController::garbageCollectSoon):
(WebCore::GCController::garbageCollectNowIfNotDoneRecently):

5:22 AM Changeset in webkit [195046] by Carlos Garcia Campos
  • 10 edits in releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore

Merge r192773 - [GLIB] Implement garbage collector timers
https://bugs.webkit.org/show_bug.cgi?id=151391

Reviewed by Žan Doberšek.

Add GLib implementation using GSource.

  • heap/EdenGCActivityCallback.cpp:
  • heap/FullGCActivityCallback.cpp:
  • heap/GCActivityCallback.cpp:

(JSC::GCActivityCallback::GCActivityCallback):
(JSC::GCActivityCallback::scheduleTimer):
(JSC::GCActivityCallback::cancelTimer):

  • heap/GCActivityCallback.h:
  • heap/Heap.cpp:

(JSC::Heap::Heap):

  • heap/HeapTimer.cpp:

(JSC::HeapTimer::HeapTimer):
(JSC::HeapTimer::~HeapTimer):
(JSC::HeapTimer::timerDidFire):

  • heap/HeapTimer.h:
  • heap/IncrementalSweeper.cpp:

(JSC::IncrementalSweeper::IncrementalSweeper):
(JSC::IncrementalSweeper::scheduleTimer):
(JSC::IncrementalSweeper::cancelTimer):

  • heap/IncrementalSweeper.h:
5:17 AM Changeset in webkit [195045] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore

Merge r192721 - GC timers should carry on gracefully when Heap claims it grew from GC.
<https://webkit.org/b/151521>

Reviewed by Mark Lam.

TL;DR the Heap "extra memory" reporting APIs are hard to use 100% correctly
and GC scheduling shouldn't break if someone makes a mistake with it.

The JSC::Heap allows you to report an extra memory cost for any GC object.
This is reported first when allocating the memory, and then each time the
object is visited during the marking phase.

When reporting an allocation, it's added to the Heap's "bytes allocated in
this cycle" counter. This contributes to the computed heap size at the start
of a collection.

When visiting a GC object that reports extra memory, it's added to the Heap's
"extra memory visited in this collection" counter. This contributes to the
computed heap size at the end of a collection.

As you can see, this means that visiting more memory than we said we allocated
can lead to the Heap thinking it's bigger after a collection than it was before.

Clients of this API do some sketchy things to compute costs, for instance
StringImpl cost is determined by dividing the number of bytes used for the
characters, and dividing it by the StringImpl's ref count. Since a JSString
could be backed by any StringImpl, any code that modifies a StringImpl's
ref count during collection will change the extra memory reported by all
JSString objects that wrap that StringImpl.

So anyways...

The object death rate, which is the basis for when to schedule the next
collection is computed like so:

deathRate = (sizeBeforeGC - sizeAfterGC) / sizeBeforeGC

This patch adds a safety mechanism that returns a zero death rate when the Heap
claims it grew from collection.

  • heap/EdenGCActivityCallback.cpp:

(JSC::EdenGCActivityCallback::deathRate):

  • heap/FullGCActivityCallback.cpp:

(JSC::FullGCActivityCallback::deathRate):

5:14 AM Changeset in webkit [195044] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.10

Merge r192770 - Checks for buffer-overflows when reading characters from textRun
https://bugs.webkit.org/show_bug.cgi?id=151055
<rdar://problem/23251789>

Patch by Pranjal Jumde <pjumde@apple.com> on 2015-11-25
Reviewed by Myles C. Maxfield.

Source/WebCore:

Prevents an off by one error when adding the last font data to the GlyphBuffer.

  • Source/WebCore/platform/graphics/WidthIterator.cpp:
  • Source/WebCore/platform/graphics/FontCascade.cpp:

LayoutTests:

  • dom/html/level1/core/151055_asan.html:
  • dom/html/level1/core/151055_asan-expected.txt:
5:12 AM Changeset in webkit [195043] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.10/Source/WebCore

Merge r192758 - Hardening against CSSSelector double frees
<http://webkit.org/b/56124>
<rdar://problem/9119036>

Reviewed by Antti Koivisto.

Add some security assertions to catch this issue if it ever
happens in Debug builds, and make changes in
CSSSelector::~CSSSelector() and
CSSSelectorList::deleteSelectors() to prevent obvious issues if
they're ever called twice in Release builds.

No new tests because we don't know how to reproduce this.

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::CSSSelector): Initialize
m_destructorHasBeenCalled.

  • css/CSSSelector.h:

(WebCore::CSSSelector::m_destructorHasBeenCalled): Add bitfield.
(WebCore::CSSSelector::CSSSelector): Initialize
m_destructorHasBeenCalled.
(WebCore::CSSSelector::~CSSSelector): Add security assertion
that this is never called twice. Clear out any fields that
would have caused us to dereference an object twice.

  • css/CSSSelectorList.cpp:

(WebCore::CSSSelectorList::deleteSelectors): Clear
m_selectorArray when freeing the memory to which it was
pointing. This prevents re-entrancy issues or calling this
method twice on the same thread. Also restructure the for()
loop to prevent calling CSSSelector::isLastInSelectorList()
after CSSSelector::~CSSSelector() has been called (via CRBug
241892).

5:02 AM Changeset in webkit [195042] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.10

Merge r192747 - Fix crash in ~WebProcessPool when using Geolocation with useNetworkProcess=true
https://bugs.webkit.org/show_bug.cgi?id=151532

Reviewed by Benjamin Poulain.

Source/WebKit2:

  • UIProcess/WebGeolocationManagerProxy.cpp:

(WebKit::WebGeolocationManagerProxy::processPoolDestroyed):
(WebKit::WebGeolocationManagerProxy::processDidClose):
When a WebProcessPool is destroyed, only call stopUpdating if m_updateRequesters.clear()
stopped the updating, like we do in WebGeolocationManagerProxy::removeRequester.
Otherwise, call setEnableHighAccuracy if needed, also like we do in WebGeolocationManagerProxy::removeRequester.

Tools:

  • TestWebKitAPI/Tests/WebKit2/Geolocation.cpp:

(TestWebKitAPI::GeolocationTransitionToHighAccuracyStateTracker::eventsChanged):
(TestWebKitAPI::TEST):
(TestWebKitAPI::GeolocationTransitionToLowAccuracyStateTracker::eventsChanged):
(TestWebKitAPI::GeolocationTransitionToHighAccuracyStateTracker::GeolocationTransitionToHighAccuracyStateTracker): Deleted.
(TestWebKitAPI::GeolocationTransitionToLowAccuracyStateTracker::GeolocationTransitionToLowAccuracyStateTracker): Deleted.
Properly load about:blank in all WebViews to clean up. Without this change, we had a
Geolocation provider stopping after its state tracker was destroyed with its stack frame,
so it was calling a function on a test object that had gone out of scope.
Also, call WKContextSetUsesNetworkProcess(context, true) to show what crash this fixed,
but that will become the default soon and that call will be removed.

4:30 AM Changeset in webkit [195041] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/gtk/po

Merge r192737 - [GTK] [l10n] Updated Italian translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=151543

Unreviewed.

Patch by Milo Casagrande <milo@milo.name> on 2015-11-22

  • it.po:
4:27 AM Changeset in webkit [195040] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.10/Source/WebCore

Merge r192724 - [GTK] Off-by-one error in getStyleContext()
https://bugs.webkit.org/show_bug.cgi?id=151524

Reviewed by Carlos Garcia Campos.

GtkWidgetPath* path = gtk_widget_path_new();
gtk_widget_path_append_type(path, widgetType);
...
gtk_widget_path_iter_add_class(path, 0, GTK_STYLE_CLASS_BUTTON);
gtk_widget_path_iter_add_class(path, 1, "text-button");

Only one widget type was appended to the widget path, so the maximum valid index is 0. This
code means to add both style classes to the first widget type in the widget path, so the
second call should use index 0 rather than index 1.

This caused no bug in practice, because when the index is invalid,
gtk_widget_path_iter_add_class() automatically changes the index to the last valid position
in the widget path -- in this case, 0. This is routinely done with -1 as a convention for
specifying the last position in the widget path.

  • rendering/RenderThemeGtk.cpp:

(WebCore::getStyleContext):

4:26 AM Changeset in webkit [195039] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.10/Source/WebCore

Merge r192723 - [GTK] Warning spam from GtkStyleContext
https://bugs.webkit.org/show_bug.cgi?id=151520

Reviewed by Carlos Garcia Campos.

Audit every use of gtk_style_context_get_* to fix compatibility with GTK+ 3.19. Some of
these were already fine and are only changed for clarity.

Company: gtk_style_context_get() (and _get_padding/border/color()) should only ever be

called with the same state as gtk_style_context_get_state()

Company: usually that's a simple replacing of the old state (like in the trace you posted)
Company: sometimes it requires calling gtk_style_context_set_sate() with the right state

first

Company: and in very rare cases it needs a gtk_style_context_save() before the set_state(),

too

  • platform/gtk/ScrollbarThemeGtk.cpp:

(WebCore::adjustRectAccordingToMargin):

  • rendering/RenderThemeGtk.cpp:

(gtk_css_section_print):
(WebCore::getStyleContext):
(WebCore::RenderThemeGtk::initMediaColors):
(WebCore::renderButton):
(WebCore::getComboBoxMetrics):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::spinButtonArrowSize):
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
(WebCore::styleColor):

4:23 AM Changeset in webkit [195038] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.10/Source/WebKit2

Merge r192702 - A hung webpage pretends to be responsive if you scroll
https://bugs.webkit.org/show_bug.cgi?id=151518

Reviewed by Sam Weinig.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::didReceiveEvent): Don't treat wheel events as
starting or stopping the responsiveness timer. Wheel events usually
process on the event dispatch thread, which responds even if the main
thread is hung.

Instead, send an out-of-band ping to the main thread to verify that
it is still responsive and we'll be able to paint and respond to clicks
after scrolling.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::sendMainThreadPing):
(WebKit::WebProcessProxy::didReceiveMainThreadPing):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.messages.in: UI process support for pinging

the main thread in the web process.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::mainThreadPing):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in: Web process support for responding

to pings.

4:14 AM Changeset in webkit [195037] by Carlos Garcia Campos
  • 7 edits
    4 adds in releases/WebKitGTK/webkit-2.10

Merge r192641 - REGRESSION(r8780): Backwards delete by word incorrectly appends deleted text to kill ring, should be prepend
https://bugs.webkit.org/show_bug.cgi?id=151300

Reviewed by Darin Adler.

Source/WebCore:

Over 11 years ago, someone was in a big hurry to fix a bunch
of emacs keybindings bugs, and accidentally regressed the kill ring
behavior for backwards-delete-word. It should prepend to the beginning.

This patch fixes the regression and cleans up the kill ring-related
code in Editor and commands. It also adds some tests to cover the
regressed code a bit better.

Tests: editing/pasteboard/emacs-killring-alternating-append-prepend.html

editing/pasteboard/emacs-killring-backward-delete-prepend.html

  • editing/Editor.cpp:

Use more explicit names for insertion mode parameters and member variables.

(WebCore::Editor::deleteWithDirection):
(WebCore::Editor::performDelete):
(WebCore::Editor::addRangeToKillRing):
(WebCore::Editor::addTextToKillRing):

Only one call site for now, but another will be added in a dependent fix.

(WebCore::Editor::addToKillRing): Deleted.

  • editing/Editor.h:
  • editing/TypingCommand.cpp:

(WebCore::TypingCommand::TypingCommand):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
(WebCore::TypingCommand::doApply):

  • editing/TypingCommand.h:
  • platform/mac/KillRingMac.mm:

(WebCore::KillRing::append):
(WebCore::KillRing::prepend):

It turns out that the native API implicitly clears the kill sequence when
alternating between prepend and append operations. Its behavior does not match
what Sublime Text or Emacs do in this case. Clear the previous operation flag
to prevent this behavior from happening.

LayoutTests:

  • editing/pasteboard/emacs-killring-alternating-append-prepend-expected.txt: Added.
  • editing/pasteboard/emacs-killring-alternating-append-prepend.html: Added.
  • editing/pasteboard/emacs-killring-backward-delete-prepend-expected.txt: Added.
  • editing/pasteboard/emacs-killring-backward-delete-prepend.html: Added.
4:08 AM Changeset in webkit [195036] by Carlos Garcia Campos
  • 5 edits
    5 adds in releases/WebKitGTK/webkit-2.10

Merge r192604 - [WK1] Crash loading Blink layout test fast/dom/Window/property-access-on-cached-window-after-frame-removed.html
https://bugs.webkit.org/show_bug.cgi?id=150198
<rdar://problem/23136026>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: fast/dom/Window/property-access-on-cached-window-after-frame-removed.html

Properties of a contentWindow could be accessed even if the frame who owns the window is
detached. Therefore, check whether the document loader is still alive before using it.

  • page/PerformanceTiming.cpp:

(WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds):

Tools:

  • WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:

(WTR::TestRunner::inspectorTestStubURL):
Since WebInspectorUI.framework is not available for iOS, the framework
and corresponding functions are disabled in iOS.

LayoutTests:

  • fast/dom/Window/666869-expected.txt: Added.
  • fast/dom/Window/666869.html: Added.

Test case is from Mozilla.

  • fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt: Added.
  • fast/dom/Window/property-access-on-cached-window-after-frame-removed.html: Added.
  • fast/dom/Window/resources/window-property-collector.js: Added.

(collectProperties):
(emitExpectedResult):
(collectPropertiesHelper):
Test case is from Blink r168256:
https://codereview.chromium.org/131113003

  • platform/mac-wk2/TestExpectations:
4:04 AM Changeset in webkit [195035] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

Part 2/2: Stop using USE(CFNETWORK) path on iOS
<https://webkit.org/b/142540>

Original patch by Antti Koivisto <Antti Koivisto> on 2015-03-10
Reviewed by Chris Dumez.

  • wtf/Platform.h: Turn off USE(CFNETWORK) for PLATFORM(IOS).
4:03 AM Changeset in webkit [195034] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.10/Source/WebCore

Merge r192582 - Null dereference in Performance::Performance(WebCore::Frame*)
https://bugs.webkit.org/show_bug.cgi?id=151390

Reviewed by Brady Eidson.

Based on the stack trace, it appears the DocumentLoader can be null
when constructing the Performance object. This patch thus adds a null
check before trying to dereference it.

No new tests, was not able to reproduce.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::navigator):
(WebCore::DOMWindow::performance):

  • page/Performance.cpp:

(WebCore::Performance::Performance):
(WebCore::Performance::scriptExecutionContext):

  • page/Performance.h:
4:02 AM Changeset in webkit [195033] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.10/Source/WebCore

Merge r192574 - [Cairo] SolidStroke broken in drawLine after r191658
https://bugs.webkit.org/show_bug.cgi?id=151385

Patch by Alejandro G. Castro <alex@igalia.com> on 2015-11-18
Reviewed by Carlos Garcia Campos.

Fix the drawLine function after r191658, we have to make sure the
color is set when line is SolidStroke.

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContext::drawLine):

4:01 AM Changeset in webkit [195032] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.10/Tools

Merge r192568 - [XvfbDriver] Fail to run all layout tests when X server started with -displayfd option
https://bugs.webkit.org/show_bug.cgi?id=151135

Reviewed by Darin Adler.

The XvfbDriver uses the x server command line to check the
displays that are currently in use. This doesn't work when X
server was started with -displayfd option. This option is used to let
the server find the display id available that is written to the
given file descriptor. With this option xorg doesn't need to
create the lock files in tmp either. The -displayfd option is also
available in Xvfb, so we could use it too. That would simplify the
code, fixing also race conditions between the check for available
displays and Xvfb opening the connection, we wouldn't need to wait
for 4 seconds after launching Xvfb, and all lock files we are
using won't be needed either.

  • Scripts/webkitpy/port/xvfbdriver.py:

(XvfbDriver._xvfb_pipe): Helper function to create the pipe, only
needed to be overriden by unit tests.
(XvfbDriver._xvfb_read_display_id): Helper function to read from
the pipe, only needed to be overriden by unit tests.
(XvfbDriver._xvfb_run): Run Xvfb with -displayfd option, using a
pipe to read the display id.
(XvfbDriver._start): Call _xvfb_run() and remove the code to run
Xvfb for a given display.
(XvfbDriver.stop): Remove code to release and delete file locks.

  • Scripts/webkitpy/port/xvfbdriver_unittest.py:

(XvfbDriverTest.make_driver):
(XvfbDriverTest.test_start):
(XvfbDriverTest.test_start_arbitrary_worker_number):
(XvfbDriverTest.test_stop):
(XvfbDriverTest.assertDriverStartSuccessful): Deleted.
(XvfbDriverTest): Deleted.
(XvfbDriverTest.test_stop.FakeXvfbProcess): Deleted.

3:58 AM Changeset in webkit [195031] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.10

Merge r192567 - Null dereference loading Blink layout test editing/execCommand/indent-button-crash.html
https://bugs.webkit.org/show_bug.cgi?id=151187

Reviewed by Darin Adler.

Source/WebCore:

This is a merge of Blink r174671:
https://codereview.chromium.org/291143002

Fixes imported/blink/editing/execCommand/indent-button-crash.html.

  • editing/ApplyBlockElementCommand.cpp:

(WebCore::ApplyBlockElementCommand::doApply):

LayoutTests:

Unskip the test.

  • platform/gtk/TestExpectations:
  • platform/win/TestExpectations:
3:56 AM Changeset in webkit [195030] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.10/Source/WebKit2

Merge r192528 - A window with a hung tab waits 5s before closing
https://bugs.webkit.org/show_bug.cgi?id=151319

Reviewed by Anders Carlsson.

I manually tested that I did not break unload events upon window close
by running run-webkit-httpd and invoking a 1x1 image load of
http://127.0.0.1:8000/navigation/resources/save-Ping.php from an unload
handler.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::tryClose): Use the sudden termination bit to
close without waiting for a response.

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::isSuddenTerminationEnabled): Expose the bit.

3:51 AM Changeset in webkit [195029] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore

Merge r192527 - Reserved VM pool established in r187125 is likely too conservative
https://bugs.webkit.org/show_bug.cgi?id=151351

Reviewed by Filip Pizlo.

Reduce the VM allocation reserved pool from 25% to 15% for ARM32.

  • jit/ExecutableAllocator.h:
3:31 AM Changeset in webkit [195028] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.10

Merge r192513 - ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
https://bugs.webkit.org/show_bug.cgi?id=151025

Reviewed by Darin Adler.

Source/WebCore:

Negative margins could make RenderFlexibleBox compute negative
intrinsic sizes. Clamp intrinsic sizes to 0.

Test: css3/flexbox/negative-margins-assert.html

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):

LayoutTests:

  • css3/flexbox/negative-margins-assert-expected.txt: Added.
  • css3/flexbox/negative-margins-assert.html: Added.
3:30 AM Changeset in webkit [195027] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.10/Source/WebKit2

Merge r192510 - [GTK] Web Process crashes on reparenting a WebView with AC mode on
https://bugs.webkit.org/show_bug.cgi?id=151139

Reviewed by Mario Sanchez Prada.

When the web view is reparented, the widget is first unrealized,
and then realized again when added to the new parent. In the
second realize, the old redirected XComposite window is destroyed
and a new one is created, but the web process is still using the
old redirected window ID. As soon as the redirected window is
destroyed and the web process tries to use the window ID, it
crashes due to a BadDrawable X error. We have to notify the web
process as soon as the web view is unrealized to stop using the
current window ID and exit accelerated compositing mode until a
new window ID is given. This notification needs to be synchronous,
because the window can be destroyed in the UI process before the
message is received in the web process.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseRealize): Add an assert to ensure we never have
a redirected window when the view is realized. Also check drawing
area is not nullptr, since it can be destroyed at any time if the
web process crashes.
(webkitWebViewBaseUnrealize): Call
DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing()
and destroy the redirected XComposite window.

  • UIProcess/DrawingAreaProxyImpl.cpp:

(WebKit::DrawingAreaProxyImpl::destroyNativeSurfaceHandleForCompositing):
Send DestroyNativeSurfaceHandleForCompositing synchronous messsage
to the web process.

  • UIProcess/DrawingAreaProxyImpl.h:
  • WebProcess/WebPage/DrawingArea.h:
  • WebProcess/WebPage/DrawingArea.messages.in: Add

DestroyNativeSurfaceHandleForCompositing message.

  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::destroyNativeSurfaceHandleForCompositing):
Set the native surface handler for compositing to 0 to reset it.

  • WebProcess/WebPage/DrawingAreaImpl.h:
  • WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:

(WebKit::LayerTreeHostGtk::makeContextCurrent): Return false
early always when layer tree context ID is 0, even if we already
have a context.
(WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
Cancel any pending layer flush when setting a new handler.

3:27 AM Changeset in webkit [195026] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.10

Merge r192499 - Source/WebCore:
Fixes the buffer-overflow when reading characters from textRun
https://bugs.webkit.org/attachment.cgi?bugid=151055
<rdar://problem/23251789>

Patch by Pranjal Jumde <pjumde@apple.com> on 2015-11-16
Reviewed by Brent Fulgham.

  • platform/graphics/FontCascade.cpp

LayoutTests:
Checks for buffer-overflows when reading characters from textRun
https://bugs.webkit.org/attachment.cgi?bugid=151055
<rdar://problem/23251789>

Patch by Pranjal Jumde <pjumde@apple.com> on 2015-11-16
Reviewed by Brent Fulgham.

  • webgl/1.0.3/151055_asan-expected.txt
  • webgl/1.0.3/151055_asan.html
3:26 AM Changeset in webkit [195025] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.10/Source/WebKit2

Merge r192496 - WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction calls an std::function after it's been moved from
https://bugs.webkit.org/show_bug.cgi?id=151248

Reviewed by Darin Adler.

Like r188287, calling an empty std::function results in a std::bad_function_call
exception being thrown when sendSync is failed.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

3:14 AM Changeset in webkit [195024] by Carlos Garcia Campos
  • 4 edits
    4 adds in releases/WebKitGTK/webkit-2.10

Merge r192477 - Null-pointer dereference in WebCore::firstEditablePositionAfterPositionInRoot
https://bugs.webkit.org/show_bug.cgi?id=151288
<rdar://problem/23450367>

Reviewed by Darin Adler.

Source/WebCore:

Some problematic organization of body element could cause problems to JustifyRight
and Indent commnads.

Tests: editing/execCommand/justify-right-then-indent-with-problematic-body.html

editing/execCommand/justify-right-with-problematic-body.html

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
Assertion at l1017 is not held anymore with the testcase:
editing/execCommand/justify-right-with-problematic-body.html.
Therefore, change it to an if statement.
Also, add a guardance before calling insertNewDefaultParagraphElementAt()
as insertNodeAt() requires an editable position.
(WebCore::CompositeEditCommand::moveParagraphWithClones):
Add a guardance before calling insertNodeAt() as it requires an editable position.

  • editing/htmlediting.cpp:

(WebCore::firstEditablePositionAfterPositionInRoot):
(WebCore::lastEditablePositionBeforePositionInRoot):

LayoutTests:

  • editing/execCommand/justify-right-then-indent-with-problematic-body-expected.txt: Added.
  • editing/execCommand/justify-right-then-indent-with-problematic-body.html: Added.
  • editing/execCommand/justify-right-with-problematic-body-expected.txt: Added.
  • editing/execCommand/justify-right-with-problematic-body.html: Added.
3:11 AM Changeset in webkit [195023] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.10/Source/WebCore

Merge r192458 - Regression(r188820): Downloads of data URLs is broken
https://bugs.webkit.org/show_bug.cgi?id=150900
rdar://problem/23399223

Reviewed by Darin Adler.

No test, the current test infrastructure only allows testing policy decisions, not the actual download.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::continueAfterContentPolicy):

Use normal download path for data URLs instead of trying to convert the main resource load.
Since we decode data URLs locally there is no associated resource load on WebKit side.

3:09 AM Changeset in webkit [195022] by Carlos Garcia Campos
  • 10 edits in releases/WebKitGTK/webkit-2.10

Merge r192444 - Always render at least a device pixel line when border/outline width > 0.
https://bugs.webkit.org/show_bug.cgi?id=151269

This matches Firefox behaviour.

Reviewed by Simon Fraser.

Source/WebCore:

Existing test is modified to reflect the new behaviour.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertLineWidth):

  • rendering/BorderEdge.cpp:

(WebCore::BorderEdge::BorderEdge): Deleted.

  • rendering/BorderEdge.h:

LayoutTests:

  • fast/borders/hidpi-border-width-flooring-expected.html:
  • fast/borders/hidpi-border-width-flooring.html:
2:56 AM Changeset in webkit [195021] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.10

Merge r192433 - Element::focus() should acquire the ownership of Frame.
https://bugs.webkit.org/show_bug.cgi?id=150204
<rdar://problem/23136794>

Reviewed by Brent Fulgham.

Source/WebCore:

The FrameSelection::setSelection method sometimes releases the last reference to a frame.
When this happens, the Element::updateFocusAppearance would attempt to use dereferenced memory.
Instead, we should ensure that the Frame lifetime is guaranteed to extend through the duration
of the method call.

Test: editing/selection/focus-iframe-removal-crash.html

  • dom/Element.cpp:

(WebCore::Element::updateFocusAppearance):

LayoutTests:

  • editing/selection/focus-iframe-removal-crash-expected.txt: Added.
  • editing/selection/focus-iframe-removal-crash.html: Added.
2:20 AM Changeset in webkit [195020] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.10

Merge r192389 - Ignore visited background color when deciding if the input renderer needs to be painted natively.
https://bugs.webkit.org/show_bug.cgi?id=151211
rdar://problem/21449823

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/css/pseudo-visited-background-color-on-input.html

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::isControlStyled):

  • rendering/style/RenderStyle.h:

LayoutTests:

  • fast/css/pseudo-visited-background-color-on-input-expected.html: Added.
  • fast/css/pseudo-visited-background-color-on-input.html: Added.
2:07 AM Changeset in webkit [195019] by Carlos Garcia Campos
  • 4 edits
    6 adds in releases/WebKitGTK/webkit-2.10

Merge r192369 - popstate event should be dispatched asynchronously
https://bugs.webkit.org/show_bug.cgi?id=36202
<rdar://problem/7761279>

Based on an original patch by Mihai Parparita <mihaip@chromium.org>.

Reviewed by Brent Fulgham.

Source/WebCore:

Tests: fast/loader/remove-iframe-during-history-navigation-different.html

fast/loader/remove-iframe-during-history-navigation-same.html
fast/loader/stateobjects/popstate-is-asynchronous.html

  • dom/Document.cpp:

(WebCore::Document::enqueuePopstateEvent):
Use enqueueWindowEvent().

LayoutTests:

  • fast/loader/remove-iframe-during-history-navigation-different-expected.txt: Added.
  • fast/loader/remove-iframe-during-history-navigation-different.html: Added.

Imported from Blink.

  • fast/loader/remove-iframe-during-history-navigation-same-expected.txt: Added.
  • fast/loader/remove-iframe-during-history-navigation-same.html: Added.

Ditto.

  • fast/loader/stateobjects/popstate-fires-on-history-traversal.html:

Modified to account for popstate firing asynchronously.

  • fast/loader/stateobjects/popstate-is-asynchronous-expected.txt: Added.
  • fast/loader/stateobjects/popstate-is-asynchronous.html: Added.

Based on Mihai's original test. Modified to pass in current WebKit.

2:00 AM Changeset in webkit [195018] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.10

Merge r192316 - Crash loading Blink layout test fast/parser/strip-script-attrs-on-input.html
https://bugs.webkit.org/show_bug.cgi?id=150201
<rdar://problem/23136478>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: fast/parser/strip-script-attrs-on-input.html

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::processStartTagForInBody):
Get the attribute after calling
HTMLConstructionSite::insertSelfClosingHTMLElement(), as this may
mutate the token's attributes.

LayoutTests:

  • fast/parser/strip-script-attrs-on-input-expected.txt: Added.
  • fast/parser/strip-script-attrs-on-input.html: Added.
1:56 AM Changeset in webkit [195017] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.10/Source/WebKit2

Merge r192311 - [GTK] Runtime critical warnings when closing a page containing windowed plugins
https://bugs.webkit.org/show_bug.cgi?id=151132

Reviewed by Martin Robinson.

This is because our plugin widget, that is a GtkPlug (derived from
GtkWindow), can receive the delete-event signal before
NetscapePlugin::platformDestroy is called. The delete-event
signal, by default, destroys the window when the signal is not
handled. So, after the delete-event the GtkPlug is destroyed, but
our pointer hasn't been reset. We can handle the delete-event
using gtk_widget_hide_on_delete as callback, so that the plugin
widget is hidden instead of destroyed.

  • WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:

(WebKit::NetscapePlugin::platformPostInitializeWindowed):

1:52 AM Changeset in webkit [195016] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.10

Merge r192281 - Crash running webaudio/panner-loop.html
https://bugs.webkit.org/show_bug.cgi?id=150200
<rdar://problem/23136282>

Reviewed by Jer Noble.

Source/WebCore:

Test: webaudio/panner-loop.html

This is based on the changes in Blink r164822:
https://codereview.chromium.org/130003002

Avoid infinitely recursing on audio nodes by keeping track of which nodes we've already
visited.

  • Modules/webaudio/PannerNode.cpp:

(WebCore::PannerNode::pullInputs): Pass set of visited nodes so we don't revisit
nodes we've already serviced.
(WebCore::PannerNode::notifyAudioSourcesConnectedToNode): Accept visitedNodes argument
so we can avoid revisiting nodes. Check if the current node has already been visited
before processing it.

  • Modules/webaudio/PannerNode.h:

LayoutTests:

This is based on the changes in Blink r164822:
https://codereview.chromium.org/130003002

  • webaudio/panner-loop-expected.txt: Added.
  • webaudio/panner-loop.html: Added.
1:49 AM Changeset in webkit [195015] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.10

Merge r192275 - Continuations with anonymous wrappers inside misplaces child renderers.
https://bugs.webkit.org/show_bug.cgi?id=150908

When a child is appended to an inline container and the beforeChild is not a direct child, but
it is inside a generated subtree, we need to special case the inline split to form continuation.

RenderInline::splitInlines() assumes that beforeChild is always a direct child of the current
inline container. However when beforeChild type requires wrapper content (such as table cells), the DOM and the
render tree get out of sync. In such cases, we need to ensure that both the beforeChild and its siblings end up
in the correct generated block.

Reviewed by Darin Adler and David Hyatt.

Source/WebCore:

Test: fast/inline/continuation-with-anon-wrappers.html

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::addChildToContinuation):

LayoutTests:

  • fast/inline/continuation-with-anon-wrappers-expected.txt: Added.
  • fast/inline/continuation-with-anon-wrappers.html: Added.
1:45 AM Changeset in webkit [195014] by Carlos Garcia Campos
  • 9 edits
    36 adds in releases/WebKitGTK/webkit-2.10

Merge r191011 - Anonymous table objects: inline parent box requires inline-table child.
https://bugs.webkit.org/show_bug.cgi?id=150090

Reviewed by David Hyatt.

According to the CSS2.1 specification, if a child needs anonymous table wrapper
and the child's parent is an inline box, the generated table needs to be inline-table.
(inline-block and block parents generate non-inline table)

Import W3C CSS2.1 anonymous table tests.

Source/WebCore:

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::childRequiresTable):
(WebCore::RenderElement::addChild):

  • rendering/RenderElement.h:
  • rendering/RenderInline.cpp:

(WebCore::RenderInline::newChildIsInline):
(WebCore::RenderInline::addChildIgnoringContinuation):
(WebCore::RenderInline::addChildToContinuation):

  • rendering/RenderInline.h:
  • rendering/RenderTable.cpp:

(WebCore::RenderTable::createAnonymousWithParentRenderer):

LayoutTests:

  • css2.1/tables/table-anonymous-objects-177.xht: Added.
  • css2.1/tables/table-anonymous-objects-178.xht: Added.
  • css2.1/tables/table-anonymous-objects-179.xht: Added.
  • css2.1/tables/table-anonymous-objects-180.xht: Added.
  • css2.1/tables/table-anonymous-objects-181.xht: Added.
  • css2.1/tables/table-anonymous-objects-189.xht: Added.
  • css2.1/tables/table-anonymous-objects-190.xht: Added.
  • css2.1/tables/table-anonymous-objects-191.xht: Added.
  • css2.1/tables/table-anonymous-objects-192.xht: Added.
  • css2.1/tables/table-anonymous-objects-193.xht: Added.
  • css2.1/tables/table-anonymous-objects-194.xht: Added.
  • css2.1/tables/table-anonymous-objects-195.xht: Added.
  • css2.1/tables/table-anonymous-objects-196.xht: Added.
  • css2.1/tables/table-anonymous-objects-205.xht: Added.
  • css2.1/tables/table-anonymous-objects-206.xht: Added.
  • css2.1/tables/table-anonymous-objects-207.xht: Added.
  • css2.1/tables/table-anonymous-objects-208.xht: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-177-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-178-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-179-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-180-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-181-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-189-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-190-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-191-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-192-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-193-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-194-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-195-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-196-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-205-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-206-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-207-expected.txt: Added.
  • platform/mac/css2.1/tables/table-anonymous-objects-208-expected.txt: Added.
1:35 AM Changeset in webkit [195013] by Carlos Garcia Campos
  • 18 edits
    25 adds in releases/WebKitGTK/webkit-2.10

Merge r192270 - alert, confirm, prompt, showModalDialog should be forbidden during page close and navigation
https://bugs.webkit.org/show_bug.cgi?id=150980

Reviewed by Chris Dumez.

Source/WebCore:

Tests: fast/events/beforeunload-alert.html

fast/events/beforeunload-confirm.html
fast/events/beforeunload-prompt.html
fast/events/beforeunload-showModalDialog.html
fast/events/pagehide-alert.html
fast/events/pagehide-confirm.html
fast/events/pagehide-prompt.html
fast/events/pagehide-showModalDialog.html
fast/events/unload-alert.html
fast/events/unload-confirm.html
fast/events/unload-prompt.html
fast/events/unload-showModalDialog.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::stopLoading): Factored out a helper function for
unload event processing.
(WebCore::FrameLoader::handleUnloadEvents): Forbid prompts in unload
events just like we do in beforeunload events, and for the same reasons.

(WebCore::FrameLoader::handleBeforeUnloadEvent): Updated for renames.

  • loader/FrameLoader.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::print):
(WebCore::DOMWindow::alert):
(WebCore::DOMWindow::confirm):
(WebCore::DOMWindow::prompt):
(WebCore::DOMWindow::showModalDialog): Updated for renames. Refactored
some of this code to handle null pages more cleanly. In particular, we
sometimes used to treat null page as "everything is permitted" -- but it
is best practice in a permissions context to treat lack of information
as no permission granted rather than all permissions granted. (I don't
know of a way to trigger this condition in practice.)

  • page/Page.cpp:

(WebCore::Page::Page):
(WebCore::Page::forbidPrompts):
(WebCore::Page::allowPrompts):
(WebCore::Page::arePromptsAllowed): Renamed to make these functions
reflect their new, broader context.

(WebCore::Page::incrementFrameHandlingBeforeUnloadEventCount): Deleted.
(WebCore::Page::decrementFrameHandlingBeforeUnloadEventCount): Deleted.
(WebCore::Page::isAnyFrameHandlingBeforeUnloadEvent): Deleted.

  • page/Page.h:

LayoutTests:

Added tests to cover the matrix of [ alert, confirm, prompt, showModalDialog ] x [ beforeunload, unload, pagehide ].

  • fast/events/beforeunload-alert-expected.txt: Added.
  • fast/events/beforeunload-alert.html: Added.
  • fast/events/beforeunload-confirm-expected.txt: Added.
  • fast/events/beforeunload-confirm.html: Added.
  • fast/events/beforeunload-prompt-expected.txt: Added.
  • fast/events/beforeunload-prompt.html: Added.
  • fast/events/beforeunload-showModalDialog-expected.txt: Added.
  • fast/events/beforeunload-showModalDialog.html: Added.
  • fast/events/onunload-expected.txt:
  • fast/events/onunload-not-on-body-expected.txt:
  • fast/events/onunload-window-property-expected.txt:
  • fast/events/pagehide-alert-expected.txt: Added.
  • fast/events/pagehide-alert.html: Added.
  • fast/events/pagehide-confirm-expected.txt: Added.
  • fast/events/pagehide-confirm.html: Added.
  • fast/events/pagehide-prompt-expected.txt: Added.
  • fast/events/pagehide-prompt.html: Added.
  • fast/events/pagehide-showModalDialog-expected.txt: Added.
  • fast/events/pagehide-showModalDialog.html: Added.
  • fast/events/pageshow-pagehide-on-back-cached-expected.txt:
  • fast/events/pageshow-pagehide-on-back-uncached-expected.txt:
  • fast/events/resources/prompt-landing-page.html: Added.
  • fast/events/unload-alert-expected.txt: Added.
  • fast/events/unload-alert.html: Added.
  • fast/events/unload-confirm-expected.txt: Added.
  • fast/events/unload-confirm.html: Added.
  • fast/events/unload-prompt-expected.txt: Added.
  • fast/events/unload-prompt.html: Added.
  • fast/events/unload-showModalDialog-expected.txt: Added.
  • fast/events/unload-showModalDialog.html: Added.
  • platform/wk2/TestExpectations: WebKit2 can't handle showModalDialog tests.
  • compositing/iframes/page-cache-layer-tree-expected.txt:
  • fast/dom/Geolocation/notimer-after-unload-expected.txt:
  • fast/history/timed-refresh-in-cached-frame-expected.txt:
  • fast/loader/frames-with-unload-handlers-in-page-cache-expected.txt:
  • fast/loader/page-dismissal-modal-dialogs-expected.txt: These were

pre-existing tests that tried to alert during unload.

1:17 AM Changeset in webkit [195012] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore

Merge r192267 - X86_64 support for compareDouble(DoubleCondition, FPRegisterID left, FPRegisterID right, RegisterID dest)
https://bugs.webkit.org/show_bug.cgi?id=151009

Reviewed by Filip Pizlo.

Added compareDouble() macro assembler function and the supporting setnp_r() and setp_r() X86 assembler functions.
Hand tested.

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::compare64):
(JSC::MacroAssemblerX86_64::compareDouble):
(JSC::MacroAssemblerX86_64::branch64):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::setnz_r):
(JSC::X86Assembler::setnp_r):
(JSC::X86Assembler::setp_r):
(JSC::X86Assembler::cdq):

12:50 AM Changeset in webkit [195011] by peavo@outlook.com
  • 4 edits in trunk/Source

[Win] Remove workarounds for fixed bugs in fmod and pow.
https://bugs.webkit.org/show_bug.cgi?id=153071

Reviewed by Brent Fulgham.

Source/WebCore:

Compile fix, help MSVC pick correct pow overload.

  • rendering/shapes/BoxShape.cpp:

(WebCore::adjustRadiusForMarginBoxShape):

Source/WTF:

The bugs have been fixed in the MSVC CRT, and we can remove the workarounds.

  • wtf/MathExtras.h:

(wtf_fmod): Deleted.
(wtf_pow): Deleted.

12:39 AM Changeset in webkit [195010] by youenn.fablet@crf.canon.fr
  • 28 edits
    3 adds in trunk

Fix problems with cross-origin redirects
https://bugs.webkit.org/show_bug.cgi?id=116075

Reviewed by Daniel Bates.

LayoutTests/imported/w3c:

Rebasing test expectations.
These tests cannot work as expected as WTR/DRT block access to www2.localhost and example.not.

  • web-platform-tests/XMLHttpRequest/send-redirect-bogus-expected.txt:
  • web-platform-tests/XMLHttpRequest/send-redirect-to-cors-expected.txt:
  • web-platform-tests/XMLHttpRequest/send-redirect-to-non-cors-expected.txt:

Source/WebCore:

Merging https://chromium.googlesource.com/chromium/blink/+/7ea774e478f84f355748108d2aaabca15355d512 by Ken Russell
Same origin redirect responses leading to cross-origin requests were checked as cross-origin redirect responses.
Introduced ClientRequestedCredentials to manage whether credentials are needed or not in the cross-origin request.

In addition to Blink patch, it was needed to update some loaders with the newly introduced ClientRequestedCredentials parameter.
Added the clearing of "Accept-Encoding" header from cross-origin requests as Mac HTTP network layer is adding it for same-origin requests.

Test: http/tests/xmlhttprequest/access-control-and-redirects-async-same-origin.html

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::startLoadingMainResource): Added new security parameter (from Blink patch).

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::redirectReceived): Updated checks so that same origin redirections are not treated as cross origin redirections (from Blink patch).

  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResourceLoader::start):

  • loader/NetscapePlugInStreamLoader.cpp:

(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Added new security parameter.

  • loader/ResourceLoaderOptions.h:

(WebCore::ResourceLoaderOptions::ResourceLoaderOptions): Added new security parameter (from Blink patch).
(WebCore::ResourceLoaderOptions::credentialRequest):
(WebCore::ResourceLoaderOptions::setCredentialRequest):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Ditto.
(WebCore::CachedResourceLoader::defaultCachedResourceOptions): Ditto.

  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::startLoading): Added new security parameter.

  • page/EventSource.cpp:

(WebCore::EventSource::connect): Added new security parameter (from Blink patch).

  • platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:

(WebCore::WebCoreAVCFResourceLoader::startLoading): Added new security parameter.

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:

(WebCore::WebCoreAVFResourceLoader::startLoading): Ditto.

  • platform/network/ResourceHandleTypes.h: Added new security parameter constants (from Blink patch).
  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::clearHTTPAcceptEncoding): Function to remove "Accept-Encoding" header.

  • platform/network/ResourceRequestBase.h: Ditto.
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::createRequest): Added new security parameter.

LayoutTests:

Merging https://chromium.googlesource.com/chromium/blink/+/7ea774e478f84f355748108d2aaabca15355d512 by Ken Russell
This merge adds tests for cross origin requests triggered from same origin redirection responses with and without credentials).
Rebaseline of some tests due to console error messages generated from newly hit CORS checks.

  • TestExpectations: Disabled WPT tests that require access to non localhost URLs which are currently blocked by DTR/WTR.
  • http/tests/xmlhttprequest/access-control-and-redirects-async-expected.txt:
  • http/tests/xmlhttprequest/access-control-and-redirects-async-same-origin-expected.txt: Added.
  • http/tests/xmlhttprequest/access-control-and-redirects-async-same-origin.html: Added.
  • http/tests/xmlhttprequest/access-control-and-redirects-async.html:
  • http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
  • http/tests/xmlhttprequest/access-control-and-redirects.html:
  • http/tests/xmlhttprequest/redirect-cross-origin-2-expected.txt:
  • http/tests/xmlhttprequest/redirect-cross-origin-expected.txt:
  • http/tests/xmlhttprequest/redirect-cross-origin-post-expected.txt:
  • http/tests/xmlhttprequest/redirect-cross-origin-tripmine-expected.txt:
  • http/tests/xmlhttprequest/resources/access-control-basic-allow-no-credentials.cgi: Added.
  • http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt:

Jan 13, 2016:

11:34 PM Changeset in webkit [195009] by Carlos Garcia Campos
  • 5 edits in trunk

[CMake] Do not use LLVM static libraries for FTL JIT
https://bugs.webkit.org/show_bug.cgi?id=151559

Reviewed by Michael Catanzaro.

.:

Also export LLVM_LIBRARIES variable that can be used to prefer
linking to the llvm dynamic libraries.

  • Source/cmake/FindLLVM.cmake:

Source/JavaScriptCore:

Allow ports decide whether to prefer linking to llvm static or
dynamic libraries. This patch only changes the behavior of the GTK
port, other ports can change the default behavior by setting
llvmForJSC_LIBRARIES in their platform specific cmake files.

  • CMakeLists.txt: Move llvmForJSC library definition after the

WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS, to allow platform specific
files to set their own llvmForJSC_LIBRARIES. When not set, it
defaults to LLVM_STATIC_LIBRARIES. The command to create
WebKitLLVMLibraryToken.h no longer depends on the static
libraries, since we are going to make the build fail anyway when
not found in case of linking to the static libraries. If platform
specific file defined llvmForJSC_INSTALL_DIR llvmForJSC is also
installed to the given destination.

  • PlatformGTK.cmake: Set llvmForJSC_LIBRARIES and

llvmForJSC_INSTALL_DIR.

11:00 PM Changeset in webkit [195008] by timothy@apple.com
  • 2 edits in trunk/Websites/webkit.org

Correct some history timeline styles.

  • wp-content/themes/webkit/style.css:

(.timeline .content):

10:49 PM Changeset in webkit [195007] by timothy@apple.com
  • 2 edits in trunk/Websites/webkit.org

Add styles for a history timeline, needed by an upcoming blog post.

  • wp-content/themes/webkit/style.css:

(.timeline):
(.timeline:after):
(.timeline *):
(.timeline:before):
(.timeline > li):
(.timeline > li:before):
(.timeline .content):
(.timeline figure):
(.timeline .time):
(.timeline h2, .timeline h3):
(.timeline .time::before):
(.timeline img):
(@media (min-width: 900px)):
(.timeline > li.force-clear):
(.timeline > li:nth-child(odd)):
(.timeline > li:nth-child(even)):
(.timeline > li.force-clear + li):
(.timeline li .time):
(.timeline li:nth-child(odd) .time):
(.timeline li:nth-child(even) .time):
(.timeline li:nth-child(even) .time::before):
(.timeline > li:nth-child(even):before):

10:22 PM Changeset in webkit [195006] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Addressing more post-review comments after r194566

Unreviewed.

No new tests because there is no behavior change.

  • platform/text/mac/TextBreakIteratorInternalICUMac.mm:

(WebCore::topLanguagePreference):

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

Implement custom protocols when using NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=153078

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

Source/WebCore:

No new tests, but this makes the WebKit2CustomProtocolsTest api tests pass when using NetworkSession.

  • WebCore.xcodeproj/project.pbxproj:

Make NSURLConnectionSPI.h private so we can include it from within WebKit2.

Source/WebKit2:

  • NetworkProcess/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:

(WebKit::generateCustomProtocolID):
(+[WKCustomProtocol canInitWithRequest:]):
(+[WKCustomProtocol canonicalRequestForRequest:]):
(-[WKCustomProtocol initWithRequest:cachedResponse:client:]):
(-[WKCustomProtocol startLoading]):
(-[WKCustomProtocol stopLoading]):
There's no need to have a static pointer when we can use NetworkProcess::singleton to access
the process-global CustomProtocolManager, and add null checks because that's a good thing to do.
(WebKit::CustomProtocolManager::CustomProtocolManager):
Call UTF8Encoding when creating the CustomProtocolManager on the main thread to make sure it exists
for when we decode URLS in ResourceResponses from IPC later, which is done on a different WorkQueue.
(WebKit::CustomProtocolManager::initializeConnection):
(WebKit::CustomProtocolManager::initialize):
(WebKit::CustomProtocolManager::removeCustomProtocol):
(WebKit::CustomProtocolManager::registerProtocolClass):
(WebKit::CustomProtocolManager::registerScheme):

  • NetworkProcess/CustomProtocols/CustomProtocolManager.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSession::NetworkSession):
Call registerProtocolClass to set configuration.protocolClasses if there is a CustomProtocolManager.

5:29 PM Changeset in webkit [195004] by Brent Fulgham
  • 8 edits in trunk/Source/WebCore

Cross-protocol, cross-site scripting (XPSS) using HTML forms
https://bugs.webkit.org/show_bug.cgi?id=153017
<rdar://problem/5873254>

Reviewed by David Kilzer.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::responseReceived): If response HTTP version is 0.9,
sandbox against script execution and plugins.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::didReceiveResponse): Ditto.

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveResponse): Ditto.

  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::adopt): Update for HTTP version.
(WebCore::ResourceResponseBase::copyData): Ditto.
(WebCore::ResourceResponseBase::httpVersion): Added.
(WebCore::ResourceResponseBase::setHTTPVersion): Ditto.

  • platform/network/ResourceResponseBase.h:

(WebCore::ResourceResponseBase::encode): Update for HTTP version.
(WebCore::ResourceResponseBase::decode): Ditto.

  • platform/network/cf/ResourceResponseCFNet.cpp:

(WebCore::ResourceResponse::platformLazyInit): Capture HTTP version.

  • platform/network/cocoa/ResourceResponseCocoa.mm:

(WebCore::ResourceResponse::platformLazyInit): Ditto.

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

Marking test as flaky: sputnik/Conformance/15_Native_Objects/15.1_The_Global_Object/15.1.3/15.1.3.3_encodeURI/S15.1.3.3_A2.4_T2.html
https://bugs.webkit.org/show_bug.cgi?id=153086

Unreviewed test gardening.

  • platform/mac/TestExpectations:
5:03 PM Changeset in webkit [195002] by Beth Dakin
  • 15 edits
    2 adds in trunk

WK2: Request completion candidates when needed
https://bugs.webkit.org/show_bug.cgi?id=153040
-and corresponding-
rdar://problem/24155631

Reviewed by Enrica Casucci.

Source/WebCore:

Helper functions for stringForCandidateRequest() and
handleAcceptedCandidate()

  • editing/Editor.cpp:

(WebCore::candidateRangeForSelection):
(WebCore::candidateWouldReplaceText):

Request candidates for the word that is currently being typed so long as the
candidate would replace that word. Otherwise, use String().
(WebCore::Editor::stringForCandidateRequest):

When a candidate has been accepted, insert the text.
(WebCore::Editor::handleAcceptedCandidate):

  • editing/Editor.h:

Source/WebKit2:

Mac needs to support postLayoutData in order to have some layout-related
editing information to request candidates. This patch re-shuffles some items
in the struct so that they can be shared by Mac and iOS, and it adds 3 new
items for Mac only.

  • Shared/EditorState.cpp:

(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
(WebKit::EditorState::PostLayoutData::encode):
(WebKit::EditorState::PostLayoutData::decode):

  • Shared/EditorState.h:

Request and handle candidates here in WebViewImpl, and cache the
m_lastStringForCandidateRequest so that we can ensure the results we receive
were received in a timely enough manner that they are still for the same
String.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::selectionDidChange):

When selection changes, request new candidates.
(WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):

Once candidates have been received, we ask the sharedSpellChecker to show
them.
(WebKit::WebViewImpl::handleRequestedCandidates):

If a candidate is accepted, we ask the WebProcess to accept it, so we start
by converting the NSTextCheckingResult to a WebCore::TextCheckingResult.
(WebKit::textCheckingResultFromNSTextCheckingResult):
(WebKit::WebViewImpl::handleAcceptedCandidate):

Ask the WebProcess to handle accepting the candidate.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handleAcceptedCandidate):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage:: handleAcceptedCandidate):

  • WebProcess/WebPage/WebPage.messages.in:

Now that Mac has some postLayoutData in the EditorState, fill that in in
platformEditorState().

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::platformEditorState):

Ask WebCore::Editor to handle the accepted candidate.
(WebKit::WebPage::handleAcceptedCandidate):

LayoutTests:

Getting updated EditorState in platformEditorState causes some extra layout
to happen, so now the layout test results for WK2 reflect the results that we
already see on iOS for this test and they reflect the render tree as it is
when you load the page in browser.

  • platform/mac/fast/dom/focus-contenteditable-expected.txt:

WebKit 1 is not affected by these new results, so this adds WK-1 only results
that match the old Mac results.

  • platform/mac-wk1/fast/dom: Added.
  • platform/mac-wk1/fast/dom/focus-contenteditable-expected.txt: Added.
4:29 PM Changeset in webkit [195001] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Addressing post-review comments after r194566

Unreviewed.

No new tests because there is no behavior difference.

  • platform/text/mac/TextBreakIteratorInternalICUMac.mm:

(WebCore::textBreakLocalePreference):
(WebCore::topLanguagePreference):
(WebCore::getSearchLocale):
(WebCore::getTextBreakLocale):
(WebCore::canonicalLanguageIdentifier): Deleted.

4:28 PM Changeset in webkit [195000] by sbarati@apple.com
  • 10 edits in trunk/Source/JavaScriptCore

NativeExecutable should have a name field
https://bugs.webkit.org/show_bug.cgi?id=153083

Reviewed by Geoffrey Garen.

This is going to help the SamplingProfiler come up
with names for NativeExecutable objects it encounters.

  • jit/JITThunks.cpp:

(JSC::JITThunks::finalize):
(JSC::JITThunks::hostFunctionStub):

  • jit/JITThunks.h:
  • runtime/Executable.h:
  • runtime/JSBoundFunction.cpp:

(JSC::JSBoundFunction::create):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::create):
(JSC::JSFunction::lookUpOrCreateNativeExecutable):

  • runtime/JSFunction.h:

(JSC::JSFunction::createImpl):

  • runtime/JSNativeStdFunction.cpp:

(JSC::JSNativeStdFunction::create):

  • runtime/VM.cpp:

(JSC::thunkGeneratorForIntrinsic):
(JSC::VM::getHostFunction):

  • runtime/VM.h:

(JSC::VM::getCTIStub):
(JSC::VM::exceptionOffset):

4:04 PM Changeset in webkit [194999] by rniwa@webkit.org
  • 11 edits
    2 adds in trunk

formaction must return document's address when formaction is missing
https://bugs.webkit.org/show_bug.cgi?id=148874

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Rebaselined the tests now that more test cases are passing.

  • web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/formAction_document_address-expected.txt:
  • web-platform-tests/html/semantics/forms/attributes-common-to-form-controls/formaction-expected.txt:

Source/WebCore:

Fixed the bug by falling back to document.url() when the attribute is not set or is empty in formAction getter.

Test: fast/forms/formaction-attribute-with-empty-value.html

  • html/HTMLButtonElement.idl:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::formAction): Added.
(WebCore::HTMLFormControlElement::setFormAction): Added.

  • html/HTMLFormControlElement.h:
  • html/HTMLInputElement.idl:

LayoutTests:

Added a regression test and rebaselined imported W3C tests.

  • fast/forms/formaction-attribute-with-empty-value-expected.txt: Added.
  • fast/forms/formaction-attribute-with-empty-value.html: Added.
  • fast/forms/submit-form-attributes-expected.txt:
  • fast/forms/submit-form-attributes.html:
3:45 PM Changeset in webkit [194998] by keith_miller@apple.com
  • 3 edits
    1 add in trunk/Source/JavaScriptCore

[ES6] Support subclassing the String builtin object
https://bugs.webkit.org/show_bug.cgi?id=153068

Reviewed by Michael Saboff.

This patch adds subclassing of strings. Also, this patch fixes a bug where we could have
the wrong indexing type for builtins constructed without storage.

  • runtime/PrototypeMap.cpp:

(JSC::PrototypeMap::emptyStructureForPrototypeFromBaseStructure):

  • runtime/StringConstructor.cpp:

(JSC::constructWithStringConstructor):

  • tests/stress/class-subclassing-string.js: Added.

(test):

3:31 PM Changeset in webkit [194997] by mmaxfield@apple.com
  • 4 edits in trunk/Tools

[Cocoa] Testing with font family name "System Font" is unused
https://bugs.webkit.org/show_bug.cgi?id=153073
<rdar://problem/24091683>

Reviewed by Brent Fulgham.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(allowedFontFamilySet): Deleted.

  • WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:

(WTR::allowedFontFamilySet): Deleted.

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::allowedFontFamilySet): Deleted.

3:28 PM Changeset in webkit [194996] by mark.lam@apple.com
  • 10 edits
    3 adds in trunk

The StringFromCharCode DFG intrinsic should support untyped operands.
https://bugs.webkit.org/show_bug.cgi?id=153046

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

The current StringFromCharCode DFG intrinsic assumes that its operand charCode
must be an Int32. This results in 26000+ BadType OSR exits in the LongSpider
crypto-aes benchmark. With support for Untyped operands, the number of OSR
exits drops to 202.

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGFixupPhase.cpp:

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

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

(JSC::DFG::SpeculativeJIT::compileFromCharCode):

  • dfg/DFGSpeculativeJIT.h:

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

  • dfg/DFGValidate.cpp:

(JSC::DFG::Validate::validate):

  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::toUInt32):

LayoutTests:

  • js/regress/ftl-polymorphic-StringFromCharCode-expected.txt: Added.
  • js/regress/ftl-polymorphic-StringFromCharCode.html: Added.
  • js/regress/script-tests/ftl-polymorphic-StringFromCharCode.js: Added.

(o1.valueOf):
(foo):

3:11 PM Changeset in webkit [194995] by matthew_hanson@apple.com
  • 22 edits
    1 copy
    1 add in branches/safari-601.1.46-branch

Merge r194950. rdar://problem/23270886

3:10 PM Changeset in webkit [194994] by matthew_hanson@apple.com
  • 27 edits
    2 adds in branches/safari-601.1.46-branch

Merge r194927. rdar://problem/24101173

3:10 PM Changeset in webkit [194993] by matthew_hanson@apple.com
  • 4 edits
    3 adds in branches/safari-601.1.46-branch

Merge r194898. rdar://problem/24154420

3:10 PM Changeset in webkit [194992] by matthew_hanson@apple.com
  • 4 edits
    17 adds in branches/safari-601.1.46-branch

Merge r194865. rdar://problem/24154421

3:10 PM Changeset in webkit [194991] by matthew_hanson@apple.com
  • 4 edits
    5 adds in branches/safari-601.1.46-branch

Merge r191180. rdar://problem/24154421

3:10 PM Changeset in webkit [194990] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601.1.46-branch/Source/WebCore

Merge r190641. rdar://problem/24154421

3:10 PM Changeset in webkit [194989] by matthew_hanson@apple.com
  • 6 edits
    1 copy
    4 adds in branches/safari-601.1.46-branch

Merge r193939. rdar://problem/24154418

3:06 PM Changeset in webkit [194988] by Michael Catanzaro
  • 2 edits in trunk

[GTK] Add comments above options declarations in OptionsGTK.cmake
https://bugs.webkit.org/show_bug.cgi?id=153074

Reviewed by Martin Robinson.

  • Source/cmake/OptionsGTK.cmake:
3:00 PM Changeset in webkit [194987] by Chris Dumez
  • 21 edits in trunk/Source

Unreviewed, rolling out r194900.

Roll back in as this did not actually regress PLT

Reverted changeset:

"Unreviewed, rolling out r194826."
https://bugs.webkit.org/show_bug.cgi?id=153020
http://trac.webkit.org/changeset/194900

2:45 PM Changeset in webkit [194986] by ggaren@apple.com
  • 7 edits in trunk/Source/WebKit2

WebKit2 should have an API for eagerly querying whether the web process is responsive
https://bugs.webkit.org/show_bug.cgi?id=153037

Reviewed by Tim Horton.

WebKit2 provides a delegate notification when the web process doesn't
respond to a message after a while. But there's no way to send a message
eagerly and check for reply.

We want this new mechanism so that navigation can terminate the web
process eagerly if it is hung.

  • UIProcess/API/C/WKPage.cpp:

(WKPageGetWebProcessIsResponsive):

  • UIProcess/API/C/WKPagePrivate.h: This is the new API.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::sendWheelEvent): Updated for interface change.

(WebKit::WebPageProxy::getWebProcessIsResponsive): Calls through to the
web process proxy. We claim that we are responsive when there is no
web process because we assume that a fresh web process will not hang.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::didBecomeUnresponsive): Keep a flag indicating
whether the process is unresponsive so that we can fire unresponsiveness
callbacks immediately for a hung process instead of waiting another 3s.

(WebKit::WebProcessProxy::didBecomeResponsive): We don't fire responsiveness
callbacks inside didBecomeResponsive because we assume that a responsive
web process will invoke didReceiveMainThreadPing -- and we fire the
callbacks there.

(WebKit::WebProcessProxy::getIsResponsive): If the web process is already
known to be unresponsive, fire the callback right away. Otherwise, queue
it up to fire once we have an answer from a main thread ping.

(WebKit::WebProcessProxy::didReceiveMainThreadPing): Fire any pending
callbacks when we learn that the web process is responsive.

  • UIProcess/WebProcessProxy.h:
2:32 PM Changeset in webkit [194985] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Removed empty #if block from Font.h
https://bugs.webkit.org/show_bug.cgi?id=153067

Patch by Konstantin Tokarev <Konstantin Tokarev> on 2016-01-13
Reviewed by Alex Christensen.

No new tests needed.

  • platform/graphics/Font.h:

(WebCore::Font::scriptCache): Deleted.

2:29 PM Changeset in webkit [194984] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

[GTK] Consistently use virtual and override specifiers in ScrollbarThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=153076

Reviewed by Alex Christensen.

No behavior change.

  • platform/gtk/ScrollbarThemeGtk.h:
2:21 PM Changeset in webkit [194983] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Use DFG Graph::binary/unaryArithShouldSpeculateInt32/MachineInt() functions consistently.
https://bugs.webkit.org/show_bug.cgi?id=153080

Reviewed by Geoffrey Garen.

We currently have Graph::mulShouldSpeculateInt32/machineInt() and
Graph::negateShouldSpeculateInt32/MachineInt() functions which are only used by
the ArithMul and ArithNegate nodes. However, the same tests need to be done for
many other arith nodes in the DFG. This patch renames these functions as
Graph::binaryArithShouldSpeculateInt32/machineInt() and
Graph::unaryArithShouldSpeculateInt32/MachineInt(), and uses them consistently
in the DFG.

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::addShouldSpeculateMachineInt):
(JSC::DFG::Graph::binaryArithShouldSpeculateInt32):
(JSC::DFG::Graph::binaryArithShouldSpeculateMachineInt):
(JSC::DFG::Graph::unaryArithShouldSpeculateInt32):
(JSC::DFG::Graph::unaryArithShouldSpeculateMachineInt):
(JSC::DFG::Graph::mulShouldSpeculateInt32): Deleted.
(JSC::DFG::Graph::mulShouldSpeculateMachineInt): Deleted.
(JSC::DFG::Graph::negateShouldSpeculateInt32): Deleted.
(JSC::DFG::Graph::negateShouldSpeculateMachineInt): Deleted.

  • dfg/DFGPredictionPropagationPhase.cpp:

(JSC::DFG::PredictionPropagationPhase::propagate):
(JSC::DFG::PredictionPropagationPhase::doDoubleVoting):

1:45 PM Changeset in webkit [194982] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Cleanup: XSS Auditor should avoid re-evaluating the parsed script tag
https://bugs.webkit.org/show_bug.cgi?id=152870

Patch by Daniel Bates <dabates@apple.com> on 2016-01-13
Reviewed by Brent Fulgham.

Merged from Blink (patch by Tom Sepez <tsepez@chromium.org>):
<https://src.chromium.org/viewvc/blink?revision=154354&view=revision>

Although the XSS Auditor caches the decoded start tag of a script as an optimization to
avoid decoding it again when filtering the character data of the script, it is sufficient
to cache whether the HTTP response contains the decoded start tag of a script. This
avoids both decoding the start tag of a script and determining whether the HTTP response
contains it again when filtering the character data of the script. Moreover, this removes
the need to cache a string object.

  • html/parser/XSSAuditor.cpp:

(WebCore::XSSAuditor::filterCharacterToken):
(WebCore::XSSAuditor::filterScriptToken):

  • html/parser/XSSAuditor.h:
1:32 PM Changeset in webkit [194981] by commit-queue@webkit.org
  • 11 edits in trunk

Web Inspector: Inspector should use the last sourceURL / sourceMappingURL directive
https://bugs.webkit.org/show_bug.cgi?id=153072
<rdar://problem/24168312>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-01-13
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • parser/Lexer.cpp:

(JSC::Lexer<T>::parseCommentDirective):
Just keep overwriting the member variable so we end up with
the last directive value.

Source/WebInspectorUI:

  • UserInterface/Base/Utilities.js:

Prepend instead of append the sourceURL so the provided string
can include a sourceURL and override it. Such as manually
evaluating a script through the quick console with a sourceURL.

  • UserInterface/Models/SourceMapResource.js:

Fix an incorrectly named property.

LayoutTests:

  • inspector/console/console-api-expected.txt:
  • inspector/console/console-table-expected.txt:
  • platform/mac/inspector/model/remote-object-expected.txt:

Updated line number in output now that code evaluated through the frontend
gets the WebInspectorInternal sourceURL prepended to the start instead
of appended to the end.

  • inspector/debugger/sourceURLs-expected.txt:
  • inspector/debugger/sourceURLs.html:

Update the test to find the second sourceURL, not the first.

1:24 PM Changeset in webkit [194980] by Ryan Haddad
  • 23 edits
    2 deletes in trunk/Source

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

This change causes ASan tests to crash and exit early
(Requested by ryanhaddad on #webkit).

Reverted changeset:

"Fragmentation-free allocator for timeless and/or coupled
allocations."
https://bugs.webkit.org/show_bug.cgi?id=152696
http://trac.webkit.org/changeset/194963

Patch by Commit Queue <commit-queue@webkit.org> on 2016-01-13

1:20 PM Changeset in webkit [194979] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[XSS Auditor] Do not include trailing comment characters in JavaScript snippets
https://bugs.webkit.org/show_bug.cgi?id=152873

Patch by Daniel Bates <dabates@apple.com> on 2016-01-13
Reviewed by Brent Fulgham.

Merged from Blink (patch by Tom Sepez <tsepez@chromium.org>):
<https://src.chromium.org/viewvc/blink?view=rev&revision=169967>

Source/WebCore:

Test: http/tests/security/xssAuditor/script-tag-with-injected-comment.html

  • html/parser/XSSAuditor.cpp:

(WebCore::XSSAuditor::decodedSnippetForJavaScript):

LayoutTests:

  • http/tests/security/xssAuditor/script-tag-with-injected-comment-expected.txt: Added.
  • http/tests/security/xssAuditor/script-tag-with-injected-comment.html: Added.
1:18 PM Changeset in webkit [194978] by commit-queue@webkit.org
  • 3 edits
    5 adds in trunk

[XSS Auditor] Add test when XSS payload is in the path portion of the URL
https://bugs.webkit.org/show_bug.cgi?id=152871

Patch by Daniel Bates <dabates@apple.com> on 2016-01-13
Reviewed by Brent Fulgham.

Merged from Blink (patch by Tom Sepez <tsepez@chromium.org>):
<https://src.chromium.org/viewvc/blink?revision=164746&view=revision>

Tools:

  • Scripts/webkitpy/layout_tests/servers/lighttpd.conf:

LayoutTests:

Add infrastructure and a test for an XSS attack where the payload is
embedded in the path portion of the URL.

Many XSS Auditor tests pass the XSS payload to CGI scripts via the
query string portion of the URL. Now we also support calling these
same scripts with the payload embedded in the path portion of the
URL.

Loading <http://127.0.0.1:8000/security/xssAuditor/intercept/X/Y>
returns a response whose content is identical to <http://127.0.0.1:8000/security/xssAuditor/resoures/X?q=Y>,
where X is the filename of some CGI script in directory LayoutTests/http/tests/security/xssAuditor/resources
and Y is the XSS payload.

  • http/tests/security/xssAuditor/intercept/.htaccess: Added.
  • http/tests/security/xssAuditor/reflection-in-path-expected.txt: Added.
  • http/tests/security/xssAuditor/reflection-in-path.html: Added.
  • http/tests/security/xssAuditor/resources/echo-form-action.pl: Added.
1:14 PM Changeset in webkit [194977] by commit-queue@webkit.org
  • 13 edits
    2 moves in trunk/Source/WebInspectorUI

Web Inspector: Add support for the existing GradientEditor in the CSS Rules sidebar
https://bugs.webkit.org/show_bug.cgi?id=153004

Patch by Devin Rousso <Devin Rousso> on 2016-01-13
Reviewed by Timothy Hatcher.

Both the Visual sidebar and Resource view have editors for CSS gradient
values, but the Rules sidebar instead only adds editors for basic color
values. Instead of duplicating the code for gradient swatches, existing
code will be used to give this same functionality to the Rules sidebar.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Main.html:
  • UserInterface/Models/Gradient.js:

(WebInspector.Gradient):
(WebInspector.Gradient.fromString):
(WebInspector.Gradient.stopsWithComponents):
(WebInspector.Gradient.prototype.copy):
(WebInspector.Gradient.prototype.toString):
Refactored WebInspector.Gradient into its own class.

(WebInspector.LinearGradient):
(WebInspector.LinearGradient.prototype.toString):
Now uses WebInspector.Gradient inheritance and methods.

(WebInspector.RadialGradient):
(WebInspector.RadialGradient.prototype.toString):
Now uses WebInspector.Gradient inheritance and methods.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.css:

Use InlineSwatch.css values instead.

(.css-style-text-editor > .CodeMirror .CodeMirror-lines .cubic-bezier-marker): Deleted.
(@media (-webkit-max-device-pixel-ratio: 1)): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .cubic-bezier-marker:hover): Deleted.
(.css-style-text-editor > .CodeMirror .CodeMirror-lines .cubic-bezier-marker:active): Deleted.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.CSSStyleDeclarationTextEditor.prototype.didDismissPopover): Deleted.
Removed unused popover member variable.

(WebInspector.CSSStyleDeclarationTextEditor.prototype._contentChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.createSwatch):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches):
Renamed variables for more consistent naming and reimplemented the logic
to use the new WebInspector.InlineSwatch methods. As a result, it was
possible to consolidate the 3 different type of swatch functions into a
single function.

(WebInspector.CSSStyleDeclarationTextEditor.prototype._commentProperty.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._uncommentRange.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._resetContent.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches.createSwatch): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches.update): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createBezierEditors.update): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createBezierEditors): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchColorChanged.update): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._colorSwatchColorChanged): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._cubicBezierMarkerClicked.updateCodeMirror.update): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._cubicBezierMarkerClicked.updateCodeMirror): Deleted.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._cubicBezierMarkerClicked): Deleted.

  • UserInterface/Views/CodeMirrorTextMarkers.js:

(createCodeMirrorColorTextMarkers.matchFunction):
Added logic so that if the matched color string is found inside a gradient,
it will not have a marker created for it.

  • UserInterface/Views/InlineSwatch.css: Renamed from Source/WebInspectorUI/UserInterface/Views/ColorSwatch.css.

Consolidated the various swatch CSS classes into one file.

(.inline-swatch):
(.inline-swatch.bezier):
(.inline-swatch.bezier:hover):
(.inline-swatch.bezier:active):
(@media (-webkit-max-device-pixel-ratio: 1)):
(.inline-swatch > span):
Ensured that the inner swatch element can not be selected so that the "click"
listener on its parent always fires.

(.inline-swatch:hover > span):
(.inline-swatch:active > span):
(.inline-swatch.bezier > span):

  • UserInterface/Views/InlineSwatch.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ColorSwatch.js.

(WebInspector.InlineSwatch):
Now accepts a new first argument to indicate what type of color swatch
to create and what functionality it will have. Currently has options
for WebInspector.Color, WebInspector.Gradient, and WebInspector.CubicBezier.

(WebInspector.InlineSwatch.prototype.get element):
(WebInspector.InlineSwatch.prototype.get value):
(WebInspector.InlineSwatch.prototype.set value):
(WebInspector.InlineSwatch.prototype._fallbackValue):
(WebInspector.InlineSwatch.prototype._updateSwatch):
(WebInspector.InlineSwatch.prototype._swatchElementClicked):
(WebInspector.InlineSwatch.prototype._valueEditorValueDidChange):
(WebInspector.InlineSwatch.prototype._handleContextMenuEvent):
(WebInspector.InlineSwatch.prototype._getNextValidHEXFormat.hexMatchesCurrentColor):
(WebInspector.InlineSwatch.prototype._getNextValidHEXFormat):

  • UserInterface/Views/VisualStyleBackgroundPicker.css:

(.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient):
(.visual-style-property-container.background-picker > .visual-style-property-value-container:not(.gradient-value) > .inline-swatch.gradient):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient:hover):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient:active):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .inline-swatch.gradient > span):
(.visual-style-property-container.background-picker > .visual-style-property-value-container.gradient-value > .inline-swatch.gradient + .value-input):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-swatch): Deleted.
(.visual-style-property-container.background-picker > .visual-style-property-value-container:not(.gradient-value) > .color-swatch): Deleted.
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-swatch:hover): Deleted.
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-swatch:active): Deleted.
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-swatch > span): Deleted.
(.visual-style-property-container.background-picker > .visual-style-property-value-container.gradient-value > .color-swatch + .value-input): Deleted.

  • UserInterface/Views/VisualStyleBackgroundPicker.js:

Removed the specific code for the gradient swatch and moved to using a
gradient-type InlineSwatch for gradient values instead.

(WebInspector.VisualStyleBackgroundPicker):
(WebInspector.VisualStyleBackgroundPicker.prototype.set value):
(WebInspector.VisualStyleBackgroundPicker.prototype._updateGradient):
(WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchColorChanged):
(WebInspector.VisualStyleBackgroundPicker.prototype._valueInputValueChanged):
(WebInspector.VisualStyleBackgroundPicker.prototype._handleKeywordChanged):
(WebInspector.VisualStyleBackgroundPicker.prototype._updateGradientSwatch): Deleted.
(WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchClicked.handleColorPickerToggled): Deleted.
(WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchClicked): Deleted.
(WebInspector.VisualStyleBackgroundPicker.prototype._gradientEditorGradientChanged): Deleted.

  • UserInterface/Views/VisualStyleColorPicker.css:

(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color):
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color:hover):
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color:active):
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color > span):
Add override CSS to ensure that the color-type InlineSwatch displays nicely
next to the flexbox style Visual sidebar.

(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch): Deleted.
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch:hover): Deleted.
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch:active): Deleted.
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .color-swatch > span): Deleted.
Refactored to only use overriding properties of the basic .inline-swatch values.

  • UserInterface/Views/VisualStyleColorPicker.js:

(WebInspector.VisualStyleColorPicker):
(WebInspector.VisualStyleColorPicker.prototype._colorSwatchColorChanged):
(WebInspector.VisualStyleColorPicker.prototype._updateColorSwatch):

  • UserInterface/Views/VisualStyleTimingEditor.css:

(.visual-style-property-container.timing-editor > .visual-style-property-value-container > .inline-swatch.bezier):
(.visual-style-property-container.timing-editor > .visual-style-property-value-container:not(.bezier-value) > .inline-swatch.bezier):
(@media (-webkit-min-device-pixel-ratio: 2)):
Add override CSS to ensure that the color-type InlineSwatch displays nicely
next to the flexbox style Visual sidebar.

(.visual-style-property-container.timing-editor > .visual-style-property-value-container > .bezier-editor): Deleted.
(.visual-style-property-container.timing-editor > .visual-style-property-value-container > .bezier-editor:hover): Deleted.
(.visual-style-property-container.timing-editor > .visual-style-property-value-container > .bezier-editor:active): Deleted.
Refactored to only use overriding properties of the basic .inline-swatch values.

  • UserInterface/Views/VisualStyleTimingEditor.js:

Removed the specific code for the cubic-bezier swatch and moved to using a
cubic-bezier-type InlineSwatch for gradient values instead.

(WebInspector.VisualStyleTimingEditor):
(WebInspector.VisualStyleTimingEditor.prototype.get bezierValue):
(WebInspector.VisualStyleTimingEditor.prototype.set bezierValue):
(WebInspector.VisualStyleTimingEditor.prototype._setValue):
(WebInspector.VisualStyleTimingEditor.prototype._handleKeywordChanged):
(WebInspector.VisualStyleTimingEditor.prototype._bezierSwatchValueChanged):
(WebInspector.VisualStyleTimingEditor.prototype._bezierMarkerClicked): Deleted.

12:52 PM Changeset in webkit [194976] by Chris Dumez
  • 5 edits
    2 deletes in trunk/Source/JavaScriptCore

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

This change broke the iOS build (Requested by ryanhaddad on
#webkit).

Reverted changeset:

"[JSC] Legalize Memory Offsets for ARM64 before lowering to
Air"
https://bugs.webkit.org/show_bug.cgi?id=153065
http://trac.webkit.org/changeset/194969

Patch by Commit Queue <commit-queue@webkit.org> on 2016-01-13

12:17 PM Changeset in webkit [194975] by matthew_hanson@apple.com
  • 27 edits
    2 adds in branches/safari-601-branch

Merge r194927. rdar://problem/24101254

12:17 PM Changeset in webkit [194974] by matthew_hanson@apple.com
  • 4 edits
    3 adds in branches/safari-601-branch

Merge r194898. rdar://problem/24154290

12:17 PM Changeset in webkit [194973] by matthew_hanson@apple.com
  • 4 edits
    17 adds in branches/safari-601-branch

Merge r194865. rdar://problem/24154291

12:17 PM Changeset in webkit [194972] by matthew_hanson@apple.com
  • 4 edits
    5 adds in branches/safari-601-branch

Merge r191180. rdar://problem/24154291

12:17 PM Changeset in webkit [194971] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601-branch/Source/WebCore

Merge r190641. rdar://problem/24154291

12:17 PM Changeset in webkit [194970] by matthew_hanson@apple.com
  • 6 edits
    1 copy
    4 adds in branches/safari-601-branch

Merge r193939. rdar://problem/24154418

11:33 AM Changeset in webkit [194969] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk/Source/JavaScriptCore

[JSC] Legalize Memory Offsets for ARM64 before lowering to Air
https://bugs.webkit.org/show_bug.cgi?id=153065

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-01-13
Reviewed by Mark Lam.
Reviewed by Filip Pizlo.

On ARM64, we cannot use signed 32bits offset for memory addressing.
There are two available addressing: signed 9bits and unsigned scaled 12bits.
Air already knows about it.

In this patch, the offsets are changed to something valid for ARM64
prior to lowering. When an offset is invalid, it is just computed
before the instruction and used as the base for addressing.

(JSC::B3::generateToAir):

  • b3/B3LegalizeMemoryOffsets.cpp: Added.

(JSC::B3::legalizeMemoryOffsets):

  • b3/B3LegalizeMemoryOffsets.h: Added.
  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::effectiveAddr): Deleted.

  • b3/testb3.cpp:

(JSC::B3::testLoadWithOffsetImpl):
(JSC::B3::testLoadOffsetImm9Max):
(JSC::B3::testLoadOffsetImm9MaxPlusOne):
(JSC::B3::testLoadOffsetImm9MaxPlusTwo):
(JSC::B3::testLoadOffsetImm9Min):
(JSC::B3::testLoadOffsetImm9MinMinusOne):
(JSC::B3::testLoadOffsetScaledUnsignedImm12Max):
(JSC::B3::testLoadOffsetScaledUnsignedOverImm12Max):
(JSC::B3::run):

11:22 AM Changeset in webkit [194968] by adam.bergkvist@ericsson.com
  • 10 edits
    2 adds in trunk

WebRTC: Add support for RTCRtpSender.replaceTrack()
https://bugs.webkit.org/show_bug.cgi?id=153063

Reviewed by Eric Carlson.

Source/WebCore:

Add the API and infrastructure to support RTCRtpSender.replaceTrack(). The platform is
reached through the RTCPeerConnection object that created the RTCRtpSender via a client
interface.

Test: fast/mediastream/RTCRtpSender-replaceTrack.html

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::replaceTrack):

  • Modules/mediastream/MediaEndpointPeerConnection.h:
  • Modules/mediastream/PeerConnectionBackend.h:
  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::addTrack):
(WebCore::RTCPeerConnection::removeTrack):
(WebCore::RTCPeerConnection::replaceTrack):

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::RTCRtpSender):
(WebCore::RTCRtpSender::replaceTrack):

  • Modules/mediastream/RTCRtpSender.h:

(WebCore::RTCRtpSenderClient::~RTCRtpSenderClient):
(WebCore::RTCRtpSender::create):
(WebCore::RTCRtpSender::trackId):
(WebCore::RTCRtpSender::stop):

  • Modules/mediastream/RTCRtpSender.idl:

LayoutTests:

Add API test for RTCRtpSender.replaceTrack(). A successful call is still
rejected (promise) until proper support is available in the WebRTC backend.

  • fast/mediastream/RTCRtpSender-replaceTrack-expected.txt: Added.
  • fast/mediastream/RTCRtpSender-replaceTrack.html: Added.
10:42 AM Changeset in webkit [194967] by beidson@apple.com
  • 8 edits
    1 add in trunk/Source/WebCore

Modern IDB: A few cursor tests are flaky because JS wrappers are GC'ed.
https://bugs.webkit.org/show_bug.cgi?id=153038

Reviewed by Alex Christensen.

No new tests (Couldn't write a test that was any more reliable than "flaky", so fixing the existing flaky tests will do).

And IDBCursor has an associated IDBRequest that is re-used each time the IDBCursor iterates.

The normal ActiveDOMObject approach to prevent the IDBRequest's wrapper from being garbage collected was not good enough
because, while the IDBRequest may not currently be waiting on any activity, as long as its associated IDBCursor is still
reachable then the request might be reused in the future.

Fortunately there's an IDL allowance for "one object keeping another alive during GC" and that's JSCustomMarkFunction
combined with GenerateIsReachable.

Applying those to IDBCursor and IDBRequest fix this handily.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • Modules/indexeddb/IDBCursor.h:

(WebCore::IDBCursor::isModernCursor):

  • Modules/indexeddb/IDBCursor.idl:
  • Modules/indexeddb/IDBRequest.idl:
  • Modules/indexeddb/client/IDBCursorImpl.cpp:

(WebCore::IDBClient::IDBCursor::advance):
(WebCore::IDBClient::IDBCursor::continueFunction):
(WebCore::IDBClient::IDBCursor::uncheckedIterateCursor):
(WebCore::IDBClient::IDBCursor::uncheckedIteratorCursor): Deleted. Fixed the typo of this name.

  • Modules/indexeddb/client/IDBCursorImpl.h:
  • bindings/js/JSIDBCursorCustom.cpp: Added.

(WebCore::JSIDBCursor::visitAdditionalChildren):

10:19 AM Changeset in webkit [194966] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

Get text drawing working with display lists.
https://bugs.webkit.org/show_bug.cgi?id=152957

Reviewed by Simon Fraser.

This patch enables text drawing for display lists.

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::drawGlyphBuffer):

  • platform/graphics/FontCascade.h:
  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::drawGlyphs):
(WebCore::GraphicsContext::drawText): Deleted.

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::DrawGlyphs::apply):

9:08 AM Changeset in webkit [194965] by Alan Bujtas
  • 10 edits in trunk

Simple line layout: Add support for word-break property.
https://bugs.webkit.org/show_bug.cgi?id=153054

Reviewed by Antti Koivisto.

This patch enables word-break property for simple line layout.
(https://drafts.csswg.org/css-text-3/#propdef-word-break)

word-break: normal and keep-all -> existing, non-(force)breaking behaviour.

break-all -> breaks words when needed.

Covered by existing tests like fast/text/word-break.html

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::canUseForStyle): Deleted.
(WebCore::SimpleLineLayout::printReason): Deleted.

  • rendering/SimpleLineLayoutTextFragmentIterator.cpp:

(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
(WebCore::SimpleLineLayout::TextFragmentIterator::findNextTextFragment):

  • rendering/SimpleLineLayoutTextFragmentIterator.h:

(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isBreakable): Deleted.
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.

9:04 AM Changeset in webkit [194964] by commit-queue@webkit.org
  • 30 edits in trunk/Source/WebCore

Reference cycle between SVGPathElement and SVGPathSegWithContext leaks Document
https://bugs.webkit.org/show_bug.cgi?id=151810

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-01-13
Reviewed by Darin Adler.

Break the reference cycle between SVGPathElement and SVGPathSegWithContext
by changing the back-pointer to be a WeakPtr pointer instead of having it
RefPtr. Make sure the SVGPathSegWithContext derived classes handle correctly
the case when the SVGPathElement back-pointer is deleted.

Also change the SVGPathElement argument to the SVGPathSeg creation functions
and constructors to be a const reference instead of having it as a pointer
since SVGPathElement is the class factory for all these classes.

  • svg/SVGPathElement.cpp:

(WebCore::SVGPathElement::SVGPathElement):
(WebCore::SVGPathElement::createSVGPathSegClosePath):
(WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
(WebCore::SVGPathElement::createSVGPathSegMovetoRel):
(WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
(WebCore::SVGPathElement::createSVGPathSegLinetoRel):
(WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
(WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
(WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
(WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
(WebCore::SVGPathElement::createSVGPathSegArcAbs):
(WebCore::SVGPathElement::createSVGPathSegArcRel):
(WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
(WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
(WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
(WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
(WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
(WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
(WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
(WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
(WebCore::SVGPathElement::isSupportedAttribute):

  • svg/SVGPathElement.h:
  • svg/SVGPathSegArc.h:

(WebCore::SVGPathSegArc::SVGPathSegArc):

  • svg/SVGPathSegArcAbs.h:

(WebCore::SVGPathSegArcAbs::create):
(WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):

  • svg/SVGPathSegArcRel.h:

(WebCore::SVGPathSegArcRel::create):
(WebCore::SVGPathSegArcRel::SVGPathSegArcRel):

  • svg/SVGPathSegClosePath.h:

(WebCore::SVGPathSegClosePath::create):
(WebCore::SVGPathSegClosePath::SVGPathSegClosePath):

  • svg/SVGPathSegCurvetoCubic.h:

(WebCore::SVGPathSegCurvetoCubic::SVGPathSegCurvetoCubic):

  • svg/SVGPathSegCurvetoCubicAbs.h:

(WebCore::SVGPathSegCurvetoCubicAbs::create):
(WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):

  • svg/SVGPathSegCurvetoCubicRel.h:

(WebCore::SVGPathSegCurvetoCubicRel::create):
(WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):

  • svg/SVGPathSegCurvetoCubicSmooth.h:

(WebCore::SVGPathSegCurvetoCubicSmooth::SVGPathSegCurvetoCubicSmooth):

  • svg/SVGPathSegCurvetoCubicSmoothAbs.h:

(WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):

  • svg/SVGPathSegCurvetoCubicSmoothRel.h:

(WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
(WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):

  • svg/SVGPathSegCurvetoQuadratic.h:

(WebCore::SVGPathSegCurvetoQuadratic::SVGPathSegCurvetoQuadratic):

  • svg/SVGPathSegCurvetoQuadraticAbs.h:

(WebCore::SVGPathSegCurvetoQuadraticAbs::create):
(WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):

  • svg/SVGPathSegCurvetoQuadraticRel.h:

(WebCore::SVGPathSegCurvetoQuadraticRel::create):
(WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):

  • svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:

(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):

  • svg/SVGPathSegCurvetoQuadraticSmoothRel.h:

(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):

  • svg/SVGPathSegLinetoAbs.h:

(WebCore::SVGPathSegLinetoAbs::create):
(WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):

  • svg/SVGPathSegLinetoHorizontal.h:

(WebCore::SVGPathSegLinetoHorizontal::SVGPathSegLinetoHorizontal):

  • svg/SVGPathSegLinetoHorizontalAbs.h:

(WebCore::SVGPathSegLinetoHorizontalAbs::create):
(WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):

  • svg/SVGPathSegLinetoHorizontalRel.h:

(WebCore::SVGPathSegLinetoHorizontalRel::create):
(WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):

  • svg/SVGPathSegLinetoRel.h:

(WebCore::SVGPathSegLinetoRel::create):
(WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):

  • svg/SVGPathSegLinetoVertical.h:

(WebCore::SVGPathSegLinetoVertical::SVGPathSegLinetoVertical):

  • svg/SVGPathSegLinetoVerticalAbs.h:

(WebCore::SVGPathSegLinetoVerticalAbs::create):
(WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):

  • svg/SVGPathSegLinetoVerticalRel.h:

(WebCore::SVGPathSegLinetoVerticalRel::create):
(WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):

  • svg/SVGPathSegMovetoAbs.h:

(WebCore::SVGPathSegMovetoAbs::create):
(WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):

  • svg/SVGPathSegMovetoRel.h:

(WebCore::SVGPathSegMovetoRel::create):
(WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):

  • svg/SVGPathSegWithContext.h:

(WebCore::SVGPathSegWithContext::SVGPathSegWithContext):
(WebCore::SVGPathSegWithContext::animatedProperty):
(WebCore::SVGPathSegWithContext::contextElement):
(WebCore::SVGPathSegWithContext::setContextAndRole):
(WebCore::SVGPathSegWithContext::commitChange):
(WebCore::SVGPathSegSingleCoordinate::setY):
(WebCore::SVGPathSegSingleCoordinate::SVGPathSegSingleCoordinate):

  • svg/properties/SVGPathSegListPropertyTearOff.cpp:

(WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles):
(WebCore::SVGPathSegListPropertyTearOff::replaceItem):
(WebCore::SVGPathSegListPropertyTearOff::removeItem):

6:52 AM Changeset in webkit [194963] by akling@apple.com
  • 23 edits
    2 adds in trunk/Source

Source/WebCore:
Use BumpArena for style sheet object tree.
<https://webkit.org/b/152696>

Reviewed by Antti Koivisto.

Give each StyleSheetContents its own BumpArena, and plumb it down through CSSParser
to allocate StyleRule, StyleProperties and CSSSelectorList's selector arrays there.

This basically means that most objects that make up a given style sheet will end up
in one (or a few) contiguous region(s) of memory, instead of being scattered all
over the malloc heap.

In the common case (no CSSOM manipulation), the lifetimes of these objects are very
predictable: everything tends to die when the StyleSheetContents dies.
This dramatically improves space-efficiency in those cases, and allows us to return
contiguous chunks of memory to the system once a style sheet is no longer needed.

One-off CSS parses that don't work within a StyleSheetContents context will have
their StyleRules & co allocated out of the global BumpArena.

Bonus: give SelectorQueryCache a dedicated BumpArena as well, since it has very
predictable lifetime.

  • css/CSSGrammar.y.in:
  • css/CSSKeyframesRule.h:

(WebCore::StyleRuleKeyframes::create):

  • css/CSSParser.cpp:

(WebCore::CSSParser::createStyleProperties):
(WebCore::CSSParser::createMediaRule):
(WebCore::CSSParser::createSupportsRule):
(WebCore::CSSParser::createKeyframesRule):
(WebCore::CSSParser::setArena):
(WebCore::CSSParser::arena):
(WebCore::CSSParser::createStyleRule):
(WebCore::CSSParser::createFontFaceRule):
(WebCore::CSSParser::createPageRule):
(WebCore::CSSParser::createRegionRule):
(WebCore::CSSParser::createViewportRule):

  • css/CSSParser.h:
  • css/CSSParserValues.cpp:

(WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector):
(WebCore::CSSParserSelector::adoptSelectorVector):

  • css/CSSParserValues.h:
  • css/CSSSelectorList.cpp:

(WebCore::CSSSelectorList::CSSSelectorList):
(WebCore::CSSSelectorList::adoptSelectorVector):
(WebCore::CSSSelectorList::deleteSelectors):

  • css/CSSSelectorList.h:
  • css/StyleProperties.cpp:

(WebCore::ImmutableStyleProperties::create):
(WebCore::StyleProperties::immutableCopyIfNeeded):

  • css/StyleProperties.h:
  • css/StyleRule.cpp:

(WebCore::StyleRule::create):
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
(WebCore::StyleRuleRegion::StyleRuleRegion):

  • css/StyleRule.h:

(WebCore::StyleRule::create):
(WebCore::StyleRule::parserAdoptSelectorVector):
(WebCore::StyleRuleFontFace::create):
(WebCore::StyleRulePage::create):
(WebCore::StyleRulePage::parserAdoptSelectorVector):
(WebCore::StyleRuleMedia::create):
(WebCore::StyleRuleSupports::create):
(WebCore::StyleRuleRegion::create):
(WebCore::StyleRuleViewport::create):

  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::StyleSheetContents):
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
(WebCore::StyleSheetContents::parseStringAtPosition):

  • css/StyleSheetContents.h:
  • dom/SelectorQuery.cpp:

(WebCore::SelectorQueryCache::SelectorQueryCache):
(WebCore::SelectorQueryCache::add):

  • dom/SelectorQuery.h:
  • svg/SVGFontFaceElement.cpp:

(WebCore::SVGFontFaceElement::SVGFontFaceElement):

Source/WTF:
Fragmentation-free allocator for timeless and/or coupled allocations.
<https://webkit.org/b/152696>

Reviewed by Antti Koivisto.

Introduce BumpArena, a space-efficient memory allocator for situations where
you feel pretty confident betting on allocation lifetimes.

Basic design:

  • Allocates 4kB-aligned blocks of 4kB from bmalloc at a time.
  • Bump-pointer allocates out of a block until it reaches end.
  • Each allocation increments the ref-count of its block.
  • Each deallocation decrements the ref-count of its block.

Interface:

  • BumpArena::create()

Create your very own BumpArena!

  • BumpArena::allocate(BumpArena* arena, size_t size)

Allocates 'size' bytes of memory from 'arena'.
If 'arena' is null, allocation comes out of the shared global BumpArena.

  • BumpArena::deallocate(void* ptr)

Deallocates 'ptr', decrementing the ref-count of its block.

  • WTF_MAKE_BUMPARENA_ALLOCATED;

Macro that gives a class or struct custom operators new and delete
for allocation out of BumpArena. Just like WTF_MAKE_FAST_ALLOCATED;

Note that while the name of this patch says "fragmentation-free allocator"
it will only be fragmentation-free when used for appropriate things.
This is not meant to be a general-purpose allocator. Only use it for sets of
allocations that are known to die roughly at the same time.

BumpArena will never resume allocating from a block that has been filled,
so it's even more important than usual that everything gets deallocated.

As noted above, calling allocate() with a null BumpArena will allocate out
of a global shared arena. Ideally you're always allocating out of a specific,
controlled arena, but there are situations where you may not have one.

  • WTF.vcxproj/WTF.vcxproj:
  • WTF.vcxproj/WTF.vcxproj.filters:
  • WTF.xcodeproj/project.pbxproj:
  • wtf/BumpArena.cpp: Added.

(WTF::BumpArena::Block::defaultCapacity):
(WTF::BumpArena::Block::arena):
(WTF::BumpArena::Block::payloadStart):
(WTF::globalArena):
(WTF::arenas):
(WTF::BumpArena::Block::Block):
(WTF::BumpArena::Block::~Block):
(WTF::BumpArena::Block::ref):
(WTF::BumpArena::Block::deref):
(WTF::BumpArena::Block::create):
(WTF::BumpArena::Block::dump):
(WTF::BumpArena::dump):
(WTF::BumpArena::create):
(WTF::BumpArena::BumpArena):
(WTF::BumpArena::~BumpArena):
(WTF::BumpArena::allocateSlow):
(WTF::BumpArena::allocate):
(WTF::BumpArena::deallocate):
(WTF::BumpArena::Block::blockFor):
(WTF::BumpArena::arenaFor):

  • wtf/BumpArena.h: Added.
  • wtf/CMakeLists.txt:
4:30 AM Changeset in webkit [194962] by mario@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed gardening.

Patch by Mario Sanchez Prada <mario@webkit.org> on 2016-01-13

  • platform/gtk/TestExpectations: Mark three tests failing in the

GTK bots as Crash, Timeout (release builds only) and Failure.

4:29 AM WebKitGTK/Gardening/Calendar edited by mario@webkit.org
(diff)
2:32 AM Changeset in webkit [194961] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[TexMap] BitmapTextureGL is not released while scene is updated continuously.
https://bugs.webkit.org/show_bug.cgi?id=152524

Patch by YongGeol Jung <yg48.jung@samsung.com> on 2016-01-13
Reviewed by Žan Doberšek.

This patch fixes two issues.
First, m_releaseUnusedTexturesTimer is not fired if scene is updated within 0.5s continuously.
In this case, BitmapTexturePool will not remove texture even if texture is not used for long time.
Second, m_releaseUnusedTexturesTimer is triggered by acquireTexture function only.
So, if next scene does not need to use BitmapTexture, remained textures in pool will not removed.

No new tests needed.

  • platform/graphics/texmap/BitmapTexturePool.cpp:

(WebCore::BitmapTexturePool::scheduleReleaseUnusedTextures):
(WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):

1:54 AM Changeset in webkit [194960] by youenn.fablet@crf.canon.fr
  • 11 edits
    1 add in trunk/Source/WebCore

[Streams API] Refactor builtin internals to prepare support for streams API in worker
https://bugs.webkit.org/show_bug.cgi?id=152535

Reviewed by Darin Adler.

Moving the code that links internal functions to the GlobalObject in WebCoreJSBuiltinInternals.cpp.
This file should be generated by the builtin generator once refactoring is done.
This code is located in JSBuiltinInternalFunctions::initialize.

Adding private controller and reader constructors to the JS DOM constructor map so that they do not get garbage collected.

No change in behavior, except that private builtins are usable in workers (but not actually used).

  • CMakeLists.txt:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
(WebCore::JSDOMGlobalObject::addBuiltinGlobals):
(WebCore::JSDOMGlobalObject::finishCreation):
(WebCore::JSDOMGlobalObject::visitChildren):

  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::finishCreation):
(WebCore::JSDOMWindowBase::visitChildren):

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/WebCoreJSBuiltinInternals.cpp: Added.

(WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
(WebCore::JSBuiltinInternalFunctions::visit):
(WebCore::JSBuiltinInternalFunctions::initialize):

  • bindings/js/WebCoreJSBuiltinInternals.h:
12:15 AM Changeset in webkit [194959] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.11.3

WebKitGTK+ 2.11.3

12:12 AM Changeset in webkit [194958] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.11.3 release.

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.11.3.
12:01 AM Changeset in webkit [194957] by Gyuyoung Kim
  • 2 edits in trunk/Source/WebCore

[EFL] Fix wrong return value of paintThemePart in RenderThemeEfl
https://bugs.webkit.org/show_bug.cgi?id=153058

Reviewed by Carlos Garcia Campos.

To return false in paint functions in RenderThemeEfl means that it is supported though,
paintThemePart has returned false even when failing to get image cache of theme.

  • rendering/RenderThemeEfl.cpp:

(WebCore::RenderThemeEfl::paintThemePart):

Jan 12, 2016:

10:58 PM Changeset in webkit [194956] by aestes@apple.com
  • 3 edits in trunk/Source/WebCore

[Content Filtering] forEachContentFilterUntilBlocked should accept a lambda by rvalue reference
https://bugs.webkit.org/show_bug.cgi?id=153057

Reviewed by Dan Bernstein.

No new tests. No change in behavior.

Instead of having ContentFilter::forEachContentFilterUntilBlocked() take a std::function, just have it take an
rvalue reference to the lambda its passed.

  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::forEachContentFilterUntilBlocked):

  • loader/ContentFilter.h:
10:47 PM Changeset in webkit [194955] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

[GTK] Fix return value of some paint methods in RenderThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=153015

Reviewed by Michael Catanzaro.

The bool value returned by paint methods in RenderTheme means
whether the appearance is supported or not, so we should return
true when not supported (so we didn't paint anything) and false
when supported (so we actually painted the theme part).

  • rendering/RenderThemeGtk.cpp:

(WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
(WebCore::RenderThemeGtk::paintMediaButton):
(WebCore::RenderThemeGtk::paintMediaMuteButton):
(WebCore::RenderThemeGtk::paintMediaPlayButton):
(WebCore::RenderThemeGtk::paintMediaSliderTrack):
(WebCore::RenderThemeGtk::paintMediaVolumeSliderContainer): Deleted.

  • rendering/RenderThemeGtk.h:
9:55 PM Changeset in webkit [194954] by bshafiei@apple.com
  • 5 edits in trunk/Source

Versioning.

9:48 PM Changeset in webkit [194953] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.1.16

New tag.

7:23 PM Changeset in webkit [194952] by aestes@apple.com
  • 10 edits in trunk/Source/WebCore

[Content Filtering] De-virtualize PlatformContentFilter::{needsMoreData, didBlockData}()
https://bugs.webkit.org/show_bug.cgi?id=153052

Reviewed by Andreas Kling.

No new tests. No change in behavior.

Instead of having virtual functions that each platform content filter implement in terms of their own state,
store the state in the base class so that these functions can be non-virtual. Teach each subclass to update the
base class state appropriately.

  • loader/ContentFilter.h:
  • platform/PlatformContentFilter.h:

(WebCore::PlatformContentFilter::needsMoreData):
(WebCore::PlatformContentFilter::didBlockData):

  • platform/cocoa/NetworkExtensionContentFilter.h:
  • platform/cocoa/NetworkExtensionContentFilter.mm:

(WebCore::NetworkExtensionContentFilter::willSendRequest):
(WebCore::NetworkExtensionContentFilter::responseReceived):
(WebCore::NetworkExtensionContentFilter::handleDecision):
(WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Deleted.
(WebCore::NetworkExtensionContentFilter::needsMoreData): Deleted.
(WebCore::NetworkExtensionContentFilter::didBlockData): Deleted.

  • platform/cocoa/ParentalControlsContentFilter.h:
  • platform/cocoa/ParentalControlsContentFilter.mm:

(WebCore::ParentalControlsContentFilter::responseReceived):
(WebCore::ParentalControlsContentFilter::updateFilterState):
(WebCore::ParentalControlsContentFilter::ParentalControlsContentFilter): Deleted.
(WebCore::ParentalControlsContentFilter::needsMoreData): Deleted.
(WebCore::ParentalControlsContentFilter::didBlockData): Deleted.

  • platform/spi/cocoa/NEFilterSourceSPI.h:
  • testing/MockContentFilter.cpp:

(WebCore::MockContentFilter::willSendRequest):
(WebCore::MockContentFilter::maybeDetermineStatus):
(WebCore::MockContentFilter::needsMoreData): Deleted.
(WebCore::MockContentFilter::didBlockData): Deleted.

  • testing/MockContentFilter.h:
6:09 PM Changeset in webkit [194951] by aestes@apple.com
  • 2 edits in trunk/Source/WebCore

Address missed review feedback after r194950.

  • platform/cocoa/NetworkExtensionContentFilter.mm:

(WebCore::NetworkExtensionContentFilter::initialize): Renamed the NetworkExtension dispatch queue.

6:07 PM Changeset in webkit [194950] by aestes@apple.com
  • 22 edits
    1 copy
    1 add in trunk

[Content Filtering] Lazily load platform frameworks
https://bugs.webkit.org/show_bug.cgi?id=152881
rdar://problem/23270886

Reviewed by Brady Eidson.

Source/WebCore:

On Cocoa platforms, ContentFilter soft-links two frameworks that perform the underlying filtering operations.
There is a one-time cost associated with the soft-linking, and the current design requires all clients to pay
this cost whether or not they ever load a resource that is subject to filtering.

Addressed this by deferring the loading of frameworks until it is known that a resource will require filtering.
It is rather simple to defer the soft-linking at the PlatformContentFilter level, but doing this alone would
mean that every CachedRawResourceClient callback would be routed through ContentFilter, even in the very common
case where both platform content filters are disabled. This is because checking if a platform content filter is
enabled involves loading its framework, so creating a ContentFilter (which DocumentLoader will add as the
CachedRawResource client in place of itself) cannot be avoided by checking that all its platform content filters
are disabled.

Resolved this by inverting the relationship between ContentFilter and DocumentLoader. Instead of ContentFilter
being the CachedRawResource's client and forwarding callbacks to DocumentLoader when one or more platform
filters are enabled, DocumentLoader is now always the client and it forwards callbacks to ContentFilter.
ContentFilter then returns a boolean value indicating whether or not DocumentLoader should proceed with each
callback.

New API test: ContentFiltering.LazilyLoadPlatformFrameworks

  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::create): Renamed from createIfEnabled(). Since the enabled check causes frameworks to
be loaded, the check is skipped here and all types are always created.
(WebCore::ContentFilter::continueAfterWillSendRequest): Renamed from willSendRequest(). Renamed requestCopy to
originalRequest, and only created it for logging purposes. Since the copy was only used for logging purposes,
request is now modified directly. Returned false if request is null.
(WebCore::ContentFilter::continueAfterResponseReceived): Renamed from responseReceived(). Stopped asserting that
resource is non-null, since it will be null in the case of substitute data loads. Stopped asserting that m_state
is not Initialized, since that state was removed and the function can now be called in all states. Only logged
if m_state is Filtering. Returned false if m_state is Blocked.
(WebCore::ContentFilter::continueAfterDataReceived): Renamed from dataReceived(). Stopped asserting that
resource is non-null and that m_state is Initialized, and moved the logging, for the same reasons as above.
Returned false if m_state is Filtering or Blocked.
(WebCore::ContentFilter::continueAfterNotifyFinished): Renamed from notifyFinished(). Stopped asserting that
resource is non-null and that m_state is not Initialized, and moved the logging, for the same reasons as above.
If m_state is not Blocked at this point, set m_state to Allowed in order for deliverResourceData() to not get
caught in continueAfterDataReceived(). Returned false if m_state is Blocked or Stopped after delivering data.
(WebCore::ContentFilter::createIfEnabled): Renamed to create().
(WebCore::ContentFilter::~ContentFilter): Stopped removing ourself as m_mainResource's client.
(WebCore::ContentFilter::willSendRequest): Renamed to continueAfterWillSendRequest().
(WebCore::ContentFilter::startFilteringMainResource): Stopped adding ourself as m_mainResource's client. Stopped
asserting that m_state is not Initialized and instead returned early if m_state is not Stopped.
(WebCore::ContentFilter::stopFilteringMainResource): Stopped removing ourself as m_mainResource's client.
(WebCore::ContentFilter::responseReceived): Renamed to continueAfterResponseReceived().
(WebCore::ContentFilter::dataReceived): Renamed to continueAfterDataReceived().
(WebCore::ContentFilter::redirectReceived): Removed. DocumentLoader now calls continueAfterWillSendRequest()
directly on redirects.
(WebCore::ContentFilter::notifyFinished): Renamed to continueAfterNotifyFinished().
(WebCore::ContentFilter::didDecide): Instead of calling DocumentLoader::contentFilterDidDecide(), called
DocumentLoader::contentFilterDidBlock() when m_state is Blocked.
(WebCore::ContentFilter::deliverResourceData): Asserted that m_state is Allowed.

  • loader/ContentFilter.h: Stopped inheriting from CachedRawResourceClient. Redeclared the

CachedRawResourceClient virtual functions as the continue* functions mentioned above. Made State enum private
and removed Initialized. Initialized m_state to Stopped and removed its getter.
(WebCore::ContentFilter::type): Returned a ContentFilter::Type that does not include an enabled function.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::notifyFinished): Returned early if ContentFilter::continueAfterNotifyFinished()
returned false.
(WebCore::DocumentLoader::willSendRequest): Called ContentFilter::continueAfterWillSendRequest() even for
redirects, since ContentFilter is no longer a CachedRawResourceClient and so will no longer receive
redirectReceived(). Returned early if continueAfterWillSendRequest() returns false.
(WebCore::DocumentLoader::responseReceived): Returned early if ContentFilter::continueAfterResponseReceived()
returned false.
(WebCore::DocumentLoader::dataReceived): Ditto for ContentFilter::continueAfterDataReceived().
(WebCore::DocumentLoader::startLoadingMainResource): Called ContentFilter::create(), not createIfEnabled().
(WebCore::DocumentLoader::becomeMainResourceClient): Called ContentFilter::startFilteringMainResource() even if
m_state is not Initialized. Added ourself as a client of m_mainResource unconditionally.
(WebCore::DocumentLoader::contentFilterDidBlock): Renamed from contentFilterDidDecide. Removed assertions and
the early return when m_state is Allowed, since the state is guaranteed to be Blocked.
(WebCore::DocumentLoader::contentFilterDidDecide): Renamed to contentFilterDidBlock.

  • platform/cocoa/NetworkExtensionContentFilter.h: Moved definition of HAVE_NETWORK_EXTENSION to Platform.h so

that this file doesn't need to become a Private header. Made enabled() private, and declared initialize().

  • platform/cocoa/NetworkExtensionContentFilter.mm:

(WebCore::NetworkExtensionContentFilter::initialize): Added a function to lazily initialize the object.
(WebCore::NetworkExtensionContentFilter::willSendRequest): For the modern NEFilterSource, checked if it is
enabled only after checking if the request is HTTP(S). If both checks pass, then called initialize().
(WebCore::NetworkExtensionContentFilter::responseReceived): Ditto for the legacy NEFilterSource.

  • platform/cocoa/ParentalControlsContentFilter.h: Made enabled() private.
  • platform/cocoa/ParentalControlsContentFilter.mm:

(WebCore::ParentalControlsContentFilter::responseReceived): Checked if WebFilterEvaluator is enabled only after
checking if the response is from a protocol that can be handled.

  • testing/MockContentFilter.cpp:

(WebCore::MockContentFilter::willSendRequest): Immediately set m_status to Status::Allowed if !enabled().

  • testing/MockContentFilter.h: Made enabled() private.

Source/WTF:

  • wtf/Platform.h: Moved definition of HAVE_NETWORK_EXTENSION to here from WebCore/platform/cocoa/NetworkExtensionContentFilter.h.

Tools:

Added an API test that verifies that the Parental Controls and Network Extension frameworks are loaded at the
expected times. The test verifies that they are not loaded after creating a WKWebView, loading an HTML string,
loading NSData, loading a file, or loading from a custom protocol. It verifies that Network Extension on Mac/iOS
and Parental Controls on iOS are loaded after an HTTP request. It finally verifies that Parental Controls on Mac
is loaded after an HTTPS request.

To accomplish this, TestProtocol was generalized to allow tests to specify the scheme they wish to use.
Other tests that used TestProtocol were updated to account for this change. TestProtocol was removed from
WebKit2.PreventImageLoadWithAutoResizingTest, which didn't actually need to use it. ContentFiltering tests were
also re-enabled on iOS after mistakenly being disabled by r188892.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.h: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.html: Added.
  • TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm:

(TEST):
(downloadTest):
(-[LazilyLoadPlatformFrameworksController init]):
(-[LazilyLoadPlatformFrameworksController webView]):
(-[LazilyLoadPlatformFrameworksController expectParentalControlsLoaded:networkExtensionLoaded:]):
(-[LazilyLoadPlatformFrameworksController webView:didFinishNavigation:]):

  • TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm:

(-[ContentFilteringPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[ContentFilteringPlugIn observeValueForKeyPath:ofObject:change:context:]):
(-[ContentFilteringPlugIn checkIfPlatformFrameworksAreLoaded:]):

  • TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing.mm:

(TestWebKitAPI::TEST): Deleted.

  • TestWebKitAPI/cocoa/TestProtocol.h:
  • TestWebKitAPI/cocoa/TestProtocol.mm:

(+[TestProtocol registerWithScheme:]):
(+[TestProtocol unregister]):

5:41 PM Changeset in webkit [194949] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601-branch/Source/ThirdParty/ANGLE

Merge r194780. rdar://problem/24043054

5:41 PM Changeset in webkit [194948] by matthew_hanson@apple.com
  • 4 edits in branches/safari-601-branch/Source/WebCore

Merge r194751. rdar://problem/24043054

5:41 PM Changeset in webkit [194947] by matthew_hanson@apple.com
  • 3 edits in branches/safari-601-branch/Source/WebCore

Merge r194745. rdar://problem/24101258

5:41 PM Changeset in webkit [194946] by matthew_hanson@apple.com
  • 6 edits
    3 adds in branches/safari-601-branch

Merge r194704. rdar://problem/24043057

5:41 PM Changeset in webkit [194945] by matthew_hanson@apple.com
  • 5 edits
    2 adds in branches/safari-601-branch

Merge r194910. rdar://problem/24101255

5:41 PM Changeset in webkit [194944] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601-branch/Source/WebInspectorUI

Merge r194602. rdar://problem/24101260

5:41 PM Changeset in webkit [194943] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601-branch/Source/WebCore

Merge r194589. rdar://problem/24101250

5:41 PM Changeset in webkit [194942] by matthew_hanson@apple.com
  • 7 edits
    2 adds in branches/safari-601-branch

Merge r194083. rdar://problem/24101257

5:41 PM Changeset in webkit [194941] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601-branch/Source/WebInspectorUI

Merge r194066. rdar://problem/24101252

5:41 PM Changeset in webkit [194940] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601-branch/Source/WebInspectorUI

Merge r194009. rdar://problem/24101259

5:41 PM Changeset in webkit [194939] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601-branch/Source/WebInspectorUI

Merge r193858. rdar://problem/24101282

5:41 PM Changeset in webkit [194938] by matthew_hanson@apple.com
  • 20 edits
    2 copies
    4 adds
    2 deletes in branches/safari-601-branch

Merge r194908. rdar://problem/24101253

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

Changing expectation from flaky to skip for two crashing tests.
https://bugs.webkit.org/show_bug.cgi?id=152279

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
5:14 PM Changeset in webkit [194936] by Matt Baker
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Timeline recording controls should use NavigationBar
https://bugs.webkit.org/show_bug.cgi?id=152997

Reviewed by Brian Burg.

NavigtaionBar should always be preferred over manually editing the DOM.
Reusing existing button types for the record button and status element lets us
eliminate a bunch of CSS, and will make future changes to the Timelines UI
(such as adding addition recording controls), easier to implement.

  • Localizations/en.lproj/localizedStrings.js:

New tooltip strings.

  • UserInterface/Views/TimelineSidebarPanel.css:

(.sidebar > .panel.navigation.timeline > .navigation-bar > .item.record-start-stop):
(.sidebar > .panel.navigation.timeline > .navigation-bar > .item.record-start-stop:hover):
(.sidebar > .panel.navigation.timeline > .navigation-bar > .item.record-start-stop:active):
Replaced similar styles used for the record glyph.
(.sidebar > .panel.navigation.timeline > .navigation-bar > .item.record-start-stop *):
Prevent multiple mouseover/mouseout events while hovering the navigation item.
(.sidebar > .panel.navigation.timeline > .navigation-bar > .item.flexible-space):
Replaced similar styles used for the record status element.
(.sidebar > .panel.navigation.timeline > .status-bar): Deleted.
(body.window-inactive .sidebar > .panel.navigation.timeline > .status-bar): Deleted.
(.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph): Deleted.
(.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph:hover): Deleted.
(.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph:active): Deleted.
(.sidebar > .panel.navigation.timeline > .status-bar > .record-glyph.recording): Deleted.
(.sidebar > .panel.navigation.timeline > .status-bar > .record-status): Deleted.
(.panel.timeline .navigation-bar.timelines-view): Deleted.
No longer used.

  • UserInterface/Views/TimelineSidebarPanel.js:

Removed unused CSS static variables.
(WebInspector.TimelineSidebarPanel):
Create navigation bar, remove status bar DOM elements. Create keyboard shortcut
before the record button, so the shortcut's display name can be used in tooltips.
(WebInspector.TimelineSidebarPanel.prototype._capturingStartedOrStopped):
Update record button state and flexible space (status) text.
(WebInspector.TimelineSidebarPanel.prototype._recordButtonClicked):
Toggle recording state, and update record button state and flexible space (status) text.
(WebInspector.TimelineSidebarPanel.prototype._recordButtonMousedOver):
(WebInspector.TimelineSidebarPanel.prototype._recordButtonMousedOut):
Update flexible space (status) text.
(WebInspector.TimelineSidebarPanel.prototype._updateRecordButton):
(WebInspector.TimelineSidebarPanel.prototype._updateReplayInterfaceVisibility):
(WebInspector.TimelineSidebarPanel.prototype._toggleRecording): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._capturingStarted): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._capturingStopped): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._recordGlyphMousedOver): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._recordGlyphMousedOut): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._recordGlyphClicked): Deleted.
No longer used.

5:05 PM Changeset in webkit [194935] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

buildbot syncing scripts sometimes schedule more than one requests per builder
https://bugs.webkit.org/show_bug.cgi?id=153047

Reviewed by Chris Dumez.

The bug was caused by the check for singularity of scheduledRequests being conducted per configuration
instead of per builder. So if there were multiple test configurations (e.g. Speedometer and Octane) that
both used the same builder, then we may end up scheduling both at once.

Fixed the bug by sharing a single set to keep track of the scheduled requests for all configurations per
builder.

  • tools/sync-with-buildbot.py:

(load_config): Share a set amongst test configurations for each builder.
(find_request_updates): Instead of creating a new set for each configuration, reuse the existing sets to
share a single set agmonst test configurations for each builder.

4:32 PM Changeset in webkit [194934] by commit-queue@webkit.org
  • 5 edits
    2 deletes in trunk

Unreviewed, rolling out r194926 and r194928.
https://bugs.webkit.org/show_bug.cgi?id=153048

This change is causing LayoutTest crashes (Requested by
ryanhaddad on #webkit).

Reverted changesets:

"Avoid downloading the wrong image for <picture> elements."
https://bugs.webkit.org/show_bug.cgi?id=153027
http://trac.webkit.org/changeset/194926

"Avoid downloading the wrong image for <picture> elements."
https://bugs.webkit.org/show_bug.cgi?id=153027
http://trac.webkit.org/changeset/194928

4:10 PM Changeset in webkit [194933] by dino@apple.com
  • 5 edits
    2 adds in trunk

[iOS] Antialiasing doesn't work in WebGL
https://bugs.webkit.org/show_bug.cgi?id=153000
<rdar://problem/9165531>

Reviewed by Alex Christensen.

Source/WebCore:

WebGL has supported platform antialiasing since
the beginning, but we never hooked it up for iOS
because it used a slightly different extension.

Test: fast/canvas/webgl/antialiasing-enabled.html

  • platform/graphics/mac/GraphicsContext3DMac.mm:

(WebCore::GraphicsContext3D::endPaint): Resolve the multisampling
buffer once we're done painting.
(WebCore::GraphicsContext3D::~GraphicsContext3D): We never created
the m_compositorTexture RenderBuffer on iOS, so no point deleting
it.

  • platform/graphics/opengl/Extensions3DOpenGL.cpp:

(WebCore::Extensions3DOpenGL::supportsExtension): The iOS extension
has a slightly different name.

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::reshapeFBOs): Make sure to create the
multisample buffer with the correct format.
(WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary): We
need to remember what our bound frame buffer is when we
enter this call, and restore it afterwards. In the middle we can
discard our multisample read buffer once we have resolved it
into the normal framebuffer.

LayoutTests:

New test to check if WebGL antialiasing happened on a rendered canvas.

  • fast/canvas/webgl/antialiasing-enabled-expected.txt: Added.
  • fast/canvas/webgl/antialiasing-enabled.html: Added.
4:04 PM Changeset in webkit [194932] by Matt Baker
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Move helper methods for getting icons/text to TimelineTabContentView
https://bugs.webkit.org/show_bug.cgi?id=152996

Reviewed by Brian Burg.

In preparation for the Timelines UI redesign, helper methods which existed
in the sidebar panel and timeline tree elements need to be relocated,
since the sidebar won't exist in the new UI.

  • UserInterface/Views/TimelineRecordTreeElement.js:

(WebInspector.TimelineRecordTreeElement):
Removed icon/title code, replaced with calls to new helper methods.
Code to create the alternate subtitle was broken out form the rest
of the icon/title code, and kept in the constructor.

  • UserInterface/Views/TimelineRecordingContentView.js:

(WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
Updated calls to helper methods.

  • UserInterface/Views/TimelineSidebarPanel.js:

(WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
(WebInspector.TimelineSidebarPanel.displayNameForTimeline): Deleted.
(WebInspector.TimelineSidebarPanel.iconClassNameForTimeline): Deleted.
Moved to TimelineTabContentView.

  • UserInterface/Views/TimelineTabContentView.js:

(WebInspector.TimelineTabContentView.displayNameForTimeline):
(WebInspector.TimelineTabContentView.iconClassNameForTimeline):
Relocated from TimelineSidebarPanel.
(WebInspector.TimelineTabContentView.iconClassNameForRecord):
(WebInspector.TimelineTabContentView.displayNameForRecord):
New helper methods. Previously part of TimelineRecordTreeElement.

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

Skipped more tests related to picture element on ios-simulator and grouped them together in TestExpectations file.

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
3:51 PM Changeset in webkit [194930] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skipping crashing test fast/picture/image-picture-loads-1x.html on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=153043

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
2:48 PM Changeset in webkit [194929] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

Analysis results viewer sometimes doesn't show the correct relative difference
https://bugs.webkit.org/show_bug.cgi?id=152930

Reviewed by Chris Dumez.

The bug was caused by single A/B testing result associated with multiple rows when there are multiple data
points with the same root set which matches that of an A/B testing.

Fixed the bug by detecting such a case, and only associating each A/B testing result with the row created
for the first matching point.

  • public/v3/components/analysis-results-viewer.js:

(AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups):

2:29 PM Changeset in webkit [194928] by hyatt@apple.com
  • 1 edit
    2 adds in trunk/LayoutTests

Avoid downloading the wrong image for <picture> elements.
https://bugs.webkit.org/show_bug.cgi?id=153027

Reviewed by Dean Jackson.

  • fast/picture/image-picture-loads-1x-expected.txt: Added.
  • fast/picture/image-picture-loads-1x.html: Added.
2:28 PM Changeset in webkit [194927] by dbates@webkit.org
  • 27 edits
    2 adds in trunk

XSS Auditor should navigate to empty substitute data on full page block
https://bugs.webkit.org/show_bug.cgi?id=152868
<rdar://problem/18658448>

Reviewed by David Kilzer and Andy Estes.

Derived from Blink patch (by Tom Sepez <tsepez@chromium.org>):
<https://src.chromium.org/viewvc/blink?view=rev&revision=179240>

Source/WebCore:

Test: http/tests/security/xssAuditor/block-does-not-leak-that-page-was-blocked-using-empty-data-url.html

  • html/parser/XSSAuditorDelegate.cpp:

(WebCore::XSSAuditorDelegate::didBlockScript): Modified to call NavigationScheduler::schedulePageBlock().

  • loader/NavigationScheduler.cpp:

(WebCore::ScheduledPageBlock::ScheduledPageBlock): Added.
(WebCore::NavigationScheduler::schedulePageBlock): Navigate to empty substitute data with
the same URL as the originating document.

  • loader/NavigationScheduler.h:

LayoutTests:

Added additional test block-does-not-leak-that-page-was-blocked-using-empty-data-url.html to explicitly
tests that we do redirect to an empty data URL when a full page block is triggered.

  • http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-allow-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-allow-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-filter-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-invalid-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-block-unset-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-filter-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-invalid-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/reflected-xss-and-xss-protection-unset-block-expected.txt:
  • http/tests/security/xssAuditor/block-does-not-leak-location-expected.txt:
  • http/tests/security/xssAuditor/block-does-not-leak-referrer-expected.txt:
  • http/tests/security/xssAuditor/block-does-not-leak-that-page-was-blocked-using-empty-data-url-expected.txt: Added.
  • http/tests/security/xssAuditor/block-does-not-leak-that-page-was-blocked-using-empty-data-url.html: Added.
  • http/tests/security/xssAuditor/full-block-base-href-expected.txt:
  • http/tests/security/xssAuditor/full-block-iframe-javascript-url-expected.txt:
  • http/tests/security/xssAuditor/full-block-javascript-link-expected.txt:
  • http/tests/security/xssAuditor/full-block-link-onclick-expected.txt:
  • http/tests/security/xssAuditor/full-block-object-tag-expected.txt:
  • http/tests/security/xssAuditor/full-block-script-tag-cross-domain-expected.txt:
  • http/tests/security/xssAuditor/full-block-script-tag-expected.txt:
  • http/tests/security/xssAuditor/full-block-script-tag-with-source-expected.txt:
  • http/tests/security/xssAuditor/full-block-script-tag.html:
  • http/tests/security/xssAuditor/xss-protection-parsing-03-expected.txt:
  • http/tests/security/xssAuditor/xss-protection-parsing-04-expected.txt:
2:18 PM Changeset in webkit [194926] by hyatt@apple.com
  • 4 edits in trunk/Source/WebCore

Avoid downloading the wrong image for <picture> elements.
https://bugs.webkit.org/show_bug.cgi?id=153027

Reviewed by Dean Jackson.

I was unable to write a reliable test for this feature (I welcome suggestions regarding
how this could be tested).

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::~HTMLImageElement):
(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
(WebCore::HTMLImageElement::pictureNode):
(WebCore::HTMLImageElement::setPictureNode):

  • html/HTMLImageElement.h:
  • html/parser/HTMLConstructionSite.cpp:

(WebCore::HTMLConstructionSite::createHTMLElement):

Images that are built underneath a <picture> element are now connected
to that picture element via a setPictureNode call from the parser. This
ensures that the correct <source> elements are examined before checking the image.

This connection between images and their picture owners is handled using a static
HashMap in HTMLImageElement. This connection is made both from the parser and from
DOM insertions, and the map is queried now instead of looking directly at the
image's parentNode().

Also note the change to pass the document element's computed style in for media
query evaluation. Just as with the preload scanner, the image's style can't be
used as it has not been determined yet.

2:06 PM Changeset in webkit [194925] by ggaren@apple.com
  • 2 edits in trunk/Source/WebKit2

WebPageProxy should reattach to the web process before navigating
https://bugs.webkit.org/show_bug.cgi?id=153026

Reviewed by Anders Carlsson.

This fixes a crash (and lots of other corruption) when force-quitting
the web process during navigation.

Some objects (like ViewGestureController) use one-time initialization
to point to a ChildProcessProxy -- and, by design, we destroy them when
the ChildProcessProxy becomes invalid (i.e., crashes or quits).

If we navigate *before* creating a new, valid ChildProcessProxy, then
we accidentally re-create these objects pointing to the old, invalid
ChildProcessProxy.

We need to wait until we have a valid ChildProcessProxy before we
initialize these objects.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::reattachToWebProcessWithItem): Navigate after
reattaching to the web process so that lazily allocated helper objects
point to the right ChildProcessProxy.

1:53 PM Changeset in webkit [194924] by Dewei Zhu
  • 2 edits in trunk/Tools

Fix the Sunpider converage in slow device.
https://bugs.webkit.org/show_bug.cgi?id=152938
<rdar://problem/22511411>

Reviewed by Ryosuke Niwa.

Updated the patch for RunBenchmark to resume sunspider coverage by removing unused subresources in sub-tests.

  • Scripts/webkitpy/benchmark_runner/data/patches/SunSpider.patch:
1:36 PM Changeset in webkit [194923] by mmaxfield@apple.com
  • 12 edits in trunk/Source/WebCore

Cleanup in font loading code
https://bugs.webkit.org/show_bug.cgi?id=153023

Reviewed by Zalan Bujtas.

See detailed notes below.

No new tests because there is no behavior change.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::isLoaded): Deleted. Never called.

  • css/CSSFontFace.h: Ditto.
  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::font): No need to use a helper
isLoaded() function.
(WebCore::CSSFontFaceSource::isLoaded): Deleted. Unnecessary.

  • css/CSSFontFaceSource.h:
  • css/CSSFontFaceSrcValue.cpp:

(WebCore::CSSFontFaceSrcValue::cachedFont): Un-indent code.

  • css/CSSFontSelector.cpp:

(WebCore::registerLocalFontFacesForFamily): constructFamilyFontFaces()
always returns an empty Vector. Therefore, the function of this function
is to perform the ancillary processing related to the case where the Faces
don't already exist. Renames the function and removes the empty vector
return.
(WebCore::CSSFontSelector::addFontFaceRule): Update for
registerLocalFontFacesForFamily().
(WebCore::FontFaceComparator::FontFaceComparator): Instead of using a static,
construct a wrapper class around the comparator.
(WebCore::FontFaceComparator::operator()): Ditto.
(WebCore::CSSFontSelector::getFontFace): Un-indent code and update to use
FontFaceComparator.
(WebCore::CSSFontSelector::fallbackFontAt): Migrate off PassRefPtr.
(WebCore::constructFamilyFontFaces): Deleted.
(WebCore::compareFontFaces): Deleted.
(WebCore::CSSFontSelector::resolvesFamilyFor): Deleted. Never called.

  • css/CSSFontSelector.h:
  • css/CSSSegmentedFontFace.cpp:

(WebCore::CSSSegmentedFontFace::isValid): Deleted.
(WebCore::CSSSegmentedFontFace::fontRanges): Cache negative validity results.

  • css/CSSSegmentedFontFace.h:
  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::fontSelector): Use nullptr.

  • platform/graphics/FontSelector.h:
1:34 PM Changeset in webkit [194922] by peavo@outlook.com
  • 2 edits in trunk/Source/JavaScriptCore

[FTL][Win64] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=153031

Reviewed by Brent Fulgham.

The header file dlfcn.h does not exist on Windows.

  • ftl/FTLLowerDFGToLLVM.cpp:
1:25 PM Changeset in webkit [194921] by rniwa@webkit.org
  • 16 edits in trunk

Add a build flag for custom element
https://bugs.webkit.org/show_bug.cgi?id=153005

Reviewed by Alex Christensen.

.:

  • Source/cmake/OptionsEfl.cmake:
  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Added a build flag for enabling custom elements.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

Added --custom-elements option to enable custom elements support.

  • Scripts/webkitperl/FeatureList.pm:
12:52 PM Changeset in webkit [194920] by BJ Burg
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: fix some common misspellings in localized strings
https://bugs.webkit.org/show_bug.cgi?id=153030
<rdar://problem/24153340>

Reviewed by Joseph Pecoraro.

Replace 'occured', 'transfered' with 'occurred' and 'transferred'.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/DatabaseTableContentView.js:

(WebInspector.DatabaseTableContentView.prototype._queryError):

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):

  • UserInterface/Views/NetworkTimelineView.js:

(WebInspector.NetworkTimelineView):

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WebInspector.ResourceDetailsSidebarPanel):

12:28 PM Changeset in webkit [194919] by jiewen_tan@apple.com
  • 1 edit
    2 adds in trunk/LayoutTests

Null dereference loading Blink layout test fast/frames/navigation-in-pagehide.html
https://bugs.webkit.org/show_bug.cgi?id=149303
<rdar://problem/22747634>

Reviewed by Brent Fulgham.

  • imported/blink/fast/frames/navigation-in-pagehide-expected.txt: Added.
  • imported/blink/fast/frames/navigation-in-pagehide.html: Added.
12:20 PM Changeset in webkit [194918] by adam.bergkvist@ericsson.com
  • 6 edits
    2 adds in trunk

WebRTC: Update RTCPeerConnection.add/removeTrack() and add test
https://bugs.webkit.org/show_bug.cgi?id=153010

Reviewed by Eric Carlson.

Source/WebCore:

RTCPeerConnection.add/removeTrack() are not fully spec compliant yet, since that would
require support for RTCRtpTransceiver which is a new work-in-progress feature. Use
Vector, instead of map, for senders and receivers since nothing is removed from these
sets anymore.

Test: fast/mediastream/RTCPeerConnection-add-removeTrack.html

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::addTrack):
(WebCore::RTCPeerConnection::removeTrack):
(WebCore::RTCPeerConnection::queuedCreateOffer): Deleted.

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::RTCRtpSender):

  • Modules/mediastream/RTCRtpSender.h:

(WebCore::RTCRtpSender::create):
(WebCore::RTCRtpSender::mediaStreamIds):

LayoutTests:

Add test for RTCPeerConnection.add/removeTrack() (currently not covered by other tests).
This test also covers some of the functionality of RTCRtpSender.

  • fast/mediastream/RTCPeerConnection-add-removeTrack-expected.txt: Added.
  • fast/mediastream/RTCPeerConnection-add-removeTrack.html: Added.
12:16 PM Changeset in webkit [194917] by jiewen_tan@apple.com
  • 2 edits
    2 adds in trunk/LayoutTests

Null dereference loading Blink layout test editing/selection/selectstart-event-crash.html
https://bugs.webkit.org/show_bug.cgi?id=150210
<rdar://problem/23137259>

Reviewed by Brent Fulgham.

  • imported/blink/editing/selection/selectstart-event-crash-expected.txt: Added.
  • imported/blink/editing/selection/selectstart-event-crash.html: Added.
  • platform/ios-simulator-wk2/TestExpectations:
12:11 PM Changeset in webkit [194916] by jiewen_tan@apple.com
  • 1 edit
    2 adds in trunk/LayoutTests

Null dereference loading Blink layout test editing/apply-inline-style-to-element-with-no-renderer-crash.html
https://bugs.webkit.org/show_bug.cgi?id=149287
<rdar://problem/22746217>

Reviewed by Brent Fulgham.

  • imported/blink/editing/apply-inline-style-to-element-with-no-renderer-crash-expected.txt: Added.
  • imported/blink/editing/apply-inline-style-to-element-with-no-renderer-crash.html: Added.
12:05 PM Changeset in webkit [194915] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Remove some invalid immediate instruction forms from ARM64 Air
https://bugs.webkit.org/show_bug.cgi?id=153024

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-01-12
Reviewed by Michael Saboff.

  • b3/B3BasicBlock.h:

Export the symbols for testb3.

  • b3/air/AirOpcode.opcodes:

We had 2 invalid opcodes:
-Compare with immediate just does not exist.
-Test64 with immediate exists but Air does not recognize

the valid form of bit-immediates.

  • b3/testb3.cpp:

(JSC::B3::genericTestCompare):
(JSC::B3::testCompareImpl):
Extend the tests to cover what was invalid.

11:31 AM Changeset in webkit [194914] by matthew_hanson@apple.com
  • 2 edits in branches/safari-601.1.46-branch/Source/ThirdParty/ANGLE

Merge r194780. rdar://problem/24042915

11:31 AM Changeset in webkit [194913] by matthew_hanson@apple.com
  • 4 edits in branches/safari-601.1.46-branch/Source/WebCore

Merge r194751. rdar://problem/24042915

11:31 AM Changeset in webkit [194912] by matthew_hanson@apple.com
  • 5 edits in branches/safari-601.1.46-branch/Source

Merge r194750. rdar://problem/24074335

11:31 AM Changeset in webkit [194911] by matthew_hanson@apple.com
  • 8 edits in branches/safari-601.1.46-branch

Merge r194667. rdar://problem/24074334

11:31 AM Changeset in webkit [194910] by matthew_hanson@apple.com
  • 5 edits
    2 adds in branches/safari-601.1.46-branch

Merge r194666. rdar://problem/24101185

11:31 AM Changeset in webkit [194909] by matthew_hanson@apple.com
  • 3 edits
    12 adds in branches/safari-601.1.46-branch

Merge r194038. rdar://problem/24101170

11:31 AM Changeset in webkit [194908] by matthew_hanson@apple.com
  • 20 edits
    2 copies
    4 adds
    2 deletes in branches/safari-601.1.46-branch

Merge r192186. rdar://problem/24101174

11:27 AM Changeset in webkit [194907] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore/platform/gtk/po

[l10n] Updated French translation for WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=153013

Patch by Sam Friedmann <sfriedma@redhat.com> on 2016-01-12
Rubber-stamped by Michael Catanzaro.

  • fr.po:
11:27 AM Changeset in webkit [194906] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Fix DataGrid row disclosure appearance and behavior
https://bugs.webkit.org/show_bug.cgi?id=152991

Reviewed by Brian Burg.

  • UserInterface/Views/DataGrid.css:

(.data-grid tr.parent td.disclosure::before):
Ensure triangle is vertically aligned for any row height.
(.data-grid tr:not(.parent) td.disclosure):
Fix indent size.

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGridNode.prototype.createCell):
Added icon column property, encapsulate icon element creation.
(WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle):
Fix hit test logic by computing left padding.

11:17 AM Changeset in webkit [194905] by beidson@apple.com
  • 3 edits
    2 adds in trunk/Source/WebCore

Modern IDB: Check in empty SQLite backing store implementation.
https://bugs.webkit.org/show_bug.cgi?id=153022

Reviewed by Alex Christensen.

No new tests (No change in behavior).

Just to get the implementation files in the tree, this backing store currently does nothing
other than return errors for every operation.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: Added.

(WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
(WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
(WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h: Added.
11:17 AM Changeset in webkit [194904] by beidson@apple.com
  • 13 edits in trunk

Modern IDB: storage/indexeddb/dont-wedge.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=152892

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Reenabled existing test).

  • Modules/indexeddb/client/IDBConnectionToServer.cpp:

(WebCore::IDBClient::IDBConnectionToServer::abortOpenAndUpgradeNeeded):

  • Modules/indexeddb/client/IDBConnectionToServer.h:
  • Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
  • Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:

(WebCore::IDBClient::IDBOpenDBRequest::requestCompleted): If the database was opened

or an upgrade transaction was started, but the script execution context is already
stopped, immediately message back to the server so it doesn't wedge.

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::abortOpenAndUpgradeNeeded):

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

(WebCore::IDBServer::UniqueIDBDatabaseTransaction::abortWithoutCallback):

  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
  • Modules/indexeddb/shared/InProcessIDBServer.cpp:

(WebCore::InProcessIDBServer::abortOpenAndUpgradeNeeded):

  • Modules/indexeddb/shared/InProcessIDBServer.h:

LayoutTests:

  • platform/mac-wk1/TestExpectations:
11:16 AM Changeset in webkit [194903] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION (r194879) - Opening views without being previously opened causes an Uncaught Exception
https://bugs.webkit.org/show_bug.cgi?id=153006

Patch by Devin Rousso <Devin Rousso> on 2016-01-12
Reviewed by Brian Burg.

  • UserInterface/Views/MultipleScopeBarItem.js:

(WebInspector.MultipleScopeBarItem.prototype.displaySelectedItem):
If there is no selected item, default to the first item in the list.

10:48 AM Changeset in webkit [194902] by achristensen@apple.com
  • 15 edits
    1 delete in trunk/Source/WebKit2

Ask for UI Process approval of ProtectionSpace when authenticating downloads with NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=152999

Reviewed by Brady Eidson.

  • DerivedSources.make:

I mistakenly added PendingDownload.messages.in in r194810, but this will not be needed because
the PendingDownload is not a MessageReceiver. Rather, the NetworkProcess receives the messages
and forwards their contents to the PendingDownload through its DownloadManager.

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::dataTaskBecameDownloadTask):
(WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::DownloadManager::convertHandleToDownload):

  • NetworkProcess/Downloads/DownloadManager.h:
  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::continueWillSendRequest):
(WebKit::PendingDownload::canAuthenticateAgainstProtectionSpaceAsync):
Instead of taking a shortcut I added in r194810, send a message to the UI process and wait for its
asynchronous reply to determine if we can authenticate against this protection space.
(WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::PendingDownload::didConvertToDownload):

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/Downloads/PendingDownload.messages.in: Removed.
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::cancelDownload):
(WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::NetworkProcess::setCacheModel):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • Shared/Authentication/AuthenticationManager.h:
  • UIProcess/API/APIDownloadClient.h:

(API::DownloadClient::didFail):
(API::DownloadClient::didCancel):
(API::DownloadClient::processDidCrash):
(API::DownloadClient::canAuthenticateAgainstProtectionSpace):

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
(WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace):
(WebKit::DownloadProxy::didReceiveResponse):

  • UIProcess/Downloads/DownloadProxy.h:
  • UIProcess/Downloads/DownloadProxy.messages.in:
  • WebKit2.xcodeproj/project.pbxproj:
10:44 AM Changeset in webkit [194901] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: creating a gradient in the Visual sidebar causes a crash
https://bugs.webkit.org/show_bug.cgi?id=153003

Patch by Devin Rousso <Devin Rousso> on 2016-01-12
Reviewed by Brian Burg.

  • UserInterface/Views/VisualStyleBackgroundPicker.js:

(WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchClicked):
If a gradient does not already exist when the swatch is clicked, create a basic
gradient using the current type and two "transparent" color stops (a minimum of
two color stops are needed for a valid gradient).

10:13 AM Changeset in webkit [194900] by commit-queue@webkit.org
  • 21 edits in trunk/Source

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

Appears to have regressed PLT (Requested by kling on #webkit).

Reverted changeset:

"Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
cont'd"
https://bugs.webkit.org/show_bug.cgi?id=152902
http://trac.webkit.org/changeset/194826

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

[JSC] Add a help message when run-jsc-stress-tests fails
https://bugs.webkit.org/show_bug.cgi?id=153014

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-01-12
Reviewed by Csaba Osztrogonác.

  • Scripts/run-jsc-stress-tests:
9:31 AM Changeset in webkit [194898] by Antti Koivisto
  • 4 edits
    3 adds in trunk

Don't reuse memory cache entries with different charset
https://bugs.webkit.org/show_bug.cgi?id=110031
Source/WebCore:

rdar://problem/13666418

Reviewed by Andreas Kling.

Test: fast/loader/cache-encoding.html

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):
(WebCore::logResourceRevalidationDecision):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):

Pass full CachedResourceRequest to the function.
If charset differs don't reuse the cache entry.

  • loader/cache/CachedResourceLoader.h:

LayoutTests:

Reviewed by Andreas Kling.

  • fast/loader/cache-encoding-expected.txt: Added.
  • fast/loader/cache-encoding.html: Added.
  • fast/loader/resources/success.js: Added.
9:28 AM Changeset in webkit [194897] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/model/scope-chain-node.html as flaky on Mac debug
https://bugs.webkit.org/show_bug.cgi?id=153018

Unreviewed test gardening.

  • platform/mac/TestExpectations:
9:23 AM Changeset in webkit [194896] by Gyuyoung Kim
  • 17 edits in trunk/Source/WebCore

Use a pointer instead of PassRefPtr in AbstractView argument of UIEvent class
https://bugs.webkit.org/show_bug.cgi?id=152829

Reviewed by Darin Adler.

As a step to reduce uses of PassRefPtr, UIEvent class doesn't need to use PassRefPtr for AbstractView argument.
Nobody hands us ownership when making one of these objects.

  • dom/FocusEvent.cpp:

(WebCore::FocusEvent::FocusEvent):

  • dom/FocusEvent.h:
  • dom/KeyboardEvent.cpp:

(WebCore::KeyboardEvent::KeyboardEvent):

  • dom/MouseEvent.cpp:

(WebCore::MouseEvent::create):
(WebCore::MouseEvent::MouseEvent):
(WebCore::MouseEvent::initMouseEvent):
(WebCore::SimulatedMouseEvent::create):
(WebCore::SimulatedMouseEvent::SimulatedMouseEvent):

  • dom/MouseEvent.h:
  • dom/MouseRelatedEvent.cpp:

(WebCore::MouseRelatedEvent::MouseRelatedEvent):

  • dom/MouseRelatedEvent.h:
  • dom/TextEvent.cpp:

(WebCore::TextEvent::create):
(WebCore::TextEvent::createForPlainTextPaste):
(WebCore::TextEvent::createForFragmentPaste):
(WebCore::TextEvent::createForDrop):
(WebCore::TextEvent::createForDictation):
(WebCore::TextEvent::TextEvent):
(WebCore::TextEvent::initTextEvent):

  • dom/TextEvent.h:
  • dom/TouchEvent.cpp:

(WebCore::TouchEvent::TouchEvent):
(WebCore::TouchEvent::initTouchEvent):

  • dom/TouchEvent.h:
  • dom/UIEvent.cpp:

(WebCore::UIEvent::UIEvent):
(WebCore::UIEvent::initUIEvent):

  • dom/UIEvent.h:

(WebCore::UIEvent::create):
(WebCore::UIEvent::view):

  • dom/UIEventWithKeyState.h:

(WebCore::UIEventWithKeyState::UIEventWithKeyState):

9:23 AM Changeset in webkit [194895] by commit-queue@webkit.org
  • 4 edits
    2 moves in trunk/Source/WebKit2

Move ChildProcessProxy from Shared to UIProcess
https://bugs.webkit.org/show_bug.cgi?id=125570

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-01-12
Reviewed by Darin Adler.

ChildProcessProxy is only used by the UI process.

  • CMakeLists.txt:
  • PlatformGTK.cmake:
  • UIProcess/ChildProcessProxy.cpp: Renamed from Source/WebKit2/Shared/ChildProcessProxy.cpp.

(WebKit::ChildProcessProxy::ChildProcessProxy):
(WebKit::ChildProcessProxy::~ChildProcessProxy):
(WebKit::ChildProcessProxy::fromConnection):
(WebKit::ChildProcessProxy::getLaunchOptions):
(WebKit::ChildProcessProxy::connect):
(WebKit::ChildProcessProxy::terminate):
(WebKit::ChildProcessProxy::state):
(WebKit::ChildProcessProxy::sendMessage):
(WebKit::ChildProcessProxy::addMessageReceiver):
(WebKit::ChildProcessProxy::removeMessageReceiver):
(WebKit::ChildProcessProxy::dispatchMessage):
(WebKit::ChildProcessProxy::dispatchSyncMessage):
(WebKit::ChildProcessProxy::didFinishLaunching):
(WebKit::ChildProcessProxy::shutDownProcess):
(WebKit::ChildProcessProxy::connectionWillOpen):

  • UIProcess/ChildProcessProxy.h: Renamed from Source/WebKit2/Shared/ChildProcessProxy.h.

(WebKit::ChildProcessProxy::connection):
(WebKit::ChildProcessProxy::processIdentifier):
(WebKit::ChildProcessProxy::canSendMessage):
(WebKit::ChildProcessProxy::send):
(WebKit::ChildProcessProxy::sendSync):

  • WebKit2.xcodeproj/project.pbxproj:
9:17 AM Changeset in webkit [194894] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] JSC does not build with FTL_USES_B3 on ARM64
https://bugs.webkit.org/show_bug.cgi?id=153011

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-01-12
Reviewed by Saam Barati.

Apparently the static const member can only be used for constexpr.
C++ is weird.

  • jit/GPRInfo.cpp:
  • jit/GPRInfo.h:
9:11 AM Changeset in webkit [194893] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/script-profiler/event-type-Other.html as flaky on Mac
https://bugs.webkit.org/show_bug.cgi?id=153016

Unreviewed test gardening.

  • platform/mac/TestExpectations:
8:47 AM Changeset in webkit [194892] by Csaba Osztrogonác
  • 3 edits in trunk/Source/WebCore

Fix unused-private-field warnings in DisplayListItems.h
https://bugs.webkit.org/show_bug.cgi?id=153012

Reviewed by Michael Catanzaro.

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::DrawNativeImage::DrawNativeImage):

  • platform/graphics/displaylists/DisplayListItems.h:
6:32 AM Changeset in webkit [194891] by Carlos Garcia Campos
  • 69 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Rebaseline test results after r194847.

Before r194847 we were always taking the separator of combo boxes
into account when calculating the size of menu list buttons, even
when we didn't render the separator. In r194847 we removed all the
code to deal with separators in combo boxes. Also, since r194847
we are correctly adding the padding between the icon and the text
in search fileds.

  • platform/gtk/css3/selectors3/html/css3-modsel-161-expected.txt:
  • platform/gtk/css3/selectors3/xhtml/css3-modsel-161-expected.txt:
  • platform/gtk/css3/selectors3/xml/css3-modsel-161-expected.txt:
  • platform/gtk/editing/pasteboard/4641033-expected.txt:
  • platform/gtk/editing/pasteboard/4944770-1-expected.txt:
  • platform/gtk/editing/pasteboard/4944770-2-expected.txt:
  • platform/gtk/editing/selection/caret-before-select-expected.txt:
  • platform/gtk/editing/selection/replaced-boundaries-3-expected.txt:
  • platform/gtk/editing/selection/select-box-expected.txt:
  • platform/gtk/editing/selection/select-element-paragraph-boundary-expected.txt:
  • platform/gtk/fast/css/focus-ring-exists-for-search-field-expected.txt:
  • platform/gtk/fast/css/input-search-padding-expected.txt:
  • platform/gtk/fast/css/text-input-with-webkit-border-radius-expected.txt:
  • platform/gtk/fast/css/text-overflow-input-expected.txt:
  • platform/gtk/fast/css/text-transform-select-expected.txt:
  • platform/gtk/fast/forms/001-expected.txt:
  • platform/gtk/fast/forms/003-expected.txt:
  • platform/gtk/fast/forms/004-expected.txt:
  • platform/gtk/fast/forms/basic-inputs-expected.txt:
  • platform/gtk/fast/forms/basic-selects-expected.txt:
  • platform/gtk/fast/forms/box-shadow-override-expected.txt:
  • platform/gtk/fast/forms/control-restrict-line-height-expected.txt:
  • platform/gtk/fast/forms/disabled-select-change-index-expected.txt:
  • platform/gtk/fast/forms/form-element-geometry-expected.txt:
  • platform/gtk/fast/forms/input-appearance-height-expected.txt:
  • platform/gtk/fast/forms/input-value-expected.txt:
  • platform/gtk/fast/forms/menulist-deselect-update-expected.txt:
  • platform/gtk/fast/forms/menulist-narrow-width-expected.txt:
  • platform/gtk/fast/forms/menulist-no-overflow-expected.txt:
  • platform/gtk/fast/forms/menulist-restrict-line-height-expected.txt:
  • platform/gtk/fast/forms/menulist-separator-painting-expected.txt:
  • platform/gtk/fast/forms/menulist-style-color-expected.txt:
  • platform/gtk/fast/forms/menulist-width-change-expected.txt:
  • platform/gtk/fast/forms/option-script-expected.txt:
  • platform/gtk/fast/forms/option-strip-whitespace-expected.txt:
  • platform/gtk/fast/forms/placeholder-position-expected.txt:
  • platform/gtk/fast/forms/placeholder-pseudo-style-expected.txt:
  • platform/gtk/fast/forms/search-cancel-button-style-sharing-expected.txt:
  • platform/gtk/fast/forms/search-display-none-cancel-button-expected.txt:
  • platform/gtk/fast/forms/search-rtl-expected.txt:
  • platform/gtk/fast/forms/search-styled-expected.txt:
  • platform/gtk/fast/forms/search/search-size-with-decorations-expected.txt:
  • platform/gtk/fast/forms/searchfield-heights-expected.txt:
  • platform/gtk/fast/forms/select-background-none-expected.txt:
  • platform/gtk/fast/forms/select-baseline-expected.txt:
  • platform/gtk/fast/forms/select-change-listbox-to-popup-expected.txt:
  • platform/gtk/fast/forms/select-dirty-parent-pref-widths-expected.txt:
  • platform/gtk/fast/forms/select-disabled-appearance-expected.txt:
  • platform/gtk/fast/forms/select-element-focus-ring-expected.txt:
  • platform/gtk/fast/forms/select-initial-position-expected.txt:
  • platform/gtk/fast/forms/select-selected-expected.txt:
  • platform/gtk/fast/forms/select-size-expected.txt:
  • platform/gtk/fast/forms/select-style-expected.txt:
  • platform/gtk/fast/forms/select-visual-hebrew-expected.txt:
  • platform/gtk/fast/forms/select/optgroup-rendering-expected.txt:
  • platform/gtk/fast/forms/selectlist-minsize-expected.txt:
  • platform/gtk/fast/forms/stuff-on-my-optgroup-expected.txt:
  • platform/gtk/fast/forms/validation-message-appearance-expected.txt:
  • platform/gtk/fast/html/keygen-expected.txt:
  • platform/gtk/fast/invalid/014-expected.txt:
  • platform/gtk/fast/parser/document-write-option-expected.txt:
  • platform/gtk/fast/repaint/search-field-cancel-expected.txt:
  • platform/gtk/fast/replaced/replaced-breaking-expected.txt:
  • platform/gtk/fast/replaced/replaced-breaking-mixture-expected.txt:
  • platform/gtk/fast/replaced/three-selects-break-expected.txt:
  • platform/gtk/fast/replaced/width100percent-menulist-expected.txt:
  • platform/gtk/fast/replaced/width100percent-searchfield-expected.txt:
  • platform/gtk/http/tests/navigation/javascriptlink-frames-expected.txt:
3:41 AM Changeset in webkit [194890] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[GTK] UI process crashes if webkit_web_view_get_tls_info is called before internal load-committed event
https://bugs.webkit.org/show_bug.cgi?id=142375

Reviewed by Michael Catanzaro.

Remove all the hacks to emit delayed load events now that the
page cache resource load delegates are consistent with all other
resource loads.

  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkitWebViewLoadChanged):
(webkitWebViewResourceLoadStarted):
(webkit_web_view_get_tls_info): Add a g_return_val_if_fail to
prevent this function from being misused.
(webkitWebViewDisconnectMainResourceResponseChangedSignalHandler): Deleted.
(webkitWebViewDispose): Deleted.
(webkitWebViewEmitLoadChanged): Deleted.
(webkitWebViewEmitDelayedLoadEvents): Deleted.
(mainResourceResponseChangedCallback): Deleted.
(waitForMainResourceResponseIfWaitingForResource): Deleted.

12:29 AM Changeset in webkit [194889] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

Unreviewed. Fix isRecording condition logic in GraphicsContext::roundToDevicePixels after r194816.

This looks like a typo introduced in r194816, we want to return early logging
a message when isRecording() returns true.

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContext::roundToDevicePixels):

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContext::roundToDevicePixels):

12:23 AM Changeset in webkit [194888] by Carlos Garcia Campos
  • 4 edits
    3 adds in trunk

Inconsistencies in main resource load delegates when loading from history
https://bugs.webkit.org/show_bug.cgi?id=150927

Reviewed by Michael Catanzaro.

Source/WebCore:

When restoring a page from the page cache, even though there
isn't an actual load of resources, we are still emitting the load
delegates to let the API layer know there are contents being
loaded in the web view. This makes the page cache restoring
transparent for the API layer. However, when restoring a page from
the cache, all the delegates are emitted after the load is
committed. This is not consistent with real loads, where we first
load the main resource and once we get a response we commit the
load. This inconsistency is problematic if the API layer expects
to always have a main resource with a response when the load is
committed. This is the case of the GTK+ port, for example. So,
this patch ensures that when a page is restored from the page
cache, the main resource load delegates that are emitted until a
response is received in normal loads, are emitted before the load
is committed.

Test: http/tests/loading/main-resource-delegates-on-back-navigation.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::commitProvisionalLoad): When loading from
the page cache, send delegate messages up to didReceiveResponse
for the main resource before the load is committed, and the
remaining messages afterwards.

LayoutTests:

Add test to check that main resource load delegates are emitted in
the same order before the load is committed when loading a page
from history with the page cache enabled and disabled.

  • http/tests/loading/main-resource-delegates-on-back-navigation-expected.txt: Added.
  • http/tests/loading/main-resource-delegates-on-back-navigation.html: Added.
  • http/tests/loading/resources/page-go-back-onload.html: Added.
  • loader/go-back-cached-main-resource-expected.txt:

Jan 11, 2016:

11:39 PM Changeset in webkit [194887] by commit-queue@webkit.org
  • 5 edits in trunk

Web Inspector: console.count() shouldn't show a colon in front of a number
https://bugs.webkit.org/show_bug.cgi?id=152038

Patch by Johan K. Jensen <jj@johanjensen.dk> on 2016-01-11
Reviewed by Brian Burg.

Source/JavaScriptCore:

  • inspector/agents/InspectorConsoleAgent.cpp:

(Inspector::InspectorConsoleAgent::count):
Do not include title and colon if the title is empty.

LayoutTests:

  • inspector/console/console-api-expected.txt:
  • inspector/console/console-api.html:

Add testcases for console.count

11:16 PM Changeset in webkit [194886] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit2

REGRESSION(r190717): [GTK] Popup menus stop working after being dismissed without selecting an item
https://bugs.webkit.org/show_bug.cgi?id=152977

Reviewed by Michael Catanzaro.

This happens since r190717 when you open a popup menu and without
selecting any option it's dismissed (press ESC or click somewhere
else). This is because I removed the code to track when the menu
is unmapped, thinking that it was no longer necessary. But we need
to send the DidChangeSelectedIndexForActivePopupMenu to the
WebProcess with -1 as index to keep the web process in sync.

  • UIProcess/gtk/WebPopupMenuProxyGtk.cpp:

(WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
(WebKit::WebPopupMenuProxyGtk::showPopupMenu):
(WebKit::WebPopupMenuProxyGtk::cancelTracking):
(WebKit::WebPopupMenuProxyGtk::menuItemActivated):
(WebKit::WebPopupMenuProxyGtk::dismissMenuTimerFired):
(WebKit::WebPopupMenuProxyGtk::menuUnmappedCallback):

  • UIProcess/gtk/WebPopupMenuProxyGtk.h:
8:40 PM Changeset in webkit [194885] by sbarati@apple.com
  • 2 edits in trunk/Tools

run-jsc-stress-tests should try to figure out a JSC path
https://bugs.webkit.org/show_bug.cgi?id=152971

Reviewed by Yusuke Suzuki.

This patch now allows run-jsc-stress-tests to be run
without a "--jsc <jsc-path>" argument. It tries
to take its best guess at a <jsc-path> automagically.

This makes it much easier to just run run-jsc-stress-tests
with a directory or a yaml file as an argument.
You now just do this:
run-jsc-stress-tests <path-to-yaml>
or
run-jsc-stress-tests <path-to-directory-of-js-files>

I wrote this patch because I'd often find myself hacking the
run-javascriptcore-tests file just to run a particular subset of tests.
Because I always forget the arguments to run-jsc-stress-tests (which means
I always forgot to provide a --jsc argument), I always found it easier to
just hack on that file instead of calling run-jsc-stress-tests directly.
No longer is this true!

  • Scripts/run-jsc-stress-tests:
8:21 PM Changeset in webkit [194884] by mitz@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Reverted r194317.

Reviewed by Joseph Pecoraro.

r194317 did not contain a change log entry, did not explain the motivation, did not name a
reviewer, and does not seem necessary.

7:05 PM Changeset in webkit [194883] by bshafiei@apple.com
  • 5 edits in tags/Safari-601.5.8.3/Source

Versioning.

7:03 PM Changeset in webkit [194882] by bshafiei@apple.com
  • 1 copy in tags/Safari-601.5.8.3

New tag.

7:02 PM Changeset in webkit [194881] by commit-queue@webkit.org
  • 5 edits
    3 adds in trunk

keywords ("super", "delete", etc) should be valid method names
https://bugs.webkit.org/show_bug.cgi?id=144281

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-01-11
Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseClass):

  • When parsing "static(" treat it as a method named "static" and not a static method.
  • When parsing a keyword treat it like a string method name (get and set are not keywords)
  • When parsing a getter / setter method name identifier, allow lookahead to be a keyword

(JSC::Parser<LexerType>::parseGetterSetter):

  • When parsing the getter / setter's name, allow it to be a keyword.

LayoutTests:

  • js/class-syntax-super-expected.txt:
  • js/script-tests/class-syntax-super.js:

Update the test for the correct expected result.

  • js/keyword-method-names-expected.txt: Added.
  • js/keyword-method-names.html: Added.
  • js/script-tests/keyword-method-names.js: Added.

Add tests to cover parsing allows keywords in method name syntax.

6:12 PM Changeset in webkit [194880] by aestes@apple.com
  • 18 edits
    1 add in trunk

[Cocoa] Add SPI to opt out a URL scheme from the memory cache
https://bugs.webkit.org/show_bug.cgi?id=152950
rdar://problem/24066652

Reviewed by Tim Horton.

Source/WebCore:

Added a list of schemes to SchemeRegistry whose resources should always be revalidated. Taught CachedResource to
return a freshness lifetime of 0 for these resources, unless the scheme is one that should be cached indefinitely.

New API test: WebKit2.AlwaysRevalidatedURLSchemes

  • loader/cache/CachedResource.cpp:

(WebCore::shouldCacheSchemeIndefinitely): Moved from SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely().
(WebCore::CachedResource::freshnessLifetime): For a scheme that should not be cached indefinitely, return 0 if
that scheme should always be revalidated according to SchemeRegistry.

  • platform/SchemeRegistry.cpp:

(WebCore::alwaysRevalidatedSchemes):
(WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated):
(WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme):
(WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely): Moved to WebCore::shouldCacheSchemeIndefinitely().
There was no reason for this to be in SchemeRegistry.

  • platform/SchemeRegistry.h:

Source/WebKit2:

Added a alwaysRevalidatedURLSchemes property to _WKProcessPoolConfiguration. Taught WebProcess to add these
schemes to SchemeRegistry when initializing a new web process.

  • Shared/API/Cocoa/WKFoundation.h: Added a newline to force re-postprocessing.
  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration alwaysRevalidatedURLSchemes]):
(-[_WKProcessPoolConfiguration setAlwaysRevalidatedURLSchemes:]):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createNewWebProcess):

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::registerURLSchemeAsAlwaysRevalidated):

  • WebProcess/WebProcess.h:

Tools:

Added an API test.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/AlwaysRevalidatedURLSchemes.mm: Added.

(+[AlwaysRevalidatedURLSchemeProtocol canInitWithRequest:]):
(+[AlwaysRevalidatedURLSchemeProtocol canonicalRequestForRequest:]):
(+[AlwaysRevalidatedURLSchemeProtocol requestIsCacheEquivalent:toRequest:]):
(-[AlwaysRevalidatedURLSchemeProtocol startLoading]):
(-[AlwaysRevalidatedURLSchemeProtocol stopLoading]):
(-[AlwaysRevalidatedURLSchemesDelegate webView:didFinishNavigation:]):
(TEST):

5:40 PM Changeset in webkit [194879] by commit-queue@webkit.org
  • 12 edits in trunk/Source/WebInspectorUI

Web Inspector: Storage tab navigation bar should fit on a single line
https://bugs.webkit.org/show_bug.cgi?id=152473

Patch by Devin Rousso <Devin Rousso> on 2016-01-11
Reviewed by Timothy Hatcher.

The wrapping of the navigation bar on the Storage tab was caused by the
fact that Sidebar.js used a minimum width of 200px, regardless of the
content within the sidebar (unless it had a NavigationBar). Logic has
been added that causes the sidebar to use the selected panel's own
minimum width calculation if it is greater than 200px.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel.prototype.get minimumWidth):

  • UserInterface/Views/MultipleScopeBarItem.js:

(WebInspector.MultipleScopeBarItem.prototype.set selectedScopeBarItem):
(WebInspector.MultipleScopeBarItem.prototype.displaySelectedItem):
Sets the displayed text to the currently selected item.

(WebInspector.MultipleScopeBarItem.prototype.displayWidestItem):
Sets the displayed text to the widest (pixel wise) item in the select element.

  • UserInterface/Views/NavigationBar.js:

(WebInspector.NavigationBar.prototype._calculateMinimumWidth):
Now uses NavigationItem.prototype.get minimumWidth.

  • UserInterface/Views/NavitationItem.js:

(WebInspector.NavitationItem.prototype.get minimumWidth):
Returns the element's realOffsetWidth.

  • UserInterface/Views/NetworkSidebarPanel.js:

(WebInspector.NetworkSidebarPanel.prototype.get minimumWidth):

  • UserInterface/Views/ResourceSidebarPanel.js:

(WebInspector.ResourceSidebarPanel.prototype.get minimumWidth):

  • UserInterface/Views/ScopeBar.js:

(WebInspector.ScopeBar):
(WebInspector.ScopeBar.prototype.get minimumWidth):

  • UserInterface/Views/Sidebar.js:

(WebInspector.Sidebar.prototype.set selectedSidebarPanel):
(WebInspector.Sidebar.prototype.get minimumWidth):
(WebInspector.Sidebar.prototype.set width):
(WebInspector.Sidebar.prototype.set collapsed):
(WebInspector.Sidebar.prototype._recalculateWidth):
Whenever the sidebar changes (e.g. tab change, sidebar becomes
visible/hidden, etc.), a width recalculation is necessary to ensure
that the navigation bar never wraps.

  • UserInterface/Views/SidebarPanel.js:

(WebInspector.SidebarPanel.prototype.get minimumWidth):

  • UserInterface/Views/StorageSidebarPanel.js:

(WebInspector.StorageSidebarPanel.prototype.get minimumWidth):

  • UserInterface/Views/TimelineSidebarPanel.js:

(WebInspector.TimelineSidebarPanel.prototype.get minimumWidth):

5:34 PM Changeset in webkit [194878] by commit-queue@webkit.org
  • 11 edits in trunk/Source/WebInspectorUI

Web Inspector: Make Timelines view also remember sort order
https://bugs.webkit.org/show_bug.cgi?id=152811

Patch by Devin Rousso <Devin Rousso> on 2016-01-11
Reviewed by Timothy Hatcher.

Changeset r194574 introduced the ability for WebInspector.Setting objects to
be passed to DataGrid instances to save the sort column for that grid. These
changes also add the ability for the sort order to be save as well.

  • UserInterface/Views/ApplicationCacheFrameContentView.js:

(WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):

  • UserInterface/Views/CookieStorageContentView.js:

(WebInspector.CookieStorageContentView.prototype._rebuildTable):

  • UserInterface/Views/DOMStorageContentView.js:

(WebInspector.DOMStorageContentView):

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.set sortOrder):
If a WebInspector.Setting object has been given, save the new sort order.

(WebInspector.DataGrid.prototype.set sortOrderSetting):
Saves the given WebInspector.Setting object for modification whenever the user
changes the sort order.

  • UserInterface/Views/LayerTreeDetailsSidebarPanel.js:

(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):

  • UserInterface/Views/LayoutTimelineView.js:

(WebInspector.LayoutTimelineView):

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):

  • UserInterface/Views/NetworkTimelineView.js:

(WebInspector.NetworkTimelineView):

  • UserInterface/Views/RenderingFrameTimelineView.js:

(WebInspector.RenderingFrameTimelineView):

  • UserInterface/Views/ScriptTimelineView.js:

(WebInspector.ScriptTimelineView):

5:34 PM Changeset in webkit [194877] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Copying JS object output from console shouldn't include trailing '= $n'
https://bugs.webkit.org/show_bug.cgi?id=119347

Patch by Johan K. Jensen <jj@johanjensen.dk> on 2016-01-11
Reviewed by Joseph Pecoraro.

  • UserInterface/Views/ConsoleMessageView.js:

(WebInspector.ConsoleMessageView.prototype.toClipboardString):

5:32 PM Changeset in webkit [194876] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Add basic Content section to Visual Sidebar
https://bugs.webkit.org/show_bug.cgi?id=152972

Patch by Devin Rousso <Devin Rousso> on 2016-01-11
Reviewed by Timothy Hatcher.

Since the "content" property has so many different types of values, a
simple text input editor should be added to provide some support for
the CSS property until a better, more specialized editor is created.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:

(.visual-style-property-container.comma-separated-keyword-editor):
Moved margin-left to new rule in VisualStylePropertyEditor.css.

  • UserInterface/Views/VisualStyleDetailsPanel.js:

(WebInspector.VisualStyleDetailsPanel):
(WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection):
Adds the basic editor under the Text section in a new subsection
called Content.

  • UserInterface/Views/VisualStylePropertyEditor.css:

(.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)):
Adds a left margin to property editors without a title.

5:31 PM Changeset in webkit [194875] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Visual sidebar minor bug fixes
https://bugs.webkit.org/show_bug.cgi?id=152967

Patch by Devin Rousso <Devin Rousso> on 2016-01-11
Reviewed by Timothy Hatcher.

  • UserInterface/Views/VisualStyleDetailsPanel.js:

(WebInspector.VisualStyleDetailsPanel.prototype.refresh):
Only update sections when it is not a significant change, as they are
updated when the selector changes.

(WebInspector.VisualStyleDetailsPanel.prototype._updateProperties):
Only reset links if the refresh is a significant change (node or selected
style changes).

  • UserInterface/Views/VisualStyleNumberInputBox.js:

(WebInspector.VisualStyleNumberInputBox):
(WebInspector.VisualStyleNumberInputBox.prototype.get value):
Removed unreachable return.

(WebInspector.VisualStyleNumberInputBox.prototype.set value):
(WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown.adjustValue):
_updatedValues.propertyMissing was changed to _propertyMissing in a
prior patch.

4:33 PM Changeset in webkit [194874] by beidson@apple.com
  • 4 edits in trunk/LayoutTests

Modern IDB: storage/indexeddb/intversion-long-queue.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152995

Reviewed by Alex Christensen.

  • platform/mac-wk1/TestExpectations:
  • storage/indexeddb/intversion-long-queue-expected.txt:
  • storage/indexeddb/resources/intversion-long-queue.js:
4:11 PM Changeset in webkit [194873] by commit-queue@webkit.org
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Add Div/Mod and fix Mul for B3 ARM64
https://bugs.webkit.org/show_bug.cgi?id=152978

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

Add the 3 operands forms of Mul.
Remove the form taking immediate on ARM64, there are no such instruction.

Add Div with sdiv.

Unfortunately, I discovered ChillMod's division by zero
makes it non-trivial on ARM64. I just made it into a macro like on x86.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::mul32):
(JSC::MacroAssemblerARM64::mul64):
(JSC::MacroAssemblerARM64::div32):
(JSC::MacroAssemblerARM64::div64):

  • b3/B3LowerMacros.cpp:
  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::lower):

  • b3/air/AirOpcode.opcodes:
3:44 PM Changeset in webkit [194872] by beidson@apple.com
  • 5 edits in trunk

Modern IDB: storage/indexeddb/index-multientry.html fails under GuardMalloc/ASAN.
https://bugs.webkit.org/show_bug.cgi?id=152990

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Covered by re-enabling existing test).

  • Modules/indexeddb/client/IDBRequestImpl.cpp:

(WebCore::IDBClient::IDBRequest::dispatchEvent): Use String::utf8() instead of AtomicString::characters8() for

the format string, as the latter fails under ASAN.

  • Modules/indexeddb/server/IndexValueStore.cpp:

(WebCore::IDBServer::IndexValueStore::removeEntriesWithValueKey): We can't save off pointers to IDBKeyDatas

used as keys in the map, because the moment we start mutating the map the keys can be rehashed, invalidating
our pointers. Save off the IDBKeyDatas by value instead.

LayoutTests:

  • platform/mac-wk1/TestExpectations:
3:34 PM Changeset in webkit [194871] by commit-queue@webkit.org
  • 20 edits
    4 adds in trunk

Web Inspector: Migrate Page Timeline recording to ScriptProfiler
https://bugs.webkit.org/show_bug.cgi?id=152727

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-01-11
Reviewed by Brian Burg.

Source/WebCore:

Test: inspector/script-profiler/event-type-Other.html

This now shares the JavaScript profiling code between JSContext and Page
inspection. It also moves forward splitting the Page's Timeline domain
into smaller components that can be turned on/off individually.

  • bindings/js/JSCallbackData.cpp:

(WebCore::JSCallbackData::invokeCallback):

  • bindings/js/JSErrorHandler.cpp:

(WebCore::JSErrorHandler::handleEvent):

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::handleEvent):

  • bindings/js/JSMainThreadExecState.h:

(WebCore::JSMainThreadExecState::profiledCall):
(WebCore::JSMainThreadExecState::profiledEvaluate):

  • bindings/js/JSMutationCallback.cpp:

(WebCore::JSMutationCallback::call):

  • bindings/js/ScheduledAction.cpp:

(WebCore::ScheduledAction::executeFunctionInContext):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::evaluateInWorld):

  • bindings/objc/WebScriptObject.mm:

(-[WebScriptObject callWebScriptMethod:withArguments:]):
(-[WebScriptObject evaluateWebScript:]):
Identify entry points into JSC that we want to profile for the frontend.
These were nearly all already classified for the Timeline. We added missing
support for ErrorHandlers (window.onerror handler functions).

  • inspector/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::didCallFunction):
(WebCore::InspectorTimelineAgent::didEvaluateScript):
(WebCore::startProfiling): Deleted.
(WebCore::stopProfiling): Deleted.
(WebCore::InspectorTimelineAgent::willCallFunction): Deleted.
(WebCore::InspectorTimelineAgent::willEvaluateScript): Deleted.

  • inspector/InspectorTimelineAgent.h:

TimelineAgent no longer needs to start/stop the Legacy Profiler
since ScriptProfiler will automatically do that for us. Delete
all code associated with that. There is still an open question
regarding console.profile and console.profileEnd that
starts/stops the profiler.

Source/WebInspectorUI:

  • UserInterface/Images/TimelineRecordAPI.svg: Added.
  • UserInterface/Images/gtk/TimelineRecordAPI.svg: Added.

New [S] image for API initiated script evaluations.
Display matches the existing [S] Script Evaluated.
Colors match the gray [N] Native image colors.

  • UserInterface/Models/ScriptInstrument.js:

(WebInspector.ScriptInstrument.prototype.startInstrumentation):
(WebInspector.ScriptInstrument.prototype.stopInstrumentation):
(WebInspector.ScriptInstrument):
Use ScriptProfiler, if available, in Web debuggables.

  • UserInterface/Controllers/TimelineManager.js:

(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.capturingStarted):
(WebInspector.TimelineManager.prototype._processRecord):
(WebInspector.TimelineManager.prototype._scriptProfilerTypeToScriptTimelineRecordType):
(WebInspector.TimelineManager.prototype.scriptProfilerTrackingUpdated):
(WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted):
(WebInspector.TimelineManager.prototype._mergeScriptProfileRecords.let.nextRecord):
(WebInspector.TimelineManager.prototype._mergeScriptProfileRecords.let.recordContainsRecord):
(WebInspector.TimelineManager.prototype._mergeScriptProfileRecords):
When running a timeline on a web debuggable the frontend receives both
Timeline event records and ScriptProfiler events. Timeline (Web) records
are high level web events like "Script Evaluated", "Event Dispatched",
"Timer Fired". The timestamps for these records should always be wrapping
a ScriptProfiler event and its associated profile data. So, at the end
of a recording we merge ScriptProfiler profile data into the original
Timeline (Web) record.

  • UserInterface/Models/ScriptTimelineRecord.js:

(WebInspector.ScriptTimelineRecord.prototype.get profilePayload):
(WebInspector.ScriptTimelineRecord.prototype.set profilePayload):
(WebInspector.ScriptTimelineRecord.prototype.setProfilePayload): Deleted.
Replace method with getter/setter.

(WebInspector.ScriptTimelineRecord.EventType.displayName):
Add a new event type for API records, but share display name with Script Evaluated.

  • UserInterface/Views/NavigationSidebarPanel.js:

Fix typo.

  • UserInterface/Views/ScriptTimelineView.css:

(.timeline-view.script > .data-grid .eventType-column): Deleted.
There is no "eventType" column in the ScriptTimelineView datagrid, so remove styles.

  • UserInterface/Views/TimelineIcons.css:

(.api-record .icon):

  • UserInterface/Views/TimelineRecordTreeElement.js:

(WebInspector.TimelineRecordTreeElement):
For API Script Evaluation records use the new icon.

LayoutTests:

  • inspector/script-profiler/event-type-Other-expected.txt: Added.
  • inspector/script-profiler/event-type-Other.html: Added.

Add a test that Web script evaluations create "Other" ScriptProfiler events.

3:16 PM Changeset in webkit [194870] by andersca@apple.com
  • 8 edits in trunk/Source

Get rid of CFMakeCollectable, it is a no-op
https://bugs.webkit.org/show_bug.cgi?id=152988

Reviewed by Sam Weinig.

Source/WebCore:

  • platform/mac/WebCoreNSURLExtras.mm:

(WebCore::URLByTruncatingOneCharacterBeforeComponent):
(WebCore::URLByRemovingComponentAndSubsequentCharacter):

Source/WebKit/mac:

  • Misc/WebNSDataExtras.m:

(-[NSString _web_capitalizeRFC822HeaderFieldName]):
(-[NSData _webkit_parseRFC822HeaderFields]):

  • Plugins/WebPluginController.mm:

(-[WebPluginController initWithDocumentView:]):

Source/WebKit2:

  • Shared/Cocoa/WKNSString.mm:
  • Shared/Cocoa/WKNSURL.mm:

(-[WKNSURL _web_createTarget]):

2:40 PM Changeset in webkit [194869] by keith_miller@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

Arrays should use the InternalFunctionAllocationProfile when constructing new Arrays
https://bugs.webkit.org/show_bug.cgi?id=152949

Reviewed by Michael Saboff.

This patch updates Array constructors to use the new InternalFunctionAllocationProfile.

  • runtime/ArrayConstructor.cpp:

(JSC::constructArrayWithSizeQuirk):
(JSC::constructWithArrayConstructor):

  • runtime/InternalFunction.h:

(JSC::InternalFunction::createStructure):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::arrayStructureForIndexingTypeDuringAllocation):
(JSC::JSGlobalObject::arrayStructureForProfileDuringAllocation):
(JSC::constructEmptyArray):
(JSC::constructArray):
(JSC::constructArrayNegativeIndexed):

  • runtime/PrototypeMap.cpp:

(JSC::PrototypeMap::emptyStructureForPrototypeFromBaseStructure):

  • runtime/Structure.h:
  • runtime/StructureInlines.h:
2:34 PM Changeset in webkit [194868] by commit-queue@webkit.org
  • 17 edits
    1 delete in trunk

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

This change broke the mac build (Requested by ryanhaddad on
#webkit).

Reverted changeset:

"[Cocoa] Add SPI to opt out a URL scheme from the memory
cache"
https://bugs.webkit.org/show_bug.cgi?id=152950
http://trac.webkit.org/changeset/194866

2:03 PM Changeset in webkit [194867] by Alan Bujtas
  • 4 edits
    2 adds in trunk

Padding added to table-cell element after font-size change.
https://bugs.webkit.org/show_bug.cgi?id=152796

Reviewed by David Hyatt.

Do not include intrinsicPaddingBefore value while figuring out the height of a row.
In RenderTableSection::calcRowLogicalHeight() we are interested in the height of the content
without the additional padding (normal padding is included).

Source/WebCore:

Test: fast/table/table-baseline-grows.html

  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::calcRowLogicalHeight):

LayoutTests:

  • TestExpectations: This test fails even without the patch when Ahem font is not used.
  • fast/table/table-baseline-grows-expected.html: Added.
  • fast/table/table-baseline-grows.html: Added.
1:57 PM Changeset in webkit [194866] by aestes@apple.com
  • 17 edits
    1 add in trunk

[Cocoa] Add SPI to opt out a URL scheme from the memory cache
https://bugs.webkit.org/show_bug.cgi?id=152950
rdar://problem/24066652

Reviewed by Tim Horton.

Source/WebCore:

Added a list of schemes to SchemeRegistry whose resources should always be revalidated. Taught CachedResource to
return a freshness lifetime of 0 for these resources, unless the scheme is one that should be cached indefinitely.

New API test: WebKit2.AlwaysRevalidatedURLSchemes

  • loader/cache/CachedResource.cpp:

(WebCore::shouldCacheSchemeIndefinitely): Moved from SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely().
(WebCore::CachedResource::freshnessLifetime): For a scheme that should not be cached indefinitely, return 0 if
that scheme should always be revalidated according to SchemeRegistry.

  • platform/SchemeRegistry.cpp:

(WebCore::alwaysRevalidatedSchemes):
(WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated):
(WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme):
(WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely): Moved to WebCore::shouldCacheSchemeIndefinitely().
There was no reason for this to be in SchemeRegistry.

  • platform/SchemeRegistry.h:

Source/WebKit2:

Added a alwaysRevalidatedURLSchemes property to _WKProcessPoolConfiguration. Taught WebProcess to add these
schemes to SchemeRegistry when initializing a new web process.

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration alwaysRevalidatedURLSchemes]):
(-[_WKProcessPoolConfiguration setAlwaysRevalidatedURLSchemes:]):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createNewWebProcess):

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::registerURLSchemeAsAlwaysRevalidated):

  • WebProcess/WebProcess.h:

Tools:

Added an API test.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/AlwaysRevalidatedURLSchemes.mm: Added.

(+[AlwaysRevalidatedURLSchemeProtocol canInitWithRequest:]):
(+[AlwaysRevalidatedURLSchemeProtocol canonicalRequestForRequest:]):
(+[AlwaysRevalidatedURLSchemeProtocol requestIsCacheEquivalent:toRequest:]):
(-[AlwaysRevalidatedURLSchemeProtocol startLoading]):
(-[AlwaysRevalidatedURLSchemeProtocol stopLoading]):
(-[AlwaysRevalidatedURLSchemesDelegate webView:didFinishNavigation:]):
(TEST):

1:49 PM Changeset in webkit [194865] by hyatt@apple.com
  • 4 edits
    17 adds in trunk

Picture element needs to work with the preload scanner and select the correct
source element instead of loading the image.
https://bugs.webkit.org/show_bug.cgi?id=152983

Reviewed by Dean Jackson.

Source/WebCore:

Added new tests in http/tests/loading.

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::tagIdFor):
(WebCore::TokenPreloadScanner::initiatorFor):
(WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
(WebCore::TokenPreloadScanner::StartTagScanner::processImageAndScriptAttribute):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
(WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
(WebCore::TokenPreloadScanner::scan):

  • html/parser/HTMLPreloadScanner.h:

(WebCore::TokenPreloadScanner::setPredictedBaseElementURL):
(WebCore::TokenPreloadScanner::inPicture):

LayoutTests:

These tests are imported from Blink, although they have been modified slightly to
reflect the fact that we pass the nested <picture> cases that Blink fails.

  • http/tests/loading/hidpi-preload-picture-sizes-expected.txt: Added.
  • http/tests/loading/hidpi-preload-picture-sizes.html: Added.
  • http/tests/loading/preload-picture-invalid-expected.txt: Added.
  • http/tests/loading/preload-picture-invalid.html: Added.
  • http/tests/loading/preload-picture-nested-expected.txt: Added.
  • http/tests/loading/preload-picture-nested.html: Added.
  • http/tests/loading/preload-picture-sizes-expected.txt: Added.
  • http/tests/loading/preload-picture-sizes.html: Added.
  • http/tests/loading/resources/base-image1.png: Added.
  • http/tests/loading/resources/base-image2.png: Added.
  • http/tests/loading/resources/base-image3.png: Added.
  • http/tests/loading/resources/dup-image1.png: Added.
  • http/tests/loading/resources/dup-image2.png: Added.
  • http/tests/loading/resources/dup-image3.png: Added.
  • http/tests/loading/resources/image1.png: Added.
  • http/tests/loading/resources/image2.png: Added.
  • http/tests/loading/resources/picture-preload-helper.js: Added.
1:37 PM Changeset in webkit [194864] by beidson@apple.com
  • 9 edits
    1 copy in trunk

LayoutTests/imported/w3c:
Modern IDB: IDBBindingUtilities chokes on unicode strings for get/set.
https://bugs.webkit.org/show_bug.cgi?id=152921

Reviewed by Alex Christensen.

  • indexeddb/keygenerator-overflow-expected.txt:

Source/WebCore:
Modern IDB: storage/indexeddb/key-generator.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152981

Reviewed by Alex Christensen.

No new tests (One failing test now passes, and one test's results get a progression).

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

(WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber): Throw an error if the current

value is already over 253.

(WebCore::IDBServer::MemoryIDBBackingStore::revertGeneratedKeyNumber):
(WebCore::IDBServer::MemoryIDBBackingStore::maybeUpdateKeyGeneratorNumber): Handle double -> uint64_t

conversions properly when calculating the next key.

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

(WebCore::IDBServer::ScopeGuard::ScopeGuard): Add this utility class to call a function

any time it goes out of scope.

(WebCore::IDBServer::ScopeGuard::~ScopeGuard):
(WebCore::IDBServer::ScopeGuard::enable):
(WebCore::IDBServer::ScopeGuard::disable):
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): Revert the key generator value if

the put/add operation ends in error.

LayoutTests:
Modern IDB: storage/indexeddb/key-generator.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152981

Reviewed by Alex Christensen.

  • platform/mac-wk1/TestExpectations:
  • platform/wk2/imported/w3c/indexeddb/keygenerator-overflow-expected.txt: Copied from LayoutTests/imported/w3c/indexeddb/keygenerator-overflow-expected.txt.
1:31 PM Changeset in webkit [194863] by keith_miller@apple.com
  • 40 edits
    2 adds in trunk/Source/JavaScriptCore

Use a profile to store allocation structures for subclasses of InternalFunctions
https://bugs.webkit.org/show_bug.cgi?id=152942

Reviewed by Michael Saboff.

This patch adds InternalFunctionAllocationProfile to FunctionRareData, which holds
a cached structure that can be used to quickly allocate any derived class of an InternalFunction.
InternalFunctionAllocationProfile ended up being distinct from ObjectAllocationProfile, due to
constraints imposed by Reflect.construct. Reflect.construct allows the user to pass an arbitrary
constructor as a new.target to any other constructor. This means that a user can pass some
non-derived constructor to an InternalFunction (they can even pass another InternalFunction as the
new.target). If we use the same profile for both InternalFunctions and JS allocations then we always
need to check in both JS code and C++ code that the profiled structure has the same ClassInfo as the
current constructor. By using different profiles, we only need to check the profile in InternalFunctions
as all JS constructed objects share the same ClassInfo (JSFinalObject). This comes at the relatively
low cost of using slightly more memory on FunctionRareData and being slightly more conceptually complex.

Additionally, this patch adds subclassing to some omitted classes.

  • API/JSObjectRef.cpp:

(JSObjectMakeDate):
(JSObjectMakeRegExp):

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/InternalFunctionAllocationProfile.h: Added.

(JSC::InternalFunctionAllocationProfile::structure):
(JSC::InternalFunctionAllocationProfile::clear):
(JSC::InternalFunctionAllocationProfile::visitAggregate):
(JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGOperations.cpp:
  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_create_this):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_create_this):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/BooleanConstructor.cpp:

(JSC::constructWithBooleanConstructor):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/DateConstructor.cpp:

(JSC::constructDate):
(JSC::constructWithDateConstructor):

  • runtime/DateConstructor.h:
  • runtime/ErrorConstructor.cpp:

(JSC::Interpreter::constructWithErrorConstructor):

  • runtime/FunctionRareData.cpp:

(JSC::FunctionRareData::create):
(JSC::FunctionRareData::visitChildren):
(JSC::FunctionRareData::FunctionRareData):
(JSC::FunctionRareData::initializeObjectAllocationProfile):
(JSC::FunctionRareData::clear):
(JSC::FunctionRareData::finishCreation): Deleted.
(JSC::FunctionRareData::initialize): Deleted.

  • runtime/FunctionRareData.h:

(JSC::FunctionRareData::offsetOfObjectAllocationProfile):
(JSC::FunctionRareData::objectAllocationProfile):
(JSC::FunctionRareData::objectAllocationStructure):
(JSC::FunctionRareData::allocationProfileWatchpointSet):
(JSC::FunctionRareData::isObjectAllocationProfileInitialized):
(JSC::FunctionRareData::internalFunctionAllocationStructure):
(JSC::FunctionRareData::createInternalFunctionAllocationStructureFromBase):
(JSC::FunctionRareData::offsetOfAllocationProfile): Deleted.
(JSC::FunctionRareData::allocationProfile): Deleted.
(JSC::FunctionRareData::allocationStructure): Deleted.
(JSC::FunctionRareData::isInitialized): Deleted.

  • runtime/InternalFunction.cpp:

(JSC::InternalFunction::createSubclassStructure):

  • runtime/InternalFunction.h:
  • runtime/JSArrayBufferConstructor.cpp:

(JSC::constructArrayBuffer):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::allocateRareData):
(JSC::JSFunction::allocateAndInitializeRareData):
(JSC::JSFunction::initializeRareData):

  • runtime/JSFunction.h:

(JSC::JSFunction::rareData):

  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayView):

  • runtime/JSObject.h:

(JSC::JSFinalObject::typeInfo):
(JSC::JSFinalObject::createStructure):

  • runtime/JSPromiseConstructor.cpp:

(JSC::constructPromise):

  • runtime/JSPromiseConstructor.h:
  • runtime/JSWeakMap.cpp:
  • runtime/JSWeakSet.cpp:
  • runtime/MapConstructor.cpp:

(JSC::constructMap):

  • runtime/NativeErrorConstructor.cpp:

(JSC::Interpreter::constructWithNativeErrorConstructor):

  • runtime/NumberConstructor.cpp:

(JSC::constructWithNumberConstructor):

  • runtime/PrototypeMap.cpp:

(JSC::PrototypeMap::createEmptyStructure):
(JSC::PrototypeMap::emptyStructureForPrototypeFromBaseStructure):
(JSC::PrototypeMap::emptyObjectStructureForPrototype):
(JSC::PrototypeMap::clearEmptyObjectStructureForPrototype):

  • runtime/PrototypeMap.h:
  • runtime/RegExpConstructor.cpp:

(JSC::getRegExpStructure):
(JSC::constructRegExp):
(JSC::constructWithRegExpConstructor):

  • runtime/RegExpConstructor.h:
  • runtime/SetConstructor.cpp:

(JSC::constructSet):

  • runtime/WeakMapConstructor.cpp:

(JSC::constructWeakMap):

  • runtime/WeakSetConstructor.cpp:

(JSC::constructWeakSet):

  • tests/stress/class-subclassing-misc.js:

(A):
(D):
(E):
(WM):
(WS):
(test):

  • tests/stress/class-subclassing-typedarray.js: Added.

(test):

1:28 PM Changeset in webkit [194862] by peavo@outlook.com
  • 2 edits in trunk/Source/JavaScriptCore

[B3][Win64] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=152984

Reviewed by Alex Christensen.

Windows does not have bzero, use memset instead.

  • b3/air/AirIteratedRegisterCoalescing.cpp:
1:04 PM Changeset in webkit [194861] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Fixed compilation of JavaScriptCore with GCC 4.8 on 32-bit platforms
https://bugs.webkit.org/show_bug.cgi?id=152923

Patch by Konstantin Tokarev <Konstantin Tokarev> on 2016-01-11
Reviewed by Alex Christensen.

  • jit/CallFrameShuffler.h:

(JSC::CallFrameShuffler::assumeCalleeIsCell):

1:00 PM Changeset in webkit [194860] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix Mac CMake build after r194810.

  • PlatformMac.cmake:

PendingDownload isn't needed until NETWORK_SESSION is used by default.
I'll figure this out when I make the switch.

12:18 PM Changeset in webkit [194859] by beidson@apple.com
  • 5 edits in trunk

Modern IDB: storage/indexeddb/lazy-index-population.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152976

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (At least one failing test now passes).

We were restoring objectstores/indexes incorrectly on transaction abort.

  • Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:

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

  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort):

LayoutTests:

  • platform/mac-wk1/TestExpectations:
10:13 AM Changeset in webkit [194858] by Csaba Osztrogonác
  • 6 edits in trunk/Source/JavaScriptCore

[B3] Fix control reaches end of non-void function GCC warnings on Linux
https://bugs.webkit.org/show_bug.cgi?id=152887

Reviewed by Mark Lam.

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::createBranch):
(JSC::B3::Air::LowerToAir::createCompare):
(JSC::B3::Air::LowerToAir::createSelect):

  • b3/B3Type.h:

(JSC::B3::sizeofType):

  • b3/air/AirArg.cpp:

(JSC::B3::Air::Arg::isRepresentableAs):

  • b3/air/AirArg.h:

(JSC::B3::Air::Arg::isAnyUse):
(JSC::B3::Air::Arg::isColdUse):
(JSC::B3::Air::Arg::isEarlyUse):
(JSC::B3::Air::Arg::isLateUse):
(JSC::B3::Air::Arg::isAnyDef):
(JSC::B3::Air::Arg::isEarlyDef):
(JSC::B3::Air::Arg::isLateDef):
(JSC::B3::Air::Arg::isZDef):
(JSC::B3::Air::Arg::widthForB3Type):
(JSC::B3::Air::Arg::isGP):
(JSC::B3::Air::Arg::isFP):
(JSC::B3::Air::Arg::isType):
(JSC::B3::Air::Arg::isValidForm):

  • b3/air/AirCode.h:

(JSC::B3::Air::Code::newTmp):
(JSC::B3::Air::Code::numTmps):

9:39 AM Changeset in webkit [194857] by beidson@apple.com
  • 9 edits in trunk/Source/WebCore

Modern IDB: Make MemoryIndex and MemoryObjectStore RefCounted.
https://bugs.webkit.org/show_bug.cgi?id=152966

Reviewed by Alex Christensen.

No new tests (Refactor, no change in behavior)

  • Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:

(WebCore::IDBServer::MemoryBackingStoreTransaction::indexDeleted):
(WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreDeleted):
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):

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

(WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort):
(WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByName):

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

(WebCore::IDBServer::MemoryIndex::create):

  • Modules/indexeddb/server/MemoryIndex.h:
  • Modules/indexeddb/server/MemoryObjectStore.cpp:

(WebCore::IDBServer::MemoryObjectStore::create):
(WebCore::IDBServer::MemoryObjectStore::createIndex):
(WebCore::IDBServer::MemoryObjectStore::maybeRestoreDeletedIndex):
(WebCore::IDBServer::MemoryObjectStore::takeIndexByName):
(WebCore::IDBServer::MemoryObjectStore::deleteIndex):
(WebCore::IDBServer::MemoryObjectStore::updateIndexesForDeleteRecord):
(WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
(WebCore::IDBServer::MemoryObjectStore::registerIndex):

  • Modules/indexeddb/server/MemoryObjectStore.h:
9:25 AM Changeset in webkit [194856] by fpizlo@apple.com
  • 8 edits
    1 add in trunk/Source/JavaScriptCore

Make it easier to introduce exotic instructions to Air
https://bugs.webkit.org/show_bug.cgi?id=152953

Reviewed by Benjamin Poulain.

Currently, you can define new "opcodes" in Air using either:

1) New opcode declared in AirOpcode.opcodes.
2) Patch opcode with a new implementation of Air::Special.

With (1), you are limited to fixed-argument-length instructions. There are other
restrictions as well, like that you can only use the roles that the AirOpcode syntax
supports.

With (2), you can do anything you like, but the instruction will be harder to match
since it will share the same opcode as any other Patch. Also, the instruction will have
the Special argument, which means more busy-work when creating the instruction and
validating it.

This introduces an in-between facility called "custom". This replaces what AirOpcode
previously called "special". A custom instruction is one whose behavior is defined by a
FooCustom struct with some static methods. Calls to those methods are emitted by
opcode_generator.rb.

The "custom" facility is powerful enough to be used to implement Patch, with the caveat
that we now treat the Patch instruction specially in a few places. Those places were
already effectively treating it specially by assuming that only Patch instructions have
a Special as their first argument.

This will let me implement the Shuffle instruction (bug 152952), which I think is needed
for performance work.

(JSC::B3::Air::PatchCustom::forEachArg):
(JSC::B3::Air::PatchCustom::isValidFormStatic):
(JSC::B3::Air::PatchCustom::isValidForm):
(JSC::B3::Air::PatchCustom::admitsStack):
(JSC::B3::Air::PatchCustom::hasNonArgNonControlEffects):
(JSC::B3::Air::PatchCustom::generate):

  • b3/air/AirHandleCalleeSaves.cpp:

(JSC::B3::Air::handleCalleeSaves):

  • b3/air/AirInst.h:
  • b3/air/AirInstInlines.h:

(JSC::B3::Air::Inst::forEach):
(JSC::B3::Air::Inst::extraClobberedRegs):
(JSC::B3::Air::Inst::extraEarlyClobberedRegs):
(JSC::B3::Air::Inst::forEachDefWithExtraClobberedRegs):
(JSC::B3::Air::Inst::reportUsedRegisters):
(JSC::B3::Air::Inst::hasSpecial): Deleted.

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

(JSC::B3::Air::reportUsedRegisters):

  • b3/air/opcode_generator.rb:
9:18 AM Changeset in webkit [194855] by fpizlo@apple.com
  • 9 edits
    1 add in trunk/Source/JavaScriptCore

Turn Check(true) into Patchpoint() followed by Oops
https://bugs.webkit.org/show_bug.cgi?id=152968

Reviewed by Benjamin Poulain.

This is an obvious strength reduction to have, especially since if we discover that the
input to the Check is true after some amount of B3 optimization, then stubbing out the rest
of the basic block unlocks CFG simplification opportunities.

It's also a proof-of-concept for the Check->Patchpoint conversion that I'll use once I
implement sinking (bug 152162).

  • b3/B3ControlValue.cpp:

(JSC::B3::ControlValue::convertToJump):
(JSC::B3::ControlValue::convertToOops):
(JSC::B3::ControlValue::dumpMeta):

  • b3/B3ControlValue.h:
  • b3/B3InsertionSet.h:

(JSC::B3::InsertionSet::insertValue):

  • b3/B3InsertionSetInlines.h:

(JSC::B3::InsertionSet::insert):

  • b3/B3ReduceStrength.cpp:
  • b3/B3StackmapValue.h:
  • b3/B3Value.h:
  • tests/stress/ftl-force-osr-exit.js: Added.
8:55 AM Changeset in webkit [194854] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

Fix other builds after my MSVC build fix. :-|

  • css/StyleResolver.cpp:
8:42 AM Changeset in webkit [194853] by Michael Catanzaro
  • 2 edits
    70 adds in trunk/LayoutTests

[GTK] Update test expectations after r194845

Unreviewed gardening. Mark XHTML tests as passing now that we have patched shared-mime-info
to better detect XHTML. Add expectations for additional XHTML tests that were unskipped in
r194845.

  • platform/gtk/TestExpectations:
  • platform/gtk/css2.1/tables/table-anonymous-objects-015-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-016-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-023-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-024-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-035-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-036-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-037-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-038-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-045-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-046-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-047-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-048-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-049-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-050-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-055-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-056-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-091-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-092-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-099-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-100-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-103-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-104-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-105-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-106-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-107-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-108-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-109-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-110-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-111-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-112-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-113-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-114-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-115-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-116-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-117-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-118-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-119-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-120-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-121-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-122-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-123-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-124-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-139-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-140-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-149-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-150-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-155-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-156-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-159-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-160-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-165-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-166-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-177-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-178-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-179-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-180-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-181-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-189-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-190-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-191-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-192-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-193-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-194-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-195-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-196-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-205-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-206-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-207-expected.txt: Added.
  • platform/gtk/css2.1/tables/table-anonymous-objects-208-expected.txt: Added.
8:39 AM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
8:34 AM Changeset in webkit [194852] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skipping unsupported test pageoverlay/overlay-small-frame-mouse-events.html on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=152130

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
8:33 AM Changeset in webkit [194851] by akling@apple.com
  • 7 edits in trunk/Source/WebCore

Fix MSVC build after r194848.

Since MSVC refuses to recognize the friendship between LazyNeverDestroyed
and some CSS*Value classes, make their constructors public in MSVC builds.

Added FIXME's to make it look extra gross.

  • css/CSSInheritedValue.h:

(WebCore::CSSInheritedValue::create): Deleted.

  • css/CSSInitialValue.h:
  • css/CSSPrimitiveValue.h:
  • css/CSSRevertValue.h:

(WebCore::CSSRevertValue::create): Deleted.

  • css/CSSUnsetValue.h:

(WebCore::CSSUnsetValue::create): Deleted.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::applyProperty):

8:21 AM Changeset in webkit [194850] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] When resolving Stack arguments, use addressing from SP when addressing from FP is invalid
https://bugs.webkit.org/show_bug.cgi?id=152840

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-01-11
Reviewed by Mark Lam.

ARM64 has two kinds of addressing with immediates:
-Signed 9bits direct (really only -256 to 255).
-Unsigned 12bits scaled by the load/store size.

When resolving the stack addresses, we easily run
past -256 bytes from FP. Addressing from SP gives us more
room to address the stack efficiently because we can
use unsigned immediates.

  • b3/B3StackmapSpecial.cpp:

(JSC::B3::StackmapSpecial::repForArg):

  • b3/air/AirAllocateStack.cpp:

(JSC::B3::Air::allocateStack):

7:01 AM Changeset in webkit [194849] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[webkitdirs] Use CMake to determine architecture on isCMakeBuild()
https://bugs.webkit.org/show_bug.cgi?id=152959

Patch by Konstantin Tokarev <Konstantin Tokarev> on 2016-01-11
Reviewed by Brent Fulgham.

  • Scripts/webkitdirs.pm:

(determineArchitecture):

4:23 AM Changeset in webkit [194848] by akling@apple.com
  • 10 edits in trunk/Source

Source/WebCore:
CSSValuePool should use nonfragmented storage for eternal caches.
<https://webkit.org/b/152960>

Reviewed by Antti Koivisto.

Store all of the common cached CSS value objects in contiguous arrays
instead of lazily allocating them on the heap.

This reduces heap fragmentation (win) and removes indirection (win)

  • css/CSSInheritedValue.h:
  • css/CSSInitialValue.h:
  • css/CSSPrimitiveValue.h:
  • css/CSSRevertValue.h:
  • css/CSSUnsetValue.h:
  • css/CSSValuePool.cpp:

(WebCore::CSSValuePool::CSSValuePool):
(WebCore::CSSValuePool::createIdentifierValue):
(WebCore::CSSValuePool::createColorValue):
(WebCore::CSSValuePool::createValue):
(WebCore::CSSValuePool::drain): Deleted.

  • css/CSSValuePool.h:

(WebCore::CSSValuePool::createInheritedValue):
(WebCore::CSSValuePool::createImplicitInitialValue):
(WebCore::CSSValuePool::createExplicitInitialValue):
(WebCore::CSSValuePool::createUnsetValue):
(WebCore::CSSValuePool::createRevertValue):

Source/WTF:
NeverDestroyed should relax adoption requirements on all RefCountedBase subclasses.
<https://webkit.org/b/152960>

Reviewed by Antti Koivisto.

Instead of relaxing on subclasses of RefCounted<T>, relax on subclasses of RefCountedBase.
This allows e.g NeverDestroyed<CSSPrimitiveValue> to relax its pointee despite the class
hierarchy starting with RefCounted<CSSValue> (not RefCounted<CSSPrimitiveValue>.)

  • wtf/NeverDestroyed.h:
3:39 AM Changeset in webkit [194847] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

[GTK] Cleanup RenderThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=152888

Reviewed by Michael Catanzaro.

Use a common path for GTK+ 3.19 and previous versions, simplifying
the code and removing a lot of ifdefs.

  • createStyleContext() now receives a theme part enum value, and an optional parent GtkStyleContext. It encapsulates all the differences between GTK+ 3.19 and previous version leaving the rendering code common and free of ifdefs.
  • Stock icons support have been removed, simplifying the code that now always renders symbolic icons, updating the colors depending on the current state.
  • Media button and colors have been removed, because they are unused now that we render the media controls with CSS.
  • ComboBox separators support has also been removed. In GTK+ 3.19 combo boxes no longer have separators and most of the GTK+ themes don't use the either, so it's better to simple not render them anymore in WebKit either.
  • Code to paint caps lock indicator has been removed too, since caps lock indicator is now shadow dom and automatically rendered by WebCore.
  • rendering/RenderThemeGtk.cpp:

(WebCore::createStyleContext):
(WebCore::loadThemedIcon):
(WebCore::gtkIconStateFlags):
(WebCore::RenderThemeGtk::adjustRepaintRect):
(WebCore::setToggleSize):
(WebCore::paintToggle):
(WebCore::RenderThemeGtk::setCheckboxSize):
(WebCore::RenderThemeGtk::paintCheckbox):
(WebCore::RenderThemeGtk::setRadioSize):
(WebCore::RenderThemeGtk::paintRadio):
(WebCore::RenderThemeGtk::paintButton):
(WebCore::getComboBoxMetrics):
(WebCore::RenderThemeGtk::popupInternalPaddingLeft):
(WebCore::RenderThemeGtk::popupInternalPaddingRight):
(WebCore::RenderThemeGtk::popupInternalPaddingTop):
(WebCore::RenderThemeGtk::popupInternalPaddingBottom):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::adjustSearchFieldIconStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::paintIcon):
(WebCore::paintEntryIcon):
(WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
(WebCore::RenderThemeGtk::shouldHaveCapsLockIndicator):
(WebCore::RenderThemeGtk::paintSliderTrack):
(WebCore::RenderThemeGtk::paintSliderThumb):
(WebCore::RenderThemeGtk::adjustSliderThumbSize):
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
(WebCore::paintSpinArrowButton):
(WebCore::RenderThemeGtk::paintInnerSpinButton):
(WebCore::styleColor):
(WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeGtk::systemColor):
(WebCore::RenderThemeGtk::paintMediaButton):
(WebCore::RenderThemeGtk::paintMediaFullscreenButton):
(WebCore::RenderThemeGtk::paintMediaMuteButton):
(WebCore::RenderThemeGtk::paintMediaPlayButton):
(WebCore::RenderThemeGtk::paintMediaSeekBackButton):
(WebCore::RenderThemeGtk::paintMediaSeekForwardButton):
(WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):

  • rendering/RenderThemeGtk.h:
3:37 AM WebKitGTK/2.10.x edited by mario@webkit.org
(diff)
3:32 AM Changeset in webkit [194846] by mario@webkit.org
  • 2 edits in trunk/Source/WebKit2

[WK2][GTK] Propagate motion-notify-event signals from the WebView
https://bugs.webkit.org/show_bug.cgi?id=152974

Reviewed by Carlos Garcia Campos.

Always propagate motion-notify-event signals, regardless of what the
web process does, so that we can listen for those events (which does
not act on specific targets inside the webview) from the container
widget too, and not just from the WebView itself.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseMotionNotifyEvent): Ensure the signal gets propagated.

2:49 AM Changeset in webkit [194845] by Michael Catanzaro
  • 4 edits
    2 adds in trunk

[GTK] W3C CSS2.1 anonymous table tests are failing
https://bugs.webkit.org/show_bug.cgi?id=152455

Reviewed by Mario Sanchez Prada.

Tools:

Add shared-mime-info to the jhbuild environment, since it affects the results of layout
tests. Add upstream patches to fix detection of XHTML files.

  • gtk/jhbuild.modules:
  • gtk/patches/shared-mime-info-xht-glob.patch: Added.
  • gtk/patches/shared-mime-info-xhtml-magic.patch: Added.

LayoutTests:

Unskip the anonymous table tests, so the bots can generate expected results. The expected
results will be committed separately.

  • platform/gtk/TestExpectations:
2:40 AM Changeset in webkit [194844] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

[GTK] Cleanup ScrollbarThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=152830

Reviewed by Michael Catanzaro.

Use a common path for GTK+ 3.19 and previous versions, simplifying
the code and removing a lot of ifdefs. Use always a new
GtkStyleContext, but when painting cache the newly created one so
all paint methods use that one. We were also caching some theme
properties assuming they don't change unless the theme changes,
but some of them can have different values depending on the state,
for example, when hovered or pressed. Those properties are now
only cached when we create a new GtkStyleContext.
The method updateScrollbarsFrameThickness() has also been removed,
since the Scrollbar constructor already initializes the frame rect
using the scrollbarThickness(). This method was not doing anything
anyway, since that was called on the constructor of the theme,
when there were no scrollbars registered. This also means we no
longer need to track registered/unregistered scrollbars.

  • platform/gtk/ScrollbarThemeGtk.cpp:

(WebCore::ScrollbarThemeGtk::backButtonRect): Use the cached
GtkStyleContext and properties or create a new.
(WebCore::ScrollbarThemeGtk::forwardButtonRect): Ditto.
(WebCore::ScrollbarThemeGtk::trackRect): Ditto.
(WebCore::orientationStyleClass):
(WebCore::ScrollbarThemeGtk::getOrCreateStyleContext): Create a
new GtkStyleContext for the scrollbar if there isn't a cached
one. Also initialize the properties that depend on the state.
(WebCore::createChildStyleContext): Create a new GtkStyleContext
from a parent one.
(WebCore::ScrollbarThemeGtk::updateThemeProperties): Get the
properties that can only change when the theme changes.
(WebCore::ScrollbarThemeGtk::thumbRect): Use the cached
GtkStyleContext and properties or create a new.
(WebCore::adjustRectAccordingToMargin): Use always the
GtkStyleContext state instead of receiving it and setting it again.
(WebCore::ScrollbarThemeGtk::paintTrackBackground): Get or create
a GtkStyleContext for the scrollbar and create a child one for the trough.
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Use the
cached GtkStyleContext or create a new one.
(WebCore::ScrollbarThemeGtk::paintThumb): Get or create a
GtkStyleContext for the scrollbar and create a child ones for
trough and slider.
(WebCore::ScrollbarThemeGtk::paintButton): Get or create a
GtkStyleContext for the scrollbar and create a child one for the button.
(WebCore::ScrollbarThemeGtk::paint): Create a GtkStyleContext and
cache it temporarily using TemporaryChange until the method finishes.
(WebCore::ScrollbarThemeGtk::scrollbarThickness): Use the cached
GtkStyleContext and properties or create a new.
(WebCore::ScrollbarThemeGtk::buttonSize): Ditto.

  • platform/gtk/ScrollbarThemeGtk.h:

Jan 10, 2016:

11:27 PM Changeset in webkit [194843] by bshafiei@apple.com
  • 7 edits in tags/Safari-601.5.8.2/Source/WebCore

Merged r194719. rdar://problem/23769758

11:22 PM Changeset in webkit [194842] by bshafiei@apple.com
  • 5 edits in tags/Safari-601.5.8.2/Source

Versioning.

11:19 PM Changeset in webkit [194841] by bshafiei@apple.com
  • 1 copy in tags/Safari-601.5.8.2

New tag.

10:49 PM Changeset in webkit [194840] by sbarati@apple.com
  • 34 edits
    9 adds in trunk

Implement a sampling profiler
https://bugs.webkit.org/show_bug.cgi?id=151713

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This patch implements a sampling profiler for JavaScriptCore
that will be used in the Inspector UI. The implementation works as follows:
We queue the sampling profiler to run a task on a background
thread every 1ms. When the queued task executes, the sampling profiler
will pause the JSC execution thread and attempt to take a stack trace.
The sampling profiler does everything it can to be very careful
while taking this stack trace. Because it's reading arbitrary memory,
the sampling profiler must validate every pointer it reads from.

The sampling profiler tries to get an ExecutableBase for every call frame
it reads. It first tries to read the CodeBlock slot. It does this because
it can be 100% certain that a pointer is a CodeBlock while it's taking a
stack trace. But, not every call frame will have a CodeBlock. So we must read
the call frame's callee. For these stack traces where we read the callee, we
must verify the callee pointer, and the pointer traversal to an ExecutableBase,
on the main JSC execution thread, and not on the thread taking the stack
trace. We do this verification either before we run the marking phase in
GC, or when somebody asks the SamplingProfiler to materialize its data.

The SamplingProfiler must also be careful to not grab any locks while the JSC execution
thread is paused (this means it can't do anything that mallocs) because
that could cause a deadlock. Therefore, the sampling profiler grabs
locks for all data structures it consults before it pauses the JSC
execution thread.

(JSC::CodeBlock::clearVisitWeaklyHasBeenCalled):
(JSC::CodeBlockSet::mark):

  • dfg/DFGNodeType.h:
  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::add):
(JSC::CodeBlockSet::promoteYoungCodeBlocks):
(JSC::CodeBlockSet::clearMarksForFullCollection):
(JSC::CodeBlockSet::lastChanceToFinalize):
(JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced):
(JSC::CodeBlockSet::contains):
(JSC::CodeBlockSet::writeBarrierCurrentlyExecutingCodeBlocks):
(JSC::CodeBlockSet::remove): Deleted.

  • heap/CodeBlockSet.h:

(JSC::CodeBlockSet::getLock):
(JSC::CodeBlockSet::iterate):
The sampling pofiler uses the heap's CodeBlockSet to validate
CodeBlock pointers. This data structure must now be under a lock
because we must be certain we're not pausing the JSC execution thread
while it's manipulating this data structure.

  • heap/ConservativeRoots.cpp:

(JSC::ConservativeRoots::ConservativeRoots):
(JSC::ConservativeRoots::grow):
(JSC::ConservativeRoots::genericAddPointer):
(JSC::ConservativeRoots::genericAddSpan):
(JSC::ConservativeRoots::add):
(JSC::CompositeMarkHook::CompositeMarkHook):
(JSC::CompositeMarkHook::mark):

  • heap/ConservativeRoots.h:
  • heap/Heap.cpp:

(JSC::Heap::markRoots):
(JSC::Heap::visitHandleStack):
(JSC::Heap::visitSamplingProfiler):
(JSC::Heap::traceCodeBlocksAndJITStubRoutines):
(JSC::Heap::snapshotMarkedSpace):

  • heap/Heap.h:

(JSC::Heap::structureIDTable):
(JSC::Heap::codeBlockSet):

  • heap/MachineStackMarker.cpp:

(pthreadSignalHandlerSuspendResume):
(JSC::getCurrentPlatformThread):
(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::Thread::createForCurrentThread):
(JSC::MachineThreads::Thread::operator==):
(JSC::isThreadInList):
(JSC::MachineThreads::addCurrentThread):
(JSC::MachineThreads::machineThreadForCurrentThread):
(JSC::MachineThreads::removeThread):
(JSC::MachineThreads::gatherFromCurrentThread):
(JSC::MachineThreads::Thread::Thread):
(JSC::MachineThreads::Thread::~Thread):
(JSC::MachineThreads::Thread::suspend):
(JSC::MachineThreads::Thread::resume):
(JSC::MachineThreads::Thread::getRegisters):
(JSC::MachineThreads::Thread::Registers::stackPointer):
(JSC::MachineThreads::Thread::Registers::framePointer):
(JSC::MachineThreads::Thread::Registers::instructionPointer):
(JSC::MachineThreads::Thread::freeRegisters):
(JSC::MachineThreads::tryCopyOtherThreadStacks):
(JSC::pthreadSignalHandlerSuspendResume): Deleted.
(JSC::MachineThreads::Thread::operator!=): Deleted.

  • heap/MachineStackMarker.h:

(JSC::MachineThreads::Thread::operator!=):
(JSC::MachineThreads::getLock):
(JSC::MachineThreads::threadsListHead):
We can now ask a MachineThreads::Thread for its frame pointer
and program counter on darwin and windows platforms. efl
and gtk implementations will happen in another patch.

  • heap/MarkedBlockSet.h:

(JSC::MarkedBlockSet::getLock):
(JSC::MarkedBlockSet::add):
(JSC::MarkedBlockSet::remove):
(JSC::MarkedBlockSet::recomputeFilter):
(JSC::MarkedBlockSet::filter):
(JSC::MarkedBlockSet::set):

  • heap/MarkedSpace.cpp:

(JSC::Free::Free):
(JSC::Free::operator()):
(JSC::FreeOrShrink::FreeOrShrink):
(JSC::FreeOrShrink::operator()):
(JSC::MarkedSpace::~MarkedSpace):
(JSC::MarkedSpace::isPagedOut):
(JSC::MarkedSpace::freeBlock):
(JSC::MarkedSpace::freeOrShrinkBlock):
(JSC::MarkedSpace::shrink):

  • heap/MarkedSpace.h:

(JSC::MarkedSpace::forEachLiveCell):
(JSC::MarkedSpace::forEachDeadCell):

  • interpreter/CallFrame.h:

(JSC::ExecState::calleeAsValue):
(JSC::ExecState::callee):
(JSC::ExecState::unsafeCallee):
(JSC::ExecState::codeBlock):
(JSC::ExecState::scope):

  • jit/ExecutableAllocator.cpp:

(JSC::ExecutableAllocator::dumpProfile):
(JSC::ExecutableAllocator::getLock):
(JSC::ExecutableAllocator::isValidExecutableMemory):

  • jit/ExecutableAllocator.h:
  • jit/ExecutableAllocatorFixedVMPool.cpp:

(JSC::ExecutableAllocator::allocate):
(JSC::ExecutableAllocator::isValidExecutableMemory):
(JSC::ExecutableAllocator::getLock):
(JSC::ExecutableAllocator::committedByteCount):
The sampling profiler consults the ExecutableAllocator to check
if the frame pointer it reads is in executable allocated memory.

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionCheckModuleSyntax):
(functionStartSamplingProfiler):
(functionSamplingProfilerStackTraces):

  • llint/LLIntPCRanges.h: Added.

(JSC::LLInt::isLLIntPC):

  • offlineasm/asm.rb:

I added the ability to test whether the PC is executing
LLInt code because this code is not part of the memory
our executable allocator allocates.

  • runtime/Executable.h:

(JSC::ExecutableBase::isModuleProgramExecutable):
(JSC::ExecutableBase::isExecutableType):
(JSC::ExecutableBase::isHostFunction):

  • runtime/JSLock.cpp:

(JSC::JSLock::didAcquireLock):
(JSC::JSLock::unlock):

  • runtime/Options.h:
  • runtime/SamplingProfiler.cpp: Added.

(JSC::reportStats):
(JSC::FrameWalker::FrameWalker):
(JSC::FrameWalker::walk):
(JSC::FrameWalker::wasValidWalk):
(JSC::FrameWalker::advanceToParentFrame):
(JSC::FrameWalker::isAtTop):
(JSC::FrameWalker::resetAtMachineFrame):
(JSC::FrameWalker::isValidFramePointer):
(JSC::FrameWalker::isValidCodeBlock):
(JSC::FrameWalker::tryToGetExecutableFromCallee):
The FrameWalker class is used to walk the stack in a safe
manner. It doesn't do anything that would deadlock, and it
validates all pointers that it sees.

(JSC::SamplingProfiler::SamplingProfiler):
(JSC::SamplingProfiler::~SamplingProfiler):
(JSC::SamplingProfiler::visit):
(JSC::SamplingProfiler::shutdown):
(JSC::SamplingProfiler::start):
(JSC::SamplingProfiler::stop):
(JSC::SamplingProfiler::pause):
(JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread):
(JSC::SamplingProfiler::dispatchIfNecessary):
(JSC::SamplingProfiler::dispatchFunction):
(JSC::SamplingProfiler::noticeJSLockAcquisition):
(JSC::SamplingProfiler::noticeVMEntry):
(JSC::SamplingProfiler::observeStackTrace):
(JSC::SamplingProfiler::clearData):
(JSC::displayName):
(JSC::startLine):
(JSC::startColumn):
(JSC::sourceID):
(JSC::url):
(JSC::SamplingProfiler::stacktracesAsJSON):

  • runtime/SamplingProfiler.h: Added.

(JSC::SamplingProfiler::getLock):
(JSC::SamplingProfiler::setTimingInterval):
(JSC::SamplingProfiler::stackTraces):

  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::~VM):
(JSC::VM::setLastStackTop):
(JSC::VM::createContextGroup):
(JSC::VM::ensureWatchdog):
(JSC::VM::ensureSamplingProfiler):
(JSC::thunkGeneratorForIntrinsic):

  • runtime/VM.h:

(JSC::VM::watchdog):
(JSC::VM::isSafeToRecurse):
(JSC::VM::lastStackTop):
(JSC::VM::scratchBufferForSize):
(JSC::VM::samplingProfiler):
(JSC::VM::setShouldRewriteConstAsVar):
(JSC::VM::setLastStackTop): Deleted.

  • runtime/VMEntryScope.cpp:

(JSC::VMEntryScope::VMEntryScope):

  • tests/stress/sampling-profiler: Added.
  • tests/stress/sampling-profiler-anonymous-function.js: Added.

(foo):
(baz):

  • tests/stress/sampling-profiler-basic.js: Added.

(bar):
(foo):
(nothing):
(top):
(jaz):
(kaz):
(checkInlining):

  • tests/stress/sampling-profiler-deep-stack.js: Added.

(foo):
(hellaDeep):
(start):

  • tests/stress/sampling-profiler-microtasks.js: Added.

(testResults):
(loop.jaz):
(loop):

  • tests/stress/sampling-profiler/samplingProfiler.js: Added.

(assert):
(let.nodePrototype.makeChildIfNeeded):
(makeNode):
(updateCallingContextTree):
(doesTreeHaveStackTrace):
(makeTree):
(runTest):
(dumpTree):

  • tools/JSDollarVMPrototype.cpp:

(JSC::JSDollarVMPrototype::isInObjectSpace):
(JSC::JSDollarVMPrototype::isInStorageSpace):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::generateEnter):
(JSC::Yarr::YarrGenerator::generateReturn):
(JSC::Yarr::YarrGenerator::YarrGenerator):
(JSC::Yarr::YarrGenerator::compile):
(JSC::Yarr::jitCompile):
We now have a boolean that's set to true when
we're executing a RegExp, and to false otherwise.
The boolean lives off of VM.

(JSC::CodeBlock::clearVisitWeaklyHasBeenCalled):
(JSC::CodeBlockSet::mark):

  • dfg/DFGNodeType.h:
  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::add):
(JSC::CodeBlockSet::promoteYoungCodeBlocks):
(JSC::CodeBlockSet::clearMarksForFullCollection):
(JSC::CodeBlockSet::lastChanceToFinalize):
(JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced):
(JSC::CodeBlockSet::contains):
(JSC::CodeBlockSet::writeBarrierCurrentlyExecutingCodeBlocks):
(JSC::CodeBlockSet::remove): Deleted.

  • heap/CodeBlockSet.h:

(JSC::CodeBlockSet::getLock):
(JSC::CodeBlockSet::iterate):

  • heap/ConservativeRoots.cpp:

(JSC::ConservativeRoots::ConservativeRoots):
(JSC::ConservativeRoots::genericAddPointer):
(JSC::ConservativeRoots::add):
(JSC::CompositeMarkHook::CompositeMarkHook):
(JSC::CompositeMarkHook::mark):

  • heap/ConservativeRoots.h:
  • heap/Heap.cpp:

(JSC::Heap::markRoots):
(JSC::Heap::visitHandleStack):
(JSC::Heap::visitSamplingProfiler):
(JSC::Heap::traceCodeBlocksAndJITStubRoutines):

  • heap/Heap.h:

(JSC::Heap::structureIDTable):
(JSC::Heap::codeBlockSet):

  • heap/HeapInlines.h:

(JSC::Heap::didFreeBlock):
(JSC::Heap::isPointerGCObject):
(JSC::Heap::isValueGCObject):

  • heap/MachineStackMarker.cpp:

(pthreadSignalHandlerSuspendResume):
(JSC::getCurrentPlatformThread):
(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::Thread::createForCurrentThread):
(JSC::MachineThreads::Thread::operator==):
(JSC::isThreadInList):
(JSC::MachineThreads::addCurrentThread):
(JSC::MachineThreads::machineThreadForCurrentThread):
(JSC::MachineThreads::removeThread):
(JSC::MachineThreads::gatherFromCurrentThread):
(JSC::MachineThreads::Thread::Thread):
(JSC::MachineThreads::Thread::~Thread):
(JSC::MachineThreads::Thread::suspend):
(JSC::MachineThreads::Thread::resume):
(JSC::MachineThreads::Thread::getRegisters):
(JSC::MachineThreads::Thread::Registers::stackPointer):
(JSC::MachineThreads::Thread::Registers::framePointer):
(JSC::MachineThreads::Thread::Registers::instructionPointer):
(JSC::MachineThreads::Thread::freeRegisters):
(JSC::pthreadSignalHandlerSuspendResume): Deleted.
(JSC::MachineThreads::Thread::operator!=): Deleted.

  • heap/MachineStackMarker.h:

(JSC::MachineThreads::Thread::operator!=):
(JSC::MachineThreads::getLock):
(JSC::MachineThreads::threadsListHead):

  • heap/MarkedBlockSet.h:
  • heap/MarkedSpace.cpp:

(JSC::Free::Free):
(JSC::Free::operator()):
(JSC::FreeOrShrink::FreeOrShrink):
(JSC::FreeOrShrink::operator()):

  • interpreter/CallFrame.h:

(JSC::ExecState::calleeAsValue):
(JSC::ExecState::callee):
(JSC::ExecState::unsafeCallee):
(JSC::ExecState::codeBlock):
(JSC::ExecState::scope):

  • jit/ExecutableAllocator.cpp:

(JSC::ExecutableAllocator::dumpProfile):
(JSC::ExecutableAllocator::getLock):
(JSC::ExecutableAllocator::isValidExecutableMemory):

  • jit/ExecutableAllocator.h:
  • jit/ExecutableAllocatorFixedVMPool.cpp:

(JSC::ExecutableAllocator::allocate):
(JSC::ExecutableAllocator::isValidExecutableMemory):
(JSC::ExecutableAllocator::getLock):
(JSC::ExecutableAllocator::committedByteCount):

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionCheckModuleSyntax):
(functionPlatformSupportsSamplingProfiler):
(functionStartSamplingProfiler):
(functionSamplingProfilerStackTraces):

  • llint/LLIntPCRanges.h: Added.

(JSC::LLInt::isLLIntPC):

  • offlineasm/asm.rb:
  • runtime/Executable.h:

(JSC::ExecutableBase::isModuleProgramExecutable):
(JSC::ExecutableBase::isExecutableType):
(JSC::ExecutableBase::isHostFunction):

  • runtime/JSLock.cpp:

(JSC::JSLock::didAcquireLock):
(JSC::JSLock::unlock):

  • runtime/Options.h:
  • runtime/SamplingProfiler.cpp: Added.

(JSC::reportStats):
(JSC::FrameWalker::FrameWalker):
(JSC::FrameWalker::walk):
(JSC::FrameWalker::wasValidWalk):
(JSC::FrameWalker::advanceToParentFrame):
(JSC::FrameWalker::isAtTop):
(JSC::FrameWalker::resetAtMachineFrame):
(JSC::FrameWalker::isValidFramePointer):
(JSC::FrameWalker::isValidCodeBlock):
(JSC::SamplingProfiler::SamplingProfiler):
(JSC::SamplingProfiler::~SamplingProfiler):
(JSC::SamplingProfiler::processUnverifiedStackTraces):
(JSC::SamplingProfiler::visit):
(JSC::SamplingProfiler::shutdown):
(JSC::SamplingProfiler::start):
(JSC::SamplingProfiler::stop):
(JSC::SamplingProfiler::pause):
(JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread):
(JSC::SamplingProfiler::dispatchIfNecessary):
(JSC::SamplingProfiler::dispatchFunction):
(JSC::SamplingProfiler::noticeJSLockAcquisition):
(JSC::SamplingProfiler::noticeVMEntry):
(JSC::SamplingProfiler::clearData):
(JSC::displayName):
(JSC::SamplingProfiler::stacktracesAsJSON):
(WTF::printInternal):

  • runtime/SamplingProfiler.h: Added.

(JSC::SamplingProfiler::StackFrame::StackFrame):
(JSC::SamplingProfiler::getLock):
(JSC::SamplingProfiler::setTimingInterval):
(JSC::SamplingProfiler::stackTraces):

  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::~VM):
(JSC::VM::setLastStackTop):
(JSC::VM::createContextGroup):
(JSC::VM::ensureWatchdog):
(JSC::VM::ensureSamplingProfiler):
(JSC::thunkGeneratorForIntrinsic):

  • runtime/VM.h:

(JSC::VM::watchdog):
(JSC::VM::samplingProfiler):
(JSC::VM::isSafeToRecurse):
(JSC::VM::lastStackTop):
(JSC::VM::scratchBufferForSize):
(JSC::VM::setLastStackTop): Deleted.

  • runtime/VMEntryScope.cpp:

(JSC::VMEntryScope::VMEntryScope):

  • tests/stress/sampling-profiler: Added.
  • tests/stress/sampling-profiler-anonymous-function.js: Added.

(platformSupportsSamplingProfiler.foo):
(platformSupportsSamplingProfiler.baz):
(platformSupportsSamplingProfiler):

  • tests/stress/sampling-profiler-basic.js: Added.

(platformSupportsSamplingProfiler.bar):
(platformSupportsSamplingProfiler.foo):
(platformSupportsSamplingProfiler.nothing):
(platformSupportsSamplingProfiler.top):
(platformSupportsSamplingProfiler.jaz):
(platformSupportsSamplingProfiler.kaz):
(platformSupportsSamplingProfiler.checkInlining):
(platformSupportsSamplingProfiler):

  • tests/stress/sampling-profiler-deep-stack.js: Added.

(platformSupportsSamplingProfiler.foo):
(platformSupportsSamplingProfiler.let.hellaDeep):
(platformSupportsSamplingProfiler.let.start):
(platformSupportsSamplingProfiler):

  • tests/stress/sampling-profiler-microtasks.js: Added.

(platformSupportsSamplingProfiler.testResults):
(platformSupportsSamplingProfiler):
(platformSupportsSamplingProfiler.loop.jaz):
(platformSupportsSamplingProfiler.loop):

  • tests/stress/sampling-profiler/samplingProfiler.js: Added.

(assert):
(let.nodePrototype.makeChildIfNeeded):
(makeNode):
(updateCallingContextTree):
(doesTreeHaveStackTrace):
(makeTree):
(runTest):
(dumpTree):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::generateEnter):
(JSC::Yarr::YarrGenerator::generateReturn):
(JSC::Yarr::YarrGenerator::YarrGenerator):
(JSC::Yarr::YarrGenerator::compile):
(JSC::Yarr::jitCompile):

Source/WTF:

  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocator::decrementPageOccupancy):
(WTF::MetaAllocator::isInAllocatedMemory):
(WTF::MetaAllocator::roundUp):

  • wtf/MetaAllocator.h:

(WTF::MetaAllocator::getLock):

  • wtf/Platform.h:

Tools:

  • Scripts/run-jsc-stress-tests:
9:55 PM Changeset in webkit [194839] by mmaxfield@apple.com
  • 6 edits
    3 adds in trunk

[SVG -> OTF Converter] Parsing failures cause use of incomplete fonts
https://bugs.webkit.org/show_bug.cgi?id=152772
<rdar://problem/24043104>

Reviewed by Simon Fraser.

Source/WebCore:

Originally, if we fail to parse a glyph, we would simply skip the glyph. However, this means that
we will create an incomplete font without all the necessary glyphs. This causes very distressing
text where all the occurances of a particular letter are missing. Instead, we should treat the
entire font as invalid.

Test: fast/text/svg-font-invalid-glyph-path-failure.html

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::font):

  • loader/cache/CachedSVGFont.cpp:

(WebCore::CachedSVGFont::ensureCustomFontData):

  • svg/SVGToOTFFontConversion.cpp:

(WebCore::SVGToOTFFontConverter::error):
(WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
(WebCore::SVGToOTFFontConverter::processGlyphElement):
(WebCore::convertSVGToOTFFont):

  • svg/SVGToOTFFontConversion.h:

LayoutTests:

Make sure the font renders as if its invalid.

  • fast/text/resources/bustedfont.svg: Added.
  • fast/text/svg-font-invalid-glyph-path-failure-expected.html: Added.
  • fast/text/svg-font-invalid-glyph-path-failure.html: Added.
9:54 PM Changeset in webkit [194838] by Yusuke Suzuki
  • 16 edits
    2 copies
    12 adds in trunk

[JSC] Iterating over a Set/Map is too slow
https://bugs.webkit.org/show_bug.cgi?id=152691

Reviewed by Saam Barati.

Source/JavaScriptCore:

Set#forEach and Set & for-of are very slow. There are 2 reasons.

  1. forEach is implemented in C++. And typically, taking JS callback and calling it from C++.

C++ to JS transition seems costly. perf result in Linux machine shows this.

Samples: 23K of event 'cycles', Event count (approx.): 21446074385
34.04% jsc libjavascriptcoregtk-4.0.so.18.3.1 . JSC::Interpreter::execute(JSC::CallFrameClosure&)
20.48% jsc libjavascriptcoregtk-4.0.so.18.3.1 . vmEntryToJavaScript

9.80% jsc libjavascriptcoregtk-4.0.so.18.3.1 . JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)
7.95% jsc libjavascriptcoregtk-4.0.so.18.3.1 . JSC::setProtoFuncForEach(JSC::ExecState*)
5.65% jsc perf-22854.map . 0x00007f5d2c204a6f

Writing forEach in JS eliminates this.

Samples: 23K of event 'cycles', Event count (approx.): 21255691651
62.91% jsc perf-22890.map . 0x00007fd117c0a3b9
24.89% jsc libjavascriptcoregtk-4.0.so.18.3.1 . JSC::privateFuncSetIteratorNext(JSC::ExecState*)

0.29% jsc libjavascriptcoregtk-4.0.so.18.3.1 . JSC::CodeBlock::updateAllPredictionsAndCountLiveness(unsigned int&, unsigned int&)
0.24% jsc [vdso] . 0x00000000000008e8
0.22% jsc libjavascriptcoregtk-4.0.so.18.3.1 . JSC::CodeBlock::predictedMachineCodeSize()
0.16% jsc libjavascriptcoregtk-4.0.so.18.3.1 . WTF::MetaAllocator::currentStatistics()
0.15% jsc libjavascriptcoregtk-4.0.so.18.3.1 . JSC::Lexer<unsigned char>::lex(JSC::JSToken*, unsigned int, bool)

  1. Iterator result object allocation is costly.

Iterator result object allocation is costly. Even if the (1) is solved, when executing Set & for-of, perf result shows very slow performance due to (2).

Samples: 108K of event 'cycles', Event count (approx.): 95529273748
18.02% jsc libjavascriptcoregtk-4.0.so.18.3.1 . JSC::createIteratorResultObject(JSC::ExecState*, JSC::JSValue, bool)
15.68% jsc jsc . JSC::JSObject::putDirect(JSC::VM&, JSC::PropertyName, JSC::JSValue, unsigned int)
14.18% jsc libjavascriptcoregtk-4.0.so.18.3.1 . JSC::PrototypeMap::emptyObjectStructureForPrototype(JSC::JSObject*, unsigned int)
13.40% jsc perf-25420.map . 0x00007fce158006a1

6.79% jsc libjavascriptcoregtk-4.0.so.18.3.1 . JSC::StructureTransitionTable::get(WTF::UniquedStringImpl*, unsigned int) const

In the long term, we should implement SetIterator#next in JS and make the iterator result object allocation written in JS to encourage object allocation elimination in FTL.
But seeing the perf result, we can find the easy to fix bottleneck in the current implementation.
Every time createIteratorResultObject creates the empty object and use putDirect to store properties.
The pre-baked Structure* with done and value properties makes this implementation fast.

After these improvements, the micro benchmark[1] shows the following.

old:

Linked List x 212,776 ops/sec ±0.21% (162 runs sampled)
Array x 376,156 ops/sec ±0.20% (162 runs sampled)
Array forEach x 17,345 ops/sec ±0.99% (137 runs sampled)
Array for-of x 16,518 ops/sec ±0.58% (160 runs sampled)
Set forEach x 13,263 ops/sec ±0.20% (162 runs sampled)
Set for-of x 4,732 ops/sec ±0.34% (123 runs sampled)

new:

Linked List x 210,833 ops/sec ±0.28% (161 runs sampled)
Array x 371,347 ops/sec ±0.36% (162 runs sampled)
Array forEach x 17,460 ops/sec ±0.84% (136 runs sampled)
Array for-of x 16,188 ops/sec ±1.27% (158 runs sampled)
Set forEach x 23,684 ops/sec ±2.46% (139 runs sampled)
Set for-of x 12,176 ops/sec ±0.54% (157 runs sampled)

Set#forEach becomes comparable to Array#forEach. And Set#forEach and Set & for-of are improved (1.79x, and 2.57x).
After this optimizations, they are still much slower than linked list and array.
This should be optimized in the long term.

[1]: https://gist.github.com/Constellation/8db5f5b8f12fe7e283d0

  • CMakeLists.txt:
  • DerivedSources.make:
  • JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  • JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/MapPrototype.js: Copied from Source/JavaScriptCore/runtime/IteratorOperations.h.

(forEach):

  • builtins/SetPrototype.js: Copied from Source/JavaScriptCore/runtime/IteratorOperations.h.

(forEach):

  • runtime/CommonIdentifiers.h:
  • runtime/IteratorOperations.cpp:

(JSC::createIteratorResultObjectStructure):
(JSC::createIteratorResultObject):

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

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::iteratorResultObjectStructure):
(JSC::JSGlobalObject::iteratorResultStructure): Deleted.
(JSC::JSGlobalObject::iteratorResultStructureOffset): Deleted.

  • runtime/MapPrototype.cpp:

(JSC::MapPrototype::getOwnPropertySlot):
(JSC::privateFuncIsMap):
(JSC::privateFuncMapIterator):
(JSC::privateFuncMapIteratorNext):
(JSC::MapPrototype::finishCreation): Deleted.
(JSC::mapProtoFuncForEach): Deleted.

  • runtime/MapPrototype.h:
  • runtime/SetPrototype.cpp:

(JSC::SetPrototype::getOwnPropertySlot):
(JSC::privateFuncIsSet):
(JSC::privateFuncSetIterator):
(JSC::privateFuncSetIteratorNext):
(JSC::SetPrototype::finishCreation): Deleted.
(JSC::setProtoFuncForEach): Deleted.

  • runtime/SetPrototype.h:

LayoutTests:

Add regress tests.

  • js/regress/map-for-each-expected.txt: Added.
  • js/regress/map-for-each.html: Added.
  • js/regress/map-for-of-expected.txt: Added.
  • js/regress/map-for-of.html: Added.
  • js/regress/script-tests/map-for-each.js: Added.

(createMap):
(i.map.forEach):

  • js/regress/script-tests/map-for-of.js: Added.

(createMap):

  • js/regress/script-tests/set-for-each.js: Added.

(set forEach):
(set createSet):

  • js/regress/script-tests/set-for-of.js: Added.
  • js/regress/set-for-each-expected.txt: Added.
  • js/regress/set-for-each.html: Added.
  • js/regress/set-for-of-expected.txt: Added.
  • js/regress/set-for-of.html: Added.
7:44 PM Changeset in webkit [194837] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix ARM64 build.

  • b3/air/AirOpcode.opcodes:
7:25 PM Changeset in webkit [194836] by fpizlo@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

B3 should reduce Trunc(BitOr(value, constant)) where !(constant & 0xffffffff) to Trunc(value)
https://bugs.webkit.org/show_bug.cgi?id=152955

Reviewed by Saam Barati.

This happens when we box an int32 and then immediately unbox it.

This makes an enormous difference on AsmBench/FloatMM. It's a 2x speed-up on that
benchmark. It's neutral elsewhere.

  • b3/B3ReduceStrength.cpp:
  • b3/testb3.cpp:

(JSC::B3::testPowDoubleByIntegerLoop):
(JSC::B3::testTruncOrHigh):
(JSC::B3::testTruncOrLow):
(JSC::B3::testBitAndOrHigh):
(JSC::B3::testBitAndOrLow):
(JSC::B3::zero):
(JSC::B3::run):

5:38 PM Changeset in webkit [194835] by commit-queue@webkit.org
  • 21 edits
    2 deletes in trunk/Source/JavaScriptCore

[ES6] Arrow function syntax. Get rid of JSArrowFunction and use standard JSFunction class
https://bugs.webkit.org/show_bug.cgi?id=149855

Patch by Skachkov Oleksandr <gskachkov@gmail.com> on 2016-01-10
Reviewed by Saam Barati.

JSArrowFunction.h/cpp were removed from JavaScriptCore, because now is used new approach for storing
'this', 'arguments' and 'super'

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewFunction):

  • dfg/DFGStructureRegistrationPhase.cpp:

(JSC::DFG::StructureRegistrationPhase::run):

  • ftl/FTLAbstractHeapRepository.cpp:
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::DFG::LowerDFGToLLVM::compileNewFunction):

  • interpreter/Interpreter.cpp:
  • interpreter/Interpreter.h:
  • jit/JITOpcodes.cpp:
  • jit/JITOpcodes32_64.cpp:
  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • llint/LLIntOffsetsExtractor.cpp:
  • llint/LLIntSlowPaths.cpp:
  • runtime/JSArrowFunction.cpp: Removed.
  • runtime/JSArrowFunction.h: Removed.
  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:
4:58 PM Changeset in webkit [194834] by fpizlo@apple.com
  • 9 edits in trunk/Source

It should be possible to run liveness over registers without also tracking Tmps
https://bugs.webkit.org/show_bug.cgi?id=152963

Reviewed by Saam Barati.

Source/JavaScriptCore:

This adds a RegLivenessAdapter so that we can run Liveness over registers. This makes it
easier to write certain kinds of phases, like ReportUsedRegisters. I anticipate writing more
code like that for handling cold function calls. It also makes code like that somewhat more
scalable, since we're no longer using HashSets.

Currently, the way we track sets of registers is with a BitVector. Normally, we use the
RegisterSet class, which wraps BitVector, so that we can add()/contains() on Reg's. But in
the liveness analysis, everything gets turned into an index. So, we want to use BitVector
directly. To do that, I needed to make the BitVector API look a bit more like a set API. I
think that this is good, because the lack of set methods (add/remove/contains) has caused
bugs in the past. This makes BitVector have methods both for set operations on bits and array
operations on bits. I think that's good, since BitVector gets used in both contexts.

  • b3/B3IndexSet.h:

(JSC::B3::IndexSet::Iterable::iterator::iterator):
(JSC::B3::IndexSet::Iterable::begin):
(JSC::B3::IndexSet::dump):

  • b3/air/AirInstInlines.h:

(JSC::B3::Air::ForEach<Tmp>::forEach):
(JSC::B3::Air::ForEach<Arg>::forEach):
(JSC::B3::Air::ForEach<Reg>::forEach):
(JSC::B3::Air::Inst::forEach):

  • b3/air/AirLiveness.h:

(JSC::B3::Air::RegLivenessAdapter::RegLivenessAdapter):
(JSC::B3::Air::RegLivenessAdapter::maxIndex):
(JSC::B3::Air::RegLivenessAdapter::acceptsType):
(JSC::B3::Air::RegLivenessAdapter::valueToIndex):
(JSC::B3::Air::RegLivenessAdapter::indexToValue):

  • b3/air/AirReportUsedRegisters.cpp:

(JSC::B3::Air::reportUsedRegisters):

  • jit/Reg.h:

(JSC::Reg::next):
(JSC::Reg::index):
(JSC::Reg::maxIndex):
(JSC::Reg::isSet):
(JSC::Reg::operator bool):

  • jit/RegisterSet.h:

(JSC::RegisterSet::forEach):

Source/WTF:

Add set methods (add/contains/remove) to BitVector, since it gets used as a set in a lot of
places. This also makes BitVector a drop-in replacement for HashSet<unsigned> in a lot of
places.

Also made the iterator methods of BitVector live on BitVector directly rather than behind the
thing returned from setBits(). This makes sense since that makes BitVector even more of a
drop-in for HashSet. It's not harmful since we've never added any other mode of iterating a
BitVector other than this, so it doesn't make sense to make it harder to access.

  • wtf/BitVector.h:

(WTF::BitVector::get):
(WTF::BitVector::contains):
(WTF::BitVector::set):
(WTF::BitVector::add):
(WTF::BitVector::ensureSizeAndSet):
(WTF::BitVector::clear):
(WTF::BitVector::remove):
(WTF::BitVector::hash):
(WTF::BitVector::iterator::iterator):
(WTF::BitVector::iterator::operator*):
(WTF::BitVector::iterator::operator++):
(WTF::BitVector::iterator::operator==):
(WTF::BitVector::iterator::operator!=):
(WTF::BitVector::begin):
(WTF::BitVector::end):
(WTF::BitVector::bitsInPointer):
(WTF::BitVector::SetBitsIterable::SetBitsIterable): Deleted.
(WTF::BitVector::SetBitsIterable::iterator::iterator): Deleted.
(WTF::BitVector::SetBitsIterable::iterator::operator*): Deleted.
(WTF::BitVector::SetBitsIterable::iterator::operator++): Deleted.
(WTF::BitVector::SetBitsIterable::iterator::operator==): Deleted.
(WTF::BitVector::SetBitsIterable::iterator::operator!=): Deleted.
(WTF::BitVector::SetBitsIterable::begin): Deleted.
(WTF::BitVector::SetBitsIterable::end): Deleted.
(WTF::BitVector::setBits): Deleted.

2:33 PM Changeset in webkit [194833] by commit-queue@webkit.org
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Make branchMul functional in ARM B3 and minor fixes
https://bugs.webkit.org/show_bug.cgi?id=152889

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-01-10
Reviewed by Mark Lam.

ARM64 does not have a "S" version of MUL setting the flags.
What we do is abstract that in the MacroAssembler. The problem
is that form requires scratch registers.

For simplicity, I just exposed the two scratch registers
for Air. Filip already added the concept of Scratch role,
all I needed was to expose it for opcodes.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::branchMul32):
(JSC::MacroAssemblerARM64::branchMul64):
Expose a version with the scratch registers as arguments.

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::lower):
Add the new form of CheckMul lowering.

  • b3/air/AirOpcode.opcodes:

Expose the new BranchMuls.
Remove all the Test variants that use immediates
since Air can't handle those immediates correctly yet.

  • b3/air/opcode_generator.rb:

Expose the Scratch role.

  • b3/testb3.cpp:

(JSC::B3::testPatchpointLotsOfLateAnys):
Ooops, the scratch registers were not clobbered. We were just lucky
on x86.

1:56 PM Changeset in webkit [194832] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[webkitdirs] Try arch and uname commands on non-windows OS
https://bugs.webkit.org/show_bug.cgi?id=152958

Patch by Konstantin Tokarev <Konstantin Tokarev> on 2016-01-10
Reviewed by Michael Catanzaro.

Right now, determineArchitecture() uses arch and uname -m

commands to determine architecture in case of condition (isGtk() isAppleMacWebKit()
isEfl()) is true. This should be !anyWindows()

instead, because this code is applicable to any non-windows OS WebKit
supports (even Haiku which once was supported is moderately
POSIX-compliant and has uname command).

  • Scripts/webkitdirs.pm:

(determineArchitecture):

1:42 PM Changeset in webkit [194831] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] B3 is unable to do function calls on ARM64
https://bugs.webkit.org/show_bug.cgi?id=152895

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-01-10
Reviewed by Mark Lam.

Apparently iOS does not follow the ARM64 ABI for function calls.
Instead of giving each value a 8 bytes slot, it must be packed
while preserving alignment.

This patch adds a #ifdef to make function calls functional.

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::marshallCCallArgument):
(JSC::B3::Air::LowerToAir::lower):

12:28 PM Changeset in webkit [194830] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception selecting IndexedDB host folder in Storage tab
https://bugs.webkit.org/show_bug.cgi?id=152943

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-01-10
Reviewed by Brian Burg.

  • UserInterface/Views/NavigationSidebarPanel.js:

(WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
Another type of specialized folder tree element.

12:25 PM Changeset in webkit [194829] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._scopeChain[i].object.deprecatedGetAllProperties')
https://bugs.webkit.org/show_bug.cgi?id=152944
<rdar://problem/24119827>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-01-10
Reviewed by Brian Burg.

  • UserInterface/Models/CallFrame.js:

(WebInspector.CallFrame.prototype.collectScopeChainVariableNames):
Missed one place where object needed to change to objects.
Here the list will always contain a single object, only UI
generated scopes for the sidebar may have multiple objects.

12:24 PM Changeset in webkit [194828] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Dashboard log message count doesn't include console.time messages
https://bugs.webkit.org/show_bug.cgi?id=151280

Patch by Johan K. Jensen <jj@johanjensen.dk> on 2016-01-10
Reviewed by Brian Burg.

  • UserInterface/Models/DefaultDashboard.js:

(WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
Make Info and Debug levels increment the log count.

10:51 AM Changeset in webkit [194827] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

[Cocoa] Disable header postprocessing when building for El Capitan
https://bugs.webkit.org/show_bug.cgi?id=152962

Reviewed by Anders Carlsson.

  • Configurations/WebKit.xcconfig:
5:27 AM Changeset in webkit [194826] by akling@apple.com
  • 21 edits in trunk/Source

Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL cont'd
<https://webkit.org/b/152902>

Reviewed by Andy Estes.

Source/WebCore:

Convert some more of the remaining clients to use NeverDestroyed.

  • html/track/VTTRegion.cpp:

(WebCore::VTTRegion::textTrackCueContainerShadowPseudoId):
(WebCore::VTTRegion::textTrackRegionShadowPseudoId):

  • svg/properties/SVGAnimatedPropertyMacros.h:

Source/WebKit:

  • Storage/StorageThread.cpp:

(WebCore::activeStorageThreads):

Source/WebKit/ios:

  • WebCoreSupport/WebFixedPositionContent.mm:

(WebFixedPositionContentDataLock):

Source/WebKit/mac:

Convert some more of the remaining clients to use NeverDestroyed.

  • History/WebBackForwardList.mm:

(backForwardLists):

  • History/WebHistoryItem.mm:

(historyItemWrappers):

  • Misc/WebNSPasteboardExtras.mm:

(+[NSPasteboard _web_writableTypesForURL]):
(_writableTypesForImageWithoutArchive):
(_writableTypesForImageWithArchive):

  • Plugins/Hosted/NetscapePluginHostManager.mm:

(WebKit::NetscapePluginHostManager::singleton):

  • Plugins/Hosted/NetscapePluginHostProxy.mm:

(WebKit::pluginProxyMap):

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:

(WebKit::globalExceptionString):

  • Plugins/Hosted/ProxyInstance.mm:

(WebKit::proxyClass):

  • Plugins/WebNetscapePluginStream.mm:

(streams):

  • Storage/WebDatabaseManager.mm:

(transactionBackgroundTaskIdentifierLock):

  • WebCoreSupport/WebUserMediaClient.mm:

(userMediaCheckMap):

  • WebView/WebHTMLRepresentation.mm:

(regExpForLabels):

  • WebView/WebView.mm:

(aeDescFromJSValue):

Note: See TracTimeline for information about the timeline view.