WebKit-https.git
6 years agoCodeBlock crashes when dumping op_push_name_scope
benjamin@webkit.org [Wed, 25 Feb 2015 22:32:58 +0000 (22:32 +0000)]
CodeBlock crashes when dumping op_push_name_scope
https://bugs.webkit.org/show_bug.cgi?id=141953

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-02-25
PerformanceTests/SunSpider:

Reviewed by Filip Pizlo.

* profiler-test.yaml:

Source/JavaScriptCore:

Reviewed by Filip Pizlo and Csaba Osztrogonác.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* tests/stress/op-push-name-scope-crashes-profiler.js: Added.

Tools:

Reviewed by Filip Pizlo.

* Scripts/run-jsc-stress-tests:

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

6 years agoTest gardening
mmaxfield@apple.com [Wed, 25 Feb 2015 22:32:45 +0000 (22:32 +0000)]
Test gardening

Unreviewed.

Getting the bots green after r180633 until Brady fixes the underlying issue.

* platform/mac-wk2/TestExpectations:

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

6 years agoMake ParserError immutable by design
benjamin@webkit.org [Wed, 25 Feb 2015 22:29:26 +0000 (22:29 +0000)]
Make ParserError immutable by design
https://bugs.webkit.org/show_bug.cgi?id=141955

Reviewed by Geoffrey Garen.

This patch enforce that no field of ParserError can
be modified after the constructor.

* parser/ParserError.h:
Move the attributes to pack the integer + 2 bytes together.
This is irrelevant for memory impact, it is to remve a load-store
when copying by value.

Also move the attributes to be private.

(JSC::ParserError::isValid):
To client of the interface cared about the type of the error,
the only information needed was: is there an error.

(JSC::ParserError::ParserError):
(JSC::ParserError::syntaxErrorType):
(JSC::ParserError::token):
(JSC::ParserError::message):
(JSC::ParserError::line):
(JSC::ParserError::toErrorObject):
* API/JSScriptRef.cpp:
* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createBuiltinExecutable):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::fromGlobalCode):
(JSC::UnlinkedFunctionExecutable::codeBlockFor):
* bytecode/UnlinkedCodeBlock.h:
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::parse):
* jsc.cpp:
(runInteractive):
* parser/Parser.h:
(JSC::parse):
* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getFunctionExecutableFromGlobalCode):
* runtime/CodeCache.h:
* runtime/Completion.h:
* runtime/Executable.cpp:
(JSC::ProgramExecutable::checkSyntax):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::createProgramCodeBlock):
(JSC::JSGlobalObject::createEvalCodeBlock):

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

6 years agoGet rid of TestInvocation::pathOrURL
beidson@apple.com [Wed, 25 Feb 2015 21:27:37 +0000 (21:27 +0000)]
Get rid of TestInvocation::pathOrURL
https://bugs.webkit.org/show_bug.cgi?id=142021

Reviewed by Tim Horton.

The pathOrURL string is a relative path used as an argument to WebKitTestRunner,
but most code that uses it expected an absolute path.

This gets rid of the member and replaces all uses with a more descriptive "urlContains" method.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::updateWebViewSizeForTest):
(WTR::TestController::updateWindowScaleForTest):
(WTR::shouldUseFixedLayout):
(WTR::TestController::updateLayoutTypeForTest):

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::TestInvocation):
(WTR::TestInvocation::urlContains):
(WTR::TestInvocation::shouldLogFrameLoadDelegates):
(WTR::TestInvocation::shouldLogHistoryClientCallbacks):
(WTR::TestInvocation::invoke):
(WTR::shouldLogFrameLoadDelegates): Deleted.
(WTR::shouldLogHistoryClientCallbacks): Deleted.
* WebKitTestRunner/TestInvocation.h:
(WTR::TestInvocation::pathOrURL): Deleted.

* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::shouldMakeViewportFlexible):
(WTR::TestController::platformConfigureViewForTest):

* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::shouldUseThreadedScrolling):
(WTR::TestController::platformConfigureViewForTest):

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

6 years agoW3C test importer should use argparse instead of optparse
youenn.fablet@crf.canon.fr [Wed, 25 Feb 2015 21:05:34 +0000 (21:05 +0000)]
W3C test importer should use argparse instead of optparse
https://bugs.webkit.org/show_bug.cgi?id=142013

Reviewed by Bem Jones-Bey.

* Scripts/webkitpy/w3c/test_importer.py:
(main): Updating according argparse.
(parse_args): Moving from optparse to argparse.

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

6 years agoREGRESSION (r180018 ): Holding a rubber-band in place can get stuck
bdakin@apple.com [Wed, 25 Feb 2015 20:54:35 +0000 (20:54 +0000)]
REGRESSION (r180018 ): Holding a rubber-band in place can get stuck
https://bugs.webkit.org/show_bug.cgi?id=142020
-and corresponding-
rdar://problem/19945216

Reviewed by Tom Horton.

It was a mistaken assumption that it was necessary to return false in the zero-
delta case. That is clearly conceptually wrong since false represents the DOM
doing something special with the event, which is clearly not the case if we never
even send the event to the DOM. Returning true will allow the rest of the
scrolling machinery the ability to handle the event.
* dom/Element.cpp:
(WebCore::Element::dispatchWheelEvent):

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

6 years agoLayout test support for user content filters
beidson@apple.com [Wed, 25 Feb 2015 20:42:28 +0000 (20:42 +0000)]
Layout test support for user content filters
https://bugs.webkit.org/show_bug.cgi?id=142018

Reviewed by Tim Horton.

Tools:

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues): Clear all user content filters between tests.

* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformConfigureViewForTest): For all tests with usercontentfilter/ in their path try to load a matching .json
  file before loading the test itself.

LayoutTests:

* TestExpectations:
* http/tests/usercontentfilter/basic-filter.html: Added.
* http/tests/usercontentfilter/basic-filter.html.json: Added.
* platform/mac-wk2/TestExpectations:

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

6 years agoAdd (unused for now) code to delete website data for a set of origins
andersca@apple.com [Wed, 25 Feb 2015 18:56:48 +0000 (18:56 +0000)]
Add (unused for now) code to delete website data for a set of origins
https://bugs.webkit.org/show_bug.cgi?id=142019

Reviewed by Beth Dakin.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::~WebProcessProxy):
Assert that there are no pending callbacks.

(WebKit::WebProcessProxy::connectionDidClose):
Invoke all the didDeleteWebsiteDataForOrigins callbacks.

(WebKit::WebProcessProxy::didDeleteWebsiteDataForOrigins):
Grab the didDeleteWebsiteDataForOrigins and invoke it.

(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
Add the pending callback and send a DeleteWebsiteDataForOrigins to the web process.

* UIProcess/WebProcessProxy.h:
Add new members.

* UIProcess/WebProcessProxy.messages.in:
Add a DidDeleteWebsiteDataForOrigins message.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::deleteWebsiteDataForOrigins):
For now, just send back a DidDeleteWebsiteDataForOrigins message.

* WebProcess/WebProcess.h:
Add new members.

* WebProcess/WebProcess.messages.in:
Add a DeleteWebsiteDataForOrigins message.

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

6 years agoHTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for conten...
rniwa@webkit.org [Wed, 25 Feb 2015 18:42:04 +0000 (18:42 +0000)]
HTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for contentEditableAttr
https://bugs.webkit.org/show_bug.cgi?id=142003

Reviewed by Sam Weinig.

Utilized contentEditableType to reduce the code duplication.

* html/HTMLElement.cpp:
(WebCore::contentEditableType): Moved and added a version that takes AtomicString.
(WebCore::HTMLElement::collectStyleForPresentationAttribute):

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

6 years agoFix build warning in WebKit2/UIProcess module.
shiva.jm@samsung.com [Wed, 25 Feb 2015 17:43:40 +0000 (17:43 +0000)]
Fix build warning in WebKit2/UIProcess module.
https://bugs.webkit.org/show_bug.cgi?id=142014

Reviewed by Anders Carlsson.

Fix build warning by using UNUSED_PARAM macro.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeWebProcessAccessTypeForDataFetch):

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

6 years ago[Win] Skip new <attachment> test since it's not working on Windows.
bfulgham@apple.com [Wed, 25 Feb 2015 17:35:39 +0000 (17:35 +0000)]
[Win] Skip new <attachment> test since it's not working on Windows.

* platform/win/TestExpectations:

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

6 years ago[Win] Skip ARIA 1.1 tests for unsupported feature.
bfulgham@apple.com [Wed, 25 Feb 2015 17:26:30 +0000 (17:26 +0000)]
[Win] Skip ARIA 1.1 tests for unsupported feature.

* platform/win/TestExpectations:

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

6 years agoVersioning.
bshafiei@apple.com [Wed, 25 Feb 2015 16:18:35 +0000 (16:18 +0000)]
Versioning.

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

6 years agoWeb Inspector: Improve Regex/Error output in Object Tree and Previews
commit-queue@webkit.org [Wed, 25 Feb 2015 15:10:04 +0000 (15:10 +0000)]
Web Inspector: Improve Regex/Error output in Object Tree and Previews
https://bugs.webkit.org/show_bug.cgi?id=142010

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

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView):
(WebInspector.ObjectPreviewView.prototype._initTitleElement):
Since some object types may be formatted as simple values, ensure they get
the formatted style even in the title view.

(WebInspector.ObjectPreviewView.prototype._appendPreview):
Those object types that can be formatted as simple values should skip
to the value formatting phase.

(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
Do not show property previews for error objects. Always assume lossy
so that it can be expanded.

* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView):
Make a similiar improvement for ObjectTree titles when previews are
unavailable. This will make dir(value) show a stylized value in the
title of the Object Tree.

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

6 years agoWeb Inspector: Improve PropertyPath display strings for getters / values
commit-queue@webkit.org [Wed, 25 Feb 2015 15:03:48 +0000 (15:03 +0000)]
Web Inspector: Improve PropertyPath display strings for getters / values
https://bugs.webkit.org/show_bug.cgi?id=142008

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

* UserInterface/Base/Utilities.js:
(doubleQuotedString):
Helper to double quote a string and escape double quotes with-in it.

* UserInterface/Models/PropertyPath.js:
(WebInspector.PropertyPath.prototype.get reducedPath):
Compute the path eliminating unnecessary __proto__s. Note we don't
property handle the case where a .__proto__.x is override earlier
by a .x, but that case is rare.

(WebInspector.PropertyPath.prototype.displayPath):
Helper for choosing fullPath or reducedPath display strings.

(WebInspector.PropertyPath.prototype.appendPropertyName):
(WebInspector.PropertyPath.prototype.appendGetterPropertyName):
(WebInspector.PropertyPath.prototype.appendSetterPropertyName):
(WebInspector.PropertyPath.prototype.appendPropertyDescriptor):
When appending a descriptor, specify if it is for a getter/setter or value.
For getters / setters the actual function can be directly fetched via
__lookupGetter__/__lookupSetter__. Continue to use the property name for values.

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForTypesAndValue):

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._propertyPathType):
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath):
(WebInspector.ObjectTreePropertyTreeElement.prototype._thisPropertyPath):
(WebInspector.ObjectTreePropertyTreeElement.prototype):

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

6 years ago[CSS Grid Layout] Tracks growing beyond limits when they should not
svillar@igalia.com [Wed, 25 Feb 2015 10:53:57 +0000 (10:53 +0000)]
[CSS Grid Layout] Tracks growing beyond limits when they should not
https://bugs.webkit.org/show_bug.cgi?id=140883

Reviewed by Darin Adler.

Source/WebCore:

Our track sizing algorithm implementation incorrectly grew some
tracks beyond limits when handling min-content and max-content
base sizes. In those cases we should only grow "any affected track
that happens to also have an intrinsic max track sizing function"
or all of them if there are none.

The problem was that we're using a vector of indexes pointing to
the vector with the list of affected tracks. Those indexes become
easily incorrect because the first thing we do in
distributeSpaceToTracks() is to sort the vector with the affected
tracks by growth potential.

Instead of that we now pass a vector with pointers to the list of
tracks allowed to grow over the limits. The size changes are now
directly stored in the GridTracks (it's called plannedSize)
instead of in a separate vector, so we don't need to worry about
tracks being rearranged (and we also get rid of the ugly vector of
indexes pointing to another vector).

* rendering/RenderGrid.cpp:
(WebCore::GridTrack::plannedSize): New member with getter/setter.
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
Pass a setXXX() function instead of a growXXX() one to ForItems().
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
Renamed additionalBreadthSpace to extraSpace which is the term
used by specs.
(WebCore::RenderGrid::distributeSpaceToTracks): Use GridTrack's
plannedSize instead of the old distribution vector.
(WebCore::GridTrack::growBaseSize): Deleted.
(WebCore::GridTrack::growGrowthLimit): Deleted.
* rendering/RenderGrid.h:

LayoutTests:

* fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt:
* fast/css-grid-layout/grid-content-sized-columns-resolution.html:

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

6 years agoNeed to pass RTLD_DEEPBIND to dlopen() to ensure that our LLVMOverrides take effect...
fpizlo@apple.com [Wed, 25 Feb 2015 10:18:41 +0000 (10:18 +0000)]
Need to pass RTLD_DEEPBIND to dlopen() to ensure that our LLVMOverrides take effect on Linux
https://bugs.webkit.org/show_bug.cgi?id=142006

Reviewed by Csaba Osztrogonác.

This fixes hard-to-reproduce concurrency-related crashes when running stress tests with FTL and
concurrent JIT enabled.

* llvm/InitializeLLVMPOSIX.cpp:
(JSC::initializeLLVMPOSIX):

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

6 years agoAX: Implement support for ARIA 1.1 'searchbox' role
jdiggs@igalia.com [Wed, 25 Feb 2015 10:04:16 +0000 (10:04 +0000)]
AX: Implement support for ARIA 1.1 'searchbox' role
https://bugs.webkit.org/show_bug.cgi?id=142004

Reviewed by Chris Fleizach.

Source/WebCore:

Add a new accessible SearchFieldRole to handle both the ARIA role
and the "search" input type.

No new tests. Instead, added a new test case to roles-exposed.html
for the mapping, and updated roles-computedRoleString.html because
there is now a one-to-one mapping between the "search" input type
and an ARIA role.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::isSearchField):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isARIATextControl):
(WebCore::AccessibilityObject::isARIAInput):
(WebCore::initializeRoleMap):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
(-[WebAccessibilityObjectWrapper accessibilityTraits]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):

LayoutTests:

* accessibility/roles-computedRoleString-expected.txt: Updated for new role.
* accessibility/roles-computedRoleString.html: Updated for new role.
* accessibility/roles-exposed.html: New test case added.
* platform/efl/accessibility/roles-exposed-expected.txt: Updated for new test case.
* platform/gtk/accessibility/roles-exposed-expected.txt: Updated for new test case.
* platform/mac-mavericks/accessibility/roles-exposed-expected.txt: Updated for new test case.
* platform/mac/accessibility/roles-exposed-expected.txt: Updated for new test case.

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

6 years agoEnable concurrent JIT on GTK
fpizlo@apple.com [Wed, 25 Feb 2015 09:08:26 +0000 (09:08 +0000)]
Enable concurrent JIT on GTK
https://bugs.webkit.org/show_bug.cgi?id=142007

Reviewed by Benjamin Poulain.

Seems weird that GTK keeps it off. No good reason for that as far as I can tell.

* wtf/Platform.h:

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

6 years agoConvert WebEditingTester to use xcconfig files
commit-queue@webkit.org [Wed, 25 Feb 2015 07:23:48 +0000 (07:23 +0000)]
Convert WebEditingTester to use xcconfig files
https://bugs.webkit.org/show_bug.cgi?id=141879

Patch by Sam Weinig <sam@webkit.org> on 2015-02-24
Reviewed by Darin Adler.

Add xcconfig files to WebEditingTester based on the ones used by MiniBrowser.

