WebKit-https.git
4 years agoClean up CMake build on Mac
achristensen@apple.com [Fri, 25 Sep 2015 22:04:32 +0000 (22:04 +0000)]
Clean up CMake build on Mac
https://bugs.webkit.org/show_bug.cgi?id=149573

Reviewed by Chris Dumez.

.:

* Source/cmake/OptionsMac.cmake:

Source/WebCore:

* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* platform/graphics/DisplayRefreshMonitor.cpp:

Source/WebKit:

* PlatformMac.cmake:

Source/WTF:

* wtf/PlatformMac.cmake:

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

4 years agoScrolling a overflow: scroll region makes find overlay holes stick to the edge of...
timothy_horton@apple.com [Fri, 25 Sep 2015 22:01:21 +0000 (22:01 +0000)]
Scrolling a overflow: scroll region makes find overlay holes stick to the edge of the region
https://bugs.webkit.org/show_bug.cgi?id=149572
<rdar://problem/13093602>

Reviewed by Simon Fraser.

Test: fast/text/mark-matches-overflow-clip.html

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintTextMatchMarker):
Clip the rendered marker rect to the overflow rect.

* testing/Internals.cpp:
(WebCore::Internals::dumpMarkerRectsForNode):
* testing/Internals.h:
* testing/Internals.idl:
Add a internals function to dump the rendered rects for a marker.

* fast/text/mark-matches-overflow-clip-expected.txt: Added.
* fast/text/mark-matches-overflow-clip.html: Added.
Add a test ensuring that a find match that is clipped out by overflow
ends up with a clipped rendered rect.

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

4 years ago[Win] Switch to CMake
achristensen@apple.com [Fri, 25 Sep 2015 21:50:48 +0000 (21:50 +0000)]
[Win] Switch to CMake
https://bugs.webkit.org/show_bug.cgi?id=148111

Reviewed by Brent Fulgham.

.:

* Source/cmake/WinTools.make: Added.
* Source/cmake/tools: Added.
* Source/cmake/tools/scripts: Copied from WebKitLibraries/win/tools/scripts.
* Source/cmake/tools/scripts/auto-version.pl: Copied from WebKitLibraries/win/tools/scripts/auto-version.pl.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCore.proj:

Source/WebCore:

* WebCore.vcxproj/WebCore.proj:

Source/WebKit:

* WebKit.vcxproj/WebKit.proj:

Source/WTF:

* WTF.vcxproj/WTF.proj:

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

4 years agoClicking on a data detected item inside a form control always pops up a map
bdakin@apple.com [Fri, 25 Sep 2015 21:35:11 +0000 (21:35 +0000)]
Clicking on a data detected item inside a form control always pops up a map
on force touch trackpad
https://bugs.webkit.org/show_bug.cgi?id=149559
-and corresponding-
rdar://problem/22826796

Reviewed by Tim Horton.

Source/WebCore:

The real bug here appears to be a bug in Lookup, but we can work around it.
For normal text, we call directly into Data Detectors for map results, and
that works fine. For text within form controls, we did not properly extract
the text for DD, so we sent it to Lookup instead, and Lookup has this bug
where they will pop open the map right away. If we properly extract the text
for form controls, then we can work around this bug.

* editing/mac/DataDetection.mm:
(WebCore::detectItemAtPositionWithRange):
(WebCore::DataDetection::detectItemAroundHitTestResult):

Source/WebKit2:

Look for Data Detected text for text nodes and HitTestResults that are over
text inside form controls.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performImmediateActionHitTestAtLocation):

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

4 years agoPrepare internal AppleWin build for CMake
achristensen@apple.com [Fri, 25 Sep 2015 21:30:05 +0000 (21:30 +0000)]
Prepare internal AppleWin build for CMake
https://bugs.webkit.org/show_bug.cgi?id=149570

Reviewed by Brent Fulgham.

.:

* Source/PlatformWin.cmake:
Include internal CMake files if they exist.

WebKitLibraries:

* win/tools/scripts/auto-version.pl:
Use the WEBKIT_LIBRARIES environment variable if it exists.

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

4 years agoPassRefPtr<> to RefPtr<> conversion in legacy IndexedDB code.
beidson@apple.com [Fri, 25 Sep 2015 19:46:51 +0000 (19:46 +0000)]
PassRefPtr<> to RefPtr<> conversion in legacy IndexedDB code.
https://bugs.webkit.org/show_bug.cgi?id=149558

Reviewed by Beth Dakin.

No new tests (No behavior change.)

This patch does not attempt to completely remove all PassRefPtr usage inside legacy IDB.

It just switches over all PassRefPtr usage at the top level IDB interfaces that
modern IDB is implementing.

The rest of the usage inside the legacy implementation can be dealt with later via `git rm`.

* Modules/indexeddb/IDBAny.h:
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBDatabaseError.h:
* Modules/indexeddb/IDBFactory.h:
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::IDBFactory::getDatabaseNames):
(WebCore::IDBClient::IDBFactory::open):
(WebCore::IDBClient::IDBFactory::deleteDatabase):
* Modules/indexeddb/client/IDBFactoryImpl.h:
* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::result):
(WebCore::IDBClient::IDBRequest::error):
(WebCore::IDBClient::IDBRequest::source):
(WebCore::IDBClient::IDBRequest::transaction):
* Modules/indexeddb/client/IDBRequestImpl.h:
* Modules/indexeddb/legacy/LegacyAny.cpp:
(WebCore::LegacyAny::createInvalid):
(WebCore::LegacyAny::createNull):
(WebCore::LegacyAny::createString):
(WebCore::LegacyAny::domStringList):
(WebCore::LegacyAny::idbCursor):
(WebCore::LegacyAny::idbCursorWithValue):
(WebCore::LegacyAny::idbDatabase):
(WebCore::LegacyAny::idbFactory):
(WebCore::LegacyAny::idbIndex):
(WebCore::LegacyAny::idbObjectStore):
(WebCore::LegacyAny::idbTransaction):
(WebCore::LegacyAny::LegacyAny):
* Modules/indexeddb/legacy/LegacyAny.h:
(WebCore::LegacyAny::create):
* Modules/indexeddb/legacy/LegacyCursor.cpp:
(WebCore::LegacyCursor::update):
(WebCore::LegacyCursor::deleteFunction):
* Modules/indexeddb/legacy/LegacyCursor.h:
* Modules/indexeddb/legacy/LegacyDatabase.cpp:
(WebCore::LegacyDatabase::objectStoreNames):
(WebCore::LegacyDatabase::createObjectStore):
(WebCore::LegacyDatabase::transaction):
* Modules/indexeddb/legacy/LegacyDatabase.h:
* Modules/indexeddb/legacy/LegacyFactory.cpp:
(WebCore::LegacyFactory::getDatabaseNames):
(WebCore::LegacyFactory::open):
(WebCore::LegacyFactory::deleteDatabase):
* Modules/indexeddb/legacy/LegacyFactory.h:
* Modules/indexeddb/legacy/LegacyIndex.cpp:
(WebCore::LegacyIndex::openCursor):
(WebCore::LegacyIndex::count):
(WebCore::LegacyIndex::openKeyCursor):
(WebCore::LegacyIndex::get):
(WebCore::LegacyIndex::getKey):
* Modules/indexeddb/legacy/LegacyIndex.h:
(WebCore::LegacyIndex::legacyObjectStore):
* Modules/indexeddb/legacy/LegacyObjectStore.cpp:
(WebCore::LegacyObjectStore::indexNames):
(WebCore::LegacyObjectStore::get):
(WebCore::LegacyObjectStore::add):
(WebCore::LegacyObjectStore::put):
(WebCore::LegacyObjectStore::deleteFunction):
(WebCore::LegacyObjectStore::clear):
(WebCore::LegacyObjectStore::createIndex):
(WebCore::LegacyObjectStore::index):
(WebCore::LegacyObjectStore::openCursor):
(WebCore::LegacyObjectStore::count):
* Modules/indexeddb/legacy/LegacyObjectStore.h:
(WebCore::LegacyObjectStore::keyPathAny):
(WebCore::LegacyObjectStore::transaction):
(WebCore::LegacyObjectStore::createIndex):
(WebCore::LegacyObjectStore::count):
* Modules/indexeddb/legacy/LegacyRequest.cpp:
(WebCore::LegacyRequest::result):
(WebCore::LegacyRequest::error):
(WebCore::LegacyRequest::source):
(WebCore::LegacyRequest::transaction):
(WebCore::LegacyRequest::onSuccess):
* Modules/indexeddb/legacy/LegacyRequest.h:
* Modules/indexeddb/legacy/LegacyTransaction.cpp:
(WebCore::LegacyTransaction::objectStore):
* Modules/indexeddb/legacy/LegacyTransaction.h:
* inspector/InspectorIndexedDBAgent.cpp:

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

4 years ago[WinCairo] Incorrect position for windowless plugins.
peavo@outlook.com [Fri, 25 Sep 2015 19:13:49 +0000 (19:13 +0000)]
[WinCairo] Incorrect position for windowless plugins.
https://bugs.webkit.org/show_bug.cgi?id=149524

Reviewed by Alex Christensen.

Source/WebCore:

Added method to get graphics context HDC.

* platform/graphics/GraphicsContext.h:
* platform/graphics/win/GraphicsContextWin.cpp:
(WebCore::GraphicsContext::getWindowsContext):
(WebCore::GraphicsContext::hdc):
(WebCore::GraphicsContextPlatformPrivate::save):

Source/WebKit/win:

Only perform the device context transformation if the plugin is painting
directly into the GraphicsContext HDC. The previous check was not correct
in all cases.

* Plugins/PluginViewWin.cpp:
(WebCore::PluginView::paint):

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

4 years agoFix the broken !ENABLE(STREAM_API) build
youenn.fablet@crf.canon.fr [Fri, 25 Sep 2015 17:52:08 +0000 (17:52 +0000)]
Fix the broken !ENABLE(STREAM_API) build
https://bugs.webkit.org/show_bug.cgi?id=149525

Reviewed by Darin Adler.

Removed some #ifdef ENABLE(STREAMS_API) to make build work when STREAMS_API is off.
This is a temporary fix.

* bindings/js/WebCoreJSClientData.h:
(WebCore::WebCoreJSClientData::WebCoreJSClientData):
(WebCore::initNormalWorldClientData):

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

4 years agoSimplify Stopwatch::elapsedTime
commit-queue@webkit.org [Fri, 25 Sep 2015 17:51:33 +0000 (17:51 +0000)]
Simplify Stopwatch::elapsedTime
https://bugs.webkit.org/show_bug.cgi?id=149538

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-25
Reviewed by Darin Adler.

* wtf/Stopwatch.h:
(WTF::Stopwatch::elapsedTime):
Simplify by not starting/stopping but just computing without updating members.

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

4 years agoWeb Inspector: Reloading the page causes the inspector tab to switch back to "Resourc...
commit-queue@webkit.org [Fri, 25 Sep 2015 17:51:28 +0000 (17:51 +0000)]
Web Inspector: Reloading the page causes the inspector tab to switch back to "Resources" tab
https://bugs.webkit.org/show_bug.cgi?id=148732

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-25
Reviewed by Darin Adler.

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._scriptsCleared):
Suppress selection of sibiling tree elements when removing extra folders.

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

4 years agoMark media/media-controls-play-button-updates.html failed for all Mac platforms.
zalan@apple.com [Fri, 25 Sep 2015 17:48:12 +0000 (17:48 +0000)]
Mark media/media-controls-play-button-updates.html failed for all Mac platforms.

Unreviewed gardening.

* platform/mac/TestExpectations:

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

4 years agoRemoved MiniBrowser.entitlements.
mitz@apple.com [Fri, 25 Sep 2015 17:45:02 +0000 (17:45 +0000)]
Removed MiniBrowser.entitlements.

Rubber-stamped by Anders Carlsson.

The entitlements weren’t used anyway.

* MiniBrowser/MiniBrowser.entitlements: Removed.
* MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:

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

4 years agoUnreviewed, nit fix after r190229.
cdumez@apple.com [Fri, 25 Sep 2015 17:25:52 +0000 (17:25 +0000)]
Unreviewed, nit fix after r190229.

* dom/Range.cpp:
(WebCore::Range::insertNode):

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

4 years agoUnreviewed, rolling out r190232 and r190236.
cdumez@apple.com [Fri, 25 Sep 2015 16:11:56 +0000 (16:11 +0000)]
Unreviewed, rolling out r190232 and r190236.
https://bugs.webkit.org/show_bug.cgi?id=149555

"It did not help" (Requested by cdumez on #webkit).

Reverted changesets:

"Unreviewed, roll out r187615 as it seems to have caused a ~1%
PLT regression."
http://trac.webkit.org/changeset/190232

"This started failing after this rollout:"
http://trac.webkit.org/changeset/190236

Patch by Commit Queue <commit-queue@webkit.org> on 2015-09-25

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

4 years ago[Win] Unreviewed build fix.
bfulgham@apple.com [Fri, 25 Sep 2015 16:10:58 +0000 (16:10 +0000)]
[Win] Unreviewed build fix.

* win/tools/vsprops/FeatureDefines.props: Let Windows build know about
the STREAMS_API feature.

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

4 years ago[Win] Unreviewed build fix.
bfulgham@apple.com [Fri, 25 Sep 2015 16:09:50 +0000 (16:09 +0000)]
[Win] Unreviewed build fix.

* wtf/FeatureDefines.h: Don't turn STREAMS_API on by default
on Windows.

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

4 years agoRemove the need for DOMClass in case of JSBuiltinConstructor WebIDL
youenn.fablet@crf.canon.fr [Fri, 25 Sep 2015 09:57:22 +0000 (09:57 +0000)]
Remove the need for DOMClass in case of JSBuiltinConstructor WebIDL
https://bugs.webkit.org/show_bug.cgi?id=149522

Reviewed by Darin Adler.

Adding generation of the dummy DOM class for JSBuiltinConstructor interfaces.
This is applied to CountQueuingStrategy.

Covered by existing tests of CountQueuingStrategy.

* Modules/streams/CountQueuingStrategy.h: Removed.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader): Removal of DOM class header include and generation of dummy class.
(GenerateImplementation): Removal of DOM class header include.
(UseDummyDOMClass): Helper routine.
(GenerateDummyDOMClassForJSBuiltin): Ditto.

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

4 years ago[GTK] ASSERTION FAILED: !m_inUpdateBackingStoreState in DrawingAreaImpl::display...
carlosgc@webkit.org [Fri, 25 Sep 2015 09:42:20 +0000 (09:42 +0000)]
[GTK] ASSERTION FAILED: !m_inUpdateBackingStoreState in DrawingAreaImpl::display() after DrawingAreaImpl::forceRepaint()
https://bugs.webkit.org/show_bug.cgi?id=148956

Reviewed by Žan Doberšek.

Source/WebKit2:

This is because those tests call notifyDone in the onresize event
handler. InjectedBundlePage::dump() always calls WKBundlePageForceRepaint()
before dumping. When the view is resized DrawingAreaImpl::updateBackingStoreState()
is called, so if the size has changed the FrameView::resize()
method is called and all children are resized, so the onresize
handlers happen at that point, before the
m_inUpdateBackingStoreState is set to false again. For WTR we
could probably just return early from froceReapaint() when
m_inUpdateBackingStoreState is true, because in that case we know
the layout is updated because of the resize and the actual display
is not really needed. But the UI process can also request a force
repaint, so we could wait until the backing store update is done
and then force the repaint. For WTR it will happen after the
dump, but it shouldn't be a problem.

* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::forceRepaint):
(WebKit::DrawingAreaImpl::updateBackingStoreState):
* WebProcess/WebPage/DrawingAreaImpl.h:

LayoutTests:

Unskip tests that should pass now.

* platform/gtk/TestExpectations:

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

4 years agoAdd WebKitSystemInterface for iOS 9.0
dbates@webkit.org [Fri, 25 Sep 2015 06:58:25 +0000 (06:58 +0000)]
Add WebKitSystemInterface for iOS 9.0
https://bugs.webkit.org/show_bug.cgi?id=149550

Rubber-stamped by Alexey Proskuryakov.

Tools:

* Scripts/copy-webkitlibraries-to-product-directory:

WebKitLibraries:

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceIOSDevice9.0.a: Added.
* libWebKitSystemInterfaceIOSSimulator9.0.a: Added.

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

