WebKit-https.git
5 years agotheverge.com burning 100% CPU on iPad (due to window.screenX/Y)
akling@apple.com [Sat, 25 Apr 2015 00:25:39 +0000 (00:25 +0000)]
theverge.com burning 100% CPU on iPad (due to window.screenX/Y)
<https://webkit.org/b/144175>
<rdar://problem/20694585>

Reviewed by Anders Carlsson.

Return an empty window rect on iOS WK2 builds. This avoids sending a synchronous
IPC request to the UI process that would give the same result, but spend way
more time and CPU cycles to do so.

With this change, theverge.com CPU usage goes from 100% to ~20% when idle.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::windowRect):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183299 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoDisable ActionMenusPDFTest due to timeout on test bot
bfulgham@apple.com [Sat, 25 Apr 2015 00:19:32 +0000 (00:19 +0000)]
Disable ActionMenusPDFTest due to timeout on test bot

* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183298 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoTextIndicator for embedded PDFs is slightly offset
bfulgham@apple.com [Sat, 25 Apr 2015 00:16:52 +0000 (00:16 +0000)]
TextIndicator for embedded PDFs is slightly offset
https://bugs.webkit.org/show_bug.cgi?id=144172
<rdar://problem/20691304>

Reviewed by Tim Horton.

When I converted the existing DOM Range logic to work with PDFSelections, I omitted the
step where the font ascent was used to adjust the origin used for the TextIndicator. This
patch determines the correct ascent for the range of characters in the selection, and
adjusts the offset by the difference between the ascent and the height of the selection rect.

Also, since the PDFSelection only supplies the bounding rect for the selection, I calculate
an equivalent text bounding box by insetting the rect by half the size of the ascent.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::scaleFactor): Add accessor for PDF scale factor.
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Adjusted to take the
font ascent and scale factor into account.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183297 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoREGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralH...
ddkilzer@apple.com [Sat, 25 Apr 2015 00:11:43 +0000 (00:11 +0000)]
REGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralHost visiblePeripheralFrame]

Fixes the following build failures:

    WebKit2/UIProcess/ios/WKPDFView.mm:740:45: error: class method '+visiblePeripheralFrame' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
        CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
                                                ^~~~~~~~~~~~~~~~~~~~~~
    WebKit2/UIProcess/ios/WKPDFView.mm:740:12: error: no viable conversion from 'id' to 'CGRect'
        CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
               ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Platform/spi/ios/UIKitSPI.h:
(+[UIPeripheralHost visiblePeripheralFrame]): Add declaration.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183296 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoAnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that...
dino@apple.com [Sat, 25 Apr 2015 00:11:07 +0000 (00:11 +0000)]
AnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that don't use scroll triggers
https://bugs.webkit.org/show_bug.cgi?id=144173
<rdar://problem/20526168>

Reviewed by Simon Fraser.

Keep a list of Animations that care about scroll updates, and only
run the animation update if the list is not empty.

Covered by existing tests.

* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::updateStateMachine): Tell the AnimationController
if this is an animation that depends on scrolling.
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::animationWillBeRemoved): Call the
new removeFromAnimationsDependentOnScroll as this animation is deleted.
(WebCore::AnimationControllerPrivate::addToAnimationsDependentOnScroll):
(WebCore::AnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
(WebCore::AnimationControllerPrivate::scrollWasUpdated): Only update if
there are animations that care.
(WebCore::AnimationController::wantsScrollUpdates): Helper to expose this
value to FrameView.
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
(WebCore::AnimationControllerPrivate::wantsScrollUpdates):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183295 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoChange _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
andersca@apple.com [Sat, 25 Apr 2015 00:09:25 +0000 (00:09 +0000)]
Change _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=144171

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _websiteDataStore]):
(-[WKWebViewConfiguration _setWebsiteDataStore:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore initWithDataStore:]):
(+[_WKWebsiteDataStore defaultDataStore]):
(+[_WKWebsiteDataStore nonPersistentDataStore]):
(-[_WKWebsiteDataStore isNonPersistent]):
(-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183294 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoWKPDFView does not support password-protected PDFs
timothy_horton@apple.com [Fri, 24 Apr 2015 23:54:59 +0000 (23:54 +0000)]
WKPDFView does not support password-protected PDFs
https://bugs.webkit.org/show_bug.cgi?id=144162
<rdar://problem/18411512>

Reviewed by Andy Estes.

* Platform/spi/ios/UIKitSPI.h:
Add some SPI.

* UIProcess/ios/WKPDFView.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _didLoadPDFDocument]):
(-[WKPDFView web_setContentProviderData:suggestedFilename:]):
Move creation of the UIPDFDocument (only possible if the CGPDFDocument is unlocked)
and initial setup of the page views out into _didLoadPDFDocument.

If the CGPDFDocument is locked, we'll show some UI to unlock it; otherwise
we'll continue on to _didLoadPDFDocument as previously.

(-[WKPDFView web_setMinimumSize:]):
Resize the password UI instead of the PDF pages if we have it.

(-[WKPDFView _computePageAndDocumentFrames]):
Don't bother doing any work revalidating PDF pages if the document is locked.

(-[WKPDFView _updatePasswordEntryField]):
Make sure that the UIDocumentPassword view is always the size of the scrollview.
This takes care of rotation.

(-[WKPDFView _keyboardDidShow:]):
Make sure that we scroll the password field around, if necessary, to keep it
on screen when editing begins.

(-[WKPDFView _showPasswordEntryField]):
(-[WKPDFView _hidePasswordEntryField]):
Adjust the background color (to match the UIDocumentPasswordView) and disable zooming
while it's up. The UIDocumentPassword view is installed into the scroll view
to match UIWebView behavior.

(-[WKPDFView userDidEnterPassword:forPasswordView:]):
(-[WKPDFView didBeginEditingPassword:inView:]):
(-[WKPDFView didEndEditingPassword:inView:]):
(-[WKPDFView _didFailToUnlock]):
Pop up a dialog informing the user that they entered the wrong password.

(-[WKPDFView _tryToUnlockWithPassword:]):
Try to unlock the document. If it succeeds, hide the unlock UI and go back to
_didLoadPDFDocument.

* English.lproj/Localizable.strings:
Add some localizable strings.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183293 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoFix iOS EWS builds after updating to iOS 8.3 SDK
ddkilzer@apple.com [Fri, 24 Apr 2015 23:51:39 +0000 (23:51 +0000)]
Fix iOS EWS builds after updating to iOS 8.3 SDK

* platform/spi/cocoa/CoreTextSPI.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
- Update __IPHONE_OS_VERSION_MIN_REQUIRED for these constants.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183292 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[JSC] When inserting a NaN into a Int32 array, we convert it to DoubleArray then...
benjamin@webkit.org [Fri, 24 Apr 2015 23:29:32 +0000 (23:29 +0000)]
[JSC] When inserting a NaN into a Int32 array, we convert it to DoubleArray then to ContiguousArray
https://bugs.webkit.org/show_bug.cgi?id=144169

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-04-24
Reviewed by Geoffrey Garen.

* runtime/JSObject.cpp:
(JSC::JSObject::convertInt32ForValue):
DoubleArray do not store NaN, they are used for holes.
What happened was:
1) We fail to insert the NaN in the Int32 array because it is a double.
2) We were converting the array to DoubleArray.
3) We were trying to insert the value again. We would fail again because
   DoubleArray does not store NaN.
4) We would convert the DoubleArrayt to Contiguous Array, converting the values
   to boxed values.

* tests/stress/int32array-transition-on-nan.js: Added.
The behavior is not really observable. This only test nothing crashes in those
cases.

(insertNaNWhileFilling):
(testInsertNaNWhileFilling):
(insertNaNAfterFilling):
(testInsertNaNAfterFilling):
(pushNaNWhileFilling):
(testPushNaNWhileFilling):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183291 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoHandling additional review feedback after http://trac.webkit.org/changeset/183280
beidson@apple.com [Fri, 24 Apr 2015 23:11:07 +0000 (23:11 +0000)]
Handling additional review feedback after trac.webkit.org/changeset/183280
https://bugs.webkit.org/show_bug.cgi?id=144157.

Suggested by, implicitly reviewed by, and explicitly rubber-stamped by Alexey Proskuryakov.

* http/tests/security/cors-post-redirect-303-expected.txt: Added.
* http/tests/security/cors-post-redirect-303.html: Added.
* http/tests/security/resources/cors-post-redirect-target.php:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183290 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUnreviewed iOS build fix; add declarations to AVKitSPI.h
jer.noble@apple.com [Fri, 24 Apr 2015 23:04:48 +0000 (23:04 +0000)]
Unreviewed iOS build fix; add declarations to AVKitSPI.h

* platform/spi/cocoa/AVKitSPI.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183289 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoIt shouldn't take 1846 lines of code and 5 FIXMEs to sort an array.
ggaren@apple.com [Fri, 24 Apr 2015 23:02:29 +0000 (23:02 +0000)]
It shouldn't take 1846 lines of code and 5 FIXMEs to sort an array.
https://bugs.webkit.org/show_bug.cgi?id=144013

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch implements Array.prototype.sort in JavaScript, removing the
C++ implementations. It is simpler and less error-prone to express our
operations in JavaScript, which provides memory safety, exception safety,
and recursion safety.

The performance result is mixed, but net positive in my opinion. It's
difficult to enumerate all the results, since we used to have so many
different sorting modes, and there are lots of different data patterns
across which you might want to measure sorting. Suffice it to say:

    (*) The benchmarks we track are faster or unchanged.

    (*) Sorting random input using a comparator -- which we think is
    common -- is 3X faster.

    (*) Sorting random input in a non-array object -- which jQuery does
    -- is 4X faster.

    (*) Sorting random input in a compact array of integers using a
    trivial pattern-matchable comparator is 2X *slower*.

* builtins/Array.prototype.js:
(sort.min):
(sort.stringComparator):
(sort.compactSparse): Special case compaction for sparse arrays because
we don't want to hang when sorting new Array(BIG).

(sort.compact):
(sort.merge):
(sort.mergeSort): Use merge sort because it's a reasonably efficient
stable sort. We have evidence that some sites depend on stable sort,
even though the ES6 spec does not mandate it. (See
<http://trac.webkit.org/changeset/33967>.)

This is a textbook implementation of merge sort with three optimizations:

    (1) Use iteration instead of recursion;

    (2) Use array subscripting instead of array copying in order to
    create logical sub-lists without creating physical sub-lists;

    (3) Swap src and dst at each iteration instead of copying src into
    dst, and only copy src into the subject array at the end if src is
    not the subject array.

(sort.inflate):
(sort.comparatorSort):
(sort): Sort in JavaScript for the win.

* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createExecutableInternal): Allow non-private
names so we can use helper functions.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::isNumericCompareFunction): Deleted.
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::setIsNumericCompareFunction): Deleted.
(JSC::UnlinkedCodeBlock::isNumericCompareFunction): Deleted.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::setIsNumericCompareFunction): Deleted.
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionNode::emitBytecode): We don't do this special casing based
on pattern matching anymore. This was mainly an optimization to avoid
the overhead of calling from C++ to JS, which we now avoid by
sorting in JS.

* heap/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::pushTempSortVector): Deleted.
(JSC::Heap::popTempSortVector): Deleted.
(JSC::Heap::visitTempSortVectors): Deleted.
* heap/Heap.h: We don't have temp sort vectors anymore because we sort
in JavaScript using a normal JavaScript array for our temporary storage.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseInner): Allow capturing so we can use
helper functions.

* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction): Deleted.
(JSC::attemptFastSort): Deleted.
(JSC::performSlowSort): Deleted.
(JSC::arrayProtoFuncSort): Deleted.

* runtime/CommonIdentifiers.h: New strings used by sort.

* runtime/JSArray.cpp:
(JSC::compareNumbersForQSortWithInt32): Deleted.
(JSC::compareNumbersForQSortWithDouble): Deleted.
(JSC::compareNumbersForQSort): Deleted.
(JSC::compareByStringPairForQSort): Deleted.
(JSC::JSArray::sortNumericVector): Deleted.
(JSC::JSArray::sortNumeric): Deleted.
(JSC::ContiguousTypeAccessor::getAsValue): Deleted.
(JSC::ContiguousTypeAccessor::setWithValue): Deleted.
(JSC::ContiguousTypeAccessor::replaceDataReference): Deleted.
(JSC::ContiguousTypeAccessor<ArrayWithDouble>::getAsValue): Deleted.
(JSC::ContiguousTypeAccessor<ArrayWithDouble>::setWithValue): Deleted.
(JSC::ContiguousTypeAccessor<ArrayWithDouble>::replaceDataReference): Deleted.
(JSC::JSArray::sortCompactedVector): Deleted.
(JSC::JSArray::sort): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::get_less): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::set_less): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::get_greater): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::set_greater): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::get_balance_factor): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::set_balance_factor): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::compare_key_node): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::compare_node_node): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::null): Deleted.
(JSC::JSArray::sortVector): Deleted.
(JSC::JSArray::compactForSorting): Deleted.
* runtime/JSArray.h:

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation): Provide some builtins used
by sort.

Source/WTF:

Remove this custom tree implementation because it is unused. (It was
previously used to achieve a stable array sort in certain cases.)

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/AVLTree.h: Removed.
* wtf/CMakeLists.txt:

LayoutTests:

* js/script-tests/array-holes.js:
* js/array-holes-expected.txt: This result now matches Firefox. We see
'peekaboo', which is a prototype property, rather than a hole, because
sorting uses [[Get]], which sees prototype properties.

The ES6 spec says that sorting should use [[Get]], so this new result
matches the spec a little better -- although the spec also says that the
result of sorting is undefined in this case because of the presence of
an indexed property in the prototype chain.

* js/dom/array-prototype-properties-expected.txt: Updated error message
to match other array prototype error messages.

* js/comparefn-sort-stability-expected.txt:
* js/script-tests/comparefn-sort-stability.js: Made this test bigger in
order to demonstrate that Firefox and Safari use a stable sort, and
Chrome does not.

* js/script-tests/array-sort-sparse.js:
* js/array-sort-sparse-expected.txt: Added some tests for things I got
wrong in this patch.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183288 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agofast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemit...
ap@apple.com [Fri, 24 Apr 2015 22:31:31 +0000 (22:31 +0000)]
fast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemite WK2
https://bugs.webkit.org/show_bug.cgi?id=144155

Unreviewed follow-up. Added a notifyDone, so that the watchdog timer actually works.