* WebEditingTester/Configurations: Added.
* WebEditingTester/Configurations/Base.xcconfig: Added.
* WebEditingTester/Configurations/DebugRelease.xcconfig: Added.
* WebEditingTester/WebEditingTester.xcodeproj/project.pbxproj:

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

6 years agoCMake build of libllvmForJSC.so should limit its export list like the Xcode build...
fpizlo@apple.com [Wed, 25 Feb 2015 06:59:55 +0000 (06:59 +0000)]
CMake build of libllvmForJSC.so should limit its export list like the Xcode build does
https://bugs.webkit.org/show_bug.cgi?id=141989

Reviewed by Gyuyoung Kim.

* CMakeLists.txt:
* llvm/library/libllvmForJSC.version: Added.

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

6 years agoMore iOS build fix after r180602.
ap@apple.com [Wed, 25 Feb 2015 05:52:24 +0000 (05:52 +0000)]
More iOS build fix after r180602.

* heap/Heap.h: Export Heap::machineThreads().

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

6 years agoUpdating js/dom/global-constructors-attributes.html results for HTMLAttachmentElement.
ap@apple.com [Wed, 25 Feb 2015 05:37:25 +0000 (05:37 +0000)]
Updating js/dom/global-constructors-attributes.html results for HTMLAttachmentElement.

* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:

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

6 years agoClarify some resizing terminology in ScrollView/FrameView
simon.fraser@apple.com [Wed, 25 Feb 2015 05:35:38 +0000 (05:35 +0000)]
Clarify some resizing terminology in ScrollView/FrameView
https://bugs.webkit.org/show_bug.cgi?id=141996

Reviewed by Zalan Bujtas.

ScrollableArea/ScrollView/FrameView had some confusing terminology around
contentsResized/visibleContentsResized/fixedLayoutSizeChanged.

Clarify this by distinguishing between:
1. Available size changes because of
    i) non-overlay scrollbar presence
   ii) ScrollableArea frame change
2. Removing fixedLayoutSizeChanged() and just treating it like an
   available size change.

contentsResized() is relegated to simply being a hook that allows Mac to
flash overlay scrollbars.

The confusingly named visibleContentsResized() is now updateContentsSize(),
and is the way that a ScrollableArea tells its subclasss that it should recompute
the size of the contents (i.e. do a layout).

Source/WebCore:

* page/FrameView.cpp:
(WebCore::FrameView::setContentsSize): No longer mysteriously skip the
FrameView implementation of contentsResized(), which used to do a setNeedsLayout()
which we didn't want to do from setContentsSize(), which itself happens as a result of layout.
(WebCore::FrameView::adjustViewSize): Whitespace.
(WebCore::FrameView::layout): Ditto.
(WebCore::FrameView::availableContentSizeChanged): Called on frame size change, or scrollbar
change.
(WebCore::FrameView::updateContentsSize): This actually does the layout.
(WebCore::FrameView::scrollbarStyleChanged): Always call the base class;  ScrollView::scrollbarStyleChanged
will bail if not a forced update.
(WebCore::FrameView::setCustomFixedPositionLayoutRect): Forces a layout via updateContentsSize() now.
(WebCore::FrameView::contentsResized): Deleted.
(WebCore::FrameView::fixedLayoutSizeChanged): Deleted.
(WebCore::FrameView::visibleContentsResized): Deleted.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::setFixedLayoutSize): Calls availableContentSizeChanged() now.
(WebCore::ScrollView::setUseFixedLayout): Ditto.
(WebCore::ScrollView::availableContentSizeChanged): Update scrollbars if that's not
the reason we are being called.
(WebCore::ScrollView::updateScrollbars): contentsResized() was the thing that caused setNeedsLayout();
replace it with availableContentSizeChanged(). visibleContentsResized() did the layout, and
replace with updateContentsSize().
(WebCore::ScrollView::setFrameRect): Call availableContentSizeChanged() now. This takes care of
updating scrollbars, so no need to explicitly do that.
(WebCore::ScrollView::scrollbarStyleChanged): Call the base class.
(WebCore::ScrollView::fixedLayoutSizeChanged): Deleted.
* platform/ScrollView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::availableContentSizeChanged): Call scrollAnimator->contentsResized()
to flash the scrollbars.
(WebCore::ScrollableArea::scrolledToRight):
(WebCore::ScrollableArea::scrollbarStyleChanged): Call availableContentSizeChanged() since
scrollbar style affects available space.
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::updateContentsSize):
(WebCore::ScrollableArea::scrollbarStyleChanged): Deleted.

Source/WebKit2:

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::scrollbarStyleChanged): Call the base class method,
which takes care of

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

6 years agoUnreviewed Mavericks build attempt fix after r180609.
rniwa@webkit.org [Wed, 25 Feb 2015 05:11:36 +0000 (05:11 +0000)]
Unreviewed Mavericks build attempt fix after r180609.

* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::checkGPUStatusIfNecessary):

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

6 years agoUnreviewed build fix after r180602.
bfulgham@apple.com [Wed, 25 Feb 2015 04:53:44 +0000 (04:53 +0000)]
Unreviewed build fix after r180602.

* heap/MachineStackMarker.h: Add missing 'no return'
declaration for Windows.

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

6 years agoTeach MiniBrowser how to disable per-window web processes
aestes@apple.com [Wed, 25 Feb 2015 04:53:43 +0000 (04:53 +0000)]
Teach MiniBrowser how to disable per-window web processes
https://bugs.webkit.org/show_bug.cgi?id=141988

Reviewed by Darin Adler.

* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration): Created a _WKProcessPoolConfiguration with maximumProcessCount == 1 if per-window web processes are disabled.
* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]): Added a new Settings menu item.
(-[SettingsController validateMenuItem:]): Validated the new Settings menu item.
(-[SettingsController togglePerWindowWebProcessesDisabled:]): Displayed an alert informing the user that MiniBrowser must be restarted for the setting to take effect.
(-[SettingsController perWindowWebProcessesDisabled]): Returned the value from user defaults.

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

6 years agoBot watcher's dashboard sometimes hits an assertion: data.num_missing === this.layout...
ap@apple.com [Wed, 25 Feb 2015 04:32:49 +0000 (04:32 +0000)]
Bot watcher's dashboard sometimes hits an assertion: data.num_missing === this.layoutTestResults.testsWithMissingResults.length
https://bugs.webkit.org/show_bug.cgi?id=141889

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:

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

6 years agoUnreviewed Windows build fix after r180601.
bfulgham@apple.com [Wed, 25 Feb 2015 04:28:52 +0000 (04:28 +0000)]
Unreviewed Windows build fix after r180601.

Export some missing symbols.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

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

6 years agoWebGL: Destroy the GLContext if a GPU restart has been detected.
roger_fong@apple.com [Wed, 25 Feb 2015 04:19:30 +0000 (04:19 +0000)]
WebGL: Destroy the GLContext if a GPU restart has been detected.
https://bugs.webkit.org/show_bug.cgi?id=141567.
<rdar://problem/18507496>
Reviewed by Dean Jackson.
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::setWebGLContext):
Keep track of which WebGLRenderingContext is associated with the current GraphicsContext3D.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): Helper method to check GPU status.
(WebCore::GraphicsContext3D::GraphicsContext3D):
Don’t immediately abort the GPU process when the restart status is kCGLCPGPURestartStatusBlacklisted.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::forceContextLost):
Force the WebGLRenderingContext to be lost.
(WebCore::GraphicsContext3D::drawArrays): Check GPU status after calling drawArrays.
(WebCore::GraphicsContext3D::drawElements): Check GPU status after calling drawElements.
* WebCore.xcodeproj/project.pbxproj: Add SPI header for iOS.
* platform/spi/ios/OpenGLESSPI.h: Added.

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

6 years agoUnreviewed ios build fix after http://trac.webkit.org/changeset/180602.
slewis@apple.com [Wed, 25 Feb 2015 04:10:54 +0000 (04:10 +0000)]
Unreviewed ios build fix after trac.webkit.org/changeset/180602.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):

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

6 years agoUse an enum for scrollbar style
simon.fraser@apple.com [Wed, 25 Feb 2015 04:07:06 +0000 (04:07 +0000)]
Use an enum for scrollbar style
https://bugs.webkit.org/show_bug.cgi?id=141985

Reviewed by Beth Dakin.
Source/WebCore:

Switch to an enum class for the scrollbar style (normal or overlay).

* page/ChromeClient.h:
* page/FrameView.cpp:
(WebCore::FrameView::scrollbarStyleChanged):
* page/FrameView.h:
* platform/ScrollTypes.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollbarStyleChanged):
* platform/ScrollView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::scrollbarStyleChanged):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::updateScrollerStyle):

Source/WebKit2:

Switch to an enum class for the scrollbar style (normal or overlay).

Sadly it still has to be passed as an int across the process boundary.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::recommendedScrollbarStyleDidChange):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::scrollbarStyleChanged):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::recommendedScrollbarStyleDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

6 years ago[Mac][WK2] ASSERTION FAILED: m_sendPort in IPC::Connection::open()
cdumez@apple.com [Wed, 25 Feb 2015 03:52:40 +0000 (03:52 +0000)]
[Mac][WK2] ASSERTION FAILED: m_sendPort in IPC::Connection::open()
https://bugs.webkit.org/show_bug.cgi?id=141934

Reviewed by Darin Adler.

Speculative fix for "ASSERTION FAILED: m_sendPort" in
IPC::Connection::open(). This assertion seems to indicate we ended
up in IPC::Connection::open() with MACH_PORT_NULL as port.

I found that in XPCServiceInitializerDelegate::getConnectionIdentifier()
we return true unconditionally, even though
xpc_dictionary_copy_mach_send() can return MACH_PORT_NULL. This patch
updates this method to add a check for MACH_PORT_NULL and return false
in this case.

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::getConnectionIdentifier):

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

6 years agoUnreviewed, rolling out r180599.
commit-queue@webkit.org [Wed, 25 Feb 2015 03:48:53 +0000 (03:48 +0000)]
Unreviewed, rolling out r180599.
https://bugs.webkit.org/show_bug.cgi?id=141998

Lots of new test failures (Requested by smfr on #webkit).

Reverted changeset:

"Parsing support for -webkit-trailing-word"
https://bugs.webkit.org/show_bug.cgi?id=141939
http://trac.webkit.org/changeset/180599

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

6 years agoRolling out http://trac.webkit.org/changeset/180430 as it causes the PLT to crash.
slewis@apple.com [Wed, 25 Feb 2015 03:02:26 +0000 (03:02 +0000)]
Rolling out trac.webkit.org/changeset/180430 as it causes the PLT to crash.
<rdar://problem/19948015>

Unreviewed.

* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::grow):
* bmalloc/VMHeap.h:
* bmalloc/Zone.cpp:
(bmalloc::Zone::Zone):
(bmalloc::Zone::size): Deleted.
* bmalloc/Zone.h:

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

6 years agoFix build break on EFL and GTK port since r180585.
gyuyoung.kim@samsung.com [Wed, 25 Feb 2015 02:31:22 +0000 (02:31 +0000)]
Fix build break on EFL and GTK port since r180585.
https://bugs.webkit.org/show_bug.cgi?id=141994

Reviewed by Joseph Pecoraro.

* UIProcess/WebsiteData/WebsiteDataRecord.cpp:
(WebKit::WebsiteDataRecord::displayNameForOrigin):
* UIProcess/WebsiteData/WebsiteDataRecord.h:
(WebKit::WebsiteDataRecord::WebsiteDataRecord):

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

6 years agoMachineThreads::Thread clean up has a use after free race condition.
mark.lam@apple.com [Wed, 25 Feb 2015 02:28:23 +0000 (02:28 +0000)]
MachineThreads::Thread clean up has a use after free race condition.
<https://webkit.org/b/141990>

Reviewed by Michael Saboff.

MachineThreads::Thread clean up relies on the clean up mechanism
implemented in _pthread_tsd_cleanup_key(), which looks like this:

void _pthread_tsd_cleanup_key(pthread_t self, pthread_key_t key)
{
    void (*destructor)(void *);
    if (_pthread_key_get_destructor(key, &destructor)) {
        void **ptr = &self->tsd[key];
        void *value = *ptr;

        // At this point, this thread has cached "destructor" and "value"
        // (which is a MachineThreads*).  If the VM gets destructed (along
        // with its MachineThreads registry) by another thread, then this
        // thread will have no way of knowing that the MachineThreads* is
        // now pointing to freed memory.  Calling the destructor below will
        // therefore result in a use after free scenario when it tries to
        // access the MachineThreads' data members.

        if (value) {
            *ptr = NULL;
            if (destructor) {
                destructor(value);
            }
        }
    }
}

The solution is simply to change MachineThreads from a per VM thread
registry to a process global singleton thread registry i.e. the
MachineThreads registry is now immortal and we cannot have a use after
free scenario since we never free it.

The cost of this change is that all VM instances will have to scan
stacks of all threads ever touched by a VM, and not just those that
touched a specific VM.  However, stacks tend to be shallow.  Hence,
those additional scans will tend to be cheap.

Secondly, it is not common for there to be multiple JSC VMs in use
concurrently on multiple threads.  Hence, this cost should rarely
manifest in real world applications.

* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::machineThreads):
(JSC::Heap::gatherStackRoots):
* heap/Heap.h:
(JSC::Heap::machineThreads): Deleted.
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::addCurrentThread):
* heap/MachineStackMarker.h:
* runtime/JSLock.cpp:
(JSC::JSLock::didAcquireLock):

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

6 years ago[Attachment] Give <attachment> elements an underlying File
weinig@apple.com [Wed, 25 Feb 2015 01:49:59 +0000 (01:49 +0000)]
[Attachment] Give <attachment> elements an underlying File
https://bugs.webkit.org/show_bug.cgi?id=141993

Reviewed by Tim Horton.

Source/WebCore:

- Add a JS subclass for attachments so that <attachment>s are
  instances of HTMLAttachmentElement rather than HTMLElement.
- Give HTMLAttachmentElements an underlying File that they
  are the representation of. Expose it via a new 'file' property.
- Expose a new Internals function called window.internals.createFile(url)
  that allows creating File objects for testing.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* fileapi/File.h:
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::~HTMLAttachmentElement):
(WebCore::HTMLAttachmentElement::file):
(WebCore::HTMLAttachmentElement::setFile):
* html/HTMLAttachmentElement.h:
* html/HTMLAttachmentElement.idl: Added.
* html/HTMLTagNames.in:
* testing/Internals.cpp:
(WebCore::Internals::createFile):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Update attachment-dom.html to test setting and getting the
underlying file.

* fast/attachment/attachment-dom-expected.txt:
* fast/attachment/attachment-dom.html:
* fast/attachment/resources: Added.
* fast/attachment/resources/test-file.txt: Added.

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

6 years agoAX: Implement support for ARIA 1.1 'switch' role
jdiggs@igalia.com [Wed, 25 Feb 2015 01:43:42 +0000 (01:43 +0000)]
AX: Implement support for ARIA 1.1 'switch' role
https://bugs.webkit.org/show_bug.cgi?id=141986

Reviewed by Chris Fleizach.

Source/WebCore:

Map the role to ATK_ROLE_TOGGLE_BUTTON for Gtk and Efl; on the Mac, to
AXCheckBox with a subrole of AXSwitch. Ensure it looks and acts like a
widget to accessibility APIs (supports and emits notifications when
toggled, doesn't have children, exposes a name and description when
provided).

Tests: accessibility/aria-switch-checked.html
       accessibility/aria-switch-sends-notification.html
       accessibility/aria-switch-text.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren):
