WebKit-https.git
5 years ago[CMake] Automatically expose WTF_USE_FOO to the build when USE_FOO is exposed
mrobinson@webkit.org [Thu, 30 Apr 2015 16:17:08 +0000 (16:17 +0000)]
[CMake] Automatically expose WTF_USE_FOO to the build when USE_FOO is exposed
https://bugs.webkit.org/show_bug.cgi?id=144394

Reviewed by Carlos Garcia Campos.

Automatically expose WTF_USE_FOO when USE_FOO is exposed. A side-effect of this change
is that it fixes the redirected XComposite window for GTK+, which was accidentally
disabled in previous reworking of the CMake configuration.

* Source/cmake/OptionsGTK.cmake: We no longer need to expose the WTF_ prefixed
version of USE variables.
* Source/cmake/WebKitFeatures.cmake: Automatically expose WTF_USE_FOO when USE_FOO
is exposed to the build.

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

5 years agoWeb Inspector: Copy not working in Console
commit-queue@webkit.org [Thu, 30 Apr 2015 08:54:05 +0000 (08:54 +0000)]
Web Inspector: Copy not working in Console
https://bugs.webkit.org/show_bug.cgi?id=144354

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

* UserInterface/Base/Main.js:
(WebInspector._focusedContentView):
Select the inner most content view to check if handleCopyEvent exists.
Previously we were stopping at the top level TabContentView.

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

5 years agoUse the default hash value for Symbolized StringImpl
utatane.tea@gmail.com [Thu, 30 Apr 2015 08:37:51 +0000 (08:37 +0000)]
Use the default hash value for Symbolized StringImpl
https://bugs.webkit.org/show_bug.cgi?id=144347

Reviewed by Darin Adler.

Source/JavaScriptCore:

Before this patch, symbolized StringImpl* has a special hash value
to avoid the hash collision with the other normal StringImpl*.
I guess that it is introduced when private symbols are introduced.
However, it prevents using symbolized StringImpl* in the other place
For example, using it as WTFString cause a problem because of its special hash value.

When only using private symbols, they are not exposed to the outside of JSC,
so we can handle it carefully. But now, it's extended to symbols.
So I think storing a special hash value in StringImpl* causes an error.

To avoid this, I propose using the usual hash value in symbolized StringImpl*.
And to provide significantly different hash value when using it as symbol,
store the additional hash value in symbolized StringImpl*. It is used when
the hash value is required by IdentifierRepHash.

* runtime/Identifier.h:
(JSC::IdentifierRepHash::hash):
* runtime/Lookup.h:
(JSC::HashTable::entry):
* runtime/PropertyMapHashTable.h:
(JSC::PropertyTable::find):
(JSC::PropertyTable::get):
* runtime/Structure.cpp:
(JSC::PropertyTable::checkConsistency):

Source/WTF:

Use a default hash value calculation for symbolized StringImpl.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createSymbol):
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::symbolAwareHash):
(WTF::StringImpl::existingSymbolAwareHash):
(WTF::StringImpl::hashForSymbol):
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::nextHashForSymbol):
(WTF::StringImpl::hashAndFlagsForSymbol): Deleted.

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

5 years agoThese should be saying HTTP/1.1 not HTTP/1.0
antti@apple.com [Thu, 30 Apr 2015 07:39:21 +0000 (07:39 +0000)]
These should be saying HTTP/1.1 not HTTP/1.0

* http/tests/cache/resources/iframe304.php:
* http/tests/cache/resources/iframe304body.php:

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

5 years agoUnreviewed. Bump GTK+ version numbers.
carlosgc@webkit.org [Thu, 30 Apr 2015 07:13:07 +0000 (07:13 +0000)]
Unreviewed. Bump GTK+ version numbers.

* Source/cmake/OptionsGTK.cmake:

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

5 years agoFix return code issue, check return code of safari process and dump results to log
commit-queue@webkit.org [Thu, 30 Apr 2015 07:08:19 +0000 (07:08 +0000)]
Fix return code issue, check return code of safari process and dump results to log
https://bugs.webkit.org/show_bug.cgi?id=144436

Patch by Dewei Zhu <dewei_zhu@apple.com> on 2015-04-30
Reviewed by Ryosuke Niwa.

* Scripts/run-benchmark:
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.dump): Correct typo.
(BenchmarkRunner.wrap): Add results to console.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py: Check return code to detect Safari crashes.
(OSXSafariDriver.prepareEnv):
(OSXSafariDriver.launchUrl):
(OSXSafariDriver.closeBrowsers):

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

5 years agoShould no longer need to worry about very old versions of Xcode
commit-queue@webkit.org [Thu, 30 Apr 2015 06:43:57 +0000 (06:43 +0000)]
Should no longer need to worry about very old versions of Xcode
https://bugs.webkit.org/show_bug.cgi?id=144437

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-04-29
Reviewed by Dan Bernstein.

* Scripts/check-for-exit-time-destructors:
* Scripts/check-for-global-initializers:
* Scripts/check-for-weak-vtables-and-externals:

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

5 years ago[EFL] CMake should be failed if openwebrtc package does not exist but ENABLE_MEDIA_ST...
ryuan.choi@navercorp.com [Thu, 30 Apr 2015 06:37:15 +0000 (06:37 +0000)]
[EFL] CMake should be failed if openwebrtc package does not exist but ENABLE_MEDIA_STREAM is ON
https://bugs.webkit.org/show_bug.cgi?id=144435

Reviewed by Gyuyoung Kim.

This patch adds REQUIRED option for OpenWebRTC when ENABLE_MEDIA_STREAM is ON.
In addition, this adds DEFAULT_PORT_VALUE for ENABLE_MEDIA_STREAM to match with FeatureList.pm

* Source/cmake/OptionsEfl.cmake:

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

5 years agoMake GenericTaskQueue even more generic (and usable inside platform/)
jer.noble@apple.com [Thu, 30 Apr 2015 06:29:36 +0000 (06:29 +0000)]
Make GenericTaskQueue even more generic (and usable inside platform/)
https://bugs.webkit.org/show_bug.cgi?id=144414

Reviewed by Eric Carlson.

Templatize GenericTaskQueue so that it can be used from within platform/.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/GenericTaskQueue.cpp: Removed.
* html/HTMLMediaElement.h:
* platform/GenericTaskQueue.h: Renamed from Source/WebCore/dom/GenericTaskQueue.h.
(WebCore::TaskDispatcher::TaskDispatcher): Added default templatized class which just calls the parameter's postTask().
(WebCore::TaskDispatcher::postTask): Call context's postTask().
(WebCore::TaskDispatcher<Timer>::TaskDispatcher): Add a timer version which does not require a context.
(WebCore::TaskDispatcher<Timer>::postTask): Set the timer.
(WebCore::TaskDispatcher<Timer>::timerFired): Call the task.
(WebCore::GenericTaskQueue::GenericTaskQueue): Moved from .cpp.
(WebCore::GenericTaskQueue::enqueueTask): Ditto.
(WebCore::GenericTaskQueue::close): Ditto.
(WebCore::GenericTaskQueue::cancelAllTasks): Ditto.
(WebCore::GenericTaskQueue::hasPendingTasks): Ditto.

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

5 years ago[Win] Update baselines after r183610.
joepeck@webkit.org [Thu, 30 Apr 2015 05:53:01 +0000 (05:53 +0000)]
[Win] Update baselines after r183610.

Unreviewed Gardening.

* platform/win/fast/css/apple-system-colors-expected.txt: Added.

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

5 years agoUnreviewed build fix. WebCore has a weak symbol.
joepeck@webkit.org [Thu, 30 Apr 2015 04:43:03 +0000 (04:43 +0000)]
Unreviewed build fix. WebCore has a weak symbol.

WebCore has a weak external symbol in it. A common cause of weak external
symbols is when an inline function is listed in the linker export file.
ERROR: symbol __ZNK7WebCore4Page25expectsWheelEventTriggersEv

* page/Page.cpp:
(WebCore::Page::expectsWheelEventTriggers):
* page/Page.h:
(WebCore::Page::expectsWheelEventTriggers): Deleted.

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

5 years ago[JSC] Remove RageConvert array conversion
benjamin@webkit.org [Thu, 30 Apr 2015 04:40:55 +0000 (04:40 +0000)]
[JSC] Remove RageConvert array conversion
https://bugs.webkit.org/show_bug.cgi?id=144433

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

RageConvert was causing a subtle bug that was hitting the Kraken crypto tests
pretty hard:
-The indexing types shows that the array access varies between Int32 and DoubleArray.
-ArrayMode::fromObserved() decided to use the most generic type: DoubleArray.
 An Arrayify node would convert the Int32 to that type.
-Somewhere, a GetByVal or PutByVal would have the flag NodeBytecodeUsesAsInt. That
 node would use RageConvert instead of Convert.
-The Arrayify for that GetByVal with RageConvert would not convert the array to
 Contiguous.
-All the following array access that do not have the flag NodeBytecodeUsesAsInt would
 now expect a DoubleArray and always get a Contiguous Array. The CheckStructure
 fail systematically and we never get to run the later code.

Getting rid of RageConvert fixes the problem and does not seems to have any
negative side effect on other benchmarks.

The improvments on Kraken are:
    -stanford-crypto-aes: definitely 1.0915x faster.
    -stanford-crypto-pbkdf2: definitely 1.2446x faster.
    -stanford-crypto-sha256-iterative: definitely 1.0544x faster.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::refine):
(JSC::DFG::arrayConversionToString):
* dfg/DFGArrayMode.h:
* dfg/DFGArrayifySlowPathGenerator.h:
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileArrayifyToStructure):
* runtime/JSObject.cpp:
(JSC::JSObject::convertDoubleToContiguous):
(JSC::JSObject::ensureContiguousSlow):
(JSC::JSObject::genericConvertDoubleToContiguous): Deleted.
(JSC::JSObject::rageConvertDoubleToContiguous): Deleted.
(JSC::JSObject::rageEnsureContiguousSlow): Deleted.
* runtime/JSObject.h:
(JSC::JSObject::rageEnsureContiguous): Deleted.

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

5 years agoCrash at WebCore::Document::absoluteRegionForEventTargets
simon.fraser@apple.com [Thu, 30 Apr 2015 04:15:11 +0000 (04:15 +0000)]
Crash at WebCore::Document::absoluteRegionForEventTargets
https://bugs.webkit.org/show_bug.cgi?id=144426
rdar://problem/20502166

Reviewed by Tim Horton.

Source/WebCore:

When a frame had wheel event handlers, we would register the document itself
as a handler in its parent document. This is problematic, because there's not
code path that removes it when the frame is destroyed.

It turns out we don't need to do this at all; the non-fast scrollable region
already takes handlers in subframes into account.

Tests: fast/events/wheelevent-in-frame.html
       fast/events/wheelevent-in-reattached-frame.html

* dom/Document.cpp:
(WebCore::Document::didAddWheelEventHandler):
(WebCore::Document::didRemoveWheelEventHandler):

LayoutTests:

Test that disconnects a frame with a wheel event handler then GCs, and one that
disconnects are reconnects. In both case, the parent document should have zero
wheel event handlers registered on it.

* fast/events/wheelevent-in-frame-expected.txt: Added.
* fast/events/wheelevent-in-frame.html: Added.
* fast/events/wheelevent-in-reattached-frame-expected.txt: Added.
* fast/events/wheelevent-in-reattached-frame.html: Added.

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

5 years agoNot all videos should automatically play to playback target
eric.carlson@apple.com [Thu, 30 Apr 2015 03:40:16 +0000 (03:40 +0000)]
Not all videos should automatically play to playback target
https://bugs.webkit.org/show_bug.cgi?id=144430
<rdar://problem/20718523>

Reviewed by Darin Adler.

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::clientStateDidChange): Consider ExternalDeviceAutoPlayCandidate.
Minor cleanup.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaState): Set ExternalDeviceAutoPlayCandidate when a <video>
has a file with an audio track that does not loop.

* page/MediaProducer.h: Add ExternalDeviceAutoPlayCandidate.

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

5 years agoLiveNodeList may unexpectedly return an element for empty string
joepeck@webkit.org [Thu, 30 Apr 2015 03:27:34 +0000 (03:27 +0000)]
LiveNodeList may unexpectedly return an element for empty string
https://bugs.webkit.org/show_bug.cgi?id=144429

Reviewed by Darin Adler.

Source/WebCore:

* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::namedItem):
Never return a result for an empty string.

LayoutTests:

* fast/dom/named-items-with-empty-name-expected.txt:
* fast/dom/named-items-with-empty-name.html:

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

5 years agoRemove PassRefPtr in SVGFEFooElement classes
gyuyoung.kim@webkit.org [Thu, 30 Apr 2015 03:21:27 +0000 (03:21 +0000)]
Remove PassRefPtr in SVGFEFooElement classes
https://bugs.webkit.org/show_bug.cgi?id=144425

Reviewed by Darin Adler.

As a step to use Ref instead of PassRefPtr, this patch purges PassRefPtr
in SVGFEFooElement.

No new tests, no behavior changes.

* css/RGBColor.cpp:
(WebCore::RGBColor::create):
* css/RGBColor.h:
* platform/graphics/filters/PointLightSource.h:
(WebCore::PointLightSource::create):
* platform/graphics/filters/SpotLightSource.h:
(WebCore::SpotLightSource::create):
* svg/SVGColor.cpp:
(WebCore::SVGColor::rgbColor):
* svg/SVGColor.h:
* svg/SVGFEDistantLightElement.cpp:
(WebCore::SVGFEDistantLightElement::lightSource):
* svg/SVGFEDistantLightElement.h:
* svg/SVGFELightElement.cpp:
(WebCore::SVGFELightElement::findLightSource):
* svg/SVGFELightElement.h:
* svg/SVGFEPointLightElement.cpp:
(WebCore::SVGFEPointLightElement::lightSource):
* svg/SVGFEPointLightElement.h:
* svg/SVGFESpotLightElement.cpp:
(WebCore::SVGFESpotLightElement::lightSource):
* svg/SVGFESpotLightElement.h:

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

5 years agoCreate a named CSS property for system colors
dino@apple.com [Thu, 30 Apr 2015 03:15:23 +0000 (03:15 +0000)]
Create a named CSS property for system colors
https://bugs.webkit.org/show_bug.cgi?id=144423
<rdar://problem/20491011>

Reviewed by Tim Horton.

Source/WebCore:

Test: fast/css/apple-system-colors.html

Expose the following values to CSS color properties:
    -apple-system-blue
    -apple-system-brown
    -apple-system-gray
    -apple-system-green
    -apple-system-orange
    -apple-system-pink
    -apple-system-purple
    -apple-system-red
    -apple-system-yellow

On platforms other than OS X Yosemite and iOS, the
actual color values are undefined and become transparent
black. (In fact, not all are defined on iOS either.)

* WebCore.xcodeproj/project.pbxproj: Two new SPI header files.

* css/CSSParser.cpp:
(WebCore::CSSParser::validSystemColorValue): New helper function that
checks if a CSSValueID is between the two system color values. This
was being tested everywhere, which meant adding a new system color was
at risk of being ignored. It's a static method so it can be used
from the SVG CSS parser too.
(WebCore::validPrimitiveValueColor): Use the new helper.
(WebCore::CSSParser::parseValue): Ditto.
(WebCore::CSSParser::parseBackgroundColor): Ditto.
(WebCore::CSSParser::parseShadow): Ditto.
(WebCore::parseDeprecatedGradientColorStop): Ditto.
(WebCore::parseGradientColorOrKeyword): Ditto.
* css/CSSParser.h: New static helper function.

* css/CSSValueKeywords.in: Add the new CSS value keywords.

* css/SVGCSSParser.cpp:
(WebCore::validSystemControlColorValue): SVG has a restricted
set of system colors, so use the helper from CSSParser but with
an extra condition.
(WebCore::CSSParser::parseSVGValue): Use the helper.

* platform/spi/ios/UIColorSPI.h: Added.
* platform/spi/cocoa/NSColorSPI.h: Added.

* rendering/RenderThemeIOS.h: New systemColor override. Also add a cache for system colors.
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemColor): Ask UIColor to provide the color values for the new CSS values.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemColor): Ditto.

LayoutTests:

Expose the following values to CSS color properties:
    -apple-system-blue
    -apple-system-brown
    -apple-system-gray
    -apple-system-green
    -apple-system-orange
    -apple-system-pink
    -apple-system-purple
    -apple-system-red
    -apple-system-yellow

The new test shows the computed value for each of these colors. It
includes generic results (no special value) and platform results for
Mac (other than Mavericks) and iOS.

* fast/css/apple-system-colors-expected.txt: Generic results.
* fast/css/apple-system-colors.html: Added - the new test.
* platform/mac/fast/css/apple-system-colors-expected.txt: Added OS X results.
* platform/ios-simulator/fast/css/apple-system-colors-expected.txt: Added iOS results.
* platform/mac-mavericks/fast/css/apple-system-colors-expected.txt: Generic results for Mavericks.

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

5 years agoUnreviewed, rolling out r183600.
commit-queue@webkit.org [Thu, 30 Apr 2015 03:08:17 +0000 (03:08 +0000)]
Unreviewed, rolling out r183600.
https://bugs.webkit.org/show_bug.cgi?id=144432

New tests time out everywhere (Requested by ap on #webkit).

Reverted changeset:

"Crash at WebCore::Document::absoluteRegionForEventTargets"
https://bugs.webkit.org/show_bug.cgi?id=144426
http://trac.webkit.org/changeset/183600

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

5 years agoLazyNeverDestroyed is not thread safe in debug builds, causing assertions
ap@apple.com [Thu, 30 Apr 2015 03:05:37 +0000 (03:05 +0000)]
LazyNeverDestroyed is not thread safe in debug builds, causing assertions
https://bugs.webkit.org/show_bug.cgi?id=144378

Reviewed by Darin Adler.

* wtf/NeverDestroyed.h:

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

5 years agofast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemit...
ap@apple.com [Thu, 30 Apr 2015 03:03:57 +0000 (03:03 +0000)]
fast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemite WK2
https://bugs.webkit.org/show_bug.cgi?id=144155

* fast/frames/flattening/resources/iframe-to-resize.html: Added more logging to the test.

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

5 years agoUnreviewed iOS build fix. Unused parameter no longer exists.
joepeck@webkit.org [Thu, 30 Apr 2015 02:46:05 +0000 (02:46 +0000)]
Unreviewed iOS build fix. Unused parameter no longer exists.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame):

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