* fast/frames/flattening/resources/iframe-to-resize.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183287 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoMake rangeExpandedAroundPositionByCharacters to all platforms.
enrica@apple.com [Fri, 24 Apr 2015 22:22:05 +0000 (22:22 +0000)]
Make rangeExpandedAroundPositionByCharacters to all platforms.
https://bugs.webkit.org/show_bug.cgi?id=144161

Reviewed by Tim Horton.

No change in functionality, simply making this available
to all platforms.

* editing/VisibleUnits.cpp:
(WebCore::rangeExpandedAroundPositionByCharacters):
* editing/VisibleUnits.h:
* editing/mac/DataDetection.mm:
* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::rangeExpandedAroundPositionByCharacters): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183286 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoPurge PassRefPtr from NamedNodeMap.
akling@apple.com [Fri, 24 Apr 2015 22:05:30 +0000 (22:05 +0000)]
Purge PassRefPtr from NamedNodeMap.
<https://webkit.org/b/144091>

Reviewed by Antti Koivisto.

Use RefPtr instead of PassRefPtr in NamedNodeMap.

* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::getNamedItem):
(WebCore::NamedNodeMap::getNamedItemNS):
(WebCore::NamedNodeMap::removeNamedItem):
(WebCore::NamedNodeMap::removeNamedItemNS):
(WebCore::NamedNodeMap::setNamedItem):
(WebCore::NamedNodeMap::setNamedItemNS):
(WebCore::NamedNodeMap::item):
* dom/NamedNodeMap.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183285 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUnreviewed, rolling out r183266.
commit-queue@webkit.org [Fri, 24 Apr 2015 22:00:18 +0000 (22:00 +0000)]
Unreviewed, rolling out r183266.
https://bugs.webkit.org/show_bug.cgi?id=144164

Broke 32-bit build and a test. (Requested by ap on #webkit).

Reverted changeset:

"AX: richer text change notifications (142719)"
https://bugs.webkit.org/show_bug.cgi?id=142719
http://trac.webkit.org/changeset/183266

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183283 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoREGRESSION: WebKit2.ActionMenusTest API test fails
bfulgham@apple.com [Fri, 24 Apr 2015 21:53:47 +0000 (21:53 +0000)]
REGRESSION: WebKit2.ActionMenusTest API test fails
https://bugs.webkit.org/show_bug.cgi?id=144149
<rdar://problem/20677770>

Reviewed by Tim Horton.

Source/WebKit2:

Tested by TestWebKitAPI

The 'lookupTextAtLocation' method was not converting the NSEvent coordinates it
was receiving from root view to the plugin view. Consequently, full page PDFs
did hit testing correctly, but an <embed> PDF would not.

Since 'existingSelectionContainsPoint' is exposed as API, I also modified it to
expect 'root view' coordinates and perform the requisite conversions, rather
than expecting 'plugin view' coordinates.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::existingSelectionContainsPoint): Expect 'root view' coordinates
for the input.
(WebKit::PDFPlugin::lookupTextAtLocation): Properly convert the passed 'root view'
coordinates to the PDF's view coordinate space.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation): Pass hit point using view coordinates,
not content coordinates.

Tools:

* TestWebKitAPI/Tests/WebKit2/action-menu-targets.html: Revise to use the same test PDF
as the 'ActionMenusPDFTest'.
* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm:
(TestWebKitAPI::TEST): Unskip the PDF portion of ActionMenusTest, and revise its expected output
to match the hit test on the 'action-menu-target.pdf' test file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183282 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoCleanup: Use @memoized for property IOSSimulator.testing_device
dbates@webkit.org [Fri, 24 Apr 2015 21:39:06 +0000 (21:39 +0000)]
Cleanup: Use @memoized for property IOSSimulator.testing_device
https://bugs.webkit.org/show_bug.cgi?id=141715

Reviewed by Darin Adler.

Simplify the caching of the result of IOSSimulator.testing_device
and make the code more readable by making use of the @memoized declarator
instead of explicitly managing a private instance variable,
IOSSimulator._testing_device, for the cached result.

* Scripts/webkitpy/port/ios.py:
(IOSPort.determine_full_port_name):
(IOSSimulatorPort.__init__): Delete instance variable IOSSimulatorPort._testing_device.
(IOSSimulatorPort):
(IOSSimulatorPort.testing_device): No need to cache the created device object in
IOSSimulatorPort._testing_device since we are marking this function @memoized.
(IOSSimulatorPort.reset_preferences): Code style fix; inline self.testing_device.path instead
of caching in local variable since we only make use of this value exactly once in this function.
(IOSPort.__init__): Deleted; The instance variable IOSPort._testing_device has never
been used since being added in r178622. So, we can remove this constructor since
it's the trivial constructor once we remove the instance variable IOSPort._testing_device.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183281 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoOrigin header is preserved on cross-origin redirects.
beidson@apple.com [Fri, 24 Apr 2015 21:09:02 +0000 (21:09 +0000)]
Origin header is preserved on cross-origin redirects.
https://bugs.webkit.org/show_bug.cgi?id=144157.

Reviewed by Sam Weinig.

Source/WebCore:

Tests: http/tests/security/cors-post-redirect-301.html
       http/tests/security/cors-post-redirect-302.html
       http/tests/security/cors-post-redirect-307.html
       http/tests/security/cors-post-redirect-308.html

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::willSendRequest): Always clear any origin header for cross-origin redirects.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::willSendRequest): Ditto.

LayoutTests:

* http/tests/security/cors-post-redirect-301-expected.txt: Added.
* http/tests/security/cors-post-redirect-301.html: Added.
* http/tests/security/cors-post-redirect-302-expected.txt: Added.
* http/tests/security/cors-post-redirect-302.html: Added.
* http/tests/security/cors-post-redirect-307-expected.txt: Added.
* http/tests/security/cors-post-redirect-307.html: Added.
* http/tests/security/cors-post-redirect-308-expected.txt: Added.
* http/tests/security/cors-post-redirect-308.html: Added.
* http/tests/security/resources/cors-post-redirect-target.php: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183280 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoAddress a review comment from Joe Pecoraro.
andersca@apple.com [Fri, 24 Apr 2015 20:55:22 +0000 (20:55 +0000)]
Address a review comment from Joe Pecoraro.

* UIProcess/API/Cocoa/WKWebsiteDataStore.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183279 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoRename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
andersca@apple.com [Fri, 24 Apr 2015 20:48:32 +0000 (20:48 +0000)]
Rename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
https://bugs.webkit.org/show_bug.cgi?id=144158

Reviewed by Beth Dakin.

Source/WebKit2:

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::isPersistent):
(API::WebsiteDataStore::isNonPersistent): Deleted.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore isPersistent]):
(-[WKWebsiteDataStore isNonPersistent]): Deleted.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore isNonPersistent]):
* UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController initWithConfiguration:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183278 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoImmediate action not functional for embedded PDFs
bfulgham@apple.com [Fri, 24 Apr 2015 19:33:10 +0000 (19:33 +0000)]
Immediate action not functional for embedded PDFs
https://bugs.webkit.org/show_bug.cgi?id=143952
<rdar://problem/19842365>

Reviewed by Tim Horton.

Source/WebCore:

Add a dictionary lookup method to allow us to retrieve
relevant information for PDFs.

* editing/mac/DictionaryLookup.mm:
(WebCore::dictionaryLookupForPDFSelection): Updated to properly handle cases
where the Lookup engine selects a smaller range than the initial automatic
selection performed on clicking.

Source/WebKit2:

Add a new method to retrieve appropriate dictionary lookup content and update the
hit test result with relevant dictionary content and the bounding rect of the
selection.

* WebProcess/Plugins/Netscape/NetscapePlugin.h: Add stub.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Initialize plugin type.
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::rectInWindowSpaceForRectInLayoutSpace): New helper function to
convert PDF 'in page' units to the equivalent view units.
(WebKit::PDFPlugin::PDFPlugin): Initialize plugin type.
(WebKit::PDFPlugin::viewRectForSelection): Query a provided PDFSelection for
its bounding rect and return the result in view units.
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp: Initialize plugin type.
* WebProcess/Plugins/PluginProxy.h: Add stub.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewRectForSelection): Added.
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Added.
(WebKit::textIndicatorTransitionForActionMenu): Added helper function.
(WebKit::WebPage::performActionMenuHitTestAtLocation): Update the hit test information
with relevant dictionary lookup content, and mark the result as a text node (if
appropriate).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183277 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state...
jer.noble@apple.com [Fri, 24 Apr 2015 19:15:57 +0000 (19:15 +0000)]
[WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
https://bugs.webkit.org/show_bug.cgi?id=144153

Reviewed by Alexey Proskuryakov.

Check the old state vs. the new state and only issue the change notification if the IsPlayingAudio state changed.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingMediaDidChange):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183276 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoSource/JavaScriptCore:
mmirman@apple.com [Fri, 24 Apr 2015 19:08:01 +0000 (19:08 +0000)]
Source/JavaScriptCore:
Made Object.prototype.__proto__ native getter and setter check that this object not null or undefined
https://bugs.webkit.org/show_bug.cgi?id=141865
rdar://problem/19927273

Reviewed by Filip Pizlo.

* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoGetter):
(JSC::globalFuncProtoSetter):

LayoutTests:
Added tests to ensure that Object.prototype.__proto__ native getter and setter do not coerce undefined to this
https://bugs.webkit.org/show_bug.cgi?id=141865
rdar://problem/19927273

Reviewed by Filip Pizlo.

* js/script-tests/sloppy-getter-setter-global-object.js: Added.
* js/sloppy-getter-setter-global-object-expected.txt: Added.
* js/sloppy-getter-setter-global-object.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183275 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoMake it possible to map a secondary quad through TransformState
simon.fraser@apple.com [Fri, 24 Apr 2015 19:01:48 +0000 (19:01 +0000)]
Make it possible to map a secondary quad through TransformState
https://bugs.webkit.org/show_bug.cgi?id=144156

Reviewed by Dean Jackson.

A future patch will need to map two quads simultaneously through TransformState,
so add the ability to provide an optional secondary quad.

This patch also firms up the setQuad() contract, fixing webkit.org/b/106680,
requiring the state to be flattened when setting the quad (and now, the secondary quad).
Previously, setQuad implicitly flattened but failed to update m_mapPoint when
doing so.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::computeVisibleRect): Now we have to explicitly flatten
before setting the quad.
* platform/graphics/ca/GraphicsLayerCA.h: Drive-up #include removal.
* platform/graphics/transforms/TransformState.cpp:
(WebCore::TransformState::operator=): Copy the secondary quad if we have one.
(WebCore::TransformState::translateMappedCoordinates): Move the secondary quad
if we have one.
(WebCore::TransformState::mappedQuad): Code factored into mapQuad().
(WebCore::TransformState::mappedSecondaryQuad): Return the secondary quad mapped
into the state's current coordinate space.
(WebCore::TransformState::mapQuad): Factored code.
* platform/graphics/transforms/TransformState.h:
(WebCore::TransformState::setQuad): Make the contract more explicit with assertions.
(WebCore::TransformState::setSecondaryQuad): Ditto when setting the secondary quad.
(WebCore::TransformState::lastPlanarSecondaryQuad):
(WebCore::TransformState::lastPlanarQuad): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183274 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoCrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkR...
antti@apple.com [Fri, 24 Apr 2015 18:57:25 +0000 (18:57 +0000)]
CrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkResourceLoader::~NetworkResourceLoader + 14
https://bugs.webkit.org/show_bug.cgi?id=144147

Reviewed by Chris Dumez.

Storage::storeBodyAsBlob copies the std::function callback for handling mapped bodies in a thread.
This is thread safe only if the function copy is thread safe. It is currently not as we are capturing
RefPtr<NetworkResourceLoader> and NetworkResourceLoader doesn't use thread safe refcounting.

Fix by avoiding copying of the callback. Use same apporach for WriteOperation as we already use for
ReadOperation: count the active operations in progress and delete WriteOperation when everything is
finished. This way we don't need to copy the function out from WriteOperation.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
(WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):

    Move definition here from the header.

(WebKit::NetworkCache::Storage::~Storage):
(WebKit::NetworkCache::Storage::storeBodyAsBlob):

    Increment the operation count when storing a blob, call finishWriteOperation when done.

(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::finishReadOperation):

    Count active operations instead of finished operations. This makes the code clearer.

(WebKit::NetworkCache::Storage::dispatchWriteOperation):
(WebKit::NetworkCache::Storage::finishWriteOperation):

    Mirror the way ReadOperations work.

* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::ReadOperation::ReadOperation): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183273 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agofast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemit...
ap@apple.com [Fri, 24 Apr 2015 18:55:26 +0000 (18:55 +0000)]
fast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemite WK2
https://bugs.webkit.org/show_bug.cgi?id=144155

Reviewed by Anders Carlsson.

Cleaned the test up a little, and added logging to collect some information about
why it fails.

* fast/frames/flattening/iframe-flattening-resize-event-count.html:
* fast/frames/flattening/resources/iframe-to-resize.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183272 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[iOS] Reimplement r182512 and r183153 in a cleaner way
mmaxfield@apple.com [Fri, 24 Apr 2015 18:45:10 +0000 (18:45 +0000)]
[iOS] Reimplement r182512 and r183153 in a cleaner way
https://bugs.webkit.org/show_bug.cgi?id=144151

Reviewed by Enrica Casucci.

On iOS, we create FontPlatformData's ctFont() by round tripping it through a CGFontRef.
This causes the resultant ctFont() to lose system-font-ness. Patches r182512 and r183153
react to this fact by making users of a FontPlatformData use the original font passed in
to the FontPlatformData instead of the FontPlatformData's ctFont(), but only if we
detect that the FontPlatformData represents a system font (the underlying APIs have
different behavior for system fonts and non-system-fonts).

However, on OS X, we create a FontPlatformData's ctFont() directly from the original
font passed in to the constructor. This preserves system-font-ness (because it no
longer has the CGFontRef in the middle of the transformation). Therefore, OS X has the
correct behavior regarding system fonts.

The difference between the two ctFont() creation codepaths seems to be historical
rather than intentional. Rather than change all the call sites of ctFont() to use a
different platform font object if a system font is detected, a cleaner solution is to
simply unify the two ctFont() creation codepaths to the version which preserves system-
font-ness. Doing this will make all users of FontPlatformData automatically have the
correct behavior with no updates.

This patch reverts the relevant parts of r182512 and r183153 in favor of this new
solution.

No new tests because there is no behavior change.

* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformWidthForGlyph):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::ctFontSize):
(WebCore::FontPlatformData::ctFont):
* platform/graphics/mac/SimpleFontDataCoreText.cpp:
(WebCore::Font::getCFStringAttributes):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183271 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUnreviewed build fix.
mmaxfield@apple.com [Fri, 24 Apr 2015 18:26:14 +0000 (18:26 +0000)]
Unreviewed build fix.

* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::FontPlatformData):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183270 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[Cocoa] Start cleaning up FontPlatformData
mmaxfield@apple.com [Fri, 24 Apr 2015 18:12:31 +0000 (18:12 +0000)]
[Cocoa] Start cleaning up FontPlatformData
https://bugs.webkit.org/show_bug.cgi?id=144133

Reviewed by Enrica Casucci.

Source/WebCore:

This is the start of a crusade to ultimately remove one of the CTFontRefs which we have inside
FontPlatformData. This patch starts this effort out by removing the FontPlatformData
constructor which accepts an NSFont. This constructor simply casts the NSFont to a CTFontRef,
and forwards to another constructor. This patch moves this cast to callers of this constructor,
thereby enumerating the places we have left that use NSFont with FontPlatformData.

This patch also cleans up two of the constructors in FontPlatformData.cpp to forward on to
a common constructor.

This patch also collects places inside FontPlatformDataCocoa.mm where we check if a pointer is
not 0 and not -1, and puts this common code inside a new function,
FontPlatformData::isValidCTFontRef().

No new tests because there is no behavior change.

* platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData): Coalesce constructors.
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::isValidCTFontRef): Check if a pointer is not 0 and not -1.
(WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformCreateScaledFont): Receive cast which has been hoisted from the deleted
FontPlatformData constructor.
(WebCore::Font::compositeFontReferenceFont): Ditto.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::~FontPlatformData): Use isValidCTFontRef().
(WebCore::FontPlatformData::platformDataInit): Ditto.
(WebCore::FontPlatformData::platformDataAssign): Ditto.
(WebCore::FontPlatformData::platformIsEqual): Simplify preprocessor macros.
(WebCore::FontPlatformData::allowsLigatures): Remove unnecessary NSFont use.
(WebCore::FontPlatformData::FontPlatformData): Deleted.
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Remove unnecessary
NSFont use.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters): Receive cast which has been hoisted from the
deleted FontPlatformData constructor.
(WebCore::FontCache::createFontPlatformData): Ditto.
* platform/mac/DragImageMac.mm:
(WebCore::fontFromNSFont): Ditto.
(WebCore::widthWithFont): Ditto.
(WebCore::drawAtPoint): Ditto.

Source/WebKit/mac:

Receive casts which have been hoisted from the deleted FontPlatformData constructor.

* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]): Receive cast which has
been hoisted from the deleted FontPlatformData constructor.
(-[NSString _web_widthWithFont:]): Ditto.
* Misc/WebStringTruncator.mm:
(fontFromNSFont): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183269 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoREGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
timothy@apple.com [Fri, 24 Apr 2015 18:02:30 +0000 (18:02 +0000)]
REGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
https://bugs.webkit.org/show_bug.cgi?id=144150

Reviewed by Brian Burg.

Source/WebInspectorUI:

* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setTimelineProfilingEnabled): Change !== to === when
checking enabled to isCapturing().

Source/WebKit2:

* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::evaluateCommandOnLoad): Properly treat bools as literals
instead of strings by not using the string version of evaluateCommandOnLoad.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183268 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoAdd headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
andersca@apple.com [Fri, 24 Apr 2015 17:26:08 +0000 (17:26 +0000)]
Add headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=144138

Reviewed by Darin Adler.

* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
(-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183267 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoAX: richer text change notifications (142719)
commit-queue@webkit.org [Fri, 24 Apr 2015 16:49:47 +0000 (16:49 +0000)]
AX: richer text change notifications (142719)
https://bugs.webkit.org/show_bug.cgi?id=142719

Patch by Doug Russell <d_russell@apple.com> on 2015-04-24
Reviewed by Darin Adler.

Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.

Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent, and an overload of postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content selection. Also block posting selection changes on password fields.

Source/WebCore:

Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
       platform/mac/accessibility/selection-change-userinfo.html
       platform/mac/accessibility/value-change-userinfo.html

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::AXObjectCache):
(WebCore::AXObjectCache::notificationPostTimerFired):
(WebCore::AXObjectCache::passwordNotificationPostTimerFired):
(WebCore::AXObjectCache::showIntent):
(WebCore::AXObjectCache::setTextSelectionIntent):
(WebCore::isPasswordFieldOrContainedByPasswordField):
(WebCore::AXObjectCache::postTextStateChangeNotification):
(WebCore::AXObjectCache::postTextReplacementNotification):
(WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
(WebCore::AXObjectCache::rootWebArea):
(WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::postTextStateChangeNotification):
(WebCore::AXObjectCache::postTextReplacementNotification):
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
(WebCore::AXObjectCache::postTextReplacementPlatformNotification):
(WebCore::AXObjectCache::textChangeForEditType):
(WebCore::AXObjectCache::nodeTextChangePlatformNotification):
(WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
(WebCore::AXObjectCache::getOrCreate): Deleted.
(WebCore::AXObjectCache::attachWrapper): Deleted.
* accessibility/AXTextStateChangeIntent.h: Added.
(WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isContainedByPasswordField):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
(WebCore::AccessibilityObject::isPasswordField): Deleted.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setSelectedTextRange):
(WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
* accessibility/AccessibilityScrollView.h:
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::textChangeForEditType):
(WebCore::AXObjectCache::nodeTextChangePlatformNotification):
(WebCore::AXObjectCache::postPlatformNotification): Deleted.
* accessibility/ios/AXObjectCacheIOS.mm:
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
(WebCore::AXObjectCache::postTextReplacementPlatformNotification):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
(WebCore::AXPostNotificationWithUserInfo):
(WebCore::AXObjectCache::postPlatformNotification):
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
(WebCore::textReplacementChangeDictionary):
(WebCore::AXObjectCache::postTextReplacementPlatformNotification):
* accessibility/mac/WebAccessibilityObjectWrapperBase.h:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
(-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
(arrayRemovingNonJSONTypes):
(dictionaryRemovingNonJSONTypes):
(-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(textMarkerRangeFromVisiblePositions):
(-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
* editing/AppendNodeCommand.cpp:
(WebCore::AppendNodeCommand::AppendNodeCommand):
(WebCore::sendAXTextChangedIgnoringLineBreaks):
(WebCore::AppendNodeCommand::doApply):
(WebCore::AppendNodeCommand::doUnapply):
* editing/AppendNodeCommand.h:
(WebCore::AppendNodeCommand::create):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::ApplyStyleCommand):
(WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
* editing/ApplyStyleCommand.h:
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::unapplyEditType):
(WebCore::CompositeEditCommand::CompositeEditCommand):
(WebCore::CompositeEditCommand::apply):
(WebCore::CompositeEditCommand::insertParagraphSeparator):
(WebCore::CompositeEditCommand::insertNodeBefore):
(WebCore::CompositeEditCommand::appendNode):
(WebCore::CompositeEditCommand::removeNodePreservingChildren):
(WebCore::CompositeEditCommand::insertTextIntoNode):
(WebCore::CompositeEditCommand::deleteTextFromNode):
(WebCore::CompositeEditCommand::replaceTextInNode):
(WebCore::CompositeEditCommand::moveParagraphs):
(WebCore::EditCommandComposition::getNodesInCommand): Deleted.
(WebCore::CompositeEditCommand::applyStyle): Deleted.
(WebCore::CompositeEditCommand::insertLineBreak): Deleted.
(WebCore::CompositeEditCommand::insertNodeAt): Deleted.
(WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
(WebCore::CompositeEditCommand::inputText): Deleted.
* editing/CompositeEditCommand.h:
* editing/DeleteFromTextNodeCommand.cpp:
(WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
(WebCore::DeleteFromTextNodeCommand::doApply):
(WebCore::DeleteFromTextNodeCommand::doUnapply):
* editing/DeleteFromTextNodeCommand.h:
(WebCore::DeleteFromTextNodeCommand::create):
(WebCore::DeleteFromTextNodeCommand::deletedText):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
(WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
* editing/DeleteSelectionCommand.h:
(WebCore::DeleteSelectionCommand::create):
* editing/DictationCommand.cpp:
(WebCore::DictationCommand::insertTextRunWithoutNewlines):
(WebCore::DictationCommand::insertParagraphSeparator):
* editing/EditAction.h:
* editing/EditCommand.cpp:
(WebCore::EditCommand::EditCommand):
(WebCore::EditCommand::editingAction):
(WebCore::EditCommand::applyEditType):
(WebCore::EditCommand::unapplyEditType):
(WebCore::SimpleEditCommand::SimpleEditCommand):
(WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
(WebCore::EditCommand::setParent): Deleted.
* editing/EditCommand.h:
* editing/EditingAllInOne.cpp:
* editing/Editor.cpp:
(WebCore::Editor::handleTextEvent):
(WebCore::Editor::deleteSelectionWithSmartDelete):
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::replaceSelectionWithText):
(WebCore::Editor::appliedEditing):
(WebCore::Editor::unappliedEditing):
(WebCore::Editor::performCutOrCopy):
(WebCore::Editor::markMisspellingsAfterTypingToWord):
(WebCore::Editor::changeBackToReplacedString):
(WebCore::Editor::transpose):
(WebCore::Editor::changeSelectionAfterCommand):
* editing/Editor.h:
* editing/EditorCommand.cpp:
(WebCore::executeInsertFragment):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::moveTo):
(WebCore::FrameSelection::moveWithoutValidationTo):
(WebCore::FrameSelection::setSelectionByMouseIfDifferent):
(WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
(WebCore::FrameSelection::setSelection):
(WebCore::FrameSelection::updateAndRevealSelection):
(WebCore::isBoundary):
(WebCore::FrameSelection::textSelectionIntent):
(WebCore::FrameSelection::modify):
(WebCore::FrameSelection::selectAll):
(WebCore::FrameSelection::wordSelectionContainingCaretSelection):
(WebCore::FrameSelection::modifyMovingBackward): Deleted.
(WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
(WebCore::FrameSelection::selectionAtWordStart): Deleted.
* editing/FrameSelection.h:
(WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
(WebCore::FrameSelection::selection): Deleted.
* editing/InsertIntoTextNodeCommand.cpp:
(WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
(WebCore::InsertIntoTextNodeCommand::doApply):
(WebCore::InsertIntoTextNodeCommand::doUnapply):
* editing/InsertIntoTextNodeCommand.h:
(WebCore::InsertIntoTextNodeCommand::create):
(WebCore::InsertIntoTextNodeCommand::insertedText):
* editing/InsertNodeBeforeCommand.cpp:
(WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
(WebCore::InsertNodeBeforeCommand::doApply):
(WebCore::InsertNodeBeforeCommand::doUnapply):
* editing/InsertNodeBeforeCommand.h:
(WebCore::InsertNodeBeforeCommand::create):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
* editing/InsertParagraphSeparatorCommand.h:
(WebCore::InsertParagraphSeparatorCommand::create):
* editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::InsertTextCommand):
* editing/InsertTextCommand.h:
(WebCore::InsertTextCommand::create):
(WebCore::InsertTextCommand::createWithMarkerSupplier):
* editing/MoveSelectionCommand.cpp:
(WebCore::MoveSelectionCommand::doApply):
* editing/RemoveNodePreservingChildrenCommand.cpp:
(WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
* editing/RemoveNodePreservingChildrenCommand.h:
(WebCore::RemoveNodePreservingChildrenCommand::create):
* editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
(WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
(WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
* editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
* editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
(WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
(WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
* editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
(WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
(WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
* editing/ReplaceSelectionCommand.h:
(WebCore::ReplaceSelectionCommand::create):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::insertTextRunWithoutNewlines):
(WebCore::TypingCommand::insertParagraphSeparator):
* editing/atk/FrameSelectionAtk.cpp:
(WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
* editing/ios/DictationCommandIOS.cpp:
(WebCore::DictationCommandIOS::DictationCommandIOS):
* editing/ios/DictationCommandIOS.h:
* editing/mac/FrameSelectionMac.mm:
(WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag):
* page/EventHandler.cpp:
(WebCore::setInitialKeyboardSelection):
* page/FocusController.cpp:
(WebCore::FocusController::advanceFocusInDocumentOrder):

Source/WebKit/mac:

* WebCoreSupport/WebEditorClient.mm:
(undoNameForEditAction):

Source/WebKit2:

* UIProcess/WebEditCommandProxy.cpp:
(WebKit::WebEditCommandProxy::nameForEditAction):

Tools:

* DumpRenderTree/mac/AccessibilityNotificationHandler.h:
* DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
(-[AccessibilityNotificationHandler stopObserving]):
(-[AccessibilityNotificationHandler _notificationReceived:]):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::removeNotificationListener):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
(-[AccessibilityNotificationHandler _notificationReceived:]):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::removeNotificationListener):

LayoutTests:

* platform/mac/accessibility/input-replacevalue-userinfo-expected.txt: Added.
* platform/mac/accessibility/input-replacevalue-userinfo.html: Added.
* platform/mac/accessibility/selection-change-userinfo-expected.txt: Added.
* platform/mac/accessibility/selection-change-userinfo.html: Added.
* platform/mac/accessibility/value-change-userinfo-expected.txt: Added.
* platform/mac/accessibility/value-change-userinfo.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183266 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoConvert OwnPtr and PassOwnPtr uses to std::unique_ptr
darin@apple.com [Fri, 24 Apr 2015 16:38:28 +0000 (16:38 +0000)]
Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=128007

Reviewed by Anders Carlsson.

Source/WebCore:

* PlatformEfl.cmake: Removed OwnPtrCairo source files.
* PlatformGTK.cmake: Ditto.
* PlatformWinCairo.cmake: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.

* platform/CrossThreadCopier.cpp: Removed OwnPtr specialization.
* platform/CrossThreadCopier.h: Ditto.

* platform/ScrollAnimatorNone.cpp: Removed unneeded include.
* platform/ThreadGlobalData.cpp: Ditto.
* platform/ThreadGlobalData.h: Ditto.
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Ditto.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::processNotification): Use unique_ptr.
(WebCore::AVFWrapper::notificationCallback): Use make_unique.
(WebCore::AVFWrapper::platformLayer): Ditto.

* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::appendPathToCairoContext): Use cairo_path_destroy directly
instead of a smart pointer; the code path is simple enough that it is
clear this way.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::ImageBuffer): Use make_unique.
* platform/graphics/cairo/ImageBufferDataCairo.h: Use unique_ptr.

* platform/graphics/cairo/OwnPtrCairo.cpp: Removed.
* platform/graphics/cairo/OwnPtrCairo.h: Removed.

* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::Path): Use cairo_path_destroy directly instead of a
smart pointer; the code path is simple enough that it is clear this way.
(WebCore::Path::operator=): Ditto.
(WebCore::Path::addPath): Ditto.
(WebCore::Path::apply): Ditto.
* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::PlatformContextCairo::clipForPatternFilling): Ditto.

* platform/graphics/freetype/FontCacheFreeType.cpp: Removed unneeded include.
* platform/graphics/glx/GLContextGLX.cpp: Ditto.

* platform/graphics/surfaces/egl/EGLSurface.cpp:
(WebCore::EGLOffScreenSurface::EGLOffScreenSurface): Use make_unique.

* platform/graphics/surfaces/glx/GLXConfigSelector.h:
(WebCore::GLXConfigSelector::findMatchingConfig): Use unique_ptr with X11Deleter.
(WebCore::GLXConfigSelector::findMatchingConfigWithVisualId): Ditto.
* platform/graphics/surfaces/glx/GLXSurface.cpp:
(WebCore::GLXTransportSurface::GLXTransportSurface): Ditto.
(WebCore::GLXOffScreenSurface::initialize): Ditto.

* platform/graphics/surfaces/glx/OwnPtrX11.h: Removed.

* platform/graphics/surfaces/glx/X11Helper.cpp:
(WebCore::X11Helper::createOffScreenWindow): Use unique_ptr with X11Deleter.
(WebCore::X11Helper::createPixmap): Ditto.

* platform/graphics/surfaces/glx/X11Helper.h: Added X11Deleter,
which can be used with unique_ptr to make it call XFree instead of delete.

* platform/graphics/win/FullScreenController.cpp: Use unique_ptr.
(FullScreenController::FullScreenController): Use make_unique.
(FullScreenController::enterFullScreen): Ditto.
* platform/graphics/win/FullScreenController.h: Use unique_ptr.

* platform/graphics/win/GraphicsContext3DWin.cpp: Removed unneeded includes.

* platform/graphics/win/WKCAImageQueue.cpp:
(WebCore::WKCAImageQueue::WKCAImageQueue): Use make_unique.
* platform/graphics/win/WKCAImageQueue.h: Use unique_ptr.

* platform/network/NetworkStorageSessionStub.cpp: Removed unneeded include.

* platform/network/ResourceHandleInternal.h: Use unique_ptr.

* platform/network/curl/MultipartHandle.cpp:
(WebCore::MultipartHandle::create): Deleted.
* platform/network/curl/MultipartHandle.h: Deleted the create function.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback): Use make_unique.

Source/WebKit2:

* NetworkProcess/cache/NetworkCacheEncoder.h: Added an include now
needed that was inherited from OwnPtr.h before.

Source/WTF:

* WTF.vcxproj/WTF.vcxproj: Removed OwnPtr source files.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.

* wtf/Forward.h: Removed OwnPtr and PassOwnPtr.
* wtf/HashTraits.h: Ditto.

* wtf/OwnPtr.h: Removed.
* wtf/OwnPtrCommon.h: Removed.
* wtf/PassOwnPtr.h: Removed.

* wtf/SizeLimits.cpp: Removed OwnPtr.
* wtf/VectorTraits.h: Removed OwnPtr specialization.

Tools:

* DumpRenderTree/win/HistoryDelegate.h: Removed unneeded include.
* DumpRenderTree/win/UIDelegate.h: Ditto.

* TestWebKitAPI/Tests/WTF/HashMap.cpp: Removed OwnPtr-specific test cases.
* TestWebKitAPI/Tests/WTF/HashSet.cpp: Ditto.

* TestWebKitAPI/Tests/WebKit/win/WebViewDestruction.cpp: Removed unneeded include.

* TestWebKitAPI/Tests/WebKit2/UserMessage.cpp: Use unique_ptr.
(TestWebKitAPI::WebKit2UserMessageRoundTripTest::SetUp): Use make_unique.
* TestWebKitAPI/Tests/WebKit2/WillLoad.cpp: Ditto.
(TestWebKitAPI::WebKit2WillLoadTest::SetUp): Ditto.
* TestWebKitAPI/Tests/WebKit2Gtk/DOMDOMWindowTest.cpp:
(WebKitDOMDOMWindowTest::create): Ditto.
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(documentLoadedCallback): Use a queue of DelayedSignal objects instead
of smart pointers to DelayedSIgnal objects.
(uriChangedCallback): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183265 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[Mac] Unreviewed test fix.
bfulgham@apple.com [Fri, 24 Apr 2015 15:44:16 +0000 (15:44 +0000)]
[Mac] Unreviewed test fix.
https://bugs.webkit.org/show_bug.cgi?id=144149

* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm:
(TestWebKitAPI::TEST): Temporarily skip the PDF <embed>
test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183264 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoNetwork Cache: Make path functions members
antti@apple.com [Fri, 24 Apr 2015 14:39:05 +0000 (14:39 +0000)]
Network Cache: Make path functions members
https://bugs.webkit.org/show_bug.cgi?id=144146

Reviewed by Carlos Garcia Campos.

This simplifies the code.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::partitionPathForKey):
(WebKit::NetworkCache::Storage::recordPathForKey):
(WebKit::NetworkCache::Storage::bodyPathForKey):
(WebKit::NetworkCache::Storage::storeBodyAsBlob):
(WebKit::NetworkCache::Storage::remove):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::finishReadOperation):
(WebKit::NetworkCache::Storage::dispatchWriteOperation):
(WebKit::NetworkCache::partitionPathForKey): Deleted.
(WebKit::NetworkCache::recordPathForKey): Deleted.
(WebKit::NetworkCache::bodyPathForKey): Deleted.
* NetworkProcess/cache/NetworkCacheStorage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183263 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[Win] Popup menu is not accessible.
peavo@outlook.com [Fri, 24 Apr 2015 11:42:43 +0000 (11:42 +0000)]
[Win] Popup menu is not accessible.
https://bugs.webkit.org/show_bug.cgi?id=141704

Reviewed by Brent Fulgham.

Get accessibility information for items in popup menus.

* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::onGetObject):
(WebCore::PopupMenuWin::wndProc):
(WebCore::AccessiblePopupMenu::AccessiblePopupMenu):
(WebCore::AccessiblePopupMenu::~AccessiblePopupMenu):
(WebCore::AccessiblePopupMenu::QueryInterface):
(WebCore::AccessiblePopupMenu::AddRef):
(WebCore::AccessiblePopupMenu::Release):
(WebCore::AccessiblePopupMenu::GetTypeInfoCount):
(WebCore::AccessiblePopupMenu::GetTypeInfo):
(WebCore::AccessiblePopupMenu::GetIDsOfNames):
(WebCore::AccessiblePopupMenu::Invoke):
(WebCore::AccessiblePopupMenu::get_accParent):
(WebCore::AccessiblePopupMenu::get_accChildCount):
(WebCore::AccessiblePopupMenu::get_accChild):
(WebCore::AccessiblePopupMenu::get_accName):
(WebCore::AccessiblePopupMenu::get_accValue):
(WebCore::AccessiblePopupMenu::get_accDescription):
(WebCore::AccessiblePopupMenu::get_accRole):
(WebCore::AccessiblePopupMenu::get_accState):
(WebCore::AccessiblePopupMenu::get_accHelp):
(WebCore::AccessiblePopupMenu::get_accKeyboardShortcut):
(WebCore::AccessiblePopupMenu::get_accFocus):
(WebCore::AccessiblePopupMenu::get_accSelection):
(WebCore::AccessiblePopupMenu::get_accDefaultAction):
(WebCore::AccessiblePopupMenu::accSelect):
(WebCore::AccessiblePopupMenu::accLocation):
(WebCore::AccessiblePopupMenu::accNavigate):
(WebCore::AccessiblePopupMenu::accHitTest):
(WebCore::AccessiblePopupMenu::accDoDefaultAction):
(WebCore::AccessiblePopupMenu::put_accName):
(WebCore::AccessiblePopupMenu::put_accValue):
(WebCore::AccessiblePopupMenu::get_accHelpTopic):
* platform/win/PopupMenuWin.h:
* platform/win/ScrollbarThemeWin.h:
(WebCore::ScrollbarThemeWin::hasButtons): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183262 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoMemory cache live resources repeatedly purged during painting
antti@apple.com [Fri, 24 Apr 2015 11:20:10 +0000 (11:20 +0000)]
Memory cache live resources repeatedly purged during painting
https://bugs.webkit.org/show_bug.cgi?id=144104
Source/WebCore:

<rdar://problem/20667695>

Reviewed by Chris Dumez.

On some PLT pages (like nytimes.com) we get into state where painting repeatedly purges live bitmaps.
This slows down page loads significantly.

This might have regressed because improvements in page caching keep more pages and so resources 'live'.

With this path we do all regular cache pruning asynchronously. If memory is really critical
the low memory handling code will still prune synchronously.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::removeClient):
(WebCore::CachedResource::didAccessDecodedData):

    prune() -> pruneSoon()

* loader/cache/MemoryCache.cpp:

    Decrease the pruning size target from 0.95 to 0.8 so we don't need to prune so often.

(WebCore::MemoryCache::needsPruning):

    Factor into a function.

(WebCore::MemoryCache::prune):
(WebCore::MemoryCache::pruneSoon):

    Prune asynchronously.

* loader/cache/MemoryCache.h:

LayoutTests:

Reviewed by Chris Dumez.

* http/tests/cache/disk-cache/disk-cache-vary-cookie.html:

    These clearMemoryCache calls are now done by cache-test.js.

* http/tests/cache/disk-cache/resources/cache-test.js:
(loadResources):

    Make sure to clear the memory cache explicitly in the beginning so we always hit the disk cache.

(runTests):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183261 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUnreviewed, rolling out r183259.
antti@apple.com [Fri, 24 Apr 2015 11:16:34 +0000 (11:16 +0000)]
Unreviewed, rolling out r183259.

Wrong ChangeLog.

Reverted changeset:

"Memory cache live resources repeatedly purged during
painting"
https://bugs.webkit.org/show_bug.cgi?id=144104
http://trac.webkit.org/changeset/183259

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183260 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoSource/WebCore:
antti@apple.com [Fri, 24 Apr 2015 11:05:40 +0000 (11:05 +0000)]
Source/WebCore:
CrashTracer: WebProcess at com.apple.WebCore: WebCore::toScriptElementIfPossible + 4
https://bugs.webkit.org/show_bug.cgi?id=144050

Reviewed by Chris Dumez.

We are seeing null Element pointer crashes with this stack:

47 com.apple.WebCore:  WebCore::toScriptElementIfPossible + 4 <==
47 com.apple.WebCore:  WebCore::ScriptRunner::timerFired + 452
47 com.apple.WebCore:  WebCore::ThreadTimers::sharedTimerFiredInternal + 175

The most likely cause seems to be that this code

    ASSERT(m_pendingAsyncScripts.contains(scriptElement));
    m_scriptsToExecuteSoon.append(m_pendingAsyncScripts.take(scriptElement));

in ScriptRunner::notifyScriptReady fails to find scriptElement and we are left with null entry in
m_scriptsToExecuteSoon. However I haven't managed to repro this or find the exact path how this
could happen. The related code is fragile with lot of state (especially in ScriptElement class)
and involves many opportunities for re-entry via scripts.

No repro, no test case.

* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::timerFired):

    Paper this over by adding a null check. We could check m_pendingAsyncScripts.take() above
    but this also covers possibility this is caused by something else.

LayoutTests:
Memory cache live resources repeatedly purged during painting
https://bugs.webkit.org/show_bug.cgi?id=144104

Reviewed by Chris Dumez.

* http/tests/cache/disk-cache/disk-cache-vary-cookie.html:

    These clearMemoryCache calls are now done by cache-test.js.

* http/tests/cache/disk-cache/resources/cache-test.js:
(loadResources):

    Make sure to clear the memory cache explicitly in the beginning so we always hit the disk cache.

(runTests):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183259 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUnreviewed. Remove incorrect assert after r183189.
carlosgc@webkit.org [Fri, 24 Apr 2015 10:21:13 +0000 (10:21 +0000)]
Unreviewed. Remove incorrect assert after r183189.

In this case the assert was already there, but it's incorrect
because we are handling uninitialized attachments below in the
same function, and also when sending messages. So, if it's ok to
send uninitialized attachments, it's ok to receive them. This
didn't fail before r183189, because we were only invaliding the
attachments by setting the file descriptor to -1, and they were
handled as null attachments. After r183189, the move operator
resets the moved attachment leaving it uninitialized again.

* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::processMessage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183258 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoVersioning.
bshafiei@apple.com [Fri, 24 Apr 2015 07:40:27 +0000 (07:40 +0000)]
Versioning.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183256 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[SOUP] Use a webkit subdirectory for the disk cache
carlosgc@webkit.org [Fri, 24 Apr 2015 07:17:07 +0000 (07:17 +0000)]
[SOUP] Use a webkit subdirectory for the disk cache
https://bugs.webkit.org/show_bug.cgi?id=144048

Reviewed by Martin Robinson.

Source/WebCore:

Add a static method to SoupNetworkSession to clear a soup cache
given its directory.

* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::strIsNumeric):
(WebCore::SoupNetworkSession::clearCache):
* platform/network/soup/SoupNetworkSession.h:

Source/WebKit2:

Recent versions of libsoup remove any file in cache dir not
referenced by the index when the cache is loaded to workaround
leaked resources when load/dump is unbalanced for whatever reason,
like a crash. We currently use $XDG_CACHE_HOME/app-name as default
disk cache directory, but that directory could be used by apps to
cache other things, and the soup cache might end up deleting other
stuff. The soup cache assumes the given directory is only for the
disk cache, so we should ensure that.

* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformInitializeNetworkProcess): Append
webkit to the given disk cache and clear the previous soup cache if it exists.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183255 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUnreviewed. Remove incorrect ASSERT added in r183176.
carlosgc@webkit.org [Fri, 24 Apr 2015 07:05:35 +0000 (07:05 +0000)]
Unreviewed. Remove incorrect ASSERT added in r183176.

We allow to encode null attachments.

* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::Handle::releaseAttachment):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183254 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoRemove a useless branch on DFGGraph::addShouldSpeculateMachineInt()
commit-queue@webkit.org [Fri, 24 Apr 2015 06:36:14 +0000 (06:36 +0000)]
Remove a useless branch on DFGGraph::addShouldSpeculateMachineInt()
https://bugs.webkit.org/show_bug.cgi?id=144118

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-04-23
Reviewed by Geoffrey Garen.