(WebCore::AccessibilityNodeObject::isChecked):
(WebCore::AccessibilityNodeObject::visibleText):
(WebCore::AccessibilityNodeObject::title):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isARIAInput):
(WebCore::AccessibilityObject::actionVerb):
(WebCore::initializeRoleMap):
(WebCore::AccessibilityObject::supportsChecked):
(WebCore::AccessibilityObject::checkboxOrRadioValue):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isSwitch):
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
(-[WebAccessibilityObjectWrapper accessibilityTraits]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

* accessibility/aria-switch-checked-expected.txt: Added.
* accessibility/aria-switch-checked.html: Added.
* accessibility/aria-switch-sends-notification-expected.txt: Added.
* accessibility/aria-switch-sends-notification.html: Added.
* accessibility/aria-switch-text.html: Added.
* accessibility/roles-exposed.html: Added a test case for the new role.
* platform/efl/accessibility/aria-fallback-roles-expected.txt: Added.
* platform/efl/accessibility/aria-switch-text-expected.txt: Added.
* platform/efl/accessibility/roles-exposed-expected.txt: Updated for the new role.
* platform/gtk/accessibility/aria-fallback-roles-expected.txt: Added.
* platform/gtk/accessibility/aria-switch-text-expected.txt: Added.
* platform/gtk/accessibility/roles-exposed-expected.txt: Updated for the new role.
* platform/mac-mavericks/accessibility/roles-exposed-expected.txt: Updated for the new role.
* platform/mac/TestExpectations: Skip the 'checked' notifcation as the Mac doesn't have it.
* platform/mac/accessibility/aria-switch-text-expected.txt: Added.
* platform/mac/accessibility/roles-exposed-expected.txt: Updated for the new role.

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

6 years agoSource/JavaScriptCore:
mmaxfield@apple.com [Wed, 25 Feb 2015 01:17:38 +0000 (01:17 +0000)]
Source/JavaScriptCore:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

This patch implements initial parsing support for the -apple-trailing-word CSS property.
This property has two possible (mutually exclusive) values: auto and
-apple-partially-balanced. This property is inherited.

The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.

This is an internal property that will allow us to control line breaking behavior for
short paragraphs.

Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
the new value must be implemented as -webkit-partially-balanced. Using the -apple-
prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
version.

Test: platform/mac/fast/text/trailing-word-parse.html

* Configurations/FeatureDefines.xcconfig:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
CSS value.
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
pair.
(WebCore::isKeywordPropertyID): New property is a keyword property.
(WebCore::CSSParser::parseValue): Use the keyword property codepath.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
representation and CSS values.
(WebCore::CSSPrimitiveValue::operator TrailingWord):
* css/CSSPropertyNames.in: New property.
* css/CSSValueKeywords.in: New value.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
* rendering/style/RenderStyle.h: Getter, setter and initial value.
* rendering/style/RenderStyleConstants.h: Internal data type.
* rendering/style/StyleRareInheritedData.h: One bit to control this style property.

Source/WebKit/mac:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:
[Mac] [iOS] Parsing support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

LayoutTests:
Parsing support for -webkit-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=141939

Reviewed by Andreas Kling.

Test parsing using getComputedStyle().

* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html: Updated.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt: Updated.
* platform/mac/fast/text/trailing-word-parse-expected.txt: Added.
* platform/mac/fast/text/trailing-word-parse.html: Added.

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

6 years agoRemove DecodingTask::create and DatabaseOpenTask::create
gyuyoung.kim@samsung.com [Wed, 25 Feb 2015 01:12:44 +0000 (01:12 +0000)]
Remove DecodingTask::create and DatabaseOpenTask::create
https://bugs.webkit.org/show_bug.cgi?id=141966

Reviewed by Anders Carlsson.

These create() factory functions are redundant. We can use std::make_unique<> directly.

No new tests, no behavior changes.

* Modules/webaudio/AsyncAudioDecoder.cpp:
(WebCore::AsyncAudioDecoder::decodeAsync):
(WebCore::AsyncAudioDecoder::DecodingTask::create): Deleted.
* Modules/webaudio/AsyncAudioDecoder.h:
* Modules/webdatabase/Database.cpp:
(WebCore::Database::openAndVerifyVersion):
* Modules/webdatabase/DatabaseTask.h:
(WebCore::DatabaseBackend::DatabaseOpenTask::create): Deleted.

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

6 years agoWeb Inspector: Eliminate console-formatted-* class names in favor of formatted-*
joepeck@webkit.org [Wed, 25 Feb 2015 00:44:54 +0000 (00:44 +0000)]
Web Inspector: Eliminate console-formatted-* class names in favor of formatted-*
https://bugs.webkit.org/show_bug.cgi?id=141948

Reviewed by Timothy Hatcher.

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForNode):
Helper for formatting a node as a DOMTreeOutline.

* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatParameter):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsString):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.ConsoleMessageImpl.prototype.appendUndefined):
(WebInspector.ConsoleMessageImpl.prototype._printArray):
(WebInspector.ConsoleMessageImpl.prototype.): Deleted.
* UserInterface/Views/LogContentView.css:
(.console-user-command-result):
(.console-formatted-object): Deleted.
(.console-object-preview): Deleted.
(.expanded .console-object-preview): Deleted.
(.console-object-preview .name): Deleted.
(.expanded .console-object-preview > .console-object-preview-body): Deleted.
(.console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.
(.console-object-preview-body .console-object-preview-name.console-object-preview-name-Object): Deleted.
(.expanded .console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.
(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap): Deleted.
(:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .section): Deleted.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._leftArrowWasPressed):
(WebInspector.LogContentView.prototype._rightArrowWasPressed):
Add FIXMEs since this will no longer work with ObjectTree.

* UserInterface/Views/ObjectPreviewView.css:
(.object-preview):
* UserInterface/Views/ObjectTreeView.css:
(.object-tree):
Copy over the font styles from console-formatted-object.

* UserInterface/Views/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertyTreeElement.prototype.update):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForString):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForRegExp):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNumber):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForBoolean):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNull):
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForUndefined):
Convert to formatted value class names.

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

6 years agoUnreviewed, rolling out r180578.
commit-queue@webkit.org [Wed, 25 Feb 2015 00:44:00 +0000 (00:44 +0000)]
Unreviewed, rolling out r180578.
https://bugs.webkit.org/show_bug.cgi?id=141992

Broke scrolling in Inspector Console. (Requested by JoePeck on
#webkit).

Reverted changeset:

"[Mac] WebKit abandons overlay scrollbar CALayers."
https://bugs.webkit.org/show_bug.cgi?id=141943
http://trac.webkit.org/changeset/180578

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

6 years agoUse "this" instead of "callee" to get the constructor
rniwa@webkit.org [Wed, 25 Feb 2015 00:41:35 +0000 (00:41 +0000)]
Use "this" instead of "callee" to get the constructor
https://bugs.webkit.org/show_bug.cgi?id=141019

Reviewed by Filip Pizlo.

This patch uses "this" register to pass the constructor (newTarget) to op_create_this from
op_construct or op_construct_varargs. This will allow future patches that implement ES6 class
to pass in the most derived class' constructor through "this" argument.

BytecodeGenerator's emitConstruct and emitConstructVarargs now passes thisRegister like
regular calls and emitCreateThis passes in this register to op_create_this as constructor.

The rest of the code change removes the code for special casing "this" register not being used
in call to construct.

* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCreateThis):
(JSC::BytecodeGenerator::emitConstructVarargs):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::NewExprNode::emitBytecode):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addCallWithoutSettingResult):
(JSC::DFG::ByteCodeParser::handleVarargsCall):
(JSC::DFG::ByteCodeParser::emitArgumentPhantoms):
(JSC::DFG::ByteCodeParser::attemptToInlineCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::reconstruct):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* ftl/FTLJSCallVarargs.cpp:
(JSC::FTL::JSCallVarargs::emit):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNativeCallOrConstruct):
(JSC::FTL::LowerDFGToLLVM::compileCallOrConstruct):
(JSC::FTL::LowerDFGToLLVM::compileCallOrConstructVarargs):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeConstruct):
* jit/JITOperations.cpp:

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

6 years agoWeb Inspector: Make Getter/Setter RemoteObject property and ObjectPreview handling...
joepeck@webkit.org [Wed, 25 Feb 2015 00:31:42 +0000 (00:31 +0000)]
Web Inspector: Make Getter/Setter RemoteObject property and ObjectPreview handling consistent
https://bugs.webkit.org/show_bug.cgi?id=141587

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Convert getProperties(ownAndGetterProperties) to getDisplayableProperties().
Mark PropertyDescriptors that are presumed to be native getters / bindings
separately so that the frontend may display them differently.

* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::getProperties):
(Inspector::InjectedScript::getDisplayableProperties):
* inspector/InjectedScript.h:
* inspector/InjectedScriptSource.js:
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getProperties):
(Inspector::InspectorRuntimeAgent::getDisplayableProperties):
* inspector/agents/InspectorRuntimeAgent.h:
* inspector/protocol/Runtime.json:

Source/WebInspectorUI:

* UserInterface/Models/CallFrame.js:
(WebInspector.CallFrame.prototype.collectScopeChainVariableNames):
* UserInterface/Models/PropertyDescriptor.js:
(WebInspector.PropertyDescriptor.prototype.get nativeGetter):
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.fromPayload):
(WebInspector.RemoteObject.prototype.getOwnPropertyDescriptors):
(WebInspector.RemoteObject.prototype.getAllPropertyDescriptors):
(WebInspector.RemoteObject.prototype.getDisplayablePropertyDescriptors):
(WebInspector.RemoteObject.prototype._getPropertyDescriptors):
(WebInspector.RemoteObject.prototype.if):
(WebInspector.RemoteObject.prototype.deprecatedGetOwnProperties):
(WebInspector.RemoteObject.prototype.deprecatedGetAllProperties):
(WebInspector.RemoteObject.prototype._deprecatedGetProperties):
(WebInspector.RemoteObject.prototype.getOwnAndGetterPropertyDescriptors): Deleted.
(WebInspector.RemoteObject.prototype.callback): Deleted.
(WebInspector.RemoteObject.prototype.getOwnProperties): Deleted.
(WebInspector.RemoteObject.prototype.getOwnAndGetterProperties): Deleted.
(WebInspector.RemoteObject.prototype.getAllProperties): Deleted.
(WebInspector.RemoteObject.prototype.set else): Deleted.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady):
* UserInterface/Views/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection.prototype.update):
(WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype.):
(WebInspector.ObjectTreePropertyTreeElement.prototype):
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.update):

LayoutTests:

* inspector/model/remote-object-get-properties-expected.txt:
* inspector/model/remote-object-get-properties.html:

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

6 years agoWeb Inspector: New Object Tree View UI
joepeck@webkit.org [Wed, 25 Feb 2015 00:31:38 +0000 (00:31 +0000)]
Web Inspector: New Object Tree View UI
https://bugs.webkit.org/show_bug.cgi?id=141932

Reviewed by Timothy Hatcher.

Part 1: Majority of the UI.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Images/Eye.svg: Added.
* UserInterface/Images/TypeBoolean.svg: Added.
* UserInterface/Images/TypeNull.svg: Added.
* UserInterface/Images/TypeNumber.svg: Added.
* UserInterface/Images/TypeObject.svg: Added.
* UserInterface/Images/TypeRegex.svg: Added.
* UserInterface/Images/TypeString.svg: Added.
* UserInterface/Images/TypeSymbol.svg: Added.
* UserInterface/Images/TypeUndefined.svg: Added.
* UserInterface/Main.html:
Miscellaneous.

* UserInterface/Views/FormattedValue.css:
(.formatted-boolean):
Give booleans a light purple color.

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForTypesAndValue):
Previously we were truncating function value logging in the console. E.g.
  js> multiLineFunction
  <-  function multiLineFunction() {
No longer truncate so we display the full string.

* UserInterface/Models/PropertyPath.js: Added.
(WebInspector.PropertyPath):
(WebInspector.PropertyPath.prototype.get object):
(WebInspector.PropertyPath.prototype.get parent):
(WebInspector.PropertyPath.prototype.get isPrototype):
(WebInspector.PropertyPath.prototype.get rootObject):
(WebInspector.PropertyPath.prototype.get lastNonPrototypeObject):
(WebInspector.PropertyPath.prototype.get pathComponent):
(WebInspector.PropertyPath.prototype.get fullPath):
(WebInspector.PropertyPath.prototype.isRoot):
(WebInspector.PropertyPath.prototype.isPathComponentImpossible):
(WebInspector.PropertyPath.prototype.isFullPathImpossible):
(WebInspector.PropertyPath.prototype.appendPropertyName):
(WebInspector.PropertyPath.prototype.appendPropertySymbol):
(WebInspector.PropertyPath.prototype.appendInternalPropertyName):
(WebInspector.PropertyPath.prototype.appendArrayIndex):
(WebInspector.PropertyPath.prototype.appendCollectionIndex):
(WebInspector.PropertyPath.prototype.appendPropertyDescriptor):
(WebInspector.PropertyPath.prototype._canPropertyNameBeDotAccess):
PropertyPaths are a linked list of remote object / patch component pairs.
For a property like "foo['property 1'].__proto__.baz" we will have a PropertyPath
chain with the RemoteObject for each component. This allows us to accurately
select the RemoteObject on which we should invoke a getter. It also allows
us to display the property path string from the root object, if possible.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.callFunction):
(WebInspector.RemoteObject.prototype.backendInvokeGetter):
(WebInspector.RemoteObject.prototype.invokeGetter):
Provide a way to invoke a getter function on a remote object if we
have a reference to the getter function. At the same time, improve
the mostly unused callFunction API to automatically convert
RemoteObjects / values to their Runtime.CallArgument format.

* UserInterface/Views/ObjectTreePropertyTreeElement.css: Added.
(.object-tree-property):
(.object-tree-property > .disclosure-button):
(.object-tree-property.parent > .disclosure-button):
(.object-tree-property.parent.expanded > .disclosure-button):
(.object-tree-property > .titles):
Focused styles for the ObjectTree property GeneralTreeElements.
Reuse navigation sidebar disclosure-triangles.

(.object-tree-property > .icon):
(.object-tree-property.boolean > .icon):
(.object-tree-property.function > .icon):
(.object-tree-property.number > .icon):
(.object-tree-property.object > .icon):
(.object-tree-property.object.null > .icon):
(.object-tree-property.object.node > .icon):
(.object-tree-property.regex > .icon):
(.object-tree-property.string > .icon):
(.object-tree-property.symbol > .icon):
(.object-tree-property.undefined > .icon):
Use different icons for different object types. Special case
"accessor" to be undefined.

(.object-tree-property .prototype-name):
(.object-tree-property .property-name.not-enumerable):
Style property names in sans-serif font.
Give non-enumerable properties a slightly transparent look.

(.object-tree-property.prototype-property):
(.object-tree-property.prototype-property > .icon):
(.object-tree-property.prototype-property + ol):
Special styles for prototype properties and their children.

(.object-tree-property .getter):
(.object-tree-property .getter:hover):
(.object-tree-property .read-only):
Styles for clickable getter button and non-interactive read-only indicator.

(.object-tree-property :matches(.formatted-string, .formatted-regexp)):
Do not allow wrapping for values that previously allowed wrapping.

(.object-tree-property .value.error):
If getting a value resulted in an error, display that error in red.

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement):
Extend from GeneralTreeElement and set up class names on the root <li> object.

(WebInspector.ObjectTreePropertyTreeElement.prototype.onattach): Deleted.
No longer needed by using GeneralTreeElement.

(WebInspector.ObjectTreePropertyTreeElement.prototype.onexpand):
(WebInspector.ObjectTreePropertyTreeElement.prototype.oncollapse):
Expand / collapse an associated ObjectPreview if we have one.

(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValue):
(WebInspector.ObjectTreePropertyTreeElement.prototype._resolvedValuePropertyPath):
This PropertyTreeElement may be displaying for a value, or a getter that has
gotten a value. Refer to this as the "resolvedValue".

(WebInspector.ObjectTreePropertyTreeElement.prototype._thisPropertyPath):
A PropertyPath leaf used for tooltips.

