CopiedSpace::startedCopying should not call MarkedSpace::capacity
https://bugs.webkit.org/show_bug.cgi?id=121045

Reviewed by Geoffrey Garen.

MarkedSpace::capacity() iterates every block in MarkedSpace. Instead we should just 
keep track of our total capacity in MarkedSpace as we add and remove MarkedBlocks.

* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::freeBlock):
* heap/MarkedSpace.h:
(JSC::MarkedSpace::didAddBlock):
(JSC::MarkedSpace::capacity):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Introduce WTF::createOwned
https://bugs.webkit.org/show_bug.cgi?id=121059

Reviewed by Andreas Kling.

WTF::createOwned is a function template that does adoptPtr + new in a single function call,
with all the arguments being perfectly forwarded thanks to C++11.

Being forward-looking, createOwned returns an OwnPtr rather than a PassOwnPtr since the plan is
to get rid of PassOwnPtr and just use std::move instead.

* wtf/FilePrintStream.cpp:
* wtf/FilePrintStream.h:
* wtf/HashTable.h:
* wtf/ListHashSet.h:
* wtf/OwnPtr.h:
(WTF::OwnPtr::OwnPtr):
(WTF::createOwned):
(WTF::createThread):
(WTF::establishIdentifierForPthreadHandle):
(WTF::createThreadInternal):
(WTF::Collator::userDefault):
(WTF::Collator::userDefault):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove HTMLTextFormControl::fixPlaceholderRenderer
https://bugs.webkit.org/show_bug.cgi?id=121058

Reviewed by Kent Tamura.

Source/WebCore: 

HTMLTextFormControl::fixPlaceholderRenderer was added in r118733 to swap the order in which placeholder appears.
Namely, when a text form control element is focused, placeholder should be rendered behind the text for the caret
to render on top of, not behind, the placeholder text.  However, we can achieve the same effect by changing
the order of elements in the shadow DOM instead of manually manipuating the render tree as the assertion failure
mentioned in the change log is a bogus one.

Cleaned up the code by removing HTMLTextFormControl::fixPlaceholderRenderer and changed the order in which inner
text element and placeholder element appear. Also fixed the assertion in Position's constructor.

* dom/Position.cpp:
(WebCore::Position::Position): The original assertion was bogus. What we don't want have is for a Position to be
before or after a shadow root. It's fine for it be anchroed against the shadow root as long as it's inside.

* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::updatePlaceholderText): Insert the placeholder before the inner text element.
* html/HTMLTextAreaElement.h:
* html/HTMLTextFormControlElement.cpp:
* html/HTMLTextFormControlElement.h:
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::updatePlaceholderText): Ditto.
* html/TextFieldInputType.h:

LayoutTests: 

Rebaseline tests now that the placeholder appears before the inner text element.

* fast/forms/placeholder-position-expected.txt:
* platform/mac/fast/forms/input-placeholder-visibility-1-expected.txt:
* platform/mac/fast/forms/input-placeholder-visibility-3-expected.txt:
* platform/mac/fast/forms/textarea-placeholder-pseudo-style-expected.txt:
* platform/mac/fast/forms/textarea-placeholder-visibility-1-expected.txt:
* platform/mac/fast/forms/textarea-placeholder-visibility-2-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebGL] Allow multithreaded OpenGL contexts
https://bugs.webkit.org/show_bug.cgi?id=121062

Reviewed by Simon Fraser.

Expose a new preference "multithreadedWebGLEnabled".

Source/WebCore:

