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

Timeline



Apr 11, 2016:

11:53 PM Changeset in webkit [199338] by achristensen@apple.com
  • 6 edits
    1 add in trunk

Build MiniBrowser with CMake on Mac
https://bugs.webkit.org/show_bug.cgi?id=156471

Reviewed by Daniel Bates.

Source/WebKit2:

  • DatabaseProcess/DatabaseProcess.messages.in:

Tools:

  • CMakeLists.txt:
  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/PlatformWin.cmake:
  • MiniBrowser/mac/CMakeLists.txt: Added.
11:16 PM Changeset in webkit [199337] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] B3 can use undefined bits or not defined required bits when spilling
https://bugs.webkit.org/show_bug.cgi?id=156486

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-04-11
Reviewed by Filip Pizlo.

Spilling had issues when replacing arguments in place.

The problems are:
1) If we have a 32bit stackslot, a x86 instruction could still try to load 64bits from it.
2) If we have a 64bit stackslot, Move32 would only set half the bits.
3) We were reducing Move to Move32 even if the top bits are read from the stack slot.

The case 1 appear with something like this:

Move32 %tmp0, %tmp1
Op64 %tmp1, %tmp2, %tmp3

When we spill %tmp1, the stack slot is 32bit, Move32 sets 32bits
but Op64 supports addressing for %tmp1. When we substitute %tmp1 in Op64,
we are creating a 64bit read for a 32bit stack slot.

The case 2 is an other common one. If we have:

BB#1

Move32 %tmp0, %tmp1
Jump #3

BB#2

Op64 %tmp0, %tmp1
Jump #3

BB#3

Use64 %tmp1

We have a stack slot of 64bits. When spilling %tmp1 in #1, we are
effectively doing a 32bit store on the stack slot, leaving the top bits undefined.

Case 3 is pretty much the same as 2 but we create the Move32 ourself
because the source is a 32bit with ZDef.

Case (1) is solved by requiring that the stack slot is at least as large as the largest
use/def of that tmp.

Case (2) and (3) are solved by not replacing a Tmp by an Address if the Def
is smaller than the stack slot.

  • b3/air/AirIteratedRegisterCoalescing.cpp:
  • b3/testb3.cpp:

(JSC::B3::testSpillDefSmallerThanUse):
(JSC::B3::testSpillUseLargerThanDef):
(JSC::B3::run):

11:12 PM Changeset in webkit [199336] by ryuan.choi@navercorp.com
  • 12 edits in trunk

[EFL] Do not pass context to EwkViewCreate
https://bugs.webkit.org/show_bug.cgi?id=156461

Reviewed by Darin Adler.

Source/WebKit2:

EWKViewCreate already has pageConfiguration which contains context.
So, this patch removes context argument from EWKViewCreate.

  • UIProcess/API/C/CoordinatedGraphics/WKView.cpp:

(WKViewCreate):

  • UIProcess/API/C/CoordinatedGraphics/WKView.h:
  • UIProcess/API/efl/ewk_view.cpp:

(EWKViewCreate): Call WebView::Create instead of WKViewCreate not to use WK API.
(ewk_view_smart_add):
(ewk_view_add_with_configuration):
(ewk_view_add_with_context):

  • UIProcess/API/efl/ewk_view_private.h:
  • UIProcess/efl/WebInspectorProxyEfl.cpp:

(WebKit::WebInspectorProxy::platformCreateInspectorPage):

  • UIProcess/efl/WebView.cpp:

(WebKit::WebView::create):
(WebKit::WebView::WebView):

  • UIProcess/efl/WebView.h:

Tools:

  • TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewUserViewportToContents.cpp:

(TestWebKitAPI::TEST): Removed context argument from EwkViewCreate calls.

  • TestWebKitAPI/efl/PlatformWebView.cpp:

(TestWebKitAPI::PlatformWebView::PlatformWebView): Ditto.

  • WebKitTestRunner/efl/PlatformWebViewEfl.cpp:

(WTR::PlatformWebView::PlatformWebView): Ditto.

10:49 PM Changeset in webkit [199335] by Darin Adler
  • 4 edits in trunk/Source/WebCore

Remove UsePointersEvenForNonNullableObjectArguments from HTMLOptionsCollection
https://bugs.webkit.org/show_bug.cgi?id=156491

Reviewed by Chris Dumez.

  • html/HTMLOptionsCollection.cpp:

(WebCore::HTMLOptionsCollection::add): Take a reference instead of a pointer.

  • html/HTMLOptionsCollection.h: Removed unneeded forward declaration. Changed

add to take a reference instead of a pointer for the element to add. Used
final instead of override on virtual functions.

  • html/HTMLOptionsCollection.idl: Removed now-unneeded attribute

UsePointersEvenForNonNullableObjectArguments; the only function affected was
add, and the overloading code was already checking for null.

9:15 PM Changeset in webkit [199334] by Darin Adler
  • 20 edits in trunk/Source

Remove UsePointersEvenForNonNullableObjectArguments from HTMLSelectElement
https://bugs.webkit.org/show_bug.cgi?id=156458

Reviewed by Chris Dumez.

Source/WebCore:

  • bindings/js/JSHTMLOptionsCollectionCustom.cpp:

(WebCore::JSHTMLOptionsCollection::remove): Updated to call remove with a reference
rather than a pointer.

  • bindings/js/JSHTMLSelectElementCustom.cpp:

(WebCore::JSHTMLSelectElement::remove): Updated to call remove with a reference
rather than a pointer.
(WebCore::selectIndexSetter): Updated to call setOption with a reference rather
than a pointer.

  • bindings/scripts/CodeGeneratorGObject.pm:

(GenerateFunction): Added basic support for passing wrappers by reference.
GObject bindings already check arguments for null, so didn't add any new checks.

  • bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
  • bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
  • bindings/scripts/test/GObject/WebKitDOMTestCallbackFunction.cpp:
  • bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
  • bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:

Updated.

  • editing/FrameSelection.cpp: Updated includes.
  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::setSelected): Pass reference when calling
HTMLSelectElement::optionSelectionStateChanged.
(WebCore::HTMLOptionElement::insertedInto): Ditto.

  • html/HTMLOptionsCollection.cpp:

(WebCore::HTMLOptionsCollection::add): Moved null checking behavior here.
Preserves existing "silently do nothing if null".
(WebCore::HTMLOptionsCollection::remove): Changed function to take a reference
instead of a pointer.

  • html/HTMLOptionsCollection.h: Updated include. Changed remove to take a

reference instead of a pointer.

  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::add): Changed to take a reference instead of
a pointer. Also removed unneeded protect code, since insertBefore already
protects itself, and unneeded call to updateValidity, since the
HTMLSelectElement::childrenChanged function already calls updateValidity.
(WebCore::HTMLSelectElement::remove): Changed to take a reference instead
of a pointer.
(WebCore::HTMLSelectElement::setOption): Changed to take a reference
instead of a pointer.
(WebCore::HTMLSelectElement::setLength): Renamed "newLen" to "newLength".
Use Ref instead of RefPtr for result of createElement, which makes the
argument passed to add be a reference rather than a pointer.
(WebCore::HTMLSelectElement::willRespondToMouseClickEvents): Put the #if
for this here instead of in the header.
(WebCore::HTMLSelectElement::optionSelectionStateChanged): Changed to take
a reference instead of a pointer for the option element.

  • html/HTMLSelectElement.h: Removed unneeded includes. Derive privately

from TypeAheadDataSource instead of publicly. Make all overrides final
except for the one that is actually overridden by a derived class.
Changed the arguments of the add, remove, setOption, and
optionSelectionStateChanged functions to be references instead of pointers.
Tweaked formatting a bit and used nullptr instead of 0. Override
willRespondToMouseClickEvents on all platforms, not just iOS.

  • html/HTMLSelectElement.idl: Removed UsePointersEvenForNonNullableObjectArguments.

Removed a comment that is no longer needed. Made some types nullable to match
the specification, in places that currently have no effect on code generation.
Added a FIXME comment about the argument to setCustomValidity incorrectly being
marked as nullable.

Source/WebKit/win:

  • DOMCoreClasses.cpp: Added now-needed include.

Source/WebKit2:

  • WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: Updated includes.
8:42 PM Changeset in webkit [199333] by rniwa@webkit.org
  • 1 edit
    1 add
    2 deletes in trunk/Websites/perf.webkit.org

Replace script runner to use mocha.js tests
https://bugs.webkit.org/show_bug.cgi?id=156490

Reviewed by Chris Dumez.

Replaced run-tests.js, which was a whole test harness for running legacy tests by tools/run-tests.py
which is a thin wrapper around mocha.js.

  • run-tests.js: Removed.
  • tests: Removed.
  • tools/run-tests.py: Added.

(main):

8:18 PM Changeset in webkit [199332] by rniwa@webkit.org
  • 6 edits in trunk/Websites/perf.webkit.org

New syncing script sometimes schedules a build request on a wrong builder
https://bugs.webkit.org/show_bug.cgi?id=156489

Reviewed by Stephanie Lewis.

The bug was caused by _scheduleNextRequestInGroupIfSlaveIsAvailable scheduling the next build request on
any available syncer regardless of whether the request is the first one in the test group or not because
BuildRequest.order was returning a string instead of a number.

Also fixed a bug that BuildbotTriggerable.syncOnce was re-ordering test groups by their id's instead of
respecting the order in which the perf dashboard returned.

  • public/v3/models/build-request.js:

(BuildRequest.prototype.order): Force the order to be a number.

  • server-tests/api-build-requests-tests.js: Assert the order as numbers.
  • server-tests/resources/mock-data.js:

(MockData.addAnotherMockTestGroup): Changed the test group id to 601, which is after the first mock data.
The old number was masking a bug in BuildbotTriggerable that it was re-ordering test groups by their id's
instead of using the order set forth by the perf dashboard.
(MockData.mockTestSyncConfigWithSingleBuilder):

  • server-tests/tools-buildbot-triggerable-tests.js: Added a test case for scheduling two build requests in

a single call to syncOnce. Each build request should be scheduled on the same builder as the previous build
requests in the same test group.

  • tools/js/buildbot-triggerable.js:

(BuildbotTriggerable.prototype.syncOnce): Order test groups by groupOrder, which is the index at which first
build request in the group appeared.
(BuildbotTriggerable.prototype._scheduleNextRequestInGroupIfSlaveIsAvailable): Don't re-order build requests
as they're already sorted on the server side.
(BuildbotTriggerable._testGroupMapForBuildRequests): Added groupOrder to test group info

8:07 PM Changeset in webkit [199331] by Brent Fulgham
  • 13 edits
    2 adds in trunk

Use WeakPtrs to avoid using deallocated Widgets and ScrollableAreas
https://bugs.webkit.org/show_bug.cgi?id=156420
<rdar://problem/25637378>

Reviewed by Darin Adler.

Source/WebCore:

Avoid the risk of using deallocated Widgets and ScrollableAreas by using WeakPtrs instead of
bare pointers. This allows us to remove some explicit calls to get ScrollableArea and Widget
members in the event handling logic. Instead, null checks are sufficient to ensure we never
accidentally dereference a deleted element.

  1. Modify the ScrollableArea class to support vending WeakPtrs.
  2. Modify the Event Handling code to use WeakPtrs to hold ScrollableArea and RenderWidget objects, and to null-check these elements after event handling dispatching is finished to handle cases where these objects are destroyed.

Test: fast/events/wheel-event-destroys-frame.html

fast/events/wheel-event-destroys-overflow.html

  • page/EventHandler.cpp:

(WebCore::EventHandler::platformPrepareForWheelEvents): Change signature for WeakPtr.
(WebCore::EventHandler::platformCompleteWheelEvent): Ditto.
(WebCore::EventHandler::platformNotifyIfEndGesture): Ditto.
(WebCore::widgetForElement): Change to return a WeakPtr.
(WebCore::EventHandler::handleWheelEvent): Use WeakPtrs to hold elements that might be destroyed
during event handling.

  • page/EventHandler.h:
  • page/mac/EventHandlerEfl.cpp: Rename passWheelEventToWidget to widgetDidHandleWheelEvent.
  • page/mac/EventHandlerGtk.cpp: Ditto.
  • page/mac/EventHandlerIOS.mm: Ditto.
  • page/mac/EventHandlerMac.mm:

(WebCore::scrollableAreaForEventTarget): Renamed from scrollViewForEventTarget. Return
a WeakPtr rather than a bare pointer.
(WebCore::scrollableAreaForContainerNode): Return WeakPtr rather than bare pointer.
(WebCore::EventHandler::completeWidgetWheelEvent): Added.
(WebCore::EventHandler::passWheelEventToWidget): Deleted.
(WebCore::EventHandler::platformPrepareForWheelEvents): Convert to WeakPtrs.
(WebCore::EventHandler::platformCompleteWheelEvent): Ditto.
(WebCore::EventHandler::platformCompletePlatformWidgetWheelEvent): Ditto.
(WebCore::EventHandler::platformNotifyIfEndGesture): Ditto.
(WebCore::EventHandler::widgetDidHandleWheelEvent): Renamed from passWheelEventToWidget.
(WebCore::EventHandler::widgetForEventTarget): Converted from static function to static
method so it can be shared with EventHandlerMac.
(WebCore::scrollViewForEventTarget): Deleted.

  • page/mac/EventHandlerWin.cpp: Rename passWheelEventToWidget to widgetDidHandleWheelEvent.
  • platform/ScrollableArea.cpp:
  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::createWeakPtr): Added.

  • platform/Widget.h:

(WebCore::ScrollableArea::createWeakPtr): Added.

LayoutTests:

  • fast/events/wheel-event-destroys-overflow-expected.txt: Added.
  • fast/events/wheel-event-destroys-overflow.html: Added.
  • platform/ios-simulator/TestExpectations: Skip wheel-event test on iOS.
7:57 PM Changeset in webkit [199330] by dino@apple.com
  • 3 edits
    2 adds in trunk

putImageData needs to premultiply input
https://bugs.webkit.org/show_bug.cgi?id=156488
<rdar://problem/25672675>

Reviewed by Zalan Bujtas.

Source/WebCore:

I made a mistake in r187534 as I was converting get and putImageData
to use Accelerate. The incoming data is unmultiplied, and should
be premultiplied before copying into the backing store. I was
accidentally unmultiplying unmultiplied data, which caused
some pretty psychedelic results.

Test: fast/canvas/putImageData-unmultiplied.html

  • platform/graphics/cg/ImageBufferDataCG.cpp:

(WebCore::ImageBufferData::putData): Call premultiply, not unpremultiply.

LayoutTests:

Tests that putImageData is taking unmultiplied data,
premultiplying it, then copying into the backing store.

  • fast/canvas/putImageData-unmultiplied-expected.html: Added.
  • fast/canvas/putImageData-unmultiplied.html: Added.
7:20 PM Changeset in webkit [199329] by bshafiei@apple.com
  • 5 edits in branches/safari-601.1.46-branch/Source

Versioning.

7:12 PM Changeset in webkit [199328] by jonlee@apple.com
  • 7 edits in trunk/PerformanceTests

Update Animometer to accommodate different screens
https://bugs.webkit.org/show_bug.cgi?id=156449

Reviewed by Darin Adler.
Provisionally reviewed by Said Abou-Hallawa.

  • Animometer/index.html: Wrap button in a container to add padding at the bottom.
  • Animometer/resources/debug-runner/animometer.css:

(@media screen and (min-device-width: 1800px)): Deleted.
(@media screen and (min-width: 1800px)): Cannot use min-device-width since it may match incorrectly.
(screen and (max-device-height: 414px) and (orientation: landscape)): Some devices swap device width
and height with orientation change.

  • Animometer/resources/runner/animometer.css: Similar.

(screen and (min-device-width: 1024px) and (orientation: landscape)):
(screen and (max-device-height: 414px) and (orientation: landscape)):
(.frame-container): On smaller iPhones, adding 1px prevents the navigation bars from appearing.
(@media screen and (min-device-width: 768px) and (max-device-width: 1024px)): Deleted.
(@media (min-device-height: 768px) and (max-device-height: 1024px)): Target iPad Airs and similar.
(@media screen and (min-device-width: 1024px) and (max-device-width: 1366px)): Deleted.
(@media screen and (max-device-width: 1024px) and (min-device-height: 1366px)): Target iPad Pro.
(#results footer): Add padding below the button for testing again.

  • Animometer/tests/master/multiply.html: Remove the center text.
  • Animometer/tests/master/resources/text.js: Update the test so that in every frame the text moves.
  • Animometer/tests/master/text.html: Update the text sizing depending on the size of the device.
6:32 PM Changeset in webkit [199327] by bshafiei@apple.com
  • 1 copy in tags/Safari-601.1.46.126

New tag.

6:00 PM Changeset in webkit [199326] by commit-queue@webkit.org
  • 28 edits in trunk/Source

When clearing cache, also clear AVFoundation cache.
https://bugs.webkit.org/show_bug.cgi?id=155783
rdar://problem/25252541

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-04-11
Reviewed by Darin Adler.

Source/WebCore:

Use AVAssetCache at a specified location on disk for all AVURLAssets. This AVAssetCache
can then be used to manage the cache storage used by AVFoundation. It is used to query the
contents of the cache in originsInMediaCache() and to clear the cache completely or partially in
clearMediaCache() and clearMediaCacheForOrigins().

Use SecurityOrigin instead of the less formal site String to represent origins in the cache.

  • html/HTMLMediaElement.cpp:

(WebCore::sharedMediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::setMediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::mediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::originsInMediaCache): Added.
(WebCore::HTMLMediaElement::clearMediaCache): Added parameter.
(WebCore::HTMLMediaElement::clearMediaCacheForOrigins): Added.
(WebCore::HTMLMediaElement::mediaPlayerMediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::getSitesInMediaCache): Deleted.
(WebCore::HTMLMediaElement::clearMediaCacheForSite): Deleted.

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::clearMediaCache): Added parameter.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::addMediaEngine): Add new cache methods.
(WebCore::addToHash): Added.
(WebCore::MediaPlayer::originsInMediaCache): Added.
(WebCore::MediaPlayer::clearMediaCache): Added parameter.
(WebCore::MediaPlayer::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayer::getSitesInMediaCache): Deleted.
(WebCore::MediaPlayer::clearMediaCacheForSite): Deleted.

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerClient::mediaPlayerMediaCacheDirectory): Added.

  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::originsInMediaCache): Added.
(WebCore::MediaPlayerPrivateInterface::clearMediaCache): Added parameter.
(WebCore::MediaPlayerPrivateInterface::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayerPrivateInterface::getSitesInMediaCache): Deleted.
(WebCore::MediaPlayerPrivateInterface::clearMediaCacheForSite): Deleted.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): Added cache methods.
(WebCore::assetCacheForPath): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::originsInMediaCache): Added.
(WebCore::toSystemClockTime): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache): Added parameter.
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Added.

  • platform/graphics/mac/MediaPlayerPrivateQTKit.h:
  • platform/graphics/mac/MediaPlayerPrivateQTKit.mm:

(WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Added cache methods.
(WebCore::MediaPlayerPrivateQTKit::originsInMediaCache): Added.
(WebCore::MediaPlayerPrivateQTKit::clearMediaCache): Added parameter.
(WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayerPrivateQTKit::getSitesInMediaCache): Deleted.
(WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForSite): Deleted.

  • platform/spi/mac/AVFoundationSPI.h:

Source/WebKit2:

Include the HTMLMediaElement media cache when doing disk cache operations.
Add a sandbox extension for media cache directory. This allows the UI process and the web process
to access the same cache.

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode): Add media cache directory.
(WebKit::WebProcessCreationParameters::decode): Add media cache directory.

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::ProcessPoolConfiguration): Add media cache directory.
(API::ProcessPoolConfiguration::copy): Add media cache directory.

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/APIWebsiteDataStore.cpp:

(API::WebsiteDataStore::defaultMediaCacheDirectory): Default implementation.

  • UIProcess/API/APIWebsiteDataStore.h:
  • UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:

(API::WebsiteDataStore::defaultMediaCacheDirectory): Media cache is in temporary directory.
(API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): For resources in temporary directory.
(API::WebsiteDataStore::defaultDataStoreConfiguration): Init media cache directory.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory):

  • UIProcess/WebProcessPool.cpp:

(WebKit::legacyWebsiteDataStoreConfiguration): Add mediaCacheDirectory.
(WebKit::WebProcessPool::createNewWebProcess): Add mediaCacheDirectory.

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::fetchData): Implement for mediaCacheDirectory.
(WebKit::WebsiteDataStore::removeData): Implement for mediaCacheDirectory.

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • UIProcess/efl/WebProcessPoolEfl.cpp:

(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Added.

  • UIProcess/gtk/WebProcessPoolGtk.cpp:

(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Added.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess): Initialize media cache directory.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess): Consume sandbox extension.

5:48 PM Changeset in webkit [199325] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Tab Bar items get unreadable at narrow window widths, should collapse earlier
https://bugs.webkit.org/show_bug.cgi?id=156477

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-04-11
Reviewed by Timothy Hatcher.

  • UserInterface/Views/TabBar.js:

(WebInspector.TabBar.prototype.layout):
Hide-titles sooner since a width of 60 results in only a few characters
and looks poor.

5:45 PM Changeset in webkit [199324] by jiewen_tan@apple.com
  • 2 edits in trunk/LayoutTests

Unskip imported/w3c/web-platform-tests/IndexedDB/idbindex-multientry-big.htm
https://bugs.webkit.org/show_bug.cgi?id=156480

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
4:49 PM Changeset in webkit [199323] by commit-queue@webkit.org
  • 25 edits in trunk/Source/WebCore

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