(WebInspector.ObjectTreePropertyTreeElement.prototype._updateHasChildren):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTooltips):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAndIcon):
Helpers for updating small parts of the UI. When a getter is invoked,
we need to update the entire UI of this TreeElement.

(WebInspector.ObjectTreePropertyTreeElement.prototype._titleFragment):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitle): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitlePropertyStyle): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAPIStyle): Deleted.
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePrototype):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitleAPIStyle):
Create the UI for the mainTitle of this PropertyTreeElement.

(WebInspector.ObjectTreePropertyTreeElement.prototype._createInteractiveGetterElement):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createReadOnlyIconElement):
Helpers for creating the small components of the title UI.

(WebInspector.ObjectTreePropertyTreeElement.prototype._alwaysDisplayAsProperty):
Establish when a property should still be displayed as a "property" even when in API mode.
For example a value property on a prototype, should still display as an expandable property.

* UserInterface/Views/ObjectTreeView.css:
(.object-tree > :matches(.title, .object-preview)::before):
(.object-tree:not(.lossless-preview) > :matches(.title, .object-preview)):
(.object-tree.expanded > :matches(.title, .object-preview)::before):
(.object-tree .object-tree-outline):
(.object-tree-outline ol):
(.object-tree-outline li .empty-message):
(:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline):
(.object-tree > .title): Deleted.
(.object-tree-outline): Deleted.
(.object-tree-outline li): Deleted.
(.object-tree-outline li.parent): Deleted.
(.object-tree-outline li.parent::before): Deleted.
(.object-tree-outline li.parent.expanded::before): Deleted.
(.object-tree-property .name): Deleted.
(.object-tree-property .name.not-enumerable): Deleted.
(.object-tree-property .value.error): Deleted.
(.console-group-messages .object-tree:not(.lossless-preview)): Deleted.
(.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)): Deleted.
(.console-group-messages .object-tree:not(.lossless-preview) > :matches(.title, .object-preview)::before): Deleted.
(.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree): Deleted.
(.console-group-messages :matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .object-tree-outline): Deleted.
Move most PropertyTreeElement specific styles into ObjectPropertyTreeElement.css.
Plenty of console specific files were eliminated.

* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.update):
(WebInspector.ObjectTreeView.prototype._updateProperties):

Part 2: Provide better parameter lists for native functions.

When expanding an object's prototype chain, with authored code
you will accurately see parameter lists for user authored functions
because we can get this by parsing Function.prototype.toString.
For native code, we don't get any parameter information. In such cases
we can detect we are a native function, and provide our own strings.

This fills in most of the JavaScript built-ins and some DOM
functions, however we should autogenerate the rest of the DOM.

* UserInterface/Base/Utilities.js:
(isFunctionStringNativeCode):
Helper to check if a function is native or not based on its string.

* UserInterface/Main.html:
* UserInterface/Models/NativeFunctionParameters.js: Added.
Dictionary of parameter lists for native constructor functions
and prototype functions.

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement):
(WebInspector.ObjectTreePropertyTreeElement.prototype._functionPropertyString):
(WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):
(WebInspector.ObjectTreePropertyTreeElement.prototype):
When we have a native function, try to provide a better parameter string.

Part 3: Better handle errors when invoking getters.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.callFunction):
(WebInspector.RemoteObject.prototype.invokeGetter):
Pass the error, wasThrown, and result through to the caller so they can
act on all the information possible. Provide encapsulation though
and auto-convert the result to a RemoteObject for the callback.

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady):
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._createTooltipForNode.setTooltip):
(WebInspector.DOMTreeElement.prototype._createTooltipForNode.resolvedNode):
(WebInspector.DOMTreeElement.prototype._createTooltipForNode):
Update current users of callFunctionOn for the new callback parameters.

* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property.had-error > .icon):
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateHasChildren):
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateTitleAndIcon):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
(WebInspector.ObjectTreePropertyTreeElement.prototype._createInteractiveGetterElement.):
Better style getters with errors.

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

6 years agoWeb Inspector: Do not show "{}" after Date description in Object Previews
joepeck@webkit.org [Wed, 25 Feb 2015 00:31:34 +0000 (00:31 +0000)]
Web Inspector: Do not show "{}" after Date description in Object Previews
https://bugs.webkit.org/show_bug.cgi?id=141898

Reviewed by Timothy Hatcher.

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
Only show "{...}" section for Date objects that have user
defined properties. Otherwise, Dates do not have properties.

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

6 years agoRolling out r179753. The fix was invalid.
mark.lam@apple.com [Wed, 25 Feb 2015 00:03:42 +0000 (00:03 +0000)]
Rolling out r179753.  The fix was invalid.
<https://webkit.org/b/141990>

Not reviewed.

* API/tests/testapi.mm:
(threadMain):
(useVMFromOtherThread): Deleted.
(useVMFromOtherThreadAndOutliveVM): Deleted.
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::~Heap):
(JSC::Heap::gatherStackRoots):
* heap/Heap.h:
(JSC::Heap::machineThreads):
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::Thread::Thread):
(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::~MachineThreads):
(JSC::MachineThreads::addCurrentThread):
(JSC::MachineThreads::removeThread):
(JSC::MachineThreads::removeCurrentThread):
* heap/MachineStackMarker.h:

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

6 years agoBuildfix after r180585.
ossy@webkit.org [Tue, 24 Feb 2015 23:31:53 +0000 (23:31 +0000)]
Buildfix after r180585.

* CMakeLists.txt:

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

6 years ago[ios Media] the inline controls are visible after pressing Done on iPhone
dino@apple.com [Tue, 24 Feb 2015 23:21:52 +0000 (23:21 +0000)]
[ios Media] the inline controls are visible after pressing Done on iPhone
https://bugs.webkit.org/show_bug.cgi?id=141987
<rdar://problem/19944110>

Reviewed by Beth Dakin.

When exiting out of a playing video, we should show the
start playback button if we don't allow inline media
(such as on iPhone).

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.shouldHaveStartPlaybackButton): Test for
allowsInline as well.

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

6 years agoConstructor returning null should construct an object instead of null
utatane.tea@gmail.com [Tue, 24 Feb 2015 23:01:58 +0000 (23:01 +0000)]
Constructor returning null should construct an object instead of null
https://bugs.webkit.org/show_bug.cgi?id=141640

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

When constructor code doesn't return object, constructor should return `this` object instead.
Since we used `op_is_object` for this check and `op_is_object` is intended to be used for `typeof`,
it allows `null` as an object.
This patch fixes it by introducing an new bytecode `op_is_object_or_null` for `typeof` use cases.
Instead, constructor uses simplified `is_object`.

As a result, `op_is_object` becomes fairly simple. So we introduce optimization for `op_is_object`.

1. LLInt and baseline JIT support `op_is_object` as a fast path.
2. DFG abstract interpreter support `op_is_object`. And recognize its speculated type and read-write effects.
3. DFG introduces inlined asm for `op_is_object` rather than calling a C++ function.
4. FTL lowers DFG's IsObject into LLVM IR.

And at the same time, this patch fixes isString / isObject predicate used for `op_is_object` and others
in LLInt, JIT, DFG and FTL.
Before introducing ES6 Symbol, JSCell is only used for object and string in user observable area.
So in many places, when the cell is not object, we recognize it as a string, and vice versa.
However, now ES6 Symbol is implemented as a JSCell, this assumption is broken.
So this patch stop using !isString as isObject.
To check whether a cell is an object, instead of seeing that structure ID of a cell is not stringStructure,
we examine typeInfo in JSCell.

* JavaScriptCore.order:
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFor):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitEqualityOp):
(JSC::BytecodeGenerator::emitReturn):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):

IsObject operation only touches JSCell typeInfoType.
And this value would be changed through structure transition.
As a result, IsObject can report that it doesn't read any information.

* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):

Just like IsString, IsObject is also fixed up.

* dfg/DFGHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGHeapLocation.h:
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
(JSC::DFG::SpeculativeJIT::compileStringToUntypedEquality):
(JSC::DFG::SpeculativeJIT::compileStringIdentToNotStringVarEquality):
(JSC::DFG::SpeculativeJIT::compileToStringOnCell):
(JSC::DFG::SpeculativeJIT::speculateObject):
(JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
(JSC::DFG::SpeculativeJIT::speculateString):
(JSC::DFG::SpeculativeJIT::speculateNotStringVar):
(JSC::DFG::SpeculativeJIT::emitSwitchChar):
(JSC::DFG::SpeculativeJIT::emitSwitchString):
(JSC::DFG::SpeculativeJIT::branchIsObject):
(JSC::DFG::SpeculativeJIT::branchNotObject):
(JSC::DFG::SpeculativeJIT::branchIsString):
(JSC::DFG::SpeculativeJIT::branchNotString):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileToString):
(JSC::FTL::LowerDFGToLLVM::compileIsObject):
(JSC::FTL::LowerDFGToLLVM::compileIsObjectOrNull):
(JSC::FTL::LowerDFGToLLVM::speculateTruthyObject):
(JSC::FTL::LowerDFGToLLVM::equalNullOrUndefined):
(JSC::FTL::LowerDFGToLLVM::isObject):
(JSC::FTL::LowerDFGToLLVM::isNotObject):
(JSC::FTL::LowerDFGToLLVM::isNotString):
(JSC::FTL::LowerDFGToLLVM::speculateNonNullObject):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::emitJumpIfCellObject):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_to_primitive):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::compileOpStrictEq):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
* runtime/Operations.cpp:
(JSC::jsIsObjectTypeOrNull):
(JSC::jsIsObjectType): Deleted.
* runtime/Operations.h:
* tests/stress/constructor-with-return.js: Added.
(Test):

When constructor doesn't return an object, `this` should be returned instead.
In this test, we check all primitives. And test object, array and wrappers.

* tests/stress/dfg-to-primitive-pass-symbol.js: Added.
(toPrimitiveTarget):
(doToPrimitive):

op_to_primitive operation passes Symbol in fast path.

LayoutTests:

Follow the old ret_object_or_this semantics.
When constructor returns an object that masquerades as undefined, we see it as an object.

* js/dom/constructor-with-return-masquerades-expected.txt: Added.
* js/dom/constructor-with-return-masquerades.html: Added.
* js/dom/script-tests/constructor-with-return-masquerades.js: Added.
(Constructor):

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

6 years agoPass FillLayer reference instead of pointer to RenderBoxModelObject::calculateBackgro...
zalan@apple.com [Tue, 24 Feb 2015 22:53:09 +0000 (22:53 +0000)]
Pass FillLayer reference instead of pointer to RenderBoxModelObject::calculateBackgroundImageGeometry.
https://bugs.webkit.org/show_bug.cgi?id=141982

Reviewed by Simon Fraser.

There should always be a valid FillLayer.

No change in functionality.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::getBackgroundPaintedExtent):
(WebCore::RenderBox::maskClipRect):
(WebCore::RenderBox::repaintLayerRectsForImage):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateFillTileSize):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
(WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
* rendering/RenderBoxModelObject.h:

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

6 years agoPass _WKWebsiteDataRecord objects to the fetchData completion handler
andersca@apple.com [Tue, 24 Feb 2015 22:40:30 +0000 (22:40 +0000)]
Pass _WKWebsiteDataRecord objects to the fetchData completion handler
https://bugs.webkit.org/show_bug.cgi?id=141984

Reviewed by Andreas Kling.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Create _WKWebsiteDataRecord objects for WebsiteDataRecord API objects.

* UIProcess/API/APIWebsiteDataRecord.h:
Add WebsiteDataRecord getter.

* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
Add displayName and dataTypes properties.

* UIProcess/API/Cocoa/_WKWebsiteDataRecord.mm:
(dataTypesToString):
Helper function to convert dataTypes bit-fields to strings.

(-[_WKWebsiteDataRecord description]):
Include the display name and data types in the description.

(-[_WKWebsiteDataRecord displayName]):
Return the display name.

(-[_WKWebsiteDataRecord dataTypes]):
Return the data types.

* UIProcess/API/Cocoa/_WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
Move this here from _WKWebsiteDataStore.mm.

(WebKit::toWKWebsiteDataTypes):
Add new function to convert WebsiteDataTypes to WKWebsiteDataTypes.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
Qualify toWebsiteDataTypes calls.

* UIProcess/WebsiteData/WebsiteDataRecord.cpp: Added.
(WebKit::WebsiteDataRecord::displayNameForOrigin):
New helper that returns a display name given an origin.

(WebKit::WebsiteDataRecord::add):
Add the origin as well as the type.

* UIProcess/WebsiteData/WebsiteDataRecord.h:
Add new members.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
Loop through the entries and add them to the m_websiteDataRecords hash map, which
is keyed off of the display name. Pass the m_websiteDataRecords values to the completion handler.

* WebKit2.xcodeproj/project.pbxproj:

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

6 years ago[iOS Media] Be specific about which document to use for the timeline background canvas
dino@apple.com [Tue, 24 Feb 2015 22:24:08 +0000 (22:24 +0000)]
[iOS Media] Be specific about which document to use for the timeline background canvas
https://bugs.webkit.org/show_bug.cgi?id=141981

Reviewed by Eric Carlson.

In some cases, especially with nested iframes, the document
reference for the shadow DOM might not be the one used
to create a -webkit-canvas context for rendering via CSS.
Explicitly get the context from the video's owner
document.

There is still a bug here:
https://bugs.webkit.org/show_bug.cgi?id=141983

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.drawTimelineBackground):

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

6 years agoRemove unused BackgroundImageGeometry::m_destOrigin
zalan@apple.com [Tue, 24 Feb 2015 22:11:13 +0000 (22:11 +0000)]
Remove unused BackgroundImageGeometry::m_destOrigin
https://bugs.webkit.org/show_bug.cgi?id=141980

Reviewed by Simon Fraser.

Remove BackgroundImageGeometry::m_destOrigin and its dependencies.
They are not used at all.

No change in functionality.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
(WebCore::BackgroundImageGeometry::relativePhase): Deleted.
* rendering/RenderBoxModelObject.h:
(WebCore::BackgroundImageGeometry::destOrigin): Deleted.
(WebCore::BackgroundImageGeometry::setDestOrigin): Deleted.
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawMaskForRenderer):

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

6 years agoRenderBoxModelObject::calculateBackgroundImageGeometry should return BackgroundImageG...
zalan@apple.com [Tue, 24 Feb 2015 21:33:51 +0000 (21:33 +0000)]
RenderBoxModelObject::calculateBackgroundImageGeometry should return BackgroundImageGeometry.
https://bugs.webkit.org/show_bug.cgi?id=141979

Reviewed by Simon Fraser.

No change in functionality.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::getBackgroundPaintedExtent):
(WebCore::RenderBox::maskClipRect):
(WebCore::RenderBox::repaintLayerRectsForImage):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
(WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
* rendering/RenderBoxModelObject.h:

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

6 years agoSwitch BackgroundImageGeometry's m_phase from LayoutPoint to LayoutSize.
zalan@apple.com [Tue, 24 Feb 2015 20:42:41 +0000 (20:42 +0000)]
Switch BackgroundImageGeometry's m_phase from LayoutPoint to LayoutSize.
https://bugs.webkit.org/show_bug.cgi?id=141972

Reviewed by Simon Fraser.

Image geometry's phase represents distance.

No change in functionality.

* WebCore.order:
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setContentsTilePhase):
(WebCore::GraphicsLayer::contentsTilePhase):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::computePatternTransformIfNeeded):
(WebCore::TextureMapperLayer::setContentsTilePhase):
* platform/graphics/texmap/TextureMapperLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::BackgroundImageGeometry::setNoRepeatX):
(WebCore::BackgroundImageGeometry::setNoRepeatY):
(WebCore::BackgroundImageGeometry::useFixedAttachment):
(WebCore::BackgroundImageGeometry::relativePhase):
(WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
(WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
* rendering/RenderBoxModelObject.h:
(WebCore::BackgroundImageGeometry::phase):
(WebCore::BackgroundImageGeometry::setPhase):
(WebCore::BackgroundImageGeometry::setPhaseX):
(WebCore::BackgroundImageGeometry::setPhaseY):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::resetContentsRect):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawMaskForRenderer):

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

