Timeline



Apr 4, 2015:

11:51 PM Changeset in webkit [182355] by Chris Fleizach
  • 3 edits
    2 adds
    2 deletes in trunk

AX: Heuristic: Avoid exposing an element as clickable if mouse event delegation is handled on an AXElement with more than one descendant AXElement
https://bugs.webkit.org/show_bug.cgi?id=136247

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Modify the logic for determining whether an element supports the press action by trying to filter out objects being handled by event delegation.
The heuristic is if an element handles click actions and has more than one of a {static text, image, control, link, heading}, then we think
it's using event delegation, and do not expose the press action.

Test: platform/mac/accessibility/press-action-not-exposed-for-event-delegation.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::supportsPressAction):

LayoutTests:

  • platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler-expected.txt: Removed.
  • platform/mac/accessibility/press-action-not-exposed-when-body-is-click-handler.html: Removed.
  • platform/mac/accessibility/press-action-not-exposed-for-event-delegation-expected.txt: Added.
  • platform/mac/accessibility/press-action-not-exposed-for-event-delegation.html: Added.
11:11 PM Changeset in webkit [182354] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

More const in CSSToStyleMap
https://bugs.webkit.org/show_bug.cgi?id=143409

Reviewed by Andreas Kling.

The CSSValues passed to CSSToStyleMap functions can mostly be treated
as |const|, except for CSSImageValues which have special behavior.

This makes it clearer what the inputs and outputs of these
functions are.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::computeDegrees):

  • css/CSSPrimitiveValue.h:

(WebCore::CSSPrimitiveValue::computeTime):

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapFillAttachment):
(WebCore::CSSToStyleMap::mapFillClip):
(WebCore::CSSToStyleMap::mapFillComposite):
(WebCore::CSSToStyleMap::mapFillBlendMode):
(WebCore::CSSToStyleMap::mapFillOrigin):
(WebCore::CSSToStyleMap::mapFillRepeatX):
(WebCore::CSSToStyleMap::mapFillRepeatY):
(WebCore::CSSToStyleMap::mapFillSize):
(WebCore::CSSToStyleMap::mapFillXPosition):
(WebCore::CSSToStyleMap::mapFillYPosition):
(WebCore::CSSToStyleMap::mapFillMaskSourceType):
(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationDuration):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
(WebCore::CSSToStyleMap::mapAnimationTrigger):

  • css/CSSToStyleMap.h:
8:09 PM Changeset in webkit [182353] by Simon Fraser
  • 4 edits in trunk/LayoutTests

Fix some bad test results committed earlier.

  • platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-element-with-multiple-handlers-crash-expected.txt:
  • platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-crash-expected.txt:
  • platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-parent-crash-expected.txt:
8:01 PM Changeset in webkit [182352] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix the build.

  • loader/icon/IconController.cpp:

(WebCore::iconsFromLinkElements):

6:01 PM Changeset in webkit [182351] by Darin Adler
  • 26 edits
    3 deletes in trunk

Streamline icon-related code, mostly unused
https://bugs.webkit.org/show_bug.cgi?id=143306

Reviewed by Antti Koivisto.

Source/WebCore:

I started on this path because Document::iconURLs had a poor implementation,
storing results in a data member with no benefit, using HTMLCollection for
iteration of the children of the head element instead of using the simpler
faster technique we use inside the engine. Then, I discovered this function was
mostly-unused code left over from before the Blink fork. I removed most of it.
We can add this back later if someone finds a use for it, but if we do we
should do a higher quality implementation without the quirks of the old one.

Refactoring also made it clear that logic isn't exactly sensible. There's a
set of rules about what order to return the list in that is not followed by
the code that tries to find the "default touch icon". Later we could add some
more test coverage and tighten up the logic. But the reality is that at this
time, with some small exceptions, icon logic is in the web browsers, not in WebKit.

  • CMakeLists.txt: Removed IconURL.cpp.
  • WebCore.vcxproj/WebCore.vcxproj: Ditto.
  • WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • dom/DOMAllInOne.cpp: Ditto.
  • dom/Document.cpp:

(WebCore::Document::evaluate): Tweaked formatting.
(WebCore::Document::shortcutIconURLs): Removed. Unused function.
(WebCore::Document::iconURLs): Removed. Moved code to IconController.
(WebCore::Document::addIconURL): Removed. Moved code to LinkLoader.

  • dom/Document.h: Removed shortcutIconURLs, iconURLs, addIconURL,

and m_iconURLs.

  • dom/IconURL.cpp: Removed.
  • dom/IconURL.h: Removed everything from this header except for the

IconType enum. Added a FIXME about possibly renaming the header.

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::HTMLLinkElement): Pass a reference when creating
the link loading.
(WebCore::HTMLLinkElement::setDisabledState): Access members of the struct
LinkRelElement without "m_" prefix.
(WebCore::HTMLLinkElement::parseAttribute): Changed to use early return style,
and made the part of this for parsing title use a more normal idiom.
(WebCore::HTMLLinkElement::process): Removed many unneeded arguments, made the
logic of the code a little easier to follow.
(WebCore::HTMLLinkElement::removedFrom): Removed a call to a function that had
an empty body.
(WebCore::HTMLLinkElement::iconType): Updated for change to LinkRelElement.
(WebCore::HTMLLinkElement::addSubresourceAttributeURLs): Ditto.

  • html/HTMLLinkElement.h: More of the same.
  • html/LinkRelAttribute.cpp:

(WebCore::LinkRelAttribute::LinkRelAttribute): Initialize data members in the
struct itself. Got rid of "m_" prefix since this is a struct, not a class.
Changed code to use modern for loop; even better would be to eliminate the
splitting into a vector entirely and use StringView (do that next time).

  • html/LinkRelAttribute.h: See above.
  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::relAttributeIsStyleSheet):
Updated for chnages to LinkRelAttribute and give the local variable a clearer name.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::didChangeIcons): Removed.

  • loader/FrameLoader.h: Removed didChangeIcons.
  • loader/FrameLoaderClient.h: Added include for String since it's no longer

taken care of by IconURLs.h.

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::LinkLoader): Take a reference instead of a pointer.
(WebCore::LinkLoader::linkLoadTimerFired): Use m_client reference instead of pointer.
(WebCore::LinkLoader::linkLoadingErrorTimerFired): Ditto.
(WebCore::LinkLoader::notifyFinished): Use nullptr.
(WebCore::LinkLoader::loadLink): Tweak formatting. Move the dispatchDidChangeIcons
call in here instead of going through Document to FrameLoader and then FrameLoader to
FrameLoaderClient, and passing extra unused arguments, the way the old code did.
Use a reference instead of a pointer for the document.
(WebCore::LinkLoader::released): Removed. Empty function.

  • loader/LinkLoader.h: Changed constructor argument to be a reference. Made more

