WebKit-https.git
4 years ago[iOS] Add WebKitSystemInterface for iOS 8.2
commit-queue@webkit.org [Mon, 9 Mar 2015 22:34:47 +0000 (22:34 +0000)]
[iOS] Add WebKitSystemInterface for iOS 8.2
https://bugs.webkit.org/show_bug.cgi?id=142505

Patch by Daniel Bates <dabates@apple.com> on 2015-03-09
Reviewed by Andy Estes.

* libWebKitSystemInterfaceIOSDevice8.2.a: Added.
* libWebKitSystemInterfaceIOSSimulator8.2.a: Added.

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

4 years agosvg/custom/svg-fonts-without-missing-glyph.xhtml fails after fonts/font-fallback...
mmaxfield@apple.com [Mon, 9 Mar 2015 22:09:34 +0000 (22:09 +0000)]
svg/custom/svg-fonts-without-missing-glyph.xhtml fails after fonts/font-fallback-prefers-pictographs.html
https://bugs.webkit.org/show_bug.cgi?id=142470

Reviewed by Anders Carlsson.

Source/WebCore:

After each test, reset all internal settings.

Covered by svg/custom/svg-fonts-without-missing-glyph.xhtml

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:

LayoutTests:

* platform/mac/TestExpectations:

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

4 years agoUnreviewed, rolling out r181268.
commit-queue@webkit.org [Mon, 9 Mar 2015 22:08:36 +0000 (22:08 +0000)]
Unreviewed, rolling out r181268.
https://bugs.webkit.org/show_bug.cgi?id=142508

Broke tests (Requested by ap on #webkit).

Reverted changeset:

"Simple line layout: Merge
TextFragmentIterator::findNextBreakablePosition() and
TextFragmentIterator::findNextNonWhitespacePosition()."
https://bugs.webkit.org/show_bug.cgi?id=142344
http://trac.webkit.org/changeset/181268

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

4 years agoCSS JIT: add aliases between :nth-child()/:nth-last-child() and :first-child/:last...
benjamin@webkit.org [Mon, 9 Mar 2015 21:10:37 +0000 (21:10 +0000)]
CSS JIT: add aliases between :nth-child()/:nth-last-child() and :first-child/:last-child
https://bugs.webkit.org/show_bug.cgi?id=142472

Reviewed by Andreas Kling.

Source/WebCore:

The pseudo class :first-child has weaker tree marking than :nth-child(1).
This patch aliases :nth-child(1) to :first-child in the CSS JIT to take
advantage of that.

The strength of :last-child and :nth-last-child(1) are pretty much identical
but :last-child is a bit simpler so I changed it too. It is also easier
to handle both the same.

Tests: fast/selectors/nth-child-matching-first-on-root.html
       fast/selectors/nth-child-matching-first.html
       fast/selectors/nth-last-child-matching-first-on-root.html
       fast/selectors/nth-last-child-matching-first.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addNthChildType):
(WebCore::SelectorCompiler::addPseudoClassType):

LayoutTests:

* fast/selectors/nth-child-matching-first-expected.txt: Added.
* fast/selectors/nth-child-matching-first-on-root-expected.txt: Added.
* fast/selectors/nth-child-matching-first-on-root.html: Added.
* fast/selectors/nth-child-matching-first.html: Added.
* fast/selectors/nth-last-child-matching-first-expected.txt: Added.
* fast/selectors/nth-last-child-matching-first-on-root-expected.txt: Added.
* fast/selectors/nth-last-child-matching-first-on-root.html: Added.
* fast/selectors/nth-last-child-matching-first.html: Added.

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

4 years agoMerge TrivialAtom and CharacterSet into a Term abstraction, prepare Term for composition
benjamin@webkit.org [Mon, 9 Mar 2015 21:07:19 +0000 (21:07 +0000)]
Merge TrivialAtom and CharacterSet into a Term abstraction, prepare Term for composition
https://bugs.webkit.org/show_bug.cgi?id=142429

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-03-09
Reviewed by Darin Adler.

This patch merges CharacterSet and Trivial atom into a new class: Term. A Term is
a combination of an Atom and one Quantifier.

With term being the basic block, we can use the PrefixTree for any construct,
greatly reducing the size of the NFA graph.

Term is built on top of an union holding the Atom storage. This is done in preparation
for more complicated Atoms like a disjunction.

Everything else is pretty much the same. BuildMode is gone since we use the prefix
tree for everything. FloatingAtomType is gone, a TrivialAtom is now represented
by a single character CharacterSet (or two for case insensitive).

* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::parseRuleList):
* contentextensions/NFA.cpp:
(WebCore::ContentExtensions::NFA::addRuleId):
* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::Term::Term):
(WebCore::ContentExtensions::Term::~Term):
(WebCore::ContentExtensions::Term::isValid):
(WebCore::ContentExtensions::Term::addCharacter):
(WebCore::ContentExtensions::Term::quantify):
(WebCore::ContentExtensions::Term::quantifier):
(WebCore::ContentExtensions::Term::isUniversalTransition):
(WebCore::ContentExtensions::Term::visitSimpleTransitions):
(WebCore::ContentExtensions::Term::operator=):
(WebCore::ContentExtensions::Term::operator==):
(WebCore::ContentExtensions::Term::hash):
(WebCore::ContentExtensions::Term::isEmptyValue):
(WebCore::ContentExtensions::Term::isDeletedValue):
(WebCore::ContentExtensions::Term::destroy):
(WebCore::ContentExtensions::Term::CharacterSet::operator==):
(WebCore::ContentExtensions::Term::CharacterSet::hash):
(WebCore::ContentExtensions::TermHash::hash):
(WebCore::ContentExtensions::TermHash::equal):
(WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
(WebCore::ContentExtensions::GraphBuilder::finalize):
(WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
(WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
(WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBegin):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
(WebCore::ContentExtensions::GraphBuilder::addTransitions):
(WebCore::ContentExtensions::GraphBuilder::sinkFloatingTerm):
(WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
(WebCore::ContentExtensions::URLFilterParser::URLFilterParser):
(WebCore::ContentExtensions::URLFilterParser::~URLFilterParser):
(WebCore::ContentExtensions::URLFilterParser::addPattern):
(WebCore::ContentExtensions::trivialAtomFromASCIICharacter): Deleted.
(WebCore::ContentExtensions::quantifyTrivialAtom): Deleted.
(WebCore::ContentExtensions::trivialAtomQuantifier): Deleted.
(WebCore::ContentExtensions::trivialAtomForNewlineClassIDBuiltin): Deleted.
(WebCore::ContentExtensions::GraphBuilder::sinkAtom): Deleted.
(WebCore::ContentExtensions::GraphBuilder::generateTransition): Deleted.
(WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom): Deleted.
(WebCore::ContentExtensions::GraphBuilder::sinkCharacterSet): Deleted.
(WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary): Deleted.
* contentextensions/URLFilterParser.h:

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

4 years agoFix the !ENABLE(WEBGL) build after r180609
ossy@webkit.org [Mon, 9 Mar 2015 20:51:51 +0000 (20:51 +0000)]
Fix the !ENABLE(WEBGL) build after r180609
https://bugs.webkit.org/show_bug.cgi?id=142057

Reviewed by Darin Adler.

* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::forceContextLost):

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

4 years agoAdd an option to run-webkit-tests to override the LayoutTests/ directory
jer.noble@apple.com [Mon, 9 Mar 2015 20:51:38 +0000 (20:51 +0000)]
Add an option to run-webkit-tests to override the LayoutTests/ directory
https://bugs.webkit.org/show_bug.cgi?id=142418

Reviewed by David Kilzer.

Add an arugment to run-webkit-tests which, when set, overrides the port's default LayoutTests
directory. The base port will parse the options during initialization and store the override
location if present. layout_tests_dir() will return this overridden location if set.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Scripts/webkitpy/port/base.py:
(Port.__init__):
(Port.layout_tests_dir):

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

4 years agoOnly call showControls if controls are hidden.
roger_fong@apple.com [Mon, 9 Mar 2015 20:22:15 +0000 (20:22 +0000)]
Only call showControls if controls are hidden.
https://bugs.webkit.org/show_bug.cgi?id=142496.
<rdar://problem/20083732>
Reviewed by Dean Jackson.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleWrapperMouseMove):
(Controller.prototype.controlsAreHidden):
Controls are hidden if the ‘show’ class name is not present,
not if the ‘hidden’ class name is.

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

4 years agoWork around a Cocoa font parsing bug
mmaxfield@apple.com [Mon, 9 Mar 2015 19:58:37 +0000 (19:58 +0000)]
Work around a Cocoa font parsing bug
https://bugs.webkit.org/show_bug.cgi?id=142446
Source/WebCore:

<rdar://problem/20086223>

Reviewed by Simon Fraser.

Work around a bug in Cocoa regarding font parsing.

* svg/SVGToOTFFontConversion.cpp:

LayoutTests:

Reviewed by Simon Fraser.

Adding a few extra tests for bits of SVG fonts that could use some more tests.

* svg/fonts/resources/svg-font-general.svg: Updated and moved from svg-font-horiz-origin-font.svg
* svg/fonts/svg-font-general.html: Updated and moved from svg-font-horiz-origin.html
* svg/fonts/svg-font-general-expected.html: Updated and moved from svg-font-horiz-origin-expected.html

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

4 years ago[SVG -> OTF Converter] x-height cannot be specified
mmaxfield@apple.com [Mon, 9 Mar 2015 19:39:12 +0000 (19:39 +0000)]
[SVG -> OTF Converter] x-height cannot be specified
https://bugs.webkit.org/show_bug.cgi?id=142465

Reviewed by Simon Fraser.

For all non-system fonts, OS X disregards the font's reported x-height. Therefore,
it is impossible to satisfy this test.

* fast/css/ex-unit-with-no-x-height-expected.txt: Removed.
* fast/css/ex-unit-with-no-x-height.html: Removed.
* platform/mac/TestExpectations:

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

4 years agoUnreviewed GTK+ Gardening
commit-queue@webkit.org [Mon, 9 Mar 2015 19:19:36 +0000 (19:19 +0000)]
Unreviewed GTK+ Gardening

https://bugs.webkit.org/show_bug.cgi?id=142499

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

* platform/gtk/TestExpectations:

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

4 years ago[CMake] Enable WorkQueue tests for CMake ports
commit-queue@webkit.org [Mon, 9 Mar 2015 19:02:23 +0000 (19:02 +0000)]
[CMake] Enable WorkQueue tests for CMake ports
https://bugs.webkit.org/show_bug.cgi?id=142473

Patch by Martin Robinson <mrobinson@igalia.com> on 2015-03-09
Reviewed by Darin Adler.

* TestWebKitAPI/CMakeLists.txt: Add the WorkQueue tests source file to
the list of source files.
* Tools/TestWebKitAPI/PlatformEfl.cmake: Add the DispatchQueueEfl directory
to the list of include directories for EFL.

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

4 years agoFix the build after r181153
ossy@webkit.org [Mon, 9 Mar 2015 19:01:08 +0000 (19:01 +0000)]
Fix the build after r181153
https://bugs.webkit.org/show_bug.cgi?id=142497

Reviewed by Philippe Normand.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load):

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

4 years ago[iOS] Fix build when compiling with dead code stripping disabled
ddkilzer@apple.com [Mon, 9 Mar 2015 18:58:31 +0000 (18:58 +0000)]
[iOS] Fix build when compiling with dead code stripping disabled
<http://webkit.org/b/142467>

Reviewed by Simon Fraser.

Source/WebKit/ios:

* WebCoreSupport/WebInspectorClientIOS.mm:
(WebInspectorFrontendClient::save): Add missing method.

Source/WebKit/mac:

* Configurations/WebKitLegacy.xcconfig:
(EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*]): Disable mig code
generation and compilation for out-of-process plugin support.
This was never used on iOS.

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

4 years agobmalloc: tryFastMalloc shouldn't crash
ggaren@apple.com [Mon, 9 Mar 2015 18:43:08 +0000 (18:43 +0000)]
bmalloc: tryFastMalloc shouldn't crash
https://bugs.webkit.org/show_bug.cgi?id=142443

Reviewed by Anders Carlsson.

Part 1: Stop using tryFastRealloc.

* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::resize): Deleted.
* Shared/ShareableBitmap.h: Removed the resize function because it has
no clients.

* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::updateBackingStore): Changed to allocate a new
backing store instead of resizing the old one. This has three advantages:

(1) Might be more memory-efficient, since you don't have to keep the old
one around while allocating the new one.

(2) Avoids the overhead of realloc() copying the contents of the old
backing store even though we only want uninitialized memory.