6 years agoOne more buildfix after r180575.
ossy@webkit.org [Tue, 24 Feb 2015 19:49:24 +0000 (19:49 +0000)]
One more buildfix after r180575.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::connectionDidClose):

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

6 years ago[Mac] WebKit abandons overlay scrollbar CALayers.
akling@apple.com [Tue, 24 Feb 2015 19:44:00 +0000 (19:44 +0000)]
[Mac] WebKit abandons overlay scrollbar CALayers.
<https://webkit.org/b/141943>
<rdar://problem/19932199>

Reviewed by Beth Dakin.

* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
Use NSAnimationNonblockingThreaded to ensure that NSAnimations get cleaned up after they finish.
The animation was indirectly retaining the overlay scrollbar's CALayer, causing significant
amounts of abandoned memory to accumulate over time.

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

6 years agoURTBF after 180575.
ossy@webkit.org [Tue, 24 Feb 2015 19:32:14 +0000 (19:32 +0000)]
URTBF after 180575.

* CMakeLists.txt:

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

6 years agobmalloc: Added a little more abstraction for large objects
ggaren@apple.com [Tue, 24 Feb 2015 19:12:20 +0000 (19:12 +0000)]
bmalloc: Added a little more abstraction for large objects
https://bugs.webkit.org/show_bug.cgi?id=141978

Reviewed by Sam Weinig.

Previously, each client needed to manage the boundary tags of
a large object using free functions. This patch introduces a LargeObject
class that does things a little more automatically.

* bmalloc.xcodeproj/project.pbxproj:

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::reallocate): Use the new LargeObject class.

* bmalloc/BeginTag.h:
(bmalloc::BeginTag::isInFreeList): Deleted. Moved this logic into the
LargeObject class.

* bmalloc/BoundaryTag.h:
(bmalloc::BoundaryTag::isSentinel):
(bmalloc::BoundaryTag::compactBegin):
(bmalloc::BoundaryTag::setRange):
(bmalloc::BoundaryTag::initSentinel): Added an explicit API for sentinels,
which we used to create and test for implicitly.

* bmalloc/BoundaryTagInlines.h:
(bmalloc::BoundaryTag::init):
(bmalloc::validate): Deleted.
(bmalloc::validatePrev): Deleted.
(bmalloc::validateNext): Deleted.
(bmalloc::BoundaryTag::mergeLeft): Deleted.
(bmalloc::BoundaryTag::mergeRight): Deleted.
(bmalloc::BoundaryTag::merge): Deleted.
(bmalloc::BoundaryTag::deallocate): Deleted.
(bmalloc::BoundaryTag::split): Deleted.
(bmalloc::BoundaryTag::allocate): Deleted. Moved this logic into the
LargeObject class.

* bmalloc/EndTag.h:
(bmalloc::EndTag::init):
(bmalloc::EndTag::operator=): Deleted. Re-reading this code, I found
special behavior in the assignment operator to be a surprising API.
So, I replaced the assignment operation with an explicit initializing
function.

* bmalloc/Heap.cpp:
(bmalloc::Heap::scavengeLargeRanges):
(bmalloc::Heap::allocateXLarge):
(bmalloc::Heap::findXLarge):
(bmalloc::Heap::deallocateXLarge):
(bmalloc::Heap::allocateLarge):
(bmalloc::Heap::deallocateLarge):
* bmalloc/Heap.h: No behavior changes here -- just adopting the
LargeObject interface.

* bmalloc/LargeObject.h: Added.
(bmalloc::LargeObject::operator!):
(bmalloc::LargeObject::begin):
(bmalloc::LargeObject::size):
(bmalloc::LargeObject::range):
(bmalloc::LargeObject::LargeObject):
(bmalloc::LargeObject::setFree):
(bmalloc::LargeObject::isFree):
(bmalloc::LargeObject::hasPhysicalPages):
(bmalloc::LargeObject::setHasPhysicalPages):
(bmalloc::LargeObject::isValidAndFree):
(bmalloc::LargeObject::merge):
(bmalloc::LargeObject::split):
(bmalloc::LargeObject::validateSelf):
(bmalloc::LargeObject::validate): Moved this code into a class, out of
BoundaryTag free functions.

New to the class are these features:

    (1) Every reference to an object is validated upon creation and use.

    (2) There's an explicit API for "This is a reference to an object
    that might be stale (the DoNotValidate API)".

    (3) The begin and end tags are kept in sync automatically.

* bmalloc/SegregatedFreeList.cpp:
(bmalloc::SegregatedFreeList::insert):
(bmalloc::SegregatedFreeList::takeGreedy):
(bmalloc::SegregatedFreeList::take):
* bmalloc/SegregatedFreeList.h: Adopt the LargeObject interface.

* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::grow):
* bmalloc/VMHeap.h:
(bmalloc::VMHeap::allocateLargeRange):
(bmalloc::VMHeap::deallocateLargeRange): Adopt the LargeObject interface.

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

6 years agoImplement more of the data fetching API
andersca@apple.com [Tue, 24 Feb 2015 18:55:10 +0000 (18:55 +0000)]
Implement more of the data fetching API
https://bugs.webkit.org/show_bug.cgi?id=141975

Reviewed by Andreas Kling.

Source/WebCore:

Add API for getting origins in a given session that has cached data.

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::originsWithCache):

Source/WebKit2:

* Shared/WebsiteData/WebsiteData.cpp: Added.
(WebKit::WebsiteData::Entry::encode):
(WebKit::WebsiteData::Entry::decode):
(WebKit::WebsiteData::encode):
(WebKit::WebsiteData::decode):
* Shared/WebsiteData/WebsiteData.h: Added.
Add a new WebsiteData class that will store website data. Currently it only stores
origin + website data type, but in the future it is going to store more things, like
host names that have cookies associated.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::~WebProcessProxy):
Assert that we don't have any pending fetch data callbacks.

(WebKit::WebProcessProxy::connectionDidClose):
Invoke any pending fetch website data callbacks.

(WebKit::WebProcessProxy::didFetchWebsiteData):
Grab the callback and invoke it.

(WebKit::WebProcessProxy::fetchWebsiteData):
Set up a pending callback and send a FetchWebsiteData message to the web process.

* UIProcess/WebProcessProxy.h:
Add new member.

* UIProcess/WebProcessProxy.messages.in:
Add a DidFetchWebsiteData message.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeWebProcessAccessTypeForDataFetch):
Return the web process access type for the given set of data types.

(WebKit::WebsiteDataStore::fetchData):
Set up a callback aggregator that will assemble the needed website data into a vector of website data records.

(WebKit::computeNetworkProcessAccessTypeForDataRemoval):
(WebKit::computeWebProcessAccessTypeForDataRemoval):
Rename these functions to indicate that they are about data removal.

(WebKit::WebsiteDataStore::removeData):
Append "ForDataRemoval" to function calls.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::StorageAreaMap):
Tighten types.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::fetchWebsiteData):
For now, just fetch memory cache data.

* WebProcess/WebProcess.h:
Add new members.

* WebProcess/WebProcess.messages.in:
Add FetchWebsiteData message.

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

6 years agoUse nullptr in more places in FrameView, RenderView, RenderObject
simon.fraser@apple.com [Tue, 24 Feb 2015 18:47:54 +0000 (18:47 +0000)]
Use nullptr in more places in FrameView, RenderView, RenderObject
https://bugs.webkit.org/show_bug.cgi?id=141974

Reviewed by Zalan Bujtas.

0 -> nullptr in FrameView.h/cpp, RenderView.h/cpp, RenderObject.h/cpp.

Rename FrameView::m_deferSetNeedsLayouts to FrameView::m_deferSetNeedsLayoutCount
to make it more clear that it's a count.

* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::setContentsSize):
(WebCore::FrameView::calculateScrollbarModesForLayout):
(WebCore::FrameView::layerForScrolling):
(WebCore::FrameView::layerForHorizontalScrollbar):
(WebCore::FrameView::layerForVerticalScrollbar):
(WebCore::FrameView::layerForScrollCorner):
(WebCore::FrameView::tiledBacking):
(WebCore::FrameView::scrollLayerID):
(WebCore::FrameView::layerForOverhangAreas):
(WebCore::FrameView::setWantsLayerForTopOverHangArea):
(WebCore::FrameView::setWantsLayerForBottomOverHangArea):
(WebCore::FrameView::hasCompositedContentIncludingDescendants):
(WebCore::FrameView::layoutRoot):
(WebCore::FrameView::forceLayoutParentViewIfNeeded):
(WebCore::FrameView::layout):
(WebCore::FrameView::hostWindow):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
(WebCore::FrameView::needsLayout):
(WebCore::FrameView::setNeedsLayout):
(WebCore::FrameView::enclosingScrollableArea):
(WebCore::FrameView::parentFrameView):
(WebCore::FrameView::paintControlTints):
(WebCore::FrameView::adjustPageHeightDeprecated):
(WebCore::FrameView::axObjectCache):
* page/FrameView.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::RenderObject):
(WebCore::RenderObject::nextInPreOrderAfterChildren):
(WebCore::RenderObject::previousInPreOrder):
(WebCore::RenderObject::firstLeafChild):
(WebCore::RenderObject::lastLeafChild):
(WebCore::RenderObject::traverseNext):
(WebCore::RenderObject::firstLineBlock):
(WebCore::RenderObject::containerForRepaint):
(WebCore::RenderObject::showRenderSubTreeAndMark):
(WebCore::RenderObject::localToAbsolute):
(WebCore::RenderObject::container):
* rendering/RenderObject.h:
(WebCore::RenderObject::virtualContinuation):
(WebCore::RenderObject::node):
(WebCore::RenderObject::nonPseudoNode):
(WebCore::RenderObject::localToAbsoluteQuad):
(WebCore::RenderObject::absoluteQuads):
(WebCore::RenderObject::absoluteClippedOverflowRect):
(WebCore::RenderObject::outlineBoundsForRepaint):
(WebCore::RenderObject::computeAbsoluteRepaintRect):
(WebCore::RenderObject::selectionRect):
(WebCore::RenderObject::imageChanged):
(WebCore::RenderObject::addFocusRingRects):
(WebCore::RenderObject::absoluteOutlineBounds):
* rendering/RenderView.cpp:
(WebCore::SelectionIterator::next):
(WebCore::RenderView::RenderView):
(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::pushMappingToContainer):
(WebCore::RenderView::computeRectForRepaint):
(WebCore::rendererAfterPosition):
(WebCore::RenderView::splitSelectionBetweenSubtrees):
(WebCore::RenderView::rootBackgroundIsEntirelyFixed):
* rendering/RenderView.h:

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

6 years agoTemporarily skip this test on iOS 64-bit.
dino@apple.com [Tue, 24 Feb 2015 18:31:58 +0000 (18:31 +0000)]
Temporarily skip this test on iOS 64-bit.

Rubber-stamped by Michael Saboff.

* js/script-tests/array-from.js:

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

6 years agoREGRESSION(r179429): Can't type comments in Facebook
utatane.tea@gmail.com [Tue, 24 Feb 2015 18:20:45 +0000 (18:20 +0000)]
REGRESSION(r179429): Can't type comments in Facebook
https://bugs.webkit.org/show_bug.cgi?id=141859

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

When window.Symbol is exposed to user-space pages,
Facebook's JavaScript use it (maybe, for immutable-js and React.js's unique key).
However, to work with Symbols completely, it also requires
1) Object.getOwnPropertySymbols (for mixin including Symbols)
2) the latest ES6 Iterator interface that uses Iterator.next and it returns { done: boolean, value: value }.
Since they are not landed yet, comments in Facebook don't work.

This patch introduces RuntimeFlags for JavaScriptCore.
Specifying SymbolEnabled flag under test runner and inspector to continue to work with Symbol.
And drop JavaScriptExperimentsEnabled flag
because it is no longer used and use case of this is duplicated to runtime flags.

* JavaScriptCore.order:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jsc.cpp:
(GlobalObject::javaScriptRuntimeFlags):
(GlobalObject::javaScriptExperimentsEnabled): Deleted.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::finishCreation):
(JSC::JSGlobalObject::javaScriptRuntimeFlags):
(JSC::JSGlobalObject::javaScriptExperimentsEnabled): Deleted.
* runtime/RuntimeFlags.h: Added.
(JSC::RuntimeFlags::RuntimeFlags):
(JSC::RuntimeFlags::createAllEnabled):

Source/WebCore:

Enable SymbolEnabled runtime flag in inspector context.

* ForwardingHeaders/runtime/RuntimeFlags.h: Added.
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
(WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
(WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
* bindings/js/JSWorkerGlobalScopeBase.h:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
* page/Settings.h:
* page/Settings.in:

Source/WebKit/mac:

Introduce SymbolEnabled and drop javaScriptExperimentsEnabled.
Private API, javaScriptExperimentsEnabled is dropped.

* Misc/WebNSDictionaryExtras.h:
* Misc/WebNSDictionaryExtras.m:
(-[NSMutableDictionary _webkit_setUnsignedInt:forKey:]):
* WebKit.order:
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences _setUnsignedIntValue:forKey:]):
(-[WebPreferences javaScriptRuntimeFlags]):
(-[WebPreferences setJavaScriptRuntimeFlags:]):
(-[WebPreferences setJavaScriptExperimentsEnabled:]): Deleted.
(-[WebPreferences javaScriptExperimentsEnabled]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/win:

Added Windows support.

* Interfaces/IWebPreferences.idl:
* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::javaScriptRuntimeFlags):
(WebPreferences::setJavaScriptRuntimeFlags):
(WebPreferences::isWebSecurityEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WebKit2:

Enable SymbolEnabled in inspector context.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetJavaScriptRuntimeFlags):
(WKPreferencesGetJavaScriptRuntimeFlags):
(WKPreferencesSetJavaScriptExperimentsEnabled): Deleted.
(WKPreferencesGetJavaScriptExperimentsEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRef.h:
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _javaScriptRuntimeFlags]):
(-[WKPreferences _setJavaScriptRuntimeFlags:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* mac/WebKit2.order:

Tools:

Drop javaScriptExperimentsEnabled and specify JavaScriptRuntimeFlagsAllEnabled as KJavaScriptRuntimeFlags.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

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

6 years agoUnreviewed GTK+ gardening.
rego@igalia.com [Tue, 24 Feb 2015 17:59:41 +0000 (17:59 +0000)]
Unreviewed GTK+ gardening.

This was introduced in r180555, but the test has been generalized in
r180562 and we don't need a particular expectation anymore.

* platform/gtk/fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution-expected.txt: Removed.

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

6 years agoTighten up some SecurityOrigin related code, use references where possible
andersca@apple.com [Tue, 24 Feb 2015 17:55:39 +0000 (17:55 +0000)]
Tighten up some SecurityOrigin related code, use references where possible
https://bugs.webkit.org/show_bug.cgi?id=141971

Reviewed by Antti Koivisto.

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
* Shared/SecurityOriginData.cpp:
(WebKit::SecurityOriginData::fromSecurityOrigin):
(WebKit::SecurityOriginData::securityOrigin):
* Shared/SecurityOriginData.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createTransientLocalStorageMap):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::WebIDBServerConnection):
* WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
(WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::create):
(WebKit::StorageAreaMap::StorageAreaMap):
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::dispatchLocalStorageEvent):
* WebProcess/Storage/StorageAreaMap.h:
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::storageArea):

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

6 years ago[CSS Grid Layout] Support "sparse" in auto-placed items locked to a row/column
rego@igalia.com [Tue, 24 Feb 2015 17:38:04 +0000 (17:38 +0000)]
[CSS Grid Layout] Support "sparse" in auto-placed items locked to a row/column
https://bugs.webkit.org/show_bug.cgi?id=141748