5 years agoFix the EFL build after r183595
gyuyoung.kim@webkit.org [Thu, 30 Apr 2015 02:44:22 +0000 (02:44 +0000)]
Fix the EFL build after r183595
https://bugs.webkit.org/show_bug.cgi?id=144427

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-04-29
Reviewed by Gyuyoung Kim.

updateWheelEventTestTriggersIfNeeded() is guarded by #if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING).

* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::updateWheelEventTestTriggersIfNeeded):

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

5 years agoREGRESSION(183583): [Mac] make without SDKROOT has issues
joepeck@webkit.org [Thu, 30 Apr 2015 02:39:45 +0000 (02:39 +0000)]
REGRESSION(183583): [Mac] make without SDKROOT has issues
https://bugs.webkit.org/show_bug.cgi?id=144431

Reviewed by Dan Bernstein.

.:

* Source/Makefile:
Assume an empty SDKROOT means an macosx variant, so only
enable settings if the SDKROOT is not empty and does not
contain "macosx".

Tools:

* Makefile:
* WebKitTestRunner/Makefile:
Assume an empty SDKROOT means an macosx variant, so only
enable settings if the SDKROOT is not empty and does not
contain "macosx".

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

5 years agoUnskip 3D transformation tests for WebKitGTK+
mrobinson@webkit.org [Thu, 30 Apr 2015 02:10:25 +0000 (02:10 +0000)]
Unskip 3D transformation tests for WebKitGTK+

Unreviewed. This is gardening.

These tests should run reasonably well on the testing bots, now that
they use llvmpipe to run OpenGL.

* platform/gtk/TestExpectations:
* platform/gtk/transforms/3d/general/background-visibility-layers-expected.png: Added.
* platform/gtk/transforms/3d/general/cssmatrix-3d-zoom-expected.png: Added.
* platform/gtk/transforms/3d/general/matrix-with-zoom-3d-expected.png: Added.
* platform/gtk/transforms/3d/general/perspective-non-layer-expected.png: Added.
* platform/gtk/transforms/3d/general/perspective-units-expected.png: Added.
* platform/gtk/transforms/3d/general/transform-origin-z-change-expected.png: Added.
* platform/gtk/transforms/3d/hit-testing/backface-hit-test-expected.png: Added.
* platform/gtk/transforms/3d/hit-testing/backface-no-transform-hit-test-expected.png: Added.
* platform/gtk/transforms/3d/point-mapping/3d-point-mapping-2-expected.png: Added.
* platform/gtk/transforms/3d/point-mapping/3d-point-mapping-3-expected.png: Added.
* platform/gtk/transforms/3d/point-mapping/3d-point-mapping-coplanar-expected.png: Added.
* platform/gtk/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png: Added.
* platform/gtk/transforms/3d/point-mapping/3d-point-mapping-expected.png: Added.
* platform/gtk/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png: Added.
* platform/gtk/transforms/3d/point-mapping/3d-point-mapping-overlapping-expected.png: Added.
* platform/gtk/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png: Added.

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

5 years agoFix the GTK+ build after r183584
mrobinson@webkit.org [Thu, 30 Apr 2015 01:42:54 +0000 (01:42 +0000)]
Fix the GTK+ build after r183584

* Source/cmake/OptionsGTK.cmake: Properly use the USE_LIBHYPHEN and HYPHEN_FOUND variables.

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

5 years agoRebaseline after r183597.
simon.fraser@apple.com [Thu, 30 Apr 2015 01:41:53 +0000 (01:41 +0000)]
Rebaseline after r183597.

* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes-expected.txt:

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

5 years agoCrash at WebCore::Document::absoluteRegionForEventTargets
simon.fraser@apple.com [Thu, 30 Apr 2015 01:38:20 +0000 (01:38 +0000)]
Crash at WebCore::Document::absoluteRegionForEventTargets
https://bugs.webkit.org/show_bug.cgi?id=144426
rdar://problem/20502166

Reviewed by Tim Horton.

Source/WebCore:

When a frame had wheel event handlers, we would register the document itself
as a handler in its parent document. This is problematic, because there's not
code path that removes it when the frame is destroyed.

It turns out we don't need to do this at all; the non-fast scrollable region
already takes handlers in subframes into account.

Tests: fast/events/wheelevent-in-frame.html
       fast/events/wheelevent-in-reattached-frame.html

* dom/Document.cpp:
(WebCore::Document::didAddWheelEventHandler):
(WebCore::Document::didRemoveWheelEventHandler):

LayoutTests:

Test that disconnects a frame with a wheel event handler then GCs, and one that
disconnects are reconnects. In both case, the parent document should have zero
wheel event handlers registered on it.

* fast/events/wheelevent-in-frame-expected.txt: Added.
* fast/events/wheelevent-in-frame.html: Added.
* fast/events/wheelevent-in-reattached-frame-expected.txt: Added.
* fast/events/wheelevent-in-reattached-frame.html: Added.

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

5 years agoAttempt #2: Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
ddkilzer@apple.com [Thu, 30 Apr 2015 01:18:18 +0000 (01:18 +0000)]
Attempt #2: Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
<http://webkit.org/b/144362>

Reviewed by Andy Estes.

This patch switches soft-linking of QuickLook.framework to
QuickLookSoftLink.{h,mm} so that we stop exporting unintended
symbols.

No new tests since no change in behavior.

* WebCore.xcodeproj/project.pbxproj:
- Add QuickLookSoftLinking.{h,mm} to the project.

* platform/ios/QuickLookSoftLink.h: Added.
* platform/ios/QuickLookSoftLink.mm: Added.
* platform/mac/SoftLinking.h:
(SOFT_LINK_CLASS_FOR_HEADER): Add macro.
(SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
(SOFT_LINK_POINTER_FOR_HEADER): Add macro.
(SOFT_LINK_POINTER_FOR_SOURCE): Add macro.

* platform/network/ios/QuickLook.h:
- Remove unused declarations.

* platform/network/ios/QuickLook.mm:
(WebCore::QLPreviewConverterClass): Deleted.
(WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
(WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
(WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
- Remove SOFT_LINK macros and unused methods after switching to
  new QuickLookSoftLink.{h,mm}.
(WebCore::QLPreviewGetSupportedMIMETypesSet):
- Switch to use NeverDestroyed<>.
(WebCore::registerQLPreviewConverterIfNeeded):
(createQLPreviewProtocol):
(WebCore::QLPreviewProtocol):
(WebCore::QuickLookHandle::QuickLookHandle):
(WebCore::QuickLookHandle::create):
(WebCore::QuickLookHandle::shouldCreateForMIMEType):
- Simplify code when using QuickLookSoftLink.h.

* platform/network/ios/WebCoreURLResponseIOS.mm:
- Include QuickLookSoftLink.h header.

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

5 years agoCompute the non-fast-scrollable region in main-document coordinates
simon.fraser@apple.com [Thu, 30 Apr 2015 00:46:40 +0000 (00:46 +0000)]
Compute the non-fast-scrollable region in main-document coordinates
https://bugs.webkit.org/show_bug.cgi?id=144420

Reviewed by Tim Horton.

Source/WebCore:

Compute the non-fast-scrollable region in document coordinates, to make it easier
to reason about. Previously, it was document coordinates offset by top content inset.

* page/DebugPageOverlays.cpp:
(WebCore::MouseWheelRegionOverlay::updateRegion): Traverse all frames to compute the wheel
event handler region, mapping each to root view coords, and then mapping back into document
coords at the end.
(WebCore::NonFastScrollableRegionOverlay::updateRegion): No offset needed here; the
overlay and region are both document coordinates.
* page/FrameView.h: Make some mapping function overrides public, and expose widgetsInRenderTree().
* page/Page.cpp:
(WebCore::Page::nonFastScrollableRects): Remove frame argument.
* page/Page.h:
* page/PageOverlay.cpp:
(WebCore::PageOverlay::bounds):
(WebCore::PageOverlay::viewToOverlayOffset): Convenience function to map between
view and overlay coordinates.
* page/PageOverlay.h:
* page/scrolling/AsyncScrollingCoordinator.cpp: New computeNonFastScrollableRegion() signature.
(WebCore::AsyncScrollingCoordinator::updateNonFastScrollableRegion):
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegionForFrame): This function
recurses on frames, computing an absolute (document-relative) region per frame. This
removes the confusing offsetting through top content inset.
Change how we get to plugins that want wheel events; we can't get from PluginViewBase
to renderers, so use FrameView's list of Widgets, and their RenderWidgets. This fixes
regions for transformed plugin-ins.
For subframes, we get a region in the subframe's document coords. Map to that sub-frame,
then to our frame, then to our document.
(WebCore::ScrollingCoordinator::absoluteNonFastScrollableRegion): Wrapper that hides
the recursive function.
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Deleted.
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Map the event point
from view coordinates to document coordinates for testing against the non-fast region.
We previously assert that the root note is a FrameScrolling node.
* page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::viewToContentsOffset): Similar to ScrollView::viewToContents()
for the scrolling tree.
* page/scrolling/ScrollingTreeFrameScrollingNode.h:
* testing/Internals.cpp:
(WebCore::Internals::nonFastScrollableRects): No need for frame arg.

LayoutTests:

We now report the non-fast region in document coordinates, so these two results change.

* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header-expected.txt:

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

5 years agoExpand test infrastructure to support scrolling tests
bfulgham@apple.com [Thu, 30 Apr 2015 00:29:05 +0000 (00:29 +0000)]
Expand test infrastructure to support scrolling tests
https://bugs.webkit.org/show_bug.cgi?id=143684
<rdar://problem/20375516>

Reviewed by Simon Fraser.

Source/WebCore:

Tested by various fast/scrolling and platform/mac-wk2/tiled-drawing/scrolling tests.

This series of changes adds a new singleton class, 'WheelEventTestTrigger', which encapsulates a
function object to be fired when scroll events are finished. The object also keeps track of reasons
why the test should not yet fire (e.g., 'rubberbanding' is active) so that tests do not incorrectly
check rendering state in the middle of an animation.

Switch from the original WeakPtr design to ThreadSafeRefPtr, because WeakPtr cannot be shared
across multiple threads.

* page/FrameView.cpp:
(WebCore::FrameView::layout): Make sure ScrollAnimator knows about any active test trigger.
(WebCore::FrameView::setScrollPosition): Ditto.
(WebCore::FrameView::didAddScrollbar): Ditto.
* page/MainFrame.cpp:
(WebCore::MainFrame::testTrigger): Moved to Page.
(WebCore::MainFrame::ensureTestTrigger): Ditto.
* page/MainFrame.h:
* page/Page.cpp:
(WebCore::Page::testTrigger): Moved from MainFrame, and converted to use RefPtr.
(WebCore::Page::ensureTestTrigger): Ditto.
* page/Page.h:
* page/WheelEventTestTrigger.cpp:
(WebCore::WheelEventTestTrigger::WheelEventTestTrigger): Remove WeakPtr code.
(WebCore::WheelEventTestTrigger::createWeakPtr): Deleted.
* page/WheelEventTestTrigger.h:
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformPrepareForWheelEvents): Make sure the scroll animator knows about
any active test trigger object.
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): Notify WheelEventTestTrigger
that the scrolling thread is synced with the main thread.
* platform/ScrollAnimator.h: Hold a RefPtr to the WheelEventTestTrigger.
(WebCore::ScrollAnimator::ScrollAnimator::setWheelEventTestTrigger):
* platform/cocoa/ScrollController.h:
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::startSnapRubberbandTimer): Notify test trigger to hold tests until rubber band
snapping is complete.
(WebCore::ScrollController::stopSnapRubberbandTimer): Notify test trigger that rubber band snapping is done.
(WebCore::ScrollController::startScrollSnapTimer): Notify test trigger to hold tests until scroll snapping
is complete.
(WebCore::ScrollController::stopScrollSnapTimer): Notify test trigger that scroll snapping is done.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::didBeginScrollGesture): Notify test trigger that a content scroll is in progress.
(WebCore::ScrollAnimatorMac::didEndScrollGesture): Notify test trigger that a content scroll is finished.
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledSoon): Notify test trigger to hold tests until the content
scrolling is complete.
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired): Notify test trigger that content scrolling is done.
* rendering/RenderBox.cpp:
(WebCore::connectScrollAnimatorToTestTrigger): Helper function.
(WebCore::RenderBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
(WebCore::RenderBox::setScrollTop): Ditto.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::createScrollbar): Make sure the ScrollAnimator knows about any active test triggers.
* rendering/RenderListBox.cpp:
(WebCore::connectScrollAnimatorToTestTrigger): Helper function.
(WebCore::RenderListBox::setScrollLeft): Call 'connectScrollAnimatorToTestTrigger' to connect the ScrollAnimator
to the WheelEventTestTrigger so that future scroll operations can notify the test infrastructure.
(WebCore::RenderListBox::setScrollTop): Ditto.
(WebCore::RenderListBox::createScrollbar): Ditto.
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::monitorWheelEvents): Look for WheelEventTestTrigger in Page, rather than MainFrame.
(WebCoreTestSupport::setTestCallbackAndStartNotificationTimer): Ditto.

Source/WebKit2:

Update test programs to activate (and deactivate) the new WheelEventTestTrigger logic.

* UIProcess/API/C/WKPage.cpp:
(WKPageClearWheelEventTestTriggers): Added.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::clearWheelEventTestTrigger): Added.
* UIProcess/WebPageProxy.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageStartMonitoringScrollOperations): Interact with WheelEventTestTrigger through
the Page, rather than MainFrame.
(WKBundlePageRegisterScrollOperationCompletionCallback): Ditto.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::createScrollbar): Make sure scroll animator knows about any
active test triggers.
* WebPage/EventDispatcher.mm:
(WebKit::EventDispatcher::wheelEvent): If the wheel event was passed to the scrolling thread,
defer tests until a Scrolling Thread Sync has occurred.
* WebPage/WebPage.cpp:
(WebKit::WebPage::clearWheelEventTestTrigger): Added.
* WebPage/WebPage.h:
* WebPage/WebPage.message.in: Added ClearWheelEventTestTrigger message.

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebViewToConsistentStateBeforeTesting): Make sure the WheelEventTestTrigger state is
reset before the next test run.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues): Ditto."

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

5 years agoWeb Inspector: Remove some unused Images
timothy@apple.com [Thu, 30 Apr 2015 00:28:04 +0000 (00:28 +0000)]
Web Inspector: Remove some unused Images
https://bugs.webkit.org/show_bug.cgi?id=144412

Reviewed by Joseph Pecoraro.

* UserInterface/Images/BottomUpTree.svg: Removed.
* UserInterface/Images/Log.png: Removed.
* UserInterface/Images/Log@2x.png: Removed.
* UserInterface/Images/NavigationItemAngleBrackets.svg: Removed.
* UserInterface/Images/NavigationItemBrushAndRuler.svg: Removed.
* UserInterface/Images/NavigationItemBug.svg: Removed.
* UserInterface/Images/NavigationItemDoughnutChart.svg: Removed.
* UserInterface/Images/NavigationItemFile.svg: Removed.
* UserInterface/Images/NavigationItemLayers.svg: Removed.
* UserInterface/Images/NavigationItemLog.svg: Removed.
* UserInterface/Images/NavigationItemProbes.svg: Removed.
* UserInterface/Images/NavigationItemStopwatch.svg: Removed.
* UserInterface/Images/NavigationItemStorage.svg: Removed.
* UserInterface/Images/NavigationItemVariable.svg: Removed.
* UserInterface/Images/NetworkBarLabelCalloutLeft.svg: Removed.
* UserInterface/Images/NetworkBarLabelCalloutRight.svg: Removed.
* UserInterface/Images/NetworkBarLabelCalloutWhiteLeft.svg: Removed.
* UserInterface/Images/NetworkBarLabelCalloutWhiteRight.svg: Removed.
* UserInterface/Images/Percent.svg: Removed.
* UserInterface/Images/Reload.svg: Removed.
* UserInterface/Images/SplitToggleDown.svg: Removed.
* UserInterface/Images/Time.svg: Removed.
* UserInterface/Images/Weight.svg: Removed.

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

5 years agoRun javascriptcore tests on Windows without cygwin
commit-queue@webkit.org [Thu, 30 Apr 2015 00:23:54 +0000 (00:23 +0000)]
Run javascriptcore tests on Windows without cygwin
https://bugs.webkit.org/show_bug.cgi?id=144419

Patch by Alex Christensen <achristensen@webkit.org> on 2015-04-29
Reviewed by Brent Fulgham.

* Scripts/run-javascriptcore-tests:
(runJSCStressTests):
Just call ruby, not /usr/bin/env ruby.

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

5 years agoAdding the ability to move selection by granularity on iOS.
enrica@apple.com [Thu, 30 Apr 2015 00:21:20 +0000 (00:21 +0000)]
Adding the ability to move selection by granularity on iOS.
https://bugs.webkit.org/show_bug.cgi?id=144410
rdar://problem/19213337

Reviewed by Benjamin Poulain.

This patch also correctly sets _usingGestureForSelection for all
the functions that change the selection with a gesture.
This way we make sure that the selection drawing is not delayed
until the next time we paint.

* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView moveSelectionAtBoundary:inDirection:completionHandler:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::moveSelectionAtBoundaryWithDirection):

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

