WebKit-https.git
6 years agoGenerate header detection headers for CMake on Windows.
achristensen@apple.com [Tue, 12 Aug 2014 22:43:19 +0000 (22:43 +0000)]
Generate header detection headers for CMake on Windows.
https://bugs.webkit.org/show_bug.cgi?id=135807

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

* CMakeLists.txt:
Include the derived sources directory to find WTF/WTFHeaderDetection.h.

Source/WebCore:

* CMakeLists.txt:
* PlatformWin.cmake:
Generate and include a stub WebCoreHeaderDetection.h.

Source/WTF:

* wtf/CMakeLists.txt:
* wtf/PlatformWin.cmake:
Generate and include a stub WTFHeaderDetection.h.

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

6 years agoREGRESSION (r172424): Extra menu header in combined telephone number menu when no...
timothy_horton@apple.com [Tue, 12 Aug 2014 22:42:41 +0000 (22:42 +0000)]
REGRESSION (r172424): Extra menu header in combined telephone number menu when no phone paired
https://bugs.webkit.org/show_bug.cgi?id=135854
<rdar://problem/17996339>

Reviewed by Enrica Casucci.

* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
Get all the menu items ahead of time, and only add the shared header
if there are any telephone number menu items.

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

6 years agoCrash at com.apple.WebKit.WebContent at com.apple.WebKit: WebKit::expandForGap
enrica@apple.com [Tue, 12 Aug 2014 22:32:43 +0000 (22:32 +0000)]
Crash at com.apple.WebKit.WebContent at com.apple.WebKit: WebKit::expandForGap
https://bugs.webkit.org/show_bug.cgi?id=135859
<rdar://problem/17994679>

Reviewed by Tim Horton.

expandForGap made the assumption that the selection rects were always three.
This was not true even before http://trac.webkit.org/changeset/172395 but
was more likely to happen after that change.

* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::expandForGap):

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

6 years agoMake sure that begin time cannot be greater than SMILTime::indefiniteValue unintentio...
commit-queue@webkit.org [Tue, 12 Aug 2014 22:30:32 +0000 (22:30 +0000)]
Make sure that begin time cannot be greater than SMILTime::indefiniteValue unintentionally.
https://bugs.webkit.org/show_bug.cgi?id=135838

Patch by Renata Hodovan <rhodovan.u-szeged@partner.samsung.com> on 2014-08-12
Reviewed by Darin Adler.

Source/WebCore:

When WebCore::SVGSMILElement::resolveInterval creates a SMILTime begin
node for a SMILInterval, then it only checks if the value of begin is
indefinite or unresolved but misses the case if it is between these two
reference values.

Blink: https://codereview.chromium.org/406263002/.
Test: svg/animations/animateMotion-crash-with-large-begin-time.html

* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::parseOffsetValue):
(WebCore::SVGSMILElement::parseClockValue):

LayoutTests:

* svg/animations/animateMotion-crash-with-large-begin-time-expected.txt: Added.
* svg/animations/animateMotion-crash-with-large-begin-time.html: Added.

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

6 years agoRevert a change that wasn't meant to be a part of r172482.
aestes@apple.com [Tue, 12 Aug 2014 21:59:26 +0000 (21:59 +0000)]
Revert a change that wasn't meant to be a part of r172482.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::init):

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

6 years agoDon't recurse into non-rendered subtrees when computing style
antti@apple.com [Tue, 12 Aug 2014 21:31:23 +0000 (21:31 +0000)]
Don't recurse into non-rendered subtrees when computing style
https://bugs.webkit.org/show_bug.cgi?id=135844

Reviewed by Andreas Kling.
Source/WebCore:

* style/StyleResolveTree.cpp:
(WebCore::Style::resetStyleForNonRenderedDescendants):

Do a simple reset of the style dirty bits and any computed style in non-rendered subtrees.

(WebCore::Style::attachRenderTree):
(WebCore::Style::resolveTree):

Don't recurse into descendants if the element does not create a renderer.
We didn't compute style anyway in such subtrees.

LayoutTests:

Rebase.

* http/tests/security/video-poster-cross-origin-crash-expected.txt:
* platform/mac/fast/ruby/ruby-base-merge-block-children-crash-2-expected.txt:

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

6 years ago[GTK] Adds dependency for GnuTLS 3.0+ explicitly in gtk/install-dependencies
utatane.tea@gmail.com [Tue, 12 Aug 2014 20:53:38 +0000 (20:53 +0000)]
[GTK] Adds dependency for GnuTLS 3.0+ explicitly in gtk/install-dependencies
https://bugs.webkit.org/show_bug.cgi?id=135850

Reviewed by Philippe Normand.

After r172433, GTK port requires GnuTLS 3.0+. In this time, libgnutls-dev is 2.x in
Ubuntu(trusty) and Debian(sid). So added libgnutls28-dev explicitly.

* gtk/install-dependencies:

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

6 years agoWeb Inspector: Timeline selection range creation does not work when clicking event...
commit-queue@webkit.org [Tue, 12 Aug 2014 20:43:37 +0000 (20:43 +0000)]
Web Inspector: Timeline selection range creation does not work when clicking event bubble or near bottom of overview
https://bugs.webkit.org/show_bug.cgi?id=135849

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-12
Reviewed by Timothy Hatcher.

Click events on elements in the graph container (event bubbles) or
in the scroll container (bottom 16px) were becoming the event targets.
As siblings of the ruler, the dispatch would not go through the ruler.
The ruler was supposed to be overlaying everything in the overview,
so give the ruler a z-index so it really is overlaying elements.

* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler):

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

6 years agoRemove isInCanvasSubtree bit
antti@apple.com [Tue, 12 Aug 2014 20:37:37 +0000 (20:37 +0000)]
Remove isInCanvasSubtree bit
https://bugs.webkit.org/show_bug.cgi?id=135837

Reviewed by Andreas Kling.

The logic to update this bit is in a wrong place and it is not clear it does
the right thing in all cases. Also the optimization doesn't seem necessary,
the focus code is not that hot.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreate):
* dom/Element.cpp:
(WebCore::Element::isFocusable):
(WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
(WebCore::Element::setIsInCanvasSubtree): Deleted.
(WebCore::Element::isInCanvasSubtree): Deleted.
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::isInCanvasSubtree): Deleted.
(WebCore::ElementRareData::setIsInCanvasSubtree): Deleted.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::isKeyboardFocusable):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::HTMLCanvasElement):
(WebCore::HTMLCanvasElement::willAttachRenderers): Deleted.
* html/HTMLCanvasElement.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::attachRenderTree):

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

6 years agoDon't show the combined menu if there are no services available
timothy_horton@apple.com [Tue, 12 Aug 2014 20:03:26 +0000 (20:03 +0000)]
Don't show the combined menu if there are no services available
https://bugs.webkit.org/show_bug.cgi?id=135846
<rdar://problem/17582099>

Reviewed by Enrica Casucci.

* WebProcess/WebPage/ServicesOverlayController.h:
Add a FIXME.

* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::determineActiveHighlight):
Don't allow a selection Highlight to become active if there is no
service available to handle it. Previously we showed the combined menu
with just phone numbers in it if any were detected.

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

6 years agoAdd a fade transition to services highlights
timothy_horton@apple.com [Tue, 12 Aug 2014 19:31:04 +0000 (19:31 +0000)]
Add a fade transition to services highlights
https://bugs.webkit.org/show_bug.cgi?id=135829
<rdar://problem/17935736>

Reviewed by Enrica Casucci.

Add a smooth fade to highlight installation and uninstallation.
To do so, we make each highlight paint into its own small layer.

* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::layer):
* WebProcess/WebPage/PageOverlay.h:
* WebProcess/WebPage/PageOverlayController.cpp:
(WebKit::PageOverlayController::layerForOverlay):
* WebProcess/WebPage/PageOverlayController.h:
Expose the GraphicsLayer on PageOverlay.

* WebProcess/WebPage/ServicesOverlayController.h:
(WebKit::ServicesOverlayController::Highlight::layer):
(WebKit::ServicesOverlayController::activeHighlight):
(WebKit::ServicesOverlayController::webPage):
(WebKit::ServicesOverlayController::Highlight::Highlight): Deleted.

* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::Highlight::createForSelection):
(WebKit::ServicesOverlayController::Highlight::createForTelephoneNumber):
(WebKit::ServicesOverlayController::Highlight::Highlight):
Highlights now own a GraphicsLayer, which are later installed
as sublayers of the ServicesOverlayController's PageOverlay layer.
These layers are sized and positioned according to the DDHighlight's bounds.

(WebKit::ServicesOverlayController::Highlight::~Highlight):
(WebKit::ServicesOverlayController::Highlight::invalidate):
ServicesOverlayController will invalidate any remaining highlights
when it is torn down, so they can clear their backpointers.

(WebKit::ServicesOverlayController::Highlight::notifyFlushRequired):
Forward flush notifications to the DrawingArea.

(WebKit::ServicesOverlayController::Highlight::paintContents):
Paint the DDHighlight into the layer. Translation is done by the layer position,
so we zero the bounds origin when painting.

(WebKit::ServicesOverlayController::Highlight::deviceScaleFactor):
Forward the deviceScaleFactor so that things are painted at the right scale.

(WebKit::ServicesOverlayController::Highlight::fadeIn):
(WebKit::ServicesOverlayController::Highlight::fadeOut):
Apply a fade animation to the layer.

