⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Aug 31, 2015:

11:18 PM Changeset in webkit [189206] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Command-Enter for selected JS in Debugger/Sources shouldn't change the focus
https://bugs.webkit.org/show_bug.cgi?id=148613

Reviewed by Timothy Hatcher.

  • UserInterface/Views/ConsoleTabContentView.js:

(WebInspector.ConsoleTabContentView.prototype.shown):
Always focus on the console prompt when the console tab get selected.

  • UserInterface/Views/LogContentView.js:

(WebInspector.LogContentView.prototype.shown): Deleted.

10:23 PM Changeset in webkit [189205] by Chris Dumez
  • 7 edits in trunk

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

"Caused http/tests/navigation/anchor-frames-same-origin.html
to fail on WebKit1" (Requested by cdumez on #webkit).

Reverted changeset:

"http/tests/w3c/dom/nodes/Element-matches.html is flaky"
https://bugs.webkit.org/show_bug.cgi?id=148615
http://trac.webkit.org/changeset/189198

Patch by Commit Queue <commit-queue@webkit.org> on 2015-08-31

10:08 PM Changeset in webkit [189204] by ap@apple.com
  • 9 edits
    5 deletes in trunk/LayoutTests

Remove shadow DOM tests
https://bugs.webkit.org/show_bug.cgi?id=148669

Reviewed by Tim Horton.

  • accessibility/corresponding-control-deleted-crash.html: Removed.
  • editing/shadow: Removed.
  • editing/text-iterator/basic-iteration-shadowdom.html: Removed.
  • fast/dom/HTMLTemplateElement/cycles-in-shadow.html: Removed.
  • fast/dom/shadow: Removed.
  • platform/efl/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/ios-simulator-wk1/TestExpectations:
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-simulator/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
10:00 PM Changeset in webkit [189203] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove unused #define
https://bugs.webkit.org/show_bug.cgi?id=148667

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2015-08-31
Reviewed by Benjamin Poulain.

  • platform/network/cf/ResourceResponseCFNet.cpp:
7:25 PM Changeset in webkit [189202] by Chris Dumez
  • 38 edits
    6 deletes in trunk

Range API is throwing wrong exception type
https://bugs.webkit.org/show_bug.cgi?id=148648

Reviewed by Ryosuke Niwa.

Source/WebCore:

The RangeException type does not exist in the latest DOM specification.
Instead, the Range API is throwing regular DOMExceptions [1]:
https://dom.spec.whatwg.org/#range

The error codes also differ. RangeException.INVALID_NODE_TYPE_ERR (2)
is replaced with DOMException.INVALID_NODE_TYPE_ERR (24).
RangeException.BAD_BOUNDARYPOINTS_ERR (1) is replaced by
DOMException.INVALID_STATE_ERR (11), as per:
https://dom.spec.whatwg.org/#dom-range-surroundcontents (step 1).

This patch aligns WebKit's behavior with the specification and with
other browsers (tested Firefox and Chrome).

[1] https://heycam.github.io/webidl/#dfn-DOMException

No new tests, covered by existing tests (rebaselined):
http/tests/w3c/dom/ranges/Range-comparePoint.html
http/tests/w3c/dom/ranges/Range-isPointInRange.html
http/tests/w3c/dom/ranges/Range-selectNode.html
http/tests/w3c/dom/ranges/Range-set.html
http/tests/w3c/dom/ranges/Range-surroundContents.html

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSExceptionBase.cpp:

(WebCore::toExceptionBase): Deleted.

  • dom/DOMAllInOne.cpp:
  • dom/DOMExceptions.in:
  • dom/Range.cpp:

(WebCore::Range::insertNode):
(WebCore::Range::checkNodeWOffset):
(WebCore::Range::checkNodeBA):
(WebCore::Range::selectNode):
(WebCore::Range::selectNodeContents):
(WebCore::Range::surroundContents):

  • dom/RangeException.cpp: Removed.
  • dom/RangeException.h: Removed.
  • dom/RangeException.idl: Removed.

Source/WebKit/win:

  • Interfaces/DOMWindow.idl:

Drop outdated comment.

LayoutTests:

Update / rebaseline tests. A lot of w3c tests progressed after this
change. However, some of our pre-existing layout tests were relying
on RangeException.

  • fast/dom/DOMException/RangeException-expected.txt: Removed.
  • fast/dom/DOMException/RangeException.html: Removed.
  • fast/dom/DOMException/resources/RangeException.js: Removed.
  • fast/dom/Range/range-compareNode.html:
  • fast/dom/Range/range-exceptions-expected.txt:
  • fast/dom/Range/range-intersectsNode-expected.txt:
  • fast/dom/Range/script-tests/range-exceptions.js:
  • fast/dom/Window/get-set-properties-expected.txt:
  • fast/dom/Window/get-set-properties.html:
  • fast/dom/Window/resources/window-properties.js:
  • http/tests/w3c/dom/ranges/Range-comparePoint-expected.txt:
  • http/tests/w3c/dom/ranges/Range-isPointInRange-expected.txt:
  • http/tests/w3c/dom/ranges/Range-selectNode-expected.txt:
  • http/tests/w3c/dom/ranges/Range-set-expected.txt:
  • http/tests/w3c/dom/ranges/Range-surroundContents-expected.txt:
  • platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
7:05 PM Changeset in webkit [189201] by Yusuke Suzuki
  • 41 edits in trunk/Source

[ES6] Introduce ModuleProgramExecutable families and compile Module code to bytecode
https://bugs.webkit.org/show_bug.cgi?id=148581

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch introduces ModuleProgramExecutable, that is new executable type for the ES6 modules.
And related code block types, UninkedModuleProgramCodeBlock and ModuleProgramCodeBlock are also
introduced. BytecodeGenerator now recognizes these types and emits the bytecode and constructs
the symbol table for the module environment. While this patch introduces the bytecode generation
for the ES6 modules, the module environment instantiation initialization and imported binding
resolution are not included in this patch. They will be implemented in the subsequent patch.

The interesting part is the symbol table construction for the module environment.
Since the module code will be only executed once, the module environment need not to be allocated
and instantiated inside the module code; In the case of the function code, the function code need
to allocate the environment inside the prologue of it because the function code can be executed
more than once and the function environments are different in each time of the executions.
The module environment will be instantiated outside the module code before executing the module code.
This is required because we need to link the module environments to import the bindings before
executing the any module code in the dependency graph. And this is because the function inside the
module may be executed before the module top-level body is executed. (See the code comment for more
detailed situations)

The module environment will hold the top-most heap allocated variables in the module code.
This has the following benefits.
1) This enables JSC to perform the usual LocalClosureVar operations onto it.
2) It also makes the exported lexical variables just the heap allocated lexical variables.
3) Make it possible to initialize the heap allocated function declarations before executing the module

code. It is required under the circular dependency (see the code comment for more details).

To do so, the module environment will be constructed with the symbol table that is generated by the
bytecode generator. And the symbol table is held by the unlinked code block. That means, once the module
environment is instantiated, we cannot clear the unlinked code block before executing the module since
the layout of the instantiated module environment is coupled with the unlinked code block. This is OK
because the module code can be cleared once we executed the module code. If we failed to execute the
module (some errors occur), we can throw away the both, the module environment and the unlinked code block.

The unlinked module program code block holds the symbol table, but it does not hold the module environment.
So the unlinked module program code block can be cached. While unlinked code block can be cached, the linked
code block cannot be cached because it is already linked to the specific set of the module environment to
resolve the imported bindings.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/BytecodeList.json:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::inferredName):
(JSC::ModuleProgramCodeBlock::replacement):
(JSC::ProgramCodeBlock::capabilityLevelInternal):
(JSC::ModuleProgramCodeBlock::capabilityLevelInternal):

  • bytecode/CodeBlock.h:

(JSC::ModuleProgramCodeBlock::ModuleProgramCodeBlock):
(JSC::EvalCodeBlock::EvalCodeBlock):
(JSC::FunctionCodeBlock::FunctionCodeBlock):

  • bytecode/CodeType.cpp:

(WTF::printInternal):

  • bytecode/CodeType.h:
  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedModuleProgramCodeBlock::visitChildren):
(JSC::UnlinkedModuleProgramCodeBlock::destroy):
(JSC::UnlinkedCodeBlock::visitChildren): Deleted.

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::finishCreation): Deleted.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::instantiateLexicalVariables):
(JSC::BytecodeGenerator::emitPrefillStackTDZVariables):
(JSC::BytecodeGenerator::pushLexicalScopeInternal):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::emitProgramNodeBytecode):
(JSC::ProgramNode::emitBytecode):
(JSC::ModuleProgramNode::emitBytecode):
(JSC::ImportDeclarationNode::emitBytecode):
(JSC::ExportAllDeclarationNode::emitBytecode):
(JSC::ExportDefaultDeclarationNode::emitBytecode):
(JSC::ExportLocalDeclarationNode::emitBytecode):
(JSC::ExportNamedDeclarationNode::emitBytecode):

  • interpreter/Interpreter.cpp:

(JSC::StackFrame::friendlySourceURL):
(JSC::StackFrame::friendlyFunctionName):
(JSC::getStackFrameCodeType):

  • interpreter/Interpreter.h:
  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::codeType):
(JSC::StackVisitor::Frame::functionName):
(JSC::StackVisitor::Frame::sourceURL):

  • interpreter/StackVisitor.h:
  • jit/JIT.cpp:

(JSC::JIT::privateCompile):

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LLIntEntrypoint.cpp:

(JSC::LLInt::setModuleProgramEntrypoint):
(JSC::LLInt::setEntrypoint):

  • llint/LLIntOffsetsExtractor.cpp:
  • llint/LLIntThunks.cpp:

(JSC::LLInt::moduleProgramEntryThunkGenerator):

  • llint/LLIntThunks.h:
  • llint/LowLevelInterpreter.asm:
  • parser/ModuleAnalyzer.cpp:

(JSC::ModuleAnalyzer::exportVariable):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseImportClauseItem):
(JSC::Parser<LexerType>::parseExportDeclaration):

  • parser/Parser.h:

(JSC::Scope::declareLexicalVariable):

  • parser/VariableEnvironment.h:

(JSC::VariableEnvironmentEntry::isImportedNamespace):
(JSC::VariableEnvironmentEntry::setIsImportedNamespace):
(JSC::VariableEnvironment::find):

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getModuleProgramCodeBlock):

  • runtime/CodeCache.h:
  • runtime/Executable.cpp:

(JSC::ScriptExecutable::installCode):
(JSC::ScriptExecutable::newCodeBlockFor):
(JSC::ScriptExecutable::newReplacementCodeBlockFor):
(JSC::ModuleProgramExecutable::ModuleProgramExecutable):
(JSC::ModuleProgramExecutable::create):
(JSC::ModuleProgramExecutable::destroy):
(JSC::ModuleProgramExecutable::visitChildren):
(JSC::ModuleProgramExecutable::clearCode):
(JSC::ExecutableBase::dump):

  • runtime/Executable.h:

(JSC::ExecutableBase::isModuleProgramExecutable):
(JSC::ExecutableBase::clearCodeVirtual):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::createModuleProgramCodeBlock):

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

(JSC::JSModuleRecord::visitChildren):
(JSC::JSModuleRecord::link):

  • runtime/JSModuleRecord.h:

(JSC::JSModuleRecord::moduleProgramExecutable):

  • runtime/JSType.h:
  • runtime/ModuleLoaderObject.cpp:

(JSC::moduleLoaderObjectModuleDeclarationInstantiation):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Source/WebCore:

Add the ModuleProgramExecutable case.

  • testing/Internals.cpp:

(WebCore::Internals::parserMetaData):

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

[Win] WebKit cannot load pages based on "file://" URLs
https://bugs.webkit.org/show_bug.cgi?id=148596
<rdar://problem/22432585>

Reviewed by Dean Jackson.

  • platform/URL.cpp:

(WebCore::URL::URL): Work around bug that causes this assertion to fire on
the Apple Windows build.

  • platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:

(WebCore::adjustMIMETypeIfNecessary): Added. If the URL is for a local file,
determine the MIME type based on extension. Otherwise use the default MIME type.
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse): If
the CFURLResponse has no MIME type, call 'adjustMIMETypeIfNecessary'.

5:24 PM Changeset in webkit [189199] by ap@apple.com
  • 2 edits in trunk/LayoutTests

Update Windows expectation for fast/events/wheelevent-basic.html after r188793.

  • platform/win/TestExpectations: This test used to fail, and now that it is

asynchronous, it times out.

5:22 PM Changeset in webkit [189198] by Chris Dumez
  • 7 edits in trunk

http/tests/w3c/dom/nodes/Element-matches.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=148615

Reviewed by Ryosuke Niwa.

Source/WebCore:

Several newly-imported w3c tests were flaky due to the :target
pseudo-class selectors sometimes giving different results. The
issue seems to be that this type of selector relies on the
Document::cssTarget() element to do the matching. We update
this cssTarget Element in FrameView's scrollToFragment() /
scrollToAnchor(). This is called from
scrollToFragmentWithParentBoundary() which is called by
FrameLoader's finishedParsing() and loadInSameDocument().

In the first one, it is called *after* calling checkComplete()
which fires the onload event. However, in the second method,
it is called *before*. This patch updates finishedParsing()
so that scrollToFragmentWithParentBoundary() is called *before*
firing the onload event, consistently with loadInSameDocument().
This makes sure that JavaScript executed in an onload event
handler will get accurate results for :target pseudo-class
selectors.

No new tests, covered by:
http/tests/w3c/dom/nodes/Element-matches.html
http/tests/w3c/dom/nodes/ParentNode-querySelector-All-xhtml.xhtml

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::finishedParsing):

LayoutTests:

Unskip the tests and rebaseline them now that the target pseudo selector
checks are consistently passing.

  • TestExpectations:
  • http/tests/w3c/dom/nodes/Element-matches-expected.txt:
  • http/tests/w3c/dom/nodes/ParentNode-querySelector-All-expected.txt:
  • http/tests/w3c/dom/nodes/ParentNode-querySelector-All-xhtml-expected.txt:
5:05 PM Changeset in webkit [189197] by ap@apple.com
  • 3 edits in trunk/LayoutTests

Skip Web Inspector debugger tests more thoroughly.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
5:04 PM Changeset in webkit [189196] by Yusuke Suzuki
  • 3 edits in trunk/Source/WebCore

The error handler of ReadableJSStream should own stream object
https://bugs.webkit.org/show_bug.cgi?id=148653

Reviewed by Sam Weinig.

ReadableJSStream's m_errorFunction does not own the readable stream.
So when this error callback is executed asynchronously through Promises,
the stream could be already destroyed.
The fulfill callback which is jointly configured with this error callback
owns the stream. However, when the promise is rejected, the following things
occur.

  1. Promise clears the fulfill handlers immediately.
  2. queue the reject handlers to the microtask queue.
  3. When draining the microtasks, the rejected handler will be executed.

At the time of 2 or 3, the references to the fulfill handlers are already discarded.
So when GC occurs at the time of 2 or 3, it will collect the fulfill handlers and the
stream object owned by the fulfill handlers even if the error callback will touch the
stream object later.

Before r189124, this fault does not occur. This is because the std::function in the
fulfill handler is not destroyed before that patch. Since the std::function owns the
stream object, the std::function and the stream object were leaked and never destroyed.
After that patch, the std::function in the fulfill handler becomes destroyed. And it
makes this fault happen.

In this patch, we separate the error callback from the stream object. Previously, the
error callback resides in the stream object as the member. To avoid the cyclic references,
this error callback did not own the stream object. But this causes this fault.
Instead of caching the error callback in the stream object, we always create the error
callback, when it is needed. The created error callback owns the stream object as well as
the fulfill callbacks owns the stream object.

No behavior change.

  • bindings/js/ReadableJSStream.cpp:

(WebCore::createGenericErrorRejectedFunction):
(WebCore::ReadableJSStream::doStart):
(WebCore::ReadableJSStream::doPull):
(WebCore::ReadableJSStream::ReadableJSStream): Deleted.

  • bindings/js/ReadableJSStream.h:
4:44 PM Changeset in webkit [189195] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Modify prepare-Changelog to be aware of files that are marked as tests as well as files
that are marked as requiring corresponding tests.
https://bugs.webkit.org/show_bug.cgi?id=148498
<rdar://problem/21555314>

Patch by Jason Marcell <jmarcell@apple.com> on 2015-08-31
Reviewed by Dan Bernstein and David Kilzer.

  • Scripts/prepare-ChangeLog: Added "attributeCache" to cache Subversion properties in order to

simulate Git's attribute behevaior.
(main): Added "requiresTests" array to contain files that require tests.
(generateNewChangeLogs): Checks "requiresTests" array to determine whether to inject "tests"
section in ChangeLog.
(attributeCommand): Queries a given file for a given Git attribute value. If using Subversion,
however, we check if the file or any containing folder has the given property set to "1" and
return 1 if so; return 0 otherwise.
(generateFileList): Adds files to "requiresTests" array if Git attribute is set to "1". Also
adds files to "addedRegressionTests" array if "test" attribute is set to "1".

4:30 PM Changeset in webkit [189194] by basile_clement@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix after r189292

  • bytecode/ValueRecovery.h:

(JSC::ValueRecovery::jsValueRegs): Deleted.

4:27 PM Changeset in webkit [189193] by aestes@apple.com
  • 34 edits
    4 adds in trunk

[Content Filtering] Determine navigation and content policy before continuing to filter a load
https://bugs.webkit.org/show_bug.cgi?id=148506