(3) Makes resize failure consistent with initial allocation failure.
Previously, while initial allocation failure would set the backing store
to null, resize failure would keep the old wrong backing store and then
tell it not to paint. Now, resize failure also sets the backing store to
null.

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

4 years ago[EFL] Move DispatchQueue to WTF
commit-queue@webkit.org [Mon, 9 Mar 2015 17:49:17 +0000 (17:49 +0000)]
[EFL] Move DispatchQueue to WTF
https://bugs.webkit.org/show_bug.cgi?id=142493

Patch by Martin Robinson <mrobinson@igalia.com> on 2015-03-09
Reviewed by Csaba Osztrogonác.

Source/WebKit2:

* PlatformEfl.cmake: Remove DispatchQueue from the source list.

Source/WTF:

* wtf/PlatformEfl.cmake: Add DispatchQueue to the source list.
* wtf/efl/DispatchQueueEfl.cpp: Renamed from Source/WebKit2/Platform/efl/DispatchQueueEfl.cpp.
* wtf/efl/DispatchQueueEfl.h: Renamed from Source/WebKit2/Platform/efl/DispatchQueueEfl.h.
* wtf/efl/DispatchQueueWorkItemEfl.h: Renamed from Source/WebKit2/Platform/efl/DispatchQueueWorkItemEfl.h.

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

4 years agoUnreviewed. Re-add CSS property that was unintentionally removed in r180893
roger_fong@apple.com [Mon, 9 Mar 2015 17:35:02 +0000 (17:35 +0000)]
Unreviewed. Re-add CSS property that was unintentionally removed in r180893
<rdar://problem/20083715>
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel):

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

4 years agoSimple line layout: Merge TextFragmentIterator::findNextBreakablePosition() and TextF...
zalan@apple.com [Mon, 9 Mar 2015 17:09:52 +0000 (17:09 +0000)]
Simple line layout: Merge TextFragmentIterator::findNextBreakablePosition() and TextFragmentIterator::findNextNonWhitespacePosition().
https://bugs.webkit.org/show_bug.cgi?id=142344

Reviewed by Antti Koivisto.

This patch merges findNextBreakablePosition() and findNextNonWhitespacePosition() so that
the segment looping and position handling logic are no longer duplicated. It also unifies
the static next*() functions' signature.

No change in functionality.

* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
(WebCore::SimpleLineLayout::nextBreakablePosition):
(WebCore::SimpleLineLayout::nextNonWhitespacePosition):
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
(WebCore::SimpleLineLayout::TextFragmentIterator::findNextBreakablePosition): Deleted.
(WebCore::SimpleLineLayout::findNextNonWhitespace): Deleted.
(WebCore::SimpleLineLayout::TextFragmentIterator::findNextNonWhitespacePosition): Deleted.
* rendering/SimpleLineLayoutTextFragmentIterator.h:

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

4 years agoAttempt to fix timeouts on iOS Simulator layout tests
ddkilzer@apple.com [Mon, 9 Mar 2015 14:27:51 +0000 (14:27 +0000)]
Attempt to fix timeouts on iOS Simulator layout tests

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.setup_test_run): Most layout test runs on iOS
Simulator end after the first 50 tests time out.  Some analysis
this past weekend shows that the 'Booted' status in the output
of `xcrun simctl list` is not sufficient (and watching the test
run shows that SpringBoard hasn't fully started to the point
where it's displaying icons on the home screen).  The workaround
until we have a better fix is to add an arbitrary timeout to let
SpringBoard finish launching.  In practice, 15 seconds is
probably enough, but 30 seconds should nearly always work.

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

4 years agoUnreviewed. Add myself as a committer.
peavo@outlook.com [Mon, 9 Mar 2015 13:57:00 +0000 (13:57 +0000)]
Unreviewed. Add myself as a committer.

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

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

4 years agoAttempt to fix WTF_WorkQueue.TwoQueues timeout test failure
ddkilzer@apple.com [Mon, 9 Mar 2015 12:57:11 +0000 (12:57 +0000)]
Attempt to fix WTF_WorkQueue.TwoQueues timeout test failure

* TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
(TestWebKitAPI::TEST): Change delay from 50ns to 50ms, and add
an expectation that will fail if we hit the race condition.
This test is inherently racy and will deadlock if the first job
for queue2 takes the mutex lock before the second job for
queue1.

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

4 years agoReadableStreamJSSource should use JSC::Strong UnspecifiedBoolType operator
youenn.fablet@crf.canon.fr [Mon, 9 Mar 2015 11:36:14 +0000 (11:36 +0000)]
ReadableStreamJSSource should use JSC::Strong UnspecifiedBoolType operator
https://bugs.webkit.org/show_bug.cgi?id=142397

Reviewed by Benjamin Poulain.

No behavior change. Current tests cover the changes.

* bindings/js/ReadableStreamJSSource.cpp:
* bindings/js/ReadableStreamJSSource.h:

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

4 years agoUnreviewed EFL gardening on 9th Mar.
gyuyoung.kim@samsung.com [Mon, 9 Mar 2015 11:31:50 +0000 (11:31 +0000)]
Unreviewed EFL gardening on 9th Mar.

Mark svg/text/select-textLength-spacingAndGlyphs-foo.html to failure.
Update new failling tests to existing bugs.

* platform/efl/TestExpectations:

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

4 years agoReadableStream does not not need to pass itself as callback parameter
youenn.fablet@crf.canon.fr [Mon, 9 Mar 2015 11:31:47 +0000 (11:31 +0000)]
ReadableStream does not not need to pass itself as callback parameter
https://bugs.webkit.org/show_bug.cgi?id=142399

Reviewed by Darin Adler.

No change in behavior.

* Modules/streams/ReadableStream.h: Remove ReadableStream parameter from SuccessCallback definition.
* bindings/js/JSReadableStreamCustom.cpp:
(WebCore::JSReadableStream::ready): Capture JSReadableStream instance instead.
(WebCore::JSReadableStream::closed): Capture JSReadableStream instance instead.

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

4 years agoLast test gardening after r177774 (for reals this time)
mmaxfield@apple.com [Mon, 9 Mar 2015 05:32:06 +0000 (05:32 +0000)]
Last test gardening after r177774 (for reals this time)
https://bugs.webkit.org/show_bug.cgi?id=139968

Unreviewed.

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2015-03-08

* platform/mac/TestExpectations:
* platform/mac/svg/text/select-textLength-spacingAndGlyphs-squeeze-1-expected.txt:
* platform/mac/svg/text/select-textLength-spacingAndGlyphs-squeeze-2-expected.txt:
* platform/mac/svg/text/select-textLength-spacingAndGlyphs-squeeze-3-expected.txt:
* platform/mac/svg/text/select-textLength-spacingAndGlyphs-squeeze-4-expected.txt:
* platform/mac/svg/text/select-textLength-spacingAndGlyphs-stretch-1-expected.txt:
* platform/mac/svg/text/select-textLength-spacingAndGlyphs-stretch-2-expected.txt:
* platform/mac/svg/text/select-textLength-spacingAndGlyphs-stretch-3-expected.txt:
* svg/text/select-textLength-spacingAndGlyphs-squeeze-1.svg:
* svg/text/select-textLength-spacingAndGlyphs-squeeze-2.svg:
* svg/text/select-textLength-spacingAndGlyphs-squeeze-3.svg:
* svg/text/select-textLength-spacingAndGlyphs-squeeze-4.svg:
* svg/text/select-textLength-spacingAndGlyphs-stretch-1.svg:
* svg/text/select-textLength-spacingAndGlyphs-stretch-2.svg:
* svg/text/select-textLength-spacingAndGlyphs-stretch-3.svg:

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

4 years ago[iOS Media] Video buffer progress missing on iPhones
dino@apple.com [Mon, 9 Mar 2015 04:55:11 +0000 (04:55 +0000)]
[iOS Media] Video buffer progress missing on iPhones
https://bugs.webkit.org/show_bug.cgi?id=142462

Reviewed by Eric Carlson.

Source/WebCore:

The fullscreen controller on the iPhone idiom was using
the media duration as its maximum loaded time, meaning the
download progress was missing (it looked like everything
was already downloaded). The fix is to calculate
what the maximum buffered time is from the HTMLMediaElement,
and send that to the fullscreen controller.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.drawTimelineBackground): While implementing
the native function I noticed that the JS controls forgot that
the buffered time ranges are ordered, and thus they don't need
to search through the array. The last range will be the highest.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::maxBufferedTime): New helper function
to calculate the highest buffered time in the media source.
* html/HTMLMediaElement.h:

* platform/ios/WebVideoFullscreenInterface.h: New setBufferedTime method.
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setDuration): No longer set
the loadedTimeRanges.
(WebVideoFullscreenInterfaceAVKit::setBufferedTime): Calculate a normalized
value of the maximum loaded/buffered time, and tell the platform controller
to show that range.

* platform/ios/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::updateForEventName): Send the maximum
buffered time.

Source/WebKit2:

Coordinate the SetBufferedTime message between the Web and UI
processes.

* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: New message SetBufferedTime.
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::setBufferedTime):

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

4 years agoFix the tests for the new double-child descendant in css-set-selector-text
benjamin@webkit.org [Mon, 9 Mar 2015 04:25:04 +0000 (04:25 +0000)]
Fix the tests for the new double-child descendant in css-set-selector-text
https://bugs.webkit.org/show_bug.cgi?id=141882

Reviewed by Andreas Kling.

In 178592, I copied the rules from css-selector-text.html without removing
the declarations.

Kudos to Dhi Aurrahman for catching this.

* fast/css/css-set-selector-text-expected.txt:
* fast/css/css-set-selector-text.html:

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

4 years ago[Win] WTF::WorkQueue does not balance ref/deref properly
bfulgham@apple.com [Mon, 9 Mar 2015 04:15:42 +0000 (04:15 +0000)]
[Win] WTF::WorkQueue does not balance ref/deref properly
https://bugs.webkit.org/show_bug.cgi?id=142471

Reviewed by Antti Koivisto.

Source/WTF:

Make sure we deref the count when we execute a function in the
WorkQueue.

* wtf/win/WorkQueueWin.cpp:
(WTF::WorkQueue::performWorkOnRegisteredWorkThread):

Tools:

* TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
(TestWebKitAPI::TEST): Check that the refcount is correct.

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

4 years agoCrash in WebCore::NotificationCenter::stop()
cdumez@apple.com [Mon, 9 Mar 2015 02:55:30 +0000 (02:55 +0000)]
Crash in WebCore::NotificationCenter::stop()
https://bugs.webkit.org/show_bug.cgi?id=142444
<rdar://problem/20082520>

Reviewed by Darin Adler.

Rework the patch in r181219 so that we do not need a Ref<NotificationCenter> protector
in NotificationCenter::stop(). Instead, we put the client in a local variable and null
out m_client *before* calling NotificationClient::clearNotifications().

No new tests, already covered by:
http/tests/notifications/event-listener-crash.html

* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::stop):

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

4 years agoDo not show passing test result on output of EFL layout test
gyuyoung.kim@samsung.com [Mon, 9 Mar 2015 02:07:38 +0000 (02:07 +0000)]
Do not show passing test result on output of EFL layout test
https://bugs.webkit.org/show_bug.cgi?id=142380

Reviewed by Darin Adler.

To show passing tests has caused inconvenience when we detect problem tests
in output of layout test. So this patch applies '--debug-rwt-logging' except for EFL port
in order not to show passing tests in the output of EFL layout test.

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

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

4 years agoUnreviewed build fix.
bfulgham@apple.com [Mon, 9 Mar 2015 01:58:35 +0000 (01:58 +0000)]
Unreviewed build fix.

* TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
(TestWebKitAPI::TEST): Remove two unused variables.

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

4 years agoChange bug number for svg/custom/svg-fonts-without-missing-glyph.xhtml
mmaxfield@apple.com [Mon, 9 Mar 2015 01:44:11 +0000 (01:44 +0000)]
Change bug number for svg/custom/svg-fonts-without-missing-glyph.xhtml

Unreviewed.

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2015-03-08

* platform/mac/TestExpectations:

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

4 years ago[Content Extensions] Add scaffolding for the WKUserContentExtensionStore
weinig@apple.com [Mon, 9 Mar 2015 01:30:05 +0000 (01:30 +0000)]
[Content Extensions] Add scaffolding for the WKUserContentExtensionStore
https://bugs.webkit.org/show_bug.cgi?id=142464

Reviewed by Dan Bernstein.

* Shared/API/APIObject.h:
Add a UserContentExtensionStore type and move the UserContentExtension type into the correct section (UIProcess).

