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

Timeline



Oct 8, 2016:

9:17 PM Changeset in webkit [206965] by Chris Dumez
  • 8 edits
    1 add
    7 deletes in trunk

Source/WebCore:
[Mac] Write WebArchive to the pasteboard when copying image in WebKit
https://bugs.webkit.org/show_bug.cgi?id=163100

Reviewed by Darin Adler.

Write WebArchive to the pasteboard when copying image in WebKit. This
fixes pasting such images to a content editable field in WebKit because
Web archives take priority over RTFD when reading from the pasteboard
in WebKit.

Using RTFD when pasting the image in WebKit was causing issues because:

  1. The pasted image would not be displayed because our RTFD import code is buggy.
  2. The pasted image URL was a webkit-fake-url://
  3. Formatting associated to the image (e.g. inline style) would be lost

No new tests, unskipped existing test on WebKit2.

  • editing/Editor.h:
  • editing/mac/EditorMac.mm:

(WebCore::Editor::imageInWebArchiveFormat):
(WebCore::Editor::writeImageToPasteboard):

  • platform/Pasteboard.h:
  • platform/mac/PasteboardMac.mm:

(WebCore::writableTypesForImage):
(WebCore::Pasteboard::write):
(WebCore::Pasteboard::Pasteboard): Deleted.
(WebCore::Pasteboard::createForCopyAndPaste): Deleted.

LayoutTests:
[Mac] Write HTML to the pasteboard when copying image in WebKit
https://bugs.webkit.org/show_bug.cgi?id=163100

Reviewed by Darin Adler.

Convert editing/pasteboard/copy-standalone-image.html into a ref test
and unskip on WebKit2 now that it passes there as well. Before this
patch, the test would fail on WebKit2 (the pasted image would not be
displayed).

  • editing/pasteboard/copy-standalone-image-expected.html: Added.
  • editing/pasteboard/copy-standalone-image.html:
  • platform/gtk/editing/pasteboard/copy-standalone-image-expected.png: Removed.
  • platform/gtk/editing/pasteboard/copy-standalone-image-expected.txt: Removed.
  • platform/ios-simulator-wk2/editing/pasteboard/copy-standalone-image-expected.png: Removed.
  • platform/ios-simulator/editing/pasteboard/copy-standalone-image-expected.txt: Removed.
  • platform/mac/editing/pasteboard/copy-standalone-image-expected.png: Removed.
  • platform/mac/editing/pasteboard/copy-standalone-image-expected.txt: Removed.
  • platform/win/editing/pasteboard/copy-standalone-image-expected.txt: Removed.
  • platform/wk2/TestExpectations:
8:46 PM Changeset in webkit [206964] by Chris Dumez
  • 13 edits in trunk

Update CustomEvent to stop using legacy [ConstructorTemplate=Event]
https://bugs.webkit.org/show_bug.cgi?id=163174

Reviewed by Darin Adler.

Source/WebCore:

Update CustomEvent to stop using legacy [ConstructorTemplate=Event] and
use an actual constructor instead, like in the specification:

There is a very minor behavior change when explictly passing undefined
as detail value in CustomEventInit. We used to initialize detail to
undefined but we now initialize it to null instead, which is its default
value. The new behavior matches the one of Chrome and Firefox.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDefaultValue):
(GenerateDictionaryImplementationContent):

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

(WebCore::convertDictionary<TestObj::Dictionary>):

  • bindings/scripts/test/TestObj.idl:
  • dom/CustomEvent.cpp:

(WebCore::CustomEvent::CustomEvent):

  • dom/CustomEvent.h:
  • dom/CustomEvent.idl:
  • dom/Document.cpp:

(WebCore::Document::createEvent):

  • dom/Event.cpp:

(WebCore::Event::Event):

  • dom/Event.h:

LayoutTests:

Update existing layout test to reflect minor behavior change.

  • fast/events/constructors/custom-event-constructor-expected.txt:
  • fast/events/constructors/custom-event-constructor.html:
5:03 PM Changeset in webkit [206963] by Chris Dumez
  • 24 edits
    7 adds in trunk

Add support for ClipboardEvent
https://bugs.webkit.org/show_bug.cgi?id=163164

Reviewed by Darin Adler.

Source/WebCore:

Add support for ClipboardEvent:

Firefox and Chrome both already support this.

This gives us 5 more points on html5test.com.

Tests: editing/pasteboard/clipboard-event.html

fast/events/clipboard-event-constructor.html

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSEventCustom.cpp:

(WebCore::toJSNewlyCreated): Deleted.

  • bindings/scripts/CodeGeneratorJS.pm:

(WillConvertUndefinedToDefaultParameterValue):
We use [] as implicit default value for dictionary parameters. This change
is so we call convertDictionary<>() even if the parameter is undefined
because we want to pass a struct to the implementation initialized with
the default member values defined in the IDL.

  • dom/ClipboardEvent.cpp:

(WebCore::ClipboardEvent::ClipboardEvent):
(WebCore::ClipboardEvent::eventInterface):

  • dom/ClipboardEvent.h:
  • dom/ClipboardEvent.idl: Added.
  • dom/Event.cpp:

(WebCore::Event::Event):

  • dom/Event.h:
  • dom/Event.idl:
  • dom/EventInit.h: Added.
  • dom/EventInit.idl: Added.
  • dom/EventNames.in:
  • dom/MouseEvent.h:

(WebCore::MouseEvent::dataTransfer):

  • editing/Editor.cpp:

(WebCore::Editor::dispatchCPPEvent):

LayoutTests:

Extended layout test coverage.

  • editing/pasteboard/clipboard-event-expected.txt: Added.
  • editing/pasteboard/clipboard-event.html: Added.
  • fast/events/clipboard-event-constructor-expected.txt: Added.
  • fast/events/clipboard-event-constructor.html: Added.
  • fast/xmlhttprequest/xmlhttprequest-get-expected.txt:
  • http/tests/workers/worker-importScriptsOnError-expected.txt:
  • inspector/model/remote-object-get-properties-expected.txt:
  • js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:
4:17 PM Changeset in webkit [206962] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking js/regress-141098.html as flaky on mac.
https://bugs.webkit.org/show_bug.cgi?id=163046

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:12 PM Changeset in webkit [206961] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit2

[GTK] Drop redundant wl_display_flush_clients() call
https://bugs.webkit.org/show_bug.cgi?id=161904

Patch by Emanuele Aina <Emanuele Aina> on 2016-10-08
Reviewed by Michael Catanzaro.

The Wayland GSource::prepare() function already calls
wl_display_flush_clients() at every mainloop iteration, so there's no
need to further call it on Surface::commit().

  • UIProcess/gtk/WaylandCompositor.cpp:

(WebKit::WaylandCompositor::Surface::commit):

  • UIProcess/gtk/WaylandCompositor.h:
4:01 PM Changeset in webkit [206960] by Darin Adler
  • 54 edits in trunk

Next step on moving to modern way to return DOM exceptions
https://bugs.webkit.org/show_bug.cgi?id=163016

Reviewed by Ryosuke Niwa.

Source/WebCore:

  • Modules/fetch/FetchRequest.idl:

Added MayThrowException to initializeWith since it throws an exception.

  • bindings/js/JSCallbackData.cpp:

(WebCore::JSCallbackData::invokeCallback):

  • bindings/js/JSCustomElementInterface.cpp:

(WebCore::JSCustomElementInterface::invokeCallback):

  • bindings/js/JSCustomSQLStatementErrorCallback.cpp:

(WebCore::JSSQLStatementErrorCallback::handleEvent):

  • bindings/js/JSCustomXPathNSResolver.cpp:

(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):

  • bindings/js/JSDOMBinding.cpp:

(WebCore::reportException):
(WebCore::reportCurrentException):

  • bindings/js/JSErrorHandler.cpp:

(WebCore::JSErrorHandler::handleEvent):

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::handleEvent):

  • bindings/js/JSMutationCallback.cpp:

(WebCore::JSMutationCallback::call):

  • bindings/js/JSNodeFilterCustom.cpp:

(WebCore::JSNodeFilter::acceptNode):

  • bindings/js/ScheduledAction.cpp:

(WebCore::ScheduledAction::executeFunctionInContext):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::evaluateInWorld):

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::evaluate):

  • inspector/PageScriptDebugServer.cpp:

(WebCore::PageScriptDebugServer::reportException):
Use JSC::Exception explicitly to avoid ambiguity with WebCore::Exception,
or in some cases use auto instead.

  • bindings/js/JSDOMBinding.cpp:

(WebCore::hasUnpairedSurrogate): Factored this inline function out of valueToUSVString
for clarity.
(WebCore::createDOMException): Removed unused TRY_TO_CREATE_EXCEPTION macro.
(WebCore::propagateExceptionSlowPath): Added.
(WebCore::propagateException): Added.
(WebCore::setDOMException): Removed overload that takes an exception code and message
string separately; no longer needed.

  • bindings/js/JSDOMBinding.h: Include the ExceptionOr header

rather than forward declaring. Added more of the ExceptionOr handling
functions; some just declared and not yet defined. Updated for changes
to ExceptionOr interface. Removed the createDOMException function that takes
only an exception code; not needed outside JSDOMBinding.cpp.

  • bindings/js/JSXMLHttpRequestCustom.cpp:

(WebCore::JSXMLHttpRequest::send): Rewrote this to use ExceptionOr instead
of ExceptionCode. Added some FIXMEs as well.
(WebCore::JSXMLHttpRequest::responseText): Ditto.
(WebCore::JSXMLHttpRequest::retrieveResponse): Ditto.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation): Fixed if statements to follow WebKit coding style
rather than using extra braces. Added call to propagateException for SetterMayThrowException.
(GenerateSerializerFunction): Fixed if statements as above.
(GenerateParametersCheck): Ditto. Also added call to propagateException for functions with
void return type and MayThrowException.
(GenerateReturnParameters): Tweaked coding style a bit.
(addIterableProperties): Fixed if statements as above.
(NativeToJSValue): Added code to handle various cases of GetterMayThrowException
and MayThrowException.
(GenerateConstructorDefinition): Used encodedJSValue() instead of
JSValue::encode(JSValue()), a longer way to say the same thing.

  • bindings/scripts/IDLAttributes.txt: Added GetterMayThrowException,

