WebKit-https.git
4 years agoMove locale information into FontDescription
mmaxfield@apple.com [Wed, 11 Nov 2015 04:21:36 +0000 (04:21 +0000)]
Move locale information into FontDescription
https://bugs.webkit.org/show_bug.cgi?id=147457

Reviewed by Andreas Kling.

Currently, the "lang" attribute on a node sets locale information in RenderStyle.
Font selection is sensitive to this locale information, and occurs deep within
platform/ code, far away from RenderStyle. Because every RenderStyle owns a
FontDescription, and font selection can consult with FontDescriptions, it makes
sense to move the variable from RenderStyle to FontDescription, and provide
convenience methods on RenderStyle which inspect its FontDescription for locale
information.

This patch is in preparation for correctly obeying locale information when
performing font fallback.

No new tests because there is no behavior change.

* css/CSSPropertyNames.in:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueWebkitLocale):
* platform/graphics/FontCache.h:
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::setLocale):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::locale):
(WebCore::FontDescription::operator==):
(WebCore::FontCascadeDescription::initialLocale):
(WebCore::FontDescription::setScript): Deleted.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout): Deleted.
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData): Deleted.
(WebCore::StyleRareInheritedData::operator==): Deleted.
* rendering/style/StyleRareInheritedData.h:
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):

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

4 years agoSubstitute 'OVERRIDE' for 'OVERWRITE' in the ChangeLog entry for r192106.
dbates@webkit.org [Wed, 11 Nov 2015 04:01:47 +0000 (04:01 +0000)]
Substitute 'OVERRIDE' for 'OVERWRITE' in the ChangeLog entry for r192106.

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

4 years ago[EFL] Support an applicationVersion argument to UserAgentEfl::standardUserAgent()
gyuyoung.kim@webkit.org [Wed, 11 Nov 2015 03:41:13 +0000 (03:41 +0000)]
[EFL] Support an applicationVersion argument to UserAgentEfl::standardUserAgent()
https://bugs.webkit.org/show_bug.cgi?id=151060

Reviewed by Darin Adler.

*applicationVersion* was missed to support by r192148. This patch adds it as well as
missed Darin comments are fixed.

* platform/efl/UserAgentEfl.cpp:
(WebCore::platformVersionForUAString):
(WebCore::versionForUAString):
(WebCore::standardUserAgent):

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

4 years agoImplement authentication challenge handling when using NETWORK_SESSION
achristensen@apple.com [Wed, 11 Nov 2015 02:29:13 +0000 (02:29 +0000)]
Implement authentication challenge handling when using NETWORK_SESSION
https://bugs.webkit.org/show_bug.cgi?id=150968

Reviewed by Antti Koivisto.

* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::didReceiveChallenge):
Copy functionality from NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync (which is used when we don't use NETWORK_SESSION)
because there is no canAuthenticateAgainstProtectionSpace delegate callback when using NSURLSession, according to
https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/URLLoadingSystem/Articles/AuthenticationChallenges.html
Instead, all authentication challenge callbacks go to URLSession:task:didReceiveChallenge:completionHandler:
because we do not implement URLSession:didReceiveChallenge:completionHandler:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[NetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[NetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
Make a block copy of the completion handlers so we can copy the std::functions that wrap them into HashMaps and call them later,
in this case we call the completion handler after the UIProcess gives us credentials for an authentication challenge.
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::AuthenticationManager):
(WebKit::AuthenticationManager::addChallengeToChallengeMap):
(WebKit::AuthenticationManager::shouldCoalesceChallenge):
(WebKit::AuthenticationManager::coalesceChallengesMatching):
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
Fix an existing bug that caused multiple calls to addChallengeToChallengeMap for one challenge.  This caused too many calls to
the AuthenticationClient methods, which did not cause a problem because they were not one-time-use block copies of completion handlers before.
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
(WebKit::AuthenticationManager::cancelChallenge):
(WebKit::AuthenticationManager::cancelSingleChallenge):
(WebKit::AuthenticationManager::performDefaultHandling):
(WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
Call completion handlers which we stored in a HashMap before doing IPC if we are using NETWORK_SESSION,
which has completion handlers instead of continueSomething client calls.
* Shared/Authentication/AuthenticationManager.h:
(WebKit::AuthenticationManager::outstandingAuthenticationChallengeCount):
* Shared/Downloads/Download.cpp:
(WebKit::Download::didReceiveAuthenticationChallenge):
(WebKit::Download::didReceiveResponse):
* Shared/Downloads/DownloadAuthenticationClient.cpp:
(WebKit::DownloadAuthenticationClient::receivedChallengeRejection):
* Shared/Downloads/DownloadAuthenticationClient.h:
Add ifdefs for code related to downloading I will implement later.

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

4 years agoUpdating test expected results after r192269
mmaxfield@apple.com [Wed, 11 Nov 2015 01:39:19 +0000 (01:39 +0000)]
Updating test expected results after r192269

Unreviewed.

* platform/mac-mavericks/fast/text/international/text-combine-image-test-expected.txt:

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

4 years agoFixed crash loading Mozilla layout test editor/libeditor/crashtests/431086-1.xhtml.
bfulgham@apple.com [Wed, 11 Nov 2015 01:32:10 +0000 (01:32 +0000)]
Fixed crash loading Mozilla layout test editor/libeditor/crashtests/431086-1.xhtml.
https://bugs.webkit.org/show_bug.cgi?id=150252
<rdar://problem/23149470>

Patch by Pranjal Jumde <pjumde@apple.com> on 2015-11-10
Reviewed by Brent Fulgham.

* Source/WebCore/editing/ios/EditorIOS.mm
* Source/WebCore/editing/mac/EditorMac.mm
  In Editor::fontForSelection moved the node removal code, so that the
  node is only removed if style is not NULL.
* Source/WebCore/editing/cocoa/EditorCocoa.mm
  In Editor::styleForSelectionStart checking if the parentNode can
  accept the styleElement node.
* LayoutTests/editing/execCommand/150252.xhtml
* LayoutTests/editing/execCommand/150252_minimal.xhtml
* LayoutTests/editing/execCommand/150252-expected.txt
* LayoutTests/editing/execCommand/150252_minimal-expected.txt

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

4 years agoUse different pixel formats for displays that support them
simon.fraser@apple.com [Wed, 11 Nov 2015 01:31:55 +0000 (01:31 +0000)]
Use different pixel formats for displays that support them
https://bugs.webkit.org/show_bug.cgi?id=151122
rdar://problem/22846841

Reviewed by Tim Horton.
Source/WebCore:

Add new IOSurface format enum values, and set up the appropriate IOSurfaceCreate()
property dictionaries for them.

* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::IOSurface):
* platform/spi/cocoa/IOSurfaceSPI.h:

Source/WebKit2:

New the new IOSurface formats when appropriate for the properties of the
display.

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::bufferFormat):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):

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

4 years agoWeb Inspector: Enable/disable All Breakpoints not usable when "No Filter Results...
mattbaker@apple.com [Wed, 11 Nov 2015 01:29:53 +0000 (01:29 +0000)]
Web Inspector: Enable/disable All Breakpoints not usable when "No Filter Results" displayed
https://bugs.webkit.org/show_bug.cgi?id=151062

Reviewed by Timothy Hatcher.

Position the placeholder element below the navigation bar. This was already being done
for the other navigation sidebars.

* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger > :matches(.content, .empty-content-placeholder)):
(.sidebar > .panel.navigation.debugger > .content): Deleted.

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

4 years agoCrash running webaudio/panner-loop.html
bfulgham@apple.com [Wed, 11 Nov 2015 00:51:36 +0000 (00:51 +0000)]
Crash running webaudio/panner-loop.html
https://bugs.webkit.org/show_bug.cgi?id=150200
<rdar://problem/23136282>

Reviewed by Jer Noble.

Source/WebCore:

Test: webaudio/panner-loop.html

This is based on the changes in Blink r164822:
https://codereview.chromium.org/130003002

Avoid infinitely recursing on audio nodes by keeping track of which nodes we've already
visited.

* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::pullInputs): Pass set of visited nodes so we don't revisit
nodes we've already serviced.
(WebCore::PannerNode::notifyAudioSourcesConnectedToNode): Accept visitedNodes argument
so we can avoid revisiting nodes. Check if the current node has already been visited
before processing it.
* Modules/webaudio/PannerNode.h:

LayoutTests:

This is based on the changes in Blink r164822:
https://codereview.chromium.org/130003002

* webaudio/panner-loop-expected.txt: Added.
* webaudio/panner-loop.html: Added.

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

4 years agoAdopt formal protocols for CA delegates
timothy_horton@apple.com [Wed, 11 Nov 2015 00:49:12 +0000 (00:49 +0000)]
Adopt formal protocols for CA delegates
https://bugs.webkit.org/show_bug.cgi?id=151121
<rdar://problem/6739193>

Reviewed by Anders Carlsson.

* platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h:
Note that our WebActionDisablingCALayerDelegate is, in fact, a CALayerDelegate.

* platform/spi/cocoa/QuartzCoreSPI.h:
Add empty protocol definitions where necessary.

* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/NSAccessibilitySPI.h: Added.
* platform/spi/mac/NSApplicationSPI.h: Added.
* platform/spi/mac/NSTextFinderSPI.h: Added.
* platform/spi/mac/NSViewSPI.h: Added.
Split out SPI headers from WebKit2's AppKitSPI.h.
Add NSViewSPI to note that NSView is (internally) a CALayerDelegate,
which WebHTMLView depends on.

* WebView/WebHTMLView.mm:

* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/mac/WKTextFinderClient.mm:
* UIProcess/mac/WebPageProxyMac.mm:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/cocoa/WebProcessCocoa.mm:
Adapt to the split out SPI headers.

* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
Conform!

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

4 years agoUse a shorter RSA key in crypto/subtle/rsa-export-generated-keys.html to make the...
ap@apple.com [Wed, 11 Nov 2015 00:29:12 +0000 (00:29 +0000)]
Use a shorter RSA key in crypto/subtle/rsa-export-generated-keys.html to make the test faster.

Suggested by Scott Valentine.

* crypto/subtle/rsa-export-generated-keys.html:
* platform/mac/TestExpectations: Removed Slow expectation, as the test became a lot
faster for me locally, and hopefully won't time out on bots.

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

4 years agoContinuations with anonymous wrappers inside misplaces child renderers.
zalan@apple.com [Tue, 10 Nov 2015 23:18:52 +0000 (23:18 +0000)]
Continuations with anonymous wrappers inside misplaces child renderers.
https://bugs.webkit.org/show_bug.cgi?id=150908

When a child is appended to an inline container and the beforeChild is not a direct child, but
it is inside a generated subtree, we need to special case the inline split to form continuation.

RenderInline::splitInlines() assumes that beforeChild is always a direct child of the current
inline container. However when beforeChild type requires wrapper content (such as table cells), the DOM and the
render tree get out of sync. In such cases, we need to ensure that both the beforeChild and its siblings end up
in the correct generated block.

Reviewed by Darin Adler and David Hyatt.

Source/WebCore:

Test: fast/inline/continuation-with-anon-wrappers.html

* rendering/RenderInline.cpp:
(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::addChildToContinuation):

LayoutTests:

* fast/inline/continuation-with-anon-wrappers-expected.txt: Added.
* fast/inline/continuation-with-anon-wrappers.html: Added.

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

4 years ago[check-webkit-style] False positive (readability/enum_casing) on CF-styled enum members
ddkilzer@apple.com [Tue, 10 Nov 2015 23:03:19 +0000 (23:03 +0000)]
[check-webkit-style] False positive (readability/enum_casing) on CF-styled enum members
<http://webkit.org/b/104417>

Reviewed by Brent Fulgham.

* Scripts/webkitpy/style/checkers/cpp.py:
(_EnumState.process_clean_line): Allow 'k' to start enums.
(check_enum_casing): Update error message to discuss 'k'.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(NoNonVirtualDestructorsTest.test_enum_casing): Update error
messages, and add new tests for enums that start with lowercase
letters.

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

4 years agoCreate an FTLExceptionHandlerManager abstraction
sbarati@apple.com [Tue, 10 Nov 2015 22:50:55 +0000 (22:50 +0000)]
Create an FTLExceptionHandlerManager abstraction
https://bugs.webkit.org/show_bug.cgi?id=151079

Reviewed by Mark Lam.

Before, we used to manage the {stackmapRecordIndex => OSRExit} relationship
for exception handlers with a locally allocated HashMap and a few different
lambdas and random checks. It's cleaner and more manageable to just create
a class that handles this abstraction for us. This class provides nice helper
functions for everything we need. This abstraction makes reading the code easier.
And it will also makes hacking on the code in the future easier.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGOSRExitBase.h:
(JSC::DFG::OSRExitBase::OSRExitBase):
* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
* ftl/FTLExceptionHandlerManager.cpp: Added.
(JSC::FTL::ExceptionHandlerManager::ExceptionHandlerManager):
(JSC::FTL::ExceptionHandlerManager::addNewExit):
(JSC::FTL::ExceptionHandlerManager::getOrPutByIdCallOperationExceptionTarget):
(JSC::FTL::ExceptionHandlerManager::lazySlowPathExceptionTarget):
(JSC::FTL::ExceptionHandlerManager::getByIdOSRExit):
(JSC::FTL::ExceptionHandlerManager::getCallOSRExitCommon):
(JSC::FTL::ExceptionHandlerManager::getCallOSRExit):
(JSC::FTL::ExceptionHandlerManager::procureCallSiteIndex):
* ftl/FTLExceptionHandlerManager.h: Added.

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

4 years agoWeb Inspector: Batch all scheduled layouts and update the view tree in a single anima...
mattbaker@apple.com [Tue, 10 Nov 2015 22:31:21 +0000 (22:31 +0000)]
Web Inspector: Batch all scheduled layouts and update the view tree in a single animation frame
https://bugs.webkit.org/show_bug.cgi?id=150993

Reviewed by Brian Burg.

Shifts responsibility for scheduling asynchronous layouts from view objects to a controller
layer, implemented as private static methods and properties in the View class. A single animation
frame callback performs a breadth-first traversal of the view tree starting at the root view,
updating views marked as needing a layout.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Setup root view.

* UserInterface/Views/View.js:
Added private class properties for root view reference and rAF identifier.
(WebInspector.View):
(WebInspector.View.prototype.get layoutPending):
(WebInspector.View.prototype.get parentView):
(WebInspector.View.prototype.makeRootView):
Set current view to be the root of the view hierarchy.
Can only be called once.
(WebInspector.View.prototype.insertSubviewBefore):
No longer appends subview element to parent element, if subview already in the DOM.
Checks that view being inserted isn't the root view.
(WebInspector.View.prototype.removeSubview):
(WebInspector.View.prototype.updateLayout):
Cancels any scheduled layouts for the view, then does a synchronous layout.
(WebInspector.View.prototype.updateLayoutIfNeeded):
(WebInspector.View.prototype.needsLayout):
Schedules view for the next asynchronous layout, if not already scheduled.
(WebInspector.View.prototype.didAttach):
(WebInspector.View.prototype.didDetach):
Inform view of changing parent view.
(WebInspector.View.prototype._layoutSubtree):
(WebInspector.View._scheduleLayoutForView):
Increments dirty counts on ancestor views, schedules a layout if needed.
(WebInspector.View._cancelScheduledLayoutForView):
Decrements dirty counts on ancestor views, cancels a pending layout if needed.
(WebInspector.View._visitViewTreeForLayout):
Animation frame callback. Does a breadth-first traversal of the view tree,
and updates the layout of views marked as dirty.

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

4 years agorun-jsc-benchmarks doesn't work with internal benchmarks
ggaren@apple.com [Tue, 10 Nov 2015 22:22:12 +0000 (22:22 +0000)]
run-jsc-benchmarks doesn't work with internal benchmarks
https://bugs.webkit.org/show_bug.cgi?id=151047

Reviewed by Filip Pizlo.

* Scripts/run-jsc-benchmarks: Use Pathname so we get a "/" inserted when
we concatenate.

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

4 years agoalert, confirm, prompt, showModalDialog should be forbidden during page close and...
ggaren@apple.com [Tue, 10 Nov 2015 22:19:44 +0000 (22:19 +0000)]
alert, confirm, prompt, showModalDialog should be forbidden during page close and navigation
https://bugs.webkit.org/show_bug.cgi?id=150980

Reviewed by Chris Dumez.

Source/WebCore:

Tests: fast/events/beforeunload-alert.html
       fast/events/beforeunload-confirm.html
       fast/events/beforeunload-prompt.html
       fast/events/beforeunload-showModalDialog.html
       fast/events/pagehide-alert.html
       fast/events/pagehide-confirm.html
       fast/events/pagehide-prompt.html
       fast/events/pagehide-showModalDialog.html
       fast/events/unload-alert.html
       fast/events/unload-confirm.html
       fast/events/unload-prompt.html
       fast/events/unload-showModalDialog.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading): Factored out a helper function for
unload event processing.
(WebCore::FrameLoader::handleUnloadEvents): Forbid prompts in unload
events just like we do in beforeunload events, and for the same reasons.

(WebCore::FrameLoader::handleBeforeUnloadEvent): Updated for renames.

* loader/FrameLoader.h:

* page/DOMWindow.cpp:
(WebCore::DOMWindow::print):
(WebCore::DOMWindow::alert):
(WebCore::DOMWindow::confirm):
(WebCore::DOMWindow::prompt):
(WebCore::DOMWindow::showModalDialog): Updated for renames. Refactored
some of this code to handle null pages more cleanly. In particular, we
sometimes used to treat null page as "everything is permitted" -- but it
is best practice in a permissions context to treat lack of information
as no permission granted rather than all permissions granted. (I don't
know of a way to trigger this condition in practice.)

* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::forbidPrompts):
(WebCore::Page::allowPrompts):
(WebCore::Page::arePromptsAllowed): Renamed to make these functions
reflect their new, broader context.

(WebCore::Page::incrementFrameHandlingBeforeUnloadEventCount): Deleted.
(WebCore::Page::decrementFrameHandlingBeforeUnloadEventCount): Deleted.
(WebCore::Page::isAnyFrameHandlingBeforeUnloadEvent): Deleted.

* page/Page.h:

LayoutTests:

Added tests to cover the matrix of [ alert, confirm, prompt, showModalDialog ] x [ beforeunload, unload, pagehide ].

* fast/events/beforeunload-alert-expected.txt: Added.
* fast/events/beforeunload-alert.html: Added.
* fast/events/beforeunload-confirm-expected.txt: Added.
* fast/events/beforeunload-confirm.html: Added.
* fast/events/beforeunload-prompt-expected.txt: Added.
* fast/events/beforeunload-prompt.html: Added.
* fast/events/beforeunload-showModalDialog-expected.txt: Added.
* fast/events/beforeunload-showModalDialog.html: Added.
* fast/events/onunload-expected.txt:
* fast/events/onunload-not-on-body-expected.txt:
* fast/events/onunload-window-property-expected.txt:
* fast/events/pagehide-alert-expected.txt: Added.
* fast/events/pagehide-alert.html: Added.
* fast/events/pagehide-confirm-expected.txt: Added.
* fast/events/pagehide-confirm.html: Added.
* fast/events/pagehide-prompt-expected.txt: Added.
* fast/events/pagehide-prompt.html: Added.
* fast/events/pagehide-showModalDialog-expected.txt: Added.
* fast/events/pagehide-showModalDialog.html: Added.
* fast/events/pageshow-pagehide-on-back-cached-expected.txt:
* fast/events/pageshow-pagehide-on-back-uncached-expected.txt:
* fast/events/resources/prompt-landing-page.html: Added.
* fast/events/unload-alert-expected.txt: Added.
* fast/events/unload-alert.html: Added.
* fast/events/unload-confirm-expected.txt: Added.
* fast/events/unload-confirm.html: Added.
* fast/events/unload-prompt-expected.txt: Added.
* fast/events/unload-prompt.html: Added.
* fast/events/unload-showModalDialog-expected.txt: Added.
* fast/events/unload-showModalDialog.html: Added.

* platform/wk2/TestExpectations: WebKit2 can't handle showModalDialog tests.

* compositing/iframes/page-cache-layer-tree-expected.txt:
* fast/dom/Geolocation/notimer-after-unload-expected.txt:
* fast/history/timed-refresh-in-cached-frame-expected.txt:
* fast/loader/frames-with-unload-handlers-in-page-cache-expected.txt:
* fast/loader/page-dismissal-modal-dialogs-expected.txt: These were
pre-existing tests that tried to alert during unload.

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

4 years agotate-chu-yoko should shrink to fit when it exceeds the available width.
hyatt@apple.com [Tue, 10 Nov 2015 22:04:34 +0000 (22:04 +0000)]
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:
tate-chu-yoko should shrink to fit when it exceeds the available width.
<rdar://problem/12130468>
https://bugs.webkit.org/show_bug.cgi?id=151051

Reviewed by Myles Maxfield.

Source/WebCore:

Covered by existing tests

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

When testing for text-combine, find the font variant that is the best fit, i.e.,
that exceeds the available width by the smallest amount. Scale that best fit down
repeatedly until it fits within the available space. We set a pixel size of 6 as
the threshold at which we give up.

Also make sure to reset glyphOverflow on each measurement, as this was creating
a potential bug both with variant checking and then with scaling, since glyphOverflow
isn't reset when width() is invoked.

LayoutTests:

* fast/text/international/spaces-combined-in-vertical-text-expected.txt:
* fast/text/text-combine-crash-expected.txt:
* platform/mac/fast/text/decorations-with-text-combine-expected.png:
* platform/mac/fast/text/decorations-with-text-combine-expected.txt:
* platform/mac/fast/text/international/text-combine-image-test-expected.txt:
* platform/mac/fast/text/tatechuyoko-expected.png:
* platform/mac/fast/text/tatechuyoko-expected.txt:

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

4 years agoNull dereference loading Blink layout test editing/execCommand/selectAll-including...
jiewen_tan@apple.com [Tue, 10 Nov 2015 21:55:56 +0000 (21:55 +0000)]
Null dereference loading Blink layout test editing/execCommand/selectAll-including-marquee-crash.html
https://bugs.webkit.org/show_bug.cgi?id=149296
<rdar://problem/22746758>

Reviewed by Darin Adler.

Tests are from Blink r167617:
https://codereview.chromium.org/165933002
No source code changes are needed as they are covered by Bug 149298.

* editing/execCommand/selectAll-including-marquee-crash-expected.txt: Added.
* editing/execCommand/selectAll-including-marquee-crash.html: Added.

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

4 years agoX86_64 support for compareDouble(DoubleCondition, FPRegisterID left, FPRegisterID...
msaboff@apple.com [Tue, 10 Nov 2015 21:52:01 +0000 (21:52 +0000)]
X86_64 support for compareDouble(DoubleCondition, FPRegisterID left, FPRegisterID right, RegisterID dest)
https://bugs.webkit.org/show_bug.cgi?id=151009

Reviewed by Filip Pizlo.

Added compareDouble() macro assembler function and the supporting setnp_r() and setp_r() X86 assembler functions.
Hand tested.

* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::compare64):
(JSC::MacroAssemblerX86_64::compareDouble):
(JSC::MacroAssemblerX86_64::branch64):
* assembler/X86Assembler.h:
(JSC::X86Assembler::setnz_r):
(JSC::X86Assembler::setnp_r):
(JSC::X86Assembler::setp_r):
(JSC::X86Assembler::cdq):

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

4 years agoFixed the build.
mitz@apple.com [Tue, 10 Nov 2015 21:51:34 +0000 (21:51 +0000)]
Fixed the build.

* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
(DatabaseServiceInitializer):
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(NetworkServiceInitializer):
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):

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

4 years agoWeb Inspector: Code coverage profiler: incorrect "in-viewport" detection algorithm
nvasilyev@apple.com [Tue, 10 Nov 2015 21:39:59 +0000 (21:39 +0000)]
Web Inspector: Code coverage profiler: incorrect "in-viewport" detection algorithm
https://bugs.webkit.org/show_bug.cgi?id=151116

Reviewed by Brian Burg.

* UserInterface/Controllers/BasicBlockAnnotator.js:
(WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges):

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

4 years agoRename FTL's ExitArgumentList to something more indicative of what it is
sbarati@apple.com [Tue, 10 Nov 2015 20:42:32 +0000 (20:42 +0000)]
Rename FTL's ExitArgumentList to something more indicative of what it is
https://bugs.webkit.org/show_bug.cgi?id=151078

Reviewed by Geoffrey Garen.

New name is: StackmapArgumentList
We use this to build patchpoint and stackmap intrinsics in FTLLowerDFGToLLVM.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* ftl/FTLExitArgumentList.h: Removed.
* ftl/FTLJSTailCall.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compilePutById):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToLLVM::compileTailCall):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToLLVM::compileInvalidationPoint):
(JSC::FTL::DFG::LowerDFGToLLVM::getById):
(JSC::FTL::DFG::LowerDFGToLLVM::lazySlowPath):
(JSC::FTL::DFG::LowerDFGToLLVM::callCheck):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExitArgumentsForPatchpointIfWillCatchException):
(JSC::FTL::DFG::LowerDFGToLLVM::emitOSRExitCall):
(JSC::FTL::DFG::LowerDFGToLLVM::buildExitArguments):
(JSC::FTL::DFG::LowerDFGToLLVM::callStackmap):
(JSC::FTL::DFG::LowerDFGToLLVM::exitValueForAvailability):
(JSC::FTL::DFG::LowerDFGToLLVM::exitValueForNode):
(JSC::FTL::DFG::LowerDFGToLLVM::exitArgument):
(JSC::FTL::DFG::LowerDFGToLLVM::exitValueForTailCall):
* ftl/FTLOSRExit.cpp:
* ftl/FTLOSRExit.h:
* ftl/FTLStackmapArgumentList.h: Copied from Source/JavaScriptCore/ftl/FTLExitArgumentList.h.

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

4 years agoTatechuyoko text is not vertically centered in its vertical advance
mmaxfield@apple.com [Tue, 10 Nov 2015 20:05:01 +0000 (20:05 +0000)]
Tatechuyoko text is not vertically centered in its vertical advance
https://bugs.webkit.org/show_bug.cgi?id=151074
<rdar://problem/20074305>

Reviewed by David Hyatt.

During paint time, the run origin of tatechuyoko needs to be adjusted to compensate for the
rotation of the writing mode. The calculation which performed this adjustment was incorrect.

It is incorrect for two reasons:
1. It used the existing text origin, which had the font's ascent incorporated in it, but did
not compensate by either inspecting the overflow bounds' ascent nor the font's ascent proper.
2. It did not distinguish between the overflow bounds' ascent vs. descent. Instead, it added
them together and treated both values together.

No new tests yet. I need to make a font to test this.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::computeTextOrigin):
(WebCore::RenderCombineText::combineText):
(WebCore::RenderCombineText::adjustTextOrigin): Deleted.
* rendering/RenderCombineText.h:

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

4 years ago[WK2][NetworkCache] Rename SpeculativeLoader to SpeculativeLoadManager
cdumez@apple.com [Tue, 10 Nov 2015 19:20:33 +0000 (19:20 +0000)]
[WK2][NetworkCache] Rename SpeculativeLoader to SpeculativeLoadManager
https://bugs.webkit.org/show_bug.cgi?id=151110

Reviewed by Alex Christensen.

Rename SpeculativeLoader to SpeculativeLoadManager for clarity, as it
manages all speculative loads.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::initialize):
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoader.cpp.
(WebKit::NetworkCache::subresourcesType):
(WebKit::NetworkCache::makeSubresourcesKey):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::registerSubresource):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::encodeAsSubresourcesRecord):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::markAsCompleted):
(WebKit::NetworkCache::SpeculativeLoadManager::SpeculativeLoadManager):
(WebKit::NetworkCache::SpeculativeLoadManager::~SpeculativeLoadManager):
(WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h: Renamed from Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoader.h.
* WebKit2.xcodeproj/project.pbxproj:

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

4 years ago[B3] Add more tests for Check and fix bugs this found
fpizlo@apple.com [Tue, 10 Nov 2015 19:14:49 +0000 (19:14 +0000)]
[B3] Add more tests for Check and fix bugs this found
https://bugs.webkit.org/show_bug.cgi?id=151073

Reviewed by Saam Barati.

Adds tests for compare/Check fusion. The "MegaCombo" test found a bug in our implementation
of forEachArg: Air::spillEverything() was expecting that the Arg& to point to the actual Arg
so that it can mutate it. But this wasn't the case in B3::CheckSpecial. This fixes that bug.

* b3/B3CheckSpecial.cpp:
(JSC::B3::Air::numB3Args):
(JSC::B3::CheckSpecial::hiddenBranch):
(JSC::B3::CheckSpecial::commitHiddenBranch):
(JSC::B3::CheckSpecial::forEachArg):
* b3/B3CheckSpecial.h:
* b3/testb3.cpp:
(JSC::B3::testSimpleCheck):
(JSC::B3::testCheckLessThan):
(JSC::B3::testCheckMegaCombo):
(JSC::B3::genericTestCompare):
(JSC::B3::run):

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

4 years agoXMLHttpRequestUpload should support ontimeout event handler
youenn.fablet@crf.canon.fr [Tue, 10 Nov 2015 18:59:44 +0000 (18:59 +0000)]
XMLHttpRequestUpload should support ontimeout event handler
https://bugs.webkit.org/show_bug.cgi?id=128531

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/XMLHttpRequest/interfaces-expected.txt: Rebasing as test is passing.
* web-platform-tests/XMLHttpRequest/send-timeout-events-expected.txt: Ditto.

Source/WebCore:

Covered by rebased tests.

* xml/XMLHttpRequestUpload.idl: Adding ontimeout event handler.

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

4 years ago[B3] Add a test for CCall with double arguments and results
fpizlo@apple.com [Tue, 10 Nov 2015 18:36:10 +0000 (18:36 +0000)]
[B3] Add a test for CCall with double arguments and results
https://bugs.webkit.org/show_bug.cgi?id=151064

Reviewed by Saam Barati.

The test already passed on trunk. But when looking at the disassembly, I realized that I had
made a rookie mistake in the call argument marshalling: the stores to the stack went after the
moves to argument registers! This means that arguments that go to stack would be made to
interfere with all argument registers. That's some severe register pressure right there. So,
this change fixes that as well, and adds a FIXME to do it in a more principled manner in Air.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::tryAppendStoreBinOp):
(JSC::B3::Air::LowerToAir::createStore):
(JSC::B3::Air::LowerToAir::appendStore):
(JSC::B3::Air::LowerToAir::moveForType):
(JSC::B3::Air::LowerToAir::marshallCCallArgument):
* b3/testb3.cpp:
(JSC::B3::testReturnDouble):
(JSC::B3::simpleFunctionDouble):
(JSC::B3::testCallSimpleDouble):
(JSC::B3::functionWithHellaDoubleArguments):
(JSC::B3::testCallFunctionWithHellaDoubleArguments):
(JSC::B3::run):

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

4 years agoBroadening the scope of skipped inspector tests on Win
ryanhaddad@apple.com [Tue, 10 Nov 2015 18:32:45 +0000 (18:32 +0000)]
Broadening the scope of skipped inspector tests on Win
https://bugs.webkit.org/show_bug.cgi?id=137157

Unreviewed test gardening.

* platform/win/TestExpectations:

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