* Shared/API/c/WKBase.h:
Add the WKUserContentExtensionStoreRef C-SPI type.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Add allocation support for UserContentExtensionStore (and UserContentExtension while we are there, it will be
needed shortly).

* UIProcess/API/APIUserContentExtensionStore.cpp: Added.
(API::UserContentExtensionStore::UserContentExtensionStore):
(API::UserContentExtensionStore::~UserContentExtensionStore):
* UIProcess/API/APIUserContentExtensionStore.h: Added.
Stub out the UserContentExtensionStore.

* UIProcess/API/C/WKAPICast.h:
Add casting for the UserContentExtensionStore.

* UIProcess/API/C/WKUserContentExtensionStoreRef.cpp: Added.
(WKUserContentExtensionStoreGetTypeID):
* UIProcess/API/C/WKUserContentExtensionStoreRef.h: Added.
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.h: Added.
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm: Added.
(-[_WKUserContentExtensionStore init]):
(-[_WKUserContentExtensionStore dealloc]):
(-[_WKUserContentExtensionStore _apiObject]):
* UIProcess/API/Cocoa/_WKUserContentExtensionStoreInternal.h: Added.
(WebKit::wrapper):
Stub out SPI for the UserContentExtensionStore.

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

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

4 years agoAX: Expose a frame's accessible name through WK2 C SPI
weinig@apple.com [Mon, 9 Mar 2015 01:17:05 +0000 (01:17 +0000)]
AX: Expose a frame's accessible name through WK2 C SPI
<rdar://problem/19653068>
https://bugs.webkit.org/show_bug.cgi?id=142468

Reviewed by Dan Bernstein.

* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameSetAccessibleName):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::setAccessibleName):
* WebProcess/WebPage/WebFrame.h:
Add SPI to set a frame's accessible name. This matches the Legacy WebKit SPI -[WebFrame setAccessibleName:].

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

4 years agoJITThunks keeps finalized Weaks around, pinning WeakBlocks.
akling@apple.com [Sun, 8 Mar 2015 23:58:40 +0000 (23:58 +0000)]
JITThunks keeps finalized Weaks around, pinning WeakBlocks.
<https://webkit.org/b/142454>

Reviewed by Darin Adler.

Make JITThunks a WeakHandleOwner so it can keep its host function map free of stale entries.
This fixes an issue I was seeing where a bunch of WeakBlocks stuck around with nothing but
finalized Weak<NativeExecutable> entries.

* jit/JITThunks.h:
* jit/JITThunks.cpp:
(JSC::JITThunks::finalize): Make JITThunks inherit from WeakHandleOwner so it can receive
a callback when the NativeExecutables get garbage collected.

(JSC::JITThunks::hostFunctionStub): Pass 'this' as the handle owner when creating Weaks.

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

4 years agoAdd some WorkQueue tests to TestWebKitAPI
bfulgham@apple.com [Sun, 8 Mar 2015 23:55:10 +0000 (23:55 +0000)]
Add some WorkQueue tests to TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=142447

Reviewed by Sam Weinig.

* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/WorkQueue.cpp: Added.
(TestWebKitAPI::simpleTest):
(TestWebKitAPI::longTest):
(TestWebKitAPI::thirdTest):
(TestWebKitAPI::finishedTests):
(TestWebKitAPI::TEST):
(TestWebKitAPI::longTest2):

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

4 years agoBuiltinExecutables keeps finalized Weaks around, pinning WeakBlocks.
akling@apple.com [Sun, 8 Mar 2015 23:47:25 +0000 (23:47 +0000)]
BuiltinExecutables keeps finalized Weaks around, pinning WeakBlocks.
<https://webkit.org/b/142460>

Reviewed by Geoffrey Garen.

Make BuiltinExecutables a WeakHandleOwner so it can clear out its respective Weak members
if and when their pointees get garbage collected.

This fixes an issue I've seen locally where a WeakBlock is pinned down by a single one of
these Weak<BuiltinExecutables>.

* builtins/BuiltinExecutables.h: Make BuiltinExecutables inherit from WeakHandleOwner.

* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::finalize): Clear out the relevant member pointer when it's been
garbage collected. We use the WeakImpl's "context" field to pass the address of the member.

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

4 years agoDon't call RenderLayerCompositor::needsToBeComposited() so many times
simon.fraser@apple.com [Sun, 8 Mar 2015 23:39:16 +0000 (23:39 +0000)]
Don't call RenderLayerCompositor::needsToBeComposited() so many times
https://bugs.webkit.org/show_bug.cgi?id=142441

Reviewed by Brent Fulgham.

Save one call to needsToBeComposited() per RenderLayer while rebuilding compositing
layers, and a call to isRunningAcceleratedTransformAnimation() in some cases.

computeCompositingRequirements() already knows if the layer will be composited, so
pass that to updateBacking() in the form of a "yes/no/don't" know enum. However,
since updateBacking() no longer calls needsToBeComposited(), we need to call
requiresCompositingForPosition() to get the viewportConstrainedNotCompositedReason flags.

isRunningAcceleratedTransformAnimation() will only be true for a layer which has a
direct compositing reason, so only call isRunningAcceleratedTransformAnimation()
in that case.

* rendering/RenderLayerCompositor.cpp:
(WebCore::rendererForCompositingTests):
(WebCore::RenderLayerCompositor::updateBacking):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::requiresCompositingLayer): Use references.
(WebCore::RenderLayerCompositor::reasonsForCompositing): Use references.
* rendering/RenderLayerCompositor.h:

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

4 years ago[Content Extensions] Pass compiled content extensions as read-only shared memory...
weinig@apple.com [Sun, 8 Mar 2015 21:32:50 +0000 (21:32 +0000)]
[Content Extensions] Pass compiled content extensions as read-only shared memory rather than copying them
https://bugs.webkit.org/show_bug.cgi?id=142458

Reviewed by Dan Bernstein.

* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebCompiledContentExtensionData.h:
(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
Store the compiled data as a SharedMemory block with offset/size pairs for the
bytecode and actions. While the bytecode offset is currently always 0, this won't
be the case when we map these in from files due to metadata that will be placed
at the top of the files.

* Shared/WebCompiledContentExtension.h:
* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
Temporary creation helper. In subsequent patches, this will be removed and replaced
by always passing in shared/mapped data.

(WebKit::WebCompiledContentExtension::create):
(WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
(WebKit::WebCompiledContentExtension::bytecode):
(WebKit::WebCompiledContentExtension::bytecodeLength):
(WebKit::WebCompiledContentExtension::actions):
(WebKit::WebCompiledContentExtension::actionsLength):
Convert to work with the new WebCompiledContentExtension format.

* UIProcess/API/C/WKUserContentFilterRef.cpp:
(WKUserContentFilterCreate):
* UIProcess/API/Cocoa/_WKUserContentFilter.mm:
(-[_WKUserContentFilter initWithName:serializedRules:]):
Switch to using WebCompiledContentExtension::createFromCompiledContentExtensionData().

* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::addUserContentExtensions):
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::addUserContentExtension):
Update to pass the WebCompiledContentExtensionData directly to the WebCompiledContentExtension.

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

4 years agoIn RenderLayerCompositor, track layer bounds and the haveComputedBounds flag together...
simon.fraser@apple.com [Sun, 8 Mar 2015 17:02:16 +0000 (17:02 +0000)]
In RenderLayerCompositor, track layer bounds and the haveComputedBounds flag together in a struct
https://bugs.webkit.org/show_bug.cgi?id=142449

Reviewed by Brent Fulgham.

Rather than tracking 'layerBounds' and 'haveComputedBounds' separately, group them together
in an OverlapExtent struct and add a function to compute the bounds, which removes
a copy of this code. OverlapExtent will be extended in a future patch.

No behavior change.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::OverlapMap::geometryMap): Allow const access to
the geometryMap, used by computeExtent().
(WebCore::RenderLayerCompositor::computeExtent):
(WebCore::RenderLayerCompositor::addToOverlapMap):
(WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
* rendering/RenderLayerCompositor.h:

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

4 years ago[iOS] Gardening to skip new tests, rebaseline existing tests
ddkilzer@apple.com [Sun, 8 Mar 2015 10:27:57 +0000 (10:27 +0000)]
[iOS] Gardening to skip new tests, rebaseline existing tests

* platform/ios-simulator-wk1/TestExpectations:
- Mark test as flakey.

* platform/ios-simulator-wk2/fast/css/text-overflow-input-expected.txt: Remove.
* platform/ios-simulator-wk2/fast/forms/input-disabled-color-expected.txt: Remove.
* platform/ios-simulator-wk2/fast/forms/input-text-word-wrap-expected.txt: Remove.
* platform/ios-simulator-wk2/fast/forms/minWidthPercent-expected.txt: Remove.
- Superceded by new platform/ios-simulator results.

* platform/ios-simulator/TestExpectations:
- Skip two tests that will always time out on iOS.
- Mark two tests as ImageOnlyFailure that fail consistently.

* platform/ios-simulator/compositing/media-controls-bar-appearance-expected.txt: Add.
- Add result for new test from r180965.

* platform/ios-simulator/fast/attachment/attachment-label-highlight-expected.txt: Add.
* platform/ios-simulator/fast/attachment/attachment-progress-expected.txt: Add.
* platform/ios-simulator/fast/attachment/attachment-subtitle-expected.txt: Add.
* platform/ios-simulator/fast/attachment/attachment-title-expected.txt: Add.
- Add results for new attachment tests.

* platform/ios-simulator/fast/css/text-overflow-input-expected.txt: Update.
* platform/ios-simulator/fast/forms/input-disabled-color-expected.txt: Update.
* platform/ios-simulator/fast/forms/input-text-scroll-left-on-blur-expected.txt: Update.
* platform/ios-simulator/fast/forms/input-text-word-wrap-expected.txt: Update.
* platform/ios-simulator/fast/forms/minWidthPercent-expected.txt: Update.
* platform/ios-simulator/tables/mozilla/bugs/bug59354-expected.txt: Update.
* platform/ios-simulator/tables/mozilla/bugs/bug96334-expected.txt: Update.
* platform/ios-simulator/tables/mozilla/other/move_row-expected.txt: Update.
- Rebaseline after other bug fixes like r180815.

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

4 years agoRemove willDestroyFrame in WKBundlePageLoaderClient
carlosgc@webkit.org [Sun, 8 Mar 2015 08:10:24 +0000 (08:10 +0000)]
Remove willDestroyFrame in WKBundlePageLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=142389

Reviewed by Anders Carlsson.

Source/WebKit2:

I added willDestroyFrame in r154540 but I realized recently that
it has never actually worked. Adding the callback to
WKBundlePageLoaderClient was the first mistake, since frames are
handled by WebProcess and DidDestroyFrame message is indeed a
WebProcessProxy not a WebPageProxy one. Second mistake was calling
the callback from WebFrameLoaderClient::frameLoaderDestroyed(),
since at that point the frame has already been detached from the
page and so WebFrame::page() always returns nullptr. So, this in
fact dead code and since r180211 nobody is using it.

* WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitWebPageCreate): Use verion 6 instead of version 7 of loader client.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::willDestroyFrame): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::frameLoaderDestroyed):

Tools:

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):

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

4 years agoUnreviewed EFL gardening on 8th Mar.
gyuyoung.kim@samsung.com [Sun, 8 Mar 2015 06:51:22 +0000 (06:51 +0000)]
Unreviewed EFL gardening on 8th Mar.

Mark emphasis text test, writing mode test, whitespace test to failure.
Besides update new failure tests to existing bugs.

* platform/efl/TestExpectations:

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

4 years ago[Win] Revive WTF::WorkQueue on Windows
bfulgham@apple.com [Sun, 8 Mar 2015 04:57:54 +0000 (04:57 +0000)]
[Win] Revive WTF::WorkQueue on Windows
https://bugs.webkit.org/show_bug.cgi?id=142432

Reviewed by Darin Adler.

Revive the Windows implementation of WTF::WorkQueue.

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* wtf/WorkQueue.h:
* wtf/win/WorkItemWin.cpp: Added.
* wtf/win/WorkItemWin.h: Added.
* wtf/win/WorkQueueWin.cpp: Added.

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

4 years agoCrash in WebCore::NotificationCenter::stop()
cdumez@apple.com [Sun, 8 Mar 2015 03:37:26 +0000 (03:37 +0000)]
Crash in WebCore::NotificationCenter::stop()
https://bugs.webkit.org/show_bug.cgi?id=142444
<rdar://problem/20082520>

Reviewed by Andreas Kling.

