Timeline



Nov 8, 2016:

6:51 PM Changeset in webkit [208427] by rniwa@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION: date-format-tofte.js is super slow
https://bugs.webkit.org/show_bug.cgi?id=164499

Patch by Geoffrey Garen <ggaren@apple.com> on 2016-11-08
Reviewed by Sam Weinig.

  • bytecode/EvalCodeCache.h:

(JSC::EvalCodeCache::CacheKey::operator==): Use character comparison,
not pointer comparison. (This function was always wrong, but I started
calling it in more places.)

6:50 PM Changeset in webkit [208426] by rniwa@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION: Crashes in StringImpl destructor during GC when clearing the HasOwnPropertyCache
https://bugs.webkit.org/show_bug.cgi?id=164433

Patch by Saam Barati <sbarati@apple.com> on 2016-11-08
Reviewed by Mark Lam.

Clearing the HasOwnPropertyCache will call deref() on the StringImpls
in the cache. We were doing this from the collector thread, which is
not allowed. It must be done from the mutator thread. We now clear the
cache in Heap::finalize() which happens before the mutator begins
executing JS after a collection happens.

  • heap/Heap.cpp:

(JSC::Heap::collectInThread):
(JSC::Heap::finalize):

6:02 PM Changeset in webkit [208425] by bshafiei@apple.com
  • 5 edits in tags/Safari-603.1.11.2/Source

Versioning.

5:59 PM Changeset in webkit [208424] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.11.2

New tag.

Nov 7, 2016:

5:26 PM Changeset in webkit [208423] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.3.9

New tag.

6:46 AM Changeset in webkit [208422] by Ryan Haddad
  • 9 edits in trunk

Unreviewed, rolling out r208382.

This change appears to have caused 3
SerializedCryptoKeyWrapTest API tests to fail on macOS.

Reverted changeset:

"[Readable Streams API] Implement ByteStreamController
error()"
https://bugs.webkit.org/show_bug.cgi?id=164319
http://trac.webkit.org/changeset/208382

Nov 6, 2016:

10:12 PM Changeset in webkit [208421] by matthew_hanson@apple.com
  • 8 edits in branches/safari-602-branch/Source/WebCore

Merge r208392. rdar://problem/28409526

Nov 5, 2016:

11:00 AM Changeset in webkit [208420] by Konstantin Tokarev
  • 4 edits in trunk/Source

Fixed compilation of LLInt with MinGW
https://bugs.webkit.org/show_bug.cgi?id=164449

Reviewed by Michael Catanzaro.

MinGW uses LLIntAssembly.h with GNU assembler syntax, just like GCC on
other platforms.

Source/JavaScriptCore:

  • llint/LowLevelInterpreter.cpp: Include LLIntAssembly.h with

appropriate preamble.

Source/WTF:

  • wtf/InlineASM.h: Define LOCAL_LABEL_STRING as .L#name for MinGW.
10:59 AM Changeset in webkit [208419] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Removing flaky expectations for tests that were fixed with r208327.
https://bugs.webkit.org/show_bug.cgi?id=164034

Unreviewed test gardening.

10:58 AM Changeset in webkit [208418] by Konstantin Tokarev
  • 4 edits in trunk

[MinGW] Fixed C99/C++11 format attributes in printf-like functions
https://bugs.webkit.org/show_bug.cgi?id=164448

Reviewed by Michael Catanzaro.

By default MinGW uses printf-like function provided in msvcrt.dll,
however they miss support for C99/C++11 format attributes. Use MinGW
implementations instead.

.:

  • Source/cmake/OptionsCommon.cmake: Define USE_MINGW_ANSI_STDIO

Source/WTF:

  • wtf/Assertions.h: Use gnu_printf format in WTF_ATTRIBUTE_PRINTF
1:24 AM Changeset in webkit [208417] by Yusuke Suzuki
  • 2 edits in trunk/Source/WTF

[JSCOnly] RunLoopGeneric should adopt MonotonicTime / WallTime change
https://bugs.webkit.org/show_bug.cgi?id=164447

Reviewed by Csaba Osztrogonác.

Build fix for JSCOnly.

  • wtf/generic/RunLoopGeneric.cpp:

(WTF::RunLoop::TimerBase::ScheduledTask::create):
(WTF::RunLoop::TimerBase::ScheduledTask::ScheduledTask):
(WTF::RunLoop::TimerBase::ScheduledTask::scheduledTimePoint):
(WTF::RunLoop::TimerBase::ScheduledTask::updateReadyTime):
(WTF::RunLoop::populateTasks):
(WTF::RunLoop::dispatchAfter):
(WTF::RunLoop::TimerBase::start):

12:56 AM Changeset in webkit [208416] by Carlos Garcia Campos
  • 4 edits in trunk

[SOUP] Layout test http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html fails
https://bugs.webkit.org/show_bug.cgi?id=139358

Reviewed by Michael Catanzaro.

Source/WebKit2:

Stop putting the credentials in the URL unconditionally and ensure we only do that when provided by the URL
itself. Libsoup has its own cache of SoupAuth, so we don't need to pass user/pass in the URL for every single
request, libsoup will authenticate those automatically.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::applyAuthenticationToRequest):

LayoutTests:

  • platform/gtk/TestExpectations: Unskip http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html.

Nov 4, 2016:

8:02 PM Changeset in webkit [208415] by fpizlo@apple.com
  • 52 edits
    11 adds in trunk

WTF::ParkingLot should stop using std::chrono because std::chrono::duration casts are prone to overflows
https://bugs.webkit.org/show_bug.cgi?id=152045

Reviewed by Andy Estes.
Source/JavaScriptCore:


Probably the nicest example of why this patch is a good idea is the change in
AtomicsObject.cpp.

  • jit/ICStats.cpp:

(JSC::ICStats::ICStats):

  • runtime/AtomicsObject.cpp:

(JSC::atomicsFuncWait):

Source/WebCore:

No new layout tests because no new behavior. The new WTF time classes have some unit tests
in TestWebKitAPI.

  • fileapi/ThreadableBlobRegistry.cpp:

(WebCore::ThreadableBlobRegistry::blobSize):

  • platform/MainThreadSharedTimer.h:
  • platform/SharedTimer.h:
  • platform/ThreadTimers.cpp:

(WebCore::ThreadTimers::updateSharedTimer):

  • platform/cf/MainThreadSharedTimerCF.cpp:

(WebCore::MainThreadSharedTimer::setFireInterval):

  • platform/efl/MainThreadSharedTimerEfl.cpp:

(WebCore::MainThreadSharedTimer::setFireInterval):

  • platform/glib/MainThreadSharedTimerGLib.cpp:

(WebCore::MainThreadSharedTimer::setFireInterval):

  • platform/win/MainThreadSharedTimerWin.cpp:

(WebCore::MainThreadSharedTimer::setFireInterval):

  • workers/WorkerRunLoop.cpp:

(WebCore::WorkerRunLoop::runInMode):

Source/WebKit2:

  • Platform/IPC/Connection.cpp:

(IPC::Connection::SyncMessageState::wait):
(IPC::Connection::sendMessage):
(IPC::Connection::timeoutRespectingIgnoreTimeoutsForTesting):
(IPC::Connection::waitForMessage):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::waitForSyncReply):

  • Platform/IPC/Connection.h:

(IPC::Connection::sendSync):
(IPC::Connection::waitForAndDispatchImmediately):

  • Platform/IPC/MessageSender.h:

(IPC::MessageSender::sendSync):

  • UIProcess/ChildProcessProxy.h:

(WebKit::ChildProcessProxy::sendSync):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::sendProcessWillSuspendImminently):

  • UIProcess/Storage/StorageManager.cpp:

(WebKit::StorageManager::applicationWillTerminate):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::sendProcessWillSuspendImminently):

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate):

  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:

(-[WKOneShotDisplayLinkHandler displayLinkFired:]):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):

  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:

(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):

  • UIProcess/mac/WKImmediateActionController.mm:

(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::stringSelectionForPasteboard):
(WebKit::WebPageProxy::dataSelectionForPasteboard):
(WebKit::WebPageProxy::readSelectionFromPasteboard):
(WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
(WebKit::WebPageProxy::acceptsFirstMouse):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
(WebKit::WebChromeClient::print):
(WebKit::WebChromeClient::exceededDatabaseQuota):
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::postSynchronousMessageForTesting):

Source/WTF:


We used to use 'double' for all time measurements. Sometimes it was milliseconds,
sometimes it was seconds. Sometimes we measured a span of time, sometimes we spoke of time
since some epoch. When we spoke of time since epoch, we either used a monotonic clock or
a wall clock. The type - always 'double' - never told us what kind of time we had, even
though there were roughly six of them (sec interval, ms interval, sec since epoch on wall,
ms since epoch on wall, sec since epoch monotonic, ms since epoch monotonic).