4 years agoAdd WKWebViewConfiguration SPI for a variety of different ex-preferences
timothy_horton@apple.com [Tue, 10 Nov 2015 18:06:43 +0000 (18:06 +0000)]
Add WKWebViewConfiguration SPI for a variety of different ex-preferences
https://bugs.webkit.org/show_bug.cgi?id=151070
<rdar://problem/23020454>

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _setRespectsImageOrientation:]):
(-[WKWebViewConfiguration _respectsImageOrientation]):
(-[WKWebViewConfiguration _setPrintsBackgrounds:]):
(-[WKWebViewConfiguration _printsBackgrounds]):
(-[WKWebViewConfiguration _setIncrementalRenderingSuppressionTimeout:]):
(-[WKWebViewConfiguration _incrementalRenderingSuppressionTimeout]):
(-[WKWebViewConfiguration _setAllowsJavaScriptMarkup:]):
(-[WKWebViewConfiguration _allowsJavaScriptMarkup]):
(-[WKWebViewConfiguration _setConvertsPositionStyleOnCopy:]):
(-[WKWebViewConfiguration _convertsPositionStyleOnCopy]):
(-[WKWebViewConfiguration _setAllowsMetaRefresh:]):
(-[WKWebViewConfiguration _allowsMetaRefresh]):
(-[WKWebViewConfiguration _setShowsURLsInToolTips:]):
(-[WKWebViewConfiguration _showsURLsInToolTips]):
(-[WKWebViewConfiguration _setServiceControlsEnabled:]):
(-[WKWebViewConfiguration _serviceControlsEnabled]):
(-[WKWebViewConfiguration _setImageControlsEnabled:]):
(-[WKWebViewConfiguration _imageControlsEnabled]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
Plumb some configuration SPI for various clients.

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

4 years agoForce display: block on ::-webkit-media-controls.
zalan@apple.com [Tue, 10 Nov 2015 18:03:04 +0000 (18:03 +0000)]
Force display: block on ::-webkit-media-controls.
https://bugs.webkit.org/show_bug.cgi?id=149178
<rdar://problem/23448397>

Reviewed by Simon Fraser.

This patch ensures that we always have a block level container for media controls
so that continuation never needs to split RenderMedia into multiple subtrees.

Current inline continuation logic assumes that only inline elements with RenderInline
type of renderers participate in continuation. This is mostly the case since other inline renderers
such as RenderReplaced, RenderImage, RenderEmbeddedObject etc can't have (accessible) children.
(Unlike video::-webkit-media-controls)

Source/WebCore:

Test: media/webkit-media-controls-display.html

* Modules/mediacontrols/mediaControlsApple.css:
(::-webkit-media-controls):
* Modules/mediacontrols/mediaControlsiOS.css:
(::-webkit-media-controls):
* css/mediaControls.css:
(::-webkit-media-controls):

LayoutTests:

* media/webkit-media-controls-display-expected.txt: Added.
* media/webkit-media-controls-display.html: Added.

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

4 years agoRemove WebKit specific XHR timeout tests in favor of WPT version
youenn.fablet@crf.canon.fr [Tue, 10 Nov 2015 17:57:32 +0000 (17:57 +0000)]
Remove WebKit specific XHR timeout tests in favor of WPT version
https://bugs.webkit.org/show_bug.cgi?id=151091

Reviewed by Alexey Proskuryakov.

Removing XHR timeout WebKit specific tests as they have WPT counterparts and WebKit specific tests are less stable.
Updated test expectations accordingly.

* TestExpectations:
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted-expected.txt: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.html: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.js: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain-expected.txt: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.html: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.js: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides-expected.txt: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.html: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overrides.js: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires-expected.txt: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.html: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.js: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-runner.js: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple-expected.txt: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.html: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.js: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain-expected.txt: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.html: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.js: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconworker.js: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice-expected.txt: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.html: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.js: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-aborted-expected.txt: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-aborted.html: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides-expected.txt: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overrides.html: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overridesexpires-expected.txt: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overridesexpires.html: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-simple-expected.txt: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-simple.html: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-synconworker-expected.txt: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-synconworker.html: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-twice-expected.txt: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-twice.html: Removed.
* http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout.js: Removed.
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/win/TestExpectations:

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

4 years agoRemove create_hash_table options and simplify build system
youenn.fablet@crf.canon.fr [Tue, 10 Nov 2015 17:51:59 +0000 (17:51 +0000)]
Remove create_hash_table options and simplify build system
https://bugs.webkit.org/show_bug.cgi?id=151081

Reviewed by Darin Adler.

* CMakeLists.txt: Merged native and builtin object sources and removed create_hash_table options.
* DerivedSources.make: Ditto.
* create_hash_table: Removed -b and -i options.

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

4 years ago[WK2][iOS] Update WebContent sandbox profile to allow loading injected bundles again
cdumez@apple.com [Tue, 10 Nov 2015 17:15:05 +0000 (17:15 +0000)]
[WK2][iOS] Update WebContent sandbox profile to allow loading injected bundles again
https://bugs.webkit.org/show_bug.cgi?id=151102
<rdar://problem/23442311>

Reviewed by Dan Bernstein.

Update WebContent sandbox profile to allow loading injected bundles again.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

4 years ago[UNIX] Environment variable should take precedence over directories in plugin search...
carlosgc@webkit.org [Tue, 10 Nov 2015 16:50:26 +0000 (16:50 +0000)]
[UNIX] Environment variable should take precedence over directories in plugin search path
https://bugs.webkit.org/show_bug.cgi?id=151096

Reviewed by Martin Robinson.

Otherwise you can't override the directories using the env vars
for plugins already installed.

* Shared/Plugins/unix/PluginSearchPath.cpp:
(WebKit::pluginsDirectories):

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

4 years ago[GTK] Use CROSS_PLATFORM_CONTEXT_MENUS
carlosgc@webkit.org [Tue, 10 Nov 2015 16:08:32 +0000 (16:08 +0000)]
[GTK] Use CROSS_PLATFORM_CONTEXT_MENUS
https://bugs.webkit.org/show_bug.cgi?id=150642

Reviewed by Martin Robinson.

Source/WebCore:

Remove GTK+ implementations of old context menu classes.

* PlatformGTK.cmake:
* platform/ContextMenuItem.h:
* platform/gtk/ContextMenuGtk.cpp: Removed.
* platform/gtk/ContextMenuItemGtk.cpp: Removed.

Source/WebKit2:

Use CROSS_PLATFORM_CONTEXT_MENUS. Since we can't just use
WebContextMenuItemData, because we need to bind a GtkAction to the
menu items, this patch adds WebContextMenuItemGtk that derives
from WebContextMenuItemData and adds the GtkAction and its own
handling of submenu items. WebKitContextMenu and
WebKitContextMenuItem no longer deal with the widgets (GtkMenu and
GtkMenuItem), that are now created by WebContextMenuProxy when
building the popup menu.
This patch also removes the support for input methods submenu,
since it has been deprecated (and disabled by default) in GTK+ for
long time, it has never actually worked (because the menu items
don't have a GtkAction associated) and it makes the code more
complicated for no benefit.

* PlatformGTK.cmake:
* Shared/gtk/WebContextMenuItemGtk.cpp: Added.
(WebKit::gtkStockIDFromContextMenuAction):
(WebKit::WebContextMenuItemGtk::WebContextMenuItemGtk):
(WebKit::WebContextMenuItemGtk::~WebContextMenuItemGtk):
(WebKit::WebContextMenuItemGtk::createGtkActionIfNeeded):
* Shared/gtk/WebContextMenuItemGtk.h: Copied from Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h.
(WebKit::WebContextMenuItemGtk::gtkAction):
(WebKit::WebContextMenuItemGtk::submenuItems):
* UIProcess/API/gtk/WebKitContextMenu.cpp:
(webkitContextMenuPopulate):
(webkitContextMenuCreate): Deleted.
(webkitContextMenuSetParentItem): Deleted.
* UIProcess/API/gtk/WebKitContextMenuActions.cpp:
(webkitContextMenuActionGetForContextMenuItem):
* UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h:
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
(webkitContextMenuItemSetSubMenu):
(webkitContextMenuItemCreate):
(webkitContextMenuItemToWebContextMenuItemGtk):
(webkitContextMenuItemToWebContextMenuItemData):
(webkit_context_menu_item_new):
(webkit_context_menu_item_new_from_stock_action):
(webkit_context_menu_item_new_from_stock_action_with_label):
(webkit_context_menu_item_new_with_submenu):
(webkit_context_menu_item_new_separator):
(webkit_context_menu_item_get_action):
(webkit_context_menu_item_get_stock_action):
(webkit_context_menu_item_is_separator): Deleted.
* UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
* UIProcess/API/gtk/WebKitContextMenuPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewPopulateContextMenu):
(contextMenuDismissed): Deleted.
(webkitWebViewSubmitFormRequest): Deleted.
(webkitWebViewHandleAuthenticationChallenge): Deleted.
(webkitWebViewInsecureContentDetected): Deleted.
(webkitWebViewEmitRunColorChooser): Deleted.
(webkitWebViewRequestInstallMissingMediaPlugins): Deleted.
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::contextMenuItemActivatedCallback):
(WebKit::WebContextMenuProxyGtk::append):
(WebKit::WebContextMenuProxyGtk::populate):
(WebKit::WebContextMenuProxyGtk::show):
(WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
(WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
* UIProcess/gtk/WebContextMenuProxyGtk.h:
(WebKit::WebContextMenuProxyGtk::gtkMenu):
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:

Source/WTF:

Enable CROSS_PLATFORM_CONTEXT_MENUS for GTK+ port.

* wtf/Platform.h:

Tools:

Remove test for input methods submenu.

* TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp:

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

4 years ago[Streams API] Fix style issues
calvaris@igalia.com [Tue, 10 Nov 2015 15:45:21 +0000 (15:45 +0000)]
[Streams API] Fix style issues
https://bugs.webkit.org/show_bug.cgi?id=151089

Reviewed by Youenn Fablet.

Inlined some things, converted var into let and const, removed some undefined parameters and returns, added
missing "use strict" clauses and other minor style changes.

Internal rework, no new tests needed.

* Modules/streams/ReadableStream.js:
(initializeReadableStream):
* Modules/streams/ReadableStreamController.js:
(enqueue):
(error):
(close):
* Modules/streams/ReadableStreamInternals.js:
(teeReadableStream):
(teeReadableStreamPullFunction):
(teeReadableStreamBranch2CancelFunction):
(errorReadableStream):
(finishClosingReadableStream):
(closeReadableStreamReader):
(enqueueInReadableStream):
(readFromReadableStreamReader):
* Modules/streams/ReadableStreamReader.js:
(releaseLock):
* Modules/streams/StreamInternals.js:
(invokeOrNoop):
(promiseInvokeOrNoop):
(promiseInvokeOrFallbackOrNoop):
(validateAndNormalizeQueuingStrategy):
(newQueue):
(dequeueValue):
(enqueueValueWithSize):
(peekQueueValue):
* Modules/streams/WritableStream.js:
(initializeWritableStream):
(abort):
(close):
* Modules/streams/WritableStreamInternals.js:
(syncWritableStreamStateWithQueue):
(errorWritableStream):
(callOrScheduleWritableStreamAdvanceQueue):
(writableStreamAdvanceQueue):
(closeWritableStream): Deleted.

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

4 years agoUnreviewed. Fix scrollbars/custom-scrollbar-appearance-property.html after r191991.
carlosgc@webkit.org [Tue, 10 Nov 2015 14:42:42 +0000 (14:42 +0000)]
Unreviewed. Fix scrollbars/custom-scrollbar-appearance-property.html after r191991.

Use a similar fix to the mac one.

* rendering/RenderThemeGtk.cpp:
(WebCore::centerRectVerticallyInParentInputElement):

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

4 years agoUnreviewed speculative buildfix after r192200.
ossy@webkit.org [Tue, 10 Nov 2015 12:04:10 +0000 (12:04 +0000)]
Unreviewed speculative buildfix after r192200.

* platform/mock/MediaPlaybackTargetPickerMock.cpp:
(WebCore::MediaPlaybackTargetPickerMock::showPlaybackTargetPicker):

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

4 years ago[Streams API] Shield promises when prototype is replaced from a promise
calvaris@igalia.com [Tue, 10 Nov 2015 08:51:03 +0000 (08:51 +0000)]
[Streams API] Shield promises when prototype is replaced from a promise
https://bugs.webkit.org/show_bug.cgi?id=151033

Reviewed by Darin Adler.

Source/WebCore:

Instead of calling @then or @catch, that could have disappeared if the user successfully replaces a promise
constructor, we call the methods stored at @Promise.prototype, which are safe as @Promise.prototype.@then.@call
and @Promise.prototype.@catch.@call.

Test: streams/streams-promises.html, expectations updated.

* Modules/streams/ReadableStream.js:
(initializeReadableStream):
* Modules/streams/ReadableStreamInternals.js:
(teeReadableStream):
(teeReadableStreamPullFunction):
(teeReadableStreamBranch2CancelFunction):
(cancelReadableStream):
* Modules/streams/WritableStream.js:
(initializeWritableStream):
(abort):
* Modules/streams/WritableStreamInternals.js:
(callOrScheduleWritableStreamAdvanceQueue):

LayoutTests:

* streams/streams-promises-expected.txt: Updated expectations.

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

4 years agoREGRESSION (r189567): Inline controls on Mac are misplaced
jonlee@apple.com [Tue, 10 Nov 2015 08:46:40 +0000 (08:46 +0000)]
REGRESSION (r189567): Inline controls on Mac are misplaced
https://bugs.webkit.org/show_bug.cgi?id=151072

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/controls/fullscreen-button-inline-layout.html

For a certain range of video widths, r189567 caused the timeline track to be
too large, pushing the buttons on the right side of the inline controls out of
the rect bounds.

The fix is to set min-width to 0. The test added checks to see that the right
edge of the fullscreen button is within the rect bounds.

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-timeline-container): Add min-width.
(audio::-webkit-media-controls-panel .thumbnail-track): Ditto. Fly-by fix of height rule.

LayoutTests:

* media/controls/controls-test-helpers.js:
(ControlsTest.prototype.isLessThan): Add helper function.
* media/controls/fullscreen-button-inline-layout-expected.txt: Added.
* media/controls/fullscreen-button-inline-layout.html: Added.

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

4 years agocreate_hash_table should know whether a function is JSBuiltin or not.
youenn.fablet@crf.canon.fr [Tue, 10 Nov 2015 08:22:07 +0000 (08:22 +0000)]
create_hash_table should know whether a function is JSBuiltin or not.
https://bugs.webkit.org/show_bug.cgi?id=151016

Reviewed by Darin Adler.

lut description information can explicitly state that a function is to be implemented as a JS built-in.
To do so, the field used to give the C++ function must be set to "JSBuiltin".
Updated create_hash_table script to handle that.
create_hash_table only includes JSCBuiltins.h if at least one function is set to "JSBuiltin".

Updated builtin generator to remove XX_BUILTIN_EXIST macro.
A further patch should simplify the build system by removing create_hash_table -b option.

Changes to the builtin generator are covered by rebased expectations.

Moved all lut information to using JSBuiltin whenever needed.

* Scripts/builtins/builtins_generate_combined_header.py:
(generate_section_for_object): Deleted.
(generate_section_for_code_table_macro): Deleted.
* Scripts/builtins/builtins_templates.py:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Separate.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Separate.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-ArbitraryConditionalGuard-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result:
* create_hash_table:
* runtime/ArrayConstructor.cpp:
* runtime/ArrayIteratorPrototype.cpp:
* runtime/InspectorInstrumentationObject.cpp:
* runtime/JSInternalPromiseConstructor.cpp:
* runtime/JSPromiseConstructor.cpp:
* runtime/JSPromisePrototype.cpp:
* runtime/ModuleLoaderObject.cpp:
* runtime/ObjectConstructor.cpp:
* runtime/ReflectObject.cpp:
* runtime/StringConstructor.cpp:
* runtime/StringIteratorPrototype.cpp:

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

4 years agoImplement try/catch in the FTL
sbarati@apple.com [Tue, 10 Nov 2015 07:48:54 +0000 (07:48 +0000)]
Implement try/catch in the FTL
https://bugs.webkit.org/show_bug.cgi?id=149409

Reviewed by Filip Pizlo.

This patch implements try/catch in the FTL in a similar
way to how it's implemented in the DFG. The main idea is
this: anytime an exception is thrown in a try block,
we OSR exit into the baseline JIT's corresponding catch
block. We compile OSR exits in a few forms:
1) Explicit exception checks that check VM's exception
pointer. This is modeled explicitly in LLVM IR.
2) OSR exits that are arrived at from genericUnwind
caused by an exception being thrown in a JS call (including
getters and setters).
3) Exception from lazy slow paths.
4) Exception from when an IC misses and makes a slow path C Call.

All stackmaps associated with the above types of exits all
take arguments that correspond to variables that are
bytecode-live in the catch block.

1) Item 1 is the simplest implementation. When inside
a try block, exception checks will emit a branch to
an OSR exit stackmap intrinsic. This stackmap intrinsic
takes as arguments the live catch variables.

2) All forms of calls and GetByIds and PutByIds are implemented
as patchpoints in LLVM. As a patchpoint, they have a stackmap ID.
We use the same stackmap ID for the OSR exit. The OSR exit arguments
are appended to the end of the normal arguments for the patchpoint. These
types of OSR exits are only reached indirectly via genericUnwind.
Therefore, the LLVM IR we generate never has a direct branch to them.
These are the OSR exits we store in the CodeBlock's exception handling
table. The exception handlers' code locations point to the beginning
of the corresponding OSR exit. There is an interesting story here
about how we preserve registers. LLVM patchpoints assume late clobber,
i.e, they assume we use the patchpoint arguments before we clobber them.
Therefore, it's sound for LLVM to pass us arguments in volatile registers.
We must take care to store the arguments in volatile registers to the
stack before making a call. We ensure we have stack space for these
by using LLVM's alloca instruction. Then, when making a call inside
a try block, we spill the needed registers, and if that call throws,
we make sure the OSR exit fills the corresponding registers.

3) Exceptions from lazy slow paths are similar to (2) except they
don't go through generic unwind. These OSR Exits are arrived at from explicit
exception checks in the generated lazy slow path. Therefore, the callframe
is intact when arriving at the OSR exit. We make sure such lazy slow
paths exception check are linked to the OSR exit's code location.