(WebKit::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
When the fade completes, unparent the layer, unless it has become active again.

(WebKit::ServicesOverlayController::ServicesOverlayController):
(WebKit::ServicesOverlayController::~ServicesOverlayController):
Invalidate all highlights, so they can clear their backpointers.

(WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
Make remainingTimeUntilHighlightShouldBeShown act upon a particular highlight
instead of always the active highlight.

(WebKit::ServicesOverlayController::determineActiveHighlightTimerFired): Rename.

(WebKit::ServicesOverlayController::drawRect):
drawRect is no longer called and will no longer do anything; all of the
painting is done in sublayers.

(WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
Ensure that phone number Highlights stay stable even while the selection
changes, by comparing the underlying Ranges and keeping around old Highlights
that match the new ones. This enables us to e.g. fade in while changing
the selection within a phone number.

(WebKit::ServicesOverlayController::buildSelectionHighlight):
(WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
(WebKit::ServicesOverlayController::createOverlayIfNeeded):
Don't call setNeedsDisplay; the overlay doesn't have backing store.
Instead, call determineActiveHighlight, which will install/uninstall
highlights as necessary.

(WebKit::ServicesOverlayController::determineActiveHighlight):
Apply fade in/fade out to the overlays.
Keep track of which highlight we're going to activate, until the hysteresis
delay is up, then actually make it active/parent it/fade it in.
We now will have no active highlight between the fade out of the previous one
and the fade in of the new one (during the hysteresis delay).

(WebKit::ServicesOverlayController::mouseEvent):
The overlay now will not become active until the delay is up, so we don't
need to check it again here.

(WebKit::ServicesOverlayController::handleClick):
(WebKit::ServicesOverlayController::didCreateHighlight):
(WebKit::ServicesOverlayController::willDestroyHighlight):
(WebKit::ServicesOverlayController::repaintHighlightTimerFired): Deleted.
(WebKit::ServicesOverlayController::drawHighlight): Deleted.

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

6 years ago[iOS] Get rid of iOS.xcconfig
aestes@apple.com [Tue, 12 Aug 2014 19:12:05 +0000 (19:12 +0000)]
[iOS] Get rid of iOS.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=135809

Reviewed by Joseph Pecoraro.

All iOS.xcconfig did was include AspenFamily.xcconfig, so there's no need for the indirection.

Source/bmalloc:

* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.
* bmalloc.xcodeproj/project.pbxproj:

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.
* JavaScriptCore.xcodeproj/project.pbxproj:

Source/ThirdParty:

* gtest/xcode/Config/General.xcconfig:
* gtest/xcode/Config/iOS.xcconfig: Removed.
* gtest/xcode/gtest.xcodeproj/project.pbxproj:

Source/ThirdParty/ANGLE:

* ANGLE.xcodeproj/project.pbxproj:
* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.

Source/WebCore:

* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.

Source/WebKit2:

* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.
* WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.
* WTF.xcodeproj/project.pbxproj:

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

6 years agoAdjust max-width of cues based on text alignment when cue size is expanded.
roger_fong@apple.com [Tue, 12 Aug 2014 18:52:16 +0000 (18:52 +0000)]
Adjust max-width of cues based on text alignment when cue size is expanded.
https://bugs.webkit.org/show_bug.cgi?id=135823.

Reviewed by Brent Fulgham.

All units are in percentages.
If we are left aligned the max cue width is the 100 minus the cue position.
If we are right aligned the max cue width is the cue position.
If we are centered the max cue width is just 100.

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):

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

6 years ago[GStreamer] playback rate is rounded to integer
commit-queue@webkit.org [Tue, 12 Aug 2014 16:32:01 +0000 (16:32 +0000)]
[GStreamer] playback rate is rounded to integer
https://bugs.webkit.org/show_bug.cgi?id=135802

Patch by Fabien Vallée <fvallee@connected-labs.com> on 2014-08-12
Reviewed by Philippe Normand.

Source/WebCore:

Test: media/video-ended-event-slow-motion-playback.html

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

LayoutTests:

add test to ensure playback is actually working
in slow motion (playback rate = 0.5): Player
should reach EOS and dispatch ended event.

* media/video-ended-event-slow-motion-playback-expected.txt: Added.
* media/video-ended-event-slow-motion-playback.html: Added.

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

6 years ago[Win] Unreviewed build fix after r17425
bfulgham@apple.com [Tue, 12 Aug 2014 16:06:22 +0000 (16:06 +0000)]
[Win] Unreviewed build fix after r17425

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Remove
unused 'currentTime' declaration from header file. This is now fully implemented
in platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h.

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

6 years ago[EFL] Rename ewk_private.h to EwkDebug.h
g.czajkowski@samsung.com [Tue, 12 Aug 2014 12:07:55 +0000 (12:07 +0000)]
[EFL] Rename ewk_private.h to EwkDebug.h
https://bugs.webkit.org/show_bug.cgi?id=135797

Reviewed by Gyuyoung Kim.

ewk_private.h contains only debug macros alllowing
logging.

* UIProcess/API/efl/EwkView.cpp:
* UIProcess/API/efl/ewk_main.cpp:
* UIProcess/efl/EwkDebug.h: Renamed from Source/WebKit2/UIProcess/API/efl/ewk_private.h.
* UIProcess/efl/ViewClientEfl.cpp:

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

6 years agoDont allocate GCond in VideoSinkGStreamer.cpp dynamically.
zandobersek@gmail.com [Tue, 12 Aug 2014 11:29:43 +0000 (11:29 +0000)]
Dont allocate GCond in VideoSinkGStreamer.cpp dynamically.

Rubber-stamped by Carlos Garcia Campos.

* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Move the
g_cond_init() and gst_video_info_init() calls here.
(_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Move the
g_cond_clear() call here.
(webkit_video_sink_init):
(webkitVideoSinkTimeoutCallback):
(webkitVideoSinkRender):
(unlockBufferMutex):
(webkit_video_sink_class_init):
(webkitVideoSinkDispose): Deleted. Not required anymore.

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

6 years ago[GTK] The plugins metadata cache doesn't work if the user cache directory doesn't...
carlosgc@webkit.org [Tue, 12 Aug 2014 10:55:46 +0000 (10:55 +0000)]
[GTK] The plugins metadata cache doesn't work if the user cache directory doesn't exist
https://bugs.webkit.org/show_bug.cgi?id=135834

Reviewed by Philippe Normand.

Make sure the user cache directory exists. If creating the
directory fails for whatever reason, do not try to save the cache
to disk.

* UIProcess/Plugins/gtk/PluginInfoCache.cpp:
(WebKit::PluginInfoCache::PluginInfoCache):
(WebKit::PluginInfoCache::updatePluginInfo):

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

6 years agoClean up GMutexLocker
zandobersek@gmail.com [Tue, 12 Aug 2014 10:39:07 +0000 (10:39 +0000)]
Clean up GMutexLocker
https://bugs.webkit.org/show_bug.cgi?id=135833

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Don't dynamically allocate GMutex objects. Update GMutexLocker
initializations to pass in a GMutex reference, not a pointer.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Initialize the GMutex.
(_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Clear the GMutex.
(webkit_video_sink_init):
(webkitVideoSinkRender):
(webkitVideoSinkDispose):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcGetProperty):
(webKitWebSrcStop):
(webKitWebSrcStart):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetUri):
(webKitWebSrcSetUri):
(webKitWebSrcNeedDataMainCb):
(webKitWebSrcNeedDataCb):
(webKitWebSrcEnoughDataMainCb):
(webKitWebSrcEnoughDataCb):
(webKitWebSrcSeekDataCb):
(webKitWebSrcSetMediaPlayer):
(StreamingClient::createReadBuffer):
(StreamingClient::handleResponseReceived):
(StreamingClient::handleDataReceived):
(StreamingClient::handleNotifyFinished):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):

Source/WTF:

Place the GMutexLocker into the WTF namespace. There's no need for this
class to use FastMalloc since it's always allocated on the stack. The
constructor and class now operate on a GMutex reference. There's little
need for an additional inline specifier for methods defined in the header.
The mutex() method is removed as it was not used. m_val is renamed to a
more descriptive m_locked and is made a boolean.

* wtf/gobject/GMutexLocker.h:
(WTF::GMutexLocker::GMutexLocker):
(WTF::GMutexLocker::~GMutexLocker):
(WTF::GMutexLocker::lock):
(WTF::GMutexLocker::unlock):
(WebCore::GMutexLocker::GMutexLocker): Deleted.
(WebCore::GMutexLocker::~GMutexLocker): Deleted.
(WebCore::GMutexLocker::lock): Deleted.
(WebCore::GMutexLocker::unlock): Deleted.
(WebCore::GMutexLocker::mutex): Deleted.

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

6 years agoMake GRefPtr move-able
zandobersek@gmail.com [Tue, 12 Aug 2014 10:36:45 +0000 (10:36 +0000)]
Make GRefPtr move-able
https://bugs.webkit.org/show_bug.cgi?id=135801

Reviewed by Carlos Garcia Campos.

Add move constructor and move assignment operator for GRefPtr.

* wtf/gobject/GRefPtr.h:
(WTF::GRefPtr::GRefPtr):
(WTF::=):

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

6 years ago[GTK] Subtle-crypto feature off by default and add a new configure flag to enable it
commit-queue@webkit.org [Tue, 12 Aug 2014 09:35:34 +0000 (09:35 +0000)]
[GTK] Subtle-crypto feature off by default and add a new configure flag to enable it
https://bugs.webkit.org/show_bug.cgi?id=135798

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2014-08-12
Reviewed by Philippe Normand.

.:

* Source/cmake/OptionsGTK.cmake: Makes SUBTLE_CRYPTO flag off by default.

Tools:

* Scripts/webkitperl/FeatureList.pm: Adds new flag --subtle-crypto to
    toggle SUBTLE_CRYPTO feature.

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

6 years ago[EFL] Disable ecore logs about bad fd
ryuan.choi@samsung.com [Tue, 12 Aug 2014 08:25:48 +0000 (08:25 +0000)]
[EFL] Disable ecore logs about bad fd
https://bugs.webkit.org/show_bug.cgi?id=135831

Reviewed by Gyuyoung Kim.

ecore checks EBADF and prints the warnings.
But, it looks noise in layout test because it's not webkit issue.
This patch disables it until we found right solution.

* efl/jhbuild.modules:
* efl/patches/ecore_remove_warnings.patch: Added.

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

6 years ago[EFL][WK2] Minibrowser: Enhance the application to use download directory selector.
commit-queue@webkit.org [Tue, 12 Aug 2014 08:22:05 +0000 (08:22 +0000)]
[EFL][WK2] Minibrowser: Enhance the application to use download directory selector.
https://bugs.webkit.org/show_bug.cgi?id=135791

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-08-12
Reviewed by Gyuyoung Kim.

Currently Minibrowser stores the downloaded files to /tmp directory, add support so that destination folder can be selected by the
user.

* MiniBrowser/efl/main.c:
(on_download_request):

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

6 years agoWeb Inspector: GoToLine dialog clear text button looks poor
commit-queue@webkit.org [Tue, 12 Aug 2014 08:16:22 +0000 (08:16 +0000)]
Web Inspector: GoToLine dialog clear text button looks poor
https://bugs.webkit.org/show_bug.cgi?id=135828

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-12
Reviewed by Timothy Hatcher.

Legacy/CloseWhite.svg was not used, but in the case where the white
close button is needed the thicker bars looks better. Re-use the
Legacy image as the default CloseWhite.svg.

* UserInterface/Images/CloseWhite.svg:
* UserInterface/Images/Legacy/CloseWhite.svg: Removed.

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

6 years agoWeb Inspector: Easier Way to go back to the Timeline Overviews
commit-queue@webkit.org [Tue, 12 Aug 2014 08:12:49 +0000 (08:12 +0000)]
Web Inspector: Easier Way to go back to the Timeline Overviews
https://bugs.webkit.org/show_bug.cgi?id=135827

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-12
Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
Added new tooltip UIString.

* UserInterface/Images/Close.svg:
* UserInterface/Images/CloseLarge.svg:
* UserInterface/Images/Legacy/Close.svg:
Add "stroked" class so the buttons can fill with white on selected rows.
Also re-center the non-legacy images horizontally.

* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.set status):
Do not recreate elements if the status did not change.

* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
(WebInspector.LayoutTimelineView.prototype._treeElementDeselected):
(WebInspector.LayoutTimelineView.prototype._treeElementSelected):
(WebInspector.LayoutTimelineView.prototype._updateTreeElementWithCloseButton):
(WebInspector.LayoutTimelineView.prototype._closeStatusButtonClicked):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
(WebInspector.NetworkTimelineView.prototype._treeElementDeselected):
(WebInspector.NetworkTimelineView.prototype._treeElementSelected):
(WebInspector.NetworkTimelineView.prototype._updateTreeElementWithCloseButton):
(WebInspector.NetworkTimelineView.prototype._closeStatusButtonClicked):
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype._treeElementDeselected):
(WebInspector.OverviewTimelineView.prototype._treeElementSelected):
(WebInspector.OverviewTimelineView.prototype._updateTreeElementWithCloseButton):
(WebInspector.OverviewTimelineView.prototype._closeStatusButtonClicked):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
(WebInspector.ScriptTimelineView.prototype._treeElementDeselected):
(WebInspector.ScriptTimelineView.prototype._treeElementSelected):
(WebInspector.ScriptTimelineView.prototype._updateTreeElementWithCloseButton):
(WebInspector.ScriptTimelineView.prototype._closeStatusButtonClicked):
Provide select/deselect handlers to show/hide the close status bar button
when selecting a row that shows a non-Timeline content view. Currently the
only content views the tree elements can show are Resource views, so the
tooltip is the same everywhere.

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

6 years ago[Mac] Allow reading CoreGraphics debugging preferences
ap@apple.com [Tue, 12 Aug 2014 08:06:56 +0000 (08:06 +0000)]
[Mac] Allow reading CoreGraphics debugging preferences
https://bugs.webkit.org/show_bug.cgi?id=135821
<rdar://problem/11219259>

Reviewed by Darin Adler.

* WebProcess/com.apple.WebProcess.sb.in:

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

6 years ago[GTK] Adds dependency on GnuTLS 3.0+ for the implementation of subtle crypto algorithms
commit-queue@webkit.org [Tue, 12 Aug 2014 08:03:06 +0000 (08:03 +0000)]
[GTK] Adds dependency on GnuTLS 3.0+ for the implementation of subtle crypto algorithms
https://bugs.webkit.org/show_bug.cgi?id=133317

.:

GnuTLS is already an indirect dependency through libsoup -> glib-networking.

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2014-08-12
Reviewed by Philippe Normand.

No new tests since no new functionality has been added.

* Source/cmake/OptionsGTK.cmake: Adds search for required GnuTLS package

Source/WebCore:

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2014-08-12
Reviewed by Philippe Normand.

No new tests since no new functionality has been added.

* PlatformGTK.cmake: Adds GnuTLS libs and included dirs to WebCore targets

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

6 years agoWeb Inspector: Expect to see top level JavaScript function profiler details for event...
timothy@apple.com [Tue, 12 Aug 2014 07:56:55 +0000 (07:56 +0000)]
Web Inspector: Expect to see top level JavaScript function profiler details for event handlers in timeline
https://bugs.webkit.org/show_bug.cgi?id=132109

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype._processPendingRecords): Don't promote root node children if
there is only one child.

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

6 years ago[WebAudio] FFTFrame is cluttered with dead code
philn@webkit.org [Tue, 12 Aug 2014 07:49:22 +0000 (07:49 +0000)]
[WebAudio] FFTFrame is cluttered with dead code
https://bugs.webkit.org/show_bug.cgi?id=135751

Reviewed by Eric Carlson.

Cleaned up unused FFTFrame implementations from the tree. If the
FFMPEG or IPP versions are needed later on again this patch can be
rolled out.

No new tests, the code removed was disabled on all ports.

* platform/audio/Biquad.cpp:
(WebCore::Biquad::Biquad):
(WebCore::Biquad::~Biquad):
(WebCore::Biquad::process):
(WebCore::Biquad::reset):
(WebCore::Biquad::setNormalizedCoefficients):
* platform/audio/Biquad.h:
* platform/audio/DirectConvolver.cpp:
(WebCore::DirectConvolver::DirectConvolver):
(WebCore::DirectConvolver::process):
(WebCore::DirectConvolver::reset):
* platform/audio/DirectConvolver.h:
* platform/audio/FFTFrame.h:
* platform/audio/FFTFrameStub.cpp:
* platform/audio/ffmpeg/FFTFrameFFMPEG.cpp: Removed.
* platform/audio/ipp/FFTFrameIPP.cpp: Removed.
* platform/audio/mac/FFTFrameMac.cpp:

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