At some point, we thought that it would be a good idea to replace these doubles with
std::chrono. But since replacing some things with std::chrono, we found it to be terribly
inconvenient:

  • Outrageous API. I never want to say std::chrono::milliseconds(blah). I never want to say std::chrono::steady_clock::timepoint. The syntax for duration_cast is ugly, and ideally duration_cast would not even be a thing.


  • No overflow protection. std::chrono uses integers by default and using anything else is clumsy. But the integer math is done without regard for the rough edges of integer math, so any cast between std::chrono types risks overflow. Any comparison risks overflow because it may do conversions silently. We have even found bugs where some C++ implementations had more overflows than others, which ends up being a special kind of hell. In many cases, the overflow also has nasal demons.


It's an error to represent time using integers. It would have been excusable back when
floating point math was not guaranteed to be supported on all platforms, but that would
have been a long time ago. Time is a continuous, infinite concept and it's a perfect fit
for floating point:

  • Floating point preserves precision under multiplication in all but extreme cases, so using floating point for time means that unit conversions are almost completely lossless. This means that we don't have to think very hard about what units to use. In this patch, we use seconds almost everywhere. We only convert at boundaries, like an API boundary that wants something other than seconds.


  • Floating point makes it easy to reason about infinity, which is something that time code wants to do a lot. Example: when would you like to timeout? Infinity please! This is the most elegant way of having an API support both a timeout variant and a no-timeout variant.
  • Floating point does well-understood things when math goes wrong, and these things are pretty well optimized to match what a mathematician would do when computing with real numbers represented using scientific notation with a finite number of significant digits. This means that time math under floating point looks like normal math. On the other hand, std::chrono time math looks like garbage because you have to always check for multiple possible UB corners whenever you touch large integers. Integers that represent time are very likely to be large and you don't have to do much to overflow them. At this time, based on the number of bugs we have already seen due to chrono overflows, I am not certain that we even understand what are all of the corner cases that we should even check for.


This patch introduces a new set of timekeeping classes that are all based on double, and
all internally use seconds. These classes support algebraic typing. The classes are:

  • Seconds: this is for measuring a duration.
  • WallTime: time since epoch according to a wall clock (aka real time clock).
  • MonotonicTime: time since epoch according to a monotonic clock.
  • ClockType: enum that says either Wall or Monotonic.
  • TimeWithDynamicClockType: a tuple of double and ClockType, which represents either a wall time or a monotonic time.


All of these classes behave like C++ values and are cheap to copy around since they are
very nearly POD. This supports comprehensive conversions between the various time types.
Most of this is by way of algebra. Here are just some of the rules we recognize:

WallTime = WallTime + Seconds
Seconds = WallTime - WallTime
MonotonicTime = MonotonicTime + Seconds
etc...

We support negative, infinite, and NaN times because math.

We support conversions between MonotonicTime and WallTime, like:

WallTime wt = mt.approximateWallTime()

This is called this "approximate" because the only way to do it is to get the current time
on both clocks and convert relative to that.

Many of our APIs would be happy using whatever notion of time the user wanted to use. For
those APIs, which includes Condition and ParkingLot, we have TimeWithDynamicClockType. You
can automatically convert WallTime or MonotonicTime to TimeWithDynamicClockType. This
means that if you use a WallTime with Condition::waitUntil, then Condition's internal
logic for when it should wake up makes its decision based on the current WallTime - but if
you use MonotonicTime then waitUntil will make its decision based on current
MonotonicTime. This is a greater level of flexibility than chrono allowed, since chrono
did not have the concept of a dynamic clock type.

This patch does not include conversions between std::chrono and these new time classes,
because past experience shows that we're quite bad at getting conversions between
std::chrono and anything else right. Also, I didn't need such conversion code because this
patch only converts code that transitively touches ParkingLot and Condition. It was easy
to get all of that code onto the new time classes.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/AutomaticThread.cpp:

(WTF::AutomaticThread::start):

  • wtf/CMakeLists.txt:
  • wtf/ClockType.cpp: Added.

(WTF::printInternal):

  • wtf/ClockType.h: Added.
  • wtf/Condition.h:

(WTF::ConditionBase::waitUntil):
(WTF::ConditionBase::waitFor):
(WTF::ConditionBase::wait):
(WTF::ConditionBase::waitUntilWallClockSeconds): Deleted.
(WTF::ConditionBase::waitUntilMonotonicClockSeconds): Deleted.
(WTF::ConditionBase::waitForSeconds): Deleted.
(WTF::ConditionBase::waitForSecondsImpl): Deleted.
(WTF::ConditionBase::waitForImpl): Deleted.
(WTF::ConditionBase::absoluteFromRelative): Deleted.

  • wtf/CrossThreadQueue.h:

(WTF::CrossThreadQueue<DataType>::waitForMessage):

  • wtf/CurrentTime.cpp:

(WTF::sleep):

  • wtf/MessageQueue.h:

(WTF::MessageQueue::infiniteTime): Deleted.

  • wtf/MonotonicTime.cpp: Added.

(WTF::MonotonicTime::now):
(WTF::MonotonicTime::approximateWallTime):
(WTF::MonotonicTime::dump):
(WTF::MonotonicTime::sleep):

  • wtf/MonotonicTime.h: Added.

(WTF::MonotonicTime::MonotonicTime):
(WTF::MonotonicTime::fromRawDouble):
(WTF::MonotonicTime::infinity):
(WTF::MonotonicTime::secondsSinceEpoch):
(WTF::MonotonicTime::approximateMonotonicTime):
(WTF::MonotonicTime::operator bool):
(WTF::MonotonicTime::operator+):
(WTF::MonotonicTime::operator-):
(WTF::MonotonicTime::operator+=):
(WTF::MonotonicTime::operator-=):
(WTF::MonotonicTime::operator==):
(WTF::MonotonicTime::operator!=):
(WTF::MonotonicTime::operator<):
(WTF::MonotonicTime::operator>):
(WTF::MonotonicTime::operator<=):
(WTF::MonotonicTime::operator>=):

  • wtf/ParkingLot.cpp:

(WTF::ParkingLot::parkConditionallyImpl):
(WTF::ParkingLot::unparkOne):
(WTF::ParkingLot::unparkOneImpl):
(WTF::ParkingLot::unparkCount):

  • wtf/ParkingLot.h:

(WTF::ParkingLot::parkConditionally):
(WTF::ParkingLot::compareAndPark):

  • wtf/Seconds.cpp: Added.

(WTF::Seconds::operator+):
(WTF::Seconds::operator-):
(WTF::Seconds::dump):
(WTF::Seconds::sleep):

  • wtf/Seconds.h: Added.

(WTF::Seconds::Seconds):
(WTF::Seconds::value):
(WTF::Seconds::seconds):
(WTF::Seconds::milliseconds):
(WTF::Seconds::microseconds):
(WTF::Seconds::nanoseconds):
(WTF::Seconds::fromMilliseconds):
(WTF::Seconds::fromMicroseconds):
(WTF::Seconds::fromNanoseconds):
(WTF::Seconds::infinity):
(WTF::Seconds::operator bool):
(WTF::Seconds::operator+):
(WTF::Seconds::operator-):
(WTF::Seconds::operator*):
(WTF::Seconds::operator/):
(WTF::Seconds::operator+=):
(WTF::Seconds::operator-=):
(WTF::Seconds::operator*=):
(WTF::Seconds::operator/=):
(WTF::Seconds::operator==):
(WTF::Seconds::operator!=):
(WTF::Seconds::operator<):
(WTF::Seconds::operator>):
(WTF::Seconds::operator<=):
(WTF::Seconds::operator>=):

  • wtf/TimeWithDynamicClockType.cpp: Added.

(WTF::TimeWithDynamicClockType::now):
(WTF::TimeWithDynamicClockType::nowWithSameClock):
(WTF::TimeWithDynamicClockType::wallTime):
(WTF::TimeWithDynamicClockType::monotonicTime):
(WTF::TimeWithDynamicClockType::approximateWallTime):
(WTF::TimeWithDynamicClockType::approximateMonotonicTime):
(WTF::TimeWithDynamicClockType::operator-):
(WTF::TimeWithDynamicClockType::operator<):
(WTF::TimeWithDynamicClockType::operator>):
(WTF::TimeWithDynamicClockType::operator<=):
(WTF::TimeWithDynamicClockType::operator>=):
(WTF::TimeWithDynamicClockType::dump):
(WTF::TimeWithDynamicClockType::sleep):

  • wtf/TimeWithDynamicClockType.h: Added.