4) This has a really interesting register preservation story.
We may have a GetById that has an IC miss and therefore goes
through the FTL's callOperation machinery. LLVM may also
ask for the result to be placed in the same register as the
base. Therefore, after the call, when storing to the result,
we overwrite the base. This can't fly with exceptions because
operationGetByIdOptimize may throw an exception and return "undefined". What
we really want is the original base value for OSR exit value
recovery. In this case, we take special care to flush the base
value to the stack before the callOperation GetById slow path.
Like call OSR exits, these types of exits will recover the base
value from the stack when necessary.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::newExceptionHandlingCallSiteIndex):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::canOptimizeStringObjectAccess):
(JSC::DFG::Graph::willCatchExceptionInMachineFrame):
* dfg/DFGGraph.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::appendExceptionHandlingOSRExit):
(JSC::DFG::JITCompiler::exceptionCheck):
(JSC::DFG::JITCompiler::recordCallSiteAndGenerateExceptionHandlingOSRExitIfNeeded):
(JSC::DFG::JITCompiler::willCatchExceptionInMachineFrame): Deleted.
* dfg/DFGJITCompiler.h:
* dfg/DFGNodeOrigin.h:
(JSC::DFG::NodeOrigin::withSemantic):
(JSC::DFG::NodeOrigin::withForExitAndExitOK):
(JSC::DFG::NodeOrigin::withExitOK):
* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::OSRExit):
* dfg/DFGOSRExit.h:
(JSC::DFG::OSRExit::considerAddingAsFrequentExitSite):
* dfg/DFGOSRExitBase.h:
(JSC::DFG::OSRExitBase::OSRExitBase):
(JSC::DFG::OSRExitBase::considerAddingAsFrequentExitSite):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::reifyInlinedCallFrames):
* dfg/DFGPutStackSinkingPhase.cpp:
* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):
* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
* ftl/FTLExitArgument.h:
(JSC::FTL::ExitArgument::withFormat):
(JSC::FTL::ExitArgument::representation):
* ftl/FTLExitThunkGenerator.cpp:
(JSC::FTL::ExitThunkGenerator::~ExitThunkGenerator):
(JSC::FTL::ExitThunkGenerator::emitThunk):
(JSC::FTL::ExitThunkGenerator::emitThunks):
* ftl/FTLExitThunkGenerator.h:
(JSC::FTL::ExitThunkGenerator::didThings):
* ftl/FTLExitValue.h:
(JSC::FTL::ExitValue::isArgument):
(JSC::FTL::ExitValue::isRecovery):
(JSC::FTL::ExitValue::isObjectMaterialization):
(JSC::FTL::ExitValue::hasIndexInStackmapLocations):
(JSC::FTL::ExitValue::exitArgument):
(JSC::FTL::ExitValue::rightRecoveryArgument):
(JSC::FTL::ExitValue::adjustStackmapLocationsIndexByOffset):
(JSC::FTL::ExitValue::recoveryFormat):
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::validateReferences):
(JSC::FTL::JITCode::liveRegistersToPreserveAtExceptionHandlingCallSite):
* ftl/FTLJSCall.cpp:
(JSC::FTL::JSCall::JSCall):
(JSC::FTL::JSCall::emit):
* ftl/FTLJSCall.h:
(JSC::FTL::JSCall::stackmapID):
* ftl/FTLJSCallBase.cpp:
(JSC::FTL::JSCallBase::JSCallBase):
(JSC::FTL::JSCallBase::emit):
* ftl/FTLJSCallBase.h:
(JSC::FTL::JSCallBase::setCallSiteIndex):
(JSC::FTL::JSCallBase::callSiteDescriptionOrigin):
(JSC::FTL::JSCallBase::setCorrespondingGenericUnwindOSRExit):
* ftl/FTLJSCallVarargs.cpp:
(JSC::FTL::JSCallVarargs::numSpillSlotsNeeded):
(JSC::FTL::JSCallVarargs::emit):
* ftl/FTLJSCallVarargs.h:
(JSC::FTL::JSCallVarargs::stackmapID):
(JSC::FTL::JSCallVarargs::operator<):
(JSC::FTL::JSCallVarargs::setCallSiteIndex):
(JSC::FTL::JSCallVarargs::callSiteDescriptionOrigin):
(JSC::FTL::JSCallVarargs::setCorrespondingGenericUnwindOSRExit):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lower):
(JSC::FTL::DFG::LowerDFGToLLVM::compilePutById):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToLLVM::getById):
(JSC::FTL::DFG::LowerDFGToLLVM::lazySlowPath):
(JSC::FTL::DFG::LowerDFGToLLVM::speculate):
(JSC::FTL::DFG::LowerDFGToLLVM::terminate):
(JSC::FTL::DFG::LowerDFGToLLVM::appendTypeCheck):
(JSC::FTL::DFG::LowerDFGToLLVM::callPreflight):
(JSC::FTL::DFG::LowerDFGToLLVM::callCheck):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExitArgumentsForPatchpointIfWillCatchException):
(JSC::FTL::DFG::LowerDFGToLLVM::emitBranchToOSRExitIfWillCatchException):
(JSC::FTL::DFG::LowerDFGToLLVM::lowBlock):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExitDescriptor):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExit):
(JSC::FTL::DFG::LowerDFGToLLVM::exitValueForNode):
* ftl/FTLOSRExit.cpp:
(JSC::FTL::OSRExitDescriptor::OSRExitDescriptor):
(JSC::FTL::OSRExit::OSRExit):
(JSC::FTL::OSRExit::codeLocationForRepatch):
(JSC::FTL::OSRExit::gatherRegistersToSpillForCallIfException):
(JSC::FTL::OSRExit::spillRegistersToSpillSlot):
(JSC::FTL::OSRExit::recoverRegistersFromSpillSlot):
* ftl/FTLOSRExit.h:
(JSC::FTL::OSRExit::considerAddingAsFrequentExitSite):
* ftl/FTLOSRExitCompilationInfo.h:
(JSC::FTL::OSRExitCompilationInfo::OSRExitCompilationInfo):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
(JSC::FTL::compileFTLOSRExit):
* ftl/FTLState.cpp:
(JSC::FTL::State::State):
* ftl/FTLState.h:
* interpreter/Interpreter.cpp:
(JSC::findExceptionHandler):
* jit/RegisterSet.cpp:
(JSC::RegisterSet::specialRegisters):
(JSC::RegisterSet::volatileRegistersForJSCall):
(JSC::RegisterSet::stubUnavailableRegisters):
* jit/RegisterSet.h:
* tests/stress/ftl-try-catch-getter-ic-fail-to-call-operation-throw-error.js: Added.
(assert):
(let.oThrow.get f):
(let.o2.get f):
(foo):
(f):
* tests/stress/ftl-try-catch-getter-throw.js: Added.
(assert):
(random):
(foo):
(f):
(let.o2.get f):
* tests/stress/ftl-try-catch-oom-error-lazy-slow-path.js: Added.
(assert):
(a):
(b):
(c):
(d):
(e):
(f):
(g):
(foo):
(blah):
* tests/stress/ftl-try-catch-patchpoint-with-volatile-registers.js: Added.
(assert):
(o1.get f):
(a):
(b):
(c):
(d):
(e):
(f):
(g):
(o2.get f):
(foo):
* tests/stress/ftl-try-catch-setter-throw.js: Added.
(foo):
(assert):
(f):
(let.o2.set f):
* tests/stress/ftl-try-catch-tail-call-inilned-caller.js: Added.
(value):
(assert):
(validate):
(bar):
(baz):
(jaz):
* tests/stress/ftl-try-catch-varargs-call-throws.js: Added.
(foo):
(f):
* tests/stress/try-catch-stub-routine-replaced.js:
(hello):
(foo):

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

4 years agoBuilt-in generator should check that there are no duplicate in JS built-in internal...
youenn.fablet@crf.canon.fr [Tue, 10 Nov 2015 07:21:23 +0000 (07:21 +0000)]
Built-in generator should check that there are no duplicate in JS built-in internal functions
https://bugs.webkit.org/show_bug.cgi?id=151018

Reviewed by Brian Burg.

Added @internal to corresponding JS built-in files.
Added check in built-in generator so that clashing names result in an error.

* Scripts/builtins/builtins_generate_combined_header.py:
(generate_section_for_code_name_macro):
* Scripts/builtins/builtins_model.py:
(BuiltinsCollection.all_internal_functions):
* builtins/GlobalObject.js:
* builtins/Operations.Promise.js:
* Scripts/tests/builtins/expected/JavaScriptCore-InternalClashingNames-Combined.js-error: Added.
* Scripts/tests/builtins/expected/JavaScriptCore-InternalClashingNames-Combined.js-result: Added.

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

4 years agoUnreviewed. Fix GTK+ build after r192184.
carlosgc@webkit.org [Tue, 10 Nov 2015 07:19:45 +0000 (07:19 +0000)]
Unreviewed. Fix GTK+ build after r192184.

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):

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

4 years ago[Mac] Add a mock AppleTV device for testing
eric.carlson@apple.com [Tue, 10 Nov 2015 06:24:34 +0000 (06:24 +0000)]
[Mac] Add a mock AppleTV device for testing
https://bugs.webkit.org/show_bug.cgi?id=148912
<rdar://problem/22596272>

Reviewed by Tim Horton.

Source/WebCore:

No new tests, updated media/controls/airplay-picker.html.

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerEnabled): New, enable or disable
  the mock picker.
(WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerState): New, set mock picker state.
(WebCore::WebMediaSessionManager::mockPicker): New.
(WebCore::WebMediaSessionManager::targetPicker): Return the platform or mock picker, as per settings.
(WebCore::webMediaSessionManagerOverride): Deleted.
(WebCore::WebMediaSessionManager::shared): Deleted.
(WebCore::WebMediaSessionManager::setWebMediaSessionManagerOverride): Deleted.
* Modules/mediasession/WebMediaSessionManager.h:

* WebCore.xcodeproj/project.pbxproj: Add MediaPlaybackTargetPickerMock.* and MediaPlaybackTargetMock.*.

* page/ChromeClient.h: add setMockMediaPlaybackTargetPickerEnabled and setMockMediaPlaybackTargetPickerState.

* page/Page.cpp:
(WebCore::Page::playbackTargetPickerClientStateDidChange):
(WebCore::Page::setMockMediaPlaybackTargetPickerEnabled): New.
(WebCore::Page::setMockMediaPlaybackTargetPickerState): New.
(WebCore::Page::setPlaybackTarget):
* page/Page.h:

* platform/graphics/MediaPlaybackTarget.h:
(WebCore::noMediaPlaybackTargetContext):
(WebCore::MediaPlaybackTarget::~MediaPlaybackTarget):
(WebCore::MediaPlaybackTarget::deviceName):
(WebCore::MediaPlaybackTarget::MediaPlaybackTarget):

* platform/graphics/MediaPlaybackTargetContext.h: Make a class instead of a struct.
(WebCore::MediaPlaybackTargetContext::MediaPlaybackTargetContext):
(WebCore::MediaPlaybackTargetContext::type):
(WebCore::MediaPlaybackTargetContext::mockDeviceName):
(WebCore::MediaPlaybackTargetContext::mockState):
(WebCore::MediaPlaybackTargetContext::avOutputContext):
(WebCore::MediaPlaybackTargetContext::encodingRequiresPlatformData):

* platform/graphics/MediaPlaybackTargetPicker.cpp: Move much of the code from MediaPlaybackTargetMac.mm
  here so it can be the base class.
(WebCore::MediaPlaybackTargetPicker::MediaPlaybackTargetPicker):
(WebCore::MediaPlaybackTargetPicker::~MediaPlaybackTargetPicker):
(WebCore::MediaPlaybackTargetPicker::pendingActionTimerFired):
(WebCore::MediaPlaybackTargetPicker::addPendingAction):
(WebCore::MediaPlaybackTargetPicker::showPlaybackTargetPicker):
* platform/graphics/MediaPlaybackTargetPicker.h:
(WebCore::MediaPlaybackTargetPicker::availableDevicesDidChange):
(WebCore::MediaPlaybackTargetPicker::currentDeviceDidChange):
(WebCore::MediaPlaybackTargetPicker::client):
(WebCore::MediaPlaybackTargetPicker::setClient):

* platform/graphics/avfoundation/MediaPlaybackTargetMac.h:
(WebCore::MediaPlaybackTargetMac::outputContext):
(WebCore::MediaPlaybackTargetMac::targetType): Deleted.
* platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
(WebCore::MediaPlaybackTargetMac::targetContext):
(WebCore::MediaPlaybackTargetMac::hasActiveRoute):
(WebCore::MediaPlaybackTargetMac::deviceName):

* platform/graphics/avfoundation/WebMediaSessionManagerMac.cpp:
(WebCore::WebMediaSessionManager::shared): Renamed from platformManager.
(WebCore::WebMediaSessionManagerMac::platformPicker): Renamed from targetPicker.
(WebCore::WebMediaSessionManager::platformManager): Deleted.
(WebCore::WebMediaSessionManagerMac::targetPicker): Deleted.
* platform/graphics/avfoundation/WebMediaSessionManagerMac.h:

* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):
(WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac):
(WebCore::MediaPlaybackTargetPickerMac::externalOutputDeviceAvailable):
(WebCore::MediaPlaybackTargetPickerMac::playbackTarget):
(WebCore::MediaPlaybackTargetPickerMac::devicePicker):
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):
(WebCore::MediaPlaybackTargetPickerMac::startingMonitoringPlaybackTargets):
(WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Deleted.
(WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Deleted.
(WebCore::MediaPlaybackTargetPickerMac::addPendingAction): Deleted.
(WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Deleted.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless): Add support for
  mock target.
(WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetName): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Ditto.

* platform/mock/MediaPlaybackTargetMock.cpp: Added.
(WebCore::MediaPlaybackTargetMock::create):
(WebCore::MediaPlaybackTargetMock::MediaPlaybackTargetMock):
(WebCore::MediaPlaybackTargetMock::~MediaPlaybackTargetMock):
(WebCore::MediaPlaybackTargetMock::targetContext):
(WebCore::toMediaPlaybackTargetMock):
* platform/mock/MediaPlaybackTargetMock.h: Added.

* platform/mock/MediaPlaybackTargetPickerMock.cpp: Added.
(WebCore::MediaPlaybackTargetPickerMock::create):
(WebCore::MediaPlaybackTargetPickerMock::MediaPlaybackTargetPickerMock):
(WebCore::MediaPlaybackTargetPickerMock::~MediaPlaybackTargetPickerMock):
(WebCore::MediaPlaybackTargetPickerMock::externalOutputDeviceAvailable):
(WebCore::MediaPlaybackTargetPickerMock::playbackTarget):
(WebCore::MediaPlaybackTargetPickerMock::timerFired):
(WebCore::MediaPlaybackTargetPickerMock::showPlaybackTargetPicker):
(WebCore::MediaPlaybackTargetPickerMock::startingMonitoringPlaybackTargets):
(WebCore::MediaPlaybackTargetPickerMock::stopMonitoringPlaybackTargets):
(WebCore::MediaPlaybackTargetPickerMock::invalidatePlaybackTargets):
(WebCore::MediaPlaybackTargetPickerMock::setState):
* platform/mock/MediaPlaybackTargetPickerMock.h: Added.

* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::setMockMediaPlaybackTargetPickerEnabled):
(WebCore::Internals::setMockMediaPlaybackTargetPickerState):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::setMockMediaPlaybackTargetPickerEnabled): New.
(WebChromeClient::setMockMediaPlaybackTargetPickerState): Ditto.

* WebView/WebMediaPlaybackTargetPicker.h:
* WebView/WebMediaPlaybackTargetPicker.mm:
(WebMediaPlaybackTargetPicker::setMockMediaPlaybackTargetPickerEnabled): New.
(WebMediaPlaybackTargetPicker::setMockMediaPlaybackTargetPickerState): Ditto.

* WebView/WebView.mm:
(-[WebView _setMockMediaPlaybackTargetPickerEnabled:]): New.
(-[WebView _setMockMediaPlaybackTargetPickerName:state:]): Ditto.
* WebView/WebViewInternal.h:

Source/WebKit2:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encode): Update for MediaPlaybackTargetContext changes.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decode): Ditto.
* Shared/WebCoreArgumentCoders.h:

* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::encodePlatformData): Ditto.
(IPC::ArgumentCoder<MediaPlaybackTargetContext>::decodePlatformData): Ditto.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerEnabled): New.
(WebKit::WebPageProxy::setMockMediaPlaybackTargetPickerState): Ditto.
* UIProcess/WebPageProxy.h:

* UIProcess/WebPageProxy.messages.in: Add SetMockMediaPlaybackTargetPickerEnabled and
  SetMockMediaPlaybackTargetPickerState.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::setMockMediaPlaybackTargetPickerEnabled): New.
(WebKit::WebChromeClient::setMockMediaPlaybackTargetPickerState): Ditto.
* WebProcess/WebCoreSupport/WebChromeClient.h:

* WebProcess/WebPage/WebPage.h: MediaPlaybackTargetContext is a class, not a struct.

* WebProcess/WebPage/WebPage.messages.in: Ditto.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::playbackTargetSelected): Support mock target.

LayoutTests:

* media/controls/airplay-picker-expected.txt: Updated.
* media/controls/airplay-picker.html: Test button state when there is a device available.

* media/controls/controls-test-helpers.js:
(ControlsTest.prototype.stateForControlsElement): Add an optional parameter to force the flushed
  state to be flushed.
(ControlsTest.prototype.contains): New.
(ControlsTest.prototype.doesNotContain): Ditto.

* platform/mac/TestExpectations: Skipped new tests on older versions of OS X.

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

4 years agoUnreviewed, add myself to the committers list.
jh718.park@samsung.com [Tue, 10 Nov 2015 05:04:31 +0000 (05:04 +0000)]
Unreviewed, add myself to the committers list.

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

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

4 years agoWeb Inspector: Support Gesture Events to zoom in / out of the Timeline
commit-queue@webkit.org [Tue, 10 Nov 2015 04:39:23 +0000 (04:39 +0000)]
Web Inspector: Support Gesture Events to zoom in / out of the Timeline
https://bugs.webkit.org/show_bug.cgi?id=151071

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

Adjust the Timeline's secondsPerPixel value by the gesture event's scale factor.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype._handleWheelEvent):
(WebInspector.TimelineOverview._handleGestureStart):
(WebInspector.TimelineOverview.prototype._handleGestureChange):
(WebInspector.TimelineOverview.prototype._handleGestureEnd):

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

4 years agoUnreviewed, fix the windows build
wenson_hsieh@apple.com [Tue, 10 Nov 2015 02:22:09 +0000 (02:22 +0000)]
Unreviewed, fix the windows build

Update the signature of scrollableAreaBoundingBox, changed by r192193.

* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::scrollableAreaBoundingBox):
* platform/win/PopupMenuWin.h:

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

4 years ago[EFL] Crash while opening child webview with EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
ryuan.choi@navercorp.com [Tue, 10 Nov 2015 01:46:39 +0000 (01:46 +0000)]
[EFL] Crash while opening child webview with EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
https://bugs.webkit.org/show_bug.cgi?id=145924

Reviewed by Gyuyoung Kim.

Source/WebKit2:

There are some crashes when we clicked the link that opens child window
via window.open or <a> tag with _blank target if process model is multiple
secondary.