A use-after-free would sometimes cause us to crash in NotificationCenter::stop().
After investigation, it turns out that NotificationCenter::stop() calls
NotificationClient::clearNotifications() which will destroy the Notification
objects, all of which hold a strong reference to the NotificationCenter. If at
this point, only Notifications are ref'ing the NotificationCenter, this means
that the NotificationCenter will get destroyed right after the call to
NotificationClient::clearNotifications(). However, we reset m_client to null
after calling clearNotifications() and it causes us to crash in this case.

The issue is addressed by adding a Ref<NotificationCenter> protector in
NotificationCenter::stop() so that we make sure the NotificationCenter lives
at least until the end of the method execution.

I was able to consistently reproduce the crash by doing:
Tools/Scripts/run-webkit-tests -1 --debug --repeat-each=30 -g http/tests/notifications/event-listener-crash.html

No new tests, already covered by:
http/tests/notifications/event-listener-crash.html

* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::stop):

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

4 years agoTidy up RenderLayerCompositor's CompositingState
simon.fraser@apple.com [Sun, 8 Mar 2015 02:49:21 +0000 (02:49 +0000)]
Tidy up RenderLayerCompositor's CompositingState
https://bugs.webkit.org/show_bug.cgi?id=142445

Reviewed by Dan Bernstein.

Make CompositingState a private struct in RenderLayerCompositor.
Since it's a struct, remove the m_ prefix from its data members.

No behavior change.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::CompositingState::CompositingState):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::CompositingState::CompositingState): Deleted.
* rendering/RenderLayerCompositor.h:

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

4 years agoImprove the event handler test
darin@apple.com [Sun, 8 Mar 2015 02:14:22 +0000 (02:14 +0000)]
Improve the event handler test
https://bugs.webkit.org/show_bug.cgi?id=142439

Reviewed by Ryosuke Niwa.

* fast/dom/event-handler-attributes-expected.txt: Renamed from legacy-event-handler-attributes-expected.txt.
Also updated to reflect changes in the test.

* fast/dom/event-handler-attributes.html: Renamed from legacy-event-handler-attributes.html.
Fixed bug in the test that was making document event handler tests falsely report failure.
Removed testing of some HTMLMediaElement attributes that are conditionally present; this test
is intended to test only unconditionally available event handler attributes at this time.

* platform/win/fast/dom/legacy-event-handler-attributes-expected.txt: Removed. The conditional HTMLMediaElement
attributes are the reason the Windows-specific results were needed.

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

4 years agoUnindent EventTarget, EventListener, JSEventLister.h files
darin@apple.com [Sun, 8 Mar 2015 01:37:26 +0000 (01:37 +0000)]
Unindent EventTarget, EventListener, JSEventLister.h files
https://bugs.webkit.org/show_bug.cgi?id=142440

Reviewed by Alexey Proskuryakov.

* bindings/js/JSEventListener.h:
* dom/EventListener.h:
* dom/EventTarget.h:
Change indentation to match coding style rules.

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

4 years agoUse FastMalloc (bmalloc) instead of BlockAllocator for GC pages
ggaren@apple.com [Sun, 8 Mar 2015 00:23:03 +0000 (00:23 +0000)]
Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
https://bugs.webkit.org/show_bug.cgi?id=140900

Reviewed by Mark Hahnenberg.

Re-landing just the removal of BlockAllocator, which is now unused.

Source/JavaScriptCore:

* API/JSBase.cpp:
* CMakeLists.txt:
* JavaScriptCore.order:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/BlockAllocator.cpp: Removed.
* heap/BlockAllocator.h: Removed.
* heap/GCThreadSharedData.h:
* heap/HandleBlockInlines.h:
* heap/Heap.cpp:
(JSC::Heap::Heap):
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::blockAllocator): Deleted.
* heap/HeapTimer.cpp:
* heap/MarkedBlock.h:
* heap/MarkedSpace.h:
* heap/Region.h: Removed.
* heap/SuperRegion.cpp: Removed.
* heap/SuperRegion.h: Removed.

Source/WebCore:

* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::install):

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

4 years agoUnreviewed, rolling out r181010.
commit-queue@webkit.org [Sat, 7 Mar 2015 22:20:54 +0000 (22:20 +0000)]
Unreviewed, rolling out r181010.
https://bugs.webkit.org/show_bug.cgi?id=142442

Broke media/video-src-invalid-poster.html (Requested by kling
on #webkit).

Reverted changeset:

"Stale entries in WeakGCMaps are keeping tons of WeakBlocks
alive unnecessarily."
https://bugs.webkit.org/show_bug.cgi?id=142115
http://trac.webkit.org/changeset/181010

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

4 years agoThe code to link FunctionExecutable is duplicated everywhere
rniwa@webkit.org [Sat, 7 Mar 2015 22:10:10 +0000 (22:10 +0000)]
The code to link FunctionExecutable is duplicated everywhere
https://bugs.webkit.org/show_bug.cgi?id=142436

Reviewed by Darin Adler.

Reduced code duplication by factoring out linkInsideExecutable and linkGlobalCode.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock): Calls linkInsideExecutable.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedFunctionExecutable::linkInsideExecutable): Renamed from link. Now takes care of startOffset.
This change was needed to use this function in CodeBlock::CodeBlock. Also, this function no longer takes
lineOffset since this information is already stored in the source code.
(JSC::UnlinkedFunctionExecutable::linkGlobalCode): Extracted from FunctionExecutable::fromGlobalCode.

* bytecode/UnlinkedCodeBlock.h:

* generate-js-builtins: Calls linkGlobalCode.

* runtime/Executable.cpp:
(JSC::ProgramExecutable::initializeGlobalProperties): Calls linkGlobalCode.
(JSC::FunctionExecutable::fromGlobalCode): Calls linkGlobalCode.

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

4 years agoDo a bit of EventNames tidying
darin@apple.com [Sat, 7 Mar 2015 21:51:33 +0000 (21:51 +0000)]
Do a bit of EventNames tidying
https://bugs.webkit.org/show_bug.cgi?id=142438

Reviewed by Anders Carlsson.

* dom/EventNames.h: Sorted the event names into a single list instead of
the rudimentary attempts at organizing the list that simply made it hard
to see what is and is not in the list. Removed two unused event names.
I'm sure there are more. Reorganized the EventName class, now a struct,
into a more conventional "public first" order. Got the function bodies
out of the struct so we can see more clearly what is in the struct.
Made more things const.
(WebCore::EventNames::touchEventNames): Changed the return value to a
std::array of reference wrappers rather than a vector of atomic strings.
This should eliminate unnecessary memory allocation and reference count churn.

* dom/EventNames.cpp: Changed initialization based on the above.

* dom/EventTarget.cpp:
(WebCore::EventTarget::getEventListeners): Use NeverDestroyed instead of
DEPRECATED_DEFINE_LOCAL and also just tightened up the function a bit.

* dom/Node.cpp:
(WebCore::Node::didMoveToNewDocument): Streamlined this function with
modern for loops, auto, and also tried to make what it does a bit clearer,
by making loops that are just based on numbers of event listeners look a
bit less like code that actually iterates a vector of listeners. Also used
the type unsigned instead of size_t.

* platform/ThreadGlobalData.h: Updated since it's a struct instead of class now.
(Why is this file in platform!?)

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

4 years agoUse FastMalloc (bmalloc) instead of BlockAllocator for GC pages
ggaren@apple.com [Sat, 7 Mar 2015 19:04:08 +0000 (19:04 +0000)]
Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
https://bugs.webkit.org/show_bug.cgi?id=140900

Reviewed by Mark Hahnenberg.

Re-landing just the MarkedBlock piece of this patch.

* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::allocateBlock):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::create):
(JSC::MarkedBlock::destroy):
(JSC::MarkedBlock::MarkedBlock):
* heap/MarkedBlock.h:
(JSC::MarkedBlock::capacity):
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::freeBlock):

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

4 years agoSource/WebCore:
bfulgham@apple.com [Sat, 7 Mar 2015 18:03:10 +0000 (18:03 +0000)]
Source/WebCore:
[Win] Increase TestWebKitAPI Test Coverage
https://bugs.webkit.org/show_bug.cgi?id=142433

Reviewed by Darin Adler.

Correct some build deficiencies that prevent TestWebKitAPI
from executing certain tests on Windows.

* WebCore.vcxproj/copyForwardingHeaders.cmd: Copy the interpreter
headers.
* css/CSSParser.h: Export necessary symbols
* css/CSSParserMode.h: Ditto.
* css/StyleProperties.h: Ditto.

Tools:
[Win] Increase TestWebKitAPI Test Coverage[Win] Increase TestWebKitAPI Test Coverage
https://bugs.webkit.org/show_bug.cgi?id=142433

Reviewed by Darin Adler.

Include more TestWebKitAPI tests when building for Windows. Also
fix a build error in MetaAllocator.cpp caused by one of the
Microsoft headers #defining 'small'.

* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters:
* TestWebKitAPI/Tests/WTF/MetaAllocator.cpp:

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

4 years agofromGlobalCode has an unused Debugger* argument
rniwa@webkit.org [Sat, 7 Mar 2015 17:38:40 +0000 (17:38 +0000)]
fromGlobalCode has an unused Debugger* argument
https://bugs.webkit.org/show_bug.cgi?id=142430

Reviewed by Darin Adler.

Removed the debugger argument from UnlinkedFunctionExecutable::fromGlobalCode and
FunctionExecutable::fromGlobalCode since it's not used in either function.

Also use reference in other arguments.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedFunctionExecutable::fromGlobalCode):
* bytecode/UnlinkedCodeBlock.h:
* runtime/Executable.cpp:
(JSC::FunctionExecutable::fromGlobalCode):
* runtime/Executable.h:
* runtime/FunctionConstructor.cpp:
(JSC::constructFunctionSkippingEvalEnabledCheck):

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

4 years agoRename SOFT_LINK_FRAMEWORK_{HEADER,SOURCE} to SOFT_LINK_FRAMEWORK_FOR_{HEADER,SOURCE}
ddkilzer@apple.com [Sat, 7 Mar 2015 17:34:38 +0000 (17:34 +0000)]
Rename SOFT_LINK_FRAMEWORK_{HEADER,SOURCE} to SOFT_LINK_FRAMEWORK_FOR_{HEADER,SOURCE}
<http://webkit.org/b/142434>

Reviewed by Darin Adler.

* platform/cf/CoreMediaSoftLink.cpp:
* platform/cf/CoreMediaSoftLink.h:
* platform/cf/MediaAccessibilitySoftLink.cpp:
* platform/cf/MediaAccessibilitySoftLink.h:
* platform/mac/SoftLinking.h:
* platform/win/SoftLinking.h:
- Do the rename.

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

4 years ago[Win] Turn off a warning on Windows.
bfulgham@apple.com [Sat, 7 Mar 2015 06:12:57 +0000 (06:12 +0000)]
[Win] Turn off a warning on Windows.

Reduce build logging noise on Windows.

* JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:

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

4 years agoWeb Inspector: JS Pretty Printing: "case" or "default" outside of switch causes unbal...
commit-queue@webkit.org [Sat, 7 Mar 2015 06:10:36 +0000 (06:10 +0000)]
Web Inspector: JS Pretty Printing: "case" or "default" outside of switch causes unbalanced indentation
https://bugs.webkit.org/show_bug.cgi?id=142428

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

* Tools/PrettyPrinting/CodeMirrorFormatters.js:
* UserInterface/Views/CodeMirrorFormatters.js:
Fix "case" and "default" indentation rules to only happen inside a switch.

* Tools/PrettyPrinting/js-tests/switch-case-default-expected.js:
* Tools/PrettyPrinting/js-tests/switch-case-default.js:
Add tests for "case" and "default" nested inside and outside of switches.

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

4 years agoUnreviewed EFL gardening on 7th Mar.
gyuyoung.kim@samsung.com [Sat, 7 Mar 2015 04:19:07 +0000 (04:19 +0000)]
Unreviewed EFL gardening on 7th Mar.

Remove duplicated css nap scroll skip.
Mark printing, compositing mask, svg pattern, and webgl visibility tests to failures.

* platform/efl/TestExpectations:

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

4 years agoWeb Inspector: ES6: Improved Support for Iterator Objects
commit-queue@webkit.org [Sat, 7 Mar 2015 04:02:53 +0000 (04:02 +0000)]
Web Inspector: ES6: Improved Support for Iterator Objects
https://bugs.webkit.org/show_bug.cgi?id=142420

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

Source/JavaScriptCore:

* inspector/protocol/Runtime.json:
Add new object subtype "iterator" for built-in iterator objects.

* inspector/InjectedScriptSource.js:
Return iterator values as Entry objects.

* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::subtype):
Identify "iterator" typed objects.

(Inspector::JSInjectedScriptHost::getInternalProperties):
Provide internal properties for the different Iterator objects.