(WTF::TimeWithDynamicClockType::TimeWithDynamicClockType):
(WTF::TimeWithDynamicClockType::fromRawDouble):
(WTF::TimeWithDynamicClockType::secondsSinceEpoch):
(WTF::TimeWithDynamicClockType::clockType):
(WTF::TimeWithDynamicClockType::withSameClockAndRawDouble):
(WTF::TimeWithDynamicClockType::operator bool):
(WTF::TimeWithDynamicClockType::operator+):
(WTF::TimeWithDynamicClockType::operator-):
(WTF::TimeWithDynamicClockType::operator+=):
(WTF::TimeWithDynamicClockType::operator-=):
(WTF::TimeWithDynamicClockType::operator==):
(WTF::TimeWithDynamicClockType::operator!=):

  • wtf/WallTime.cpp: Added.

(WTF::WallTime::now):
(WTF::WallTime::approximateMonotonicTime):
(WTF::WallTime::dump):
(WTF::WallTime::sleep):

  • wtf/WallTime.h: Added.

(WTF::WallTime::WallTime):
(WTF::WallTime::fromRawDouble):
(WTF::WallTime::infinity):
(WTF::WallTime::secondsSinceEpoch):
(WTF::WallTime::approximateWallTime):
(WTF::WallTime::operator bool):
(WTF::WallTime::operator+):
(WTF::WallTime::operator-):
(WTF::WallTime::operator+=):
(WTF::WallTime::operator-=):
(WTF::WallTime::operator==):
(WTF::WallTime::operator!=):
(WTF::WallTime::operator<):
(WTF::WallTime::operator>):
(WTF::WallTime::operator<=):
(WTF::WallTime::operator>=):

  • wtf/threads/BinarySemaphore.cpp:

(WTF::BinarySemaphore::wait):

  • wtf/threads/BinarySemaphore.h:

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/Condition.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp:

(TestWebKitAPI::ToUpperConverter::stopProducing):
(TestWebKitAPI::ToUpperConverter::stopConsuming):

  • TestWebKitAPI/Tests/WTF/Time.cpp: Added.

(WTF::operator<<):
(TestWebKitAPI::TEST):

7:57 PM Changeset in webkit [208414] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

RenderFlowThread state reset cleanup.
https://bugs.webkit.org/show_bug.cgi?id=164426

Reviewed by Simon Fraser.

RenderFlowThread state reset is spread across several functions. This patch groups them
together in RenderObject::resetFlowThreadState().

No change in functionality.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::removeLeftoverAnonymousBlock):
(WebCore::RenderBlock::dropAnonymousBoxChild): This is now part of resetFlowThreadState() since resetFlowThreadState
gets called even when NotifyChildren is false.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::insertChildInternal): Initialize the thread state before we notify the child.
(WebCore::RenderElement::removeChildInternal): Reset the state even when NotifyChildren is false.
(WebCore::RenderElement::willBeRemovedFromTree): This code is moved to removeFromRenderFlowThread().
(WebCore::RenderElement::removeFromRenderFlowThread):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::initializeFlowThreadState): This is in transition for webkit.org/b/164428 (RenderFlowThread state initialization cleanup.)
(WebCore::RenderObject::resetFlowThreadState):
(WebCore::RenderObject::setParent): This was seemingly a random place to put flow state initialization.
(WebCore::RenderObject::willBeRemovedFromTree): resetFlowThreadState() takes care of it now.

  • rendering/RenderObject.h:
7:48 PM Changeset in webkit [208413] by jfbastien@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

testWASM should be very sad if no options are provided
https://bugs.webkit.org/show_bug.cgi?id=164444

Reviewed by Saam Barati.

Detect missing or invalid options on the command line.

  • testWasm.cpp:

(CommandLine::parseArguments):

6:15 PM Changeset in webkit [208412] by Yusuke Suzuki
  • 5 edits
    6 adds in trunk

[DOMJIT] Add DOMJIT::Signature annotation to Document::getElementById
https://bugs.webkit.org/show_bug.cgi?id=164356

Reviewed by Filip Pizlo.

Source/WebCore:

This patch implements DOMJIT::Signature annotation for getElementById.
Since getElementById is also implemented in DocumentFragment, we implement
the branchIfDocumentFragment/branchIfNotDocumentFragment for that.

In dromaeo, we have a test like this.

test( "getElementById", function(){

for ( var i = 0; i < num * 30; i++ ) {

ret = document.getElementById("testA" + num).nodeType;
ret = document.getElementById("testB" + num).nodeType;
ret = document.getElementById("testC" + num).nodeType;
ret = document.getElementById("testD" + num).nodeType;
ret = document.getElementById("testE" + num).nodeType;
ret = document.getElementById("testF" + num).nodeType;

}

});

In the above test, JSC already knows the following things.

  1. Since nodeType is now handled as CallDOMGetter, we know that it is pure.
  2. getElementById look up becomes PureGetById since document is impure object. But it is kept as PureGetById. So it does not write DOMState.
  3. "testA" + num will be converted to constant string.
  4. CallDOM for getElementById said it just reads(DOMState:DOM). And it saids that it returns the same value as long as DOMState is not clobbered.
  5. CheckCell leading CallDOM ensures the inlined getElementById node. (CallDOM node).

The key thing is that no node clobbers DOMState during the loop. So CallDOM & CallDOMGetter can be hoisted.
This improves dom-query significantly. Dromaeo dom-query getElementById becomes 40x faster (247796 v.s. 6197).
Dromaeo dom-query getElementById (not in document) becomes 89x faster (630317.8 v.s. 7066.).

Tests: js/dom/domjit-function-get-element-by-id-changed.html

js/dom/domjit-function-get-element-by-id-licm.html
js/dom/domjit-function-get-element-by-id.html

  • dom/NonElementParentNode.idl:
  • domjit/DOMJITCheckDOM.h:

(WebCore::DOMJIT::TypeChecker<DocumentFragment>::branchIfFail):

  • domjit/DOMJITHelpers.h:

(WebCore::DOMJIT::branchIfDocumentFragment):
(WebCore::DOMJIT::branchIfNotDocumentFragment):

LayoutTests:

  • js/dom/domjit-function-get-element-by-id-changed-expected.txt: Added.
  • js/dom/domjit-function-get-element-by-id-changed.html: Added.
  • js/dom/domjit-function-get-element-by-id-expected.txt: Added.
  • js/dom/domjit-function-get-element-by-id-licm-expected.txt: Added.
  • js/dom/domjit-function-get-element-by-id-licm.html: Added.
  • js/dom/domjit-function-get-element-by-id.html: Added.
5:55 PM Changeset in webkit [208411] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Rename unscaledUnobscuredVisibleContentSize and unscaledVisibleContentSizeIncludingObscuredArea for attempted clarity
https://bugs.webkit.org/show_bug.cgi?id=164438

Reviewed by Tim Horton.

unscaledUnobscuredVisibleContentSize() and unscaledVisibleContentSizeIncludingObscuredArea() were an endless source
of confusion.

Functions with "VisibleContent" in the name are usually expected to return document coordinates (affected by zooming),
so unscaledUnobscuredVisibleContentSize caused cognitive dissonance because of "unscaled" vs "visibleContent", and
"unobscured" vs "visible".

So rename:

unscaledUnobscuredVisibleContentSize -> sizeForUnobscuredContent
unscaledVisibleContentSizeIncludingObscuredArea -> sizeForVisibleContent

sizeForUnobscuredContent() can also be private to ScrollView.

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::update):

  • platform/ScrollView.cpp:

(WebCore::ScrollView::unobscuredContentRectInternal):
(WebCore::ScrollView::sizeForVisibleContent):
(WebCore::ScrollView::sizeForUnobscuredContent): Don't compute unscaledVisibleContentSizeIncludingObscuredArea
before testing whether we have a platform widget.
(WebCore::ScrollView::layoutSize):
(WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea): Deleted.
(WebCore::ScrollView::unscaledUnobscuredVisibleContentSize): Deleted.

  • platform/ScrollView.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::ensureRootLayer):

5:48 PM Changeset in webkit [208410] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Error description code should be able to handle Symbol values.
https://bugs.webkit.org/show_bug.cgi?id=164436
<rdar://problem/29115583>

Reviewed by Filip Pizlo and Saam Barati.

JSTests:

  • stress/error-description-on-symbols-should-not-crash.js: Added.

Source/JavaScriptCore:

Previously, we try to toString() the Symbol value, resulting in it throwing an
exception in errorDescriptionForValue() which breaks the invariant that
errorDescriptionForValue() should not throw.

We fixed this by making errorDescriptionForValue() aware of the Symbol type, and
not so a toString() on Symbol values. Also fixed notAFunctionSourceAppender()
to build a nicer message for Symbol values.

  • runtime/ExceptionHelpers.cpp:

(JSC::errorDescriptionForValue):
(JSC::notAFunctionSourceAppender):