4 years agoThis started failing after this rollout:
bdakin@apple.com [Fri, 25 Sep 2015 05:14:54 +0000 (05:14 +0000)]
This started failing after this rollout:
http://trac.webkit.org/changeset/190232

* platform/mac/TestExpectations:

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

4 years ago[Win] Support composited content in WebView render-to-context methods
bfulgham@apple.com [Fri, 25 Sep 2015 03:41:35 +0000 (03:41 +0000)]
[Win] Support composited content in WebView render-to-context methods
https://bugs.webkit.org/show_bug.cgi?id=149516
<rdar://problem/22635080>

Reviewed by Simon Fraser.

Source/WebCore:

Extend the CACFLayerTreeHost implementation to render into a passed
device context when requested. When no context is provided (the default
case) paint as normal.

Will be tested by existing compositing tests in a future bug. DumpRenderTree
has to be extended to do this painting properly.

* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::paint): Accept an optional HDC argument, and
pass it to the render method.
* platform/graphics/ca/win/CACFLayerTreeHost.h:
* platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: Add missing SOFT_LINK
command for the WKCACFViewDrawIntoDC.
(WebCore::WKCACFViewLayerTreeHost::paint): Accept optional HDC argument and
pass it to the parent class.
(WebCore::WKCACFViewLayerTreeHost::render): Accept new optional HDC argument.
If provided, call WKCACFViewDrawIntoDC. Otherwise, call WKCACFVIewDraw.
(WebCore::WKCACFViewLayerTreeHost::setShouldInvertColors):
* platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:

Source/WebKit/win:

* WebView.cpp:
(WebView::paint): Call the new 'paintCompositedContentToHDC' method. If
it handles the pain, return.
(WebView::paintCompositedContentToHDC): New method to share code with other
paint methods.
(WebView::paintDocumentRectToContext): Call new 'paintCompositedContentToHDC'
to handle any composited layers. Otherwise, use slow drawing path.
(WebView::paintScrollViewRectToContextAtPoint): Ditto.
* WebView.h:

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

4 years agoDrop [NotDeletable] from QuickTimePluginReplacement.postEvent()
cdumez@apple.com [Fri, 25 Sep 2015 02:56:47 +0000 (02:56 +0000)]
Drop [NotDeletable] from QuickTimePluginReplacement.postEvent()
https://bugs.webkit.org/show_bug.cgi?id=149547

Reviewed by Eric Carlson.

Drop [NotDeletable] from QuickTimePluginReplacement.postEvent(). It does
not appear to be needed and this is the last user of this non-standard
IDL attribute. This patch also drops support for this IDL attribute.

* Modules/plugins/QuickTimePluginReplacement.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(ComputeFunctionSpecial):
* bindings/scripts/IDLAttributes.txt:

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

4 years agoNode.replaceChild() does not behave according to the specification
cdumez@apple.com [Fri, 25 Sep 2015 02:48:55 +0000 (02:48 +0000)]
Node.replaceChild() does not behave according to the specification
https://bugs.webkit.org/show_bug.cgi?id=149546
<rdar://problem/22571887>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C DOM test now that one more check is passing.

* web-platform-tests/dom/nodes/MutationObserver-childList-expected.txt:

Source/WebCore:

Node.replaceChild() does not behave according to the specification. In
particular, when replacing |child| with |node| we are supposed to remove
|node| from its parent *before* removing |child| from its parent:
- https://dom.spec.whatwg.org/#concept-node-replace (Steps 10 & 11)

This patch reverses the order as per the specification. Our new behavior
matches Firefox's behavior. Note that this patch also remove an
optimization when replacing a child with its next sibling. This
optimization was observable from JS. It seems likely this case is not
common enough for it to be an issue. However, we can revisit if we see
it regresses things.

This leads to incorrect Mutation Records being queued in some cases.

No new tests, already covered by existing test.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::replaceChild):

LayoutTests:

Update existing test that now throws a different exception.

* fast/events/mutation-during-replace-child-expected.txt:
* fast/events/mutation-during-replace-child.html:

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

4 years agoUnreviewed, roll out r187615 as it seems to have caused a ~1% PLT regression.
cdumez@apple.com [Fri, 25 Sep 2015 01:50:04 +0000 (01:50 +0000)]
Unreviewed, roll out r187615 as it seems to have caused a ~1% PLT regression.
<rdar://problem/22657123>

* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::makeFlagsKey):
* platform/graphics/FontCascade.cpp:
(WebCore::operator==):
(WebCore::makeFontSelectorFlags):
(WebCore::makeFontCascadeCacheKey):
(WebCore::computeFontCascadeCacheHash):

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

4 years agoKeep the already-parsed list of terms in custom property values so that we don't...
hyatt@apple.com [Fri, 25 Sep 2015 00:54:24 +0000 (00:54 +0000)]
Keep the already-parsed list of terms in custom property values so that we don't have to re-parse them
later when doing variable resolution.
https://bugs.webkit.org/show_bug.cgi?id=149544

Reviewed by Dean Jackson.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::customPropertyValue):
(WebCore::ComputedStyleExtractor::customPropertyText):
Add a helper for getting the raw text. More closely parallels how non-custom properties work with the
extractor.

(WebCore::ComputedStyleExtractor::propertyValue):
Change propertyValue to use customPropertyText.

(WebCore::ComputedStyleExtractor::copyPropertiesInSet):
Don't copy CSS custom properties into the style declaration. This is just used for things like editing, so
we didn't need to be putting the custom properties into this set.

(WebCore::CSSComputedStyleDeclaration::getPropertyValue):
Patched to go straight to the serialized string value.

(WebCore::ComputedStyleExtractor::customPropertyValue): Deleted.
Replaced by customPropertyText.

* css/CSSComputedStyleDeclaration.h:
Rename customPropertyValue to customPropertyText and make it just return a String.

* css/CSSCustomPropertyValue.h:
(WebCore::CSSCustomPropertyValue::create):
(WebCore::CSSCustomPropertyValue::customCSSText):
(WebCore::CSSCustomPropertyValue::name):
(WebCore::CSSCustomPropertyValue::equals):
(WebCore::CSSCustomPropertyValue::CSSCustomPropertyValue):
(WebCore::CSSCustomPropertyValue::value): Deleted.
Changed to hold both a CSSParserValueList, which it adopts from the CSSParser, and a string value that
is constructed lazily only if the value is serialized. Now the problematic serialization code will only
run if someone uses the CSS OM to trigger a serialization (this should be a rare occurrence, so perf
improves with this change).

* css/CSSGrammar.y.in:
Change parsing of custom properties to be identical to regular properties. This refactoring allows
us to simply invoke the parser from style declarations as well and makes everything behave more
similarly to normal property parsing.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseCustomPropertyValue):
(WebCore::CSSParser::parseCustomPropertyDeclaration):
(WebCore::CSSParser::addCustomPropertyDeclaration): Deleted.
* css/CSSParser.h:
(WebCore::CSSParser::setCustomPropertyName):
We now have a method for parsing custom properties that can be invoked from style declarations. The
parser list is now adopted by the CSSCustomPropertyValue.

* css/CSSParserValues.cpp:
(WebCore::CSSParserValueList::toString):
Build the string serialization code right into CSSParserValueList.

* css/CSSParserValues.h:
Add a toString() method for serialization.

* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::setProperty):
(WebCore::MutableStyleProperties::setCustomProperty):
Changed to use the new CSSParser functions. This makes the code behave almost identically to regular
property parsing.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/style/RenderStyle.h:
* rendering/style/StyleCustomPropertyData.h:
Change the mapping on RenderStyle to store the custom CSS values. This way we can get to the original
parser lists for each variable when it comes time to do variable resolution.

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

4 years agoRemove the use of "Immediate" in JIT function names.
mark.lam@apple.com [Fri, 25 Sep 2015 00:17:16 +0000 (00:17 +0000)]
Remove the use of "Immediate" in JIT function names.
https://bugs.webkit.org/show_bug.cgi?id=149542

Reviewed by Geoffrey Garen.

We will rename the following:
    isOperandConstantImmediateDouble => isOperandConstantDouble
    isOperandConstantImmediateInt => isOperandConstantInt
    isOperandConstantImmediateChar => isOperandConstantChar

    getOperandConstantImmediateInt => getOperandConstantInt
    getConstantOperandImmediateInt => getOperandConstantInt

    emitJumpIfImmediateInteger => emitJumpIfInt
    emitJumpIfNotImmediateInteger => emitJumpIfNotInt
    emitJumpIfNotImmediateIntegers => emitJumpIfNotInt
    emitPatchableJumpIfNotImmediateInteger => emitPatchableJumpIfNotInt
    emitJumpSlowCaseIfNotImmediateInteger => emitJumpSlowCaseIfNotInt
    emitJumpSlowCaseIfNotImmediateNumber => emitJumpSlowCaseIfNotNumber
    emitJumpSlowCaseIfNotImmediateIntegers => emitJumpSlowCaseIfNotInt
    emitFastArithReTagImmediate => emitTagInt
    emitTagAsBoolImmediate => emitTagBool
    emitJumpIfImmediateNumber => emitJumpIfNumber
    emitJumpIfNotImmediateNumber => emitJumpIfNotNumber
    emitFastArithImmToInt - Deleted because this is an empty function.
    emitFastArithIntToImmNoCheck => emitTagInt
    emitPutImmediateToCallFrameHeader => emitPutToCallFrameHeader

This is purely a refactoring patch to do the renaming.  There is no behavior
change.

* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compileEntry):
(JSC::DFG::JITCompiler::compileSetupRegistersForEntry):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::emitPutToCallFrameHeader):
(JSC::AssemblyHelpers::emitPutImmediateToCallFrameHeader): Deleted.
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JIT.h:
(JSC::JIT::emitStoreCell):
(JSC::JIT::getSlowCase):
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_negate):
(JSC::JIT::emit_op_lshift):
(JSC::JIT::emit_op_rshift):
(JSC::JIT::emitSlow_op_rshift):
(JSC::JIT::emit_op_urshift):
(JSC::JIT::emitSlow_op_urshift):
(JSC::JIT::emit_op_unsigned):
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_op_bitand):
(JSC::JIT::emit_op_inc):
(JSC::JIT::emit_op_dec):
(JSC::JIT::emit_op_mod):
(JSC::JIT::compileBinaryArithOp):
(JSC::JIT::compileBinaryArithOpSlowCase):
(JSC::JIT::emit_op_add):
(JSC::JIT::emitSlow_op_add):
(JSC::JIT::emit_op_mul):
(JSC::JIT::emitSlow_op_mul):
(JSC::JIT::emit_op_div):
(JSC::JIT::emitSlow_op_div):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_op_lshift):
(JSC::JIT::emitSlow_op_lshift):
(JSC::JIT::emitRightShift):
(JSC::JIT::emitRightShiftSlowCase):
(JSC::JIT::emit_op_bitand):
(JSC::JIT::emitSlow_op_bitand):
(JSC::JIT::emit_op_bitor):
(JSC::JIT::emitSlow_op_bitor):
(JSC::JIT::emit_op_bitxor):
(JSC::JIT::emitSlow_op_bitxor):
(JSC::JIT::emit_op_add):
(JSC::JIT::emitSlow_op_add):
(JSC::JIT::emit_op_sub):
(JSC::JIT::emitSlow_op_sub):
* jit/JITInlines.h:
(JSC::JIT::emitArrayStorageGetByVal):
(JSC::JIT::isOperandConstantDouble):
(JSC::JIT::isOperandConstantChar):
(JSC::JIT::emitJumpSlowCaseIfNotJSCell):
(JSC::JIT::isOperandConstantInt):
(JSC::JIT::getOperandConstantInt):
(JSC::JIT::emitGetVirtualRegisters):
(JSC::JIT::emitLoadInt32ToDouble):
(JSC::JIT::emitJumpIfInt):
(JSC::JIT::emitJumpIfNotInt):
(JSC::JIT::emitPatchableJumpIfNotInt):
(JSC::JIT::emitJumpSlowCaseIfNotInt):
(JSC::JIT::emitJumpSlowCaseIfNotNumber):
(JSC::JIT::emitTagBool):
(JSC::JIT::isOperandConstantImmediateDouble): Deleted.
(JSC::JIT::isOperandConstantImmediateChar): Deleted.
(JSC::JIT::isOperandConstantImmediateInt): Deleted.
(JSC::JIT::getOperandConstantImmediateInt): Deleted.
(JSC::JIT::getConstantOperandImmediateInt): Deleted.
(JSC::JIT::emitJumpIfImmediateInteger): Deleted.
(JSC::JIT::emitJumpIfNotImmediateInteger): Deleted.
(JSC::JIT::emitPatchableJumpIfNotImmediateInteger): Deleted.
(JSC::JIT::emitJumpIfNotImmediateIntegers): Deleted.
(JSC::JIT::emitJumpSlowCaseIfNotImmediateInteger): Deleted.
(JSC::JIT::emitJumpSlowCaseIfNotImmediateIntegers): Deleted.
(JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber): Deleted.
(JSC::JIT::emitFastArithReTagImmediate): Deleted.
(JSC::JIT::emitTagAsBoolImmediate): Deleted.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_is_undefined):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_string):
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_neq):
(JSC::JIT::emit_op_bitxor):
(JSC::JIT::emit_op_bitor):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emit_op_profile_type):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):
* jit/JSInterfaceJIT.h:
(JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
(JSC::JSInterfaceJIT::emitJumpIfNumber):
(JSC::JSInterfaceJIT::emitJumpIfNotNumber):
(JSC::JSInterfaceJIT::emitLoadDouble):
(JSC::JSInterfaceJIT::emitTagInt):
(JSC::JSInterfaceJIT::emitPutToCallFrameHeader):
(JSC::JSInterfaceJIT::emitJumpIfImmediateNumber): Deleted.
(JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber): Deleted.
(JSC::JSInterfaceJIT::emitFastArithImmToInt): Deleted.
(JSC::JSInterfaceJIT::emitFastArithIntToImmNoCheck): Deleted.
(JSC::JSInterfaceJIT::emitPutImmediateToCallFrameHeader): Deleted.
* jit/ThunkGenerators.cpp:
(JSC::nativeForGenerator):
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::startFunction):
(JSC::WASMFunctionCompiler::endFunction):

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

4 years agoRewrite Range::insertNode() as per the latest DOM specification
cdumez@apple.com [Thu, 24 Sep 2015 23:33:34 +0000 (23:33 +0000)]
Rewrite Range::insertNode() as per the latest DOM specification
https://bugs.webkit.org/show_bug.cgi?id=149528

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C DOM tests now that more tests are passing.

* web-platform-tests/dom/ranges/Range-insertNode-expected.txt:
* web-platform-tests/dom/ranges/Range-surroundContents-expected.txt:

Source/WebCore:

Rewrite Range::insertNode() as per the latest DOM specification:
- https://dom.spec.whatwg.org/#concept-range-insert

Our previous implementation seemed outdated as we were failing a lot of
W3C tests that Firefox is passing.

No new tests, already covered by existing tests.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::ensurePreInsertionValidity):
(WebCore::checkPreReplacementValidity):
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::appendChild):
* dom/ContainerNode.h:
* dom/Range.cpp:
(WebCore::Range::insertNode):
(WebCore::Range::surroundContents):
(WebCore::Range::toString): Deleted.
(WebCore::Range::toHTML): Deleted.
(WebCore::Range::text): Deleted.
(WebCore::Range::createContextualFragment): Deleted.
(WebCore::Range::detach): Deleted.
(WebCore::Range::absoluteBoundingBox): Deleted.
* dom/Range.h:

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

4 years agoFind hole drawn at subframe's 0x0 when a subframe find match is not rendered
timothy_horton@apple.com [Thu, 24 Sep 2015 23:03:24 +0000 (23:03 +0000)]
Find hole drawn at subframe's 0x0 when a subframe find match is not rendered
https://bugs.webkit.org/show_bug.cgi?id=149543

Reviewed by Beth Dakin.

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::rectsForTextMatches):
Don't add empty rects to the list. Later code will just inflate them
and end up drawing a nonsensical find hole.

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

4 years agoThe same problem happens on El Capitan.
bdakin@apple.com [Thu, 24 Sep 2015 22:53:48 +0000 (22:53 +0000)]
The same problem happens on El Capitan.

