Timeline
Jul 10, 2016:
- 11:09 PM Changeset in webkit [203051] by
-
- 5 edits in branches/safari-602.1.40-branch/Source
Versioning.
- 11:05 PM Changeset in webkit [203050] by
-
- 1 copy in tags/Safari-602.1.40.4
New tag.
- 11:03 PM Changeset in webkit [203049] by
-
- 2 edits in branches/safari-602.1.40-branch/Source/WebKit2
Merged r203044. rdar://problem/27268111
- 11:01 PM Changeset in webkit [203048] by
-
- 5 edits in branches/safari-602.1.40-branch/Source
Versioning.
- 10:06 PM Changeset in webkit [203047] by
-
- 14 edits4 adds in trunk
Setting document.title reuses <title>'s textnode child
https://bugs.webkit.org/show_bug.cgi?id=28864
<rdar://problem/7186473>
Reviewed by Benjamin Poulain.
Source/WebCore:
Setting document.title should be equivalent to setting the 'textContent'
IDL attribute of the <title> element:
In particular, this means we should always create a new Text node and
replace all the <title>'s children with this new Node, as per:
Previously, WebKit would in some cases reuse the existing <title>'s
Text node and merely update its data.
Firefox and Chrome behave as per the specification so this aligns our
behavior with other major browsers as well.
Test: fast/dom/title-setter-new-text-node.html
- dom/Document.cpp:
(WebCore::Document::setTitle):
- Call Node::setTextContent() instead of HTMLTitleElement::setText(), as per the specification.
- Take an ExceptionCode parameter and pass it to Node::setTextContent() as it may throw.
- dom/Document.h:
- dom/Document.idl:
- html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::setText):
Update implementation of HTMLTitleElement::setText() to call
setTextContent() as per the specification:
- html/HTMLTitleElement.h:
- html/HTMLTitleElement.idl:
- html/ImageDocument.cpp:
(WebCore::ImageDocument::finishedParsing):
- svg/SVGTitleElement.cpp:
- svg/SVGTitleElement.h:
Drop setText() setter which was duplicated from HTMLTitleElement::setText()
now that Document::setTitle() calls SVGTitleElement::setTextContent()
instead.
LayoutTests:
- fast/dom/title-setter-new-text-node-expected.txt: Added.
- fast/dom/title-setter-new-text-node.html: Added.
Add test coverage.
- fast/dom/title-text-property-2-expected.txt:
- fast/dom/title-text-property-expected.txt:
- http/tests/globalhistory/history-delegate-basic-title-expected.txt:
Rebaseline a few tests now that we do not reuse the <title>'s text
node child.
- 9:28 PM Changeset in webkit [203046] by
-
- 7 edits3 deletes in trunk
Unreviewed, rolling out r203037.
https://bugs.webkit.org/show_bug.cgi?id=159614
The JSC tests are breaking in elcapitan-debug-tests-jsc and
elcapitan-release-tests-jsc (Requested by caiolima on
#webkit).
Reverted changeset:
"ECMAScript 2016: %TypedArray%.prototype.includes
implementation"
https://bugs.webkit.org/show_bug.cgi?id=159385
http://trac.webkit.org/changeset/203037
- 8:58 PM Changeset in webkit [203045] by
-
- 4 edits2 adds in trunk
Fix LogicalSelectionOffsetCaches to work with detached render tree.
https://bugs.webkit.org/show_bug.cgi?id=159605
<rdar://problem/27248845>
Reviewed by Brent Fulgham.
Source/WebCore:
When the renderer that is being destroyed is on a selection boundary,
we need to ensure that all its cached pointers across the selection code (e.g. SelectionSubtreeData)
are getting reset. In order to do that, we call clearSelection() on the RenderView.
One of the last steps of clearing selection is to collect the selection gaps. Selection gaps uses this
LogicalSelectionOffsetCaches helper class to collect selection information across blocks.
LogicalSelectionOffsetCaches normally operates on rooted renderers. However we need to ensure sure that
it can also handle renderers that are no longer part of the render tree.
Test: fast/text/selection-on-a-detached-tree.html
- rendering/LogicalSelectionOffsetCaches.h:
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::logicalLeftSelectionOffset):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::logicalRightSelectionOffset):
- rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftSelectionOffset):
(WebCore::RenderBlock::logicalRightSelectionOffset):
LayoutTests:
- fast/text/selection-on-a-detached-tree-expected.txt: Added.
- fast/text/selection-on-a-detached-tree.html: Added.
- 7:52 PM Changeset in webkit [203044] by
-
- 1 edit1 add in trunk/Source/WebKit2
Update mediaIcon.pdf
https://bugs.webkit.org/show_bug.cgi?id=159613
-and corresponding-
rdar://problem/27268111
Reviewed by Sam Weinig.
- Resources/mediaIcon.pdf: Replaced.
- 4:28 PM Changeset in webkit [203043] by
-
- 3 edits4 adds in trunk
adoptNode() changes css class to lowercase for document loaded with XHR responseType = "document"
https://bugs.webkit.org/show_bug.cgi?id=159555
<rdar://problem/27252541>
Reviewed by Benjamin Poulain.
Source/WebCore:
Follow-up on r203018 which was incomplete. We need to update ElementData's
m_classNames / m_idForStyleResolution when the source document is in strict
mode and the destination document is in quirks mode as well.
Test: fast/dom/Document/adoptNode-quirks-mismatch2.html
- dom/Element.cpp:
(WebCore::Element::didMoveToNewDocument):
LayoutTests:
Add test coverage.
- fast/dom/Document/adoptNode-quirks-mismatch2-expected.txt: Added.
- fast/dom/Document/adoptNode-quirks-mismatch2.html: Added.
- fast/dom/Document/resources/document-noquirks-class.html: Added.
- fast/dom/Document/resources/document-noquirks-id.html: Added.
- 2:46 PM Changeset in webkit [203042] by
-
- 5 edits in trunk/Source/WebCore
Rename isEmojiModifier to isEmojiFitzpatrickModifier to better capture its function
https://bugs.webkit.org/show_bug.cgi?id=159610
Reviewed by Dan Bernstein.
- platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::characterRangeCodePath):
- platform/graphics/mac/ComplexTextController.cpp:
(WebCore::advanceByCombiningCharacterSequence):
Update for rename.
- platform/text/CharacterProperties.h:
(WebCore::isEmojiGroupCandidate):
(WebCore::isEmojiFitzpatrickModifier):
(WebCore::isVariationSelector):
Rename isEmojiModifier -> isEmojiFitzpatrickModifier. Also add some comments
explaining what the characters these predicate act on to demystify them a bit.
- rendering/RenderText.cpp:
(WebCore::RenderText::previousOffsetForBackwardDeletion):
Update for rename and rename a related variable.
- 11:50 AM Changeset in webkit [203041] by
-
- 2 edits in trunk/Source/WebKit2
Add self to WebKit2 Owners
https://bugs.webkit.org/show_bug.cgi?id=159499
Patch by Alex Christensen <achristensen@webkit.org> on 2016-07-10
Reviewed by Sam Weinig.
- Owners:
- 11:48 AM Changeset in webkit [203040] by
-
- 4 edits in trunk/Source
Fix client certificate authentication after r200463
https://bugs.webkit.org/show_bug.cgi?id=159574
<rdar://problem/26931006>
Patch by Alex Christensen <achristensen@webkit.org> on 2016-07-10
Reviewed by Sam Weinig.
Source/WebCore:
No new tests. We really need a test for this
- platform/network/cf/CertificateInfo.h:
(WebCore::CertificateInfo::CertificateInfo):
(WebCore::CertificateInfo::trust):
Make sure we only get the trust for Trust type CertificateInfos.
If we mix up our types, we get unexpected nullptrs, which will cause authentication to fail.
Source/WebKit2:
- Shared/Authentication/mac/AuthenticationManager.mac.mm:
(WebKit::leafCertificate):
(WebKit::chain):
Handle the different types of CertificateInfos.
- 10:53 AM Changeset in webkit [203039] by
-
- 2 edits in trunk/Source/WebCore
Fix Windows build after r203038
Unreviewed.
- platform/text/TextAllInOne.cpp:
- 10:15 AM Changeset in webkit [203038] by
-
- 43 edits8 copies6 moves6 adds3 deletes in trunk/Source
Move breaking iterator code to WTF
https://bugs.webkit.org/show_bug.cgi?id=159594
Reviewed by Alex Christensen.
This is in preparation for giving StringView a GraphemeClusters iterator.
Such an interator needs to be implemented on top of our breaking iterator
code.
Source/WebCore:
No new tests because there is no behavior change.
- CMakeLists.txt:
- PlatformEfl.cmake:
- PlatformGTK.cmake:
- PlatformMac.cmake:
- PlatformWin.cmake:
- WebCore.xcodeproj/project.pbxproj:
- dom/CharacterData.cpp:
- editing/TextCheckingHelper.cpp:
- editing/TextIterator.cpp:
- editing/VisibleUnits.cpp:
- html/HTMLInputElement.cpp:
- html/HTMLTextAreaElement.cpp:
- html/InputType.cpp:
- html/TextFieldInputType.cpp:
- html/TextInputType.cpp:
- platform/LocalizedStrings.cpp:
- platform/graphics/StringTruncator.cpp:
- platform/graphics/cg/ColorCG.cpp:
(WTF::RetainPtr<CGColorRef>>::createValueForKey):
(WebCore::RetainPtr<CGColorRef>>::createValueForKey): Deleted.
- platform/graphics/mac/ComplexTextController.cpp:
- platform/text/LineBreakIteratorPoolICU.h:
(WebCore::LineBreakIteratorPool::LineBreakIteratorPool): Deleted.
(WebCore::LineBreakIteratorPool::sharedPool): Deleted.
(WebCore::LineBreakIteratorPool::makeLocaleWithBreakKeyword): Deleted.
(WebCore::LineBreakIteratorPool::take): Deleted.
(WebCore::LineBreakIteratorPool::put): Deleted.
- platform/text/TextBoundaries.cpp:
- platform/text/TextBreakIterator.cpp:
(WebCore::initializeIterator): Deleted.
(WebCore::initializeIteratorWithRules): Deleted.
(WebCore::setTextForIterator): Deleted.
(WebCore::setContextAwareTextForIterator): Deleted.
(WebCore::wordBreakIterator): Deleted.
(WebCore::sentenceBreakIterator): Deleted.
(WebCore::cursorMovementIterator): Deleted.
(WebCore::acquireLineBreakIterator): Deleted.
(WebCore::releaseLineBreakIterator): Deleted.
(WebCore::mapLineIteratorModeToRules): Deleted.
(WebCore::isCJKLocale): Deleted.
(WebCore::openLineBreakIterator): Deleted.
(WebCore::closeLineBreakIterator): Deleted.
(WebCore::compareAndSwapNonSharedCharacterBreakIterator): Deleted.
(WebCore::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator): Deleted.
(WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator): Deleted.
(WebCore::textBreakFirst): Deleted.
(WebCore::textBreakLast): Deleted.
(WebCore::textBreakNext): Deleted.
(WebCore::textBreakPrevious): Deleted.
(WebCore::textBreakPreceding): Deleted.
(WebCore::textBreakFollowing): Deleted.
(WebCore::textBreakCurrent): Deleted.
(WebCore::isTextBreak): Deleted.
(WebCore::isWordTextBreak): Deleted.
(WebCore::numGraphemeClusters): Deleted.
(WebCore::numCharactersInGraphemeClusters): Deleted.
- platform/text/TextBreakIterator.h:
(WebCore::LazyLineBreakIterator::LazyLineBreakIterator): Deleted.
(WebCore::LazyLineBreakIterator::~LazyLineBreakIterator): Deleted.
(WebCore::LazyLineBreakIterator::string): Deleted.
(WebCore::LazyLineBreakIterator::isLooseCJKMode): Deleted.
(WebCore::LazyLineBreakIterator::lastCharacter): Deleted.
(WebCore::LazyLineBreakIterator::secondToLastCharacter): Deleted.
(WebCore::LazyLineBreakIterator::setPriorContext): Deleted.
(WebCore::LazyLineBreakIterator::updatePriorContext): Deleted.
(WebCore::LazyLineBreakIterator::resetPriorContext): Deleted.
(WebCore::LazyLineBreakIterator::priorContextLength): Deleted.
(WebCore::LazyLineBreakIterator::get): Deleted.
(WebCore::LazyLineBreakIterator::resetStringAndReleaseIterator): Deleted.
(WebCore::NonSharedCharacterBreakIterator::operator TextBreakIterator*): Deleted.
- platform/text/cf/HyphenationCF.cpp:
- platform/text/efl/TextBreakIteratorInternalICUEfl.cpp:
(WebCore::currentSearchLocaleID): Deleted.
(WebCore::currentTextBreakLocaleID): Deleted.
- platform/text/enchant/TextCheckerEnchant.cpp:
- platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp:
(WebCore::currentSearchLocaleID): Deleted.
(WebCore::currentTextBreakLocaleID): Deleted.
- platform/text/icu/UTextProvider.cpp:
(WebCore::fixPointer): Deleted.
(WebCore::uTextCloneImpl): Deleted.
- platform/text/icu/UTextProvider.h:
(WebCore::uTextProviderContext): Deleted.
(WebCore::initializeContextAwareUTextProvider): Deleted.
(WebCore::uTextAccessPinIndex): Deleted.
(WebCore::uTextAccessInChunkOrOutOfRange): Deleted.
- platform/text/icu/UTextProviderLatin1.cpp:
(WebCore::uTextLatin1Clone): Deleted.
(WebCore::uTextLatin1NativeLength): Deleted.
(WebCore::uTextLatin1Access): Deleted.
(WebCore::uTextLatin1Extract): Deleted.
(WebCore::uTextLatin1MapOffsetToNative): Deleted.
(WebCore::uTextLatin1MapNativeIndexToUTF16): Deleted.
(WebCore::uTextLatin1Close): Deleted.
(WebCore::openLatin1UTextProvider): Deleted.
(WebCore::textLatin1ContextAwareGetCurrentContext): Deleted.
(WebCore::textLatin1ContextAwareMoveInPrimaryContext): Deleted.
(WebCore::textLatin1ContextAwareSwitchToPrimaryContext): Deleted.
(WebCore::textLatin1ContextAwareMoveInPriorContext): Deleted.
(WebCore::textLatin1ContextAwareSwitchToPriorContext): Deleted.
(WebCore::uTextLatin1ContextAwareClone): Deleted.
(WebCore::uTextLatin1ContextAwareNativeLength): Deleted.
(WebCore::uTextLatin1ContextAwareAccess): Deleted.
(WebCore::uTextLatin1ContextAwareExtract): Deleted.
(WebCore::uTextLatin1ContextAwareClose): Deleted.
(WebCore::openLatin1ContextAwareUTextProvider): Deleted.
- platform/text/icu/UTextProviderUTF16.cpp:
(WebCore::textUTF16ContextAwareGetCurrentContext): Deleted.
(WebCore::textUTF16ContextAwareMoveInPrimaryContext): Deleted.
(WebCore::textUTF16ContextAwareSwitchToPrimaryContext): Deleted.
(WebCore::textUTF16ContextAwareMoveInPriorContext): Deleted.
(WebCore::textUTF16ContextAwareSwitchToPriorContext): Deleted.
(WebCore::uTextUTF16ContextAwareClone): Deleted.
(WebCore::uTextUTF16ContextAwareNativeLength): Deleted.
(WebCore::uTextUTF16ContextAwareAccess): Deleted.
(WebCore::uTextUTF16ContextAwareExtract): Deleted.
(WebCore::uTextUTF16ContextAwareClose): Deleted.
(WebCore::openUTF16ContextAwareUTextProvider): Deleted.
- platform/text/mac/TextBoundaries.mm:
- platform/text/mac/TextBreakIteratorInternalICUMac.mm:
(WebCore::textBreakLocalePreference): Deleted.
(WebCore::topLanguagePreference): Deleted.
(WebCore::getLocale): Deleted.
(WebCore::getSearchLocale): Deleted.
(WebCore::currentSearchLocaleID): Deleted.
(WebCore::getTextBreakLocale): Deleted.
(WebCore::currentTextBreakLocaleID): Deleted.
- platform/text/win/TextBreakIteratorInternalICUWin.cpp:
(WebCore::currentSearchLocaleID): Deleted.
(WebCore::currentTextBreakLocaleID): Deleted.
- rendering/RenderBlock.cpp:
- rendering/RenderText.cpp:
- rendering/RenderText.h:
- rendering/SimpleLineLayoutTextFragmentIterator.h:
- rendering/break_lines.cpp:
- rendering/break_lines.h:
- rendering/line/LineBreaker.h:
Source/WTF:
- WTF.xcodeproj/project.pbxproj:
- icu/unicode/ubrk.h: Added.
- icu/unicode/utext.h: Renamed from Source/WebCore/icu/unicode/utext.h.
- wtf/CMakeLists.txt:
- wtf/PlatformEfl.cmake:
- wtf/PlatformGTK.cmake:
- wtf/PlatformMac.cmake:
- wtf/PlatformWin.cmake:
- wtf/TinyLRUCache.h:
- wtf/text/LineBreakIteratorPoolICU.h: Renamed from Source/WebCore/platform/text/LineBreakIteratorPoolICU.h.
(WTF::LineBreakIteratorPool::LineBreakIteratorPool):
(WTF::LineBreakIteratorPool::sharedPool):
(WTF::LineBreakIteratorPool::makeLocaleWithBreakKeyword):
(WTF::LineBreakIteratorPool::take):
(WTF::LineBreakIteratorPool::put):
- wtf/text/TextBreakIterator.cpp: Renamed from Source/WebCore/platform/text/TextBreakIterator.cpp.
(WTF::initializeIterator):
(WTF::initializeIteratorWithRules):
(WTF::setTextForIterator):
(WTF::setContextAwareTextForIterator):
(WTF::wordBreakIterator):
(WTF::sentenceBreakIterator):
(WTF::cursorMovementIterator):
(WTF::acquireLineBreakIterator):
(WTF::releaseLineBreakIterator):
(WTF::mapLineIteratorModeToRules):
(WTF::isCJKLocale):
(WTF::openLineBreakIterator):
(WTF::closeLineBreakIterator):
(WTF::compareAndSwapNonSharedCharacterBreakIterator):
(WTF::NonSharedCharacterBreakIterator::NonSharedCharacterBreakIterator):
(WTF::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator):
(WTF::textBreakFirst):
(WTF::textBreakLast):
(WTF::textBreakNext):
(WTF::textBreakPrevious):
(WTF::textBreakPreceding):
(WTF::textBreakFollowing):
(WTF::textBreakCurrent):
(WTF::isTextBreak):
(WTF::isWordTextBreak):
(WTF::numGraphemeClusters):
(WTF::numCharactersInGraphemeClusters):
- wtf/text/TextBreakIterator.h: Renamed from Source/WebCore/platform/text/TextBreakIterator.h.
(WTF::LazyLineBreakIterator::LazyLineBreakIterator):
(WTF::LazyLineBreakIterator::~LazyLineBreakIterator):
(WTF::LazyLineBreakIterator::string):
(WTF::LazyLineBreakIterator::isLooseCJKMode):
(WTF::LazyLineBreakIterator::lastCharacter):
(WTF::LazyLineBreakIterator::secondToLastCharacter):
(WTF::LazyLineBreakIterator::setPriorContext):
(WTF::LazyLineBreakIterator::updatePriorContext):
(WTF::LazyLineBreakIterator::resetPriorContext):
(WTF::LazyLineBreakIterator::priorContextLength):
(WTF::LazyLineBreakIterator::get):
(WTF::LazyLineBreakIterator::resetStringAndReleaseIterator):
(WTF::NonSharedCharacterBreakIterator::operator TextBreakIterator*):
- wtf/text/TextBreakIteratorInternalICU.h: Renamed from Source/WebCore/platform/text/TextBreakIteratorInternalICU.h.
- wtf/text/efl/TextBreakIteratorInternalICUEfl.cpp: Renamed from Source/WebCore/platform/text/efl/TextBreakIteratorInternalICUEfl.cpp.
(WebCore::currentSearchLocaleID):
(WebCore::currentTextBreakLocaleID):
- wtf/text/gtk/TextBreakIteratorInternalICUGtk.cpp: Renamed from Source/WebCore/platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp.
(WebCore::currentSearchLocaleID):
(WebCore::currentTextBreakLocaleID):
- wtf/text/icu/UTextProvider.cpp: Renamed from Source/WebCore/platform/text/icu/UTextProvider.cpp.
(WTF::fixPointer):
(WTF::uTextCloneImpl):
- wtf/text/icu/UTextProvider.h: Renamed from Source/WebCore/platform/text/icu/UTextProvider.h.
(WTF::uTextProviderContext):
(WTF::initializeContextAwareUTextProvider):
(WTF::uTextAccessPinIndex):
(WTF::uTextAccessInChunkOrOutOfRange):
- wtf/text/icu/UTextProviderLatin1.cpp: Renamed from Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp.
(WTF::uTextLatin1Clone):
(WTF::uTextLatin1NativeLength):
(WTF::uTextLatin1Access):
(WTF::uTextLatin1Extract):
(WTF::uTextLatin1MapOffsetToNative):
(WTF::uTextLatin1MapNativeIndexToUTF16):
(WTF::uTextLatin1Close):
(WTF::openLatin1UTextProvider):
(WTF::textLatin1ContextAwareGetCurrentContext):
(WTF::textLatin1ContextAwareMoveInPrimaryContext):
(WTF::textLatin1ContextAwareSwitchToPrimaryContext):
(WTF::textLatin1ContextAwareMoveInPriorContext):
(WTF::textLatin1ContextAwareSwitchToPriorContext):
(WTF::uTextLatin1ContextAwareClone):
(WTF::uTextLatin1ContextAwareNativeLength):
(WTF::uTextLatin1ContextAwareAccess):
(WTF::uTextLatin1ContextAwareExtract):
(WTF::uTextLatin1ContextAwareClose):
(WTF::openLatin1ContextAwareUTextProvider):
- wtf/text/icu/UTextProviderLatin1.h: Renamed from Source/WebCore/platform/text/icu/UTextProviderLatin1.h.
- wtf/text/icu/UTextProviderUTF16.cpp: Renamed from Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp.
(WTF::textUTF16ContextAwareGetCurrentContext):
(WTF::textUTF16ContextAwareMoveInPrimaryContext):
(WTF::textUTF16ContextAwareSwitchToPrimaryContext):
(WTF::textUTF16ContextAwareMoveInPriorContext):
(WTF::textUTF16ContextAwareSwitchToPriorContext):
(WTF::uTextUTF16ContextAwareClone):
(WTF::uTextUTF16ContextAwareNativeLength):
(WTF::uTextUTF16ContextAwareAccess):
(WTF::uTextUTF16ContextAwareExtract):
(WTF::uTextUTF16ContextAwareClose):
(WTF::openUTF16ContextAwareUTextProvider):
- wtf/text/icu/UTextProviderUTF16.h: Renamed from Source/WebCore/platform/text/icu/UTextProviderUTF16.h.
- wtf/text/mac/TextBreakIteratorInternalICUMac.mm: Renamed from Source/WebCore/platform/text/mac/TextBreakIteratorInternalICUMac.mm.
(WTF::textBreakLocalePreference):
(WTF::topLanguagePreference):
(WTF::getLocale):
(WTF::getSearchLocale):
(WTF::currentSearchLocaleID):
(WTF::getTextBreakLocale):
(WTF::currentTextBreakLocaleID):
- wtf/text/win/TextBreakIteratorInternalICUWin.cpp: Renamed from Source/WebCore/platform/text/win/TextBreakIteratorInternalICUWin.cpp.
(WebCore::currentSearchLocaleID):
(WebCore::currentTextBreakLocaleID):
- 1:24 AM Changeset in webkit [203037] by
-
- 7 edits3 adds in trunk
ECMAScript 2016: %TypedArray%.prototype.includes implementation
https://bugs.webkit.org/show_bug.cgi?id=159385
Patch by Caio Lima <Caio Lima> on 2016-07-10
Reviewed by Benjamin Poulain.
Source/JavaScriptCore:
This patch implements the ECMAScript 2016:
%TypedArray%.prototype.includes
following spec 22.2.3.14
https://tc39.github.io/ecma262/2016/#sec-%typedarray%.prototype.includes
- runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncIncludes):
- runtime/JSTypedArrayViewPrototype.cpp:
(JSC::typedArrayViewProtoFuncIncludes):
(JSC::JSTypedArrayViewPrototype::finishCreation):
LayoutTests:
This patch implements test case to ECMAScript 2016:
%TypedArray%.prototype.includes implementation
following spec 22.2.3.14
https://tc39.github.io/ecma262/2016/#sec-%typedarray%.prototype.includes
- js/regress/script-tests/typed-array-includes.js: Added.
(assertProperError):
(testIntTypedArray):
(testFloatTypedArray):
- js/typed-array-includes-expected.txt: Added.
- js/typed-array-includes.html: Added.
- 1:03 AM Changeset in webkit [203036] by
-
- 42 edits2 adds in trunk
[GTK] Crash on https://diafygi.github.io/webcrypto-examples with ENABLE_SUBTLE_CRYPTO
https://bugs.webkit.org/show_bug.cgi?id=159189
Reviewed by Michael Catanzaro.
Source/WebCore:
Currently, we explicitly release the pointers of std::unique_ptr<CryptoAlgorithm> and std::unique_ptr<CryptoAlgorithmParameters>,
and delete them in the asynchronously called lambdas. In GnuTLS version, callback function is accidentally called twice,
and it incurs the double free problem.
In SubtleCrypto code, we have the rule that we must not call failureCallback when the error code is filled in synchronous execution.
So we drop the failureCallback calling code in GnuTLS subtle crypto code.
But, rather than carefully handling un-smart-pointer-managed raw pointer's life time, we should use ref counted pointer for that.
Using the raw delete is error-prone.
This patch also changes CryptoAlgorithm and CryptoAlgorithmParameters to RefCounted. And use Ref and RefPtr instead.
The change eliminates the ad-hoc delete code. And now, the lambdas can be called multiple times since once the result of the promise
is resolved or rejected, subsequent resolve / reject calls are ignored.
And this patch also fixes the incorrect call to the lambda that is already WTFMoved.
While we can see several
return WTFMove(...), they are necessary since it uses implicit type conversions, like,
Ref<A>=>RefPtr<A>, andRef<Derived>=>Ref<Base>.
- bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createAesCbcParams):
(WebCore::createAesKeyGenParams):
(WebCore::createHmacParams):
(WebCore::createHmacKeyParams):
(WebCore::createRsaKeyGenParams):
(WebCore::createRsaKeyParamsWithHash):
(WebCore::createRsaOaepParams):
(WebCore::createRsaSsaParams):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
- bindings/js/JSCryptoAlgorithmDictionary.h:
- bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::createHMACParameters):
(WebCore::createRSAKeyParametersWithHash):
(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
- bindings/js/JSCryptoKeySerializationJWK.h:
- bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::createAlgorithmFromJSValue):
(WebCore::importKey):
(WebCore::JSSubtleCrypto::importKey):
(WebCore::JSSubtleCrypto::wrapKey):
(WebCore::JSSubtleCrypto::unwrapKey):
- crypto/CryptoAlgorithm.h:
- crypto/CryptoAlgorithmParameters.h:
- crypto/CryptoAlgorithmRegistry.cpp:
(WebCore::CryptoAlgorithmRegistry::create):
- crypto/CryptoAlgorithmRegistry.h:
- crypto/CryptoKeySerialization.h:
- crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::create):
- crypto/algorithms/CryptoAlgorithmAES_CBC.h:
- crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
(WebCore::CryptoAlgorithmAES_KW::create):
- crypto/algorithms/CryptoAlgorithmAES_KW.h:
- crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::create):
- crypto/algorithms/CryptoAlgorithmHMAC.h:
- crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::create):
- crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
- crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::create):
- crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
- crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
(WebCore::CryptoAlgorithmRSA_OAEP::create):
- crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
- crypto/algorithms/CryptoAlgorithmSHA1.cpp:
(WebCore::CryptoAlgorithmSHA1::create):
- crypto/algorithms/CryptoAlgorithmSHA1.h:
- crypto/algorithms/CryptoAlgorithmSHA224.cpp:
(WebCore::CryptoAlgorithmSHA224::create):
- crypto/algorithms/CryptoAlgorithmSHA224.h:
- crypto/algorithms/CryptoAlgorithmSHA256.cpp:
(WebCore::CryptoAlgorithmSHA256::create):
- crypto/algorithms/CryptoAlgorithmSHA256.h:
- crypto/algorithms/CryptoAlgorithmSHA384.cpp:
(WebCore::CryptoAlgorithmSHA384::create):
- crypto/algorithms/CryptoAlgorithmSHA384.h:
- crypto/algorithms/CryptoAlgorithmSHA512.cpp:
(WebCore::CryptoAlgorithmSHA512::create):
- crypto/algorithms/CryptoAlgorithmSHA512.h:
- crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
- crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp:
(WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
(WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
- crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp:
(WebCore::CryptoAlgorithmHMAC::platformSign):
(WebCore::CryptoAlgorithmHMAC::platformVerify):
- crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
- crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp:
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
- crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:
(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
- crypto/keys/CryptoKeySerializationRaw.cpp:
(WebCore::CryptoKeySerializationRaw::reconcileAlgorithm):
- crypto/keys/CryptoKeySerializationRaw.h:
LayoutTests:
If you execute the added test with subtle-crypto-enabled GTK environment without this patch, this causes the crash.
- crypto/subtle/unimplemented-unwrap-crash-expected.txt: Added.
- crypto/subtle/unimplemented-unwrap-crash.html: Added.
Jul 9, 2016:
- 3:58 PM Changeset in webkit [203035] by
-
- 10 edits in trunk/Websites/perf.webkit.org
Perf dashboard can consume 50-70% of CPU on MacBook even if user is not interacting at all
https://bugs.webkit.org/show_bug.cgi?id=159597
Reviewed by Chris Dumez.
TimeSeriesChart and InteractiveTimeSeriesChart had been relying on continually polling on requestAnimationFrame
to update itself in response to its canvas resizing. Even though there as an early exit in the case there was
nothing to update, this is still causing a significant power drain when the user is not interacting at all.
Let TimeSeriesChart use the regular top-down render path like other components with exceptions of listening to
window's resize eventas well as when new JSONs are fetched from the server. The render() call to the latter case
will be coerced into a single callback on requestAnimationFrame to avoid DOM-mutation-layout churn.
- public/v3/components/base.js:
(ComponentBase.isElementInViewport): Deleted.
- public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype.render): Enqueue charts to render.
- public/v3/components/chart-styles.js:
(ChartStyles.dashboardOptions): Removed updateOnRequestAnimationFrame which is no longer an available option.
- public/v3/components/time-series-chart.js:
(TimeSeriesChart): Replaced the code to register itself for rAF by the code to listen to resize events on window.
(TimeSeriesChart._updateOnRAF): Deleted.
(TimeSeriesChart._updateAllCharts): Added.
(TimeSeriesChart.prototype._enqueueToRender): Added.
(TimeSeriesChart._renderEnqueuedCharts): Added.
(TimeSeriesChart.prototype.fetchMeasurementSets): Avoid calling fetchBetween when the range had been fetched.
Without this change, we can incur a significant number of redundant calls to render() when adjusting the domain
in charts page by the slider. When no new JSON is fetched, simply enqueue this chart to render on rAF.
(TimeSeriesChart.prototype._didFetchMeasurementSet): Enqueue this chart to render on rAF.
(TimeSeriesChart.prototype.render): Removed the check for isElementInViewport since we no longer get render() call
when this chart moves into the viewport (as we no longer listen to every rAF or scroll event).
- public/v3/models/measurement-set.js:
(MeasurementSet.prototype.hasFetchedRange): Fixed various bugs revealed by the new use in fetchMeasurementSets.
- public/v3/pages/chart-pane-status-view.js:
(ChartPaneStatusView.prototype._updateRevisionListForNewCurrentRepository): Removed the dead code. It was probably
copied from when this code was in InteractiveTimeSeries chart. There is no this._forceRender in this component.
- public/v3/pages/dashboard-page.js:
(DashboardPage.prototype.render): Enqueue charts to render.
- public/v3/pages/heading.js:
(SummaryPage.prototype.open): Removed the call to isElementInViewport. This wasn't really doing anything useful in
this component.
- unit-tests/measurement-set-tests.js: Added tests for hasFetchedRange.
(.waitForMeasurementSet): Moved to be used in a newly added test case.
- 2:07 PM Changeset in webkit [203034] by
-
- 2 edits1 add in trunk/Source/JavaScriptCore
REGRESSION(201900): validation failure for GetByOffset/PutByOffset in VALIDATE((node), node->child1().node() == node->child2().node() node->child1()->result() == NodeResultStorage) https://bugs.webkit.org/show_bug.cgi?id=159603
Reviewed by Keith Miller.
This removes an incorrect validation rule and replaces it with a FIXME about how to make this
aspect of IR easier to validate soundly.
It's not valid to assert that two children of a node are the same. It should always be valid
to take:
Foo(@x, @x)
and turn it into:
a: ValueRep(@x)
b: ValueRep(@x)
Foo(@a, @b)
or even something like:
y: Identity(@y)
Foo(@x, @y)
That's because it should be possible to rewire any data flow edge something that produces an
equivalent value.
The validation rule that this patch removes meant that such rewirings were invalid on
GetByOffset/PutByOffset. FixupPhase did such a rewiring sometimes.
- dfg/DFGValidate.cpp:
- tests/stress/get-by-offset-double.js: Added.
- 1:50 PM Changeset in webkit [203033] by
-
- 3 edits4 adds in trunk
appendMemcpy might fail in concatAppendOne
https://bugs.webkit.org/show_bug.cgi?id=159601
Source/JavaScriptCore:
<rdar://problem/27211300>
Reviewed by Mark Lam.
There are multiple reasons why we might fail appendMemcpy. One
reason, which I suspect was the source of the crashes, is that one
of the Array prototypes has an indexed property. This patch
consolidates the two old cases by just creating an array then
attempting to memcpy append. If that fails, we fall back to
moveElements.
- runtime/ArrayPrototype.cpp:
(JSC::concatAppendOne):
- tests/stress/concat-with-holesMustForwardToPrototype.js: Added.
(arrayEq):
LayoutTests:
Reviewed by Mark Lam.
Add new microbenchmark testing the performance of concat
when appending one new element. This patch appears to be
about a 13% progression on this test.
- js/regress/concat-append-one-expected.txt: Added.
- js/regress/concat-append-one.html: Added.
- js/regress/script-tests/concat-append-one.js: Added.
(test):
- 9:23 AM Changeset in webkit [203032] by
-
- 2 edits in trunk/Tools
Give git-add-reviewer an option to say “Rubber-stamped by” in non-interactive mode
https://bugs.webkit.org/show_bug.cgi?id=159600
Reviewed by Daniel Bates.
- Scripts/git-add-reviewer:
Added the -srubber-stamp option. (nonInteractive): Set the rubberstamp key in the item passed to addReviewer() based on the
new option.
- 8:47 AM Changeset in webkit [203031] by
-
- 3 edits in trunk/Source/WebCore
REGRESSION (r202931): breaks release builds with ASSERT_WITH_SECURITY_IMPLICATION for fuzzing
https://bugs.webkit.org/show_bug.cgi?id=159599
rdar://problem/27248835
Reviewed by Chris Dumez.
Make RenderStyle::deletionHasBegun() available with ENABLE(SECURITY_ASSERTIONS)
- rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::~RenderStyle):
- rendering/style/RenderStyle.h:
(WebCore::RenderStyle::deletionHasBegun):
- 8:39 AM Changeset in webkit [203030] by
-
- 2 edits in trunk/Websites/perf.webkit.org
REGRESSION: manifest.json generation takes multiple seconds on perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=159596
Reviewed by Chris Dumez.
The most of CPU time was spent looking for a duplicate entry in an array of metrics by array_search.
This patch moves to postgres by using aggregate functions in the query. Also moved the code to convert
datetime to UNIX epoch timestamp from PHP to within postgres query.
These improvements reduce total runtime of Manifest::generate from ~4s to ~350ms on my machine.
- public/include/manifest.php:
(Manifest::generate): No longer fetches test_configurations table as this is done in Manifest::platforms now.
Also moved calls to each method in the class to separate lines for easier instrumentation.
(Manifest::platforms): Group test configurations (current, baseline, target) by platform and metric.
Use the max of the last modified dates in UNIX epoch timestamps (ms to be compatible with JS's representation).
A given platform, metric pair is considered to be in the v1 dashboard if any test configuration is in.
- 5:57 AM Changeset in webkit [203029] by
-
- 6 edits2 adds in trunk
Make use of PrivateIdentifier to simplify Fetch Headers built-in checks
https://bugs.webkit.org/show_bug.cgi?id=159554
Patch by Youenn Fablet <youenn@apple.com> on 2016-07-09
Reviewed by Alex Christensen.
Source/WebCore:
Test: fetch/header-constructor-overriden.html
Patch does not change visible behavior.
- Modules/fetch/FetchHeaders.idl: Adding PrivateIdentifier to the Headers constructor.
- Modules/fetch/FetchHeaders.js:
(initializeFetchHeaders): Checking directly with @Headers for improved clarity.
- Modules/fetch/FetchResponse.js: Using @Headers to check whether creating a Headers object or not before
passsing it to C++ FetchResponse initialize method.
(initializeFetchResponse):
- bindings/js/WebCoreBuiltinNames.h: Adding Headers private name.
LayoutTests:
- fetch/header-constructor-overriden-expected.txt: Added.
- fetch/header-constructor-overriden.html: Added.
- 12:33 AM Changeset in webkit [203028] by
-
- 3 edits in trunk/Source/JavaScriptCore
[JSC] Fix the Template Raw Value of \ (escape) + LineTerminatorSequence
https://bugs.webkit.org/show_bug.cgi?id=159595
Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-07-09
Reviewed by Yusuke Suzuki.
The spec (https://tc39.github.io/ecma262/#sec-static-semantics-tv-and-trv)
says:
"The TRV of LineContinuation::\LineTerminatorSequence is the sequence
consisting of the code unit value 0x005C followed by the code units
of TRV of LineTerminatorSequence."
We were not normalizing the LineTerminatorSequence in that case, but it should
be as it is the TRV of LineTerminatorSequence.
- parser/Lexer.cpp:
(JSC::Lexer<T>::parseTemplateLiteral):
- tests/stress/tagged-templates-raw-strings.js:
- 12:03 AM MathML/Early_2016_Refactoring edited by
- (diff)