MayThrowException, and SetterMayThrowException.

  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:
  • bindings/scripts/test/JS/JSTestException.cpp:
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestNondeterministic.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • bindings/scripts/test/JS/JSattribute.cpp:

Regenerated results.

  • bindings/scripts/test/TestObj.idl: Added some test cases.
  • dom/DOMImplementation.cpp:

(WebCore::DOMImplementation::createDocumentType): Tweaked formatting.
(WebCore::DOMImplementation::createDocument): Ditto.

  • dom/DOMImplementation.idl: Added MayThrowException to two functions since

I am abandoning, for now, the ability to throw exceptions without any extended
attribute in the IDL file. This feature may return at some point if we figure
out a way to do it for functions without return values as well as functions with.

  • dom/Document.cpp:

(WebCore::Document::exitPointerLock): Rewrote to streamline logic.
(WebCore::Document::pointerLockElement): Ditto.
(WebCore::Document::inputCursor): Added. No need for this to be inlined.
(WebCore::Document::setInputCursor): Changed to take Ref&&.
(WebCore::Document::getSelection): Added. Moved here from TreeScope.

  • dom/Document.h: Updated for above changes.
  • dom/Document.idl: Tweaked formatting.
  • dom/Exception.h: Merged the two constructors into one with a default

argument value, which should be equally efficient. Added releaseMessage function.
Added assertion that this is only created for actual exceptions with non-zero
ExceptionCode. Unlike ExceptionCode, which has a value of 0 which means no
exception, we do not create an Exception if there is no exception.

  • dom/ExceptionOr.h: Renamed takeReturnValue to releaseReturnValue. Replaced

exceptionCode and exceptionMessage with releaseException. Added ExceptionOr<void>
specialization.

  • dom/TreeScope.cpp:

(WebCore::TreeScope::~TreeScope): Removed code dealing with
m_selection, which is now in Document.
(WebCore::TreeScope::getSelection): Deleted.

  • dom/TreeScope.h: Removed DOMSelection.
  • page/DOMSelection.cpp:

(WebCore::selectionShadowAncestor): Changed to take a reference rather than
a guaranteed-non-null pointer.
(WebCore::DOMSelection::DOMSelection): Changed to take a Frame& instead of
of a TreeScope*.
(WebCore::DOMSelection::clearTreeScope): Deleted.
(WebCore::DOMSelection::isCollapsed): Updated call to selectionShadowAncestor.
(WebCore::DOMSelection::type): Took out obsolete uneeeded comment. Got rid
of case where this returns a null string. Use ASCIILiteral.
(WebCore::DOMSelection::rangeCount): Streamlined code.
(WebCore::DOMSelection::collapse): Removed redundant check of m_frame for
null which is already handled by the isValidForPosition function.
Removed non-helpful FIXME.
(WebCore::DOMSelection::collapseToEnd): Changed to use ExceptionOr instead of
ExceptionCode.
(WebCore::DOMSelection::collapseToStart): Ditto.
(WebCore::DOMSelection::setBaseAndExtent): Removed redundant check of m_frame
for null which is already handled by the isValidForPosition function. Removed
non-helpful FIXME.
(WebCore::DOMSelection::setPosition): Ditto.
(WebCore::DOMSelection::extend): Changed to use ExceptionOr instead of
ExceptionCode.
(WebCore::DOMSelection::getRangeAt): Ditto.
(WebCore::DOMSelection::isValidForPosition): Changed to return false when
m_frame is null rather than asserting is is non-null and having every caller
check m_frame before calling this.

  • page/DOMSelection.h: Use #pragma once. Fix indentation. Removed unneeded

comments. Use ExceptionOr rather than ExceptionCode.

  • page/DOMSelection.idl: Move from MayThrowLegacyException to MayThrowException.
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::resetDOMWindowProperties): Sorted properties alphabetically
to make it more obvious if any are accidentally omitted or listed twice.
(WebCore::DOMWindow::getSelection): Changed ownership so that the window owns
the selection like all the other objects, rather than having it be owned by the
document instead.

  • page/DOMWindow.h: Added m_selection, sorted all the other related properties

alphabetically so it's easy to compare the list here with elsewhere.

  • replay/ReplayController.cpp:

(WebCore::ReplayController::frameNavigated): Updated to call setInputCursor
with a reference rather than a pointer.

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::responseText): Use ExceptionOr rather than ExceptionCode.
(WebCore::XMLHttpRequest::responseXML): Ditto.
(WebCore::XMLHttpRequest::setTimeout): Ditto.
(WebCore::XMLHttpRequest::setResponseType): Ditto.
(WebCore::XMLHttpRequest::setWithCredentials): Ditto.
(WebCore::XMLHttpRequest::open): Ditto.
(WebCore::XMLHttpRequest::prepareToSend): Changed to return an
Optional<ExceptionOr> to reflect the three different states: an exception,
a value to return without sending, or "continue with the send algorithm".
The old code did this with a boolean plus an exception code. This sounds
confusing but is easy to read at the call sites, so probably OK to keep.
(WebCore::XMLHttpRequest::send): Use ExceptionOr rather than ExceptionCode.
(WebCore::XMLHttpRequest::sendBytesData): Ditto.
(WebCore::XMLHttpRequest::createRequest): Ditto.
(WebCore::XMLHttpRequest::overrideMimeType): Ditto.
(WebCore::XMLHttpRequest::setRequestHeader): Ditto.

  • xml/XMLHttpRequest.h: Updated for changes above.
  • xml/XMLHttpRequest.idl: Sorted interface extended attributes alphabetically.

Changed from MayThrowLegacyException to MayThrowException.

Source/WebKit/mac:

  • DOM/DOMDOMImplementation.mm:

(-[DOMImplementation createDocumentType:publicId:systemId:]): Updated for
name change from takeReturnValue to releaseReturnValue.
(-[DOMImplementation createDocument:qualifiedName:doctype:]): Ditto.

Source/WebKit2:

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:

(webkit_dom_dom_implementation_create_document_type): Updated for name change
from takeReturnValue to releaseReturnValue.
(webkit_dom_dom_implementation_create_document): Ditto.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMSelection.cpp:

(webkit_dom_dom_selection_collapse_to_end): Use ExceptionOr instead of ExceptionCode.
(webkit_dom_dom_selection_collapse_to_start): Ditto.
(webkit_dom_dom_selection_extend): Ditto.
(webkit_dom_dom_selection_get_range_at): Ditto.

Tools:

  • Scripts/do-webcore-rename: Add proposed name change of setDOMException

to propagateException, since this function is primarily used to take an
exception already effectively "thrown" by setting an ExceptionCode out
argument and propagate it into the JavaScript engine's exception machinery.

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

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