5 years ago[CSS Box Alignment] Unifying alignment data in a single class
jfernandez@igalia.com [Thu, 30 Apr 2015 00:12:25 +0000 (00:12 +0000)]
[CSS Box Alignment] Unifying alignment data in a single class
https://bugs.webkit.org/show_bug.cgi?id=144384

Reviewed by David Hyatt.

The new CSS Box Alignment specification introduces more complex
values and syntax for defining alignment properties. Most of the
alignment values were just keyword identifiers, but the new syntax
allows different combinations of identifiers to determine the
alignment behavior (eg. overflow-alignment keyword).

This patch wll help to implement later overflow handling and
specially Content Dstribution alignment, the most complex case by
far. It will be more consistent against style changes and repaint,
snce we will have just one field to monitoring for value
modfications.

No new tests, because no new functionality was added; it's just a
code refactoring which is just expected to pass current tests.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::resolveSelfAlignmentAuto):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
(WebCore::StyleBuilderConverter::convertSVGColor): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitMaskImage): Deleted.
(WebCore::StyleBuilderCustom::applyInheritWebkitMaskImage): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted.
(WebCore::StyleBuilderCustom::applyInheritLineHeight): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::createElementRenderer):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::styleDidChange):
* rendering/RenderFullScreen.cpp:
(WebCore::createFullScreenStyle):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::adjustInnerStyle):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::updateStyle):
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
(WebCore::RenderMathMLScripts::fixAnonymousStyles):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::resolveAlignment):
(WebCore::RenderStyle::resolveJustification):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
(WebCore::StyleRareNonInheritedData::contentDataEquivalent): Deleted.
* rendering/style/StyleRareNonInheritedData.h:
* rendering/style/StyleSelfAlignmentData.h: Added.
(WebCore::StyleSelfAlignmentData::StyleSelfAlignmentData):
(WebCore::StyleSelfAlignmentData::setPosition):
(WebCore::StyleSelfAlignmentData::setPositionType):
(WebCore::StyleSelfAlignmentData::setOverflow):
(WebCore::StyleSelfAlignmentData::position):
(WebCore::StyleSelfAlignmentData::positionType):
(WebCore::StyleSelfAlignmentData::overflow):
(WebCore::StyleSelfAlignmentData::operator==):
(WebCore::StyleSelfAlignmentData::operator!=):

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

5 years agoGracefully handle missing auto pause key on remote inspector setup
commit-queue@webkit.org [Wed, 29 Apr 2015 23:46:18 +0000 (23:46 +0000)]
Gracefully handle missing auto pause key on remote inspector setup
https://bugs.webkit.org/show_bug.cgi?id=144411

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

* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::receivedSetupMessage):

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

5 years agoNodeList has issues with Symbol and empty string
joepeck@webkit.org [Wed, 29 Apr 2015 23:22:39 +0000 (23:22 +0000)]
NodeList has issues with Symbol and empty string
https://bugs.webkit.org/show_bug.cgi?id=144310

Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/PropertyName.h:
(JSC::PropertyName::isSymbol):
Helper to check if the PropertyName is a string or symbol property.

Source/WebCore:

Tests: fast/dom/StyleSheet/stylesheet-symbol-names.html
       fast/dom/dataset-name-getter-symbols.html
       fast/dom/named-items-with-empty-name.html
       fast/dom/named-items-with-symbol-name.html
       storage/domstorage/localstorage/named-items.html

Test different bindings objects with custom named setter
and getter handlers. Ensure that they handle Symbol properties
gracefully. Often times avoiding the string path.

* dom/StaticNodeList.cpp:
(WebCore::StaticNodeList::namedItem):
(WebCore::StaticElementList::namedItem):
Better handle the empty string. It should not match an item.

* bindings/js/JSDOMBinding.h:
(WebCore::propertyNameToString):
In cases where we would use this, we should have handled
Symbol properties.

(WebCore::propertyNameToAtomicString):
For Symbols, use the unique string. This should result
in no matches for a Symbol property.

* bindings/js/JSDOMStringMapCustom.cpp:
(WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
(WebCore::JSDOMStringMap::deleteProperty):
(WebCore::JSDOMStringMap::putDelegate):
* bindings/js/JSStorageCustom.cpp:
(WebCore::JSStorage::canGetItemsForName):
(WebCore::JSStorage::nameGetter):
(WebCore::JSStorage::deleteProperty):
(WebCore::JSStorage::putDelegate):
* bindings/js/JSStyleSheetListCustom.cpp:
(WebCore::JSStyleSheetList::canGetItemsForName):
Treat Symbol properties as private properties. They just
go directly through to the Object, and avoid the string
getter/setter property path.

LayoutTests:

* fast/dom/StyleSheet/stylesheet-symbol-names-expected.txt: Added.
* fast/dom/StyleSheet/stylesheet-symbol-names.html: Added.
* fast/dom/dataset-name-getter-symbols-expected.txt: Added.
* fast/dom/dataset-name-getter-symbols.html: Added.
* fast/dom/named-items-with-empty-name-expected.txt: Added.
* fast/dom/named-items-with-empty-name.html: Added.
* fast/dom/named-items-with-symbol-name-expected.txt: Added.
* fast/dom/named-items-with-symbol-name.html: Added.
* storage/domstorage/localstorage/named-items-expected.txt: Added.
* storage/domstorage/localstorage/named-items.html: Added.

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

5 years agoUI process sometimes crashes under _takeViewSnapshot when the window is off-screen
timothy_horton@apple.com [Wed, 29 Apr 2015 23:19:00 +0000 (23:19 +0000)]
UI process sometimes crashes under _takeViewSnapshot when the window is off-screen
https://bugs.webkit.org/show_bug.cgi?id=144418
<rdar://problem/20740278>

Reviewed by Alexey Proskuryakov.

* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Null-check the array before checking if it has any items.
If the window is off-screen, we can't snapshot it.

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

5 years ago[Mac] Register with device picker whenever a page has <video>
eric.carlson@apple.com [Wed, 29 Apr 2015 23:03:40 +0000 (23:03 +0000)]
[Mac] Register with device picker whenever a page has <video>
https://bugs.webkit.org/show_bug.cgi?id=144408

Reviewed by Jer Noble.

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::setPlaybackTarget): Drive-by fix: don't tell a client to play
to the target when it has not routes.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaState): Set RequiresPlaybackTargetMonitoring whenever the
element is <video> with a video track that does not block wireless playback.

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

5 years agoAllow testing of plug-ins that handle wheel events.
simon.fraser@apple.com [Wed, 29 Apr 2015 23:02:11 +0000 (23:02 +0000)]
Allow testing of plug-ins that handle wheel events.
https://bugs.webkit.org/show_bug.cgi?id=144413

Reviewed by Tim Horton.

Source/WebKit2:

Allow the Test Netscape Plug-in to pretend to handle wheel events,
so layout tests can use it.

* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::determineQuirks):

LayoutTests:

Test the non-fast scrollable region with top content inset and header height, and with a plug-in.

* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset-header.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/top-content-inset.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html: Added.

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

5 years ago[GTK] Add --enable-shared option to LLVM to build mesa
utatane.tea@gmail.com [Wed, 29 Apr 2015 22:56:50 +0000 (22:56 +0000)]
[GTK] Add --enable-shared option to LLVM to build mesa
https://bugs.webkit.org/show_bug.cgi?id=144393

Reviewed by Martin Robinson.

The updated mesa requires the shared LLVM libraries.
To build mesa with LLVM in FTL build, this patch added `--enable-shared` option
to LLVM configure script. It will provide shared libraries in addition to static libraries.

* gtk/jhbuild-optional.modules:

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

5 years ago[GTK] Add support for automatic hyphenation
mrobinson@webkit.org [Wed, 29 Apr 2015 22:46:15 +0000 (22:46 +0000)]
[GTK] Add support for automatic hyphenation
https://bugs.webkit.org/show_bug.cgi?id=44478

Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/FindHyphen.cmake: Added. A CMake module for finding libhyphen.
* Source/cmake/OptionsGTK.cmake: Look for libhyphen and enable hyphenation if found.
* Source/cmakeconfig.h.cmake: Pass through the whether libhyphen is enabled.

Source/WebCore:

No new tests. This patch unskips and updates results for existing hyphenation tests.

* PlatformGTK.cmake: Add the libhypen implementation to the source list.
* platform/gtk/GtkUtilities.cpp:
(WebCore::topLevelPath): Add this helper function taken from the test harness.
(WebCore::getWebKitBuildDirectory): Ditto.
* platform/gtk/GtkUtilities.h: Add function declarations for the helper functions.
* platform/text/Hyphenation.cpp: Surround this implementation with !USE(LIBHYPHEN),
  so that it can still be shared.
* platform/text/gtk/HyphenationLibHyphen.cpp: Added.
(WebCore::extractLocaleFromDictionaryFilePath): Take in a dictionary filename and
determine the locale that it covers.
(WebCore::scanDirectoryForDicionaries): Look for all installed dictionaries as well
as ones in the JHBuild root for testing.
(WebCore::scanTestDictionariesDirectoryIfNecessary): Try to scan the dictionaries installed
in the JHBuild root.
(WebCore::availableLocales): Getter for global hash of installed dictionaries.
(WebCore::canHyphenate): Added libhyphen implementation.
(WebCore::HyphenationDictionary): Helper class that properly manages the memory of
an open libhyphen dictionary. This is useful so that they can be stored in an MRU
cache. This is a similar approach to the CoreFoundation implementation.
(WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForNullKey): MRU cache
helper.
(WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey): Ditto.
(WebCore::hyphenDictionaryCache): A cache for opened hyphenation dictionaries.
(WebCore::countLeadingSpaces): Count leading spaces, since WebCore often passes words with them.
(WebCore::lastHyphenLocation): Added libhyphen implementation.

Tools:

* gtk/jhbuild.modules: Add a module for testing dictionaries, so that
all systems will use the same dictionaries for testing purposes.

LayoutTests:

* platform/gtk/TestExpectations: Unskip most hyphenation tests.
* platform/gtk/fast/text/hyphenate-character-expected.png: Added.
* platform/gtk/fast/text/hyphenate-character-expected.txt:
* platform/gtk/fast/text/hyphenate-first-word-expected.png: Added.
* platform/gtk/fast/text/hyphenate-first-word-expected.txt:
* platform/gtk/fast/text/hyphenate-limit-before-after-expected.png:
* platform/gtk/fast/text/hyphenate-limit-before-after-expected.txt:
* platform/gtk/fast/text/hyphenate-limit-lines-expected.png:
* platform/gtk/fast/text/hyphenate-limit-lines-expected.txt:
* platform/gtk/fast/text/hyphenate-locale-expected.png: Added.
* platform/gtk/fast/text/hyphenate-locale-expected.txt:
* platform/gtk/fast/text/hyphens-expected.png: Added.
* platform/gtk/fast/text/hyphens-expected.txt:
* platform/gtk/fast/text/word-break-soft-hyphen-expected.png:

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

5 years agoFailure when building WebKit for appletvsimulator.
jacob_nielsen@apple.com [Wed, 29 Apr 2015 22:41:18 +0000 (22:41 +0000)]
Failure when building WebKit for appletvsimulator.
https://bugs.webkit.org/show_bug.cgi?id=144356

Reviewed by Alexey Proskuryakov.

Changes Makefile logic to check for "not OS X" rather than "is iOS" to
make TVOS and WatchOS behave correctly.

.:

* Source/Makefile:

Tools:

* Makefile:
* WebKitTestRunner/Makefile:

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

5 years agoUnreviewed build fix.
mmaxfield@apple.com [Wed, 29 Apr 2015 22:32:46 +0000 (22:32 +0000)]
Unreviewed build fix.

* platform/graphics/mac/FontCacheMac.mm:
(WebCore::fontWithFamily):

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

5 years agoFix non-cygwin incremental builds on Windows.
achristensen@apple.com [Wed, 29 Apr 2015 22:12:31 +0000 (22:12 +0000)]
Fix non-cygwin incremental builds on Windows.
https://bugs.webkit.org/show_bug.cgi?id=143264

Reviewed by Brent Fulgham.

* generate-js-builtins:
Remove stale headers before calling os.rename to replace them.

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

5 years agoWeb Inspector: Split Storage from Resources tab
timothy@apple.com [Wed, 29 Apr 2015 22:00:06 +0000 (22:00 +0000)]
Web Inspector: Split Storage from Resources tab
https://bugs.webkit.org/show_bug.cgi?id=144404

Reviewed by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.isTabTypeAllowed):
(WebInspector._tabContentViewForType):
(WebInspector._updateNewTabButtonState):
(WebInspector.showStorageTab):
(WebInspector._storageWasInspected):
* UserInterface/Controllers/ApplicationCacheManager.js:
(WebInspector.ApplicationCacheManager.prototype.initialize):
(WebInspector.ApplicationCacheManager.prototype.get applicationCacheObjects):
* UserInterface/Controllers/StorageManager.js:
(WebInspector.StorageManager.prototype.get domStorageObjects):
(WebInspector.StorageManager.prototype.get databases):
(WebInspector.StorageManager.prototype.get indexedDatabases):
(WebInspector.StorageManager.prototype.get cookieStorageObjects):
* UserInterface/Images/Storage.svg: Added.
* UserInterface/Main.html:
* UserInterface/Views/DatabaseTableContentView.js:
(WebInspector.DatabaseTableContentView.prototype._queryFinished): Clear _dataGrid,
since it might have been allocated but still be empty. This avoids an exception in
updateLayout next time layout is updated.
* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
(WebInspector.ResourceSidebarPanel.prototype._domStorageObjectWasAdded): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._domStorageObjectWasInspected): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._databaseWasAdded): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._databaseWasInspected): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._indexedDatabaseWasAdded): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._cookieStorageObjectWasAdded): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._frameManifestAdded): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._frameManifestRemoved): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._addStorageChild): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._storageCleared): Deleted.
* UserInterface/Views/ResourcesTabContentView.js:
(WebInspector.ResourcesTabContentView):
(WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject):
* UserInterface/Views/StorageSidebarPanel.js: Added.
(WebInspector.StorageSidebarPanel):
(WebInspector.StorageSidebarPanel.prototype.showDefaultContentView):
(WebInspector.StorageSidebarPanel.prototype.closed):
(WebInspector.StorageSidebarPanel.prototype._treeElementSelected):
(WebInspector.StorageSidebarPanel.prototype._domStorageObjectWasAdded):
(WebInspector.StorageSidebarPanel.prototype._addDOMStorageObject):
(WebInspector.StorageSidebarPanel.prototype._domStorageObjectWasInspected):
(WebInspector.StorageSidebarPanel.prototype._databaseWasAdded):
(WebInspector.StorageSidebarPanel.prototype._addDatabase):
(WebInspector.StorageSidebarPanel.prototype._databaseWasInspected):
(WebInspector.StorageSidebarPanel.prototype._indexedDatabaseWasAdded):
(WebInspector.StorageSidebarPanel.prototype._addIndexedDatabase):
(WebInspector.StorageSidebarPanel.prototype._cookieStorageObjectWasAdded):
(WebInspector.StorageSidebarPanel.prototype._addCookieStorageObject):
(WebInspector.StorageSidebarPanel.prototype._frameManifestAdded):
(WebInspector.StorageSidebarPanel.prototype._addFrameManifest):
(WebInspector.StorageSidebarPanel.prototype._frameManifestRemoved):
(WebInspector.StorageSidebarPanel.prototype._compareTreeElements):
(WebInspector.StorageSidebarPanel.prototype._addStorageChild):
(WebInspector.StorageSidebarPanel.prototype._storageCleared):
* UserInterface/Views/StorageTabContentView.js: Copied from Source/WebInspectorUI/UserInterface/Views/ResourcesTabContentView.js.
(WebInspector.StorageTabContentView):
(WebInspector.StorageTabContentView.prototype.get type):
(WebInspector.StorageTabContentView.prototype.canShowRepresentedObject):

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

5 years agoWeb Inspector: Remove Legacy images and styles
timothy@apple.com [Wed, 29 Apr 2015 21:59:48 +0000 (21:59 +0000)]
Web Inspector: Remove Legacy images and styles
https://bugs.webkit.org/show_bug.cgi?id=144390

Reviewed by Joseph Pecoraro.