(Inspector::JSInjectedScriptHost::iteratorEntries):
Fetch the next few iterator entries of a built-in iterator object.

* inspector/JSInjectedScriptHost.h:
* inspector/JSInjectedScriptHostPrototype.cpp:
(Inspector::JSInjectedScriptHostPrototype::finishCreation):
(Inspector::jsInjectedScriptHostPrototypeFunctionIteratorEntries):
Call through to JSInjectedScriptHost.

* runtime/JSArgumentsIterator.cpp:
(JSC::JSArgumentsIterator::clone):
* runtime/JSArgumentsIterator.h:
(JSC::JSArgumentsIterator::iteratedValue):
* runtime/JSArrayIterator.cpp:
(JSC::JSArrayIterator::kind):
(JSC::JSArrayIterator::iteratedValue):
(JSC::JSArrayIterator::clone):
* runtime/JSArrayIterator.h:
* runtime/JSMapIterator.cpp:
(JSC::JSMapIterator::finishCreation):
(JSC::JSMapIterator::clone):
* runtime/JSMapIterator.h:
(JSC::JSMapIterator::kind):
(JSC::JSMapIterator::iteratedValue):
* runtime/JSSetIterator.cpp:
(JSC::JSSetIterator::finishCreation):
(JSC::JSSetIterator::clone):
* runtime/JSSetIterator.h:
(JSC::JSSetIterator::kind):
(JSC::JSSetIterator::iteratedValue):
* runtime/JSStringIterator.cpp:
(JSC::JSStringIterator::iteratedValue):
(JSC::JSStringIterator::clone):
* runtime/JSStringIterator.h:
Add accessors for internal properties and provide a way to clone the
iterator so we can be at the same index and peek at the next few
objects without modifying the original iterator object.

Source/WebInspectorUI:

* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl):
Treat an iterator like an object.

* UserInterface/Views/ObjectPreviewView.js:
Output iterator previews with []s, not {}s.

LayoutTests:

* inspector/model/remote-object.html:
Update tests to include iterator objects.

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

4 years ago[Win] Mark svg/fonts/svg-font-horiz-orig.html as Image-only failing.
bfulgham@apple.com [Sat, 7 Mar 2015 03:47:52 +0000 (03:47 +0000)]
[Win] Mark svg/fonts/svg-font-horiz-orig.html as Image-only failing.

* platform/win/TestExpectations:

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

4 years agoCreate new buttons for media controls on OSX.
roger_fong@apple.com [Sat, 7 Mar 2015 03:22:15 +0000 (03:22 +0000)]
Create new buttons for media controls on OSX.
https://bugs.webkit.org/show_bug.cgi?id=142415.
<rdar://problem/20019441>
Reviewed by Eric Carlson.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-wireless-playback-picker-button):
(audio::-webkit-media-controls-wireless-playback-picker-button.playing):
(audio:-webkit-full-screen::-webkit-media-controls-wireless-playback-picker-button):

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

4 years ago[Content Extensions] Move compiling of content extensions to the UIProcess
weinig@apple.com [Sat, 7 Mar 2015 02:41:44 +0000 (02:41 +0000)]
[Content Extensions] Move compiling of content extensions to the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=142402

Reviewed by Benjamin Poulain.

Source/WebCore:

* contentextensions/CompiledContentExtension.cpp:
(WebCore::ContentExtensions::CompiledContentExtension::~CompiledContentExtension):
(WebCore::ContentExtensions::CompiledContentExtension::create): Deleted.
(WebCore::ContentExtensions::CompiledContentExtension::CompiledContentExtension): Deleted.
* contentextensions/CompiledContentExtension.h:
(WebCore::ContentExtensions::CompiledContentExtension::bytecode): Deleted.
(WebCore::ContentExtensions::CompiledContentExtension::actions): Deleted.
Convert CompiledContentExtension to be an abstract base class so that we can back it however
we like at the WebKit level. Since it doesn't necessarily use Vectors for its backing store
any more, change the interface to use pointer/length.

* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
* contentextensions/ContentExtensionCompiler.h:
Change compileRuleList to return compiled result as the raw Vectors rather than as
a CompiledContentExtension, since that class is now abstract. It is up to the caller
to copy the data into its final home.

* contentextensions/ContentExtensionRule.cpp:
(WebCore::ContentExtensions::Action::deserialize):
* contentextensions/ContentExtensionRule.h:
Switch Action::deserialize to take pointer/length rather than a Vector.

* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
Pull getting the serialized actions from the compiled extension out of the loop
to avoid calling the virtual function multiple times. Pass the bytecode and actions
as pointer/length pairs rather than Vectors.

* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::getBits):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
* contentextensions/DFABytecodeInterpreter.h:
(WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):
Switch the interpreter to take pointer/length rather than a Vector.

* page/UserContentController.cpp:
(WebCore::UserContentController::addUserContentExtension):
(WebCore::UserContentController::removeUserContentExtension):
(WebCore::UserContentController::removeAllUserContentExtensions):
(WebCore::UserContentController::addUserContentFilter): Deleted.
(WebCore::UserContentController::removeUserContentFilter): Deleted.
(WebCore::UserContentController::removeAllUserContentFilters): Deleted.
* page/UserContentController.h:
Unify terminology to use the term UserContentExtension rather than UserContentFilter.

Source/WebKit2:

* Shared/API/APIObject.h:
Rename UserContentFilter type to UserContentExtension to match new unified naming.

* Shared/WebCompiledContentExtension.cpp: Added.
(WebKit::WebCompiledContentExtension::create):
(WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
(WebKit::WebCompiledContentExtension::~WebCompiledContentExtension):
(WebKit::WebCompiledContentExtension::bytecode):
(WebKit::WebCompiledContentExtension::bytecodeLength):
(WebKit::WebCompiledContentExtension::actions):
(WebKit::WebCompiledContentExtension::actionsLength):
* Shared/WebCompiledContentExtension.h: Added.
Add new WebKit2 implementation of CompiledContentExtension. Right now it is the same as the old
WebCore based CompiledContentExtension, but in subsequent patches, it will use shared/file backed
memory.

* Shared/WebCompiledContentExtensionData.cpp: Added.
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebCompiledContentExtensionData.h: Added.
Add encodable/decodable holder for the compiled content extension data for use in IPC. Right
now it is doing the naive thing and always copying the data, but in subsequent patches, it will
use shared/file backed memory.

* Shared/WebPageGroupData.cpp:
(WebKit::WebPageGroupData::encode):
(WebKit::WebPageGroupData::decode):
* Shared/WebPageGroupData.h:
Rename member to match new unification on the name userContentExtension. Change the value from
the serialized JSON (as a String) to WebCompiledContentExtensionData.

* UIProcess/API/APIUserContentExtension.cpp: Copied from Source/WebKit2/UIProcess/API/APIUserContentFilter.cpp.
(API::UserContentExtension::UserContentExtension):
(API::UserContentExtension::~UserContentExtension):
(API::UserContentFilter::UserContentFilter): Deleted.
(API::UserContentFilter::~UserContentFilter): Deleted.
* UIProcess/API/APIUserContentExtension.h: Copied from Source/WebKit2/UIProcess/API/APIUserContentFilter.h.
* UIProcess/API/APIUserContentFilter.cpp: Removed.
* UIProcess/API/APIUserContentFilter.h: Removed.
Renamed UserContentFilter to APIUserContentExtension. Updated to store the compiled extension (as a WebCompiledContentExtension)
rather than the serialized JSON.

* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupAddUserContentFilter):
(WKPageGroupRemoveUserContentFilter):
(WKPageGroupRemoveAllUserContentFilters):
* UIProcess/API/C/WKUserContentControllerRef.cpp:
(WKUserContentControllerAddUserContentFilter):
(WKUserContentControllerRemoveAllUserContentFilters):
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController _addUserContentFilter:]):
(-[WKUserContentController _removeUserContentFilter:]):
(-[WKUserContentController _removeAllUserContentFilters]):
Update for rename of APIUserContentFilter -> UserContentExtension.

* UIProcess/API/C/WKUserContentFilterRef.cpp:
(WKUserContentFilterGetTypeID):
(WKUserContentFilterCreate):
Update for rename of APIUserContentFilter -> UserContentExtension. Also make WKUserContentFilterCreate eagerly
compile rule list to a WebCompiledContentExtensionData.

* UIProcess/API/Cocoa/_WKUserContentFilter.mm:
(-[_WKUserContentFilter initWithName:serializedRules:]):
(-[_WKUserContentFilter dealloc]):
(-[_WKUserContentFilter _apiObject]):
Update for rename of APIUserContentFilter -> UserContentExtension. Also make initWithName:serializedRules: eagerly
compile rule list to a WebCompiledContentExtensionData.

* UIProcess/API/Cocoa/_WKUserContentFilterInternal.h:
(WebKit::wrapper):
Update for rename of APIUserContentFilter -> UserContentExtension.

* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addUserContentExtension):
(WebKit::WebUserContentControllerProxy::removeUserContentExtension):
(WebKit::WebUserContentControllerProxy::removeAllUserContentExtensions):
(WebKit::WebUserContentControllerProxy::addUserContentFilter): Deleted.
(WebKit::WebUserContentControllerProxy::removeUserContentFilter): Deleted.
(WebKit::WebUserContentControllerProxy::removeAllUserContentFilters): Deleted.
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::addUserContentExtension):
(WebKit::WebPageGroup::removeUserContentExtension):
(WebKit::WebPageGroup::removeAllUserContentExtensions):
(WebKit::WebPageGroup::addUserContentFilter): Deleted.
(WebKit::WebPageGroup::removeUserContentFilter): Deleted.
(WebKit::WebPageGroup::removeAllUserContentFilters): Deleted.
* UIProcess/WebPageGroup.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::addUserContentExtensions):
(WebKit::WebUserContentController::removeUserContentExtension):
(WebKit::WebUserContentController::removeAllUserContentExtensions):
(WebKit::WebUserContentController::addUserContentFilters): Deleted.
(WebKit::WebUserContentController::removeUserContentFilter): Deleted.
(WebKit::WebUserContentController::removeAllUserContentFilters): Deleted.
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/UserContent/WebUserContentController.messages.in:
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::WebPageGroupProxy):
(WebKit::WebPageGroupProxy::addUserContentExtension):
(WebKit::WebPageGroupProxy::removeUserContentExtension):
(WebKit::WebPageGroupProxy::removeAllUserContentExtensions):
(WebKit::WebPageGroupProxy::addUserContentFilter): Deleted.
(WebKit::WebPageGroupProxy::removeUserContentFilter): Deleted.
(WebKit::WebPageGroupProxy::removeAllUserContentFilters): Deleted.
* WebProcess/WebPage/WebPageGroupProxy.h:
* WebProcess/WebPage/WebPageGroupProxy.messages.in:
Pipe the compiled extension from the UIProcess to the WebProcess.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: Copied from Tools/TestWebKitAPI/Tests/WebCore/ContentFilter.cpp.
(TestWebKitAPI::InMemoryCompiledContentExtension::create):
(TestWebKitAPI::InMemoryCompiledContentExtension::~InMemoryCompiledContentExtension):
(TestWebKitAPI::InMemoryCompiledContentExtension::InMemoryCompiledContentExtension):
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebCore/ContentFilter.cpp: Removed.
Update test for new name (ContentFilter -> ContentExtensions) and API (CompiledContentExtension
is now abstract).

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

4 years ago[Win] Mark svg/fonts/svg-font-horiz-orig.html as failing.
bfulgham@apple.com [Sat, 7 Mar 2015 02:00:11 +0000 (02:00 +0000)]
[Win] Mark svg/fonts/svg-font-horiz-orig.html as failing.
https://bugs.webkit.org/show_bug.cgi?id=142423

* platform/win/TestExpectations:

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

4 years agoRedraw timeline background when updating media time.
roger_fong@apple.com [Sat, 7 Mar 2015 01:58:44 +0000 (01:58 +0000)]
Redraw timeline background when updating media time.
https://bugs.webkit.org/show_bug.cgi?id=142421.
<rdar://problem/20065104>
Reviewed by Brent Fulgham.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleTimeUpdate):

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

4 years agoEnable selectors level 4's :lang() by default
diorahman@rockybars.com [Sat, 7 Mar 2015 01:52:57 +0000 (01:52 +0000)]
Enable selectors level 4's :lang() by default
https://bugs.webkit.org/show_bug.cgi?id=142302

Reviewed by Benjamin Poulain.

No behavior change.

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::setLangArgumentList):
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
(WebCore::appendLangArgumentList):
(WebCore::CSSSelector::selectorText):
(WebCore::CSSSelector::setLangArgumentList):
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorCheckerTestFunctions.h:
(WebCore::matchesLangPseudoClass):
(WebCore::matchesLangPseudoClassDeprecated): Deleted.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):

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