things private. Removed empty released function.

  • loader/icon/IconController.cpp:

(WebCore::IconController::IconController): Moved initialization of data members to
the class definition in the header.
(WebCore::iconsFromLinkElements): Added. This function replaces the existing
Document::iconURLs function, but has a simpler implementation and interface.
It focuses on exactly what the code in this file needs. If we want to add some
more features to the icon controller we might make this more complex again.
Even now, building a vector is not necessarily helpful; the only client of this
function ends up extracting only one of the URLs this function returns.
(WebCore::IconController::url): Rewrote this. It's the only function actually
using the icon URLs. This contains a combination of the logic from the various
functions in this class before, including iconURL, urlsForTypes, appendToIconURLs,
and defaultURL. Among other improvements, replaced the unusual code to construct
the icon URL with a call to Document::completeURL.
(WebCore::IconController::startLoader): Refactored a bit to remove a local variable.
(WebCore::IconController::continueLoadWithDecision): Ditto.

  • loader/icon/IconController.h: Removed unneeded includes, unneeded use of

WTF_MAKE_NONCOPYABLE (since classes with data members of reference type are
automatically noncopyable), unused fucntions. Also initialize m_waitingForLoadDecision.

  • testing/Internals.cpp:

(WebCore::Internals::iconURLs): Removed.
(WebCore::Internals::shortcutIconURLs): Left this in place since it is used by
tests. Changed it to return the actual value from the IconController::url function,
since that's the interface to our icon machinery that is actually exposed on some
platforms. That means this returns only a single URL.
(WebCore::Internals::allIconURLs): Removed.

  • testing/Internals.h: Removed allIconURLs and iconURLs.
  • testing/Internals.idl: Removed allIconURLs.

LayoutTests:

  • fast/dom/icon-url-list-apple-touch-expected.txt: Removed.
  • fast/dom/icon-url-list-apple-touch.html: Removed. This tested code that was

not actually used in any WebKit port.

  • fast/dom/icon-url-list.html: Updated to expect only a single icon URL;

the icon machinery in WebKit doesn't return arrays at this time. It's better to
test what we actually expose.

5:53 PM Changeset in webkit [182350] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Fix EFL and Gtk build.

  • dom/Document.cpp:

(WebCore::Document::didRemoveTouchEventHandler):

5:51 PM Changeset in webkit [182349] by Simon Fraser
  • 5 edits
    6 adds in trunk

Crash under Document::absoluteRegionForEventTargets on build.webkit.org/dashboard
https://bugs.webkit.org/show_bug.cgi?id=143406
rdar://problem/20407080

Reviewed by Ryosuke Niwa.

Source/WebCore:

We failed to remove elements from Document's m_wheelEventTargets HashSet when the
elements were destroyed with wheel handlers still on them. Fix by removing the
node from the set via Node::willBeDeletedFrom().

Tests: platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-element-with-multiple-handlers-crash.html

platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-crash.html
platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-parent-crash.html

  • dom/Document.cpp:

(WebCore::removeHandlerFromSet): Helper to remove one or all handlers on the given node.
(WebCore::Document::didRemoveWheelEventHandler): Add a parameter to specify whether we're
removing all handlers on the given node.
(WebCore::Document::didRemoveTouchEventHandler): Use removeHandlerFromSet().

  • dom/Document.h:
  • dom/Node.cpp:

(WebCore::Node::willBeDeletedFrom): Tell the document we're removing all handlers
for this node.

LayoutTests:

Test configurations of elements with different parenting and event handlers adding orders, and multiple handlers on
the same node.

  • platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-element-with-multiple-handlers-crash-expected.txt: Added.
  • platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-element-with-multiple-handlers-crash.html: Added.
  • platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-crash-expected.txt: Added.
  • platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-crash.html: Added.
  • platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-parent-crash-expected.txt: Added.
  • platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/destroy-wheel-element-parent-crash.html: Added.
5:19 PM Changeset in webkit [182348] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

[WK2][Cocoa] Add a way to temporarily disable the WebKit Network Cache for testing
https://bugs.webkit.org/show_bug.cgi?id=143392
<rdar://problem/20315669>

Reviewed by Antti Koivisto.

Add a way to temporarily disable the WebKit Network Cache for testing.
It will be used temporarily for comparing page load times with and
without the WebKit network disk cache enabled.

This is in addition to the existing "WebKitNetworkCacheEnabled"
NSUserDefaults:
webkitNetworkCacheIsEnabled = [defaults boolForKey:WebKitNetworkCacheEnabledDefaultsKey]

&& ![defaults boolForKey:WebKitNetworkCacheTemporarilyDisabledForTestingKey];

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeNetworkProcess):

4:16 PM Changeset in webkit [182347] by akling@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

Logically empty WeakBlocks should not pin down their MarkedBlocks indefinitely.
<https://webkit.org/b/143210>

Reviewed by Geoffrey Garen.

Since a MarkedBlock cannot be destroyed until all the WeakBlocks pointing into it are gone,
we had a little problem where WeakBlocks with only null pointers would still keep their
MarkedBlock alive.

This patch fixes that by detaching WeakBlocks from their MarkedBlock once a sweep discovers
that the WeakBlock contains no pointers to live objects. Ownership of the WeakBlock is passed
to the Heap, which will sweep the list of these detached WeakBlocks as part of a full GC,
destroying them once they're fully dead.

This allows the garbage collector to reclaim the 64kB MarkedBlocks much sooner, and resolves
a mysterious issue where doing two full garbage collections back-to-back would free additional
memory in the second collection.

Management of detached WeakBlocks is implemented as a Vector<WeakBlock*> in Heap, along with
an index of the next block in that vector that needs to be swept. The IncrementalSweeper then
calls into Heap::sweepNextLogicallyEmptyWeakBlock() to sweep one block at a time.

  • heap/Heap.h:
  • heap/Heap.cpp:

(JSC::Heap::collectAllGarbage): Add a final pass where we sweep the logically empty WeakBlocks
owned by Heap, after everything else has been swept.

(JSC::Heap::notifyIncrementalSweeper): Set up an incremental sweep of logically empty WeakBlocks
after a full garbage collection ends. Note that we don't do this after Eden collections, since
they are unlikely to cause entire WeakBlocks to go empty.

(JSC::Heap::addLogicallyEmptyWeakBlock): Added. Interface for passing ownership of a WeakBlock
to the Heap when it's detached from a WeakSet.