* UserInterface/Base/ImageUtilities.js:
(.generateImage):
(.generateImage.generateLegacyImage): Deleted.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector._updateToolbarHeight):
* UserInterface/Base/Platform.js:
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._loadNewRecording):
* UserInterface/Images/Legacy/BackArrow.svg: Removed.
* UserInterface/Images/Legacy/Breakpoints.svg: Removed.
* UserInterface/Images/Legacy/Close.svg: Removed.
* UserInterface/Images/Legacy/CloseLarge.svg: Removed.
* UserInterface/Images/Legacy/Colors.png: Removed.
* UserInterface/Images/Legacy/Colors@2x.png: Removed.
* UserInterface/Images/Legacy/ColorsLarge.png: Removed.
* UserInterface/Images/Legacy/ColorsLarge@2x.png: Removed.
* UserInterface/Images/Legacy/DockBottom.svg: Removed.
* UserInterface/Images/Legacy/DockRight.svg: Removed.
* UserInterface/Images/Legacy/DownloadArrow.svg: Removed.
* UserInterface/Images/Legacy/Errors.svg: Removed.
* UserInterface/Images/Legacy/ErrorsEnabled.svg: Removed.
* UserInterface/Images/Legacy/FilterFieldGlyph.svg: Removed.
* UserInterface/Images/Legacy/FolderGeneric.png: Removed.
* UserInterface/Images/Legacy/FolderGeneric@2x.png: Removed.
* UserInterface/Images/Legacy/ForwardArrow.svg: Removed.
* UserInterface/Images/Legacy/Issues.svg: Removed.
* UserInterface/Images/Legacy/IssuesEnabled.svg: Removed.
* UserInterface/Images/Legacy/LayerBorders.svg: Removed.
* UserInterface/Images/Legacy/Logs.svg: Removed.
* UserInterface/Images/Legacy/NavigationItemCurleyBraces.svg: Removed.
* UserInterface/Images/Legacy/NavigationItemTrash.svg: Removed.
* UserInterface/Images/Legacy/Network.png: Removed.
* UserInterface/Images/Legacy/Network@2x.png: Removed.
* UserInterface/Images/Legacy/NetworkLarge.png: Removed.
* UserInterface/Images/Legacy/NetworkLarge@2x.png: Removed.
* UserInterface/Images/Legacy/Pause.svg: Removed.
* UserInterface/Images/Legacy/Plus.svg: Removed.
* UserInterface/Images/Legacy/Recording.png: Removed.
* UserInterface/Images/Legacy/Recording@2x.png: Removed.
* UserInterface/Images/Legacy/RecordingHovered.png: Removed.
* UserInterface/Images/Legacy/RecordingHovered@2x.png: Removed.
* UserInterface/Images/Legacy/RecordingStopped.png: Removed.
* UserInterface/Images/Legacy/RecordingStopped@2x.png: Removed.
* UserInterface/Images/Legacy/Reload.svg: Removed.
* UserInterface/Images/Legacy/Resources.svg: Removed.
* UserInterface/Images/Legacy/Resume.svg: Removed.
* UserInterface/Images/Legacy/ShadowDOM.svg: Removed.
* UserInterface/Images/Legacy/SortIndicatorDownArrow.svg: Removed.
* UserInterface/Images/Legacy/SortIndicatorUpArrow.svg: Removed.
* UserInterface/Images/Legacy/SplitToggleDown.svg: Removed.
* UserInterface/Images/Legacy/SplitToggleUp.svg: Removed.
* UserInterface/Images/Legacy/StepInto.svg: Removed.
* UserInterface/Images/Legacy/StepOut.svg: Removed.
* UserInterface/Images/Legacy/StepOver.svg: Removed.
* UserInterface/Images/Legacy/Time.svg: Removed.
* UserInterface/Images/Legacy/Undock.svg: Removed.
* UserInterface/Images/Legacy/UpDownArrows.svg: Removed.
* UserInterface/Images/Legacy/Weight.svg: Removed.
* UserInterface/Views/ButtonNavigationItem.css:
(body.mac-platform.legacy .navigation-bar .item.button.text-only): Deleted.
* UserInterface/Views/ButtonToolbarItem.css:
(body.mac-platform.legacy .toolbar .item.button > .label): Deleted.
* UserInterface/Views/CSSStyleDeclarationSection.css:
(body.mac-platform.legacy .style-declaration-section): Deleted.
(body.mac-platform.legacy .style-declaration-section + .style-declaration-section): Deleted.
(body.mac-platform.legacy .style-declaration-section.last-in-group): Deleted.
(body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section): Deleted.
(body.mac-platform.legacy .style-declaration-section.last-in-group + .style-declaration-section:matches(.last-in-group, :last-child)): Deleted.
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(body.mac-platform.legacy .sidebar > .panel.details.css-style > .content): Deleted.
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser):
* UserInterface/Views/ControlToolbarItem.css:
(body.mac-platform.legacy .toolbar .item.control): Deleted.
(body.mac-platform.legacy .toolbar .item.control:hover): Deleted.
* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView):
* UserInterface/Views/DOMTreeOutline.css:
(body.mac-platform.legacy .dom-tree-outline li.hovered:not(.selected) .selection): Deleted.
(body.mac-platform.legacy .dom-tree-outline li.elements-drag-over .selection): Deleted.
(body.mac-platform.legacy .dom-tree-outline:focus li.selected .selection): Deleted.
* UserInterface/Views/DashboardContainerView.css:
(body.mac-platform.legacy .toolbar .dashboard-container): Deleted.
(body.mac-platform.legacy.window-inactive .toolbar .dashboard-container): Deleted.
(body.mac-platform.legacy.window-inactive .toolbar .dashboard): Deleted.
(body.mac-platform.legacy .dashboard-container .advance-arrow): Deleted.
* UserInterface/Views/DataGrid.css:
(body.mac-platform.legacy .data-grid:focus tr.selected td:not(:last-child)): Deleted.
(body.mac-platform.legacy .data-grid:focus tr.selected): Deleted.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.get _generateSortIndicatorImagesIfNeeded):
* UserInterface/Views/DatabaseTableContentView.js:
(WebInspector.DatabaseTableContentView):
* UserInterface/Views/DebuggerDashboardView.js:
(WebInspector.DebuggerDashboardView):
* UserInterface/Views/DebuggerSidebarPanel.css:
(body.mac-platform.legacy .sidebar > .panel.navigation.debugger > .content): Deleted.
* UserInterface/Views/DebuggerSidebarPanel.js:
* UserInterface/Views/DefaultDashboardView.css:
(body.mac-platform.legacy .toolbar .dashboard.default > .item): Deleted.
(body.mac-platform.legacy .toolbar .dashboard.default > .resourcesCount > img): Deleted.
(body.mac-platform.legacy .toolbar .dashboard.default > .logs > img): Deleted.
(body.mac-platform.legacy .toolbar .dashboard.default > .errors > img): Deleted.
(body.mac-platform.legacy .toolbar .dashboard.default > .errors.enabled > img): Deleted.
(body.mac-platform.legacy .toolbar .dashboard.default > .issues > img): Deleted.
(body.mac-platform.legacy .toolbar .dashboard.default > .issues.enabled > img): Deleted.
* UserInterface/Views/DetailsSection.css:
(body.mac-platform.legacy .details-section): Deleted.
(body.mac-platform.legacy .details-section .details-section): Deleted.
(body.mac-platform.legacy .details-section .details-section:first-child): Deleted.
(body.mac-platform.legacy .details-section > .header): Deleted.
(body.mac-platform.legacy .details-section .details-section > .header): Deleted.
(body.mac-platform.legacy .details-section .details-section.collapsed > .header): Deleted.
(body.mac-platform.legacy .details-section:not(.collapsed) .data-grid.inline): Deleted.
(body.mac-platform.legacy .details-section.computed-style-properties:not(.collapsed) > .header): Deleted.
(body.mac-platform.legacy .details-section > .content > .group): Deleted.
(body.mac-platform.legacy .details-section > .content > .group:nth-child(even)): Deleted.
(body.mac-platform.legacy .details-section > .content > .group:matches(:nth-child(even), :last-child) > .row.simple:last-child > *): Deleted.
(body.mac-platform.legacy .details-section > .content > .group > .row:matches(.empty, .text)): Deleted.
* UserInterface/Views/DividerNavigationItem.css:
(.navigation-bar .item.divider):
(body.mac-platform.legacy .navigation-bar .item.divider): Deleted.
* UserInterface/Views/FilterBar.css:
(.filter-bar > input[type="search"]::-webkit-search-decoration):
(body.mac-platform.legacy .filter-bar): Deleted.
(body.mac-platform.legacy .filter-bar > input[type="search"]): Deleted.
(body.mac-platform.legacy .filter-bar > input[type="search"]::-webkit-search-decoration): Deleted.
* UserInterface/Views/FindBanner.css:
(body.mac-platform.legacy .find-banner > input[type="search"]): Deleted.
(body.mac-platform.legacy .find-banner > button > .glyph): Deleted.
(body.mac-platform.legacy .find-banner > button.segmented.left > .glyph): Deleted.
(body.mac-platform.legacy .find-banner > button.segmented.right > .glyph): Deleted.
(body.mac-platform.legacy .find-banner > button.segmented): Deleted.
* UserInterface/Views/FindBanner.js:
(WebInspector.FindBanner.prototype._generateButtonsGlyphsIfNeeded):
(WebInspector.FindBanner):
* UserInterface/Views/FolderIcon.css:
(.folder-icon .icon):
(body.mac-platform.legacy .folder-icon .icon): Deleted.
* UserInterface/Views/HierarchicalPathComponent.css:
(body.mac-platform.legacy .hierarchical-path-component > .selector-arrows): Deleted.
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
(WebInspector.IndexedDatabaseObjectStoreContentView):
* UserInterface/Views/LayerTreeDetailsSidebarPanel.css:
(body.mac-platform.legacy .sidebar > .panel.details.layer-tree > .content): Deleted.
(body.mac-platform.legacy .panel.details.layer-tree .bottom-bar): Deleted.
(body.mac-platform.legacy .panel.details.layer-tree .bottom-bar > div): Deleted.
(body.mac-platform.legacy .layer-tree-popover): Deleted.
* UserInterface/Views/LogContentView.css:
(body.mac-platform.legacy .search-bar.log-search-bar > input[type="search"]): Deleted.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
* UserInterface/Views/Main.css:
(body.mac-platform.legacy:not(.docked)): Deleted.
(body.docked.bottom.mac-platform.legacy): Deleted.
(body.docked.right.mac-platform.legacy): Deleted.
(body.mac-platform.legacy #split-content-browser > .navigation-bar): Deleted.
* UserInterface/Views/NavigationBar.css:
(.navigation-bar .item):
(body.mac-platform.legacy .navigation-bar): Deleted.
(body.mac-platform.legacy .navigation-bar .item): Deleted.
* UserInterface/Views/NavigationSidebarPanel.css:
(body.mac-platform.legacy .sidebar > .panel.navigation > .content): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation > .overflow-shadow): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation > .overflow-shadow.top): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation > .empty-content-placeholder): Deleted.
(body.mac-platform.legacy .navigation-sidebar-panel-content-tree-outline .item.selected): Deleted.
(body.mac-platform.legacy .navigation-sidebar-panel-content-tree-outline:focus .item.selected): Deleted.
(body.mac-platform.legacy.window-inactive .navigation-sidebar-panel-content-tree-outline .item.selected): Deleted.
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
(WebInspector.NavigationSidebarPanel.prototype._generateDisclosureTrianglesIfNeeded):
* UserInterface/Views/Popover.js:
* UserInterface/Views/ProbeDetailsSidebarPanel.css:
(body.mac-platform.legacy .details-section.probe-set .options > .probe-clear-samples): Deleted.
(body.mac-platform.legacy .details-section.probe-set .options > .probe-remove): Deleted.
(body.mac-platform.legacy .details-section.probe-set .options > .probe-add): Deleted.
* UserInterface/Views/QuickConsole.css:
(body.mac-platform.legacy .quick-console): Deleted.
* UserInterface/Views/RadioButtonNavigationItem.css:
(.navigation-bar .item.radio.button.text-only.selected:active):
(body.mac-platform.legacy .navigation-bar .item.radio.button.text-only:hover): Deleted.
(body.mac-platform.legacy .navigation-bar .item.radio.button.text-only.selected): Deleted.
(body.mac-platform.legacy .navigation-bar .item.radio.button.text-only.selected:active): Deleted.
* UserInterface/Views/RulesStyleDetailsPanel.css:
(body.mac-platform.legacy .sidebar > .panel.details.css-style .rules .label + .style-declaration-section): Deleted.
(body.mac-platform.legacy .sidebar > .panel.details.css-style .rules .new-rule): Deleted.
(body.mac-platform.legacy .sidebar > .panel.details.css-style .rules .new-rule + .style-declaration-section): Deleted.
(body.mac-platform.legacy .sidebar > .panel.details.css-style .rules .new-rule img): Deleted.
* UserInterface/Views/ScopeBar.css:
(.scope-bar > li.selected:active):
(body.mac-platform.legacy .scope-bar > li): Deleted.
(body.mac-platform.legacy .scope-bar > li:hover): Deleted.
(body.mac-platform.legacy .scope-bar > li.selected): Deleted.
(body.mac-platform.legacy .scope-bar > li:active): Deleted.
(body.mac-platform.legacy .scope-bar > li.selected:active): Deleted.
* UserInterface/Views/ScriptContentView.js:
(WebInspector.ScriptContentView):
* UserInterface/Views/SearchBar.css:
(body.mac-platform.legacy .search-bar > input[type="search"]): Deleted.
* UserInterface/Views/SearchSidebarPanel.css:
(.sidebar > .panel.navigation.search > .search-bar > input[type="search"]):
(body.mac-platform.legacy .sidebar > .panel.navigation.search > :matches(.content, .empty-content-placeholder)): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.search > .search-bar): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.search > .search-bar > input[type="search"]): Deleted.
* UserInterface/Views/Sidebar.css:
(body.window-inactive .sidebar.right):
(body.mac-platform.legacy .sidebar): Deleted.
(body.mac-platform.legacy.window-inactive .sidebar): Deleted.
(body.mac-platform.legacy .sidebar.right): Deleted.
* UserInterface/Views/TextContentView.js:
(WebInspector.TextContentView):
* UserInterface/Views/TextResourceContentView.js:
(WebInspector.TextResourceContentView):
* UserInterface/Views/TimelineDataGrid.css:
(body.mac-platform.legacy .data-grid.timeline > .navigation-bar-container > .navigation-bar): Deleted.
* UserInterface/Views/TimelineIcons.css:
(body.mac-platform.legacy .network-icon .icon): Deleted.
(body.mac-platform.legacy .network-icon.large .icon): Deleted.
(body.mac-platform.legacy .colors-icon .icon): Deleted.
(body.mac-platform.legacy .colors-icon.large .icon): Deleted.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
* UserInterface/Views/TimelineRuler.css:
(body.mac-platform.legacy .timeline-ruler > .header): Deleted.
(body.mac-platform.legacy .timeline-ruler > .selection-drag): Deleted.
(body.mac-platform.legacy .timeline-ruler > .selection-handle): Deleted.
* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar > .panel.navigation.timeline.timeline-recording-content-view-showing > .content):
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar > .record-glyph): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar > .record-glyph.recording): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar > .record-glyph:hover): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar > .record-glyph.recording:hover): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar > .record-glyph.forced): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar > .record-glyph.recording.forced): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .status-bar > .record-status): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .title-bar): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .title-bar.timelines): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .title-bar.timeline-events): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .timelines-content): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .timelines-content .close-button): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .timelines-content li.item.selected + li.item): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .timelines-content :focus li.item.selected + li.item): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > :matches(.content, .empty-content-placeholder)): Deleted.
(body.mac-platform.legacy .sidebar > .panel.navigation.timeline > .content .item > .status > .status-button): Deleted.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
* UserInterface/Views/Toolbar.css:
(body.mac-platform:not(.docked) .toolbar):
(body.mac-platform:not(.legacy, .docked) .toolbar): Deleted.
(body.mac-platform.legacy .toolbar): Deleted.
(body.mac-platform.legacy.docked .toolbar): Deleted.
(body.mac-platform.legacy:not(.docked) .toolbar .item.button > .label): Deleted.
(body.mac-platform.legacy.window-inactive .toolbar): Deleted.
* UserInterface/Views/TreeElementStatusButton.css:
(body.mac-platform.legacy .item > .status > .status-button > svg .filled): Deleted.
(body.mac-platform.legacy .item > .status > .status-button > svg .stroked): Deleted.

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

5 years agoSome media tests assert after r183096
eric.carlson@apple.com [Wed, 29 Apr 2015 21:44:12 +0000 (21:44 +0000)]
Some media tests assert after r183096
https://bugs.webkit.org/show_bug.cgi?id=144098

Reviewed by Brent Fulgham.

Never assert when a MediaPlaybackTargetClient client calls one of the methods on Document
after it has been unregistered. A media element unregisters itself when it is removed from the
document, but scripts can still run and modify state that results in a call to
playbackTargetPickerClientStateDidChange. Remove the asserts instead of adding checks to
the various call sites.

* dom/Document.cpp:
(WebCore::Document::showPlaybackTargetPicker): Don't assert if the client has already
been unregistered.
(WebCore::Document::playbackTargetPickerClientStateDidChange): Ditto.

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

5 years ago[GTK] Web Inspector: Optimize SVG images
agomez@igalia.com [Wed, 29 Apr 2015 21:43:19 +0000 (21:43 +0000)]
[GTK] Web Inspector: Optimize SVG images
https://bugs.webkit.org/show_bug.cgi?id=143476

