Timeline



Mar 23, 2015:

11:47 PM Changeset in webkit [181888] by yoav@yoav.ws
  • 6 edits
    10 adds
    9 deletes in trunk

Update empty image canvas tests and fix a related bug
https://bugs.webkit.org/show_bug.cgi?id=142694

Reviewed by Chris Dumez.

Source/WebCore:

During the work on https://bugs.webkit.org/show_bug.cgi?id=142677
we encountered an issue with canvas tests related to empty image handling
when drawn or used as a pattern. After updating these tests, an issue with
pattern handling was encountered.

The spec, as well as Chrome's implementation, say that when an empty image
is used as a pattern, createPattern should return null. See
https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles:check-the-usability-of-the-image-argument
Instead, createPattern returned an exception in this case.
This patch fixes that and makes sure that it returns a null when image loading hasn't started.

Tests: canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html

canvas/philip/tests/2d.drawImage.incomplete.nosrc.html
canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html
canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html
canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::createPattern): Return "null" if image is not fully decodeable.

LayoutTests:

Tests below imported from https://github.com/w3c/web-platform-tests/tree/master/2dcontext/drawing-images-to-the-canvas

  • canvas/philip/tests/2d.drawImage.incomplete-expected.txt: Removed.
  • canvas/philip/tests/2d.drawImage.incomplete.emptysrc-expected.txt: Added.
  • canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html: Added.
  • canvas/philip/tests/2d.drawImage.incomplete.html: Removed.
  • canvas/philip/tests/2d.drawImage.incomplete.nosrc-expected.txt: Added.
  • canvas/philip/tests/2d.drawImage.incomplete.nosrc.html: Added.
  • canvas/philip/tests/2d.drawImage.incomplete.removedsrc-expected.txt: Added.
  • canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html: Added.

Tests below imported from https://github.com/w3c/web-platform-tests/tree/master/2dcontext/fill-and-stroke-styles

  • canvas/philip/tests/2d.pattern.image.incomplete-expected.txt: Removed.
  • canvas/philip/tests/2d.pattern.image.incomplete.empty-expected.txt: Removed.
  • canvas/philip/tests/2d.pattern.image.incomplete.empty.html: Removed.
  • canvas/philip/tests/2d.pattern.image.incomplete.emptysrc-expected.txt: Added.
  • canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html: Added.
  • canvas/philip/tests/2d.pattern.image.incomplete.html: Removed.
  • canvas/philip/tests/2d.pattern.image.incomplete.omitted-expected.txt: Removed.
  • canvas/philip/tests/2d.pattern.image.incomplete.omitted.html: Removed.
  • canvas/philip/tests/2d.pattern.image.incomplete.removedsrc-expected.txt: Added.

This test currently fails and will be fixed in https://bugs.webkit.org/show_bug.cgi?id=142677

  • canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html: Added.

Test below imported from https://chromium.googlesource.com/chromium/blink/+/master/LayoutTests/fast/canvas/

  • fast/canvas/canvas-empty-image-pattern.html: Aligned with spec/Chrome.
  • fast/canvas/canvas-empty-image-pattern-expected.txt: Aligned with spec/Chrome.
  • TestExpectations: Added 2d.pattern.image.incomplete.removedsrc.html as an expected failure.
10:37 PM Changeset in webkit [181887] by fpizlo@apple.com
  • 15 edits in trunk/Source

JSC should have a low-cost asynchronous disassembler
https://bugs.webkit.org/show_bug.cgi?id=142997

Reviewed by Mark Lam.
Source/JavaScriptCore:


This adds a JSC_asyncDisassembly option that disassembles on a thread. Disassembly
doesn't block execution. Some code will live a little longer because of this, since the
work tasks hold a ref to the code, but other than that there is basically no overhead.

At present, this isn't really a replacement for JSC_showDisassembly, since it doesn't
provide contextual IR information for Baseline and DFG disassemblies, and it doesn't do
the separate IR dumps for FTL. Using JSC_showDisassembly and friends along with
JSC_asyncDisassembly has bizarre behavior - so just choose one.

A simple way of understanding how great this is, is to run a small benchmark like
V8Spider/earley-boyer.

Performance without any disassembly flags: 60ms
Performance with JSC_showDisassembly=true: 477ms
Performance with JSC_asyncDisassembly=true: 65ms

So, the overhead of disassembly goes from 8x to 8%.

Note that JSC_asyncDisassembly=true does make it incorrect to run "time" as a way of
measuring benchmark performance. This is because at VM exit, we wait for all async
disassembly requests to finish. For example, for earley-boyer, we spend an extra ~130ms
after the benchmark completely finishes to finish the disassemblies. This small weirdness
should be OK for the intended use-cases, since all you have to do to get around it is to
measure the execution time of the benchmark payload rather than the end-to-end time of
launching the VM.

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::finalizeCodeWithDisassembly):

  • assembler/LinkBuffer.h:

(JSC::LinkBuffer::wasAlreadyDisassembled):
(JSC::LinkBuffer::didAlreadyDisassemble):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::disassemble):

  • dfg/DFGJITFinalizer.cpp:

(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):

  • disassembler/Disassembler.cpp:

(JSC::disassembleAsynchronously):
(JSC::waitForAsynchronousDisassembly):

  • disassembler/Disassembler.h:
  • ftl/FTLCompile.cpp:

(JSC::FTL::mmAllocateDataSection):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • jit/JIT.cpp:

(JSC::JIT::privateCompile):

  • jsc.cpp:
  • runtime/Options.h:
  • runtime/VM.cpp:

(JSC::VM::~VM):

Source/WTF:

  • wtf/StringPrintStream.h:
6:48 PM Changeset in webkit [181886] by fpizlo@apple.com
  • 1 edit
    2 copies
    1 move
    2 adds in trunk/LayoutTests

Move the bulk of the js/dom/const test into js/const, so that run-jsc-stress-tests runs it.

Rubber stamped by Andreas Kling and Michael Saboff.

  • js/const-expected.txt: Copied from LayoutTests/js/dom/const-expected.txt.
  • js/const.html: Copied from LayoutTests/js/dom/const.html.
  • js/dom/const-expected.txt: Replaced.
  • js/dom/const.html: Replaced.
  • js/resources/const.js: Removed.
  • js/script-tests/const.js: Copied from LayoutTests/js/resources/const.js.
6:28 PM Changeset in webkit [181885] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebKit2

Unreviewed, another attempt to fix 32-bit build after r181881.

  • UIProcess/WebInspectorProxy.h:
6:12 PM Changeset in webkit [181884] by Joseph Pecoraro
  • 3 edits in trunk/Source/WebKit2

Unreviewed, attempt to fix 32-bit build after r181881.

  • UIProcess/API/Cocoa/WKViewPrivate.h:
  • UIProcess/API/mac/WKView.mm:
6:01 PM Changeset in webkit [181883] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

Fix api tests after r181876.

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
Always append a CSSDisplayNoneStyleSheet action if no ignore-previous-rules is seen.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):
Changed an assertion to a null check.

5:44 PM Changeset in webkit [181882] by dino@apple.com
  • 6 edits in trunk/Source/WebCore

Timelines are sharing the same canvas background
https://bugs.webkit.org/show_bug.cgi?id=142994
<rdar://problem/20209466>

Reviewed by Brent Fulgham.

Since each MediaControl lives in an isolated world, we
can't rely on a global variable to provide a unique
identifier for a named canvas. The fix is to expose
WebCore's UUID generator, and have each canvas use
that for a name.

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::generateUUID): New method on the
MediaControlsHost that generates a UUID.

  • Modules/mediacontrols/MediaControlsHost.h:
  • Modules/mediacontrols/MediaControlsHost.idl:
  • Modules/mediacontrols/mediaControlsApple.js: Remove the global

variable unique ID that wasn't working, and instead get
an ID from the MediaControlsHost.
(Controller.prototype.createControls):

  • Modules/mediacontrols/mediaControlsiOS.js:

(ControllerIOS):

4:42 PM Changeset in webkit [181881] by timothy@apple.com
  • 7 edits in trunk/Source/WebKit2

Web Inspector: Support attaching to another view other than the WKView
https://bugs.webkit.org/show_bug.cgi?id=142892

Reviewed by Tim Horton.

  • UIProcess/API/C/WKInspector.cpp:

(WKInspectorAttach): Drive by fix so it used the last attachment side.

  • UIProcess/API/Cocoa/WKViewPrivate.h:
  • UIProcess/API/mac/WKView.mm:

(-[WKView _inspectorAttachmentView]): Added.
(-[WKView _setInspectorAttachmentView:]): Added.

  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::attachAvailabilityChanged):
Use platformCanAttach as a final check incase there is a different
attachment view that the platform knows about.

  • UIProcess/WebInspectorProxy.h:

(WebKit::WebInspectorProxy::attachmentSide): Added.
(WebKit::WebInspectorProxy::platformCanAttach): Added.

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::attachmentViewDidChange): Added.
(WebKit::WebInspectorProxy::closeTimerFired):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformCanAttach):
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
(WebKit::WebInspectorProxy::platformInspectedWindowHeight):
(WebKit::WebInspectorProxy::platformInspectedWindowWidth):
(WebKit::WebInspectorProxy::platformAttach):
(WebKit::WebInspectorProxy::platformDetach):
Use the _inspectorAttachmentView and change how the frame change notification
is observed and follow the attachment view as it changes.

3:56 PM Changeset in webkit [181880] by Brent Fulgham
  • 2 edits in trunk/Tools

Regression(r181257): WTF_WorkQueue.Simple is flaky
https://bugs.webkit.org/show_bug.cgi?id=142560

Remove the check that the refCount has returned to one after the
individual tasks have completed. It's too nondeterministic when
the reference count will be reduced.

Reviewed by Alexey Proskuryakov

  • TestWebKitAPI/Tests/WTF/WorkQueue.cpp:

(TestWebKitAPI::TEST): Remove test that refCount is back to 1.

3:52 PM Changeset in webkit [181879] by Brent Fulgham
  • 7 edits in trunk/Source/WebCore

Scroll latching logic can get stuck in 'scrollable="no"' iframes
https://bugs.webkit.org/show_bug.cgi?id=142789
<rdar://problem/20129494>

Reviewed by Dean Jackson.

Clean up the EventHandler and latching code as follows:
(1) Do not handle iframe elements as part of the normal latching logic. Instead, iframes should

be evaluated during the 'platformCompleteWheelEvent' phase of processing as top-level scrolling
frames.

(2) Get rid of the ill-conceived notation that we should process non-mainframe and main-frame frames

different.

(3) Modify code to reflect that the scroll latching code really deals with overflow scrolling. Consequently,

the 'findEnclosingScrollableContainer' was renamed to 'findEnclosingOverflowScroll' and does not
treat iframe as a suitable target.

(4) Do not create a latching state object when the container being evaluated is already scrolled to the

extreme position in the direction of the mouse gesture. In this case, we want the enclosing frame
to be the latching target.

(5) Do not treat the state where the mouse wheel gesture has ended manual scrolling, but has not ended

momentum scrolling, as an appropriate time to select a latching target.

  • page/EventHandler.cpp:

(WebCore::EventHandler::platformCompleteWheelEvent): Modify signature to remove unneeded argument.
(WebCore::EventHandler::handleWheelEvent): Modify call to 'platformCompleteWheelEvent' to remove unused argument.

  • page/EventHandler.h:
  • page/mac/EventHandlerMac.mm:

(WebCore::findEnclosingOverflowScroll): Renamed from 'findEnclosingScrollableContainer' and revised per the
notes above.
(WebCore::EventHandler::platformPrepareForWheelEvents): Remove mainFrame vs. non-mainFrame code paths and
consolidate logic.
(WebCore::EventHandler::platformCompleteWheelEvent): Remove unused argument. The wheel event target is no
longer needed here, now that iframes are not processed by this code.
(WebCore::findEnclosingScrollableContainer): Deleted.

  • page/scrolling/ScrollLatchingState.cpp:

(WebCore::ScrollLatchingState::setPreviousWheelScrolledElement:) Switch to move operator for passing
a temporary RefPtr to the the function.

  • page/scrolling/ScrollLatchingState.h:
  • platform/PlatformWheelEvent.h:

(WebCore::PlatformWheelEvent::useLatchedEventElement): Recognize 'phase=ended, momentum=none' as a state
that should not cause latching state to be revised.

3:50 PM Changeset in webkit [181878] by andersca@apple.com
  • 2 edits in trunk/Source/WebCore

Try to fix the iOS build.

  • platform/network/mac/CookieJarMac.mm:
3:49 PM Changeset in webkit [181877] by aestes@apple.com
  • 10 edits in trunk/LayoutTests

[Content Filtering] Fix up a few mistakes in LayoutTests/contentfiltering/
https://bugs.webkit.org/show_bug.cgi?id=142991