This change turns many indexeddb tests into crashes (Requested
by jwtan on #webkit).

Reverted changeset:

"Clean up IDBBindingUtilities."
https://bugs.webkit.org/show_bug.cgi?id=156472
http://trac.webkit.org/changeset/199310

4:47 PM Changeset in webkit [199322] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Unstyled nodes in ObjectTree previews look poor
https://bugs.webkit.org/show_bug.cgi?id=156475
<rdar://problem/25667351>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-04-11
Reviewed by Timothy Hatcher.

  • UserInterface/Views/ObjectPreviewView.js:

(WebInspector.ObjectPreviewView.prototype._appendPreview):
Treat nodes as simple values.

(WebInspector.ObjectPreviewView.prototype._initTitleElement):
(WebInspector.ObjectPreviewView.prototype._appendValuePreview):
Format nodes nicely, and treat them as lossy since they have properties.

4:46 PM Changeset in webkit [199321] by commit-queue@webkit.org
  • 28 edits in trunk/Source

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

This change broke the OS X Yosemite build. (Requested by jwtan
on #webkit).

Reverted changeset:

"When clearing cache, also clear AVFoundation cache."
https://bugs.webkit.org/show_bug.cgi?id=155783
http://trac.webkit.org/changeset/199315

4:22 PM Changeset in webkit [199320] by BJ Burg
  • 9 edits in trunk/Source

Web Inspector: get rid of InspectorBasicValue and InspectorString subclasses
https://bugs.webkit.org/show_bug.cgi?id=156407
<rdar://problem/25627659>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

There's no point having these subclasses as they don't save any space.
Add a StringImpl to the union and merge some implementations of writeJSON.

Rename m_data to m_map and explicitly name the union as InspectorValue::m_value.
If the value is a string and the string is not empty or null (i.e., it has a
StringImpl), then we need to ref() and deref() the string as the InspectorValue
is created or destroyed.

Move uses of the subclass to InspectorValue and delete redundant methods.
Now, most InspectorValue methods are non-virtual so they can be templated.

  • bindings/ScriptValue.cpp:

(Deprecated::jsToInspectorValue):

  • inspector/InjectedScriptBase.cpp:

(Inspector::InjectedScriptBase::makeCall):
Don't used deleted subclasses.

  • inspector/InspectorValues.cpp:

(Inspector::InspectorValue::null):
(Inspector::InspectorValue::create):
(Inspector::InspectorValue::asValue):
(Inspector::InspectorValue::asBoolean):
(Inspector::InspectorValue::asDouble):
(Inspector::InspectorValue::asInteger):
(Inspector::InspectorValue::asString):
These only need one implementation now.

(Inspector::InspectorValue::writeJSON):
Still a virtual method since Object and Array need their members.

(Inspector::InspectorObjectBase::InspectorObjectBase):
(Inspector::InspectorBasicValue::asBoolean): Deleted.
(Inspector::InspectorBasicValue::asDouble): Deleted.
(Inspector::InspectorBasicValue::asInteger): Deleted.
(Inspector::InspectorBasicValue::writeJSON): Deleted.
(Inspector::InspectorString::asString): Deleted.
(Inspector::InspectorString::writeJSON): Deleted.
(Inspector::InspectorString::create): Deleted.
(Inspector::InspectorBasicValue::create): Deleted.

  • inspector/InspectorValues.h:

(Inspector::InspectorObjectBase::find):
(Inspector::InspectorObjectBase::setBoolean):
(Inspector::InspectorObjectBase::setInteger):
(Inspector::InspectorObjectBase::setDouble):
(Inspector::InspectorObjectBase::setString):
(Inspector::InspectorObjectBase::setValue):
(Inspector::InspectorObjectBase::setObject):
(Inspector::InspectorObjectBase::setArray):
(Inspector::InspectorArrayBase::pushBoolean):
(Inspector::InspectorArrayBase::pushInteger):
(Inspector::InspectorArrayBase::pushDouble):
(Inspector::InspectorArrayBase::pushString):
(Inspector::InspectorArrayBase::pushValue):
(Inspector::InspectorArrayBase::pushObject):
(Inspector::InspectorArrayBase::pushArray):
Use new factory methods.

  • replay/EncodedValue.cpp:

(JSC::ScalarEncodingTraits<bool>::encodeValue):
(JSC::ScalarEncodingTraits<double>::encodeValue):
(JSC::ScalarEncodingTraits<float>::encodeValue):
(JSC::ScalarEncodingTraits<int32_t>::encodeValue):
(JSC::ScalarEncodingTraits<int64_t>::encodeValue):
(JSC::ScalarEncodingTraits<uint32_t>::encodeValue):
(JSC::ScalarEncodingTraits<uint64_t>::encodeValue):

  • replay/EncodedValue.h:

Use new factory methods.

Source/WebCore:

  • inspector/InspectorDatabaseAgent.cpp: Don't use deleted subclasses.
4:16 PM Changeset in webkit [199319] by bshafiei@apple.com
  • 2 edits in tags/Safari-602.1.27.0.1/Source/WebCore

Merged r199317. rdar://problem/25627389

4:16 PM Changeset in webkit [199318] by jiewen_tan@apple.com
  • 2 edits in trunk/LayoutTests

Skip imported/w3c/web-platform-tests/IndexedDB/idbindex-multientry-big.htm on ios-simulators
https://bugs.webkit.org/show_bug.cgi?id=156480

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
4:13 PM Changeset in webkit [199317] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

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

made double-click-and-drag on text drag instead of
highlighting (Requested by alexchristensen_ on #webkit).

Reverted changeset:

"eventMayStartDrag() does not check for shiftKey or
isOverLink"
https://bugs.webkit.org/show_bug.cgi?id=155746
http://trac.webkit.org/changeset/198909

Patch by Commit Queue <commit-queue@webkit.org> on 2016-04-11

4:00 PM Changeset in webkit [199316] by Chris Dumez
  • 7 edits in trunk/Source/WebCore

[WebIDL] Add support for [ImplementedAs] for EventHandler attributes
https://bugs.webkit.org/show_bug.cgi?id=156421

Reviewed by Darin Adler.

Add support for [ImplementedAs] for EventHandler attributes so we can
get rid of some ugly name hard-coding in the bindings generator.

  • Modules/notifications/Notification.idl:
  • bindings/scripts/CodeGeneratorJS.pm:

(EventHandlerAttributeEventName):

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

(WebCore::jsTestObjOnwebkitfoo):
(WebCore::setJSTestObjOnwebkitfoo):

  • bindings/scripts/test/TestObj.idl:
  • dom/Element.idl:
  • page/DOMWindow.idl:
3:43 PM Changeset in webkit [199315] by commit-queue@webkit.org
  • 28 edits in trunk/Source

When clearing cache, also clear AVFoundation cache.
https://bugs.webkit.org/show_bug.cgi?id=155783
rdar://problem/25252541

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-04-11
Reviewed by Darin Adler.

Source/WebCore:

Use AVAssetCache at a specified location on disk for all AVURLAssets. This AVAssetCache
can then be used to manage the cache storage used by AVFoundation. It is used to query the
contents of the cache in originsInMediaCache() and to clear the cache completely or partially in
clearMediaCache() and clearMediaCacheForOrigins().

Use SecurityOrigin instead of the less formal site String to represent origins in the cache.

  • html/HTMLMediaElement.cpp:

(WebCore::sharedMediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::setMediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::mediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::originsInMediaCache): Added.
(WebCore::HTMLMediaElement::clearMediaCache): Added parameter.
(WebCore::HTMLMediaElement::clearMediaCacheForOrigins): Added.
(WebCore::HTMLMediaElement::mediaPlayerMediaCacheDirectory): Added.
(WebCore::HTMLMediaElement::getSitesInMediaCache): Deleted.
(WebCore::HTMLMediaElement::clearMediaCacheForSite): Deleted.

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::clearMediaCache): Added parameter.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::addMediaEngine): Add new cache methods.
(WebCore::addToHash): Added.
(WebCore::MediaPlayer::originsInMediaCache): Added.
(WebCore::MediaPlayer::clearMediaCache): Added parameter.
(WebCore::MediaPlayer::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayer::getSitesInMediaCache): Deleted.
(WebCore::MediaPlayer::clearMediaCacheForSite): Deleted.

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerClient::mediaPlayerMediaCacheDirectory): Added.

  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::originsInMediaCache): Added.
(WebCore::MediaPlayerPrivateInterface::clearMediaCache): Added parameter.
(WebCore::MediaPlayerPrivateInterface::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayerPrivateInterface::getSitesInMediaCache): Deleted.
(WebCore::MediaPlayerPrivateInterface::clearMediaCacheForSite): Deleted.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): Added cache methods.
(WebCore::assetCacheForPath): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::originsInMediaCache): Added.
(WebCore::toSystemClockTime): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache): Added parameter.
(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Added.

  • platform/graphics/mac/MediaPlayerPrivateQTKit.h:
  • platform/graphics/mac/MediaPlayerPrivateQTKit.mm:

(WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Added cache methods.
(WebCore::MediaPlayerPrivateQTKit::originsInMediaCache): Added.
(WebCore::MediaPlayerPrivateQTKit::clearMediaCache): Added parameter.
(WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForOrigins): Added.
(WebCore::MediaPlayerPrivateQTKit::getSitesInMediaCache): Deleted.
(WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForSite): Deleted.

  • platform/spi/mac/AVFoundationSPI.h:

Source/WebKit2:

Include the HTMLMediaElement media cache when doing disk cache operations.
Add a sandbox extension for media cache directory. This allows the UI process and the web process
to access the same cache.

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode): Add media cache directory.
(WebKit::WebProcessCreationParameters::decode): Add media cache directory.

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::ProcessPoolConfiguration): Add media cache directory.
(API::ProcessPoolConfiguration::copy): Add media cache directory.

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/APIWebsiteDataStore.cpp:

(API::WebsiteDataStore::defaultMediaCacheDirectory): Default implementation.

  • UIProcess/API/APIWebsiteDataStore.h:
  • UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:

(API::WebsiteDataStore::defaultMediaCacheDirectory): Media cache is in temporary directory.
(API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): For resources in temporary directory.
(API::WebsiteDataStore::defaultDataStoreConfiguration): Init media cache directory.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory):

  • UIProcess/WebProcessPool.cpp:

(WebKit::legacyWebsiteDataStoreConfiguration): Add mediaCacheDirectory.
(WebKit::WebProcessPool::createNewWebProcess): Add mediaCacheDirectory.

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::fetchData): Implement for mediaCacheDirectory.
(WebKit::WebsiteDataStore::removeData): Implement for mediaCacheDirectory.

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • UIProcess/efl/WebProcessPoolEfl.cpp:

(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Added.

  • UIProcess/gtk/WebProcessPoolGtk.cpp:

(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory): Added.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess): Initialize media cache directory.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess): Consume sandbox extension.

2:42 PM Changeset in webkit [199314] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

[WebGL2] Use Open GL ES 3.0 to back WebGL2 contexts
https://bugs.webkit.org/show_bug.cgi?id=141178

Patch by Antoine Quint <Antoine Quint> on 2016-04-11
Reviewed by Dean Jackson.

We add a new useGLES3 attribute when creating a GraphicsContext3D in the event that the
context type is "webgl2". This attribute is then read by the GraphicsContext3D constructor
to request an Open GL ES 3.0 backend when creating the EAGLContext on iOS.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::create):

  • platform/graphics/GraphicsContext3D.h:

(WebCore::GraphicsContext3D::Attributes::Attributes):

  • platform/graphics/mac/GraphicsContext3DMac.mm:

(WebCore::GraphicsContext3D::GraphicsContext3D):

2:35 PM Changeset in webkit [199313] by jiewen_tan@apple.com
  • 4 edits
    2 adds in trunk

fast/loader/opaque-base-url.html crashing during mac and ios debug tests
https://bugs.webkit.org/show_bug.cgi?id=156179
<rdar://problem/25507719>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Navigate to about:blank if the provided src of an iframe/frame cannot be
resolved to a valid URL.

Test: fast/loader/iframe-src-invalid-url.html

  • loader/SubframeLoader.cpp:

(WebCore::SubframeLoader::requestFrame):

LayoutTests:

  • fast/loader/iframe-src-invalid-url-expected.txt: Added.
  • fast/loader/iframe-src-invalid-url.html: Added.
2:33 PM Changeset in webkit [199312] by commit-queue@webkit.org
  • 25 edits
    2 adds
    1 delete in trunk

Merge CG ImageSource and non CG ImageSource implementation in one file
https://bugs.webkit.org/show_bug.cgi?id=155456

Patch by Said Abou-Hallawa <sabouhallawa@apple,com> on 2016-04-11
Reviewed by Darin Adler.
Source/WebCore:

ImageSource for CG and CG code paths look very similar. All the platform
specific code can be moved to ImageDecoder classes for CG and non CG. And
we can have the ImageSource be platform independent and we get rid of
ImageSourceCG.cpp.

Test: fast/images/image-subsampling.html

  • CMakeLists.txt:
  • PlatformAppleWin.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:

Delete ImageSourceCG.cpp form all make files and add ImageSource.cpp to
CMakeLists.txt.

  • platform/Cursor.cpp:

(WebCore::determineHotSpot):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::hotSpot):
(WebCore::BitmapImage::getHotSpot): Deleted.

  • platform/graphics/BitmapImage.h:
  • platform/graphics/Image.h:

(WebCore::Image::hotSpot):
(WebCore::Image::getHotSpot): Deleted.
Rename getHotSpot() to hotSpot() and change it to return Optional<IntPoint>.

  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::~ImageSource): Remove clear(true) call. It does nothing.
(WebCore::ImageSource::clearFrameBufferCache): A wrapper which calls ImageDecoder::clearFrameBufferCache().
(WebCore::ImageSource::clear): Calls clearFrameBufferCache() which will do nothing for CG.

(WebCore::ImageSource::ensureDecoderIsCreated): Change SharedBuffer* to
const SharedBuffer& and remove the call to ImageDecoder::setMaxNumPixels().
The value of const static int CG ImageDecoder::m_maxNumPixels will be set
based on IMAGE_DECODER_DOWN_SAMPLING.

(WebCore::ImageSource::setData): Pass SharedBuffer& to the underlying functions.

(WebCore::ImageSource::calculateMaximumSubsamplingLevel): Returns the maximum
subsampling level allowed for an image.

(WebCore::ImageSource::subsamplingLevelForScale): Converts from a scale to
SubsamplingLevel taking into consideration the maximumSubsamplingLevel for
a particular image.