* dfg/DFGGraph.h:
(JSC::DFG::Graph::addShouldSpeculateMachineInt):
Both block do the same thing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183251 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoDisable HAVE_AVKIT on AppleTV
jer.noble@apple.com [Fri, 24 Apr 2015 06:30:16 +0000 (06:30 +0000)]
Disable HAVE_AVKIT on AppleTV
https://bugs.webkit.org/show_bug.cgi?id=144142

Reviewed by Dan Bernstein.

* wtf/Platform.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183250 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoAdded Radar information to Change Log entry
mitz@apple.com [Fri, 24 Apr 2015 05:30:18 +0000 (05:30 +0000)]
Added Radar information to Change Log entry

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183246 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoFixed a bug where framework header postprocessing wasn’t removing WK_DEPRECATED macro...
mitz@apple.com [Fri, 24 Apr 2015 05:27:31 +0000 (05:27 +0000)]
Fixed a bug where framework header postprocessing wasn’t removing WK_DEPRECATED macros when it should have.

Reviewed by Andy Estes.

* mac/postprocess-framework-headers.sh:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183245 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoFix the iOS build after r183234.
aestes@apple.com [Fri, 24 Apr 2015 04:55:43 +0000 (04:55 +0000)]
Fix the iOS build after r183234.

* platform/ios/LegacyTileCache.mm:
(WebCore::LegacyTileCache::commitScaleChange):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183244 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoFix Windows build.
simon.fraser@apple.com [Fri, 24 Apr 2015 04:52:27 +0000 (04:52 +0000)]
Fix Windows build.

* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::setBackingStoreAttached):
(PlatformCALayerWin::backingStoreAttached):
* platform/graphics/ca/win/PlatformCALayerWin.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183243 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoMake it possible to detach GraphicsLayerCA backing store
simon.fraser@apple.com [Fri, 24 Apr 2015 04:36:12 +0000 (04:36 +0000)]
Make it possible to detach GraphicsLayerCA backing store
https://bugs.webkit.org/show_bug.cgi?id=144140

Reviewed by Tim Horton.
Source/WebCore:

This changes makes it possible to denote a GraphicsLayerCA's backing store
as "attached" or not. When not attached, the backing store is made volatile
and can be purged. This will be used in a future patch.

* platform/graphics/ca/GraphicsLayerCA.h: Add updateBackingStoreAttachment().
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm: Stubs. In future, we could
remove backing store on Mac and iOS WK1 too.
(PlatformCALayerMac::setBackingStoreAttached):
(PlatformCALayerMac::backingStoreAttached):

Source/WebKit2:

This changes makes it possible to denote a GraphicsLayerCA's backing store
as "attached" or not. When not attached, the backing store is made volatile
and can be purged. This will be used in a future patch.

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore): Whitespace.
(WebKit::RemoteLayerBackingStore::display): If backingStoreWillBeDisplayed()
returns true, this indicates that the backing store was brought out of the
"unreachable" list, so return true even if the backing store doesn't require
painting.
* Shared/mac/RemoteLayerBackingStoreCollection.h: C++11 initializer, and comments.
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
(WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed): Return true
if the caller will need to submit the backing store in the current transaction.
(WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable): This
explicit dirtying is no longer necessary given the backingStoreWillBeDisplayed() change.
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer): Only set the layer's backing if we both have backing
store, and it's attached.
* Shared/mac/RemoteLayerTreeTransaction.h: New bit, and data member.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction): Only call display()
on the backing store if it's attached.
(WebKit::PlatformCALayerRemote::setBackingStoreAttached):
(WebKit::PlatformCALayerRemote::backingStoreAttached):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183242 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoRemove "layer" from GraphicsLayerCA member function names
simon.fraser@apple.com [Fri, 24 Apr 2015 04:05:58 +0000 (04:05 +0000)]
Remove "layer" from GraphicsLayerCA member function names
https://bugs.webkit.org/show_bug.cgi?id=144139

Reviewed by Myles Maxfield.

Rename "updateLayer*" to "update*" in GraphicsLayerCA.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateNames):
(WebCore::GraphicsLayerCA::updateDrawsContent):
(WebCore::GraphicsLayerCA::updateLayerNames): Deleted.
(WebCore::GraphicsLayerCA::updateLayerDrawsContent): Deleted.
* platform/graphics/ca/GraphicsLayerCA.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183241 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoWeb Inspector: Speculative fix for non-main thread auto-attach failures
commit-queue@webkit.org [Fri, 24 Apr 2015 04:01:12 +0000 (04:01 +0000)]
Web Inspector: Speculative fix for non-main thread auto-attach failures
https://bugs.webkit.org/show_bug.cgi?id=144134

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-23
Reviewed by Timothy Hatcher.

* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::singleton):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183240 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoTry to fix the Windows build after r183234.
aestes@apple.com [Fri, 24 Apr 2015 03:49:12 +0000 (03:49 +0000)]
Try to fix the Windows build after r183234.

* FullscreenVideoController.cpp:
(FullscreenVideoController::FullscreenVideoController): FullscreenVideoController inherits privately from
WebCore::MediaPlayerPrivateFullscreenClient, so make_unique isn't allowed to upcast. Add an explicit upcast.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183239 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoWeb Inspector: run a customizable bootstrap function after the UI has fully loaded
burg@cs.washington.edu [Fri, 24 Apr 2015 03:08:31 +0000 (03:08 +0000)]
Web Inspector: run a customizable bootstrap function after the UI has fully loaded
https://bugs.webkit.org/show_bug.cgi?id=144124

Reviewed by Joseph Pecoraro.

It can be really annoying to click through the Inspector UI dozens of times to debug one
interaction or iterate on a specific widget.

This patch adds a blank "bootstrap" function that can be used to hard-wire commands to
automate repetitive UI state setup. The function is run immediately after the inspector loads.
Setup commands can be shared as bug report reproduction steps.

* UserInterface/Base/Bootstrap.js: Added.
(WebInspector.runBootstrapOperations): Added.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded): Bootstrap after setting up everything and restoring view state from cookie.
* UserInterface/Main.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183238 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoBuild fix after r183232.
rniwa@webkit.org [Fri, 24 Apr 2015 03:06:55 +0000 (03:06 +0000)]
Build fix after r183232.

* public/include/json-header.php:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183237 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago<rdar://problem/20663758> Fix the build after AVPlayerViewController API change
mitz@apple.com [Fri, 24 Apr 2015 03:03:48 +0000 (03:03 +0000)]
<rdar://problem/20663758> Fix the build after AVPlayerViewController API change

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Don’t pass a nil completion
handler to -[AVPlayerViewController exitFullScreenAnimated:completionHandler:].

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183236 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoAllow function allocation sinking
commit-queue@webkit.org [Fri, 24 Apr 2015 02:23:36 +0000 (02:23 +0000)]
Allow function allocation sinking
https://bugs.webkit.org/show_bug.cgi?id=144016

Patch by Basile Clement <basile_clement@apple.com> on 2015-04-23
Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This adds the ability to sink function allocations in the
DFGObjectAllocationSinkingPhase.

In order to enable this, we add a new PhantomNewFunction node that is
used similarily to the PhantomNewObject node, i.e. as a placeholder to replace
a sunk NewFunction and keep track of the allocations that have to be performed
in case of OSR exit after the sunk allocation but before the real one.
The FunctionExecutable and JSLexicalEnvironment (activation) of the function
are stored onto the PhantomNewFunction through PutHints in order for them
to be recovered on OSR exit.

Contrary to sunk object allocations, sunk function allocations do not
support any kind of operations (e.g. storing into a field) ; any such operation
will mark the function allocation as escaping and trigger materialization. As
such, function allocations can only be sunk to places where it would have been
correct to syntactically move them, and we don't need a special
MaterializeNewFunction node to recover possible operations on the function. A
sunk NewFunction node will simply create new NewFunction nodes, then replace
itself with a PhantomNewFunction node.

In itself, this change is not expected to have a significant impact on
performances other than in degenerate cases (see e.g.
JSRegress/sink-function), but it is a step towards being able to sink recursive
closures onces we support CreateActivation sinking as well as allocation cycles
sinking.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToPhantomNewFunction):
(JSC::DFG::Node::isPhantomAllocation):
* dfg/DFGNodeType.h:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::lowerNonReadingOperationsOnPhantomAllocations):
(JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
(JSC::DFG::ObjectAllocationSinkingPhase::createMaterialize):
(JSC::DFG::ObjectAllocationSinkingPhase::populateMaterialize):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGPromotedHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGPromotedHeapLocation.h:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validateCPS):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
* ftl/FTLOperations.cpp:
(JSC::FTL::operationMaterializeObjectInOSR):
* tests/stress/function-sinking-no-double-allocate.js: Added.
(call):
(.f):
(sink):
* tests/stress/function-sinking-osrexit.js: Added.
(.g):
(sink):
* tests/stress/function-sinking-put.js: Added.
(.g):
(sink):

LayoutTests:

Add a new test in JSRegress to check function sinking is being
performed.

* js/regress/script-tests/sink-function.js: Added.
(foo.f1):
(foo.f2):
(foo.f3):
(foo.f4):
(foo.f5):
(foo.f6):
(foo.f7):
(foo.f8):
(foo.f9):
(foo.f10):
(foo.f11):
(foo.f12):
(foo.f13):
(foo.f14):
(foo.f15):
(foo.f16):
(foo.f17):
(foo.f18):
(foo.f19):
(foo):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183235 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoAnother round of removing use of OwnPtr, PassOwnPtr, and deleteOwnedPtr
darin@apple.com [Fri, 24 Apr 2015 02:13:39 +0000 (02:13 +0000)]
Another round of removing use of OwnPtr, PassOwnPtr, and deleteOwnedPtr
https://bugs.webkit.org/show_bug.cgi?id=144090

Reviewed by Anders Carlsson.

Source/WebCore:

* Modules/encryptedmedia/CDMPrivateMediaPlayer.h: Removed unneeded include.

* Modules/navigatorcontentutils/NavigatorContentUtils.h: Removed include of
RefCountedSupplement.h.

* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
Pass data using rvalue references, and use new/delete to pass it across
threads, rather than using PassOwnPtr.
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: Pass data
in an rvalue reference instead of PassOwnPtr.
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::didReceiveBinaryData): Take an rvalue reference
instead of a PassOwnPtr.
* Modules/websockets/WebSocket.h: Ditto.
* Modules/websockets/WebSocketChannel.cpp: Ditto.
(WebCore::WebSocketChannel::processFrame): Ditto.
* Modules/websockets/WebSocketChannelClient.h:
(WebCore::WebSocketChannelClient::didReceiveBinaryData): Ditto.
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
Ditto.
* Modules/websockets/WorkerThreadableWebSocketChannel.h: Ditto.

* WebCore.xcodeproj/project.pbxproj: Removed RefCountedSupplement.h.

* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation): Fixed comment
to not mention adoptPtr.

* page/make_settings.pl:
(generateInternalSettingsHeaderFile): Removed include of RefCountedSupplement.h.

* platform/ColorChooserClient.h: Removed unneded include.
* platform/ContextMenuItem.h: Ditto.

* platform/RefCountedSupplement.h: Removed.

* platform/ScrollAnimator.cpp: Removed unneeded include.
* platform/ScrollAnimatorNone.h: Ditto.

* platform/ThreadGlobalData.cpp: Added now-needed include of PassOwnPtr.h.

* platform/graphics/GlyphMetricsMap.h: Ditto.
* platform/graphics/MediaPlayer.h: Ditto.
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h: Ditto.
* platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Ditto.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Ditto.
* platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Ditto.
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h: Ditto.
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h: Ditto.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: Ditto.

* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer): Use make_unique instead of adoptPtr.
* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::getData): Return a RefPtr instead of a PassRefPtr.
* platform/graphics/cg/ImageBufferDataCG.h: Streamlined the header a bit,
use unique_ptr instead of OwnPtr and RefPtr instead of PassRefPtr.

* platform/graphics/cocoa/IOSurface.h: Use unique_ptr instead of OwnPtr.
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::ensureGraphicsContext): Use make_unique instead of adoptPtr.

* platform/graphics/egl/GLContextEGL.cpp: Removed unneeded includes.
* platform/graphics/filters/FilterOperation.h: Ditto.
* platform/graphics/harfbuzz/HarfBuzzShaper.h: Ditto.
* platform/ios/DeviceMotionClientIOS.h: Ditto.
* platform/ios/DeviceOrientationClientIOS.h: Ditto.

* platform/ios/LegacyTileCache.h: Use unique_ptr instead of OwnPtr.
* platform/ios/LegacyTileCache.mm:
(WebCore::LegacyTileCache::LegacyTileCache): Use make_unique instead of
a create function, and also get rid of unneeded initialization to null.
(WebCore::LegacyTileCache::commitScaleChange): Ditto.

* platform/ios/LegacyTileGrid.h: Made constructor public and got rid of create
function. Made constructor take a reference to the tile cache, and make both
tileCache() and m_tileCache be references too.

* platform/ios/LegacyTileGrid.mm:
(WebCore::LegacyTileGrid::LegacyTileGrid): Updated to use reference.
(WebCore::LegacyTileGrid::visibleRect): Ditto.
(WebCore::LegacyTileGrid::tileByteSize) Ditto.:
(WebCore::LegacyTileGrid::dropDistantTiles): Ditto.
(WebCore::LegacyTileGrid::updateTileOpacity): Ditto.
(WebCore::LegacyTileGrid::updateTileBorderVisibility): Ditto.
(WebCore::LegacyTileGrid::updateHostLayerSize): Ditto.
(WebCore::LegacyTileGrid::invalidateTiles): Ditto.
(WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage): Ditto.
(WebCore::LegacyTileGrid::tileDistance2): Ditto.
(WebCore::LegacyTileGrid::createTiles): Ditto.
* platform/ios/LegacyTileGridTile.mm:
(WebCore::LegacyTileGridTile::LegacyTileGridTile): Ditto.
(WebCore::LegacyTileGridTile::invalidateRect): Ditto.
(WebCore::LegacyTileGridTile::showBorder): Ditto.
* platform/ios/LegacyTileLayer.mm:
(-[LegacyTileHostLayer renderInContext:]): Ditto.
(-[LegacyTileLayer layoutSublayers]): Ditto.
(-[LegacyTileLayer drawInContext:]): Ditto.

* platform/ios/LegacyTileLayerPool.h: Removed unneeded include.
* platform/ios/ScrollAnimatorIOS.mm: Ditto.
* platform/mac/ScrollAnimatorMac.mm: Ditto.
* platform/mac/WebVideoFullscreenController.h: Ditto.
* platform/network/BlobData.cpp: Ditto.

* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::ResourceHandle): Use make_unique instead of adoptPtr.
* platform/network/ResourceHandle.h: Use unique_ptr instead of OwnPtr.

* platform/network/ResourceHandleInternal.h: Added now-needed include.

* platform/network/ResourceResponseBase.h: Removed unneeded includes and
tweaked formatting a bit.

* platform/network/SynchronousLoaderClient.h: Removed the create function and
the private constructor. Used data member initialize to make the default
empty constructor automatically get generated (and be public now).

* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::formFinishFinalizationOnMainThread): Use delete instead of adoptPtr
to delete the context argument.

* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::defaultNetworkStorageSession): Return a unique_ptr& instead of an OwnPtr&.
(WebCore::NetworkStorageSession::switchToNewTestingSession): Use make_unique
instead of adoptPtr.
(WebCore::NetworkStorageSession::defaultStorageSession): Ditto.

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::platformLoadResourceSynchronously): Use a
SynchronousLoaderClient on the stack instead of putting one on the heap with adoptPtr.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::platformLoadResourceSynchronously): Ditto.

* platform/text/TextCodec.h: Removed unneeded include.
* platform/win/CursorWin.cpp: Ditto.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects): Use move instead of release since
we are using RefPtr&& instead of PassRefPtr.

* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::setRenderer): Use RefPtr&& instead of PassRefPtr.
(WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients): Streamlined to use
modern for loops and auto.
(WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients): Ditto.

* rendering/RenderLayerFilterInfo.h: Streamlined code and removed some stuff that
I think is unneeded on iOS; there is no unused private field and I suspect the problem
that led to the warning is gone. Deleted friending of deleteOwnedPtr.

* rendering/RenderLayerMaskImageInfo.cpp: Removed unneeded includes. Moved private
client classes in here from the header and made them members of MaskImageInfo.
Streamlined them a bit in other ways.
(WebCore::RenderLayer::MaskImageInfo::getIfExists): Use nullptr.
(WebCore::RenderLayer::MaskImageInfo::MaskImageInfo): Use member initialization
and also pass the layer in rather than the MaskImageInfo.
(WebCore::RenderLayer::MaskImageInfo::notifyFinished): Deleted. Moved the code
into the SVGDocumentClient.
(WebCore::RenderLayer::MaskImageInfo::imageChanged): Deleted. Moved the code into
the ImageClient.
(WebCore::RenderLayer::MaskImageInfo::updateMaskImageClients): Streamlined a bit
to use a for loop.
(WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients): Ditto.

* rendering/RenderLayerMaskImageInfo.h: Reduced unneeded includes. Got rid of
definitions of private member classes here in the header; they can be in the cpp
file instead. Also cut down from three classes to two, and gave the classes less
redundant names since they are already members of MaskImageInfo. Removed some
unneeded functions and friending of deleteOwnedPtr.

* testing/InternalSettings.cpp: Got rid of comment about RefCountedSupplement
since no code anywhere was using it, so not using it here was not remarkable.

Source/WebKit/win:

* FullscreenVideoController.cpp:
(FullscreenVideoController::FullscreenVideoController):
(FullscreenVideoController::exitFullscreen):
* FullscreenVideoController.h:
* Plugins/PluginView.h:
* Plugins/PluginViewWin.cpp:
(WebCore::PluginView::wndProc):
* WebCoreSupport/AcceleratedCompositingContext.h:
* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::WebChromeClient):
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::WebFrameLoaderClient):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorClient::highlight):
* WebCoreSupport/WebInspectorClient.h:
* WebElementPropertyBag.cpp:
(WebElementPropertyBag::WebElementPropertyBag):
* WebElementPropertyBag.h:
* WebFrame.h:
* WebHistoryItem.cpp:
* WebNodeHighlight.cpp:
* WebNotificationCenter.cpp:
(WebNotificationCenter::WebNotificationCenter):
* WebNotificationCenter.h:
Use make_unique and unique_ptr instead of adoptPtr and OwnPtr.

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm: Removed unneeded include.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183234 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoWeb Inspector: Adopt Object.assign and improve its display in Console
commit-queue@webkit.org [Fri, 24 Apr 2015 02:08:07 +0000 (02:08 +0000)]
Web Inspector: Adopt Object.assign and improve its display in Console
https://bugs.webkit.org/show_bug.cgi?id=144135

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-23
Reviewed by Darin Adler.

* UserInterface/Models/NativeFunctionParameters.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183233 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoPerf dashboard should automatically detect regressions
rniwa@webkit.org [Fri, 24 Apr 2015 01:16:37 +0000 (01:16 +0000)]
Perf dashboard should automatically detect regressions
https://bugs.webkit.org/show_bug.cgi?id=141443

Reviewed by Anders Carlsson.

Added a node.js script detect-changes.js to detect potential regressions and progressions
on the graphs tracked on v2 dashboards.

* init-database.sql: Added analysis_strategies table and task_segmentation and task_test_range
columns to analysis_tasks to keep the segmentation and test range selection strategies used
to create an analysis task.

* public/api/analysis-tasks.php:
(format_task): Include task_segmentation and analysis_tasks in the results.

* public/include/json-header.php:
(remote_user_name): Returns null when the privileged API is authenticated as a slave instead
of a CSRF prevention token.
(should_authenticate_as_slave): Added.
(ensure_privileged_api_data_and_token_or_slave): Added. Authenticate as a slave if slaveName
and slavePassword are specified. Since detect-changes.js and other slaves are not susceptible
to a CSRF attack, we don't need to check a CSRF token.

* public/privileged-api/create-analysis-task.php:
(main): Use ensure_privileged_api_data_and_token_or_slave to let detect-changes.js create new
analysis task. Also add or find segmentation and test range selection strategies if specified.

* public/privileged-api/create-test-group.php:
(main): Use ensure_privileged_api_data_and_token_or_slave.

* public/privileged-api/generate-csrf-token.php:

* public/v2/app.js:
(App.Pane._computeMovingAverageAndOutliers): _executeStrategy has been moved to Statistics.

* public/v2/data.js: Export Measurement, RunsData, TimeSeries. Used in detect-changes.js.
(Array.prototype.find): Added a polyfill to be used in node.js.
(RunsData.fetchRuns):
(RunsData.pathForFetchingRuns): Extracted from fetchRuns. Used in detect-changes.js.
(RunsData.createRunsDataInResponse): Extracted from App.Manifest._formatFetchedData to use it
in detect-changes.js.
(RunsData.unitFromMetricName): Ditto.
(RunsData.isSmallerBetter): Ditto.
(RunsData.prototype._timeSeriesByTimeInternal): Added secondaryTime to sort points when commit
times are identical.
(TimeSeries): When commit times are identical, order points based on build time. This is needed
for when we trigger two builds at two different OS versions with the same WebKit revision since
OS versions don't change the commit times.
(TimeSeries.prototype.findPointByIndex): Added.
(TimeSeries.prototype.rawValues): Added.

* public/v2/js/statistics.js:
(Statistics.TestRangeSelectionStrategies.[0]): Use the 99% two-sided probability as claimed in the
description of this strategy instead of the default probability. Also fixed a bug that debugging
code was referring to non-existent variables.
(Statistics.executeStrategy): Moved from App.Pane (app.js).

* public/v2/manifest.js:
(App.Manifest._formatFetchedData): Various code has been extracted into RunsData in data.js to be
used in detect-changes.js.

* tools/detect-changes.js: Added. The script fetches the manifest JSON, analyzes each graph in
the v2 dashboards, and creates an analysis task for the latest regression or progression detected.
It also schedules an A/B testing if possible and notifies another server; e.g. to send an email.
(main): Loads the settings JSON specified in the argument.
(fetchManifestAndAnalyzeData): The main loop that periodically wakes up to do the analysis.
(mapInOrder): Executes callback sequentially (i.e. blocking) on each item in the array.
(configurationsForTesting): Finds every (platform, metric) pair to analyze in the v2 dashbaords,
and computes various values for when statistically significant changes are detected later.
(analyzeConfiguration): Finds potential regressions and progression in the last X days where X
is the specified maximum number of days using the specified strategies. Sort the resultant ranges
in chronological order and create a new analysis task for the very last change we detected. We'll
eventually create an analysis task for all detected changes since we're repeating the analysis in
fetchManifestAndAnalyzeData after some time.
(computeRangesForTesting): Fetch measured values and compute ranges to test using the specified
segmentation and test range selection strategies. Once ranges are found, find overlapping analysis
tasks as they need to be filtered out in analyzeConfiguration to avoid creating multiple analysis
tasks for the same range (e.g. humans may create one before the script gets to do it).
(createAnalysisTaskAndNotify): Create a new analysis task for the specified range, trigger an A/B
testing if available, and notify another server with a HTML message as specified.
(findStrategyByLabel):
(changeTypeForRange): A change is a regression if values are getting larger in a smaller-is-better
test or values are getting smaller in a larger-is-better test and vice versa.
(summarizeRange): Create a human readable string that summarizes the change detected. e.g.
"Potential 3.2% regression detected between 2015-04-20 12:00 and 17:00".
(formatTimeRange):
(getJSON):
(postJSON):
(postNotification): Recursively replaces $title and $massage in the specified JSON template.
(instantiateNotificationTemplate):
(fetchJSON):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183232 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[iOS] Add a wrapper around the hosted AVPlayerLayer to intercept -setBounds:
jer.noble@apple.com [Thu, 23 Apr 2015 23:43:04 +0000 (23:43 +0000)]
[iOS] Add a wrapper around the hosted AVPlayerLayer to intercept -setBounds:
https://bugs.webkit.org/show_bug.cgi?id=144129

Reviewed by Simon Fraser.

When passing the hosted AVPlayerLayer to the fullscreen controller, the new superlayer will
resize the hosted layer with a call to -setBounds:. But because this is a hosted layer, the
bonuds change has no effect. Instead, wrap the CALayerHost in another CALayer whose job it is
to intercept -setBounds: in the same way that WebAVVideoLayer did. In fact, we should just use
that wrapper class inside WebAVVideoLayer as well, to avoid duplicating code.

Drive-by Fix: Null-check m_videoElement in setVideoLayerFrame().

* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebCALayerHostWrapper setVideoSublayer:]):
(-[WebCALayerHostWrapper videoSublayer]):
(-[WebCALayerHostWrapper setBounds:]): Moved from WebAVVideoLayer.
(-[WebCALayerHostWrapper resolveBounds]): Ditto.
(-[WebAVVideoLayer setBounds:]): Moved to WebCALayerHostWrapper.
(WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Create the wrapper.
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Clear the wrapper.
(-[WebAVVideoLayer resolveBounds]): Deleted. Moved to WebCALayerHostWrapper.
* platform/ios/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::setVideoLayerFrame): Null-check m_videoElement.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183229 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoQuick Look preview popover is not dismissed on scroll in Mail
timothy_horton@apple.com [Thu, 23 Apr 2015 23:18:03 +0000 (23:18 +0000)]
Quick Look preview popover is not dismissed on scroll in Mail
https://bugs.webkit.org/show_bug.cgi?id=144119
<rdar://problem/19752045>

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm:
(-[WKView renewGState]):
If we have a TextIndicator, dismiss all content relative child windows
on renewGState, not just the TextIndicator itself.

This will fix cases like Mail, where WebKit isn't driving the scrolling,
and we have no way (except renewGState) to know that scrolling is happening.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183228 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoYellow highlight has gray background color when invoking Lookup on an address in...
timothy_horton@apple.com [Thu, 23 Apr 2015 23:13:01 +0000 (23:13 +0000)]
Yellow highlight has gray background color when invoking Lookup on an address in a Google Maps drop down
https://bugs.webkit.org/show_bug.cgi?id=138737
<rdar://problem/18904429>

Reviewed by Simon Fraser.

* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
Other RenderObjects don't paint box decorations in the selection painting phase,
so RenderReplaced probably shouldn't either. This fixes the case where, when doing
selection-only painting of a bit of text over top of a RenderReplaced, the RenderReplaced
would paint its background, filling the previously transparent bitmap with an unwanted color.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183227 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoTest compositing/scrolling/touch-scroll-to-clip.html fails in WK1
ap@apple.com [Thu, 23 Apr 2015 23:04:40 +0000 (23:04 +0000)]
Test compositing/scrolling/touch-scroll-to-clip.html fails in WK1
https://bugs.webkit.org/show_bug.cgi?id=144127

* platform/mac-wk1/TestExpectations: Marked it as such.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183226 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUpdate media timeline controls when video is paused..
roger_fong@apple.com [Thu, 23 Apr 2015 23:01:30 +0000 (23:01 +0000)]
Update media timeline controls when video is paused..
https://bugs.webkit.org/show_bug.cgi?id=144122.
<rdar://problem/20422927>

Reviewed by Dean Jackson.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.drawTimelineBackground): Use timelineWidth because offsetWidth is 0 when display: none.
(Controller.prototype.setPlaying): Show controls when pausing.
(Controller.prototype.showControls): Update time and timeline when unhiding controls.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183225 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoChanging TiledBacking velocity should schedule a tile revalidation
simon.fraser@apple.com [Thu, 23 Apr 2015 22:54:02 +0000 (22:54 +0000)]
Changing TiledBacking velocity should schedule a tile revalidation
https://bugs.webkit.org/show_bug.cgi?id=144123

Reviewed by Tim Horton.
Source/WebCore:

Changing the velocity parameters on the TileController affect the computed
coverage rect, so whenever we make a change to velocity data that could
affect the outcome (basically any non-zero old or new velocities),
schedule a layer flush.

* platform/graphics/TiledBacking.h:
(WebCore::VelocityData::velocityOrScaleIsChanging):
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setVelocity):

Source/WebKit2:

Drive-by fix: use the FrameView& that we have already.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183224 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agolldb macro btjs sometimes can't get a frame description
msaboff@apple.com [Thu, 23 Apr 2015 22:52:37 +0000 (22:52 +0000)]
lldb macro btjs sometimes can't get a frame description
https://bugs.webkit.org/show_bug.cgi?id=144130

Reviewed by Filip Pizlo.

We look to execute ExecState::describeFrame().  It appears that in some contexts the
debugger can't find ExecState.  In those cases, CallFrame works as it is a typedef of
ExecState.  Therefore we can fallback to using CallFrame::describeFrame().

* lldb/lldb_webkit.py:
(btjs):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183223 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[GTK] Add more public options
mcatanzaro@igalia.com [Thu, 23 Apr 2015 22:45:59 +0000 (22:45 +0000)]
[GTK] Add more public options
https://bugs.webkit.org/show_bug.cgi?id=144116

Reviewed by Martin Robinson.