Reviewed by Andreas Kling.

  • contentfiltering/allow-after-add-data-expected.html: Added HTML5 doctype.
  • contentfiltering/allow-after-finished-adding-data-expected.html: Ditto.
  • contentfiltering/allow-after-response-expected.html: Ditto.
  • contentfiltering/allow-after-unblock-request-expected.html: Ditto.
  • contentfiltering/block-after-add-data-expected.html: Ditto.
  • contentfiltering/block-after-finished-adding-data-expected.html: Ditto.
  • contentfiltering/block-after-response-expected.html: Ditto.
  • contentfiltering/block-after-unblock-request-expected.html: Ditto.
  • contentfiltering/resources/contentfiltering.js: Added a newline at the end of the file.
3:36 PM WebKitGTK/2.6.x edited by Michael Catanzaro
add two notes (diff)
3:34 PM Changeset in webkit [181876] by beidson@apple.com
  • 18 edits
    1 copy
    1 add in trunk

Content extensions should apply css selectors
https://bugs.webkit.org/show_bug.cgi?id=142604

Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/tests/contentextensions/css-display-none.html

  • WebCore.xcodeproj/project.pbxproj:
  • contentextensions/ContentExtension.cpp:

(WebCore::ContentExtensions::ContentExtension::create):
(WebCore::ContentExtensions::ContentExtension::ContentExtension):
(WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):

  • contentextensions/ContentExtension.h:

(WebCore::ContentExtensions::ContentExtension::identifier):
(WebCore::ContentExtensions::ContentExtension::compiledExtension):

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):

  • contentextensions/ContentExtensionsBackend.h:
  • contentextensions/DFABytecodeInterpreter.cpp:

(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):

  • dom/DocumentStyleSheetCollection.cpp:

(WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet):

  • dom/DocumentStyleSheetCollection.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::commitData):
(WebCore::DocumentLoader::startLoadingMainResource):
(WebCore::DocumentLoader::addPendingContentExtensionSheet):

  • loader/DocumentLoader.h:
  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):

  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::setInitiator):

  • loader/cache/CachedResourceRequest.h:

(WebCore::CachedResourceRequest::initiatingDocumentLoader):

  • page/UserContentController.cpp:

(WebCore::UserContentController::globalDisplayNoneStyleSheet):
(WebCore::UserContentController::displayNoneCSSRule):

  • page/UserContentController.h:

LayoutTests:

  • http/tests/contentextensions/css-display-none-expected.txt:
  • http/tests/contentextensions/css-display-none.html:
  • http/tests/contentextensions/css-display-none.html.json:
3:31 PM Changeset in webkit [181875] by andersca@apple.com
  • 3 edits in trunk/Source/WebCore

-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:] doesn't remove cookies
https://bugs.webkit.org/show_bug.cgi?id=142990
rdar://problem/20241645

Reviewed by Andreas Kling.

Use the Mac version of deleteAllCookiesModifiedSince on iOS as well.

  • platform/network/cf/CookieJarCFNet.cpp:
  • platform/network/mac/CookieJarMac.mm:
3:05 PM Changeset in webkit [181874] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebKit2

Images shared to photos via action menu are padded with zeroes at the end
https://bugs.webkit.org/show_bug.cgi?id=142985

Reviewed by Anders Carlsson.

  • Shared/mac/ActionMenuHitTestResult.h:
  • Shared/mac/ActionMenuHitTestResult.mm:

(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::performActionMenuHitTestAtLocation):
Send the size of the image separately from the SharedMemory.
The SharedMemory's size can be rounded up, so we need to keep the original
size around in order to write the data to disk.

  • UIProcess/mac/WKActionMenuController.mm:

(-[WKActionMenuController _hitTestResultImage]):
(-[WKActionMenuController _addImageToPhotos:]):
Use the image size instead of the SharedMemory size.

3:04 PM Changeset in webkit [181873] by Conrad Shultz
  • 2 edits in trunk/Source/WebCore

Replace uses of kCTFontSystemFontType
https://bugs.webkit.org/show_bug.cgi?id=142984

Reviewed by Tim Horton.

  • rendering/RenderThemeMac.mm:

(WebCore::AttachmentLayout::layOutTitle):
(WebCore::AttachmentLayout::layOutSubtitle):

3:00 PM Changeset in webkit [181872] by jonowells@apple.com
  • 7 edits
    4 adds in trunk/Source/WebInspectorUI

Web Inspector: Debugger sidebar should have a filter button for breakpoints
https://bugs.webkit.org/show_bug.cgi?id=142779

Reviewed by Timothy Hatcher.

Add the infrastructure for activation filter buttons that can appear next to the text filters at the bottom
of any navigation sidebar panel. These filter bar buttons have defined within them a function that returns
a boolean value that indicates whether the input, typically a tree element, should be filtered or not.

This infrastructure is then used to create a filter for the debugger sidebar that, when applied, only shows
scripts that have breakpoints set on them.

  • Localizations/en.lproj/localizedStrings.js: Updated.
  • UserInterface/Main.html: Files added.
  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel.showResourcesWithChildrenOnlyFilterFunction):
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint): Drive-by fix.
Add filter button to filter bar.

  • UserInterface/Views/FilterBar.css:

(.filter-bar > .navigation-bar > .item):
Style filter button.

  • UserInterface/Views/FilterBar.js:

(WebInspector.FilterBar):
(WebInspector.FilterBar.prototype.get filters):
(WebInspector.FilterBar.prototype.set filters):
(WebInspector.FilterBar.prototype.hasActiveFilters):
(WebInspector.FilterBar.prototype._handleFilterChanged):
(WebInspector.FilterBar.prototype._inputFieldChanged): Deleted.
Create space for filter bar buttons and set up event handlers to deal with them.

  • UserInterface/Views/FilterBarButton.js: Copied from Source/WebInspectorUI/UserInterface/Views/FilterBar.css.

(WebInspector.FilterBarButton):
(WebInspector.FilterBarButton.prototype.get filterFunction):
(WebInspector.FilterBarButton.prototype.toggle):
Create class for a filter bar button that stores a filter function.

  • UserInterface/Views/NavigationSidebarPanel.js:

(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.matchTreeElementAgainstFilterFunctions):
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
(WebInspector.NavigationSidebarPanel.prototype._filterDidChange):
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
(WebInspector.NavigationSidebarPanel.prototype._textFilterDidChange): Deleted.
Add functionality to support button filters and process their corresponding functions correctly when filtering.