* platform/mac/TestExpectations:

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

4 years ago[Win] Unreviewed build failure.
bfulgham@apple.com [Thu, 24 Sep 2015 22:40:33 +0000 (22:40 +0000)]
[Win] Unreviewed build failure.

* bindings/js/WebCoreJSClientData.h: Make sure Streams API headers
are only included if the feature is on.

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

4 years agoUnreviewed, rebaseline web-platform-tests/html/dom/interfaces.html for iOS after...
cdumez@apple.com [Thu, 24 Sep 2015 21:45:27 +0000 (21:45 +0000)]
Unreviewed, rebaseline web-platform-tests/html/dom/interfaces.html for iOS after r190190

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:

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

4 years ago[ES6] Implement tail calls in the DFG
msaboff@apple.com [Thu, 24 Sep 2015 21:42:59 +0000 (21:42 +0000)]
[ES6] Implement tail calls in the DFG
https://bugs.webkit.org/show_bug.cgi?id=148663

Reviewed by Filip Pizlo.

jsc-tailcall: Implement the tail call opcodes in the DFG
https://bugs.webkit.org/show_bug.cgi?id=146850

This patch adds support for tail calls in the DFG. This requires a slightly high number of nodes:

 - TailCall and TailCallVarargs are straightforward. They are terminal
   nodes and have the semantics of an actual tail call.

 - TailCallInlinedCaller and TailCallVarargsInlinedCaller are here to perform a
   tail call inside an inlined function. They are non terminal nodes,
   and are performing the call as a regular call after popping an
   appropriate number of inlined tail call frames.

 - TailCallForwardVarargs and TailCallForwardVarargsInlinedCaller are the
   extension of TailCallVarargs and TailCallVarargsInlinedCaller to enable
   the varargs forwarding optimization so that we don't lose
   performance with a tail call instead of a regular call.

This also required two broad kind of changes:

 - Changes in the JIT itself (DFGSpeculativeJIT) are pretty
   straightforward since they are just an extension of the baseline JIT
   changes introduced previously.

 - Changes in the runtime are mostly related with handling inline call
   frames. The idea here is that we have a special TailCall type for
   call frames that indicates to the various pieces of code walking the
   inline call frame that they should (recursively) skip the caller in
   their analysis.

* bytecode/CallMode.h:
(JSC::specializationKindFor):
* bytecode/CodeOrigin.cpp:
(JSC::CodeOrigin::inlineDepthForCallFrame):
(JSC::CodeOrigin::isApproximatelyEqualTo):
(JSC::CodeOrigin::approximateHash):
(JSC::CodeOrigin::inlineStack):
* bytecode/CodeOrigin.h:
* bytecode/InlineCallFrame.cpp:
(JSC::InlineCallFrame::dumpInContext):
(WTF::printInternal):
* bytecode/InlineCallFrame.h:
(JSC::InlineCallFrame::callModeFor):
(JSC::InlineCallFrame::kindFor):
(JSC::InlineCallFrame::varargsKindFor):
(JSC::InlineCallFrame::specializationKindFor):
(JSC::InlineCallFrame::isVarargs):
(JSC::InlineCallFrame::isTail):
(JSC::InlineCallFrame::computeCallerSkippingDeadFrames):
(JSC::InlineCallFrame::getCallerSkippingDeadFrames):
(JSC::InlineCallFrame::getCallerInlineFrameSkippingDeadFrames):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGBasicBlock.h:
(JSC::DFG::BasicBlock::findTerminal):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::inlineCallFrame):
(JSC::DFG::ByteCodeParser::allInlineFramesAreTailCalls):
(JSC::DFG::ByteCodeParser::currentCodeOrigin):
(JSC::DFG::ByteCodeParser::addCallWithoutSettingResult):
(JSC::DFG::ByteCodeParser::addCall):
(JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
(JSC::DFG::ByteCodeParser::getPrediction):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleVarargsCall):
(JSC::DFG::ByteCodeParser::emitArgumentPhantoms):
(JSC::DFG::ByteCodeParser::inliningCost):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::attemptToInlineCall):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
(JSC::DFG::ByteCodeParser::parseCodeBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::isLiveInBytecode):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::forAllLocalsLiveInBytecode):
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::mergeToSuccessors):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::willCatchExceptionInMachineFrame):
* dfg/DFGLiveCatchVariablePreservationPhase.cpp:
(JSC::DFG::FlushLiveCatchVariablesInsertionPhase::willCatchException):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasCallVarargsData):
(JSC::DFG::Node::isTerminal):
(JSC::DFG::Node::hasHeapPrediction):
* dfg/DFGNodeType.h:
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::handleExitCounts):
(JSC::DFG::reifyInlinedCallFrames):
(JSC::DFG::osrWriteBarrier):
* dfg/DFGOSRExitPreparation.cpp:
(JSC::DFG::prepareCodeOriginForOSRExit):
* dfg/DFGOperations.cpp:
* dfg/DFGPreciseLocalClobberize.h:
(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validateSSA):
* dfg/DFGVarargsForwardingPhase.cpp:
* interpreter/CallFrame.cpp:
(JSC::CallFrame::bytecodeOffset):
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::gotoNextFrame):

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

4 years agoSupport building for arbitrary architectures
dbates@webkit.org [Thu, 24 Sep 2015 21:39:36 +0000 (21:39 +0000)]
Support building for arbitrary architectures
https://bugs.webkit.org/show_bug.cgi?id=149539

Reviewed by Alexey Proskuryakov.

Teach buildbot to pass the architectures associated with the builder to build-webkit
when building on OS X and iOS. As a side effect of this change we now support building
universal binaries when multiples architectures are specified.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(CompileWebKit.start):

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

4 years agoFix the build after <http://trac.webkit.org/changeset/190212>
dbates@webkit.org [Thu, 24 Sep 2015 20:23:42 +0000 (20:23 +0000)]
Fix the build after <trac.webkit.org/changeset/190212>
(http://trac.webkit.org/changeset/190212)

I inadvertently did not remove the fullPlatform argument from one of the callers of archiveBuiltProduct().

* BuildSlaveSupport/built-product-archive:
(main):

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

4 years agoRemove special case code for the no-parallel-GC case
fpizlo@apple.com [Thu, 24 Sep 2015 20:13:07 +0000 (20:13 +0000)]
Remove special case code for the no-parallel-GC case
https://bugs.webkit.org/show_bug.cgi?id=149512

Reviewed by Mark Lam.

Make serial GC just a parallel GC where the helper threads don't do anything. Also make the
idle thread calculation a bit more explicit.

The main outcome is that we no longer use Options::numberOfGCMarkers() as much, so the code is
resilient against the number of GC markers changing.

* heap/Heap.h:
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::donateKnownParallel):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::drainFromShared):

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

4 years agoSupport running unit tests on iOS Simulator test bot
dbates@webkit.org [Thu, 24 Sep 2015 19:36:17 +0000 (19:36 +0000)]
Support running unit tests on iOS Simulator test bot
https://bugs.webkit.org/show_bug.cgi?id=149536

Reviewed by Alexey Proskuryakov.

Implements support for running unit tests on a iOS test bot. At the time of writing,
the script run-api-tests supports running unit tests on Mac, Windows and iOS Simulator.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunUnitTests.start): Append appropriate command line flag when invoking script run-api-tests.
(TestFactory.__init__): Add step RunUnitTests when the test bot is for the iOS Simulator platform.

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

4 years agoPolymorphicAccess should remember that it checked an ObjectPropertyCondition with...
fpizlo@apple.com [Thu, 24 Sep 2015 19:23:58 +0000 (19:23 +0000)]
PolymorphicAccess should remember that it checked an ObjectPropertyCondition with a check on some structure
https://bugs.webkit.org/show_bug.cgi?id=149514

Reviewed by Oliver Hunt.

When we checked an ObjectPropertyCondition using an explicit structure check, we would forget to
note the structure in any weak reference table and we would attempt to regenerate the condition
check even if the condition became invalid.

We need to account for this better and we need to prune AccessCases that have an invalid condition
set. This change does both.

* bytecode/PolymorphicAccess.cpp:
(JSC::AccessGenerationState::addWatchpoint):
(JSC::AccessCase::alternateBase):
(JSC::AccessCase::couldStillSucceed):
(JSC::AccessCase::canReplace):
(JSC::AccessCase::generate):
(JSC::PolymorphicAccess::regenerateWithCases):
(JSC::PolymorphicAccess::visitWeak):
(JSC::PolymorphicAccess::regenerate):
* bytecode/PolymorphicAccess.h:
(JSC::AccessCase::callLinkInfo):
* tests/stress/make-dictionary-repatch.js: Added. This used to crash on a release assert. If we removed the release assert, this would return bad results.

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

4 years agoMake event dispatching respect slotting
rniwa@webkit.org [Thu, 24 Sep 2015 19:00:11 +0000 (19:00 +0000)]
Make event dispatching respect slotting
https://bugs.webkit.org/show_bug.cgi?id=149243

Reviewed by Antti Koivisto.

Source/WebCore:

There are primarily two cases to consider: getting out of a shadow root to its host,
and moving into a slot from an assigned node.

When getting out of a shadow root, either the event originated in its shadow tree
including its nodes' shadow trees (1) or it moved into this shadow tree via a slot (2).
In (1), event.target should be set to the shadow host. In (2), it should be set to the
first node in the event path that belongs to the same tree as the shadow host. In order
to find such a node in O(1), we use a stack of event targets in each (shadow) tree. We
push event.target of the current tree whenever we move up to a slot from an assigned node
and pop it out of the stack when we move out of the shadow tree.

A follow up patch is needed to update the code to resolve related targets.

Tests: fast/shadow-dom/event-inside-shadow-tree.html
       fast/shadow-dom/event-inside-slotted-node.html

* dom/EventDispatcher.cpp:
(WebCore::EventPath::EventPath):

LayoutTests:

Added tests for dispatching events inside shadow trees and nodes assigned to slots using testharness.js.

* fast/shadow-dom/event-inside-shadow-tree-expected.txt: Added.
* fast/shadow-dom/event-inside-shadow-tree.html: Added.
* fast/shadow-dom/event-inside-slotted-node-expected.txt: Added.
* fast/shadow-dom/event-inside-slotted-node.html: Added.

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

4 years agoWe should only expect a RareCaseProfile to exist if the rare case actually exists.
mark.lam@apple.com [Thu, 24 Sep 2015 18:38:35 +0000 (18:38 +0000)]
We should only expect a RareCaseProfile to exist if the rare case actually exists.
https://bugs.webkit.org/show_bug.cgi?id=149531

Reviewed by Saam Barati.

The current code that calls rareCaseProfileForBytecodeOffset() assumes that it
will always return a non-null RareCaseProfile.  As a result, op_add in the
baseline JIT is forced to add a dummy slow case that will never be taken, only to
ensure that the RareCaseProfile for that bytecode is created.  This profile will
always produce a counter value of 0 (since that path will never be taken).

Instead, we'll make the callers of rareCaseProfileForBytecodeOffset() check if
the profile actually exist before dereferencing it.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::rareCaseProfileForBytecodeOffset):
(JSC::CodeBlock::rareCaseProfileCountForBytecodeOffset):
(JSC::CodeBlock::capabilityLevel):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::addRareCaseProfile):
(JSC::CodeBlock::numberOfRareCaseProfiles):
(JSC::CodeBlock::likelyToTakeSlowCase):
(JSC::CodeBlock::couldTakeSlowCase):
(JSC::CodeBlock::likelyToTakeDeepestSlowCase):
(JSC::CodeBlock::likelyToTakeAnySlowCase):
(JSC::CodeBlock::rareCaseProfile): Deleted.
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_add):
(JSC::JIT::emitSlow_op_add):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_op_add):
(JSC::JIT::emitSlow_op_add):

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

4 years agoAdd support infrastructure for OpenSource iOS builders and testers
dbates@webkit.org [Thu, 24 Sep 2015 18:36:27 +0000 (18:36 +0000)]
Add support infrastructure for OpenSource iOS builders and testers
https://bugs.webkit.org/show_bug.cgi?id=149534

Reviewed by Darin Adler.

Towards setting up OpenSource iOS build bots, teach buildbot and its support
scripts about iOS.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(appendCustomBuildFlags): Require the caller to pass parameter fullPlatform and append
--ios-simulator or --device for a builder/tester whose full platform name begins with
"ios-simulator" or "ios", respectively.
(RunJavaScriptCoreTests.start): Pass the full platform name to appendCustomBuildFlags().
* BuildSlaveSupport/built-product-archive:
(main): Pass the full platform name to determineWebKitBuildDirectory().
(determineWebKitBuildDirectory): Call script webkit-build-directory with the appropriate
command line flag when building for iOS.
(archiveBuiltProduct): Use the same logic for iOS as we do for Mac. Also, remove unused
parameter fullPlatform. This parameter was originally added in r125066 to support the
Chromium Android port, which has since been removed from the OpenSource WebKit Project.
(extractBuiltProduct): Use the same logic for iOS as we do for Mac.
* BuildSlaveSupport/clean-build:
(main): Call script webkit-build-directory with the appropriate command line flag when
building for iOS.
* BuildSlaveSupport/delete-stale-build-files:
(main): Use the same logic for iOS as we do for Mac.
(webkitBuildDirectory): Call script webkit-build-directory with the appropriate command line
flag when building for iOS.
* BuildSlaveSupport/test-result-archive:
(archiveTestResults): Use the same logic for iOS as we do for Mac.

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

4 years agoRemove Chromium-specific changes to script built-product-archive
dbates@webkit.org [Thu, 24 Sep 2015 18:29:22 +0000 (18:29 +0000)]
Remove Chromium-specific changes to script built-product-archive
https://bugs.webkit.org/show_bug.cgi?id=149530

Rubber-stamped by Csaba Osztrogonác.

Reverts changes made in r113074 and r113067 to support Chromium testers. The
Chromium code has long since been removed from the OpenSource WebKit Project.

* BuildSlaveSupport/built-product-archive:
(createZipManually):
(createZip):
(archiveBuiltProduct):

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

4 years agoDrop XPATH_NAMESPACE_NODE from Node::NodeType enum
cdumez@apple.com [Thu, 24 Sep 2015 18:17:08 +0000 (18:17 +0000)]
Drop XPATH_NAMESPACE_NODE from Node::NodeType enum
https://bugs.webkit.org/show_bug.cgi?id=149532

Reviewed by Ryosuke Niwa.

Drop XPATH_NAMESPACE_NODE from Node::NodeType enum as there is currently
no way to construct such Node in WebKit. This avoid having to handle this
Node type everywhere.

Source/WebCore:

* bindings/gobject/WebKitDOMPrivate.cpp:
(WebKit::wrap): Deleted.
* bindings/objc/DOM.mm:
(kitClass): Deleted.
* dom/Document.cpp:
(WebCore::Document::importNode):
(WebCore::Document::adoptNode): Deleted.
(WebCore::Document::childTypeAllowed): Deleted.
(WebCore::Document::canAcceptChild): Deleted.
* dom/Node.cpp:
(WebCore::Node::dumpStatistics): Deleted.
(WebCore::Node::textContent): Deleted.
(WebCore::Node::ancestorElement): Deleted.
* dom/Node.h:
* dom/Range.cpp:
(WebCore::Range::checkNodeWOffset):
(WebCore::lengthOfContentsInNode): Deleted.
(WebCore::Range::processContentsBetweenOffsets): Deleted.
(WebCore::Range::surroundContents): Deleted.
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendStartMarkup): Deleted.
* xml/XPathFunctions.cpp:
(WebCore::XPath::expandedNameLocalPart): Deleted.
* xml/XPathStep.cpp:
(WebCore::XPath::Step::nodesInAxis):
(WebCore::XPath::primaryNodeType): Deleted.
* xml/XPathUtil.cpp:
(WebCore::XPath::stringValue): Deleted.
(WebCore::XPath::isValidContextNode): Deleted.

Source/WebKit2:

* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
(WebKit::WKDOMNodeClass): Deleted.

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

4 years agoAdd support for CSS Custom Properties (in preparation for implementing CSS Variables).
hyatt@apple.com [Thu, 24 Sep 2015 18:15:52 +0000 (18:15 +0000)]
Add support for CSS Custom Properties (in preparation for implementing CSS Variables).
https://bugs.webkit.org/show_bug.cgi?id=130397