Add ENABLE_ICONDATABASE, ENABLE_JIT, and USE_SYSTEM_MALLOC as public options.

* Source/cmake/OptionsGTK.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183222 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[Mac] Disable QTKit by default on future OS X.
jer.noble@apple.com [Thu, 23 Apr 2015 22:43:38 +0000 (22:43 +0000)]
[Mac] Disable QTKit by default on future OS X.
https://bugs.webkit.org/show_bug.cgi?id=144082

Reviewed by Darin Adler.

Source/WebCore:

Settings::gQTKitEnabled defaults to false.

* page/Settings.cpp:

Source/WebKit/mac:

Default WebKitQTKitEnabledPreferenceKey to NO.

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):

Source/WebKit2:

QTKitEnabled defaults to false.

* Shared/WebPreferencesDefinitions.h:

LayoutTests:

Add a required BANDWIDTH field to the alternate playlist.

* http/tests/media/resources/hls/playlist-with-cookie.m3u8:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183221 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[WK2][Mac] Tweak the timing curve of the WebKit Fullscreen animation
jer.noble@apple.com [Thu, 23 Apr 2015 22:40:19 +0000 (22:40 +0000)]
[WK2][Mac] Tweak the timing curve of the WebKit Fullscreen animation
https://bugs.webkit.org/show_bug.cgi?id=144120

Reviewed by Eric Carlson.

Tweak the curve to ease-in faster when the fullscreen animation duration is short.

* UIProcess/mac/WKFullScreenWindowController.mm:
(timingFunctionForDuration):
(zoomAnimation):
(maskAnimation):
(fadeAnimation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183220 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoClean up: Use references instead of pointers in more SVG files
dbates@webkit.org [Thu, 23 Apr 2015 22:34:10 +0000 (22:34 +0000)]
Clean up: Use references instead of pointers in more SVG files
https://bugs.webkit.org/show_bug.cgi?id=144045

Reviewed by Darin Adler.

* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes): Pass reference instead of pointer.

* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::recordTextFragment): Changed parameter textBox from pointer to reference.
(WebCore::SVGTextLayoutEngine::layoutInlineTextBox): Ditto.
(WebCore::SVGTextLayoutEngine::currentVisualCharacterMetrics): Changed parameter textBox from pointer to
reference and made it const since this function does not modify textBox.
(WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath): Changed parameters from pointers to references.
Also, removed comma from comment so that it reads well.
* rendering/svg/SVGTextLayoutEngine.h: Updated declarations for the above functions.

* rendering/svg/SVGTextLayoutEngineBaseline.cpp:
(WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift): Changed parameter style from pointer to reference.
Added case BS_LENGTH to switch block and removed default case so that the compiler checks that we handle all cases.
Renamed parameter contextElement to context since the name of its data type conveys that it is an element.
(WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift): Changed parameter textRenderer from
pointer to reference and removed runtime assertion that textRenderer is non-null (since it well-formed reference
cannot point to a non-existent object).
(WebCore::SVGTextLayoutEngineBaseline::calculateGlyphOrientationAngle): Changed parameter style from pointer to reference
removed runtime assertion that style is non-null.
* rendering/svg/SVGTextLayoutEngineBaseline.h: Updated declarations for the above functions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183219 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoMake the linter stop complaining by fixing the order of fields in TestExpectations
timothy_horton@apple.com [Thu, 23 Apr 2015 22:24:28 +0000 (22:24 +0000)]
Make the linter stop complaining by fixing the order of fields in TestExpectations

* platform/mac/TestExpectations:
Bug number comes first.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183217 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoiOS build fix after r183208.
enrica@apple.com [Thu, 23 Apr 2015 22:20:45 +0000 (22:20 +0000)]
iOS build fix after r183208.

Unreviewed.

* UIProcess/ios/WKContentViewInteraction.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183216 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoWeb Inspector: DebuggerSidebarPanel's _callStackContentTreeOutline should suppress...
timothy@apple.com [Thu, 23 Apr 2015 22:02:45 +0000 (22:02 +0000)]
Web Inspector: DebuggerSidebarPanel's _callStackContentTreeOutline should suppress filtering
https://bugs.webkit.org/show_bug.cgi?id=144114

Reviewed by Joseph Pecoraro.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183215 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoWeb Inspector: Fix layering issues with ApplicationCacheFrameTreeElement
timothy@apple.com [Thu, 23 Apr 2015 22:00:08 +0000 (22:00 +0000)]
Web Inspector: Fix layering issues with ApplicationCacheFrameTreeElement
https://bugs.webkit.org/show_bug.cgi?id=144113

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ApplicationCacheFrameTreeElement.js:
(WebInspector.ApplicationCacheFrameTreeElement.prototype.updateTitles):
(WebInspector.ApplicationCacheFrameTreeElement):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183214 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUnreviewed, rolling out r183194.
commit-queue@webkit.org [Thu, 23 Apr 2015 21:58:48 +0000 (21:58 +0000)]
Unreviewed, rolling out r183194.
https://bugs.webkit.org/show_bug.cgi?id=144121

Made multiple tests flaky (Requested by ap_ on #webkit).

Reverted changeset:

"Memory cache live resources repeatedly purged during
painting"
https://bugs.webkit.org/show_bug.cgi?id=144104
http://trac.webkit.org/changeset/183194

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183213 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoMake FunctionRareData allocation thread-safe
commit-queue@webkit.org [Thu, 23 Apr 2015 21:56:23 +0000 (21:56 +0000)]
Make FunctionRareData allocation thread-safe
https://bugs.webkit.org/show_bug.cgi?id=144001

Patch by Basile Clement <basile_clement@apple.com> on 2015-04-23
Reviewed by Mark Lam.

The two things we want to prevent are:

 1. A thread seeing a pointer to a not-yet-fully-created rare data from
    a JSFunction
 2. A thread seeing a pointer to a not-yet-fully-created Structure from
    an ObjectAllocationProfile

For 1., only the JS thread can be creating the rare data (in
runtime/CommonSlowPaths.cpp or in dfg/DFGOperations.cpp), so we don't need to
worry about concurrent writes, and we don't need any fences when *reading* the
rare data from the JS thread. Thus we only need a storeStoreFence between the
rare data creation and assignment to m_rareData in
JSFunction::createAndInitializeRareData() to ensure that when the store to
m_rareData is issued, the rare data has been properly created.

For the DFG compilation threads, the only place they can access the
rare data is through JSFunction::rareData(), and so we only need a
loadLoadFence there to ensure that when we see a non-null pointer in
m_rareData, the pointed object will be seen as a fully created
FunctionRareData.

For 2., the structure is created in
ObjectAllocationProfile::initialize() (which appears to be called only by the
JS thread as well, in bytecode/CodeBlock.cpp and on rare data initialization,
which always happen in the JS thread), and read through
ObjectAllocationProfile::structure() and
ObjectAllocationProfile::inlineCapacity(), so following the same reasoning we
put a storeStoreFence in ObjectAllocationProfile::initialize() and a
loadLoadFence in ObjectAllocationProfile::structure() (and change
ObjectAllocationProfile::inlineCapacity() to go through
ObjectAllocationProfile::structure()).

We don't need a fence in ObjectAllocationProfile::clear() because
clearing the structure is already as atomic as it gets.

Finally, notice that we don't care about the ObjectAllocationProfile's
m_allocator as that is only used by ObjectAllocationProfile::initialize() and
ObjectAllocationProfile::clear() that are always run in the JS thread.
ObjectAllocationProfile::isNull() could cause some trouble, but it is
currently only used in the ObjectAllocationProfile::clear()'s ASSERT in the JS
thread.  Doing isNull()-style pre-checks would be wrong in any other concurrent
thread anyway.

* bytecode/ObjectAllocationProfile.h:
(JSC::ObjectAllocationProfile::initialize):
(JSC::ObjectAllocationProfile::structure):
(JSC::ObjectAllocationProfile::inlineCapacity):
* runtime/JSFunction.cpp:
(JSC::JSFunction::allocateAndInitializeRareData):
* runtime/JSFunction.h:
(JSC::JSFunction::rareData):
(JSC::JSFunction::allocationStructure): Deleted.
This is no longer used, as all the accesses to the ObjectAllocationProfile go through the rare data.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183212 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUnreviewed. Missed a button in r182900.
roger_fong@apple.com [Thu, 23 Apr 2015 21:33:23 +0000 (21:33 +0000)]
Unreviewed. Missed a button in r182900.

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-wireless-playback-picker-button:active):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183211 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUnreviewed. Just shift some CSS around for code cleanup purposes.
roger_fong@apple.com [Thu, 23 Apr 2015 21:31:01 +0000 (21:31 +0000)]
Unreviewed. Just shift some CSS around for code cleanup purposes.
* Modules/mediacontrols/mediaControlsApple.css:
(video::-webkit-media-controls-panel):
(video::-webkit-media-controls-panel:hover):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183210 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[iOS] WebKit services should inherit environment variables for home
ap@apple.com [Thu, 23 Apr 2015 21:14:56 +0000 (21:14 +0000)]
[iOS] WebKit services should inherit environment variables for home
https://bugs.webkit.org/show_bug.cgi?id=144078
rdar://problem/20571678

Reviewed by Dan Bernstein.

Source/WebCore:

Added an SPI header for a drive-by fix.

* WebCore.xcodeproj/project.pbxproj:
* platform/spi/cf/CFBundleSPI.h: Added.

Source/WebKit2:

Pass current environment variables as XPC bootstrap. Also while at it, made
_CFBundleSetupXPCBootstrap not soft linked.

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
(main):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):

Source/WTF:

* wtf/spi/darwin/XPCSPI.h: Added xpc_copy_bootstrap and xpc_dictionary_apply.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183209 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoSupport share button.
enrica@apple.com [Thu, 23 Apr 2015 21:03:46 +0000 (21:03 +0000)]
Support share button.
https://bugs.webkit.org/show_bug.cgi?id=144077
rdar://problem/19772892

Reviewed by Darin Adler.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _share:]):
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView _define:]):
(-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
(-[WKContentView moveByOffset:]):
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
(-[WKContentView accessoryTab:]):
(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
(-[WKContentView executeEditCommandWithCallback:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183208 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoDFG should insert Phantoms late using BytecodeKills and block-local OSR availability
fpizlo@apple.com [Thu, 23 Apr 2015 20:47:31 +0000 (20:47 +0000)]
DFG should insert Phantoms late using BytecodeKills and block-local OSR availability
https://bugs.webkit.org/show_bug.cgi?id=143735

Reviewed by Geoffrey Garen.

We've always had bugs arising from the fact that we would MovHint something into a local,
and then fail to keep it alive. We would then try to keep things alive by putting Phantoms
on those Nodes that were MovHinted. But this became increasingly tricky. Given the
sophistication of the transformations we are doing today, this approach is just not sound
anymore.

This comprehensively fixes these bugs by having the DFG backend automatically insert
Phantoms just before codegen based on bytecode liveness. To make this practical, this also
makes it much faster to query bytecode liveness.

It's about as perf-neutral as it gets for a change that increases compiler work without
actually optimizing anything. Later changes will remove the old Phantom-preserving logic,
which should then speed us up. I can't really report concrete slow-down numbers because
they are low enough to basically be in the noise. For example, a 20-iteration run of
SunSpider yields "maybe 0.8% slower", whatever that means.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeLivenessAnalysis.cpp:
(JSC::BytecodeLivenessAnalysis::computeFullLiveness):
* bytecode/FullBytecodeLiveness.h:
(JSC::FullBytecodeLiveness::getLiveness):
* bytecode/VirtualRegister.h:
(JSC::VirtualRegister::operator+):
(JSC::VirtualRegister::operator-):
* dfg/DFGForAllKills.h:
(JSC::DFG::forAllLiveNodesAtTail):
(JSC::DFG::forAllKilledOperands):
(JSC::DFG::forAllKilledNodesAtNodeIndex):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::isLiveInBytecode):
(JSC::DFG::Graph::localsLiveInBytecode):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::forAllLocalsLiveInBytecode):
(JSC::DFG::Graph::forAllLiveInBytecode):
* dfg/DFGMayExit.cpp:
(JSC::DFG::mayExit):
* dfg/DFGMovHintRemovalPhase.cpp:
* dfg/DFGNodeType.h:
* dfg/DFGPhantomInsertionPhase.cpp: Added.
(JSC::DFG::performPhantomInsertion):
* dfg/DFGPhantomInsertionPhase.h: Added.
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGScoreBoard.h:
(JSC::DFG::ScoreBoard::sortFree):
(JSC::DFG::ScoreBoard::assertClear):
* dfg/DFGVirtualRegisterAllocationPhase.cpp:
(JSC::DFG::VirtualRegisterAllocationPhase::run):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::buildExitArguments):
* tests/stress/phantom-inadequacy.js: Added.
(bar):
(baz):
(foo):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183207 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[CMake] Some internal variables are not marked as advanced
mcatanzaro@igalia.com [Thu, 23 Apr 2015 20:30:24 +0000 (20:30 +0000)]
[CMake] Some internal variables are not marked as advanced
https://bugs.webkit.org/show_bug.cgi?id=143595

Reviewed by Martin Robinson.

* Source/cmake/FindFreetype2.cmake: Mark internal options as advanced.
* Source/cmake/FindHarfBuzz.cmake: Mark HARFBUZZ_ICU_LIBRARIES as advanced.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183206 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[GTK] Mark as advanced the build options we don't want to expose
mcatanzaro@igalia.com [Thu, 23 Apr 2015 19:59:56 +0000 (19:59 +0000)]
[GTK] Mark as advanced the build options we don't want to expose
https://bugs.webkit.org/show_bug.cgi?id=143558

Reviewed by Martin Robinson.

Mark various options as private instead of public.

* Source/cmake/OptionsGTK.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183205 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUse less memory when compiling content extensions.
commit-queue@webkit.org [Thu, 23 Apr 2015 19:56:57 +0000 (19:56 +0000)]
Use less memory when compiling content extensions.
https://bugs.webkit.org/show_bug.cgi?id=144051

Patch by Alex Christensen <achristensen@webkit.org> on 2015-04-23
Reviewed by Darin Adler and Benjamin Poulain.

Source/WebCore:

No change in functionality, correctness already covered by existing tests.

Before this patch, a DFANode contained a HashSet of transitions.
Large vectors of DFANodes made many small HashSets, which was inefficient use of memory.
We now put all the actions and transitions into one big compact Vector and each node owns ranges in that vector.

* contentextensions/CombinedURLFilters.cpp:
(WebCore::ContentExtensions::recursiveMemoryUsed):
(WebCore::ContentExtensions::CombinedURLFilters::memoryUsed):
* contentextensions/CombinedURLFilters.h:
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
* contentextensions/ContentExtensionsDebugging.h:
* contentextensions/DFA.cpp:
(WebCore::ContentExtensions::DFA::memoryUsed):
(WebCore::ContentExtensions::DFANode::actions):
(WebCore::ContentExtensions::DFANode::transitions):
(WebCore::ContentExtensions::DFANode::fallbackTransitionDestination):
(WebCore::ContentExtensions::DFANode::changeFallbackTransition):
(WebCore::ContentExtensions::DFANode::addFallbackTransition):
(WebCore::ContentExtensions::DFANode::containsTransition):
(WebCore::ContentExtensions::DFANode::kill):
(WebCore::ContentExtensions::DFA::minimize):
(WebCore::ContentExtensions::DFA::DFA): Deleted.
(WebCore::ContentExtensions::DFA::operator=): Deleted.
* contentextensions/DFA.h:
* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
(WebCore::ContentExtensions::DFABytecodeCompiler::compile):
* contentextensions/DFABytecodeCompiler.h:
* contentextensions/DFAMinimizer.cpp:
(WebCore::ContentExtensions::DFAMinimizer::minimize):
* contentextensions/DFAMinimizer.h:
* contentextensions/DFANode.h:
(WebCore::ContentExtensions::DFANode::isKilled):
(WebCore::ContentExtensions::DFANode::hasFallbackTransition):
(WebCore::ContentExtensions::DFANode::hasActions):
(WebCore::ContentExtensions::DFANode::transitionsLength):
(WebCore::ContentExtensions::DFANode::actionsLength):
(WebCore::ContentExtensions::DFANode::actionsStart):
(WebCore::ContentExtensions::DFANode::setActions):
(WebCore::ContentExtensions::DFANode::setTransitions):
(WebCore::ContentExtensions::DFANode::resetTransitions):
(WebCore::ContentExtensions::DFANode::transitionsStart):
(WebCore::ContentExtensions::DFANode::setHasFallbackTransitionWithoutChangingDFA):
* contentextensions/NFA.cpp:
(WebCore::ContentExtensions::NFA::memoryUsed):
* contentextensions/NFA.h:
* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource):
(WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
(WebCore::ContentExtensions::getOrCreateDFANode):
(WebCore::ContentExtensions::NFAToDFA::convert):

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebCore/DFAMinimizer.cpp:
(TestWebKitAPI::countLiveNodes):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183204 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[CMake] Should be possible for an option to depend on multiple options
mcatanzaro@igalia.com [Thu, 23 Apr 2015 19:42:34 +0000 (19:42 +0000)]
[CMake] Should be possible for an option to depend on multiple options
https://bugs.webkit.org/show_bug.cgi?id=143839

Reviewed by Martin Robinson.

Use a list instead of a single variable to track the dependencies of each option. Iterate
over the list as many times as necessary to ensure all options are properly disabled.

* Source/cmake/WebKitFeatures.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183202 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoRename HardPhantom to MustGenerate.
fpizlo@apple.com [Thu, 23 Apr 2015 19:25:10 +0000 (19:25 +0000)]
Rename HardPhantom to MustGenerate.

Rubber stamped by Geoffrey Garen.

We are steadily moving towards Phantom just being a backend hack in the DFG. HardPhantom
is more than that; it's a utility for forcing the execution of otherwise killable nodes.
NodeMustGenerate is the flag we use to indicate that something isn't killable. So this
node should just be called MustGenerate.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDCEPhase.cpp:
(JSC::DFG::DCEPhase::run):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::tryToRelaxRepresentation):
* dfg/DFGIntegerCheckCombiningPhase.cpp:
(JSC::DFG::IntegerCheckCombiningPhase::insertMustAdd):
* dfg/DFGMayExit.cpp:
(JSC::DFG::mayExit):
* dfg/DFGNode.h:
(JSC::DFG::Node::willHaveCodeGenOrOSR):
* dfg/DFGNodeType.h:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
* dfg/DFGPhantomCanonicalizationPhase.cpp:
(JSC::DFG::PhantomCanonicalizationPhase::run):
* dfg/DFGPhantomRemovalPhase.cpp:
(JSC::DFG::PhantomRemovalPhase::run):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):
* dfg/DFGVarargsForwardingPhase.cpp:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183201 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoediting/selection/extend-by-character-007.html should pass on OS X 10.10.3.
ap@apple.com [Thu, 23 Apr 2015 18:58:04 +0000 (18:58 +0000)]
editing/selection/extend-by-character-007.html should pass on OS X 10.10.3.