broke an API test (Requested by thorton on #webkit).

Reverted changeset:

"Share more code between iOS and macOS ViewGestureController"
https://bugs.webkit.org/show_bug.cgi?id=163158
http://trac.webkit.org/changeset/206950

1:14 PM Changeset in webkit [206958] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/media/track-in-band-hls-metadata.html as a flaky timeout on mac.
https://bugs.webkit.org/show_bug.cgi?id=140022

Unreviewed test gardening.

  • platform/mac/TestExpectations:
12:50 PM Changeset in webkit [206957] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking storage/indexeddb/key-generator.html as flaky on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=161653

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
12:07 PM Changeset in webkit [206956] by weinig@apple.com
  • 22 edits
    4 deletes in trunk/Source/WebCore

Autogenerate passing union types as part of a functions variadic arguments
https://bugs.webkit.org/show_bug.cgi?id=162919

Reviewed by Darin Adler.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:

Remove deleted files.

  • bindings/generic/IDLTypes.h:

Switch to use std::reference_wrapper as it's implementation type. We may need more
granularity here in the future, but this will work for now.

  • bindings/js/JSCharacterDataCustom.cpp: Removed.
  • bindings/js/JSDocumentTypeCustom.cpp: Removed.
  • bindings/js/JSNodeOrString.cpp: Removed.
  • bindings/js/JSNodeOrString.h: Removed.
  • bindings/js/JSDOMBinding.h:

(WebCore::VariadicHelperBase::convert): Deleted.
(WebCore::toArguments): Deleted.
Moved to JSDOMConvert.h and renamed to convertVariadicArguments and make
it work in terms of IDLTypes.

  • bindings/js/JSDOMConvert.h:

(WebCore::Converter<IDLInterface<T>>::convert):
(WebCore::VariadicConverterBase::convert):
(WebCore::VariadicConverterBase<IDLInterface<T>>::convert):
(WebCore::convertVariadicArguments):

  • bindings/js/JSDocumentCustom.cpp:

(WebCore::JSDocument::prepend): Deleted.
(WebCore::JSDocument::append): Deleted.

  • bindings/js/JSDocumentFragmentCustom.cpp:

(WebCore::JSDocumentFragment::prepend): Deleted.
(WebCore::JSDocumentFragment::append): Deleted.

  • bindings/js/JSElementCustom.cpp:

(WebCore::JSElement::before): Deleted.
(WebCore::JSElement::after): Deleted.
(WebCore::JSElement::replaceWith): Deleted.
(WebCore::JSElement::prepend): Deleted.
(WebCore::JSElement::append): Deleted.
Remove now generated functions.

  • bindings/scripts/CodeGenerator.pm:

(assert):
Add assert to help debugging.

(ParseInterface):
Don't treat union types as interfaces.

(GetFlattenedMemberTypes):
(GetNumberOfNullableMemberTypes):
(GetIDLUnionMemberTypes):
Implement WebIDL algorithms for getting the flattened member list of union, and use it
to construct the c++ IDLType.

(GetBaseIDLType):
(GetIDLType):
Add helper to convert an parsed idlType to a c++ IDLType.

(IsWrapperType):
Don't treat union types as wrappers.

  • bindings/scripts/CodeGeneratorJS.pm:

(AddToImplIncludesForIDLType):
Add helper for adding #includes based on a parsed idlType. It recursively handles union types.

(GenerateParametersCheck):
Use the new convertVariadicArguments function to handle all variadic arguments, including
union types.

  • bindings/scripts/IDLParser.pm:

(parseDictionaryMember):
(parseAttributeRest):
(parseOptionalOrRequiredArgument):
(parseExceptionField):
Add an idlType to domSignature and populate it.

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

(WebCore::jsTestObjPrototypeFunctionOverloadedMethod13):
(WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicUnionMethod):

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

(WebCore::constructJSTestOverloadedConstructors5):

  • bindings/scripts/test/TestObj.idl:

Add and update tests.

  • dom/ChildNode.idl:
  • dom/ParentNode.idl:

Remove Custom extended attribute.

  • dom/ContainerNode.cpp:
  • dom/ContainerNode.h:
  • dom/Node.cpp:
  • dom/Node.h:

Switch to using std::reference_wrapper instead of Ref<> for passed in parameters.

11:32 AM Changeset in webkit [206955] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

HasIndexedProperty clobberize rule is wrong for Array::ForceOSRExit
https://bugs.webkit.org/show_bug.cgi?id=159942
<rdar://problem/27328836>

Reviewed by Filip Pizlo.

When HasIndexedProperty has a ForceOSRExit array mode, it should
report to write to side state, like the ForceOSRExit node, and the
other nodes with ForceOSRExit array mode.

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

7:49 AM Changeset in webkit [206954] by commit-queue@webkit.org
  • 10 edits in trunk

[Fetch API] Request constructor should provide exception messages
https://bugs.webkit.org/show_bug.cgi?id=162382

Source/WebCore:

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-08
Reviewed by Darin Adler.

No change of behavior, except that exceptions now have error messages.

Added support of exception messages to ExceptionOr.
Making use of ExceptionOr for Request constructor parameter checking.

  • Modules/fetch/FetchRequest.cpp:

(WebCore::setReferrerPolicy):
(WebCore::setMode):
(WebCore::setCredentials):
(WebCore::setCache):
(WebCore::setRedirect):
(WebCore::setMethod):
(WebCore::setReferrer):
(WebCore::buildOptions):
(WebCore::FetchRequest::initializeOptions):
(WebCore::FetchRequest::initializeWith):

  • Modules/fetch/FetchRequest.h:
  • Modules/fetch/FetchRequest.idl:
  • bindings/js/JSDOMBinding.cpp:

(WebCore::setDOMException):

  • bindings/js/JSDOMBinding.h:

(WebCore::toJS):
(WebCore::toJSNewlyCreated):

  • dom/Exception.h:

(WebCore::Exception::code):
(WebCore::Exception::message):
(WebCore::Exception::Exception):

  • dom/ExceptionOr.h:

(WebCore::ExceptionOr<ReturnType>::exceptionMessage):

LayoutTests:

Patch by Youenn Fablet <youennf@gmail.com> on 2016-10-08
Reviewed by Darin Adler.

  • fetch/fetch-url-serialization-expected.txt: Rebasing test expectation.
6:09 AM Changeset in webkit [206953] by commit-queue@webkit.org
  • 27 edits in trunk/Source/WebCore

Refactor binding generated casted-this checks
https://bugs.webkit.org/show_bug.cgi?id=162677

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-08
Reviewed by Darin Adler.

No change of behavior.

Split the attribute getter function in two, one with the signature expected by JSCore and one used after casted-this checks.

The second function takes directly a JSXX object and returns a JSValue instead of an EncodedJSValue.
In the future, the second function should only take references.

Introducing BindingCaller as a way to templatize binding code used to cast thisValue with the desired JSXX value.
This allows implementing the first function using the second function as template parameter.

Introducing JSClass::castForAttribute as a way to encapsulate differences in the way to handle thisValue access.

  • bindings/js/JSDOMBinding.h:

(WebCore::BindingCaller::attribute):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):

  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.h:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:
  • bindings/scripts/test/JS/JSTestEventConstructor.h:
  • bindings/scripts/test/JS/JSTestException.cpp:
  • bindings/scripts/test/JS/JSTestException.h:
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestNode.h:
  • bindings/scripts/test/JS/JSTestNondeterministic.cpp:
  • bindings/scripts/test/JS/JSTestNondeterministic.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.h:
  • bindings/scripts/test/JS/JSattribute.cpp:
  • bindings/scripts/test/JS/JSattribute.h:
4:54 AM Changeset in webkit [206952] by eocanha@igalia.com
  • 2 edits in trunk/Source/WebCore

Missing include in MediaDescription
https://bugs.webkit.org/show_bug.cgi?id=162873

Reviewed by Xabier Rodriguez-Calvar.

Added missing header.

  • platform/MediaDescription.h:
1:42 AM Changeset in webkit [206951] by Antti Koivisto
  • 24 edits in trunk/Source/WebCore

Move StyleResolver ownership from Document/ShadowRoot to Style::Scope
https://bugs.webkit.org/show_bug.cgi?id=163148

Reviewed by Andreas Kling.

Reduce duplication between Document and ShadowRoot.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::propertyValue):

  • css/CSSStyleSheet.cpp:

(WebCore::CSSStyleSheet::didMutateRules):

  • css/ElementRuleCollector.cpp:

(WebCore::ElementRuleCollector::matchHostPseudoClassRules):
(WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):

  • css/MediaQueryMatcher.cpp:

(WebCore::MediaQueryMatcher::documentElementUserAgentStyle):

  • css/StyleMedia.cpp:

(WebCore::StyleMedia::matchMedium):

  • css/parser/SizesAttributeParser.cpp:

(WebCore::SizesAttributeParser::mediaConditionMatches):

  • dom/Document.cpp:

(WebCore::Document::~Document):
(WebCore::Document::childrenChanged):
(WebCore::Document::isPageBoxVisible):
(WebCore::Document::pageSizeAndMarginsInPixels):
(WebCore::Document::userAgentShadowTreeStyleResolver):
(WebCore::Document::fontsNeedUpdate):
(WebCore::Document::didClearStyleResolver):
(WebCore::Document::updateViewportUnitsOnResize):
(WebCore::Document::createStyleResolver): Deleted.
(WebCore::Document::clearStyleResolver): Deleted.

  • dom/Document.h:

(WebCore::Document::styleResolverIfExists): Deleted.
(WebCore::Document::ensureStyleResolver): Deleted.

  • dom/Element.cpp:

(WebCore::Element::styleResolver):

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::styleResolver): Deleted.
(WebCore::ShadowRoot::styleResolverIfExists): Deleted.
(WebCore::ShadowRoot::resetStyleResolver): Deleted.

  • dom/ShadowRoot.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::getMatchedCSSRules):

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

  • page/Page.cpp:

(WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):

  • page/PrintContext.cpp:

(WebCore::PrintContext::pageProperty):

  • platform/MemoryPressureHandler.cpp:

(WebCore::MemoryPressureHandler::releaseCriticalMemory):

  • style/AttributeChangeInvalidation.cpp:

(WebCore::Style::mayBeAffectedByHostStyle):

  • style/ClassChangeInvalidation.cpp:

(WebCore::Style::mayBeAffectedByHostStyle):

  • style/IdChangeInvalidation.cpp:

(WebCore::Style::mayBeAffectedByHostStyle):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::resolver):
(WebCore::Style::Scope::resolverIfExists):
(WebCore::Style::Scope::clearResolver):
(WebCore::Style::Scope::analyzeStyleSheetChange):
(WebCore::Style::Scope::updateActiveStyleSheets):
(WebCore::Style::Scope::updateStyleResolver):
(WebCore::Style::Scope::styleResolver): Deleted.
(WebCore::Style::Scope::styleResolverIfExists): Deleted.

  • style/StyleScope.h:
  • style/StyleSharingResolver.cpp:

(WebCore::Style::SharingResolver::resolve):
(WebCore::Style::SharingResolver::canShareStyleWithElement):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::Scope::Scope):
(WebCore::Style::TreeResolver::resolve):

1:31 AM Changeset in webkit [206950] by timothy_horton@apple.com
  • 8 edits in trunk/Source/WebKit2

Share more code between iOS and macOS ViewGestureController
https://bugs.webkit.org/show_bug.cgi?id=163158

Reviewed by Simon Fraser.

Share canSwipeInDirection() and the (unused on Mac) alternate back-forward list mechanism.
Make ViewGestureController operate in terms of WebPageProxy, not WKWebView,
because it shouldn't know anything about WKWebView.
Refactor scrollEventCanBecomeSwipe a bit to be less repetitive.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView setAllowsBackForwardNavigationGestures:]):

  • UIProcess/Cocoa/ViewGestureController.cpp:

(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::setAlternateBackForwardListSourcePage):
(WebKit::ViewGestureController::canSwipeInDirection):
(WebKit::ViewGestureController::gestureControllerForPage): Deleted.

  • UIProcess/Cocoa/ViewGestureController.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::WebPageProxy):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::createWeakPtr):

  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::setAlternateBackForwardListSourceView): Deleted.
(WebKit::ViewGestureController::canSwipeInDirection): Deleted.

  • UIProcess/mac/ViewGestureControllerMac.mm:

(WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):

Oct 7, 2016:

8:31 PM Changeset in webkit [206949] by Chris Dumez
  • 8 edits in trunk

window.navigator.language incorrectly returns all lowercase string
https://bugs.webkit.org/show_bug.cgi?id=163096

Reviewed by Darin Adler.

Source/WebCore:

Update navigator.language so that it no longer returns an all lowercase
string (e.g. 'en-us' -> 'en-US'). This matches the behavior of other
browsers and the specification which indicate we should return a
BCP 47 language tag:

The other call sites relying on userPreferredLanguages() use case
insensitive comparison so they will not break.

No new tests, updated existing test.

  • platform/Language.h:

Source/WTF:

Update platformUserPreferredLanguages() so that it no longer lowercases
the string it returns. On Mac, we rely on CFLocale which returns
BCP-47 language tags as per:

  • wtf/PlatformUserPreferredLanguagesMac.mm:

(WTF::httpStyleLanguageCode):

  • wtf/PlatformUserPreferredLanguagesUnix.cpp:

(WTF::platformLanguage):

LayoutTests:

Update existing test so that it does not lowercase navigator.language
before checking it. This way, we can make sure it returns en-US and
not en-us.

  • js/dom/navigator-language-expected.txt:
  • js/dom/navigator-language.html:
8:20 PM Changeset in webkit [206948] by mark.lam@apple.com
  • 3 edits
    2 adds in trunk

Object.freeze() and seal() should throw if PreventExtensions() fails.
https://bugs.webkit.org/show_bug.cgi?id=163160

Reviewed by Saam Barati.

JSTests:

  • stress/object-freeze-with-proxy-preventExtensions.js: Added.
  • stress/object-seal-with-proxy-preventExtensions.js: Added.

Source/JavaScriptCore:

See https://tc39.github.io/ecma262/#sec-object.freeze,
https://tc39.github.io/ecma262/#sec-object.seal, and
https://tc39.github.io/ecma262/#sec-setintegritylevel. We need to call
preventExtensions first before proceeding to freeze / seal the object. If
preventExtensions fails, we should throw a TypeError.

  • runtime/ObjectConstructor.cpp:

(JSC::setIntegrityLevel):
(JSC::objectConstructorSeal):
(JSC::objectConstructorFreeze):

7:07 PM Changeset in webkit [206947] by Yusuke Suzuki
  • 2 edits in trunk/LayoutTests

REGRESSION (r206853?): LayoutTest js/regress-141098.html failing
https://bugs.webkit.org/show_bug.cgi?id=163046

Reviewed by Saam Barati.

This is attempt-to-fix patch since I cannot reproduce this flakiness.
We reduce the number of frames to back off from the stack overflow to
catch the closer frame limit to the actual stack limit.

  • js/script-tests/regress-141098.js:
5:23 PM Changeset in webkit [206946] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

Unreviewed, mark a test as failing on iOS simulator

This was intended to be a part of r206944.

  • platform/ios-simulator/TestExpectations:
5:20 PM Changeset in webkit [206945] by Simon Fraser
  • 4 edits in trunk/Source/WebKit/mac

[WK1 Mac] Fix repaints of fixed-background elements in layer-backed WebViews
https://bugs.webkit.org/show_bug.cgi?id=163154
rdar://problem/28674216

Reviewed by Tim Horton.

r55159 added code to counteract AppKit's adjustment of dirty regions during scrolling,
by offsetting the dirty rect in -setNeedsDisplayInRect: if the call happens during
the NSViewBoundsDidChangeNotification handling.

However, AppKit only does dirty region adjustment in the code path that blits ("copy
on scroll"), so r55159 produces incorrect behavior in, for example, layer-backed views.

Fix by overriding -[NSClipView _canCopyOnScrollForDeltaX:deltaY:] to know if a single
scroll is going to blit, and only do adjustments in -setNeedsDisplayInRect: if it is.

  • WebView/WebClipView.h:
  • WebView/WebClipView.mm:

(-[WebClipView _immediateScrollToPoint:]):
(-[WebClipView _canCopyOnScrollForDeltaX:deltaY:]):
(-[WebClipView currentScrollIsBlit]):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView setNeedsDisplayInRect:]):
(-[WebHTMLView drawRect:]):

4:47 PM Changeset in webkit [206944] by Wenson Hsieh
  • 18 edits
    6 adds in trunk

Support onbeforeinput event handling for the new InputEvent spec
https://bugs.webkit.org/show_bug.cgi?id=163021
<rdar://problem/28658073>

Reviewed by Darin Adler.

Source/WebCore:

Adds support for parsing the onbeforeinput attribute, and for sending default-preventable
beforeinput InputEvents to the page. To do this, we introduce two new virtual methods:
willApplyCommand and didApplyCommand on the CompositeEditCommand that are called before and
after CompositeEditCommand::doApply, respectively. willApplyCommand indicates whether or not
the composite editor command should proceed with applying the command.

Tweaks existing layout tests and adds new tests.

Tests: fast/events/before-input-events-different-start-end-elements.html

fast/events/before-input-events-prevent-default-in-textfield.html
fast/events/before-input-events-prevent-default.html

  • dom/Document.idl:
  • dom/Element.idl:
  • dom/EventNames.h:
  • dom/Node.cpp:

(WebCore::Node::dispatchInputEvent):
(WebCore::Node::defaultEventHandler):

Currently, we fire input events in Node in response to dispatching a webkitEditableContentChangedEvent. After
some discussion, Ryosuke and I believe that it will be ok to instead directly dispatch the input event where we
would normally dispatch a webkitEditableContentChangedEvent.

  • editing/CompositeEditCommand.cpp:

(WebCore::EditCommandComposition::unapply):
(WebCore::EditCommandComposition::reapply):

Added calls to Editor::willUnapplyEditing and Editor::willReapplyEditing.

(WebCore::CompositeEditCommand::willApplyCommand):
(WebCore::CompositeEditCommand::apply):
(WebCore::CompositeEditCommand::didApplyCommand):

Added new virtual functions, willApplyCommand and didApplyCommand, that surround a call to
CompositeEditCommand::doApply. By default, they call willApplyEditing and appliedEditing on the editor, but may
be overridden in special cases, such as in TypingCommand, where we invoke appliedEditing after adding a new
typing command to the last open command.

If willApplyCommand returns false, CompositeEditCommand::apply will bail and not proceed with the command.

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

(WebCore::dispatchBeforeInputEvent):
(WebCore::dispatchBeforeInputEvents):
(WebCore::dispatchInputEvents):
(WebCore::Editor::willApplyEditing):
(WebCore::Editor::appliedEditing):
(WebCore::Editor::willUnapplyEditing):
(WebCore::Editor::unappliedEditing):
(WebCore::Editor::willReapplyEditing):
(WebCore::Editor::reappliedEditing):
(WebCore::Editor::computeAndSetTypingStyle):
(WebCore::dispatchEditableContentChangedEvents): Deleted.

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

(WebCore::TypingCommand::willApplyCommand):
(WebCore::TypingCommand::didApplyCommand):
(WebCore::TypingCommand::willAddTypingToOpenCommand):
(WebCore::TypingCommand::insertTextRunWithoutNewlines):
(WebCore::TypingCommand::insertLineBreak):
(WebCore::TypingCommand::insertParagraphSeparator):
(WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
(WebCore::TypingCommand::deleteSelection):

These now invoke willAddTypingToOpenCommand before proceeding with creating the command and applying it. The
flow is now:

  • willAddTypingToOpenCommand
  • create and apply a new command
  • typingAddedToOpenCommand
  • editing/TypingCommand.h:

(WebCore::TypingCommand::preservesTypingStyle): Deleted.
(WebCore::TypingCommand::shouldRetainAutocorrectionIndicator): Deleted.
(WebCore::TypingCommand::setShouldRetainAutocorrectionIndicator): Deleted.
(WebCore::TypingCommand::shouldStopCaretBlinking): Deleted.

  • html/HTMLAttributeNames.in:
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::createEventHandlerNameMap):

LayoutTests:

Tweak an existing test to hook into the 'input' event instead of 'webkitEditableContentChanged', as well as
tests added in r206843 to verify that onbeforeinput handlers are invoked with InputEvents. Also introduces
new unit tests verifying that calling preventDefault on InputEvents fired by onbeforeinput correctly prevent
text from being inserted or deleted.

  • editing/undo/undo-after-event-edited.html:
  • fast/events/before-input-events-different-start-end-elements-expected.txt: Added.
  • fast/events/before-input-events-different-start-end-elements.html: Added.
  • fast/events/before-input-events-prevent-default-expected.txt: Added.
  • fast/events/before-input-events-prevent-default-in-textfield-expected.txt: Added.
  • fast/events/before-input-events-prevent-default-in-textfield.html: Added.
  • fast/events/before-input-events-prevent-default.html: Added.
  • fast/events/input-events-fired-when-typing-expected.txt:
  • fast/events/input-events-fired-when-typing.html:
  • platform/ios-simulator/TestExpectations:
4:30 PM Changeset in webkit [206943] by n_wang@apple.com
  • 13 edits
    2 adds in trunk

AX: <figcaption> should be AXTitleUIElement for other content inside the <figure>
https://bugs.webkit.org/show_bug.cgi?id=108996

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed the figcaption element to be the AXTitleUIElement for the figure element. And used
the figcaption's content as the accessible name of the figure. Also, updated the figure element's
role description on Mac.
Accessible name and description calculation for figure elements:
https://w3c.github.io/html-aam/#figure-and-figcaption-elements

Test: accessibility/mac/figure-element.html

  • English.lproj/Localizable.strings:
  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::captionForFigure):
(WebCore::AccessibilityNodeObject::alternativeText):

  • accessibility/AccessibilityNodeObject.h:
  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isFigure):
(WebCore::AccessibilityObject::isSuperscriptStyleGroup): Deleted.

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::exposesTitleUIElement):
(WebCore::AccessibilityRenderObject::titleUIElement):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper roleDescription]):

  • platform/LocalizedStrings.cpp:

(WebCore::AXFigureText):

  • platform/LocalizedStrings.h:
  • platform/efl/LocalizedStringsEfl.cpp:

(WebCore::AXFigureText):

  • platform/gtk/LocalizedStringsGtk.cpp:

(WebCore::AXFigureText):

LayoutTests:

  • accessibility/mac/figure-element-expected.txt: Added.
  • accessibility/mac/figure-element.html: Added.
4:06 PM Changeset in webkit [206942] by achristensen@apple.com
  • 4 edits in trunk

Non-special URL fragments should percent-encode non-ASCII characters
https://bugs.webkit.org/show_bug.cgi?id=163153

Reviewed by Tim Horton.

Source/WebCore:

This is needed to keep compatibility with data URLs with non-ASCII characters after a '#'
which works in Chrome, Firefox, and Safari, while maintaining compatibility with Chrome, IE, and Edge
which keep non-ASCII characters in the fragments of special URLs.
This was proposed to the spec in https://github.com/whatwg/url/issues/150