Reviewed by Antti Koivisto.

Source/WebCore:

Added new tests in fast/css/custom-properties.

* WebCore.xcodeproj/project.pbxproj:
Add new header files to the project (CSSCustomPropertyValue and StyleCustomPropertyData).

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::customPropertyValue):
(WebCore::ComputedStyleExtractor::propertyValue):
If a custom property value is queried (i.e., it starts with "--"), then we use our
customPropertyValue lookup to go to the RenderStyle and fetch the appropriate custom property
value from the StyleCustomPropertyData.

(WebCore::CSSComputedStyleDeclaration::length):
(WebCore::CSSComputedStyleDeclaration::item):
Patched to include custom properties in the returned array. They appear at the end of the array
after the built-in properties.

(WebCore::ComputedStyleExtractor::propertyMatches):
Patched to check custom properties.

(WebCore::ComputedStyleExtractor::copyPropertiesInSet):
Make sure the custom properties get copied into the StyleDeclaration.

(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
(WebCore::CSSComputedStyleDeclaration::getPropertyValue):
Patched to call customPropertyValue for custom properties.

* css/CSSComputedStyleDeclaration.h:
Add customPropertyValue() to ComputedStyleExtractor.

* css/CSSCustomPropertyValue.h: Added.
(WebCore::CSSCustomPropertyValue::create):
(WebCore::CSSCustomPropertyValue::equals):
(WebCore::CSSCustomPropertyValue::customCSSText):
(WebCore::CSSCustomPropertyValue::name):
(WebCore::CSSCustomPropertyValue::value):
(WebCore::CSSCustomPropertyValue::CSSCustomPropertyValue):
Custom properties are parsed as a property with an ID of CSSPropertyCustom and a CSSCustomPropertyValue
that holds both the name and the value of the property. Ultimately we might want to just ditch property IDs in
favor of AtomicStrings for all properties, and then the need to special case custom properties would go
away. For now, though, this is the way we work custom properties into the existing system.

* css/CSSGrammar.y.in:
Add a production for recognizing custom properties and storing them using a property ID of CSSPropertyCustom
and a CSSCustomPropertyValue that has the name/value pair.

* css/CSSParser.cpp:
(WebCore::filterProperties):
Patched to track seen custom properties and to handle them correctly.

(WebCore::CSSParser::createStyleProperties):
Pass in a seenCustomProperties table to ensure we bail when encountering the same custom property twice.

(WebCore::CSSParser::addCustomPropertyDeclaration):
Called from the grammar production to create the CSSCustomPropertyValue.

(WebCore::isCustomPropertyIdentifier):
Recognize the -- custom property during lexing.

(WebCore::CSSParser::parseIdentifier):
Patched to return a CUSTOM_PROPERTY token when a custom property is identified.

 * css/CSSParser.h:
(WebCore::isCustomPropertyName):
Add a helper function for asking if a property name is custom.

* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
Patched to add support for CSSCustomPropertyValue.

* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
(WebCore::PropertySetCSSStyleDeclaration::setProperty):
(WebCore::PropertySetCSSStyleDeclaration::removeProperty):
Add code for handling custom properties in the CSS OM.

* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
(WebCore::StyleProperties::getCustomPropertyValue):
(WebCore::StyleProperties::getPropertyCSSValue):
(WebCore::StyleProperties::getCustomPropertyCSSValue):
(WebCore::MutableStyleProperties::removeProperty):
(WebCore::MutableStyleProperties::removeCustomProperty):
(WebCore::StyleProperties::propertyIsImportant):
(WebCore::StyleProperties::customPropertyIsImportant):
(WebCore::MutableStyleProperties::setProperty):
(WebCore::MutableStyleProperties::setCustomProperty):
(WebCore::MutableStyleProperties::addParsedProperty):
(WebCore::MutableStyleProperties::findPropertyIndex):
(WebCore::ImmutableStyleProperties::findCustomPropertyIndex):
(WebCore::MutableStyleProperties::findCustomPropertyIndex):
(WebCore::MutableStyleProperties::findCSSPropertyWithID):
(WebCore::MutableStyleProperties::findCustomCSSPropertyWithName):
(WebCore::StyleProperties::propertyMatches):
(WebCore::StyleProperties::PropertyReference::cssName):
* css/StyleProperties.h:
(WebCore::StyleProperties::findCustomPropertyIndex):
Patched to support handling custom properties in the CSS OM. We have to create equivalent methods that operate
on AtomicString propertyNames instead of on property IDs.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::CascadedProperties::customProperties):
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::CascadedProperties::set):
(WebCore::StyleResolver::applyCascadedProperties):
The resolver has to hold a HashMap from AtomicStrings to Properties. It matches identically to how built-in
properties work except that an extensible table (HashMap) is used to hold the property data.

* css/makeprop.pl:
Patched to include the special CSSPropertyCustom value of 1 (just after the CSSPropertyInvalid id value but before the first
built-in property value).

* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::getText):
(WebCore::lowercasePropertyName):
(WebCore::InspectorStyle::populateAllProperties):
Patch inspector to not lowercase CSS custom property names, since they are case-sensitive.

* rendering/style/RenderStyle.h:
* rendering/style/StyleCustomPropertyData.h: Added.
(WebCore::StyleCustomPropertyData::create):
(WebCore::StyleCustomPropertyData::copy):
(WebCore::StyleCustomPropertyData::operator==):
(WebCore::StyleCustomPropertyData::operator!=):
(WebCore::StyleCustomPropertyData::setCustomPropertyValue):
(WebCore::StyleCustomPropertyData::getCustomPropertyValue):
(WebCore::StyleCustomPropertyData::hasCustomProperty):
(WebCore::StyleCustomPropertyData::StyleCustomPropertyData):
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
The front end storage in the RenderStyle for custom properties. For now, custom properties are always inherited, so the
data is in StyleRareInheritedData.

LayoutTests:

* fast/css/custom-properties: Added.
* fast/css/custom-properties/computed-style-access-expected.html: Added.
* fast/css/custom-properties/computed-style-access-inherited-expected.html: Added.
* fast/css/custom-properties/computed-style-access-inherited.html: Added.
* fast/css/custom-properties/computed-style-access.html: Added.
* fast/css/custom-properties/inline-style-property-get-expected.html: Added.
* fast/css/custom-properties/inline-style-property-get.html: Added.
* fast/css/custom-properties/rule-property-get-css-value-expected.html: Added.
* fast/css/custom-properties/rule-property-get-css-value.html: Added.
* fast/css/custom-properties/rule-property-get-expected.html: Added.
* fast/css/custom-properties/rule-property-get.html: Added.
* fast/css/custom-properties/rule-property-priority-expected.html: Added.
* fast/css/custom-properties/rule-property-priority.html: Added.
* fast/css/custom-properties/rule-property-set-expected.html: Added.
* fast/css/custom-properties/rule-property-set.html: Added.
* fast/css/custom-properties/rule-serialization-expected.html: Added.
* fast/css/custom-properties/rule-serialization.html: Added.

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

4 years agoOptimize Range's lengthOfContentsInNode() for DocumentType Nodes
cdumez@apple.com [Thu, 24 Sep 2015 17:25:13 +0000 (17:25 +0000)]
Optimize Range's lengthOfContentsInNode() for DocumentType Nodes
https://bugs.webkit.org/show_bug.cgi?id=149529

Reviewed by Darin Adler.

Optimize Range's lengthOfContentsInNode() for DocumentType Nodes:
- https://dom.spec.whatwg.org/#concept-node-length

We currently call Node::countChildNodes() unnecessarily on DocumentType
Nodes instead of simply returning 0.

* dom/Range.cpp:
(WebCore::lengthOfContentsInNode):
(WebCore::Range::processContents):

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

4 years ago[WinCairo] NULL pointer crash when trying to use tiled backing for frame view.
peavo@outlook.com [Thu, 24 Sep 2015 17:00:59 +0000 (17:00 +0000)]
[WinCairo] NULL pointer crash when trying to use tiled backing for frame view.
https://bugs.webkit.org/show_bug.cgi?id=149523

Reviewed by Brent Fulgham.

For WinCairo, disable tiled backing for frame view.

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::shouldUseTiledBackingForFrameView):

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

4 years agoBuild fix.
mitz@apple.com [Thu, 24 Sep 2015 16:32:08 +0000 (16:32 +0000)]
Build fix.

* WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:

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

4 years agoUnreviewed, fix typo errors in a comment ("passed" -> "Passed", "Overwise" -> "Otherw...
changseok.oh@collabora.com [Thu, 24 Sep 2015 15:55:47 +0000 (15:55 +0000)]
Unreviewed, fix typo errors in a comment ("passed" -> "Passed", "Overwise" -> "Otherwise")

* css/mediaControlsGtk.css:

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

4 years agoUnreviewed, rebaseline media/media-controls-play-button-updates.html.
changseok.oh@collabora.com [Thu, 24 Sep 2015 15:48:41 +0000 (15:48 +0000)]
Unreviewed, rebaseline media/media-controls-play-button-updates.html.

* platform/gtk/media/media-controls-play-button-updates-expected.txt:

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

4 years agoUnreviewed. Make Lucas Forschler a WebKit reviewer.
mark.lam@apple.com [Thu, 24 Sep 2015 15:39:06 +0000 (15:39 +0000)]
Unreviewed. Make Lucas Forschler a WebKit reviewer.

* Scripts/webkitpy/common/config/contributors.json:

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

4 years agoReduce almost uses of PassRefPtr in Webcore/testing
gyuyoung.kim@webkit.org [Thu, 24 Sep 2015 14:56:52 +0000 (14:56 +0000)]
Reduce almost uses of PassRefPtr in Webcore/testing
https://bugs.webkit.org/show_bug.cgi?id=149449

Reviewed by Darin Adler.

This patch removes all uses of PassRefPtr except for Internals::serializeObject() and Internals::deserializeObject().
It will be removed by upcoming patch.

* Modules/encryptedmedia/CDMSessionClearKey.cpp:
(WebCore::CDMSessionClearKey::generateKeyRequest):
* Modules/encryptedmedia/CDMSessionClearKey.h:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
* platform/graphics/CDMSession.h:
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
(WebCore::CDMSessionAVFoundationCF::generateKeyRequest):
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
(WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
* testing/InternalSettings.h:
(WebCore::InternalSettings::create):
* testing/Internals.cpp:
(WebCore::Internals::create):
(WebCore::Internals::computedStyleIncludingVisitedInfo):
(WebCore::Internals::markerRangeForNode):
(WebCore::Internals::rangeFromLocationAndLength):
(WebCore::Internals::subrange):
(WebCore::Internals::nodesFromRect):
(WebCore::Internals::mallocStatistics):
(WebCore::Internals::typeConversions):
(WebCore::Internals::memoryInfo):
(WebCore::Internals::serializeObject):
(WebCore::Internals::deserializeBuffer):
(WebCore::Internals::createTimeRanges):
* testing/Internals.h:
* testing/MallocStatistics.h:
(WebCore::MallocStatistics::create):
* testing/MemoryInfo.h:
(WebCore::MemoryInfo::create):
* testing/MockCDM.cpp:
(WebCore::MockCDMSession::generateKeyRequest):
* testing/TypeConversions.h:
(WebCore::TypeConversions::create):

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

4 years agoRan sort-Xcode-project-file.
rniwa@webkit.org [Thu, 24 Sep 2015 14:26:50 +0000 (14:26 +0000)]
Ran sort-Xcode-project-file.

Source/JavaScriptCore:

* JavaScriptCore.xcodeproj/project.pbxproj:

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:

Source/WebInspectorUI:

* WebInspectorUI.xcodeproj/project.pbxproj:

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit2:

* WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

* WTF.xcodeproj/project.pbxproj:

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

4 years ago[GTK] playbutton in media controls is not changed when it is clicked.
changseok.oh@collabora.com [Thu, 24 Sep 2015 09:41:06 +0000 (09:41 +0000)]
[GTK] playbutton in media controls is not changed when it is clicked.
https://bugs.webkit.org/show_bug.cgi?id=149113

Reviewed by Philippe Normand.

Source/WebCore:

When the play button in media controls is clicked, a 'paused' class is added or removed
for the element to update its appearance. Although Document::recalcStyle is triggered
by that class attribute change, the play button is not changed since there is
no difference in styles whether having the 'paused' class or not. Gtk port
does not define the -webkit-media-controls-play-button.paused. To fix this,
-webkit-media-controls-play-button.paused is newly defined with a dummy style,
"position: relative;", which should not change the play button appearance,
but be clearly different in style.

Test: media/media-controls-play-button-updates.html

* css/mediaControlsGtk.css:
(video::-webkit-media-controls-play-button.paused):

LayoutTests:

* media/media-controls-play-button-updates-expected.png: Added.
* media/media-controls-play-button-updates-expected.txt: Added.
* media/media-controls-play-button-updates.html: Added.
* platform/efl/TestExpectations: Skip the test.
* platform/gtk/media/media-controls-play-button-updates-expected.png: Added.
* platform/gtk/media/media-controls-play-button-updates-expected.txt: Added.
* platform/mac/TestExpectations: Skip the test on yosemite.

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

4 years agoUnreviewed. Fix GObject DOM API breaks after r190120.
carlosgc@webkit.org [Thu, 24 Sep 2015 09:24:54 +0000 (09:24 +0000)]
Unreviewed. Fix GObject DOM API breaks after r190120.

Source/WebCore:

EntityReference has been removed from the DOM spec. Generate an
empy GObject implementation to keep API and ABI
compatibility. also add a deprecated impementation for the methods
using WebKitEntityReference.

* PlatformGTK.cmake: Do not generate bindings for EntityReference.idl.
* bindings/gobject/WebKitDOMDeprecated.cpp:
(webkit_dom_entity_reference_init):
(webkit_dom_entity_reference_class_init):
(webkit_dom_node_iterator_get_expand_entity_references):
(webkit_dom_tree_walker_get_expand_entity_references):
(webkit_dom_document_create_entity_reference):
* bindings/gobject/WebKitDOMDeprecated.h:
* bindings/gobject/WebKitDOMDeprecated.symbols:
* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Remove FIXME.
* dom/Document.idl: Do not generate createEntityReference for GObject.
* dom/EntityReference.idl: Do not generate empty files for GObject.

Tools:

Bring back code removed in r169931 to handle documentation of
deleted classes.

* gtk/webkitdom.py:
(WebKitDOMDocGenerator):
(WebKitDOMDocGenerator.write_deleted_classes):
(WebKitDOMDocGenerator.generate):
(write_deleted_classes):
(WebKitDOMDocGeneratorSections._deleted_class):
(WebKitDOMDocGeneratorSections._deleted_class.in):
(WebKitDOMDocGeneratorSections.write_deleted_classes):
(WebKitDOMDocGeneratorSections.write_deleted_classes.with):

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

4 years ago[Streams API] Add support for JS builtins constructor
youenn.fablet@crf.canon.fr [Thu, 24 Sep 2015 09:18:15 +0000 (09:18 +0000)]
[Streams API] Add support for JS builtins constructor
https://bugs.webkit.org/show_bug.cgi?id=149497

Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/JSFunction.h: exporting createBuiltinFunction.

Source/WebCore:

Covered by existing tests.

Making CountQueuingStrategy fully JS built-in implemented.
Adding support for calling a JS builtin initialization function just after creating the JSXX object.
This JS function must be named initializeXX and be in XX.Js file.
The JSBuiltinConstructor keyword is added to the binding generator.

* CMakeLists.txt: Adding CountQueuingStrategy.js, removing JSCountQueuingStrategyCustom.cpp.
* DerivedSources.cpp: Ditto.
* DerivedSources.make: Ditto.
* Modules/streams/CountQueuingStrategy.h: Making CountQueuingStrategy a dummy class.
(WebCore::CountQueuingStrategy::create):
(WebCore::CountQueuingStrategy::~CountQueuingStrategy):
(WebCore::CountQueuingStrategy::CountQueuingStrategy):
* Modules/streams/CountQueuingStrategy.idl:
* Modules/streams/CountQueuingStrategy.js: Added.
(size):
(initializeCountQueuingStrategy):
* WebCore.vcxproj/WebCore.vcxproj: Removing JSCountQueuingStrategyCustom.cpp.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: Ditto.
* bindings/js/JSCountQueuingStrategyCustom.cpp: Removed.
* bindings/js/JSDOMBinding.cpp: Adding support for DOMConstructorJSBuiltinObject.
(WebCore::callInitializeFunction):
(WebCore::DOMConstructorJSBuiltinObject::visitChildren):
* bindings/js/JSDOMBinding.h: Diitto.
(WebCore::createFromJSBuiltin):
(WebCore::DOMConstructorJSBuiltinObject::DOMConstructorJSBuiltinObject):
* bindings/js/WebCoreJSClientData.h: Adding support for CQS builtins functions.
(WebCore::WebCoreJSClientData::WebCoreJSClientData):
(WebCore::WebCoreJSClientData::countQueuingStrategyBuiltins):
* bindings/scripts/CodeGeneratorJS.pm:
(GetJSBuiltinFunctionName):
(GetFunctionName):
(InstanceNeedsVisitChildren): Generating visitChildren method in case of JSBuiltinConstructor.
(GetParentConstructorClassName): Refactoring to make JSXXConstructor derive from DOMConstructorJSBuiltinObject in case of JSBuiltinConstructor.
(GenerateConstructorDeclaration): Ditto.
(GenerateConstructorDefinition): Generate specific constructor in case of JSBuiltinConstructor.
(GenerateConstructorHelperMethods): Refactoring to use Base class.
(IsConstructable): Ditto.
(ConstructorHasProperties): Deleted.
* bindings/scripts/IDLAttributes.txt: Adding JSBuiltinConstructor.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObjectConstructor::JSTestActiveDOMObjectConstructor):
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallbackConstructor::JSTestCallbackConstructor):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
(WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetterConstructor::JSTestCustomNamedGetterConstructor):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::JSTestEventConstructorConstructor):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetConstructor::JSTestEventTargetConstructor):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionConstructor::JSTestExceptionConstructor):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::JSTestGenerateIsReachableConstructor::JSTestGenerateIsReachableConstructor):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorConstructor::JSTestNamedConstructorConstructor):
(WebCore::JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodeConstructor::JSTestNodeConstructor):
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
(WebCore::JSTestNondeterministicConstructor::JSTestNondeterministicConstructor):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::JSTestObjConstructor):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::JSTestOverloadedConstructorsConstructor):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::JSTestOverrideBuiltinsConstructor::JSTestOverrideBuiltinsConstructor):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::JSattributeConstructor::JSattributeConstructor):
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::JSreadonlyConstructor::JSreadonlyConstructor):

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