Reviewed by Sergio Villar Senin.

Source/WebCore:

The first step of grid item placement algorithm has been updated in
order to support both "sparse" and "dense" modes. Current code is always
doing a "dense" packing in this case.

See: http://dev.w3.org/csswg/css-grid/#auto-placement-algo

Test: fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Add a cursor
for each row/column and use it to place items in the right position.

LayoutTests:

New test to check "sparse" and "dense" packing mode behavior in
auto-placed items locked to a given row (or column).

* fast/css-grid-layout/grid-item-auto-placement-definite-span.html:
Extract some common styles to resources/grid.css.
* fast/css-grid-layout/grid-item-auto-placement-fixed-row-column-expected.txt: Added.
* fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html: Added.
* fast/css-grid-layout/resources/grid.css: Modified generic CSS file to
add common styles.

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

6 years ago[GTK] Layout Test accessibility/roles-exposed.html is failing
jdiggs@igalia.com [Tue, 24 Feb 2015 17:20:01 +0000 (17:20 +0000)]
[GTK] Layout Test accessibility/roles-exposed.html is failing
https://bugs.webkit.org/show_bug.cgi?id=141960

Reviewed by Martin Robinson.

Source/WebCore:

The test was failing because Gtk now uses GtkColorChooserDialog for the
color input, making the input field a button which results in the color
chooser dialog appearing. As a side effect of this change, the input now
has an accessible role of ColorWell, which is currently mapped to
ATK_ROLE_COLOR_CHOOSER (which is by definition the dialog which results
upon activating the button input field). Changed the Gtk platform mapping
to ATK_ROLE_BUTTON, leaving the Efl mapping as-is.

No new tests. Instead, updated and unskipped failing test.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):

LayoutTests:

* platform/gtk/TestExpectations: Unskip the failing test.
* platform/gtk/accessibility/roles-exposed-expected.txt: Update the expectations.

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

6 years agoCrash loading local file with WebPageProxy::loadAlternateHTMLString
commit-queue@webkit.org [Tue, 24 Feb 2015 17:11:27 +0000 (17:11 +0000)]
Crash loading local file with WebPageProxy::loadAlternateHTMLString
https://bugs.webkit.org/show_bug.cgi?id=141867

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2015-02-24
Reviewed by Anders Carlsson.

Source/WebKit2:

WebPageProxy::loadAlternateHTMLString needs to assume read access to unreachableURL as well
as baseURL, because unreachableURL will get added to the back/forward list, causing us to
crash later on when we notice the unexpected URL received in checkURLReceivedFromWebProcess.

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

Tools:

* TestWebKitAPI/Tests/WebKit2/LoadAlternateHTMLStringWithNonDirectoryURL.cpp:
(TestWebKitAPI::loadAlternateHTMLString): Split most of this test into a function so it can
be shared with the new test.
(TestWebKitAPI::TEST): Add a cross-platform test for this crash.
* TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp: Add a GTK+ test for this crash.
(testLoadAlternateHTMLForLocalPage):
(beforeAll):

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

6 years agoOur bizarre behavior on Arguments::defineOwnProperty should be deliberate rather...
fpizlo@apple.com [Tue, 24 Feb 2015 17:08:06 +0000 (17:08 +0000)]
Our bizarre behavior on Arguments::defineOwnProperty should be deliberate rather than a spaghetti incident
https://bugs.webkit.org/show_bug.cgi?id=141951

Reviewed by Benjamin Poulain.

This patch has no behavioral change, but it simplifies a bunch of wrong code. The code is
still wrong in exactly the same way, but at least it's obvious what's going on. The wrongness
is covered by this bug: https://bugs.webkit.org/show_bug.cgi?id=141952.

* runtime/Arguments.cpp:
(JSC::Arguments::copyBackingStore): We should only see the arguments token; assert otherwise. This works because if the GC sees the butterfly token it calls the JSObject::copyBackingStore method directly.
(JSC::Arguments::defineOwnProperty): Make our bizarre behavior deliberate rather than an accident of a decade of patches.
* tests/stress/arguments-bizarre-behavior.js: Added.
(foo):
* tests/stress/arguments-bizarre-behaviour-disable-enumerability.js: Added. My choice of spellings of the word "behavio[u]r" is almost as consistent as our implementation of arguments.
(foo):
* tests/stress/arguments-custom-properties-gc.js: Added. I added this test because at first I was unsure if we GCd arguments correctly.
(makeBaseArguments):
(makeArray):
(cons):

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

6 years ago[GTK] Fonts loaded via @font-face look bad
commit-queue@webkit.org [Tue, 24 Feb 2015 17:07:46 +0000 (17:07 +0000)]
[GTK] Fonts loaded via @font-face look bad
https://bugs.webkit.org/show_bug.cgi?id=140994

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2015-02-24
Reviewed by Martin Robinson.

We've had several complaints that woff fonts look bad on some websites. This seems to be a
combination of multiple issues. For one, we don't look at Fontconfig settings at all when
creating a web font. This commit changes FontPlatformData::initializeWithFontFace to instead
use sane default settings from Fontconfig when loading a web font, rather than accepting the
default settings from GTK+, which are normally overridden by Fontconfig when loading system
fonts. However, we will hardcode the hinting setting for web fonts to always force use of
the light autohinter, so that we do not use a font's native hints. This avoids compatibility
issues when fonts with poor native hinting are only tested in browsers that do not use the
native hints. It also allows us to sidestep future security vulnerabilities in FreeType's
bytecode interpreter.

The net result of this is that there should be little noticable difference if you have GTK+
set to use slight hinting (which forces use of the autohinter) unless you have customized
Fontconfig configuration, but a dramatic improvement with particular fonts if you use medium
or full hinting. This should reduce complaints about our font rendering on "fancy sites."

No new tests, since the affected fonts we've found are not freely redistributable.

* platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::FontCustomPlatformData::FontCustomPlatformData): Force web fonts to be autohinted.
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::getDefaultCairoFontOptions): Renamed to disambiguate.
(WebCore::getDefaultFontconfigOptions): Added.
(WebCore::FontPlatformData::initializeWithFontFace): Always call
FontPlatformData::setCairoOptionsFromFontConfigPattern. If the FontPlatformData was not
created with an FcPattern (e.g. because this is a web font), call
getDefaultFontconfigOptions to get a sane default FcPattern.
(WebCore::FontPlatformData::setOrientation): Renamed call to getDefaultCairoFontOptions.
(WebCore::getDefaultFontOptions): Deleted.

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

6 years ago[CSS Grid Layout] Use Ahem in grid-item-order-in-content-sized-columns-resolution...
rego@igalia.com [Tue, 24 Feb 2015 17:07:33 +0000 (17:07 +0000)]
[CSS Grid Layout] Use Ahem in grid-item-order-in-content-sized-columns-resolution.html
https://bugs.webkit.org/show_bug.cgi?id=141970

Reviewed by Sergio Villar Senin.

Without using Ahem we were having different results depending on the
platform.

* fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution-expected.txt:
  Update results to the new values.
* fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution.html:
  Use Ahem.

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

6 years ago[Cocoa] Break internal reference cycle in WebCore::Font.
akling@apple.com [Tue, 24 Feb 2015 16:46:18 +0000 (16:46 +0000)]
[Cocoa] Break internal reference cycle in WebCore::Font.
<https://webkit.org/b/141941>
<rdar://problem/19650570>

Reviewed by Antti Koivisto.

The Cocoa implementation of Font::platformCreateScaledFont() tried to be smart and use the FontCache.
This didn't work out well when scaling a 0pt Font, since scaling 0pt by any factor will return 0pt.

We'd have a 0pt font, scale it by 0.7 to get a small-caps variant, and then cache that small-caps
variant (really "this") in Font::m_derivedData->smallCaps.

Fix this by having Cocoa Font scaling do exactly what other platforms do: create a new Font every time.
This stops us from accumulating tons of abandoned Font objects over time.

* platform/graphics/Font.cpp:
(WebCore::Font::verticalRightOrientationFont):
(WebCore::Font::uprightOrientationFont):
(WebCore::Font::smallCapsFont):
(WebCore::Font::emphasisMarkFont):
(WebCore::Font::brokenIdeographFont):
(WebCore::Font::nonSyntheticItalicFont): Add assertions to guard against reference cycles inside a Font.

* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformCreateScaledFont): Always create a new Font when scaling an existing Font to a different size.

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

6 years ago[iOS] Gardening: Mark svg/canvas/canvas-global-alpha-svg.html as ImageOnlyFailure
ddkilzer@apple.com [Tue, 24 Feb 2015 15:32:32 +0000 (15:32 +0000)]
[iOS] Gardening: Mark svg/canvas/canvas-global-alpha-svg.html as ImageOnlyFailure

* platform/ios-simulator/TestExpectations:

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

6 years ago[Streams API] Reading ReadableStream ready and closed attributes should not always...
youenn.fablet@crf.canon.fr [Tue, 24 Feb 2015 14:48:34 +0000 (14:48 +0000)]
[Streams API] Reading ReadableStream ready and closed attributes should not always create a new promise
https://bugs.webkit.org/show_bug.cgi?id=141650

Reviewed by Benjamin Poulain.

Source/WebCore:

The JSPromiseDeferred objects returned by JSReadableStream::ready and JSReadableStream::closed should be stored somewhere.
This patch stores them as private slots in JSReadableStream.
This is close to the description in https://streams.spec.whatwg.org/#rs-internal-slots.

An alternative would be to have these objects as JSReadableStream class members, thus modifying the binding generator.
That may be the cleanest solution, especially if other APIs express the same need.
Another alternative is to store DeferredWrapper in ReadableStream objects.
But it is currently preferred to keep DeferredWrapper in bindings/js code.

Added new constructor for DeferredWrapper to use these stored values.
Updated ready and closed methods to use that new constructor.
Changes are covered by new test in streams/readablestream-constructor.html.

* bindings/js/JSDOMPromise.cpp:
(WebCore::DeferredWrapper::DeferredWrapper):
* bindings/js/JSDOMPromise.h:
* bindings/js/JSReadableStreamCustom.cpp:
(WebCore::closedPromiseSlotName):
(WebCore::getOrCreatePromiseDeferredFromObject):
(WebCore::readyPromiseSlotName):
(WebCore::JSReadableStream::ready):
(WebCore::JSReadableStream::closed):
* bindings/js/ReadableStreamJSSource.cpp:
(WebCore::setInternalSlotToObject):
(WebCore::getInternalSlotFromObject):
* bindings/js/ReadableStreamJSSource.h:

LayoutTests:

* streams/readablestream-constructor-expected.txt:
* streams/readablestream-constructor.html: Added test to ensure ready and closed always return the same promise object.

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

6 years agoAlways serialize :lang()'s arguments to strings
diorahman@rockybars.com [Tue, 24 Feb 2015 14:21:28 +0000 (14:21 +0000)]
Always serialize :lang()'s arguments to strings
https://bugs.webkit.org/show_bug.cgi?id=141944

Reviewed by Benjamin Poulain.

Source/WebCore:

As specified in [1] :lang()'s arguments are always serialized to strings.

[1] http://dev.w3.org/csswg/cssom/#serializing-selectors

Related tests are updated.

* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::setLangArgumentList):
* css/CSSParserValues.h:
(WebCore::CSSParserString::init):
(WebCore::CSSParserString::clear):
(WebCore::CSSParserString::tokenType): Deleted.
(WebCore::CSSParserString::setTokenType): Deleted.
* css/CSSSelector.cpp:
(WebCore::appendLangArgumentList):
(WebCore::CSSSelector::setLangArgumentList):
* css/CSSSelector.h:
(WebCore::CSSSelector::langArgumentList):
* css/SelectorCheckerTestFunctions.h:
(WebCore::matchesLangPseudoClass):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):

LayoutTests:

Some tests results are updated to reflect the always serialize
:lang()'s arguments to strings.

* fast/css/css-lang-selector-with-string-arguments-text-expected.txt:
* fast/css/css-lang-selector-with-string-arguments-text.html:
* fast/css/parsing-css-lang-expected.txt:
* fast/css/parsing-css-lang.html:
* fast/css/css-selector-text-expected.txt:
* fast/css/css-selector-text.html:
* fast/css/css-set-selector-text-expected.txt:
* fast/css/css-set-selector-text.html:
* fast/dom/css-selectorText-expected.txt:

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

6 years ago[iOS] Implement WTR::activateFonts() to fix missing fonts in WebKit2 test runs
ddkilzer@apple.com [Tue, 24 Feb 2015 13:02:16 +0000 (13:02 +0000)]
[iOS] Implement WTR::activateFonts() to fix missing fonts in WebKit2 test runs
<http://webkit.org/b/141900>

Tools:

Reviewed by Myles C. Maxfield.

* WebKitTestRunner/Configurations/InjectedBundle.xcconfig:
(OTHER_LDFLAGS_BASE): Link to CoreText.framework.
* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm: Rename from Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm.
- Rename to share code with iOS.
- Add USE(APPKIT) around AppKit-specific headers and code.
- Fix a check-webkit-style warning.
* WebKitTestRunner/InjectedBundle/ios/ActivateFontsIOS.mm: Remove.
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
- Rename mac/ActivateFonts.mm to cocoa/ActivateFontsCocoa.mm.
- Remove ios/ActivateFontsIOS.mm.
- Fix InjectedBundle/cocoa group to represent the directory on
  disk.  Includes a change to InjectedBundlePageCocoa.mm.

LayoutTests:

Rebaseline ios-simulator-wk2 results after fixing font
registration for WebKitTestRunner.app.

* platform/ios-simulator-wk1/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:
- Shuffle css2.1 test expectations to make tests pass.

* platform/ios-simulator/TestExpectations:
- Shuffle css2.1 test expectations to make tests pass.
- Mark a few ref tests as image-only failures via platform/mac.

* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-height-002-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-height-007-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-height-009-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-max-height-002-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-max-height-007-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-max-height-009-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-001-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-002-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-003-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-004-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-005-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-006-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-007-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-008-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-009-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-010-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-011-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-012-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-013-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-014-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-016-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-017-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-018-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-019-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-020-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-021-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-022-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-023-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/absolute-non-replaced-width-024-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-001-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-004a-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-004b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-004c-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-004d-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-004e-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-004f-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-005a-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-005b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-005c-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-005d-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-007-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-009a-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-009b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-009e-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-containing-block-initial-009f-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-non-replaced-width-margin-000-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/abspos-replaced-width-margin-000-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/block-non-replaced-height-005-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/block-non-replaced-height-006-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/20110323/block-non-replaced-width-007-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/block-replaced-width-001-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/block-replaced-width-006-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/c543-txt-decor-000-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/empty-inline-002-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/float-non-replaced-width-006-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/float-non-replaced-width-007-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/float-non-replaced-width-008-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/float-non-replaced-width-009-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/float-non-replaced-width-010-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/float-non-replaced-width-011-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/float-non-replaced-width-012-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/inline-block-non-replaced-width-001-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/inline-block-non-replaced-width-002-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/inline-block-non-replaced-width-003-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/inline-block-non-replaced-width-004-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/inline-non-replaced-height-002-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/inline-non-replaced-height-003-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/inline-non-replaced-width-001-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/inline-non-replaced-width-002-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/20110323/replaced-intrinsic-002-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/20110323/replaced-intrinsic-ratio-001-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t040302-c61-ex-len-00-b-a-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t040302-c61-rel-len-00-b-ag-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t040303-c62-percent-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t040306-c63-color-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0801-c412-hz-box-00-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5501-imrgn-t-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5501-mrgn-t-00-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5502-imrgn-r-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5502-imrgn-r-01-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5502-imrgn-r-02-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5502-imrgn-r-03-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5502-imrgn-r-04-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5502-imrgn-r-05-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5502-imrgn-r-06-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5502-mrgn-r-00-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5502-mrgn-r-01-c-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5502-mrgn-r-03-c-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t0803-c5503-imrgn-b-00-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5503-mrgn-b-00-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5504-imrgn-l-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5504-imrgn-l-01-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5504-imrgn-l-02-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5504-imrgn-l-03-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5504-imrgn-l-04-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5504-imrgn-l-05-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5504-imrgn-l-06-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5504-mrgn-l-00-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5504-mrgn-l-01-c-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5504-mrgn-l-03-c-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t0803-c5505-imrgn-00-a-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5505-mrgn-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5505-mrgn-01-e-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0803-c5505-mrgn-03-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5506-ipadn-t-00-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5506-ipadn-t-01-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5506-ipadn-t-02-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5506-padn-t-00-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5507-ipadn-r-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5507-ipadn-r-01-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5507-ipadn-r-02-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5507-ipadn-r-03-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5507-ipadn-r-04-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5507-padn-r-00-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5507-padn-r-01-c-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5507-padn-r-03-f-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t0804-c5508-ipadn-b-00-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5508-ipadn-b-01-f-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5508-ipadn-b-02-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5508-ipadn-b-03-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5509-ipadn-l-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5509-ipadn-l-01-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5509-ipadn-l-02-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5509-ipadn-l-03-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5509-ipadn-l-04-f-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5509-padn-l-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5509-padn-l-01-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5509-padn-l-03-f-g-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t0804-c5510-ipadn-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5510-padn-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5510-padn-01-e-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0804-c5510-padn-02-f-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t09-c5526c-display-00-e-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t090204-display-change-01-b-ao-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t090402-c42-ibx-pad-00-d-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0905-c5525-fltblck-00-d-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0905-c5525-fltclr-00-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0905-c5525-fltcont-00-d-g-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t0905-c5525-fltinln-00-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0905-c5525-fltmrgn-00-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t0905-c5525-fltwidth-00-c-g-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t0905-c5525-fltwidth-03-c-g-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t0905-c5525-fltwrap-00-b-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t0905-c5526-fltclr-00-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t090501-c414-flt-01-b-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t090501-c414-flt-03-b-g-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t1001-abs-pos-cb-01-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1001-abs-pos-cb-02-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1001-abs-pos-cb-03-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1001-abs-pos-cb-04-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1001-abs-pos-cb-05-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1001-abs-pos-cb-06-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1001-abs-pos-cb-07-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1001-abs-pos-cb-08-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1001-abs-pos-cb-09-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t100303-c412-blockw-00-d-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t1004-c43-rpl-bbx-00-d-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t1004-c43-rpl-ibx-00-d-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t1008-c44-ln-box-00-d-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t1008-c44-ln-box-01-d-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t1008-c44-ln-box-02-d-ag-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t1008-c44-ln-box-03-d-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t100801-c42-ibx-ht-00-d-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t100801-c544-valgn-00-a-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t100801-c544-valgn-01-d-ag-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t100801-c544-valgn-02-d-agi-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t100801-c544-valgn-03-d-agi-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t100801-c544-valgn-04-d-agi-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t100801-c548-leadin-00-d-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t100801-c548-ln-ht-00-c-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t100801-c548-ln-ht-01-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t100801-c548-ln-ht-02-b-ag-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t100801-c548-ln-ht-03-d-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t100801-c548-ln-ht-04-d-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t1202-counter-08-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1202-counter-13-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1202-counter-14-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1202-counters-08-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1202-counters-13-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1202-counters-14-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1205-c566-list-stl-00-e-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t1205-c566-list-stl-01-c-g-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t140201-c534-bgre-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t140201-c534-bgre-01-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t140201-c534-bgreps-00-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t140201-c534-bgreps-01-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t140201-c534-bgreps-02-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t140201-c534-bgreps-03-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t140201-c534-bgreps-04-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t140201-c534-bgreps-05-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t140201-c536-bgpos-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t140201-c536-bgpos-01-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t140201-c537-bgfxps-00-c-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t1507-c526-font-sz-01-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t1507-c526-font-sz-02-b-a-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t1507-c526-font-sz-03-f-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t1508-c527-font-00-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1508-c527-font-01-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1508-c527-font-02-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1508-c527-font-03-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1508-c527-font-04-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1508-c527-font-05-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1508-c527-font-06-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1508-c527-font-07-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1508-c527-font-08-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1508-c527-font-09-b-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1508-c527-font-10-c-expected.txt: Added.
* platform/ios-simulator-wk2/css2.1/t1601-c547-indent-00-b-a-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t1602-c43-center-00-d-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t1604-c542-letter-sp-00-b-a-expected.txt: Updated.
* platform/ios-simulator-wk2/css2.1/t1604-c542-letter-sp-01-b-a-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t1605-c545-txttrans-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/css2.1/t1606-c562-white-sp-00-b-ag-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/basic/010-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/basic/min-pref-width-nowrap-floats-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/float/004-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/float/005-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/float/006-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/float/float-not-removed-from-next-sibling3-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/float/float-not-removed-from-next-sibling4-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/lineboxcontain/block-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/lineboxcontain/block-glyphs-replaced-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/lineboxcontain/block-replaced-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/lineboxcontain/font-replaced-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/lineboxcontain/glyphs-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/lineboxcontain/inline-box-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/lineboxcontain/inline-box-replaced-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/lineboxcontain/inline-box-vertical-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/lineboxcontain/inline-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/lineboxcontain/inline-replaced-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/lineboxcontain/none-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/lineboxcontain/parsing-invalid-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/margin-collapse/006-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/margin-collapse/030-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/margin-collapse/031-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/margin-collapse/037-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/margin-collapse/038-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/margin-collapse/055-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/margin-collapse/block-inside-inline/006-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/positioning/002-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/positioning/vertical-lr/002-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/block/positioning/vertical-rl/002-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/compact/002-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/css-generated-content/nested-tables-with-before-after-content-crash-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/css/font-face-unicode-range-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/css/font-weight-1-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/css/line-after-floating-div-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/dynamic/first-letter-display-change-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/inline-block/002-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/inline/continuation-outlines-with-layers-2-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/inline/justify-emphasis-inline-box-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/line-grid/line-align-left-edges-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/line-grid/line-align-right-edges-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/line-grid/line-grid-contains-value-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/line-grid/line-grid-into-columns-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/multicol/client-rects-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/multicol/client-rects-spanners-complex-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/multicol/client-rects-spanners-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/multicol/newmulticol/client-rects-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/multicol/span/clone-flexbox-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/multicol/span/clone-summary-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/multicol/span/span-as-immediate-columns-child-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/ruby/ruby-base-merge-block-children-crash-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/ruby/select-ruby-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/international/text-spliced-font-expected.txt: Updated.
* platform/ios-simulator-wk2/fast/text/whitespace/002-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/whitespace/003-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/whitespace/004-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/whitespace/005-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/whitespace/006-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/whitespace/007-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/whitespace/008-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/whitespace/009-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/whitespace/010-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/whitespace/011-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/whitespace/012-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/whitespace/015-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/whitespace/016-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/text/whitespace/018-expected.txt: Removed.
- Add, update or remove platform-specific results as needed.

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

6 years ago[iOS] Gardening: Clean up some failing WK2 tests
ddkilzer@apple.com [Tue, 24 Feb 2015 13:01:54 +0000 (13:01 +0000)]
[iOS] Gardening: Clean up some failing WK2 tests

* platform/ios-simulator/TestExpectations:
- svg/as-image/svg-image-with-data-uri-from-canvas.html: Mark as
  ImageOnlyFailure since it has the same difference of 0.02% on
  every run.

* platform/ios-simulator/fast/attachment/attachment-disabled-rendering-expected.txt: Add.
* platform/ios-simulator/fast/attachment/attachment-rendering-expected.txt: Add.
* platform/ios-simulator/fast/multicol/span/span-as-immediate-columns-child-expected.txt: Update.
- Add or update platform-specific results.

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

6 years agoUnreviewed GTK+ Gardening 24th February
commit-queue@webkit.org [Tue, 24 Feb 2015 12:21:44 +0000 (12:21 +0000)]
Unreviewed GTK+ Gardening 24th February
https://bugs.webkit.org/show_bug.cgi?id=141964

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-02-24

* platform/gtk/TestExpectations:
* platform/gtk/fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution-expected.txt: Added. Rebaselined after r180107. (This revision updates expectations on mac platform but it doesn't do it in any other platform).

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

6 years ago Give TemporaryChange for m_inLoadPendingImages assertion a name so it actually...
antti@apple.com [Tue, 24 Feb 2015 11:38:53 +0000 (11:38 +0000)]
   Give TemporaryChange for m_inLoadPendingImages assertion a name so it actually does something.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingImages):

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

6 years ago[EFL] Add message APIs to communicate between ewk_context and extensions
ryuan.choi@navercorp.com [Tue, 24 Feb 2015 11:02:14 +0000 (11:02 +0000)]
[EFL] Add message APIs to communicate between ewk_context and extensions
https://bugs.webkit.org/show_bug.cgi?id=137660

Reviewed by Gyuyoung Kim.

* PlatformEfl.cmake: Added dependencies for ewk2UnitTestExtensionSample
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
(EwkContext::didReceiveMessageFromInjectedBundle):
(EwkContext::setMessageFromExtensionCallback):
(EwkContext::processReceivedMessageFromInjectedBundle):
(ewk_context_message_post_to_extensions):
(ewk_context_message_from_extensions_callback_set):
(EwkContext::didReceiveSynchronousMessageFromInjectedBundle):
Deleted to split synchronouse message APIs from asynchronuous message APIs.
ewebkit will not support this until there are requirements.
(EwkContext::setMessageFromInjectedBundleCallback): Renamed to setMessageFromExtensionCallback.
(ewk_context_message_post_to_injected_bundle): Renamed to ewk_context_message_post_to_extensions.
(ewk_context_message_from_injected_bundle_callback_set): Renamed to ewk_context_message_from_injected_bundle_callback_set.
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
Improved test case for ewk_context_new_with_extensions_path using the message APIs.
(EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
(EWK2UnitTest::EWK2UnitTestBase::SetUp):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
(EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample): Deleted.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
* UIProcess/API/efl/tests/extensions/extension_sample.cpp:
Improved test case for ewk_context_new_with_extensions_path using the message APIs.
* UIProcess/API/efl/tests/test_ewk2_context.cpp: Ditto.
(EWK2ContextTestWithExtension::messageReceivedCallback):
(EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
(TEST_F):
* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
(toEwkExtendion):
(EwkExtension::EwkExtension):
(EwkExtension::didCreatePage):
(EwkExtension::willDestroyPage):
(EwkExtension::didReceiveMessage):
(EwkExtension::didReceiveMessageToPage):
(ewk_extension_message_post): Implemented to post message to ewk_context.
* WebProcess/InjectedBundle/API/efl/ewk_extension.h:
* WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
(EwkExtension::bundle):
* WebProcess/efl/ExtensionManagerEfl.cpp:
(WebKit::ExtensionManagerEfl::initialize):
Fixed the bug when there are different shared objects in extension path.
This is spotted while improving test case.

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

6 years agoUnreviewed, EFL daily gardening 24th Feb.
gyuyoung.kim@samsung.com [Tue, 24 Feb 2015 08:57:47 +0000 (08:57 +0000)]
Unreviewed, EFL daily gardening 24th Feb.

* platform/efl/TestExpectations:

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

6 years agoUnreviewed, rolling out r180547 and r180550.
commit-queue@webkit.org [Tue, 24 Feb 2015 07:27:24 +0000 (07:27 +0000)]
Unreviewed, rolling out r180547 and r180550.
https://bugs.webkit.org/show_bug.cgi?id=141957

Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).

Reverted changesets:

"REGRESSION(r179429): Can't type comments in Facebook"
https://bugs.webkit.org/show_bug.cgi?id=141859
http://trac.webkit.org/changeset/180547

"Constructor returning null should construct an object instead
of null"
https://bugs.webkit.org/show_bug.cgi?id=141640
http://trac.webkit.org/changeset/180550

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

6 years agoConstructor returning null should construct an object instead of null
utatane.tea@gmail.com [Tue, 24 Feb 2015 05:47:22 +0000 (05:47 +0000)]
Constructor returning null should construct an object instead of null
https://bugs.webkit.org/show_bug.cgi?id=141640

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

When constructor code doesn't return object, constructor should return `this` object instead.
Since we used `op_is_object` for this check and `op_is_object` is intended to be used for `typeof`,
it allows `null` as an object.
This patch fixes it by introducing an new bytecode `op_is_object_or_null` for `typeof` use cases.
Instead, constructor uses simplified `is_object`.

As a result, `op_is_object` becomes fairly simple. So we introduce optimization for `op_is_object`.

1. LLInt and baseline JIT support `op_is_object` as a fast path.
2. DFG abstract interpreter support `op_is_object`. And recognize its speculated type and read-write effects.
3. DFG introduces inlined asm for `op_is_object` rather than calling a C++ function.
4. FTL lowers DFG's IsObject into LLVM IR.

And at the same time, this patch fixes isString / isObject predicate used for `op_is_object` and others
in LLInt, JIT, DFG and FTL.
Before introducing ES6 Symbol, JSCell is only used for object and string in user observable area.
So in many places, when the cell is not object, we recognize it as a string, and vice versa.
However, now ES6 Symbol is implemented as a JSCell, this assumption is broken.
So this patch stop using !isString as isObject.
To check whether a cell is an object, instead of seeing that structure ID of a cell is not stringStructure,
we examine typeInfo in JSCell.

* JavaScriptCore.order:
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFor):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitEqualityOp):
(JSC::BytecodeGenerator::emitReturn):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):

IsObject operation only touches JSCell typeInfoType.
And this value would not be changed through structure transition.
As a result, IsObject can report that it doesn't read any information.

* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):

Just like IsString, IsObject is also fixed up.

* dfg/DFGHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGHeapLocation.h:
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
(JSC::DFG::SpeculativeJIT::compileStringToUntypedEquality):
(JSC::DFG::SpeculativeJIT::compileStringIdentToNotStringVarEquality):
(JSC::DFG::SpeculativeJIT::compileToStringOnCell):
(JSC::DFG::SpeculativeJIT::speculateObject):
(JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
(JSC::DFG::SpeculativeJIT::speculateString):
(JSC::DFG::SpeculativeJIT::speculateNotStringVar):
(JSC::DFG::SpeculativeJIT::emitSwitchChar):
(JSC::DFG::SpeculativeJIT::emitSwitchString):
(JSC::DFG::SpeculativeJIT::branchIsObject):
(JSC::DFG::SpeculativeJIT::branchNotObject):
(JSC::DFG::SpeculativeJIT::branchIsString):
(JSC::DFG::SpeculativeJIT::branchNotString):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileToString):
(JSC::FTL::LowerDFGToLLVM::compileIsObject):
(JSC::FTL::LowerDFGToLLVM::compileIsObjectOrNull):
(JSC::FTL::LowerDFGToLLVM::speculateTruthyObject):
(JSC::FTL::LowerDFGToLLVM::equalNullOrUndefined):
(JSC::FTL::LowerDFGToLLVM::isObject):
(JSC::FTL::LowerDFGToLLVM::isNotObject):
(JSC::FTL::LowerDFGToLLVM::isNotString):
(JSC::FTL::LowerDFGToLLVM::speculateNonNullObject):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::emitJumpIfCellObject):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_to_primitive):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::compileOpStrictEq):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
* runtime/Operations.cpp:
(JSC::jsIsObjectTypeOrNull):
(JSC::jsIsObjectType): Deleted.
* runtime/Operations.h:

LayoutTests:

* js/dfg-to-primitive-pass-symbol-expected.txt: Added.
* js/dfg-to-primitive-pass-symbol.html: Added.
* js/dom/constructor-with-return-masquerades-expected.txt: Added.
* js/dom/constructor-with-return-masquerades.html: Added.
* js/dom/script-tests/constructor-with-return-masquerades.js: Added.
(Constructor):

Follow the old ret_object_or_this semantics.
When constructor returns an object that masquerades as undefined, we see it as an object.

* js/regress/constructor-with-return-expected.txt: Added.
* js/regress/constructor-with-return.html: Added.
* js/regress/script-tests/constructor-with-return.js: Added.
(Test):

When constructor doesn't return an object, `this` should be returned instead.
In this test, we check all primitives. And test object, array and wrappers.

* js/script-tests/dfg-to-primitive-pass-symbol.js: Added.
(toPrimitiveTarget):
(doToPrimitive):

op_to_primitive operation passes Symbol in fast path.

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

6 years agoDisable font loading events until our implementation gets updated to match the latest...
rniwa@webkit.org [Tue, 24 Feb 2015 05:01:15 +0000 (05:01 +0000)]
Disable font loading events until our implementation gets updated to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=141938

Reviewed by Andreas Kling.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Revert r173531 for now since our implementation is outdated.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

LayoutTests:

* TestExpectations:
* platform/mac/TestExpectations:

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

6 years agoEventHandler references deleted Scrollbar
bfulgham@apple.com [Tue, 24 Feb 2015 04:09:21 +0000 (04:09 +0000)]
EventHandler references deleted Scrollbar
https://bugs.webkit.org/show_bug.cgi?id=141931
<rdar://problem/19915210>

Reviewed by Tim Horton.

Tested by scrollbars/overflow-custom-scrollbar-crash.html

Update the EventHandler class to use a WeakPtr to reference the
last used Scrollbar, rather than retaining the Scrollbar and
artificially extending its life. This keeps the EventHandler
state in proper sync with the state of the render tree, and
avoids cases where we have destroyed a ScrollableArea (and
Scrollbar) but are still sending messages to a fake zombie
version of the element.

* page/EventHandler.cpp:
(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::updateMouseEventTargetNode):
(WebCore::EventHandler::updateLastScrollbarUnderMouse):
* page/EventHandler.h:
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::Scrollbar): Initialize WeakPtrFactory.
* platform/Scrollbar.h:
(WebCore::Scrollbar::createWeakPtr): Added,

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

6 years agoREGRESSION(r179429): Can't type comments in Facebook
utatane.tea@gmail.com [Tue, 24 Feb 2015 03:47:29 +0000 (03:47 +0000)]
REGRESSION(r179429): Can't type comments in Facebook
https://bugs.webkit.org/show_bug.cgi?id=141859

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

When window.Symbol is exposed to user-space pages,
Facebook's JavaScript use it (maybe, for immutable-js and React.js's unique key).
However, to work with Symbols completely, it also requires
1) Object.getOwnPropertySymbols (for mixin including Symbols)
2) the latest ES6 Iterator interface that uses Iterator.next and it returns { done: boolean, value: value }.
Since they are not landed yet, comments in Facebook don't work.

This patch introduces RuntimeFlags for JavaScriptCore.
Specifying SymbolEnabled flag under test runner and inspector to continue to work with Symbol.
And drop JavaScriptExperimentsEnabled flag
because it is no longer used and use case of this is duplicated to runtime flags.

* JavaScriptCore.order:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jsc.cpp:
(GlobalObject::javaScriptRuntimeFlags):
(GlobalObject::javaScriptExperimentsEnabled): Deleted.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::finishCreation):
(JSC::JSGlobalObject::javaScriptRuntimeFlags):
(JSC::JSGlobalObject::javaScriptExperimentsEnabled): Deleted.
* runtime/RuntimeFlags.h: Added.
(JSC::RuntimeFlags::RuntimeFlags):
(JSC::RuntimeFlags::createAllEnabled):

Source/WebCore:

Enable SymbolEnabled runtime flag in inspector context.

* ForwardingHeaders/runtime/RuntimeFlags.h: Added.
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
(WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
(WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
* bindings/js/JSWorkerGlobalScopeBase.h:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
* page/Settings.h:
* page/Settings.in:

Source/WebKit/mac:

Introduce SymbolEnabled and drop javaScriptExperimentsEnabled.
Private API, javaScriptExperimentsEnabled is dropped.

* Misc/WebNSDictionaryExtras.h:
* Misc/WebNSDictionaryExtras.m:
(-[NSMutableDictionary _webkit_setUnsignedInt:forKey:]):
* WebKit.order:
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences _setUnsignedIntValue:forKey:]):
(-[WebPreferences javaScriptRuntimeFlags]):
(-[WebPreferences setJavaScriptRuntimeFlags:]):
(-[WebPreferences setJavaScriptExperimentsEnabled:]): Deleted.
(-[WebPreferences javaScriptExperimentsEnabled]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Enable SymbolEnabled in inspector context.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetJavaScriptRuntimeFlags):
(WKPreferencesGetJavaScriptRuntimeFlags):
(WKPreferencesSetJavaScriptExperimentsEnabled): Deleted.
(WKPreferencesGetJavaScriptExperimentsEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRef.h:
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _javaScriptRuntimeFlags]):
(-[WKPreferences _setJavaScriptRuntimeFlags:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* mac/WebKit2.order:

Tools:

Drop javaScriptExperimentsEnabled and specify JavaScriptRuntimeFlagsAllEnabled as KJavaScriptRuntimeFlags.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

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

6 years agoSet the semantic origin of delayed SetLocal to the Bytecode that originated it
benjamin@webkit.org [Tue, 24 Feb 2015 03:33:01 +0000 (03:33 +0000)]
Set the semantic origin of delayed SetLocal to the Bytecode that originated it
https://bugs.webkit.org/show_bug.cgi?id=141727

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-02-23
Reviewed by Filip Pizlo.

Previously, delayed SetLocals would have the NodeOrigin of the next
bytecode. This was because delayed SetLocal are...delayed... and
currentCodeOrigin() is the one where the node is emitted.

This made debugging a little awkward since the OSR exits on SetLocal
were reported for the next bytecode. This patch changes the semantic
origin to keep the original bytecode.

From benchmarks, this looks like it could be a tiny bit faster
but it likely just noise.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::setDirect):
(JSC::DFG::ByteCodeParser::setLocal):
(JSC::DFG::ByteCodeParser::setArgument):
(JSC::DFG::ByteCodeParser::currentNodeOrigin):
(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal):
(JSC::DFG::ByteCodeParser::DelayedSetLocal::execute):

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

6 years agoRemove DFGNode::predictHeap()
benjamin@webkit.org [Tue, 24 Feb 2015 03:32:03 +0000 (03:32 +0000)]
Remove DFGNode::predictHeap()
https://bugs.webkit.org/show_bug.cgi?id=141864

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

* dfg/DFGNode.h:
(JSC::DFG::Node::predictHeap): Deleted.
Unused code.

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

6 years agoCSS JIT: add support for case-insensitive attribute matching
benjamin@webkit.org [Tue, 24 Feb 2015 03:31:08 +0000 (03:31 +0000)]
CSS JIT: add support for case-insensitive attribute matching
https://bugs.webkit.org/show_bug.cgi?id=141880

Reviewed by Andreas Kling.

Source/WebCore:

The value matching now has 3 cases:
1) Case-sensitive.
2) Case-insensitive.
3) Legacy HTML Case-insensitive.

The information to determine the case is split over 2 source:
-To know if explicit case-insensitive is needed, we need to ask the selector
 for attributeValueMatchingIsCaseInsensitive().
-To know if the legacy HTML behavior is needed, we need to test the attribute
 name filter with HTMLDocument::isCaseSensitiveAttribute().

I decided to perform all those checks at the fragment creation step.
This makes the register requirements and code generation more explicit.

From there, everything is easy: switch() on the type of matching needed,
and generate the code. The new case-insensitive case is a simplified version
of the legacy HTML behavior without runtime check for the element type.

Tests: fast/css/implicitly-case-insensitive-attribute-with-svg.html
       fast/selectors/case-insensitive-attribute-register-requirement-1.html
       fast/selectors/case-insensitive-attribute-register-requirement-2.html
       fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::attributeSelectorCaseSensitivity):
(WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
(WebCore::SelectorCompiler::AttributeMatchingInfo::attributeCaseSensitivity):
(WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch): Deleted.
(WebCore::SelectorCompiler::constructFragmentsInternal):
Compute the type of value matching and store it on the AttributeMatchingInfo
when creating the fragment.

(WebCore::SelectorCompiler::minimumRegisterRequirements):
(WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
(WebCore::SelectorCompiler::attributeValueTestingRequiresCaseFoldingRegister): Deleted.
In general, AttributeCaseSensitivity::CaseInsensitive does not require an extra
register. I have made an exception for generateElementAttributeValueExactMatching()
for simplicity. I use that register to load the StringImpl of the attribute
being tested, that way I can use WTF::equalIgnoringCaseNonNull() directly.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
Matching itself is just function calls. Unlike AttributeCaseSensitivity::HTMLLegacyCaseInsensitive,
the behavior is consistent between XML and HTML.

LayoutTests:

* fast/css/case-insensitive-attribute-with-svg-expected.html:
* fast/css/case-insensitive-attribute-with-svg.html:
* fast/css/implicitly-case-insensitive-attribute-with-svg-expected.html: Copied from LayoutTests/fast/css/case-insensitive-attribute-with-svg-expected.html.
* fast/css/implicitly-case-insensitive-attribute-with-svg.html: Copied from LayoutTests/fast/css/case-insensitive-attribute-with-svg.html.

I renamed the HTML legacy case-insensitive behavior to separate
it from the new selector.

* fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg-expected.txt: Added.
* fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html: Added.
Mixing explicit case-insensitive with implicit.

* fast/selectors/case-insensitive-attribute-register-requirement-1-expected.txt: Added.
* fast/selectors/case-insensitive-attribute-register-requirement-1.html: Added.
* fast/selectors/case-insensitive-attribute-register-requirement-2-expected.txt: Added.
* fast/selectors/case-insensitive-attribute-register-requirement-2.html: Added.
The usual register allocation stress tests.

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

6 years agoWeb Inspector: Remove unused console-object-preview styles - replaced by ObjectPrevie...
commit-queue@webkit.org [Tue, 24 Feb 2015 03:25:26 +0000 (03:25 +0000)]
Web Inspector: Remove unused console-object-preview styles - replaced by ObjectPreviewView
https://bugs.webkit.org/show_bug.cgi?id=141945

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

* UserInterface/Views/LogContentView.css:
(.console-object-preview): Deleted.
(.expanded .console-object-preview): Deleted.
(.console-object-preview .name): Deleted.
(.expanded .console-object-preview > .console-object-preview-body): Deleted.
(.console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.
(.console-object-preview-body .console-object-preview-name.console-object-preview-name-Object): Deleted.
(.expanded .console-object-preview > .console-object-preview-name.console-object-preview-name-Object): Deleted.

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

6 years ago[EFL] fix eo errors
hyuki.kim@samsung.com [Tue, 24 Feb 2015 03:11:48 +0000 (03:11 +0000)]
[EFL] fix eo errors
https://bugs.webkit.org/show_bug.cgi?id=141909

Reviewed by Gyuyoung Kim.

Fix eo errors that occur whenever minibrowser is launched.
- elm_obj_entry_text_style_user_push can only be applied for elm_entry
- elm_obj_win_resize_object_add's first parameter should be elm_win

* MiniBrowser/efl/main.c:
(window_create):

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

6 years ago[WinCairo] Unreviewed build fix after r180532
achristensen@apple.com [Tue, 24 Feb 2015 02:53:40 +0000 (02:53 +0000)]
[WinCairo] Unreviewed build fix after r180532

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::buffered):
Fixed typo.

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

6 years agoUnreviewed build fix after r180535. Removed the test case that wasn't compiling.
rniwa@webkit.org [Tue, 24 Feb 2015 02:34:08 +0000 (02:34 +0000)]
Unreviewed build fix after r180535. Removed the test case that wasn't compiling.

* TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
(TestWebKitAPI::TEST):

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

6 years ago[iOS WK2] The WebProcess keep scrolling pages based on the last velocity after scroll...
benjamin@webkit.org [Tue, 24 Feb 2015 02:07:33 +0000 (02:07 +0000)]
[iOS WK2] The WebProcess keep scrolling pages based on the last velocity after scrolling has been interrupted
https://bugs.webkit.org/show_bug.cgi?id=141933
rdar://problem/18746673
rdar://problem/19711490

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-02-23
Reviewed by Simon Fraser.

The bug happened like this:
1) The user scroll the page. WKContentView tracks the velocity and send
   the update rect + velocity to the WebProcess.
2) The user interupts the scrolling but does not commit to either scrolling
   again or cancelling the scrolling.
   Since we were not notified of this state, the WebProcess still believed
   the velocity is stable.
3) With any paint update, the WebProcess would account for the last velocity
   and try to guess the best repaint area. This would drift endlessly out
   of the view since the view is not really moving.

This patch fixes the issue by adding special handling for interrupted scrolling.

Kudos to Kurt Revis for providing us the required APIs.

* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::operator==):
We can no longer filter VisibleContentRectUpdateInfo ignoring the velocity.

Typically, UIScrollView would call -scrollViewDidScroll: before being interrupted.
If we filter based on the VisibleContentRectUpdateInfo, we have two identical
states differing only by the velocity. If we filter the second update, the WebProcess
would never know the velocity should be zero.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollViewDidInterruptDecelerating:]):
We get this callback when scrolling is interrupted. We just need to clear
the velocity and re-send a new update for the current state.

(-[WKWebView _updateVisibleContentRects]):
Do not consider an interrupted scroll as a stable state. We don't know if scrolling
will resume or will stop.

* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didInterruptScrolling]):

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

6 years agoUnreviewed, EFL gardening. Mark webgl tests to crash.
gyuyoung.kim@samsung.com [Tue, 24 Feb 2015 01:43:36 +0000 (01:43 +0000)]
Unreviewed, EFL gardening. Mark webgl tests to crash.
Skip khmer-lao-font.html because EFL port doesn't support it.

* platform/efl/TestExpectations:

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

6 years agoWTF::WeakPtr should rename 'forgot' to 'clear' and support nullptr assignment
bfulgham@apple.com [Tue, 24 Feb 2015 01:03:58 +0000 (01:03 +0000)]
WTF::WeakPtr should rename 'forgot' to 'clear' and support nullptr assignment
https://bugs.webkit.org/show_bug.cgi?id=141935

Reviewed by Myles C. Maxfield.

Source/WTF:

* wtf/WeakPtr.h:
(WTF::WeakPtr::operator=): Added 'nullptr_t' overload.
(WTF::WeakPtr::clear): Renamed from 'forget'
(WTF::WeakPtr::forget): Deleted.

Tools:

* TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
(TestWebKitAPI::TEST): Updated for 'clear' method rename, and added a few
tests for assigning from nullptr.

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

6 years agoLog using diagnostic logging which ActiveDOMObjects prevent using the PageCache
cdumez@apple.com [Tue, 24 Feb 2015 00:55:53 +0000 (00:55 +0000)]
Log using diagnostic logging which ActiveDOMObjects prevent using the PageCache
https://bugs.webkit.org/show_bug.cgi?id=141922
<rdar://problem/19923085>

Reviewed by Andreas Kling.

Log using diagnostic logging which ActiveDOMObjects prevent using the
PageCache.

* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::unsuspendableDOMObjectKey):
* page/DiagnosticLoggingKeys.h:

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

6 years agoMove GeoNotifier class to its own file
cdumez@apple.com [Tue, 24 Feb 2015 00:49:49 +0000 (00:49 +0000)]
Move GeoNotifier class to its own file
https://bugs.webkit.org/show_bug.cgi?id=141918

Reviewed by Andreas Kling.

Move GeoNotifier class to its own file to make Geolocation class less
crowded.

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