Timeline
Dec 31, 2016:
- 4:48 PM Changeset in webkit [210218] by
-
- 7 edits1 add in trunk
SecurityOrigin::create triplet constructor does not canonicalize port
https://bugs.webkit.org/show_bug.cgi?id=166624
Reviewed by Daniel Bates.
Source/WebCore:
It is currently possible to create two different unequal SecurityOrigin objects that
represent the same security origin. The SecurityOrigin create functions that take URL and
String parameters convert the port to nullopt if it is the default port for the protocol,
but the separate protocol/host/port constructor doesn't. Change it to parallel the other
constructors.
- page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::create):
- page/SecurityOrigin.h: Export isSameOriginAs for use by tests.
Tools:
- TestWebKitAPI/PlatformGTK.cmake:
- TestWebKitAPI/PlatformWin.cmake:
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp: Added.
(TestWebKitAPI::SecurityOriginTest::SetUp):
(TestWebKitAPI::TEST_F):
- 1:57 AM Changeset in webkit [210217] by
-
- 31 edits1 delete in trunk/Source/WebCore
Remove setDOMException and a few custom bindings
https://bugs.webkit.org/show_bug.cgi?id=166002
Reviewed by Sam Weinig.
- CMakeLists.txt: Removed JSFileReaderCustom.cpp.
- WebCore.xcodeproj/project.pbxproj: Removed JSFileReaderCustom.cpp.
- bindings/js/CallbackFunction.cpp:
(WebCore::checkFunctionOnlyCallback): Use throwTypeMismatchError instead
of calling setDOMException with TYPE_MISMATCH_ERR.
- bindings/js/JSBindingsAllInOne.cpp: Removed JSFileReaderCustom.cpp.
- bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::putDelegate): Pass a throw scope in to
propagateException.
- bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::JSCryptoAlgorithmDictionary::parseAlgorithmIdentifier):
Renamed from getAlgorithmIdentifier. Got rid of bool return value, instead
use a conventional return value and conventional JavaScript exception
handling. Added a ThrowScope argument.
(WebCore::optionalHashAlgorithm): Added. Returns an optional hash algorithm.
Also makes the same changes as above, conventional exception handling and
ThrowScope argument.
(WebCore::requiredHashAlgorithm): Added. Like the above but throws an
exception if the algorithm is omitted.
(WebCore::getHashAlgorithm): Deleted. Replaced by the two functions above.
(WebCore::createAesCbcParams): Updated for above changes.
(WebCore::createHmacParams): Ditto.
(WebCore::createHmacKeyParams): Ditto.
(WebCore::createRsaKeyGenParams): Ditto.
(WebCore::createRsaOaepParams): Ditto.
(WebCore::createRsaSsaParams): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Added
a ThrowScope argument, and changed to use throwNotSupportedError instead
of setDOMException with NOT_SUPPORTED_ERROR.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Ditto.
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Ditto.
- bindings/js/JSCryptoAlgorithmDictionary.h: Updated for the above changes.
- bindings/js/JSCryptoOperationData.cpp:
(WebCore::cryptoOperationDataFromJSValue): Got rid of bool return value and
instead use a conventional return value and conventional JS exception handling.
Added a ThrowScope argument.
- bindings/js/JSCryptoOperationData.h: Updated for the above.
- bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::create): Use ExceptionOr.
(WebCore::JSCustomXPathNSResolver::JSCustomXPathNSResolver): Take a VM&
rather than an ExecState*.
- bindings/js/JSCustomXPathNSResolver.h: Updated for the changes above.
Also marked class final and fixed indentation.
- bindings/js/JSDOMBinding.cpp:
(WebCore::createDOMException): Updated comment.
(WebCore::throwDOMException): Deleted.
(WebCore::propagateException): Deleted non-inline overload that does not take
a throw scope, now that all callers pass a throw scope.
(WebCore::setDOMExceptionSlow): Deleted.
(WebCore::setDOMException): Deleted.
(WebCore::throwNotSupportedError): Added.
(WebCore::throwDOMSyntaxError): Added.
(WebCore::throwDataCloneError): Added.
(WebCore::throwIndexSizeError): Added.
(WebCore::throwTypeMismatchError): Added.
- bindings/js/JSDOMBinding.h: Updated for the additions and removals
above. Also grouped the standard DOM exception throwing functions separately
from the special ones for getters and setters, and sorted them alphabetically.
- bindings/js/JSDataCueCustom.cpp:
(WebCore::createJSDataCue): Added, helper function for the below.
(WebCore::constructJSDataCue): Tightened and tweaked a bit.
- bindings/js/JSFileReaderCustom.cpp: Removed.
- bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::setLength): Use throwIndexSizeError instead
of setDOMException with INDEX_SIZE_ERR.
- bindings/js/JSHTMLSelectElementCustom.cpp:
(WebCore::selectElementIndexSetter): Use throwTypeMismatchError instead of
setDOMExceptoin with TYPEMISMATCH_ERR.
- bindings/js/JSIDBRequestCustom.cpp:
(WebCore::JSIDBRequest::result): Pass a throw scope in to
propagateException.
- bindings/js/JSSQLResultSetRowListCustom.cpp:
(WebCore::JSSQLResultSetRowList::item): Use throwTypeMismatchError and
throwIndexSizeError instead of setDOMException with TYPE_MISMATCH_ERR and
INDEX_ERR. This required adding a throw scope.
- bindings/js/JSSQLTransactionCustom.cpp:
(WebCore::JSSQLTransaction::executeSql): Use throwDOMSyntaxError and
throwTypeMismatchError instead of setDOMException with SYNTAX_ERR and
TYPE_MISMATCH_ERR.
- bindings/js/JSStorageCustom.cpp:
(WebCore::JSStorage::nameGetter): Pass a throw scope in to
propagateException.
- bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::normalizeCryptoAlgorithmParameters): Use throwNotSupportedError
instead of setDOMException with NOT_SUPPORTED_ERR.
(WebCore::createAlgorithm): Deleted.
(WebCore::supportExportKeyThrow): Added ThrowScope argument and use
throwNotSupportedError instead of setDOMException with NOT_SUPPORTED_ERR.
(WebCore::jsSubtleCryptoFunctionEncryptPromise): Updated for above changes,
throwing a not supported exception at this level rather than in a helper.
(WebCore::jsSubtleCryptoFunctionDecryptPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionSignPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionVerifyPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionDigestPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionGenerateKeyPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionImportKeyPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionExportKeyPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionWrapKeyPromise): Ditto.
(WebCore::jsSubtleCryptoFunctionUnwrapKeyPromise): Ditto.
- bindings/js/JSWebKitSubtleCryptoCustom.cpp:
(WebCore::createAlgorithmFromJSValue): Got rid of bool return value and
instead use a conventional return value and conventional JS exception handling.
Added a ThrowScope argument.
(WebCore::cryptoKeyFormatFromJSValue): Ditto.
(WebCore::cryptoKeyUsagesFromJSValue): Ditto.
(WebCore::JSWebKitSubtleCrypto::encrypt): Updated for above changes.
(WebCore::JSWebKitSubtleCrypto::decrypt): Ditto.
(WebCore::JSWebKitSubtleCrypto::sign): Ditto.
(WebCore::JSWebKitSubtleCrypto::verify): Ditto.
(WebCore::JSWebKitSubtleCrypto::digest): Ditto.
(WebCore::JSWebKitSubtleCrypto::generateKey): Ditto.
(WebCore::JSWebKitSubtleCrypto::importKey): Ditto.
(WebCore::JSWebKitSubtleCrypto::exportKey): Ditto.
(WebCore::JSWebKitSubtleCrypto::wrapKey): Ditto.
(WebCore::JSWebKitSubtleCrypto::unwrapKey): Ditto.
- bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::send): Pass a throw scope in to
propagateException.
(WebCore::JSXMLHttpRequest::responseText): Ditto.
- bindings/js/JSXPathNSResolverCustom.cpp:
(WebCore::JSXPathNSResolver::toWrapped): Updated since
JSCustomXPathNSResolver::create now uses ExceptionOr.
- bindings/js/SerializedScriptValue.cpp:
(WebCore::maybeThrowExceptionIfSerializationFailed): Updated to take
a reference instead of a pointer. Fixed the handling of success to be
simpler; no need to check the code twice. Use throwDataCloneError instead
of setDOMException with DATA_CLONE_ERR.
(WebCore::SerializedScriptValue::create): Updated for above.
(WebCore::SerializedScriptValue::deserialize): Ditto.
- bindings/js/StructuredClone.cpp:
(WebCore::structuredCloneArrayBuffer): Use throwDataCloneError instead of
setDOMException with DATA_CLONE_ERR.
(WebCore::structuredCloneArrayBufferView): Ditto.
- crypto/CryptoAlgorithmParametersDeprecated.h: Removed unneeded empty
constructor.
- crypto/parameters/CryptoAlgorithmHmacKeyParamsDeprecated.h: Ditto,
moving initialization to where the data member is defined.
- crypto/parameters/CryptoAlgorithmRsaKeyGenParamsDeprecated.h: Ditto.
- crypto/parameters/CryptoAlgorithmRsaOaepParamsDeprecated.h: Ditto.
- fileapi/FileReader.cpp:
(WebCore::FileReader::result): Added. Returns a combination of optional
and variant that matches what the ID specifies. Moved the code from the
two following functions in here.
(WebCore::FileReader::arrayBufferResult): Deleted.
(WebCore::FileReader::stringResult): Deleted.
- fileapi/FileReader.h: Updated for the above.
- fileapi/FileReader.idl: Removed [Custom] from the result attribute and
declared it with the type mentioned in the specification, a nullable union.
- 1:51 AM Changeset in webkit [210216] by
-
- 94 edits1 delete in trunk
Remove PassRefPtr use from the "dom" directory, related cleanup
https://bugs.webkit.org/show_bug.cgi?id=166569
Reviewed by Alex Christensen.
Source/WebCore:
- CMakeLists.txt: Removed DocumentMarker.cpp.
- WebCore.xcodeproj/project.pbxproj: Ditto.
- bindings/js/JSPopStateEventCustom.cpp:
(WebCore::JSPopStateEvent::state): Pass ExecState by reference.
- dom/CharacterData.cpp:
(WebCore::CharacterData::dispatchModifiedEvent): Use auto.
- dom/DOMAllInOne.cpp: Removed DocumentMarker.cpp.
- dom/DOMNamedFlowCollection.cpp:
(WebCore::DOMNamedFlowCollection::DOMNamedFlowCollection): Updated to take
ownership of the passed in vector.
(WebCore::DOMNamedFlowCollection::create): Moved here from header.
(WebCore::DOMNamedFlowCollection::~DOMNamedFlowCollection): Moved here so we
don't need to include "WebKitNamedFlow.h" in the header.
(WebCore::DOMNamedFlowCollection::item): Rewrote to use Vector.
(WebCore::DOMNamedFlowCollection::namedItem): Rewrote to use a HashSet that
we build from the Vector. Uses a set of hash functions defined right here.
Note that the privor version of this class had incorrect use of ListHashSet
with safeToCompareToEmptyOrDeleted inaccurately set to true.
(WebCore::DOMNamedFlowCollection::supportedPropertyNames): Added this.
Old version just had an empty placeholder.
- dom/DOMNamedFlowCollection.h: Changed to no longer use ListHashSet, not
the right data structure for this. Removed incorrect use of "long" and
made some other simplifications.
- dom/DOMNamedFlowCollection.idl: Changed return types of item and namedItem
to accurately reflect the fact that they return null when the index or name
not found in the collection.
- dom/DataTransfer.h: Remove indentation. Remove unimplemented
incorrect declarations of items for ENABLE(DATA_TRANSFER_ITEMS).
Will be added back when someone implements that feature, or perhaps
ENABLE(DATA_TRANSFER_ITEMS) should be entirely removed for now?
- dom/DataTransferItem.h: Changed return type for getAsFile to
RefPtr. Again, part of ENABLE(DATA_TRANSFER_ITEMS), so dead code for now.
- dom/Document.cpp:
(WebCore::canonicalizedTitle): Removed incorrect comment claiming we
convert control characters to spaces. Simplified logic, removing two
extra loops. Changed to work on just a String rather than StringWithDirection.
(WebCore::Document::updateTitle): Updated to call the function above.
Also updated since StringWithDirection is now a struct instead of a class.
Call displayBuffer on the encoding directly instead of calling a member
function named displayBufferModifiedByEncoding.
(WebCore::Document::updateTitleFromTitleElement): Updated since
StringWithDirection is now a struct.
(WebCore::Document::setTitle): Removed code that unnecessarily calls
updateTitle twice; once indirectly by calling setTextContent on the
title elmeent and once by directly calling updateTitle.
(WebCore::Document::setWindowAttributeEventListener): Take a RefPtr&&.
(WebCore::Document::statePopped): Take a Ref&&.
(WebCore::Document::displayStringModifiedByEncoding): Deleted unused overload.
(WebCore::Document::displayBufferModifiedByEncodingInternal): Deleted.
(WebCore::Document::requestAnimationFrame): Take a Ref&&.
- dom/Document.h: Updated for changes above. Also changed the title function
to return a const String& to slightly cut down on reference count churn.
(WebCore::Document::displayBufferModifiedByEncoding): Deleted.
- dom/DocumentMarker.cpp: Removed.
- dom/DocumentMarker.h: Reworked the DocumentMarker class to use a variant
instead of a separate reference counted DocumentMarkerDetails object.
- dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::addMarkerToNode): Changed argument
type to DocumentMarker::Data&&.
(DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
clearDetails -> clearData
(DocumentMarkerController::showMarkers): activeMatch -> isActiveMatch
- dom/DocumentMarkerController.h: Updated for the above.
- dom/DocumentParser.h: Fixed incorrect reference to PassRefPtr in a comment.
- dom/Element.cpp:
(WebCore::Element::willModifyAttribute): Use auto.
- dom/Event.cpp:
(WebCore::Event::isDragEvent): Deleted. Unused.
(WebCore::Event::cloneFor): Deleted. Unused function left over from the
start of an implementation of seamless frames.
- dom/Event.h: Updated for the above.
- dom/EventContext.cpp: Tweaked blank lines.
- dom/EventContext.h: Removed unnecessary includes and forward declarations.
Changed setRelatedTarget to take a raw pointer instead of PassRefPtr since
callers aren't passing ownership. Moved TouchEventContext::touchList body
out of the class definition since it's a bit long. Deleted unused
toTouchEventContext functions. FIxed incorrect comment.
- dom/MessageEvent.cpp:
(WebCore::MessageEvent::initMessageEvent): Removed unused overload.
- dom/MessageEvent.h: Updated for above. Also changed the
dataAsSerializedScriptValue function to return a raw pointer instead of
PassRefPtr since it is not passing ownership.
- dom/MouseEvent.cpp:
(WebCore::MouseEvent::create): Use raw pointer instead of PassRefPtr for
data transfer and related target arguments.
(WebCore::MouseEvent::MouseEvent): Ditto. Also use IntPoint instead of
separate ints for the various X/Y pairs.
(WebCore::MouseEvent::initMouseEvent): Take a raw pointer for event target.
(WebCore::MouseEvent::isDragEvent): Reformatted, sorted alphabetically,
added comment about why this function probably needs to go.
(WebCore::adjustedClientX): Deleted.
(WebCore::adjustedClientY): Deleted.
(WebCore::MouseEvent::cloneFor): Deleted.
- dom/MouseEvent.h: Updated for the above. Also made more functions private
and final and initialized more of the data members.
- dom/MutationEvent.cpp:
(WebCore::MutationEvent::MutationEvent): Pass related node as a raw pointer.
(WebCore::MutationEvent::initMutationEvent): Ditto.
- dom/MutationEvent.h: Updated for the above. Fixed indentation. Removed
unnecessary explicit destructor; default generated one is fine. Initialize
m_attrChange in the class definition.
- dom/MutationObserver.cpp:
(WebCore::MutationObserver::observe): Pass reference.
(WebCore::MutationObserver::disconnect): Call unregisterMutationObserver
directly instead of calling unregisterAndDelete.
- dom/MutationObserverInterestGroup.cpp:
(WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup):
Take an rvalue reference to the HashMap and use move.
(WebCore::MutationObserverInterestGroup::createIfNeeded): Updated to call
registeredMutationObservers.
- dom/MutationObserverInterestGroup.h: Updated for the above.
- dom/MutationObserverRegistration.cpp:
(WebCore::MutationObserverRegistration::MutationObserverRegistration):
Take a reference to the observer instead of PassRefPtr. Also take a
refererence to the node rather than a pointer.
(WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
Updated to use references instead of pointers.
(WebCore::MutationObserverRegistration::clearTransientRegistrations): Ditto.
(WebCore::MutationObserverRegistration::unregisterAndDelete): Deleted.
(WebCore::MutationObserverRegistration::shouldReceiveMutationFrom): Ditto.
(WebCore::MutationObserverRegistration::addRegistrationNodesToSet): Ditto.
- dom/MutationObserverRegistration.h: Updated for above changes. Also added
a node member function. Changed m_observer to a Ref and m_node to a reference.
Removed the NodeHashSet typedef.
- dom/NamedFlowCollection.cpp:
(WebCore::NamedFlowCollection::createCSSOMSnapshot): Pass a vector of Ref
instead of a vector of raw pointers and pass it as an rvalue reference so
it can be taken over by the named flow collection wrapper.
- dom/Node.cpp:
(WebCore::Node::mutationObserverRegistry): Use auto and nullptr.
(WebCore::Node::transientMutationObserverRegistry): Ditto.
(WebCore::collectMatchingObserversForMutation): Use references instead of pointers.
(WebCore::Node::registeredMutationObservers): Changed to return a map instead of
filling one in and renamed to remove "get" from name.
(WebCore::Node::registerMutationObserver): Use references instead of pointers.
(WebCore::Node::unregisterMutationObserver): Ditto.
(WebCore::Node::registerTransientMutationObserver): Ditto.
(WebCore::Node::unregisterTransientMutationObserver): Ditto.
(WebCore::Node::notifyMutationObserversNodeWillDetach): Ditto.
- dom/Node.h: Updated for the above.
- dom/PopStateEvent.cpp:
(WebCore::PopStateEvent::PopStateEvent): Use RefPtr&& instead of PassRefPtr.
(WebCore::PopStateEvent::create): Use a raw pointer instead of PassRefPtr.
(WebCore::PopStateEvent::trySerializeState): Take a reference to ExecState.
- dom/PopStateEvent.h: Updated for the above.
- dom/Position.cpp:
(WebCore::Position::Position): Take a raw pointer instead of PassRefPtr.
(WebCore::Position::moveToPosition): Ditto.
- dom/Position.h: Updated for the above, also changed createLegacyEditingPosition
in the same way and got rid of the LegacyEditingPosition class.
- dom/Range.cpp:
(WebCore::Range::Range): Changed startContainer and endContainer to RefPtr<Node>&&.
Later this needs to be changed more, but for now this keeps code changes to a minimum.
(WebCore::Range::create): Changed startContainer and endContainer to Node*.
- dom/Range.h: Updated for the above.
- dom/ScopedEventQueue.cpp:
(WebCore::ScopedEventQueue::dispatchEvent): Removed a comment that talks about
PassRefPtr, and simplified the code since the comment is no longer valid.
- dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::PendingException::PendingException):
Take a RefPtr&& instead of a PassRefPtr.
(WebCore::ScriptExecutionContext::ScriptExecutionContext): Moved initialization
of all the data members up to the class definition.
(WebCore::ScriptExecutionContext::sanitizeScriptError): Use ASCIILiteral.
(WebCore::ScriptExecutionContext::reportException): Use WTFMove when passing
arguments to the PendingException constructor and using a value from the
PendingException just before destroying it.
- dom/ScriptExecutionContext.h: Changed addTimeout to take a reference rather
than a PassRefPtr to the timer. Callers were not passing ownership. Also
initialize all the data members here in the class definition.
- dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::registerCallback): Take a Ref&&.
- dom/ScriptedAnimationController.h: Updated for the above.
- dom/SimulatedClick.cpp:
(WebCore::SimulatedMouseEvent::SimulatedMouseEvent): Updated since MouseEvent
constructor arguments changed to use IntPoint.
- dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent): Ditto. Also removed some unneeded initializers
now that the header does more.
(WebCore::WheelEvent::initWheelEvent): Tweaed style a bit.
(WebCore::WheelEvent::initWebKitWheelEvent): Deleted. Moved to the header since it's
just an inline that forwards to initWheelEvent.
- dom/WheelEvent.h: Updated for the above.
- dom/make_event_factory.pl:
(generateImplementation): Use RefPtr instead of PassRefPtr. A couple other tweaks.
- editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::respondToMarkerAtEndOfWord): Use the data
insetad of details.
(WebCore::AlternativeTextController::removeDictationAlternativesForMarker):
Ditto, also changed to take reference instead of pointer.
(WebCore::AlternativeTextController::dictationAlternativesForMarker): Ditto.
(WebCore::AlternativeTextController::applyDictationAlternative): Ditto.
- editing/AlternativeTextController.h: Updated for the above.
- editing/ApplyBlockElementCommand.cpp:
(WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):
Updated since Position now takes a raw pointer.
- editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::joinChildTextNodes): Ditto.
- editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::replaceSelectedTextInNode): Ditto.
(WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): Ditto.
- editing/DictationCommand.cpp:
(WebCore::DictationMarkerSupplier::addMarkersToTextNode): Updated to use the
DictationData struct.
- editing/Editor.cpp:
(WebCore::Editor::updateMarkersForWordsAffectedByEditing): Pass a reference.
(WebCore::Editor::dictationAlternativesForMarker): Take a reference.
- editing/Editor.h: Updated for the above.
- editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::performOverwrite): Updated since Position now takes
a raw pointer.
(WebCore::InsertTextCommand::doApply): Ditto.
(WebCore::InsertTextCommand::insertTab): Ditto.
- editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition): Ditto.
- html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::computedTextWithDirection): Updated since
StringWithDirection is now a struct.
- loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm): Use Ref&& for the form submission.
(WebCore::FrameLoader::receivedFirstData): Updated for change to StringWithDirection.
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::didBeginDocument): Pass a reference.
(WebCore::FrameLoader::loadURLIntoChildFrame): Pass a Ref to loadArchive.
(WebCore::FrameLoader::loadArchive): Take a Ref&& for the archive.
(WebCore::FrameLoader::loadInSameDocument): Take a raw pointer for the
serialized script value state object. No one was passing ownership.
But pass it along to statePopped as a Ref since we need to pass ownership
of the null value, at least for now.
(WebCore::FrameLoader::loadFrameRequest): Take a raw pointer for form state.
No one was passing ownership.
(WebCore::FrameLoader::loadURL): Ditto.
(WebCore::FrameLoader::load): Ditto.
(WebCore::FrameLoader::loadWithNavigationAction): Ditto.
(WebCore::FrameLoader::loadWithDocumentLoader): Ditto.
(WebCore::FrameLoader::loadPostRequest): Ditto.
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Ditto.
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Ditto.
- loader/FrameLoader.h: Updated for the above and to remove an unneeded forward
declaration of StringWithDirection, which is not used here.
- loader/FrameLoaderClient.h: Updated forward declaration of StringWithDirection.
Also sorted the others and removed unneeded conditionals.
- loader/HistoryController.cpp:
(WebCore::HistoryController::setCurrentItemTitle): Updated to use struct.
(WebCore::HistoryController::initializeItem): Ditto.
- loader/HistoryController.h: Updated forward declaration of StringWithDirection.
- loader/PolicyCallback.cpp:
(WebCore::PolicyCallback::PolicyCallback): Deleted. Default works fine.
(WebCore::PolicyCallback::~PolicyCallback): Ditto.
(WebCore::PolicyCallback::set): Take a raw pointer to form state.
- loader/PolicyCallback.h: Use raw pointer for form state.
- loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy): Take a raw pointer for form state.
(WebCore::PolicyChecker::checkNewWindowPolicy): Ditto.
- loader/PolicyChecker.h: Updated for the above.
- page/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer): Pass reference to addTimeout function.
- page/DOMWindow.cpp:
(WebCore::DOMWindow::requestAnimationFrame): Use Ref&& for callback.
(WebCore::DOMWindow::webkitRequestAnimationFrame): Ditto.
(WebCore::DOMWindow::cancelAnimationFrame): Tweak coding style.
- page/DOMWindow.h: Updated for the above.
- platform/PlatformWheelEvent.h: Use pragma once. Tweaked header indentation.
Simplified constructors by initializing data members.
- platform/text/StringWithDirection.h: Use pragma once. Use struct instead of class.
- rendering/HitTestResult.cpp:
(WebCore::HitTestResult::dictationAlternatives): Pass a reference.
- rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintTextMatchMarker): activeMatch -> isActiveMatch
Source/WebKit/ios:
- WebView/WebPDFViewIOS.mm:
(-[WebPDFView _checkPDFTitle]): Use aggregate-style syntax for StringWithDirection.
Not needed now, but useful later if we ever can get rid of the explicit constructors.
Source/WebKit/mac:
- WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidReceiveTitle): Updated to use struct.
(WebFrameLoaderClient::updateGlobalHistory): Ditto.
(WebFrameLoaderClient::setTitle): Ditto.
(WebFrameLoaderClient::transitionToCommittedForNewPage): Ditto.
- WebView/WebFrame.mm:
(-[WebFrame _dispatchDidReceiveTitle:]): Use aggregate-style syntax for StringWithDirection.
Not needed now, but useful later if we ever can get rid of the explicit constructors.
(-[WebFrame loadArchive:]): Pass a reference to loadArchive.
- WebView/WebHTMLRepresentation.mm:
(-[WebHTMLRepresentation title]): Updated to use struct.
Source/WebKit/win:
- WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDidReceiveTitle): Updated since StringWithDirection::title
is now a data member, not a function member.
(WebFrameLoaderClient::updateGlobalHistory): Ditto.
(WebFrameLoaderClient::setTitle): Ditto.
- WebDataSource.cpp:
(WebDataSource::pageTitle): Ditto.
Source/WebKit2:
- WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle): Updated to use struct.
(WebKit::WebFrameLoaderClient::updateGlobalHistory): Ditto.
(WebKit::WebFrameLoaderClient::setTitle): Ditto.
LayoutTests:
- fast/dom/title-text-property-2-expected.txt:
- http/tests/globalhistory/history-delegate-basic-title-expected.txt:
Updated expected results for progression where we no longer send duplicate updates
of the title when setting the title property on a document.
- fast/regions/cssom/webkit-named-flow-collection-expected.txt:
- fast/regions/cssom/webkit-named-flow-collection.html:
Added test cases cover property names in the named flow collection.
Specifically, check both Object.keys for just the indices, and also
Object.getOwnPropertyNames for including the names of the flows.
- 1:17 AM Changeset in webkit [210215] by
-
- 16 edits in trunk/Source/WebCore
Remove PassRefPtr use from the "css" directory, related cleanup
https://bugs.webkit.org/show_bug.cgi?id=166628
Reviewed by Alex Christensen.
- css/CSSCalculationValue.cpp:
(WebCore::CSSCalcBinaryOperation::create): Take RefPtr&& instead of PassRefPtr.
Also added some checks for null. Code here is really inconsistent about null;
probably should change from RefPtr to Ref at some point.
(WebCore::CSSCalcBinaryOperation::createSimplified): Ditto.
(WebCore::CSSCalcBinaryOperation::CSSCalcBinaryOperation): Take Ref&& instead
of PassRefPtr.
- css/CSSCrossfadeValue.cpp:
(WebCore::subimageKnownToBeOpaque): Take a reference instead of a pointer.
(WebCore::CSSCrossfadeValue::SubimageObserver::SubimageObserver): Moved here
from the header, and renamed.
(WebCore::CSSCrossfadeValue::SubimageObserver::imageChanged): Ditto.
(WebCore::CSSCrossfadeValue::CSSCrossfadeValue): Moved here from the header.
(WebCore::CSSCrossfadeValue::create): Ditto.
(WebCore::CSSCrossfadeValue::~CSSCrossfadeValue): Updated for data member name change.
(WebCore::CSSCrossfadeValue::fixedSize): Take a reference. Also rewrote size math to
take advantage of FloatSize multiplication and addition operators.
(WebCore::CSSCrossfadeValue::knownToBeOpaque): Take a reference.
(WebCore::CSSCrossfadeValue::loadSubimages): Set m_subimagesAreReady rather than
calling setReady on the subimage observer.
(WebCore::CSSCrossfadeValue::image): Return a raw pointer rather than a RefPtr.
Take a reference instead of a pointer.
(WebCore::CSSCrossfadeValue::crossfadeChanged): Removed unused rect argument.
Rewrote to use modern for loop.
- css/CSSCrossfadeValue.h: Updated for above changes.
- css/CSSGradientValue.cpp:
(WebCore::createGradient): Added. Helper so the function below can use Ref rather
than RefPtr, and it's also nice to factor out this "poor man's virtual function".
(WebCore::CSSGradientValue::image): Take a reference rather than a pointer.
(WebCore::clone): Added. Helper like createGradient above.
(WebCore::CSSGradientValue::gradientWithStylesResolved): Take a reference rather
than a pointer. Simplified by using the helper above.
(WebCore::CSSGradientValue::knownToBeOpaque): Removed unused argument. Rewrote to
use a modern for loop.
- css/CSSGradientValue.h: Updated for above changes.
- css/CSSImageGeneratorValue.cpp: Moved the CachedGeneratedImage class in here
from the header. Also changed it to use const and Ref.
(WebCore::CSSImageGeneratorValue::addClient): Take a reference rather than a pointer.
(WebCore::CSSImageGeneratorValue::removeClient): Ditto.
(WebCore::CSSImageGeneratorValue::cachedImageForSize): Updated since image now returns
a reference rather than a pointer.
(WebCore::CSSImageGeneratorValue::saveCachedImageForSize): Take a reference rather
than PassRefPtr.
(WebCore::CSSImageGeneratorValue::image): Take a reference rather than a pointer.
(WebCore::CSSImageGeneratorValue::fixedSize): Ditto.
(WebCore::CSSImageGeneratorValue::knownToBeOpaque): Ditto.
- css/CSSImageGeneratorValue.h: Updated for above changes.
- css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createFontFaceValue): Return a RefPtr rather than PassRefPtr.
- css/CSSValuePool.h: Updated for the above.
- css/StyleBuilderConverter.h: Change convertStyleImage and convertShapeValue to
return RefPtr instead of PassRefPtr.
- css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueContent): Since gradientWithStylesResolved
returns a Ref now, no need to dereference it any more. This also removes reference
count churn since we are now passing a Ref temporary to a Ref&&.
- css/StyleResolver.cpp:
(WebCore::StyleResolver::styleImage): Ditto.
- platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::GradientImage): Pass generator as a reference rather than
as a PassRefPtr.
(WebCore::GradientImage::draw): Updated since m_gradient is now a Ref rather than
a RefPtr.
(WebCore::GradientImage::drawPattern): Ditto.
- platform/graphics/GradientImage.h: Updated for the above changes. Make things
private rather than protected since this class is final.
- rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::imageSize): Pass renderer as a reference. Later, we
should change the interface to this function, too.
(WebCore::StyleGeneratedImage::addClient): Ditto.
(WebCore::StyleGeneratedImage::removeClient): Ditto.
(WebCore::StyleGeneratedImage::image): Ditto.
(WebCore::StyleGeneratedImage::knownToBeOpaque): Ditto.
Dec 30, 2016:
- 5:28 PM Changeset in webkit [210214] by
-
- 2 edits in trunk/Source/WebCore/platform/gtk/po
[GTK] German translation update
https://bugs.webkit.org/show_bug.cgi?id=152228
Patch by Bernd Homuth <dev@hmt.im> on 2016-12-30
Rubber-stamped by Michael Catanzaro.
- de.po:
- 8:16 AM Changeset in webkit [210213] by
-
- 2 edits in trunk/Source/WebCore
[EFL] fix buffer over-read in RenderThemeEfl::mediaControlsStyleSheet()
https://bugs.webkit.org/show_bug.cgi?id=166622
Patch by Olivier Blin <Olivier Blin> on 2016-12-30
Reviewed by Gyuyoung Kim.
This has been detected by a charactersAreAllASCII() assert failure.
Initially in WebKitForWayland (WPE), but the code was likely borrowed from EFL.
This is because ASCIILiteral() is wrongly used in mediaControlsStyleSheet().
mediaControlsBaseUserAgentStyleSheet is a char array, not a null-terminated string.
It is thus incorrect to use StringImpl::createFromLiteral() that calls
strlen() to get the string length.
The String::ConstructFromLiteral constructor can not be used, since it
skips the last character.
- rendering/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::mediaControlsStyleSheet):
Explicitely pass the size to the String constructor.
- 6:00 AM Changeset in webkit [210212] by
-
- 6 edits in trunk/Source/WebCore
Unreviewed, rolling out r210206.
https://bugs.webkit.org/show_bug.cgi?id=166621
Crashes on macOS PLT (Requested by kling on #webkit).
Reverted changeset:
"Drop the render tree for documents in the page cache."
https://bugs.webkit.org/show_bug.cgi?id=121798
http://trac.webkit.org/changeset/210206
- 2:53 AM Changeset in webkit [210211] by
-
- 4 edits4 adds in trunk
[css-grid] Isolate instrinsic size computation from layout
https://bugs.webkit.org/show_bug.cgi?id=166530
Reviewed by Darin Adler.
Source/WebCore:
This is the last patch of the items placement data refactoring. By using a different Grid
instance in computeIntrinsicLogicalWidths we effectively isolate the intrinsic size
computation from the layout. They are now using different data structures so they don't
interfere each other.
This also means that we no longer reuse the placement of items done in the intrinsic size
computation. That shouldn't be a big issue once we make m_grid persistent on RenderGrid.
Last but not least, this patch finally removes the ugly const_cast's we had in
computeIntrinsicLogicalWidths() as we no longer modify the internal state of RenderGrid.
Tests: fast/css-grid-layout/grid-auto-repeat-intrinsic.html
fast/css-grid-layout/grid-change-intrinsic-size-with-auto-repeat-tracks.html
- rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths): Use a new instance of Grid.
(WebCore::RenderGrid::computeEmptyTracksForAutoRepeat): Fixed a missing m_grid -> grid
rename.
(WebCore::RenderGrid::placeItemsOnGrid): Constify it. It nows repositions the items if the
number of auto repeat tracks has changed.
- rendering/RenderGrid.h:
LayoutTests:
- fast/css-grid-layout/grid-auto-repeat-intrinsic-expected.txt: Added.
- fast/css-grid-layout/grid-auto-repeat-intrinsic.html: Added.
- fast/css-grid-layout/grid-change-intrinsic-size-with-auto-repeat-tracks-expected.txt: Added.
- fast/css-grid-layout/grid-change-intrinsic-size-with-auto-repeat-tracks.html: Added.
- 2:09 AM Changeset in webkit [210210] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2
Merge r210180 - Ensure NetworkProcess is ready before whitelisting TLS certificates
https://bugs.webkit.org/show_bug.cgi?id=162962
Patch by Emanuele Aina <Emanuele Aina> on 2016-12-27
Reviewed by Alex Christensen.
If the API user tries to whitelist TLS certificates before any web
view has been created, the action will be ignored because the
NetworkProcess hasn't been fired up yet.
For example, the snippet below using the GTK+ API does not work,
unless the whitelisting is moved after the web view creation:
webkit_web_context_allow_tls_certificate_for_host(webkit_web_context_get_default(), crt, host);
webView = webkit_web_view_new();
- UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost): Ensure
that the NetworkProcess has been already fired up when adding
certificates, so they can be whitelisted before the first web view is
instantiated.
- 2:07 AM WebKitGTK/2.14.x edited by
- (diff)
- 2:06 AM Changeset in webkit [210209] by
-
- 4 edits in releases/WebKitGTK/webkit-2.14
Merge r210207 - [GTK] Improve user agent construction
https://bugs.webkit.org/show_bug.cgi?id=142074
Reviewed by Carlos Garcia Campos.
Source/WebCore:
Using the macOS quirk rather than the Chrome quirk for Google domains was a mistake: it
broke Hangouts in a different way than the Chrome quirk, and also prevents use of the nice
Earth mode on Google Maps. Google is making it really hard to develop a sane quirk.
Eventually I settled on the combination of two quirks: (1) Firefox browser, and (2) Linux
x86_64 platform. See the bug for full discussion on why these quirks are the best way to
make Google domains work properly in WebKit. This is an extremely sad state of affairs, but
I'm confident it is the best option. Note this effectively includes a rollout of r210168.
Also, fix a bug that caused an extra space to be inserted in the middle of the user agent.
- platform/UserAgentQuirks.cpp:
(WebCore::isGoogle):
(WebCore::urlRequiresFirefoxBrowser):
(WebCore::urlRequiresMacintoshPlatform):
(WebCore::urlRequiresLinuxDesktopPlatform):
(WebCore::UserAgentQuirks::quirksForURL):
(WebCore::UserAgentQuirks::stringForQuirk):
(WebCore::UserAgentQuirks::firefoxRevisionString):
- platform/UserAgentQuirks.h:
- platform/gtk/UserAgentGtk.cpp:
(WebCore::buildUserAgentString):
Tools:
- TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::assertUserAgentForURLHasChromeBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasFirefoxBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasLinuxPlatformQuirk):
(TestWebKitAPI::assertUserAgentForURLHasMacPlatformQuirk):
(TestWebKitAPI::TEST):
- 1:39 AM Changeset in webkit [210208] by
-
- 4 edits in releases/WebKitGTK/webkit-2.14/Source/JavaScriptCore
Merge r208018 - JSFunction::put() should not allow caching of lazily reified properties.
https://bugs.webkit.org/show_bug.cgi?id=164081
Reviewed by Geoffrey Garen.
It is incorrect for JSFunction::put() to return PutPropertySlots that indicates
that its lazily reified properties (e.g. .caller, and .arguments) are cacheable.
The reason for this is:
- Currently, a cacheable put may only consist of the following types of put
operations:
- putting a new property at an offset in the object storage.
- changing the value of an existing property at an offset in the object storage.
- invoking the setter for a property at an offset in the object storage.
Returning a PutPropertySlot that indicates the property is cacheable means that
the property put must be one of the above operations.
For lazily reified properties, JSFunction::put() implements complex conditional
behavior that is different than the set of cacheable put operations above.
Hence, it should not claim that the property put is cacheable.
- Cacheable puts are cached on the original structure of the object before the put operation.
Reifying a lazy property will trigger a structure transition. Even though
subsequent puts to such a property may be cacheable after the structure
transition, it is incorrect to indicate that the property put is cacheable
because the caching is on the original structure, not the new transitioned
structure.
Also fixed some missing exception checks.
- jit/JITOperations.cpp:
- runtime/JSFunction.cpp:
(JSC::JSFunction::put):
(JSC::JSFunction::reifyLazyPropertyIfNeeded):
(JSC::JSFunction::reifyBoundNameIfNeeded):
- runtime/JSFunction.h:
- 1:02 AM Changeset in webkit [210207] by
-
- 6 edits in trunk
[GTK] Improve user agent construction
https://bugs.webkit.org/show_bug.cgi?id=142074
Reviewed by Carlos Garcia Campos.
Source/WebCore:
Using the macOS quirk rather than the Chrome quirk for Google domains was a mistake: it
broke Hangouts in a different way than the Chrome quirk, and also prevents use of the nice
Earth mode on Google Maps. Google is making it really hard to develop a sane quirk.
Eventually I settled on the combination of two quirks: (1) Firefox browser, and (2) Linux
x86_64 platform. See the bug for full discussion on why these quirks are the best way to
make Google domains work properly in WebKit. This is an extremely sad state of affairs, but
I'm confident it is the best option. Note this effectively includes a rollout of r210168.
Also, fix a bug that caused an extra space to be inserted in the middle of the user agent.
- platform/UserAgentQuirks.cpp:
(WebCore::isGoogle):
(WebCore::urlRequiresFirefoxBrowser):
(WebCore::urlRequiresMacintoshPlatform):
(WebCore::urlRequiresLinuxDesktopPlatform):
(WebCore::UserAgentQuirks::quirksForURL):
(WebCore::UserAgentQuirks::stringForQuirk):
(WebCore::UserAgentQuirks::firefoxRevisionString):
- platform/UserAgentQuirks.h:
- platform/gtk/UserAgentGtk.cpp:
(WebCore::buildUserAgentString):
Tools:
- TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::assertUserAgentForURLHasChromeBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasFirefoxBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasLinuxPlatformQuirk):
(TestWebKitAPI::assertUserAgentForURLHasMacPlatformQuirk):
(TestWebKitAPI::TEST):
- 12:54 AM Changeset in webkit [210206] by
-
- 6 edits in trunk/Source/WebCore
Drop the render tree for documents in the page cache.
<https://webkit.org/b/121798>
Reviewed by Darin Adler.
To save memory and reduce complexity, have documents tear down their render tree
when entering the page cache. I've wanted to do this for a long time and it seems
like we can actually do it now.
This patch will enable a number of clean-ups since it's no longer valid for renderers
to exist while the document is in page cache.
- dom/Document.cpp:
(WebCore::Document::destroyRenderTree): Remove assertion that we're not in the page cache
since we will now be tearing down render trees right as they enter the page cache.
(WebCore::Document::setPageCacheState): Tear down the render tree right before setting
the in-cache flag. From now on, there should not exist render objects for documents in
the page cache.
- history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
- page/FrameView.h:
- page/FrameView.cpp:
(WebCore::FrameView::didRestoreFromPageCache): Update the scollable area set after restoring a
frame from the page cache. This dirties the scrolling tree, which was covered by tests.
- page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::setNeedsStyleRecalc): Make this a no-op if the render tree is being
torn down. This fixes assertions firing on animation tests.
Dec 29, 2016:
- 10:46 AM Changeset in webkit [210205] by
-
- 2 edits in trunk/Source/WebCore
AX: Need to expose frames to iOS Accessibility
https://bugs.webkit.org/show_bug.cgi?id=166571
<rdar://problem/29823724>
Reviewed by Darin Adler.
To support navigation by frame for VoiceOver on iOS, we need to expose the frame ancestor.
- accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityFrameAncestor]):
- 10:28 AM Changeset in webkit [210204] by
-
- 57 edits in trunk/JSTests
WebAssembly: Rebase spec-tests now that wabt has been updated to produce certain kinds of invalid modules
https://bugs.webkit.org/show_bug.cgi?id=166491
<rdar://problem/29814999>
Reviewed by Yusuke Suzuki.
Based off these revisions:
The reason for the rebase is that wabt was updated to stop
silently rejecting invalid modules. This was needed because
some of the spec tests check to make sure that the module
is invalid, but wabt was silently ignoring the errors and
generating valid modules:
https://github.com/WebAssembly/wabt/issues/256
- wasm.yaml:
- wasm/spec-tests/address.wast.js:
- wasm/spec-tests/binary.wast.js:
- wasm/spec-tests/block.wast.js:
- wasm/spec-tests/br.wast.js:
- wasm/spec-tests/br_if.wast.js:
- wasm/spec-tests/br_table.wast.js:
- wasm/spec-tests/break-drop.wast.js:
- wasm/spec-tests/call.wast.js:
- wasm/spec-tests/call_indirect.wast.js:
- wasm/spec-tests/comments.wast.js:
- wasm/spec-tests/conversions.wast.js:
- wasm/spec-tests/custom_section.wast.js:
- wasm/spec-tests/endianness.wast.js:
- wasm/spec-tests/exports.wast.js:
- wasm/spec-tests/f32.wast.js:
- wasm/spec-tests/f32_cmp.wast.js:
- wasm/spec-tests/f64.wast.js:
- wasm/spec-tests/f64_cmp.wast.js:
- wasm/spec-tests/fac.wast.js:
- wasm/spec-tests/float_exprs.wast.js:
- wasm/spec-tests/float_literals.wast.js:
- wasm/spec-tests/float_memory.wast.js:
- wasm/spec-tests/float_misc.wast.js:
- wasm/spec-tests/forward.wast.js:
- wasm/spec-tests/func.wast.js:
- wasm/spec-tests/func_ptrs.wast.js:
- wasm/spec-tests/get_local.wast.js:
- wasm/spec-tests/globals.wast.js:
- wasm/spec-tests/i32.wast.js:
- wasm/spec-tests/i64.wast.js:
- wasm/spec-tests/imports.wast.js:
- wasm/spec-tests/int_exprs.wast.js:
- wasm/spec-tests/int_literals.wast.js:
- wasm/spec-tests/left-to-right.wast.js:
- wasm/spec-tests/linking.wast.js:
- wasm/spec-tests/loop.wast.js:
- wasm/spec-tests/memory.wast.js:
- wasm/spec-tests/memory_redundancy.wast.js:
- wasm/spec-tests/memory_trap.wast.js:
- wasm/spec-tests/names.wast.js:
- wasm/spec-tests/nop.wast.js:
- wasm/spec-tests/resizing.wast.js:
- wasm/spec-tests/return.wast.js:
- wasm/spec-tests/select.wast.js:
- wasm/spec-tests/set_local.wast.js:
- wasm/spec-tests/skip-stack-guard-page.wast.js:
- wasm/spec-tests/stack.wast.js:
- wasm/spec-tests/start.wast.js:
- wasm/spec-tests/store_retval.wast.js:
- wasm/spec-tests/switch.wast.js:
- wasm/spec-tests/tee_local.wast.js:
- wasm/spec-tests/traps.wast.js:
- wasm/spec-tests/typecheck.wast.js:
- wasm/spec-tests/unreachable.wast.js:
- wasm/spec-tests/unwind.wast.js:
Dec 28, 2016:
- 7:10 PM Changeset in webkit [210203] by
-
- 4 edits1 add in trunk
WebAssembly: Don't allow duplicate export names
https://bugs.webkit.org/show_bug.cgi?id=166490
<rdar://problem/29815000>
Reviewed by Keith Miller.
JSTests:
- wasm.yaml:
- wasm/function-tests/invalid-duplicate-export.js: Added.
Source/JavaScriptCore:
- wasm/WasmModuleParser.cpp:
- 4:18 PM Changeset in webkit [210202] by
-
- 2 edits in trunk/Source/JavaScriptCore
Unreviewed. Fix jsc.cpp build error.
- jsc.cpp:
(functionTestWasmModuleFunctions):
- 4:06 PM Changeset in webkit [210201] by
-
- 40 edits5 adds in trunk
WebAssembly: Implement grow_memory and current_memory
https://bugs.webkit.org/show_bug.cgi?id=166448
<rdar://problem/29803676>
Reviewed by Keith Miller.
JSTests:
I rewrote some of the testWasmModuleFunctions that used Memory to use
the JS API since the jsc.cpp version can no longer use memory.
- wasm.yaml:
- wasm/function-tests/add-12.js:
(testWasmModuleFunctions):
- wasm/function-tests/br-if-loop-less-than.js:
(testWasmModuleFunctions):
- wasm/function-tests/brTableAsIf.js:
(testWasmModuleFunctions):
- wasm/function-tests/brTableManyValues.js:
(testWasmModuleFunctions):
- wasm/function-tests/brTableWithLoop.js:
(testWasmModuleFunctions):
- wasm/function-tests/dumb-eq-if-then-else.js:
- wasm/function-tests/eqz.js:
- wasm/function-tests/grow-memory-2.js: Added.
(const.func):
(assert.eq.instance.exports.foo):
- wasm/function-tests/grow-memory-3.js: Added.
- wasm/function-tests/grow-memory-4.js: Added.
(const.func):
- wasm/function-tests/grow-memory.js: Added.
(binaryShouldNotParse):
(assert.truthy):
(assert.eq):
(memory.grow):
- wasm/function-tests/i32-load.js:
(testWasmModuleFunctions):
- wasm/function-tests/i32-load8-s.js:
- wasm/function-tests/max.js:
- wasm/function-tests/min.js:
- wasm/js-api/memory-grow.js: Added.
(i.i):
(assertEq):
- wasm/js-api/test_memory.js:
- wasm/wasm.json:
Source/JavaScriptCore:
This patch implements grow_memory, current_memory, and WebAssembly.prototype.grow.
See relevant spec texts here:
https://github.com/WebAssembly/design/blob/master/Semantics.md#linear-memory-accesses
https://github.com/WebAssembly/design/blob/master/JS.md#webassemblymemoryprototypegrow
I also fix a couple miscellaneous bugs:
- Data section now understands full init_exprs.
- parseVarUint1 no longer has a bug where we allow values larger than 1 if
their bottom 8 bits are zero.
Since the JS API can now grow memory, we need to make calling an import
and call_indirect refresh the base memory register and the size registers.
- jsc.cpp:
(functionTestWasmModuleFunctions):
- runtime/Options.h:
- runtime/VM.h:
- wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::reloadPinnedRegisters):
(JSC::Wasm::B3IRGenerator::emitReloadPinnedRegisters):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):
- wasm/WasmFormat.cpp:
(JSC::Wasm::Segment::create):
- wasm/WasmFormat.h:
(JSC::Wasm::I32InitExpr::I32InitExpr):
(JSC::Wasm::I32InitExpr::globalImport):
(JSC::Wasm::I32InitExpr::constValue):
(JSC::Wasm::I32InitExpr::isConst):
(JSC::Wasm::I32InitExpr::isGlobalImport):
(JSC::Wasm::I32InitExpr::globalImportIndex):
(JSC::Wasm::Segment::byte):
(JSC::Wasm::ModuleInformation::importFunctionCount):
(JSC::Wasm::ModuleInformation::hasMemory):
- wasm/WasmFunctionParser.h:
- wasm/WasmMemory.cpp:
(JSC::Wasm::Memory::Memory):
(JSC::Wasm::Memory::grow):
- wasm/WasmMemory.h:
(JSC::Wasm::Memory::size):
(JSC::Wasm::Memory::sizeInPages):
(JSC::Wasm::Memory::offsetOfMemory):
(JSC::Wasm::Memory::isValid): Deleted.
(JSC::Wasm::Memory::grow): Deleted.
- wasm/WasmModuleParser.cpp:
(JSC::Wasm::makeI32InitExpr):
- wasm/WasmModuleParser.h:
- wasm/WasmPageCount.h:
(JSC::Wasm::PageCount::bytes):
(JSC::Wasm::PageCount::pageCount):
(JSC::Wasm::PageCount::fromBytes):
(JSC::Wasm::PageCount::operator+):
- wasm/WasmParser.h:
(JSC::Wasm::Parser<SuccessType>::parseVarUInt1):
- wasm/WasmValidate.cpp:
- wasm/js/JSWebAssemblyInstance.h:
(JSC::JSWebAssemblyInstance::offsetOfMemory):
- wasm/js/JSWebAssemblyMemory.cpp:
(JSC::JSWebAssemblyMemory::~JSWebAssemblyMemory):
(JSC::JSWebAssemblyMemory::grow):
- wasm/js/JSWebAssemblyMemory.h:
(JSC::JSWebAssemblyMemory::offsetOfMemory):
- wasm/js/JSWebAssemblyModule.h:
(JSC::JSWebAssemblyModule::functionImportCount):
(JSC::JSWebAssemblyModule::jsEntrypointCalleeFromFunctionIndexSpace):
(JSC::JSWebAssemblyModule::wasmEntrypointCalleeFromFunctionIndexSpace):
(JSC::JSWebAssemblyModule::importCount): Deleted.
- wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):
- wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):
- wasm/js/WebAssemblyMemoryConstructor.cpp:
(JSC::constructJSWebAssemblyMemory):
- wasm/js/WebAssemblyMemoryPrototype.cpp:
(JSC::getMemory):
(JSC::webAssemblyMemoryProtoFuncBuffer):
(JSC::webAssemblyMemoryProtoFuncGrow):
- wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
(JSC::dataSegmentFail):
(JSC::WebAssemblyModuleRecord::evaluate):
- wasm/wasm.json:
- 6:36 AM Changeset in webkit [210200] by
-
- 4 edits in trunk/LayoutTests
[Gardening] Remove INDIE_UI related entries from TestExpectation files.
https://bugs.webkit.org/show_bug.cgi?id=165881
Unreviewed.
- platform/efl/TestExpectations:
- platform/gtk/TestExpectations:
- platform/win/TestExpectations:
- 4:16 AM Changeset in webkit [210199] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore
Merge r206637 - Unreviewed, fix 32-bit build.
- loader/cache/CachedImage.cpp:
(WebCore::CachedImage::decodedSizeChanged):
- 4:15 AM Changeset in webkit [210198] by
-
- 11 edits in releases/WebKitGTK/webkit-2.14
Merge r206635 - Change the MemoryCache and CachedResource adjustSize functions to take a long argument
https://bugs.webkit.org/show_bug.cgi?id=162708
<rdar://problem/28555702>
Reviewed by Brent Fulgham.
Source/WebCore:
Because the MemoryCache stores the size of the cached memory in unsigned,
two problems my happen when reporting a change in the size of the memory:
- Signed integer overflow -- which can happen because MemoryCache::adjustSize() takes a signed integer argument. If the allocated or the freed memory size is larger than the maximum of a signed integer, an overflow will happen. For the image caching code, this can be seen where the unsigned decodedSize is casted to an integer before passing it to ImageObserver::decodedSizeChanged().
- Unsigned integer overflow -- which can happen if the new allocated memory size plus the currentSize exceeds the maximum of unsigned. This can be seen in MemoryCache::adjustSize() where we add delta to m_liveSize or m_deadSize without checking whether this addition will overflow or not. We do not assert for overflow although we assert for underflow.
The fix for these two problems can be the following:
- Make all the adjustSize functions all the way till MemoryCache::adjustSize() take a signed long integer argument.
- Do not create a NativeImagePtr for an ImageFrame if its frameBytes plus the ImageFrameCache::decodedSize() will exceed the maximum of an unsigned integer.
- loader/cache/CachedImage.cpp:
(WebCore::CachedImage::decodedSizeChanged): Change the argument to be long. No overflow will happen when casting the argument from unsigned to long.
- loader/cache/CachedImage.h:
- loader/cache/CachedResource.cpp:
(WebCore::CachedResource::setDecodedSize): Use long integer casting when calling MemoryCache::adjustSize().
(WebCore::CachedResource::setEncodedSize): Ditto.
- loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::MemoryCache): Add as static assert to ensure sizeof(long long) can hold any unsigned or its negation.
(WebCore::MemoryCache::revalidationSucceeded): Use long integer casting when calling MemoryCache::adjustSize().
(WebCore::MemoryCache::remove): Ditto.
(WebCore::MemoryCache::adjustSize): Change the function argument to long integer. No overflow will happen when casting the argument from unsigned to long.
- loader/cache/MemoryCache.h:
- platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::destroyIncompleteDecodedData): Call a function with its new name.
(WebCore::ImageFrameCache::decodedSizeChanged): Change the function argument to long integer. No overflow will happen when casting the argument from unsigned to long.
(WebCore::ImageFrameCache::decodedSizeIncreased): Use long integer casting when calling decodedSizeChanged().
(WebCore::ImageFrameCache::decodedSizeDecreased): Ditto.
(WebCore::ImageFrameCache::decodedSizeReset): Ditto.
(WebCore::ImageFrameCache::didDecodeProperties): Ditto.
(WebCore::ImageFrameCache::frameAtIndex): Do not create the NativeImage if adding its frameByes to the MemoryCache will cause numerical overflow.
(WebCore::ImageFrameCache::decodedSizeIncremented): Deleted. This function is renamed decodedSizeIncreased().
(WebCore::ImageFrameCache::decodedSizeDecremented): Deleted. This function is renamed decodedSizeDecreased().
- platform/graphics/ImageFrameCache.h:
- platform/graphics/ImageObserver.h:
- platform/graphics/IntSize.h:
(WebCore::IntSize::unclampedArea): Returns the area of an IntSize in size_t.
- platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::decodedSizeChanged): Use long integer casting when calling ImageObserver::decodedSizeChanged().
LayoutTests:
- TestExpectations: Remove failed tests.
- 3:06 AM Changeset in webkit [210197] by
-
- 3 edits in trunk/Source/WebCore
[css-grid] Move Grid into GridSizingData
https://bugs.webkit.org/show_bug.cgi?id=165654
Reviewed by Darin Adler.
The grid track sizing algorithm has been using the m_grid attribute from RenderGrid to
compute the sizes of the tracks unconditionally. However the goal is to make it work against
a generic instance of the Grid class, so that the intrinsic size computation and the layout
processes could be effectively decoupled.
Instead of passing the Grid as a new argument to all the track sizing algorithm methods we
leverage the existence of GridSizingData which is already passed to all of them. This data
structure holds from now on a reference to the Grid instance so that the track sizing
algorithm could use it.
No new tests as this is a refactoring.
- rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridSizingData::GridSizingData):
(WebCore::RenderGrid::GridSizingData::grid):
(WebCore::RenderGrid::computeTrackBasedLogicalHeight):
(WebCore::RenderGrid::computeTrackSizesForDirection):
(WebCore::RenderGrid::repeatTracksSizingIfNeeded):
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::guttersSize):
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
(WebCore::RenderGrid::computeIntrinsicLogicalHeight):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::computeFlexSizedTracksGrowth):
(WebCore::RenderGrid::computeFlexFactorUnitSize):
(WebCore::RenderGrid::findFlexFactorUnitSize):
(WebCore::RenderGrid::rawGridTrackSize):
(WebCore::RenderGrid::gridTrackSize):
(WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
(WebCore::RenderGrid::trackSizesForComputedStyle):
(WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
(WebCore::RenderGrid::layoutGridItems):
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::assumedRowsSizeForOrthogonalChild):
(WebCore::RenderGrid::gridAreaBreadthForChild):
(WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
(WebCore::RenderGrid::populateGridPositionsForDirection):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::RenderGrid::findChildLogicalPosition):
(WebCore::RenderGrid::numTracks):
(WebCore::RenderGrid::paintChildren):
- rendering/RenderGrid.h:
- 3:04 AM Changeset in webkit [210196] by
-
- 15 edits in releases/WebKitGTK/webkit-2.14/Source
Merge r208168 - Do a better job of protecting Frame objects in the context of JavaScript calls
https://bugs.webkit.org/show_bug.cgi?id=164163
<rdar://problem/28955249>
Reviewed by Darin Adler.
Source/WebCore:
- editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::respondToUnappliedSpellCorrection): Protected the Frame.
- editing/Editor.cpp:
(WebCore::Editor::setTextAsChildOfElement): Ditto.
- editing/EditorCommand.cpp:
(WebCore::executeSwapWithMark): Ditto.
- editing/TypingCommand.cpp:
(WebCore::TypingCommand::deleteKeyPressed): Ditto.
(WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
- editing/mac/EditorMac.mm:
(WebCore::Editor::replaceNodeFromPasteboard): Ditto.
- page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
- page/DOMSelection.cpp:
(WebCore::DOMSelection::collapse): Ditto.
(WebCore::DOMSelection::collapseToEnd): Ditto.
(WebCore::DOMSelection::collapseToStart): Ditto.
(WebCore::DOMSelection::setBaseAndExtent): Ditto.
(WebCore::DOMSelection::setPosition): Ditto.
(WebCore::DOMSelection::modify): Ditto.
(WebCore::DOMSelection::extend): Ditto.
(WebCore::DOMSelection::addRange): Ditto.
(WebCore::DOMSelection::deleteFromDocument): Ditto.
- page/DragController.cpp:
(WebCore::setSelectionToDragCaret): Ditto.
(WebCore::DragController::startDrag): Ditto.
- page/Frame.cpp:
(WebCore::Frame::checkOverflowScroll): Ditto.
- page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithRange): Ditto.
Source/WebKit2:
- WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::renderedImage): Protected the Frame.
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::insertTextAsync): Ditto.
(WebKit::WebPage::setComposition): Ditto.
- WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::insertDictatedTextAsync): Ditto.
- 2:37 AM Changeset in webkit [210195] by
-
- 9 edits2 adds in releases/WebKitGTK/webkit-2.14
Merge r208003 - Prevent hit tests from being performed on an invalid render tree
https://bugs.webkit.org/show_bug.cgi?id=163877
<rdar://problem/28675761>
Reviewed by Simon Fraser.
Source/WebCore:
Changeset r200971 added code to ensure that layout is up-to-date before hit testing, but did
so only for the main frame. It was still possible to enter cross-frame hit testing with a
subframe needing style recalc. In that situation, the subframe's updateLayout() would get
called, which could trigger a compositing change that marked the parent frame as needing style
recalc. A subsequent layout on the parent frame (for example by hit testing traversing into
a second subframe) could then mutate the parent frame's layer tree while hit testing was
traversing it.
This patch modifies the hit test logic to ensure that a recursive layout is performed so that
we always perform hit tests on a clean set of frames. It also adds some assertions to warn
us if we encounter this invalid state.
Tested by fast/layers/prevent-hit-test-during-layout.html.
- dom/Document.cpp:
(WebCore::Document::scheduleStyleRecalc): Assert that we are not hit testing
during style recalculation.
- page/EventHandler.cpp:
(WebCore::EventHandler::hitTestResultAtPoint): Ensure that we have a clean render tree
when hit testing.
- page/FrameView.cpp:
(WebCore::FrameView::setNeedsLayout): Assert that we are not in the process of hit testing
when we schedule a layout.
- rendering/RenderView.cpp:
(WebCore::RenderView::hitTest): Mark RenderView as in an active hit test.
- rendering/RenderView.h:
LayoutTests:
- fast/layers/prevent-hit-test-during-layout-expected.txt: Added.
- fast/layers/prevent-hit-test-during-layout.html: Added.
- platform/efl/TestExpectations: Skip on this platform.
- platform/gtk/TestExpectations: Skip on this platform.
- platform/ios-simulator/TestExpectations: Skip on this platform.
- platform/win/TestExpectations: Skip on this platform.
- 2:30 AM Changeset in webkit [210194] by
-
- 3 edits2 adds in releases/WebKitGTK/webkit-2.14
Merge r207930 - Ignore out-of-flow siblings when searching for a spanner candidate.
https://bugs.webkit.org/show_bug.cgi?id=164042.
<rdar://problem/28758456>
Reviewed by Simon Fraser.
Source/WebCore:
While searching for the spanner candidates in a flow thread, we have to take into account
whether renderers are in- or out-of-flow.
What it means is that while traversing the renderer tree to find the the candidate
renderer (next sibling/ancestor's next child in pre-order traversal), we have to check if the candidate
is in the same layout context too.
Test: fast/multicol/crash-when-spanner-candidate-is-out-of-flow.html
- rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::spannerPlacehoderCandidate):
(WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
LayoutTests:
- fast/multicol/crash-when-spanner-candidate-is-out-of-flow-expected.txt: Added.
- fast/multicol/crash-when-spanner-candidate-is-out-of-flow.html: Added.
- 2:28 AM Changeset in webkit [210193] by
-
- 20 edits in releases/WebKitGTK/webkit-2.14/Source
Merge r207708 - Bug 163762: IntSize::area() should used checked arithmetic
<https://webkit.org/b/163762>
Reviewed by Darin Adler.
Source/WebCore:
No new tests since no change in nominal behavior.
- platform/graphics/IntSize.h:
(WebCore::IntSize::area): Change to return a
Checked<unsigned, T> value. Use WTF:: namespace to avoid
including another header.
- platform/graphics/IntRect.h:
(WebCore::IntRect::area): Ditto.
The remaining changes are to use the Checked<unsigned> return
value of IntSize::area() and IntRect::area() correctly in
context, in addition to items noted below.
- html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::isTopLevelFullPagePlugin):
Declare contentWidth and contentHeight as float values to
prevent overflow when computing the area, and to make the
inequality comparison in the return statement uses the same type
for both sides.
- html/ImageData.cpp:
(WebCore::ImageData::ImageData):
- html/MediaElementSession.cpp:
(WebCore::isElementRectMostlyInMainFrame):
- platform/graphics/ImageBackingStore.h:
(WebCore::ImageBackingStore::setSize): Restructure logic to
compute area only once.
(WebCore::ImageBackingStore::clear):
- platform/graphics/ImageFrame.h:
(WebCore::ImageFrame::frameBytes):
- platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::maximumSubsamplingLevel):
- platform/graphics/ca/LayerPool.cpp:
(WebCore::LayerPool::backingStoreBytesForSize):
- platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoder::frameBytesAtIndex):
- platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplySoftware):
- platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::asUnmultipliedImage):
(WebCore::FilterEffect::asPremultipliedImage):
(WebCore::FilterEffect::copyUnmultipliedImage):
(WebCore::FilterEffect::copyPremultipliedImage):
(WebCore::FilterEffect::createUnmultipliedImageResult):
(WebCore::FilterEffect::createPremultipliedImageResult):
- platform/graphics/win/ImageBufferDataDirect2D.cpp:
(WebCore::ImageBufferData::getData): Update overflow check,
rename local variable to numBytes, and compute numBytes once.
- platform/graphics/win/ImageDecoderDirect2D.cpp:
(WebCore::ImageDecoder::frameBytesAtIndex):
- platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::frameBytesAtIndex):
- platform/ios/LegacyTileLayerPool.mm:
(WebCore::LegacyTileLayerPool::bytesBackingLayerWithPixelSize):
- rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
- rendering/shapes/Shape.cpp:
(WebCore::Shape::createRasterShape):
Source/WebKit2:
- Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::create): Add overflow check and return
nullptr on overflow.
(WebKit::ShareableBitmap::createShareable): Ditto.
(WebKit::ShareableBitmap::create): Change debug assert for
adequate buffer size check into release check.
- Shared/ShareableBitmap.h:
(WebKit::ShareableBitmap::numBytesForSize): Change to return a
Checked<unsigned, RecordOverflow> value.
(WebKit::ShareableBitmap::sizeInBytes):
- Shared/cairo/ShareableBitmapCairo.cpp:
(WebKit::ShareableBitmap::numBytesForSize): Ditto.
- UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _takeViewSnapshot]): Call unsafeGet().
Tools:
- TestWebKitAPI/Tests/WebCore/IntRect.cpp:
(TestWebKitAPI::TEST): Call unsafeGet().
- TestWebKitAPI/Tests/WebCore/IntSize.cpp:
(TestWebKitAPI::TEST): Ditto.
- 1:59 AM Changeset in webkit [210192] by
-
- 2 edits in trunk/LayoutTests
[EFL] Gardening on 28th Dec.
Unreviewed EFL gardening.
- platform/efl/TestExpectations: Mark failing tests to Failure or ImageOnlyFailure.
- 1:47 AM Changeset in webkit [210191] by
-
- 6 edits2 adds in releases/WebKitGTK/webkit-2.14
Merge r207692 - SVG should not paint selection within a mask
https://bugs.webkit.org/show_bug.cgi?id=163772
<rdar://problem/28705129>
Reviewed by Simon Fraser.
Source/WebCore:
When masking content, we shouldn't paint the text
selection as we are rendering into the masking
offscreen buffer.
Test: svg/masking/mask-should-not-paint-selection.html
- rendering/PaintPhase.h: Add a new behavior - PaintBehaviorSkipSelectionHighlight.
- rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paint): Don't update the selectionStyle if
PaintBehaviorSkipSelectionHighlight is true.
- rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::renderSubtreeToImageBuffer): Add PaintBehaviorSkipSelectionHighlight
to the PaintInfo.
LayoutTests:
- svg/masking/mask-should-not-paint-selection-expected.html: Added.
- svg/masking/mask-should-not-paint-selection.html: Added.
- 1:40 AM Changeset in webkit [210190] by
-
- 14 edits2 adds in releases/WebKitGTK/webkit-2.14
Merge r207229 - Web Inspector: Improve support for logging Proxy objects in console
https://bugs.webkit.org/show_bug.cgi?id=163323
<rdar://problem/28432553>
Reviewed by Timothy Hatcher.
Source/JavaScriptCore:
This is based off of similiar patches in Blink for Proxy handling.
- bindings/ScriptValue.cpp:
(Deprecated::ScriptValue::isEqual):
Use strict equality. This is the intent, and it prevents the possibility of triggering
primitive conversion on objects in previous ConsoleMessage argument lists.
- inspector/InjectedScriptSource.js:
(InjectedScript.prototype._propertyDescriptors):
Bail if the object is a Proxy.
(InjectedScript.prototype._describe):
Provide a friendlier name, "Proxy" instead of "ProxyObject".
(InjectedScript.RemoteObject):
When generating a preview for a Proxy object, generate it from the final target
and mark it as lossy so that the object can always be expanded to get the internal
target/handler properties.
- inspector/JSInjectedScriptHost.h:
- inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::subtype):
New subtype for Proxy objects.
(Inspector::JSInjectedScriptHost::proxyTargetValue):
Resolve the final target value for a Proxy.
- inspector/JSInjectedScriptHostPrototype.cpp:
(Inspector::JSInjectedScriptHostPrototype::finishCreation):
(Inspector::jsInjectedScriptHostPrototypeFunctionProxyTargetValue):
Add the new method.
- inspector/ScriptArguments.cpp:
(Inspector::ScriptArguments::getFirstArgumentAsString):
Avoid triggering Proxy traps on a Proxy object when getting a quick
string description for ConsoleMessages.
- inspector/protocol/Runtime.json:
Add new "proxy" subtype.
Source/WebInspectorUI:
- UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._formatParameter):
Treat a Proxy like any other object.
LayoutTests:
- inspector/console/console-log-proxy-expected.txt: Added.
- inspector/console/console-log-proxy.html: Added.
Add a test specific to console logs of Proxy objects to ensure the get
trap is not used in different cases.
- inspector/model/remote-object-expected.txt:
- inspector/model/remote-object.html:
- platform/mac/inspector/model/remote-object-expected.txt:
Update results for Proxy objects and include a test for a multi-level
Proxy object, which should preview the target.
- 1:35 AM Changeset in webkit [210189] by
-
- 59 edits7 adds in releases/WebKitGTK/webkit-2.14
Merge r206809 - Do not follow redirects when sending violation report
https://bugs.webkit.org/show_bug.cgi?id=162520
<rdar://problem/27957639>
Reviewed by Alex Christensen.
Source/WebCore:
Do not follow redirects when sending a Content Security Policy or XSS Auditor violation report
as redirects can be used to forward report details to a third-party.
This changes makes WebKit more closely conform to the reporting requirements in section Reporting
of the Content Security Level 2 standard: <https://w3c.github.io/webappsec-csp/2/#violation-reports>
(Editor's Draft, 25 April 2016).
Tests: http/tests/security/contentSecurityPolicy/report-blocked-uri-and-do-not-follow-redirect-when-sending-report.php
http/tests/security/xssAuditor/report-script-tag-and-do-not-follow-redirect-when-sending-report.html
http/tests/security/xssAuditor/report-script-tag-full-block-and-do-not-follow-redirect-when-sending-report.html
- loader/LoaderStrategy.h: Modified createPingHandle() to take a boolean, shouldFollowRedirects,
whether to follow redirect responses for a ping request.
- loader/PingLoader.cpp:
(WebCore::PingLoader::loadImage): Pass ShouldFollowRedirects::Yes to PingLoader::startPingLoad to
keep our current behavior.
(WebCore::PingLoader::sendPing): Ditto. Note our current behavior of following redirects matches
the behavior described in the section "Hyperlink auditing" of the HTML standard:
<https://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing> (23 September 2016).
(WebCore::PingLoader::sendViolationReport): Pass ShouldFollowRedirects::No to PingLoader::startPingLoad
so that we do not follow redirects when sending a violation report.
(WebCore::PingLoader::startPingLoad): Modified to take argument shouldFollowRedirects whether to
follow redirect responses for a ping request.
- loader/PingLoader.h:
- platform/network/PingHandle.h: Add boolean m_shouldFollowRedirects. I grouped this boolean with
the existing boolean, m_shouldUseCredentialStorage, as opposed to appending to the end of the class
definition to avoid increasing object size as clang will coalesces the two bools into a single
machine word. Override ResourceHandleClient::willSendRequest() and ResourceHandleClient::willSendRequestAsync()
to follow a redirect, if applicable.
Source/WebKit:
Update implementation of legacy WebKit loader strategy to pass through a boolean,
shouldFollowRedirects, to PingHandle as to whether to follow redirect responses
for a ping request.
- WebCoreSupport/WebResourceLoadScheduler.cpp:
(WebResourceLoadScheduler::createPingHandle):
- WebCoreSupport/WebResourceLoadScheduler.h:
Source/WebKit2:
Update the non-Network Session WebKit2 implementation to follow redirect responses for a ping
request, if applicable. I did not update the Network Session implementation at this time. I
will fix it in <https://bugs.webkit.org/show_bug.cgi?id=162580>.
- NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::loadPing): Tell PingHandle whether to follow redirects.
- NetworkProcess/NetworkLoadParameters.h:
- NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode): Encode NetworkResourceLoadParameters::shouldFollowRedirects.
(WebKit::NetworkResourceLoadParameters::decode): Decode NetworkResourceLoadParameters::shouldFollowRedirects.
- NetworkProcess/PingLoad.h: Added FIXME comment to implement support for following redirects,
if applicable (for hyperlink auditing). See <https://bugs.webkit.org/show_bug.cgi?id=162580>
for more details.
- WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::createPingHandle): Modified to take a boolean whether to follow
redirects responses and set NetworkResourceLoadParameters::shouldFollowRedirects as appropriate.
- WebProcess/Network/WebLoaderStrategy.h:
LayoutTests:
Add tests for Content Security Policy and XSS Auditor to ensure that we do not follow redirects
when sending a violation report. Modified http/tests/security/contentSecurityPolicy/resources/save-report.php
to save the URL of the original ping request and conditionally clear cookies. Modified
http/tests/security/xssAuditor/resources/echo-intertag.pl to support testing for the XSS Auditor.
These changes together with the existing HTTP Host information that is saved with the report we can detect
if a redirect occurred when saving a report.
Updated expected results of existing tests now that we emit the URL of the ping request in the saved report.
- http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-https-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-https-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/script-blocked-sends-multiple-reports-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy2-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-allowed-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-allowed-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
- http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt:
- http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt:
- http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt:
- http/tests/security/contentSecurityPolicy/report-blocked-uri-and-do-not-follow-redirect-when-sending-report-expected.txt: Added.
- http/tests/security/contentSecurityPolicy/report-blocked-uri-and-do-not-follow-redirect-when-sending-report.php: Added.
- http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt:
- http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt:
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt:
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled-expected.txt:
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled-expected.txt:
- http/tests/security/contentSecurityPolicy/report-only-expected.txt:
- http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt:
- http/tests/security/contentSecurityPolicy/report-only-upgrade-insecure-expected.txt:
- http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled-expected.txt:
- http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt:
- http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled-expected.txt:
- http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-scheme-relative-expected.txt:
- http/tests/security/contentSecurityPolicy/resources/save-report-and-redirect-to-save-report.php: Added.
- http/tests/security/contentSecurityPolicy/resources/save-report.php:
- http/tests/security/xssAuditor/report-script-tag-and-do-not-follow-redirect-when-sending-report-expected.txt: Added.
- http/tests/security/xssAuditor/report-script-tag-and-do-not-follow-redirect-when-sending-report.html: Added.
- http/tests/security/xssAuditor/report-script-tag-expected.txt:
- http/tests/security/xssAuditor/report-script-tag-full-block-and-do-not-follow-redirect-when-sending-report-expected.txt: Added.
- http/tests/security/xssAuditor/report-script-tag-full-block-and-do-not-follow-redirect-when-sending-report.html: Added.
- http/tests/security/xssAuditor/report-script-tag-full-block-expected.txt:
- http/tests/security/xssAuditor/report-script-tag-replace-state-expected.txt:
- http/tests/security/xssAuditor/resources/echo-intertag.pl:
- 1:35 AM Changeset in webkit [210188] by
-
- 49 edits in releases/WebKitGTK/webkit-2.14
Merge r206278 - [CSP] Violation report may be sent to wrong domain on frame-ancestors violation
https://bugs.webkit.org/show_bug.cgi?id=162079
<rdar://problem/28321575>
Reviewed by Andy Estes.
Source/WebCore:
Fixes an issue where a CSP violation report may be sent to the wrong domain when the
frame-ancestors directive is violated. In particular, when the frame-ancestors directive
is violated for a page that specifies a report URI that is a relative URL then the
report URI would be resolved with respect to the parent frame's document URL and hence
be sent to the domain of the parent frame's document.
- page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation): Adjust the report URL with respect
to the blocked URL when we do not have a script execution context.
LayoutTests:
Modified http/tests/security/contentSecurityPolicy/resources/save-report.php to print the HTTP Host header as a means
to validate that the CSP violation report was sent to the appropriate host. Update test expectations.
Note that the presence of "localhost" in the HTTP Host header in the test results for tests
security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin.html and
security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-https.html
verify that we resolve a relative URL CSP report URI with respect to the blocked URL.
- http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-https-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin-https.html:
- http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-cross-origin.html:
- http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-https-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin-https.html:
- http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/report-frame-ancestors-same-origin.html:
- http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/script-blocked-sends-multiple-reports-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-enforced-policy-and-blocked-by-report-policy2-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-allowed-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-allowed-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scripthash-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-enforced-policy-and-allowed-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-allowed-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/scriptnonce-blocked-by-legacy-enforced-policy-and-blocked-by-report-policy2-expected.txt:
- http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt:
- http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt:
- http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt:
- http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt:
- http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt:
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt:
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled-expected.txt:
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled-expected.txt:
- http/tests/security/contentSecurityPolicy/report-only-expected.txt:
- http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt:
- http/tests/security/contentSecurityPolicy/report-only-upgrade-insecure-expected.txt:
- http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled-expected.txt:
- http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt:
- http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled-expected.txt:
- http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-scheme-relative-expected.txt:
- http/tests/security/contentSecurityPolicy/resources/save-report.php:
- http/tests/security/xssAuditor/report-script-tag-expected.txt:
- http/tests/security/xssAuditor/report-script-tag-full-block-expected.txt:
- http/tests/security/xssAuditor/report-script-tag-replace-state-expected.txt:
- 1:24 AM Changeset in webkit [210187] by
-
- 5 edits in releases/WebKitGTK/webkit-2.14/Source
Merge r206132 - Suppress JavaScript prompts early on in certain cases
https://bugs.webkit.org/show_bug.cgi?id=162243
rdar://problem/27661602
Reviewed by Geoffrey Garen.
Source/WebCore:
Export symbols needed by WebKit2.
- loader/FrameLoader.h:
- loader/FrameLoaderStateMachine.h:
Source/WebKit2:
- WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::shouldSuppressJavaScriptDialogs):
Add helper function.
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
Call helper function and return early if we should supress dialogs.
- 1:14 AM Changeset in webkit [210186] by
-
- 3 edits1 add in releases/WebKitGTK/webkit-2.14
Merge r206472 - B3::lowerMacros forgets to before->updatePredecessorsAfter() when lowering ChillMod on ARM64
https://bugs.webkit.org/show_bug.cgi?id=162644
Reviewed by Keith Miller.
JSTests:
- stress/chill-mod-chill-mod.js: Added.
(foo):
Source/JavaScriptCore:
If you forget to update the predecessors of your successors, then bad things will happen if you
do something that requires accurate predecessors for correctness. lowerMacros() uses
BlockInsertionSet, which relies on accurate predecessors.
- b3/B3LowerMacros.cpp:
- 1:11 AM Changeset in webkit [210185] by
-
- 14 edits in releases/WebKitGTK/webkit-2.14
Merge r205190 - [Fetch API] Blob not found URL should result in a network error
https://bugs.webkit.org/show_bug.cgi?id=161381
Patch by Youenn Fablet <youenn@apple.com> on 2016-08-30
Reviewed by Sam Weinig.
LayoutTests/imported/w3c:
- web-platform-tests/fetch/api/basic/scheme-blob-expected.txt:
- web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt:
- web-platform-tests/fetch/api/basic/scheme-blob-worker.html:
- web-platform-tests/fetch/api/basic/scheme-blob.html:
- web-platform-tests/fetch/api/basic/scheme-blob.js:
(invalidRequestMethods.forEach):
Source/WebCore:
Covered by rebased and updated tests.
Raising a network error if no blob can be found from the URL.
It is no longer notified by a 404 response.
Updated FileReaderLoader to generate the correct exception.
Made some clean-up in the code, in particular adding an enum class for BlobResourceHandle errors.
- fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::didFail):
(WebCore::FileReaderLoader::toErrorCode):
(WebCore::FileReaderLoader::httpStatusCodeToErrorCode):
- fileapi/FileReaderLoader.h:
- platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::loadResourceSynchronously):
(WebCore::BlobResourceHandle::doStart):
(WebCore::BlobResourceHandle::didGetSize):
(WebCore::BlobResourceHandle::readSync):
(WebCore::BlobResourceHandle::readFileSync):
(WebCore::BlobResourceHandle::readAsync):
(WebCore::BlobResourceHandle::didOpen):
(WebCore::BlobResourceHandle::didRead):
(WebCore::BlobResourceHandle::failed):
(WebCore::BlobResourceHandle::notifyResponse):
(WebCore::BlobResourceHandle::notifyResponseOnError):
(WebCore::BlobResourceHandle::notifyFail):
- platform/network/BlobResourceHandle.h:
LayoutTests:
- fast/files/apply-blob-url-to-xhr-expected.txt:
- fast/files/workers/worker-apply-blob-url-to-xhr-expected.txt:
- 1:06 AM Changeset in webkit [210184] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14
Revert "Merge r204266 - Popups opened from a sandboxed iframe should themselves be sandboxed"
This reverts commit r210183. r204266 is before 2.14 branch point so this
was an empty commit.
- 12:59 AM Changeset in webkit [210183] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14
Merge r204266 - Popups opened from a sandboxed iframe should themselves be sandboxed
https://bugs.webkit.org/show_bug.cgi?id=134850
<rdar://problem/27375388>
Reviewed by Brent Fulgham.
Source/WebCore:
Test: http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html
- loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
Now copies the opener's frame loader effective sandbox flags to the
new frame loader.
LayoutTests:
- http/tests/security/resources/anchor-tag-with-blank-target.html: Added.
- http/tests/security/resources/page-executing-javascript.html: Added.
- http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox-expected.txt: Added.
- http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html: Added.
- 12:51 AM Changeset in webkit [210182] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/JavaScriptCore
Merge r205882 - DFG NewArrayBuffer node should watch for "have a bad time" state change.
https://bugs.webkit.org/show_bug.cgi?id=161927
<rdar://problem/27995222>
Reviewed by Geoffrey Garen.
- dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
- 12:49 AM WebKitGTK/2.14.x edited by
- (diff)
Dec 27, 2016:
- 6:48 PM Changeset in webkit [210181] by
-
- 19 edits in trunk/Source/WebKit2
reduce PassRefPtr use in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=166452
Patch by Alex Christensen <achristensen@webkit.org> on 2016-12-27
Reviewed by Yusuke Suzuki.
- Shared/API/c/cg/WKImageCG.cpp:
(WKImageCreateCGImage):
(WKImageCreateFromCGImage):
- Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::createHandle):
- Shared/ShareableBitmap.h:
- Shared/UserData.cpp:
(WebKit::UserData::encode):
(WebKit::UserData::decode):
- Shared/WebImage.cpp:
(WebKit::WebImage::create):
(WebKit::WebImage::WebImage):
- Shared/WebImage.h:
(WebKit::WebImage::bitmap):
- UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didGetImageForFindMatch):
- UIProcess/mac/WKTextFinderClient.mm:
(-[WKTextFinderClient didGetImageForMatchResult:]):
- WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::takeScreenshot):
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
(-[WKWebProcessPlugInNodeHandle renderedImageWithOptions:]):
- WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::imageForRect):
(WebKit::InjectedBundleNodeHandle::renderedImage):
(WebKit::InjectedBundleNodeHandle::visibleRange):
(WebKit::InjectedBundleNodeHandle::htmlTableCellElementCellAbove):
(WebKit::InjectedBundleNodeHandle::documentFrame):
(WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
(WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
- WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
- WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::renderedImage):
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::takeSnapshot):
(WebKit::WebPage::snapshotAtSize):
(WebKit::WebPage::snapshotNode):
(WebKit::WebPage::drawRectToImage):
- WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
- WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setTopOverhangImage):
(WebKit::WebPage::setBottomOverhangImage):
- 9:57 AM Changeset in webkit [210180] by
-
- 2 edits in trunk/Source/WebKit2
Ensure NetworkProcess is ready before whitelisting TLS certificates
https://bugs.webkit.org/show_bug.cgi?id=162962
Patch by Emanuele Aina <Emanuele Aina> on 2016-12-27
Reviewed by Alex Christensen.
If the API user tries to whitelist TLS certificates before any web
view has been created, the action will be ignored because the
NetworkProcess hasn't been fired up yet.
For example, the snippet below using the GTK+ API does not work,
unless the whitelisting is moved after the web view creation:
webkit_web_context_allow_tls_certificate_for_host(webkit_web_context_get_default(), crt, host);
webView = webkit_web_view_new();
- UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost): Ensure
that the NetworkProcess has been already fired up when adding
certificates, so they can be whitelisted before the first web view is
instantiated.
- 9:57 AM WebKitGTK/2.14.x edited by
- Propose r210180 (diff)
- 9:12 AM Changeset in webkit [210179] by
-
- 4 edits in releases/WebKitGTK/webkit-2.14
Merge r210168 - [GTK] Improve user agent construction
https://bugs.webkit.org/show_bug.cgi?id=142074
Reviewed by Carlos Garcia Campos.
Source/WebCore:
Use the macOS rather than the Chrome quirk for Google domains, to avoid problems with
Google Calendar and Google Maps.
- platform/UserAgentQuirks.cpp:
(WebCore::urlRequiresChromeBrowser):
(WebCore::urlRequiresMacintoshPlatform):
Tools:
- TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::TEST):
- 9:11 AM WebKitGTK/2.14.x edited by
- (diff)
- 9:03 AM Changeset in webkit [210178] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2
Merge r209534 - [GTK] Process accelerated compositing env variables only if they are really enabled
https://bugs.webkit.org/show_bug.cgi?id=165300
Don't process the WEBKIT_FORCE_COMPOSITING_MODE and
WEBKIT_DISABLE_COMPOSITING_MODE env variables if they are disabled
(eg. WEBKIT_DISABLE_COMPOSITING_MODE=0).
Reviewed by Michael Catanzaro.
- UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore):
- 9:02 AM Changeset in webkit [210177] by
-
- 7 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore
Merge r209064 - [GTK] Crash in WebCore::PlatformDisplayX11::supportsXComposite when running under Wayland
https://bugs.webkit.org/show_bug.cgi?id=164917
Reviewed by Michael Catanzaro.
WebKitGTK+ appplications are expected to call gtk_init(), because WebKitGTK+, like GTK+ itself, requires a
display to work. We currently fallback to create a X11 display when X11 is enabled in cases where GTK+ doesn't
have a default display (gtk_init() wasn't called or failed). That's why we end up creating an X11 display under
Wayland when both Wayland and X11 option are enabled. The code assumes X11 display creation will always work if
X11 is enabled, but that's not true now that we support also Wayland at runtime. So, we should try to get a
native display before creating the PlatformDisplay. Rendering will not work in any case when gtk_init() is not
called, but in most of the cases those applications are not actually going to render anything, so this way at
least we will not crash.
- platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::createPlatformDisplay): Use create() method for X11 and Wayland if we couldn't get a
native display from GTK+. If everything fails create a display with no native.
(WebCore::PlatformDisplay::PlatformDisplay): Add NativeDisplayOwned parameter.
- platform/graphics/PlatformDisplay.h:
- platform/graphics/wayland/PlatformDisplayWayland.cpp:
(WebCore::PlatformDisplayWayland::create): Try to create a native Wayland display or return nullptr.
(WebCore::PlatformDisplayWayland::PlatformDisplayWayland): Initialize NativeDisplayOwned parameter.
(WebCore::PlatformDisplayWayland::~PlatformDisplayWayland): Destroy the display if owned.
(WebCore::PlatformDisplayWayland::initialize): Return early if native display is nullptr.
- platform/graphics/wayland/PlatformDisplayWayland.h:
- platform/graphics/x11/PlatformDisplayX11.cpp:
(WebCore::PlatformDisplayX11::create): Try to create a native X11 display or return nullptr.
(WebCore::PlatformDisplayX11::PlatformDisplayX11): Use NativeDisplayOwned now.
(WebCore::PlatformDisplayX11::~PlatformDisplayX11): Ditto.
- platform/graphics/x11/PlatformDisplayX11.h:
- 9:02 AM Changeset in webkit [210176] by
-
- 5 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore
Merge r205852 - [GTK] Crash of WebProcess on the last WebView disconnect (take two)
https://bugs.webkit.org/show_bug.cgi?id=161842
Reviewed by Michael Catanzaro.
The problem is that when PlatformDisplayX11 is destroyed, the sharing GL context is deleted and its destructor
makes a downcast of PlatformDisplay to get the native X11 display. We could simply keep a pointer to the native
X11 display in GLContextGLX, got at construction time from the PlatformDisplay, and ensure the sharing GL
context is deleted before the native X11 display is closed.
- platform/graphics/PlatformDisplay.h: Make m_sharingGLContext protected.
- platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::GLContextGLX): Initialize m_x11Display.
(WebCore::GLContextGLX::~GLContextGLX): Use m_x11Display and remove confusing comment about possible crash with
nviedia closed drivers.
(WebCore::GLContextGLX::defaultFrameBufferSize): Use m_x11Display.
(WebCore::GLContextGLX::makeContextCurrent): Ditto.
(WebCore::GLContextGLX::swapBuffers): Ditto.
(WebCore::GLContextGLX::swapInterval): Ditto.
(WebCore::GLContextGLX::cairoDevice): Ditto.
- platform/graphics/glx/GLContextGLX.h:
- platform/graphics/x11/PlatformDisplayX11.cpp:
(WebCore::PlatformDisplayX11::~PlatformDisplayX11): Delete the sharing GL context before closing the display.
- 9:00 AM WebKitGTK/2.14.x edited by
- (diff)
- 8:44 AM Changeset in webkit [210175] by
-
- 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2
Merge r209177 - [GTK] UI process crash in WebKit::WaylandCompositor::Surface::prepareTextureForPainting
https://bugs.webkit.org/show_bug.cgi?id=164911
Reviewed by Michael Catanzaro.
The problem is that m_buffer is nullptr in Surface::prepareTextureForPainting() even though we have already an
image. We only use the buffer to get the image size, so we could save the image size when the image is created,
and then we don't need to care about the buffer anymore.
- UIProcess/gtk/WaylandCompositor.cpp:
(WebKit::WaylandCompositor::Surface::prepareTextureForPainting):
(WebKit::WaylandCompositor::Surface::commit):
- UIProcess/gtk/WaylandCompositor.h:
- 8:43 AM Changeset in webkit [210174] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2
Merge r209063 - [GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode
https://bugs.webkit.org/show_bug.cgi?id=164303
Reviewed by Michael Catanzaro.
Trap also BadDrawable and BadDamage X errors when creating the surface and damage.
- UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
(WebKit::AcceleratedBackingStoreX11::update):
- 8:43 AM Changeset in webkit [210173] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2
Merge r208285 - [GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode
https://bugs.webkit.org/show_bug.cgi?id=164303
Reviewed by Michael Catanzaro.
This can happen if the web process exits before the UI process has cleaned up the accelerated surface. Trap
BadDrawable and BadDamage X errors and ignore them, while still crashing for any other X error.
- UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
(WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11):
(WebKit::AcceleratedBackingStoreX11::update):
- 8:41 AM Changeset in webkit [210172] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore
Merge r210056 - [Cairo] Conditional jump or move depends on uninitialised value(s)
https://bugs.webkit.org/show_bug.cgi?id=166058
Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-12-20
Reviewed by Michael Catanzaro.
Initialize x and y members of cairo_glyph_t struct before passing it to cairo_glyph_path.
- platform/graphics/cairo/FontCairo.cpp:
(WebCore::CairoGlyphToPathTranslator::path):
- 8:39 AM Changeset in webkit [210171] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2
Merge r209122 - [GTK] Database process should not initialize gtk
https://bugs.webkit.org/show_bug.cgi?id=165138
Reviewed by Sergio Villar Senin.
It doesn't use GTK+ at all.
- DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp:
(WebKit::DatabaseProcessMainUnix):
(): Deleted.
- 8:38 AM WebKitGTK/2.14.x edited by
- (diff)
- 8:38 AM Changeset in webkit [210170] by
-
- 4 edits3 adds in releases/WebKitGTK/webkit-2.14
Merge r208675 - [HarfBuzz] HarfBuzzShaper should not assume numGlyphs is greater than 0
https://bugs.webkit.org/show_bug.cgi?id=164500
Patch by Fujii Hironori <Fujii Hironori> on 2016-11-13
Reviewed by Myles C. Maxfield.
Source/WebCore:
Test: fast/text/international/harfbuzz-runs-with-no-glyph.html
HarfBuzzShaper assumes numGlyphs of HarfBuzzRun is greater than
zero. But this is not necessarily true. If a font does not have a
glyph of SPACE (U+0020), HarfBuzz removes ignorable glyphs. In
this case, HarfBuzzRun can have no glyphs.
- platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult): Resize
m_offsets to one if m_numGlyphs is zero.
- platform/graphics/harfbuzz/HarfBuzzShaper.h:
(WebCore::HarfBuzzShaper::HarfBuzzRun::glyphs): Use Vector::data()
instread of operator[0].
(WebCore::HarfBuzzShaper::HarfBuzzRun::advances): Ditto.
(WebCore::HarfBuzzShaper::HarfBuzzRun::offsets): Ditto.
(WebCore::HarfBuzzShaper::HarfBuzzRun::glyphToCharacterIndexes): Ditto.
LayoutTests:
- fast/text/international/harfbuzz-runs-with-no-glyph-expected.txt: Added.
- fast/text/international/harfbuzz-runs-with-no-glyph.html: Added.
- fast/text/international/resources/ignorables.woff: Added.
- 8:36 AM Changeset in webkit [210169] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2
Merge r208495 - Experimental features should not be enabled by default
https://bugs.webkit.org/show_bug.cgi?id=164367
Reviewed by Darin Adler.
We have two classes of experimental features:
(1) Features that are unstable and should be off by default, except for the developers
currently working on them. This is straightforward to handle; the default value should
be false.
(2) Features that are still not ready for end users, but are stable enough for testing. We
want these features to be enabled in testing environments like the bots, MiniBrowser,
Safari Tech Preview, and so forth, but not in stable release builds.
Implement this. It is better than having all experimental features on unconditionally, and
expecting them to be disabled manually on release branches, which is not something we are
keen to do. An exception is Cocoa ports, which to my knowledge do not currently have any
concept of development builds. These ports seem happy to continue disabling features
manually in release branches, and should continue to do so at least for now.
We also have features that we wish to enumerate at runtime, yet have enabled by default
unconditionally. We do not currently have any infrastructure to support this and should not
abuse the experimental status for this purpose; it requires future work. All settings can
still be toggled at runtime by clients that know about them using the existing runtime
features API.
Lastly, the custom elements feature is ready to be enabled by default, so it's no longer
experimental and can graduate to the list of normal boolean features.
- Shared/WebPreferencesDefinitions.h:
- 7:26 AM Changeset in webkit [210168] by
-
- 4 edits in trunk
[GTK] Improve user agent construction
https://bugs.webkit.org/show_bug.cgi?id=142074
Reviewed by Carlos Garcia Campos.
Source/WebCore:
Use the macOS rather than the Chrome quirk for Google domains, to avoid problems with
Google Calendar and Google Maps.
- platform/UserAgentQuirks.cpp:
(WebCore::urlRequiresChromeBrowser):
(WebCore::urlRequiresMacintoshPlatform):
Tools:
- TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::TEST):
- 7:26 AM WebKitGTK/2.14.x edited by
- Propose r210168 (diff)
- 4:13 AM WebKitGTK/2.14.x edited by
- (diff)
- 4:11 AM Changeset in webkit [210167] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore
Merge r209982 - [GTK] GLXBadFBConfig error when creating an OpenGL context
https://bugs.webkit.org/show_bug.cgi?id=165200
Reviewed by Carlos Garcia Campos.
glXCreateContextAttribsARB causes a GLXBadFBConfig X error when it's not able to provide the
OpenGL version >= 3.2 we are requesting. Due to this, the app crashes instead of falling back to
the legacy path.
The patch modifies GLX context creation using a XErrorTrapper, so the first time a context is created
we don't crash if OpenGL >= 3.2 is not available.
If the gotten context is not valid, we fall back to whatever version glXCreateContextAttribsARB is
able to provide.
The legacy glXCreateContext is only used if the GLX_ARB_create_context extension is not available.
Covered by existent tests.
- platform/graphics/glx/GLContextGLX.cpp:
(WebCore::tryCreateGLXARBContext):
(WebCore::GLContextGLX::createWindowContext):
(WebCore::GLContextGLX::createPbufferContext):
- 4:11 AM Changeset in webkit [210166] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore
Merge r209234 - [GTK] Use an OpenGL < 3.0 compliant way to request the OpenGL version
https://bugs.webkit.org/show_bug.cgi?id=165253
Reviewed by Carlos Garcia Campos.
Use glGetString(GL_VERSION) to get the OpenGL version, as glGetIntegerv with GL_MAJOR_VERSION
and GL_MINOR_VERSION is only supported from 3.0 on.
Covered by existent tests.
- platform/graphics/GLContext.cpp:
(WebCore::GLContext::version):
- 3:52 AM Changeset in webkit [210165] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore
Merge r210133 - [GTK] GLES build broken since r208997
https://bugs.webkit.org/show_bug.cgi?id=166455
Unreviewed. Fix the preprocessor guards here; this code is incompatible with GLES2.
Looks like it's been broken for a month. Typical!
- platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
- 3:52 AM Changeset in webkit [210164] by
-
- 11 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore
Merge r208997 - [GTK] Dramatic increase on memory usage since 2.14.x
https://bugs.webkit.org/show_bug.cgi?id=164049
Reviewed by Žan Doberšek.
Use OpenGL version 3.2 Core for rendering when available.
Update some operations that have changed when using 3.2 Core:
- Use glGetStringi to get the extensions list.
- Do not use GL_POINT_SPRITE.
- Always use a VAO when rendering.
- Use a GLSL 1.50 compatible shader.
No new tests needed.
- platform/graphics/GLContext.cpp:
(WebCore::GLContext::version):
Add a method to get OpenGL version we are using.
- platform/graphics/GLContext.h:
Ditto.
- platform/graphics/GraphicsContext3D.h:
Add an attribute to store the VAO used for rendering.
- platform/graphics/OpenGLShims.cpp:
(WebCore::initializeOpenGLShims):
Add glGetStringi to the list of functions.
- platform/graphics/OpenGLShims.h:
Ditto.
- platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
Set appropriate output to the shader compiler and initalize the VAO if needed.
(WebCore::GraphicsContext3D::~GraphicsContext3D):
Delete the VAO if needed.
(WebCore::GraphicsContext3D::getExtensions):
Use glGetExtensionsi for OpenGL versions >= 3.2.
- platform/graphics/glx/GLContextGLX.cpp:
(WebCore::hasGLXARBCreateContextExtension):
Check whether the GLX_ARB_create_context extension is available.
(WebCore::GLContextGLX::createWindowContext):
Use glXCreateContextAttribsARB() if possible to request an OpenGL 3.2 context.
(WebCore::GLContextGLX::createPbufferContext):
Ditto.
- platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
Enable glGetStringi for GTK.
- platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
Do not use default getExtensions() method for GTK.
- platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
Ditto.
- 3:52 AM Changeset in webkit [210163] by
-
- 11 edits in releases/WebKitGTK/webkit-2.14/Source/ThirdParty/ANGLE
Merge r208136 - -Wpragmas warning spam from angleutils.h
https://bugs.webkit.org/show_bug.cgi?id=164207
Reviewed by Darin Adler.
Use #pragma clang instead of #pragma GCC since all of the warnings we need to suppress are
Clang-specific warnings. GCC ignores unknown pragmas and does not warn, but it does warn if
any GCC pragma is invalid.
Note that this might still be broken for MSVCC, as MSVCC warns when it sees unknown pragmas.
- changes.diff:
- src/common/angleutils.cpp:
(FormatString):
- src/common/angleutils.h:
(MakeStaticString):
- src/common/debug.cpp:
- src/common/mathutil.cpp:
- src/libANGLE/Caps.cpp:
(gl::TextureCapsMap::get):
(gl::GetExtensionInfoMap):
- src/libANGLE/Device.cpp:
(egl::GetDeviceSet):
- src/libANGLE/Display.cpp:
(egl::Display::getClientExtensionString):
- src/libANGLE/formatutils.cpp:
(gl::GetInternalFormatMap):
(gl::GetAllSizedInternalFormats):
- src/libANGLE/validationES3.cpp:
(gl::IsValidES3CopyTexImageCombination):
- 3:52 AM Changeset in webkit [210162] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/ThirdParty/ANGLE
Merge r208041 - Another build fix.
- CMakeLists.txt:
- 3:51 AM Changeset in webkit [210161] by
-
- 7 edits in releases/WebKitGTK/webkit-2.14/Source
Merge r208040 - Fix Windows WebGL build after r208036
https://bugs.webkit.org/show_bug.cgi?id=164101
- CMakeLists.txt:
Source/WebCore:
Fix Windows WebGL build after r208022
https://bugs.webkit.org/show_bug.cgi?id=164091
- platform/graphics/opengl/Extensions3DOpenGLCommon.h:
- platform/graphics/opengl/Extensions3DOpenGLES.cpp:
(WebCore::Extensions3DOpenGLES::Extensions3DOpenGLES):
- platform/graphics/opengl/Extensions3DOpenGLES.h:
- platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::getExtensions):
- 3:51 AM Changeset in webkit [210160] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/ThirdParty/ANGLE
Merge r208037 - Fix Windows WebGL build after r208036
https://bugs.webkit.org/show_bug.cgi?id=164101
- CMakeLists.txt:
Add new files, remove deleted files.
- 3:49 AM Changeset in webkit [210159] by
-
- 436 edits537 adds96 deletes in releases/WebKitGTK/webkit-2.14/Source
Merge r208036 - Update ANGLE
https://bugs.webkit.org/show_bug.cgi?id=164101
Reviewed by Darin Adler.
Source/ThirdParty/ANGLE:
Updated to f01731530e7f754e5ebaf32d00f3e23b62376424
Differences between upstream ANGLE and WebKit's copy of ANGLE are in changes.diff
Source/WebCore:
ShCheckVariablesWithinPackingLimits has changed signatures from taking a ShVariableInfo* and length
to taking a std::vector<sh::ShaderVariable> which requires more information about the shader variables
than we kept in GraphicsContext3D::SymbolInfo. I removed the SymbolInfo class because it was redundant
with ANGLE's sh::ShaderVariable and now unused.
Covered by existing WebGL tests.
- CMakeLists.txt:
- PlatformMac.cmake:
- PlatformWin.cmake:
- platform/graphics/ANGLEWebKitBridge.cpp:
(WebCore::appendSymbol):
(WebCore::getStructInfo):
(WebCore::getSymbolInfo):
(WebCore::ANGLEWebKitBridge::compileShaderSource):
- platform/graphics/ANGLEWebKitBridge.h:
(WebCore::ANGLEShaderSymbol::isSampler): Deleted.
- platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo): Deleted.
(WebCore::GraphicsContext3D::SymbolInfo::operator==): Deleted.
- platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
- platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::checkVaryingsPacking):
(WebCore::GraphicsContext3D::precisionsMatch):
(WebCore::GraphicsContext3D::mappedSymbolName):
(WebCore::GraphicsContext3D::originalSymbolName):
- 3:41 AM Changeset in webkit [210158] by
-
- 11 edits2 adds in releases/WebKitGTK/webkit-2.14
Merge r208022 - [macOS] [WebGL2] Temporarily upgrade WebGL 2's internal OpenGL context from version 2.1 to 3.2
https://bugs.webkit.org/show_bug.cgi?id=164091
Reviewed by Dean Jackson.
Source/WebCore:
In order to test WebGL2 correctly, I had to upgrade the macOS's OpenGL
context to a 3.2-compatible context to make sure the new symbols are
accepted. Eventually, this 3.2-compatible context will have to be
reverted and replaced with an ANGLE context. The current 3.2-compatible
context is just for testing.
Test: fast/canvas/webgl/webgl2-context-creation.html
- html/canvas/WebGLBuffer.cpp: Use "nullptr" instead of 0.
(WebCore::WebGLBuffer::associateBufferData):
- html/canvas/WebGLRenderingContextBase.cpp: Use make_unique() instead
of the unique_ptr constructor.
(WebCore::WebGLRenderingContextBase::create):
- platform/graphics/GraphicsContext3D.h: GraphicsContext should know
if it is using a 3.2-compatible context because some parts of 2.1 are
removed in these contexts, and replaced with new things which aren't
in 2.1.
- platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::setPixelFormat): Use kCGLPFAOpenGLProfile to specify an
OpenGL 3.2 context.
(WebCore::GraphicsContext3D::GraphicsContext3D): GL_CLAMP is deprecated
in OpenGL 3.2. Fortunately, GL_CLAMP_TO_EDGE isn't deprecated and does
exactly what we want. In OpenGL3.2, point sprites are always enabled,
so there's no need to enable them in those contexts.
(WebCore::GraphicsContext3D::isGLES2Compliant):
- platform/graphics/opengl/Extensions3DOpenGL.cpp: In OpenGL 3.2,
glGetString() no longer accepts GL_EXTENSIONS. Instead, glGetStringi()
is used instead. Unfortunately, glGetString() is not available in
OpenGL 2.1 contexts, so we need to use one or the other based on the
version of the context we're using.
(WebCore::Extensions3DOpenGL::Extensions3DOpenGL):
(WebCore::Extensions3DOpenGL::getExtensions):
- platform/graphics/opengl/Extensions3DOpenGL.h:
- platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
(WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
Instead of modifying getExtensions() to use glGetStringi(), it makes
better sense to modify this function because getExtensions() returns
a string. Building up a string just to split it up again is silly, so
modifying this function instead makes more sense.
- platform/graphics/opengl/Extensions3DOpenGLCommon.h:
- platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::getIntegerv): GL_MAX_VARYING_FLOATS is
removed in OpenGL 3.2 contexts. However, it is replaced by
GL_MAX_VARYING_COMPONENTS, though this is deprecated but not removed.
In the more recent OpenGL context versions, GL_MAX_VARYING_VECTORS is
recommended instead, but that isn't available in OpenGL 3.2.
(WebCore::GraphicsContext3D::getExtensions):
LayoutTests:
- TestExpectations:
- fast/canvas/webgl/webgl2-context-creation-expected.txt: Added.
- fast/canvas/webgl/webgl2-context-creation.html: Added.
- 3:40 AM WebKitGTK/2.14.x edited by
- (diff)
- 2:43 AM Changeset in webkit [210157] by
-
- 6 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore
Merge r207666 - [GTK] Several tests crashing on debug bot in (anonymous namespace)::MediaPlayerPrivateGStreamerBase::repaint
https://bugs.webkit.org/show_bug.cgi?id=163511
Patch by Miguel Gomez <magomez@igalia.com> on 2016-10-21
Reviewed by Carlos Garcia Campos.
Perform the video repaint in the main thread when accelerated compositing is disabled. Added a new method to
MediaPlayerClient to get whether accelerated compositing is enabled from the MediaPlayer. This is needed
because mediaPlayerAcceleratedCompositingEnabled() will return false while HTMLMediaElement doesn't have a
RenderVideo, even when accelerated compositing is enabled.
Covered by existent tests.
- html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerAcceleratedCompositingEnabled):
- html/HTMLMediaElement.h:
- platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerAcceleratedCompositingEnabled):
- platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::repaint):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
- platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
- 2:43 AM Changeset in webkit [210156] by
-
- 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore
Merge r207287 - [GTK] Video playback doesn't work properly with accelerated compositing disabled
https://bugs.webkit.org/show_bug.cgi?id=163386
Patch by Miguel Gomez <magomez@igalia.com> on 2016-10-13
Reviewed by Carlos Garcia Campos.
Trigger a repaint of the player when a new frame arrives and accelerated compositing is disabled.
Covered by existent tests.
- platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
- 2:42 AM WebKitGTK/2.14.x edited by
- (diff)
- 2:34 AM WebKitGTK/2.14.x edited by
- (diff)
- 2:33 AM Changeset in webkit [210155] by
-
- 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore
Merge r205544 - [GTK] Crash of WebProcess on the last WebView disconnect
https://bugs.webkit.org/show_bug.cgi?id=161605
Reviewed by Michael Catanzaro.
Stop tracking X11 GL contexts to be cleanered on an exit handler. This was added to work around bugs on drivers,
and it's assuming that all GLContext not deleted when the exit handler is called are leaked, which is no longer
true, because PlatformDisplay now owns a GLContext and is deleted after exit handlers.
- platform/graphics/GLContext.cpp:
(WebCore::GLContext::GLContext):
(WebCore::GLContext::~GLContext):
(WebCore::activeContextList): Deleted.
(WebCore::GLContext::addActiveContext): Deleted.
(WebCore::GLContext::removeActiveContext): Deleted.
(WebCore::GLContext::cleanupActiveContextsAtExit): Deleted.
- 2:33 AM Changeset in webkit [210154] by
-
- 5 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore
Revert "Merge r205852 - [GTK] Crash of WebProcess on the last WebView disconnect (take two)"
This reverts commit c6853af17a2290c2321cce33f5e012656511d27c.
- 12:04 AM Changeset in webkit [210153] by
-
- 2 edits in trunk/LayoutTests
[EFL] Gardening on 27th Dec.
Unreviewed EFL gardening.
Patch by Gyuyoung Kim <gyuyoung.kim@navercorp.com> on 2016-12-27
- platform/efl/TestExpectations: Mark failing tests to Timeout or Skip.