It's because multiple secondary process model tries to assign new webprocess
if related page is null. In order to keep the child window in same process
with opener, we should pass related page when we create WebPageProxy.

This patch adds ewk_view_configuration object and ewk_view_add_configuration()
to pass related page to WebPageProxy.

* PlatformEfl.cmake:
* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewCreate):
* UIProcess/API/C/CoordinatedGraphics/WKView.h:
* UIProcess/API/efl/EWebKit2.h.in:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::createNewPage):
* UIProcess/API/efl/ewk_view_configuration.cpp: Added.
* UIProcess/API/efl/ewk_view_configuration.h: Added.
* UIProcess/API/efl/ewk_view_configuration_private.h: Added.
* UIProcess/API/efl/ewk_view.cpp:
(EWKViewCreate):
(ewk_view_smart_add):
(ewk_view_add_with_configuration): Added to pass configuration.
(ewk_view_add_with_context):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/ewk_view_private.h:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo):
(EWK2UnitTest::EWK2UnitTestBase::waitUntilNotNull):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp: Added test cases to test window_create smart method.
(windowCreateCallback):
(TEST_F):
(EWK2ViewTestNewWindowWithMultipleProcesses::EWK2ViewTestNewWindowWithMultipleProcesses):
* UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
(EWK2WindowFeaturesTest::createDefaultWindow):
(EWK2WindowFeaturesTest::createWindow):
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::WebView):
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebView::create):
(WebKit::WebViewEfl::WebViewEfl):
* UIProcess/efl/WebViewEfl.h:

Tools:

* MiniBrowser/efl/main.c:
(on_window_create):
(window_create):
* TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewUserViewportToContents.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/efl/PlatformWebView.cpp:
(TestWebKitAPI::PlatformWebView::PlatformWebView):
* WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
(WTR::PlatformWebView::PlatformWebView):

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

4 years agoDon't call Vector::uncheckedAppend on a vector that we haven't reserved the capacity for
andersca@apple.com [Tue, 10 Nov 2015 01:11:19 +0000 (01:11 +0000)]
Don't call Vector::uncheckedAppend on a vector that we haven't reserved the capacity for
https://bugs.webkit.org/show_bug.cgi?id=151069
rdar://problem/23473435

Reviewed by Tim Horton.

* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(initializeMethod):

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

4 years agoAllow iOS to create linearRGB colorspaces
simon.fraser@apple.com [Tue, 10 Nov 2015 01:10:51 +0000 (01:10 +0000)]
Allow iOS to create linearRGB colorspaces
https://bugs.webkit.org/show_bug.cgi?id=151059

Reviewed by Tim Horton.

Remove iOS #ifdefs around code that creates linearized RGB colorspaces, as used
by SVG filters. Blending doesn't actually work correctly, but there's no reason
to #ifdef differently here.

* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::linearRGBColorSpaceRef):

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

4 years agoSometimes unable to scroll fixed div when the body is scrollable
wenson_hsieh@apple.com [Tue, 10 Nov 2015 01:07:47 +0000 (01:07 +0000)]
Sometimes unable to scroll fixed div when the body is scrollable
https://bugs.webkit.org/show_bug.cgi?id=151015
<rdar://problem/23445723>

Reviewed by Simon Fraser.

Source/WebCore:

Currently, if we scroll a page containing a fixed scrollable area, the non-fast-scrollable region corresponding to a fixed
area will not move down to reflect its new bounds in absolute coordinates, making it impossible to scroll position: fixed
overflow elements when the body's scroll position changes. To fix this, we inflate the non-fast-scrollable region
corresponding to scrollable position: fixed elements such that their regions encompass the area, relative to the page,
wherein the fixed element may lie when the page is scrolled by any amount within its scroll limits.

We also optimize the non-fast-scrollable regions emitted by elements that handle wheel events. Currently, if a fixed element
also has a wheel event handler, we take the entire document's rect to be non-fast-scrollable. This patch changes this region
to behave the same way as fixed scrollable elements above.

This patch also folds some common logic used to accomplish this into FrameView for use by RenderLayerCompositor and RenderView.

Test: tiled-drawing/scrolling/non-fast-region/fixed-div-in-scrollable-page.html

* page/FrameView.cpp:
(WebCore::FrameView::fixedScrollableAreaBoundsInflatedForScrolling):
(WebCore::FrameView::scrollOffsetRespectingCustomFixedPosition):
* page/FrameView.h:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::scrollableAreaBoundingBox):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollableAreaBoundingBox):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeExtent):
(WebCore::fixedPositionOffset): Deleted.
* rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::pushMappingToContainer):
(WebCore::RenderView::mapAbsoluteToLocalPoint):
(WebCore::RenderView::computeRectForRepaint):
(WebCore::fixedPositionOffset): Deleted.

LayoutTests:

Adds a new test that scrolling a fixed div is possible when the page is scrolled. Also
changes some existing non-fast-scrollable region tests to match the new behavior for
computing non-fast-scrollable regions for fixed scrollable elements (see ChangeLog
entry in WebCore for more details).

* tiled-drawing/scrolling/non-fast-region/fixed-div-in-scrollable-page-expected.txt: Added.
* tiled-drawing/scrolling/non-fast-region/fixed-div-in-scrollable-page.html: Added.
* tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child-expected.txt:
* tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed-expected.txt:
* tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed-expected.txt:

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

4 years agoUnreviewed, rolling out r192181.
ryanhaddad@apple.com [Tue, 10 Nov 2015 00:55:28 +0000 (00:55 +0000)]
Unreviewed, rolling out r192181.

This change causes asserts on mac-wk1 debug testers

Reverted changeset:

"Fixed crash loading Mozilla layout test
editor/libeditor/crashtests/431086-1.xhtml."
https://bugs.webkit.org/show_bug.cgi?id=150252
http://trac.webkit.org/changeset/192181

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

4 years agoCrash when right clicking in input box with -webkit-user-select: none
jiewen_tan@apple.com [Tue, 10 Nov 2015 00:44:17 +0000 (00:44 +0000)]
Crash when right clicking in input box with -webkit-user-select: none
https://bugs.webkit.org/show_bug.cgi?id=145981
<rdar://problem/22441925>

Reviewed by Enrica Casucci.

Source/WebCore:

Test: editing/selection/minimal-user-select-crash.html

* editing/Editor.cpp:
(WebCore::Editor::hasBidiSelection):
Visible position cannot be created because of the style that doesn't allow the selection.

LayoutTests:

* editing/selection/minimal-user-select-crash-expected.txt: Added.
* editing/selection/minimal-user-select-crash.html: Added.

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

4 years agoDFG::PutStackSinkingPhase should not treat the stack variables written by LoadVarargs...
sbarati@apple.com [Tue, 10 Nov 2015 00:39:13 +0000 (00:39 +0000)]
DFG::PutStackSinkingPhase should not treat the stack variables written by LoadVarargs/ForwardVarargs as being live
https://bugs.webkit.org/show_bug.cgi?id=145295

Reviewed by Filip Pizlo.

This patch fixes PutStackSinkingPhase to no longer escape the stack
locations that LoadVarargs and ForwardVarargs write to. We used
to consider sinking PutStacks right before a LoadVarargs/ForwardVarargs
because we considered them uses of such stack locations. They aren't
uses of those stack locations, they unconditionally write to those
stack locations. Sinking PutStacks to these nodes was not needed before,
but seemed mostly innocent. But I ran into a problem with this while implementing
FTL try/catch where we would end up having to generate a value for a sunken PutStack
right before a LoadVarargs. This would cause us to issue a GetStack that loaded garbage that
was then forwarded into a Phi that was used as the source as the PutStack. This caused the
abstract interpreter to confuse itself on type information for the garbage GetStack
that was fed into the Phi, which would cause the abstract interpreter to then claim
that the basic block with the PutStack in it would never be reached. This isn't true, the
block would indeed be reached. The solution here is to be more precise about the
liveness of locals w.r.t LoadVarargs and ForwardVarargs.

* dfg/DFGPreciseLocalClobberize.h:
(JSC::DFG::PreciseLocalClobberizeAdaptor::PreciseLocalClobberizeAdaptor):
(JSC::DFG::PreciseLocalClobberizeAdaptor::write):
* dfg/DFGPutStackSinkingPhase.cpp:
* dfg/DFGSSACalculator.h:

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

4 years agoFix 32-bit build.
andersca@apple.com [Tue, 10 Nov 2015 00:36:14 +0000 (00:36 +0000)]
Fix 32-bit build.

* Shared/API/Cocoa/RemoteObjectRegistry.mm:
(WebKit::RemoteObjectRegistry::callReplyBlock):

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

4 years agoWeb Inspector: Uncaught exception creating TimelineRecord alternate subtitles
commit-queue@webkit.org [Tue, 10 Nov 2015 00:30:29 +0000 (00:30 +0000)]
Web Inspector: Uncaught exception creating TimelineRecord alternate subtitles
https://bugs.webkit.org/show_bug.cgi?id=151046

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-11-09
Reviewed by Brian Burg.

* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
We just need to create an element, it does not need to be
a child of subtitle, as it gets appended to the right
place later on.

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

4 years agoB3->Air lowering should support CCall
fpizlo@apple.com [Tue, 10 Nov 2015 00:26:37 +0000 (00:26 +0000)]
B3->Air lowering should support CCall
https://bugs.webkit.org/show_bug.cgi?id=151043

Reviewed by Geoffrey Garen.

Adds support for lowering CCall to Air, and adds a test that makes calls. I cannot test doubles
until https://bugs.webkit.org/show_bug.cgi?id=151002 lands, but this does test integer
arguments pretty thoroughly including a test for lots of arguments. That test ensures that the
arguments go to registers and the stack in the right order and such.

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::createCompare):
(JSC::B3::Air::LowerToAir::marshallCCallArgument):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Opcode.h:
* b3/air/AirCCallSpecial.cpp:
(JSC::B3::Air::CCallSpecial::forEachArg):
(JSC::B3::Air::CCallSpecial::isValid):
(JSC::B3::Air::CCallSpecial::admitsStack):
(JSC::B3::Air::CCallSpecial::generate):
* b3/air/AirCCallSpecial.h:
* b3/testb3.cpp:
(JSC::B3::testCompare):
(JSC::B3::simpleFunction):
(JSC::B3::testCallSimple):
(JSC::B3::functionWithHellaArguments):
(JSC::B3::testCallFunctionWithHellaArguments):
(JSC::B3::run):
* jit/FPRInfo.h:

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

4 years agoWeb Inspector: $0 stops working after navigating to a different domain
commit-queue@webkit.org [Tue, 10 Nov 2015 00:19:26 +0000 (00:19 +0000)]
Web Inspector: $0 stops working after navigating to a different domain
https://bugs.webkit.org/show_bug.cgi?id=147962

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-11-09
Reviewed by Brian Burg.

Source/JavaScriptCore:

Extract the per-GlobalObject cache of JSValue wrappers for
InjectedScriptHost objects to be reused by WebCore for its
CommandLineAPIHost objects injected into multiple contexts.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
Add new files.

* inspector/PerGlobalObjectWrapperWorld.h:
* inspector/PerGlobalObjectWrapperWorld.cpp:
(Inspector::PerGlobalObjectWrapperWorld::getWrapper):
(Inspector::PerGlobalObjectWrapperWorld::addWrapper):
(Inspector::PerGlobalObjectWrapperWorld::clearAllWrappers):
Hold a bunch of per-global-object wrappers for an object
that will outlive the global object. This inspector does this
for host objects that it exposes into scripts it injects into
each execution context created by the page.

* inspector/InjectedScriptHost.cpp:
(Inspector::InjectedScriptHost::wrapper):
(Inspector::InjectedScriptHost::clearAllWrappers):
(Inspector::InjectedScriptHost::jsWrapper): Deleted.
(Inspector::clearWrapperFromValue): Deleted.
(Inspector::InjectedScriptHost::clearWrapper): Deleted.
Extract and simplify the Per-GlobalObject wrapping into a class.
Simplify object construction as well.

* inspector/InjectedScriptHost.h:
* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::createInjectedScript):
(Inspector::InjectedScriptManager::discardInjectedScripts):
Make discarding virtual so subclasses may also discard injected scripts.

* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::JSInjectedScriptHost):
(Inspector::JSInjectedScriptHost::releaseImpl): Deleted.
(Inspector::JSInjectedScriptHost::~JSInjectedScriptHost): Deleted.
(Inspector::toJS): Deleted.
(Inspector::toJSInjectedScriptHost): Deleted.
* inspector/JSInjectedScriptHost.h:
(Inspector::JSInjectedScriptHost::create):
(Inspector::JSInjectedScriptHost::impl):
Update this code originally copied from older generated bindings to
be more like new generated bindings and remove some now unused code.

Source/WebCore:

Test: http/tests/inspector/console/cross-domain-inspected-node-access.html

The inspector backend injects the CommandLineAPI Source with a
corresponding CommandLineAPIHost into each execution context
created by the page (main frame, sub frames, etc).

When creating the JSValue wrapper for the CommandLineAPIHost using
the generated toJS(...) DOM bindings, we were using the cached
CommandLineAPIHost wrapper values in the single DOMWrapperWorld shared
across all frames. This meant that the first time the wrapper was
needed it was created in context A. But when needed for context B
it was using the wrapper created in context A. Using this wrapper
in context B was producing unexpected cross-origin warnings.

The solution taken here, is to create a new JSValue wrapper for
the CommandLineAPIHost per execution context. This way each time
the CommandLineAPIHost wrapper is used in a frame, it is using
the one created for that frame.

The C++ host object being wrapped has a lifetime equivalent to
the Page. It does not change in this patch. The wrapper values
are cleared on page navigation or when the page is closed, and
will be garbage collected.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* ForwardingHeaders/inspector/PerGlobalObjectWrapperWorld.h: Added.
New forwarding header.

* inspector/CommandLineAPIHost.h:
* inspector/CommandLineAPIHost.cpp:
(WebCore::CommandLineAPIHost::CommandLineAPIHost):
(WebCore::CommandLineAPIHost::wrapper):
Cached JSValue wrappers per GlobalObject.

(WebCore::CommandLineAPIHost::clearAllWrappers):
Clear any wrappers we have, including the $0 value itself
which we weren't explicitly clearing previously.

* inspector/CommandLineAPIModule.cpp:
(WebCore::CommandLineAPIModule::host):
Simplify creating the wrapper.

* inspector/WebInjectedScriptManager.h:
* inspector/WebInjectedScriptManager.cpp:
(WebCore::WebInjectedScriptManager::discardInjectedScripts):
When the main frame window object clears, also clear the
CommandLineAPI wrappers we may have created. Also take this
opportunity to clear any $0 value that may have pointed
to a value in the previous page.

LayoutTests:

* TestExpectations:
* http/tests/inspector/console/access-inspected-object-expected.txt: Removed.
* http/tests/inspector/console/access-inspected-object.html: Removed.
* http/tests/inspector/console/cross-domain-inspected-node-access-expected.txt: Added.
* http/tests/inspector/console/cross-domain-inspected-node-access.html: Added.
Rewrite the old test with the new testing infrastructure.
Test this particular case of cross origin CommandLineAPI usage ($0).

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

4 years agoAdd reply blocks to _WKRemoteObjectInterface similar to NSXPCConnection
andersca@apple.com [Tue, 10 Nov 2015 00:05:30 +0000 (00:05 +0000)]
Add reply blocks to _WKRemoteObjectInterface similar to NSXPCConnection
https://bugs.webkit.org/show_bug.cgi?id=151056
rdar://problem/23222609

Reviewed by Tim Horton.

Source/WebKit2:

* Platform/spi/Cocoa/NSInvocationSPI.h:
Add NSBlockInvocation declaration.

* Shared/API/Cocoa/RemoteObjectInvocation.mm:
(WebKit::RemoteObjectInvocation::encode):
Encode true if we have a reply ID.

* Shared/API/Cocoa/RemoteObjectRegistry.h:
Add new members.

* Shared/API/Cocoa/RemoteObjectRegistry.messages.in:
Add new CallReplyBlock message.

* Shared/API/Cocoa/RemoteObjectRegistry.mm:
(WebKit::RemoteObjectRegistry::sendReplyBlock):
Just send the CallReplyBlock message.

(WebKit::RemoteObjectRegistry::callReplyBlock):
Call through to _WKRemoteObjectRegistry.

* Shared/API/Cocoa/WKRemoteObjectCoder.h:
Pass an optional reply selector.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocationArguments):
Don't hard-code the first argument index.

(encodeInvocation):
Encode block invocations.

(-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:replyToSelector:]):
Initialize _replyToSelector.

(validateClass):
NSBlockInvocation doesn't need to conform to NSSecureCoding.

(decodeInvocationArguments):
Don't hard-code the first argument, take it as a parameter instead.

(decodeInvocation):
Decode NSBlockInvocations (reply block invocations).

(decodeObject):
Check for NSBlockInvocation.

* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
Return null if we can't find the method.

(-[_WKRemoteObjectInterface _methodSignatureForReplyBlockOfSelector:]):
Look up the reply block signature and return it.

(-[_WKRemoteObjectInterface _allowedArgumentClassesForReplyBlockOfSelector:]):
Look up the allowed reply argument classes and return them.

* Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h:
Add new methods.

* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(PendingReply::PendingReply):
Add new object that represents a pending reply.