(JSC::Heap::sweepAllLogicallyEmptyWeakBlocks): Helper for collectAllGarbage() that sweeps all
of the logically empty WeakBlocks owned by Heap.

(JSC::Heap::sweepNextLogicallyEmptyWeakBlock): Sweeps one logically empty WeakBlock if needed
and updates the next-logically-empty-weak-block-to-sweep index.

(JSC::Heap::lastChanceToFinalize): call sweepAllLogicallyEmptyWeakBlocks() here, since there
won't be another chance after this.

  • heap/IncrementalSweeper.h:

(JSC::IncrementalSweeper::hasWork): Deleted.

  • heap/IncrementalSweeper.cpp:

(JSC::IncrementalSweeper::fullSweep):
(JSC::IncrementalSweeper::doSweep):
(JSC::IncrementalSweeper::sweepNextBlock): Restructured IncrementalSweeper a bit to simplify
adding a new sweeping stage for the Heap's logically empty WeakBlocks. sweepNextBlock() is
changed to return a bool (true if there's more work to be done.)

  • heap/WeakBlock.cpp:

(JSC::WeakBlock::sweep): This now figures out if the WeakBlock is logically empty, i.e doesn't
contain any pointers to live objects. The answer is stored in a new SweepResult member.

  • heap/WeakBlock.h:

(JSC::WeakBlock::isLogicallyEmptyButNotFree): Added. Can be queried after a sweep to determine
if the WeakBlock could be detached from the MarkedBlock.

(JSC::WeakBlock::SweepResult::SweepResult): Deleted in favor of initializing member variables
when declaring them.

3:39 PM Changeset in webkit [182346] by Simon Fraser
  • 10 edits
    2 adds in trunk

REGRESSION (r182215): Feedly crashes when closing article
https://bugs.webkit.org/show_bug.cgi?id=143405
rdar://problem/20382734, rdar://problem/20395497

Reviewed by Tim Horton.

Source/WebCore:

Calling computeNonFastScrollableRegion() eagerly when scrollable areas come and go
is bad, because it can cause FrameView::layout() to get called in the middle of
RenderObject destruction, which leaves the render tree in a bad state.

Fix by calling computeNonFastScrollableRegion() lazily, just before scrolling tree commit.

AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged() now just sets
a flag to say that the non-fast region needs to be recomputed, and that schedules
a scrolling tree commit. When the commit happens, we recompute the region. If the
region didn't change, and no other changes are pending, there's no need to commit.

Test: platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/compute-region-inside-delete-renderer-crash.html

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::setNonFastScrollableRegionDirty):
(WebCore::AsyncScrollingCoordinator::willCommitTree):
(WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion):
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText): Need to eagerly update
the non-fast scrollable region.

  • page/scrolling/AsyncScrollingCoordinator.h:

(WebCore::AsyncScrollingCoordinator::nonFastScrollableRegionDirty):

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::ScrollingCoordinator):
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::willCommitTree):

  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):
(WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):
(WebCore::ScrollingCoordinatorMac::commitTreeState):

Source/WebKit2:

Calling computeNonFastScrollableRegion() eagerly when scrollable areas come and go
is bad, because it can cause FrameView::layout() to get called in the middle of
RenderObject destruction, which leaves the render tree in a bad state.

Fix by calling computeNonFastScrollableRegion() lazily, just before scrolling tree commit.

AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged() now just sets
a flag to say that the non-fast region needs to be recomputed, and that schedules
a scrolling tree commit. When the commit happens, we recompute the region. If the
region didn't change, and no other changes are pending, there's no need to commit.

  • WebProcess/Scrolling/RemoteScrollingCoordinator.mm:

(WebKit::RemoteScrollingCoordinator::buildTransaction):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::flushLayers): Outdent #ifdefs.

LayoutTests:

Test that triggers a crash without the fix (thanks to Zalan for the test).

  • platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/compute-region-inside-delete-renderer-crash-expected.txt: Added.
  • platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/compute-region-inside-delete-renderer-crash.html: Added.
12:24 PM Changeset in webkit [182345] by Simon Fraser
  • 11 edits in trunk

Differentiate between composited scrolling, and async scrolling
https://bugs.webkit.org/show_bug.cgi?id=143291

Reviewed by Sam Weinig.

Source/WebCore:

ScrollableArea::usesCompositedScrolling() meant "uses aysnc scrolling", but
FrameView::contentsInCompositedLayer() covered a related concept, that scrolling
happens by moving compositing layers around.

Make the difference between these more explicit by adding ScrollableArea::usesAsyncScrolling(),
which means that scrolling for that ScrollableArea is asynchronous and managed
by a ScrollingCoordinator. This is the meaning that ScrollingCoordinator::computeNonFastScrollableRegion()
understands.

ScrollableArea::usesCompositedScrolling() is now repurposed to mean "scrolling
occurs by moving layers around, not requiring repaint". FrameView::contentsInCompositedLayer()
is renamed to usesCompositedScrolling(), and overrides the base class function.

This only changes behavior in tests that call setScrollingTreeIncludesFrames(true).

  • page/FrameView.cpp:

(WebCore::FrameView::useSlowRepaints):
(WebCore::FrameView::usesCompositedScrolling):
(WebCore::FrameView::usesAsyncScrolling):
(WebCore::FrameView::scrollContentsFastPath):
(WebCore::FrameView::scrollContentsSlowPath):
(WebCore::FrameView::contentsInCompositedLayer): Deleted.

  • page/FrameView.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::usesAsyncScrolling):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::usesAsyncScrolling):

  • rendering/RenderLayer.h:

LayoutTests:

Rebaseline tests that call setScrollingTreeIncludesFrames(true), where those subframes
are now excluded from the non-fast scrollable region.

  • platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
  • platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:
  • platform/mac-wk2/tiled-drawing/scrolling/frames/fixed-inside-frame-expected.txt:
10:16 AM Changeset in webkit [182344] by youenn.fablet@crf.canon.fr
  • 8 edits in trunk

[Streams API] Collecting a ReadableStreamReader should not unlock its stream
https://bugs.webkit.org/show_bug.cgi?id=143333

Reviewed by Benjamin Poulain.

Source/WebCore:

This patch stores as a boolean whether the stream is locked to a reader.
In case the reader forget to unlock the stream, the reader can be collected and destructor called.
In that case, the link between reader and stream will be reset but the stream will remain in locked state.

Covered by new test in streams/readablestreamreader-constructor.html.

  • Modules/streams/ReadableStream.h:

(WebCore::ReadableStream::isLocked):
(WebCore::ReadableStream::lock):
(WebCore::ReadableStream::release):
(WebCore::ReadableStream::releaseButKeepLocked): Introduced to cut the link between reader and stream but stil keeping the stream locked.

  • Modules/streams/ReadableStreamReader.cpp:

(WebCore::ReadableStreamReader::~ReadableStreamReader):

  • bindings/js/JSReadableStreamCustom.cpp:

(WebCore::JSReadableStream::getReader):

  • bindings/js/JSReadableStreamReaderCustom.cpp:

(WebCore::constructJSReadableStreamReader):

LayoutTests:

  • streams/readablestreamreader-constructor-expected.txt:
  • streams/readablestreamreader-constructor.html:
7:32 AM Changeset in webkit [182343] by Yusuke Suzuki
  • 16 edits
    5 adds in trunk

Implement ES6 Object.getOwnPropertySymbols
https://bugs.webkit.org/show_bug.cgi?id=141106

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This patch implements Object.getOwnPropertySymbols.
One technical issue is that, since we use private symbols (such as @Object) in the
privileged JS code in builtins/, they should not be exposed.
To distinguish them from the usual symbols, check the target StringImpl* is a not private name
before adding it into PropertyNameArray.

To check the target StringImpl* is a private name, we leverage privateToPublic map in BuiltinNames
since all private symbols are held in this map.

  • builtins/BuiltinExecutables.cpp:

(JSC::BuiltinExecutables::createExecutableInternal):

  • builtins/BuiltinNames.h:

(JSC::BuiltinNames::isPrivateName):

  • runtime/CommonIdentifiers.cpp:

(JSC::CommonIdentifiers::isPrivateName):

  • runtime/CommonIdentifiers.h:
  • runtime/EnumerationMode.h:

(JSC::EnumerationMode::EnumerationMode):
(JSC::EnumerationMode::includeSymbolProperties):

  • runtime/ExceptionHelpers.cpp:

(JSC::createUndefinedVariableError):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSLexicalEnvironment.cpp:

(JSC::JSLexicalEnvironment::getOwnNonIndexPropertyNames):

  • runtime/JSSymbolTableObject.cpp:

(JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):

  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructor::finishCreation):
(JSC::objectConstructorGetOwnPropertySymbols):
(JSC::defineProperties):
(JSC::objectConstructorSeal):
(JSC::objectConstructorFreeze):
(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):

  • runtime/ObjectConstructor.h:

(JSC::ObjectConstructor::create):

  • runtime/Structure.cpp:

(JSC::Structure::getPropertyNamesFromStructure):

  • tests/stress/object-get-own-property-symbols-perform-to-object.js: Added.

(compare):

  • tests/stress/object-get-own-property-symbols.js: Added.

(forIn):

  • tests/stress/symbol-define-property.js: Added.

(testSymbol):

  • tests/stress/symbol-seal-and-freeze.js: Added.
  • tests/stress/symbol-with-json.js: Added.

LayoutTests:

  • js/Object-getOwnPropertyNames-expected.txt:
  • js/script-tests/Object-getOwnPropertyNames.js:

Apr 3, 2015:

11:08 PM Changeset in webkit [182342] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

MediaDevices possesses a vtable despite using ImplementationLacksVTable IDL attribute
https://bugs.webkit.org/show_bug.cgi?id=143367

Reviewed by Eric Carlson.

  • Modules/mediastream/MediaDevices.idl: MediaDevices ends up with a vtable

because of inheriting from ContextDestructionObserver. This collides with
the ImplementationLacksVTable IDL attribute, causing compilation errors
with Clang. Since MediaDevices isn't being inherited from, but will still
end up with a vtable, the IDL attribute should be removed.

6:55 PM Changeset in webkit [182341] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

Attempted build fix.

  • UIProcess/API/mac/WKView.mm:
5:42 PM Changeset in webkit [182340] by Simon Fraser
  • 2 edits in trunk/Source/WebKit2

Fix the firing of the ReachedSessionRestorationRenderTreeSizeThreshold milestone on iOS
https://bugs.webkit.org/show_bug.cgi?id=143394

Reviewed by Tim Horton.

A client reshuffle at some point broke the dispatch of the ReachedSessionRestorationRenderTreeSizeThreshold
milestone. Fix by using WebPageProxy::didLayout() to fire the milestone.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didCommitLayerTree):

5:07 PM Changeset in webkit [182339] by timothy_horton@apple.com
  • 4 edits in trunk/LayoutTests

fast/fixed-layout/fixed-layout.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=143379

Reviewed by Simon Fraser.

Un-flakify the fixed layout test.

  • fast/css-grid-layout/flex-content-sized-columns-resize-expected.html:

Remove a mistaken line in the original test; this function doesn't exist in WebKit
and was presumably ported directly from the Blink test (and then never noticed because
JS exceptions thrown in -expected files go nowhere).

  • fast/fixed-layout/fixed-layout.html:

Make the fixed layout test less racy by waiting for the resize event (which can be
very asynchronous). Also, force a layout before resizing to ensure that we
always do get a resize event.

4:52 PM Changeset in webkit [182338] by Beth Dakin
  • 8 edits in trunk/Source/WebKit2

https://bugs.webkit.org/show_bug.cgi?id=143387
Improvements to webkitmouseforce web API
-and corresponding-
rdar://problem/20281808
rdar://problem/20281853

Reviewed by Darin Adler.

This patch:

  1. Dispatches webkitmouseforceup and webkitmouseforceclick at the right time.
  2. Dispatches webkitmouseforcechanged from mousedown all the way through through

mouseup.

  1. Uses force values from pressureChangeWithEvent instead of the immediate action

gesture recognizer.

Listen for this NSResponder method, and pass the relevant info to WebPageProxy to
dispatch to the web process.

  • UIProcess/API/mac/WKView.mm:

(-[WKView pressureChangeWithEvent:]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::inputDeviceForceDidChange):
(WebKit::WebPageProxy::immediateActionDidUpdate):

  • UIProcess/WebPageProxy.h:

The web process still needs to know when the immediate action gesture recognizer
is updating, but it doesn’t need the force information. That will come from
pressureChangeWithEvent.

  • UIProcess/mac/WKImmediateActionController.mm:

(-[WKImmediateActionController immediateActionRecognizerDidUpdateAnimation:]):

Cache m_lastForceStage so that we can determine if we are
transitioning to a new stage.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage):

  • WebProcess/WebPage/WebPage.h:

New message for InputDeviceForceDidChange and modified message for
ImmediateActionDidUpdate

  • WebProcess/WebPage/WebPage.messages.in:

inputDeviceForceDidChange now takes care of dispatching mouseforcechanged,
mouseforcedown, mouseforceup, and mouseforceclick.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::inputDeviceForceDidChange):