5:41 PM Changeset in webkit [208409] by Simon Fraser
  • 4 edits
    8 adds in trunk

Layout viewport wrong with RTL documents
https://bugs.webkit.org/show_bug.cgi?id=164434

Reviewed by Tim Horton.

Source/WebCore:

The layoutViewportRect was computed incorrectly in RTL documents, because
FrameView::unscaledMaximumScrollPosition() was wrong; it erroneously mapped
what it thought was a scrollOffset to a scrollPosition.

Unscaled scroll positions are in the same coordinate space as unscaledDocumentRect,
so we should not call scrollPositionFromOffset() in FrameView::unscaledMaximumScrollPosition().

Changed FrameView::unscaledMinimumScrollPosition() to also just grab the location of
unscaledDocumentRect, for symmetry.

Finally fixed the tiled scrolling indicator's viewport rect for zoomed RTL documents
by using the unscaled scroll origin.

Tests: fast/visual-viewport/rtl-nonzoomed-rects.html

fast/visual-viewport/rtl-zoomed-rects.html

  • page/FrameView.cpp:

(WebCore::FrameView::setLayoutViewportOrigin):
(WebCore::FrameView::unscaledScrollOrigin):
(WebCore::FrameView::unscaledMinimumScrollPosition):
(WebCore::FrameView::unscaledMaximumScrollPosition):

  • page/FrameView.h:

LayoutTests:

  • fast/visual-viewport/rtl-nonzoomed-rects-expected.txt: Added.
  • fast/visual-viewport/rtl-nonzoomed-rects.html: Added.
  • fast/visual-viewport/rtl-zoomed-rects-expected.txt: Added.
  • fast/visual-viewport/rtl-zoomed-rects.html: Added.
  • platform/ios-simulator/fast/visual-viewport/rtl-nonzoomed-rects-expected.txt: Added.
  • platform/ios-simulator/fast/visual-viewport/rtl-zoomed-rects-expected.txt: Added.
  • platform/mac-wk1/fast/visual-viewport/rtl-zoomed-rects-expected.txt: Added. WK1 and RTL are weird.
5:03 PM Changeset in webkit [208408] by commit-queue@webkit.org
  • 31 edits
    3 copies
    2 moves
    1 add
    1 delete in trunk/Source/WebCore

[WebIDL] Add support for modern callback syntax
https://bugs.webkit.org/show_bug.cgi?id=164435

Patch by Sam Weinig <sam@webkit.org> on 2016-11-04
Reviewed by Chris Dumez.

Support new callback syntax:

callback Function = void (DOMString arg1, long arg2);

This replaces "callback interface" types with a Callback=FunctionOnly
extended attribute.

  • Modules/geolocation/PositionCallback.idl:
  • Modules/geolocation/PositionErrorCallback.idl:
  • Modules/notifications/NotificationPermissionCallback.idl:
  • Modules/quota/StorageErrorCallback.idl:
  • Modules/quota/StorageQuotaCallback.idl:
  • Modules/quota/StorageUsageCallback.idl:
  • Modules/webaudio/AudioBufferCallback.idl:
  • Modules/webdatabase/DatabaseCallback.idl:
  • Modules/webdatabase/SQLStatementCallback.idl:
  • Modules/webdatabase/SQLStatementErrorCallback.idl:
  • Modules/webdatabase/SQLTransactionCallback.idl:
  • Modules/webdatabase/SQLTransactionErrorCallback.idl:
  • dom/RequestAnimationFrameCallback.idl:
  • dom/StringCallback.idl:
  • html/VoidCallback.idl:
  • page/IntersectionObserverCallback.idl:
  • css/MediaQueryListListener.idl:

Update to new syntax.

  • css/MediaQueryListListener.h:
  • css/MediaQueryMatcher.cpp:

(WebCore::MediaQueryMatcher::styleResolverChanged):
Switch to using the now required 'handleEvent' name. This is an implementation detail
that we should change.

  • bindings/scripts/CodeGenerator.pm:

Update document processing to allow a callback only file. Update callback
type checks to look for a regex that matches in the new format.

  • bindings/scripts/CodeGeneratorJS.pm:

(AddToImplIncludesForIDLType):
(AddToIncludesForIDLType):
(AddToImplIncludes):
(AddToIncludes):
Abstract includes functions to allow passing in an include hash.

(GenerateCallbackFunctionHeader):
(GenerateCallbackFunctionImplementation):
(GenerateCallbackInterfaceHeader):
(GenerateCallbackInterfaceImplementation):
(GenerateCallbackHeaderContent):
(GenerateCallbackImplementationContent):
Refactor callback generation code into GenerateCallbackHeaderContent and GenerateCallbackImplementationContent
to allow using it for both the new callbacks as well as the old callback interfaces.

  • bindings/scripts/IDLParser.pm:

(Parse):
(applyTypedefs):
(applyTypedefsToOperation):
(parseCallbackRest):
Parse callbacks into the new IDLCallbackFunction type. Ensure that typedefs are applied as well.

  • bindings/scripts/IDLAttributes.txt:

Remove support for Callback=FunctionOnly.

  • bindings/scripts/test/JS/JSTestCallback.cpp: Removed.
  • bindings/scripts/test/JS/JSTestCallback.h: Removed.
  • bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunction.h:
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp: Added.
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h: Added.
  • bindings/scripts/test/JS/JSTestCallbackInterface.cpp: Copied from Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp.
  • bindings/scripts/test/JS/JSTestCallbackInterface.h: Copied from Source/WebCore/bindings/scripts/test/JS/JSTestCallback.h.
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • bindings/scripts/test/TestCallback.idl: Removed.
  • bindings/scripts/test/TestCallbackFunction.idl:
  • bindings/scripts/test/TestCallbackFunctionWithTypedefs.idl: Added.
  • bindings/scripts/test/TestCallbackInterface.idl: Copied from Source/WebCore/bindings/scripts/test/TestCallback.idl.
  • bindings/scripts/test/TestObj.idl:
  • bindings/scripts/test/TestTypedefs.idl:

Update existing tests and add new ones to test callback functions specifically.

4:59 PM Changeset in webkit [208407] by achristensen@apple.com
  • 4 edits in trunk/Source/WebCore

Move isDefaultPortForProtocol from URLParser.cpp back to URL.cpp
https://bugs.webkit.org/show_bug.cgi?id=164439

Reviewed by Daniel Bates.

No change in behaviour.

  • platform/URL.cpp:

(WebCore::defaultPortForProtocol):
(WebCore::isDefaultPortForProtocol):

  • platform/URLParser.cpp:

(WebCore::URLParser::defaultPortForProtocol):
(WebCore::URLParser::parsePort):
(WebCore::defaultPortForProtocol): Deleted.
(WebCore::isDefaultPortForProtocol): Deleted.

  • platform/URLParser.h:
4:55 PM Changeset in webkit [208406] by Wenson Hsieh
  • 23 edits
    2 adds in trunk

Safari does not emit composition end if blurred for dead key / Japanese IME
https://bugs.webkit.org/show_bug.cgi?id=164369
<rdar://problem/29050439>

Reviewed by Ryosuke Niwa.

Source/WebCore:

On Mac, _before_ changing selection, try to finalize the composition by calling Editor::cancelComposition early.
This is because the focused element may have changed after performing the selection change, so we would
otherwise be dispatching the compositionend to the new focused element (or no compositionend at all) instead
of the element with the composition.

Doing this allows us to match Chrome and Firefox behavior. After canceling the composition, we then need to also
clear the system IME state. We do this on Mac WK1/WK2 through the cancelComposition() codepath, which ends up
calling into -discardMarkedText, which resets the marked text state. Some minor refactoring was performed to
accomplish this -- currently, discardedComposition sends a CompositionWasCanceled message over to the UI process
that discards the marked text, and then updates the editor state. This patch splits this into two separate
steps -- see the WebKit2 ChangeLog for more details.

Test: fast/events/ime-compositionend-on-selection-change.html

  • editing/Editor.cpp:

(WebCore::Editor::selectionWillChange):

  • editing/Editor.h:
  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::selectionWillChange):

  • loader/EmptyClients.h:
  • page/EditorClient.h:

Source/WebKit/mac:

When canceling a composition, make sure that we clear the system IME state.

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::canceledComposition):

Source/WebKit/win:

Add a stub implementation of canceledComposition.

  • WebCoreSupport/WebEditorClient.cpp:

(WebEditorClient::canceledComposition):

  • WebCoreSupport/WebEditorClient.h:

Source/WebKit2:

Split WebPage::discardedComposition into two steps, where we first discard marked text and then update the
editor state. This allows the codepath where we cancel the composition early (before setting the selection) to
discard marked text without also forcing an editor state update at the same time. The editor state is later
updated in WebPage::didChangeSelection.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::compositionWasCanceled):

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