6 years ago[EFL] Prevent the client from creating ewk_view when EWebkit is not initialized
g.czajkowski@samsung.com [Tue, 12 Aug 2014 07:42:54 +0000 (07:42 +0000)]
[EFL] Prevent the client from creating ewk_view when EWebkit is not initialized
https://bugs.webkit.org/show_bug.cgi?id=135606

Reviewed by Gyuyoung Kim.

Source/WebKit2:

Similarly to EFL modules (eina, evas etc.), application using EWebKit
has to initialize it using ewk_init().

Do not allow the client to create ewk_view if ewk_init has not been called.
Add an appropriate logs warning the client about wrong APIs usage.

* UIProcess/API/efl/ewk_main.cpp: Add EwkMain class to control ewk lifetime.
(WebKit::EwkMain::EwkMain):
(WebKit::EwkMain::shared):
(WebKit::EwkMain::~EwkMain): Add logs when the client forgot to destroy EWebkit.
(WebKit::EwkMain::initialize):
(WebKit::EwkMain::finalize):
(WebKit::EwkMain::shutdownInitializedEFLModules):
(ewk_init):
(ewk_shutdown):
* UIProcess/API/efl/ewk_main_private.h: Added.
(WebKit::EwkMain::isInitialized):
(WebKit::EwkMain::logDomainId):
* UIProcess/API/efl/ewk_private.h:
* UIProcess/API/efl/ewk_view.cpp:
(EWKViewCreate):
Prevent the client from creating ewk_view when ewk_init() has not been called.

Tools:

TestWebKitAPI does not initialize EWebkit using ewk_init()
which is not recommended.

* TestWebKitAPI/efl/PlatformWebView.cpp:
(TestWebKitAPI::createEcoreEvas):
Renamed from initEcoreEvas() since it doesn't not initialize
ecore evas.

(TestWebKitAPI::PlatformWebView::PlatformWebView):
Call ewk_init() that initalizes all EFL modules needed by EWebKit
instead of ecore_evas_init() only.

(TestWebKitAPI::PlatformWebView::~PlatformWebView):
Call ewk_shutdown() to finalize EWebkit.
(TestWebKitAPI::initEcoreEvas): Deleted.

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

6 years agoEliminate {push,pop}CalleeSaves in favor of individual pushes & pops
msaboff@apple.com [Tue, 12 Aug 2014 03:20:04 +0000 (03:20 +0000)]
Eliminate {push,pop}CalleeSaves in favor of individual pushes & pops
https://bugs.webkit.org/show_bug.cgi?id=127155

Reviewed by Geoffrey Garen.

Eliminated the offline assembler instructions {push,pop}CalleeSaves as well as the
ARM64 specific {push,pop}LRAndFP and replaced them with individual push and pop
instructions. Where the registers referenced by the added push and pop instructions
are not part of the offline assembler register aliases, used a newly added "emit"
offline assembler instruction which takes a string literal and outputs that
string as a native instruction.

* llint/LowLevelInterpreter.asm:
* offlineasm/arm.rb:
* offlineasm/arm64.rb:
* offlineasm/ast.rb:
* offlineasm/cloop.rb:
* offlineasm/instructions.rb:
* offlineasm/mips.rb:
* offlineasm/parser.rb:
* offlineasm/sh4.rb:
* offlineasm/transform.rb:
* offlineasm/x86.rb:

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

6 years agoFix the Mac build.
mrowe@apple.com [Tue, 12 Aug 2014 03:01:52 +0000 (03:01 +0000)]
Fix the Mac build.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

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

6 years ago[Mac, iOS] Some media content never reaches full 'loaded' state
bfulgham@apple.com [Tue, 12 Aug 2014 01:12:08 +0000 (01:12 +0000)]
[Mac, iOS] Some media content never reaches full 'loaded' state
https://bugs.webkit.org/show_bug.cgi?id=135814
<rdar://problem/17476923>

Reviewed by Jer Noble.

Source/WebCore:

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::duration): Change to a wrapper that just calls
the durationDouble method and narrows to a float.
(WebCore::MediaPlayerPrivateAVFoundation::durationDouble): Revised version of duration
that works with doubles.
(WebCore::MediaPlayerPrivateAVFoundation::currentTime): Wrapper that calls the
currentTimeDouble method and narrows to a float.
(WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Use durationDouble for
comparison with passed 'time' argument (which is a double).
(WebCore::MediaPlayerPrivateAVFoundation::didEnd): Use 'currentTimeDouble' so we can
cache the double precision version of this value.
(WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Use 'durationDouble' since
the rest of the calculation is in terms of doubles.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration): Convert to 'double'. All
uses of this method are internal to the MediaPlayerPrivateAVFoundation* files.
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTimeDouble): Switch from float implementation.
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTime): Deleted. (Moved to parent class)
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration): Convert to 'double'. All
uses of this method are internal to the MediaPlayerPrivateAVFoundation* files.
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentTimeDouble): Switch from floating implementation.
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Deleted. (Moved to parent class)

LayoutTests:

* platform/mac/media/video-seek-past-end-paused-expected.txt: Rebaseline
result for new rounding behavior.

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

6 years agoImprove look and feel of combined service menu..
enrica@apple.com [Tue, 12 Aug 2014 01:04:07 +0000 (01:04 +0000)]
Improve look and feel of combined service menu..
https://bugs.webkit.org/show_bug.cgi?id=135824
<rdar://problem/17936880>

Reviewed by Tim Horton.
Source/WebCore:

Adding some localizable strings.

* English.lproj/Localizable.strings:

Source/WebKit2:

When showing the combined menu, list the phone numbers first,
grouped under a common header, followed by the entries relative
to the services.

* Platform/mac/MenuUtilities.h:
* Platform/mac/MenuUtilities.mm:
(WebKit::menuItemTitleForTelephoneNumberGroup):
(WebKit::menuItemForTelephoneNumber):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):

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

6 years ago[iOS] <video> element requests are missing session cookies; sometimes persistant...
jer.noble@apple.com [Tue, 12 Aug 2014 00:36:33 +0000 (00:36 +0000)]
[iOS] <video> element requests are missing session cookies; sometimes persistant cookies.
https://bugs.webkit.org/show_bug.cgi?id=135816

Reviewed by Alexey Proskuryakov.

On iOS, the AVFoundation framework will copy appropriate cookies for the requested URL across to the
mediaserverd process. For WebKit2, the WebProcess does not have access to session cookies for the
current browsing session. When creating an AVURLAsset, fetch the appropriate cookies for the requested
URL, and pass them into AVURLAsset in the options dictionary.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerGetRawCookies): Call CookieJar's equivalent method.
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::getRawCookies): Pass to HTMLMediaElement.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerGetRawCookies):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::toNSHTTPCookie): Convert a WebCore Cookie -> NSHTTPCookie.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Fetch cookies for the requested
    URL, and if successful, add them to the AVURLAsset options dictionary.

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

6 years agoAdjustments to CueBox CSS Width calculations Part 2.
roger_fong@apple.com [Tue, 12 Aug 2014 00:13:35 +0000 (00:13 +0000)]
Adjustments to CueBox CSS Width calculations Part 2.
https://bugs.webkit.org/show_bug.cgi?id=135820
<rdar://problem/17954473>.

Reviewed by Brent Fulgham.

Two adjustments made:
a) The default font size used was incorrect. It is not just 10px,
but should be based off a percentage of the video size.
b) The top/left CSS property needs to be adjusted appropriately if the cue
is center aligned and we change the cue's size such that the cue remains centered.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):
* html/track/VTTCue.h: Remove unnecessary constant.

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

6 years agoWeb Inspector: show a replay dashboard when capturing or replaying
burg@cs.washington.edu [Mon, 11 Aug 2014 23:41:15 +0000 (23:41 +0000)]
Web Inspector: show a replay dashboard when capturing or replaying
https://bugs.webkit.org/show_bug.cgi?id=135170

Reviewed by Timothy Hatcher.

This patch adds a replay dashboard with record/play/pause buttons. It
is shown automatically when the user starts capturing an execution from
the replay menu in the Timelines sidebar panel.

* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector._captureDidStart):
* UserInterface/Controllers/DashboardManager.js:
(WebInspector.DashboardManager):
* UserInterface/Images/ReplayPauseButton.svg: Added.
* UserInterface/Images/ReplayPlayButton.svg: Added.
* UserInterface/Images/ReplayRecordingButton.svg: Added.
* UserInterface/Main.html:
* UserInterface/Models/ReplayDashboard.js: Copied from Source/WebInspectorUI/UserInterface/Controllers/DashboardManager.js.
(WebInspector.ReplayDashboard):
* UserInterface/Views/DashboardView.js:
(WebInspector.DashboardView):
* UserInterface/Views/ReplayDashboardView.css: Copied from Source/WebInspectorUI/UserInterface/Controllers/DashboardManager.js.
(.toolbar .dashboard.replay):
(.toolbar .dashboard.replay div.navigation-bar):
(.toolbar .dashboard.replay .item.button > .glyph):
(.toolbar.label-only .dashboard.replay .item.button > .glyph):
* UserInterface/Views/ReplayDashboardView.js: Added.
(WebInspector.ReplayDashboardView):
(WebInspector.ReplayDashboardView.prototype._captureButtonItemClicked):
(WebInspector.ReplayDashboardView.prototype._replayButtonItemClicked):
(WebInspector.ReplayDashboardView.prototype._captureStarted):
(WebInspector.ReplayDashboardView.prototype._captureStopped):
(WebInspector.ReplayDashboardView.prototype._playbackStarted):
(WebInspector.ReplayDashboardView.prototype._playbackPaused):
(WebInspector.ReplayDashboardView.prototype._playbackFinished):

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

6 years agoAdded an update-webkit option to update the auxiliary libraries or not.
mitz@apple.com [Mon, 11 Aug 2014 23:40:52 +0000 (23:40 +0000)]
Added an update-webkit option to update the auxiliary libraries or not.
Part of https://bugs.webkit.org/show_bug.cgi?id=135815

Reviewed by Tim Horton.

* Scripts/update-webkit: Added --[no-]auxiliary-libs option, which defaults to yes unless
an Internal directory exists alongside the WebKit root directory.

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

6 years agoRemove hg changeset from w3c-import.log
bjonesbe@adobe.com [Mon, 11 Aug 2014 23:26:26 +0000 (23:26 +0000)]
Remove hg changeset from w3c-import.log
https://bugs.webkit.org/show_bug.cgi?id=135735

Reviewed by Ryosuke Niwa.

Since the csswg's test suite is now accessible via github and it is
possible to push changes by creating github pull requests, the hg
changeset makes less sense, as many people will just use a clone of
the git repo. There isn't an obvious thing to replace it with, so
might as well remove it for now instead of having it just be set to
UNKNOWN in imports.

This also adds a pointer to the github repo in the generated comments
in the w3c-import.log.

* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.__init__): Remove changeset handling.
(TestImporter.do_import): Ditto.
(TestImporter.write_import_log): Ditto.
(TestImporter.load_changeset): Deleted.

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

6 years agoFixed backgrounds don't paint in blurred inset areas
bdakin@apple.com [Mon, 11 Aug 2014 23:03:49 +0000 (23:03 +0000)]
Fixed backgrounds don't paint in blurred inset areas
https://bugs.webkit.org/show_bug.cgi?id=135712

Reviewed by Simon Fraser.

Source/WebCore:

Background geometry calculations for fixed background need to use the larger
visible rect.

The first version of this patch caused a regression because it universally
adjusted the value for top to account for the inset whether or not the
viewportRect location was adjusted for the same. This version fixes that — those
two changes go hand-in-hand.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

LayoutTests:

* platform/mac-wk1/TestExpectations:
* platform/mac-wk1/fast: Added.
* platform/mac-wk1/fast/backgrounds: Added.
* platform/mac-wk1/fast/backgrounds/resources: Added.
* platform/mac-wk1/fast/backgrounds/resources/green.png: Added.
* platform/mac-wk1/fast/backgrounds/top-content-inset-fixed-attachment-expected.html: Added.
* platform/mac-wk1/fast/backgrounds/top-content-inset-fixed-attachment.html: Added.
* platform/mac-wk2/tiled-drawing/resources/green-blue.png: Added.
* platform/mac-wk2/tiled-drawing/resources/green.png: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-body-expected.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-body.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment-expected.html: Added.
* platform/mac-wk2/tiled-drawing/top-content-inset-fixed-attachment.html: Added.

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

6 years agoRe-landing r172401 with fixed test.
mark.lam@apple.com [Mon, 11 Aug 2014 22:00:15 +0000 (22:00 +0000)]
Re-landing r172401 with fixed test.
<https://webkit.org/b/135782>

Not reviewed.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitGetByVal):
(JSC::BytecodeGenerator::pushIndexedForInScope):
(JSC::BytecodeGenerator::pushStructureForInScope):
* bytecompiler/BytecodeGenerator.h:
(JSC::ForInContext::ForInContext):
(JSC::ForInContext::base):
(JSC::StructureForInContext::StructureForInContext):
(JSC::IndexedForInContext::IndexedForInContext):
* bytecompiler/NodesCodegen.cpp:
(JSC::ForInNode::emitMultiLoopBytecode):
* tests/stress/for-in-tests.js:

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