We still need to keep track of the ImmediateActionStages in WebCore::EventHandler
so that we can have the right default behavior on mouseup based on whether or not
that action began and was completed. (In other words, to ensure we don’t navigate
to a link after force clicking it.)
(WebKit::WebPage::immediateActionDidUpdate):
(WebKit::WebPage::immediateActionDidComplete):

3:52 PM Changeset in webkit [182337] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Add Options::jitPolicyScale() as a single knob to make all compilations happen sooner.
<https://webkit.org/b/143385>

Reviewed by Geoffrey Garen.

For debugging purposes, sometimes, we want to be able to make compilation happen
sooner to see if we can accelerate the manifestation of certain events / bugs.
Currently, in order to achieve this, we'll have to tweak multiple JIT thresholds
which make up the compilation policy. Let's add a single knob that can tune all
the thresholds up / down in one go proportionately so that we can easily tweak
how soon compilation occurs.

  • runtime/Options.cpp:

(JSC::scaleJITPolicy):
(JSC::recomputeDependentOptions):

  • runtime/Options.h:
3:18 PM Changeset in webkit [182336] by ggaren@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

is* API methods should be @properties
https://bugs.webkit.org/show_bug.cgi?id=143388

Reviewed by Mark Lam.

This appears to be the preferred idiom in WebKit, CA, AppKit, and
Foundation.

  • API/JSValue.h: Be @properties.
  • API/tests/testapi.mm:

(testObjectiveCAPI): Use the @properties.

2:44 PM Changeset in webkit [182335] by achristensen@apple.com
  • 9 edits in trunk/Source/WebCore

[Content Extensions] Add memory reporting.
https://bugs.webkit.org/show_bug.cgi?id=143386

Reviewed by Benjamin Poulain.

  • contentextensions/CompiledContentExtension.cpp:

(WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):

  • contentextensions/CompiledContentExtension.h:
  • contentextensions/ContentExtension.cpp:

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

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

(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):

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

(WebCore::ContentExtensions::getBits):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):

  • contentextensions/DFABytecodeInterpreter.h:

(WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):
(WebCore::ContentExtensions::DFABytecodeInterpreter::~DFABytecodeInterpreter):
Keep track of which memory pages in the bytecode are being hit if CONTENT_EXTENSIONS_MEMORY_REPORTING is 1.
When CONTENT_EXTENSIONS_MEMORY_REPORTING is 0, this makes an empty vector in ContentExtension
and passes some pointers on the stack, many of which can be optimized out by the C++ compiler.

2:32 PM Changeset in webkit [182334] by Brent Fulgham
  • 10 edits in trunk/Source/WebCore

Expand test infrastructure to support scrolling tests
https://bugs.webkit.org/show_bug.cgi?id=143383

Reviewed by Darin Adler.

No new tests: No change in behavior.

This is an initial set of changes that clean up a few things I noticed while extending testing support
for scroll animations and wheel event gestures.

  1. Reduce the amount of #ifdef code in EventHandler{Mac}.
  2. Consolidate the idea of an "End Gesture" in the PlatformWheelEvent class.
  3. Remove a number of unneeded null checks in EventHandler.
  4. ScrollController must always have a client, so hold a reference instead of using a pointer.
  • page/EventHandler.cpp:

(WebCore::EventHandler::platformNotifyIfEndGesture): Renamed from 'platformNotifySnapIfNecessary'.
(WebCore::EventHandler::handleWheelEvent): Call 'platformNotifySnapIfNecessary' at method exit points.
(WebCore::EventHandler::platformNotifySnapIfNecessary): Deleted.

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

(WebCore::EventHandler::platformCompleteWheelEvent): Remove unneeded null checks for 'view'. Remove
CSS_SNAP-specific call to 'platformNotifySnapIfNecessary'. This logic is now handled in the new
'platformNotifyIfEndGesture' method.
(WebCore::EventHandler::platformNotifyIfEndGesture): Renamed from 'platformNotifySnapIfNecessary'.
(WebCore::EventHandler::platformNotifySnapIfNecessary): Deleted.

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac): Pass 'this' as
reference to ScrollController constructor.

  • platform/PlatformWheelEvent.h:

(WebCore::PlatformWheelEvent::shouldResetLatching): Call new 'isEndGesture' method.
(WebCore::PlatformWheelEvent::isEndGesture): Added method to encapsulate some code that was duplicated
in a number of places.

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::ScrollAnimator): Pass 'this' as reference to ScrollController constructor.

  • platform/cocoa/ScrollController.h:
  • platform/cocoa/ScrollController.mm:

(WebCore::ScrollController::ScrollController): Update to reflect m_client is now a reference.
(WebCore::ScrollController::handleWheelEvent): Ditto.
(WebCore::ScrollController::snapRubberBandTimerFired): Ditto. Also, a drive-by fix for ending rubberband
snapping. This end-state wasn't deactivating the timer (even when the animation finished). This isn't a
huge problem, but I (will) rely on the state of the animation timer in a future patch to decide if
tests should run or continue waiting.
(WebCore::ScrollController::isRubberBandInProgress): Ditto.
(WebCore::ScrollController::startSnapRubberbandTimer): Ditto.
(WebCore::ScrollController::stopSnapRubberbandTimer): Ditto.
(WebCore::ScrollController::shouldRubberBandInHorizontalDirection): Ditto.
(WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Ditto.
(WebCore::ScrollController::startScrollSnapTimer): Ditto.
(WebCore::ScrollController::stopScrollSnapTimer): Ditto.
(WebCore::ScrollController::scrollSnapAnimationUpdate): Ditto.
(WebCore::ScrollController::beginScrollSnapAnimation): Ditto.
(WebCore::ScrollController::computeSnapDelta): Ditto.
(WebCore::ScrollController::computeGlideDelta): Ditto.

  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::gestureShouldBeginSnap): Use new PlatformWheelEvent::isEndGesture() method.

2:21 PM Changeset in webkit [182333] by Chris Fleizach
  • 3 edits
    2 adds in trunk

AX: Toggling check box state not speaking using plain space, not VO space.
https://bugs.webkit.org/show_bug.cgi?id=143356

Reviewed by Darin Adler.

Source/WebCore:

The checkbox state change needs to result in a value change being generated, otherwise accessibility won't know the value has changed through keyboard usage.

Test: platform/mac/accessibility/checkbox-posts-value-change-notification-after-activation-with-space.html

  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXObjectCache::postPlatformNotification):

LayoutTests:

  • platform/mac/accessibility/checkbox-posts-value-change-notification-after-activation-with-space-expected.txt: Added.
  • platform/mac/accessibility/checkbox-posts-value-change-notification-after-activation-with-space.html: Added.
2:20 PM Changeset in webkit [182332] by Csaba Osztrogonác
  • 2 edits in trunk/Tools