4 years agoAdd inherit support from scroll snap CSS properties
bfulgham@apple.com [Sat, 7 Mar 2015 01:48:41 +0000 (01:48 +0000)]
Add inherit support from scroll snap CSS properties
https://bugs.webkit.org/show_bug.cgi?id=136344
<rdar://problem/18162329>

Reviewed by Dean Jackson.

* css3/scroll-snap/scroll-snap-inherit.html: Added.
* css3/scroll-snap/scroll-snap-inherit-expected.txt: Added.

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

4 years agoREGRESSION(r180595): construct varargs fails in FTL
rniwa@webkit.org [Sat, 7 Mar 2015 01:39:03 +0000 (01:39 +0000)]
REGRESSION(r180595): construct varargs fails in FTL
https://bugs.webkit.org/show_bug.cgi?id=142030

Reviewed by Michael Saboff.

Source/JavaScriptCore:

Increase sizeOfCallVarargs as done for sizeOfConstructVarargs in r180651.

* ftl/FTLInlineCacheSize.cpp:
(JSC::FTL::sizeOfCallVarargs):

LayoutTests:

Re-enable the test on 64-bit iOS.

* js/regress/script-tests/deltablue-varargs.js:

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

4 years agoSetting scroll-snap-desination to (100% 100%) locks up WebKit
bfulgham@apple.com [Sat, 7 Mar 2015 01:29:00 +0000 (01:29 +0000)]
Setting scroll-snap-desination to (100% 100%) locks up WebKit
https://bugs.webkit.org/show_bug.cgi?id=142414
<rdar://problem/20077275>

Reviewed by Dean Jackson.

Source/WebCore:

Tested by css3/scroll-snap/scroll-snap-desination-lock-up.html.

Correct an infinite loop that is triggered when you combine a repeating (100%)
scroll-snap-point-{x,y} along with a 100% scroll-snap-destination value.

* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::updateFromStyle): Make sure we break out of the loop properly when
the scroll-snap-point-{x,y} step is the same as the scroll-snap-destination.

LayoutTests:

* css3/scroll-snap/scroll-snap-desination-lock-up.html: Added.
* css3/scroll-snap/scroll-snap-desination-lock-up-expected.txt: Added.

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

4 years agohttps://bugs.webkit.org/show_bug.cgi?id=142416
dino@apple.com [Sat, 7 Mar 2015 01:03:37 +0000 (01:03 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=142416

Unreviewed build fix.

* platform/spi/cocoa/QuartzCoreSPI.h: Add kCAFilterPlusL.

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

4 years ago[Win] Correct Windows build.
bfulgham@apple.com [Sat, 7 Mar 2015 00:41:28 +0000 (00:41 +0000)]
[Win] Correct Windows build.

Rubberstamped by Michael Saboff

* win/AssembleBuildLogs/AssembleLogs.cmd: Correct cut/paste error
in the GOTO labels.

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

4 years agoSupport "plus-lighter" in mix-blend mode
dino@apple.com [Sat, 7 Mar 2015 00:08:32 +0000 (00:08 +0000)]
Support "plus-lighter" in mix-blend mode
https://bugs.webkit.org/show_bug.cgi?id=142416
<rdar://problem/19993979>

Reviewed by Darin Adler and Sam Weinig.

Source/WebCore:

Support the "plus-lighter" blending mode to CSS.
See my reply to: https://lists.w3.org/Archives/Public/public-fx/2015JanMar/0021.html

Test: css3/blending/svg-blend-plus-lighter.html

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): mix-blend-mode can now accept the
new keyword.
* css/CSSPrimitiveValueMappings.h: Add the mappings to/from the GraphicsType.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator BlendMode):
* css/CSSValueKeywords.in: Add comment to show plus-darker and plus-lighter
are available.
* platform/graphics/GraphicsTypes.cpp: New GraphicsType for PlusLighter.
* platform/graphics/GraphicsTypes.h:
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Map to the CA filter.
(PlatformCAFilters::setBlendingFiltersOnLayer):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setPlatformCompositeOperation): Map to the CG
blending flag.

Source/WebKit2:

Output the appropriate blending type when logging.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):

LayoutTests:

Add tests and new expected results for plus-lighter.

* css3/blending/blend-mode-property-parsing-expected.txt:
* css3/blending/blend-mode-simple-composited.html:
* css3/blending/blend-mode-simple.html:
* css3/blending/script-tests/blend-mode-property-parsing.js:
* css3/blending/svg-blend-plus-lighter.html: Added.
* platform/mac/css3/blending/blend-mode-simple-composited-expected.png:
* platform/mac/css3/blending/blend-mode-simple-composited-expected.txt:
* platform/mac/css3/blending/blend-mode-simple-expected.png:
* platform/mac/css3/blending/blend-mode-simple-expected.txt:
* platform/mac/css3/blending/svg-blend-plus-lighter-expected.txt: Added.

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

4 years agoSoft link MediaAccessibility using new macros.
achristensen@apple.com [Sat, 7 Mar 2015 00:03:39 +0000 (00:03 +0000)]
Soft link MediaAccessibility using new macros.
https://bugs.webkit.org/show_bug.cgi?id=142406

Reviewed by David Kilzer.

* Configurations/WebCore.unexp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* page/CaptionUserPreferencesMediaAF.cpp:
* platform/cf/MediaAccessibilitySoftLink.cpp: Added.
* platform/cf/MediaAccessibilitySoftLink.h: Added.

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

4 years agoAdd 'initial' keyword support for scroll snap CSS properties
bfulgham@apple.com [Fri, 6 Mar 2015 23:39:57 +0000 (23:39 +0000)]
Add 'initial' keyword support for scroll snap CSS properties
https://bugs.webkit.org/show_bug.cgi?id=136345
<rdar://problem/18162325>

Reviewed by Dean Jackson.

Source/WebCore:

Tested by css3/scroll-snap/scroll-snap-initial.html

The existing implementation already had 'initial' keyword support, but did not fully follow
the CSS specification. In particular, the 'initial' state for the scroll-snap-points-x and
scroll-snap-points-y properties was not handled correctly.

Revise implementation to represent ScrollSnapPoints as a pointer, so that 'none' is a valid
state.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::scrollSnapPoints): If 'points' is null, return CSSValueNone.
* css/CSSPropertyNames.in: Provide custom initial/inherit handles for snap point x/y sets.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertScrollSnapPoints): Update to represent ScrollSnapPoints
as a pointer.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX): Provide custom pointer-based
implementation for ScrollSnapPoints.
(WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsX): Ditto.
(WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsY): Ditto.
(WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsY): Ditto."
* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::updateFromStyle): Handle ScrollSnapPoints as pointers.
(WebCore::updateSnapOffsetsForScrollableArea): Ditto.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::scrollSnapPointsX): Update to use pointer-based representation of ScrollSnapPoints.
(WebCore::RenderStyle::scrollSnapPointsY): Ditto.
(WebCore::RenderStyle::setScrollSnapPointsX): Ditto.
(WebCore::RenderStyle::setScrollSnapPointsY): Ditto.
(WebCore::RenderStyle::initialScrollSnapPointsX): Deleted.
(WebCore::RenderStyle::initialScrollSnapPointsY): Deleted.
* rendering/style/RenderStyle.h:
* rendering/style/StyleScrollSnapPoints.cpp:
(WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints): Revise constructor to handle pointer argument.
* rendering/style/StyleScrollSnapPoints.h:

LayoutTests:

* css3/scroll-snap/scroll-snap-property-computed-style.js: Update for corrected 'initial' behavior.
* css3/scroll-snap/scroll-snap-property-computed-style-expected.txt: Rebaselined.
* css3/scroll-snap/scroll-snap-initial.html: Added.
* css3/scroll-snap/scroll-snap-initial-expected.txt: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/win/TestExpectations:

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

4 years agoWeb Inspector: Adopt Object Literal Method Property Syntax
joepeck@webkit.org [Fri, 6 Mar 2015 22:41:15 +0000 (22:41 +0000)]
Web Inspector: Adopt Object Literal Method Property Syntax
https://bugs.webkit.org/show_bug.cgi?id=142409

Reviewed by Timothy Hatcher.

Mechanical change touching lots of files.

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

4 years agoWeb Inspector: Adopt Object Literal Shorthand Property Construction Syntax
joepeck@webkit.org [Fri, 6 Mar 2015 22:41:11 +0000 (22:41 +0000)]
Web Inspector: Adopt Object Literal Shorthand Property Construction Syntax
https://bugs.webkit.org/show_bug.cgi?id=142374

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:

Source/WebInspectorUI:

Mechanical change touching lots of files.

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

4 years agoWeb Inspector: Populate Debugger sidebar with all debuggable resources
jonowells@apple.com [Fri, 6 Mar 2015 22:33:27 +0000 (22:33 +0000)]
Web Inspector: Populate Debugger sidebar with all debuggable resources
https://bugs.webkit.org/show_bug.cgi?id=141232

Reviewed by Timothy Hatcher.

All debuggable resources now show in the debugger sidebar. The _resourceAdded handler now adds a script resource
to the sidebar regardless of whether it has any breakpoints set on it. The new function
_getTreeElementForSourceCodeAndAddToContentTreeOutline adds the element to the debugger sidebar before
_addBreakpointsForSourceCode is called. Removing all breakpoints from a resource no longer removes that
resource from the debugger sidebar. TreeOutline.prototype.removeChild has been updated so the disclosure
button will disappear and reappear correctly when removing/adding breakpoints.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint): Expand resource if first breakpoint is added.
(WebInspector.DebuggerSidebarPanel.prototype._getTreeElementForSourceCodeAndAddToContentTreeOutline): Created.
(WebInspector.DebuggerSidebarPanel.prototype._resourceAdded): Checks resource type and adds scripts to sidebar.
(WebInspector.DebuggerSidebarPanel.prototype._mainResourceChanged):
(WebInspector.DebuggerSidebarPanel.prototype._scriptAdded):
(WebInspector.DebuggerSidebarPanel.prototype._removeBreakpointTreeElement): No longer removes empty parent.
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected): Displays scripts without breakpoints now.

* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.get disclosureButton): Drive-by fix. Unused. Deleted.

* UserInterface/Views/TreeOutline.js:
(TreeOutline.prototype.removeChild):
Remove parent class and set hasChildren to false if necessary to properly hide and reveal disclosure button
for elements whose children have been removed.

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

4 years agoES6: Object Literal Extensions - Methods
commit-queue@webkit.org [Fri, 6 Mar 2015 22:31:28 +0000 (22:31 +0000)]
ES6: Object Literal Extensions - Methods
https://bugs.webkit.org/show_bug.cgi?id=142390

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-06
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Support method syntax in object literals.

* parser/Parser.h:
* parser/Parser.cpp:
(JSC::stringForFunctionMode):
(JSC::Parser<LexerType>::parseProperty):
Methods are allowed for identifier, string, and numeric names,
and computed property names.

(JSC::Parser<LexerType>::parsePropertyMethod):
Helper for parsing a property method.

LayoutTests:

* js/object-literal-computed-methods-expected.txt: Added.
* js/object-literal-computed-methods.html: Added.
* js/object-literal-methods-expected.txt: Added.
* js/object-literal-methods.html: Added.
* js/script-tests/object-literal-computed-methods.js: Added.
* js/script-tests/object-literal-methods.js: Added.

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

4 years ago2015-03-06 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Fri, 6 Mar 2015 22:01:58 +0000 (22:01 +0000)]
2015-03-06  Geoffrey Garen  <ggaren@apple.com>

        Fix crashes seen on the the Windows buildbots after my last patch.

        Unreviewed.

        * wtf/FastMalloc.cpp:
        (WTF::fastAlignedMalloc): Let's pass these arguments in the right order.

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

4 years ago__proto__ shorthand property should not modify prototype in Object Literal construction
joepeck@webkit.org [Fri, 6 Mar 2015 21:31:27 +0000 (21:31 +0000)]
__proto__ shorthand property should not modify prototype in Object Literal construction
https://bugs.webkit.org/show_bug.cgi?id=142382

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

When parsing shorthand property syntax we know we will do a
put direct, even if the property name is __proto__. Pass that
information through to bytecode generation.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitDirectPutById):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::PropertyListNode::emitPutConstantProperty):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createGetterOrSetterProperty):
(JSC::ASTBuilder::createProperty):
* parser/NodeConstructors.h:
(JSC::PropertyNode::PropertyNode):
* parser/Nodes.h:
(JSC::PropertyNode::putType):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseProperty):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createProperty):