(WebKit::WebEditorClient::canceledComposition):

  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didChangeSelection):
(WebKit::WebPage::discardedComposition):
(WebKit::WebPage::canceledComposition):

  • WebProcess/WebPage/WebPage.h:

LayoutTests:

Adds a new test verifying that we dispatch compositionend events in various circumstances:

  1. After composing in an editable area and then focusing another editable area.
  2. After composing in an editable area and then blur()-ing.
  3. After composing in an editable area and then changing the selection.

There should be no behavior change for other platforms, so no new tests are needed there with this change.

  • fast/events/ime-compositionend-on-selection-change-expected.txt: Added.
  • fast/events/ime-compositionend-on-selection-change.html: Added.
  • platform/ios-simulator/TestExpectations:
4:27 PM Changeset in webkit [208405] by beidson@apple.com
  • 23 edits in trunk

IndexedDB 2.0: Clean up more transaction abort and exception throwing behavior from IDBObjectStore.
https://bugs.webkit.org/show_bug.cgi?id=164424

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

This patch actually turns a handful of PASS to FAIL in the imported tests, but those are parts of the
spec in flux/under discussion.

We'll update either source or the tests as things are resolved.

  • IndexedDB-private-browsing/idbcursor_advance_index7-expected.txt:
  • IndexedDB-private-browsing/idbcursor_continue_index7-expected.txt:
  • IndexedDB-private-browsing/idbindex_get7-expected.txt:
  • IndexedDB-private-browsing/idbindex_getKey7-expected.txt:
  • IndexedDB-private-browsing/idbindex_openCursor2-expected.txt:
  • IndexedDB-private-browsing/idbindex_openKeyCursor3-expected.txt:
  • web-platform-tests/IndexedDB/idbcursor_advance_index7-expected.txt:
  • web-platform-tests/IndexedDB/idbcursor_continue_index7-expected.txt:
  • web-platform-tests/IndexedDB/idbindex_get8-expected.txt:
  • web-platform-tests/IndexedDB/idbindex_getKey8-expected.txt:
  • web-platform-tests/IndexedDB/idbindex_openCursor3-expected.txt:
  • web-platform-tests/IndexedDB/idbindex_openKeyCursor4-expected.txt:
  • web-platform-tests/IndexedDB/transaction-abort-index-metadata-revert-expected.txt:
  • web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt:
  • web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt:

Source/WebCore:

No new tests (Covered by existing tests).

This patch actually turns a handful of PASS to FAIL in the imported tests, but those are parts of the
spec in flux/under discussion.

We'll update either source or the tests as things are resolved.

  • Modules/indexeddb/IDBIndex.cpp:

(WebCore::IDBIndex::rollbackInfoForVersionChangeAbort):

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::putOrAdd):
(WebCore::IDBObjectStore::rollbackForVersionChangeAbort):

LayoutTests:

  • storage/indexeddb/resources/transaction-basics.js:
  • storage/indexeddb/transaction-basics-expected.txt:
  • storage/indexeddb/transaction-basics-private-expected.txt:
4:02 PM Changeset in webkit [208404] by ggaren@apple.com
  • 5 edits
    2 adds in trunk

EvalCodeCache should not give up in strict mode and other cases
https://bugs.webkit.org/show_bug.cgi?id=164357

Reviewed by Michael Saboff.

JSTests:

  • microbenchmarks/eval-cached.js: Added. 45x faster now.
  • stress/eval-cached.js: Added. Try running the same eval text in a bunch

of different scopes and verify that we access the right scope.

Source/JavaScriptCore:

EvalCodeCache gives up in non-trivial cases because generated eval code
can't soundly migrate from, for example, a let scope to a non-let scope.
The number of cases has grown over time.

Instead, let's cache eval code based on the location of the call to
eval(). That way, we never relocate the code, and it's sound to make
normal assumptions about our surrounding scope.

  • bytecode/EvalCodeCache.h:

(JSC::EvalCodeCache::CacheKey::CacheKey): Use CallSiteIndex to uniquely
identify the location of our call to eval().

(JSC::EvalCodeCache::CacheKey::hash):
(JSC::EvalCodeCache::CacheKey::operator==):
(JSC::EvalCodeCache::CacheKey::Hash::equal): Use CallSiteIndex instead
of lots of other flags.

(JSC::EvalCodeCache::tryGet): No need to include details that are implied
by our CallSiteIndex.

(JSC::EvalCodeCache::getSlow): No need to skip caching in complex
situations. We promise we'll never relocate the cached code.

(JSC::EvalCodeCache::isCacheableScope): Deleted.
(JSC::EvalCodeCache::isCacheable): Deleted.

  • interpreter/Interpreter.cpp:

(JSC::eval): Pass through a CallSiteIndex to uniquely identify this call
to eval().

3:53 PM Changeset in webkit [208403] by rniwa@webkit.org
  • 6 edits
    5 adds in trunk

Load stylesheets in link elements inside a connected shadow tree
https://bugs.webkit.org/show_bug.cgi?id=160683
<rdar://problem/29040652>

Reviewed by Antti Koivisto.

Source/WebCore:

Allow external stylesheets within a shadow tree by storing the appropriate style scope in HTMLLinkElement
when it's connected to a document instead of always talking to document's style scope.

Tests: fast/shadow-dom/link-element-in-shadow-tree.html

fast/shadow-dom/selected-stylesheet-in-shadow-tree.html

  • html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::HTMLLinkElement): (WebCore::HTMLLinkElement::~HTMLLinkElement): (WebCore::HTMLLinkElement::setDisabledState): Exit early when the element is not in a document as invoking didChangeActiveStyleSheetCandidates would require having a valid m_styleScope and process() already exits early when inDocument() is false. (WebCore::HTMLLinkElement::parseAttribute): (WebCore::HTMLLinkElement::process): Removed the early exit for when the element is in a shadow tree. (WebCore::HTMLLinkElement::insertedInto): Exit early unless this element has just become connected to a document instead of whenever its self-inclusive ancestor is inserted into a container. (WebCore::HTMLLinkElement::removedFrom): Ditto for removal. Also call removeStyleSheetCandidateNode after calling removePendingSheet since the latter depends on m_styleScope being not null. (WebCore::HTMLLinkElement::addPendingSheet): (WebCore::HTMLLinkElement::removePendingSheet):
  • html/HTMLLinkElement.h:
  • html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::insertedInto): Only call inline style owner's insertedIntoDocument if this element has just become connected to a document. (WebCore::HTMLStyleElement::removedFrom): Ditto for the removal.
  • style/StyleScope.h:
  • svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::insertedInto): Ditto. (WebCore::SVGStyleElement::removedFrom): Ditto for the removal.

LayoutTests:

Added W3C style testharness.js tests for loading stylesheets via a link element inside a ahadow tree.

  • fast/shadow-dom/link-element-in-shadow-tree-expected.txt: Added.
  • fast/shadow-dom/link-element-in-shadow-tree.html: Added.
  • fast/shadow-dom/resources/green-host.css: Added.
  • fast/shadow-dom/selected-stylesheet-in-shadow-tree-expected.txt: Added.
  • fast/shadow-dom/selected-stylesheet-in-shadow-tree.html: Added.
3:53 PM Changeset in webkit [208402] by keith_miller@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Add support for Wasm br_table
https://bugs.webkit.org/show_bug.cgi?id=164429

Reviewed by Michael Saboff.

This patch adds support for Wasm br_table. The Wasm br_table
opcode essentially directly maps to B3's switch opcode.

There are also three other minor changes:
1) all non-argument locals should be initialized to zero at function entry.
2) add new setErrorMessage member to WasmFunctionParser.h
3) return does not decode an extra immediate anymore.

  • testWasm.cpp:

(runWasmTests):

  • wasm/WasmB3IRGenerator.cpp:
  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser::setErrorMessage):
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):
(JSC::Wasm::FunctionParser<Context>::popExpressionStack):

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::checkBranchTarget):
(JSC::Wasm::Validate::addBranch):
(JSC::Wasm::Validate::addSwitch):

3:12 PM Changeset in webkit [208401] by jfbastien@apple.com
  • 28 edits
    1 add in trunk

WebAssembly JS API: implement more sections
https://bugs.webkit.org/show_bug.cgi?id=164023

Reviewed by Keith Miller.

On the JSC side:

  • Put in parser stubs for all WebAssembly sections.
  • Parse Import, Export sections.
  • Use tryReserveCapacity instead of reserve, and bail out of the parser if it fails. This prevents the parser from bringing everything down when faced with a malicious input.
  • Encapsulate all parsed module information into its own structure, making it easier to pass around (from parser to Plan to Module to Instance).
  • Create WasmFormat.cpp to hold parsed module information's dtor to avoid including WasmMemory.h needlessly.