SVG images optimized with a combination of sed replacements and
the usage of the scour tool (http://www.codedread.com/scour/).

Also, modified the spelling of the license word to use the US one
in the copyright files.

Reviewed by Martin Robinson.

* UserInterface/Images/gtk/BackArrow.svg:
* UserInterface/Images/gtk/BottomUpTree.svg:
* UserInterface/Images/gtk/BreakpointActionAdd.svg:
* UserInterface/Images/gtk/BreakpointActionRemove.svg:
* UserInterface/Images/gtk/BreakpointButton.svg:
* UserInterface/Images/gtk/BreakpointInactiveButton.svg:
* UserInterface/Images/gtk/Breakpoints.svg:
* UserInterface/Images/gtk/COPYING:
* UserInterface/Images/gtk/COPYING_CCBYSA3:
* UserInterface/Images/gtk/Checkers.svg:
* UserInterface/Images/gtk/Circle.svg:
* UserInterface/Images/gtk/Close.svg:
* UserInterface/Images/gtk/CloseLarge.svg:
* UserInterface/Images/gtk/CloseWhite.svg:
* UserInterface/Images/gtk/ContentFlow.svg:
* UserInterface/Images/gtk/Crosshair.svg:
* UserInterface/Images/gtk/DOMCharacterData.svg:
* UserInterface/Images/gtk/DOMComment.svg:
* UserInterface/Images/gtk/DOMDocument.svg:
* UserInterface/Images/gtk/DOMDocumentType.svg:
* UserInterface/Images/gtk/DOMElement.svg:
* UserInterface/Images/gtk/DOMNode.svg:
* UserInterface/Images/gtk/DOMTextNode.svg:
* UserInterface/Images/gtk/DOMTree.svg:
* UserInterface/Images/gtk/DisclosureTriangleSmallClosed.svg:
* UserInterface/Images/gtk/DisclosureTriangleSmallOpen.svg:
* UserInterface/Images/gtk/DisclosureTriangleTinyClosed.svg:
* UserInterface/Images/gtk/DisclosureTriangleTinyOpen.svg:
* UserInterface/Images/gtk/DockBottom.svg:
* UserInterface/Images/gtk/DockRight.svg:
* UserInterface/Images/gtk/DownloadArrow.svg:
* UserInterface/Images/gtk/Error.svg:
* UserInterface/Images/gtk/Errors.svg:
* UserInterface/Images/gtk/ErrorsEnabled.svg:
* UserInterface/Images/gtk/EventListener.svg:
* UserInterface/Images/gtk/Exception.svg:
* UserInterface/Images/gtk/Eye.svg:
* UserInterface/Images/gtk/FilterFieldGlyph.svg:
* UserInterface/Images/gtk/ForwardArrow.svg:
* UserInterface/Images/gtk/Function.svg:
* UserInterface/Images/gtk/GoToArrow.svg:
* UserInterface/Images/gtk/HierarchicalNavigationItemChevron.svg:
* UserInterface/Images/gtk/IndeterminateProgressSpinner1.svg:
* UserInterface/Images/gtk/IndeterminateProgressSpinner10.svg:
* UserInterface/Images/gtk/IndeterminateProgressSpinner11.svg:
* UserInterface/Images/gtk/IndeterminateProgressSpinner12.svg:
* UserInterface/Images/gtk/IndeterminateProgressSpinner2.svg:
* UserInterface/Images/gtk/IndeterminateProgressSpinner3.svg:
* UserInterface/Images/gtk/IndeterminateProgressSpinner4.svg:
* UserInterface/Images/gtk/IndeterminateProgressSpinner5.svg:
* UserInterface/Images/gtk/IndeterminateProgressSpinner6.svg:
* UserInterface/Images/gtk/IndeterminateProgressSpinner7.svg:
* UserInterface/Images/gtk/IndeterminateProgressSpinner8.svg:
* UserInterface/Images/gtk/IndeterminateProgressSpinner9.svg:
* UserInterface/Images/gtk/Issues.svg:
* UserInterface/Images/gtk/IssuesEnabled.svg:
* UserInterface/Images/gtk/LayerBorders.svg:
* UserInterface/Images/gtk/Locked.svg:
* UserInterface/Images/gtk/Logs.svg:
* UserInterface/Images/gtk/Native.svg:
* UserInterface/Images/gtk/NavigationItemAngleBrackets.svg:
* UserInterface/Images/gtk/NavigationItemBrushAndRuler.svg:
* UserInterface/Images/gtk/NavigationItemBug.svg:
* UserInterface/Images/gtk/NavigationItemCurleyBraces.svg:
* UserInterface/Images/gtk/NavigationItemFile.svg:
* UserInterface/Images/gtk/NavigationItemLayers.svg:
* UserInterface/Images/gtk/NavigationItemLog.svg:
* UserInterface/Images/gtk/NavigationItemProbes.svg:
* UserInterface/Images/gtk/NavigationItemStopwatch.svg:
* UserInterface/Images/gtk/NavigationItemStorage.svg:
* UserInterface/Images/gtk/NavigationItemTrash.svg:
* UserInterface/Images/gtk/NavigationItemTypes.svg:
* UserInterface/Images/gtk/NavigationItemVariable.svg:
* UserInterface/Images/gtk/PaintFlashing.svg:
* UserInterface/Images/gtk/Pause.svg:
* UserInterface/Images/gtk/PausedBreakpoint.svg:
* UserInterface/Images/gtk/Percent.svg:
* UserInterface/Images/gtk/Plus.svg:
* UserInterface/Images/gtk/PseudoElement.svg:
* UserInterface/Images/gtk/Record.svg:
* UserInterface/Images/gtk/Reflection.svg:
* UserInterface/Images/gtk/Reload.svg:
* UserInterface/Images/gtk/ReloadFull.svg:
* UserInterface/Images/gtk/ReplayPauseButton.svg:
* UserInterface/Images/gtk/ReplayPlayButton.svg:
* UserInterface/Images/gtk/ReplayRecordingButton.svg:
* UserInterface/Images/gtk/Request.svg:
* UserInterface/Images/gtk/Resources.svg:
* UserInterface/Images/gtk/Response.svg:
* UserInterface/Images/gtk/ResultLine.svg:
* UserInterface/Images/gtk/Resume.svg:
* UserInterface/Images/gtk/ShadowDOM.svg:
* UserInterface/Images/gtk/SortIndicatorDownArrow.svg:
* UserInterface/Images/gtk/SortIndicatorUpArrow.svg:
* UserInterface/Images/gtk/SourceCode.svg:
* UserInterface/Images/gtk/SplitToggleDown.svg:
* UserInterface/Images/gtk/SplitToggleUp.svg:
* UserInterface/Images/gtk/StepInto.svg:
* UserInterface/Images/gtk/StepOut.svg:
* UserInterface/Images/gtk/StepOver.svg:
* UserInterface/Images/gtk/Stop.svg:
* UserInterface/Images/gtk/StyleRuleAuthor.svg:
* UserInterface/Images/gtk/StyleRuleInherited.svg:
* UserInterface/Images/gtk/StyleRuleInheritedElement.svg:
* UserInterface/Images/gtk/StyleRuleInspector.svg:
* UserInterface/Images/gtk/StyleRuleUser.svg:
* UserInterface/Images/gtk/StyleRuleUserAgent.svg:
* UserInterface/Images/gtk/Time.svg:
* UserInterface/Images/gtk/TimelineRecordAnimation.svg:
* UserInterface/Images/gtk/TimelineRecordConsoleProfile.svg:
* UserInterface/Images/gtk/TimelineRecordEvent.svg:
* UserInterface/Images/gtk/TimelineRecordLayout.svg:
* UserInterface/Images/gtk/TimelineRecordPaint.svg:
* UserInterface/Images/gtk/TimelineRecordProbeSampled.svg:
* UserInterface/Images/gtk/TimelineRecordScriptEvaluated.svg:
* UserInterface/Images/gtk/TimelineRecordStyle.svg:
* UserInterface/Images/gtk/TimelineRecordTimer.svg:
* UserInterface/Images/gtk/TypeBoolean.svg:
* UserInterface/Images/gtk/TypeNull.svg:
* UserInterface/Images/gtk/TypeNumber.svg:
* UserInterface/Images/gtk/TypeObject.svg:
* UserInterface/Images/gtk/TypeRegex.svg:
* UserInterface/Images/gtk/TypeString.svg:
* UserInterface/Images/gtk/TypeSymbol.svg:
* UserInterface/Images/gtk/TypeUndefined.svg:
* UserInterface/Images/gtk/Undock.svg:
* UserInterface/Images/gtk/UpDownArrows.svg:
* UserInterface/Images/gtk/UserInputPrompt.svg:
* UserInterface/Images/gtk/UserInputPromptPrevious.svg:
* UserInterface/Images/gtk/UserInputResult.svg:
* UserInterface/Images/gtk/Warning.svg:
* UserInterface/Images/gtk/Weight.svg:

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

5 years agoSimple line layout: Web process spins endlessly below layoutSimpleLines.
zalan@apple.com [Wed, 29 Apr 2015 21:32:07 +0000 (21:32 +0000)]
Simple line layout: Web process spins endlessly below layoutSimpleLines.
https://bugs.webkit.org/show_bug.cgi?id=144403
rdar://problem/20742783

Reviewed by Antti Koivisto.

When a text fragment overlaps multiple renderes and it does not fit the current line,
we revert the text fragment iterator position so that the overlapping content
gets processed again for the next line.
However, TextFragmentIterator::revertToFragment() was reverting too much and
we started processing old content all over again -> infinite loop.

This patch ensures that text fragment iterator is reverted to the right position.

Source/WebCore:

Test: fast/text/simple-line-layout-wrapping-multiple-renderers-hang.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::createLineRuns):
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::revertToEndOfFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment): Deleted.
* rendering/SimpleLineLayoutTextFragmentIterator.h:

LayoutTests:

* fast/text/simple-line-layout-wrapping-multiple-renderers-hang-expected.html: Added.
* fast/text/simple-line-layout-wrapping-multiple-renderers-hang.html: Added.

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

5 years agoSource/JavaScriptCore:
fpizlo@apple.com [Wed, 29 Apr 2015 21:27:48 +0000 (21:27 +0000)]
Source/JavaScriptCore:
JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
https://bugs.webkit.org/show_bug.cgi?id=144397

Reviewed by Andreas Kling.

Add the flag to JSTypeInfo. It's an inline flag so that it's fast to query. Slap the flag on
callback objects and internal functions. Modify the TypeOf operation to use this flag to avoid
making a getCallData() call if it isn't necessary.

* API/JSCallbackObject.h:
* runtime/InternalFunction.h:
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::typeOfShouldCallGetCallData):
* runtime/Operations.cpp:
(JSC::jsTypeStringForValue):
* tests/stress/type-of-functions-and-objects.js: Added.
(foo):
(bar):
(baz):
(fuzz):
(expect):
(test):

Source/WebCore:
JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
https://bugs.webkit.org/show_bug.cgi?id=144397

Reviewed by Andreas Kling.

If you override getCallData() and you want to be called a "function", then you need to use the
new TypeOfShouldCallGetCallData flag.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bridge/objc/objc_runtime.h:
* bridge/runtime_method.h:
* bridge/runtime_object.h:

Source/WebKit2:
JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
https://bugs.webkit.org/show_bug.cgi?id=144397

Reviewed by Andreas Kling.

If you override getCallData() and you want to be called a "function", then you need to use the
new TypeOfShouldCallGetCallData flag.

* WebProcess/Plugins/Netscape/JSNPObject.h:

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

5 years agoMark newly added http/tests/cache/main-resource-304-reload.html failing on Windows.
antti@apple.com [Wed, 29 Apr 2015 20:27:53 +0000 (20:27 +0000)]
Mark newly added http/tests/cache/main-resource-304-reload.html failing on Windows.

* platform/win/TestExpectations:

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

5 years agoUse-after-free when invalidating WKPageForceRepaint callback
ap@apple.com [Wed, 29 Apr 2015 19:55:34 +0000 (19:55 +0000)]
Use-after-free when invalidating WKPageForceRepaint callback
https://bugs.webkit.org/show_bug.cgi?id=144401
rdar://problem/20741111

Reviewed by Tim Horton.

* WebKitTestRunner/TestController.h: (WTR::TestController::isCurrentInvocation): Added.

* WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::forceRepaintDoneCallback):
Don't do anything on error, because the context may be a stale pointer now.

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

5 years agoIt shouldn't take 1846 lines of code and 5 FIXMEs to sort an array.
ggaren@apple.com [Wed, 29 Apr 2015 19:48:00 +0000 (19:48 +0000)]
It shouldn't take 1846 lines of code and 5 FIXMEs to sort an array.
https://bugs.webkit.org/show_bug.cgi?id=144013

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch implements Array.prototype.sort in JavaScript, removing the
C++ implementations. It is simpler and less error-prone to express our
operations in JavaScript, which provides memory safety, exception safety,
and recursion safety.

The performance result is mixed, but net positive in my opinion. It's
difficult to enumerate all the results, since we used to have so many
different sorting modes, and there are lots of different data patterns
across which you might want to measure sorting. Suffice it to say:

    (*) The benchmarks we track are faster or unchanged.

    (*) Sorting random input using a comparator -- which we think is
    common -- is 3X faster.

    (*) Sorting random input in a non-array object -- which jQuery does
    -- is 4X faster.

    (*) Sorting random input in a compact array of integers using a
    trivial pattern-matchable comparator is 2X *slower*.

* builtins/Array.prototype.js:
(sort.min):
(sort.stringComparator):
(sort.compactSparse): Special case compaction for sparse arrays because
we don't want to hang when sorting new Array(BIG).

(sort.compact):
(sort.merge):
(sort.mergeSort): Use merge sort because it's a reasonably efficient
stable sort. We have evidence that some sites depend on stable sort,
even though the ES6 spec does not mandate it. (See
<http://trac.webkit.org/changeset/33967>.)

This is a textbook implementation of merge sort with three optimizations:

    (1) Use iteration instead of recursion;

    (2) Use array subscripting instead of array copying in order to
    create logical sub-lists without creating physical sub-lists;

    (3) Swap src and dst at each iteration instead of copying src into
    dst, and only copy src into the subject array at the end if src is
    not the subject array.

(sort.inflate):
(sort.comparatorSort):
(sort): Sort in JavaScript for the win.

* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createExecutableInternal): Allow non-private
names so we can use helper functions.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::isNumericCompareFunction): Deleted.
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::setIsNumericCompareFunction): Deleted.
(JSC::UnlinkedCodeBlock::isNumericCompareFunction): Deleted.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::setIsNumericCompareFunction): Deleted.
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionNode::emitBytecode): We don't do this special casing based
on pattern matching anymore. This was mainly an optimization to avoid
the overhead of calling from C++ to JS, which we now avoid by
sorting in JS.

* heap/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::pushTempSortVector): Deleted.
(JSC::Heap::popTempSortVector): Deleted.
(JSC::Heap::visitTempSortVectors): Deleted.
* heap/Heap.h: We don't have temp sort vectors anymore because we sort
in JavaScript using a normal JavaScript array for our temporary storage.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseInner): Allow capturing so we can use
helper functions.

* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction): Deleted.
(JSC::attemptFastSort): Deleted.
(JSC::performSlowSort): Deleted.
(JSC::arrayProtoFuncSort): Deleted.

* runtime/CommonIdentifiers.h: New strings used by sort.

* runtime/JSArray.cpp:
(JSC::compareNumbersForQSortWithInt32): Deleted.
(JSC::compareNumbersForQSortWithDouble): Deleted.
(JSC::compareNumbersForQSort): Deleted.
(JSC::compareByStringPairForQSort): Deleted.
(JSC::JSArray::sortNumericVector): Deleted.
(JSC::JSArray::sortNumeric): Deleted.
(JSC::ContiguousTypeAccessor::getAsValue): Deleted.
(JSC::ContiguousTypeAccessor::setWithValue): Deleted.
(JSC::ContiguousTypeAccessor::replaceDataReference): Deleted.
(JSC::ContiguousTypeAccessor<ArrayWithDouble>::getAsValue): Deleted.
(JSC::ContiguousTypeAccessor<ArrayWithDouble>::setWithValue): Deleted.
(JSC::ContiguousTypeAccessor<ArrayWithDouble>::replaceDataReference): Deleted.
(JSC::JSArray::sortCompactedVector): Deleted.
(JSC::JSArray::sort): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::get_less): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::set_less): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::get_greater): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::set_greater): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::get_balance_factor): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::set_balance_factor): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::compare_key_node): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::compare_node_node): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::null): Deleted.
(JSC::JSArray::sortVector): Deleted.
(JSC::JSArray::compactForSorting): Deleted.
* runtime/JSArray.h:

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation): Provide some builtins used
by sort.

Source/WTF:

Remove this custom tree implementation because it is unused. (It was
previously used to achieve a stable array sort in certain cases.)

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/AVLTree.h: Removed.
* wtf/CMakeLists.txt:

LayoutTests:

* js/script-tests/array-holes.js:
* js/array-holes-expected.txt: This result now matches Firefox. We see
'peekaboo', which is a prototype property, rather than a hole, because
sorting uses [[Get]], which sees prototype properties.

The ES6 spec says that sorting should use [[Get]], so this new result
matches the spec a little better -- although the spec also says that the
result of sorting is undefined in this case because of the presence of
an indexed property in the prototype chain.

* js/dom/array-prototype-properties-expected.txt: Updated error message
to match other array prototype error messages.

* js/comparefn-sort-stability-expected.txt:
* js/script-tests/comparefn-sort-stability.js: Made this test bigger in
order to demonstrate that Firefox and Safari use a stable sort, and
Chrome does not.

* js/script-tests/array-sort-sparse.js:
* js/array-sort-sparse-expected.txt: Added some tests for things I got
wrong in this patch.

* script-tests/sort-with-side-effecting-comparisons.js: Made this test
shorter so that it wouldn't hang debug builds. This test is O(N^2). It
used to terminate sooner because our sort implementation would (sometimes)
terminate sooner if you shrank the array. Our new sort does not accept
intermediate updates to the array's length, matching Firefox. I spoke
to Gavin and Alexey about this, and we think that going out of our way
to honor length changes mid-sort doesn't make much sense because it's
not possible to honor the general case of value changes in a predictable
way.

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

5 years agoUnreviewed, rolling out r183553 and r183561.
commit-queue@webkit.org [Wed, 29 Apr 2015 19:42:08 +0000 (19:42 +0000)]
Unreviewed, rolling out r183553 and r183561.
https://bugs.webkit.org/show_bug.cgi?id=144406

broke the iOS build (Requested by thorton__ on #webkit).

Reverted changesets:

"Switch QuickLook soft-linking to use
QuickLookSoftLink.{h,mm}"
https://bugs.webkit.org/show_bug.cgi?id=144362
http://trac.webkit.org/changeset/183553

"Unreviewed iOS build fix after r183553: fix declaration of
QLPreviewScheme"
http://trac.webkit.org/changeset/183561

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

5 years agocheck-webkit-style: Don't complain about returning value from Objective-C method...
ddkilzer@apple.com [Wed, 29 Apr 2015 19:32:54 +0000 (19:32 +0000)]
check-webkit-style: Don't complain about returning value from Objective-C method call in header
<http://webkit.org/b/144395>

Reviewed by Andy Estes.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing): Update regex so 'return' is ignored if it
precedes the whitespace and bracket.  Change category name to
'whitespace/brackets'.  Add period to error message.
(CppChecker): Add 'whitespace/brackets' as a category.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(ErrorCollector.__call__): Replace 'STYLE_CATEGORIES' with
'CppChecker.categories' since that's where the list lives now.
(CppStyleTest.test_spacing_before_brackets): Add tests for
'whitespace/brackets' issues and non-issues.

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