Reviewed by Brady Eidson.

Source/WebCore:

Prior to this change, ContentFilter would hide from DocumentLoader all CachedRawResourceClient callbacks until
a decision was made, then replay the missed callbacks. This approach interacted poorly with some features of
the loader, notably appcache and downloads. In the case of appcache, DocumentLoader might not have a chance to
check for substitute data until the original load has finished, wasting bandwidth, and might receive duplicate
or out-of-order callbacks. In the case of downloads, it would often be too late to convert the existing
connection to a download, leading to restarted downloads or outright failures.

Bandaids were put in place for these issues in r188150, r188486, and r188851 to fix crashes or serious
regressions in behavior, but these weren't complete fixes. They did not solve any of the duplicate data loading
problems, and they did not make downloads work reliably in all cases.

This patch rolls out the bandaids (but keeps their tests) and replaces them with a more robust fix. Instead of
hiding callbacks from DocumentLoader, ContentFilter now delivers willSendRequest(), redirectReceived(), and
responseReceived() to DocumentLoader immediately, and cancels filtering if DocumentLoader decides to ignore the
load, download it, or load substitute data. ContentFilter continues to buffer incoming data to prevent partial
rendering of blocked content.

The existing tests for r188150 and r188851 were kept, the test for r188486 was rewritten to be specific to
content filtering, and new tests were added to cover the case where ContentFilter is still undecided after a
load finishes.

Tests: contentfiltering/allow-never.html

contentfiltering/block-never.html
ContentFiltering.AllowDownloadAfterAddData
ContentFiltering.AllowDownloadAfterFinishedAddingData
ContentFiltering.AllowDownloadAfterRedirect
ContentFiltering.AllowDownloadAfterResponse
ContentFiltering.AllowDownloadAfterWillSendRequest
ContentFiltering.AllowDownloadNever
ContentFiltering.BlockDownloadAfterAddData
ContentFiltering.BlockDownloadAfterFinishedAddingData
ContentFiltering.BlockDownloadAfterRedirect
ContentFiltering.BlockDownloadAfterResponse
ContentFiltering.BlockDownloadAfterWillSendRequest
ContentFiltering.BlockDownloadNever

  • bindings/js/JSMockContentFilterSettingsCustom.cpp:

(WebCore::JSMockContentFilterSettings::decisionPoint): Taught to handle DecisionPoint::Never, and rewrote to
not need a set of const uint8_ts that mirror the DecisionPoint enum.
(WebCore::JSMockContentFilterSettings::setDecisionPoint): Ditto.
(WebCore::toJSValue): Rewrote to not need a set of const uint8_ts that mirror the Decision enum.
(WebCore::toDecision): Ditto.

  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::createIfEnabled): Renamed from createIfNeeded, and changed to take a DocumentLoader&
instead of a DecisionFunction.
(WebCore::ContentFilter::ContentFilter):
(WebCore::ContentFilter::responseReceived): If m_state != Blocked after filtering, call DocumentLoader::responseReceived().
(WebCore::ContentFilter::dataReceived): If m_state == Allowed after filtering, deliver buffered data to DocumentLoader.
If no filtering was necessary, call DocumentLoader::dataReceived() directly.
(WebCore::ContentFilter::redirectReceived): If m_state != Blocked after filtering, call DocumentLoader::redirectReceived().
(WebCore::ContentFilter::notifyFinished): If an error occured, call DocumentLoader::notifyFinished() immediately and return.
If m_state != Blocked after filtering, deliver buffered data to DocumentLoader and call DocumentLoader::notifyFinished().
If no filtering was necessary and m_state != Blocked, call DocumentLoader::notifyFinished() directly.
(WebCore::ContentFilter::didDecide): Called DocumentLoader::contentFilterDidDecide() instead of m_decisionFunction().
(WebCore::ContentFilter::deliverResourceData): Added a helper function to deliver buffered data to DocumentLoader.
(WebCore::ContentFilter::createIfNeeded): Renamed to createIfEnabled().

  • loader/ContentFilter.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::DocumentLoader):
(WebCore::DocumentLoader::willSendRequest): Stopped asserting that redirectResponse is null and made it part of
the if condition instead, since willSendRequest() will now be called on redirects when there is an active ContentFilter.
(WebCore::DocumentLoader::startLoadingMainResource): Called becomeMainResourceClient() instead of becomeMainResourceClientIfFilterAllows().
(WebCore::DocumentLoader::becomeMainResourceClient): Renamed from becomeMainResourceClientIfFilterAllows().
Only called ContentFilter::startFilteringMainResource() if the filter state is Initialized, since ContentFilter
might have already made a decision in willSendRequest().
(WebCore::DocumentLoader::contentFilterDidDecide): Stopped deleting m_contentFilter, since it will continue to deliver callbacks
even after making a decision. Fixed a bug where we were creating two copies of ContentFilter's replacement data.
(WebCore::DocumentLoader::syntheticRedirectReceived): Deleted.
(WebCore::DocumentLoader::becomeMainResourceClientIfFilterAllows): Renamed to becomeMainResourceClient().

  • loader/DocumentLoader.h:
  • loader/EmptyClients.h:
  • loader/FrameLoaderClient.h:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::willSendRequestInternal): Removed part of r188851.

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveResponse): Removed part of r188486.

  • loader/SubresourceLoader.h:
  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::didAddClient): Removed part of r188150.

  • loader/cache/CachedRawResourceClient.h:

(WebCore::CachedRawResourceClient::syntheticRedirectReceived): Removed part of r188150.

  • testing/MockContentFilterSettings.h: Defined DecisionPoint::Never.
  • testing/MockContentFilterSettings.idl: Defined DECISION_POINT_NEVER.

Source/WebKit/mac:

Deleted parts of r188486 and r188851.

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::convertMainResourceLoadToDownload):
(WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):

Source/WebKit/win:

Deleted part of r188851.

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):

  • WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:

Deleted parts of r188486 and r188851.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::convertMainResourceLoadToDownload):

Tools:

Added download API tests covering every decision and decision point.
Removed _WKDownload.AsynchronousDownloadPolicy in favor of these new tests.

  • TestWebKitAPI/Configurations/Base.xcconfig: Added $(BUILT_PRODUCTS_DIR)/WebCoreTestSupport to the header search path.
  • TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Removed it from here.
  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleParametersPlugIn.mm:

(-[BundleParametersPlugIn observeValueForKeyPath:ofObject:change:context:]): Called -valueForKeyPath:, which
returns an id, instead of -valueForKey:, which always returns an NSString even if the object is of another type.

  • TestWebKitAPI/Tests/WebKit2Cocoa/ContentFiltering.mm: Added a class that can send a MockContentFilter

decision and decision point as a bundle parameter.
(+[MockContentFilterEnabler supportsSecureCoding]):
(-[MockContentFilterEnabler copyWithZone:]):
(-[MockContentFilterEnabler initWithCoder:]):
(-[MockContentFilterEnabler initWithDecision:decisionPoint:]):
(-[MockContentFilterEnabler encodeWithCoder:]):
(configurationWithContentFilterSettings): Added a helper function to create a WKWebViewConfiguration with MockConentFilter settings.
(TEST): Renamed ContentFiltering.ServerRedirect to ContentFiltering.URLAfterServerRedirect.
(-[BecomeDownloadDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]): Decided _WKNavigationResponsePolicyBecomeDownload.
(-[BecomeDownloadDelegate webView:didFailProvisionalNavigation:withError:]): Set isDone to true.
(-[BecomeDownloadDelegate webView:didFinishNavigation:]): Ditto.
(-[ContentFilteringDownloadDelegate _downloadDidStart:]): Set downloadDidStart to true.
(downloadTest): Added a helper function to test downloads with a given decision and decision point.

  • TestWebKitAPI/Tests/WebKit2Cocoa/ContentFilteringPlugIn.mm: Added a corresponding bundle class that decodes

the MockContentFilter decision and decision point, and sets these values in the MockContentFilterSettings
singleton. This class is duplicated in the bundle to prevent TestWebKitAPI from having to link to WebCoreTestSupport.
(+[MockContentFilterEnabler supportsSecureCoding]):
(-[MockContentFilterEnabler copyWithZone:]):
(-[MockContentFilterEnabler initWithCoder:]):
(-[MockContentFilterEnabler dealloc]):
(-[MockContentFilterEnabler encodeWithCoder:]):
(-[ContentFilteringPlugIn webProcessPlugIn:initializeWithObject:]): Start observing changes to the MockContentFilterEnabler key path.
(-[ContentFilteringPlugIn dealloc]): Stop observing.
(-[ContentFilteringPlugIn observeValueForKeyPath:ofObject:change:context:]): Store a MockContentFilterEnabler in _contentFilterEnabler.
(+[ServerRedirectPlugIn initialize]): Deleted.

  • TestWebKitAPI/Tests/WebKit2Cocoa/Download.mm:

(-[AsynchronousDownloadNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]): Deleted.
(-[AsynchronousDownloadDelegate _downloadDidStart:]): Deleted.
(TEST): Deleted.

LayoutTests:

Added tests for what happens if the content filter does not make a decision when the load finishes.

  • contentfiltering/allow-never-expected.html: Added.
  • contentfiltering/allow-never.html: Added.
  • contentfiltering/block-never-expected.html: Added.
  • contentfiltering/block-never.html: Added.
  • contentfiltering/resources/contentfiltering.js:
4:13 PM Changeset in webkit [189192] by basile_clement@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

ValueRecovery should distinguish between doubles in an FPR and JSValues in an FPR
https://bugs.webkit.org/show_bug.cgi?id=148336

Reviewed by Michael Saboff.

Currently, ValueRecovery::InFPR means "this is a *double* value in an
FPR". Let's change the semantics to be "this is a *JSValue* in an FPR"
(to match ValueRecovery::InGPR), and introduce
ValueRecovery::UnboxedDoubleInFPR to mean "this is a double value in an
FPR".

  • bytecode/ValueRecovery.cpp:

(JSC::ValueRecovery::dumpInContext):

  • bytecode/ValueRecovery.h:

(JSC::ValueRecovery::operator bool):
(JSC::ValueRecovery::inFPR):
(JSC::ValueRecovery::isInGPR):
(JSC::ValueRecovery::isInFPR):
(JSC::ValueRecovery::isInRegisters):
(JSC::ValueRecovery::isInJSStack):
(JSC::ValueRecovery::dataFormat):
(JSC::ValueRecovery::gpr):
(JSC::ValueRecovery::isInJSValueRegs):
(JSC::ValueRecovery::jsValueRegs):
(JSC::ValueRecovery::fpr):
(JSC::ValueRecovery::virtualRegister):
(JSC::ValueRecovery::constant):

  • dfg/DFGOSRExitCompiler32_64.cpp:

(JSC::DFG::OSRExitCompiler::compileExit):

  • dfg/DFGOSRExitCompiler64.cpp:

(JSC::DFG::OSRExitCompiler::compileExit):

  • dfg/DFGVariableEventStream.cpp:

(JSC::DFG::VariableEventStream::reconstruct):

3:53 PM Changeset in webkit [189191] by Alan Bujtas
  • 5 edits
    1 add
    4 deletes in trunk/LayoutTests

Repaint cleanup:
add-table-overpaint.html -> repaint rect tracking + [ Pass Failure] for now.
absolute-position-moved.html -> reftest.

Unreviewed.

  • TestExpectations:
  • fast/repaint/absolute-position-moved-expected.html: Added.
  • fast/repaint/absolute-position-moved-expected.png: Removed.
  • fast/repaint/absolute-position-moved-expected.txt: Removed.
  • fast/repaint/absolute-position-moved.html:
  • fast/repaint/add-table-overpaint-expected.png: Removed.
  • fast/repaint/add-table-overpaint-expected.txt:
  • fast/repaint/add-table-overpaint.html:
  • platform/gtk/fast/repaint/add-table-overpaint-expected.png: Removed.
3:49 PM Changeset in webkit [189190] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Debugger Popovers should work for object literal shorthand variables
https://bugs.webkit.org/show_bug.cgi?id=148603

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2015-08-31
Reviewed by Timothy Hatcher.

  • UserInterface/Controllers/CodeMirrorTokenTrackingController.js:

(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
Allow debugger popovers for object property shorthands, because they
are actually variables that have values. Previously we ignored property
name literals, because they were just property names until ES6.

  • UserInterface/Views/CodeMirrorAdditions.js:

Add a helper for walking through token types from a start position. It may be useful elsewhere.

3:39 PM Changeset in webkit [189189] by Matt Baker
  • 4 edits
    1 move
    1 add in trunk/Source/WebInspectorUI

Web Inspector: Move the Popover code out of the Breakpoint model object
https://bugs.webkit.org/show_bug.cgi?id=127328

Reviewed by Timothy Hatcher.

  • UserInterface/Controllers/BreakpointPopoverController.js: Added.

(WebInspector.BreakpointPopoverController):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.editBreakpoint):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.removeBreakpoint):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleBreakpoint):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleAutoContinue):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems):
(WebInspector.BreakpointPopoverController.prototype.showEditBreakpointPopover):
(WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
(WebInspector.BreakpointPopoverController.prototype._popoverToggleEnabledCheckboxChanged):
(WebInspector.BreakpointPopoverController.prototype._popoverConditionInputChanged):
(WebInspector.BreakpointPopoverController.prototype._popoverToggleAutoContinueCheckboxChanged):
(WebInspector.BreakpointPopoverController.prototype._popoverConditionInputKeyDown):
(WebInspector.BreakpointPopoverController.prototype._popoverActionsCreateAddActionButton):
(WebInspector.BreakpointPopoverController.prototype._popoverActionsAddActionButtonClicked):
(WebInspector.BreakpointPopoverController.prototype._popoverActionsInsertBreakpointActionView):
(WebInspector.BreakpointPopoverController.prototype.breakpointActionViewAppendActionView):
(WebInspector.BreakpointPopoverController.prototype.breakpointActionViewRemoveActionView):
(WebInspector.BreakpointPopoverController.prototype.breakpointActionViewResized):
(WebInspector.BreakpointPopoverController.prototype.willDismissPopover):
(WebInspector.BreakpointPopoverController.prototype.didDismissPopover):
Added controller class to encapsulate view logic previously located in WebInspector.Breakpoint.

  • UserInterface/Main.html:

Added and updated file paths.

  • UserInterface/Models/Breakpoint.js:

(WebInspector.Breakpoint.prototype.appendContextMenuItems.editBreakpoint): Deleted.
(WebInspector.Breakpoint.prototype.appendContextMenuItems.removeBreakpoint): Deleted.
(WebInspector.Breakpoint.prototype.appendContextMenuItems.toggleBreakpoint): Deleted.
(WebInspector.Breakpoint.prototype.appendContextMenuItems.toggleAutoContinue): Deleted.
(WebInspector.Breakpoint.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation): Deleted.
(WebInspector.Breakpoint.prototype.appendContextMenuItems): Deleted.
(WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): Deleted.
(WebInspector.Breakpoint.prototype._popoverConditionInputChanged): Deleted.
(WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): Deleted.
(WebInspector.Breakpoint.prototype._popoverConditionInputKeyDown): Deleted.
(WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Deleted.
(WebInspector.Breakpoint.prototype._popoverActionsCreateAddActionButton): Deleted.
(WebInspector.Breakpoint.prototype._popoverActionsAddActionButtonClicked): Deleted.
(WebInspector.Breakpoint.prototype._popoverActionsInsertBreakpointActionView): Deleted.
(WebInspector.Breakpoint.prototype.breakpointActionViewAppendActionView): Deleted.
(WebInspector.Breakpoint.prototype.breakpointActionViewRemoveActionView): Deleted.
(WebInspector.Breakpoint.prototype.breakpointActionViewResized): Deleted.
(WebInspector.Breakpoint.prototype.willDismissPopover): Deleted.
(WebInspector.Breakpoint.prototype.didDismissPopover): Deleted.
(WebInspector.Breakpoint.prototype._showEditBreakpointPopover): Deleted.
Removed view logic.

  • UserInterface/Views/BreakpointPopoverController.css: Renamed from Source/WebInspectorUI/UserInterface/Views/Breakpoint.css.

(.popover .edit-breakpoint-popover-content):
(.popover .edit-breakpoint-popover-content.wide):
(.popover .edit-breakpoint-popover-content > label.toggle):
(.popover .edit-breakpoint-popover-content > table):
(.popover .edit-breakpoint-popover-content > table > tr > th):
(.popover .edit-breakpoint-popover-content > table > tr > td):
(#edit-breakpoint-popover-condition):
(#edit-breakpoint-popoover-auto-continue):

  • UserInterface/Views/SourceCodeTextEditor.js:

(WebInspector.SourceCodeTextEditor):
Creates a BreakpointPopoverController instance. The lifetime of the 'Edit Breakpoint' view is internal to the
controller, and can't be initiated outside of a context menu item click.

3:32 PM Changeset in webkit [189188] by Chris Dumez
  • 21 edits in trunk/Source/WebCore

Unreviewed, rebaseline bindings tests after r189184.

3:29 PM Changeset in webkit [189187] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

[ES6] Arrow function syntax. Add missed tests for invoking the arrow function that created by 'eval' statement.
https://bugs.webkit.org/show_bug.cgi?id=148445

Patch by Aleksandr Skachkov <gskachkov@gmail.com> on 2015-08-31
Reviewed by Yusuke Suzuki.

Added tests, that cover cases, when arrow function is created by 'eval' statement and then invoking it.
This case was missed in previous patches that are related to arrow function, also it is important to
test different cases of ending arrow function in 'eval' and invoking created arrow function because
of reparsing during function invocation.

  • js/arrowfunction-syntax-endings-expected.txt:
  • js/script-tests/arrowfunction-syntax-endings.js:
3:01 PM Changeset in webkit [189186] by fpizlo@apple.com
  • 2 edits in trunk/Tools

Skip slow lock tests on Windows/debug
https://bugs.webkit.org/show_bug.cgi?id=148643

Reviewed by Alexey Proskuryakov.

The lock tests simulate a critical section by doing some floating point math, and then either
make those critical sections very long or invoke them many times. This appears to be
particularly slow on Windows in debug mode, maybe because Visual Studio's debug build makes
that kind of computation slow.

These tests are almost as useful in release as they are in debug, so it's probably better to
just skip the in debug on platforms where this causes timeouts.

  • TestWebKitAPI/Tests/WTF/Lock.cpp:

(TestWebKitAPI::runLockTest):
(TestWebKitAPI::skipSlow):
(TestWebKitAPI::TEST):

2:38 PM Changeset in webkit [189185] by Alan Bujtas
  • 4 edits
    1 add
    5 deletes in trunk/LayoutTests

Repaint cleanup:
absolute-position-change-containing-block.html -> repaint rect tracking.
absolute-position-changed.html -> reftest.

Unreviewed.

  • fast/repaint/absolute-position-change-containing-block-expected.png: Removed.
  • fast/repaint/absolute-position-change-containing-block-expected.txt:
  • fast/repaint/absolute-position-change-containing-block.html:
  • fast/repaint/absolute-position-changed-expected.html: Added.
  • fast/repaint/absolute-position-changed-expected.png: Removed.
  • fast/repaint/absolute-position-changed-expected.txt: Removed.
  • fast/repaint/absolute-position-changed.html:
  • platform/gtk/fast/repaint/absolute-position-change-containing-block-expected.png: Removed.
  • platform/mac/fast/repaint/absolute-position-changed-expected.png: Removed.
2:05 PM Changeset in webkit [189184] by Chris Dumez
  • 8 edits in trunk

NodeFilter.SHOW_ALL has wrong value on 32-bit
https://bugs.webkit.org/show_bug.cgi?id=148602

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

NodeFilter.SHOW_ALL has wrong value on 32-bit. This is because
NodeFilter.SHOW_ALL is an unsigned long whose value is 0xFFFFFFFF but
our bindings code is casting it to an intptr_t type which is not wide
enough on 32-bit.

  • create_hash_table:

Add extra curly brackets to initialize the union.

  • runtime/Lookup.h:

Use a union type to store either a struct containing 2 intptr_t members
(value1 / value2) or a large constant of type unsigned long long. When
storing a constant, we only need one of the values so this allows us to
support larger constants without increasing the actual HashTableValue
size.

Source/WebCore:

NodeFilter.SHOW_ALL has wrong value on 32-bit. This is because
NodeFilter.SHOW_ALL is an unsigned long whose value is 0xFFFFFFFF but
our bindings code is casting it to an intptr_t type which is not wide
enough on 32-bit.

No new tests, already covered by fast/dom/node-filter-interface.html
which is now unskipped on Windows / 32bit.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHashTableValueArray):
Generate extra curly brackets to initialize the new union member.
Also cast to long long the constant instead of intptr_t.

  • dom/NodeFilter.h:

Explicitly mark the enum underlying type to be an unsigned long
to make sure it can hold the value for SHOW_ALL on all platforms.
On Windows, it seems the default underlying type is an int for
e.g.

LayoutTests:

Unskip tests that are now passing on Windows / 32bit.

  • platform/win/TestExpectations:
1:57 PM Changeset in webkit [189183] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Rendering Frame tasks making up < 1% of the selection don't appear in the pie chart
https://bugs.webkit.org/show_bug.cgi?id=148549

Reviewed by Timothy Hatcher.

Small data points can be invisible or difficult to see in the pie chart. This patch introduces
a minimum slice size of 1.5% (determined by visual inspection) for chart items.

Legend items continue to show the original data point values, not the adjusted values used to
draw the chart slices.

  • UserInterface/Views/ChartDetailsSectionRow.js:

(WebInspector.ChartDetailsSectionRow):
(WebInspector.ChartDetailsSectionRow.prototype._updateLayout):
Adjust display values up or down as needed, so no data point is less than the
minimum and all chart slices still total 100%.

1:41 PM Changeset in webkit [189182] by Chris Dumez
  • 70 edits
    4 adds
    2 deletes in trunk

Range.detach() / NodeIterator.detach() should be no-ops as per the latest DOM specification
https://bugs.webkit.org/show_bug.cgi?id=148454

Reviewed by Ryosuke Niwa.

Source/WebCore:

Range.detach() / NodeIterator.detach() should be no-ops as per the
latest DOM specification:

These are already no-ops in Firefox:

and Chrome:

Tests: fast/dom/Range/range-detach-noop.html

fast/dom/node-iterator-detach-noop.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::selectText):
(WebCore::AccessibilityObject::stringForVisiblePositionRange):
(WebCore::AccessibilityObject::lengthForVisiblePositionRange):

  • accessibility/atk/WebKitAccessibleUtil.cpp:

(selectionBelongsToObject):

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
(-[WebAccessibilityObjectWrapper _convertToNSRange:]):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
(-[WebAccessibilityObjectWrapper _convertToNSRange:]):

  • bindings/scripts/CodeGeneratorGObject.pm:

(FunctionUsedToRaiseException):

  • dom/DocumentMarkerController.cpp:

(WebCore::DocumentMarkerController::addMarker):
(WebCore::DocumentMarkerController::addTextMatchMarker):
(WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
(WebCore::DocumentMarkerController::addDictationResultMarker):
(WebCore::DocumentMarkerController::removeMarkers):
(WebCore::DocumentMarkerController::markersInRange):
(DocumentMarkerController::setMarkersActive):
(DocumentMarkerController::hasMarkers):
(DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):

  • dom/NodeIterator.cpp:

(WebCore::NodeIterator::nextNode):
(WebCore::NodeIterator::previousNode):
(WebCore::NodeIterator::detach):
(WebCore::NodeIterator::NodeIterator): Deleted.
(WebCore::NodeIterator::nodeWillBeRemoved): Deleted.
(WebCore::NodeIterator::updateForNodeRemoval): Deleted.

  • dom/NodeIterator.h:

(WebCore::NodeIterator::nextNode):
(WebCore::NodeIterator::previousNode):

  • dom/NodeIterator.idl:
  • dom/Range.cpp:

(WebCore::Range::commonAncestorContainer):
(WebCore::Range::setStart):
(WebCore::Range::setEnd):
(WebCore::Range::collapse):
(WebCore::Range::isPointInRange):
(WebCore::Range::comparePoint):
(WebCore::Range::compareNode):
(WebCore::Range::compareBoundaryPoints):
(WebCore::Range::boundaryPointsValid):
(WebCore::Range::deleteContents):
(WebCore::Range::processContents):
(WebCore::Range::processContentsBetweenOffsets):
(WebCore::Range::processAncestorsAndTheirSiblings):
(WebCore::Range::extractContents):
(WebCore::Range::cloneContents):
(WebCore::Range::insertNode):
(WebCore::Range::toString):
(WebCore::Range::text):
(WebCore::Range::createContextualFragment):
(WebCore::Range::detach):
(WebCore::Range::cloneRange):
(WebCore::Range::surroundContents):
(WebCore::Range::checkDeleteExtract):
(WebCore::Range::containedByReadOnly):
(WebCore::Range::firstNode):
(WebCore::Range::shadowRoot):
(WebCore::Range::pastLastNode):
(WebCore::Range::absoluteTextRects):
(WebCore::Range::absoluteTextQuads):
(WebCore::Range::collectSelectionRects):
(WebCore::Range::formatForDebugger):
(WebCore::Range::contains):
(WebCore::rangesOverlap):
(WebCore::Range::getBorderAndTextQuads):
(WebCore::Range::boundingRectInternal):
(showTree):
(WebCore::checkForDifferentRootContainer): Deleted.
(WebCore::lengthOfContentsInNode): Deleted.
(WebCore::Range::processNodes): Deleted.
(WebCore::Range::checkNodeWOffset): Deleted.
(WebCore::Range::checkNodeBA): Deleted.
(WebCore::Range::setStartAfter): Deleted.
(WebCore::Range::setEndBefore): Deleted.
(WebCore::Range::setEndAfter): Deleted.
(WebCore::Range::selectNode): Deleted.
(WebCore::intervalsSufficientlyOverlap): Deleted.
(WebCore::coalesceSelectionRects): Deleted.
(WebCore::areRangesEqual): Deleted.
(WebCore::boundaryTextNodesSplit): Deleted.
(WebCore::Range::textNodeSplit): Deleted.
(WebCore::Range::expand): Deleted.

  • dom/Range.h:

(WebCore::Range::startContainer):
(WebCore::Range::endContainer):
(WebCore::Range::collapsed):
(WebCore::Range::commonAncestorContainer):

  • dom/Range.idl:
  • editing/AlternativeTextController.cpp:

(WebCore::AlternativeTextController::applyAlternativeTextToRange):
(WebCore::AlternativeTextController::handleAlternativeTextUIResult):
(WebCore::AlternativeTextController::markReversed):
(WebCore::AlternativeTextController::markCorrection):
(WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
(WebCore::AlternativeTextController::applyDictationAlternative):

  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::styleAtSelectionStart):

  • editing/Editor.cpp:

(WebCore::Editor::canDeleteRange):
(WebCore::Editor::shouldDeleteRange):
(WebCore::Editor::advanceToNextMisspelling):
(WebCore::Editor::markMisspellingsOrBadGrammar):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
(WebCore::correctSpellcheckingPreservingTextCheckingParagraph):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::changeBackToReplacedString):
(WebCore::Editor::firstRectForRange):
(WebCore::Editor::rangeOfString):
(WebCore::Editor::countMatchesForText):
(WebCore::Editor::scanRangeForTelephoneNumbers):
(WebCore::isFrameInRange): Deleted.

  • editing/EditorCommand.cpp:

(WebCore::expandSelectionToGranularity):
(WebCore::unionDOMRanges):

  • editing/FormatBlockCommand.cpp:

(WebCore::FormatBlockCommand::elementForFormatBlockCommand):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::setSelectedRange):
(WebCore::FrameSelection::wordOffsetInRange):
(WebCore::FrameSelection::spaceFollowsWordInRange):
(WebCore::FrameSelection::selectionAtDocumentStart): Deleted.

  • editing/MarkupAccumulator.cpp:

(WebCore::MarkupAccumulator::appendText):

  • editing/SpellChecker.cpp:

(WebCore::SpellCheckRequest::SpellCheckRequest):
(WebCore::SpellChecker::isCheckable):

  • editing/SpellingCorrectionCommand.cpp:

(WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand):

  • editing/TextCheckingHelper.cpp:

(WebCore::expandToParagraphBoundary):
(WebCore::TextCheckingParagraph::offsetTo):
(WebCore::TextCheckingParagraph::offsetAsRange):
(WebCore::TextCheckingHelper::findFirstMisspelling):
(WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
(WebCore::TextCheckingHelper::findFirstGrammarDetail):
(WebCore::TextCheckingHelper::isUngrammatical):
(WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):

  • editing/TextIterator.cpp:

(WebCore::TextIterator::TextIterator):
(WebCore::TextIterator::node):
(WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
(WebCore::CharacterIterator::range):
(WebCore::characterSubrange):
(WebCore::BackwardsCharacterIterator::range):
(WebCore::TextIterator::rangeFromLocationAndLength):
(WebCore::TextIterator::getLocationAndLengthFromRange):
(WebCore::collapsedToBoundary):
(WebCore::findPlainText):
(WebCore::BackwardsCharacterIterator::BackwardsCharacterIterator): Deleted.
(WebCore::BackwardsCharacterIterator::advance): Deleted.
(WebCore::plainText): Deleted.

  • editing/VisibleUnits.cpp:

(WebCore::previousBoundary):

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::_processText):
(HTMLConverter::_traverseNode):
(HTMLConverter::_traverseFooterNode):
(HTMLConverterCaches::cacheAncestorsOfStartToBeConverted):
(WebCore::editingAttributedStringFromRange):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::adjustedSelectionRange):

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::renderedText):
(WebCore::StyledMarkupAccumulator::stringValueForRange):
(WebCore::highestAncestorToWrapMarkup):
(WebCore::createMarkupInternal):
(WebCore::createFullMarkup):
(WebCore::urlToMarkup): Deleted.

  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::create):

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::contextMenuItemSelected):

  • page/DOMSelection.cpp:

(WebCore::DOMSelection::deleteFromDocument):
(WebCore::DOMSelection::containsNode):

  • page/TextIndicator.cpp:

(WebCore::TextIndicator::createWithRange):

  • page/ios/FrameIOS.mm:

(WebCore::Frame::indexCountOfWordPrecedingSelection):
(WebCore::Frame::wordsInCurrentParagraph):

  • platform/win/PasteboardWin.cpp:

(WebCore::Pasteboard::writeRangeToDataObject):
(WebCore::Pasteboard::writeSelection):

  • rendering/RenderNamedFlowThread.cpp:

(WebCore::RenderNamedFlowThread::getRanges):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::absoluteBoundingBoxRectForRange):

Source/WebKit/mac:

Update Range API call sites to reflect changes.

  • WebView/WebImmediateActionController.mm:

(dictionaryPopupInfoForRange):

Source/WebKit/win:

Update Range API call sites to reflect changes.

  • DOMCoreClasses.cpp:

(DOMRange::startContainer):
(DOMRange::endContainer):
(DOMRange::collapsed):
(DOMRange::toString):

  • WebView.cpp:

(WebView::prepareCandidateWindow):
(WebView::onIMERequestCharPosition):
(WebView::firstRectForCharacterRangeForTesting): Deleted.

Source/WebKit2:

Update Range API call sites to reflect changes.

  • WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:

(-[WKDOMRange collapse:]):
(-[WKDOMRange startContainer]):
(-[WKDOMRange startOffset]):
(-[WKDOMRange endContainer]):
(-[WKDOMRange endOffset]):
(-[WKDOMRange isCollapsed]):
(-[WKDOMRange text]): Deleted.

  • WebProcess/WebPage/FindController.cpp:

(WebKit::FindController::getImageForFindMatch):
(WebKit::FindController::selectFindMatch):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::targetFrameForEditing):
(WebKit::WebPage::firstRectForCharacterRangeAsync): Deleted.

  • WebProcess/WebPage/efl/WebPageEfl.cpp:

(WebKit::targetFrameForEditing):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::rangeForBlockAtPoint):
(WebKit::containsRange):
(WebKit::unionDOMRanges):
(WebKit::WebPage::contractedRangeFromHandle):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::dictionaryPopupInfoForRange):
(WebKit::WebPage::firstRectForCharacterRange): Deleted.

LayoutTests:

  • fast/dom/Range/bug-19527.html:
  • fast/dom/Range/detach-range-during-deletecontents-expected.txt:
  • fast/dom/Range/range-compareNode-expected.txt:
  • fast/dom/Range/range-compareNode.html:
  • fast/dom/Range/range-comparePoint.html:
  • fast/dom/Range/range-intersectsNode-exception-expected.txt: Removed.
  • fast/dom/Range/range-intersectsNode-exception.html: Removed.
  • fast/dom/Range/range-intersectsNode-expected.txt:
  • fast/dom/Range/range-isPointInRange.html:
  • fast/dom/Range/resources/intersectsNode.js:

Update / rebaseline tests.

  • fast/dom/Range/range-detach-noop-expected.txt: Added.
  • fast/dom/Range/range-detach-noop.html: Added.

New test checking that Range.detach() is a no-op.

  • fast/dom/node-iterator-detach-noop-expected.txt: Added.
  • fast/dom/node-iterator-detach-noop.html: Added.

New test checking that NodeIterator.detach() is a no-op.

1:41 PM Changeset in webkit [189181] by Michael Catanzaro
  • 3 edits in trunk/Source/bmalloc

Implement bmalloc::isASanEnabled for generic Unix
https://bugs.webkit.org/show_bug.cgi?id=148623

Reviewed by Geoffrey Garen.

  • bmalloc/BPlatform.h: Add BOS_UNIX to detect whether the OS is a Unix.
  • bmalloc/Environment.cpp:

(bmalloc::isASanEnabled): Implement a runtime check that should work on any Unix.

1:32 PM Changeset in webkit [189180] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa] Unify showGlyphsWithAdvances
https://bugs.webkit.org/show_bug.cgi?id=148565

Reviewed by Dean Jackson.

None of the fonts created for WebKit have the renderingMode of
NSFontAntialiasedIntegerAdvancementsRenderingMode and are already printer fonts.

No new tests because there is no behavior change.

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::setCGFontRenderingMode):
(WebCore::FontCascade::drawGlyphs):

1:28 PM Changeset in webkit [189179] by clopez@igalia.com
  • 2 edits in trunk

[CMake] Build with Debug Fission on by default on Debug builds.
https://bugs.webkit.org/show_bug.cgi?id=148639

Reviewed by Martin Robinson.

  • Source/cmake/OptionsCommon.cmake:
11:40 AM Changeset in webkit [189178] by timothy_horton@apple.com
  • 10 edits in trunk/Source