(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
If the invocation has a reply block, add a pending reply to our map.

(-[_WKRemoteObjectRegistry _invokeMethod:]):
If the method we're about to invoke has a reply block, construct a special reply block that calls us back with an invocation.
Encode this invocation and send it back across the wire.

(-[_WKRemoteObjectRegistry _callReplyWithID:blockInvocation:]):
Find the pending reply, decode the reply block invocation and call it.

* Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h:
Add new methods.

Tools:

Update test.

* TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.mm:
(TEST):
* TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistryPlugIn.mm:
(-[RemoteObjectRegistryPlugIn sayHello:completionHandler:]):

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

4 years agoAdd drawsBackground SPI to WKWebView, and get rid of drawsTransparentBackground from...
timothy_horton@apple.com [Tue, 10 Nov 2015 00:03:28 +0000 (00:03 +0000)]
Add drawsBackground SPI to WKWebView, and get rid of drawsTransparentBackground from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=151054
<rdar://problem/22907994>

Reviewed by Simon Fraser.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Deleted.
(WebKit::WebPageCreationParameters::decode): Deleted.
* Shared/WebPageCreationParameters.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView setDrawsTransparentBackground:]):
(-[WKView drawsTransparentBackground]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::updateLayer):
(WebKit::WebViewImpl::setDrawsTransparentBackground): Deleted.
(WebKit::WebViewImpl::drawsTransparentBackground): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Deleted.
(WebKit::WebPageProxy::setDrawsTransparentBackground): Deleted.
(WebKit::WebPageProxy::creationParameters): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::drawsTransparentBackground): Deleted.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Deleted.
(WebKit::m_shouldDispatchFakeMouseMoveEvents): Deleted.
(WebKit::WebPage::setDrawsTransparentBackground): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::drawsTransparentBackground): Deleted.
* WebProcess/WebPage/WebPage.messages.in:
Get rid of drawsTransparentBackground. It doesn't seem like there's any observable
difference in a layer-backed world. WKView's (set)drawsTransparentBackground
will just forward to drawsBackground (inverted).

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _webProcessIsResponsive]):
Move _webProcessIsResponsive up with the other cross-platform SPI methods, instead
of below all of the platform-specific SPI methods.

(-[WKWebView _drawsBackground]):
(-[WKWebView _setDrawsBackground:]):
Added.

(-[WKWebView _drawsTransparentBackground]):
(-[WKWebView _setDrawsTransparentBackground:]):
Deleted.

* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Replace drawsTransparentBackground with drawsBackground.

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController didChangeSettings]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController didChangeSettings]):
Use drawsBackground instead, and make sure to set the window background color,
otherwise it might end up being gray anyway!

WebKit1 still doesn't work unless you turn off toolbar blurring, but at least
WebKit2 is working now!

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

4 years agoB3 should be able to compile a program with a double constant
fpizlo@apple.com [Tue, 10 Nov 2015 00:01:24 +0000 (00:01 +0000)]
B3 should be able to compile a program with a double constant
https://bugs.webkit.org/show_bug.cgi?id=151002

Reviewed by Benjamin Poulain.

This implements a bunch of annoying stuff that is necessary to support constants that need a
data section, such as double constants on X86_64:

- B3::Procedure can now tell you what to keep alive in addition to the MacroAssemblerCodeRef.
  We call this the B3::OpaqueByproducts. It's the client's responsibility to keep this alive
  after calling B3::generate().

- Added a new helper for compiling B3 code, called B3::Compilation. Constructing a
  Compilation runs the compiler. Then you can pass around a Compilation the way you would
  have passed around a MacroAssemblerCodeRef.

- Added a constant motion phase, called moveConstants(). This does very simple constant
  hoisting/sinking: it makes sure that each constant is only materialized in one place in
  each basic block. It uses a DataSection, which is a kind of OpaqueByproduct, to store
  double constants.

- The way I wanted to do constant motion is to basically track what constants are of interest
  and then recreate them as needed, so the original Values become irrelevant in the process.
  To do that, I needed an abstraction that is almost identical to the DFG PureValue
  abstraction that we use for CSE. So, I created such a thing, and called it ValueKey. It
  can be used to compare and hash pure Values, and to recreate them as needed.

- Fixed the lowering's handling of constants so that we don't perturb the placement of the
  constant materializations.

* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32):
(JSC::MacroAssemblerX86Common::moveZeroToDouble):
(JSC::MacroAssemblerX86Common::branchDoubleNonZero):
* b3/B3Common.h:
(JSC::B3::isIdentical):
(JSC::B3::isRepresentableAsImpl):
* b3/B3Compilation.cpp: Added.
(JSC::B3::Compilation::Compilation):
(JSC::B3::Compilation::~Compilation):
* b3/B3Compilation.h: Added.
(JSC::B3::Compilation::code):
* b3/B3ConstDoubleValue.h:
(JSC::B3::ConstDoubleValue::accepts): Deleted.
* b3/B3DataSection.cpp: Added.
(JSC::B3::DataSection::DataSection):
(JSC::B3::DataSection::~DataSection):
(JSC::B3::DataSection::dump):
* b3/B3DataSection.h: Added.
(JSC::B3::DataSection::data):
(JSC::B3::DataSection::size):
* b3/B3Generate.cpp:
(JSC::B3::generate):
(JSC::B3::generateToAir):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::imm):
(JSC::B3::Air::LowerToAir::immOrTmp):
(JSC::B3::Air::LowerToAir::fillStackmap):
(JSC::B3::Air::LowerToAir::lower):
(JSC::B3::Air::LowerToAir::immForMove): Deleted.
(JSC::B3::Air::LowerToAir::immOrTmpForMove): Deleted.
* b3/B3MoveConstants.cpp: Added.
(JSC::B3::moveConstants):
* b3/B3MoveConstants.h: Added.
* b3/B3OpaqueByproduct.h: Added.
(JSC::B3::OpaqueByproduct::OpaqueByproduct):
(JSC::B3::OpaqueByproduct::~OpaqueByproduct):
* b3/B3OpaqueByproducts.cpp: Added.
(JSC::B3::OpaqueByproducts::OpaqueByproducts):
(JSC::B3::OpaqueByproducts::~OpaqueByproducts):
(JSC::B3::OpaqueByproducts::add):
(JSC::B3::OpaqueByproducts::dump):
* b3/B3OpaqueByproducts.h: Added.
(JSC::B3::OpaqueByproducts::count):
* b3/B3Opcode.h:
(JSC::B3::constPtrOpcode):
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::Procedure):
(JSC::B3::Procedure::dump):
(JSC::B3::Procedure::blocksInPreOrder):
(JSC::B3::Procedure::deleteValue):
(JSC::B3::Procedure::addDataSection):
(JSC::B3::Procedure::addValueIndex):
* b3/B3Procedure.h:
(JSC::B3::Procedure::lastPhaseName):
(JSC::B3::Procedure::byproducts):
(JSC::B3::Procedure::takeByproducts):
* b3/B3Type.h:
* b3/B3Value.cpp:
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::performSubstitution):
* b3/B3Value.h:
* b3/B3ValueKey.cpp: Added.
(JSC::B3::ValueKey::dump):
(JSC::B3::ValueKey::materialize):
* b3/B3ValueKey.h: Added.
(JSC::B3::ValueKey::ValueKey):
(JSC::B3::ValueKey::opcode):
(JSC::B3::ValueKey::type):
(JSC::B3::ValueKey::childIndex):
(JSC::B3::ValueKey::value):
(JSC::B3::ValueKey::doubleValue):
(JSC::B3::ValueKey::operator==):
(JSC::B3::ValueKey::operator!=):
(JSC::B3::ValueKey::hash):
(JSC::B3::ValueKey::operator bool):
(JSC::B3::ValueKey::canMaterialize):
(JSC::B3::ValueKey::isHashTableDeletedValue):
(JSC::B3::ValueKeyHash::hash):
(JSC::B3::ValueKeyHash::equal):
* b3/B3ValueKeyInlines.h: Added.
(JSC::B3::ValueKey::ValueKey):
(JSC::B3::ValueKey::child):
* b3/air/AirCode.cpp:
(JSC::B3::Air::Code::Code):
* b3/air/AirCode.h:
(JSC::B3::Air::Code::proc):
(JSC::B3::Air::Code::lastPhaseName):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::compile):
(JSC::B3::invoke):
(JSC::B3::compileAndRun):
(JSC::B3::test42):
(JSC::B3::testBranch):
(JSC::B3::testBranchPtr):
(JSC::B3::testDiamond):
(JSC::B3::testBranchNotEqual):
(JSC::B3::testBranchNotEqualCommute):
(JSC::B3::testBranchNotEqualNotEqual):
(JSC::B3::testBranchEqual):
(JSC::B3::testBranchEqualEqual):
(JSC::B3::testBranchEqualCommute):
(JSC::B3::testBranchEqualEqual1):
(JSC::B3::testBranchFold):
(JSC::B3::testSimpleCheck):
(JSC::B3::testCompare):
(JSC::B3::testReturnDouble):
(JSC::B3::run):

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

4 years agoMarking crypto/subtle/rsa-export-generated-keys.html as slow on mac
ryanhaddad@apple.com [Mon, 9 Nov 2015 22:47:12 +0000 (22:47 +0000)]
Marking crypto/subtle/rsa-export-generated-keys.html as slow on mac
https://bugs.webkit.org/show_bug.cgi?id=144938

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 years agoFixed crash loading Mozilla layout test editor/libeditor/crashtests/431086-1.xhtml.
ddkilzer@apple.com [Mon, 9 Nov 2015 22:43:18 +0000 (22:43 +0000)]
Fixed crash loading Mozilla layout test editor/libeditor/crashtests/431086-1.xhtml.
https://bugs.webkit.org/show_bug.cgi?id=150252
<rdar://problem/23149470>

Patch by Pranjal Jumde <pjumde@apple.com> on 2015-11-09
Reviewed by Brent Fulgham.

* Source/WebCore/editing/ios/EditorIOS.mm
* Source/WebCore/editing/mac/EditorMac.mm
  In Editor::fontForSelection moved the node removal code, so that the
  node is only removed if style is not NULL.
* LayoutTests/editing/execCommand/150252.xhtml
* LayoutTests/editing/execCommand/150252_minimal.xhtml
* LayoutTests/editing/execCommand/150252-expected.txt
* LayoutTests/editing/execCommand/150252_minimal-expected.txt

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

4 years agoAllow , in the builder name.
rniwa@webkit.org [Mon, 9 Nov 2015 22:34:16 +0000 (22:34 +0000)]
Allow , in the builder name.

Rubber-stamped by Alexey Proskuryakov.

* public/api/report.php:

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

4 years agoMarking http/tests/security/cross-frame-access-put.html as flaky on mac-wk2
ryanhaddad@apple.com [Mon, 9 Nov 2015 22:13:31 +0000 (22:13 +0000)]
Marking http/tests/security/cross-frame-access-put.html as flaky on mac-wk2
https://bugs.webkit.org/show_bug.cgi?id=151053

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years agoWeb Inspector: REGRESSION: 2nd level inspector should not be able to dock to first
commit-queue@webkit.org [Mon, 9 Nov 2015 22:07:19 +0000 (22:07 +0000)]
Web Inspector: REGRESSION: 2nd level inspector should not be able to dock to first
https://bugs.webkit.org/show_bug.cgi?id=151050

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-11-09
Reviewed by Brian Burg.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCanAttach):
Check now that the inspected view can be a WKWebView.

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

4 years agoIntrospect reply block types as well
andersca@apple.com [Mon, 9 Nov 2015 22:00:31 +0000 (22:00 +0000)]
Introspect reply block types as well
https://bugs.webkit.org/show_bug.cgi?id=151048

Reviewed by Tim Horton.

Source/WebKit2:

* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(initializeMethod):
(initializeMethods):
(-[_WKRemoteObjectInterface debugDescription]):

Source/WTF:

Fix operator-> implementation.

* wtf/Optional.h:
(WTF::Optional::operator->):

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

4 years ago[WinCairo][Video][MediaFoundation] Video should be rendered in provided graphics...
peavo@outlook.com [Mon, 9 Nov 2015 21:50:46 +0000 (21:50 +0000)]
[WinCairo][Video][MediaFoundation] Video should be rendered in provided graphics context.
https://bugs.webkit.org/show_bug.cgi?id=150941

Reviewed by Brent Fulgham.

On WinCairo, we currently render video in a child window of the main browser window.
This makes it difficult to render things on top of the video, like video controls and
context menus. We should render the video in the graphics context provided by the paint
method. This is done by implementing a custom EVR (Enhanced Video Renderer) presenter
for Media Foundation.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(MFCreateMediaType):
(WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
(WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine):
(WebCore::MediaPlayerPrivateMediaFoundation::isAvailable):
(WebCore::MediaPlayerPrivateMediaFoundation::setSize):
(WebCore::MediaPlayerPrivateMediaFoundation::paint):
(WebCore::MediaPlayerPrivateMediaFoundation::createSession):
(WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
(WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow):
(WebCore::MediaPlayerPrivateMediaFoundation::destroyVideoWindow):
(WebCore::MediaPlayerPrivateMediaFoundation::invalidateFrameView):
(WebCore::MediaPlayerPrivateMediaFoundation::addListener):
(WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
(WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
(WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::CustomVideoPresenter):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::~CustomVideoPresenter):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::QueryInterface):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::AddRef):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::Release):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockStart):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockStop):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockPause):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockRestart):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::OnClockSetRate):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::ProcessMessage):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetCurrentMediaType):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetDeviceID):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::InitServicePointers):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::ReleaseServicePointers):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetService):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::ActivateObject):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::DetachObject):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::ShutdownObject):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetVideoWindow):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetVideoWindow):
(WebCore::setMixerSourceRect):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetVideoPosition):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetVideoPosition):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::RepaintVideo):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::Invoke):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::onMediaPlayerDeleted):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::paintCurrentFrame):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::isActive):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::configureMixer):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::flush):
(WebCore::areMediaTypesEqual):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::setMediaType):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::checkShutdown):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::renegotiateMediaType):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::processInputNotify):
(WebCore::MFOffsetToFloat):
(WebCore::MakeOffset):
(WebCore::MakeArea):
(WebCore::validateVideoArea):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::beginStreaming):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::endStreaming):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::checkEndOfStream):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::isMediaTypeSupported):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::createOptimalVideoType):
(WebCore::correctAspectRatio):
(WebCore::GetVideoDisplayArea):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::calculateOutputRectangle):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::processOutputLoop):
(WebCore::setDesiredSampleTime):
(WebCore::clearDesiredSampleTime):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::processOutput):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::deliverSample):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::trackSample):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::releaseResources):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::onSampleFree):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::notifyEvent):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::getSample):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::returnSample):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::areSamplesPending):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::initialize):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::clear):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::setFrameRate):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::startScheduler):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::stopScheduler):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::flush):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::scheduleSample):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::processSamplesInQueue):
(WebCore::MFTimeToMilliseconds):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::processSample):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::schedulerThreadProc):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::schedulerThreadProcPrivate):
(WebCore::findAdapter):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::Direct3DPresenter):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::~Direct3DPresenter):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::getService):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::checkFormat):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::setVideoWindow):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::setDestinationRect):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createVideoSamples):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::releaseResources):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::checkDeviceState):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::initializeD3D):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createD3DDevice):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createD3DSample):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSwapChain):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::getSwapChainPresentParameters):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::updateDestRect):
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
(WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::VideoSamplePool):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoSamplePool::~VideoSamplePool):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::VideoScheduler):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::~VideoScheduler):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::setPresenter):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::setClockRate):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::lastSampleTime):
(WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::frameDuration):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::getVideoWindow):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::getDestinationRect):
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::refreshRate):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetItem):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetItemType):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::CompareItem):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::Compare):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetUINT32):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetUINT64):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetDouble):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetGUID):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetStringLength):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetString):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetAllocatedString):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetBlobSize):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetBlob):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetAllocatedBlob):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetUnknown):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetItem):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::DeleteItem):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::DeleteAllItems):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetUINT32):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetUINT64):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetDouble):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetGUID):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetString):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetBlob):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetUnknown):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::LockStore):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::UnlockStore):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetCount):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetItemByIndex):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::CopyAllItems):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetNativeVideoSize):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetIdealVideoSize):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetAspectRatioMode):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetAspectRatioMode):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetCurrentImage):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetBorderColor):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetBorderColor):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetRenderingPrefs):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetRenderingPrefs):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::SetFullscreen):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetFullscreen):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::GetParameters):
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::isScrubbing):

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

4 years agoXHR timeouts should not fire if there is an immediate network error.
commit-queue@webkit.org [Mon, 9 Nov 2015 21:25:48 +0000 (21:25 +0000)]
XHR timeouts should not fire if there is an immediate network error.
https://bugs.webkit.org/show_bug.cgi?id=150577

Patch by Alex Christensen <achristensen@webkit.org> on 2015-11-09
Reviewed by Darin Adler.

Source/WebCore:

This fixes flakiness of http/tests/contentextensions/async-xhr-onerror.html since r191077.

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):
(WebCore::XMLHttpRequest::internalAbort):
(WebCore::XMLHttpRequest::didFinishLoading):
If the timeout timer has been started and we are going to immediately report a network error, then stop the timeout timer.
The timeout timer sometimes fired before the network error timer if it was a very short timeout (such as 1ms).
Also checks to isActive before calling stop on a timer are not necessary.