4 years agoSimplify / Optimize Range::selectNode()
cdumez@apple.com [Thu, 24 Sep 2015 04:23:03 +0000 (04:23 +0000)]
Simplify / Optimize Range::selectNode()
https://bugs.webkit.org/show_bug.cgi?id=149515

Reviewed by Ryosuke Niwa.

Simplify / Optimize Range::selectNode():
1. Do a null-check on refNode->parentNode() instead of checking the
   nodeType(), which is virtual. Attr, DocumentFragment and Document
   Nodes do not have a parent and thus are covered by this check.
   Also, setStartBefore() / setEndAfter() were already doing a null
   check on the parent.
2. Call lower-level setStart() / setEnd() directly, instead of using
   setStartBefore() / setEndAfter() as intermediary. As a result:
   2.a. We avoid doing a redundant null checks on refNode and its parent
        (inside those intermediate functions)
   2.b. We only call refNode->computeNodeIndex() once instead of twice
        (in each of those intermediate functions). computeNodeIndex()
        is not a trivial getter as its needs to traverse all the
        previous siblings.

The implementation now matches exactly the text of the DOM specification
as well:
https://dom.spec.whatwg.org/#concept-range-select

No new layout tests, no web-exposed behavior intended.

* dom/Range.cpp:
(WebCore::Range::selectNode):

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

4 years agoUnreviewed, rebaseline web-platform-tests/html/dom/interfaces.html after r190190
cdumez@apple.com [Thu, 24 Sep 2015 01:52:08 +0000 (01:52 +0000)]
Unreviewed, rebaseline web-platform-tests/html/dom/interfaces.html after r190190

* web-platform-tests/html/dom/interfaces-expected.txt:

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

4 years agoLink highlight rect is too rounded on blocks with border-radius
timothy_horton@apple.com [Thu, 24 Sep 2015 01:27:48 +0000 (01:27 +0000)]
Link highlight rect is too rounded on blocks with border-radius
https://bugs.webkit.org/show_bug.cgi?id=149511

Reviewed by Dan Bernstein.

* UIProcess/ios/WKContentViewInteraction.mm:
(nsSizeForTapHighlightBorderRadius):
(-[WKContentView _updateTapHighlight]):
Scale the border radius from content to view coordinates, just like
we do for the rects that WebKit returns us.

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

4 years ago[Cocoa] [Font Features] Implement font-variant-*
mmaxfield@apple.com [Thu, 24 Sep 2015 00:40:53 +0000 (00:40 +0000)]
[Cocoa] [Font Features] Implement font-variant-*
https://bugs.webkit.org/show_bug.cgi?id=148413

Reviewed by Darin Adler.

Source/WebCore:

This patch is the first pass of implementing of the font-variant-* properties. Specifically,
these properties are:
font-variant-ligatures
font-variant-position
font-variant-caps
font-variant-numeric
font-variant-alternates
font-variant-east-asian

These new properties are held inside FontDescription as bit fields. At font creation time,
we consult with the FontDescription to figure out which variants are specified. We then
convert those variants to font features, and resolve these font features with the additional
features specified by font-feature-settings (as the spec requires). This patch also makes
our caches sensitive to these new properties of FontDescription so we don't look up cached,
stale fonts.

The implementation has some caveats, however. They are listed here:
1. These new properties need to interact correctly with @font-face declarations. In
particular, only certain properties of the FontDescription should be considered when
detecting if a @font-face declaration applies to a particular element. This discrimination
does not happen correctly. In addition, any feature-specific CSS properties inside the
@font-face declaration need to be consulted at a particular point during the feature
resolve. This does not currently occur.
2. One of the properties, font-variant-alternates, has a few values which require custom
CSS functions, which makes modeling the properties as bit fields tricky. These extra values
need to be implemented. This patch implements all the values which do not require extra CSS
features.
3. These new properties have a shorthand, font-variant, which is designed to be backward-
compatible with CSS 2.1's concept of font-variant. In particular, CSS 2.1 allows you to use
"normal" and "small-caps" with font-variant. Both of these values are values of the new
property font-variant-caps. However, our existing implementation of small-caps does not
use font features when they exist; instead, it simply draws text at a smaller font size and
uses (effectively) text-transform to force capital letters. This implementation needs to be
unified with the new font-variant-caps property so that we can expand font-variant to be
a shorthand for the new properties.
4. font-variant-position and font-variant-caps should provide appropriate synthesis if no
matching font-feature exists.
5. FontCascade::typesettingFeatures() is now no-longer accurate. Fixing this would be large
enough to warrant its own patch.
6. These properties are not tested with TrueType fonts.

Tests: css3/font-variant-all-webfont.html
       css3/font-variant-parsing.html

* css/CSSComputedStyleDeclaration.cpp: Reconstruct StyleProperties from a RenderStyle.
(WebCore::appendLigaturesValue):
(WebCore::fontVariantLigaturesPropertyValue):
(WebCore::fontVariantPositionPropertyValue):
(WebCore::fontVariantCapsPropertyValue):
(WebCore::fontVariantNumericPropertyValue):
(WebCore::fontVariantAlternatesPropertyValue):
(WebCore::fontVariantEastAsianPropertyValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSFontFeatureValue.cpp: Update to FontFeatureTag instead of WTF::String.
(WebCore::CSSFontFeatureValue::CSSFontFeatureValue):
(WebCore::CSSFontFeatureValue::customCSSText):
* css/CSSFontFeatureValue.h: Ditto.
(WebCore::CSSFontFeatureValue::create):
(WebCore::CSSFontFeatureValue::tag):
* css/CSSParser.cpp: Parse the new properties according to the CSS3 fonts spec.
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFontFeatureTag):
(WebCore::CSSParser::parseFontVariantLigatures):
(WebCore::CSSParser::parseFontVariantNumeric):
(WebCore::CSSParser::parseFontVariantEastAsian):
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h: For the three properties which are simple keyword value
properties, implement casting operators to automatically convert between RenderStyle
objects and CSS property objects.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator FontVariantPosition):
(WebCore::CSSPrimitiveValue::operator FontVariantCaps):
(WebCore::CSSPrimitiveValue::operator FontVariantAlternates):
* css/CSSPropertyNames.in: New properties.
* css/CSSValueKeywords.in: New values.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertFontFeatureSettings): Update to not use
RefPtrs.
* css/StyleBuilderCustom.h: Properties which are not simple keyword value properties are
decomposed into multiple members of FontDescription. These properties exist to convert
between these aggregate members and the CSS properties.
(WebCore::StyleBuilderCustom::applyInheritFontVariantLigatures):
(WebCore::StyleBuilderCustom::applyInitialFontVariantLigatures):
(WebCore::StyleBuilderCustom::applyValueFontVariantLigatures):
(WebCore::StyleBuilderCustom::applyInheritFontVariantNumeric):
(WebCore::StyleBuilderCustom::applyInitialFontVariantNumeric):
(WebCore::StyleBuilderCustom::applyValueFontVariantNumeric):
(WebCore::StyleBuilderCustom::applyInheritFontVariantEastAsian):
(WebCore::StyleBuilderCustom::applyInitialFontVariantEastAsian):
(WebCore::StyleBuilderCustom::applyValueFontVariantEastAsian):
(WebCore::StyleBuilderCustom::applyInitialWebkitFontVariantLigatures): Deleted.
(WebCore::StyleBuilderCustom::applyInheritWebkitFontVariantLigatures): Deleted.
(WebCore::StyleBuilderCustom::applyValueWebkitFontVariantLigatures): Deleted.
* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::computedAttributesForElement): Unprefix font-variant-ligatures.
* platform/graphics/FontCache.h: Update cache to be sensitive to new state in
FontDescription.
(WebCore::FontDescriptionKey::FontDescriptionKey):
(WebCore::FontDescriptionKey::operator==):
(WebCore::FontDescriptionKey::computeHash):
(WebCore::FontDescriptionKey::makeFlagsKey):
(WebCore::FontDescriptionKey::makeFlagKey): Deleted.
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::codePath): These new variants should trigger the complex text
codepath.
* platform/graphics/FontCascade.h:
(WebCore::FontCascade::computeTypesettingFeatures): Update to use new state enum.
* platform/graphics/FontDescription.cpp: Add state to hold new property values.
(WebCore::FontDescription::FontDescription):
(WebCore::FontCascadeDescription::FontCascadeDescription): Deleted.
* platform/graphics/FontDescription.h: Add state to hold new property values.
(WebCore::FontDescription::featureSettings):
(WebCore::FontDescription::variantCommonLigatures):
(WebCore::FontDescription::variantDiscretionaryLigatures):
(WebCore::FontDescription::variantHistoricalLigatures):
(WebCore::FontDescription::variantContextualAlternates):
(WebCore::FontDescription::variantPosition):
(WebCore::FontDescription::variantCaps):
(WebCore::FontDescription::variantNumericFigure):
(WebCore::FontDescription::variantNumericSpacing):
(WebCore::FontDescription::variantNumericFraction):
(WebCore::FontDescription::variantNumericOrdinal):
(WebCore::FontDescription::variantNumericSlashedZero):
(WebCore::FontDescription::variantAlternates):
(WebCore::FontDescription::variantEastAsianVariant):
(WebCore::FontDescription::variantEastAsianWidth):
(WebCore::FontDescription::variantEastAsianRuby):
(WebCore::FontDescription::variantSettings):
(WebCore::FontDescription::setFeatureSettings):
(WebCore::FontDescription::setVariantCommonLigatures):
(WebCore::FontDescription::setVariantDiscretionaryLigatures):
(WebCore::FontDescription::setVariantHistoricalLigatures):
(WebCore::FontDescription::setVariantContextualAlternates):
(WebCore::FontDescription::setVariantPosition):
(WebCore::FontDescription::setVariantCaps):
(WebCore::FontDescription::setVariantNumericFigure):
(WebCore::FontDescription::setVariantNumericSpacing):
(WebCore::FontDescription::setVariantNumericFraction):
(WebCore::FontDescription::setVariantNumericOrdinal):
(WebCore::FontDescription::setVariantNumericSlashedZero):
(WebCore::FontDescription::setVariantAlternates):
(WebCore::FontDescription::setVariantEastAsianVariant):
(WebCore::FontDescription::setVariantEastAsianWidth):
(WebCore::FontDescription::setVariantEastAsianRuby):
(WebCore::FontDescription::operator==):
(WebCore::FontCascadeDescription::initialVariantPosition):
(WebCore::FontCascadeDescription::initialVariantCaps):
(WebCore::FontCascadeDescription::initialVariantAlternates):
(WebCore::FontCascadeDescription::commonLigaturesState): Deleted.
(WebCore::FontCascadeDescription::discretionaryLigaturesState): Deleted.
(WebCore::FontCascadeDescription::historicalLigaturesState): Deleted.
(WebCore::FontCascadeDescription::setCommonLigaturesState): Deleted.
(WebCore::FontCascadeDescription::setDiscretionaryLigaturesState): Deleted.
(WebCore::FontCascadeDescription::setHistoricalLigaturesState): Deleted.
(WebCore::FontCascadeDescription::operator==): Deleted.
* platform/graphics/FontFeatureSettings.cpp: Update to use FontFeatureTag instead of
WTF::String.
(WebCore::FontFeature::FontFeature):
(WebCore::FontFeature::operator==):
(WebCore::FontFeature::operator<):
(WebCore::FontFeatureSettings::hash):
(WebCore::FontFeatureSettings::create): Deleted.
* platform/graphics/FontFeatureSettings.h: Update to use FontFeatureTag instead of
WTF::String.
(WebCore::fontFeatureTag):
(WebCore::FontFeatureTagHash::hash):
(WebCore::FontFeatureTagHash::equal):
(WebCore::FontFeatureTagHashTraits::constructDeletedValue):
(WebCore::FontFeatureTagHashTraits::isDeletedValue):
(WebCore::FontFeature::tag):
(WebCore::FontFeatureSettings::operator==):
(WebCore::FontFeatureSettings::begin):
(WebCore::FontFeatureSettings::end):
(WebCore::FontFeatureSettings::FontFeatureSettings): Deleted.
* platform/graphics/cocoa/FontCacheCoreText.cpp: Ditto. Also, when computing font
features, consult with the state inside FontDescription.
(WebCore::tagEquals):
(WebCore::appendTrueTypeFeature):
(WebCore::appendOpenTypeFeature):
(WebCore::computeFeatureSettingsFromVariants):
(WebCore::preparePlatformFont):
(WebCore::platformFontLookupWithFamily):
(WebCore::fontWithFamily):
(WebCore::FontCache::createFontPlatformData):
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp: Update to use references instead of
pointers.
(WebCore::HarfBuzzShaper::setFontFeatures):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::platformFontWithFamily): Ditto.
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Be sensitive to new state inside FontDescription.
* platform/text/TextFlags.h:
(WebCore::FontVariantSettings::isAllNormal): New state enums.
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::updateCachedSystemFontDescription): Be sensitive to new state inside
FontDescription.
* rendering/line/BreakingContext.h:

Tools:

Update test font to use "lnum" feature.

* FontWithFeatures/FontWithFeatures/FontCreator.cpp:
(Generator::appendGSUBTable):

LayoutTests:

Updating tests because font-variant-ligatures is being unprefixed.

Also, update css3/resources/FontWithFeatures.otf to support "lnum" feature.

* css3/font-feature-settings-rendering-2-expected.html:
* css3/font-feature-settings-rendering-2.html:
* css3/font-variant-all-webfont-expected.html: Added.
* css3/font-variant-all-webfont.html: Added.
* css3/font-variant-parsing-expected.txt: Added.
* css3/font-variant-parsing.html: Added.
* css3/resources/FontWithFeatures.otf:
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-font-family-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/getComputedStyle/resources/property-names.js:
* fast/css/parsing-font-variant-ligatures.html:
* fast/text/font-variant-ligatures.html:
* platform/mac/TestExpectations:
* svg/css/getComputedStyle-basic-expected.txt:

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