run-jsc-stress-tests --remote should add libllvmForJSC.so to the bundle on Linux
https://bugs.webkit.org/show_bug.cgi?id=143372

Reviewed by Darin Adler.

  • Scripts/run-jsc-stress-tests:
2:01 PM Changeset in webkit [182331] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Some JSC Options refactoring and enhancements.
<https://webkit.org/b/143384>

Rubber stamped by Benjamin Poulain.

Create a better encapsulated Option class to make working with options easier. This
is a building block towards a JIT policy scaling debugging option I will introduce later.

This work entails:

  1. Convert Options::Option into a public class Option (who works closely with Options).
  2. Convert Options::EntryType into an enum class Options::Type and make it public.
  3. Renamed Options::OPT_<option name> to Options::<option name>ID because it reads better.
  4. Add misc methods to class Option to make it more useable.
  • runtime/Options.cpp:

(JSC::Options::dumpOption):
(JSC::Option::dump):
(JSC::Option::operator==):
(JSC::Options::Option::dump): Deleted.
(JSC::Options::Option::operator==): Deleted.

  • runtime/Options.h:

(JSC::Option::Option):
(JSC::Option::operator!=):
(JSC::Option::name):
(JSC::Option::description):
(JSC::Option::type):
(JSC::Option::isOverridden):
(JSC::Option::defaultOption):
(JSC::Option::boolVal):
(JSC::Option::unsignedVal):
(JSC::Option::doubleVal):
(JSC::Option::int32Val):
(JSC::Option::optionRangeVal):
(JSC::Option::optionStringVal):
(JSC::Option::gcLogLevelVal):
(JSC::Options::Option::Option): Deleted.
(JSC::Options::Option::operator!=): Deleted.

1:46 PM Changeset in webkit [182330] by rniwa@webkit.org
  • 3 edits in trunk/Websites/perf.webkit.org

Add time series segmentation algorithms as moving averages
https://bugs.webkit.org/show_bug.cgi?id=143362

Reviewed by Chris Dumez.

This patch implements two preliminary time series segmentation algorithms as moving averages.

Recursive t-test: Compute Welch's t-statistic at each point in a given segment of the time series.
If Welch's t-test implicates a statistically significance difference, then split the segment into two
sub segments with the maximum t-statistic (i.e. the point at which if split would yield the highest
probability that two segments do not share the same "underlying" mean in classical / frequentist sense).
We repeat this process recursively. See [1] for the evaluation of this particular algorithm.

Schwarz criterion: Use Schwarz or Bayesian information criterion to heuristically find the optimal
segmentation. Intuitively, the problem of finding the best segmentation comes down to minimizing the
residual sum of squares in each segment as in linear regressions. That is, for a given segment with
values y_1 through y_n with mean y_avg, we want to minimize the sum of (y_i - y_avg)2 over i = 1
through i = n. However, we also don't want to split every data point into a separate segment so we need
to account the "cost" of introducing new segments. We use a cost function that's loosely based on two
models discussed in [2] for simplicity. We will tune this cost function further in the future.

The problem of finding the best segmentation then reduces to a search problem. Unfortunately, our problem
space is exponential with respect to the size of the time series since we could split at each data point.
We workaround this problem by first splitting the time series into a manageable smaller grids, and only
considering segmentation of a fixed size (i.e. the number of segments is constant). Since time series
tend to contain a lot more data points than segments, this strategy finds the optimal solution without
exploring much of the problem space.

Finding the optimal segmentation of a fixed size is, itself, another search problem that is equivalent to
finding the shortest path of a fixed length in DAG. Here, we use dynamic programming with a matrix of size
n by n where n is the length of the time series (grid). Each entry in this matrix at (i, k) stores
the minimum cost of segmenting data points 1 through i using k segments. We start our search at i = 1.
Clearly C(1, 0) = 0 (note the actual code uses 0-based index). In i-th iteration, we compute the cost
S(i, j) of each segment starting at i and ending at another point j after i and update C(j, k + 1) by
min( C(j, k + 1), C(i, k) + S(i, j) ) for all values of j above i.

[1] Kensuke Fukuda, H. Eugene Stanley, and Luis A. Nunes Amaral, "Heuristic segmentation of
a nonstationary time series", Physical Review E 69, 021108 (2004)