2:37 PM Changeset in webkit [181871] by dino@apple.com
  • 6 edits
    3 adds in trunk

ES7: Implement Array.prototype.includes
https://bugs.webkit.org/show_bug.cgi?id=142707

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Add support for the ES7 includes method on Arrays.
https://github.com/tc39/Array.prototype.includes

  • builtins/Array.prototype.js:

(includes): Implementation in JS.

  • runtime/ArrayPrototype.cpp: Add 'includes' to the lookup table.

LayoutTests:

  • js/array-includes-expected.txt: Added.
  • js/array-includes.html: Added.
  • js/script-tests/array-includes.js: Added.
  • js/script-tests/Object-getOwnPropertyNames.js: Add 'includes'.
  • js/Object-getOwnPropertyNames-expected.txt: Add 'includes'.
2:32 PM Changeset in webkit [181870] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

kCTFontSystemFontType is deprecated in CoreText
https://bugs.webkit.org/show_bug.cgi?id=142981
<rdar://problem/20261171>

Reviewed by Beth Dakin.

Update to the non-deprecated version.

  • rendering/RenderThemeIOS.mm: kCTFontSystemFontType -> kCTFontUIFontSystem

(WebCore::RenderThemeIOS::updateCachedSystemFontDescription):

1:52 PM Changeset in webkit [181869] by enrica@apple.com
  • 2 edits in trunk/Source/WebKit2

[iOS] WebContent crash attempting to select text with a gesture at RenderObject::absoluteBoundingBoxRect.
https://bugs.webkit.org/show_bug.cgi?id=142913
rdar://problem/16400033

Reviewed by Sam Weinig.

When looking for the best candidate range at the given position,
we should skip nodes that don't have a renderer.
This is a speculative fix.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::rangeForWebSelectionAtPosition):

1:48 PM Changeset in webkit [181868] by Joseph Pecoraro
  • 5 edits in trunk

defineGetter/defineSetter should throw exceptions
https://bugs.webkit.org/show_bug.cgi?id=142934

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
Throw exceptions when these functions are used directly.

LayoutTests:

  • js/property-getters-and-setters-expected.txt:
  • js/script-tests/property-getters-and-setters.js:
1:48 PM Changeset in webkit [181867] by Joseph Pecoraro
  • 2 edits in trunk/Source/JavaScriptCore

Fix DO_PROPERTYMAP_CONSTENCY_CHECK enabled build
https://bugs.webkit.org/show_bug.cgi?id=142952

Reviewed by Geoffrey Garen.

  • runtime/Structure.cpp:

(JSC::PropertyTable::checkConsistency):
The check offset method doesn't exist in PropertyTable, it exists in Structure.

(JSC::Structure::checkConsistency):
So move it here, and always put it at the start to match normal behavior.

1:42 PM Changeset in webkit [181866] by ap@apple.com
  • 7 edits in trunk/Source

REGRESSION (Yosemite): WKView visibility notifications are messed up
https://bugs.webkit.org/show_bug.cgi?id=142945

Reviewed by Tim Horton.

As these notifications cannot be used by NSView subclasses, create a separate
object for observing them.

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
(-[WebView addWindowObserversForWindow:]):
(-[WebView removeWindowObservers]):
(-[WebView viewWillMoveToWindow:]): Make sure that observers are removed even
if -[WebView close] is called manually.

  • WebView/WebViewData.h:
  • WebView/WebViewData.mm:

(-[WebWindowVisibilityObserver initWithView:]):
(-[WebWindowVisibilityObserver startObserving:]):
(-[WebWindowVisibilityObserver stopObserving:]):
(-[WebWindowVisibilityObserver _windowVisibilityChanged:]):

Source/WebKit2:

  • UIProcess/API/mac/WKView.mm:

(-[WKWindowVisibilityObserver initWithView:]):
(-[WKWindowVisibilityObserver startObserving:]):
(-[WKWindowVisibilityObserver stopObserving:]):
(-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]):
(-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]):
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]): Also, don't try to remove NSWindowWillOrderOffScreenNotification,
which we never start to observe.
(-[WKView initWithFrame:processPool:configuration:webView:]):

  • UIProcess/API/mac/WKViewInternal.h:
1:35 PM Changeset in webkit [181865] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[Mac] Enable fullscreen for MSE-based videos
https://bugs.webkit.org/show_bug.cgi?id=142971

Reviewed by Jer Noble.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Return true;

1:34 PM Changeset in webkit [181864] by andersca@apple.com
  • 4 edits in trunk

Source/WebKit2:
Make platform/mac-wk2/plugins/destroy-during-async-npp-new.html work again.
https://bugs.webkit.org/show_bug.cgi?id=133692
rdar://problem/17255947

Reviewed by Alexey Proskuryakov.

Add plug-in destruction protectors around message receiver code that can call out to NPObjects or JavaScript
where we need the plug-in to stay around after the call.

  • Shared/Plugins/NPObjectMessageReceiver.cpp:

(WebKit::NPObjectMessageReceiver::invoke):
(WebKit::NPObjectMessageReceiver::invokeDefault):
(WebKit::NPObjectMessageReceiver::getProperty):
(WebKit::NPObjectMessageReceiver::setProperty):
(WebKit::NPObjectMessageReceiver::construct):

LayoutTests:
Make platform/mac-wk2/plugins/destroy-during-async-npp-new.html work again
https://bugs.webkit.org/show_bug.cgi?id=133692
rdar://problem/17255947

Reviewed by Alexey Proskuryakov.

  • platform/mac-wk2/TestExpectations:

Unskip test.

1:31 PM Changeset in webkit [181863] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

[MediaFoundation] Implement seek.
https://bugs.webkit.org/show_bug.cgi?id=142594