iOS WebKit2 find-in-page doesn't support multi-line results, is often blank
https://bugs.webkit.org/show_bug.cgi?id=148599
<rdar://problem/17914031>

Reviewed by Beth Dakin.

  • WebProcess/WebPage/FindController.cpp:

(WebKit::FindController::findString):
(WebKit::FindController::didFindString):

  • WebProcess/WebPage/FindController.h:

Add didFindString() for FindControllerIOS.

  • WebProcess/WebPage/ios/FindControllerIOS.mm:

(WebKit::FindIndicatorOverlayClientIOS::drawRect):
(WebKit::FindController::updateFindIndicator):
(WebKit::setCompositionSelectionChangeEnabledInAllFrames):
(WebKit::FindController::willFindString):
(WebKit::FindController::didFindString):
(WebKit::FindController::didFailToFindString):
(WebKit::FindController::didHideFindIndicator):

  • WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:

(WebKit::FindIndicatorOverlayClientIOS::FindIndicatorOverlayClientIOS):
Adopt TextIndicator and shrink-wrapping.

We'll re-create the indicator if the device/page scale factor change;
this is the only case in which a TextIndicator sticks around when
page scale changes -- we should come up with a better model!

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::getClippedVisibleTextRectangles):
(WebCore::FrameSelection::getTextRectangles):

  • editing/FrameSelection.h:
  • page/TextIndicator.cpp:

(WebCore::initializeIndicator):

  • page/TextIndicator.h:

Make it possible to create a TextIndicator that isn't clipped to the visible rect,
because iOS find-in-page TextIndicators persist while scrolling the page,
and are already constrained to the document rect anyway.

11:31 AM Changeset in webkit [189177] by Antti Koivisto
  • 6 edits
    2 adds in trunk

Network Cache: Stale content after back navigation
https://bugs.webkit.org/show_bug.cgi?id=148634

Reviewed by Chris Dumez.

Source/WebKit2:

It is possible to get an older version of the previous page when navigating back. This can happen
if the main resource load has not completed before navigating away from the page.

Network cache entry is normally updated when the load completes. In case of cancellation we would leave
any existing entry as-is. However we render incrementally and user might have seen some content from
the partial load already. Navigating back to the cached page could show older version of the content.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::abort):

If a network load is canceled by the client after receiving response but before the load has completed
remove any existing cache entry for it.

LayoutTests:

  • http/tests/cache/disk-cache/disk-cache-302-status-code.html:
  • http/tests/cache/disk-cache/disk-cache-cancel-expected.txt: Added.
  • http/tests/cache/disk-cache/disk-cache-cancel.html: Added.
  • http/tests/cache/disk-cache/resources/cache-test.js:

Support delayed responses so we can test canceling the load.
Some minor improvements.

(makeHeaderValue):
(generateTestURL):
(loadResource):
(loadResourcesWithOptions):
(generateTests):

  • http/tests/cache/disk-cache/resources/generate-response.cgi:
11:15 AM Changeset in webkit [189176] by Alan Bujtas
  • 2 edits
    1 add
    7 deletes in trunk/LayoutTests

Repaint cleanup: 4776765.html. Use repaint rect tracking.

Unreviewed.

  • fast/repaint/4776765-expected.txt: Added.
  • fast/repaint/4776765.html:
  • platform/efl/fast/repaint/4776765-expected.png: Removed.
  • platform/efl/fast/repaint/4776765-expected.txt: Removed.
  • platform/gtk/fast/repaint/4776765-expected.png: Removed.
  • platform/gtk/fast/repaint/4776765-expected.txt: Removed.
  • platform/mac/fast/repaint/4776765-expected.png: Removed.
  • platform/mac/fast/repaint/4776765-expected.txt: Removed.
  • platform/win/fast/repaint/4776765-expected.txt: Removed.
11:08 AM Changeset in webkit [189175] by Brent Fulgham
  • 2 edits in trunk/WebKitLibraries

[Win] Unreviewed build fix.

  • win/lib32/WebKitSystemInterface.lib: Update with VS2015 build of this

library to avoid linker errors on build bots.

10:50 AM Changeset in webkit [189174] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, mark a few tests as failing on Windows.

They will be fixed via Bug 148602.

  • platform/win/TestExpectations:
10:43 AM Changeset in webkit [189173] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, mark new http/tests/w3c/dom/nodes/ParentNode-querySelector-All-xhtml.xhtml as flaky.

10:04 AM Changeset in webkit [189172] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Watchdog timer callback should release the lock before deref'ing the watchdog.
https://bugs.webkit.org/show_bug.cgi?id=148635

Reviewed by Filip Pizlo.

The deref'ing of the watchdog may free it. The lock may not be available to be unlocked
after the deref.

  • runtime/Watchdog.cpp:

(JSC::Watchdog::Watchdog):

9:53 AM Changeset in webkit [189171] by ap@apple.com
  • 2 edits in trunk/LayoutTests

Add test expectations for:

Many Web Inspector tests are flaky timeouts
https://bugs.webkit.org/show_bug.cgi?id=148636

  • platform/mac/TestExpectations:
9:37 AM WebKitGTK/2.10.x edited by Michael Catanzaro
Propose r189170, r188973, r189133 (diff)
9:35 AM WebKitGTK/2.8.x edited by Michael Catanzaro
Propose r189170 (significant leak) and clarify request for r189133 (diff)
9:32 AM Changeset in webkit [189170] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

[Freetype] FontCache::strengthOfFirstAlias leaks an FcPattern
https://bugs.webkit.org/show_bug.cgi?id=148624

Reviewed by Martin Robinson.

Using the normal RefPtr constructor causes the FcPattern to be reffed one extra time. Even
though the FcPattern is intentionally leaked to FcFontSetAdd down below, the FcPattern has
its own refcount and now it's screwed up. Just completely stop using RefPtr for these
FcPatterns, since the potential for confusion regarding leakRef combined with Fontconfig
refcounting far outweighs the benefit of using a smart pointer.

  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::strengthOfFirstAlias):

9:30 AM Changeset in webkit [189169] by jfernandez@igalia.com
  • 13 edits in trunk

[CSS Grid Layout] auto-margins alignment does not work for heights
https://bugs.webkit.org/show_bug.cgi?id=148071

Reviewed by Sergio Villar Senin.

Source/WebCore:

We still had pending to align grid items horizontally via auto-margins
alignment. We already landed a patch in r188582 to implement the
column-axis alignment and this patch implements the expected behavior in
the row-axis.

This patch also removes the logic in RenderBox, so we reduce grid related
code dependencies in the general layout logic. We can do that because this
patch manages that in the layoutGridItems function by resetting grid item's
margin and logicalTop (if it does not need to perform a layout, which it
would do the job anyway).

No new tests, we just need to adapt some cases of the ones we already have.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange): Deleted.
(WebCore::RenderBox::willBeRemovedFromTree): Deleted.
(WebCore::RenderBox::updateFromStyle): Deleted.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutGridItems):
(WebCore::RenderGrid::resetAutoMarginsAndLogicalTopInColumnAxis):
(WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded):
(WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded):
(WebCore::RenderGrid::hasAutoMarginsInRowAxis): Deleted.

  • rendering/RenderGrid.h:

LayoutTests:

Updated some test cases to adapt them to the new row-axis auto-margin alignment.

  • fast/css-grid-layout/grid-item-auto-margins-alignment-expected.txt:
  • fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr-expected.txt:
  • fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr.html:
  • fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl-expected.txt:
  • fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl.html:
  • fast/css-grid-layout/grid-item-auto-margins-alignment.html:
  • fast/css-grid-layout/grid-item-auto-margins-and-stretch.html:
9:15 AM Changeset in webkit [189168] by ap@apple.com
  • 2 edits in trunk/Source/WebCore

Build fix.

  • page/EventHandler.h:

(WebCore::EventHandler::immediateActionStage): Don't export an inline function,
to avoid "weak external symbol" errors.

8:37 AM Changeset in webkit [189167] by enrica@apple.com
  • 5 edits in trunk

Incorrect cursor movement for U+26F9, U+1F3CB with variations.
https://bugs.webkit.org/show_bug.cgi?id=148629
rdar://problem/22492366

Reviewed by Ryosuke Niwa.

Source/WebCore:

Updating text break iterator rules to correctly handle those two emoji with variations.

  • platform/text/TextBreakIterator.cpp:

(WebCore::cursorMovementIterator):

LayoutTests:

The test has been updated to test these two emoji and to
cover the cursor movement as well.

  • editing/deleting/delete-emoji-expected.txt:
  • editing/deleting/delete-emoji.html:
7:53 AM WebInspectorTests edited by BJ Burg
Add more details about testing Web Inspector using modern classes. (diff)
3:54 AM Changeset in webkit [189166] by svillar@igalia.com
  • 6 edits in trunk

[css-grid] Grid containers reporting wrong preferred widths
https://bugs.webkit.org/show_bug.cgi?id=147486