JSTests:

  • parseCode: avoid overflow through function size.
  • Remove all remainders of polyfill-prototype-1, and update license.
  • Add missing WasmOps.h and WasmValidateInlines.h auto-generation for cmake build.

On the Builder.js testing side:

  • Implement Type, Import (function only), Export (function only) sections.
  • Check section order and uniqueness.
  • Optionally auto-generate the Type section from subsequent Export / Import / Code entries.
  • Allow re-exporting an import.
  • wasm/Builder.js: build type, import, and export sections

(const._normalizeFunctionSignature):

  • wasm/Builder_WebAssemblyBinary.js: Added. Forked from Builder.js

(const.emitters.Type):
(const.emitters.Import):
(const.emitters.Function):
(const.emitters.Table):
(const.emitters.Memory):
(const.emitters.Global):
(const.emitters.Export):
(const.emitters.Start):
(const.emitters.Element):
(const.emitters.Code):
(const.emitters.Data):
(export.const.Binary):

  • wasm/LowLevelBinary.js: Add a few useful outputs

(export.default.LowLevelBinary.prototype.varuint1):
(export.default.LowLevelBinary.prototype.varint7):

  • wasm/WASM.js: value type and external kind helpers
  • wasm/assert.js: array element-wise equality comparison

(const._eq):

  • wasm/js-api/test_Module.js:

(ModuleWithImports):

  • wasm/self-test/test_BuilderJSON.js: many more tests for all the new Builder APIs, and update to some older tests which now require a Type section or rejiggered Function signature

(const.assertOpThrows):
(SectionsWithSameCustomName):
(TwoTypeSections):
(EmptyImportSection):
(ImportBeforeTypeSections):

  • wasm/self-test/test_BuilderWebAssembly.js: remove a test which wasn't helpful and is now obsolete

(CustomSection):

Source/JavaScriptCore:

  • Remove all remainders of polyfill-prototype-1, and update license.
  • Add missing WasmOps.h and WasmValidateInlines.h auto-generation for cmake build.

On the Builder.js testing side:

  • Implement Type, Import (function only), Export (function only) sections.
  • Check section order and uniqueness.
  • Optionally auto-generate the Type section from subsequent Export / Import / Code entries.
  • Allow re-exporting an import.
  • CMakeLists.txt: missing auto-genration
  • JavaScriptCore.xcodeproj/project.pbxproj: merge conflict
  • testWasm.cpp: update for API changes, no functional change

(checkPlan):
(runWasmTests):

  • wasm/WasmFormat.cpp: add a dtor which requires extra headers which I'd rather not include in WasmFormat.h

(JSC::Wasm::ModuleInformation::~ModuleInformation):

  • wasm/WasmFormat.h: Add External, Import, Functioninformation, Export, ModuleInformation, CompiledFunction, and remove obsolete stuff which was a holdover from the first implementation (all that code is now gone, so remove its license)

(JSC::Wasm::External::isValid):

  • wasm/WasmModuleParser.cpp: simplify some, make names consistent with the WebAssembly section names, check memory allocations so they can fail early

(JSC::Wasm::ModuleParser::parse):
(JSC::Wasm::ModuleParser::parseType):
(JSC::Wasm::ModuleParser::parseImport):
(JSC::Wasm::ModuleParser::parseFunction):
(JSC::Wasm::ModuleParser::parseTable):
(JSC::Wasm::ModuleParser::parseMemory):
(JSC::Wasm::ModuleParser::parseGlobal):
(JSC::Wasm::ModuleParser::parseExport):
(JSC::Wasm::ModuleParser::parseStart):
(JSC::Wasm::ModuleParser::parseElement):
(JSC::Wasm::ModuleParser::parseCode): avoid overflow through function size.
(JSC::Wasm::ModuleParser::parseData):

  • wasm/WasmModuleParser.h:

(JSC::Wasm::ModuleParser::moduleInformation):

  • wasm/WasmParser.h:

(JSC::Wasm::Parser::consumeUTF8String): add as required by spec
(JSC::Wasm::Parser::parseExternalKind): add as per spec

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::Plan): fix some ownership, improve some error messages

  • wasm/WasmPlan.h: fix some ownership

(JSC::Wasm::Plan::getModuleInformation):
(JSC::Wasm::Plan::getMemory):
(JSC::Wasm::Plan::compiledFunctionCount):
(JSC::Wasm::Plan::compiledFunction):
(JSC::Wasm::Plan::getCompiledFunctions):

  • wasm/WasmSections.h: macroize with description, so that error messages are super pretty. This could be auto-generated.
  • wasm/js/JSWebAssemblyModule.cpp:

(JSC::JSWebAssemblyModule::create): take module information
(JSC::JSWebAssemblyModule::JSWebAssemblyModule): ditto

  • wasm/js/JSWebAssemblyModule.h:

(JSC::JSWebAssemblyModule::moduleInformation):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance): check that modules with imports are instantiated with an import object, as per spec. This needs to be tested.

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::constructJSWebAssemblyMemory):

  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::constructJSWebAssemblyModule):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::constructJSWebAssemblyTable):

3:02 PM Changeset in webkit [208400] by achristensen@apple.com
  • 6 edits in trunk

Unreviewed, rolling out r208293.

asserts in API tests.

Reverted changeset:

"NetworkSession: Network process crash when converting main
resource to download"
https://bugs.webkit.org/show_bug.cgi?id=164220
http://trac.webkit.org/changeset/208293

2:54 PM Changeset in webkit [208399] by commit-queue@webkit.org
  • 18 edits in trunk

Add a setting and preferences to enable/disable async image decoding
https://bugs.webkit.org/show_bug.cgi?id=164417

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-11-04
Reviewed by Simon Fraser.

Source/WebCore:

Add an asyncImageDecodingEnabled setting. This setting controls whether an
image "can" be asynchronously decoded on a separate thread or not. The
function ImageSource::isAsyncDecodingRequired() will be used in conjunction
with this setting to decide whether an image "should" be asynchronously
decoded or not.

  • page/Settings.in:

Source/WebKit/mac:

Hook up the asyncImageDecodingEnabled setting for WebKit1.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences asyncImageDecodingEnabled]):
(-[WebPreferences setAsyncImageDecodingEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Hook up the asyncImageDecodingEnabled setting for WebKit2.

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _asyncImageDecodingEnabled]):
(-[WKPreferences _setAsyncImageDecodingEnabled:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

Pref and a menu item to toggle asyncImageDecodingEnabled for WebKits 1 and 2.

  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleAsyncImageDecodingEnabled:]):
(-[SettingsController asyncImageDecodingEnabled]):

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController didChangeSettings]):

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController didChangeSettings]):

2:04 PM Changeset in webkit [208398] by timothy_horton@apple.com
  • 4 edits in trunk/Source/WebCore

Apply post-landing review comments for r208347

  • dom/Element.cpp:

(WebCore::Element::findAnchorElementForLink):
Use attributeWithoutSynchronization.

  • page/PrintContext.cpp:

(WebCore::PrintContext::spoolPage):
(WebCore::PrintContext::spoolRect):
(WebCore::PrintContext::collectLinkedDestinations):
(WebCore::PrintContext::outputLinkedDestinations):

  • page/PrintContext.h:

Pass Document by reference instead of Node by pointer,
use ElementTraversal instead of NodeTraversal to avoid
having to locally check the type, and null-check renderers.

1:48 PM Changeset in webkit [208397] by Chris Dumez
  • 2 edits
    2 adds in trunk/LayoutTests

Add layout test for input.setCustomValidity()
https://bugs.webkit.org/show_bug.cgi?id=164419

Reviewed by Simon Fraser.

Add layout test for input.setCustomValidity().

  • fast/forms/validation-custom-message-expected.txt: Added.
  • fast/forms/validation-custom-message.html: Added.
1:09 PM Changeset in webkit [208396] by mmaxfield@apple.com
  • 7 edits
    2 adds in trunk

Implement WebGL2RenderingContext::copyBufferSubData()
https://bugs.webkit.org/show_bug.cgi?id=164008

Reviewed by Dean Jackson.

Source/WebCore:

Similar to previous work regarding WebGL 2 buffers, this method implements
the ability to copy from one buffer to another without the data leaving
the GPU.

Test: fast/canvas/webgl/copyBufferSubData.html

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::copyBufferSubData):

  • html/canvas/WebGLBuffer.cpp:

(WebCore::WebGLBuffer::associateCopyBufferSubData):

  • html/canvas/WebGLBuffer.h:
  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::copyBufferSubData):

LayoutTests:

  • fast/canvas/webgl/copyBufferSubData-expected.txt: Added.
  • fast/canvas/webgl/copyBufferSubData.html: Added.
12:42 PM Changeset in webkit [208395] by Simon Fraser
  • 27 edits in trunk/Source