Updated the results to match what we get in 10.10.3, and marked as passing.

* editing/selection/extend-by-character-007-expected.txt: Removed.
* platform/mac/TestExpectations:
* platform/mac/editing/selection/extend-by-character-007-expected.png: Added.
* platform/mac/editing/selection/extend-by-character-007-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183200 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoImplement `Object.assign`
commit-queue@webkit.org [Thu, 23 Apr 2015 18:44:16 +0000 (18:44 +0000)]
Implement `Object.assign`
https://bugs.webkit.org/show_bug.cgi?id=143980

Patch by Jordan Harband <ljharb@gmail.com> on 2015-04-23
Reviewed by Filip Pizlo.

Source/JavaScriptCore:

per https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign

* builtins/ObjectConstructor.js: Added.
(assign):
* runtime/CommonIdentifiers.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/ObjectConstructor.cpp:
* runtime/ObjectConstructor.h:

LayoutTests:

* js/Object-assign-expected.txt: Added.
* js/Object-assign.html: Added.
* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-assign.js: Added.
* js/script-tests/Object-getOwnPropertyNames.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183199 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoDon't fire a bunch of mouse moveds during scrolling.
hyatt@apple.com [Thu, 23 Apr 2015 18:41:10 +0000 (18:41 +0000)]
Don't fire a bunch of mouse moveds during scrolling.
https://bugs.webkit.org/show_bug.cgi?id=99940

Reviewed by Simon Fraser.

* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
Even for the short interval timer, make sure to cancel and restart it instead of allowing the original to
complete. This has the effect of preventing fake mouse moves from firing until the scroll stops.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183198 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUnreviewed, fix the release build.
eric.carlson@apple.com [Thu, 23 Apr 2015 18:40:08 +0000 (18:40 +0000)]
Unreviewed, fix the release build.

* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Add an UNUSED_PARAM.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183197 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoRemove m_isPageTiledBackingLayer data member from GraphicsLayerCA, just use the layer...
simon.fraser@apple.com [Thu, 23 Apr 2015 17:59:58 +0000 (17:59 +0000)]
Remove m_isPageTiledBackingLayer data member from GraphicsLayerCA, just use the layer type instead
https://bugs.webkit.org/show_bug.cgi?id=144108

Reviewed by Dean Jackson.

No need for the m_isPageTiledBackingLayer data member. We can just check the layer
type instead.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::initialize):
(WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
(WebCore::GraphicsLayerCA::updateContentsScale):
(WebCore::GraphicsLayerCA::getDebugBorderInfo):
(WebCore::GraphicsLayerCA::requiresTiledLayer):
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::isPageTiledBackingLayer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183196 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoContent extension with oft-repeated rules can cause slowdown.
beidson@apple.com [Thu, 23 Apr 2015 17:52:21 +0000 (17:52 +0000)]
Content extension with oft-repeated rules can cause slowdown.
rdar://problem/20618511 and https://bugs.webkit.org/show_bug.cgi?id=144010

Reviewed by Alex Christensen.

No new tests (Behavior covered by existing tests).

* WebCore.xcodeproj/project.pbxproj:

* contentextensions/ContentExtension.cpp:
(WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):

Add the String identifier for the extension and the rule action ID to Actions:
* contentextensions/ContentExtensionRule.cpp:
(WebCore::ContentExtensions::Action::deserialize):
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::Action::Action):
(WebCore::ContentExtensions::Action::operator==):
(WebCore::ContentExtensions::Action::setExtensionIdentifier):
(WebCore::ContentExtensions::Action::extensionIdentifier):
(WebCore::ContentExtensions::Action::actionID):
(WebCore::ContentExtensions::Action::type): Deleted.

Object to manage a CSSStyleSheet and selectors identified by ID:
* contentextensions/ContentExtensionStyleSheet.cpp:
(WebCore::ContentExtensions::ContentExtensionStyleSheet::ContentExtensionStyleSheet):
(WebCore::ContentExtensions::ContentExtensionStyleSheet::addDisplayNoneSelector):
* contentextensions/ContentExtensionStyleSheet.h:
(WebCore::ContentExtensions::ContentExtensionStyleSheet::create):
(WebCore::ContentExtensions::ContentExtensionStyleSheet::styleSheet):

Instead of globbing selectors together into a String and making a new stylesheet,
add new unique selectors to an already existing sheet:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):

* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::addDisplayNoneSelector):
(WebCore::DocumentStyleSheetCollection::addContentExtensionUserSheet): Deleted.
* dom/DocumentStyleSheetCollection.h:

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::commitData):
(WebCore::DocumentLoader::addPendingContentExtensionDisplayNoneSelector):
(WebCore::DocumentLoader::addPendingContentExtensionSheet): Deleted.
* loader/DocumentLoader.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183195 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoMemory cache live resources repeatedly purged during painting
antti@apple.com [Thu, 23 Apr 2015 17:48:37 +0000 (17:48 +0000)]
Memory cache live resources repeatedly purged during painting
https://bugs.webkit.org/show_bug.cgi?id=144104
<rdar://problem/20667695>

Reviewed by Chris Dumez.

On some PLT pages (like nytimes.com) we get into state where painting repeatedly purges live bitmaps.
This slows down page loads significantly.

This might have regressed because improvements in page caching keep more pages and so resources 'live'.

With this path we do all regular cache pruning asynchronously. If memory is really critical
the low memory handling code will still prune synchronously.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::removeClient):
(WebCore::CachedResource::didAccessDecodedData):

    prune() -> pruneSoon()

* loader/cache/MemoryCache.cpp:

    Decrease the pruning size target from 0.95 to 0.8 so we don't need to prune so often.

(WebCore::MemoryCache::needsPruning):

    Factor into a function.

(WebCore::MemoryCache::prune):
(WebCore::MemoryCache::pruneSoon):

    Prune asynchronously.

* loader/cache/MemoryCache.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183194 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[CMake] ENABLE_THREADED_COMPOSITOR should not be at the bottom of the options list
mcatanzaro@igalia.com [Thu, 23 Apr 2015 17:31:30 +0000 (17:31 +0000)]
[CMake] ENABLE_THREADED_COMPOSITOR should not be at the bottom of the options list
https://bugs.webkit.org/show_bug.cgi?id=144103

Reviewed by Martin Robinson.

Just move ENABLE_THREADED_COMPOSITOR so it's alphabetized properly.

* Source/cmake/WebKitFeatures.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183193 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[GTK] Fixups for ENABLE_CREDENTIAL_STORAGE
mcatanzaro@igalia.com [Thu, 23 Apr 2015 17:29:34 +0000 (17:29 +0000)]
[GTK] Fixups for ENABLE_CREDENTIAL_STORAGE
https://bugs.webkit.org/show_bug.cgi?id=144102

Reviewed by Martin Robinson.

Use WEBKIT_OPTION_DEFAULT_PORT_VALUE to set ENABLE_CREDENTIAL_STORAGE instead of doing so
manually. Fail the build if libsecret is not found but ENABLE_CREDENTIAL_STORAGE is set.
Also, do not set ENABLE_CREDENTIAL_STORAGE redundantly.

* Source/cmake/OptionsGTK.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183192 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUnreviewed, temporarily skip http/tests/websocket/tests/hybi/stop-on-resume-in-error...
cdumez@apple.com [Thu, 23 Apr 2015 17:16:40 +0000 (17:16 +0000)]
Unreviewed, temporarily skip http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler.html on Windows.

It often crashes on Windows.

* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183191 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoUndo the WTF part of the previous build fix, we don't use private headers in WTF.
ap@apple.com [Thu, 23 Apr 2015 16:56:25 +0000 (16:56 +0000)]
Undo the WTF part of the previous build fix, we don't use private headers in WTF.

* WTF.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183190 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years ago[UNIX] Do not allow copies of IPC::Attachment
carlosgc@webkit.org [Thu, 23 Apr 2015 16:53:05 +0000 (16:53 +0000)]
[UNIX] Do not allow copies of IPC::Attachment
https://bugs.webkit.org/show_bug.cgi?id=144096

Reviewed by Darin Adler.

It ensures that the file descriptor ownership is always correctly
transferred. This way we can remove the dispose() method to
explicitly close the file descriptor and always close it in the
Attachment destructor (unless explicitly transferred to
IPC::Connection or SharedMemory). It simplifies the code and
ensure we don't leak file descriptors.

* Platform/IPC/ArgumentDecoder.cpp:
(IPC::ArgumentDecoder::~ArgumentDecoder): Remove the code to
explicitly dispose attachments.
(IPC::ArgumentDecoder::removeAttachment): Use WTF::move().
* Platform/IPC/ArgumentEncoder.cpp:
(IPC::ArgumentEncoder::~ArgumentEncoder): Remove the code to
explicitly dispose attachments.
(IPC::ArgumentEncoder::addAttachment): Use WTF::move().
(IPC::ArgumentEncoder::releaseAttachments): Simplify by using WTF::move().
* Platform/IPC/ArgumentEncoder.h:
* Platform/IPC/Attachment.cpp:
(IPC::Attachment::encode): Move a copy of the attachment, and
reset the file descriptor, since the ownership is passed to the encoder.
* Platform/IPC/Attachment.h: Make copy constructor and assignment
private to not allow public copies. The only copy allowed is done
by Attachment::encode(). Make m_fileDescriptor mutable so that we
can reset it in Attachment::encode() after passing the ownership
to the encoder.
* Platform/IPC/unix/AttachmentUnix.cpp:
(IPC::Attachment::~Attachment): Close the file descriptor if it
hasn't been released explicitly.
(IPC::Attachment::dispose): Deleted.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::processMessage): Do not use AttachmentResourceGuard.
(IPC::Connection::sendOutgoingMessage): Ditto.
(IPC::AttachmentResourceGuard::AttachmentResourceGuard): Deleted.
(IPC::AttachmentResourceGuard::~AttachmentResourceGuard): Deleted.
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::Handle::~Handle): Do not call clear().
(WebKit::SharedMemory::Handle::clear): Reset the attachment.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage): Use WTF::move().
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
Call releaseFileDescriptor() instead of fileDescritpro() since the
ownership is passed to the connection.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183189 268f45cc-cd09-0410-ab3c-d52691b4dbfc