6 years agoWeb Inspector: DebuggerManager commands should return promises
burg@cs.washington.edu [Mon, 11 Aug 2014 21:25:34 +0000 (21:25 +0000)]
Web Inspector: DebuggerManager commands should return promises
https://bugs.webkit.org/show_bug.cgi?id=135690

Reviewed by Timothy Hatcher.

Convert the existing debugger commands to return promises. This
requires separately waiting for protocol command's promise to be
fulfilled, as well as waiting for the appropriate DebuggerManager
event. If the protocol command promise is rejected, tear down the
single-fire event listener.

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.pause):
(WebInspector.DebuggerManager.prototype.resume):
(WebInspector.DebuggerManager.prototype.stepOver):
(WebInspector.DebuggerManager.prototype.stepInto):
(WebInspector.DebuggerManager.prototype.stepOut):
* UserInterface/Controllers/ReplayManager.js: Use the promise-based API.
(WebInspector.ReplayManager.prototype._suppressBreakpointsAndResumeIfNeeded):

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

6 years agoReport run id's in api/runs.php for the new dashboard UI
rniwa@webkit.org [Mon, 11 Aug 2014 21:16:27 +0000 (21:16 +0000)]
Report run id's in api/runs.php for the new dashboard UI
https://bugs.webkit.org/show_bug.cgi?id=135813

Reviewed by Andreas Kling.

Include run_id in the generated JSON.

* public/api/runs.php:
(fetch_runs_for_config): Don't sort results by time since that has been done in the front end for ages now.
(format_run):

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

6 years agoMerging platforms mixes baselines and targets into reported data
rniwa@webkit.org [Mon, 11 Aug 2014 20:48:32 +0000 (20:48 +0000)]
Merging platforms mixes baselines and targets into reported data
https://bugs.webkit.org/show_bug.cgi?id=135260

Reviewed by Andreas Kling.

When merging two platforms, move test configurations of a different type (baseline, target)
as well as of different metric (Time, Runs).

Also avoid fetching the entire table of runs just to see if there are no remaining runs.
It's sufficient to detect one such test_runs object.

* public/admin/platforms.php:
(merge_platforms):

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

6 years agoPass inherited style only when resolving tree style
antti@apple.com [Mon, 11 Aug 2014 20:42:16 +0000 (20:42 +0000)]
Pass inherited style only when resolving tree style
https://bugs.webkit.org/show_bug.cgi?id=135799

Reviewed by Andreas Kling.

No need to pass around the style parent element.

* dom/ContainerNode.h:
(WebCore::ContainerNode::childShouldCreateRenderer): Deleted.
* dom/Element.cpp:
(WebCore::Element::childShouldCreateRenderer):
* dom/Element.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::RenderTreePosition::parent):
(WebCore::Style::nextSiblingRenderer):
(WebCore::Style::RenderTreePosition::RenderTreePosition):
(WebCore::Style::RenderTreePosition::computeNextSibling):
(WebCore::Style::shouldCreateRenderer):
(WebCore::Style::styleForElement):
(WebCore::Style::createRendererIfNeeded):
(WebCore::Style::textRendererIsNeeded):
(WebCore::Style::createTextRendererIfNeeded):
(WebCore::Style::attachTextRenderer):
(WebCore::Style::updateTextRendererAfterContentChange):
(WebCore::Style::attachChildren):
(WebCore::Style::attachDistributedChildren):
(WebCore::Style::attachShadowRoot):
(WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
(WebCore::Style::attachRenderTree):
(WebCore::Style::resolveLocal):
(WebCore::Style::resolveTextNode):
(WebCore::Style::resolveShadowTree):
(WebCore::Style::updateBeforeOrAfterPseudoElement):
(WebCore::Style::resolveTree):
* svg/SVGDocument.cpp:
(WebCore::SVGDocument::childShouldCreateRenderer): Deleted.

    Implement this in SVGSVGElement::rendererIsNeeded instead.

* svg/SVGDocument.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::rendererIsNeeded):

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

6 years agoCSS JIT: support :scope
utatane.tea@gmail.com [Mon, 11 Aug 2014 20:24:19 +0000 (20:24 +0000)]
CSS JIT: support :scope
https://bugs.webkit.org/show_bug.cgi?id=135733

Reviewed by Benjamin Poulain.

Implement :scope for CSS JIT. It introduces scope field to CheckingContext
and it makes CheckingContext more similar to SelectorChecker::SelectorCheckingContext.
And since :scope requires CheckingContext, QueryingRules can accept SelectorCheckerWithCheckingContext.

Source/WebCore:

Tests: fast/selectors/querySelector-scope-filtered-root.html
       fast/selectors/scope-works-as-root.html

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::shouldUseRenderStyleFromCheckingContext):
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
(WebCore::SelectorCompiler::SelectorCodeGenerator::loadCheckingContext):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsActive):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsScopeRoot):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
* cssjit/SelectorCompiler.h:
(WebCore::SelectorCompiler::CheckingContext::CheckingContext):
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
(WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:

LayoutTests:

* fast/selectors/querySelector-scope-filtered-root-expected.txt: Added.
* fast/selectors/querySelector-scope-filtered-root.html: Added.
Searching root node of querySelectorAll is filtered to id node, but :scope root node should not be changed.
* fast/selectors/scope-works-as-root-expected.html: Added.
* fast/selectors/scope-works-as-root.html: Added.
:scope in stylesheet works as :root.

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

6 years agoAdd Private WKPreferences API for developer extras (show inspector)
commit-queue@webkit.org [Mon, 11 Aug 2014 20:07:51 +0000 (20:07 +0000)]
Add Private WKPreferences API for developer extras (show inspector)
https://bugs.webkit.org/show_bug.cgi?id=135811

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

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _developerExtrasEnabled]):
(-[WKPreferences _setDeveloperExtrasEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

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

6 years agoUnreviewed, rolling out r172401.
commit-queue@webkit.org [Mon, 11 Aug 2014 20:00:58 +0000 (20:00 +0000)]
Unreviewed, rolling out r172401.
https://bugs.webkit.org/show_bug.cgi?id=135812

Failing stress/for-in-tests.js
http://build.webkit.org/builders/Apple%20Mavericks%20Release%20WK1%20%28Tests%29/builds/7945/steps
/jscore-test/logs/stdio (Requested by mlam on #webkit).

Reverted changeset:

"for-in optimization should also make sure the base matches
the object being iterated"
https://bugs.webkit.org/show_bug.cgi?id=135782
http://trac.webkit.org/changeset/172401

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

6 years agoWeb Inspector: console.profile shouldn't stop auto-recorded profiles
timothy@apple.com [Mon, 11 Aug 2014 19:50:52 +0000 (19:50 +0000)]
Web Inspector: console.profile shouldn't stop auto-recorded profiles
https://bugs.webkit.org/show_bug.cgi?id=135810

Reviewed by Joseph Pecoraro.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start): Added. Call internalStart. Set m_enabledFromFrontend.
(WebCore::InspectorTimelineAgent::stop): Added. Calls internalStop. Clear m_enabledFromFrontend.
(WebCore::InspectorTimelineAgent::internalStart): Renamed from start.
(WebCore::InspectorTimelineAgent::internalStop): Renamed from stop.
(WebCore::InspectorTimelineAgent::startFromConsole): Use internalStart.
(WebCore::InspectorTimelineAgent::stopFromConsole): Use internalStop. Only stop if !m_enabledFromFrontend.
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent): Initialize m_enabledFromFrontend.
* inspector/InspectorTimelineAgent.h: Added m_enabledFromFrontend.

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

6 years agoWeb Inspector: Update folder icons
timothy@apple.com [Mon, 11 Aug 2014 19:22:15 +0000 (19:22 +0000)]
Web Inspector: Update folder icons
https://bugs.webkit.org/show_bug.cgi?id=135808

Reviewed by Joseph Pecoraro.

* UserInterface/Images/FolderGeneric.png: Updated.
* UserInterface/Images/FolderGeneric@2x.png: Updated.

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

6 years agoWeb Inspector: use type builders to construct high fidelity type information payloads
burg@cs.washington.edu [Mon, 11 Aug 2014 19:19:47 +0000 (19:19 +0000)]
Web Inspector: use type builders to construct high fidelity type information payloads
https://bugs.webkit.org/show_bug.cgi?id=135803

Reviewed by Timothy Hatcher.

Due to some typos in the protocol file, the code had worked with raw objects
rather than with type builders. Convert to using builders.

* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
* inspector/agents/InspectorRuntimeAgent.h:
* inspector/protocol/Runtime.json: Fix 'item' for 'items'; true for 'true'.
* runtime/HighFidelityTypeProfiler.cpp:
(JSC::HighFidelityTypeProfiler::getTypesForVariableAtOffsetForInspector):
* runtime/HighFidelityTypeProfiler.h:
* runtime/TypeSet.cpp:
(JSC::TypeSet::allStructureRepresentations):
(JSC::StructureShape::stringRepresentation):
(JSC::StructureShape::inspectorRepresentation):
* runtime/TypeSet.h:

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

6 years agofor-in optimization should also make sure the base matches the object being iterated
mhahnenberg@apple.com [Mon, 11 Aug 2014 18:59:44 +0000 (18:59 +0000)]
for-in optimization should also make sure the base matches the object being iterated
https://bugs.webkit.org/show_bug.cgi?id=135782

Reviewed by Geoffrey Garen.

If we access a different base object with the same index, we shouldn't try to randomly
load from that object's backing store.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitGetByVal):
(JSC::BytecodeGenerator::pushIndexedForInScope):
(JSC::BytecodeGenerator::pushStructureForInScope):
* bytecompiler/BytecodeGenerator.h:
(JSC::ForInContext::ForInContext):
(JSC::ForInContext::base):
(JSC::StructureForInContext::StructureForInContext):
(JSC::IndexedForInContext::IndexedForInContext):
* bytecompiler/NodesCodegen.cpp:
(JSC::ForInNode::emitMultiLoopBytecode):
* tests/stress/for-in-tests.js:

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

6 years ago[Win] Unreviewed gardening.
bfulgham@apple.com [Mon, 11 Aug 2014 18:47:34 +0000 (18:47 +0000)]
[Win] Unreviewed gardening.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Display files in
proper folder categories..

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

6 years agoWeb Inspector: DataGrid and its clients are a cluster-cuss of styles
timothy@apple.com [Mon, 11 Aug 2014 18:43:11 +0000 (18:43 +0000)]
Web Inspector: DataGrid and its clients are a cluster-cuss of styles
https://bugs.webkit.org/show_bug.cgi?id=135788

Clean up DataGrid and its subclasses and client styles.

Reviewed by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/ApplicationCacheFrameContentView.css:
(.content-view.application-cache-frame > .data-grid):
* UserInterface/Views/CookieStorageContentView.css:
(.content-view.cookie-storage > .data-grid):
* UserInterface/Views/DOMStorageContentView.css:
(.content-view.dom-storage > .data-grid):
* UserInterface/Views/DOMTreeDataGrid.css:
(.dom-tree-data-grid .data-grid):
(.dom-tree-data-grid .name-column .icon):
* UserInterface/Views/DOMTreeDataGrid.js:
(WebInspector.DOMTreeDataGrid):
* UserInterface/Views/DataGrid.css:
(.data-grid):
(.data-grid table):
(.data-grid .data-container):
(.data-grid.inline):
(.data-grid th):
(.data-grid :-webkit-any(th, td):not(:last-child)):
(.data-grid th.sortable:active):
(.data-grid th:-webkit-any(.sort-ascending, .sort-descending)):
(.data-grid table.data):
(.data-grid td):
(.data-grid:focus tr.selected td:not(:last-child)):
(body.mac-platform.legacy .data-grid:focus tr.selected td:not(:last-child)):
(.data-grid :-webkit-any(th, td) > div):
(.data-grid th:-webkit-any(.sort-ascending, .sort-descending) > div:first-child):
(.data-grid th.sort-ascending > div:first-child::after):
(.data-grid th.sort-descending > div:first-child::after):
(.data-grid td .subtitle):
(.data-grid td .subtitle::before):
(.data-grid:focus tr.selected td .subtitle):
(.data-grid td.error):
(.data-grid tr.selected td.error):
(.data-grid td .icon):
(.data-grid td .go-to-arrow):
(.data-grid tr:-webkit-any(.selected, :hover) .go-to-arrow):
* UserInterface/Views/DatabaseContentView.css:
(.storage-view):
* UserInterface/Views/DatabaseTableContentView.css:
(.content-view.database-table > .data-grid):
* UserInterface/Views/DetailsSection.css:
(.details-section > .content .data-grid):
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
(.content-view.indexed-database-object-store > .data-grid):
* UserInterface/Views/LayerTreeDataGridNode.js:
(WebInspector.LayerTreeDataGridNode.prototype._makeNameCell):
(WebInspector.LayerTreeDataGridNode.prototype._updateNameCellData):
* UserInterface/Views/LayerTreeSidebarPanel.css:
(.layer-tree.panel .data-grid):
(.layer-tree.panel .name-column .icon):
(.layer-tree.panel tr.reflection .name-column .icon):
(.layer-tree.panel tr.pseudo-element .name-column .icon):
(.layer-tree.panel .name-column .reflection):
(.layer-tree.panel tr.selected .name-column .reflection):
(.layer-tree.panel .bottom-bar):
(body.mac-platform.legacy .layer-tree.panel .bottom-bar):
(.layer-tree.panel .bottom-bar > div):
(body.mac-platform.legacy .layer-tree.panel .bottom-bar > div):
(body.mac-platform.legacy .layer-tree-popover):
* UserInterface/Views/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel):
(WebInspector.LayerTreeSidebarPanel.prototype._buildLayerInfoSection):
(WebInspector.LayerTreeSidebarPanel.prototype._buildDataGridSection):
(WebInspector.LayerTreeSidebarPanel.prototype._buildBottomBar):
(WebInspector.LayerTreeSidebarPanel.prototype._updateMetrics):
* UserInterface/Views/LegacyJavaScriptProfileView.css:
(.content-view.profile-view > .data-grid):
* UserInterface/Views/LegacyProfileView.css:
* UserInterface/Views/LogContentView.css:
(.console-message .bubble):
* UserInterface/Views/NetworkTimelineView.css:
(.timeline-view.network > .data-grid):
* UserInterface/Views/OverviewTimelineView.css:
(.timeline-view.overview > .timeline-ruler > .header):
(.timeline-view.overview > .data-grid):
* UserInterface/Views/OverviewTimelineView.js:
* UserInterface/Views/ProbeDetailsSidebarPanel.css:
(.details-section.probe-set .options > .probe-add):
(.popover .probe-popover):
* UserInterface/Views/ProbeSetDataGrid.css:
(.details-section.probe-set .data-grid tr.past-value td):
(.details-section.probe-set .data-grid > td.unknown-value):
(.details-section.probe-set .data-grid tr.revealed.highlighted):
(.details-section.probe-set .data-grid tr.separator):
(.details-section.probe-set .data-grid > tr.data-updated):
(.details-section.probe-set .data-grid .selected .section *):
(.details-section.probe-set .data-grid .selected td.unknown-value):
(.details-section.probe-set .data-grid .section):
* UserInterface/Views/QuickConsole.css:
(.quick-console):
* UserInterface/Views/TimelineDataGrid.css:
(.data-grid.timeline th):
(.data-grid.timeline > .navigation-bar-container > .navigation-bar):
* UserInterface/Views/TimelineRuler.css:
(.timeline-ruler > .header):
(.timeline-ruler > .header > .divider):

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