LayoutTests:

* js/object-literal-shorthand-construction-expected.txt:
* js/script-tests/object-literal-shorthand-construction.js:
Update test to cover the __proto__ shorthand case which is
different from longhand case.

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

4 years agoReskin Captions button and container on OSX.
roger_fong@apple.com [Fri, 6 Mar 2015 21:29:29 +0000 (21:29 +0000)]
Reskin Captions button and container on OSX.
https://bugs.webkit.org/show_bug.cgi?id=142383.
<rdar://problem/20061466>
Reviewed by Eric Carlson.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-toggle-closed-captions-button): Create new captions button icon.
Update caption container to match rest of media controls better.
(audio::-webkit-media-controls-closed-captions-container):
(audio::-webkit-media-controls-closed-captions-container .list):
(audio::-webkit-media-controls-closed-captions-container h3):
(audio::-webkit-media-controls-closed-captions-container ul):
(audio::-webkit-media-controls-closed-captions-container li):
(audio::-webkit-media-controls-closed-captions-container li:focus):
(audio::-webkit-media-controls-closed-captions-container li:hover):
Fix up some fonts to make fonts between captions, status display and time displays consistent.
(audio::-webkit-media-controls-status-display):
(audio::-webkit-media-controls-time-remaining-display):

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

4 years ago2015-03-06 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Fri, 6 Mar 2015 20:19:47 +0000 (20:19 +0000)]
2015-03-06  Geoffrey Garen  <ggaren@apple.com>

        Fix crashes seen on the the 32-bit buildbots after my last patch.

        Unreviewed.

        * heap/CopiedBlock.h:
        (JSC::CopiedBlock::payload):
        * heap/CopiedSpace.cpp:
        (JSC::CopiedSpace::tryAllocateOversize): Round up to the right alignment,
        since the size of the CopiedBlock class is not guaranteed to be the
        right alignment, and is in fact the wrong alignment on 32-bit.

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

4 years agoREGRESSION (r180782): Data Detector popovers are not dismissed on scroll or zoom
bdakin@apple.com [Fri, 6 Mar 2015 20:13:46 +0000 (20:13 +0000)]
REGRESSION (r180782): Data Detector popovers are not dismissed on scroll or zoom
https://bugs.webkit.org/show_bug.cgi?id=142371
-and corresponding-
rdar://problem/20059224

Reviewed by Tim Horton.

This patch has the WKImmediateActionController keep track of whether or not it has
an active immediate action. Then we only call into Lookup and DD if the window is
key OR if the WKView’s immediateActionController has an active action.
* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]):
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController initWithPage:view:recognizer:]):
(-[WKImmediateActionController willDestroyView:]):
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController hasActiveImmediateAction]):
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):

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

4 years agoEnable disk cache validation test on iOS
antti@apple.com [Fri, 6 Mar 2015 19:56:17 +0000 (19:56 +0000)]
Enable disk cache validation test on iOS
https://bugs.webkit.org/show_bug.cgi?id=142405

Reviewed by Andreas Kling.

The features is enabled.

* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:

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

4 years ago[Web Audio] Decoding specific .m4a file crashes tab
jer.noble@apple.com [Fri, 6 Mar 2015 19:31:16 +0000 (19:31 +0000)]
[Web Audio] Decoding specific .m4a file crashes tab
https://bugs.webkit.org/show_bug.cgi?id=139545

Reviewed by Eric Carlson.

Source/WebCore:

Test: webaudio/decode-audio-data-too-short.html

Bail out early if CoreAudio reports the number of frames in the file to be negative.

* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::createBus):

LayoutTests:

* webaudio/decode-audio-data-too-short-expected.txt: Added.
* webaudio/decode-audio-data-too-short.html: Added.
* webaudio/resources/media/too-short.m4a: Added.

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

4 years agoScroll to make the video element visible when exiting fullscreen.
commit-queue@webkit.org [Fri, 6 Mar 2015 19:28:26 +0000 (19:28 +0000)]
Scroll to make the video element visible when exiting fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=141439

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-03-06
Reviewed by Simon Fraser.

Source/WebCore:

This patch will scroll the element so it is visible when exiting fullscreen,
but only if the element is completely scrolled off screen.
Also update the element screen rect so exit animation goes to the correct location.

* dom/Element.cpp:
(WebCore::Element::scrollIntoViewIfNotVisible): Added.
* dom/Element.h: Add declaration for scrollIntoViewIfNotVisible.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController fullscreenMayReturnToInline]):
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController playerViewController:restoreUserInterfaceForOptimizedFullscreenStopWithCompletionHandler:]):
(-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]):
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
(WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal):
(WebVideoFullscreenInterfaceAVKit::exitFullscreen):
(WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
(WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
(WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline):
* rendering/ScrollBehavior.cpp:
* rendering/ScrollBehavior.h:

Source/WebKit2:

This patch will restore interface state when exiting fullscreen.
Adds preparedToReturnToInline to continue exiting once the interface is updated.

* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
(WebKit::WebVideoFullscreenManagerProxy::fullscreenMayReturnToInline):
(WebKit::WebVideoFullscreenManagerProxy::preparedToReturnToInline): added.
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.messages.in:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::fullscreenMayReturnToInline):

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

4 years agoCrash in -[WebCascadeList objectAtIndex:] + 195
mmaxfield@apple.com [Fri, 6 Mar 2015 19:08:55 +0000 (19:08 +0000)]
Crash in -[WebCascadeList objectAtIndex:] + 195
https://bugs.webkit.org/show_bug.cgi?id=141274

Reviewed by David Kilzer.

Source/WebCore:

CTFontDescriptorRefs can live forever in caches inside CoreText, which means our
WebCascadeList can too.

Test: platform/mac/fast/text/crash-complextextcontroller-custom-cascade-list.html

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::FontCascade): Initialize WeakPtrFactory.
* platform/graphics/FontCascade.h:
(WebCore::FontCascade::createWeakPtr):
* platform/graphics/mac/ComplexTextControllerCoreText.mm: Migrate the raw pointer
to WeakPtr.
(-[WebCascadeList initWithFont:character:]):
(-[WebCascadeList count]):
(-[WebCascadeList objectAtIndex:]):

Source/WTF:

* wtf/WeakPtr.h:
(WTF::WeakPtrFactory::createWeakPtr): WebCascadeList uses a const FontCascade,
and it calls createWeakPtr() on it. Therefore, createWeakPtr has to be marked
const.
(WTF::WeakPtrFactory::operator=): Removed because it was broken and had no
callers

LayoutTests:

* platform/mac/fast/text/crash-complextextcontroller-custom-cascade-list-expected.txt: Added.
* platform/mac/fast/text/crash-complextextcontroller-custom-cascade-list.html: Added.

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

4 years agoRename BreakingContextInlineHeaders.h to BreakingContext.h
mmaxfield@apple.com [Fri, 6 Mar 2015 19:06:30 +0000 (19:06 +0000)]
Rename BreakingContextInlineHeaders.h to BreakingContext.h
https://bugs.webkit.org/show_bug.cgi?id=142404

Reviewed by Simon Fraser.

No point naming it "InlineHeaders" when there are no non-inline-headers files.