Rename some ScrollingTree/Node-related functions to reduce the number of uses of "update"
https://bugs.webkit.org/show_bug.cgi?id=164420

Reviewed by Tim Horton.

Rename:

commitNewTreeState -> commitTreeState ("new" was redundant)
updateBeforeChildren -> commitStateBeforeChildren
updateAfterChildren -> commitStateAfterChildren

Source/WebCore:

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::commitTreeState):
(WebCore::ScrollingTree::updateTreeFromStateNode):
(WebCore::ScrollingTree::commitNewTreeState): Deleted.

  • page/scrolling/ScrollingTree.h:
  • page/scrolling/ScrollingTreeFrameScrollingNode.cpp:

(WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren): Deleted.

  • page/scrolling/ScrollingTreeFrameScrollingNode.h:
  • page/scrolling/ScrollingTreeNode.h:

(WebCore::ScrollingTreeNode::commitStateAfterChildren):
(WebCore::ScrollingTreeNode::updateAfterChildren): Deleted.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren):
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): Deleted.
(WebCore::ScrollingTreeScrollingNode::updateAfterChildren): Deleted.

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::commitTreeState):
(WebCore::ThreadedScrollingTree::commitNewTreeState): Deleted.

  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
  • page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:

(WebCore::ScrollingTreeFrameScrollingNodeIOS::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::commitStateAfterChildren):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::updateBeforeChildren): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeIOS::updateAfterChildren): Deleted.

  • page/scrolling/ios/ScrollingTreeIOS.cpp:

(WebCore::ScrollingTreeIOS::commitNewTreeState): Deleted.

  • page/scrolling/ios/ScrollingTreeIOS.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::commitTreeState):

  • page/scrolling/mac/ScrollingTreeFixedNode.h:
  • page/scrolling/mac/ScrollingTreeFixedNode.mm:

(WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeFixedNode::updateBeforeChildren): Deleted.

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateAfterChildren): Deleted.

  • page/scrolling/mac/ScrollingTreeStickyNode.h:
  • page/scrolling/mac/ScrollingTreeStickyNode.mm:

(WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeStickyNode::updateBeforeChildren): Deleted.

Source/WebKit2:

  • UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::commitScrollingTreeState):
(WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Deleted.

  • UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
  • UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
  • UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:

(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren): Deleted.
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): Deleted.

  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

12:21 PM Changeset in webkit [208394] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.11.1/Source

Versioning

12:19 PM Changeset in webkit [208393] by matthew_hanson@apple.com
  • 1 edit in tags/Safari-602.3.8/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm

Merge r208385. rdar://problem/28857505

12:16 PM Changeset in webkit [208392] by andersca@apple.com
  • 9 edits in trunk/Source/WebCore

Add new 'other' Apple Pay button style
https://bugs.webkit.org/show_bug.cgi?id=164384
rdar://problem/28302528

Reviewed by Dean Jackson.

  • DerivedSources.make:
  • WebCorePrefix.h:

Add extension points.

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
Add ApplePayButtonType::Other.

(WebCore::CSSPrimitiveValue::operator ApplePayButtonType):
Add CSSValueOther.

  • css/CSSValueKeywords.in:

Add other.

  • css/parser/CSSParser.cpp:

(WebCore::isValidKeywordPropertyAndValue):
Add CSSValueOther.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
Add CSSValueOther.

  • rendering/RenderThemeCocoa.mm:

(WebCore::toPKPaymentButtonType):
Handle ApplePayButtonType::Other.

  • rendering/style/RenderStyleConstants.h:

Add ApplePayButtonType::Other.

12:16 PM Changeset in webkit [208391] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.11.1

New tag.

11:32 AM Changeset in webkit [208390] by Antti Koivisto
  • 3 edits
    2 adds in trunk

slotted() pseudo does not work with ID selector
https://bugs.webkit.org/show_bug.cgi?id=160538
<rdar://problem/28534529>

Reviewed by Andreas Kling.

Source/WebCore:

When we saw an id selector while addin rules we immediately threw it into the m_idRules
optimization bucket and bailed out. However selectors containing ::slotted must always end
up in m_slottedPseudoElementRules list no matter what else is there.

Fix by treating id like other selectors and only choosing the bucket after analysing all
the selector components.

Test: fast/shadow-dom/css-scoping-slot-with-id.html

  • css/RuleSet.cpp:

(WebCore::RuleSet::addRule): Also made this use switch instead of a series of ifs.

LayoutTests:

  • fast/shadow-dom/css-scoping-slot-with-id-expected.html: Added.
  • fast/shadow-dom/css-scoping-slot-with-id.html: Added.
11:10 AM Changeset in webkit [208389] by beidson@apple.com
  • 4 edits in trunk

IndexedDB 2.0: Handle IDBObjectStore rename behavior properly when version change transaction aborts.
https://bugs.webkit.org/show_bug.cgi?id=164416

Reviewed by Beth Dakin.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/idbobjectstore-rename-abort-expected.txt:

Source/WebCore:

No new tests (Covered by existing tests).

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::rollbackForVersionChangeAbort):

11:08 AM Changeset in webkit [208388] by achristensen@apple.com
  • 36 edits
    2 adds
    1 delete in trunk/Source

NetworkSession: Add NetworkDataTask implementation for blobs
https://bugs.webkit.org/show_bug.cgi?id=163939

Source/WebCore:

Patch by Keith Rollin <Keith Rollin> on 2016-11-04
Reviewed by Alex Christensen.

  • WebCore.xcodeproj/project.pbxproj: Mark HTTPParsers.h and AsyncFileStream.h as private.
  • fileapi/AsyncFileStream.h: Add WEBCORE_EXPORT to AsyncFileStream class.
  • platform/network/BlobData.h: Add WEBCORE_EXPORT to length().
  • platform/network/HTTPParsers.h: Add WEBCORE_EXPORT to parseRange().
  • platform/network/ResourceResponseBase.h: Add WEBCORE_EXPORT to setHTTPHeaderField().

Source/WebCore/platform/gtk/po:

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-11-04
Reviewed by Alex Christensen.

  • POTFILES.in: Remove DownloadSoup.cpp

Source/WebKit2:

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-11-04
Reviewed by Alex Christensen.

Add NetworkDataTaskBlob to handle blobs when using NetworkSession instead of using ResourceHandle. This patch
adds more USE(NETWORK_SESSION) ifdefs to not use ResourceHandle in Downloads and NetworkLoad when NetworkSession
is enabled.

  • CMakeLists.txt: Add new files to compilation.
  • NetworkProcess/Downloads/BlobDownloadClient.cpp:
  • NetworkProcess/Downloads/BlobDownloadClient.h:
  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::Download): Split the constructor again and remove the PlatformDownloadTaskRef
definitions. Now Cocoa specific constructor receives a NSURLSessionDownloadTask and the general constructor
reveices a NetworkDataTask and is used by Soup backend and blobs.
(WebKit::Download::~Download):
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::cancel):
(WebKit::Download::didReceiveAuthenticationChallenge):
(WebKit::Download::didReceiveData):
(WebKit::Download::didFinish):
(WebKit::Download::platformCancelNetworkLoad): Rename cancelNetworkLoad() as platformCancelNetworkLoad() since
this is now used only by Cocoa platform to cancel the NSURLSessionDownloadTask.

  • NetworkProcess/Downloads/Download.h:

(WebKit::Download::Download):
(WebKit::Download::suggestedName):
(WebKit::Download::request):

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::startDownload): Remove blobs specific code when using NetworkSession.
(WebKit::DownloadManager::continueDecidePendingDownloadDestination):

  • NetworkProcess/Downloads/DownloadManager.h:
  • NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:

(WebKit::Download::platformCancelNetworkLoad):

  • NetworkProcess/Downloads/soup/DownloadSoup.cpp: Removed.
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload): Remove blobs specific code when
using NetworkSession.

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create): If request is a blob, create a NetworkDataTaskBlob.

  • NetworkProcess/NetworkDataTask.h: Add invalidateAndCancel pure virtual method.
  • NetworkProcess/NetworkDataTaskBlob.cpp: Added.

(WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
(WebKit::NetworkDataTaskBlob::~NetworkDataTaskBlob):
(WebKit::NetworkDataTaskBlob::clearStream):
(WebKit::NetworkDataTaskBlob::resume):
(WebKit::NetworkDataTaskBlob::suspend):
(WebKit::NetworkDataTaskBlob::cancel):
(WebKit::NetworkDataTaskBlob::invalidateAndCancel):
(WebKit::NetworkDataTaskBlob::getSizeForNext):
(WebKit::NetworkDataTaskBlob::didGetSize):
(WebKit::NetworkDataTaskBlob::seek):
(WebKit::NetworkDataTaskBlob::didReceiveResponse):
(WebKit::NetworkDataTaskBlob::read):
(WebKit::NetworkDataTaskBlob::readData):
(WebKit::NetworkDataTaskBlob::readFile):
(WebKit::NetworkDataTaskBlob::didOpen):
(WebKit::NetworkDataTaskBlob::didRead):
(WebKit::NetworkDataTaskBlob::consumeData):
(WebKit::NetworkDataTaskBlob::setPendingDownloadLocation):
(WebKit::NetworkDataTaskBlob::suggestedFilename):
(WebKit::NetworkDataTaskBlob::download):
(WebKit::NetworkDataTaskBlob::writeDownload):
(WebKit::NetworkDataTaskBlob::cleanDownloadFiles):
(WebKit::NetworkDataTaskBlob::didFailDownload):
(WebKit::NetworkDataTaskBlob::didFinishDownload):
(WebKit::NetworkDataTaskBlob::didFail):
(WebKit::NetworkDataTaskBlob::didFinish):

  • NetworkProcess/NetworkDataTaskBlob.h: Added.
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::NetworkLoad): Remove blobs specific code when using NetworkSession.
(WebKit::NetworkLoad::~NetworkLoad):
(WebKit::NetworkLoad::setDefersLoading):
(WebKit::NetworkLoad::cancel):
(WebKit::NetworkLoad::continueWillSendRequest):
(WebKit::NetworkLoad::continueDidReceiveResponse):
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::invalidateAndCancel): Moved from NetworkSessionSoup, since this is now used also by blobs.

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::registerNetworkDataTask): Ditto.
(WebKit::NetworkSession::unregisterNetworkDataTask): Ditto.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h: Add invalidateAndCancel() implementation that does nothing

because in Cocoa all tasks are invalidated and canceled by the network session.

  • NetworkProcess/mac/NetworkLoadMac.mm:
  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
(WebKit::NetworkDataTaskSoup::~NetworkDataTaskSoup):
(WebKit::NetworkDataTaskSoup::download):

  • NetworkProcess/soup/NetworkDataTaskSoup.h:
  • NetworkProcess/soup/NetworkSessionSoup.cpp:
  • NetworkProcess/soup/NetworkSessionSoup.h:
  • PlatformEfl.cmake: Remove DownloadSoup.cpp from compilation.
  • PlatformGTK.cmake: Ditto.
  • WebKit2.xcodeproj/project.pbxproj: Add new files to compilation.
11:02 AM Changeset in webkit [208387] by beidson@apple.com
  • 2 edits in trunk/Tools

REGRESSION (r208349) StringHasher::hashMemory behavior changed, causing API tests to fail
https://bugs.webkit.org/show_bug.cgi?id=164390

Reviewed by Geoffrey Garen.

Operating under the assumption that the behavior change is okay/desirable, this updates the test.

  • TestWebKitAPI/Tests/WTF/StringHasher.cpp:

(TestWebKitAPI::TEST):

11:02 AM Changeset in webkit [208386] by beidson@apple.com
  • 11 edits in trunk

IndexedDB 2.0: Use IDB-specific exceptions in places where the generic exceptions are currently used.
https://bugs.webkit.org/show_bug.cgi?id=164406

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/idbindex-rename-errors-expected.txt:
  • web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt:

Source/WebCore:

No new tests (Covered by existing tests).

  • Modules/indexeddb/IDBIndex.cpp:

(WebCore::IDBIndex::setName):

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::setName):

LayoutTests:

  • storage/indexeddb/modern/index-rename-1-expected.txt:
  • storage/indexeddb/modern/index-rename-1-private-expected.txt:
  • storage/indexeddb/modern/objectstore-rename-1-expected.txt:
  • storage/indexeddb/modern/objectstore-rename-1-private-expected.txt:
10:26 AM Changeset in webkit [208385] by matthew_hanson@apple.com
  • 1 edit in branches/safari-602-branch/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm

Fix-up merge of r208299. rdar://problem/28857505

10:01 AM WebKitGTK/2.14.x edited by Carlos Garcia Campos
(diff)
9:48 AM Changeset in webkit [208384] by jdiggs@igalia.com
  • 16 edits
    4 adds in trunk

AX: [ATK] Attempting to clear selection on ARIA listboxes results in crash
https://bugs.webkit.org/show_bug.cgi?id=164331

Reviewed by Chris Fleizach.

Source/WebCore:

The ATK code is using is<AccessibilityListBox>() to identify native listboxes.
But is<AccessibilityListBox>() returns the value of isListBox() which returns
true both for AccessibilityListBox instances as well as for AccessibilityObject
instances which have an AccessibilityRole value of ListBoxRole. Because only
native listboxes should be AccessibilityListBoxes, add isNativeListBox() so
that we can distinguish native and ARIA listboxes.

Tests: accessibility/aria-listbox-clear-selection-crash.html

accessibility/listbox-clear-selection.html

  • accessibility/AccessibilityListBox.h:
  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::isNativeListBox):
(WebCore::AccessibilityObject::isListBox):

Tools:

Add AccessibilityUIElement::clearSelectedChildren() to DRT and WKTR.
Implement it for ATK.

  • DumpRenderTree/AccessibilityUIElement.h:
  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(AccessibilityUIElement::clearSelectedChildren):

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(AccessibilityUIElement::clearSelectedChildren):

  • DumpRenderTree/win/AccessibilityUIElementWin.cpp:

(AccessibilityUIElement::clearSelectedChildren):

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::clearSelectedChildren):

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::clearSelectedChildren):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::clearSelectedChildren):

LayoutTests:

Add tests to verify clearing selection works for native listboxes, and does not
crash for ARIA listboxes. These tests are being skipped for the Mac and Win ports
which do not yet implement AccessibilityUIElement::clearSelectedChildren().

  • accessibility/aria-listbox-clear-selection-crash-expected.txt: Added.
  • accessibility/aria-listbox-clear-selection-crash.html: Added.
  • accessibility/listbox-clear-selection-expected.txt: Added.
  • accessibility/listbox-clear-selection.html: Added.
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
8:49 AM Changeset in webkit [208383] by beidson@apple.com
  • 11 edits in trunk

IndexedDB 2.0: Throw the correct exceptions during IDBObjectStore/IDBIndex renaming.
https://bugs.webkit.org/show_bug.cgi?id=164405

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/idbindex-rename-errors-expected.txt:
  • web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt:

Source/WebCore:

No new tests (Covered by existing tests).

  • Modules/indexeddb/IDBIndex.cpp:

(WebCore::IDBIndex::setName):

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::setName):

LayoutTests:

  • storage/indexeddb/modern/index-rename-1-expected.txt:
  • storage/indexeddb/modern/index-rename-1-private-expected.txt:
  • storage/indexeddb/modern/objectstore-rename-1-expected.txt:
  • storage/indexeddb/modern/objectstore-rename-1-private-expected.txt:
3:39 AM Changeset in webkit [208382] by commit-queue@webkit.org
  • 9 edits in trunk

[Readable Streams API] Implement ByteStreamController error()
https://bugs.webkit.org/show_bug.cgi?id=164319

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-11-04
Reviewed by Youenn Fablet.

Source/WebCore:

Implemented error() method of ReadableByteStreamController.

Updated test expectations for error() and added IDL-related tests.

  • Modules/streams/ReadableByteStreamController.js:

(error): Implemented.

  • Modules/streams/ReadableByteStreamInternals.js:

(privateInitializeReadableByteStreamController):
(isReadableByteStreamController): Added.
(readableByteStreamControllerError): Added.
(readableByteStreamControllerClearPendingPullIntos): Added.

  • Modules/streams/ReadableStream.js:

(initializeReadableStream): More detailed error message.

  • Modules/streams/ReadableStreamDefaultController.js:

(error): Removed unnecessary variable declaration.

  • bindings/js/WebCoreBuiltinNames.h: Added totalQueuedBytes.

LayoutTests:

Updated test expectation for error() test (previously FAIL, now PASS).
Added IDL-related tests for ReadableByteStreamController.

  • streams/readable-byte-stream-controller-expected.txt:
2:35 AM Changeset in webkit [208381] by pvollan@apple.com
  • 8 edits in trunk

[Win] Page visibility tests are timing out.
https://bugs.webkit.org/show_bug.cgi?id=164363

Reviewed by Brent Fulgham.

Source/WebKit/win:

Add method to set page visibility.

  • Interfaces/IWebViewPrivate.idl:
  • WebView.cpp:

(WebView::QueryInterface):
(WebView::findString):
(WebView::setVisibilityState):

  • WebView.h:

Tools:

Implement methods to set page visibility.

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::resetPageVisibility):
(TestRunner::setPageVisibility):

LayoutTests:

Unskip page visibility tests.

  • platform/win/TestExpectations:
Note: See TracTimeline for information about the timeline view.