6 years agoJIT should use full 64-bit stores for jsBoolean and jsNull
mhahnenberg@apple.com [Mon, 11 Aug 2014 18:39:52 +0000 (18:39 +0000)]
JIT should use full 64-bit stores for jsBoolean and jsNull
https://bugs.webkit.org/show_bug.cgi?id=135784

Reviewed by Michael Saboff.

This guarantees that we set the high bits of the register with the correct tag.

* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_has_structure_property):
(JSC::JIT::emit_op_next_enumerator_pname):

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

6 years ago[Win] Adjust build script for Windows production build.
bfulgham@apple.com [Mon, 11 Aug 2014 18:23:29 +0000 (18:23 +0000)]
[Win] Adjust build script for Windows production build.
https://bugs.webkit.org/show_bug.cgi?id=135806
<rdar://problem/17978299>

Reviewed by Timothy Hatcher.

../JavaScriptCore:

* JavaScriptCore.vcxproj/copy-files.cmd: Copy file for later use
in WebInspectorUI build.

../WebCore:

* WebCore.vcxproj/copyForwardingHeaders.cmd: Copy file needed
for WebInspectorUI build.

../WebInspectorUI:

* WebInspectorUI.vcxproj/WebInspectorUI.make: Make sure target for
xcopy operation exists.
* WebInspectorUI.vcxproj/WebInspectorUI.proj: Don't create directories
we don't need, make sure the target location exists before we build.
* WebInspectorUI.vcxproj/build-webinspectorui.pl: Make sure that
production builds get the intermediary command files from the
right place.

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

6 years agoWeb Inspector: Add a helper to avoid leaking single-fire event listeners in Promise...
burg@cs.washington.edu [Mon, 11 Aug 2014 18:10:25 +0000 (18:10 +0000)]
Web Inspector: Add a helper to avoid leaking single-fire event listeners in Promise chains
https://bugs.webkit.org/show_bug.cgi?id=135772

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

A common pattern when working with promise chains is to convert an event
handler into a promise by using a single-fire event listener with the
resolve continuation as the callback. This is fine if the event fires;
if it doesn't fire, then the event emitter permanently keeps a reference to the
this-object and the callback.

This patch adds EventListener, a proxy object for events that can be manipulated
from multiple promise callback functions. If a promise is rejected, the catch
block can disconnect any event listeners set up earlier in the promise chain.

This patch also reimplements EventListenerSet to use multiple EventListeners,
since they share the same logic to uniformly handle Inspector and DOM events.

Test: inspector/event-listener.html
Test: inspector/event-listener-set.html

* UserInterface/Base/EventListener.js: Added.
(WebInspector.EventListener):
(WebInspector.EventListener.prototype.this._callback):
(WebInspector.EventListener.prototype.connect):
(WebInspector.EventListener.prototype.disconnect):
* UserInterface/Base/EventListenerSet.js: Update license block.
(WebInspector.EventListenerSet.prototype.register):
(WebInspector.EventListenerSet.prototype.install):
(WebInspector.EventListenerSet.prototype.uninstall):
* UserInterface/Main.html: Include EventListener.
* UserInterface/Test.html: Include EventListener and EventListenerSet.

LayoutTests:

* inspector/event-listener-expected.txt: Added.
* inspector/event-listener-set-expected.txt: Added.
* inspector/event-listener-set.html: Added.
* inspector/event-listener.html: Added.

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

6 years ago[Services with UI] Action menu arrow hit testing is sometimes wrong.
enrica@apple.com [Mon, 11 Aug 2014 17:52:15 +0000 (17:52 +0000)]
[Services with UI] Action menu arrow hit testing is sometimes wrong.
https://bugs.webkit.org/show_bug.cgi?id=135776
<rdar://problem/17837670>

Reviewed by Brady Eidson.

There was a problem in the algorithm that stitches together the selection rectangles
to be given to Data Detectors API.
This change adds a new function that stiches together all the rects contributing to the
first line, all the rects contributing to the last line and all the ones in the middle.
This way we can have a maximum of 3 non overlapping rectangles.

* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::stitchRects):
(WebKit::compactRectsWithGapRects):

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

6 years agoUnreviewed, rolling out r172393.
commit-queue@webkit.org [Mon, 11 Aug 2014 10:40:00 +0000 (10:40 +0000)]
Unreviewed, rolling out r172393.
https://bugs.webkit.org/show_bug.cgi?id=135796

discussion needed about GnuTLS version bump on the bots
(Requested by philn on #webkit).

Reverted changeset:

https://bugs.webkit.org/show_bug.cgi?id=133317
http://trac.webkit.org/changeset/172393

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

6 years ago[GTK] Adds dependency on GnuTLS 3.0+ for the implementation of subtle crypto algorithms
commit-queue@webkit.org [Mon, 11 Aug 2014 10:23:48 +0000 (10:23 +0000)]
[GTK] Adds dependency on GnuTLS 3.0+ for the implementation of subtle crypto algorithms
https://bugs.webkit.org/show_bug.cgi?id=133317

.:

GnuTLS is already an indirect dependency through libsoup -> glib-networking.

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2014-08-11
Reviewed by Philippe Normand.

No new tests since no new functionality has been added.

* Source/cmake/OptionsGTK.cmake: Adds search for required GnuTLS package

Source/WebCore:

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2014-08-11
Reviewed by Philippe Normand.

No new tests since no new functionality has been added.

* PlatformGTK.cmake: Adds GnuTLS libs and included dirs to WebCore targets

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

6 years agoUnreviewed, EFL build fix since r172385.
gyuyoung.kim@samsung.com [Mon, 11 Aug 2014 10:07:59 +0000 (10:07 +0000)]
Unreviewed, EFL build fix since r172385.

* PlatformEfl.cmake:

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

6 years ago[GTK] Fix debug build after r172389.
philn@webkit.org [Mon, 11 Aug 2014 10:04:32 +0000 (10:04 +0000)]
[GTK] Fix debug build after r172389.

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2014-08-11
Rubber-stamped by Philippe Normand.

* crypto/gtk/CryptoKeyRSAGtk.cpp:
(WebCore::CryptoKeyRSA::exportData): Remove spurious ASSERT from
stub. It will be added back along with the real implementation of
the method.

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

6 years agoUnreviewed fix after r172348.
zandobersek@gmail.com [Mon, 11 Aug 2014 09:48:06 +0000 (09:48 +0000)]
Unreviewed fix after r172348.

* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::BitmapImage): Initialize m_minimumSubsamplingLevel to 0.

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

6 years ago[GTK] Adds stubs for all subtle crypto algorithm implemntations
commit-queue@webkit.org [Mon, 11 Aug 2014 08:59:15 +0000 (08:59 +0000)]
[GTK] Adds stubs for all subtle crypto algorithm implemntations
https://bugs.webkit.org/show_bug.cgi?id=133316

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2014-08-11
Reviewed by Philippe Normand.

.:

* Source/cmake/OptionsGTK.cmake: Add ENABLE_SUBTLE_CRYPTO option
* Source/cmake/WebKitFeatures.cmake: Add ENABLE_SUBTLE_CRYPTO option
* Source/cmakeconfig.h.cmake: Define ENABLE_SUBTLE_CRYPTO

Source/WebCore:

No new tests since no new functionality has been added.