5 years agoFix WinCairo bot.
achristensen@apple.com [Wed, 29 Apr 2015 19:23:04 +0000 (19:23 +0000)]
Fix WinCairo bot.

* Scripts/webkitdirs.pm:
(determinePassedConfiguration):
WinCairo bot doesn't use cygwin, but it needs Release_WinCairo for its configuration.

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

5 years agoWeb Inspector: Navigation bar often looses last button when full
timothy@apple.com [Wed, 29 Apr 2015 19:19:26 +0000 (19:19 +0000)]
Web Inspector: Navigation bar often looses last button when full
https://bugs.webkit.org/show_bug.cgi?id=144385

Added helpers to get the subpixel width and height of an element.
Adopt them in the NavigationBar layout methods to get precise widths
that don't accumulate rounding errors which lead to items overflowing.

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Utilities.js:
(Element.prototype.realOffsetWidth): Added.
(Element.prototype.realOffsetHeight): Added.
* UserInterface/Views/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.updateLayout):
* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar.prototype.updateLayout):
(WebInspector.NavigationBar.prototype._calculateMinimumWidth):
* UserInterface/Views/TabBar.js:
(WebInspector.TabBar.prototype._handleMouseMoved):
* UserInterface/Views/Toolbar.js:
(WebInspector.Toolbar.prototype.customUpdateLayout.isOverflowingToolbar):
(WebInspector.Toolbar.prototype.customUpdateLayout):

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

5 years agoSafari WebKit crash when loading Google Spreadsheet.
mark.lam@apple.com [Wed, 29 Apr 2015 19:00:12 +0000 (19:00 +0000)]
Safari WebKit crash when loading Google Spreadsheet.
https://bugs.webkit.org/show_bug.cgi?id=144020

Reviewed by Filip Pizlo.

The bug is that the object allocation sinking phase did not account for a case
where a property of a sunken object is only initialized on one path and not
another.  As a result, on the path where the property is not initialized, we'll
encounter an Upsilon with a BottomValue (which is not allowed by definition).

The fix is to use a JSConstant(undefined) as the bottom value instead (of
BottomValue).  If the property is uninitialized, it should still be accessible
and have the value undefined.

* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::promoteSunkenFields):
* tests/stress/object-allocation-sinking-with-uninitialized-property-on-one-path.js: Added.
(foo):
(foo2):

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

5 years agoResourceLoadPriority should be enum class
antti@apple.com [Wed, 29 Apr 2015 18:51:23 +0000 (18:51 +0000)]
ResourceLoadPriority should be enum class
https://bugs.webkit.org/show_bug.cgi?id=144326

Reviewed by Darin Adler.

Source/WebCore:

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLink):
* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::scheduleLoad):
(WebCore::ResourceLoadScheduler::servePendingRequests):
(WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
(WebCore::ResourceLoadScheduler::HostInformation::priorityToIndex):
(WebCore::ResourceLoadScheduler::HostInformation::schedule):
(WebCore::ResourceLoadScheduler::HostInformation::remove):
(WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
(WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
* loader/ResourceLoadScheduler.h:
(WebCore::ResourceLoadScheduler::HostInformation::requestsPending):

    Modernize ResourceLoadScheduler code a bit while switching to enum class.

* loader/cache/CachedResource.cpp:
(WebCore::defaultPriorityForResourceType):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading):
* platform/network/ResourceLoadPriority.h:
(WebCore::operator++):
(WebCore::operator--):
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::adopt):
(WebCore::ResourceRequestBase::copyData):
(WebCore::ResourceRequestBase::cachePolicy):
(WebCore::ResourceRequestBase::priority):
(WebCore::ResourceRequestBase::setPriority):
* platform/network/ResourceRequestBase.h:

    Remove bitfields. ResourceRequests are not present in large enough numbers to require this kind of optimization.
    Use modern initialization syntax.

(WebCore::ResourceRequestBase::ResourceRequestBase):
(WebCore::CrossThreadResourceRequestDataBase::CrossThreadResourceRequestDataBase): Deleted.
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::initializeMaximumHTTPConnectionCountPerHost):
(WebCore::initializeHTTPConnectionSettingsOnStartup):
* platform/network/cf/ResourceRequestCFNet.h:
(WebCore::toResourceLoadPriority):
(WebCore::toPlatformRequestPriority):
* platform/network/soup/ResourceRequest.h:
(WebCore::toSoupMessagePriority):
* testing/Internals.cpp:
(WebCore::stringToResourceLoadPriority):

Source/WebKit2:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::servePendingRequests): Deleted.

    Remove this unused message.

* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::makeStoreDecision):
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
(WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::servePendingRequests):
* WebProcess/Network/WebResourceLoadScheduler.h:

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

5 years ago[OS X] Use CTFontCreateForCSS instead of doing font search ourselves
mmaxfield@apple.com [Wed, 29 Apr 2015 18:31:35 +0000 (18:31 +0000)]
[OS X] Use CTFontCreateForCSS instead of doing font search ourselves
https://bugs.webkit.org/show_bug.cgi?id=132159

Reviewed by Darin Adler.

Source/WebCore:

On platforms that support it, delegate font selection logic to the platform. Currently, this is
only supported on Mac, using CTFontCreateForCSS().

This also changes the mechanism that enforces our font whitelist in our tests. We used to
swizzle the implementations of NSFontManager methods. This patch migrates to using a whitelist of
font family names instead.

Note that this patch is a work in progress, because it makes the following tests fail:
fast/css/font-weight-1.html
fast/forms/validation-message-appearance.html
fast/forms/select/optgroup-rendering.html

No new tests, because there is no behavior change.

* platform/graphics/FontCache.h: Add a function to set the whitlist.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::fontWhitelist):
(WebCore::FontCache::setFontWhitelist):
(WebCore::toAppKitFontWeight):
(WebCore::toCoreTextFontWeight):
(WebCore::fontWithFamily): If ENABLE(PLATFORM_FONT_LOOKUP), use CTFontCreateForCSS().
(WebCore::FontCache::createFontPlatformData):
* platform/spi/cocoa/CoreTextSPI.h: Add signature for CTFontCreateForCSS().

Source/WebKit/mac:

Add SPI to set the font whitelist.

* WebView/WebView.mm:
(+[WebView _setFontWhitelist:]):
* WebView/WebViewPrivate.h:

Source/WebKit2:

Add SPI to set the font whitelist.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetFontWhitelist):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setFontWhitelist):
* UIProcess/WebProcessPool.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Source/WTF:

* wtf/Platform.h:

Opt-in using ENABLE(PLATFORM_FONT_LOOKUP)

Tools:

Make DumpRenderTree and WebKitTestRunner use the new font whitelist instead of
swizzling NSFontManager methods. This is predicated on ENABLE(PLATFORM_FONT_LOOKUP).

* DumpRenderTree/mac/DumpRenderTree.mm:
(fontWhitelist):
(adjustFonts):
(createWebViewAndOffscreenWindow):
* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
(WTR::activateFonts):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::allowedFontFamilySet):
(WTR::systemHiddenFontFamilySet):
(WTR::generateWhitelist):
(WTR::TestController::platformInitializeContext):

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

5 years agoUnreviewed iOS build fix after r183553: fix declaration of QLPreviewScheme
jer.noble@apple.com [Wed, 29 Apr 2015 18:13:49 +0000 (18:13 +0000)]
Unreviewed iOS build fix after r183553: fix declaration of QLPreviewScheme

* platform/ios/QuickLookSoftLink.mm:

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

5 years ago[Mac] Use new device picker menu API
eric.carlson@apple.com [Wed, 29 Apr 2015 18:05:25 +0000 (18:05 +0000)]
[Mac] Use new device picker menu API
https://bugs.webkit.org/show_bug.cgi?id=144392

Reviewed by Jer Noble.

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Pass the route state to the picker.
* platform/graphics/MediaPlaybackTargetPicker.h:

* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):  m_deviceChangeTimer -> m_pendingActionTimer.
(WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Ditto.
(WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Renamed from
outputeDeviceAvailabilityChangedTimerFired.
(WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Use addPendingAction.
(WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Call new picker API if it is
available. New API returns true if a target is chosen, so call currentDeviceDidChange in that case.
(WebCore::MediaPlaybackTargetPickerMac::addPendingAction): New.
(WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Make asynchronous because it
can now be called from showPlaybackTargetPicker.
(WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired): Renamed
pendingActionTimerFired.

* platform/spi/cocoa/AVKitSPI.h: Add new SPI.

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

5 years agoREGRESSION (r183373): ASSERT failed in wtf/SHA1.h
utatane.tea@gmail.com [Wed, 29 Apr 2015 17:44:53 +0000 (17:44 +0000)]
REGRESSION (r183373): ASSERT failed in wtf/SHA1.h
https://bugs.webkit.org/show_bug.cgi?id=144257

Reviewed by Darin Adler.

Source/JavaScriptCore:

SHA1 is used to calculate CodeBlockHash.
To calculate hash value, we pass the source code UTF-8 CString to SHA1::addBytes.
However, the source code can contain null character.
So when performing `strlen` on the source code's CString, it returns the incorrect length.
In SHA1::addBytes, there's assertion `input.length() == strlen(string)` and it fails.

In the template-literal-syntax.js, we perform `eval` with the script contains "\0".
As the result, `strlen(string)` accidentally shortened by the contained "\0", and assertion fails.

CString will be changed not to contain a null-character[1]. However, inserting the assertion here
is not correct. Because

1. If CString should not contain a null character, this should be asserted in CString side instead of SHA1::addBytes.
2. If CString can contain a null character, this assertion becomes incorrect.

So this patch just drops the assertion.

In the current implementation, we once convert the entire source code to the newly allocated
UTF-8 string and pass it to the SHA1 processing. However, this is memory consuming.
Ideally, we should stream the decoded bytes into the SHA1 processing iteratively.
We'll implement it in the separate patch[2].

[1]: https://bugs.webkit.org/show_bug.cgi?id=144339
[2]: https://bugs.webkit.org/show_bug.cgi?id=144263

* tests/stress/eval-script-contains-null-character.js: Added.
(shouldBe):
(test):
* tests/stress/template-literal-line-terminators.js:
* tests/stress/template-literal-syntax.js:
* tests/stress/template-literal.js:

Source/WTF:

* wtf/SHA1.h:
(WTF::SHA1::addBytes):

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

5 years agofast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemit...
ap@apple.com [Wed, 29 Apr 2015 17:42:47 +0000 (17:42 +0000)]
fast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemite WK2
https://bugs.webkit.org/show_bug.cgi?id=144155

Reviewed by Andreas Kling.

* WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues):
Make sure that test window is "visible" before each test. While there is no concrete
evidence that this is the problem indeed, the behavior is consistent with what would
happen for an invisible window. Also, WKTR obviously needs to do this to protect
against potential buggy tests that hide the window and don't show it.

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

5 years agoEvict IsEnvironmentRecord from inline type flags
fpizlo@apple.com [Wed, 29 Apr 2015 17:38:28 +0000 (17:38 +0000)]
Evict IsEnvironmentRecord from inline type flags
https://bugs.webkit.org/show_bug.cgi?id=144398

Reviewed by Mark Lam and Michael Saboff.

In https://bugs.webkit.org/show_bug.cgi?id=144397, we'll need an extra bit in the inline
type flags. This change picks the least important inline type flag - IsEnvironmentRecord -
and evicts it into the out-of-line type flags. This change has no performance implications
because we never even accessed IsEnvironmentRecord via the StructureIDBlob. The only place
where we access it at all is in String.prototype.repeat, and there we already load the
structure anyway.

* runtime/JSTypeInfo.h:
(JSC::TypeInfo::implementsHasInstance):
(JSC::TypeInfo::structureIsImmortal):
(JSC::TypeInfo::isEnvironmentRecord):

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

5 years agoMain resource loaded via 304 response becomes empty if reloaded by user
antti@apple.com [Wed, 29 Apr 2015 17:09:51 +0000 (17:09 +0000)]
Main resource loaded via 304 response becomes empty if reloaded by user
https://bugs.webkit.org/show_bug.cgi?id=144386

Reviewed by Darin Adler.

Source/WebCore:

Memory cache layer may make a main resource request conditional (add If-modified-since/If-none-match header).
DocumentLoader stores the final ResourceRequest associated with document. If user triggered reload for
conditionally loaded document DocumentLoader would include the same conditionals to the new request as well.
Since these were not added by the memory cache it would pass any 304 response back to the DocumentLoader.
However DocumentLoader has no code to handle 304 so we would end up with an empty document.

Test: http/tests/cache/main-resource-304-reload.html

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):

    Ensure DocumentLoader doesn't issue conditional requests.

LayoutTests:

* http/tests/cache/main-resource-304-reload-expected.txt: Added.
* http/tests/cache/main-resource-304-reload.html: Added.
* http/tests/cache/resources/iframe304body.php: Added.

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

5 years agoReplace HTMLMediaElement's seek timer with a task queue.
jer.noble@apple.com [Wed, 29 Apr 2015 16:50:10 +0000 (16:50 +0000)]
Replace HTMLMediaElement's seek timer with a task queue.
https://bugs.webkit.org/show_bug.cgi?id=144353

Reviewed by Eric Carlson.

No change in functionality, so no new tests added.

Replace a zero-length timer with an explicit task queue, backed by Document's postTask(). To
make enqueued tasks cancellable, add a new GenericTaskQueue class modelled on
GenericEventQueue which can cancel enqueued but not-yet-executed tasks.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/GenericTaskQueue.cpp: Added.
(WebCore::GenericTaskQueue::GenericTaskQueue): Initialize ivars.
(WebCore::GenericTaskQueue::enqueueTask): Wrap the task and pass it to the ScriptExecutionContext.
(WebCore::GenericTaskQueue::close): Assert that the task queue will not accept any additional tasks.
(WebCore::GenericTaskQueue::cancelAllTasks): Revoke outstanding weak pointers, thereby cancelling tasks.
* dom/GenericTaskQueue.h: Added.
(WebCore::GenericTaskQueue::hasPendingTasks):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the task queue.
(WebCore::HTMLMediaElement::~HTMLMediaElement): Close the task queue.
(WebCore::HTMLMediaElement::seekWithTolerance): Post a task, rather than start a timer.
(WebCore::HTMLMediaElement::seekTask): Renamed from seekTimerFired().
(WebCore::HTMLMediaElement::seekTimerFired): Deleted.
* html/HTMLMediaElement.h:

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

5 years agoSwitch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
ddkilzer@apple.com [Wed, 29 Apr 2015 16:39:06 +0000 (16:39 +0000)]
Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
<http://webkit.org/b/144362>

Reviewed by Andy Estes.

This patch switches soft-linking of QuickLook.framework to
QuickLookSoftLink.{h,mm} so that we stop exporting unintended
symbols.

No new tests since no change in behavior.

* WebCore.xcodeproj/project.pbxproj:
- Add QuickLookSoftLinking.{h,mm} to the project.

* platform/ios/QuickLookSoftLink.h: Added.
* platform/ios/QuickLookSoftLink.mm: Added.
* platform/mac/SoftLinking.h:
(SOFT_LINK_CLASS_FOR_HEADER): Add macro.
(SOFT_LINK_CLASS_FOR_SOURCE): Add macro.

* platform/network/ios/QuickLook.h:
- Remove unused declarations.

* platform/network/ios/QuickLook.mm:
(WebCore::QLPreviewConverterClass): Deleted.
(WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
(WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
(WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
- Remove SOFT_LINK macros and unused methods after switching to
  new QuickLookSoftLink.{h,mm}.
(WebCore::QLPreviewGetSupportedMIMETypesSet):
- Switch to use NeverDestroyed<>.
(WebCore::registerQLPreviewConverterIfNeeded):
(createQLPreviewProtocol):
(WebCore::QLPreviewProtocol):
(WebCore::QuickLookHandle::QuickLookHandle):
(WebCore::QuickLookHandle::create):
(WebCore::QuickLookHandle::shouldCreateForMIMEType):
- Simplify code when using QuickLookSoftLink.h.

* platform/network/ios/WebCoreURLResponseIOS.mm:
- Include QuickLookSoftLink.h header.

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

5 years ago[ES6] Implement Unicode code point escapes
darin@apple.com [Wed, 29 Apr 2015 16:33:12 +0000 (16:33 +0000)]
[ES6] Implement Unicode code point escapes
https://bugs.webkit.org/show_bug.cgi?id=144377

Reviewed by Antti Koivisto.

Source/JavaScriptCore:

* parser/Lexer.cpp: Moved the UnicodeHexValue class in here from
the header. Made it a non-member class so it doesn't need to be part
of a template. Made it use UChar32 instead of int for the value to
make it clearer what goes into this class.
(JSC::ParsedUnicodeEscapeValue::isIncomplete): Added. Replaces the
old type() function.
(JSC::Lexer<CharacterType>::parseUnicodeEscape): Renamed from
parseFourDigitUnicodeHex and added support for code point escapes.
(JSC::isLatin1): Added an overload for UChar32.
(JSC::isIdentStart): Changed this to take UChar32; no caller tries
to call it with a UChar, so no need to overload for that type for now.
(JSC::isNonLatin1IdentPart): Changed argument type to UChar32 for clarity.
Also added FIXME about a subtle ES6 change that we might want to make later.
(JSC::isIdentPart): Changed this to take UChar32; no caller tries
to call it with a UChar, so no need to overload for that type for now.
(JSC::isIdentPartIncludingEscapeTemplate): Made this a template so that we
don't need to repeat the code twice. Added code to handle code point escapes.
(JSC::isIdentPartIncludingEscape): Call the template instead of having the
code in line.
(JSC::Lexer<CharacterType>::recordUnicodeCodePoint): Added.
(JSC::Lexer<CharacterType>::parseIdentifierSlowCase): Made small tweaks and
updated to call parseUnicodeEscape instead of parseFourDigitUnicodeHex.
(JSC::Lexer<CharacterType>::parseComplexEscape): Call parseUnicodeEscape
instead of parseFourDigitUnicodeHex. Move the code to handle "\u" before
the code that handles the escapes, since the code point escape code now
consumes characters while parsing rather than peeking ahead. Test case
covers this: Symptom would be that "\u{" would evaluate to "u" instead of
giving a syntax error.

* parser/Lexer.h: Updated for above changes.

* runtime/StringConstructor.cpp:
(JSC::stringFromCodePoint): Use ICU's UCHAR_MAX_VALUE instead of writing
out 0x10FFFF; clearer this way.

Source/WebCore:

Test: js/unicode-escape-sequences.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseEscape): Use ICU's UCHAR_MAX_VALUE instead of writing
out 0x10FFFF; clearer this way. Also use our replacementCharacter instead of
writing out 0xFFFD.

* html/parser/HTMLEntityParser.cpp:
(WebCore::isAlphaNumeric): Deleted.
(WebCore::HTMLEntityParser::legalEntityFor): Use ICU's UCHAR_MAX_VALUE and
U_IS_SURROGATE instead of writing the code out. Didn't use U_IS_UNICODE_CHAR
because that also includes U_IS_UNICODE_NONCHAR and thus would change behavior,
but maye it's something we want to do in the future.
(WebCore::HTMLEntityParser::consumeNamedEntity): Use isASCIIAlphanumeric instead
of a the function in this file that does the same thing less efficiently.

* html/parser/InputStreamPreprocessor.h:
(WebCore::InputStreamPreprocessor::processNextInputCharacter): Use
replacementCharacter from CharacterNames.h instead of writing out 0xFFFd.

* xml/parser/CharacterReferenceParserInlines.h:
(WebCore::consumeCharacterReference): Use ICU's UCHAR_MAX_VALUE instead of
defining our own local highestValidCharacter constant.

LayoutTests:

* js/script-tests/unicode-escape-sequences.js: Added.
* js/unicode-escape-sequences-expected.txt: Added.
* js/unicode-escape-sequences.html: Added. Generated with make-script-test-wrappers.

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

5 years ago[WinCairo] Turn on WebGL.
peavo@outlook.com [Wed, 29 Apr 2015 16:32:05 +0000 (16:32 +0000)]
[WinCairo] Turn on WebGL.
https://bugs.webkit.org/show_bug.cgi?id=144389

Reviewed by Brent Fulgham.

* win/tools/vsprops/FeatureDefinesCairo.props:

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

5 years ago[CMake] [GTK] Organize and clean up unused CMake variables
mrobinson@webkit.org [Wed, 29 Apr 2015 16:20:34 +0000 (16:20 +0000)]
[CMake] [GTK] Organize and clean up unused CMake variables
https://bugs.webkit.org/show_bug.cgi?id=144364

Reviewed by Gyuyoung Kim.

.:

* Source/cmake/OptionsGTK.cmake: Remove unused variables and move variables
specific to certain projects into their PlatformGTK.cmake files.

Source/JavaScriptCore:

* PlatformGTK.cmake: Add variables specific to this project.

Source/WebCore:

* PlatformGTK.cmake: Add variables specific to this project.

Source/WebKit2:

* PlatformGTK.cmake: Add variables specific to this project.
* webkit2gtk-web-extension.pc.in: Hardcode the GTK+ API version. It rarely changes.
* webkit2gtk.pc.in: Ditto.

Source/WTF:

* wtf/PlatformGTK.cmake: Add variables specific to this project.

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

5 years agoTypeOf should return SpecStringIdent and the DFG should know this
fpizlo@apple.com [Wed, 29 Apr 2015 15:55:54 +0000 (15:55 +0000)]
TypeOf should return SpecStringIdent and the DFG should know this
https://bugs.webkit.org/show_bug.cgi?id=144376

Reviewed by Andreas Kling.

Make TypeOf return atomic strings. That's a simple change in SmallStrings.

Make the DFG know this and use it for optimization. This makes Switch(TypeOf) a bit less
bad.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::setType):
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::setType):
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::initialize):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* runtime/SmallStrings.cpp:
(JSC::SmallStrings::initialize):
* tests/stress/switch-typeof-indirect.js: Added.
(bar):
(foo):
(test):
* tests/stress/switch-typeof-slightly-indirect.js: Added.
(foo):
(test):
* tests/stress/switch-typeof.js: Added.
(foo):
(test):

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

5 years agoREGRESSION(r182573): [GTK] The default context menu contains an empty item since...
carlosgc@webkit.org [Wed, 29 Apr 2015 15:49:43 +0000 (15:49 +0000)]
REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
https://bugs.webkit.org/show_bug.cgi?id=144388

Reviewed by Brady Eidson.

Source/WebCore:

There used to be a method in ContextMenuItem to check if share
menu item was supported or not, but since r182573, there's a
method to get the share menu item. If the returned menu item is
null, it's not added to the menu, but we are not returning a null
ContextMenu item even though we don't support share menu item.

* platform/gtk/ContextMenuItemGtk.cpp:
(WebCore::ContextMenuItem::shareMenuItem): Return a null ContextMenuItem.

Source/WebKit2:

Move the WebContextMenuClient::shareMenuItem() implementation to
platform files, since platforms not supporting share menu item
should return a null ContextMenuIem instead.

* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::shareMenuItem): Deleted.
* WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
(WebKit::WebContextMenuClient::shareMenuItem):
* WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
(WebKit::WebContextMenuClient::shareMenuItem):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::shareMenuItem):

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