(WebCore::ImageSource::bytesDecodedToDetermineProperties): Returns the number
of encoded bytes which can determine the image properties. For non CG it's
zero. For CG it is a maximum value which can be corrected later.

(WebCore::ImageSource::isSizeAvailable):
(WebCore::ImageSource::sizeRespectingOrientation):
(WebCore::ImageSource::frameCount):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::filenameExtension):
(WebCore::ImageSource::getHotSpot):
(WebCore::ImageSource::frameIsCompleteAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
(WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::frameBytesAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::orientationAtIndex):
(WebCore::ImageSource::createFrameImageAtIndex):
These are wrappers for the ImageDecoder APIs. The purpose of these functions
is to ensure the ImageDecoder is created.

(WebCore::ImageSource::dump): Called from BitmapImage::dump().

(WebCore::ImageSource::getHotSpot): Deleted.

  • platform/graphics/ImageSource.h:

(WebCore::ImageSource::setAllowSubsampling): Called from BitmapImage::setAllowSubsampling().

(WebCore::ImageSource::maxPixelsPerDecodedImage): Deleted.
(WebCore::ImageSource::setMaxPixelsPerDecodedImage): Deleted.
Setting maxPixelsPerDecodedImage was moved to the non CG ImageDecoder.

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::ImageDecoder::setData): Change SharedBuffer* to SharedBuffer&.

(WebCore::ImageDecoder::subsamplingLevelForScale): Deleted.
The code was moved to ImageSource::subsamplingLevelForScale().

  • platform/graphics/cg/ImageDecoderCG.h:

(WebCore::ImageDecoder::create): Make the prototype of this function
suitable for CG and non CG cases.
(WebCore::ImageDecoder::clearFrameBufferCache): Empty functions for CG.

  • platform/graphics/cg/ImageSourceCG.cpp: Removed.
  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::frameIsCompleteAtIndex): A mew function to return
whether the frame decoding is complete or not.

(WebCore::ImageDecoder::frameHasAlphaAtIndex): Simplify the logic.

(WebCore::ImageDecoder::frameDurationAtIndex): The code was moved from
ImageSource::frameDurationAtIndex() in ImageSource.cpp.

(WebCore::ImageDecoder::createFrameImageAtIndex): The code was moved from
ImageSource::createFrameImageAtIndex() in ImageSource.cpp.

  • platform/image-decoders/ImageDecoder.h:

(WebCore::ImageDecoder::ImageDecoder): Initialize the members in class.
(WebCore::ImageDecoder::~ImageDecoder): Fix the braces style.
(WebCore::ImageDecoder::setData): Change the type of the argument from
SharedBuffer* to SharedBuffer&.
(WebCore::ImageDecoder::frameSizeAtIndex): Add the argument SubsamplingLevel
so it can have the same prototype as CG.
(WebCore::ImageDecoder::orientationAtIndex): Rename it to the same of CG.

(WebCore::ImageDecoder::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageDecoder::bytesDecodedToDetermineProperties):
(WebCore::ImageDecoder::subsamplingLevelForScale): Add these functions
and return the default values so we do not have to add directive compiled
non CG blocks in ImageSource.cpp.

(WebCore::ImageDecoder::hotSpot): Return Optional<IntPoint>.

(WebCore::ImageDecoder::orientation): Deleted.
(WebCore::ImageDecoder::setMaxNumPixels): Deleted.

  • platform/image-decoders/bmp/BMPImageDecoder.cpp:

(WebCore::BMPImageDecoder::setData):

  • platform/image-decoders/bmp/BMPImageDecoder.h:
  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::setData):
(WebCore::GIFImageDecoder::decode):

  • platform/image-decoders/gif/GIFImageDecoder.h:
  • platform/image-decoders/gif/GIFImageReader.h:

(GIFImageReader::setData):

  • platform/image-decoders/ico/ICOImageDecoder.cpp:

(WebCore::ICOImageDecoder::setData):
Use reference SharedBuffer instead of pointer SharedBuffer.

(WebCore::ICOImageDecoder::hotSpot):
(WebCore::ICOImageDecoder::hotSpotAtIndex):
Change hotSpot() to return Optional<IntPoint>.

  • platform/image-decoders/ico/ICOImageDecoder.h:

(WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
Pass reference SharedBuffer instead of pointer SharedBuffer.

Source/WebKit2:

  • UIProcess/API/efl/EwkView.cpp:

(EwkView::setCursor):
Replace the call to Image::getHotSpot() by Image::hotSpot().

LayoutTests:

Add a test for image sub-sampling. The image subsampling is enabled by
default for iOS platform only. But it can be explicitly enabled through
the setting ImageSubsamplingEnabled.

  • fast/images/image-subsampling-expected.html: Added.
  • fast/images/image-subsampling.html: Added.
2:32 PM Changeset in webkit [199311] by andersca@apple.com
  • 6 edits
    2 moves in trunk/Source/WebKit2

Rename WKOpenPanelParameters files to WKOpenPanelParametersRef
https://bugs.webkit.org/show_bug.cgi?id=156473

Reviewed by Alex Christensen.

  • UIProcess/API/C/WKOpenPanelParameters.cpp:

(WKOpenPanelParametersGetTypeID): Deleted.
(WKOpenPanelParametersGetAllowsMultipleFiles): Deleted.
(WKOpenPanelParametersCopyAcceptedMIMETypes): Deleted.
(WKOpenPanelParametersCopyCapture): Deleted.
(WKOpenPanelParametersGetCaptureEnabled): Deleted.
(WKOpenPanelParametersCopySelectedFileNames): Deleted.

  • UIProcess/API/C/WKOpenPanelParametersRef.cpp: Renamed from Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.cpp.

(WKOpenPanelParametersGetTypeID):
(WKOpenPanelParametersGetAllowsMultipleFiles):
(WKOpenPanelParametersCopyAcceptedMIMETypes):
(WKOpenPanelParametersCopyCapture):
(WKOpenPanelParametersGetCaptureEnabled):
(WKOpenPanelParametersCopySelectedFileNames):

  • UIProcess/API/C/WKOpenPanelParametersRef.h: Renamed from Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.h.
  • UIProcess/API/C/WebKit2_C.h:
  • UIProcess/API/efl/ewk_file_chooser_request.cpp:
  • UIProcess/mac/WebInspectorProxyMac.mm:
  • WebKit2.xcodeproj/project.pbxproj:
2:31 PM Changeset in webkit [199310] by beidson@apple.com
  • 25 edits in trunk/Source/WebCore

Clean up IDBBindingUtilities.
https://bugs.webkit.org/show_bug.cgi?id=156472

Reviewed by Alex Christensen.

No new tests (No change in behavior).

  • Get rid of a whole bunch of unused functions (since we got rid of Legacy IDB).
  • Make more functions deal in ExecState/ScriptExecutionContexts instead of DOMRequestState.
  • Make more functions deal in JSValue instead of Deprecated::ScriptValue.
  • bindings/scripts/IDLAttributes.txt: Add a new attribute to signify that an implementation returns JSValues instead of Deprecated::ScriptState
  • bindings/scripts/CodeGeneratorJS.pm:

(NativeToJSValue): Use that new attribute.

  • Modules/indexeddb/IDBAny.cpp:

(WebCore::IDBAny::IDBAny):
(WebCore::IDBAny::scriptValue):

  • Modules/indexeddb/IDBAny.h:

(WebCore::IDBAny::create):

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::key):
(WebCore::IDBCursor::primaryKey):
(WebCore::IDBCursor::value):
(WebCore::IDBCursor::update):
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::deleteFunction):
(WebCore::IDBCursor::setGetResult):

  • Modules/indexeddb/IDBCursor.h:
  • Modules/indexeddb/IDBCursor.idl:
  • Modules/indexeddb/IDBCursorWithValue.idl:
  • Modules/indexeddb/IDBFactory.cpp:

(WebCore::IDBFactory::cmp):

  • Modules/indexeddb/IDBIndex.cpp:

(WebCore::IDBIndex::count):
(WebCore::IDBIndex::get):
(WebCore::IDBIndex::getKey):

  • Modules/indexeddb/IDBKeyRange.cpp:

(WebCore::IDBKeyRange::lowerValue):
(WebCore::IDBKeyRange::upperValue):
(WebCore::IDBKeyRange::only):
(WebCore::IDBKeyRange::lowerBound):
(WebCore::IDBKeyRange::upperBound):
(WebCore::IDBKeyRange::bound):

  • Modules/indexeddb/IDBKeyRange.h:
  • Modules/indexeddb/IDBKeyRange.idl:
  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::modernDelete):
(WebCore::IDBObjectStore::count):

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::setResult):
(WebCore::IDBRequest::setResultToStructuredClone):

  • Modules/indexeddb/server/MemoryObjectStore.cpp:

(WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
(WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):

  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::idbKeyPathFromValue):
(WebCore::deserializeIDBValueDataToJSValue):
(WebCore::scriptValueToIDBKey):
(WebCore::idbKeyDataToScriptValue):
(WebCore::idbKeyDataToJSValue): Deleted.
(WebCore::injectIDBKeyIntoScriptValue): Deleted.
(WebCore::createIDBKeyFromScriptValueAndKeyPath): Deleted.
(WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath): Deleted.
(WebCore::canInjectIDBKeyIntoScriptValue): Deleted.
(WebCore::deserializeIDBValue): Deleted.
(WebCore::deserializeIDBValueData): Deleted.
(WebCore::deserializeIDBValueBuffer): Deleted.
(WebCore::idbValueDataToJSValue): Deleted.
(WebCore::idbKeyToScriptValue): Deleted.

  • bindings/js/IDBBindingUtilities.h:
  • bindings/js/JSIDBAnyCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSIDBDatabaseCustom.cpp:

(WebCore::JSIDBDatabase::createObjectStore):

  • bindings/js/JSIDBObjectStoreCustom.cpp:

(WebCore::JSIDBObjectStore::createIndex):

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::execState):

  • dom/ScriptExecutionContext.h:
  • inspector/InspectorIndexedDBAgent.cpp:
1:10 PM Changeset in webkit [199309] by barraclough@apple.com
  • 16 edits in trunk/Source

WebKit should adopt journal_mode=wal for all SQLite databases.
https://bugs.webkit.org/show_bug.cgi?id=133496

Reviewed by Darin Adler.

Source/WebCore:

The statement intended to enable WAL mode is always failing because it is missing a
prepare(). Fix this. We were also previously permitting SQLITE_OK results - this
was in error (we were only getting these because stepping the unprepared statement
returned SQLITE_OK). Also set the SQLITE_OPEN_AUTOPROXY flag when opening the
database - this will improve perfomance when the database is accessed via an AFP
mount.

This exposed a bug, that deleteAllDatabases does not actually delete the databases on
iOS, for testing to reset back to a known state between tests it should be doing so.

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::deleteAllDatabases):

  • force databases to actually be deleted on iOS. This method is only used from testing code (DumpRenderTree / WebKitTestRunner).

(WebCore::DatabaseTracker::deleteOrigin):

  • added IOSDeletionMode.

(WebCore::DatabaseTracker::deleteDatabaseFile):

  • added IOSDeletionMode, modified to actually delete if this is set.
  • Modules/webdatabase/DatabaseTracker.h:
    • added IOSDeletionMode.
  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::open):

  • call prepareAndStep(), only check for SQLITE_ROW result.
  • platform/sql/SQLiteFileSystem.cpp:

(WebCore::SQLiteFileSystem::openDatabase):

  • should set SQLITE_OPEN_AUTOPROXY flag when opening database.

Source/WebKit/mac:

  • Storage/WebDatabaseManagerPrivate.h:
    • renamed deleteAllDatabases -> deleteAllDatabasesImmediately.

Source/WebKit/win:

  • WebDatabaseManager.cpp:

(WebDatabaseManager::deleteAllDatabases):

  • renamed deleteAllDatabases -> deleteAllDatabasesImmediately.

Source/WebKit2:

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleClearAllDatabases):

  • renamed deleteAllDatabases -> deleteAllDatabasesImmediately.