Covered by new API tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::syntaxViolation):
Removed assertion because we now have fragments that need percent encoding but are all ASCII.
(WebCore::URLParser::fragmentSyntaxViolation):
(WebCore::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

3:59 PM Changeset in webkit [206941] by Brent Fulgham
  • 4 edits in trunk/Source/WebCore

EventHandler functions that need to guarantee event handler lifetime need to use Ref<Frame>
https://bugs.webkit.org/show_bug.cgi?id=98617
<rdar://problem/12778649>

Reviewed by Daniel Bates.

Improve stability by ensuring that the Frame holding an active EventHandler is kept
alive while in the process of handling events and executing JavaScript.

No new tests since there is no change in behavior.

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMousePressEventSingleClick): Protect the Frame with a Ref<>.
(WebCore::EventHandler::handleMousePressEvent): Ditto.
(WebCore::EventHandler::handleMouseDraggedEvent): Ditto.
(WebCore::EventHandler::eventMayStartDrag): Ditto.
(WebCore::EventHandler::handleMouseReleaseEvent): Ditto.
(WebCore::EventHandler::hitTestResultAtPoint): Ditto.
(WebCore::EventHandler::scrollRecursively): Ditto.
(WebCore::EventHandler::logicalScrollRecursively): Ditto.
(WebCore::EventHandler::selectCursor): Ditto.
(WebCore::EventHandler::handleMouseDoubleClickEvent): Ditto.
(WebCore::EventHandler::mouseMoved): Ditto.
(WebCore::EventHandler::handleMouseMoveEvent): Ditto.
(WebCore::EventHandler::handleMouseForceEvent): Ditto.
(WebCore::EventHandler::dispatchDragEvent): Ditto.
(WebCore::EventHandler::updateDragAndDrop): Ditto.
(WebCore::EventHandler::cancelDragAndDrop): Ditto.
(WebCore::EventHandler::performDragAndDrop): Ditto.
(WebCore::EventHandler::prepareMouseEvent): Ditto.
(WebCore::EventHandler::updateMouseEventTargetNode): Ditto.
(WebCore::EventHandler::dispatchMouseEvent): Ditto.
(WebCore::EventHandler::platformCompleteWheelEvent): Ditto.
(WebCore::EventHandler::handleWheelEvent): Ditto.
(WebCore::EventHandler::defaultWheelEventHandler): Ditto.
(WebCore::EventHandler::sendContextMenuEvent): Ditto.
(WebCore::EventHandler::sendContextMenuEventForKey): Ditto.
(WebCore::EventHandler::hoverTimerFired): Ditto.
(WebCore::EventHandler::keyEvent): Ditto.
(WebCore::EventHandler::defaultKeyboardEventHandler): Ditto.
(WebCore::EventHandler::handleDrag): Ditto.
(WebCore::EventHandler::handleTextInputEvent): Ditto.
(WebCore::EventHandler::defaultSpaceEventHandler): Ditto.
(WebCore::EventHandler::defaultTabEventHandler): Ditto.
(WebCore::EventHandler::sendScrollEvent): Ditto.
(WebCore::EventHandler::handleTouchEvent): Ditto.

  • page/ios/EventHandlerIOS.mm:

(WebCore::EventHandler::focusDocumentView): Ditto.

  • page/mac/EventHandlerMac.mm:

(WebCore::EventHandler::platformCompleteWheelEvent): Ditto.

3:17 PM Changeset in webkit [206940] by Jonathan Bedard
  • 3 edits in trunk/Tools

Build fix for “Move functionality common to Darwin ports into a base class”
https://bugs.webkit.org/show_bug.cgi?id=160709

Unreviewed build fix.

  • Scripts/webkitpy/port/ios.py:

(IOSSimulatorPort._get_crash_log): Added iOS implementation.

  • Scripts/webkitpy/port/mac.py:

(MacPort._get_crash_log): Added Mac implementation.

3:14 PM Changeset in webkit [206939] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/debugger/stepping tests as flaky.
https://bugs.webkit.org/show_bug.cgi?id=161951

Unreviewed test gardening.

2:25 PM Changeset in webkit [206938] by cpugh@apple.com
  • 2 edits in trunk/Tools

Unreviewed. Added myself to the list of committers.

  • Scripts/webkitpy/common/config/contributors.json:
2:20 PM Changeset in webkit [206937] by andersca@apple.com
  • 8 edits
    4 deletes in trunk/Source/WebKit2

Get rid of API::Session and WKSessionRef
https://bugs.webkit.org/show_bug.cgi?id=163140

Reviewed by Tim Horton.

This API is no longer used.

  • CMakeLists.txt:
  • Shared/API/APIObject.h:
  • Shared/API/c/WKSharedAPICast.h:
  • UIProcess/API/APISession.cpp: Removed.

(API::generateID): Deleted.
(API::Session::defaultSession): Deleted.
(API::Session::Session): Deleted.
(API::Session::createEphemeral): Deleted.
(API::Session::isEphemeral): Deleted.
(API::Session::getID): Deleted.
(API::Session::~Session): Deleted.

  • UIProcess/API/APISession.h: Removed.
  • UIProcess/API/C/WKPage.h:
  • UIProcess/API/C/WKSessionRef.cpp: Removed.

(WKSessionCreate): Deleted.
(WKSessionGetTypeID): Deleted.
(WKSessionIsEphemeral): Deleted.

  • UIProcess/API/C/WKSessionRef.h: Removed.
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessProxy.h:
  • WebKit2.xcodeproj/project.pbxproj:
2:11 PM Changeset in webkit [206936] by timothy_horton@apple.com
  • 3 edits
    3 moves in trunk/Source/WebKit2

Move ViewGestureController files to more accurate locations
https://bugs.webkit.org/show_bug.cgi?id=163141

Reviewed by Anders Carlsson.

  • PlatformMac.cmake:
  • UIProcess/Cocoa/ViewGestureController.cpp: Renamed from UIProcess/ViewGestureController.cpp.
  • UIProcess/Cocoa/ViewGestureController.h: Renamed from UIProcess/mac/ViewGestureController.h.
  • UIProcess/Cocoa/ViewGestureController.messages.in: Renamed from UIProcess/mac/ViewGestureController.messages.in.
  • WebKit2.xcodeproj/project.pbxproj:
2:06 PM Changeset in webkit [206935] by Jonathan Bedard
  • 2 edits in trunk/LayoutTests

js/function-apply-aliased.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=127860

Reviewed by Darin Adler.

This test no longer times out. Reintegrating into test suites.

2:06 PM Changeset in webkit [206934] by Jonathan Bedard
  • 10 edits
    1 copy
    2 adds in trunk/Tools

Move functionality common to Darwin ports into a base class
https://bugs.webkit.org/show_bug.cgi?id=160709

Reviewed by Darin Adler.

  • Scripts/webkitpy/port/apple.py:

(ApplePort.determine_full_port_name): Specific iOS port check.
(ApplePort.init): Move leak detector to DarwinPort.
(ApplePort._make_leak_detector): Moved to DarwinPort.
(ApplePort.supports_per_test_timeout): Moved to Port.
(ApplePort.check_for_leaks): Moved to DarwinPort.
(ApplePort.print_leaks_summary): Moved to DarwinPort.
(ApplePort._path_to_webcore_library): Moved to DarwinPort.
(ApplePort.show_results_html_file): Moved to DarwinPort.
(ApplePort._merge_crash_logs): Moved to DarwinPort.
(ApplePort._look_for_all_crash_logs_in_log_dir): Moved to DarwinPort.
(ApplePort._get_crash_log): Moved to DarwinPort.
(ApplePort.look_for_new_crash_logs): Moved to DarwinPort.
(ApplePort.sample_process): Moved to DarwinPort.
(ApplePort.sample_file_path): Moved to DarwinPort.
(ApplePort.look_for_new_samples): Moved to DarwinPort.

  • Scripts/webkitpy/port/base.py:

(Port.supports_per_test_timeout): Return true for all ports.

  • Scripts/webkitpy/port/darwin.py: Added.

(DarwinPort): Shared iOS and Mac functions.

  • Scripts/webkitpy/port/darwin_testcase.py: Added.

(DarwinTest): Shared iOS and Mac testing.

  • Scripts/webkitpy/port/efl.py:

(EflPort):
(EflPort.supports_per_test_timeout): Moved to Port.

  • Scripts/webkitpy/port/gtk.py:

(GtkPort._driver_class):
(GtkPort):
(GtkPort.supports_per_test_timeout): Moved to Port.

  • Scripts/webkitpy/port/ios.py:

(IOSPort):
(IOSPort.operating_system):
(IOSSimulatorPort):
(IOSSimulatorPort.init): Inherits from DarwinPort.
(IOSSimulatorPort._port_specific_expectations_files): Moved to DarwinPort.
(IOSSimulatorPort._get_crash_log): Deleted.
(IOSSimulatorPort.xcrun_find): Deleted.

  • Scripts/webkitpy/port/ios_unittest.py: Added.

(iosTest): Unit tests for the iOS port.

  • Scripts/webkitpy/port/mac.py:

(MacPort):
(MacPort.init): Inherits from DarwinPort.
(MacPort._port_specific_expectations_files): Moved to DarwinPort.
(MacPort.make_command): Moved to DarwinPort.
(MacPort._get_crash_log): Moved to DarwinPort.
(MacPort.nm_command): Moved to DarwinPort.

  • Scripts/webkitpy/port/mac_unittest.py:

(MacTest):
(MacTest.test_sdk_name): Added test.
(MacTest.test_xcrun): Added test.
(MacTest.assert_skipped_file_search_paths): Moved to DarwinTest.
(MacTest.test_default_timeout_ms): Moved to DarwinTest.
(MacTest.assert_name): Moved to DarwinTest.
(MacTest.test_helper_starts): Moved to DarwinTest.
(MacTest.test_helper_fails_to_start): Moved to DarwinTest.
(MacTest.test_helper_fails_to_stop): Moved to DarwinTest.
(MacTest.test_spindump): Moved to DarwinTest.
(MacTest.test_sample_process): Moved to DarwinTest.
(MacTest.test_sample_process_exception): Moved to DarwinTest.

  • Scripts/webkitpy/port/port_testcase.py:

(PortTestCase):
(PortTestCase.test_diff_image): Added is_simulator flag.
(PortTestCase.test_diff_image): Skip test if on a simulator.
(PortTestCase.test_diff_image_crashed): Skip test if on a simulator.

  • Scripts/webkitpy/port/win.py:

(WinPort):
(WinPort.look_for_new_samples): Used default, ApplePort no longer implements.
(WinPort.sample_process): Ditto.
(WinPort._make_leak_detector): Ditto.
(WinPort.check_for_leaks): Ditto.
(WinPort.print_leaks_summary): Ditto.
(WinPort._path_to_webcore_library): Ditto.

1:56 PM Changeset in webkit [206933] by matthew_hanson@apple.com
  • 1 delete in tags/Safari-603.1.8.1

Remove tag.

1:51 PM Changeset in webkit [206932] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Marking inspector/console/addInspectedNode.html as flaky on mac-debug.
https://bugs.webkit.org/show_bug.cgi?id=155138

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
1:46 PM Changeset in webkit [206931] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/cache/disk-cache/memory-cache-revalidation-updates-disk-cache.html as flaky on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=162975

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:25 PM Changeset in webkit [206930] by timothy_horton@apple.com
  • 6 edits in trunk/Source/WebKit2

Adopt BlockPtr in ViewGestureController
https://bugs.webkit.org/show_bug.cgi?id=163132

Reviewed by Anders Carlsson.

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

(WebKit::WebViewImpl::setDidMoveSwipeSnapshotCallback):

  • UIProcess/ViewGestureController.cpp:

(WebKit::ViewGestureController::SnapshotRemovalTracker::stopWaitingForEvent):

  • UIProcess/mac/ViewGestureController.h:

(WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
(WebKit::ViewGestureController::m_didMoveSwipeSnapshotCallback): Deleted.

  • UIProcess/mac/ViewGestureControllerMac.mm:

(WebKit::ViewGestureController::platformTeardown):
(WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback): Deleted.

1:04 PM Changeset in webkit [206929] by andersca@apple.com
  • 8 edits in trunk

Get rid of WKPageSetSession
https://bugs.webkit.org/show_bug.cgi?id=163129

Reviewed by Tim Horton.

Source/WebKit2:

This function is no longer used.

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetSession): Deleted.

  • UIProcess/API/C/WKPage.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setSessionID): Deleted.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::sessionID):

  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Rewrite this test to use WKPageConfigurationRef and WKWebsiteDataStoreRef.

  • TestWebKitAPI/Tests/WebKit2/EphemeralSessionPushStateNoHistoryCallback.cpp:

(TestWebKitAPI::TEST):

12:56 PM Changeset in webkit [206928] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.8.1

New tag.

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

Marking http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html as flaky on mac-wk2
https://bugs.webkit.org/show_bug.cgi?id=163139

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
12:37 PM Changeset in webkit [206926] by Chris Dumez
  • 6 edits in trunk

Regression(r201970): productSub / vendor / vendorSub should not be exposed on WorkerNavigator
https://bugs.webkit.org/show_bug.cgi?id=163124

Reviewed by Ryosuke Niwa.

Source/WebCore:

productSub / vendor / vendorSub should not be exposed on WorkerNavigator:

Test case:

Note that the specification also restricts NavigatorID's appCodeName and
product attributes to Window. However, it seems the HTML specification is
about to get updated so that these get exposed to workers:

No new tests, updated existing test.

  • bindings/scripts/generate-bindings.pl:

(shouldPropertyBeExposed):

  • page/NavigatorID.idl:

LayoutTests:

Update existing test to reflect behavior change.

  • fast/workers/resources/worker-navigator.js:
  • fast/workers/worker-navigator-expected.txt:
12:03 PM Changeset in webkit [206925] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/xmlhttprequest/auth-reject-protection-space.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=163136

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
12:03 PM Changeset in webkit [206924] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Disable URLParser logs by default in all builds
https://bugs.webkit.org/show_bug.cgi?id=163135

Reviewed by Brady Eidson.

In debug builds with the URLParser enabled, some tests time out because
parameters to generate log strings are being evaluated for each character of each URL
and then not being used if URLParser logs are disabled. Generating these unused parameters
is too slow even for debug builds. Let's only generate them if they are to be used.

No change in behaviour.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):
(WebCore::URLParser::allValuesEqual):

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

Marking storage/indexeddb/key-type-array.html as flaky on mac-debug.
https://bugs.webkit.org/show_bug.cgi?id=161720

Unreviewed test gardening.

  • platform/mac/TestExpectations:
11:55 AM Changeset in webkit [206922] by akling@apple.com
  • 4 edits
    3 adds in trunk

[WK2] didRemoveFrameFromHierarchy callback doesn't fire for subframes when evicting from PageCache.
<https://webkit.org/b/163098>
<rdar://problem/28663488>

Reviewed by Antti Koivisto.

Source/WebCore:

Fix a bug where WK2 didRemoveFrameFromHierarchy callbacks wouldn't fire for subframes that were getting
kicked out of PageCache. The problem was happening because CachedFrame would disconnect the Frame from
its Page just before calling FrameLoader::detachViewsAndDocumentLoader() where the callbacks are fired.
Without a Page, the WebFrame on WK2 side can't find its WebPage, and so it can't fire its callbacks.

The fix is just to switch the order of those two lines.

This bug was causing frequent DOM and window object leaks in some clients *cough* Safari *cough* that
were relying on didRemoveFrameFromHierarchy to release their isolated worlds.

Test: WebKit2.DidRemoveFrameFromHiearchyInPageCache

  • history/CachedFrame.cpp:

(WebCore::CachedFrame::destroy):

Tools:

Add an API test that puts a 10-subframe page into the page cache, then loads other pages
until the first page gets kicked out. The test succeeds if we receive didRemoveFrameFromHierarchy
callbacks for all the subframes.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/DidRemoveFrameFromHiearchyInPageCache.cpp: Added.

(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didReceivePageMessageFromInjectedBundle):
(TestWebKitAPI::setInjectedBundleClient):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2/DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp: Added.

(TestWebKitAPI::didRemoveFrameFromHierarchyCallback):
(TestWebKitAPI::DidRemoveFrameFromHiearchyInPageCacheTest::DidRemoveFrameFromHiearchyInPageCacheTest):
(TestWebKitAPI::DidRemoveFrameFromHiearchyInPageCacheTest::didCreatePage):

  • TestWebKitAPI/Tests/WebKit2/many-iframes.html: Added.
10:44 AM Changeset in webkit [206921] by n_wang@apple.com
  • 8 edits
    2 adds in trunk

AX: AXRoleDescription for details and summary elements
https://bugs.webkit.org/show_bug.cgi?id=163094

Reviewed by Chris Fleizach.

Source/WebCore:

details and summary elements should have AXRoleDescription that is consistent with other
elements that have custom AXSubRole.

Test: accessibility/mac/details-summary-role-description.html

  • English.lproj/Localizable.strings:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper roleDescription]):

  • platform/LocalizedStrings.cpp:

(WebCore::AXDetailsText):
(WebCore::AXSummaryText):

  • platform/LocalizedStrings.h:
  • platform/efl/LocalizedStringsEfl.cpp:

(WebCore::AXDetailsText):
(WebCore::AXSummaryText):

  • platform/gtk/LocalizedStringsGtk.cpp:

(WebCore::AXDetailsText):
(WebCore::AXSummaryText):

LayoutTests:

  • accessibility/mac/details-summary-role-description-expected.txt: Added.
  • accessibility/mac/details-summary-role-description.html: Added.
10:26 AM Changeset in webkit [206920] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Fix the Windows build after r206917.

Unreviewed build fix.

  • dom/DOMAllInOne.cpp:
10:15 AM Changeset in webkit [206919] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking imported/blink/storage/indexeddb/blob-valid-after-deletion.html as flaky on mac.
https://bugs.webkit.org/show_bug.cgi?id=163122

Unreviewed test gardening.

  • platform/mac/TestExpectations:
10:04 AM Changeset in webkit [206918] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

Replace bug URL placeholders independently of the short desc one
https://bugs.webkit.org/show_bug.cgi?id=161684

Patch by Emanuele Aina <Emanuele Aina> on 2016-10-07
Reviewed by Darin Adler.

Instead of adding the bug URL when replacing the short description
placeholder and then ignoring the bug URL placeholder, use the former
to set the short description and the latter for the bug URL.
This means that developers can fully prepare the changelog with short
and long description before submission leaving the bug placeholder in
place, and the changelog machinery will make sure to replace the
latter with the URL of the newly created bug while submitting.

Note that this also means that the short description placeholder alone
no longer causes the bug URL to be added.

  • Scripts/webkitpy/common/checkout/changelog.py:

(ChangeLog.set_short_description_and_bug_url):

  • Scripts/webkitpy/common/checkout/changelog_unittest.py:

(test_set_short_description_and_bug_url):

9:55 AM Changeset in webkit [206917] by Antti Koivisto
  • 30 edits
    2 moves in trunk/Source

Rename AuthorStyleSheets to Style::Scope
https://bugs.webkit.org/show_bug.cgi?id=163108

Reviewed by Andreas Kling.

It represents the style scope in DOM.
Also move the file under style/.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSStyleSheet.cpp:

(WebCore::CSSStyleSheet::styleSheetScope):

  • css/CSSStyleSheet.h:
  • css/InspectorCSSOMWrappers.cpp:

(WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):

  • css/InspectorCSSOMWrappers.h:
  • css/StyleSheetList.cpp:

(WebCore::StyleSheetList::styleSheets):
(WebCore::StyleSheetList::detachFromDocument):

  • dom/AuthorStyleSheets.cpp: Removed.
  • dom/AuthorStyleSheets.h: Removed.
  • dom/Document.cpp:

(WebCore::Document::Document):
(WebCore::Document::setContentLanguage):
(WebCore::Document::recalcStyle):
(WebCore::Document::needsStyleRecalc):
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::createStyleResolver):
(WebCore::Document::didRemoveAllPendingStylesheet):
(WebCore::Document::usesStyleBasedEditability):
(WebCore::Document::processHttpEquiv):
(WebCore::Document::preferredStylesheetSet):
(WebCore::Document::selectedStylesheetSet):
(WebCore::Document::setSelectedStylesheetSet):
(WebCore::Document::haveStylesheetsLoaded):

  • dom/Document.h:

(WebCore::Document::styleScope):
(WebCore::Document::authorStyleSheets): Deleted.

  • dom/ExtensionStyleSheets.cpp:

(WebCore::ExtensionStyleSheets::clearPageUserSheet):
(WebCore::ExtensionStyleSheets::updatePageUserSheet):
(WebCore::ExtensionStyleSheets::invalidateInjectedStyleSheetCache):
(WebCore::ExtensionStyleSheets::addUserStyleSheet):
(WebCore::ExtensionStyleSheets::addAuthorStyleSheetForTesting):
(WebCore::ExtensionStyleSheets::styleResolverChangedTimerFired):

  • dom/InlineStyleSheetOwner.cpp:

(WebCore::InlineStyleSheetOwner::insertedIntoDocument):
(WebCore::InlineStyleSheetOwner::removedFromDocument):
(WebCore::InlineStyleSheetOwner::clearDocumentData):
(WebCore::InlineStyleSheetOwner::createSheet):
(WebCore::InlineStyleSheetOwner::sheetLoaded):
(WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):

  • dom/InlineStyleSheetOwner.h:

(WebCore::InlineStyleSheetOwner::styleScope):
(WebCore::InlineStyleSheetOwner::styleSheetScope): Deleted.

  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::~ProcessingInstruction):
(WebCore::ProcessingInstruction::checkStyleSheet):
(WebCore::ProcessingInstruction::sheetLoaded):
(WebCore::ProcessingInstruction::insertedInto):
(WebCore::ProcessingInstruction::removedFrom):

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::styleResolver):
(WebCore::ShadowRoot::styleScope):
(WebCore::ShadowRoot::updateStyle):
(WebCore::ShadowRoot::authorStyleSheets): Deleted.

  • dom/ShadowRoot.h:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::~HTMLLinkElement):
(WebCore::HTMLLinkElement::setDisabledState):
(WebCore::HTMLLinkElement::parseAttribute):
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::insertedInto):
(WebCore::HTMLLinkElement::removedFrom):
(WebCore::HTMLLinkElement::addPendingSheet):
(WebCore::HTMLLinkElement::removePendingSheet):

  • html/HTMLStyleElement.cpp:
  • inspector/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::collectAllDocumentStyleSheets):
(WebCore::InspectorCSSAgent::forcePseudoState):
(WebCore::InspectorCSSAgent::buildObjectForRule):
(WebCore::InspectorCSSAgent::resetPseudoStates):

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::setEmulatedMedia):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::getMatchedCSSRules):

  • page/Frame.cpp:

(WebCore::Frame::setPrinting):

  • page/FrameView.cpp:

(WebCore::FrameView::layout):
(WebCore::FrameView::setPagination):
(WebCore::FrameView::setViewportSizeForCSSViewportUnits):

  • page/Page.cpp:

(WebCore::Page::setViewMode):
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
(WebCore::Page::invalidateInjectedStyleSheetCacheInAllFrames):

  • style/StyleScope.cpp: Copied from dom/AuthorStyleSheets.cpp.

(WebCore::Style::Scope::Scope):
(WebCore::Style::Scope::styleResolver):
(WebCore::Style::Scope::styleResolverIfExists):
(WebCore::Style::Scope::forNode):
(WebCore::Style::Scope::removePendingSheet):
(WebCore::Style::Scope::addStyleSheetCandidateNode):
(WebCore::Style::Scope::removeStyleSheetCandidateNode):
(WebCore::Style::Scope::collectActiveStyleSheets):
(WebCore::Style::Scope::analyzeStyleSheetChange):
(WebCore::Style::Scope::updateActiveStyleSheets):
(WebCore::Style::Scope::updateStyleResolver):
(WebCore::Style::Scope::activeStyleSheetsForInspector):
(WebCore::Style::Scope::activeStyleSheetsContains):
(WebCore::Style::Scope::flushPendingUpdate):
(WebCore::Style::Scope::clearPendingUpdate):
(WebCore::Style::Scope::scheduleActiveSetUpdate):
(WebCore::Style::Scope::didChangeCandidatesForActiveSet):
(WebCore::Style::Scope::didChangeContentsOrInterpretation):
(WebCore::Style::Scope::pendingUpdateTimerFired):
(WebCore::AuthorStyleSheets::AuthorStyleSheets): Deleted.
(WebCore::AuthorStyleSheets::styleResolver): Deleted.
(WebCore::AuthorStyleSheets::styleResolverIfExists): Deleted.
(WebCore::AuthorStyleSheets::forNode): Deleted.
(WebCore::AuthorStyleSheets::removePendingSheet): Deleted.
(WebCore::AuthorStyleSheets::addStyleSheetCandidateNode): Deleted.
(WebCore::AuthorStyleSheets::removeStyleSheetCandidateNode): Deleted.
(WebCore::AuthorStyleSheets::collectActiveStyleSheets): Deleted.
(WebCore::AuthorStyleSheets::analyzeStyleSheetChange): Deleted.
(WebCore::AuthorStyleSheets::updateActiveStyleSheets): Deleted.
(WebCore::AuthorStyleSheets::updateStyleResolver): Deleted.
(WebCore::AuthorStyleSheets::activeStyleSheetsForInspector): Deleted.
(WebCore::AuthorStyleSheets::activeStyleSheetsContains): Deleted.
(WebCore::AuthorStyleSheets::flushPendingUpdate): Deleted.
(WebCore::AuthorStyleSheets::clearPendingUpdate): Deleted.
(WebCore::AuthorStyleSheets::scheduleActiveSetUpdate): Deleted.
(WebCore::AuthorStyleSheets::didChangeCandidatesForActiveSet): Deleted.
(WebCore::AuthorStyleSheets::didChangeContentsOrInterpretation): Deleted.
(WebCore::AuthorStyleSheets::pendingUpdateTimerFired): Deleted.

  • style/StyleScope.h: Copied from dom/AuthorStyleSheets.h.
  • style/StyleTreeResolver.cpp:
  • svg/SVGFontFaceElement.cpp:

(WebCore::SVGFontFaceElement::rebuildFontFace):
(WebCore::SVGFontFaceElement::removedFrom):

  • xml/XMLTreeViewer.cpp:

(WebCore::XMLTreeViewer::transformDocumentToTreeView):

  • xml/parser/XMLDocumentParser.cpp:

(WebCore::XMLDocumentParser::end):

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLDocumentParser::doEnd):

9:41 AM Changeset in webkit [206916] by Alan Bujtas
  • 4 edits
    2 adds in trunk

https://vuldb.com/?cvssv3.2012 takes long time to load.
https://bugs.webkit.org/show_bug.cgi?id=162994
<rdar://problem/28593746>

Reviewed by Darin Adler.

Source/WebCore:

Stop visiting cousins when we hit the style sharing search threshold.

In addition to mistakenly ignoring the threshold at SharingResolver::findSibling(), we
continued on searching for cousin elements.

Test: fast/selectors/slow-style-sharing-with-long-cousin-list.html

  • style/StyleSharingResolver.cpp:

(WebCore::Style::SharingResolver::resolve):
(WebCore::Style::SharingResolver::findSibling):
(WebCore::Style::SharingResolver::locateCousinList):

LayoutTests:

It takes ~100 seconds to run this test case without the fix (300ms with the fix).
Surely it will timeout if it gets regressed.

  • fast/selectors/slow-style-sharing-with-long-cousin-list-expected.txt: Added.
  • fast/selectors/slow-style-sharing-with-long-cousin-list.html: Added.
  • platform/mac/TestExpectations: Skip perf test in debug.
9:39 AM Changeset in webkit [206915] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit2

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

Caused most of GTK layout tests to crash (Requested by KaL on
#webkit).

Reverted changeset:

"[GTK] UIProcess crashes when using Japanese IM"
https://bugs.webkit.org/show_bug.cgi?id=163011
http://trac.webkit.org/changeset/206909

9:35 AM Changeset in webkit [206914] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking contentextensions tests as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=162942

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
9:32 AM Changeset in webkit [206913] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebKit2

Network Session: Allow NetworkDataTask decide what to do when override is allowed for a download
https://bugs.webkit.org/show_bug.cgi?id=163010

Reviewed by Alex Christensen.

Current code always deletes the file before starting a download when allow override is True. In soup backend we
use glib API that takes care of it and tries to ensure that the original file is not deleted if the new file
creation fails for whatever reason.

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::continueDecidePendingDownloadDestination): Pass allowOverride to setPendingDownloadLocation().

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTask::setPendingDownloadLocation): Delete the destination file if exists and allowOverride
is True.

8:10 AM Changeset in webkit [206912] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[Readable Streams API] Implement generic reader functions
https://bugs.webkit.org/show_bug.cgi?id=163003

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-10-07
Reviewed by Darin Adler.

Implements reader generic functions defined by spec in order to prepare BYOBReader integration.
Generic functions factorize some code that is used by both DefaultReader and BYOBReader.

No change in behaviour.

  • Modules/streams/ReadableStreamDefaultReader.js:

(cancel): Rely on readableStreamReaderGenericCancel.
(releaseLock): Rely on readableStreamReaderGenericRelease.

  • Modules/streams/ReadableStreamInternals.js:

(privateInitializeReadableStreamDefaultReader): Rely on readableStreamReaderGenericInitialize.
(readableStreamReaderGenericInitialize): Added.
(readableStreamReaderGenericCancel): Added.
(readableStreamReaderGenericRelease): Added.

8:00 AM Changeset in webkit [206911] by Jonathan Bedard
  • 3 edits in trunk/Tools

Style Checking Error when Objective C Blocks passed as Argument
https://bugs.webkit.org/show_bug.cgi?id=162463

Reviewed by Darin Adler.

  • Scripts/webkitpy/style/checkers/cpp.py:

(regex_for_lambdas_and_blocks): Consider case where block is passed as a function argument.

  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTest.test_objective_c_block_as_argument): Test case where block is passed as a function argument.

5:50 AM Changeset in webkit [206910] by adam.bergkvist@ericsson.com
  • 3 edits in trunk/LayoutTests

WebRTC: Test gardening
https://bugs.webkit.org/show_bug.cgi?id=163106

Reviewed by Philippe Normand.

  • fast/mediastream/RTCPeerConnection-add-removeTrack-expected.txt:

Update expected results to include webkit prefix on RTCPeerConnection name. (Not GTK+
specific.)

  • platform/gtk/TestExpectations:

Skip some tests since the GTK+ MediaPlayer, used with MediaStreams, isn't capable enough.

5:04 AM Changeset in webkit [206909] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit2

[GTK] UIProcess crashes when using Japanese IM
https://bugs.webkit.org/show_bug.cgi?id=163011

We have to reference the current GdkEventKey before we try process it
as later when the lambda body is reached the event could be already
freed.

Patch by Tomas Popela <tpopela@redhat.com> on 2016-10-07
Reviewed by Carlos Garcia Campos.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseKeyPressEvent):
(webkitWebViewBaseKeyReleaseEvent):

  • UIProcess/gtk/InputMethodFilter.h:

Use non-copyable Function so we can use WTFMove to pass the event to
lambda.

4:57 AM Changeset in webkit [206908] by adam.bergkvist@ericsson.com
  • 7 edits in trunk/Source/WebCore

WebRTC: Misc gardening: Use typedefs consistently and remove unused code
https://bugs.webkit.org/show_bug.cgi?id=163104

Reviewed by Philippe Normand.

Miscellaneous WebRTC gardening. See file list below for details.

Testing: No change in behavior.

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

Move NotImplemented include to cpp-file.

  • platform/mediastream/MediaEndpoint.h:

Use MediaPayloadVector typedef (instead of Vector<RefPtr<MediaPayload>>).

  • platform/mediastream/PeerMediaDescription.h:

(WebCore::PeerMediaDescription::source): Deleted.
(WebCore::PeerMediaDescription::setSource): Deleted.
Sources are passed to updateSendConfiguration() via a source map and not added to each
PeerMediaDescription anymore. Remove unused code.

  • platform/mock/MockMediaEndpoint.cpp:

(WebCore::MockMediaEndpoint::getDefaultAudioPayloads):
(WebCore::MockMediaEndpoint::getDefaultVideoPayloads):
Use MediaPayloadVector typedef.

  • platform/mock/MockMediaEndpoint.h:

Use MediaPayloadVector typedef.

4:45 AM Changeset in webkit [206907] by yoon@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] Remove unneeded creation of TextureMapperPlatformLayerProxy
https://bugs.webkit.org/show_bug.cgi?id=163101

Reviewed by Žan Doberšek.

Covered by existing tests.

  • platform/graphics/cairo/ImageBufferCairo.cpp:

(WebCore::ImageBufferData::ImageBufferData): Modified not to create
TextureMapperPlatformLayerProxy if it is not created for the
accelerated 2d canvas.

2:28 AM Changeset in webkit [206906] by Michael Catanzaro
  • 4 edits in trunk/Source/WebKit2

[GTK] Expose WebKitDOMHTMLInputElement APIs for form autofill
https://bugs.webkit.org/show_bug.cgi?id=163082

Reviewed by Darin Adler.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:

(webkit_dom_html_input_element_get_auto_filled): Added.
(webkit_dom_html_input_element_set_auto_filled): Added.
(webkit_dom_html_input_element_set_editing_value): Added.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.h:
  • WebProcess/InjectedBundle/API/gtk/DOM/docs/webkitdomgtk-4.0-sections.txt:
1:20 AM Changeset in webkit [206905] by Philippe Normand
  • 2 edits in trunk/Tools

[GTK] Docs build failure
https://bugs.webkit.org/show_bug.cgi?id=163102

Reviewed by Carlos Garcia Campos.

  • gtk/jhbuild.modules: Bump to gtk-doc 1.25 to fix build errors on Debian Testing.
12:56 AM Changeset in webkit [206904] by commit-queue@webkit.org
  • 15 edits in trunk

Use 'use lib $FindBin::Bin' to append Perl module include path
https://bugs.webkit.org/show_bug.cgi?id=162256

Patch by Fujii Hironori <Fujii Hironori> on 2016-10-07
Reviewed by Carlos Garcia Campos.

.:

  • Source/cmake/WebKitMacros.cmake: Removed '-I' options from

invocation of Perl.

Source/WebCore:

Some Perl scripts are needed to be executed with '-I' switch to
explicitly append Perl module include path. Use 'use lib' as well
as other Perl scripts do.

  • CMakeLists.txt: Removed '-I' options from invocation of Perl.
  • DerivedSources.make: Ditto.
  • bindings/scripts/generate-bindings.pl: Use 'use lib'.
  • bindings/scripts/preprocess-idls.pl: Ditto.
  • css/make-css-file-arrays.pl: Ditto.
  • css/makegrammar.pl: Ditto.
  • css/makeprop.pl: Ditto.
  • css/makevalues.pl: Ditto.
  • dom/make_dom_exceptions.pl: Ditto.
  • dom/make_event_factory.pl: Ditto.
  • dom/make_names.pl: Ditto.
  • page/make_settings.pl: Ditto.
12:02 AM Changeset in webkit [206903] by commit-queue@webkit.org
  • 45 edits in trunk/Source/WebCore

Refactor CachedResourceClient::notifyFinished
https://bugs.webkit.org/show_bug.cgi?id=162060

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-07
Reviewed by Darin Adler.

No change of behavior.

Making CachedResourceClient and CachedRawResourceClient callbacks take CachedResource references and not pointers.
In most cases, the CachedResource parameter is only used for assertions.
Removing that parameter might be contemplated in the future.
The only real case is in RenderImage.

Removed the CachedResource parameter from ContentFilter methods as code was calling these methods with null values.

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::notifyFinished):

  • dom/LoadableClassicScript.h:
  • html/HTMLImageLoader.cpp:

(WebCore::HTMLImageLoader::notifyFinished):

  • html/HTMLImageLoader.h:
  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::continueAfterResponseReceived):
(WebCore::ContentFilter::continueAfterDataReceived):
(WebCore::ContentFilter::continueAfterNotifyFinished):
(WebCore::ContentFilter::deliverResourceData):

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

(WebCore::CrossOriginPreflightChecker::notifyFinished):

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

(WebCore::DocumentLoader::notifyFinished):
(WebCore::DocumentLoader::handleSubstituteDataLoadNow):
(WebCore::DocumentLoader::redirectReceived):
(WebCore::DocumentLoader::responseReceived):
(WebCore::DocumentLoader::continueAfterContentPolicy):
(WebCore::DocumentLoader::dataReceived):

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

(WebCore::DocumentThreadableLoader::redirectReceived):
(WebCore::DocumentThreadableLoader::dataSent):
(WebCore::DocumentThreadableLoader::responseReceived):
(WebCore::DocumentThreadableLoader::dataReceived):
(WebCore::DocumentThreadableLoader::notifyFinished):

  • loader/DocumentThreadableLoader.h:
  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::notifyFinished):

  • loader/ImageLoader.h:
  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::triggerEvents):
(WebCore::LinkLoader::notifyFinished):

  • loader/LinkLoader.h:
  • loader/LinkPreloadResourceClients.cpp:

(WebCore::LinkPreloadResourceClient::triggerEvents):

  • loader/LinkPreloadResourceClients.h:
  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResource::responseReceived):
(WebCore::MediaResource::shouldCacheResponse):
(WebCore::MediaResource::redirectReceived):
(WebCore::MediaResource::dataSent):
(WebCore::MediaResource::dataReceived):
(WebCore::MediaResource::notifyFinished):
(WebCore::MediaResource::getOrCreateReadBuffer):

  • loader/MediaResourceLoader.h:
  • loader/TextTrackLoader.cpp:

(WebCore::TextTrackLoader::processNewCueData):
(WebCore::TextTrackLoader::deprecatedDidReceiveCachedResource):
(WebCore::TextTrackLoader::notifyFinished):

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

(WebCore::CachedRawResource::notifyClientsDataWasReceived):
(WebCore::CachedRawResource::didAddClient):
(WebCore::CachedRawResource::redirectReceived):
(WebCore::CachedRawResource::responseReceived):
(WebCore::CachedRawResource::shouldCacheResponse):
(WebCore::CachedRawResource::didSendData):

  • loader/cache/CachedRawResourceClient.h:

(WebCore::CachedRawResourceClient::dataSent):
(WebCore::CachedRawResourceClient::responseReceived):
(WebCore::CachedRawResourceClient::shouldCacheResponse):
(WebCore::CachedRawResourceClient::dataReceived):
(WebCore::CachedRawResourceClient::redirectReceived):
(WebCore::CachedRawResourceClient::getOrCreateReadBuffer):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::checkNotify):
(WebCore::CachedResource::didAddClient):

  • loader/cache/CachedResourceClient.h:

(WebCore::CachedResourceClient::notifyFinished):
(WebCore::CachedResourceClient::deprecatedDidReceiveCachedResource):

  • loader/cache/CachedTextTrack.cpp:

(WebCore::CachedTextTrack::updateData):

  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::notifyFinished):

  • loader/icon/IconLoader.h:
  • loader/soup/CachedRawResourceSoup.cpp:
  • platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:

(WebCore::WebCoreAVCFResourceLoader::responseReceived):
(WebCore::WebCoreAVCFResourceLoader::dataReceived):
(WebCore::WebCoreAVCFResourceLoader::notifyFinished):
(WebCore::WebCoreAVCFResourceLoader::fulfillRequestWithResource):

  • platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h:
  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:

(WebCore::WebCoreAVFResourceLoader::responseReceived):
(WebCore::WebCoreAVFResourceLoader::dataReceived):
(WebCore::WebCoreAVFResourceLoader::notifyFinished):
(WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::notifyFinished):

  • rendering/RenderImage.h:
  • rendering/RenderLayerFilterInfo.cpp:

(WebCore::RenderLayer::FilterInfo::setRenderer):
(WebCore::RenderLayer::FilterInfo::notifyFinished):

  • rendering/RenderLayerFilterInfo.h:
  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::notifyFinished):

  • svg/SVGFEImageElement.h:
  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::notifyFinished):

  • svg/SVGUseElement.h:
  • xml/parser/XMLDocumentParser.cpp:

(WebCore::XMLDocumentParser::notifyFinished):

  • xml/parser/XMLDocumentParser.h:
Note: See TracTimeline for information about the timeline view.