5 years agoREGRESSION(r183467): [SOUP] isMainResource is no longer passed as resource load param...
carlosgc@webkit.org [Wed, 29 Apr 2015 15:47:25 +0000 (15:47 +0000)]
REGRESSION(r183467): [SOUP] isMainResource is no longer passed as resource load parameters to the network process
https://bugs.webkit.org/show_bug.cgi?id=144381

Reviewed by Darin Adler.

A requester enum value is passed now as part of the
ResourceRequest, but it's not encoded/decoded for soup.

* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData): Encode requester.
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData): Decode requester.

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

5 years ago[EFL] Build failure to find gio-unix
ryuan.choi@navercorp.com [Wed, 29 Apr 2015 14:34:53 +0000 (14:34 +0000)]
[EFL] Build failure to find gio-unix
https://bugs.webkit.org/show_bug.cgi?id=144083

Reviewed by Gyuyoung Kim.

Original patch by Doug Newgard <scimma22@outlook.com>

* Source/cmake/OptionsEfl.cmake: Moved geoclue block before find_package(GLIB...)

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

5 years agoSwitch to std::function<>, std::bind() in MediaPlayerPrivateAVFoundationObjC
zandobersek@gmail.com [Wed, 29 Apr 2015 13:13:00 +0000 (13:13 +0000)]
Switch to std::function<>, std::bind() in MediaPlayerPrivateAVFoundationObjC
https://bugs.webkit.org/show_bug.cgi?id=144232

Reviewed by Darin Adler.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
Replace uses of WTF::Function<> and WTF::bind() with the STL alternatives.

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

5 years agoUnreviewed. Fix /webkit2/WebKitWebInspectorServer/test-open-debugging-session.
carlosgc@webkit.org [Wed, 29 Apr 2015 12:43:55 +0000 (12:43 +0000)]
Unreviewed. Fix /webkit2/WebKitWebInspectorServer/test-open-debugging-session.

Latest changes in the inspector UI made this test fail. We were
relying that the sidebar was always visible and the first 'li'
element of the inspector was the one containing the title. This is
no longer true, so better use document title that is not likely
to change.

* TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp:
(openRemoteDebuggingSession):

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

5 years agoUnreviewed. Re-sorted my contributor's mails to help bugzilla on showing the proper...
carlosgc@webkit.org [Wed, 29 Apr 2015 12:10:01 +0000 (12:10 +0000)]
Unreviewed. Re-sorted my contributor's mails to help bugzilla on showing the proper one.

Patch by Andres Gomez <agomez@igalia.com> on 2015-04-29

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

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

5 years agoUnreviewed. Created a new watchlist for changes in WebInspectorUI images and added...
carlosgc@webkit.org [Wed, 29 Apr 2015 12:05:58 +0000 (12:05 +0000)]
Unreviewed. Created a new watchlist for changes in WebInspectorUI images and added myself to it.

Patch by Andres Gomez <agomez@igalia.com> on 2015-04-29

* Scripts/webkitpy/common/config/watchlist:

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

5 years ago[EFL] Allow to run the tests on the native X display
ossy@webkit.org [Wed, 29 Apr 2015 11:14:51 +0000 (11:14 +0000)]
[EFL] Allow to run the tests on the native X display
https://bugs.webkit.org/show_bug.cgi?id=144247

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-04-29
Reviewed by Gyuyoung Kim.

Added the USE_NATIVE_XDISPLAY option for the WTR.
We can select the Xorg driver if environment variable is set up before running the tests.

* Scripts/webkitpy/port/efl.py:
(EflPort._driver_class):

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

5 years ago[GTK] Add libnotify-dev in gtk install-dependencies
commit-queue@webkit.org [Wed, 29 Apr 2015 09:58:42 +0000 (09:58 +0000)]
[GTK] Add libnotify-dev in gtk install-dependencies
https://bugs.webkit.org/show_bug.cgi?id=144379

Patch by Joonghun Park <jh718.park@samsung.com> on 2015-04-29
Reviewed by Žan Doberšek.

* gtk/install-dependencies:

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

5 years agoFix crash in WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock().
commit-queue@webkit.org [Wed, 29 Apr 2015 08:23:12 +0000 (08:23 +0000)]
Fix crash in WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock().
https://bugs.webkit.org/show_bug.cgi?id=140261

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-04-29
Reviewed by Darin Adler.

Source/WebCore:

We need to check whether RenderObject is valid in RenderView::fooSubtreeSelection functions
because invalid object has caused a crash. This patch adds isValidObjectForNewSelection(), and use it.

* rendering/RenderView.cpp:
(WebCore::isValidObjectForNewSelection):
(WebCore::RenderView::clearSubtreeSelection):
(WebCore::RenderView::applySubtreeSelection):

LayoutTests:

* editing/execCommand/crash-140261-expected.txt: Added.
* editing/execCommand/crash-140261.html: Added.

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

5 years agoSynchronous XMLHttpRequest should get access to AppCache resources stored as flat...
youenn.fablet@crf.canon.fr [Wed, 29 Apr 2015 08:18:10 +0000 (08:18 +0000)]
Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
https://bugs.webkit.org/show_bug.cgi?id=143711

Reviewed by Darin Adler.

Source/WebCore:

This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.

Test: http/tests/appcache/simple-video-sync.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/FrameLoader.h:
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::maybeLoadResource):
(WebCore::ApplicationCacheHost::createFileURL):
(WebCore::ApplicationCacheHost::maybeLoadSynchronously):
(WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
* loader/appcache/ApplicationCacheHost.h:
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::docLoaderFunc):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::openFunc):

LayoutTests:

* http/tests/appcache/resources/fake-video.mp4: Added.
* http/tests/appcache/resources/simple-video-sync.manifest: Added.
* http/tests/appcache/simple-video-sync-expected.txt: Added.
* http/tests/appcache/simple-video-sync.html: Added.

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

5 years agoPurge PassRefPtr from createSVGPathSegFoo factory functions
gyuyoung.kim@webkit.org [Wed, 29 Apr 2015 08:17:08 +0000 (08:17 +0000)]
Purge PassRefPtr from createSVGPathSegFoo factory functions
https://bugs.webkit.org/show_bug.cgi?id=144374

Reviewed by Darin Adler.

Use Ref instead of PassRefPtr in createSVGPathSegFoo functions because
those factory functions can't return null. Additionally let's remove unnecessary
#include<PassRefPtr.h> there.

No new tests, no behavior changes.