Reviewed by Darin Adler.

Source/WebCore:

RenderGrid used to have its own overwritten version of
computePreferredLogicalWidths() because we didn't have an
implementation of computeIntrinsicLogicalWidths(). That
implementation was not as complete as RenderBlock's because it
was not taking into account min/max-width restrictions.

Provided that computeIntrinsicLogicalWidths() has been there
for some time we can safelly kill our overwrite and use
RenderBlock's version which addresses all the FIXMEs we had in
our code.

  • rendering/RenderGrid.cpp:
  • rendering/RenderGrid.h:

LayoutTests:

Added new test cases to check the preferred widths reported by
grid containers when they are sized under min/max-width
constraints.

  • fast/css-grid-layout/grid-preferred-logical-widths-expected.txt:
  • fast/css-grid-layout/grid-preferred-logical-widths.html:
1:51 AM Changeset in webkit [189165] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Fix the WinCairo build after landing of webkit.org/b/148561.
https://bugs.webkit.org/show_bug.cgi?id=148627

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-08-31
Reviewed by Myles C. Maxfield.

Source/WebCore:

No new tests, no behavior change.

  • platform/graphics/win/ImageCairoWin.cpp:

(WebCore::BitmapImage::getHBITMAPOfSize):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::paint):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:

Source/WebKit/win:

  • WebCoreSupport/AcceleratedCompositingContext.cpp:

(AcceleratedCompositingContext::paintContents):

1:33 AM Changeset in webkit [189164] by Antti Koivisto
  • 10 edits in trunk

REGRESSION (r188820): fast/dom/HTMLObjectElement/object-as-frame.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=148533

Reviewed by Chris Dumez.

Source/WebCore:

<object> element may cause document load event fire too early. By making data URL
loading faster r188820 made this condition more likely to trigger in this test.

  • loader/SubframeLoader.cpp:

(WebCore::SubframeLoader::loadSubframe):

Post-parsing style recalc may trigger loads for <object> elements. If all other loads have already
completed this may cause load event to fire synchronously from the initial empty document construction.

Fix by preventing load events during subframe initialization. They will be fired if needed by the
subsequent explicit call to FrameLoader::checkCompleted.

LayoutTests:

Unskip.

  • fast/dom/HTMLObjectElement/object-as-frame.html:

Use more logical text in the data url.

  • http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:
  • http/tests/loading/basic-credentials-sent-automatically-expected.txt:
  • platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:
  • platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt:
  • webarchive/loading/object-expected.txt:

Update test results.

Aug 30, 2015:

11:22 PM Changeset in webkit [189163] by Chris Fleizach
  • 2 edits in trunk/LayoutTests

AX: When navigating the elements of a scrollable element with VoiceOver, the scrollTop() position of the element does not permanently change
https://bugs.webkit.org/show_bug.cgi?id=125720

Unreviewed. Skip failing tests on Windows due to lack of DRT implementations.

  • platform/win/TestExpectations:
10:53 PM Changeset in webkit [189162] by Yusuke Suzuki
  • 3 edits in trunk/Source/JavaScriptCore

[ES6] JSON.stringify should ignore object properties that have symbol values and convert the symbol values in array to null
https://bugs.webkit.org/show_bug.cgi?id=148628

Reviewed by Saam Barati.

As per ECMA262 6.0,

  1. JSON.stringify should ignore object properties that have symbol values.

SerializeJSONProperty[1] will return undefined if the value of the property is a symbol.
In this case, SerializeJSONObject[2] does not append any string for this property.

  1. JSON.stringify should convert the symbol values in array to null

As the same to the object case, SerializeJSONProperty will return undefined if the value of the property is a symbol.
But in the case of arrays, if the result of SerializeJSONProperty is undefined, it will emit "null"[3].
This behavior is already implemented in the existing JSON.stringify. Added tests to ensure that.

[1]: http://www.ecma-international.org/ecma-262/6.0/#sec-serializejsonproperty
[2]: http://www.ecma-international.org/ecma-262/6.0/#sec-serializejsonobject
[3]: http://www.ecma-international.org/ecma-262/6.0/#sec-serializejsonarray

  • runtime/JSONObject.cpp:

(JSC::unwrapBoxedPrimitive):
(JSC::Stringifier::appendStringifiedValue):
(JSC::Stringifier::Holder::appendNextProperty):

  • tests/stress/symbol-with-json.js:

(shouldBe):

4:29 PM Changeset in webkit [189161] by ryuan.choi@navercorp.com
  • 6 edits in trunk/Source/WebCore

[CoordinatedGraphics] Remove unnecessary two virtual methods from TiledBackingStoreClient
https://bugs.webkit.org/show_bug.cgi?id=147137

Reviewed by Gyuyoung Kim.

tiledBackingStoreContentsRect() and tiledBackingStoreVisibleRect() are not
necessary because CoordinatedGraphicsLayer can pass them directly if needed.
This patch removes them in order to simplify code flow between TiledBackingStore
and CoordinatedGraphicsLayer.

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::imageBackingVisible):
(WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
(WebCore::clampToContentsRectIfRectIsInfinite):
(WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
(WebCore::CoordinatedGraphicsLayer::tiledBackingStoreContentsRect): Deleted.
(WebCore::CoordinatedGraphicsLayer::tiledBackingStoreVisibleRect): Deleted.

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
  • platform/graphics/texmap/coordinated/TiledBackingStore.cpp:

(WebCore::TiledBackingStore::createTilesIfNeeded):
(WebCore::TiledBackingStore::coverageRatio):
(WebCore::TiledBackingStore::visibleAreaIsCovered):
Used TiledBackingStore's m_visibleRect and m_rect, cached and scaled values for
visibleRect, contentsRect.
(WebCore::TiledBackingStore::createTiles):
(WebCore::TiledBackingStore::removeAllNonVisibleTiles):
(WebCore::TiledBackingStore::coverWithTilesIfNeeded): Renamed to createTilesIfNeeded.
(WebCore::TiledBackingStore::visibleRect): Deleted. nobody used.

  • platform/graphics/texmap/coordinated/TiledBackingStore.h:
  • platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:

(WebCore::TiledBackingStoreClient::tiledBackingStoreHasPendingTileCreation):
Removed default implementation.

3:33 PM Changeset in webkit [189160] by fpizlo@apple.com
  • 10 edits in trunk/Source/JavaScriptCore

JSC property attributes should fit in a byte
https://bugs.webkit.org/show_bug.cgi?id=148611

Reviewed by Sam Weinig.

I want to make room in PropertyMapEntry for more things to support property type inference (see
https://bugs.webkit.org/show_bug.cgi?id=148610). The most obvious candidate for a size reduction is
attributes, since we only have a small number of attribute bits. Even without complex changes, it
would have been possible to reduce the attribute field from 32 bits to 16 bits. Specifically, prior
to this change, the attributes field needed 9 bits. This made it very tempting to trim it so that
it could fit in a byte.

Luckily, many of the attributes bits are for the static lookup hashtables that we use for lazily
building objects in the standard library. Those bits don't need to stay around after the property
has been created, since they are just for telling the code in Lookup how to create the property.
So, this change separates the attributes bits into those that are interesting for Structure and
those that aren't. The ones used by Structure sit in the low 8 bits, allowing for the attributes
field in PropertyMapEntry to be a uint8_t. The attributes bits used only by Lookup use the higher
bits. In production, the conversion from the Lookup attributes to the Structure attributes is just
a cast to uint8_t. In debug, we assert that those bits are not dropped by accident. Code that
intentionally drops those bits calls attributesForStructure().

It turned out that there was a lot of code that was using the Function bit even in code that didn't
involve Lookup. This change removes those uses of Function. Structure does not need to know if we
think that a property points to a function.

  • jsc.cpp:

(GlobalObject::finishCreation):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSObject.h:
  • runtime/Lookup.cpp:

(JSC::setUpStaticFunctionSlot):

  • runtime/Lookup.h:

(JSC::getStaticPropertySlot):
(JSC::getStaticValueSlot):
(JSC::reifyStaticProperties):

  • runtime/MathObject.cpp:

(JSC::MathObject::finishCreation):

  • runtime/NumberConstructor.cpp:

(JSC::NumberConstructor::finishCreation):

  • runtime/PropertySlot.h:

(JSC::attributesForStructure):
(JSC::PropertySlot::setValue):
(JSC::PropertySlot::setCustom):
(JSC::PropertySlot::setCacheableCustom):
(JSC::PropertySlot::setGetterSlot):
(JSC::PropertySlot::setCacheableGetterSlot):

  • runtime/Structure.h:

(JSC::PropertyMapEntry::PropertyMapEntry):

12:08 AM Changeset in webkit [189159] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, mark http/tests/w3c/dom/nodes/Element-matches.html as flaky.

Note: See TracTimeline for information about the timeline view.