* CMakeLists.txt: Add subtle crypto 'algorithms' and 'parameters' dirs to WebCore incuded dirs
* PlatformGTK.cmake:  Add subtle crypto sources to WebCore target
* crypto/gtk/CryptoAlgorithmAES_CBCGtk.cpp: Added.
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
* crypto/gtk/CryptoAlgorithmAES_KWGtk.cpp: Added.
(WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
(WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
* crypto/gtk/CryptoAlgorithmHMACGtk.cpp: Added.
(WebCore::CryptoAlgorithmHMAC::platformSign):
(WebCore::CryptoAlgorithmHMAC::platformVerify):
* crypto/gtk/CryptoAlgorithmRSAES_PKCS1_v1_5Gtk.cpp: Added.
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
* crypto/gtk/CryptoAlgorithmRSASSA_PKCS1_v1_5Gtk.cpp: Added.
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
* crypto/gtk/CryptoAlgorithmRSA_OAEPGtk.cpp: Added.
(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
* crypto/gtk/CryptoAlgorithmRegistryGtk.cpp: Added.
(WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
* crypto/gtk/CryptoDigestGtk.cpp: Added.
(WebCore::CryptoDigest::CryptoDigest):
(WebCore::CryptoDigest::~CryptoDigest):
(WebCore::CryptoDigest::create):
(WebCore::CryptoDigest::addBytes):
(WebCore::CryptoDigest::computeHash):
* crypto/gtk/CryptoKeyRSAGtk.cpp: Added.
(WebCore::CryptoKeyRSA::CryptoKeyRSA):
(WebCore::CryptoKeyRSA::create):
(WebCore::CryptoKeyRSA::~CryptoKeyRSA):
(WebCore::CryptoKeyRSA::restrictToHash):
(WebCore::CryptoKeyRSA::isRestrictedToHash):
(WebCore::CryptoKeyRSA::keySizeInBits):
(WebCore::CryptoKeyRSA::buildAlgorithmDescription):
(WebCore::CryptoKeyRSA::exportData):
(WebCore::CryptoKeyRSA::generatePair):
* crypto/gtk/SerializedCryptoKeyWrapGtk.cpp: Added.
(WebCore::getDefaultWebCryptoMasterKey):
(WebCore::wrapSerializedCryptoKey):
(WebCore::unwrapSerializedCryptoKey):
* crypto/keys/CryptoKeyRSA.h:

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

6 years agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.5.2 release.
carlosgc@webkit.org [Mon, 11 Aug 2014 08:05:15 +0000 (08:05 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.2 release.

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

* gtk/NEWS: Add release notes for 2.5.2.

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

6 years agoUnreviewed. Fix GTK+ make distcheck.
carlosgc@webkit.org [Mon, 11 Aug 2014 07:29:34 +0000 (07:29 +0000)]
Unreviewed. Fix GTK+ make distcheck.

* gtk/manifest.txt: Remove Source/WebCore/Resources/inputSpeech.png.

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

6 years ago[GTK] No IPC messages are sent when building WebKitGTK+ with VERSION_SCRIPT
carlosgc@webkit.org [Mon, 11 Aug 2014 06:34:39 +0000 (06:34 +0000)]
[GTK] No IPC messages are sent when building WebKitGTK+ with VERSION_SCRIPT
https://bugs.webkit.org/show_bug.cgi?id=135760

Reviewed by Philippe Normand.

The problem is that the threading initialization is failing
because there are two copies of WTF, one in libjavascriptcoregtk
and the other in libwebkit2gtk. When WebKit2 is initialized in the
UI process, JSC::initializeThreading() is called first and then
WTF::initializeMainThread(). The former is calling
ThreadIdentifierData::initializeOnce() initializing the
ThreadIdentifierData::m_key symbol in libjavascriptcoregtk, while
the latter is using the ThreadIdentifierData API from libwebkit2gtk
that hasn't been initialized.

* CMakeLists.txt: Do not add WTF to the list of WebKit2 libraries,
WebKit2 already depends on JavaScriptCore that already links to WTF.

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

6 years agoRemove inputSpeech.png
commit-queue@webkit.org [Mon, 11 Aug 2014 04:22:11 +0000 (04:22 +0000)]
Remove inputSpeech.png
https://bugs.webkit.org/show_bug.cgi?id=135771

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-08-10
Reviewed by Andreas Kling.

* Resources/inputSpeech.png: Removed.
* WebCore.xcodeproj/project.pbxproj:

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

6 years agoYelp phone number highlights often disappear
timothy_horton@apple.com [Mon, 11 Aug 2014 01:26:14 +0000 (01:26 +0000)]
Yelp phone number highlights often disappear
https://bugs.webkit.org/show_bug.cgi?id=135789
<rdar://problem/17971057>

Reviewed by Brady Eidson.

Since selectedTelephoneNumberRangesChanged doesn't provide an associated
Frame, an incoming selectedTelephoneNumberRangesChanged from a subframe
would overwrite ServicesOverlayController's cached (and potentially active)
telephone number highlights.

This happens a lot on Yelp, because they have many subframes which are
doing layout on a regular basis.

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
* WebProcess/WebCoreSupport/WebEditorClient.h:
Adjust to the new (lack of) arguments.

* WebProcess/WebPage/ServicesOverlayController.h:
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
Adjust logging; we can revisit it later.

(WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
When building phone number highlights, walk the Frame tree and retrieve
them from all of the Editors.

(WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
(WebKit::ServicesOverlayController::telephoneNumberRangesForFocusedFrame):
(WebKit::ServicesOverlayController::determineActiveHighlight):
(WebKit::ServicesOverlayController::handleClick):
Retrieve the detected telephone number ranges from the focused frame
when combining telephone numbers with selection services.
This ensures that we don't show combined phone number highlights from other frames.

* editing/Editor.cpp:
(WebCore::Editor::scanSelectionForTelephoneNumbers):
(WebCore::Editor::clearDataDetectedTelephoneNumbers): Deleted.
* editing/Editor.h:
(WebCore::Editor::detectedTelephoneNumberRanges):
* page/EditorClient.h:
(WebCore::EditorClient::selectedTelephoneNumberRangesChanged):
Cache and expose detected telephone number ranges on Editor.
Change selectedTelephoneNumberRangesChanged to take no arguments; it's
just a notification now.

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

6 years agoRefactor ServiceOverlayController in preparation for fading between highlights
timothy_horton@apple.com [Mon, 11 Aug 2014 01:23:36 +0000 (01:23 +0000)]
Refactor ServiceOverlayController in preparation for fading between highlights
https://bugs.webkit.org/show_bug.cgi?id=135787
<rdar://problem/17935736>

Reviewed by Brady Eidson.

Rework ServicesOverlayController so that we always keep a set of generic
"potential highlights", which are refcounted Highlight objects and
wrap a DDHighlightRef, as well as a type (Selection or TelephoneNumber),
Range (only used in the case of TelephoneNumber), and potentially more
things in the future (like, say, fade state!).

We eagerly update the list of potential highlights when the selection or set
of detected telephone numbers changes, and use this information to install
or uninstall the page overlay as needed.

When we need to recompute the "active" highlight from this set (for example,
we need to handle a mouse event or paint the highlight), we look through
the set of potential highlights and decide. This moves the "active" highlight
decision logic into one small and confined place.

* WebProcess/WebPage/ServicesOverlayController.h:
(WebKit::ServicesOverlayController::Highlight):
Add the new aforementioned refcounted Highlight class.
Rename m_lastHoveredHighlightChangeTime to m_lastActiveHighlightChangeTime.
Make m_webPage a reference.
The rest is just added/removed/adjusted functions for the refactoring.

(WebKit::TelephoneNumberData::TelephoneNumberData): Deleted.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::Highlight::createForSelection):
(WebKit::ServicesOverlayController::Highlight::createForTelephoneNumber):
Create Highlights for the two different highlight types.

(WebKit::ServicesOverlayController::ServicesOverlayController):
(WebKit::ServicesOverlayController::willMoveToWebPage):
Our WebPage pointer is always valid because it owns us; don't clear it.
We need to keep it around so that we can uninstall the overlay and
install it again later, anyway.

(WebKit::ServicesOverlayController::selectionRectsDidChange):
(WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
When selection rects or detected telephone numbers change, rebuild potential highlights.
This will have the side-effect of installing the overlay if needed.

(WebKit::ServicesOverlayController::mouseIsOverHighlight):
Make this function take a Highlight instead of a DDHighlightRef.

(WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
Make this function take a Highlight instead of a DDHighlightRef.

(WebKit::ServicesOverlayController::drawHighlight):
Make this function take a Highlight instead of a DDHighlightRef.
There's no reason to do the translation separately from the layer blit,
also allowing us to avoid the StateSaver.

(WebKit::ServicesOverlayController::drawRect):
drawRect now always paints the active highlight, instead of duplicating
logic about which highlight should be active.
Also, it will update the active highlight before painting.
We no longer need to re-determine whether the active highlight's phone
number range is still a valid phone number range, because we rebuild
the potential highlights whenever the set of phone number ranges changes.

(WebKit::ServicesOverlayController::clearActiveHighlight):
Mostly an adoption of new names.

(WebKit::ServicesOverlayController::removeAllPotentialHighlightsOfType):
Run through the list of potential highlights and remove any of the given type.
The two highlight building functions use this helper to clear the old ones before building.

(WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
(WebKit::ServicesOverlayController::buildSelectionHighlight):
Rebuild the list of potential highlights, replacing all highlights of
the given type with new ones.

(WebKit::ServicesOverlayController::hasRelevantSelectionServices):
Factor out the code that decides whether our current selection is
viable for servicing based on whether we have plain-text and/or rich-text services.

(WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
When rebuilding potential highlights, if we have no potential highlights at all,
uninstall the page overlay; we don't need mouse tracking and don't need to
paint anything. This improves memory use and compositing performance significantly,
where previously we were leaving the overlay up forever after creating it.

If we have either detected telephone numbers or relevant selection services,
create and install the overlay if it doesn't already exist.

(WebKit::ServicesOverlayController::createOverlayIfNeeded):
This just moved from elsehwere, except that it now uses FadeMode::DoNotFade.
It doesn't make sense to fade on install/uninstall (which happens even before hover)
but not on changing the active highlight; fading will be re-addressed in the next patch.

(WebKit::ServicesOverlayController::highlightsAreEquivalent):
Determine whether two highlights are equivalent. While we may have
created a new Highlight at rebuild time, if two telephone number
highlights have equivalent ranges, there's no need to 'transition' to the new one.

(WebKit::ServicesOverlayController::determineActiveHighlight):
Run through the list of services, and try to find one that is hovered.
We prefer telephone number highlights to selection highlights, and
we will never make a selection highlight active if it is both
not serviceable and there are no telephone numbers to show in the combined menu.
This is the centralized location for determination of which highlight
should be considered active. If the active highlight changed, update
the time since last change and cancel the mouse-down tracking.

(WebKit::ServicesOverlayController::mouseEvent):
Adjust some comments to be more explanatory.
A bunch of code moved out of here and into determineActiveHighlight.

(WebKit::ServicesOverlayController::handleClick):
Adjust to take a reference and use Highlight instead of DDHighlightRef.

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

6 years agoDestructuring assignment in a var declaration list incorrectly consumes subsequent...
oliver@apple.com [Sun, 10 Aug 2014 20:12:01 +0000 (20:12 +0000)]
Destructuring assignment in a var declaration list incorrectly consumes subsequent variable initialisers
https://bugs.webkit.org/show_bug.cgi?id=135773

Reviewed by Michael Saboff.

Source/JavaScriptCore:

We should be using parseAssignment expression in order to get the correct
precedence.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseVarDeclarationList):

LayoutTests:

Add new tests.

* js/destructuring-assignment-expected.txt:
* js/script-tests/destructuring-assignment.js:

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

6 years agoJSC Lexer is allowing octals 08 and 09 in strict mode functions
commit-queue@webkit.org [Sun, 10 Aug 2014 20:07:34 +0000 (20:07 +0000)]
JSC Lexer is allowing octals 08 and 09 in strict mode functions
https://bugs.webkit.org/show_bug.cgi?id=135704

Patch by Diego Pino Garcia <dpino@igalia.com> on 2014-08-10
Reviewed by Oliver Hunt.

Return syntax error ("Decimal integer literals with a leading zero are
forbidden in strict mode") if a number starts with 0 and is followed
by a digit.

* parser/Lexer.cpp:
(JSC::Lexer<T>::lex):

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

6 years agoWeb Inspector: new glyphs are visible on OS X 10.9 builds
timothy@apple.com [Sun, 10 Aug 2014 10:25:27 +0000 (10:25 +0000)]
Web Inspector: new glyphs are visible on OS X 10.9 builds
https://bugs.webkit.org/show_bug.cgi?id=135743

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

* UserInterface/Images/Legacy/UserInputPrompt.svg: Removed.
* UserInterface/Images/Legacy/UserInputPromptPrevious.svg: Removed.
* UserInterface/Images/Legacy/UserInputResult.svg: Removed.
Removed images that were not used.

* UserInterface/Views/DashboardContainerView.css:
(body.mac-platform.legacy .dashboard-container .advance-arrow):
* UserInterface/Views/DebuggerDashboardView.js:
(WebInspector.DebuggerDashboardView):
* UserInterface/Views/FolderIcon.css:
(body.mac-platform.legacy .folder-icon .icon):
* UserInterface/Views/HierarchicalPathComponent.css:
(body.mac-platform.legacy .hierarchical-path-component > .selector-arrows):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
Use legacy images.

* UserInterface/Views/NavigationSidebarPanel.css:
(.navigation-sidebar-panel-content-tree-outline:focus .item.selected .subtitle):
Fix color for selected subtitle.

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
Use legacy images.

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController window]): Use 10100 instead of 1090 for the version.

Source/WebKit2:

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow): Use 10100 instead of 1090 for the version.

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

6 years agoUpdate HashTable's operator= after r172167 per review comments
benjamin@webkit.org [Sun, 10 Aug 2014 08:45:13 +0000 (08:45 +0000)]
Update HashTable's operator= after r172167 per review comments

* wtf/HashTable.h:
Update the type as suggested by Darin.

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

6 years ago[GTK] REGRESSION(r166239): The ld version script is not being used
carlosgc@webkit.org [Sun, 10 Aug 2014 07:30:26 +0000 (07:30 +0000)]
[GTK] REGRESSION(r166239): The ld version script is not being used
https://bugs.webkit.org/show_bug.cgi?id=135694

Reviewed by Martin Robinson.

.:

Move the symbols filter file from Tools/gtk to Source/cmake and rename
it as gtksymbols.filter. Also updated it, since some of the symbols
exported were renamed.

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/gtksymbols.filter: Renamed from Tools/gtk/symbols.filter.

Source/WebKit2:

* CMakeLists.txt: Add VERSION_SCRIPT to WebKit2 link flags if present.

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

6 years ago[GTK] Child processes should be installed in a versioned directory
carlosgc@webkit.org [Sun, 10 Aug 2014 07:09:47 +0000 (07:09 +0000)]
[GTK] Child processes should be installed in a versioned directory
https://bugs.webkit.org/show_bug.cgi?id=135754

Reviewed by Gustavo Noronha Silva.

Define LIBEXEC_INSTALL_DIR as
${CMAKE_INSTALL_FULL_LIBEXECDIR}/webkitgtk-${WEBKITGTK_API_VERSION}
so that the child processes are installed in $libexec/webkitgtk-4.0.
This makes it possible to install 2.6 in parallel to older versions.

* Source/cmake/OptionsGTK.cmake:

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

6 years agoWeb Inspector: TimelineManager should reuse empty recordings
burg@cs.washington.edu [Sun, 10 Aug 2014 04:34:34 +0000 (04:34 +0000)]
Web Inspector: TimelineManager should reuse empty recordings
https://bugs.webkit.org/show_bug.cgi?id=135749

Reviewed by Timothy Hatcher.

Check whether the recording is empty before creating a new one.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._loadNewRecording):
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.isEmpty):
(WebInspector.TimelineRecording.prototype.unloaded):

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

6 years agoREGRESSION (r172301): Combined phone number highlight doesn't appear if rich content...
timothy_horton@apple.com [Sun, 10 Aug 2014 01:04:23 +0000 (01:04 +0000)]
REGRESSION (r172301): Combined phone number highlight doesn't appear if rich content is selected and we have no rich content services
https://bugs.webkit.org/show_bug.cgi?id=135785
<rdar://problem/17969843>

Reviewed by Brady Eidson.

* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::drawSelectionHighlight):
We can't early return in the rich-content-but-no-rich-services case
if we have telephone numbers in the selection, because we want to offer
them up in the combined menu.

* UIProcess/mac/WebContextMenuProxyMac.mm:
If we end up with no menu, because there were no services available,
make a fresh one that we can fill with combined telephone number items.

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

6 years agoSubpixel rendering: Transforms on non-compositing layers leave bits behind when the...
zalan@apple.com [Sun, 10 Aug 2014 00:48:59 +0000 (00:48 +0000)]
Subpixel rendering: Transforms on non-compositing layers leave bits behind when the box boundaries changes.
https://bugs.webkit.org/show_bug.cgi?id=135786

Reviewed by Simon Fraser.

Since we don't control the transformed context painting's snapping strategy, our best bet to fully
include the transformed box when requesting for repaint is to use enclosing.
Pixelsnapping doesn't work here for all cases. For example, a scaled box at 0.8px can be anti-aliased painted
both at 0.5px and 1px, while with pixelsnapping we'd expect it to be painted starting from 1px;

Source/WebCore:

Test: fast/repaint/hidpi-transform-on-subpixel-repaintrect.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint): enclose the result of the transform.

LayoutTests:

* fast/repaint/hidpi-transform-on-subpixel-repaintrect-expected.txt: Added.
* fast/repaint/hidpi-transform-on-subpixel-repaintrect.html: Added.

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

6 years agoREGRESSION: Inspector crashes when debugger is paused and injected scripts access...
mark.lam@apple.com [Sat, 9 Aug 2014 06:50:19 +0000 (06:50 +0000)]
REGRESSION: Inspector crashes when debugger is paused and injected scripts access window.screen().
<https://webkit.org/b/135656>

Not reviewed.

Rolling out r170680 which was merged to ToT in r172129.

Source/JavaScriptCore:

* debugger/Debugger.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::scope):
(JSC::DebuggerCallFrame::evaluate):
(JSC::DebuggerCallFrame::invalidate):
* debugger/DebuggerCallFrame.h:
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::DebuggerScope):
(JSC::DebuggerScope::finishCreation):
(JSC::DebuggerScope::visitChildren):
(JSC::DebuggerScope::className):
(JSC::DebuggerScope::getOwnPropertySlot):
(JSC::DebuggerScope::put):
(JSC::DebuggerScope::deleteProperty):
(JSC::DebuggerScope::getOwnPropertyNames):
(JSC::DebuggerScope::defineOwnProperty):
(JSC::DebuggerScope::next): Deleted.
(JSC::DebuggerScope::invalidateChain): Deleted.
(JSC::DebuggerScope::isWithScope): Deleted.
(JSC::DebuggerScope::isGlobalScope): Deleted.
(JSC::DebuggerScope::isFunctionScope): Deleted.
* debugger/DebuggerScope.h:
(JSC::DebuggerScope::create):
(JSC::DebuggerScope::Iterator::Iterator): Deleted.
(JSC::DebuggerScope::Iterator::get): Deleted.
(JSC::DebuggerScope::Iterator::operator++): Deleted.
(JSC::DebuggerScope::Iterator::operator==): Deleted.
(JSC::DebuggerScope::Iterator::operator!=): Deleted.
(JSC::DebuggerScope::isValid): Deleted.
(JSC::DebuggerScope::jsScope): Deleted.
(JSC::DebuggerScope::begin): Deleted.
(JSC::DebuggerScope::end): Deleted.
* inspector/JSJavaScriptCallFrame.cpp:
(Inspector::JSJavaScriptCallFrame::scopeType):
(Inspector::JSJavaScriptCallFrame::scopeChain):
* inspector/JavaScriptCallFrame.h:
(Inspector::JavaScriptCallFrame::scopeChain):
* inspector/ScriptDebugServer.cpp:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::debuggerScopeStructure): Deleted.
* runtime/JSObject.h:
(JSC::JSObject::isWithScope): Deleted.
* runtime/JSScope.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

Source/WebCore:

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::attachDebugger):

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