4 years agoFix broken inspector tests.
sbarati@apple.com [Thu, 24 Sep 2015 00:19:03 +0000 (00:19 +0000)]
Fix broken inspector tests.

Reviewed by Joseph Pecoraro and Brian Burg.

We can't redeclare a "let" variable and "var" variable using the same
identifier at the top-level of a function.

* UserInterface/Test/InspectorProtocol.js:
(InspectorProtocol.sendCommand):
(InspectorProtocol.addEventListener):
(InspectorProtocol.dispatchMessageFromBackend):

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

4 years agoUnreviewed, roll out r190085 as it seems to cause crashes in JSC
cdumez@apple.com [Wed, 23 Sep 2015 23:52:09 +0000 (23:52 +0000)]
Unreviewed, roll out r190085 as it seems to cause crashes in JSC
<rdar://problem/22825602>

LayoutTests/imported/w3c:

* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributesHashTable):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSreadonly.cpp:

LayoutTests:

* fast/events/event-prototype-constructor-properties-expected.txt: Removed.
* fast/events/event-prototype-constructor-properties.html: Removed.

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

4 years agoHTMLOutputElement.htmlFor should be settable
cdumez@apple.com [Wed, 23 Sep 2015 22:59:12 +0000 (22:59 +0000)]
HTMLOutputElement.htmlFor should be settable
https://bugs.webkit.org/show_bug.cgi?id=149418

Reviewed by Ryosuke Niwa.

Source/WebCore:

HTMLOutputElement.htmlFor should be settable as per the latest HTML
specification:
- https://html.spec.whatwg.org/multipage/forms.html#the-output-element

It is supposed to call DOMSettableTokenList.setValue() with the input
String. This patch adds support for this by adding [PutForwards=value]
IDL extended attribute.

This aligns our behavior with the specification, Firefox and Chrome.

No new tests, already covered by existing test.

* html/AttributeDOMTokenList.cpp:
(WebCore::AttributeDOMTokenList::AttributeDOMTokenList):
(WebCore::AttributeDOMTokenList::attributeValueChanged):
* html/AttributeDOMTokenList.h:
- Have AttributeDOMTokenList subclass DOMSettableTokenList instead of
DOMTokenList so that it can be used in places where the IDL expects
us to return a DOMSettableTokenList (e.g. HTMLOutputElement.htmlFor).
- Mark AttributeDOMTokenList as fast allocated.

* html/DOMSettableTokenList.cpp:
(WebCore::DOMSettableTokenList::setValue):
* html/DOMSettableTokenList.h:
- Move setValue() from DOMTokenList to DOMSettableTokenList
  as it is only needed by DOMSettableTokenList.
- Get rid of the factory function as all call sites are using
  AttributeDOMTokenList now.
- Stop inheriting RefCounted as AttributeDOMTokenList handles its
  own refcounting.

* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::setValueInternal):
* html/DOMTokenList.h:
Rename setValue() to setValueInternal() as this version does not
update the associated attribute value, only the tokens.

* html/HTMLLinkElement.cpp:
* html/HTMLLinkElement.h:
- Have HTMLLinkElement.sizes use an AttributeDOMTokenList instead of
  a DOMSettableTokenList as there is an associated attribute. The
  previous code had a bug has setting HTMLLinkElement.sizes would not
  update the associated 'sizes' attribute. Switching to using
  AttributeDOMTokenList fixes this and a new layout test has been added
  to cover this.
- Create the AttributeDOMTokenList lazily to avoid updating it every
  time the sizes attribute changes until it is actually accessed.

* html/HTMLOutputElement.cpp:
* html/HTMLOutputElement.h:
- Have HTMLLinkElement.htmlFor use an AttributeDOMTokenList instead of
  a DOMSettableTokenList as there is an associated attribute.
- Create the AttributeDOMTokenList lazily to avoid updating it every
  time the sizes attribute changes until it is actually accessed.

* html/HTMLOutputElement.idl:
Add [PutForwards=value] on the htmlFor attribute, as per the
HTML specification.

LayoutTests:

* fast/dom/HTMLLinkElement/sizes-setter.html: Added
* fast/dom/HTMLLinkElement/sizes-setter-expected.txt: Added
Add layout test to make sure that setting HTMLLinkElement.sizes actually
updates the 'sizes' associated attribute.

* fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt:
* fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js:
Update existing layout test now that HTMLOutputElement.htmlFor is
settable.

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

4 years agoJSC allows invalid var declarations when the declared name is the same as a let/const...
sbarati@apple.com [Wed, 23 Sep 2015 22:37:36 +0000 (22:37 +0000)]
JSC allows invalid var declarations when the declared name is the same as a let/const variable
https://bugs.webkit.org/show_bug.cgi?id=147600

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

We had an ordering bug where if you first declared a "let"
variable then a "var" variable with the same name, you wouldn't
get a syntax error. But, if you did it in the reverse order,
you would. This patch fixes this syntax error to be order independent.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseVariableDeclarationList):
(JSC::Parser<LexerType>::createBindingPattern):
(JSC::Parser<LexerType>::parseFunctionDeclaration):
* parser/Parser.h:
(JSC::Scope::declareVariable):

LayoutTests:

* js/let-syntax-expected.txt:
* js/script-tests/let-syntax.js:
(hasSyntaxError):

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

4 years agoTreeWalker.previousSibling() / nextSibling() does not behave according to the specif...
cdumez@apple.com [Wed, 23 Sep 2015 21:40:50 +0000 (21:40 +0000)]
TreeWalker.previousSibling()  / nextSibling() does not behave according to the specification
https://bugs.webkit.org/show_bug.cgi?id=149493

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline existing W3C DOM test now that more checks are passing.

* web-platform-tests/dom/traversal/TreeWalker-expected.txt:

Source/WebCore:

TreeWalker.previousSibling()  / nextSibling() does not behave according
to the specification:
- https://dom.spec.whatwg.org/#dom-treewalker-nextsibling
- https://dom.spec.whatwg.org/#dom-treewalker-previoussibling
- https://dom.spec.whatwg.org/#concept-traverse-siblings

In particular, the previous code would fail to update 'node' variable
in the case acceptNode() returned FILTER_REJECT. This patch fixes this
and refactors the function to match more closely the text of the spec
and avoid code duplication.

No new tests, already covered by existing test.

* dom/TreeWalker.cpp:
(WebCore::TreeWalker::traverseSiblings):
(WebCore::TreeWalker::previousSibling):
(WebCore::TreeWalker::nextSibling):
(WebCore::TreeWalker::previousNode): Deleted.
* dom/TreeWalker.h:

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

4 years agoWeb Inspector: Don't use bind() when creating internal AST, instead, pass in "this...
sbarati@apple.com [Wed, 23 Sep 2015 21:03:30 +0000 (21:03 +0000)]
Web Inspector: Don't use bind() when creating internal AST, instead, pass in "this" parameter to map()
https://bugs.webkit.org/show_bug.cgi?id=149483

Reviewed by Joseph Pecoraro.

* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):

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

4 years agoParallel copy phase synchronization should be simplified
fpizlo@apple.com [Wed, 23 Sep 2015 20:59:51 +0000 (20:59 +0000)]
Parallel copy phase synchronization should be simplified
https://bugs.webkit.org/show_bug.cgi?id=149509

Reviewed by Mark Lam.

Before this change, we didn't wait for the copy phase to finish before starting to do things to
copied space that presumed that copying was done. Copied space would "detect" that nobody was
copying anymore by waiting for all loaned blocks to be returned. But that would succeed if some
thread had not yet started copying. So, we had weird hacks to ensure that a block was loaned
before any threads started. It also meant that we had two separate mechanisms for waiting for
copying threads to finish - one mechanism in the Heap phase logic and another in the
CopiedSpace::doneCopying() method.

We can get rid of a lot of the weirdness by just having a sound shutdown sequence:

1) Threads concur on when there is no more work. We already have this; once
   Heap::getNextBlocksToCopy() returns no work in any thread, it will also return no work in
   any other thread that asks for work.
2) Main thread waits for the threads to not be copying anymore.
3) Do whatever we need to do after copying finishes.

Currently, we do (3) before (2) and so we have weird problems. This just changes the code to do
(3) after (2), and so we can get rid of the synchronization in doneCopying() and we can safely
call startCopying() inside GCThread. This also means that we don't need to make CopyVisitor a
property of GCThread. Instead, GCThread just instantiates its own CopyVisitor when it needs to.

* heap/CopiedSpace.cpp:
(JSC::CopiedSpace::doneCopying):
* heap/GCThread.cpp:
(JSC::GCThread::GCThread):
(JSC::GCThread::slotVisitor):
(JSC::GCThread::waitForNextPhase):
(JSC::GCThread::gcThreadMain):
(JSC::GCThread::copyVisitor): Deleted.
* heap/GCThread.h:
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::copyBackingStores):
(JSC::Heap::gatherStackRoots):

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

4 years agoWeb Inspector: Type bubbles missing for computed methods and methods on object literals
sbarati@apple.com [Wed, 23 Sep 2015 20:58:51 +0000 (20:58 +0000)]
Web Inspector: Type bubbles missing for computed methods and methods on object literals
https://bugs.webkit.org/show_bug.cgi?id=148562

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

This patch makes sure that computed methods are working
for both classes and object literals. Also, methods now
work on object literals. This patch also cleans up the
"isGetterOrSetter" and "getterOrSetterRange" fields.
Basically, we used this as a way to ask the type profiler
for the return types of a function. Now, we just have
a field called "typeProfilingReturnDivot" that is set
on all functions so we don't need to conditionally ask
if it's a getter or setter.

* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype._insertTypeToken):
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.functionReturnDivot):
(WebInspector.ScriptSyntaxTree.prototype._recurseArray):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WebInspector.ScriptSyntaxTree):

LayoutTests:

* inspector/model/parse-script-syntax-tree-expected.txt:
* inspector/model/parse-script-syntax-tree.html:

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

4 years agoaccessibility/mac/aria-expanded-notifications.html is flaky
bdakin@apple.com [Wed, 23 Sep 2015 20:34:18 +0000 (20:34 +0000)]
accessibility/mac/aria-expanded-notifications.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=149510

Marking it as such.
* platform/mac/TestExpectations:

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

4 years agoDisable QuickLook on watchOS
aestes@apple.com [Wed, 23 Sep 2015 20:07:35 +0000 (20:07 +0000)]
Disable QuickLook on watchOS
https://bugs.webkit.org/show_bug.cgi?id=149508
<rdar://problem/22517968>

Reviewed by Dan Bernstein.

* wtf/Platform.h:

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

4 years agoFix CMake build.
achristensen@apple.com [Wed, 23 Sep 2015 19:29:50 +0000 (19:29 +0000)]
Fix CMake build.

* CMakeLists.txt:
Use {} instead of () for CMake variables.

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

4 years agoTry to fix the CMake build.
timothy_horton@apple.com [Wed, 23 Sep 2015 19:12:15 +0000 (19:12 +0000)]
Try to fix the CMake build.

* CMakeLists.txt:

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

4 years agoRemove unimplemented method Heap::showStatistics
commit-queue@webkit.org [Wed, 23 Sep 2015 19:02:55 +0000 (19:02 +0000)]
Remove unimplemented method Heap::showStatistics
https://bugs.webkit.org/show_bug.cgi?id=149507

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-23
Reviewed by Darin Adler.

* heap/Heap.h:

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

4 years agoHopefully fix the production build.
timothy_horton@apple.com [Wed, 23 Sep 2015 18:49:43 +0000 (18:49 +0000)]
Hopefully fix the production build.

* JavaScriptCore.xcodeproj/project.pbxproj:
* PlatformWin.cmake:

* DerivedSources.make:
* WebCore.vcxproj/build-generated-files.pl:
* WebCore.xcodeproj/project.pbxproj:
* generate-js-builtins:
* make-generated-sources.sh:

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

4 years agoVersioning.
bshafiei@apple.com [Wed, 23 Sep 2015 17:41:15 +0000 (17:41 +0000)]
Versioning.

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

4 years agoMac production build fix attempt after r190155.
rniwa@webkit.org [Wed, 23 Sep 2015 17:00:11 +0000 (17:00 +0000)]
Mac production build fix attempt after r190155.

* WebCore.xcodeproj/project.pbxproj:

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

4 years agoAvoid unnecessary ancestor traversal in Range::selectNodeContents()
cdumez@apple.com [Wed, 23 Sep 2015 16:23:25 +0000 (16:23 +0000)]
Avoid unnecessary ancestor traversal in Range::selectNodeContents()
https://bugs.webkit.org/show_bug.cgi?id=149491

Reviewed by Andreas Kling.

Avoid unnecessary ancestor traversal in Range::selectNodeContents().
A DocumentType Node cannot have children, therefore, there is no need
to check if ancestors are docTypes. We now simply check if the current
node is a DocumentType Node, as per the specification:
- https://dom.spec.whatwg.org/#dom-range-selectnodecontents (step 1)

* dom/Range.cpp:
(WebCore::Range::selectNodeContents):

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

4 years agoRange's setStartBefore() / setStartAfter() / setEndBefore() / setEndAfter() do not...
cdumez@apple.com [Wed, 23 Sep 2015 16:21:33 +0000 (16:21 +0000)]
Range's setStartBefore() / setStartAfter() / setEndBefore() / setEndAfter() do not match the specification
https://bugs.webkit.org/show_bug.cgi?id=149490

Reviewed by Andreas Kling.

LayoutTests/imported/w3c:

Rebaseline several W3C DOM tests now that more checks are passing.

* web-platform-tests/dom/ranges/Range-selectNode-expected.txt:
* web-platform-tests/dom/ranges/Range-surroundContents-expected.txt:

Source/WebCore:

Range's setStartBefore() / setStartAfter() / setEndBefore() / setEndAfter()
behavior do not match the DOM specification:
- https://dom.spec.whatwg.org/#dom-range-setstartbefore
- https://dom.spec.whatwg.org/#dom-range-setstartafter
- https://dom.spec.whatwg.org/#dom-range-setendbefore
- https://dom.spec.whatwg.org/#dom-range-setendafter

In particular, instead of step 2:
"If parent is null, throw an InvalidNodeTypeError exception."

Our implementation was doing more checks and throwing exceptions in cases
that the specification does not say we should. We were calling
checkNodeBA() which had restrictions on both the node type and its
root type. This is now replaced by a simple null check on the parent,
as per the specification.

Firefox's behavior matches the specification.

No new tests, already covered by existing tests.

* dom/Range.cpp:
(WebCore::Range::setStartAfter):
(WebCore::Range::setEndBefore):
(WebCore::Range::setEndAfter):
(WebCore::Range::setStartBefore):
(WebCore::Range::cloneRange): Deleted.
(WebCore::Range::selectNode): Deleted.
(WebCore::Range::selectNodeContents): Deleted.
(WebCore::Range::absoluteTextRects): Deleted.
* dom/Range.h:

LayoutTests:

Update test that expected an assertion in a case where we no longer
throw. I checked that Firefox does not throw in this case either.

* fast/dom/Range/range-exceptions-expected.txt:
* fast/dom/Range/script-tests/range-exceptions.js:

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

4 years agoUnreviewed, rolling out r190168.
commit-queue@webkit.org [Wed, 23 Sep 2015 16:06:00 +0000 (16:06 +0000)]
Unreviewed, rolling out r190168.
https://bugs.webkit.org/show_bug.cgi?id=149502