1:00 PM Changeset in webkit [199308] by Joseph Pecoraro
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: HeapSnapshot instance property path popover should include a descriptive header
https://bugs.webkit.org/show_bug.cgi?id=156431
<rdar://problem/25633594>

Reviewed by Timothy Hatcher.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendTitle):
Title for the popover. Because localization may change the location of the @1234
in the string, localize first with a placeholder, and then replace the placeholder
with the @1234 link.

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPath):
Give the table a container for extra padding.

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
Do not include the space before @1234 as part of the clickable link.

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
Include a title when the popover shows a root path.

  • UserInterface/Views/HeapSnapshotInstancesContentView.css:

(.heap-snapshot-instance-popover-content > .title):
(.heap-snapshot-instance-popover-content):
(.heap-snapshot-instance-popover-content > .table-container):
(.heap-snapshot-instance-popover-content table):
Provide styles for the title. Let the title extend across the entire
popover horizontally, but pad the table so that it appears more
centered under the title. Because the table has border collapse we have
to wrap it in a container to give it back the padding we want.

12:52 PM Changeset in webkit [199307] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Simplify InlineTextBox::selectionStartEnd()
https://bugs.webkit.org/show_bug.cgi?id=156459

Reviewed by Darin Adler.

No change in functionality.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::selectionState):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::selectionStartEnd):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintCompositionBackground):

  • rendering/InlineTextBox.h:
  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paintText):

12:37 PM Changeset in webkit [199306] by bshafiei@apple.com
  • 2 edits in tags/Safari-602.1.27.0.1/Source/WebKit2

Merged r199301. rdar://problem/25628133

12:33 PM Changeset in webkit [199305] by bshafiei@apple.com
  • 5 edits in tags/Safari-602.1.27.0.1/Source

Versioning.

12:31 PM Changeset in webkit [199304] by Alan Bujtas
  • 4 edits
    2 adds in trunk

REGRESSION (r193857): Text selection causes text to disappear.
https://bugs.webkit.org/show_bug.cgi?id=156448
rdar://problem/25578952

Reviewed by Simon Fraser.

Apparently when the end position of the selection range is smaller than the start position, we need
to repaint the entire text as it indicates selection clearing.

Source/WebCore:

Test: fast/text/text-disappear-on-deselect.html

  • rendering/TextPainter.cpp:

(WebCore::TextPainter::paintText):

LayoutTests:

  • fast/text/text-disappear-on-deselect-expected.html: Added.
  • fast/text/text-disappear-on-deselect.html: Added.
12:31 PM Changeset in webkit [199303] by fpizlo@apple.com
  • 21 edits in trunk/Source/JavaScriptCore

It should be possible to edit StructureStubInfo without recompiling the world
https://bugs.webkit.org/show_bug.cgi?id=156470

Reviewed by Keith Miller.

This change makes it less painful to make changes to the IC code. It used to be that any
change to StructureStubInfo caused every JIT-related file to get recompiled. Now only a
smaller set of files - ones that actually peek into StructureStubInfo - will recompile. This
is mainly because CodeBlock.h no longer includes StructureStubInfo.h.

  • bytecode/ByValInfo.h:
  • bytecode/CodeBlock.cpp:
  • bytecode/CodeBlock.h:
  • bytecode/GetByIdStatus.cpp:
  • bytecode/GetByIdStatus.h:
  • bytecode/PutByIdStatus.cpp:
  • bytecode/PutByIdStatus.h:
  • bytecode/StructureStubInfo.h:

(JSC::getStructureStubInfoCodeOrigin):

  • dfg/DFGByteCodeParser.cpp:
  • dfg/DFGJITCompiler.cpp:
  • dfg/DFGOSRExitCompilerCommon.cpp:
  • dfg/DFGSpeculativeJIT.h:
  • ftl/FTLLowerDFGToB3.cpp:
  • ftl/FTLSlowPathCall.h:
  • jit/IntrinsicEmitter.cpp:
  • jit/JITInlineCacheGenerator.cpp:
  • jit/JITInlineCacheGenerator.h:
  • jit/JITOperations.cpp:
  • jit/JITPropertyAccess.cpp:
  • jit/JITPropertyAccess32_64.cpp:
12:20 PM Changeset in webkit [199302] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.1.27.0.1

New tag.

12:06 PM Changeset in webkit [199301] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r198933): Unable to login to Google account from Internet Accounts preference pane
https://bugs.webkit.org/show_bug.cgi?id=156447
<rdar://problem/25628133>

Reviewed by Anders Carlsson.

Temporarily perform code signing verification only for Mac App Store- and Apple Developer- signed apps.

  • Shared/mac/ChildProcessMac.mm:

(WebKit::codeSigningIdentifierForProcess):

12:04 PM Changeset in webkit [199300] by gskachkov@gmail.com
  • 19 edits in trunk/Source/JavaScriptCore

Remove NewArrowFunction from DFG IR
https://bugs.webkit.org/show_bug.cgi?id=156439

Reviewed by Saam Barati.

It seems that NewArrowFunction was left in DFG IR during refactoring by mistake.

  • dfg/DFGAbstractInterpreterInlines.h:
  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:
  • dfg/DFGDoesGC.cpp:
  • dfg/DFGFixupPhase.cpp:
  • dfg/DFGMayExit.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToPhantomNewFunction):

  • dfg/DFGNodeType.h:
  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewFunction):

  • dfg/DFGSpeculativeJIT32_64.cpp:
  • dfg/DFGSpeculativeJIT64.cpp:
  • dfg/DFGStoreBarrierInsertionPhase.cpp:
  • dfg/DFGStructureRegistrationPhase.cpp:
  • ftl/FTLCapabilities.cpp:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):

12:00 PM Changeset in webkit [199299] by oliver@apple.com
  • 21 edits in trunk

Remove compile time define for SEPARATED_HEAP
https://bugs.webkit.org/show_bug.cgi?id=155508

Reviewed by Mark Lam.

Source/JavaScriptCore:

Remove the SEPARATED_HEAP compile time flag. The separated
heap is available, but off by default, on x86_64, ARMv7, and
ARM64.

Working through the issues that happened last time essentially
required implementing the ARMv7 path for the separated heap
just so I could find all the ways it was going wrong.

We fixed all the logic by making the branch and jump logic in
the linker and assemblers take two parameters, the location to
write to, and the location we'll actually be writing to. We
need to do this because it's no longer sufficient to compute
jumps relative to region the linker is writing to.

The repatching jump, branch, and call functions only need the
executable address as the patching is performed directly using
performJITMemcpy function which works in terms of the executable
address.

There is no performance impact on jsc-benchmarks with the separate
heap either emabled or disabled.

  • Configurations/FeatureDefines.xcconfig:
  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::linkJump):
(JSC::ARM64Assembler::linkCall):
(JSC::ARM64Assembler::relinkJump):
(JSC::ARM64Assembler::relinkCall):
(JSC::ARM64Assembler::link):
(JSC::ARM64Assembler::linkJumpOrCall):
(JSC::ARM64Assembler::linkCompareAndBranch):
(JSC::ARM64Assembler::linkConditionalBranch):
(JSC::ARM64Assembler::linkTestAndBranch):
(JSC::ARM64Assembler::relinkJumpOrCall):

  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::revertJumpTo_movT3movtcmpT2):
(JSC::ARMv7Assembler::revertJumpTo_movT3):
(JSC::ARMv7Assembler::link):
(JSC::ARMv7Assembler::linkJump):
(JSC::ARMv7Assembler::relinkJump):
(JSC::ARMv7Assembler::repatchCompact):
(JSC::ARMv7Assembler::replaceWithJump):
(JSC::ARMv7Assembler::replaceWithLoad):
(JSC::ARMv7Assembler::replaceWithAddressComputation):
(JSC::ARMv7Assembler::setInt32):
(JSC::ARMv7Assembler::setUInt7ForLoad):
(JSC::ARMv7Assembler::isB):
(JSC::ARMv7Assembler::isBX):
(JSC::ARMv7Assembler::isMOV_imm_T3):
(JSC::ARMv7Assembler::isMOVT):
(JSC::ARMv7Assembler::isNOP_T1):
(JSC::ARMv7Assembler::isNOP_T2):
(JSC::ARMv7Assembler::linkJumpT1):
(JSC::ARMv7Assembler::linkJumpT2):
(JSC::ARMv7Assembler::linkJumpT3):
(JSC::ARMv7Assembler::linkJumpT4):
(JSC::ARMv7Assembler::linkConditionalJumpT4):
(JSC::ARMv7Assembler::linkBX):
(JSC::ARMv7Assembler::linkConditionalBX):
(JSC::ARMv7Assembler::linkJumpAbsolute):

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::copyCompactAndLinkCode):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::link):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::link):

  • jit/ExecutableAllocator.h:

(JSC::performJITMemcpy):

  • jit/ExecutableAllocatorFixedVMPool.cpp:

(JSC::FixedVMPoolExecutableAllocator::initializeSeparatedWXHeaps):
(JSC::FixedVMPoolExecutableAllocator::jitWriteThunkGenerator):
(JSC::FixedVMPoolExecutableAllocator::genericWriteToJITRegion):
(JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator): Deleted.

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/FeatureDefines.h:
  • wtf/Platform.h:
11:49 AM Changeset in webkit [199298] by Chris Dumez
  • 15 edits
    2 deletes in trunk/Source/WebCore

Merge AttributedDOMTokenList into DOMTokenList
https://bugs.webkit.org/show_bug.cgi?id=156468

Reviewed by Ryosuke Niwa.

Merge AttributedDOMTokenList into DOMTokenList to simplify the code.
DOMTokenList is not constructible and AttributedDOMTokenList is its
only constructible subclass after r196123.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Element.cpp:

(WebCore::Element::classList):

  • dom/ElementRareData.h:

(WebCore::ElementRareData::classList):
(WebCore::ElementRareData::setClassList):

  • html/AttributeDOMTokenList.cpp: Removed.
  • html/AttributeDOMTokenList.h: Removed.
  • html/DOMTokenList.cpp:

(WebCore::DOMTokenList::DOMTokenList):
(WebCore::DOMTokenList::attributeValueChanged):
(WebCore::DOMTokenList::updateAfterTokenChange):

  • html/DOMTokenList.h:

(WebCore::DOMTokenList::ref):
(WebCore::DOMTokenList::deref):
(WebCore::DOMTokenList::element):
(WebCore::DOMTokenList::~DOMTokenList): Deleted.
(WebCore::DOMTokenList::updateAfterTokenChange): Deleted.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::relList):

  • html/HTMLAnchorElement.h:
  • html/HTMLIFrameElement.cpp:

(WebCore::HTMLIFrameElement::sandbox):

  • html/HTMLIFrameElement.h:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::sizes):
(WebCore::HTMLLinkElement::relList):

  • html/HTMLLinkElement.h:
  • html/HTMLOutputElement.cpp:

(WebCore::HTMLOutputElement::htmlFor):

  • html/HTMLOutputElement.h:
11:20 AM Changeset in webkit [199297] by fpizlo@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

Clean up how we reason about the states of AccessCases
https://bugs.webkit.org/show_bug.cgi?id=156454

Reviewed by Mark Lam.

Currently when we add an AccessCase to a PolymorphicAccess stub, we regenerate the stub.
That means that as we grow a stub to have N cases, we will do O(N2) generation work. I want
to explore buffering AccessCases so that we can do O(N) generation work instead. But to
before I go there, I want to make sure that the statefulness of AccessCase makes sense. So,
I broke it down into three different states and added assertions about the transitions. I
also broke out a separate operation called AccessCase::commit(), which is the work that
cannot be buffered since there cannot be any JS effects between when the AccessCase was
created and when we do the work in commit().

This opens up a fairly obvious path to buffering AccessCases: add them to the list without
regenerating. Then when we do eventually trigger regeneration, those cases will get cloned
and generated automagically. This patch doesn't implement this technique yet, but gives us
an opportunity to independently test the scaffolding necessary to do it.

This is perf-neutral on lots of tests.

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationResult::dump):
(JSC::AccessCase::clone):
(JSC::AccessCase::commit):
(JSC::AccessCase::guardedByStructureCheck):
(JSC::AccessCase::dump):
(JSC::AccessCase::generateWithGuard):
(JSC::AccessCase::generate):
(JSC::AccessCase::generateImpl):
(JSC::PolymorphicAccess::regenerateWithCases):
(JSC::PolymorphicAccess::regenerate):
(WTF::printInternal):

  • bytecode/PolymorphicAccess.h:

(JSC::AccessCase::type):
(JSC::AccessCase::state):
(JSC::AccessCase::offset):
(JSC::AccessCase::viaProxy):
(JSC::AccessCase::callLinkInfo):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::addAccessCase):

  • bytecode/Watchpoint.h:
  • dfg/DFGOperations.cpp:
  • jit/Repatch.cpp:

(JSC::repatchGetByID):
(JSC::repatchPutByID):
(JSC::repatchIn):

  • runtime/VM.cpp:

(JSC::VM::dumpRegExpTrace):
(JSC::VM::ensureWatchpointSetForImpureProperty):
(JSC::VM::registerWatchpointForImpureProperty):
(JSC::VM::addImpureProperty):

  • runtime/VM.h:
9:50 AM Changeset in webkit [199296] by Chris Dumez
  • 15 edits in trunk

DOMTokenList.contains() should not throw
https://bugs.webkit.org/show_bug.cgi?id=156453

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Re-sync dom/nodes/Element-classlist.html with upstream @26308720.

  • web-platform-tests/dom/nodes/Element-classlist-expected.txt:
  • web-platform-tests/dom/nodes/Element-classlist.html:

Source/WebCore:

DOMTokenList.contains() should not throw if the input token is invalid:
https://github.com/whatwg/dom/commit/6d3076e3cbcba662489b272a718bc6b8c0082a74

We now return false in such cases, instead of throwing, which should be
safe with regards to backward compatibility.

No new tests, already covered by existing tests.

  • html/DOMTokenList.cpp:

(WebCore::DOMTokenList::contains):

  • html/DOMTokenList.h:
  • html/DOMTokenList.idl:

LayoutTests:

Update existing layout tests now that DOMTokenList.contains() no longer
throws when called with an invalid token.

  • fast/dom/HTMLElement/class-list-expected.txt:
  • fast/dom/HTMLElement/class-list-quirks-expected.txt:
  • fast/dom/HTMLElement/script-tests/class-list.js:

(shouldThrowDOMException): Deleted.

  • fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt:
  • fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js:

(shouldThrowDOMException): Deleted.

  • fast/dom/rel-list-expected.txt:
  • fast/dom/rel-list.html:
9:07 AM WebKitIDL edited by Chris Dumez
Add [ExportMacro] (diff)
8:45 AM MathML/Early_2016_Refactoring edited by fred.wang@free.fr
(diff)
8:38 AM Changeset in webkit [199295] by fred.wang@free.fr
  • 15 edits
    2 adds in trunk

Refactor RenderMathMLFraction layout to avoid using flexbox
https://bugs.webkit.org/show_bug.cgi?id=153917

Patch by Frederic Wang <fwang@igalia.com> on 2016-04-11
Reviewed by Sergio Villar Senin.

Source/WebCore:

Based on a patch by Alejandro G. Castro <alex@igalia.com>

Implement the layoutBlock method to handle the layout calculations
directly in the class. This also fixes parsing of absolute values for
linethickness attribute (e.g. 10px) and adds support for the AxisHeight
and FractionRuleThickness MATH parameters.

Test: mathml/opentype/fraction-line.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::mathLineThickness): Use the thickness relative to the
default line thickness since that's really what is expected by mathml-line-fraction.html

  • css/mathml.css: Remove flexbox properties for mfrac.

(mfrac): Deleted.
(mfrac > *): Deleted.
(mfrac[numalign="left"] > :first-child): Deleted.
(mfrac[numalign="right"] > :first-child): Deleted.
(mfrac[denomalign="left"] > :last-child): Deleted.
(mfrac[denomalign="right"] > :last-child): Deleted.
(mfrac > :first-child): Deleted.
(mfrac > :last-child): Deleted.
(mfrac): Deleted.

  • rendering/mathml/RenderMathMLBlock.cpp: Introduce a helper function to retrieve the math

axis height.
(WebCore::RenderMathMLBlock::mathAxisHeight):

  • rendering/mathml/RenderMathMLBlock.h: Declare mathAxisHeight.
  • rendering/mathml/RenderMathMLFraction.cpp:

(WebCore::RenderMathMLFraction::RenderMathMLFraction):
(WebCore::RenderMathMLFraction::parseAlignmentAttribute): Helper function to parse the align
attribute.
(WebCore::RenderMathMLFraction::isValid): Helper function to verify whether the child list
is valid with respect to the MathML specificitation.
(WebCore::RenderMathMLFraction::numerator): Helper function to retrieve the numerator.
(WebCore::RenderMathMLFraction::denominator): Helper function to retrieve the denominator.
(WebCore::RenderMathMLFraction::updateFromElement): Use the FractionRuleThickness parameter
when avaiable to calculate the default linethickness.
Fix computation of linethickness for absolute values (e.g. 10px), the default linethickness
must not be involved for such values.
We no longer need to manage style of anonymous wrappers.
(WebCore::RenderMathMLFraction::unembellishedOperator): Use the helper function and we no
longer care about anonymous wrappers.
(WebCore::RenderMathMLFraction::computePreferredLogicalWidths): Implement this function
without using flexbox.
(WebCore::RenderMathMLFraction::horizontalOffset): Helper function to get the horizontal
offsets of children depending of the alignment.
(WebCore::RenderMathMLFraction::layoutBlock): Implement this function without using flexbox.
(WebCore::RenderMathMLFraction::paint): Do not paint if the fraction is invalid. Use helper
function. Use the width of the renderer (instead of the one of the denominator) as the
length of the fraction bar.
(WebCore::RenderMathMLFraction::firstLineBaseline): Use the helper functions to get children
and axis height.
(WebCore::RenderMathMLFraction::paintChildren): Temporary function to remove in a
follow-up patch.
(WebCore::RenderMathMLFraction::fixChildStyle): Deleted. We no longer need to manage style
of anonymous wrappers.
(WebCore::RenderMathMLFraction::addChild): Deleted. We no longer need to manage
anonymous wrappers.
(WebCore::RenderMathMLFraction::styleDidChange): We no longer need to manage style of
anonymous wrappers.
(WebCore::RenderMathMLFraction::layout): Deleted.

  • rendering/mathml/RenderMathMLFraction.h: Replace lineThickness with relativeLineThickness,

as needed by the accessibility code. Update function and members declarations.

LayoutTests:

  • TestExpectations: No longer skip mathml/presentation/fractions-positions.html
  • mathml/opentype/fraction-line-expected.html: Added. New test to verify AxisHeight and

FractionRuleThickness parameters.

  • mathml/opentype/fraction-line.html: Added. New test to verify axis height and rule

thickness parameters.

  • mathml/presentation/fractions-linethickness-expected.html: Adjust the test to be sure that

the default rule thickness is 1px.

  • mathml/presentation/fractions-linethickness.html: Adjust the test to be sure that the

default rule thickness is 1px.

  • platform/gtk/mathml/presentation/roots-expected.txt: Update reference to take into account

changes in the render tree.

  • platform/ios-simulator/mathml/presentation/roots-expected.txt: Ditto
  • platform/mac/TestExpectations: Mark fraction-line and fractions-linethickness as

possibly failing since these tests require Latin Modern Math to work reliably.

  • platform/ios-simulator/TestExpectations: Ditto
5:46 AM Changeset in webkit [199294] by commit-queue@webkit.org
  • 25 edits
    1 copy
    2 deletes in trunk

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