* svg/SVGColor.cpp:
(WebCore::SVGColor::cloneForCSSOM):
* svg/SVGColor.h:
* svg/SVGGlyphMap.h:
(WebCore::GlyphMapNode::create):
* svg/SVGPaint.cpp:
(WebCore::SVGPaint::cloneForCSSOM):
* svg/SVGPaint.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::createSVGPathSegClosePath):
(WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
(WebCore::SVGPathElement::createSVGPathSegMovetoRel):
(WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
(WebCore::SVGPathElement::createSVGPathSegLinetoRel):
(WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
(WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
(WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
(WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
(WebCore::SVGPathElement::createSVGPathSegArcAbs):
(WebCore::SVGPathElement::createSVGPathSegArcRel):
(WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
(WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
(WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
(WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
(WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
(WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
(WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
(WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
* svg/SVGPathElement.h:
* svg/SVGPathSegArcAbs.h:
(WebCore::SVGPathSegArcAbs::create):
* svg/SVGPathSegArcRel.h:
(WebCore::SVGPathSegArcRel::create):
* svg/SVGPathSegClosePath.h:
(WebCore::SVGPathSegClosePath::create):
* svg/SVGPathSegCurvetoCubicAbs.h:
(WebCore::SVGPathSegCurvetoCubicAbs::create):
* svg/SVGPathSegCurvetoCubicRel.h:
(WebCore::SVGPathSegCurvetoCubicRel::create):
* svg/SVGPathSegCurvetoCubicSmoothAbs.h:
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
* svg/SVGPathSegCurvetoCubicSmoothRel.h:
(WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
* svg/SVGPathSegCurvetoQuadraticAbs.h:
(WebCore::SVGPathSegCurvetoQuadraticAbs::create):
* svg/SVGPathSegCurvetoQuadraticRel.h:
(WebCore::SVGPathSegCurvetoQuadraticRel::create):
* svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
* svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
* svg/SVGPathSegLinetoAbs.h:
(WebCore::SVGPathSegLinetoAbs::create):
* svg/SVGPathSegLinetoHorizontalAbs.h:
(WebCore::SVGPathSegLinetoHorizontalAbs::create):
* svg/SVGPathSegLinetoHorizontalRel.h:
(WebCore::SVGPathSegLinetoHorizontalRel::create):
* svg/SVGPathSegLinetoRel.h:
(WebCore::SVGPathSegLinetoRel::create):
* svg/SVGPathSegLinetoVerticalAbs.h:
(WebCore::SVGPathSegLinetoVerticalAbs::create):
* svg/SVGPathSegLinetoVerticalRel.h:
(WebCore::SVGPathSegLinetoVerticalRel::create):
* svg/SVGPathSegMovetoAbs.h:
(WebCore::SVGPathSegMovetoAbs::create):
* svg/SVGPathSegMovetoRel.h:
(WebCore::SVGPathSegMovetoRel::create):
* svg/SVGViewSpec.h:
(WebCore::SVGViewSpec::create):
* svg/animation/SMILTimeContainer.h:
(WebCore::SMILTimeContainer::create):
* svg/animation/SVGSMILElement.cpp:
(WebCore::ConditionEventListener::create):
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageForContainer.h:
* svg/graphics/filters/SVGFilter.cpp:
(WebCore::SVGFilter::create):
* svg/graphics/filters/SVGFilter.h:

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

5 years agoREGRESSION(181868): Windows Live SkyDrive cannot open an excel file
commit-queue@webkit.org [Wed, 29 Apr 2015 07:53:36 +0000 (07:53 +0000)]
REGRESSION(181868): Windows Live SkyDrive cannot open an excel file
https://bugs.webkit.org/show_bug.cgi?id=144373

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

Source/JavaScriptCore:

Revert r181868 as it caused a failure on live.com. We can try
re-enabling this exception after we make idl attributes configurable,
which may have prevented this particular failure.

* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):

LayoutTests:

* js/property-getters-and-setters-expected.txt:
* js/script-tests/property-getters-and-setters.js:

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

5 years agoVersioning.
bshafiei@apple.com [Wed, 29 Apr 2015 06:20:24 +0000 (06:20 +0000)]
Versioning.

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

5 years ago[SOUP] Use xattrs to get/set the creation time of disk cache files
carlosgc@webkit.org [Wed, 29 Apr 2015 06:18:33 +0000 (06:18 +0000)]
[SOUP] Use xattrs to get/set the creation time of disk cache files
https://bugs.webkit.org/show_bug.cgi?id=144251

Reviewed by Martin Robinson.

The network process disk cache uses the creation time to compute a
worth value used to determine the order in which cached resources
are deleted when the cache is shrunk. In some operating systems
like Linux there's no st_birthtime in struct stat, but since cache
files are always created and deleted by us, we could use a custom
xattr to store and retrieve the creation time of cached resources.

* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::fileTimes):
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
(WebKit::NetworkCache::IOChannel::IOChannel):

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

5 years agoNetwork Cache: Do not create a SharedBuffer for mapped resources unless explicitly...
carlosgc@webkit.org [Wed, 29 Apr 2015 06:14:51 +0000 (06:14 +0000)]
Network Cache: Do not create a SharedBuffer for mapped resources unless explicitly requested
https://bugs.webkit.org/show_bug.cgi?id=144337

Reviewed by Antti Koivisto.

We send a buffer or a memory mapped handler to the web process
depending on whether the resource body is mapped or not, but we
are always creating a shared buffer even for mapped resources.
Split initializeBufferFromStorageRecord() moving the mapped memory
handler initialization to its own method.

* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
Initialize the mapped memory handler if the body data is mapped.
(WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
Initialize the buffer by wrapping the mapped memory if the body
data is mapped, or using the body data directly otherwise.
(WebKit::NetworkCache::Entry::shareableResourceHandle): Call
initializeShareableResourceHandleFromStorageRecord() if the
handler is null.
* NetworkProcess/cache/NetworkCacheEntry.h:

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

5 years agoMake a non-static version of FrameView::yPositionForRootContentLayer()
simon.fraser@apple.com [Wed, 29 Apr 2015 05:51:30 +0000 (05:51 +0000)]
Make a non-static version of FrameView::yPositionForRootContentLayer()
https://bugs.webkit.org/show_bug.cgi?id=144375

Reviewed by Andy Estes.

There were two calls to the static FrameView::yPositionForRootContentLayer()
which passed in all the arguments for the same FrameView. Make a member
function for convenience.

Source/WebCore:

* page/FrameView.cpp:
(WebCore::FrameView::yPositionForRootContentLayer):
* page/FrameView.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateRootLayerPosition):

Source/WebKit2:

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::shadowLayerPositionForFrame):

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

5 years ago[CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
ryuan.choi@navercorp.com [Wed, 29 Apr 2015 05:05:48 +0000 (05:05 +0000)]
[CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
https://bugs.webkit.org/show_bug.cgi?id=143001

Reviewed by Gyuyoung Kim.

.:

* Source/cmake/OptionsEfl.cmake: Removed TILED_BACKING_STORE definition.
* Source/cmake/OptionsGTK.cmake: Ditto.

Source/WebCore:

TiledBackingStore has only been used by Coordinated Graphics since Qt and WebKit1/Efl were dropped.
So, this patch replaces USE(TILED_BACKING_STORE) with USE(COORDINATED_GRAPHICS) to merge the features.

In addition, this moves TiledBackingStore and related files from platform to platform/texmap/coordinated
where other coordinated graphics files are located.

* CMakeLists.txt: Move TiledBackingStore.cpp because this is not common file.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* WebCore.vcxproj/WebCore.vcxproj: Follow new location of TiledBackingStore* files.
* WebCore.vcxproj/WebCore.vcxproj.filters:
* loader/EmptyClients.h:
* page/Chrome.cpp:
* page/Chrome.h:
* page/ChromeClient.h:
* page/Frame.cpp:
(WebCore::Frame::createView):
* page/FrameView.cpp:
(WebCore::FrameView::requestScrollPositionUpdate):
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::setPageScaleFactor):
* platform/HostWindow.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
(WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
(WebCore::ScrollView::visibleContentRectInternal):
(WebCore::ScrollView::scrollTo):
* platform/ScrollView.h:
* platform/graphics/cairo/TileCairo.h: Removed because it is dead code since r169328
* platform/graphics/texmap/coordinated/Tile.h: Renamed from Source/WebCore/platform/graphics/Tile.h.
* platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.cpp.
* platform/graphics/texmap/coordinated/TiledBackingStore.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.h.
* platform/graphics/texmap/coordinated/TiledBackingStoreBackend.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreBackend.h.
* platform/graphics/texmap/coordinated/TiledBackingStoreClient.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreClient.h.

Source/WebKit/win:

* WebCoreSupport/WebChromeClient.h:
(WebChromeClient::delegatedScrollRequested):
Deleted because WIN does not use Coordinated Graphics.

Source/WebKit2:

* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSize):
(WebKit::WebPage::setUseFixedLayout):
(WebKit::WebPage::canHandleUserEvents):
* WebProcess/WebPage/WebPage.h:

Tools:

* WebKitTestRunner/TestController.cpp:
(WTR::shouldUseFixedLayout):

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

5 years agoDeadlock on applications using JSContext on non-main thread
commit-queue@webkit.org [Wed, 29 Apr 2015 03:56:47 +0000 (03:56 +0000)]
Deadlock on applications using JSContext on non-main thread
https://bugs.webkit.org/show_bug.cgi?id=144370

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

* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::singleton):
Prevent a possible deadlock by assuming we can synchronously
run something on the main queue at this time.

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

5 years agoFTL should fully support Switch (it currently lacks the SwitchString variant)
fpizlo@apple.com [Wed, 29 Apr 2015 03:34:43 +0000 (03:34 +0000)]
FTL should fully support Switch (it currently lacks the SwitchString variant)
https://bugs.webkit.org/show_bug.cgi?id=144348

Reviewed by Benjamin Poulain.

This adds SwitchString support to the FTL. This is already tested by switch microbenchmarks
in LayoutTests/js/regress.

* dfg/DFGCommon.cpp:
(JSC::DFG::stringLessThan):
* dfg/DFGCommon.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::StringSwitchCase::operator<): Deleted.
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::StringSwitchCase::operator<):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileSwitch):
(JSC::FTL::LowerDFGToLLVM::switchString):
(JSC::FTL::LowerDFGToLLVM::StringSwitchCase::StringSwitchCase):
(JSC::FTL::LowerDFGToLLVM::StringSwitchCase::operator<):
(JSC::FTL::LowerDFGToLLVM::CharacterCase::CharacterCase):
(JSC::FTL::LowerDFGToLLVM::CharacterCase::operator<):
(JSC::FTL::LowerDFGToLLVM::switchStringRecurse):
(JSC::FTL::LowerDFGToLLVM::switchStringSlow):
(JSC::FTL::LowerDFGToLLVM::appendOSRExit):
* ftl/FTLOutput.cpp:
(JSC::FTL::Output::check):
* ftl/FTLOutput.h:
* ftl/FTLWeight.h:
(JSC::FTL::Weight::inverse):
* jit/JITOperations.h:

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

5 years agoREGRESSION(180076): [Mac, iOS] Correct possible null dereference in printing code
bfulgham@apple.com [Wed, 29 Apr 2015 02:26:07 +0000 (02:26 +0000)]
REGRESSION(180076): [Mac, iOS] Correct possible null dereference in printing code
https://bugs.webkit.org/show_bug.cgi?id=144366
<rdar://problem/20533513>

Reviewed by Dean Jackson.

* rendering/RenderBlockFlow.cpp:
(WebCore::needsAppleMailPaginationQuirk): Check if the document settings is a nullptr
before attempting to dereference it.

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

5 years agoSimplify DOM wrapper destruction, don't deref() in finalizers.
akling@apple.com [Wed, 29 Apr 2015 02:12:31 +0000 (02:12 +0000)]
Simplify DOM wrapper destruction, don't deref() in finalizers.
<https://webkit.org/b/144183>

Reviewed by Darin Adler.

DOM JS bindings had two mechanisms to call deref() on the WebCore object,
once through a weak finalizer, and once through the JSCell's regular destructor.

That was once believed to be an optimization, but these days the finalizer will
run just moments before the destructor anyway, all in the same call stack.
And more importantly, the finalizer is not guaranteed to run, for instance in the
case where a Weak is assigned to after going dead, but before the WeakBlock
has been swept by the incremental sweeper.

Simplify this by just removing the deref() from the generated finalizers.
This makes it easier to reason about DOM wrapper destruction, and eliminates
the awkward time window  where a DOM wrapper could have a null impl().

We could spend more time on figuring out a way to have finalizers manage the
destruction of these wrappers, but that would require fundamental changes to
our implementation of JSC::Weak pointers. It would allow us to make JSDOMWrapper
destructor-less, and shrink each wrapper object by 1 pointer (the ClassInfo*.)
However the risk:reward ratio does not seem justified at this point in time.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/js/JSCSSValueCustom.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject):
(WebCore::JSTestActiveDOMObjectOwner::finalize):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter):
(WebCore::JSTestCustomNamedGetterOwner::finalize):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructor::~JSTestEventConstructor):
(WebCore::JSTestEventConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::~JSTestEventTarget):
(WebCore::JSTestEventTargetOwner::finalize):
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestException::~JSTestException):
(WebCore::JSTestExceptionOwner::finalize):
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::JSTestGenerateIsReachable::~JSTestGenerateIsReachable):
(WebCore::JSTestGenerateIsReachableOwner::finalize):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::~JSTestInterface):
(WebCore::JSTestInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener):
(WebCore::JSTestMediaQueryListListenerOwner::finalize):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructor::~JSTestNamedConstructor):
(WebCore::JSTestNamedConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
(WebCore::JSTestNondeterministic::~JSTestNondeterministic):
(WebCore::JSTestNondeterministicOwner::finalize):
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::~JSTestObj):
(WebCore::JSTestObjOwner::finalize):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
(WebCore::JSTestOverloadedConstructorsOwner::finalize):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface):
(WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefs::~JSTestTypedefs):
(WebCore::JSTestTypedefsOwner::finalize):
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::JSattribute::~JSattribute):
(WebCore::JSattributeOwner::finalize):
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::JSreadonly::~JSreadonly):
(WebCore::JSreadonlyOwner::finalize):
* bindings/scripts/test/JS/JSreadonly.h:

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

5 years agoBuild WinCairo without cygwin.
achristensen@apple.com [Wed, 29 Apr 2015 00:57:27 +0000 (00:57 +0000)]
Build WinCairo without cygwin.
https://bugs.webkit.org/show_bug.cgi?id=144365

Reviewed by Myles Maxfield.

* WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
Pass the CC executable to build-generated-files.pl like r182164.
* WebCore.vcxproj/build-generated-files.pl:
Default to 8 CPUs unless otherwise specified.

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

5 years agoIncrease stablility of run-benchmark script
commit-queue@webkit.org [Wed, 29 Apr 2015 00:51:36 +0000 (00:51 +0000)]
Increase stablility of run-benchmark script
https://bugs.webkit.org/show_bug.cgi?id=144361

Patch by Dewei Zhu <dewei_zhu@apple.com> on 2015-04-28
Reviewed by Ryosuke Niwa.

* Scripts/run-benchmark:
(main):
* Scripts/webkitpy/benchmark_runner/README.md: Update readme due to changes.
* Scripts/webkitpy/benchmark_runner/benchmark_builder/generic_benchmark_builder.py:
(GenericBenchmarkBuilder.clean):
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Improve error handling and remove an unnecessary loop.
(BenchmarkRunner.__init__):
(BenchmarkRunner.execute):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
(OSXSafariDriver.prepareEnv): Remove saved sessions of Safari.
* Scripts/webkitpy/benchmark_runner/data/patches/JetStream.patch: Upload 'results' rather than 'time'.
* Scripts/webkitpy/benchmark_runner/data/plans/jetstream.plan: Update formate.
* Scripts/webkitpy/benchmark_runner/data/plans/speedometer.plan: Update formate.
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
(ServerControl.render_POST): Flush the buffer to make sure we can pass the result to stdout.
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:
(HTTPServerDriver.fetchResult):
(HTTPServerDriver):
(HTTPServerDriver.killServer): Add kill server interface.
(HTTPServerDriver.getReturnCode): Add get return code interface.
* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: Adjust to support new interfaces.
(SimpleHTTPServerDriver.serve):
(SimpleHTTPServerDriver.fetchResult):
(SimpleHTTPServerDriver):
(SimpleHTTPServerDriver.killServer):
(SimpleHTTPServerDriver.getReturnCode):
* Scripts/webkitpy/benchmark_runner/utils.py:
(forceRemove): Provide python version of 'rm -rf'.

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

5 years ago[Content Extensions] Process NFAs individually to avoid having all NFAs live at the...
weinig@apple.com [Wed, 29 Apr 2015 00:22:33 +0000 (00:22 +0000)]
[Content Extensions] Process NFAs individually to avoid having all NFAs live at the same time
https://bugs.webkit.org/show_bug.cgi?id=144363

Reviewed by Alex Christensen.

Source/WebCore:

This brings dirty memory use when compiling our test content extension down from ~300MB to ~100MB.

* contentextensions/CombinedURLFilters.cpp:
(WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
(WebCore::ContentExtensions::CombinedURLFilters::createNFAs): Deleted.
* contentextensions/CombinedURLFilters.h:
Replace function that creates a Vector of all the NFAs with one that allows incremental processing
as they are created.

* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::addUniversalActionsToDFA):
Extract code to add universal actions into a helper, since we need to call it in two places now.

(WebCore::ContentExtensions::compileRuleList):
Adopt CombinedURLFilters::processNFAs. Now that we don't have a Vector of NFAs, we need to keep track
of whether or not any NFAs were processed and if we are currently processing the first NFA so we can
ensure that we have some bytecode generated event for empty rule sets, and that universal actions are
placed on the first DFA.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::createNFAs):
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebCore/DFAMinimizer.cpp:
(TestWebKitAPI::countLiveNodes):
(TestWebKitAPI::createNFAs):
(TestWebKitAPI::buildDFAFromPatterns):
Update tests to use a hand rolled createNFAs function on top of CombinedURLFilters::processNFAs.

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

5 years ago[TextIndicator] Yellow highlight takes too long to fade out on scroll
timothy_horton@apple.com [Tue, 28 Apr 2015 23:27:21 +0000 (23:27 +0000)]
[TextIndicator] Yellow highlight takes too long to fade out on scroll
https://bugs.webkit.org/show_bug.cgi?id=144358
<rdar://problem/19451011>

Reviewed by Beth Dakin.

* page/TextIndicator.h:
Add Lifetime and DismissalAnimation enums.

(WebCore::TextIndicator::contentImageWithHighlight):
(WebCore::TextIndicator::contentImage):
Fix style.

* page/mac/TextIndicatorWindow.h:
* page/mac/TextIndicatorWindow.mm:
(WebCore::TextIndicatorWindow::TextIndicatorWindow):
(WebCore::TextIndicatorWindow::~TextIndicatorWindow):
(WebCore::TextIndicatorWindow::clearTextIndicator):
(WebCore::TextIndicatorWindow::setTextIndicator):
(WebCore::TextIndicatorWindow::closeWindow):
(WebCore::TextIndicatorWindow::startFadeOut):
Rename m_startFadeOutTimer to m_temporaryTextIndicatorTimer (and related).
This is just about temporary-lifetime TextIndicators, like the ones
you get when the find-in-page UI is hidden but you hit Cmd-G.

Add clearTextIndicator, which takes a DismissalAnimation, providing
clients an opportunity to avoid the normal fade-out animation, if it
was going to happen.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _showTextIndicator]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView quickLookWithEvent:]):
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _defaultAnimationController]):
(-[WebImmediateActionController _animationControllerForDataDetectedText]):
(-[WebImmediateActionController _animationControllerForDataDetectedLink]):
Pull _clearTextIndicatorWithAnimation out, make it avoid using a dismissal animation
if we're called from didHandleScrollWheel.

* WebView/WebView.mm:
(-[WebView _animationControllerForDictionaryLookupPopupInfo:]):
(-[WebView _setTextIndicator:]):
(-[WebView _setTextIndicator:withLifetime:]):
(-[WebView _clearTextIndicator]):
(-[WebView _showDictionaryLookupPopup:]):
(-[WebView _dictionaryLookupPopoverWillClose:]):
(-[WebView _setTextIndicator:fadeOut:]): Deleted.
* WebView/WebViewInternal.h:
Make _setTextIndicator take a reference.
Add a variant of _setTextIndicator that takes a Lifetime.
Make _clearTextIndicatorWithAnimation take a DismissalAnimation.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView renewGState]):
(-[WKView viewDidMoveToWindow]):
(-[WKView _dictionaryLookupPopoverWillClose:]):
(-[WKView _setTextIndicator:]):
(-[WKView _setTextIndicator:withLifetime:]):
(-[WKView _clearTextIndicatorWithAnimation:]):
(-[WKView magnifyWithEvent:]):
(-[WKView smartMagnifyWithEvent:]):
(-[WKView setMagnification:centeredAtPoint:]):
(-[WKView setMagnification:]):
(-[WKView _dismissContentRelativeChildWindows]):
(-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
(-[WKView _setTextIndicator:fadeOut:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::setTextIndicator):
(WebKit::WebPageProxy::clearTextIndicator):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setTextIndicator):
(WebKit::PageClientImpl::clearTextIndicator):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setTextIndicator):
(WebKit::PageClientImpl::clearTextIndicator):
(WebKit::PageClientImpl::didPerformDictionaryLookup):
(WebKit::PageClientImpl::dismissContentRelativeChildWindows):
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController _animationControllerForDataDetectedText]):
(-[WKImmediateActionController _animationControllerForDataDetectedLink]):
(-[WKImmediateActionController _animationControllerForText]):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
Make _setTextIndicator take a reference.
Add a variant of _setTextIndicator that takes a Lifetime.
Make _clearTextIndicatorWithAnimation take a DismissalAnimation.
Make dismissContentRelativeChildWindows take a parameter indicating
whether the dismissal should include animation or not (currently
only applies to TextIndicator).
Don't animate when dismissal occurs because of scrolling, zooming,
or other things in which the content will have changed significantly
underneath the indicator and shouldn't have a slowly-fading-out yellow highlight.

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

5 years agoFully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
mcatanzaro@igalia.com [Tue, 28 Apr 2015 23:16:24 +0000 (23:16 +0000)]
Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
https://bugs.webkit.org/show_bug.cgi?id=144304

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig: Define ENABLE_JIT, enabled by default, instead of
ENABLE_LLINT_C_LOOP, disabled by default.
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL): Check ENABLE_JIT instead of ENABLE_LLINT_C_LOOP.

Source/WebCore:

Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

No longer check ENABLE_LLINT_C_LOOP to determine the value of ENABLE_JIT.

* wtf/Platform.h:

Tools:

* Scripts/build-jsc: Use ENABLE_JIT instead of ENABLE_LLINT_C_LOOP on Mac. Always explicitly
set the value of ENABLE_JIT and ENABLE_FTL_JIT to avoid assumptions about the default value.
* Scripts/webkitperl/FeatureList.pm: Add --jit option to build-webkit.

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

5 years agoUnreviewed, rolling out r183514.
commit-queue@webkit.org [Tue, 28 Apr 2015 23:04:23 +0000 (23:04 +0000)]
Unreviewed, rolling out r183514.
https://bugs.webkit.org/show_bug.cgi?id=144359

It broke cloop test bots (Requested by mcatanzaro on #webkit).

Reverted changeset:

"Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
https://bugs.webkit.org/show_bug.cgi?id=144304
http://trac.webkit.org/changeset/183514

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