it broke debug builds. (Requested by zalan on #webkit).

Reverted changeset:

"HTMLOutputElement.htmlFor should be settable"
https://bugs.webkit.org/show_bug.cgi?id=149418
http://trac.webkit.org/changeset/190168

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

4 years agoUnreviewed, rolling out r190160.
commit-queue@webkit.org [Wed, 23 Sep 2015 15:34:16 +0000 (15:34 +0000)]
Unreviewed, rolling out r190160.
https://bugs.webkit.org/show_bug.cgi?id=149501

media/media-controls-play-button-updates.html fails on
Yosemite and EFL (Requested by zalan on #webkit).

Reverted changeset:

"[GTK] playbutton in media controls is not changed when it is
clicked."
https://bugs.webkit.org/show_bug.cgi?id=149113
http://trac.webkit.org/changeset/190160

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

4 years agoTry to fix build.
antti@apple.com [Wed, 23 Sep 2015 15:23:39 +0000 (15:23 +0000)]
Try to fix build.

* css/DocumentRuleSets.h:
* inspector/InspectorInstrumentation.h:

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

4 years agoFix sorting
antti@apple.com [Wed, 23 Sep 2015 15:07:09 +0000 (15:07 +0000)]
Fix sorting

* dom/DOMAllInOne.cpp:

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

4 years agoSplit author style code out from DocumentStyleSheetCollection
antti@apple.com [Wed, 23 Sep 2015 15:04:16 +0000 (15:04 +0000)]
Split author style code out from DocumentStyleSheetCollection
https://bugs.webkit.org/show_bug.cgi?id=149446

Reviewed by Andreas Kling.

Shadow trees may have their own author style. Factor the related code out so we can use
it outside the document context.

DocumentStyleSheetCollection is replaced by two classes:

AuthorStyleSheets - author stylesheets and mutation optimization code
ExtensionStyleSheets - user stylesheets, injected author stylesheets, content extension stylesheets

* WebCore.xcodeproj/project.pbxproj:
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::didMutateRules):
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::~DocumentRuleSets):
(WebCore::DocumentRuleSets::initUserStyle):
* css/DocumentRuleSets.h:
(WebCore::DocumentRuleSets::sibling):
(WebCore::DocumentRuleSets::uncommonAttribute):
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::collectFromStyleSheets):
(WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
(WebCore::InspectorCSSOMWrappers::collectFromDocumentStyleSheetCollection): Deleted.
* css/InspectorCSSOMWrappers.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::appendAuthorStyleSheets):
* css/StyleSheetList.cpp:
(WebCore::StyleSheetList::styleSheets):
(WebCore::StyleSheetList::detachFromDocument):
(WebCore::StyleSheetList::length):
* dom/AuthorStyleSheets.cpp: Added.
(WebCore::AuthorStyleSheets::AuthorStyleSheets):
(WebCore::AuthorStyleSheets::combineCSSFeatureFlags):
(WebCore::AuthorStyleSheets::resetCSSFeatureFlags):
(WebCore::AuthorStyleSheets::addAuthorSheet):
(WebCore::AuthorStyleSheets::removePendingSheet):
(WebCore::AuthorStyleSheets::addStyleSheetCandidateNode):
(WebCore::AuthorStyleSheets::removeStyleSheetCandidateNode):
(WebCore::AuthorStyleSheets::collectActiveStyleSheets):
(WebCore::AuthorStyleSheets::analyzeStyleSheetChange):
(WebCore::filterEnabledNonemptyCSSStyleSheets):
(WebCore::AuthorStyleSheets::updateActiveStyleSheets):
(WebCore::AuthorStyleSheets::activeStyleSheetsForInspector):
(WebCore::AuthorStyleSheets::activeStyleSheetsContains):
(WebCore::AuthorStyleSheets::detachFromDocument):
* dom/AuthorStyleSheets.h: Added.
(WebCore::AuthorStyleSheets::activeStyleSheets):
(WebCore::AuthorStyleSheets::styleSheets):
(WebCore::AuthorStyleSheets::styleSheetsForStyleSheetList):
(WebCore::AuthorStyleSheets::pendingUpdateType):
(WebCore::AuthorStyleSheets::setPendingUpdateType):
(WebCore::AuthorStyleSheets::flushPendingUpdates):
(WebCore::AuthorStyleSheets::preferredStylesheetSetName):
(WebCore::AuthorStyleSheets::selectedStylesheetSetName):
(WebCore::AuthorStyleSheets::setPreferredStylesheetSetName):
(WebCore::AuthorStyleSheets::setSelectedStylesheetSetName):
(WebCore::AuthorStyleSheets::addPendingSheet):
(WebCore::AuthorStyleSheets::hasPendingSheets):
(WebCore::AuthorStyleSheets::usesFirstLineRules):
(WebCore::AuthorStyleSheets::usesFirstLetterRules):
(WebCore::AuthorStyleSheets::usesRemUnits):
(WebCore::AuthorStyleSheets::setUsesRemUnit):
(WebCore::AuthorStyleSheets::usesStyleBasedEditability):
(WebCore::AuthorStyleSheets::setUsesStyleBasedEditability):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::setCompatibilityMode):
(WebCore::Document::recalcStyle):
(WebCore::Document::createStyleResolver):
(WebCore::Document::fontsNeedUpdate):
(WebCore::Document::usesStyleBasedEditability):
(WebCore::Document::processHttpEquiv):
(WebCore::Document::preferredStylesheetSet):
(WebCore::Document::selectedStylesheetSet):
(WebCore::Document::setSelectedStylesheetSet):
(WebCore::Document::scheduleOptimizedStyleSheetUpdate):
(WebCore::Document::styleResolverChanged):
(WebCore::Document::haveStylesheetsLoaded):
(WebCore::Document::getCachedLocale):
* dom/Document.h:
(WebCore::Document::authorStyleSheets):
(WebCore::Document::extensionStyleSheets):
(WebCore::Document::gotoAnchorNeededAfterStylesheetsLoad):
(WebCore::Document::setGotoAnchorNeededAfterStylesheetsLoad):
(WebCore::Document::styleSheetCollection): Deleted.
* dom/DocumentStyleSheetCollection.cpp: Removed.
* dom/DocumentStyleSheetCollection.h: Removed.
* dom/ExtensionStyleSheets.cpp: Copied from Source/WebCore/dom/DocumentStyleSheetCollection.cpp.
(WebCore::ExtensionStyleSheets::ExtensionStyleSheets):
(WebCore::ExtensionStyleSheets::pageUserSheet):
(WebCore::ExtensionStyleSheets::clearPageUserSheet):
(WebCore::ExtensionStyleSheets::updatePageUserSheet):
(WebCore::ExtensionStyleSheets::injectedUserStyleSheets):
(WebCore::ExtensionStyleSheets::injectedAuthorStyleSheets):
(WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache):
(WebCore::ExtensionStyleSheets::invalidateInjectedStyleSheetCache):
(WebCore::ExtensionStyleSheets::addUserSheet):
(WebCore::ExtensionStyleSheets::addDisplayNoneSelector):
(WebCore::ExtensionStyleSheets::maybeAddContentExtensionSheet):
(WebCore::ExtensionStyleSheets::styleResolverChangedTimerFired):
(WebCore::ExtensionStyleSheets::detachFromDocument):
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection): Deleted.
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags): Deleted.
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags): Deleted.
(WebCore::DocumentStyleSheetCollection::pageUserSheet): Deleted.
(WebCore::DocumentStyleSheetCollection::clearPageUserSheet): Deleted.
(WebCore::DocumentStyleSheetCollection::updatePageUserSheet): Deleted.
(WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets): Deleted.
(WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets): Deleted.
(WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache): Deleted.
(WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache): Deleted.
(WebCore::DocumentStyleSheetCollection::addAuthorSheet): Deleted.
(WebCore::DocumentStyleSheetCollection::addUserSheet): Deleted.
(WebCore::DocumentStyleSheetCollection::addDisplayNoneSelector): Deleted.
(WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet): Deleted.
(WebCore::DocumentStyleSheetCollection::styleResolverChangedTimerFired): Deleted.
(WebCore::DocumentStyleSheetCollection::removePendingSheet): Deleted.
(WebCore::DocumentStyleSheetCollection::addStyleSheetCandidateNode): Deleted.
(WebCore::DocumentStyleSheetCollection::removeStyleSheetCandidateNode): Deleted.
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets): Deleted.
(WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange): Deleted.
(WebCore::filterEnabledNonemptyCSSStyleSheets): Deleted.
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Deleted.
(WebCore::DocumentStyleSheetCollection::activeStyleSheetsForInspector): Deleted.
(WebCore::DocumentStyleSheetCollection::activeStyleSheetsContains): Deleted.
(WebCore::DocumentStyleSheetCollection::detachFromDocument): Deleted.
* dom/ExtensionStyleSheets.h: Copied from Source/WebCore/dom/DocumentStyleSheetCollection.h.
(WebCore::ExtensionStyleSheets::documentUserStyleSheets):
(WebCore::DocumentStyleSheetCollection::styleSheetsForStyleSheetList): Deleted.
(WebCore::DocumentStyleSheetCollection::activeAuthorStyleSheets): Deleted.
(WebCore::DocumentStyleSheetCollection::documentUserStyleSheets): Deleted.
(WebCore::DocumentStyleSheetCollection::documentAuthorStyleSheets): Deleted.
(WebCore::DocumentStyleSheetCollection::pendingUpdateType): Deleted.
(WebCore::DocumentStyleSheetCollection::setPendingUpdateType): Deleted.
(WebCore::DocumentStyleSheetCollection::flushPendingUpdates): Deleted.
(WebCore::DocumentStyleSheetCollection::preferredStylesheetSetName): Deleted.
(WebCore::DocumentStyleSheetCollection::selectedStylesheetSetName): Deleted.
(WebCore::DocumentStyleSheetCollection::setPreferredStylesheetSetName): Deleted.
(WebCore::DocumentStyleSheetCollection::setSelectedStylesheetSetName): Deleted.
(WebCore::DocumentStyleSheetCollection::addPendingSheet): Deleted.
(WebCore::DocumentStyleSheetCollection::hasPendingSheets): Deleted.
(WebCore::DocumentStyleSheetCollection::usesFirstLineRules): Deleted.
(WebCore::DocumentStyleSheetCollection::usesFirstLetterRules): Deleted.
(WebCore::DocumentStyleSheetCollection::usesRemUnits): Deleted.
(WebCore::DocumentStyleSheetCollection::setUsesRemUnit): Deleted.
(WebCore::DocumentStyleSheetCollection::usesStyleBasedEditability): Deleted.
(WebCore::DocumentStyleSheetCollection::setUsesStyleBasedEditability): Deleted.
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::insertedIntoDocument):
(WebCore::InlineStyleSheetOwner::removedFromDocument):
(WebCore::InlineStyleSheetOwner::clearDocumentData):
(WebCore::InlineStyleSheetOwner::childrenChanged):
(WebCore::InlineStyleSheetOwner::createSheet):
(WebCore::InlineStyleSheetOwner::sheetLoaded):
(WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::~ProcessingInstruction):
(WebCore::ProcessingInstruction::nodeName):
(WebCore::ProcessingInstruction::checkStyleSheet):
(WebCore::ProcessingInstruction::sheetLoaded):
(WebCore::ProcessingInstruction::insertedInto):
(WebCore::ProcessingInstruction::removedFrom):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::~HTMLLinkElement):
(WebCore::HTMLLinkElement::insertedInto):
(WebCore::HTMLLinkElement::removedFrom):
(WebCore::HTMLLinkElement::addPendingSheet):
(WebCore::HTMLLinkElement::removePendingSheet):
* html/HTMLQuoteElement.cpp:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::collectAllDocumentStyleSheets):
(WebCore::InspectorCSSAgent::buildObjectForRule):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::commitData):
* page/Page.cpp:
(WebCore::Page::userStyleSheetLocationChanged):
(WebCore::Page::setUserContentController):
* page/PageGroup.cpp:
* page/UserContentController.cpp:
(WebCore::UserContentController::invalidateInjectedStyleSheetCacheInAllFrames):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::lineHeight):
(WebCore::RenderBlock::getFirstLetter):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::uncachedFirstLineStyle):
(WebCore::RenderElement::cachedFirstLineStyle):
* rendering/RenderElement.h:
(WebCore::RenderElement::firstLineStyle):
(WebCore::RenderElement::setAncestorLineBoxDirty):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::updateAlwaysCreateLineBoxes):
(WebCore::RenderInline::lineHeight):
* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::lineHeight):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::verticalPositionForBox):
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveLocal):

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

4 years agoHTMLOutputElement.htmlFor should be settable
cdumez@apple.com [Wed, 23 Sep 2015 14:32:36 +0000 (14:32 +0000)]
HTMLOutputElement.htmlFor should be settable
https://bugs.webkit.org/show_bug.cgi?id=149418

Reviewed by Ryosuke Niwa.

Source/WebCore:

HTMLOutputElement.htmlFor should be settable as per the latest HTML
specification:
- https://html.spec.whatwg.org/multipage/forms.html#the-output-element

It is supposed to call DOMSettableTokenList.setValue() with the input
String. This patch adds support for this by adding [PutForwards=value]
IDL extended attribute.

This aligns our behavior with the specification, Firefox and Chrome.

No new tests, already covered by existing test.

* html/AttributeDOMTokenList.cpp:
(WebCore::AttributeDOMTokenList::AttributeDOMTokenList):
(WebCore::AttributeDOMTokenList::attributeValueChanged):
* html/AttributeDOMTokenList.h:
- Have AttributeDOMTokenList subclass DOMSettableTokenList instead of
DOMTokenList so that it can be used in places where the IDL expects
us to return a DOMSettableTokenList (e.g. HTMLOutputElement.htmlFor).
- Mark AttributeDOMTokenList as fast allocated.

* html/DOMSettableTokenList.cpp:
(WebCore::DOMSettableTokenList::setValue):
* html/DOMSettableTokenList.h:
- Move setValue() from DOMTokenList to DOMSettableTokenList
  as it is only needed by DOMSettableTokenList.
- Get rid of the factory function as all call sites are using
  AttributeDOMTokenList now.
- Stop inheriting RefCounted as AttributeDOMTokenList handles its
  own refcounting.

* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::setValueInternal):
* html/DOMTokenList.h:
Rename setValue() to setValueInternal() as this version does not
update the associated attribute value, only the tokens.

* html/HTMLLinkElement.cpp:
* html/HTMLLinkElement.h:
- Have HTMLLinkElement.sizes use an AttributeDOMTokenList instead of
  a DOMSettableTokenList as there is an associated attribute. The
  previous code had a bug has setting HTMLLinkElement.sizes would not
  update the associated 'sizes' attribute. Switching to using
  AttributeDOMTokenList fixes this and a new layout test has been added
  to cover this.
- Create the AttributeDOMTokenList lazily to avoid updating it every
  time the sizes attribute changes until it is actually accessed.

* html/HTMLOutputElement.cpp:
* html/HTMLOutputElement.h:
- Have HTMLLinkElement.htmlFor use an AttributeDOMTokenList instead of
  a DOMSettableTokenList as there is an associated attribute.
- Create the AttributeDOMTokenList lazily to avoid updating it every
  time the sizes attribute changes until it is actually accessed.

* html/HTMLOutputElement.idl:
Add [PutForwards=value] on the htmlFor attribute, as per the
HTML specification.

LayoutTests:

* fast/dom/HTMLLinkElement/sizes-setter.html: Added
* fast/dom/HTMLLinkElement/sizes-setter-expected.txt: Added
Add layout test to make sure that setting HTMLLinkElement.sizes actually
updates the 'sizes' associated attribute.

* fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt:
* fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js:
Update existing layout test now that HTMLOutputElement.htmlFor is
settable.

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

4 years ago[Streams API] Add transform stream general tests
calvaris@igalia.com [Wed, 23 Sep 2015 11:33:41 +0000 (11:33 +0000)]
[Streams API] Add transform stream general tests
https://bugs.webkit.org/show_bug.cgi?id=149267

Reviewed by Darin Adler.

* streams/reference-implementation/transform-stream-expected.txt: Added.
* streams/reference-implementation/transform-stream.html: Added.

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

4 years ago[Streams API] Added transform stream error tests
calvaris@igalia.com [Wed, 23 Sep 2015 11:27:58 +0000 (11:27 +0000)]
[Streams API] Added transform stream error tests
https://bugs.webkit.org/show_bug.cgi?id=149266

Reviewed by Darin Adler.

* streams/reference-implementation/transform-stream-errors-expected.txt: Added.
* streams/reference-implementation/transform-stream-errors.html: Added.

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

4 years ago[Streams API] Added pipe-through transform stream tests
calvaris@igalia.com [Wed, 23 Sep 2015 11:25:03 +0000 (11:25 +0000)]
[Streams API] Added pipe-through transform stream tests
https://bugs.webkit.org/show_bug.cgi?id=149265

Reviewed by Darin Adler.

* streams/reference-implementation/pipe-through-expected.txt: Added.
* streams/reference-implementation/pipe-through.html: Added.
* streams/reference-implementation/resources/streams-utils.js: Added duckTypedPassThroughTransform function.

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