broke 300 tests (Requested by mcatanzaro on #webkit).

Reverted changeset:

"Merge CG ImageSource and non CG ImageSource implementation in
one file"
https://bugs.webkit.org/show_bug.cgi?id=155456
http://trac.webkit.org/changeset/199290

5:12 AM MathML/Early_2016_Refactoring edited by fred.wang@free.fr
(diff)
5:11 AM Changeset in webkit [199293] by fred.wang@free.fr
  • 13 edits
    2 adds in trunk

Refactor RenderMathMLUnderOver layout functions to avoid using flexbox
https://bugs.webkit.org/show_bug.cgi?id=153742

Patch by Frederic Wang <fwang@igalia.com> on 2016-04-11
Reviewed by Sergio Villar Senin.

Source/WebCore:

Based on a patch by Javier Fernandez <jfernandez@igalia.com>

Refactor the UnderOver renderer to use its own layoutBlock method that
does all the layout calculations without considering the flexbox
restrictions.

  • css/mathml.css:

(mo, mfrac, munder, mover, munderover): Delete the underover elements from the line defining
the column direction.
(munder, mover, munderover): Deleted. This flexbox property is no longer needed.
(mover > :last-child, munderover > :last-child): Deleted. This flexbox property is no longer
needed.

  • rendering/mathml/RenderMathMLUnderOver.cpp:

(WebCore::RenderMathMLUnderOver::firstLineBaseline): Use ascentForChild.
(WebCore::RenderMathMLUnderOver::computeOperatorsHorizontalStretch): Avoid stretching
operators that are not stretchy.
(WebCore::RenderMathMLUnderOver::isValid): Helper function to ensure that the child list is
valid with respect to the MathML specification.
(WebCore::RenderMathMLUnderOver::base): Added. Helper function.
(WebCore::RenderMathMLUnderOver::under): Added. Helper function.
(WebCore::RenderMathMLUnderOver::over): Added. Helper function.
(WebCore::RenderMathMLUnderOver::computePreferredLogicalWidths): Added.
The preferred width is the maximum preferred width of the base, under and over scripts.
(WebCore::RenderMathMLUnderOver::horizontalOffset): Added, helper to calculate the
horizontal position of children (horizontally centered).
(WebCore::RenderMathMLUnderOver::layoutBlock): Added, it lays out the base, underscript and
overscript. It calculates the exact logical width, which may differ from the preferred width when
one child contains stretchy operators. It later sets the locations of children accordingly
and sets the heigth of the render element.
(WebCore::RenderMathMLUnderOver::paintChildren): Added, we have to use the usual traverse
instead of the one that comes from the flexbox. This will be removed in a follow-up patch.
(WebCore::RenderMathMLUnderOver::layout): Deleted.

  • rendering/mathml/RenderMathMLUnderOver.h: Added new functions definitions.

LayoutTests:

Apply some small adjustments to the expectations of MathML tests after
the refactoring of RenderMathMLUnderOver. We also add a test for
non-stretchy horizontal operators in underover.

  • platform/gtk/mathml/opentype/horizontal-expected.png:
  • platform/gtk/mathml/opentype/horizontal-expected.txt:
  • platform/gtk/mathml/opentype/opentype-stretchy-horizontal-expected.png:
  • platform/gtk/mathml/opentype/opentype-stretchy-horizontal-expected.txt:
  • platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.png:
  • platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt:
  • mathml/mn-as-list-item-assert.html: Move the test description out of the invalid munderover

so that it is still displayed.

  • mathml/mn-as-list-item-assert-expected.txt: Update the text expectation.
  • mathml/presentation/underover-nonstretchy-horizontal.html: Ensure that nonstretchy horizontal operators are not stretched in munderover.
  • mathml/presentation/underover-nonstretchy-horizontal-expected.html: Ditto.
3:59 AM Changeset in webkit [199292] by Carlos Garcia Campos
  • 7 edits
    3 adds in trunk

[GTK] Rework the theming code for GTK+ 3.20
https://bugs.webkit.org/show_bug.cgi?id=156333

Reviewed by Michael Catanzaro.

.:

Add a manual test to check how themed elements are rendered.

  • ManualTests/gtk/theme.html: Added.

Source/WebCore:

During the 3.19 GTK+ release cycle, the GTK+ css system was reworked, making themes and programs rendering
themed widgets, incompatible with the new system. We were trying to fix our rendering every time GTK+ broke
something, but we were just changing whatever it was needed to make our rendering look like current GTK+ with
the default theme Adwaita. This means that our rendering will be broken for other themes or that changes in
Adwaita can break our rendering. This solution was good enough to ensure WebKitGTK+ 2.12 looked good with GTK+
3.20, but it doesn't work in the long term. We need to ensure that our theming code honors the new GTK+ CSS
properties (max-width, min-width, margin, padding, border, ...) in all the cases, not only the cases where
Adwaita uses them like we currently do.
This patch splits all rendering methods to keep the current code for previous GTK+ versions and adds new code
for GTK+ >= 3.20 using the new RenderThemeGadget classes. This makes the code easier to read, since there aren't
ifdef blocks in the functions, and we ensure we don't break previous rendering.

  • PlatformGTK.cmake: Add new files to compilation.
  • html/shadow/SpinButtonElement.cpp:

(WebCore::SpinButtonElement::defaultEventHandler): Check the button layout used by the theme to decide the
current buttons state.

  • platform/gtk/RenderThemeGadget.cpp: Added.

(WebCore::RenderThemeGadget::create):
(WebCore::createStyleContext):
(WebCore::appendElementToPath):
(WebCore::RenderThemeGadget::RenderThemeGadget):
(WebCore::RenderThemeGadget::~RenderThemeGadget):
(WebCore::RenderThemeGadget::marginBox):
(WebCore::RenderThemeGadget::borderBox):
(WebCore::RenderThemeGadget::paddingBox):
(WebCore::RenderThemeGadget::contentsBox):
(WebCore::RenderThemeGadget::color):
(WebCore::RenderThemeGadget::backgroundColor):
(WebCore::RenderThemeGadget::minimumSize):
(WebCore::RenderThemeGadget::preferredSize):
(WebCore::RenderThemeGadget::render):
(WebCore::RenderThemeGadget::renderFocus):
(WebCore::RenderThemeBoxGadget::RenderThemeBoxGadget):
(WebCore::RenderThemeTextFieldGadget::RenderThemeTextFieldGadget):
(WebCore::RenderThemeTextFieldGadget::minimumSize):
(WebCore::RenderThemeToggleGadget::RenderThemeToggleGadget):
(WebCore::RenderThemeToggleGadget::render):
(WebCore::RenderThemeArrowGadget::RenderThemeArrowGadget):
(WebCore::RenderThemeArrowGadget::render):
(WebCore::RenderThemeIconGadget::RenderThemeIconGadget):
(WebCore::RenderThemeIconGadget::gtkIconSizeForPixelSize):
(WebCore::RenderThemeIconGadget::render):
(WebCore::RenderThemeIconGadget::minimumSize):

  • platform/gtk/RenderThemeGadget.h: Added.

(WebCore::RenderThemeGadget::context):

  • rendering/RenderTheme.h:

(WebCore::RenderTheme::innerSpinButtonLayout): Added this method to allow themes use a different layout for the
buttons.

  • rendering/RenderThemeGtk.cpp:

(WebCore::themeChangedCallback): Just moved this code to a common place.
(WebCore::RenderThemeGtk::RenderThemeGtk): Initialize the theme monitor in the constructor.
(WebCore::createStyleContext): Remove the render parts that are specific to GTK+ 3.20.
(WebCore::RenderThemeGtk::adjustRepaintRect): Moved inside a GTK+ < 3.20 ifdef block.
(WebCore::themePartStateFlags): Helper function to get the GtkStateFlags of a theme part for a given RenderObject.
(WebCore::shrinkToMinimumSizeAndCenterRectangle): Move this common code to a helper function.
(WebCore::setToggleSize):
(WebCore::paintToggle):
(WebCore::RenderThemeGtk::paintButton):
(WebCore::RenderThemeGtk::popupInternalPaddingBox):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::adjustTextFieldStyle): For GTK+ 3.20 we need to ensure a minimum size for spin buttons,
so if the text field is for a spin button, we adjust the desired size here.
(WebCore::RenderThemeGtk::paintTextField): In GTK+ 3.20 the CSS gadgets used to render spin buttons are
different, so we check here if this is the entry of a spin button to use the right gadgets.
(WebCore::adjustSearchFieldIconStyle):
(WebCore::RenderThemeGtk::paintTextArea):
(WebCore::RenderThemeGtk::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeGtk::paintSearchFieldResultsButton):
(WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
(WebCore::paintSearchFieldIcon):
(WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
(WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
(WebCore::centerRectVerticallyInParentInputElement): Moved inside a GTK+ < 3.20 ifdef block.
(WebCore::RenderThemeGtk::paintSliderTrack):
(WebCore::RenderThemeGtk::adjustSliderThumbSize):
(WebCore::RenderThemeGtk::paintSliderThumb):
(WebCore::RenderThemeGtk::progressBarRectForBounds): Ensure a minimum size of progress bars in GTK+ 3.20.
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::RenderThemeGtk::innerSpinButtonLayout): Use an horizontal layout for spin buttons.
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeGtk::paintInnerSpinButton):
(WebCore::styleColor):
(WebCore::RenderThemeGtk::paintMediaButton):

  • rendering/RenderThemeGtk.h:
2:13 AM Changeset in webkit [199291] by Antti Koivisto
  • 13 edits in trunk

Implement functional :host() pseudo class
https://bugs.webkit.org/show_bug.cgi?id=156397
<rdar://problem/25621445>

Reviewed by Darin Adler.

Source/WebCore:

We already support :host. Add functional syntax too.

  • css/CSSGrammar.y.in:

Parse functional :host().

  • css/CSSParser.cpp:

(WebCore::CSSParser::detectFunctionTypeToken):

  • css/CSSParserValues.cpp:

(WebCore::CSSParserSelector::parsePseudoClassHostFunctionSelector):

  • css/CSSParserValues.h:
  • css/ElementRuleCollector.cpp:

(WebCore::ElementRuleCollector::matchedRuleList):
(WebCore::ElementRuleCollector::addMatchedRule):

Factor some shared code here.

(WebCore::ElementRuleCollector::matchHostPseudoClassRules):

Instead of using the generic paths use a :host specific code path for matching.
This makes it easier to avoid :host matching when it shouldn't.

(WebCore::ElementRuleCollector::collectMatchingRulesForList):

  • css/ElementRuleCollector.h:
  • css/RuleSet.cpp:

(WebCore::computeMatchBasedOnRuleHash):

:host is always handled by the special matching path.

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::match):
(WebCore::SelectorChecker::matchHostPseudoClass):

Add a function specifically for checking :host. In always fails on the normal code paths.
Check the argument selector if provided.

(WebCore::hasScrollbarPseudoElement):

  • css/SelectorChecker.h:

LayoutTests:

Enable, fix and expand the test.

  • fast/shadow-dom/css-scoping-shadow-host-functional-rule.html:
  • platform/mac/TestExpectations:
12:30 AM MathML edited by fred.wang@free.fr
Update Bugzilla links (diff)
12:29 AM Changeset in webkit [199290] by commit-queue@webkit.org
  • 25 edits
    2 adds
    1 delete in trunk

Merge CG ImageSource and non CG ImageSource implementation in one file
https://bugs.webkit.org/show_bug.cgi?id=155456

Patch by Said Abou-Hallawa <sabouhallawa@apple,com> on 2016-04-11
Reviewed by Darin Adler.
Source/WebCore:

ImageSource for CG and CG code paths look very similar. All the platform
specific code can be moved to ImageDecoder classes for CG and non CG. And
we can have the ImageSource be platform independent and we get rid of
ImageSourceCG.cpp.

Test: fast/images/image-subsampling.html

  • CMakeLists.txt:
  • PlatformAppleWin.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:

Delete ImageSourceCG.cpp form all make files and add ImageSource.cpp to
CMakeLists.txt.

  • platform/Cursor.cpp:

(WebCore::determineHotSpot):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::hotSpot):
(WebCore::BitmapImage::getHotSpot): Deleted.

  • platform/graphics/BitmapImage.h:
  • platform/graphics/Image.h:

(WebCore::Image::hotSpot):
(WebCore::Image::getHotSpot): Deleted.
Rename getHotSpot() to hotSpot() and change it to return Optional<IntPoint>.

  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::~ImageSource): Remove clear(true) call. It does nothing.
(WebCore::ImageSource::clearFrameBufferCache): A wrapper which calls ImageDecoder::clearFrameBufferCache().
(WebCore::ImageSource::clear): Calls clearFrameBufferCache() which will do nothing for CG.

(WebCore::ImageSource::ensureDecoderIsCreated): Change SharedBuffer* to
const SharedBuffer& and remove the call to ImageDecoder::setMaxNumPixels().
The value of const static int CG ImageDecoder::m_maxNumPixels will be set
based on IMAGE_DECODER_DOWN_SAMPLING.

(WebCore::ImageSource::setData): Pass SharedBuffer& to the underlying functions.

(WebCore::ImageSource::calculateMaximumSubsamplingLevel): Returns the maximum
subsampling level allowed for an image.

(WebCore::ImageSource::subsamplingLevelForScale): Converts from a scale to
SubsamplingLevel taking into consideration the maximumSubsamplingLevel for
a particular image.

(WebCore::ImageSource::bytesDecodedToDetermineProperties): Returns the number
of encoded bytes which can determine the image properties. For non CG it's
zero. For CG it is a maximum value which can be corrected later.

(WebCore::ImageSource::isSizeAvailable):
(WebCore::ImageSource::sizeRespectingOrientation):
(WebCore::ImageSource::frameCount):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::filenameExtension):
(WebCore::ImageSource::getHotSpot):
(WebCore::ImageSource::frameIsCompleteAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
(WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::frameBytesAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::orientationAtIndex):
(WebCore::ImageSource::createFrameImageAtIndex):
These are wrappers for the ImageDecoder APIs. The purpose of these functions
is to ensure the ImageDecoder is created.

(WebCore::ImageSource::dump): Called from BitmapImage::dump().

(WebCore::ImageSource::getHotSpot): Deleted.

  • platform/graphics/ImageSource.h:

(WebCore::ImageSource::setAllowSubsampling): Called from BitmapImage::setAllowSubsampling().

(WebCore::ImageSource::maxPixelsPerDecodedImage): Deleted.
(WebCore::ImageSource::setMaxPixelsPerDecodedImage): Deleted.
Setting maxPixelsPerDecodedImage was moved to the non CG ImageDecoder.

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::ImageDecoder::setData): Change SharedBuffer* to SharedBuffer&.

(WebCore::ImageDecoder::subsamplingLevelForScale): Deleted.
The code was moved to ImageSource::subsamplingLevelForScale().

  • platform/graphics/cg/ImageDecoderCG.h:

(WebCore::ImageDecoder::create): Make the prototype of this function
suitable for CG and non CG cases.
(WebCore::ImageDecoder::clearFrameBufferCache): Empty functions for CG.

  • platform/graphics/cg/ImageSourceCG.cpp: Removed.
  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::frameIsCompleteAtIndex): A mew function to return
whether the frame decoding is complete or not.

(WebCore::ImageDecoder::frameHasAlphaAtIndex): Simplify the logic.

(WebCore::ImageDecoder::frameDurationAtIndex): The code was moved from
ImageSource::frameDurationAtIndex() in ImageSource.cpp.

(WebCore::ImageDecoder::createFrameImageAtIndex): The code was moved from
ImageSource::createFrameImageAtIndex() in ImageSource.cpp.

  • platform/image-decoders/ImageDecoder.h:

(WebCore::ImageDecoder::ImageDecoder): Initialize the members in class.
(WebCore::ImageDecoder::~ImageDecoder): Fix the braces style.
(WebCore::ImageDecoder::setData): Change the type of the argument from
SharedBuffer* to SharedBuffer&.
(WebCore::ImageDecoder::frameSizeAtIndex): Add the argument SubsamplingLevel
so it can have the same prototype as CG.
(WebCore::ImageDecoder::orientationAtIndex): Rename it to the same of CG.

(WebCore::ImageDecoder::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageDecoder::bytesDecodedToDetermineProperties):
(WebCore::ImageDecoder::subsamplingLevelForScale): Add these functions
and return the default values so we do not have to add directive compiled
non CG blocks in ImageSource.cpp.

(WebCore::ImageDecoder::hotSpot): Return Optional<IntPoint>.

(WebCore::ImageDecoder::orientation): Deleted.
(WebCore::ImageDecoder::setMaxNumPixels): Deleted.

  • platform/image-decoders/bmp/BMPImageDecoder.cpp:

(WebCore::BMPImageDecoder::setData):

  • platform/image-decoders/bmp/BMPImageDecoder.h:
  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::setData):
(WebCore::GIFImageDecoder::decode):

  • platform/image-decoders/gif/GIFImageDecoder.h:
  • platform/image-decoders/gif/GIFImageReader.h:

(GIFImageReader::setData):

  • platform/image-decoders/ico/ICOImageDecoder.cpp:

(WebCore::ICOImageDecoder::setData):
Use reference SharedBuffer instead of pointer SharedBuffer.

(WebCore::ICOImageDecoder::hotSpot):
(WebCore::ICOImageDecoder::hotSpotAtIndex):
Change hotSpot() to return Optional<IntPoint>.

  • platform/image-decoders/ico/ICOImageDecoder.h:

(WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
Pass reference SharedBuffer instead of pointer SharedBuffer.

Source/WebKit2:

  • UIProcess/API/efl/EwkView.cpp:

(EwkView::setCursor):
Replace the call to Image::getHotSpot() by Image::hotSpot().

LayoutTests:

Add a test for image sub-sampling. The image subsampling is enabled by
default for iOS platform only. But it can be explicitly enabled through
the setting ImageSubsamplingEnabled.

  • fast/images/image-subsampling-expected.html: Added.
  • fast/images/image-subsampling.html: Added.
12:28 AM Changeset in webkit [199289] by commit-queue@webkit.org
  • 28 edits in trunk

[CMake] Make FOLDER property INHERITED
https://bugs.webkit.org/show_bug.cgi?id=156460

Patch by Fujii Hironori <Hironori.Fujii@jp.sony.com> on 2016-04-11
Reviewed by Brent Fulgham.

.:

Some CMake targets are not setting the FOLDER property. This causes the
generated projects to be displayed in the top-level folder of the solution.

Making the FOLDER property INHERITED ensures that all the targets
are placed in their proper directories.

  • Source/cmake/OptionsCommon.cmake:

Define FOLDER property as a inherited property.

  • Source/cmake/WebKitMacros.cmake:

Do not set FOLDER target property.

Source/bmalloc:

  • CMakeLists.txt:

Set FOLDER property as a directory property not a target property

Source/JavaScriptCore:

  • CMakeLists.txt:
  • shell/CMakeLists.txt:
  • shell/PlatformWin.cmake:

Set FOLDER property as a directory property not a target property

Source/ThirdParty/ANGLE:

  • CMakeLists.txt:

Set FOLDER property as a directory property not a target property

Source/WebCore:

  • CMakeLists.txt:

Set FOLDER property as a directory property not a target property

Source/WebKit:

  • CMakeLists.txt:
  • PlatformWin.cmake:

Set FOLDER property as a directory property not a target property

Source/WebKit2:

  • CMakeLists.txt:

Set FOLDER property as a directory property not a target property

Source/WTF:

  • CMakeLists.txt:

Set FOLDER directory property

Tools:

  • CMakeLists.txt:
  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/PlatformWin.cmake:
  • ImageDiff/CMakeLists.txt:
  • MiniBrowser/efl/CMakeLists.txt:
  • MiniBrowser/gtk/CMakeLists.txt:
  • MiniBrowser/win/CMakeLists.txt:

Set FOLDER property as a directory property not a target property

12:22 AM MathML/Early_2016_Refactoring edited by fred.wang@free.fr
(diff)

Apr 10, 2016:

5:10 PM Changeset in webkit [199288] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[Tools] correctly check for braces in multiline branches in macro definition
https://bugs.webkit.org/show_bug.cgi?id=156441

Patch by Caitlin Potter <caitp@igalia.com> on 2016-04-10
Reviewed by Darin Adler.

Prevents emitting whitespace/braces warning for code like the
following:

`
#define MACRO(x) \

if (x) { \

doTheThing(); \
continue; \

}

`

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

(check_braces):

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

(WebKitStyleTest.test_line_breaking):

12:04 PM Changeset in webkit [199287] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Fix the build.

  • platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:

(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):

11:48 AM Changeset in webkit [199286] by weinig@apple.com
  • 39 edits in trunk/Source

Remove support for custom target picker actions
<rdar://problem/24987783>
https://bugs.webkit.org/show_bug.cgi?id=156434

Reviewed by Eric Carlson.

This mostly entailed rolling out r197429 and r197569.

Source/WebCore:

  • Modules/mediasession/WebMediaSessionManager.cpp:

(WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients):
(WebCore::WebMediaSessionManager::showPlaybackTargetPicker):
(WebCore::WebMediaSessionManager::clientStateDidChange):
(WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange):
(WebCore::WebMediaSessionManager::configureNewClients):
(WebCore::WebMediaSessionManager::customPlaybackActionSelected): Deleted.

  • Modules/mediasession/WebMediaSessionManager.h:
  • Modules/mediasession/WebMediaSessionManagerClient.h:
  • dom/Document.cpp:

(WebCore::Document::removePlaybackTargetPickerClient):
(WebCore::Document::showPlaybackTargetPicker):
(WebCore::Document::playbackTargetPickerClientStateDidChange):
(WebCore::Document::setShouldPlayToPlaybackTarget):
(WebCore::Document::customPlaybackActionSelected): Deleted.

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

(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):
(WebCore::HTMLMediaElement::setShouldPlayToPlaybackTarget):
(WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless):
(WebCore::HTMLMediaElement::customPlaybackActionSelected): Deleted.
(WebCore::HTMLMediaElement::playbackTargetPickerCustomActionName): Deleted.

  • html/HTMLMediaElement.h:
  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::showPlaybackTargetPicker):
(WebCore::MediaElementSession::hasWirelessPlaybackTargets):
(WebCore::MediaElementSession::setShouldPlayToPlaybackTarget):
(WebCore::MediaElementSession::mediaStateDidChange):
(WebCore::MediaElementSession::customPlaybackActionSelected): Deleted.

  • html/MediaElementSession.h:
  • page/ChromeClient.h:
  • page/Page.cpp:

(WebCore::Page::removePlaybackTargetPickerClient):
(WebCore::Page::showPlaybackTargetPicker):
(WebCore::Page::setShouldPlayToPlaybackTarget):
(WebCore::Page::ensureTestTrigger):
(WebCore::Page::customPlaybackActionSelected): Deleted.

  • page/Page.h:

(WebCore::Page::testTrigger):

  • platform/audio/PlatformMediaSession.h:

(WebCore::PlatformMediaSessionClient::canPlayToWirelessPlaybackTarget):
(WebCore::PlatformMediaSessionClient::isPlayingToWirelessPlaybackTarget):
(WebCore::PlatformMediaSessionClient::setShouldPlayToPlaybackTarget):
(WebCore::PlatformMediaSessionClient::customPlaybackActionSelected): Deleted.

  • platform/graphics/MediaPlaybackTargetClient.h:
  • platform/graphics/MediaPlaybackTargetPicker.cpp:

(WebCore::MediaPlaybackTargetPicker::pendingActionTimerFired):
(WebCore::MediaPlaybackTargetPicker::addPendingAction):
(WebCore::MediaPlaybackTargetPicker::showPlaybackTargetPicker):

  • platform/graphics/MediaPlaybackTargetPicker.h:

(WebCore::MediaPlaybackTargetPicker::availableDevicesDidChange):
(WebCore::MediaPlaybackTargetPicker::currentDeviceDidChange):
(WebCore::MediaPlaybackTargetPicker::Client::customPlaybackActionSelected): Deleted.
(WebCore::MediaPlaybackTargetPicker::customPlaybackActionSelected): Deleted.

  • platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
  • platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:

(WebCore::MediaPlaybackTargetPickerMac::devicePicker):
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):

  • platform/mac/WebVideoFullscreenInterfaceMac.h:
  • platform/mac/WebVideoFullscreenInterfaceMac.mm:

(WebCore::WebVideoFullscreenInterfaceMac::preparedToReturnToInline):
(WebCore::WebVideoFullscreenInterfaceMac::setVideoDimensions):
(WebCore::WebVideoFullscreenInterfaceMac::setExternalPlayback): Deleted.

  • platform/mock/MediaPlaybackTargetPickerMock.cpp:

(WebCore::MediaPlaybackTargetPickerMock::timerFired):
(WebCore::MediaPlaybackTargetPickerMock::showPlaybackTargetPicker):

  • platform/mock/MediaPlaybackTargetPickerMock.h:
  • platform/spi/cocoa/AVKitSPI.h:

Source/WebKit/mac:

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

(WebChromeClient::removePlaybackTargetPickerClient):
(WebChromeClient::showPlaybackTargetPicker):

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

(WebMediaPlaybackTargetPicker::removePlaybackTargetPickerClient):
(WebMediaPlaybackTargetPicker::showPlaybackTargetPicker):
(WebMediaPlaybackTargetPicker::playbackTargetPickerClientStateDidChange):
(WebMediaPlaybackTargetPicker::setShouldPlayToPlaybackTarget):
(WebMediaPlaybackTargetPicker::invalidate):
(WebMediaPlaybackTargetPicker::customPlaybackActionSelected): Deleted.

  • WebView/WebView.mm:

(-[WebView _showPlaybackTargetPicker:location:hasVideo:]):
(-[WebView _playbackTargetPickerClientStateDidChange:state:]):

Source/WebKit2:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::removePlaybackTargetPickerClient):
(WebKit::WebPageProxy::showPlaybackTargetPicker):
(WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
(WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
(WebKit::WebPageProxy::didChangeBackgroundColor):
(WebKit::WebPageProxy::customPlaybackActionSelected): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::removePlaybackTargetPickerClient):
(WebKit::WebChromeClient::showPlaybackTargetPicker):
(WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::setShouldPlayToPlaybackTarget):
(WebKit::WebPage::customPlaybackActionSelected): Deleted.

3:14 AM Changeset in webkit [199285] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.4.11

WebKitGTK+ 2.4.11

3:14 AM Changeset in webkit [199284] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.4

Unreviewed. Update NEWS and Versions.m4 for 2.4.11 release.

.:

  • Source/autotools/Versions.m4: Bump version numbers.

Source/WebKit/gtk:

  • NEWS: Added release notes for 2.4.11.
1:53 AM Changeset in webkit [199283] by Carlos Garcia Campos
  • 2 adds in releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/gtk/po

Translation updates: Chinese, Japanese

12:50 AM WebKitGTK/2.4.x edited by Carlos Garcia Campos
(diff)
12:49 AM Changeset in webkit [199282] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.4

Merge r165044 - REGRESSION(r164856): Use after free in WebCore::QualifiedName::operator== / WebCore::StyledElement::attributeChanged
https://bugs.webkit.org/show_bug.cgi?id=129550

Reviewed by Andreas Kling.

Source/WebCore:

We can't store a reference to QualifiedName here because ensureUniqueElementData could delete QualifiedName inside Attribute.

Test: fast/dom/uniquing-attributes-via-setAttribute.html

  • dom/Element.cpp:

(WebCore::Element::setAttributeInternal):

LayoutTests:

Added a regression test.

  • fast/dom/uniquing-attributes-via-setAttribute-expected.txt: Added.
  • fast/dom/uniquing-attributes-via-setAttribute.html: Added.
12:45 AM Changeset in webkit [199281] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.4/Source/WebCore

Merge r166233 - [ARM64] GNU assembler fails in TransformationMatrix::multiply
https://bugs.webkit.org/show_bug.cgi?id=130454

Reviewed by Zoltan Herczeg.

Change the NEON intstructions to the proper style.

  • platform/graphics/transforms/TransformationMatrix.cpp:

(WebCore::TransformationMatrix::multiply):

12:45 AM Changeset in webkit [199280] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.4/Source/WTF

Merge r166234 - [ARM64] GCC generates wrong code with -O2 flag in WTF::weakCompareAndSwap
https://bugs.webkit.org/show_bug.cgi?id=130500

Reviewed by Filip Pizlo.

Set the first operand to the exact register in the inline assembly with GCC.

  • wtf/Atomics.h:

(WTF::weakCompareAndSwap):

Note: See TracTimeline for information about the timeline view.