Also examine the value of that preference and, on Mac,
tell the CGLContext that it should go to multithreaded mode.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create): Look at the value of the new setting, and
toggle a flag on the context attributes.
* page/Settings.in: New Setting "multithreadedWebGLEnabled".
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::Attributes::Attributes): Add a "multithreaded" flag.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D): If the context attributes
suggest we should, tell the OpenGL context to go into multithreaded mode.

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences multithreadedWebGLEnabled]):
(-[WebPreferences setMultithreadedWebGLEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetMultithreadedWebGLEnabled):
(WKPreferencesGetMultithreadedWebGLEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* mac/WebKit2.order:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove un-needed js-test-style.css.
https://bugs.webkit.org/show_bug.cgi?id=120899.

Reviewed by Ryosuke Niwa.

Also adjusted a line number in fast/events/suspend-timers-expected.txt to
account for the deleted line.

* accessibility/anonymous-render-block-in-continuation-causes-crash.html:
* accessibility/duplicate-axrenderobject-crash.html:
* accessibility/loading-iframe-sends-notification.html:
* accessibility/multiselect-list-reports-active-option.html:
* accessibility/notification-listeners.html:
* css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid.html:
* css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid.html:
* css3/filters/custom-with-at-rule-syntax/parsing-custom-function-invalid.html:
* css3/filters/custom-with-at-rule-syntax/parsing-custom-function-valid.html:
* css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-invalid.html:
* css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-valid.html:
* css3/filters/custom-with-at-rule-syntax/parsing-mix-property-invalid.html:
* css3/filters/custom-with-at-rule-syntax/parsing-mix-property-valid.html:
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid.html:
* css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid.html:
* css3/filters/custom-with-at-rule-syntax/parsing-src-property-invalid.html:
* css3/filters/custom-with-at-rule-syntax/parsing-src-property-valid.html:
* css3/filters/custom/custom-filter-crash-inline-computed-style.html:
* css3/filters/custom/custom-filter-property-computed-style.html:
* css3/filters/custom/custom-filter-property-parsing-invalid.html:
* css3/filters/custom/custom-filter-property-parsing.html:
* css3/filters/custom/effect-custom-disabled.html:
* editing/spelling/spellcheck-async-mutation.html:
* editing/spelling/spellcheck-async.html:
* editing/spelling/spelling-unified-emulation.html:
* editing/text-iterator/findString-selection-disabled.html:
* fast/box-shadow/box-shadow-parsing-invalid.html:
* fast/box-sizing/table-cell.html:
* fast/canvas/webgl/arraybuffer-transfer-of-control.html:
* fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html:
* fast/canvas/webgl/context-creation-and-destruction.html:
* fast/canvas/webgl/context-release-upon-reload.html:
* fast/canvas/webgl/framebuffer-bindings-unaffected-on-resize.html:
* fast/canvas/webgl/functions-returning-strings.html:
* fast/canvas/webgl/index-validation.html:
* fast/canvas/webgl/instanceof-test.html:
* fast/canvas/webgl/oes-texture-half-float-not-supported.html:
* fast/canvas/webgl/oes-texture-half-float.html:
* fast/canvas/webgl/shader-precision-format.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgb565.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgba4444.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas-rgba5551.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-canvas.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgb565.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba4444.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data-rgba5551.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-data.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgb565.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba4444.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-image.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgb565.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba4444.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-video-rgba5551.html:
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html:
* fast/canvas/webgl/tex-image-with-greyscale-image.html:
* fast/canvas/webgl/texture-color-profile.html:
* fast/css/content-language-case-insensitivity.html:
* fast/css/content-language-comma-separated-list.html:
* fast/css/content-language-dynamically-added.html:
* fast/css/content-language-dynamically-changed.html:
* fast/css/content-language-dynamically-removed.html:
* fast/css/content-language-empty.html:
* fast/css/content-language-late.html:
* fast/css/content-language-mapped-to-webkit-locale.html:
* fast/css/content-language-multiple.html:
* fast/css/content-language-no-content.html:
* fast/css/content-language-only-whitespace.html:
* fast/css/content-language-with-whitespace.html:
* fast/css/getComputedStyle/computed-style-select-overflow.html:
* fast/css/image-orientation/image-orientation.html:
* fast/css/image-resolution/image-resolution.html:
* fast/css/lang-mapped-to-webkit-locale-dynamic.xhtml:
* fast/css/lang-mapped-to-webkit-locale.xhtml:
* fast/css/style-scoped/basic-attribute.html:
* fast/css/style-scoped/registering-shadowroot.html:
* fast/css/style-scoped/registering.html:
* fast/css/table-border-spacing.html:
* fast/css/xml-lang-ignored-in-html.html:
* fast/dom/gc-attribute-node.html:
* fast/events/platform-wheelevent-paging-x-in-non-scrolling-div.html:
* fast/events/platform-wheelevent-paging-x-in-non-scrolling-page.html:
* fast/events/platform-wheelevent-paging-x-in-scrolling-div.html:
* fast/events/platform-wheelevent-paging-x-in-scrolling-page.html:
* fast/events/platform-wheelevent-paging-xy-in-scrolling-div.html:
* fast/events/platform-wheelevent-paging-xy-in-scrolling-page.html:
* fast/events/platform-wheelevent-paging-y-in-non-scrolling-div.html:
* fast/events/platform-wheelevent-paging-y-in-non-scrolling-page.html:
* fast/events/platform-wheelevent-paging-y-in-scrolling-div.html:
* fast/events/platform-wheelevent-paging-y-in-scrolling-page.html:
* fast/events/suspend-timers-expected.txt:
* fast/events/suspend-timers.html:
* fast/events/touch/gesture/touch-gesture-noscroll-body-propagated.html:
* fast/events/touch/gesture/touch-gesture-noscroll-body-xhidden.html:
* fast/events/touch/gesture/touch-gesture-noscroll-body-yhidden.html:
* fast/events/touch/gesture/touch-gesture-noscroll-body.html:
* fast/events/touch/gesture/touch-gesture-noscroll-iframe.html:
* fast/events/touch/gesture/touch-gesture-scroll-div-not-propagated.html:
* fast/events/touch/gesture/touch-gesture-scroll-div-propagated.html:
* fast/events/touch/gesture/touch-gesture-scroll-div-twice-propagated.html:
* fast/events/touch/gesture/touch-gesture-scroll-iframe-editable.html:
* fast/events/touch/gesture/touch-gesture-scroll-iframe-not-propagated.html:
* fast/events/touch/gesture/touch-gesture-scroll-iframe-propagated.html:
* fast/events/touch/gesture/touch-gesture-scroll-iframe.html:
* fast/events/touch/gesture/touch-gesture-scroll-page-not-propagated.html:
* fast/events/touch/gesture/touch-gesture-scroll-page-propagated.html:
* fast/events/touch/gesture/touch-gesture-scroll-page.html:
* fast/events/touch/gesture/touch-gesture-scroll-shy-target.html:
* fast/files/url-null.html:
* fast/filesystem/simple-required-arguments-getdirectory.html:
* fast/filesystem/simple-required-arguments-getfile.html:
* fast/filesystem/simple-required-arguments-getmetadata.html:
* fast/filesystem/simple-required-arguments-remove.html:
* fast/forms/form-dirname-attribute.html:
* fast/forms/setCustomValidity-arguments.html:
* fast/js/resources/js-test-style.css: Removed.
* fast/mediastream/LocalMediaStream-onended.html:
* fast/mediastream/MediaStream-add-remove-tracks.html:
* fast/mediastream/MediaStream-onended.html:
* fast/mediastream/MediaStreamConstructor.html:
* fast/mediastream/MediaStreamTrack.html:
* fast/mediastream/RTCIceCandidate.html:
* fast/mediastream/RTCSessionDescription.html:
* fast/mediastream/constructors.html:
* fast/mediastream/getusermedia.html:



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