4 years ago[Streams API] Add count queuing strategy tests for writable streams
calvaris@igalia.com [Wed, 23 Sep 2015 11:23:26 +0000 (11:23 +0000)]
[Streams API] Add count queuing strategy tests for writable streams
https://bugs.webkit.org/show_bug.cgi?id=148303

Reviewed by Darin Adler.

* streams/reference-implementation/count-queuing-strategy-expected.txt: Added new expectations.
* streams/reference-implementation/count-queuing-strategy.html: Added new writable stream tests.

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

4 years ago[Streams API] Add byte length queuing strategy tests for writable streams
calvaris@igalia.com [Wed, 23 Sep 2015 11:17:39 +0000 (11:17 +0000)]
[Streams API] Add byte length queuing strategy tests for writable streams
https://bugs.webkit.org/show_bug.cgi?id=148302

Reviewed by Darin Adler.

* streams/reference-implementation/byte-length-queuing-strategy-expected.txt: Added new expectations.
* streams/reference-implementation/byte-length-queuing-strategy.html: Added new writable stream tests.

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

4 years ago[Streams API] Add brand checks tests for writable streams
calvaris@igalia.com [Wed, 23 Sep 2015 11:14:50 +0000 (11:14 +0000)]
[Streams API] Add brand checks tests for writable streams
https://bugs.webkit.org/show_bug.cgi?id=148301

Reviewed by Darin Adler.

* streams/reference-implementation/brand-checks-expected.txt: Added new expectations.
* streams/reference-implementation/brand-checks.html: Added new writable stream tests.

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

4 years ago[Streams API] bad underlying sinks tests about writable streams
calvaris@igalia.com [Wed, 23 Sep 2015 11:12:58 +0000 (11:12 +0000)]
[Streams API] bad underlying sinks tests about writable streams
https://bugs.webkit.org/show_bug.cgi?id=148295

Reviewed by Darin Adler.

* streams/reference-implementation/bad-underlying-sinks-expected.txt: Added.
* streams/reference-implementation/bad-underlying-sinks.html: Added.

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

4 years ago[GTK] playbutton in media controls is not changed when it is clicked.
changseok.oh@collabora.com [Wed, 23 Sep 2015 11:07:15 +0000 (11:07 +0000)]
[GTK] playbutton in media controls is not changed when it is clicked.
https://bugs.webkit.org/show_bug.cgi?id=149113

Reviewed by Philippe Normand.

Source/WebCore:

When the play button in media controls is clicked, a 'paused' class is added or removed
for the element to update its appearance. Although Document::recalcStyle is triggered
by that class attribute change, the play button is not changed since there is
no difference in styles whether having the 'paused' class or not. Gtk port
does not define the -webkit-media-controls-play-button.paused. To fix this,
-webkit-media-controls-play-button.paused is newly defined with a dummy style,
"position: relative;", which should not change the play button appearance,
but be clearly different in style.

Test: media/media-controls-play-button-updates.html

* css/mediaControlsGtk.css:
(video::-webkit-media-controls-play-button.paused):

LayoutTests:

* media/media-controls-play-button-updates-expected.png: Added.
* media/media-controls-play-button-updates-expected.txt: Added.
* media/media-controls-play-button-updates.html: Added.
* platform/gtk/media/media-controls-play-button-updates-expected.png: Added.
* platform/gtk/media/media-controls-play-button-updates-expected.txt: Added.

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

4 years ago[Streams API] Add bad strategies writable streams tests
calvaris@igalia.com [Wed, 23 Sep 2015 11:03:08 +0000 (11:03 +0000)]
[Streams API] Add bad strategies writable streams tests
https://bugs.webkit.org/show_bug.cgi?id=148300

Reviewed by Darin Adler.

* streams/reference-implementation/bad-strategies-expected.txt: Added new expectations.
* streams/reference-implementation/bad-strategies.html: Added new writable stream tests.

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

4 years ago[Streams API] Change a const in the tee tests
calvaris@igalia.com [Wed, 23 Sep 2015 10:04:24 +0000 (10:04 +0000)]
[Streams API] Change a const in the tee tests
https://bugs.webkit.org/show_bug.cgi?id=148294

Reviewed by Darin Adler.

* streams/reference-implementation/readable-stream-tee.html: Dumb change, replaced a const with var and added
the checkpoint of the spec commit.

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

4 years ago[GTK] media/media-controls-timeline-updates.html timeouts
changseok.oh@collabora.com [Wed, 23 Sep 2015 08:32:59 +0000 (08:32 +0000)]
[GTK] media/media-controls-timeline-updates.html timeouts
https://bugs.webkit.org/show_bug.cgi?id=139363

Reviewed by Philippe Normand.

The default timeout value of gtk port is 6000ms for release build layout tests.
But this is too short to pass some media tests such as media-controls-timeline-updates.html
Let's tweak the test to have shorter test time by seeking.

* media/media-controls-timeline-updates.html:
* platform/gtk/TestExpectations:

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

4 years agoDisable QuickLook on tvOS
aestes@apple.com [Wed, 23 Sep 2015 07:33:05 +0000 (07:33 +0000)]
Disable QuickLook on tvOS
https://bugs.webkit.org/show_bug.cgi?id=149492
<rdar://problem/22741586>

Reviewed by Dan Bernstein.

Source/WebKit/mac:

We can't use USE(QUICK_LOOK) in a Private header, and postprocess-headers.sh doesn't know how to strip things
that aren't feature flags. So, if QuickLook is disabled, we'll just always define WebQuickLookFileNameKey and
WebQuickLookUTIKey, and we'll also define -quickLookContentForURL: but have it return nil.

* WebView/WebView.mm:
(-[WebView quickLookContentForURL:]):

Source/WTF:

* wtf/Platform.h: Stopped enabling QuickLook on tvOS.

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

4 years ago[Streams API] Implement ReadableStream pipeThrough
youenn.fablet@crf.canon.fr [Wed, 23 Sep 2015 07:24:42 +0000 (07:24 +0000)]
[Streams API] Implement ReadableStream pipeThrough
https://bugs.webkit.org/show_bug.cgi?id=147556

Reviewed by Darin Adler.

Source/JavaScriptCore:

Updating BuiltIns infrastructure to make it reusable from WebCore.
Extracting macros from BuiltinNames and createBuiltinExecutable from BuiltinExecutables.
Updated generate-js-builtins to allow generating builtin CPP/H files in WebCore namespace.

* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createDefaultConstructor):
(JSC::BuiltinExecutables::createBuiltinExecutable):
(JSC::createBuiltinExecutable):
(JSC::createExecutableInternal):
* builtins/BuiltinExecutables.h:
* builtins/BuiltinNames.h:
(JSC::BuiltinNames::BuiltinNames): Deleted.
* builtins/BuiltinUtils.h: Extracting code from BuiltinNames and BuiltinExecutables.h.
* bytecode/UnlinkedFunctionExecutable.h:
* generate-js-builtins:
(getFunctions):
(writeIncludeDirectives):

Source/WebCore:

Adding initial support for JS builtins within WebCore.
This patch allows implementing IDL interface methods in JS, by using the new JSBuiltin keyword.
(No support yet for private identifiers, constructors or accessors).
Integration of the built-in executables and names is implemented within WebCoreJSClientData.
Two files are generated for each JS builtin file:
- builtin h/cpp files similar to JSCBuiltins.cpp/.h, generated through WebCore/generate-js-builtins from JavaScriptCore/generate-js-builtins)
- A builtin wrapper file mimicking BuiltinExecutables (generated from WebCore/generate-js-builtins)
Contrary to JSC, each js file is generating its own cpp/h file.
This allows including those files within the JSXX.cpp/.h files generated from the IDL where compilation guard may take effect.

Disabled GObject binding for JSBuiltin methods.

Test: streams/readable-stream-pipeThrough.html

* CMakeLists.txt: Triggering generate-js-builtins for JS files.
* DerivedSources.make: Ditto.
* ForwardingHeaders/builtins/BuiltinUtils.h: Added.
* ForwardingHeaders/bytecode/UnlinkedFunctionExecutable.h: Added.
* ForwardingHeaders/runtime/ConstructAbility.h: Added.
* Modules/streams/ReadableStream.idl: Marking pipeThrough as JS builtin
* Modules/streams/ReadableStream.js: Added.
(pipeThrough):
* bindings/js/JSReadableStreamCustom.cpp:
* bindings/js/WebCoreJSClientData.h: Adding ReadableStreamBuiltinsWrapper to store ReadableStream builtin executable
(WebCore::WebCoreJSClientData::WebCoreJSClientData):
(WebCore::WebCoreJSClientData::readableStreamBuiltins):
(WebCore::initNormalWorldClientData):
* bindings/scripts/CodeGeneratorGObject.pm: Disabled GObject binding for JSBuiltin methods.
* bindings/scripts/CodeGeneratorJS.pm: Adding support for JSBuiltin keyword.
(GetFunctionName):
(GenerateHeader):
(GenerateImplementation):
(GenerateHashTableValueArray):
(ComputeFunctionSpecial):
(UseJSBuiltins):
* bindings/scripts/IDLAttributes.txt: Adding JSBuiltin.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_js_builtin_method):
(webkit_dom_test_obj_js_builtin_method_with_args):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj jsBuiltinMethod]):
(-[DOMTestObj jsBuiltinMethodWithArgs:strArg:objArg:]):
* bindings/scripts/test/TestObj.idl:
* generate-js-builtins: Added.

LayoutTests:

Rebased test that is now passing.
Adding new tests to improve pipeThrough coverage.

* streams/readable-stream-pipeThrough-expected.txt: Added.
* streams/readable-stream-pipeThrough.html: Added.
* streams/reference-implementation/brand-checks-expected.txt:

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

4 years agoGardening: speculative non-JIT build fix after r189999.
mark.lam@apple.com [Wed, 23 Sep 2015 06:43:44 +0000 (06:43 +0000)]
Gardening: speculative non-JIT build fix after r189999.

Not reviewed.

* bytecode/ValueRecovery.h:
(JSC::ValueRecovery::jsValueRegs):

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

4 years agoEvent fired on a detached node does not bubble up
rniwa@webkit.org [Wed, 23 Sep 2015 01:42:03 +0000 (01:42 +0000)]
Event fired on a detached node does not bubble up
https://bugs.webkit.org/show_bug.cgi?id=149488

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Rebaselined a test now that one more test case passes.

* web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:

Source/WebCore:

The bug was caused by an explicit check inside EventPath to match an old Firefox behavior (see r19897).
Since Firefox's behavior has changed to match DOM4: https://dom.spec.whatwg.org/#concept-event-dispatch

Fixed the bug by removing the check. The new behavior matches DO4 and behaviors of Firefox and Chrome.

Test: fast/events/event-propagation-in-detached-tree.html

* dom/EventDispatcher.cpp:
(WebCore::EventPath::EventPath):

LayoutTests:

Added a regression test. Also modified and rebaselined mouseout-dead-node.html added in r19897
since our new behavior matches that of the latest Firefox as well as Chrome.

* fast/events/event-propagation-in-detached-tree-expected.txt: Added.
* fast/events/event-propagation-in-detached-tree.html: Added.
* fast/events/mouseout-dead-node-expected.txt:
* fast/events/mouseout-dead-node.html:

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

4 years agoAdd a file of pointer-lock to cmake ports
gyuyoung.kim@webkit.org [Wed, 23 Sep 2015 01:37:42 +0000 (01:37 +0000)]
Add a file of pointer-lock to cmake ports
https://bugs.webkit.org/show_bug.cgi?id=149453

Reviewed by Csaba Osztrogonác.

.:

* Source/cmake/OptionsEfl.cmake: Add a ENABLE_POINTER_LOCK.

Source/WebCore:

Some cmake ports will be able to enable POINTER_LOCK. To support it,
this patch adds PointerLockController.cpp, and fix a build break in WK2.

* CMakeLists.txt:

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::navigateToPDFLinkWithSimulatedClick): Fix a build break.

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

4 years agoGCThreadSharedData is just a bad way of saying Heap
fpizlo@apple.com [Wed, 23 Sep 2015 01:35:49 +0000 (01:35 +0000)]
GCThreadSharedData is just a bad way of saying Heap
https://bugs.webkit.org/show_bug.cgi?id=149435

Reviewed by Mark Lam.

This removes the GCThreadSharedData class and moves its members into Heap. This is a net
simplification since GCThreadSharedData had a 1-to-1 mapping to Heap and the two classes had a
vast contract with a lot of interdependencies. Heap would call a lot of GCThreadSharedData
methods; now a lot of those are inlined since they were only called from the one place in Heap.
This makes it a lot easier to see what is going on. For example, you no longer have to look at
code in two places (Heap and GCThreadSharedData) to figure out the timing and synchronization
of GC phases - all of that code is in Heap now.

This also removes weird indirections in other places. It used to be that a lot of GC helper
classes woud have a pointer to GCThreadSharedData, and then would use that to get to Heap, VM,
and the visitors. Now these helpers just point to Heap.

I think that GCThreadSharedData was only useful for defining the set of things that we need to
know to collect garbage. That's how we decided if something would go into GCThreadSharedData
instead of Heap. But I think that separating things into multiple classes usually makes the
code less hackable, so there should be a very high bar for doing this in a way that produces a
1-to-1 mapping between two classes - where one instance of one of the classes is always paired
with exactly one instance of the other class and vice-versa.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/CopiedSpace.h:
* heap/CopyVisitor.cpp:
(JSC::CopyVisitor::CopyVisitor):
(JSC::CopyVisitor::copyFromShared):
* heap/CopyVisitor.h:
* heap/CopyVisitorInlines.h:
(JSC::CopyVisitor::allocateNewSpaceSlow):
(JSC::CopyVisitor::startCopying):
(JSC::CopyVisitor::doneCopying):
(JSC::CopyVisitor::didCopy):
* heap/GCThread.cpp:
(JSC::GCThread::GCThread):
(JSC::GCThread::waitForNextPhase):
(JSC::GCThread::gcThreadMain):
* heap/GCThread.h:
* heap/GCThreadSharedData.cpp: Removed.
* heap/GCThreadSharedData.h: Removed.
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::~Heap):
(JSC::Heap::isPagedOut):
(JSC::Heap::markRoots):
(JSC::Heap::copyBackingStores):
(JSC::Heap::updateObjectCounts):
(JSC::Heap::resetVisitors):
(JSC::Heap::objectCount):
(JSC::Heap::sweepNextLogicallyEmptyWeakBlock):
(JSC::Heap::threadVisitCount):
(JSC::Heap::threadBytesVisited):
(JSC::Heap::threadBytesCopied):
(JSC::Heap::startNextPhase):
(JSC::Heap::endCurrentPhase):
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::unregisterWeakGCMap):
(JSC::Heap::getNextBlocksToCopy):
* heap/ListableHandler.h:
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::SlotVisitor):
(JSC::SlotVisitor::didStartMarking):
(JSC::SlotVisitor::reset):
(JSC::SlotVisitor::donateKnownParallel):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::mergeOpaqueRoots):
(JSC::SlotVisitor::harvestWeakReferences):
(JSC::SlotVisitor::finalizeUnconditionalFinalizers):
* heap/SlotVisitor.h:
(JSC::SlotVisitor::markStack):
(JSC::SlotVisitor::isEmpty):
(JSC::SlotVisitor::sharedData): Deleted.
* heap/SlotVisitorInlines.h:
(JSC::SlotVisitor::addWeakReferenceHarvester):
(JSC::SlotVisitor::addUnconditionalFinalizer):
(JSC::SlotVisitor::addOpaqueRoot):
(JSC::SlotVisitor::containsOpaqueRoot):
(JSC::SlotVisitor::containsOpaqueRootTriState):
(JSC::SlotVisitor::opaqueRootCount):
(JSC::SlotVisitor::mergeOpaqueRootsIfNecessary):
(JSC::SlotVisitor::copyLater):
(JSC::SlotVisitor::heap):
(JSC::SlotVisitor::vm):

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

4 years agoMark http/tests/notifications/events.html flaky again (crash/timeout this time).
zalan@apple.com [Wed, 23 Sep 2015 01:35:04 +0000 (01:35 +0000)]
Mark http/tests/notifications/events.html flaky again (crash/timeout this time).

Unreviewed.

* TestExpectations:

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