Reviewed by Darin Adler.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::seeking):
(WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
(WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1:17 PM Changeset in webkit [181862] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Fixed the build.

  • platform/graphics/cocoa/FontCocoa.mm:

(WebCore::Font::platformBoundsForGlyph): Switched to non-deprecated CTFontOrientation values.
(WebCore::Font::platformWidthForGlyph): Ditto.

1:06 PM Changeset in webkit [181861] by ap@apple.com
  • 2 edits in trunk/LayoutTests

accessibility/textarea-selected-text-range.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=142976

  • platform/mac/TestExpectations: Marking as such.
12:20 PM Changeset in webkit [181860] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

[iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
https://bugs.webkit.org/show_bug.cgi?id=142970

Reviewed by Eric Carlson.

Return early after synchronously calling to the main thread to allocate the volume
view, to avoid re-allocating the volume view again on the web thread.

  • platform/audio/ios/MediaSessionManagerIOS.mm:

(-[WebMediaSessionHelper allocateVolumeView]):

12:13 PM Changeset in webkit [181859] by andersca@apple.com
  • 4 edits in trunk/Source/WebKit2

Put the WK_NULLABLE_SPECIFIER in the right place for block parameters
https://bugs.webkit.org/show_bug.cgi?id=142975
rdar://problem/19863930

Reviewed by Dan Bernstein.

  • UIProcess/API/Cocoa/WKNavigationDelegate.h:
  • UIProcess/API/Cocoa/WKUIDelegate.h:
  • UIProcess/API/Cocoa/WKWebView.h:
11:39 AM Changeset in webkit [181858] by timothy_horton@apple.com
  • 9 edits in trunk/Source

Add a share item to the link action menu
https://bugs.webkit.org/show_bug.cgi?id=142961
<rdar://problem/19198374>

Reviewed by Beth Dakin.

  • UIProcess/mac/WKActionMenuController.mm:

(-[WKActionMenuController _hitLinkURL]):
Factor out _hitLinkURL from various places.

(-[WKActionMenuController _openURLFromActionMenu:]):
(-[WKActionMenuController _addToReadingListFromActionMenu:]):
(-[WKActionMenuController _defaultMenuItemsForVideo]):
(-[WKActionMenuController _defaultMenuItemsForImage]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
(-[WKActionMenuController _createShareActionMenuItemForTag:withItems:]):
Adopt -[NSMenuItem standardShareMenuItemWithItems].
All of the null-checking is unnecessary as it's impossible to enter
these functions with a null image/etc.

(-[WKActionMenuController _defaultMenuItemsForLink]):

  • Shared/API/c/WKActionMenuItemTypes.h:

Add a 'Share' item to the link menu.

  • WebView/WebActionMenuController.mm:

(-[WebActionMenuController _defaultMenuItemsForImage]):
(-[WebActionMenuController _defaultMenuItemsForVideo]):
(-[WebActionMenuController _createActionMenuItemForTag:]):
(-[WebActionMenuController _createShareActionMenuItemForTag:withItems:]):
Adopt -[NSMenuItem standardShareMenuItemWithItems].
All of the null-checking is unnecessary as it's impossible to enter
these functions with a null image/etc.
Also, remove a duplicate isDownloadableMedia check for the 'save to downloads' item.

(-[WebActionMenuController _defaultMenuItemsForLink]):

  • WebView/WebUIDelegatePrivate.h:

Add a 'Share' item to the link menu.

  • English.lproj/Localizable.strings:

Remove some now-unused strings.

  • platform/spi/mac/NSMenuSPI.h:

Add some SPI.

11:18 AM Changeset in webkit [181857] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

[iOS] Build fix: CoreText deprecated kCTFontSystemFontType

Fix tracked by: <rdar://problem/20261171>

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
Add clang pragmas.

11:07 AM Changeset in webkit [181856] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Unreviewed test fix.

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseScrollSnapDestination): Remove new assertion.

9:57 AM Changeset in webkit [181855] by Brent Fulgham
  • 3 edits in trunk/Source/WebCore

scroll-snap-destination and scroll-snap-coordinate do not seem to work together properly
https://bugs.webkit.org/show_bug.cgi?id=142552
<rdar://problem/20114743>

Reviewed by Dean Jackson.

Revise the snap point logic as follows:
(1) Put the snap point destination handling in a helper function to make the rest of the code

easier to read.

(2) Make sure we always have a left-hand snap point (i.e., position 0), but don't add multiple

left-hand snap points.

(3) Create a helper function to determine if we should be working with the scroll snap 'elements'

behavior. We want to use this for scroll-snap-destination/scroll-snap-coordinate markup.

(4) Create per-element snap point offsets when using scroll-snap-destination/scroll-snap-coordinate.

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseScrollSnapDestination): Add assertion to try to catch bad parser state.

  • page/scrolling/AxisScrollSnapOffsets.cpp:

(WebCore::destinationOffsetForViewSize): Added helper function to consolidate logic for handling
destination coordinates.
(WebCore::updateFromStyle): Make sure a left-hand snap point is always provided.
(WebCore::styleUsesElements): Added helper function.
(WebCore::updateSnapOffsetsForScrollableArea): Revise logic to generate 'per-element' snap point
offsets.

4:47 AM Changeset in webkit [181854] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.8.0

WebKitGTK+ 2.8.0

4:17 AM Changeset in webkit [181853] by gyuyoung.kim@samsung.com
  • 3 edits in trunk/Tools

[CMake][EFL] Put failure API test excutables into failure directory
https://bugs.webkit.org/show_bug.cgi?id=142965

Reviewed by Csaba Osztrogonác.

Move failing WK2 API test executables to *bin/TestWebKitAPI/WebKit2/failure* directory.

  • TestWebKitAPI/CMakeLists.txt: Fix a typo. Change *testBaseName* with *testName*.
  • TestWebKitAPI/PlatformEfl.cmake: Additionally remove unnecessary SHARED_CORE and comment for SeccompFilters test.
3:59 AM WebKitGTK/Roadmap edited by philn@igalia.com
(diff)
3:41 AM Changeset in webkit [181852] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.8

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.8.0 release.

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.8.0.
3:05 AM Changeset in webkit [181851] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebKit2

[GTK] Use std::abs() in ClickCounter::currentClickCountForGdkButtonEvent()
https://bugs.webkit.org/show_bug.cgi?id=142964

Reviewed by Carlos Garcia Campos.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(ClickCounter::currentClickCountForGdkButtonEvent): Use the STL's std::abs()
instead of C's abs(). The templated nature of std::abs() ensures the proper
computation that matches the types of the passed-in values, and shuts down
a warning when compiling with Clang.

3:02 AM Changeset in webkit [181850] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebKit2

[GTK][WK2] webkitBackForwardListChanged() should operate on a Vector reference
https://bugs.webkit.org/show_bug.cgi?id=142963

Reviewed by Carlos Garcia Campos.

  • UIProcess/API/gtk/WebKitBackForwardList.cpp:

(webkitBackForwardListChanged): This function only reads from the passed-in
Vector of removed items, so only a const lvalue reference to the Vector
is needed.

  • UIProcess/API/gtk/WebKitBackForwardListPrivate.h:
2:14 AM Changeset in webkit [181849] by yoav@yoav.ws
  • 4 edits in trunk/Source/WebCore

Refactor ImageLoader's setting of CachedImage
https://bugs.webkit.org/show_bug.cgi?id=142825

Reviewed by Chris Dumez.

No new tests, since there's no functional change.

setImage and setImageWithoutConsideringPendingLoadEvent were not called with new
CachedImages and were not used as originally intended. That resulted in some dead code,
and confusion when going over the code.
This patch renames these methods into equivalent clearImage* methods, and deletes resulting dead code.

  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::renderFallbackContent): Changed setImage call to clearImage.

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::clearImage):
(WebCore::ImageLoader::clearImageWithoutConsideringPendingLoadEvent):
(WebCore::ImageLoader::notifyFinished):
(WebCore::ImageLoader::elementDidMoveToNewDocument):
(WebCore::ImageLoader::setImage): Deleted.
(WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent): Deleted.

  • loader/ImageLoader.h:
2:12 AM Changeset in webkit [181848] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.8

Merge r181847 - [GTK] Add a configure option to build without Redirected XComposite Window
https://bugs.webkit.org/show_bug.cgi?id=142865

Reviewed by Žan Doberšek.

.:

The Redirected XComposite Window was added to support some
features like GtkOverlay, but in cases where we don't need such
features, it's more efficient to use the XID of the WebKitWebView
window as the native surface handle for the accelerated
compositing. This patch adds USE_REDIRECTED_XCOMPOSITE_WINDOW,
that is enabled by default for X11 target when OpenGL is enabled.

  • Source/cmake/OptionsGTK.cmake:

Source/WebKit2:

Use USE(REDIRECTED_XCOMPOSITE_WINDOW) instead of
USE(TEXTURE_MAPPER_GL) && PLATFORM(X11).

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseRealize): Use the XID of the WebKitWebView
window as native surface handle when REDIRECTED_XCOMPOSITE_WINDOW
is disabled.
(webkitWebViewRenderAcceleratedCompositingResults):
(resizeWebKitWebViewBaseFromAllocation):
(webkitWebViewBaseEnterAcceleratedCompositingMode):
(webkitWebViewBaseExitAcceleratedCompositingMode):

  • UIProcess/gtk/RedirectedXCompositeWindow.cpp:
  • UIProcess/gtk/RedirectedXCompositeWindow.h:
1:06 AM Changeset in webkit [181847] by Carlos Garcia Campos
  • 6 edits in trunk

[GTK] Add a configure option to build without Redirected XComposite Window
https://bugs.webkit.org/show_bug.cgi?id=142865

Reviewed by Žan Doberšek.

.:

The Redirected XComposite Window was added to support some
features like GtkOverlay, but in cases where we don't need such
features, it's more efficient to use the XID of the WebKitWebView
window as the native surface handle for the accelerated
compositing. This patch adds USE_REDIRECTED_XCOMPOSITE_WINDOW,
that is enabled by default for X11 target when OpenGL is enabled.

  • Source/cmake/OptionsGTK.cmake:

Source/WebKit2:

Use USE(REDIRECTED_XCOMPOSITE_WINDOW) instead of
USE(TEXTURE_MAPPER_GL) && PLATFORM(X11).

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseRealize): Use the XID of the WebKitWebView
window as native surface handle when REDIRECTED_XCOMPOSITE_WINDOW
is disabled.
(webkitWebViewRenderAcceleratedCompositingResults):
(resizeWebKitWebViewBaseFromAllocation):
(webkitWebViewBaseEnterAcceleratedCompositingMode):
(webkitWebViewBaseExitAcceleratedCompositingMode):

  • UIProcess/gtk/RedirectedXCompositeWindow.cpp:
  • UIProcess/gtk/RedirectedXCompositeWindow.h:

Mar 22, 2015:

11:58 PM Changeset in webkit [181846] by ap@apple.com
  • 2 edits in trunk/Source/WebKit/mac

Build fix.

  • WebView/WebView.mm: (-[WebView _showPlaybackTargetPicker:hasVideo:]):
10:04 PM Changeset in webkit [181845] by benjamin@webkit.org
  • 15 edits
    4 adds in trunk

CSS Selectors: fix attribute case-insensitive matching of Contain and List
https://bugs.webkit.org/show_bug.cgi?id=142932

Reviewed by Darin Adler.

Source/WebCore:

Fix the last two attribute selectors that were using full case-insensitive
match:

-Contain ([foo*=bar]).
-List (foo~=bar]).

Tests: fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html

fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html

  • css/SelectorChecker.cpp:

(WebCore::attributeValueMatches):

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::attributeValueContains):
(WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):

Source/WTF:

Add some utility functions to the string classes to find substrings
using ASCII case-insensitive comparisons.

  • wtf/text/AtomicString.h:

(WTF::AtomicString::contains):
Add the light version that only lock one register.

(WTF::AtomicString::containsIgnoringASCIICase):
(WTF::AtomicString::findIgnoringASCIICase):

  • wtf/text/StringCommon.h:

(WTF::findIgnoringASCIICase):
This is the common implementation used by StringView and StringImpl.

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::findIgnoringASCIICase):

  • wtf/text/StringImpl.h:
  • wtf/text/StringView.cpp:

(WTF::StringView::containsIgnoringASCIICase):
(WTF::StringView::findIgnoringASCIICase):

  • wtf/text/StringView.h:
  • wtf/text/WTFString.h:

(WTF::String::findIgnoringASCIICase):
(WTF::String::contains):
(WTF::String::containsIgnoringASCIICase):

Tools:

Add tests for the new features and fix some existing tests using the
stringFromUTF8() utility recently added by Dhi.

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::stringFromUTF8):

  • TestWebKitAPI/Tests/WTF/StringView.cpp:

LayoutTests:

  • fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive-expected.txt: Added.
  • fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html: Added.
  • fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive-expected.txt: Added.
  • fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html: Added.
10:02 PM Changeset in webkit [181844] by commit-queue@webkit.org
  • 35 edits in trunk/Source/WebInspectorUI

Web Inspector: Adopt ES6 Class Syntax for all Controller Objects
https://bugs.webkit.org/show_bug.cgi?id=142890