No new tests because this is just a rename of a file.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderBlockLineLayout.cpp:
* rendering/line/BreakingContext.h: Renamed from Source/WebCore/rendering/line/BreakingContextInlineHeaders.h.
(WebCore::WordMeasurement::WordMeasurement):
(WebCore::BreakingContext::BreakingContext):
(WebCore::BreakingContext::currentObject):
(WebCore::BreakingContext::lineBreak):
(WebCore::BreakingContext::lineWidth):
(WebCore::BreakingContext::atEnd):
(WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
(WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
(WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory):
(WebCore::BreakingContext::InlineIteratorHistory::push):
(WebCore::BreakingContext::InlineIteratorHistory::update):
(WebCore::BreakingContext::InlineIteratorHistory::renderer):
(WebCore::BreakingContext::InlineIteratorHistory::offset):
(WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator):
(WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode):
(WebCore::BreakingContext::InlineIteratorHistory::get):
(WebCore::BreakingContext::InlineIteratorHistory::current):
(WebCore::BreakingContext::InlineIteratorHistory::historyLength):
(WebCore::BreakingContext::InlineIteratorHistory::moveTo):
(WebCore::BreakingContext::InlineIteratorHistory::increment):
(WebCore::BreakingContext::InlineIteratorHistory::clear):
(WebCore::BreakingContext::initializeForCurrentObject):
(WebCore::BreakingContext::increment):
(WebCore::BreakingContext::handleBR):
(WebCore::borderPaddingMarginStart):
(WebCore::borderPaddingMarginEnd):
(WebCore::shouldAddBorderPaddingMargin):
(WebCore::previousInFlowSibling):
(WebCore::inlineLogicalWidth):
(WebCore::BreakingContext::handleOutOfFlowPositioned):
(WebCore::BreakingContext::handleFloat):
(WebCore::shouldSkipWhitespaceAfterStartObject):
(WebCore::BreakingContext::handleEmptyInline):
(WebCore::BreakingContext::handleReplaced):
(WebCore::firstPositiveWidth):
(WebCore::iteratorIsBeyondEndOfRenderCombineText):
(WebCore::nextCharacter):
(WebCore::updateCounterIfNeeded):
(WebCore::measureHyphenWidth):
(WebCore::textWidth):
(WebCore::ensureCharacterGetsLineBox):
(WebCore::tryHyphenating):
(WebCore::BreakingContext::handleText):
(WebCore::textBeginsWithBreakablePosition):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
(WebCore::checkMidpoints):
(WebCore::BreakingContext::handleEndOfLine):
(WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
* rendering/line/LineBreaker.cpp:

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

4 years agoExpose some of the functionality of extract-localizable-strings.pl as a module
mitz@apple.com [Fri, 6 Mar 2015 18:47:28 +0000 (18:47 +0000)]
Expose some of the functionality of extract-localizable-strings.pl as a module
https://bugs.webkit.org/show_bug.cgi?id=142038

Reviewed by Sam Weinig.

* LocalizableStrings.pm: Copied from Source/WebCore/extract-localizable-strings.pl.
(setTreatWarningsAsErrors): Added this setter for the variable moved here.
(sawError): Added a getter.
(emitError): Added. Emits the error message and sets $sawError.
(unescapeHexSequence): Moved from extract-localizable-strings.pl and renamed to start with
a lowercase letter.
(keyCollisionCount): Added this getter.
(localizedCount): Added this getter.
(HandleUIString): Moved from extract-localizable-strings.pl and made it increment the
localized string count.
(writeStringsFile): Moved code from extract-localizable-strings.pl into this new subroutine.
(verifyStringsFile): Ditto.

* WebCore.xcodeproj/project.pbxproj: Added LocalizableStrings.pm to the Copy Scripts build
phase.

* extract-localizable-strings.pl:
(emitWarning): Moved to the module.
(UnescapeHexSequence): Ditto.
(HandleUIString): Ditto.

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

4 years agoRemove unused C++ DOM event handler attribute functions
darin@apple.com [Fri, 6 Mar 2015 18:45:48 +0000 (18:45 +0000)]
Remove unused C++ DOM event handler attribute functions
https://bugs.webkit.org/show_bug.cgi?id=142398

Reviewed by Anders Carlsson.

* dom/EventTarget.h: Removed now-unneeded macros: DEFINE_ATTRIBUTE_EVENT_LISTENER,
DECLARE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER, DEFINE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER,
DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER, DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER,
DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER, DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER.

* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::setOnended): Deleted.
(WebCore::AudioScheduledSourceNode::finish): Rewrote this to use dispatchEvent
instead of one-off event-sending code. Also use a lambda to avoid needing two
additional member functions to implement this.
(WebCore::AudioScheduledSourceNode::notifyEndedDispatch): Deleted.
(WebCore::AudioScheduledSourceNode::notifyEnded): Deleted.
* Modules/webaudio/AudioScheduledSourceNode.h: Updated for above.

* Modules/battery/BatteryManager.h: Removed onxxx and setOnxxx functions,
including ones created with macros from EventTarget.h.
* Modules/encryptedmedia/MediaKeySession.h: Ditto.
* Modules/indexeddb/IDBDatabase.h: Ditto.
* Modules/indexeddb/IDBOpenDBRequest.h: Ditto.
* Modules/indexeddb/IDBRequest.h: Ditto.
* Modules/indexeddb/IDBTransaction.h: Ditto.
* Modules/mediastream/MediaStream.h: Ditto.
* Modules/mediastream/MediaStreamTrack.h: Ditto.
* Modules/mediastream/RTCDTMFSender.h: Ditto.
* Modules/mediastream/RTCDataChannel.h: Ditto.
* Modules/mediastream/RTCPeerConnection.h: Ditto.
* Modules/notifications/Notification.h: Ditto.
* Modules/speech/SpeechSynthesisUtterance.h: Ditto.
* Modules/webaudio/AudioContext.h: Ditto.
* Modules/webaudio/ScriptProcessorNode.cpp: Ditto.
* Modules/webaudio/ScriptProcessorNode.h: Ditto.
* Modules/websockets/WebSocket.h: Ditto.
* css/FontLoader.h: Ditto.
* dom/Document.h: Ditto.
* dom/Element.cpp: Ditto.
* dom/Element.h: Ditto.
* dom/MessagePort.h: Ditto.
* fileapi/FileReader.h: Ditto.
* html/HTMLBodyElement.h: Ditto.
* html/HTMLFormElement.h: Ditto.
* html/HTMLFrameSetElement.h: Ditto.
* html/HTMLInputElement.h: Ditto.
* html/HTMLMediaElement.h: Ditto.
* html/HTMLVideoElement.h: Ditto.
* html/track/TextTrack.h: Ditto.
* html/track/TextTrackCue.h: Ditto.
* html/track/TrackListBase.h: Ditto.
* loader/appcache/DOMApplicationCache.h: Ditto.
* page/DOMWindow.h: Ditto.
* page/EventSource.h: Ditto.
* page/Performance.h: Ditto.
* workers/AbstractWorker.h: Ditto.
* workers/DedicatedWorkerGlobalScope.h: Ditto.
* workers/Worker.h: Ditto.
* workers/WorkerGlobalScope.h: Ditto.
* xml/XMLHttpRequest.h: Ditto.
* xml/XMLHttpRequestUpload.h: Ditto.

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

4 years agoSetting any of the <object> element plugin controlling attributes does not have any...
commit-queue@webkit.org [Fri, 6 Mar 2015 18:44:33 +0000 (18:44 +0000)]
Setting any of the <object> element plugin controlling attributes does not have any affect.
https://bugs.webkit.org/show_bug.cgi?id=141936.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-03-06
Reviewed by Simon Fraser.
Source/WebCore:

When setting any of the <object> element plugin controlling attributes
dynamically we need to mark the the element to be dirty by calling
setNeedsStyleRecalc(), so it has to recreate its renderer when needed.

Tests: fast/css/image-object-hover-inherit.html
       svg/as-object/svg-in-object-dynamic-attribute-change.html

* dom/Element.h: Delete unimplemented function.

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute): Mark the element dirty by
calling setNeedsStyleRecalc() when one of the plugin controlling attributes
gets changed. We have to clear m_useFallbackContent because the attribute's
new value might fix the object rendering.

* html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.

LayoutTests:

* fast/css/image-object-hover-inherit-expected.html: Added.
* fast/css/image-object-hover-inherit.html: Added.
A guarding test to catch the case of reconstructing the image <object>
renderer while performing a synchronous resolveTree() followed by page
rendering or dump render tree.

* svg/as-object/resources/lime100x100.html: Added.
* svg/as-object/resources/lime100x100.png: Added.
* svg/as-object/resources/lime100x100.svg: Added.
* svg/as-object/resources/red100x100.svg: Added.
* svg/as-object/svg-in-object-dynamic-attribute-change-expected.html: Added.
* svg/as-object/svg-in-object-dynamic-attribute-change.html: Added.
Ensure that changing the 'type' and the 'data' attributes of the <object>
element will have the expected outcome. Also make sure that the <object>
element renderer falls back correctly when setting any of the attributes
to some unexpected value.

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

4 years agoTest horiz-origin-x and horiz-origin-y in SVG fonts
mmaxfield@apple.com [Fri, 6 Mar 2015 18:21:36 +0000 (18:21 +0000)]
Test horiz-origin-x and horiz-origin-y in SVG fonts
https://bugs.webkit.org/show_bug.cgi?id=142403

Source/WebCore:

Reviewed by Simon Fraser.

Remove incorrect comment.

Test: svg/fonts/svg-font-horiz-origin.html

* svg/SVGToOTFFontConversion.cpp:
(WebCore::CFFBuilder::CFFBuilder):

LayoutTests:

Simply moving to the origin in glyph-space at the beginning
of path parsing won't work if subsequent coordinates are absolute.

Reviewed by Simon Fraser.

* svg/fonts/resources/svg-font-horiz-origin-font.svg: Added.
* svg/fonts/svg-font-horiz-origin-expected.html: Added.
* svg/fonts/svg-font-horiz-origin.html: Added.

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

4 years agoAllow tree dumping functions to be used in release builds by switching a flag
simon.fraser@apple.com [Fri, 6 Mar 2015 18:20:40 +0000 (18:20 +0000)]
Allow tree dumping functions to be used in release builds by switching a flag
https://bugs.webkit.org/show_bug.cgi?id=142379

Reviewed by Zalan Bujtas.

There are various tree dumping functions that are useful for debugging, and sometimes
you want to be able to use them in release builds. Currently they are surrounded by
in config.h

* config.h:
* dom/DocumentMarkerController.cpp:
* dom/DocumentMarkerController.h:
* dom/Element.cpp:
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
* dom/Position.cpp: Position::debugPosition(const char* msg) was available in release builds, but this changes
is to respect ENABLE_TREE_DEBUGGING, which I think is correct.
* dom/Position.h:
* dom/Range.cpp:
* dom/Range.h:
* dom/Text.cpp:
* dom/Text.h:
* rendering/CounterNode.cpp:
* rendering/CounterNode.h:
* rendering/InlineBox.cpp:
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
* rendering/InlineTextBox.h:
* rendering/RenderBlockFlow.cpp:
* rendering/RenderBlockFlow.h:
* rendering/RenderCounter.cpp:
* rendering/RenderCounter.h:
* rendering/RenderLayer.cpp:
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateForegroundLayer):
(WebCore::RenderLayerBacking::updateBackgroundLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::CompositingState::CompositingState):
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
* rendering/RenderObject.cpp:
* rendering/RenderObject.h: showTreeCharacterOffset was unused.
* rendering/RootInlineBox.cpp:
* rendering/RootInlineBox.h:
* rendering/SimpleLineLayoutFunctions.cpp:
* rendering/SimpleLineLayoutFunctions.h:
* rendering/svg/SVGResources.cpp:
* rendering/svg/SVGResources.h:

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

4 years agoAn SVG element without intrinsic size inherits the container size as its viewport...
commit-queue@webkit.org [Fri, 6 Mar 2015 18:15:48 +0000 (18:15 +0000)]
An SVG element without intrinsic size inherits the container size as its viewport instead of inheriting the container viewport.
https://bugs.webkit.org/show_bug.cgi?id=141725.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-03-06
Reviewed by Darin Adler.

Source/WebCore:

The current viewport of the <svg> element should be retrieved from its
renderer if the renderer is available. If the renderer is not created yet,
this means the viewport is needed to calculate the size of the renderer.
In this case, we should return the element size if it is intrinsic size.

Test: svg/css/svg-css-different-intrinsic-sizes.html

* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::currentViewportSize): Change the order for
returning the viewport of the <svg> element. We should consider the case
of a valid renderer before considering the case of an intrinsic size.

LayoutTests:

* svg/css/svg-css-different-intrinsic-sizes-expected.html: Added.
* svg/css/svg-css-different-intrinsic-sizes.html: Added.
The intrinsic size of the <svg> element is overridden by CSS. The elements
inside the <svg> should consider the css size (which is equal to the <svg>
element viewport) instead of the <svg> element intrinsic size.

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

4 years agoAllow composited clip-path to be updated without a layer repaint
simon.fraser@apple.com [Fri, 6 Mar 2015 18:14:10 +0000 (18:14 +0000)]
Allow composited clip-path to be updated without a layer repaint
https://bugs.webkit.org/show_bug.cgi?id=142384

Reviewed by Zalan Bujtas.

Source/WebCore:

When clip-path is mapped to a compositing shape layer mask, we can just
push a new shape to the GraphicsLayer to update the clip path, without
needing to repaint.

Achieve this by adding ContextSensitivePropertyClipPath. When set, and the
stars are aligned, issue a StyleDifferenceRecompositeLayer rather than
a StyleDifferenceRepaint.

We ask RenderLayerCompositor whether the clip path can be composited
to hide platform differences related to whether GraphicsLayer supports
shape masks.

Test: compositing/masks/compositing-clip-path-change-no-repaint.html

* rendering/RenderElement.cpp:
(WebCore::RenderElement::adjustStyleDifference): Remove obvious comment
about opacity. Handle ContextSensitivePropertyClipPath.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::canCompositeClipPath): If we have a mask
we have to paint the mask + clip path into the mask layer (mirrors code in
RenderLayerBacking::updateMaskingLayer but isn't quite similar enough to share).
* rendering/RenderLayerCompositor.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaint): Set ContextSensitivePropertyClipPath
and don't return, as is normal for context-sensitive property handling.
* rendering/style/RenderStyleConstants.h: Line things up to avoid future bit
fumbles, and remove unnecessary braces.

LayoutTests:

Test repaint with a clip-path change.

* compositing/masks/compositing-clip-path-change-no-repaint-expected.txt: Added.
* compositing/masks/compositing-clip-path-change-no-repaint.html: Added.

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

4 years ago[Content Extensions] Process all actions when blocking a URL.
commit-queue@webkit.org [Fri, 6 Mar 2015 18:13:10 +0000 (18:13 +0000)]
[Content Extensions] Process all actions when blocking a URL.
https://bugs.webkit.org/show_bug.cgi?id=142363

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

This can only be tested once we implement css selectors.

* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
Do not return early when adding a block action.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
Process all actions before returning.

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

4 years agoRename NetworkCacheStorageCocoa.mm to NetworkCacheStorage.cpp
antti@apple.com [Fri, 6 Mar 2015 18:09:06 +0000 (18:09 +0000)]
Rename NetworkCacheStorageCocoa.mm to NetworkCacheStorage.cpp
https://bugs.webkit.org/show_bug.cgi?id=142401

Rubber-stamped by Anders Carlsson.

It is now fully cross-platform.

* NetworkProcess/cache/NetworkCacheStorage.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheStorageCocoa.mm.
(WebKit::NetworkCache::Storage::shrinkIfNeeded):
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoDon't use dispatch_semaphore in NetworkCacheStorage
antti@apple.com [Fri, 6 Mar 2015 17:30:32 +0000 (17:30 +0000)]
Don't use dispatch_semaphore in NetworkCacheStorage
https://bugs.webkit.org/show_bug.cgi?id=142395

Reviewed by Anders Carlsson.

* NetworkProcess/cache/NetworkCacheIOChannel.h:
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::readSync):

    Add readSync to encapsulate the semaphore.

* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCache::Storage::traverse):

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

4 years agoMove dispatch_data use behind NetworkCache::Data abstraction
antti@apple.com [Fri, 6 Mar 2015 17:25:54 +0000 (17:25 +0000)]
Move dispatch_data use behind NetworkCache::Data abstraction
https://bugs.webkit.org/show_bug.cgi?id=142392

Reviewed by Anders Carlsson.

* NetworkProcess/cache/NetworkCacheData.h:
(WebKit::NetworkCache::DispatchPtr::DispatchPtr):
* NetworkProcess/cache/NetworkCacheDataCocoa.mm:
(WebKit::NetworkCache::Data::Data):
(WebKit::NetworkCache::Data::apply):
(WebKit::NetworkCache::Data::subrange):
(WebKit::NetworkCache::concatenate):
(WebKit::NetworkCache::mapFile):
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::read):
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCache::hashData):
(WebKit::NetworkCache::decodeEntryMetaData):
(WebKit::NetworkCache::decodeEntryHeader):
(WebKit::NetworkCache::decodeEntry):
(WebKit::NetworkCache::encodeEntryMetaData):
(WebKit::NetworkCache::encodeEntryHeader):
(WebKit::NetworkCache::Storage::dispatchFullWriteOperation):
(WebKit::NetworkCache::mapFile): Deleted.

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

4 years ago[GTK] Test /webkit2/WebKitWebView/sync-request-on-max-conns might fail after finished
carlosgc@webkit.org [Fri, 6 Mar 2015 17:21:11 +0000 (17:21 +0000)]
[GTK] Test /webkit2/WebKitWebView/sync-request-on-max-conns might fail after finished
https://bugs.webkit.org/show_bug.cgi?id=142385

Reviewed by Sergio Villar Senin.

Use stack allocated GMainLoopSources to make sure they are
cancelled automatically if the test finishes before they have
been processed.

* TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
(testWebViewSyncRequestOnMaxConns):

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