6 years ago[EFL] Do not initialize g_type in WebProcessMain::platformInitialize()
g.czajkowski@samsung.com [Sat, 9 Aug 2014 02:37:31 +0000 (02:37 +0000)]
[EFL] Do not initialize g_type in WebProcessMain::platformInitialize()
https://bugs.webkit.org/show_bug.cgi?id=135700

Reviewed by Gyuyoung Kim.

Inspired by r171788.
Glib since 2.36 itself initializes g_type_init.

* WebProcess/efl/WebProcessMainEfl.cpp:

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

6 years agoUnbreak webkitpy unit tests by checking for the existence of the image diff template
simon.fraser@apple.com [Sat, 9 Aug 2014 01:14:52 +0000 (01:14 +0000)]
Unbreak webkitpy unit tests by checking for the existence of the image diff template
file before trying to open it (as the tests do for results.html).

* Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
(TestResultWriter.write_image_diff_files):

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

6 years agoBuild fix for 32-bit.
timothy_horton@apple.com [Sat, 9 Aug 2014 01:12:28 +0000 (01:12 +0000)]
Build fix for 32-bit.

* UIProcess/mac/ServicesController.mm:
(WebKit::ServicesController::ServicesController):
Don't dynamically refresh services in 32-bit apps. It's not possible
to write a 32-bit app with the Modern API, so this doesn't matter.

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

6 years agoLoad the layout test result image diff HTML from a file, rather than having it inline...
simon.fraser@apple.com [Sat, 9 Aug 2014 00:23:38 +0000 (00:23 +0000)]
Load the layout test result image diff HTML from a file, rather than having it inline in webkitpy
https://bugs.webkit.org/show_bug.cgi?id=135780

Reviewed by Dan Bates.

Tools:

Pull the HTML for the image diff file into a separate file, for easier hackability.

* Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
(TestResultWriter.write_image_diff_files):

LayoutTests:

Add image-diff-template.html and expected result (crazy, but this is what we do
for results.html too).

* fast/harness/image-diff-template-expected.txt: Added.
* fast/harness/image-diff-template.html: Added.

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

6 years agoImplement long mouse press over links. Part of 135257 - Add long mouse press gesture.
commit-queue@webkit.org [Sat, 9 Aug 2014 00:00:04 +0000 (00:00 +0000)]
Implement long mouse press over links. Part of 135257 - Add long mouse press gesture.
https://bugs.webkit.org/show_bug.cgi?id=135476

Patch by Peyton Randolph <prandolph@apple.com> on 2014-08-08
Reviewed by Tim Horton.

* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::clear): Clear long press state.
(WebCore::EventHandler::handleMousePressEvent): Start the long-press if the mouse press is a left
mouse press over a link.
(WebCore::EventHandler::eventMayStartDrag): We cannot start a drag if we've recognized a long press.
(WebCore::EventHandler::handleMouseReleaseEvent):
If we didn't recognize a long press, cancel the long press.
(WebCore::EventHandler::beginTrackingPotentialLongMousePress):
Begin the long mouse press by kicking off a timer. If the timer fires before the long press is
cancelled, the long press is recognized.
(WebCore::EventHandler::recognizeLongMousePress): Added. Trigger the long-press and disable other
actions like dragging.
(WebCore::EventHandler::cancelTrackingPotentialLongMousePress): Added. Cancel the long press by
clearing related state.
(WebCore::EventHandler::clearLongMousePressState): Added. Clear long press state.
(WebCore::EventHandler::handleLongMousePressMouseMovedEvent): Added. Cancel the long press if
the mouse moves outside a specified hysteresis interval.
(WebCore::EventHandler::handleMouseMoveEvent): Ask handleLongMousePressMouseMovedEvent whether to
return early and not update hovers, cursors, drags, etc.
(WebCore::EventHandler::dragHysteresisExceeded): Factor out the hysteresis bounds check into
mouseHysteresisExceeded().
(WebCore::EventHandler::handleDrag): Cancel long press upon starting drag.
(WebCore::EventHandler::mouseHysteresisExceeded): Added. General hysteresis function that takes an
arbitrary mouse movement threshold. Factored out from dragHysteresisExceeded.
* page/EventHandler.h:

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

6 years ago[mac] Dynamically update serviceability when the set of services changes
timothy_horton@apple.com [Fri, 8 Aug 2014 23:27:25 +0000 (23:27 +0000)]
[mac] Dynamically update serviceability when the set of services changes
https://bugs.webkit.org/show_bug.cgi?id=135738
<rdar://problem/17533459>

Reviewed by Brady Eidson.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
Adopt the new universal refreshExistingServices.

(WebKit::WebContext::refreshExistingServices): Deleted.
* UIProcess/WebContext.h:
Remove WebContext::refreshExistingServices; there's no need for it.

* UIProcess/mac/ServicesController.h:
* UIProcess/mac/ServicesController.mm:
Fix the build with only public headers by including NSSharingService.h itself.
Place the NSSharingServicePicker (Details) category outside the #ifdef.
Forward-declare and possibly import NSExtension SPI.

(WebKit::ServicesController::ServicesController):
Register a callback to be notified whenever the set of services changes.
When this occurs, call refreshExistingServices. We let refreshExistingServices
coalesce updates because these notifications can come in small batches.

(WebKit::ServicesController::refreshExistingServices):
Dispatch changes in service availability to all processes in all contexts.

* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
Adjust the referenced rdar:// and call ServicesController::refreshExistingServices
instead of the now-removed WebContext:: variant. We can't remove this
yet because our services state can still be stale because NSServiceSharingPicker
can still sometimes lie about the current service state immediately after a change occurs;
once that is fixed, we should get rid of this as well as the refresh in Web Process creation.

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

6 years ago[WK2] Scrolling does not work inside nested frames
simon.fraser@apple.com [Fri, 8 Aug 2014 23:24:02 +0000 (23:24 +0000)]
[WK2] Scrolling does not work inside nested frames
https://bugs.webkit.org/show_bug.cgi?id=135775
<rdar://problem/17959896>

Reviewed by Tim Horton.

Source/WebCore:

r169733 added an "isMainFrame" check in AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged.
However we have to rebuild the non-fast-scrollable region when any subframe changes,
even a deeply nested one. So always rebuild it, starting from the root frame.

Fixes scrolling on nested framesets like http://www.opengl.org/sdk/docs/man3/.

Test: platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability.html

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):

LayoutTests:

Nested frameset test that dumps the scrolling tree.

* platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/frameset-nested-frame-scrollability.html: Added.
* platform/mac-wk2/tiled-drawing/scrolling/frames/resources/frameset-frame.html: Added.

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

6 years agoClients that request the selection services menu after WebKit2 will get one with...
timothy_horton@apple.com [Fri, 8 Aug 2014 23:15:55 +0000 (23:15 +0000)]
Clients that request the selection services menu after WebKit2 will get one with different metrics than otherwise
https://bugs.webkit.org/show_bug.cgi?id=135765
<rdar://problem/17962180>

Reviewed by Brady Eidson.

* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
The menu is cached between clients, but we make adjustments to it.
We should copy it before adjusting.

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

6 years ago[CSS Shapes] Refactor getExcludedIntervals since only one LineSegment is ever returned
bjonesbe@adobe.com [Fri, 8 Aug 2014 21:12:06 +0000 (21:12 +0000)]
[CSS Shapes] Refactor getExcludedIntervals since only one LineSegment is ever returned
https://bugs.webkit.org/show_bug.cgi?id=135757

Reviewed by Zoltan Horvath.

The interface for getExcludedIntervals was designed when shape-inside
was still a thing, and it was possible for a line in a shape to have
multiple segments. shape-outside can only have one segment per line,
so this refactors the code to simplify and reflect that reality.

No new test, no behavior change.

* rendering/shapes/BoxShape.cpp:
(WebCore::BoxShape::getExcludedInterval):
(WebCore::BoxShape::getExcludedIntervals): Deleted.
* rendering/shapes/BoxShape.h:
* rendering/shapes/PolygonShape.cpp:
(WebCore::PolygonShape::getExcludedInterval):
(WebCore::PolygonShape::getExcludedIntervals): Deleted.
* rendering/shapes/PolygonShape.h:
* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShape::getExcludedInterval):
(WebCore::RasterShape::getExcludedIntervals): Deleted.
* rendering/shapes/RasterShape.h:
* rendering/shapes/RectangleShape.cpp:
(WebCore::RectangleShape::getExcludedInterval):
(WebCore::RectangleShape::getExcludedIntervals): Deleted.
* rendering/shapes/RectangleShape.h:
* rendering/shapes/Shape.h:
(WebCore::LineSegment::LineSegment):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::logicalLeftOffset):
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
(WebCore::ShapeOutsideInfo::computeSegmentsForLine): Deleted.
* rendering/shapes/ShapeOutsideInfo.h:

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

6 years agoWeb Inspector: add debugging flag to InspectorTest for unbuffered logging to stderr
burg@cs.washington.edu [Fri, 8 Aug 2014 20:21:59 +0000 (20:21 +0000)]
Web Inspector: add debugging flag to InspectorTest for unbuffered logging to stderr
https://bugs.webkit.org/show_bug.cgi?id=135726

Reviewed by Timothy Hatcher.

Source/WebCore:

Add a bridge so that InspectorTest can synchronously log to the console.

* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::unbufferedLog): Added.
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:

Source/WebInspectorUI:

Added a flag for debugging inspector tests which will synchronously log messages.
This avoids failure modes that prevent logging from being added to the test page.

* UserInterface/Base/Test.js:
(InspectorTest.debugLog):
(InspectorTest.addResult):

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

6 years agoGardening: fix Windows build after r172259.
mark.lam@apple.com [Fri, 8 Aug 2014 20:04:19 +0000 (20:04 +0000)]
Gardening: fix Windows build after r172259.

Not reviewed.

* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::addMockSpeechInputResult): Deleted.
(TestRunner::setMockSpeechInputDumpRect): Deleted.
(TestRunner::startSpeechInput): Deleted.

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

6 years agoWeb Inspector: When Switching Recordings, the UI datagrids do not update to match...
commit-queue@webkit.org [Fri, 8 Aug 2014 20:00:39 +0000 (20:00 +0000)]
Web Inspector: When Switching Recordings, the UI datagrids do not update to match selection
https://bugs.webkit.org/show_bug.cgi?id=135764

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-08
Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineSidebarPanel.js:
When changing the activeContentView trigger an update of the datagrids by
re-applying the filter, which will be different now that the view is different.

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

6 years agoAdjustments to CueBox CSS Width calculations.
roger_fong@apple.com [Fri, 8 Aug 2014 19:53:52 +0000 (19:53 +0000)]
Adjustments to CueBox CSS Width calculations.
https://bugs.webkit.org/show_bug.cgi?id=135759
<rdar://problem/17954473>.

Reviewed by Eric Carlson.

This is a followup patch that addresses some of the test failures caused by r172224.
These tests were skipped in r172253.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
Tell the cue boxes that they need to be updated when the font size specified in the user prefs changes.

Cap width to 100%, calculate max-width in percentages instead of pixels.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):

(WebCore::VTTCue::setFontSize):
Remove some unnecessary code that doesn't actually work.
Make sure to tell cuebox that it needs to be updated.

* TestExpectations:
Unskip tests media/track/track-cue-rendering-horizontal.html and media/track/track-cue-rendering-rtl.html.

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

6 years agoWeb Inspector: Uncaught Exception opening Web Inspector - TypeError: undefined is...
commit-queue@webkit.org [Fri, 8 Aug 2014 19:33:46 +0000 (19:33 +0000)]
Web Inspector: Uncaught Exception opening Web Inspector - TypeError: undefined is not a function - candidateObjectCookie.every
https://bugs.webkit.org/show_bug.cgi?id=135762

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-08
Reviewed by Timothy Hatcher.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.treeElementMatchesCookie):
Fix a typo, the wrong object was being used.

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

6 years agomake clean does not work in OpenSource, fails in WebKitLibraries
commit-queue@webkit.org [Fri, 8 Aug 2014 19:20:19 +0000 (19:20 +0000)]
make clean does not work in OpenSource, fails in WebKitLibraries
https://bugs.webkit.org/show_bug.cgi?id=135734

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-08
Reviewed by David Kilzer.

Tools:

* Scripts/copy-webkitlibraries-to-product-directory:
Add a --clean switch that removes possible WebKitSystemInterface
and LLVM libraries and headers that may have been copied to the
product directory.

WebKitLibraries:

* Makefile:
Add a "clean" target that runs copy-webkitlibraries-to-product-dir
with the new --clean switch.

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

6 years agoClean up image subsampling code, make it less iOS-specific
simon.fraser@apple.com [Fri, 8 Aug 2014 18:55:51 +0000 (18:55 +0000)]
Clean up image subsampling code, make it less iOS-specific
https://bugs.webkit.org/show_bug.cgi?id=134916

Reviewed by Dean Jackson.

Compile the image subsampling code on both Mac and iOS, and make it more platform
neutral in general. Add a setting to allow it to be enabled on Mac for testing.

The most significant changes are in ImageSourceCG and BitmapImageCG. CG's ImageSource
is no longer stateful with respect to subsampling; its functions take a SubsamplingLevel
when appropriate. CG's BitmapImage now determines which level of subsampling to use
for a given frame, storing the subsampling level in the frame data. It can replace
an aggressively subsampled frame with a less subsampled frame if necessary.

To reduce the chances of subsampling affecting rendering, BitmapImage::size() now
always returns the non-subsampled size; subsampling is strictly internal to BitmapImage.
BitmapImage::draw() takes care of scaling the srcRect for subsampled images.

iOS had a code path that enabled caching of frame metadata in BitmapImage without
actually decoding the frame; make this cross-platform.

Fix a couple of issues in the original pathc: remove a log, and ImageSource::allowSubsamplingOfFrameAtIndex()
return false.

* WebCore.exp.in: Changed signature for GraphicsContext::drawNativeImage().
* WebCore.xcodeproj/project.pbxproj: Added ImageSource.cpp, which is not built
for Cocoa but useful for reference.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer): Remove iOS-specific subsampling code.
(WebCore::CachedImage::createImage): Call setAllowSubsampling() on the image if we
can get to Settings (m_loader is null for image documents).
(WebCore::CachedImage::currentFrameKnownToBeOpaque): This forced decode always
caused creation of the non-subsampled image, so remove it. There's no reason to
eagerly decode the frame here.
* loader/cache/CachedImage.h: Fix comment.
* page/Settings.cpp: Add defaultImageSubsamplingEnabled, true for iOS and false for Mac.
* page/Settings.in: Added imageSubsamplingEnabled.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::BitmapImage): Init some more things. Default m_allowSubsampling to
true for iOS to catch images created in code paths where we can't get to Settings.
(WebCore::BitmapImage::haveFrameAtIndex): Handy helper.
(WebCore::BitmapImage::cacheFrame): Now takes the subsampling level and whether to cache
just metadata, or also the frame.
(WebCore::BitmapImage::didDecodeProperties): No need to store originalSize.
(WebCore::BitmapImage::updateSize): When we get the size for the first time, call
determineMinimumSubsamplingLevel() to choose a reasonable subsampling level which takes
platform-specific limits into account.
(WebCore::BitmapImage::dataChanged): Comment.
(WebCore::BitmapImage::ensureFrameIsCached): Take ImageFrameCaching into account.
(WebCore::BitmapImage::frameAtIndex): Choose a subsampling level given the scale,
then determine if we can use the currently cached frame, or whether we should resample.
(WebCore::BitmapImage::frameIsCompleteAtIndex): Caching m_isComplete is now done when caching
frame metadata.
(WebCore::BitmapImage::frameDurationAtIndex):
(WebCore::BitmapImage::frameHasAlphaAtIndex): The 'true' return is the safe return value.
(WebCore::BitmapImage::frameOrientationAtIndex): Caching m_orientation is now done when caching
frame metadata.
(WebCore::BitmapImage::cacheFrameInfo): Deleted.
(WebCore::BitmapImage::originalSize): Deleted.
(WebCore::BitmapImage::originalSizeRespectingOrientation): Deleted.
(WebCore::BitmapImage::currentFrameSize): Deleted.
(WebCore::BitmapImage::ensureFrameInfoIsCached): Deleted.
* platform/graphics/BitmapImage.h:
(WebCore::FrameData::FrameData):
* platform/graphics/GraphicsContext.h: No need to pass a scale param now.
* platform/graphics/ImageSource.cpp: Non-Cocoa changes.
(WebCore::ImageSource::subsamplingLevelForScale):
(WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
(WebCore::ImageSource::size):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::createFrameAtIndex):
(WebCore::ImageSource::frameBytesAtIndex):
* platform/graphics/ImageSource.h: No longer stores subsampling state.
(WebCore::ImageSource::isSubsampled): Deleted.
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::determineMinimumSubsamplingLevel):
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::FrameData::clear):
(WebCore::BitmapImage::BitmapImage): Init more members.
(WebCore::BitmapImage::determineMinimumSubsamplingLevel): Choose a minimum subsampling
level for the platform (subsample until the image area falls under a threshold).
(WebCore::BitmapImage::checkForSolidColor): Don't bother decoding frames if the image
is not 1x1. Also take care not to decode a non-subsampled image.
(WebCore::BitmapImage::draw): The actual bug fix is here; remove logic that
computed srcRectForCurrentFrame from m_size and m_originalSize; for some callers
srcRect was computed using the pre-subsampled size, and for others it was the subsampled size.
Instead, scale srcRect by mapping between the non-subsampled size, and the size of the CGImageRef
which is affected by subsampling.
(WebCore::BitmapImage::copyUnscaledFrameAtIndex):
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage): Remove #ifdeffed code.
(WebCore::GraphicsContext3D::paintToCanvas):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawNativeImage): No more weird scaling!
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::ImageSource):
(WebCore::createImageSourceOptions): Helper that always returns a new CFDictionaryRef.
(WebCore::imageSourceOptions): If not subsampling, return the cached CFDictionaryRef, otherwise
make a new options dict and return it.
(WebCore::ImageSource::subsamplingLevelForScale): Helper that returns a subsampling level
between 0 and 3 given a scale.
(WebCore::ImageSource::isSizeAvailable): SkipMetadata is a default value for the param now.
(WebCore::ImageSource::allowSubsamplingOfFrameAtIndex): We turn off subsampling for progressive
JPEGs because of a bug, so need this to know if a frame should be subsampled.
(WebCore::ImageSource::frameSizeAtIndex): The looping to find a subsampling level is now in BitmapImageCG.
(WebCore::ImageSource::orientationAtIndex):
(WebCore::ImageSource::size): Always use a subsampling level of 0 for size().
(WebCore::ImageSource::getHotSpot):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::createFrameAtIndex): The caller mapped a scale to a level.
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::frameBytesAtIndex):
(WebCore::ImageSource::imageSourceOptions): Deleted.
(WebCore::ImageSource::originalSize): Deleted.
* platform/graphics/mac/ImageMac.mm:
(WebCore::BitmapImage::invalidatePlatformData): 0 -> nullptr
* platform/graphics/wince/ImageWinCE.cpp:
(WebCore::BitmapImage::determineMinimumSubsamplingLevel):

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

6 years agoProgress towards using CMake on Mac.
achristensen@apple.com [Fri, 8 Aug 2014 18:13:54 +0000 (18:13 +0000)]
Progress towards using CMake on Mac.
https://bugs.webkit.org/show_bug.cgi?id=135662

Reviewed by Laszlo Gombos.

* CMakeLists.txt:
.:

Mavericks has a flex version of "flex 2.5.35 Apple(flex-31)" which CMake doesn't like on Mac.
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:
Added features that are needed by the Mac port.
* Source/cmake/OptionsMac.cmake:
Enable CSS_IMAGE_SET based on FeatureDefines.h.
Disable the FTL with CMake for now.
* Source/cmake/OptionsEFL.cmake:
* Source/cmake/OptionsGTK.cmake:
Enable subpixel layout to not conflict with FeatureDefines.h

Source/WebCore:

Added necessary include directories and idls.
* PlatformEfl.cmake:
* PlatformGTK.cmake:
Moved ImageSource.cpp and image-decoders to platform CMake files because they are not used on mac.
* PlatformMac.cmake:
Corrected some sources.
* config.h:
Added workaround for not using prefix headers with CMake.
* platform/graphics/ANGLEWebKitBridge.h:
Compile fix to find ANGLE headers while using CMake.
* platform/graphics/FormatConverter.h:
* platform/mac/NSScrollerImpDetails.h:
Removed unnecessary config.h includes.

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

6 years agoUndo some erroneous changes to the Xcode scheme files from r172259.
simon.fraser@apple.com [Fri, 8 Aug 2014 17:41:24 +0000 (17:41 +0000)]
Undo some erroneous changes to the Xcode scheme files from r172259.

* WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme:
* WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:

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

6 years agoServices overlay dropdown is often in the wrong place with zoomed pages or horizontal...
timothy_horton@apple.com [Fri, 8 Aug 2014 16:19:37 +0000 (16:19 +0000)]
Services overlay dropdown is often in the wrong place with zoomed pages or horizontal scrolling
https://bugs.webkit.org/show_bug.cgi?id=135755
<rdar://problem/17907752>

Reviewed by Brady Eidson.

* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
(WebKit::ServicesOverlayController::maybeCreateSelectionHighlight):
DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection adjusts the
location of the button based on the visible rect, trying to keep the button visible.

We're handing it the wrong visible rect, though, not taking scrolling into account.

This leads to pages that scroll horizontally showing the button on the left
even if there's space for it on the right, or sometimes not showing it at all.

Instead, provide the actual main FrameView visible rect; the same coordinate
space that the highlight rects are provided in.

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

6 years agoAdditional items added to selection services menus are misaligned
timothy_horton@apple.com [Fri, 8 Aug 2014 16:18:46 +0000 (16:18 +0000)]
Additional items added to selection services menus are misaligned
https://bugs.webkit.org/show_bug.cgi?id=135747
<rdar://problem/17933167>

Reviewed by Brady Eidson.

* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
Use NSSharingServicePickerStyleRollover for the rollover image services menu;
use NSSharingServicePickerStyleTextSelection for the selection services menu.

Set NSMenu's showsStateColumn to YES for selection services menus, so that
other items added to the menu line up correctly.

Remove an unncessary .get()

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