[2] Marc Lavielle, Gilles Teyssi`ere, "Detection of Multiple Change–Points in Multivariate Time Series"
Lithuanian Mathematical Journal, vol 46, 2006

  • public/v2/index.html: Show the optional description for the chosen moving average strategy.
  • public/v2/js/statistics.js:

(Statistics.testWelchsT):
(Statistics.computeWelchsT): Extracted from testWelchsT. Generalized to take the offset and the length
of each value array between which Welch's t-statistic is computed. This generalization helps the
Schwarz criterion segmentation algorithm avoid splitting values array O(n2) times.
(.sampleMeanAndVarianceForValues): Ditto for the generalization.
(.recursivelySplitIntoTwoSegmentsAtMaxTIfSignificantlyDifferent): Added. Implements recursive t-test.
(.splitIntoSegmentsUntilGoodEnough): Added. Implements Schwarz criterion.
(.findOptimalSegmentation): Added. Implements the algorithm to find the optimal segmentation of a fixed
segment count.
(.SampleVarianceUpperTriangularMatrix): Added. Stores S(i, j) used by findOptimalSegmentation.
(.SampleVarianceUpperTriangularMatrix.prototype.costBetween): Added.

1:43 PM Changeset in webkit [182329] by rniwa@webkit.org
  • 4 edits in trunk/Websites/perf.webkit.org

REGRESSION: Perf dashboard sometimes fails to update zooming level
https://bugs.webkit.org/show_bug.cgi?id=143359

Reviewed by Darin Adler.

The bug was caused by various bugs that ended up in an exception.

  • public/v2/app.js:

(App.Pane._handleFetchErrors): Removed superfluous console.log.
(App.Pane.computeStatus): Fixed the bug in r182185 that previousPoint could be null.
(App.PaneController.actions.zoomed): Update the overview when the main chart triggered a zoom.

  • public/v2/index.html: Replaced all instances of href="#" by href="javascript:false" to avoid navigating

to # when Ember.js fails to attach event listeners on time.

  • public/v2/interactive-chart.js:

(App.InteractiveChartComponent._updateDimensionsIfNeeded): Avoid using a negative width or height when
the containing element's size is 0.
(App.InteractiveChartComponent._updateBrush): Ditto.

1:16 PM Changeset in webkit [182328] by ggaren@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

2015-04-03 Geoffrey Garen <ggaren@apple.com>

JavaScriptCore API should support type checking for Array and Date
https://bugs.webkit.org/show_bug.cgi?id=143324

Follow-up to address a comment by Dan.

  • API/WebKitAvailability.h: MAC_OS_X_VERSION_MIN_REQUIRED <= 101100 is wrong, since this API is available when MAC_OS_X_VERSION_MIN_REQUIRED is equal to 101100.
1:12 PM Changeset in webkit [182327] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit2

InjectedBundleNodeHandle::renderedImage() needs to be exposed from the Cocoa WebAPI layer.
https://bugs.webkit.org/show_bug.cgi?id=143341.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-04-03
Reviewed by Anders Carlsson.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:

(-[WKWebProcessPlugInNodeHandle renderedImageWithOptions:]): Expose rendered
image injected bundle API from the Cocoa layer. A node in the page can be
rendered to an NSImage on MacOS and to a UIImage on iOS.

11:49 AM Changeset in webkit [182326] by Csaba Osztrogonác
  • 2 edits in trunk

Unreviewed, kick the GTK bots to fix an incremental build issue.

  • Source/cmake/OptionsGTK.cmake:
11:27 AM Changeset in webkit [182325] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Simple line layout: Use pre-computed simple line runs to produce innerText content.
https://bugs.webkit.org/show_bug.cgi?id=143351

Reviewed by Antti Koivisto.

This is in preparation to cover <br> with simple line layout.
Runs provide line layout information that can be used to cover hard line break cases.
(similar to TextIterator::handleTextBox())

Covered by existing tests.

  • editing/TextIterator.cpp:

(WebCore::TextIterator::handleTextNode):
(WebCore::TextIterator::emitCharacter):
(WebCore::TextIterator::emitText):

  • editing/TextIterator.h:
  • rendering/SimpleLineLayoutResolver.h:

(WebCore::SimpleLineLayout::RunResolver::Run::isEndOfLine):

10:55 AM Changeset in webkit [182324] by ggaren@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

2015-04-03 Geoffrey Garen <ggaren@apple.com>

JavaScriptCore API should support type checking for Array and Date
https://bugs.webkit.org/show_bug.cgi?id=143324

Follow-up to address a comment by Dan.

  • API/WebKitAvailability.h: Do use 10.0 because it was right all along. Added a comment explaining why.
10:54 AM Changeset in webkit [182323] by Chris Dumez
  • 9 edits
    2 moves in trunk/Source/WebKit2

[WK2][iOS] We should prevent NetworkProcess suspension while it has pending SQL transactions
https://bugs.webkit.org/show_bug.cgi?id=143278
<rdar://problem/20180799>

Reviewed by Anders Carlsson.

Prevent NetworkProcess suspension while it has pending SQL transactions,
similarly to what we already did for WebProcesses. This patch moves the
WebSQLiteDatabaseTracker from WebProcess/ to Shared/ and make it usable
by the NetworkProcess class as well.

Whenever there are locked files to due SQL transactions, the
NetworkProcess will send an IPC message to the NetworkProcessProxy
which will hold a background process assertion until the NetworkProcess'
SQL transactions are complete. This way, it is no longer possible for
the NetworkProcess to get suspended while SQL transactions are running
and a database file is locked.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):

  • NetworkProcess/NetworkProcess.h:
  • Shared/WebSQLiteDatabaseTracker.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp.

(WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
(WebKit::m_childProcessType):
(WebKit::WebSQLiteDatabaseTracker::willBeginFirstTransaction):
(WebKit::WebSQLiteDatabaseTracker::didFinishLastTransaction):
(WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated):

  • Shared/WebSQLiteDatabaseTracker.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h.
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didClose):
(WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeConnection):

  • WebProcess/WebProcess.h:
10:24 AM Changeset in webkit [182322] by ap@apple.com
  • 2 edits in trunk/LayoutTests

Re-skip tests that got recently enabled, but time out.

  • platform/mac-wk2/TestExpectations:
10:23 AM Changeset in webkit [182321] by Antti Koivisto
  • 9 edits
    1 add in trunk

Source/WebCore:
Add non-counting bloom filter class
https://bugs.webkit.org/show_bug.cgi?id=143366

Reviewed by Sam Weinig.

  • css/SelectorFilter.cpp:

(WebCore::SelectorFilter::setupParentStack):

  • css/SelectorFilter.h:

Update names.

Source/WebKit2:
Add non-counting Bloom filter implementation
https://bugs.webkit.org/show_bug.cgi?id=143366

Reviewed by Sam Weinig.

  • NetworkProcess/cache/NetworkCacheStorage.h:

Source/WTF:
Add non-counting Bloom filter implementation
https://bugs.webkit.org/show_bug.cgi?id=143366

Reviewed by Sam Weinig.

Add a traditional single-bit-per-bucket Bloom filter in addition to the existing counting implementation.

  • wtf/BloomFilter.h:

(WTF::BloomFilter::BloomFilter):
(WTF::BloomFilter::add):

Also support merging.

(WTF::BloomFilter::mayContain):
(WTF::BloomFilter::arrayIndex):
(WTF::BloomFilter::bitMask):
(WTF::BloomFilter<keyBits>::mayContain):
(WTF::BloomFilter<keyBits>::add):
(WTF::BloomFilter<keyBits>::isBitSet):
(WTF::BloomFilter<keyBits>::setBit):
(WTF::BloomFilter<keyBits>::clear):
(WTF::CountingBloomFilter::CountingBloomFilter):
(WTF::CountingBloomFilter::mayContain):
(WTF::CountingBloomFilter::firstBucket):
(WTF::CountingBloomFilter::secondBucket):
(WTF::CountingBloomFilter<keyBits>::add):
(WTF::CountingBloomFilter<keyBits>::remove):
(WTF::CountingBloomFilter<keyBits>::clear):
(WTF::CountingBloomFilter<keyBits>::likelyEmpty):
(WTF::CountingBloomFilter<keyBits>::isClear):
(WTF::BloomFilter::maximumCount): Deleted.
(WTF::BloomFilter::firstSlot): Deleted.
(WTF::BloomFilter::secondSlot): Deleted.
(WTF::BloomFilter<keyBits>::remove): Deleted.
(WTF::BloomFilter<keyBits>::likelyEmpty): Deleted.
(WTF::BloomFilter<keyBits>::isClear): Deleted.

Tools:
Add non-counting bloom filter class
https://bugs.webkit.org/show_bug.cgi?id=143366

Reviewed by Sam Weinig.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/BloomFilter.cpp: Added.

(TestWebKitAPI::generateRandomHashes):
(TestWebKitAPI::TEST):

9:46 AM Changeset in webkit [182320] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

Remove dead code.
https://bugs.webkit.org/show_bug.cgi?id=143352

Patch by Alex Christensen <achristensen@webkit.org> on 2015-04-03
Reviewed by Gyuyoung Kim.

  • html/BaseChooserOnlyDateAndTimeInputType.cpp:

(WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):

  • loader/EmptyClients.cpp:

(WebCore::EmptyChromeClient::openDateTimeChooser): Deleted.

  • loader/EmptyClients.h:
  • page/Chrome.cpp:

(WebCore::Chrome::openDateTimeChooser): Deleted.

  • page/Chrome.h:
  • page/ChromeClient.h:

Remove ChromeClient::openDateTimeChooser.

9:38 AM Changeset in webkit [182319] by ap@apple.com
  • 2 edits in trunk/LayoutTests

fast/fixed-layout/fixed-layout.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=143379

9:01 AM Changeset in webkit [182318] by Csaba Osztrogonác
  • 5 edits in trunk

FTL JIT tests should fail if LLVM library isn't available
https://bugs.webkit.org/show_bug.cgi?id=143374

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThreadImpl):

  • runtime/Options.h:

Tools:

  • Scripts/run-jsc-stress-tests:
5:52 AM Changeset in webkit [182317] by Csaba Osztrogonác
  • 2 edits in trunk/Tools

[EFL] Speedup jhbuild with disable running autogen.sh
https://bugs.webkit.org/show_bug.cgi?id=143369

Reviewed by Gyuyoung Kim.

  • efl/jhbuild.modules:
5:30 AM Changeset in webkit [182316] by Csaba Osztrogonác
  • 3 edits in trunk/LayoutTests

[WK2] Unskip now passing tests after r135595
https://bugs.webkit.org/show_bug.cgi?id=127428

Unreviewed gardening.

  • platform/mac-wk2/TestExpectations: Mark editing/selection/context-menu-text-selection.html as timeouting test.
  • platform/wk2/TestExpectations: Unskip now passing tests.
5:23 AM Changeset in webkit [182315] by zandobersek@gmail.com
  • 6 edits in trunk

Fix the EFL and GTK build after r182243
https://bugs.webkit.org/show_bug.cgi?id=143361

Reviewed by Csaba Osztrogonác.

.:

  • Source/PlatformEfl.cmake: Add a custom command that copies

the InspectorBackendCommands.js file into the proper directory
under DerivedSources/WebInspectorUI/.

Source/JavaScriptCore:

  • CMakeLists.txt: InspectorBackendCommands.js is generated in the

DerivedSources/JavaScriptCore/inspector/ directory.

Source/WebKit2:

  • PlatformGTK.cmake: Add a custom command that copies the

InspectorBackendCommands.js file into the proper directory
under DerivedSources/WebInspectorUI/.

5:20 AM Changeset in webkit [182314] by zandobersek@gmail.com
  • 4 edits in trunk/Source

Unreviewed, fixing Clang builds of the GTK port on Linux.

Source/JavaScriptCore:

  • runtime/Options.cpp:

Include the <math.h> header for isnan().

Source/WebCore:

  • Modules/mediastream/MediaDevices.h:

Include the <functional> header for uses of std::function<>.

4:23 AM Changeset in webkit [182313] by Csaba Osztrogonác
  • 2 edits in trunk/LayoutTests

[EFL] Fix 18 crashing compositing tests after r182101
https://bugs.webkit.org/show_bug.cgi?id=143214

Unreviewed gardening, comment out the original expectations after r182311.

  • platform/efl/TestExpectations:
3:55 AM Changeset in webkit [182312] by Csaba Osztrogonác
  • 2 edits in trunk/LayoutTests

[EFL] Fix 18 crashing compositing tests after r182101
https://bugs.webkit.org/show_bug.cgi?id=143214

Unreviewed gardening, add crash expectations until proper fix.

  • platform/efl/TestExpectations:
3:27 AM Changeset in webkit [182311] by Csaba Osztrogonác
  • 2 edits in trunk/LayoutTests

Unreviewed gardening. Skip fast/fixed-layout, because it made the following tests fail.

  • platform/efl/TestExpectations:
2:17 AM Changeset in webkit [182310] by Philippe Normand
  • 4 edits in trunk/Source/WebKit2

Unreviewed, GTK build fix.

  • UIProcess/API/gtk/WebKitContextMenuClient.cpp:
  • UIProcess/gtk/WebContextMenuProxyGtk.cpp:
  • UIProcess/gtk/WebContextMenuProxyGtk.h:
1:07 AM Changeset in webkit [182309] by youenn.fablet@crf.canon.fr
  • 10 edits in trunk/Source/WebCore

[Streams API] Split ReadableStream/Reader implementation according source type (JS vs native)
https://bugs.webkit.org/show_bug.cgi?id=143130

Reviewed by Benjamin Poulain.

Introduce ReadableJSStream and ReadableJSStreamReader as subclasses of ReadableStream and ReadableStreamReader.
These classes manage JS based sources: ReadableStream JS constructor instantiates ReadableJStream.
These classes are expected to handle JS source specific handling, in particular JSValue error storage and JSValue chunk queue.
Making ReadableStream and ReadableStreamReader abstract, to be subclassed for native sources.

Current tests cover the changes.

  • Modules/streams/ReadableStream.cpp:

(WebCore::ReadableStream::ReadableStream): Moved suspendIfNeeded inside constructor to ease subclassing.
(WebCore::ReadableStream::create): Deleted as ReadableStream is now abstarct.

  • Modules/streams/ReadableStream.h: Made createReader virtual pure.
  • Modules/streams/ReadableStream.idl: Skipping VTable validation as subclasses of ReadableStream may be JS wrapped.
  • Modules/streams/ReadableStreamReader.cpp: Removed ReadableStreamReader::create.
  • Modules/streams/ReadableStreamReader.h: Ditto.
  • Modules/streams/ReadableStreamReader.idl: Skipping VTable validation as subclasses of ReadableStreamReader may be JS wrapped.
  • bindings/js/JSReadableStreamCustom.cpp:

(WebCore::constructJSReadableStream): Instantiating ReadableJSStream in lieu of ReadableStream within JS constructor.

  • bindings/js/ReadableStreamJSSource.cpp:

(WebCore::ReadableJSStream::create):
(WebCore::ReadableJSStream::createReader): Instantiating ReadableJSStreamReader.
(WebCore::ReadableJSStream::ReadableJSStream):
(WebCore::ReadableJSStreamReader::create):
(WebCore::ReadableJSStreamReader::ReadableJSStreamReader):

  • bindings/js/ReadableStreamJSSource.h: Definition of ReadableJSStream and ReadableJSStreamReader.
Note: See TracTimeline for information about the timeline view.