Patch by Matt Baker <Matt Baker> on 2015-03-22
Reviewed by Joseph Pecoraro.

  • Convert all UserInterface/Controllers objects to classes
  • Convert constructor functions to constructor methods
  • Convert "constructor.method" to class static methods where possible
  • Convert all methods to method syntax, eliminate commas between methods
  • Convert all superclass calls in classes to use "super"
  • Removed FIXME from WebInspector.Object subclasses, added calls to super.
  • Fixed strict mode issues now that classes enforce strict mode (see below).
  • Tools/PrettyPrinting/Formatter.js:
  • Tools/PrettyPrinting/FormatterContentBuilder.js:

Updated to match corresponding files in UserInterface/Controllers.

  • UserInterface/Controllers/*.js:

Many files modified mostly mechanically (regex find-replace).

  • UserInterface/Controllers/CodeMirrorCompletionController.js:
  • UserInterface/Controllers/FormatterContentBuilder.js:

Replaced const usage with var. Use of const is prohibited in strict mode, which is implicit within a class.

  • UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
  • UserInterface/Controllers/DOMTreeManager.js:

Moved function declarations out of if statements. Strict mode does not allow function declarations in a lexically nested statement.

9:16 PM Feature Status created by benjamin@webkit.org
Bucnh of ideas for the status page.
8:41 PM Changeset in webkit [181843] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GTK] install-dependencies should install orc
https://bugs.webkit.org/show_bug.cgi?id=142955

Patch by Michael Catanzaro <Michael Catanzaro> on 2015-03-22
Reviewed by Martin Robinson.

Install orc, needed by openwebrtc

  • gtk/install-dependencies:
7:47 PM Changeset in webkit [181842] by gyuyoung.kim@samsung.com
  • 2 edits in trunk/LayoutTests

[EFL] Update new flaky tests and remove duplicated failure test.

Unreviewed EFL gardening.

  • platform/efl/TestExpectations:

Remove duplicted attachment tests, and add new flaky tests regarding svg clip-path, pattern scale.

7:18 PM Changeset in webkit [181841] by fpizlo@apple.com
  • 5 edits
    1 delete in trunk/Source/JavaScriptCore

Remove DFG::ValueRecoveryOverride; it's been dead since we removed forward speculations
https://bugs.webkit.org/show_bug.cgi?id=142956

Rubber stamped by Gyuyoung Kim.

Just removing dead code.

  • JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGOSRExit.h:
  • dfg/DFGOSRExitCompiler.cpp:
  • dfg/DFGValueRecoveryOverride.h: Removed.
7:04 PM Changeset in webkit [181840] by benjamin@webkit.org
  • 4 edits in trunk

Detect when url filter pattern with groups match the empty string
https://bugs.webkit.org/show_bug.cgi?id=142930

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-03-22
Reviewed by Sam Weinig.

Source/WebCore:

The previous test was only accounting for simple atoms. This patch extends
it to groups.

  • contentextensions/URLFilterParser.cpp:

(WebCore::ContentExtensions::Term::quantify):
(WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter):
(WebCore::ContentExtensions::GraphBuilder::finalize):
(WebCore::ContentExtensions::Term::quantifier): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
6:28 PM Changeset in webkit [181839] by gyuyoung.kim@samsung.com
  • 2 edits in trunk/LayoutTests

[EFL] Unreviewed EFL gradening on 23th Mar.

Skip attachment tests, unskip passing tests related with writing, webaudio.
Add new flaky tests.

  • platform/efl/TestExpectations:
6:15 PM WebKitGTK/Dependencies edited by Michael Catanzaro
typo fix (diff)
6:11 PM WebKitGTK/Dependencies edited by Michael Catanzaro
Add license warning for gnutls, since LGPLv3+ patent giveaway is … (diff)
6:08 PM Changeset in webkit [181838] by eric.carlson@apple.com
  • 20 edits
    2 adds in trunk/Source

[Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
https://bugs.webkit.org/show_bug.cgi?id=142940

Reviewed by Sam Weinig.

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::didChoosePlaybackTarget): const-ify the didChoosePlaybackTarget argument.

  • dom/Document.h:
  • html/HTMLMediaSession.cpp:

(WebCore::HTMLMediaSession::didChoosePlaybackTarget): Ditto.

  • html/HTMLMediaSession.h:
  • page/Page.cpp:

(WebCore::Page::didChoosePlaybackTarget): Ditto.

  • page/Page.h:
  • platform/audio/MediaSession.h:
  • platform/graphics/MediaPlaybackTargetPickerClient.h:
  • platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:

(WebCore::MediaPlaybackTargetPickerMac::devicePicker): Ditto.

Source/WebKit/mac:

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::showPlaybackTargetPicker): New.
(WebChromeClient::startingMonitoringPlaybackTargets): New.
(WebChromeClient::stopMonitoringPlaybackTargets): New.

  • WebView/WebView.mm:

(-[WebView _close]): Invalidate and free the target picker.
(-[WebView _devicePicker]): New.
(-[WebView _showPlaybackTargetPicker:hasVideo:]): New.
(-[WebView _startingMonitoringPlaybackTargets]): New.
(-[WebView _stopMonitoringPlaybackTargets]): New.

  • WebView/WebMediaPlaybackTargetPicker.h:
  • WebView/WebMediaPlaybackTargetPicker.mm:

(WebMediaPlaybackTargetPicker::create): New.
(WebMediaPlaybackTargetPicker::WebMediaPlaybackTargetPicker): New.
(WebMediaPlaybackTargetPicker::showPlaybackTargetPicker): New.
(WebMediaPlaybackTargetPicker::startingMonitoringPlaybackTargets): New.
(WebMediaPlaybackTargetPicker::stopMonitoringPlaybackTargets): New.
(WebMediaPlaybackTargetPicker::didChoosePlaybackTarget): New.
(WebMediaPlaybackTargetPicker::externalOutputDeviceAvailableDidChange): New.
(WebMediaPlaybackTargetPicker::invalidate): New.
(WebMediaPlaybackTargetPicker::targetPicker): New.

  • WebView/WebViewData.h:

(WebMediaPlaybackTargetPicker::~WebMediaPlaybackTargetPicker):

  • WebView/WebViewData.mm:
  • WebView/WebViewInternal.h:

Source/WebKit2:

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::playbackTargetSelected): Argument to didChoosePlaybackTarget is now const.

3:50 PM Changeset in webkit [181837] by andersca@apple.com
  • 14 edits in trunk

_WKWebsiteDataStore should clear WebSQL databases
https://bugs.webkit.org/show_bug.cgi?id=142947
Source/WebCore:

Reviewed by Sam Weinig.

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::trackerWithDatabasePath):
Add a hack so we can get at a tracker from the UI process.

(WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
New function that deletes all databases modified after a given time.

  • Modules/webdatabase/DatabaseTracker.h:

Add new members and export the ones we want to call from WebKit2.

  • Modules/webdatabase/OriginLock.h:

Export the destructor.

Source/WebKit2:

rdar://problem/20242174

Reviewed by Sam Weinig.

  • Shared/WebsiteData/WebsiteDataTypes.h:

Add WebsiteDataTypeWebSQLDatabases.

  • UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:

(API::WebsiteDataStore::defaultDataStoreConfiguration):
Initialize configuration.webSQLDatabaseDirectory.

  • UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:

Add WKWebsiteDataTypeWebSQLDatabases.

  • UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:

(dataTypesToString):
Handle WKWebsiteDataTypeWebSQLDatabases.

  • UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:

(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
Handle WKWebsiteDataTypeWebSQLDatabases and WebsiteDataTypes::WebsiteDataTypeWebSQLDatabases.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::WebsiteDataStore):
Initialize m_webSQLDatabaseDirectory and add a queue member variable.

(WebKit::WebsiteDataStore::fetchData):
Fetch database origins.

(WebKit::WebsiteDataStore::removeData):
Remove databases.

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Add new members.

Tools:

Reviewed by Sam Weinig.

Add a variable that keeps track of the types of data we want to operate on, for easier debugging.

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController fetchWebsiteData:]):
(-[WK2BrowserWindowController fetchAndClearWebsiteData:]):
(-[WK2BrowserWindowController clearWebsiteData:]):

2:44 PM Changeset in webkit [181836] by mitz@apple.com
  • 11 edits in trunk/Source/WebKit2

[iOS] Expose WebPageProxy::setInitialFocus as SPI
https://bugs.webkit.org/show_bug.cgi?id=142951

Reviewed by Anders Carlsson.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]): New SPI.
Just calls through to WKWebContentView, but allows a nil completion handler.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/mac/WKView.mm:

(-[WKView becomeFirstResponder]): Pass an empty lambda for the new callback parameter to
WebPageProxy::setInitialFocus.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setInitialFocus): Added a void callback parameter and made sure to
call it.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
Added. Calls WebPageProxy::setInitialFocus, and once that completes, checks if anything was
focused and if so, becomes first responder, then calls the completion handler.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setInitialFocus): Added a callbackID parameter, and made sure to send the
callback message. Added a temporary change of m_userIsInteracting to true, so that the UI
process won’t ignore any StartAssistingNode message resulting from the focus change.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in: Added a callbackID parameter to SetInitialFocus.
12:35 PM Changeset in webkit [181835] by fpizlo@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

DFG OSR exit shouldn't assume that the frame count for exit is greater than the frame count in DFG
https://bugs.webkit.org/show_bug.cgi?id=142948

Reviewed by Sam Weinig.

It's necessary to ensure that the stack pointer accounts for the extent of our stack usage
since a signal may clobber the area below the stack pointer. When the DFG is executing,
the stack pointer accounts for the DFG's worst-case stack usage. When we OSR exit back to
baseline, we will use a different amount of stack. This is because baseline is a different
compiler. It will make different decisions. So it will use a different amount of stack.

This gets tricky when we are in the process of doing an OSR exit, because we are sort of
incrementally transforming the stack from how it looked in the DFG to how it will look in
baseline. The most conservative approach would be to set the stack pointer to the max of
DFG and baseline.

When this code was written, a reckless assumption was made: that the stack usage in
baseline is always at least as large as the stack usage in DFG. Based on this incorrect
assumption, the code first adjusts the stack pointer to account for the baseline stack
usage. This sort of usually works, because usually baseline does happen to use more stack.
But that's not an invariant. Nobody guarantees this. We will never make any changes that
would make this be guaranteed, because that would be antithetical to how optimizing
compilers work. The DFG should be allowed to use however much stack it decides that it
should use in order to get good performance, and it shouldn't try to guarantee that it
always uses less stack than baseline.

As such, we must always assume that the frame size for DFG execution (i.e.
frameRegisterCount) and the frame size in baseline once we exit (i.e.
requiredRegisterCountForExit) are two independent quantities and they have no
relationship.

Fortunately, though, this code can be made correct by just moving the stack adjustment to
just before we do conversions. This is because we have since changed the OSR exit
algorithm to first lift up all state from the DFG state into a scratch buffer, and then to
drop it out of the scratch buffer and into the stack according to the baseline layout. The
point just before conversions is the point where we have finished reading the DFG frame
and will not read it anymore, and we haven't started writing the baseline frame. So, at
this point it is safe to set the stack pointer to account for the frame size at exit.

This is benign because baseline happens to create larger frames than DFG.

  • dfg/DFGOSRExitCompiler32_64.cpp:

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

  • dfg/DFGOSRExitCompiler64.cpp:

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

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::adjustAndJumpToTarget):

12:09 PM Changeset in webkit [181834] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Shorten the number of iterations to 10,000 since that's enough to test all tiers.

Rubber stamped by Sam Weinig.

  • tests/stress/equals-masquerader.js:
11:25 AM Changeset in webkit [181833] by fpizlo@apple.com
  • 11 edits in trunk/Source/JavaScriptCore

tests/stress/*tdz* tests do 10x more iterations than necessary
https://bugs.webkit.org/show_bug.cgi?id=142946

Reviewed by Ryosuke Niwa.

The stress test harness runs all of these tests in various configurations. This includes
no-cjit, which has tier-up heuristics locked in such a way that 10,000 iterations is
enough to get to the highest tier. The only exceptions are very large functions or
functions that have some reoptimizations. That happens rarely, and when it does happen,
usually 20,000 iterations is enough.

Therefore, these tests use 10x too many iterations. This is bad, since these tests
allocate on each iteration, and so they run very slowly in debug mode.

  • tests/stress/class-syntax-no-loop-tdz.js:
  • tests/stress/class-syntax-no-tdz-in-catch.js:
  • tests/stress/class-syntax-no-tdz-in-conditional.js:
  • tests/stress/class-syntax-no-tdz-in-loop-no-inline-super.js:
  • tests/stress/class-syntax-no-tdz-in-loop.js:
  • tests/stress/class-syntax-no-tdz.js:
  • tests/stress/class-syntax-tdz-in-catch.js:
  • tests/stress/class-syntax-tdz-in-conditional.js:
  • tests/stress/class-syntax-tdz-in-loop.js:
  • tests/stress/class-syntax-tdz.js:
Note: See TracTimeline for information about the timeline view.