LayoutTests:

* platform/mac-wk2/TestExpectations:
http/tests/contentextensions/async-xhr-onerror.html shouldn't be flaky any more.

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

4 years ago[MediaStream] Add mock audio and video sources
eric.carlson@apple.com [Mon, 9 Nov 2015 21:20:08 +0000 (21:20 +0000)]
[MediaStream] Add mock audio and video sources
https://bugs.webkit.org/show_bug.cgi?id=150997
<rdar://problem/23453358>

Reviewed by Jer Noble.

Create basic mock audio and video realtime media source classes so we can test MediaStream
API without requiring test machines to have audio/video input hardware. No new tests added
yet, thoe will follow.

No new tests, these changes will allow us to write MediaStream tests.

* CMakeLists.txt: Add MockRealtimeAudioSource.cpp, MockRealtimeMediaSource.cpp, and
  MockRealtimeVideoSource.cpp

* PlatformMac.cmake: Add MockRealtimeVideoSourceMac.mm

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

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers): Don't set autoresizingMask,
  it isn't necessary.

* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::refreshCaptureDeviceList): AVCaptureDevice -> getAVCaptureDeviceClass()
(WebCore::AVCaptureDeviceManager::bestDeviceForFacingMode): Ditto.
(WebCore::AVCaptureDeviceManager::sourceWithUID): Ditto.

Mac class implements RealtimeVideoSource::platformLayer, returns a CALayer which uses the
GraphicsContext as contents.
* platform/mediastream/mac/MockRealtimeVideoSourceMac.h: Added.
* platform/mediastream/mac/MockRealtimeVideoSourceMac.mm: Added.
(WebCore::MockRealtimeVideoSource::create):
(WebCore::MockRealtimeVideoSourceMac::MockRealtimeVideoSourceMac):
(WebCore::MockRealtimeVideoSourceMac::platformLayer):
(WebCore::MockRealtimeVideoSourceMac::updatePlatformLayer):

Mock audio source. Doesn't provide data yet, only provides states and capabilities.
* platform/mock/MockRealtimeAudioSource.cpp: Added.
(WebCore::MockRealtimeAudioSource::create):
(WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource):
(WebCore::MockRealtimeAudioSource::updateStates):
(WebCore::MockRealtimeAudioSource::initializeCapabilities):
* platform/mock/MockRealtimeAudioSource.h: Added.
(WebCore::MockRealtimeAudioSource::~MockRealtimeAudioSource):

Mock source base class, sets persistent ID and updates states and capabilities.
* platform/mock/MockRealtimeMediaSource.cpp: Added.
(WebCore::MockRealtimeMediaSource::mockAudioPersistentID):
(WebCore::MockRealtimeMediaSource::mockVideoPersistentID):
(WebCore::MockRealtimeMediaSource::MockRealtimeMediaSource):
(WebCore::MockRealtimeMediaSource::capabilities):
(WebCore::MockRealtimeMediaSource::states):
* platform/mock/MockRealtimeMediaSource.h: Added.
(WebCore::MockRealtimeMediaSource::mockAudioSourcePersistentID):
(WebCore::MockRealtimeMediaSource::mockAudioSourceName):
(WebCore::MockRealtimeMediaSource::mockVideoSourcePersistentID):
(WebCore::MockRealtimeMediaSource::mockVideoSourceName):
(WebCore::MockRealtimeMediaSource::trackSourceWithUID):
(WebCore::MockRealtimeMediaSource::~MockRealtimeMediaSource):
(WebCore::MockRealtimeMediaSource::currentStates):
(WebCore::MockRealtimeMediaSource::constraints):

Use new mock source classes. Create a new source instance for each request instead of reusing the
same sources each time.
* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::mockSourceMap):
(WebCore::MockRealtimeMediaSourceCenter::registerMockRealtimeMediaSourceCenter):
(WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
(WebCore::MockRealtimeMediaSourceCenter::createMediaStream):
(WebCore::MockRealtimeMediaSourceCenter::getMediaStreamTrackSources):
(WebCore::MockSource::MockSource): Deleted.
(WebCore::MockSource::~MockSource): Deleted.
(WebCore::MockSource::capabilities): Deleted.
(WebCore::MockSource::states): Deleted.
(WebCore::mockAudioSourceID): Deleted.
(WebCore::mockVideoSourceID): Deleted.
(WebCore::initializeMockSources): Deleted.

Mock video source. Generate bip-bop inspired frames with burned in state information.
* platform/mock/MockRealtimeVideoSource.cpp: Added.
(WebCore::MockRealtimeVideoSource::create):
(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
(WebCore::MockRealtimeVideoSource::startProducingData):
(WebCore::MockRealtimeVideoSource::stopProducingData):
(WebCore::MockRealtimeVideoSource::elapsedTime):
(WebCore::MockRealtimeVideoSource::updateStates):
(WebCore::MockRealtimeVideoSource::initializeCapabilities):
(WebCore::MockRealtimeVideoSource::setFacingMode):
(WebCore::MockRealtimeVideoSource::setFrameRate):
(WebCore::MockRealtimeVideoSource::setSize):
(WebCore::MockRealtimeVideoSource::drawAnimation):
(WebCore::MockRealtimeVideoSource::drawBoxes):
(WebCore::MockRealtimeVideoSource::drawText):
(WebCore::MockRealtimeVideoSource::generateFrame):
(WebCore::MockRealtimeVideoSource::imageBuffer):
(WebCore::MockRealtimeVideoSource::paintCurrentFrameInContext):
(WebCore::MockRealtimeVideoSource::currentFrameImage):
* platform/mock/MockRealtimeVideoSource.h: Added.
(WebCore::MockRealtimeVideoSource::~MockRealtimeVideoSource):
(WebCore::MockRealtimeVideoSource::size):
(WebCore::MockRealtimeVideoSource::updatePlatformLayer):

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

4 years agoAX: Input type: time is not accessible on iOS
n_wang@apple.com [Mon, 9 Nov 2015 21:16:14 +0000 (21:16 +0000)]
AX: Input type: time is not accessible on iOS
https://bugs.webkit.org/show_bug.cgi?id=150984

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed input type: time as popup button on iOS.

Test: accessibility/ios-simulator/input-type-time.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

LayoutTests:

* accessibility/ios-simulator/input-type-time-expected.txt: Added.
* accessibility/ios-simulator/input-type-time.html: Added.

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

4 years agoWeb Inspector: [Regression] [Mavericks] Top border of selected tab matches the backgr...
nvasilyev@apple.com [Mon, 9 Nov 2015 20:29:54 +0000 (20:29 +0000)]
Web Inspector: [Regression] [Mavericks] Top border of selected tab matches the background when Web Inspector is undocked
https://bugs.webkit.org/show_bug.cgi?id=150981

Reviewed by Timothy Hatcher.

* UserInterface/Views/TabBar.css:
(body.mavericks .tab-bar > .item:not(.disabled).selected): Added.

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

4 years agoImplement -[_WKRemoteObjectInterface debugDescription] and have it look like the...
andersca@apple.com [Mon, 9 Nov 2015 20:16:22 +0000 (20:16 +0000)]
Implement -[_WKRemoteObjectInterface debugDescription] and have it look like the NSXPCInterface equivalent
https://bugs.webkit.org/show_bug.cgi?id=151044

Reviewed by Tim Horton.

* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(-[_WKRemoteObjectInterface debugDescription]):
(-[_WKRemoteObjectInterface description]): Deleted.

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

4 years agoNull dereference loading Blink layout test editing/inserting/insert-html-crash-01...
jiewen_tan@apple.com [Mon, 9 Nov 2015 20:11:30 +0000 (20:11 +0000)]
Null dereference loading Blink layout test editing/inserting/insert-html-crash-01.html
https://bugs.webkit.org/show_bug.cgi?id=149298
<rdar://problem/22746918>

Reviewed by Ryosuke Niwa.

Source/WebCore:

The test crashes in the method WebCore::CompositeEditCommand::moveParagraphs() because
the other method WebCore::CompositeEditCommand::cleanupAfterDeletion() accidentally
deletes the destination node. In WebCore::CompositeEditCommand::cleanupAfterDeletion(),
it fails to determine that caretAfterDelete equals to destination as Position::operator==,
which is called in VisiblePosition::operator==, only checks the equality of tuple
<Anchor Node, Anchor Type, Offset>. It is insufficient as a single position can be
represented by multiple tuples. Therefore, this change adds Position::equals() to fortify
the equal checking of two positions by considering combinations of different tuple
representations.

Furthermore, it adds VisiblePosition::equals() which considers affinity and call
Position::equals() while comparing two visible positions.

Test: editing/inserting/insert-html-crash-01.html

* dom/Position.cpp:
(WebCore::Position::equals):
* dom/Position.h:
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::cleanupAfterDeletion):
Replace operator== with VisiblePosition::equals() to tackle the test case.
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::equals):
* editing/VisiblePosition.h:

LayoutTests:

This test case is from Blink r153982:
https://codereview.chromium.org/16053005

* editing/inserting/insert-html-crash-01-expected.txt: Added.
* editing/inserting/insert-html-crash-01.html: Added.

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

4 years agoSome style changes cause tatechuyoko to be drawn off center
mmaxfield@apple.com [Mon, 9 Nov 2015 19:40:39 +0000 (19:40 +0000)]
Some style changes cause tatechuyoko to be drawn off center
https://bugs.webkit.org/show_bug.cgi?id=150986
<rdar://problem/20748013>

Reviewed by Darin Adler.

Source/WebCore:

Layouts should be idempotent. In particular, during layout, an element should not
rely on a previous call to styleDidChange() with a sufficiently high StyleDifference.
RenderCombineText was assuming that, if a layout occurs, a previous call to
styleDidChange() would have reset the renderedText. However, an ancestor element might
cause the RenderCombineText to re-combine when it is already combined. Therefore, the
recombination should fully uncombine before recombining.

Test: fast/text/text-combine-style-change-extra-layout.html

* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText): Fully uncombine before recombining.

LayoutTests:

* fast/text/text-combine-style-change-extra-layout-expected.html: Added.
* fast/text/text-combine-style-change-extra-layout.html: Added.

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

4 years agoNeed a function that will provide Nth argument register
msaboff@apple.com [Mon, 9 Nov 2015 19:39:27 +0000 (19:39 +0000)]
Need a function that will provide Nth argument register
https://bugs.webkit.org/show_bug.cgi?id=151041

Reviewed by Filip Pizlo.

For 64 bit platforms, return the Nth architected argument register, otherwise InvalidGPRReg.

* jit/GPRInfo.h:
(JSC::argumentRegisterFor): Added to return the Nth architected argument register if defined
for a platform or InvalidGPRReg if not.

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

4 years agoFresh checkout fails to build on windows, DumpRenderTree can't find cairo_win.h
commit-queue@webkit.org [Mon, 9 Nov 2015 19:17:55 +0000 (19:17 +0000)]
Fresh checkout fails to build on windows, DumpRenderTree can't find cairo_win.h
https://bugs.webkit.org/show_bug.cgi?id=151013

Use the variable defined in the CMake scripts to determine the cairo include location, rather
than relying on a environment variable to be set correctly. Otherwise the DumpRenderTreeLib.vcxproj will
contain "\include\cairo" rather than the fully qualified path to the cairo include location.

Patch by Isaac Devine <isaac@devinesystems.co.nz> on 2015-11-09
Reviewed by Darin Adler.

* DumpRenderTree/PlatformWin.cmake:

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

4 years ago[Win] Recognize context flush as an event that requires an update
bfulgham@apple.com [Mon, 9 Nov 2015 18:54:03 +0000 (18:54 +0000)]
[Win] Recognize context flush as an event that requires an update
https://bugs.webkit.org/show_bug.cgi?id=151001
<rdar://problem/22956040>

Reviewed by Simon Fraser.

* platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
(WebCore::WKCACFViewLayerTreeHost::flushContext): Mark view as needing an update
when flushing so internal drawing code will do the paint.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer): Skip WK2 assert that does
not apply to Windows drawing path.

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

4 years agoWeb Inspector: Convert DatabaseContentView to use View base class
mattbaker@apple.com [Mon, 9 Nov 2015 18:43:26 +0000 (18:43 +0000)]
Web Inspector: Convert DatabaseContentView to use View base class
https://bugs.webkit.org/show_bug.cgi?id=150959

Reviewed by Timothy Hatcher.

Update DatabaseContentView to inherit from View. This required that query results be
promoted to a first-class view object, and that ConsolePrompt's DOM element not be wrapped
inside a container element.

Two new query result view classes (and their base class) wrap up DOM element creation
which was being performed by DatabaseContentView.

* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Main.html:
New files.

* UserInterface/Views/ConsolePrompt.js:
(WebInspector.ConsolePrompt):
Removed unused parameter.

* UserInterface/Views/DatabaseContentView.css:
(.storage-view):
(.storage-view > .console-prompt):
(.storage-view > .console-prompt::before):
(:matches(.database-user-query, .database-query-result)::before):
(.database-query-result.no-results):
(.database-query-prompt): Deleted.
(:matches(.database-user-query, .database-query-prompt, .database-query-result)::before): Deleted.
(.database-query-prompt::before): Deleted.
Modified styles to create prompt without needing a wrapper element.

* UserInterface/Views/DatabaseContentView.js:
(WebInspector.DatabaseContentView):
(WebInspector.DatabaseContentView.prototype.shown):
(WebInspector.DatabaseContentView.prototype.consolePromptCompletionsNeeded.accumulateMatches):
(WebInspector.DatabaseContentView.prototype.consolePromptCompletionsNeeded.tableNamesCallback):
(WebInspector.DatabaseContentView.prototype.consolePromptCompletionsNeeded):
(WebInspector.DatabaseContentView.prototype._messagesClicked):
(WebInspector.DatabaseContentView.prototype._queryFinished):
(WebInspector.DatabaseContentView.prototype._queryError):
(WebInspector.DatabaseContentView.prototype.updateLayout): Deleted.
No longer needed.
(WebInspector.DatabaseContentView.prototype._appendViewQueryResult): Deleted.
(WebInspector.DatabaseContentView.prototype._appendErrorQueryResult): Deleted.
(WebInspector.DatabaseContentView.prototype._appendQueryResult): Deleted.
Removed methods subsumed under DatabaseUserQueryView.

* UserInterface/Views/DatabaseUserQueryErrorView.js: Added.
(WebInspector.DatabaseUserQueryErrorView):
Displays supplied error message.

* UserInterface/Views/DatabaseUserQuerySuccessView.js: Added.
(WebInspector.DatabaseUserQuerySuccessView):
Creates data grid if results exist, otherwise displays "no results" message.
(WebInspector.DatabaseUserQuerySuccessView.prototype.get dataGrid):
External access to view's data grid for autosizing columns, etc.
(WebInspector.DatabaseUserQuerySuccessView.prototype.layout):
Update grid layout manually, since the grid's parent in the DOM isn't the view's root element.

* UserInterface/Views/DatabaseUserQueryViewBase.js: Added.
Base class for success and error message views.
(WebInspector.DatabaseUserQueryViewBase):
Creates DOM common to subclasses.
(WebInspector.DatabaseUserQueryViewBase.prototype.get resultElement):
Protected getter exposing the content root for both subclasses.

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

4 years ago[FTL] Fix the build with LLVM 3.7
ossy@webkit.org [Mon, 9 Nov 2015 18:36:45 +0000 (18:36 +0000)]
[FTL] Fix the build with LLVM 3.7
https://bugs.webkit.org/show_bug.cgi?id=150595

Reviewed by Darin Adler.

* llvm/LLVMAPIFunctions.h: Removed the unused BuildLandingPad function.

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

4 years agoModern IDB: Refactor memory objectstore/transaction interation.
beidson@apple.com [Mon, 9 Nov 2015 18:36:45 +0000 (18:36 +0000)]
Modern IDB: Refactor memory objectstore/transaction interation.
https://bugs.webkit.org/show_bug.cgi?id=151014

Reviewed by Darin Adler.

No new tests (Refactor, no change in behavior).

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::recordValueChanged):
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
* Modules/indexeddb/server/MemoryBackingStoreTransaction.h:

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::putRecord): Deleted. Renamed to addRecord.
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::deleteRecord):
(WebCore::IDBServer::MemoryObjectStore::addRecord):
(WebCore::IDBServer::MemoryObjectStore::putRecord): Deleted. Renamed to addRecord.
(WebCore::IDBServer::MemoryObjectStore::setKeyValue): Deleted. Folded into addRecord.
* Modules/indexeddb/server/MemoryObjectStore.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):

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

4 years agoRework the way allowed argument classes are stored
andersca@apple.com [Mon, 9 Nov 2015 18:35:19 +0000 (18:35 +0000)]
Rework the way allowed argument classes are stored
https://bugs.webkit.org/show_bug.cgi?id=150992

Reviewed by Darin Adler.

Add a separate MethodInfo class so we have someplace to store the reply block arguments.
Use HashSet<Class> instead of NSSet. No functionality change intended.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectDecoder decodeValueOfObjCType:at:]):
(decodeObjectFromObjectStream):
(checkIfClassIsAllowed):
(decodeInvocationArguments):
(decodeObject):
(-[WKRemoteObjectDecoder decodeObjectOfClasses:forKey:]):
(-[WKRemoteObjectDecoder allowedClasses]):
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(isContainerClass):
(propertyListClasses):
(initializeMethod):
(initializeMethods):
(-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
(classesForSelectorArgument):
(-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
(-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
(-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
(allowedArgumentClassesForMethod): Deleted.
(initializeAllowedArgumentClasses): Deleted.
* Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h:

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

4 years agoREGRESSION (r190883): Error calculating the tile size for an SVG with no intrinsic...
commit-queue@webkit.org [Mon, 9 Nov 2015 18:10:29 +0000 (18:10 +0000)]
REGRESSION (r190883): Error calculating the tile size for an SVG with no intrinsic size but with large floating intrinsic ratio
https://bugs.webkit.org/show_bug.cgi?id=150904

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

This patch addresses two issues. The first one is a regression from r190883
which was rolling out r184895. There was a missing if-statement in
RenderBoxModelObject::calculateImageIntrinsicDimension(). We should return
it back. But this if-statement is an optimization; if we hit it we should
return the image resolvedSize. But we should also return the same result
if we call resolveAgainstIntrinsicWidthOrHeightAndRatio().

We had a bug in resolving the intrinsic size of an image using a large
intrinsic ratio. We need to do the calculation in LayoutUnits always.
Using float calculations and then casting the output to an integer results
in significant truncation if the intrinsic ratio is large.

Test: fast/backgrounds/background-image-large-float-intrinsic-ratio.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::resolveWidthForRatio):
(WebCore::resolveHeightForRatio):
(WebCore::resolveAgainstIntrinsicWidthOrHeightAndRatio):
(WebCore::resolveAgainstIntrinsicRatio):
Resolve the image size using its intrinsic ratio in LayoutUnits.

(WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
Put back an if-statement which was missing from rolling out r184895

LayoutTests:

Make sure the image resolvedSize is calculated correctly when the intrinsic
ratio is a large non integer value.

* fast/backgrounds/background-image-large-float-intrinsic-ratio-expected.html: Added.
* fast/backgrounds/background-image-large-float-intrinsic-ratio.html: Added.

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

4 years ago[Streams API] Activate assertions
youenn.fablet@crf.canon.fr [Mon, 9 Nov 2015 18:06:51 +0000 (18:06 +0000)]
[Streams API] Activate assertions
https://bugs.webkit.org/show_bug.cgi?id=151021

Reviewed by Darin Adler.

Activating assertions in streams API.
Fixing a bug in ReadableStream implementation: when pull promise is rejected,
the readable stream may already be errored by some other means.

Covered by existing test sets in Debug builds.

* Modules/streams/ReadableStreamInternals.js:
(teeReadableStream):
(teeReadableStreamPullFunction):
(errorReadableStream):
(requestReadableStreamPull):
(finishClosingReadableStream):
(closeReadableStream):
(enqueueInReadableStream):
(readFromReadableStreamReader):
* Modules/streams/ReadableStreamReader.js:
(cancel):
* Modules/streams/StreamInternals.js:
(peekQueueValue):
* Modules/streams/WritableStream.js:
(write):
(state):
* Modules/streams/WritableStreamInternals.js:
(syncWritableStreamStateWithQueue):
(closeWritableStream): Deleted.

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

4 years agoMarking jquery/manipulation.html as a flaky timeout on Win debug
ryanhaddad@apple.com [Mon, 9 Nov 2015 16:34:05 +0000 (16:34 +0000)]
Marking jquery/manipulation.html as a flaky timeout on Win debug
https://bugs.webkit.org/show_bug.cgi?id=151027

Unreviewed test gardening.

* TestExpectations:
* platform/win/TestExpectations:

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

4 years agoUnreviewed. Rebaselined several tests with 1px differences.
svillar@igalia.com [Mon, 9 Nov 2015 16:30:15 +0000 (16:30 +0000)]
Unreviewed. Rebaselined several tests with 1px differences.

* platform/gtk/editing/pasteboard/innerText-inline-table-expected.txt:
* platform/gtk/fast/block/positioning/table-cell-static-position-expected.txt:
* platform/gtk/fast/borders/border-radius-different-width-001-expected.txt: Added.
* platform/gtk/fast/css/box-shadow-and-border-radius-expected.txt: Added.
* platform/gtk/fast/css/text-overflow-ellipsis-text-align-center-expected.txt:
* platform/gtk/fast/css/text-overflow-ellipsis-text-align-right-expected.txt:
* platform/gtk/fast/css/vertical-text-overflow-ellipsis-text-align-center-expected.txt:
* platform/gtk/fast/css/vertical-text-overflow-ellipsis-text-align-right-expected.txt:
* platform/gtk/http/tests/misc/generated-content-inside-table-expected.txt:
* platform/gtk/imported/blink/http/tests/security/contentSecurityPolicy/object-src-applet-archive-codebase-expected.txt: Added.
* platform/gtk/imported/blink/http/tests/security/contentSecurityPolicy/object-src-applet-archive-expected.txt: Added.
* platform/gtk/imported/blink/http/tests/security/contentSecurityPolicy/object-src-applet-code-codebase-expected.txt: Added.
* platform/gtk/imported/blink/http/tests/security/contentSecurityPolicy/object-src-applet-code-expected.txt: Added.
* platform/gtk/imported/blink/media/track/media-element-move-to-new-document-assert-expected.txt: Added.

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

4 years ago[Streams API] Shield implementation from mangling then and catch promise methods
calvaris@igalia.com [Mon, 9 Nov 2015 16:12:37 +0000 (16:12 +0000)]
[Streams API] Shield implementation from mangling then and catch promise methods
https://bugs.webkit.org/show_bug.cgi?id=150934

Reviewed by Youenn Fablet.

Source/JavaScriptCore:

Since the prototype is not deletable and readonly we only have to care about ensuring that it has the right
@then and @catch internal methods.

* runtime/JSPromisePrototype.h:
* runtime/JSPromisePrototype.cpp:
(JSC::JSPromisePrototype::addOwnInternalSlots): Added to create the proper @then and @catch internal slots.
(JSC::JSPromisePrototype::create): Call addOwnInternalSlots.

Source/WebCore:

This is a first step to get streams code shielded from user replacing the then and catch methods in our
promises. We use newly introduced @then and @catch prototype internal slots and that should solve a lot of use
cases.

Test: streams/streams-promises.html.

* Modules/streams/ReadableStream.js:
(initializeReadableStream):
* Modules/streams/ReadableStreamInternals.js:
(teeReadableStream):
(teeReadableStreamPullFunction):
(cancelReadableStream):
* Modules/streams/WritableStream.js:
(initializeWritableStream):
(abort):
* Modules/streams/WritableStreamInternals.js:
(callOrScheduleWritableStreamAdvanceQueue):

LayoutTests:

* streams/streams-promises.html: Added tests from about replacing
the prototype, then and catch methods. Renamed all tests as well.
* streams/streams-promises-expected.txt: Added expectations.

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

4 years ago[css-grid] Refactor cachedGridCoordinate() to cachedGridSpan()
rego@igalia.com [Mon, 9 Nov 2015 14:46:49 +0000 (14:46 +0000)]
[css-grid] Refactor cachedGridCoordinate() to cachedGridSpan()
https://bugs.webkit.org/show_bug.cgi?id=151017

Reviewed by Sergio Villar Senin.

We were using cachedGridCoordinate() in lots of places and checking the
direction just in the next line. Creating a generic function to do this.

No new tests, no behavior change.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::GridItemWithSpan::GridItemWithSpan):
(WebCore::GridItemWithSpan::span):
(WebCore::GridItemWithSpan::operator<):
(WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
(WebCore::RenderGrid::cachedGridSpan):
(WebCore::RenderGrid::gridAreaBreadthForChild):
(WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::GridItemWithSpan::gridItem): Deleted.
(WebCore::RenderGrid::populateGridPositions): Deleted.
* rendering/RenderGrid.h:

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

4 years agoJS Built-ins functions should be able to assert
youenn.fablet@crf.canon.fr [Mon, 9 Nov 2015 14:15:21 +0000 (14:15 +0000)]
JS Built-ins functions should be able to assert
https://bugs.webkit.org/show_bug.cgi?id=150333

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Introduced @assert to enable asserting in JS built-ins.
Adding a new bytecode 'assert' to implement it.
In debug builds, @assert generates 'assert' bytecodes.
In release builds, no byte code is produced for @assert.

In case assert is false, the JS built-in and the line number are dumped.

* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitAssert):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp: Generating op_assert bytecode for @assert for Debug builds.
(JSC::BytecodeIntrinsicNode::emit_intrinsic_assert):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_assert):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_create_assert):
* llint/LowLevelInterpreter.asm:
* runtime/CommonIdentifiers.h: Adding @assert identifier as intrinsic.
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:

Source/WebCore:

* Modules/streams/ReadableStreamInternals.js:
(privateInitializeReadableStreamReader): Activating an @assert.

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

4 years ago[css-grid] Improve grid container sizing with size constraints and intrinsic sizes
svillar@igalia.com [Mon, 9 Nov 2015 12:56:43 +0000 (12:56 +0000)]
[css-grid] Improve grid container sizing with size constraints and intrinsic sizes
https://bugs.webkit.org/show_bug.cgi?id=150679

Reviewed by Darin Adler.

Source/WebCore:

The grid container stores from now on its min-content and
max-content block sizes in order to be able to properly
compute its intrinsic size. It has to redefine
computeIntrinsicLogicalContentHeightUsing() because the
behavior of grid is different to "normal" blocks:

- the min-content size is the sum of the grid container's
track sizes in the appropiate axis when the grid is sized
under a min-content constraint.
- the max-content size is the sum of the grid container's
track sizes in the appropiate axis when the grid is sized
under a max-content constraint.
- the auto block size is the max-content size.

A nice side effect is that we can now properly detect whether
the grid has a definite size on a given axis or not.

Tests: fast/css-grid-layout/absolute-positioning-definite-sizes.html
       fast/css-grid-layout/flex-and-intrinsic-sizes.html
       fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html
       fast/css-grid-layout/maximize-tracks-definite-indefinite-width.html

* rendering/RenderBox.h: made
computeIntrinsicLogicalContentHeightUsing() virtual.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridSizingData::GridSizingData):
(WebCore::RenderGrid::GridSizingData::freeSpaceForDirection):
(WebCore::RenderGrid::GridSizingData::setFreeSpaceForDirection):
(WebCore::RenderGrid::computeTrackBasedLogicalHeight):
(WebCore::RenderGrid::computeTrackSizesForDirection):
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
(WebCore::RenderGrid::computeIntrinsicLogicalHeight):
(WebCore::RenderGrid::computeIntrinsicLogicalContentHeightUsing):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::distributeSpaceToTracks):
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
(WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
(WebCore::RenderGrid::layoutGridItems):
(WebCore::RenderGrid::populateGridPositions):
(WebCore::RenderGrid::gridElementIsShrinkToFit): Deleted.
* rendering/RenderGrid.h:

LayoutTests:

* fast/css-grid-layout/absolute-positioning-definite-sizes-expected.txt: Added.
* fast/css-grid-layout/absolute-positioning-definite-sizes.html: Added.
* fast/css-grid-layout/flex-and-intrinsic-sizes-expected.txt: Added.
* fast/css-grid-layout/flex-and-intrinsic-sizes.html: Added.
* fast/css-grid-layout/grid-element-change-columns-repaint.html:
* fast/css-grid-layout/grid-item-change-column-repaint.html:
* fast/css-grid-layout/grid-preferred-logical-widths.html:
* fast/css-grid-layout/maximize-tracks-definite-indefinite-height-expected.txt: Added.
* fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html: Added.
* fast/css-grid-layout/maximize-tracks-definite-indefinite-width-expected.txt: Added.
* fast/css-grid-layout/maximize-tracks-definite-indefinite-width.html: Added.
* fast/css-grid-layout/percent-of-indefinite-track-size.html:
* fast/events/key-events-in-editable-gridbox-expected.txt:
* fast/events/key-events-in-editable-gridbox.html: Added more test
cases for intrinsic and fixed sized heights.

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

4 years ago[css-grid] Grid placement conflict handling
svillar@igalia.com [Mon, 9 Nov 2015 12:24:38 +0000 (12:24 +0000)]
[css-grid] Grid placement conflict handling
https://bugs.webkit.org/show_bug.cgi?id=150891

Reviewed by Darin Adler.

Source/WebCore:

If the placement for a grid item contains two lines, and the
start line is further end-ward than the end line, swap the two
lines. If the start line is equal to the end line, remove the
end line.

Test: fast/css-grid-layout/swap-lines-if-start-is-further-endward-than-end-line.html

* rendering/style/GridResolvedPosition.cpp:
(WebCore::resolveNamedGridLinePositionFromStyle):
(WebCore::resolveGridPositionFromStyle):
(WebCore::GridResolvedPosition::GridResolvedPosition):
(WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
(WebCore::adjustGridPositionForSide): Deleted.
* rendering/style/GridResolvedPosition.h:
(WebCore::GridResolvedPosition::prev):

LayoutTests:

Updated the expectations for
named-grid-lines-with-named-grid-areas-dynamic-get-set.html
because two of the tests where positioning an item with a
start-line > end-line (it was removing the end line instead of
swapping them).

* fast/css-grid-layout/named-grid-lines-with-named-grid-areas-dynamic-get-set.html:
* fast/css-grid-layout/swap-lines-if-start-is-further-endward-than-end-line-expected.html: Added.
* fast/css-grid-layout/swap-lines-if-start-is-further-endward-than-end-line.html: Added.

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

4 years agoUnreviewed CMake buildfix after r192113.
ossy@webkit.org [Mon, 9 Nov 2015 12:13:06 +0000 (12:13 +0000)]
Unreviewed CMake buildfix after r192113.

* PlatformMac.cmake: New file added.

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

4 years ago[EFL] Fix the gst-plugins-bad jhbuild module build on Ubuntu 15.10
ossy@webkit.org [Mon, 9 Nov 2015 12:07:30 +0000 (12:07 +0000)]
[EFL] Fix the gst-plugins-bad jhbuild module build on Ubuntu 15.10
https://bugs.webkit.org/show_bug.cgi?id=150928

Reviewed by Gyuyoung Kim.

* efl/jhbuild.modules:

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

4 years agoUnreviewed speculative CMake buildfix after r192111.
ossy@webkit.org [Mon, 9 Nov 2015 11:55:53 +0000 (11:55 +0000)]
Unreviewed speculative CMake buildfix after r192111.

Reviewed by NOBODY (OOPS!).

* CMakeLists.txt: New files added.

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

4 years agoUnreviewed.
calvaris@igalia.com [Mon, 9 Nov 2015 09:57:13 +0000 (09:57 +0000)]
Unreviewed.

* platform/win/TestExpectations: Marked 150976 as dup of 147933.

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

4 years ago[EFL] Add UserAgentEFl.cpp|h
gyuyoung.kim@webkit.org [Mon, 9 Nov 2015 07:03:18 +0000 (07:03 +0000)]
[EFL] Add UserAgentEFl.cpp|h
https://bugs.webkit.org/show_bug.cgi?id=151007

Reviewed by Darin Adler.

As other ports EFL port starts to have UserAgentEfl class in order to support more detailed
UA.

Source/WebCore:

No new tests, no behavior change.

* PlatformEfl.cmake:
* platform/efl/UserAgentEfl.cpp: Added.
(WebCore::platformForUAString):
(WebCore::platformVersionForUAString):
(WebCore::versionForUAString):
(WebCore::standardUserAgent):
* platform/efl/UserAgentEfl.h: Added.

Source/WebKit2:

* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::standardUserAgent): Call WebCore::standardUserAgent().

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

4 years ago[ES6] Minimize ES6_CLASS_SYNTAX ifdefs
utatane.tea@gmail.com [Mon, 9 Nov 2015 01:34:09 +0000 (01:34 +0000)]
[ES6] Minimize ES6_CLASS_SYNTAX ifdefs
https://bugs.webkit.org/show_bug.cgi?id=151006

Reviewed by Darin Adler.

This patch minimizes ENABLE_ES6_CLASS_SYNTAX ifdefs.
It keeps several ENABLE_ES6_CLASS_SYNTAX ifdefs in Parser.cpp.

- super meta property
- class declaration parsing
- class expression parsing
- class with import declaration

This change makes difference minimal between the enabled and disabled configurations;
reducing accidental build breaks of the disabled configuration.

* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::constructorKind): Deleted.
* bytecompiler/NodesCodegen.cpp:
* parser/ASTBuilder.h:
* parser/NodeConstructors.h:
* parser/Nodes.h:
* parser/Parser.cpp:
* parser/Parser.h:
(JSC::Scope::hasDirectSuper): Deleted.
(JSC::Scope::needsSuperBinding): Deleted.
* parser/ParserFunctionInfo.h:
* parser/ParserTokens.h:
* parser/SyntaxChecker.h:

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

4 years agoUse StringView::upconvertedCharacters() to make a 16-bit copy in String.prototype...
sukolsak@gmail.com [Sun, 8 Nov 2015 18:36:55 +0000 (18:36 +0000)]
Use StringView::upconvertedCharacters() to make a 16-bit copy in String.prototype.normalize
https://bugs.webkit.org/show_bug.cgi?id=151005

Reviewed by Michael Saboff.

The ICU's unorm_normalize function used by String.prototype.normalize
requires a 16-bit string. This patch uses StringView::upconvertedCharacters()
to make a 16-bit copy of a string.

* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncNormalize):

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