WebKit-https.git
5 years agoUnreviewed, kick the GTK bots to regenerate makefile.
ossy@webkit.org [Fri, 20 Mar 2015 08:02:13 +0000 (08:02 +0000)]
Unreviewed, kick the GTK bots to regenerate makefile.
https://bugs.webkit.org/show_bug.cgi?id=137394

* Source/cmake/OptionsEfl.cmake: Revert my last accidenatal change.
* Source/cmake/OptionsGTK.cmake: Really kick the GTK bots.

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

5 years agoUnreviewed, kick the GTK bots to regenerate makefile.
ossy@webkit.org [Fri, 20 Mar 2015 07:52:25 +0000 (07:52 +0000)]
Unreviewed, kick the GTK bots to regenerate makefile.
https://bugs.webkit.org/show_bug.cgi?id=137394

* Source/cmake/OptionsEfl.cmake:

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

5 years agoFixed a ChangeLog misspelling pointed out by Andreas.
aestes@apple.com [Fri, 20 Mar 2015 06:01:11 +0000 (06:01 +0000)]
Fixed a ChangeLog misspelling pointed out by Andreas.

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

5 years ago[Content Filtering] Give contentfiltering tests a JavaScript harness
aestes@apple.com [Fri, 20 Mar 2015 05:58:32 +0000 (05:58 +0000)]
[Content Filtering] Give contentfiltering tests a JavaScript harness
https://bugs.webkit.org/show_bug.cgi?id=142899

Reviewed by Andreas Kling.

Create a JavaScript function to run the contentfiltering/ tests. This consolodates shared logic and will make
it easier to write new tests.

* TestExpectations: Skipped a test that times out with the new harness (but it also failed before).
* contentfiltering/allow-after-add-data.html: Called testContentFiltering().
* contentfiltering/allow-after-finished-adding-data.html: Ditto.
* contentfiltering/allow-after-response.html: Ditto.
* contentfiltering/block-after-add-data.html: Ditto.
* contentfiltering/block-after-finished-adding-data.html: Ditto.
* contentfiltering/block-after-response.html: Ditto.
* contentfiltering/resources/contentfiltering.js: Added.

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

5 years ago[WK2] We should allow stale content when restoring a killed / crashed WebProcess
cdumez@apple.com [Fri, 20 Mar 2015 05:45:38 +0000 (05:45 +0000)]
[WK2] We should allow stale content when restoring a killed / crashed WebProcess
https://bugs.webkit.org/show_bug.cgi?id=142893
<rdar://problem/19633737>
<rdar://problem/19869257>

Reviewed by Antti Koivisto.

Source/WebCore:

Always use ReturnCacheDataElseLoad cache policy for history navigations.
Previously, we would use the default protocol cache policy for history
navigations if m_stateMachine.committedFirstRealDocumentLoad() returned
false so that we do not display stale content when restoring the session
state of Safari statup (rdar://problem/8131355). This is now handled
before reaching this method by no longer using "IndexedBackForward"
FrameLoadType when restoring session tabs, and using "Standard" load
type instead.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadDifferentDocumentItem):

Source/WebKit2:

Allow stale content when restoring a killed / crashed WebProcess
(similarly to a history navigation). This is actually what was intended
as we call WebPage::goToBackForwardItem() in this case, which uses
IndexedBackForward load type. However, this value was then ignored in
FrameLoader::loadDifferentDocumentItem().

This patch gets rid of the special casing in
FrameLoader::loadDifferentDocumentItem() and makes it clear at call
sites when calling goToBackForwardItem() if we should allow stale
content or not. If goToBackForwardItem() is called with the
allowStaleContent flag off, we'll keep using the IndexedBackForward
frame load type. However, if the flag is on, we'll use the Standard
frame load type and do a fresh load.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessForReload):
Set allowStaleContent flag to true as we want to allow stale content
when reloading a WebProcess after it crashed or was killed (behavior
change).

(WebKit::WebPageProxy::reattachToWebProcessWithItem):
Add allowStaleContent parameter so that call sites can decide which
policy to use.

(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
Set allowStaleContent flag to true as this is our policy for history
navigations.

(WebKit::WebPageProxy::goToBackForwardItem):
Add allowStaleContent parameter so that the call site can let us know
what to do. This is useful as this is called not only for indexed
back / forward navigations (allowing stale content) but also for
restoring session state (forbidding state content:
<rdar://problem/8131355>).

(WebKit::WebPageProxy::restoreFromSessionState):
Call goToBackForwardItem() with allowStaleContent flag set to false
as users expect fresh contents in this case. This method is called
when:
- Tabs are restored on Safari / MobileSafari startup
- Tabs are restored via "History > Reopen All windows from last session"

* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::goToBackForwardItem):
Add allowStaleContent parameter and use "Standard" frame load type
instead of "IndexedBackForward" if it is false. This is needed as
"IndexedBackForward" frame load type allows using stale content.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Add allowStaleContent flag to GoToBackForwardItem message.

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

5 years ago[Content Filtering] Move ContentFilter to from platform/ to loader/
aestes@apple.com [Fri, 20 Mar 2015 05:22:22 +0000 (05:22 +0000)]
[Content Filtering] Move ContentFilter to from platform/ to loader/
https://bugs.webkit.org/show_bug.cgi?id=142897

Reviewed by Dan Bernstein.

ContentFilterCollection never contained any platform code, so it doesn't make sense for it to be in platform.
Move it to loader/, since ContentFilters are owned by DocumentLoaders, and just call it ContentFilter. Extract
the abstract part of ContentFilter into a new base class called PlatformContentFilter that each of the
individual filters inherit from.

* WebCore.xcodeproj/project.pbxproj:
* loader/ContentFilter.cpp: Renamed from Source/WebCore/platform/ContentFilter.cpp.
(WebCore::ContentFilter::types): Moved from ContentFilterCollection.
(WebCore::ContentFilter::createIfNeeded): Ditto.
(WebCore::ContentFilter::ContentFilter): Ditto.
(WebCore::ContentFilter::addData): Ditto.
(WebCore::ContentFilter::finishedAddingData): Ditto.
(WebCore::ContentFilter::needsMoreData): Ditto.
(WebCore::ContentFilter::didBlockData): Ditto.
(WebCore::ContentFilter::getReplacementData): Ditto.
(WebCore::ContentFilter::unblockHandler): Ditto.
* loader/ContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
(WebCore::ContentFilter::type): Replaced a use of ContentFilterCollection.
* platform/PlatformContentFilter.h: Renamed from Source/WebCore/platform/ContentFilter.h.
* platform/cocoa/NetworkExtensionContentFilter.h: Inherited from PlatformContentFilter.
* platform/cocoa/ParentalControlsContentFilter.h: Ditto.
* testing/MockContentFilter.h: Ditto.

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

5 years ago[Win] Try to get the Debug bots green.
bfulgham@apple.com [Fri, 20 Mar 2015 05:06:40 +0000 (05:06 +0000)]
[Win] Try to get the Debug bots green.

* platform/win/TestExpectations:

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

5 years ago[Win] Skip an <attachment> test that times out on Windows.
bfulgham@apple.com [Fri, 20 Mar 2015 05:02:39 +0000 (05:02 +0000)]
[Win] Skip an <attachment> test that times out on Windows.

Also mark two flakes I noticed on the test bots.

* platform/win/TestExpectations:

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

5 years agoCSS Animations with triggers should map scroll position to duration
dino@apple.com [Fri, 20 Mar 2015 04:47:20 +0000 (04:47 +0000)]
CSS Animations with triggers should map scroll position to duration
https://bugs.webkit.org/show_bug.cgi?id=142870
<rdar://problem/20227244>

Reviewed by Simon Fraser.

Source/WebCore:

Expose a prototype implementation of what will eventually be called
animation-timebase, mapping the scroll location to the duration of an
animation. This only applies if the animation has a start and end
trigger.

Test: animations/trigger-container-scroll-boundaries.html
Test: animations/trigger-container-scroll-empty.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::createAnimationTriggerValue): Change to downcast.

* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationTrigger): Fix a bug where I wasn't
telling the ScrollAnimationTrigger object whether or not it had
an end value. This wasn't visible before because we were not using
the end value.

* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::fireAnimationEventsIfNeeded): Add a comment and
change to using a downcast.
(WebCore::AnimationBase::timeToNextService): Change to downcast.
(WebCore::AnimationBase::freezeAtTime): Whitespace cleanup.
(WebCore::AnimationBase::getElapsedTime): Calculate the elapsedTime based
on the scroll position relative to the start and end trigger spots.

* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::updateAnimations): Since this
can potentially call into beginAnimationUpdateTime, it should have
an update blocker. This fixes the assert we were seeing in tests.
(WebCore::AnimationControllerPrivate::scrollWasUpdated): Keep track of the scroll
position so we don't need to ask for it all the time.
* page/animation/AnimationControllerPrivate.h:
(WebCore::AnimationControllerPrivate::scrollPosition): New accessor.

* platform/animation/AnimationTrigger.h: Add downcast macros.
(WebCore::ScrollAnimationTrigger::create): Calculate hasEndValue from the passed
parameters rather than a separate value.
(WebCore::ScrollAnimationTrigger::hasEndValue):
(WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
(WebCore::ScrollAnimationTrigger::setHasEndValue): Deleted.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::animationCanBeAccelerated): If we have an
animation of this sort, we can't use a CAAnimation.

LayoutTests:

Add a new test that exercises an animation trigger over a scroll
region, and a test of the boundary condition. Also, unskip a test that
was failing due to a bug fixed in this patch.

* animations/trigger-container-scroll-boundaries-expected.txt: Added.
* animations/trigger-container-scroll-boundaries.html: Added.
* animations/trigger-container-scroll-empty-expected.txt: Added.
* animations/trigger-container-scroll-empty.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:

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

5 years ago[Mac] Move MediaPlaybackTargetPicker
eric.carlson@apple.com [Fri, 20 Mar 2015 03:51:45 +0000 (03:51 +0000)]
[Mac] Move MediaPlaybackTargetPicker
https://bugs.webkit.org/show_bug.cgi?id=142889

Source/WebCore:

Move WebMediaPlaybackTargetPickerProxy from WK2 and rename as MediaPlaybackTargetPicker so it
can be used by both WK2 and WK1.

Reviewed by Tim Horton.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/MediaPlaybackTargetPicker.cpp: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.cpp.
* platform/graphics/MediaPlaybackTargetPicker.h: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.h.
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h.
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm.

Source/WebKit2:

Move WebMediaPlaybackTargetPickerProxy to WebCore so it can be used by
both WK2 and WK1.

Reviewed by Tim Horton.

* UIProcess/PageClient.h:
* UIProcess/WebMediaPlaybackTargetPickerProxy.cpp: Removed.
* UIProcess/WebMediaPlaybackTargetPickerProxy.h: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::devicePickerProxy):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::createPlaybackTargetPicker):
* UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h: Removed.
* UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

5 years ago32-bit build fix after r181770.
jberlin@webkit.org [Fri, 20 Mar 2015 01:52:57 +0000 (01:52 +0000)]
32-bit build fix after r181770.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController initWithWindow:webView:]):

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

5 years agoAdd support for deleting individual cache entries
andersca@apple.com [Fri, 20 Mar 2015 01:37:14 +0000 (01:37 +0000)]
Add support for deleting individual cache entries
https://bugs.webkit.org/show_bug.cgi?id=142886

Reviewed by Antti Koivisto.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::fetchDiskCacheEntries):
Remove an unnecessary call to cfURLCacheOrigins().

(WebKit::clearDiskCacheEntries):
Helper function for clearing disk cache entries. This handles both the old and new cache implementations.

(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
Call clearDiskCacheEntries if needed.

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

5 years agoUnreviewed build fix. Don't try to report stats for all benchmarks.
rniwa@webkit.org [Fri, 20 Mar 2015 00:53:33 +0000 (00:53 +0000)]
Unreviewed build fix. Don't try to report stats for all benchmarks.
Just report the geometric mean of preferred means.

* Scripts/run-jsc-benchmarks:

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

5 years agoSource/WebCore:
enrica@apple.com [Fri, 20 Mar 2015 00:47:32 +0000 (00:47 +0000)]
Source/WebCore:
REGRESSION (r109593): Clicking after last inline element could cause a crash.
https://bugs.webkit.org/show_bug.cgi?id=142880
rdar://problem/17222294

Reviewed by Ryosuke Niwa.

Test: editing/selection/click-after-last-inline-crash.html

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::closestLeafChildForLogicalLeftPosition):

LayoutTests:
Web Inspector: Adopt ES6 Class Syntax for all Model Objects
https://bugs.webkit.org/show_bug.cgi?id=142858

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

* inspector/model/parse-script-syntax-tree.html:
This test was calling a constructor without "new". Class
syntax enforces "new" and threw an exception.

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

5 years agoOne more build fix after r181760.
enrica@apple.com [Fri, 20 Mar 2015 00:44:12 +0000 (00:44 +0000)]
One more build fix after r181760.

* page/EventHandler.cpp:
(WebCore::EventHandler::handleDrag):

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

5 years agoBuild fix after r181760.
jberlin@webkit.org [Fri, 20 Mar 2015 00:38:14 +0000 (00:38 +0000)]
Build fix after r181760.

* rendering/RenderAttachment.h:

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

5 years ago[WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
jer.noble@apple.com [Fri, 20 Mar 2015 00:20:52 +0000 (00:20 +0000)]
[WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
https://bugs.webkit.org/show_bug.cgi?id=142132

Reviewed by Tim Horton.

Source/WebCore:

Add a new utility method to calculate a rect with a specific aspect ratio wrapping a smaller one.

* platform/graphics/GeometryUtilities.cpp:
(WebCore::smallestRectWithAspectRatioAroundRect):
* platform/graphics/GeometryUtilities.h:

Source/WebKit2:

Use CALayer animations for the transition into and out of fullscreen.

The fullscreen transition consists of three separate animations:
1. An opacity animation for the black backdrop behind the fullscreen content
2. A scale/translation animation from fullscreen element's initial screen to its final one.
3. A clip animation from the fullscreen element's initial aspect ratio to its final one.

The opacity animation will apply to the fullscreen window's content view's layer's
background color. To separately animate the transform and mask of the web view's content, a
layer-backed subview is added to the content view, and the scale/translation & clip
animations are applied to its transform property and mask layer respectively.

Utility methods to create each animation have been added, and each includes a parameter for
the direction of the animation, so that the same methods can be used for entering and
exiting fullscreen transitions.

The user-visible changes to this new transition are when the aspect ratios of the initial
and final screen locations are different: previously the transition would use a scale
transform to "squish" the fullscreen content into the initial aspect ratio. The new
transition instead "clips" the fullscreen content to the initial aspect ratio. For common
operations such a <video> element with a different aspect ratio than the screen, this makes
the black letterbox "grow" during the transition, and makes the transition overall much
smoother.

* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController initWithWindow:webView:]): Create and initialze the clipping view.
(-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): _backgroundWindow was removed.
(-[WKFullScreenWindowController enterFullScreen:]): Add the webView to the _clipView, not the contentView.
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): _backgroundWindow,
        _fadeAnimation, and _scaleAnimation are all removed.
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto.
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Ditto.  Hide the contentView's
        layer. Pause visibility updates.
(-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Resume visibility updates.
(-[WKFullScreenWindowController close]): _fadeAnimation and _scaleAnimation are removed.
(-[WKFullScreenWindowController customWindowsToEnterFullScreenForWindow:]): Return only the fullscreen
        window.
(-[WKFullScreenWindowController customWindowsToExitFullScreenForWindow:]): Ditto.
(zoomAnimation): Added.
(maskAnimation): Added.
(fadeAnimation): Added.
(-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Use the utility
        methods above to set up the animation.
(-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Ditto.
(createBackgroundFullscreenWindow): Deleted.
(windowFrameFromApparentFrames): Deleted.

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

5 years agoWeb Inspector: Adopt ES6 Class Syntax for all Model Objects
joepeck@webkit.org [Fri, 20 Mar 2015 00:18:15 +0000 (00:18 +0000)]
Web Inspector: Adopt ES6 Class Syntax for all Model Objects
https://bugs.webkit.org/show_bug.cgi?id=142858

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

  - Convert WebInspector.Object to a class
  - Convert all UserInterface/Models objects to classes
  - Convert constructor functions to constructor methods
  - Convert "constructor.method" to class static methods where possible
  - Convert all methods to method syntax, eliminate commas between methods
  - Convert all superclass calls in classes to use "super"
  - Workaround <https://webkit.org/b/142862> and add empty constructors
  - Added "deprecated" prefix to addConstructorFunctions, since it is not needed with classes
  - Added many missing calls to super in constructors
  - Added FIXME to WebInspector.Object subclasses not yet moved to classes.
  - Cleaned up SourceMap global properties, moved to constructor instead of prototype
  - Cleaned up Timeline factory constructor to static "create" factory method
  - Fixed any style issues noticed in the mass edit
  - Fixed strict mode issues now that classes enforce strict mode
      - RunLoopTimelineRecord.js was missing a `var` for a local variable
      - "const" is not allowed, converted to "var"
      - "arguments.callee" is not allowed in strict mode

* UserInterface/**/*.js:
Many files modified mostly mechanically.

LayoutTests:

* inspector/model/parse-script-syntax-tree.html:
This test was calling a constructor without "new". Class
syntax enforces "new" and threw an exception.

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

5 years agoWeb Inspector: Debugger sidebar header should say "Scripts" instead of "Breakpoints...
jonowells@apple.com [Thu, 19 Mar 2015 23:52:13 +0000 (23:52 +0000)]
Web Inspector: Debugger sidebar header should say "Scripts" instead of "Breakpoints", appear only on pause
https://bugs.webkit.org/show_bug.cgi?id=142847

Reviewed by Timothy Hatcher.

Add a `paused` class on the debugger sidebar panel. Use that class to adjust the sidebar styles so that, when
the debugger is not paused: there is no header for the scripts section, there is no border beneath the scripts
section, and the scripts section cannot be collapsed (which could be done while the debugger is paused). The
header has changed to say "Scripts" instead of "Breakpoints" when it is showing.

* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .details-section.scripts):
(.sidebar > .panel.navigation.debugger .details-section.scripts .header):
(.sidebar > .panel.navigation.debugger .details-section.scripts.collapsed > .content):
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts):
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts .header):
(.sidebar > .panel.navigation.debugger.paused .details-section.scripts.collapsed > .content):
Adjust styles to hide header and border.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
Add a `paused` class to the debugger sidebar when it is paused.

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

5 years agoGet rid of "CachePolicyCache" cache policy
cdumez@apple.com [Thu, 19 Mar 2015 23:26:08 +0000 (23:26 +0000)]
Get rid of "CachePolicyCache" cache policy
https://bugs.webkit.org/show_bug.cgi?id=142881

Reviewed by Antti Koivisto.

Get rid of "CachePolicyCache" cache policy as it is unused.

* loader/cache/CachePolicy.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey): Deleted.
* page/DiagnosticLoggingKeys.h:

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

5 years agoJSCallee unnecessarily overrides a bunch of things in the method table.
akling@apple.com [Thu, 19 Mar 2015 23:01:14 +0000 (23:01 +0000)]
JSCallee unnecessarily overrides a bunch of things in the method table.
<https://webkit.org/b/142855>

Reviewed by Geoffrey Garen.

Remove JSCallee method table overrides that simply call to base class.
This makes JSFunction property slot lookups slightly more efficient since
they can take the fast path when passing over JSCallee in the base class chain.

* runtime/JSCallee.cpp:
(JSC::JSCallee::getOwnPropertySlot): Deleted.
(JSC::JSCallee::getOwnNonIndexPropertyNames): Deleted.
(JSC::JSCallee::put): Deleted.
(JSC::JSCallee::deleteProperty): Deleted.
(JSC::JSCallee::defineOwnProperty): Deleted.
* runtime/JSCallee.h:

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

5 years agorun-jsc-benchmarks should only report preferred mean
rniwa@webkit.org [Thu, 19 Mar 2015 22:46:56 +0000 (22:46 +0000)]
run-jsc-benchmarks should only report preferred mean
https://bugs.webkit.org/show_bug.cgi?id=142874

Reviewed by Geoffrey Garen.

Just collect statistics for the preferred mean.

* Scripts/run-jsc-benchmarks:

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

5 years ago[Content Extensions] Test regular expression parse failures.
enrica@apple.com [Thu, 19 Mar 2015 22:39:55 +0000 (22:39 +0000)]
[Content Extensions] Test regular expression parse failures.
https://bugs.webkit.org/show_bug.cgi?id=142872

Patch by Alex Christensen <achristensen@webkit.org> on 2015-03-19
Reviewed by Benjamin Poulain.

* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::GraphBuilder::finalize):
(WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
(WebCore::ContentExtensions::URLFilterParser::addPattern):
(WebCore::ContentExtensions::URLFilterParser::statusString):
* contentextensions/URLFilterParser.h:
Changed failures that can never happen to assertions.

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

5 years ago[Content Extensions] Test regular expression parse failures.
achristensen@apple.com [Thu, 19 Mar 2015 22:37:35 +0000 (22:37 +0000)]
[Content Extensions] Test regular expression parse failures.
https://bugs.webkit.org/show_bug.cgi?id=142872

Reviewed by Benjamin Poulain.

Source/WebCore:

* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::GraphBuilder::finalize):
(WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
(WebCore::ContentExtensions::URLFilterParser::addPattern):
(WebCore::ContentExtensions::URLFilterParser::statusString):
* contentextensions/URLFilterParser.h:
Changed failures that can never happen to assertions.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::testPatternStatus):
(TestWebKitAPI::TEST_F):
Added tests for each parsing status.

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

5 years agoUnreviewed build fixes.
rniwa@webkit.org [Thu, 19 Mar 2015 22:36:43 +0000 (22:36 +0000)]
Unreviewed build fixes.

* public/include/manifest.php:
(Manifest::generate): These should be {} instead of [] when they're empty.
* public/v2/data.js:
(Measurement.prototype.formattedRevisions): Don't assume previousRevisions[repositoryId] exits.
* public/v2/manifest.js:
(App.Metric.fullName): Fixed the typo.
* tests/admin-regenerate-manifest.js: Fixed the test.

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

5 years ago<attachment> should put URLs on the pasteboard so that Finder can accept drops.
enrica@apple.com [Thu, 19 Mar 2015 21:59:23 +0000 (21:59 +0000)]
<attachment> should put URLs on the pasteboard so that Finder can accept drops.
https://bugs.webkit.org/show_bug.cgi?id=142801
rdar://problem/19982527

Reviewed by Tim Horton.

Source/WebCore:

Test: editing/pasteboard/drag-and-drop-attachment-contenteditable.html

This patch adds all the necessary support to write attachment elements into
the pasteboard, including the promised type.

* WebCore.xcodeproj/project.pbxproj:
* page/DragActions.h:
* page/DragClient.h:
(WebCore::DragClient::declareAndWriteAttachment):
* page/DragController.cpp:
(WebCore::DragController::draggableElement):
(WebCore::DragController::startDrag):
* page/DragController.h:
(WebCore::DragController::draggingAttachmentURL):
* page/EventHandler.cpp:
(WebCore::EventHandler::dragHysteresisExceeded):
(WebCore::EventHandler::handleDrag):
* page/mac/DragControllerMac.mm:
(WebCore::DragController::declareAndWriteAttachment):
* page/win/DragControllerWin.cpp:
(WebCore::DragController::declareAndWriteAttachment):
* platform/URL.cpp:
(WebCore::URL::fileURLWithFileSystemPath):
* platform/URL.h:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::absoluteAttachmentURL):
* rendering/HitTestResult.h:

Source/WebKit/mac:

This patch adds all the necessary support to write attachment elements into
the pasteboard, including the promised type in WK1.

* Misc/WebNSPasteboardExtras.mm:
(-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
* WebCoreSupport/WebDragClient.h:
* WebCoreSupport/WebDragClient.mm:
(WebDragClient::declareAndWriteAttachment):
* WebView/WebHTMLView.mm:
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
* WebView/WebUIDelegate.h:

Source/WebKit2:

This patch adds all the necessary support to write attachment elements into
the pasteboard, including the promised type in WK2.

* UIProcess/API/mac/WKView.mm:
(-[WKView _setPromisedDataForImage:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]):
(-[WKView _setPromisedDataForAttachment:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]):
(-[WKView namesOfPromisedFilesDroppedAtDestination:]):
(-[WKView _setPromisedData:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]): Deleted.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setPromisedDataForImage):
(WebKit::PageClientImpl::setPromisedDataForAttachment):
(WebKit::PageClientImpl::setPromisedData): Deleted.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setPromisedDataForImage):
(WebKit::WebPageProxy::setPromisedDataForAttachment):
(WebKit::WebPageProxy::setPromisedData): Deleted.
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteAttachment):
(WebKit::WebDragClient::declareAndWriteDragImage):

LayoutTests:

* editing/pasteboard/drag-and-drop-attachment-contenteditable-expected.txt: Added.
* editing/pasteboard/drag-and-drop-attachment-contenteditable.html: Added.
* platform/mac-wk2/TestExpectations: Skipping new test on WK2 since it uses eventSender.

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

5 years agoWeb Inspector: FilterBar for debugger sidebar hides breakpoints for displayed resources
jonowells@apple.com [Thu, 19 Mar 2015 21:44:59 +0000 (21:44 +0000)]
Web Inspector: FilterBar for debugger sidebar hides breakpoints for displayed resources
https://bugs.webkit.org/show_bug.cgi?id=142777

Reviewed by Brian Burg.

Typing into the text input on the filter bar for the debugger sidebar no longer incorrectly hides the
breakpoints for scripts that match the text input.

* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.get filterableData): Added.

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

5 years agoDFGAllocator should use bmalloc's aligned allocator.
akling@apple.com [Thu, 19 Mar 2015 21:19:32 +0000 (21:19 +0000)]
DFGAllocator should use bmalloc's aligned allocator.
<https://webkit.org/b/142871>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Switch DFGAllocator to using bmalloc through fastAlignedMalloc().

* dfg/DFGAllocator.h:
(JSC::DFG::Allocator<T>::allocateSlow):
(JSC::DFG::Allocator<T>::freeRegionsStartingAt):
* heap/CopiedSpace.h:
* heap/MarkedBlock.h:
* heap/MarkedSpace.h:

Source/WTF:

Remove PageAllocationAligned since it has no more clients.

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

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

5 years agoUnreviewed, fix linking error after r181753.
cdumez@apple.com [Thu, 19 Mar 2015 21:17:53 +0000 (21:17 +0000)]
Unreviewed, fix linking error after r181753.

Drop WEBCORE_EXPORT for Settings::minimumDOMTimerInterval() as it is
now inlined.

* page/Settings.h:
(WebCore::Settings::minimumDOMTimerInterval):

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

5 years agoCache::remove should take a Key instead of an entry
andersca@apple.com [Thu, 19 Mar 2015 21:16:47 +0000 (21:16 +0000)]
Cache::remove should take a Key instead of an entry
https://bugs.webkit.org/show_bug.cgi?id=142878

Reviewed by Antti Koivisto.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::remove):
* NetworkProcess/cache/NetworkCache.h:

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

5 years agoFix API tests after r181754.
achristensen@apple.com [Thu, 19 Mar 2015 20:50:18 +0000 (20:50 +0000)]
Fix API tests after r181754.

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::testRequest):

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

5 years agoPart of content extensions should apply css selectors
beidson@apple.com [Thu, 19 Mar 2015 19:36:22 +0000 (19:36 +0000)]
Part of content extensions should apply css selectors
https://bugs.webkit.org/show_bug.cgi?id=142604

Reviewed by Alex Christensen.

Source/WebCore:

Add a new action for applying the cached global stylesheet.

* contentextensions/CompiledContentExtension.cpp:
(WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):

* contentextensions/ContentExtensionActions.h:

* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::serializeActions):

* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::loadAction):

* contentextensions/ContentExtensionRule.cpp:
(WebCore::ContentExtensions::Action::deserialize):
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::Action::Action):
(WebCore::ContentExtensions::Action::operator==):
(WebCore::ContentExtensions::Action::stringArgument):
(WebCore::ContentExtensions::Action::cssSelector): Deleted.

* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(WebCore::ContentExtensions::operator<<):

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

5 years agoClean up DOMTimer related settings
cdumez@apple.com [Thu, 19 Mar 2015 19:22:22 +0000 (19:22 +0000)]
Clean up DOMTimer related settings
https://bugs.webkit.org/show_bug.cgi?id=142837

Reviewed by Darin Adler.

Source/WebCore:

Clean up DOMTimer related settings:
- Make default minimum timer interval 4ms instead of 10ms as all ports
  were setting it to 4ms and the specifications says 4ms.
- Get rid of setters for default DOMTimer interval values as they are
  not set anymore.
- Move default DOMTimer interval values from Settings to DOMTimer as
  those are global (not per-page) and not really settings.
- Stop using abbreviations in the names (e.g. min -> minimum).
- Move DOMTimer settings members from Page to Settings. There is no
  reason for those to be stored on the Page. The getters were private
  so call-sites had to go via Settings anyway. Also, call-sites already
  had to do a null check on the page to get the settings. It seems
  unfortunate for the settings to do another null-check on the page for
  retrieving the setting value from the page.
- Inline the DOMTimer settings getters as these are trivial.

* dom/Document.cpp:
(WebCore::Document::minimumTimerInterval):
(WebCore::Document::timerAlignmentInterval):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::minimumTimerInterval):
(WebCore::ScriptExecutionContext::timerAlignmentInterval):
* page/DOMTimer.h:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setTimerThrottlingEnabled):
(WebCore::Page::setMinimumTimerInterval): Deleted.
(WebCore::Page::minimumTimerInterval): Deleted.
* page/Page.h:
(WebCore::Page::timerAlignmentInterval): Deleted.
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::setMinimumDOMTimerInterval):
(WebCore::Settings::setDOMTimerAlignmentInterval):
(WebCore::Settings::setHiddenPageDOMTimerAlignmentInterval): Deleted.
(WebCore::Settings::hiddenPageDOMTimerAlignmentInterval): Deleted.
(WebCore::Settings::setDefaultMinDOMTimerInterval): Deleted.
(WebCore::Settings::defaultMinDOMTimerInterval): Deleted.
(WebCore::Settings::setMinDOMTimerInterval): Deleted.
(WebCore::Settings::minDOMTimerInterval): Deleted.
(WebCore::Settings::setDefaultDOMTimerAlignmentInterval): Deleted.
(WebCore::Settings::defaultDOMTimerAlignmentInterval): Deleted.
(WebCore::Settings::domTimerAlignmentInterval): Deleted.
* page/Settings.h:
(WebCore::Settings::minimumDOMTimerInterval):
(WebCore::Settings::domTimerAlignmentInterval):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setMinimumTimerInterval):

Source/WebKit/mac:

Stop setting the DOMTimers' default minimum interval to 4ms as this
is now the default.

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WebKit/win:

Stop setting the DOMTimers' default minimum interval to 4ms as this
is now the default.

* WebView.cpp:
(WebView::initWithFrame):
(WebView::defaultMinimumTimerInterval):

Source/WebKit2:

Stop setting the DOMTimers' default minimum interval to 4ms as this
is now the default.

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

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

5 years agohttp://webkit.org/b/142790
dino@apple.com [Thu, 19 Mar 2015 17:14:59 +0000 (17:14 +0000)]
http://webkit.org/b/142790

Temporarily skip animations/trigger-container-scroll-simple.html
while it is crashing.

* platform/mac/TestExpectations:

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

5 years ago[Win] Activate tests on EWS
bfulgham@apple.com [Thu, 19 Mar 2015 16:42:56 +0000 (16:42 +0000)]
[Win] Activate tests on EWS
https://bugs.webkit.org/show_bug.cgi?id=142850

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/common/config/ews.json: Add me as
the EWS bot watcher, and activate tests.

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

5 years ago[Win] Test gardening.
bfulgham@apple.com [Thu, 19 Mar 2015 16:40:36 +0000 (16:40 +0000)]
[Win] Test gardening.

* platform/win/TestExpectations:

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

5 years ago[GTK] Skip Legacy WebNotifications test
commit-queue@webkit.org [Thu, 19 Mar 2015 13:25:25 +0000 (13:25 +0000)]
[GTK] Skip Legacy WebNotifications test
https://bugs.webkit.org/show_bug.cgi?id=141962

The revision r177073 skips all legacy tests for notifications except from
http/tests/notifications/legacy/notification-request-permission-then-navigate.html
which was failing. We skip this test now too.

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2015-03-19
Reviewed by Carlos Garcia Campos.

* platform/gtk/TestExpectations:

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

5 years ago[GTK] Scrollbars look bad with GTK+ 3.16
carlosgc@webkit.org [Thu, 19 Mar 2015 10:24:50 +0000 (10:24 +0000)]
[GTK] Scrollbars look bad with GTK+ 3.16
https://bugs.webkit.org/show_bug.cgi?id=140800

Reviewed by Sergio Villar Senin.

Take margin into account when rendering scrollbars. This fixes the
huge scrollbars rendered with GTK+ 3.16. We don't need to check
the GTK+ version because in previous versions the marging were 0,
so the same code just works.

* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::adjustRectAccordingToMargin):
(WebCore::ScrollbarThemeGtk::paintTrackBackground):
(WebCore::ScrollbarThemeGtk::paintThumb):

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

5 years ago[Streams API] Update ReadableStream API according new version of the specification
youenn.fablet@crf.canon.fr [Thu, 19 Mar 2015 08:27:27 +0000 (08:27 +0000)]
[Streams API] Update ReadableStream API according new version of the specification
https://bugs.webkit.org/show_bug.cgi?id=142822

Reviewed by Benjamin Poulain.

Source/WebCore:

This patch updates the IDL of ReadableStream according the new version of the spec, which splits functionality between ReadableStream and ReadableStreamReader.
In particular, this patch removes read(), ready, closed and state from ReadableStream and it adds the getReader method.

Covered by updated readablestream-constructor.html test.

* Modules/streams/ReadableStream.cpp:
(WebCore::ReadableStream::ReadableStream):
(WebCore::ReadableStream::state): Deleted.
(WebCore::ReadableStream::closed): Deleted.
(WebCore::ReadableStream::ready): Deleted.
* Modules/streams/ReadableStream.h:
(WebCore::ReadableStream::internalState): Added to make mac build system happy, to be used by ReadableStreamReader.
* Modules/streams/ReadableStream.idl:
* bindings/js/JSReadableStreamCustom.cpp:
(WebCore::JSReadableStream::cancel):
(WebCore::JSReadableStream::getReader):
(WebCore::JSReadableStream::read): Deleted.
(WebCore::getOrCreatePromiseDeferredFromObject): Deleted.
(WebCore::readyPromiseSlotName): Deleted.
(WebCore::JSReadableStream::ready): Deleted.
(WebCore::closedPromiseSlotName): Deleted.
(WebCore::JSReadableStream::closed): Deleted.

LayoutTests:

Removing tests checking ready and closed.
Removing assertions checking read(), ready, closed and state.
Adding assertions to test getReader() and parameters of remaining methods.

* streams/readablestream-constructor-expected.txt:
* streams/readablestream-constructor.html:

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

5 years ago[GTK] Fix inspector userinterface related incremental build issue
ossy@webkit.org [Thu, 19 Mar 2015 08:19:20 +0000 (08:19 +0000)]
[GTK] Fix inspector userinterface related incremental build issue
https://bugs.webkit.org/show_bug.cgi?id=142849

Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/OptionsGTK.cmake: Revert r181733.

Tools:

* Scripts/webkitdirs.pm:
(shouldRemoveCMakeCache):

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

5 years agoThe network cache should ignore "cache-control: no-cache, must-revalidate" on history...
cdumez@apple.com [Thu, 19 Mar 2015 07:54:06 +0000 (07:54 +0000)]
The network cache should ignore "cache-control: no-cache, must-revalidate" on history navigation
https://bugs.webkit.org/show_bug.cgi?id=142831
<rdar://problem/20209957>

Reviewed by Antti Koivisto.

Source/WebKit2:

The network cache should ignore "no-cache" and "must-revalidate" as
Cache-Control policy for history navigations to avoid unnecessary
revalidation in this case. Our memory cache already behaves this way.

On history navigation, our disk cache implementation currently
revalidates unconditionally resources if "cache-control: no-cache" is
used. It also revalidates expired resources if "cache-control:
must-revalidate" is used. This is sub-optimal.

RFC 7234 does not require us to do so [1]:
"""
  User agents often have history mechanisms, such as "Back" buttons and
  history lists, that can be used to redisplay a representation
  retrieved earlier in a session.

  The freshness model (Section 4.2) does not necessarily apply to
  history mechanisms.  That is, a history mechanism can display a
  previous representation even if it has expired.
"""

Chrome and IE9+ [2] already ignore "cache-control: must-revalidate" on history navigation.

[1] https://tools.ietf.org/html/rfc7234#page-32
[2] http://blogs.msdn.com/b/ie/archive/2010/07/14/caching-improvements-in-internet-explorer-9.aspx

Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::decodeStorageEntry):

LayoutTests:

Rebaseline disk-cache-validation-back-navigation-policy.html test now
that we ignore "cache-control: no-cache, must-revalidate" on history
navigation. This is a progression.

* http/tests/cache/disk-cache-validation-back-navigation-policy-expected.txt:

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

5 years agoUnreviewed, kick the GTK bots to regenerate makefile.
ossy@webkit.org [Thu, 19 Mar 2015 06:30:11 +0000 (06:30 +0000)]
Unreviewed, kick the GTK bots to regenerate makefile.

* Source/cmake/OptionsGTK.cmake:

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

5 years ago[Win] Windows gardening for debug bots.
bfulgham@apple.com [Thu, 19 Mar 2015 06:22:29 +0000 (06:22 +0000)]
[Win] Windows gardening for debug bots.

* platform/win/TestExpectations:

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

5 years agoUnreviewed. GTK build fix after r181720.
rego@igalia.com [Thu, 19 Mar 2015 06:09:04 +0000 (06:09 +0000)]
Unreviewed. GTK build fix after r181720.

* rendering/RenderImage.cpp:
(WebCore::RenderImage::styleDidChange):

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

5 years agoTest disk cache behavior when using back navigation cache policy
antti@apple.com [Thu, 19 Mar 2015 05:21:40 +0000 (05:21 +0000)]
Test disk cache behavior when using back navigation cache policy
https://bugs.webkit.org/show_bug.cgi?id=142848

Reviewed by Chris Dumez.

Source/WebCore:

Add a way to override the normal cache policy so we can test reload behavior of cache without actually reloading.

Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::addExtraFieldsToRequest):
* loader/FrameLoader.h:
(WebCore::FrameLoader::setOverrideCachePolicyForTesting):
* testing/Internals.cpp:
(WebCore::Internals::setOverrideCachePolicy):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* http/tests/cache/disk-cache-validation-back-navigation-policy-expected.txt: Added.
* http/tests/cache/disk-cache-validation-back-navigation-policy.html: Added.

    Test permutations of cache headers on reload including Cache-control: must-revalidate.

* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:

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

5 years agoTextFragment#start() is always >= 0 since its type is unsigned
utatane.tea@gmail.com [Thu, 19 Mar 2015 05:16:41 +0000 (05:16 +0000)]
TextFragment#start() is always >= 0 since its type is unsigned
https://bugs.webkit.org/show_bug.cgi?id=142860

Reviewed by Andreas Kling.

Since TextFragment::m_start is unsigned, the result of
TextFragment::start() is always >= 0 and assertion is not effective.
This patch removes this assertion to suppress warnings.

* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):

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

5 years ago[ContentExtensions] Prepare for compiling stylesheets of selectors to be used on...
commit-queue@webkit.org [Thu, 19 Mar 2015 04:57:20 +0000 (04:57 +0000)]
[ContentExtensions] Prepare for compiling stylesheets of selectors to be used on every page.
https://bugs.webkit.org/show_bug.cgi?id=142799

Patch by Alex Christensen <achristensen@webkit.org> on 2015-03-18
Reviewed by Brady Eidson.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
Make private headers to use with API tests.
* contentextensions/CompiledContentExtension.cpp:
(WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
* contentextensions/CompiledContentExtension.h:
Added method to get only the selectors from the root of the DFA, which apply to all URLs.
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
Added checking if the trigger will match everything.
These actions can be put directly on the root of the DFA without adding extra epsilon transitions to the NFA.
* contentextensions/DFA.h:
(WebCore::ContentExtensions::DFA::nodeAt):
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
* contentextensions/DFABytecodeInterpreter.h:
* contentextensions/NFA.h:
* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::Term::quantifier):
Sink terms to a vector then add nodes to NFA when finalizing after checking for regexes that match everything.
(WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
(WebCore::ContentExtensions::GraphBuilder::finalize):
(WebCore::ContentExtensions::GraphBuilder::parseStatus):
(WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
(WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
(WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
(WebCore::ContentExtensions::GraphBuilder::atomBackReference):
(WebCore::ContentExtensions::GraphBuilder::assertionBOL):
(WebCore::ContentExtensions::GraphBuilder::assertionWordBoundary):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
(WebCore::ContentExtensions::GraphBuilder::atomParentheticalAssertionBegin):
(WebCore::ContentExtensions::GraphBuilder::disjunction):
(WebCore::ContentExtensions::GraphBuilder::hasError):
(WebCore::ContentExtensions::GraphBuilder::fail):
(WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
(WebCore::ContentExtensions::URLFilterParser::addPattern):
(WebCore::ContentExtensions::URLFilterParser::statusString):
(WebCore::ContentExtensions::GraphBuilder::errorMessage): Deleted.
* contentextensions/URLFilterParser.h:
Use an enum instead of strings for the status to avoid checking strings when we have a regex that matches everything.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::testPattern):
(TestWebKitAPI::TEST_F):
Start testing regex failures.

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

5 years agoFix build failure due to FALLTHROUGH in unreachable code
utatane.tea@gmail.com [Thu, 19 Mar 2015 04:05:51 +0000 (04:05 +0000)]
Fix build failure due to FALLTHROUGH in unreachable code
https://bugs.webkit.org/show_bug.cgi?id=142703

Reviewed by Benjamin Poulain.

FALLTHROUGH should not exist in unreachable code marked by
ASSERT_NOT_REACHABLE.

When !ENABLE(CSS_SELECTOR_JIT) and Debug mode is enabled,
both ASSERT_NOT_REACHED and FALLTHROUGH are instantiated
and it cause build failure.

Here, since CompiledSingle/CompiledSingleWithRootFilter are
not set when !ENABLE(CSS_SELECTOR_JIT). So dropping FALLTHROUGH
and leave ASSERT_NOT_REACHED.
And since ASSERT_NOT_ReACHED is stripped when Release build,
I've inserted FALLTHROUGH() if ASSERT_DISABLED.
This fix is the same to r162906.

* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):

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

5 years agoES6 Classes: Extends should accept an expression without parenthesis
joepeck@webkit.org [Thu, 19 Mar 2015 03:27:00 +0000 (03:27 +0000)]
ES6 Classes: Extends should accept an expression without parenthesis
https://bugs.webkit.org/show_bug.cgi?id=142840

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseClass):
"extends" allows a LeftHandExpression (new expression / call expression,
which includes a member expression), not a primary expression. Our
parseMemberExpression does all of these.

LayoutTests:

* js/class-syntax-extends-expected.txt:
* js/script-tests/class-syntax-extends.js:
Extend the test to test cases of extends with different types of expressions.

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

5 years agoWeb Inspector: Replace last use of ObjectPropertiesSection with ObjectTreeView
joepeck@webkit.org [Thu, 19 Mar 2015 03:26:58 +0000 (03:26 +0000)]
Web Inspector: Replace last use of ObjectPropertiesSection with ObjectTreeView
https://bugs.webkit.org/show_bug.cgi?id=142834

Reviewed by Timothy Hatcher.

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties):
Use properties only ObjectTreeView instead of ObjectPropertiesSection.
This doesn't fix the functionality issues, but fixes the appearance.

* UserInterface/Views/DetailsSection.css:
(.details-section > .content > .group:first-child > .row.simple:first-child > *): Deleted.
(body.mac-platform.legacy .details-section > .content > .group:first-child > .row.simple:first-child > *): Deleted.
(.details-section > .content > .group > .row.properties:not(.empty)): Deleted.
(body.mac-platform.legacy .details-section > .content > .group > .row.properties:not(.empty)): Deleted.
Re-add back the small padding at the top of sections. This actually
broke padding in a few sections (Event Listeners) at the expense
of eliminating a few pixels of whitespace at the top of other sections.
We should focus on addressing the extra whitespace separately.

* UserInterface/Main.html:
* UserInterface/Views/ObjectPropertiesSection.js: Removed.
* UserInterface/Views/TypePropertiesSection.js:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
Remove new unused class.

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

5 years agoWeb Inspector: Debugger Popovers and Probes should use FormattedValue/ObjectTreeView...
joepeck@webkit.org [Thu, 19 Mar 2015 03:26:55 +0000 (03:26 +0000)]
Web Inspector: Debugger Popovers and Probes should use FormattedValue/ObjectTreeView instead of Custom/ObjectPropertiesSection
https://bugs.webkit.org/show_bug.cgi?id=142830

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::breakpointActionProbe):
Give Probe Samples object previews.

Source/WebInspectorUI:

* UserInterface/Views/ProbeSetDataGrid.css:
(.details-section.probe-set .data-grid .object-tree > :matches(.title, .object-preview)::before):
Another line-height fix for object tree disclosure triangles.

* UserInterface/Views/ProbeSetDataGridNode.js:
(WebInspector.ProbeSetDataGridNode.prototype.createCellContent):
Create an ObjectTree / FormattedValue for the RemoteObject.

* UserInterface/Views/SourceCodeTextEditor.css:
(.popover .debugger-popover-content > .title):
(.popover .debugger-popover-content > .body):
(.popover .debugger-popover-content.function > .body):
Be more specific and don't accidentally style ".title" within the body.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
Show a properties only ObjectTree instead of an ObjectPropertiesSection.

(WebInspector.SourceCodeTextEditor.prototype._showPopoverForString): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForRegExp): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNumber): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForBoolean): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNull): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForUndefined): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverWithFormattedValue):
Reduce most of these to a single popover for formatted values.

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

5 years agoDon't paint PDFs on every scroll
simon.fraser@apple.com [Thu, 19 Mar 2015 02:16:12 +0000 (02:16 +0000)]
Don't paint PDFs on every scroll
https://bugs.webkit.org/show_bug.cgi?id=142857
rdar://problem/20130207

Reviewed by Tim Horton.

Don't push a scale factor onto the PDF layer controller if it hasn't
changed, since doing so causes a repaint.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):

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

5 years agoSwitching between two SVG images with no intrinsic sizes causes them to get the defau...
commit-queue@webkit.org [Thu, 19 Mar 2015 02:15:00 +0000 (02:15 +0000)]
Switching between two SVG images with no intrinsic sizes causes them to get the default SVG size instead of the container size.
https://bugs.webkit.org/show_bug.cgi?id=142805.

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

The bug happens due to wrong logic in RenderImage::imageDimensionsChanged().
This function decides to setNeedsLayout() if the intrinsic size of the image
changes. If the size does not change, it only repaints the image rectangle.
When switching the src of the an image between two SVG images and both of
them have no intrinsic size, we do not updateInnerContentRect() and this
means an SVGImageForContainer is not going to be created for this image.
When the image is drawn, it is drawn directly from the SVGImage. And this
means the drawing has to be scaled by container_size / SVG_default_intrinsic_size

After figuring out that I need to updateInnerContentRect() to fix this bug,
I found out Blink has already changed this code to do the same thing. But
they also did more clean-up in this function. Here is the link
https://codereview.chromium.org/114323004. I think their change seems correct
although they did not say what exactly they were trying to fix.

The plan for repaintOrMarkForLayout(), which is the new name of this function,
is the following:
    -- setNeedLayout() if the intrinsic size changes and it affects the size
       of the image.
    -- updateInnerContentRect() if the intrinsic size did not change but the
       image has exiting layout.
    -- repaint the image rectangle if layout is not needed.

This change also removes the call to computeLogicalWidthInRegion(), which is
almost running a layout for the image. This call figures out whether the image
needs to setNeedsLayout(). This call is unnecessary; the image needs to run a
layout if the intrinsic size has changed and it affects the size of the image.

Test: svg/as-image/svg-no-intrinsic-size-switching.html

* rendering/RenderImage.cpp:
(WebCore::RenderImage::styleDidChange): Change the function call.
(WebCore::RenderImage::imageChanged): Rename local variable and change the
function call.

(WebCore::RenderImage::updateIntrinsicSizeIfNeeded): Simplify this function.
Call setIntrinsicSize() with the new size unless the image is in error state.

(WebCore::RenderImage::repaintOrMarkForLayout): This a better name for this
function since it is called even if the intrinsic size was not changed.
(WebCore::RenderImage::imageDimensionsChanged): Deleted.

* rendering/RenderImage.h: Rename imageDimensionsChanged() and change the
updateIntrinsicSizeIfNeeded() to return void.

* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::paint): Code cleanup. This function can
only handle the paint phases PaintPhaseForeground and PaintPhaseSelection.
Use this information to simplify the logic and order of painting there.

LayoutTests:

* svg/as-image/svg-no-intrinsic-size-switching-expected.html: Added.
* svg/as-image/svg-no-intrinsic-size-switching.html: Added.
Ensure that switching the source of an <img> element between two SVG images,
which have no intrinsic sizes, gets the image the size of the container and
not the default SVG intrinsic size which is 300x150 pixels.

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

5 years agoSource/WTF:
diorahman@rockybars.com [Thu, 19 Mar 2015 01:10:24 +0000 (01:10 +0000)]
Source/WTF:
Fix StringView misplaced implementations after r181525 and r181558
https://bugs.webkit.org/show_bug.cgi?id=142772

Reviewed by Darin Adler.

Fix misplaced implementations in StringView::startsWithIgnoringASCIICase and
StringView::endsWith.

Add some tests in [1] to cover the StringView::startsWith,
StringView::startsWithIgnoringASCIICase, StringView::endsWith and
StringView::endsWithIgnoringASCIICase implementations.

[1] Tools/TestWebKitAPI/Tests/WTF/StringView.cpp.

* wtf/text/StringView.cpp:
(WTF::StringView::startsWithIgnoringASCIICase):
(WTF::StringView::endsWith):
(WTF::StringView::endsWithIgnoringASCIICase):

Tools:
Fix StringView typos after r181525 and r181558
https://bugs.webkit.org/show_bug.cgi?id=142772

Reviewed by Darin Adler.

Add some tests in [1] to cover the StringView::startsWith,
StringView::startsWithIgnoringASCIICase, StringView::endsWith and
StringView::endsWithIgnoringASCIICase implementations.

* TestWebKitAPI/Tests/WTF/StringView.cpp:
(TestWebKitAPI::TEST):

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

5 years agoRemove extraneous import to fix the build.
dburkart@apple.com [Thu, 19 Mar 2015 00:14:08 +0000 (00:14 +0000)]
Remove extraneous import to fix the build.

Unreviewed.

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

5 years agoASAN_OPTIONS=allocator_may_return_null=1 needs to be set
dburkart@apple.com [Thu, 19 Mar 2015 00:01:42 +0000 (00:01 +0000)]
ASAN_OPTIONS=allocator_may_return_null=1 needs to be set
https://bugs.webkit.org/show_bug.cgi?id=142547

Reviewed by Alexey Proskuryakov.

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

5 years agoFix typo in playerViewControllerWillCancelOptimizedFullscree.
jeremyj-wk@apple.com [Wed, 18 Mar 2015 23:35:06 +0000 (23:35 +0000)]
Fix typo in playerViewControllerWillCancelOptimizedFullscree.
https://bugs.webkit.org/show_bug.cgi?id=142745

Reviewed by Darin Adler.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscreen:]):
(-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]): Deleted.

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

5 years agowebaudio/convolution-mono-mono.html fails on some machines
ap@apple.com [Wed, 18 Mar 2015 23:29:34 +0000 (23:29 +0000)]
webaudio/convolution-mono-mono.html fails on some machines
rdar://problem/19996807

Rubber-stampted by Jer Noble.

* webaudio/resources/convolution-testing.js: (checkTriangularPulse): Slightly increase
the tolerance. It's still extremely low.

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

5 years agoUse && instead of & when deciding if the network cache should be cleared
andersca@apple.com [Wed, 18 Mar 2015 22:39:46 +0000 (22:39 +0000)]
Use && instead of & when deciding if the network cache should be cleared
https://bugs.webkit.org/show_bug.cgi?id=142845

Reviewed by Antti Koivisto.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):

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

5 years agoAvoid repaints when changing transform on an element with multiple background images
simon.fraser@apple.com [Wed, 18 Mar 2015 22:17:34 +0000 (22:17 +0000)]
Avoid repaints when changing transform on an element with multiple background images
https://bugs.webkit.org/show_bug.cgi?id=142841

Reviewed by Zalan Bujtas.

Source/WebCore:

Replace the cheap test for changed images in RenderElement::updateFillImages()
with an exhaustive test that walks the entire list of background images,
since any ensuing repaint is way more expensive than a slightly more expensive check here.

Test: fast/repaint/multiple-backgrounds-style-change.html

* rendering/RenderElement.cpp:
(WebCore::RenderElement::updateFillImages):
* rendering/style/FillLayer.cpp:
(WebCore::layerImagesIdentical): See if both images are the same (either none
or both mask images, and same image pointer).
(WebCore::FillLayer::imagesIdentical): Walk the two FillLayer lists, checking the images
on each one. Returns false if we reach the end of one list before the other, or the images
are different.
* rendering/style/FillLayer.h: New static function; static because
it compares two FillLayer lists, and I think that makes more sense than
a member function.

LayoutTests:

Test that changes transform on a composited element with 2 background images,
and tests for no repaints.

* fast/repaint/multiple-backgrounds-style-change-expected.txt: Added.
* fast/repaint/multiple-backgrounds-style-change.html: Added.

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

5 years agoPass cookies by reference in CookieHash functions
andersca@apple.com [Wed, 18 Mar 2015 21:06:15 +0000 (21:06 +0000)]
Pass cookies by reference in CookieHash functions
https://bugs.webkit.org/show_bug.cgi?id=142839

Reviewed by Sam Weinig.

* platform/Cookie.h:
(WebCore::CookieHash::hash):
(WebCore::CookieHash::equal):

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

5 years agoTweak how AppleSystemFontOSSubversion default is added
ap@apple.com [Wed, 18 Mar 2015 20:42:11 +0000 (20:42 +0000)]
Tweak how AppleSystemFontOSSubversion default is added
https://bugs.webkit.org/show_bug.cgi?id=142835

Reviewed by Dan Bernstein.

* DumpRenderTree/mac/DumpRenderTree.mm:
(setDefaultsToConsistentValuesForTesting):

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

5 years agoAdd WKContextGetWebsiteDataStore API
andersca@apple.com [Wed, 18 Mar 2015 19:54:40 +0000 (19:54 +0000)]
Add WKContextGetWebsiteDataStore API
https://bugs.webkit.org/show_bug.cgi?id=142832
rdar://problem/16544715

Reviewed by Sam Weinig.

Also add WKWebsiteDataStoreRef which is toll-free bridged to _WKWebsiteDataStore.

* Shared/API/c/WKBase.h:
Add new declaration.

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::create):
* UIProcess/API/APIWebsiteDataStore.h:
Add a new function that takes a configuration.

* UIProcess/API/C/WKAPICast.h:
Add cast.

* UIProcess/API/C/WKContext.cpp:
(WKContextGetWebsiteDataStore):
Return the context's website data store.

* UIProcess/API/C/WKContext.h:
Add new declaration.

* UIProcess/API/C/WKWebsiteDataStoreRef.cpp: Added.
* UIProcess/API/C/WKWebsiteDataStoreRef.h: Added.
Add new files.

* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
(WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
(WebKit::WebKeyValueStorageManager::deleteAllEntries):
Update now that WebProcessPool holds on to an API::WebsiteDataStore.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:
WebProcessPool should hold on to an API::WebsiteDataStore instead of a WebKit::WebsiteDataStore.

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

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

5 years agoTemporarily fix the !ENABLE(CSS_SELECTOR_JIT) and assertions-enabled build
timothy_horton@apple.com [Wed, 18 Mar 2015 19:07:30 +0000 (19:07 +0000)]
Temporarily fix the !ENABLE(CSS_SELECTOR_JIT) and assertions-enabled build

* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):

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

5 years agoCannot invoke action menus anymore
timothy_horton@apple.com [Wed, 18 Mar 2015 18:40:48 +0000 (18:40 +0000)]
Cannot invoke action menus anymore
https://bugs.webkit.org/show_bug.cgi?id=142797
<rdar://problem/20032670>

* UIProcess/API/mac/WKView.mm:
Need one more respondsToSelector check.

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

5 years agoWeb Inspector: Scopes sidebar should use new ObjectTreeView and not ObjectPropertiesS...
joepeck@webkit.org [Wed, 18 Mar 2015 18:30:47 +0000 (18:30 +0000)]
Web Inspector: Scopes sidebar should use new ObjectTreeView and not ObjectPropertiesSection
https://bugs.webkit.org/show_bug.cgi?id=142808

Reviewed by Timothy Hatcher.

* UserInterface/Models/PropertyPath.js:
(WebInspector.PropertyPath):
(WebInspector.PropertyPath.emptyPropertyPathForScope):
Allow a special property empty path for "Scopes". This way for a
"<scopeObject>.property" we can show just the tooltip "property".

* UserInterface/Views/ObjectTreeView.css:
(.object-tree.properties-only > :matches(.title, .object-preview)):
(.object-tree.properties-only .object-tree-outline):
(.object-tree.properties-only .object-tree-property .property-name):
Tweak styles for only properties view, which won't have a top-level
preview and doesn't fade out enumerable properties.

* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.get treeOutline):
Access the TreeOutline.

(WebInspector.ObjectTreeView.prototype.showOnlyProperties):
Properties only view modifies the display slightly.

(WebInspector.ObjectTreeView.prototype.appendExtraPropertyDescriptor):
(WebInspector.ObjectTreeView.prototype._updateProperties):
Allow the client to add its own property descriptors to display
as a property in this ObjectTreeView.

* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh):
Switch to using an ObjectTreeView.

(WebInspector.ScopeChainDetailsSidebarPanel.prototype._propertyPathIdentifierForTreeElement):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeAddHandler):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeExpandHandler):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeCollapseHandler):
Keep track of what properties were expanded so we can auto-expand
them again when the sidebar refreshes.

* UserInterface/Main.html:
* UserInterface/Views/ScopeVariableTreeElement.js: Removed.
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
Remove the now unused ScopeVariableTreeElement.js.

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

5 years agoCall CTFontSetRenderingParameters before rendering text
mmaxfield@apple.com [Wed, 18 Mar 2015 18:12:39 +0000 (18:12 +0000)]
Call CTFontSetRenderingParameters before rendering text
https://bugs.webkit.org/show_bug.cgi?id=142816

Reviewed by Darin Adler.

No new tests.

* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::showGlyphsWithAdvances):
* platform/spi/cocoa/CoreTextSPI.h:

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

5 years ago[WK2] Log the number of network cache requests that we have never seen before
cdumez@apple.com [Wed, 18 Mar 2015 17:50:52 +0000 (17:50 +0000)]
[WK2] Log the number of network cache requests that we have never seen before
https://bugs.webkit.org/show_bug.cgi?id=142828
<rdar://problem/19632130>

Reviewed by Antti Koivisto.

Source/WebCore:

Add diagnostic logging key for network cache efficacy logging.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey):
(WebCore::DiagnosticLoggingKeys::requestKey):
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Log the number of network cache requests that we have never seen before
using diagnostic logging.

* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCache::Statistics::recordRetrievalFailure):

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

5 years agoUnreviewed GTK Gardening 18th March
commit-queue@webkit.org [Wed, 18 Mar 2015 17:40:56 +0000 (17:40 +0000)]
Unreviewed GTK Gardening 18th March
https://bugs.webkit.org/show_bug.cgi?id=142824

Unreviewed.

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

* platform/gtk/TestExpectations:

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

5 years agoPrune least valuable cache entries first
antti@apple.com [Wed, 18 Mar 2015 17:40:34 +0000 (17:40 +0000)]
Prune least valuable cache entries first
https://bugs.webkit.org/show_bug.cgi?id=142810
rdar://problem/19632130

Reviewed by Darin Adler.

When pruning the cache estimate relative value of each entry using formula

age = current time - creation time
accessAge = last access time - creation time
value = accessAge / age

That is, we value entries that have been accessed recently and survived in the cache longest.

The most valuable entries don't get deleted at all while the deletion probablity ramps up for
lower value entries.

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

    Get the creation time and access time for a file.

(WebKit::NetworkCache::updateFileAccessTimeIfNeeded):

    Update access time manually if the file system doesn't do it automatically.

* NetworkProcess/cache/NetworkCacheIOChannel.h:
(WebKit::NetworkCache::IOChannel::path):
(WebKit::NetworkCache::IOChannel::type):
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::IOChannel):
(WebKit::NetworkCache::IOChannel::open):

    Remember the file path and move most of the work to constructor.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::remove):
(WebKit::NetworkCache::Storage::updateFileAccessTime):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::deletionProbability):

    Compute the probability based on entry age and access time.

(WebKit::NetworkCache::Storage::shrinkIfNeeded):
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::serialBackgroundIOQueue):
(WebKit::NetworkCache::Storage::deleteQueue): Deleted.

    More generic name.

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

5 years agoUse filterRootId in SelectorQuery even if CSS JIT is not enabled
utatane.tea@gmail.com [Wed, 18 Mar 2015 17:27:22 +0000 (17:27 +0000)]
Use filterRootId in SelectorQuery even if CSS JIT is not enabled
https://bugs.webkit.org/show_bug.cgi?id=142703

Reviewed by Benjamin Poulain.

Source/WebCore:

filterRootId pruning path is not inherently related to CSS JIT.
This patch enables filterRootId even in the environment
where CSS JIT is not enabled.

* dom/SelectorQuery.cpp:
(WebCore::filterRootById):
(WebCore::SelectorDataList::executeSingleSelectorData):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:

LayoutTests:

This is covered by the following layout-tests.
CompilableSingleWithRootFilter and CompilableSingle are covered by them.

- fast/selectors/filter-root-node-with-selector-contains-adjacents.html
- fast/selectors/querySelector-id-filtering.html
- fast/selectors/querySelector-scope-filtered-root.html

And add tests to cover the following cases.

- Failures on selectorForIdLookup()'s rootNode.inDocument().
- Failures on selectorForIdLookup()'s rootNode.document().inQuirksMode().

* fast/selectors/querySelector-with-id-for-detached-element-expected.txt: Added.
* fast/selectors/querySelector-with-id-for-detached-element.html: Added.
* fast/selectors/querySelector-with-id-in-quirks-mode-expected.txt: Added.
* fast/selectors/querySelector-with-id-in-quirks-mode.html: Added.

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

5 years agoSimple line layout: Use Vector<>::const_iterator instead of custom FlowContents:...
zalan@apple.com [Wed, 18 Mar 2015 16:51:37 +0000 (16:51 +0000)]
Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
https://bugs.webkit.org/show_bug.cgi?id=142809

Reviewed by Antti Koivisto.

FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.

No change in functionality.

* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::begin):
(WebCore::SimpleLineLayout::FlowContents::end):
(WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):

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

5 years agoSimple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
zalan@apple.com [Wed, 18 Mar 2015 16:47:47 +0000 (16:47 +0000)]
Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
https://bugs.webkit.org/show_bug.cgi?id=142785

Reviewed by Antti Koivisto.

This is in transition to support <br>. A particular position could point to multiple
segments when <br> is directly followed by text.

No change in functionality.

* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::segmentForRun):
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
(WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):

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

5 years agoprepare-ChangeLog doesn't understand C string literals split across multiple lines...
mitz@apple.com [Wed, 18 Mar 2015 16:27:07 +0000 (16:27 +0000)]
prepare-ChangeLog doesn't understand C string literals split across multiple lines with \
https://bugs.webkit.org/show_bug.cgi?id=142815

Reviewed by Darin Adler.

* Scripts/prepare-ChangeLog:
(get_function_line_ranges_for_cpp): If the line ends with a backslash instead of a matching
quotation mark, use new variable $quotation_mark to remember what we are looking for, and
keep consuming the quoted text until the matching quotation mark is reached. Emit the
warning only if a line ends without a backslash before the matching quotation mark was found.

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

5 years agoSkip trying to paint overlay scrollbars when there are none or they are clipped out
simon.fraser@apple.com [Wed, 18 Mar 2015 16:22:04 +0000 (16:22 +0000)]
Skip trying to paint overlay scrollbars when there are none or they are clipped out
https://bugs.webkit.org/show_bug.cgi?id=142811
rdar://problem/20200725

Reviewed by Darin Adler.

In some content with lots of layers and overflow:scroll, we could spend 20% of
the time under paintOverflowControlsForFragments() setting up an (empty) clip,
and then trying to draw scrollbars that we don't have.

Avoid calling paintOverflowControlsForFragments() if there are no scrollbars,
and don't both setting up an empty clip just to paint nothing.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintOverflowControlsForFragments):

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

5 years ago[WinCairo] Unreviewed build fix after r181665.
peavo@outlook.com [Wed, 18 Mar 2015 16:15:17 +0000 (16:15 +0000)]
[WinCairo] Unreviewed build fix after r181665.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::setSize):

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

5 years agoRemove unused "preprocessor" parameter to sub-CodeGenerators
commit-queue@webkit.org [Wed, 18 Mar 2015 15:56:07 +0000 (15:56 +0000)]
Remove unused "preprocessor" parameter to sub-CodeGenerators
https://bugs.webkit.org/show_bug.cgi?id=142793

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

Source/WebCore:

* bindings/scripts/CodeGenerator.pm:
(ProcessDocument):
(FileNamePrefix):
* bindings/scripts/CodeGeneratorObjC.pm:

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
(new):

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

5 years agoSimple line layout: Split fragments on renderer boundary on the fly.
zalan@apple.com [Wed, 18 Mar 2015 14:48:01 +0000 (14:48 +0000)]
Simple line layout: Split fragments on renderer boundary on the fly.
https://bugs.webkit.org/show_bug.cgi?id=142579

Reviewed by Antti Koivisto.

Fragment splitting at renderers' boundary at the end of the line is no longer needed.
This patch ensures that TextFragmentIterator::nextTextFragment() does not concatenate
fragments across renderer boundary.

Source/WebCore:

Test: fast/text/simple-line-with-multiple-renderers.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::revertRuns):
(WebCore::SimpleLineLayout::LineState::isEmpty):
(WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Check if fragments need a new run and
whether neighboring fragments need collapsing.
(WebCore::SimpleLineLayout::LineState::revertUncommitted): Revert fragments over multiple renderers if they form
a fragment continuation.
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::forceFragmentToLine): Ensure that if a fragment has continuation across multiple renderers,
they all get added to the current line.
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::LineState::appendFragment): Deleted.
(WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted.
(WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted.
(WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted.
(WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted.
(WebCore::SimpleLineLayout::begin): Deleted.
(WebCore::SimpleLineLayout::end): Deleted.
(WebCore::SimpleLineLayout::preWrap): Deleted.
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.
(WebCore::SimpleLineLayout::updateLineConstrains): Deleted.
(WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Deleted.
(WebCore::SimpleLineLayout::createTextRuns): Deleted.
(WebCore::SimpleLineLayout::create): Deleted.
(WebCore::SimpleLineLayout::Layout::create): Deleted.
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator+):
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator->):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow): Unrelated fix on non-collapsed tab position.
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
(WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
* rendering/SimpleLineLayoutTextFragmentIterator.h:
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::overlapsToNextRenderer):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsible):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
(WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.

LayoutTests:

* fast/text/simple-line-with-multiple-renderers-expected.html: Added.
* fast/text/simple-line-with-multiple-renderers.html: Added.

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

5 years agoFlex and grid items should be painted as inline-blocks
rego@igalia.com [Wed, 18 Mar 2015 13:47:52 +0000 (13:47 +0000)]
Flex and grid items should be painted as inline-blocks
https://bugs.webkit.org/show_bug.cgi?id=142266

Reviewed by Darin Adler.

Source/WebCore:

Based on Blink r157004 by <cbiesinger@chromium.org>.
https://src.chromium.org/viewvc/blink?revision=157004&view=revision

Both flexbox and grid specs define that the painting order of flex/grid
items is the same as inline blocks. See
http://dev.w3.org/csswg/css-flexbox/#painting and
http://dev.w3.org/csswg/css-grid/#z-order.

Extracted inline blocks painting code from InlineElementBox and moved to
a helper method that will be reused for flexboxes and grids.

Tests: css3/flexbox/flex-item-text-background-not-interleaved.html
       fast/css-grid-layout/grid-item-text-background-not-interleaved.html

* rendering/InlineElementBox.cpp:
(WebCore::InlineElementBox::paint): Move code to
RenderElement::paintAsInlineBlock().
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintChild): Add new argument to paint children
as inline blocks.
* rendering/RenderBlock.h: Define PaintType enmu and modify paintChild()
signature to add the new argument.
* rendering/RenderElement.cpp:
(WebCore::paintPhase): Paint element in a phase.
(WebCore::RenderElement::paintAsInlineBlock): Code extracted from
InlineElementBox::paint().
* rendering/RenderElement.h: Add new method signature.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::paintChildren): Call
RenderBlock::paintChild() with the new argument.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::paintChildren): Ditto.

LayoutTests:

* css3/flexbox/flex-item-text-background-not-interleaved-expected.html: Added.
* css3/flexbox/flex-item-text-background-not-interleaved.html: Added.
* fast/css-grid-layout/float-not-protruding-into-next-grid-item-expected.html:
Add some vertical space to avoid issues with backgrounds.
* fast/css-grid-layout/float-not-protruding-into-next-grid-item.html:
Ditto.
* fast/css-grid-layout/grid-item-text-background-not-interleaved-expected.html: Added.
* fast/css-grid-layout/grid-item-text-background-not-interleaved.html: Added.

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

5 years ago[EFL] Bump gstreamer version to 1.4.4
ossy@webkit.org [Wed, 18 Mar 2015 09:32:43 +0000 (09:32 +0000)]
[EFL] Bump gstreamer version to 1.4.4
https://bugs.webkit.org/show_bug.cgi?id=142782

Reviewed by Philippe Normand.

* efl/jhbuild.modules:
* efl/patches/gst-libav.patch:
* efl/patches/gst-plugins-bad-remove-gnustep-support.patch: Added.
* efl/patches/gst-prevent-neon-check-in-configure-from-passing-under-aarch64.patch: Removed.

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

5 years ago[WK2] Log total number of network cache queries using diagnostic logging
cdumez@apple.com [Wed, 18 Mar 2015 07:27:53 +0000 (07:27 +0000)]
[WK2] Log total number of network cache queries using diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=142803
<rdar://problem/19632130>

Reviewed by Antti Koivisto.

Source/WebCore:

Add diagnostic logging key needed for network efficacy logging.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::retrievalRequestKey):
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Log total number of network cache queries using diagnostic logging.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/cache/NetworkCacheStatistics.h:
* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::NetworkCache::Statistics::recordCacheRetrievalRequest):

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

5 years ago[WK2] We should not even try the network cache for non-HTTP protocol requests
cdumez@apple.com [Wed, 18 Mar 2015 07:26:27 +0000 (07:26 +0000)]
[WK2] We should not even try the network cache for non-HTTP protocol requests
https://bugs.webkit.org/show_bug.cgi?id=142802
<rdar://problem/19632130>

Reviewed by Antti Koivisto.

We should not even try the network cache for non-HTTP protocol requests
and the network cache cannot handle those.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::canRetrieve):
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):

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

5 years agoFix the build after r181660
timothy_horton@apple.com [Wed, 18 Mar 2015 07:19:16 +0000 (07:19 +0000)]
Fix the build after r181660

* page/EventHandler.cpp:
(WebCore::EventHandler::setImmediateActionStage):
* page/EventHandler.h:
(WebCore::EventHandler::setImmediateActionStage):
Un-inline setImmediateActionStage, because it is exported to WebCore, and
exporting inline thing causes random weak symbol errors on some platforms.

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

5 years agoIgnore some deprecation warnings
conrad_shultz@apple.com [Wed, 18 Mar 2015 07:05:48 +0000 (07:05 +0000)]
Ignore some deprecation warnings
https://bugs.webkit.org/show_bug.cgi?id=142813

Reviewed by Mark Rowe.

Fixing the deprecations is tracked by: <rdar://problem/20201450>

Source/WebCore:

* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_processElement):

Source/WebKit/mac:

* WebCoreSupport/PopupMenuMac.mm:
(PopupMenuMac::populate):

Source/WebKit2:

* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::populate):

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

5 years agoUnreviewed, rolling out r181667, r181682, and r181683.
commit-queue@webkit.org [Wed, 18 Mar 2015 06:09:56 +0000 (06:09 +0000)]
Unreviewed, rolling out r181667, r181682, and r181683.
https://bugs.webkit.org/show_bug.cgi?id=142812

Broke multiple tests with ASan, plus dependent commits
(Requested by ap on #webkit).

Reverted changesets:

"Simple line layout: Split fragments on renderer boundary on
the fly."
https://bugs.webkit.org/show_bug.cgi?id=142579
http://trac.webkit.org/changeset/181667

"Simple line layout: Change FlowContents::segmentForPosition()
to segmentForRun()."
https://bugs.webkit.org/show_bug.cgi?id=142785
http://trac.webkit.org/changeset/181682

"Simple line layout: Use Vector<>::const_iterator instead of
custom FlowContents::Iterator."
https://bugs.webkit.org/show_bug.cgi?id=142809
http://trac.webkit.org/changeset/181683

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

5 years agofast/images/animated-png.html is crashing / failing on Yosemite
ap@apple.com [Wed, 18 Mar 2015 05:38:20 +0000 (05:38 +0000)]
fast/images/animated-png.html is crashing / failing on Yosemite
https://bugs.webkit.org/show_bug.cgi?id=142726

Further tweaked test expectations.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

5 years agoSimple line layout: Use Vector<>::const_iterator instead of custom FlowContents:...
zalan@apple.com [Wed, 18 Mar 2015 04:00:40 +0000 (04:00 +0000)]
Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
https://bugs.webkit.org/show_bug.cgi?id=142809

Reviewed by Antti Koivisto.

FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.

No change in functionality.

* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::begin):
(WebCore::SimpleLineLayout::FlowContents::end):
(WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):

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

5 years agoSimple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
zalan@apple.com [Wed, 18 Mar 2015 03:40:51 +0000 (03:40 +0000)]
Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
https://bugs.webkit.org/show_bug.cgi?id=142785

Reviewed by Antti Koivisto.

This is in transition to support <br>. A particular position could point to multiple
segments when <br> is directly followed by text.

No change in functionality.

* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::segmentForRun):
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
(WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):

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

5 years ago[EFL] Expose JavaScript binding interface through ewk_extension
ryuan.choi@navercorp.com [Wed, 18 Mar 2015 02:42:30 +0000 (02:42 +0000)]
[EFL] Expose JavaScript binding interface through ewk_extension
https://bugs.webkit.org/show_bug.cgi?id=142033

Reviewed by Gyuyoung Kim.

.:

* Source/cmake/OptionsEfl.cmake: Added HEADER_INSTALL_DIR variable.

Source/JavaScriptCore:

* PlatformEfl.cmake: Install Javascript APIs.

Source/WebKit2:

* PlatformEfl.cmake:
* UIProcess/API/efl/tests/extensions/extension_sample.cpp: Registered test object for new test case.
* UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Added simple binding API test case.
(EWK2ContextTestWithExtension::messageReceivedCallback):
(EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
(TEST_F):
* WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h:
* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
(EwkExtension::didCreatePage):
(EwkExtension::willDestroyPage):
* WebProcess/InjectedBundle/API/efl/ewk_extension.h:
* WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
* WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Added.
(toEwkPage):
(EwkPage::EwkPage):
(EwkPage::append):
(EwkPage::remove):
(EwkPage::didFinishDocumentLoadForFrame):
(ewk_page_js_global_context_get):
(ewk_page_client_register):
(ewk_page_client_unregister):
* WebProcess/InjectedBundle/API/efl/ewk_page.h: Added.
* WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Added.
(EwkPage::page):
* efl/ewebkit2-extension.pc.in:

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

5 years ago[Win] Unreviewed gardening.
bfulgham@apple.com [Wed, 18 Mar 2015 01:50:05 +0000 (01:50 +0000)]
[Win] Unreviewed gardening.

Tracked down the tests that were leaving the page cache in a bad state.
By skipping those tests, we can run all the others. These bugs are being
investigated in Bug 140871.

* platform/win/TestExpectations:

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

5 years agoCannot invoke action menus anymore
timothy_horton@apple.com [Wed, 18 Mar 2015 01:34:25 +0000 (01:34 +0000)]
Cannot invoke action menus anymore
https://bugs.webkit.org/show_bug.cgi?id=142797
<rdar://problem/20032670>

* UIProcess/API/mac/WKView.mm:
Need a respondsToSelector check.

* WebView/WebHTMLView.mm:
(-[WebHTMLView otherMouseDown:]):
Need a respondsToSelector check.

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

5 years agoFix the iOS build.
timothy_horton@apple.com [Wed, 18 Mar 2015 01:21:41 +0000 (01:21 +0000)]
Fix the iOS build.

* WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
(WTR::InjectedBundle::platformInitialize):

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

5 years agoWeb Inspector: Debugger Sidebar Icons Misaligned
commit-queue@webkit.org [Wed, 18 Mar 2015 01:13:14 +0000 (01:13 +0000)]
Web Inspector: Debugger Sidebar Icons Misaligned
https://bugs.webkit.org/show_bug.cgi?id=142654

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

The debugger sidebar content was accidentally 1px too small. The
TreeOutline being inside of a .detail-section was getting a smaller
font-size. We should just have the normal font-size for the
debugger navigation sidebar. This matches the Resources sidebar
in the TreeOutline, and icons line up better.

* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .details-section):

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

5 years agoFix the iOS build
timothy_horton@apple.com [Wed, 18 Mar 2015 00:41:25 +0000 (00:41 +0000)]
Fix the iOS build

* WebView/WebHTMLView.mm:

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

5 years agoFunction bodies should always include braces
ggaren@apple.com [Wed, 18 Mar 2015 00:07:24 +0000 (00:07 +0000)]
Function bodies should always include braces
https://bugs.webkit.org/show_bug.cgi?id=142795

Reviewed by Michael Saboff.

Source/JavaScriptCore:

Having a mode for excluding the opening and closing braces from a function
body was unnecessary and confusing.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock): Adopt the new one true linking function.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::link):
(JSC::UnlinkedFunctionExecutable::codeBlockFor): No need to pass through
a boolean: there is only one kind of function now.

(JSC::UnlinkedFunctionExecutable::linkInsideExecutable): Deleted.
(JSC::UnlinkedFunctionExecutable::linkGlobalCode): Deleted. Let's only
have one way to do things. This removes the old mode that would pretend
that a function always started at column 1. That pretense was not true:
an attribute event listener does not necessarily start at column 1.

* bytecode/UnlinkedCodeBlock.h:
* generate-js-builtins: Adopt the new one true linking function.

* parser/Parser.h:
(JSC::Parser<LexerType>::parse):
(JSC::parse): needsReparsingAdjustment is always true now, so I removed it.

* runtime/Executable.cpp:
(JSC::ScriptExecutable::newCodeBlockFor):
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::ProgramExecutable::initializeGlobalProperties):
(JSC::FunctionExecutable::fromGlobalCode):
* runtime/Executable.h:
(JSC::FunctionExecutable::create):
(JSC::FunctionExecutable::bodyIncludesBraces): Deleted. Removed unused stuff.

* runtime/FunctionConstructor.cpp:
(JSC::constructFunctionSkippingEvalEnabledCheck): Always provide a
leading space because that's what this function's comment says is required
for web compatibility. We used to fake this up after the fact when
stringifying, based on the bodyIncludesBraces flag, but that flag is gone now.

* runtime/FunctionPrototype.cpp:
(JSC::insertSemicolonIfNeeded):
(JSC::functionProtoFuncToString): No need to add braces and/or a space
after the fact -- we always have them now.

LayoutTests:

Updated these test results to reflect the fact that JavaScriptCore now
honors the source code text positions provided by WebCore, even for
attribute event handlers.

Unfortunately, the column numbers we used to report were wrong, and they
are still wrong now. The old column numbers were wrong because we would
always pretend that they started on column 1. The new column numbers
are wrong because WebCore records the column number after it finishes
parsing the element, rather than while it is parsing the event listener
attribute.

* fast/events/window-onerror2-expected.txt:
* fast/profiler/dead-time-expected.txt:
* fast/profiler/inline-event-handler-expected.txt:
* fast/profiler/stop-profiling-after-setTimeout-expected.txt:
* js/dom/script-start-end-locations-expected.txt:

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

5 years agoWeb Inspector: Removal of multiline completion hint broken in Details sidebar
commit-queue@webkit.org [Wed, 18 Mar 2015 00:03:07 +0000 (00:03 +0000)]
Web Inspector: Removal of multiline completion hint broken in Details sidebar
https://bugs.webkit.org/show_bug.cgi?id=142796

Patch by Tobias Reiss <tobi+webkit@basecode.de> on 2015-03-17
Reviewed by Joseph Pecoraro.

Prioritize CodeMirrorCompletionController over CSSStyleDeclarationTextEditor.
Both classes control the current CodeMirror instance of the Details Sidebar.
This change prevents possible race conditions during complete or delete-complete phases,
especially during operations on multiple styles in one line.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):

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

5 years ago[Mac][iOS] setSharedTimerFireInterval() / stopSharedTimer() are expensive
cdumez@apple.com [Tue, 17 Mar 2015 23:42:46 +0000 (23:42 +0000)]
[Mac][iOS] setSharedTimerFireInterval() / stopSharedTimer() are expensive
https://bugs.webkit.org/show_bug.cgi?id=142752
<rdar://problem/20176731>

Reviewed by Antti Koivisto.

setSharedTimerFireInterval() / stopSharedTimer() are expensive on Mac
and iOS on pages using a lot of timers.

For example, on bing.com / iOS, ~15.4% of the CPU time is spent in
setSharedTimerFireInterval() and ~14.7% of the CPU time is spent in
stopSharedTimer(). The expensive calls are CFRunLoopAddTimer (11.4%),
CFRunLoopTimerInvalidate (14.1%), CFRunLoopTimerCreate (3.3%).

The issue is that we keep creating, adding to run loop modes, and then
destroying the sharedTimer for each firing event. This is very
expensive. In such case, the CFRunLoopTimerRef documentation advises to
"""
... create a repeating timer with an initial firing time in the distant
future (or the initial firing time) and a very large repeat interval—on
the order of decades or more—and add it to all the necessary run loop
modes. Then, when you know when the timer should fire next, you reset
the firing time with CFRunLoopTimerSetNextFireDate, perhaps from the
timer’s own callback function. This technique effectively produces a
reusable, asynchronous timer.
""" [1].

Doing so greatly decreases CPU time spend in:
- setSharedTimerFireInterval(): 15.4% -> 4.6%
- stopSharedTimer(): 14.6% -> 8.6%

Overall CPU time spent on bing.com in timerFired() goes down from
~61.2% to ~49.5%.

This patch also refactors the SharedTimer code to share as much as
possible between Mac and iOS.

This patch is based in part on the following patch:
http://trac.webkit.org/changeset/143210

[1] https://developer.apple.com/library/prerelease/ios/documentation/CoreFoundation/Reference/CFRunLoopTimerRef/index.html#//apple_ref/c/func/CFRunLoopTimerSetNextFireDate

* WebCore.xcodeproj/project.pbxproj:
* platform/SharedTimer.h:
(WebCore::SharedTimer::invalidate):
(WebCore::MainThreadSharedTimer::setFiredFunction): Deleted.
(WebCore::MainThreadSharedTimer::setFireInterval): Deleted.
(WebCore::MainThreadSharedTimer::stop): Deleted.
* platform/ThreadTimers.cpp:
(WebCore::ThreadTimers::fireTimersInNestedEventLoop):
* platform/cf/SharedTimerCF.mm: Added.
(WebCore::applicationDidBecomeActive):
(WebCore::setupPowerObserver):
(WebCore::setSharedTimerFiredFunction):
(WebCore::timerFired):
(WebCore::restartSharedTimer):
(WebCore::invalidateSharedTimer):
(WebCore::setSharedTimerFireInterval):
(WebCore::stopSharedTimer):
* platform/efl/SharedTimerEfl.cpp:
(WebCore::invalidateSharedTimer):
* platform/gtk/SharedTimerGtk.cpp:
(WebCore::invalidateSharedTimer):
* platform/ios/SharedTimerIOS.mm: Removed.
* platform/mac/PowerObserverMac.h: Copied from Source/WebCore/platform/efl/SharedTimerEfl.cpp.
* platform/mac/PowerObserverMac.mm: Renamed from Source/WebCore/platform/mac/SharedTimerMac.mm.
(WebCore::PowerObserver::PowerObserver):
(WebCore::PowerObserver::~PowerObserver):
(WebCore::PowerObserver::didReceiveSystemPowerNotification):
* platform/win/SharedTimerWin.cpp:
(WebCore::removeSharedTimer):

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

5 years agoRefactor execution time limit tests out of testapi.c.
mark.lam@apple.com [Tue, 17 Mar 2015 23:06:37 +0000 (23:06 +0000)]
Refactor execution time limit tests out of testapi.c.
<https://webkit.org/b/142798>

Rubber stamped by Michael Saboff.

These tests were sometimes failing to time out on C loop builds.  Let's
refactor them out of the big monolith that is testapi.c so that we can
reason more easily about them and make adjustments if needed.

* API/tests/ExecutionTimeLimitTest.cpp: Added.
(currentCPUTime):
(currentCPUTimeAsJSFunctionCallback):
(shouldTerminateCallback):
(cancelTerminateCallback):
(extendTerminateCallback):
(testExecutionTimeLimit):
* API/tests/ExecutionTimeLimitTest.h: Added.
* API/tests/testapi.c:
(main):
(currentCPUTime): Deleted.
(currentCPUTime_callAsFunction): Deleted.
(shouldTerminateCallback): Deleted.
(cancelTerminateCallback): Deleted.
(extendTerminateCallback): Deleted.
* JavaScriptCore.xcodeproj/project.pbxproj:

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

5 years agocheck-webkit-style should allow "bool a : 1"
dino@apple.com [Tue, 17 Mar 2015 22:57:40 +0000 (22:57 +0000)]
check-webkit-style should allow "bool a : 1"
https://bugs.webkit.org/show_bug.cgi?id=142794

Reviewed by Brent Fulgham.

We should allow member bitfields of the form:

bool m_var : 1;

It seems that Visual Studio 8 was the last compiler that
wasn't happy about not using unsigned here. We already have
about 500 cases (in WebCore) where people were ignoring this rule.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_language): Allow "bool".
* Scripts/webkitpy/style/checkers/cpp_unittest.py: Add tests.
(CppStyleTest.test_enum_bitfields):
(CppStyleTest.test_plain_integral_bitfields):

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

5 years agoCannot invoke action menus anymore
timothy_horton@apple.com [Tue, 17 Mar 2015 22:48:07 +0000 (22:48 +0000)]
Cannot invoke action menus anymore
https://bugs.webkit.org/show_bug.cgi?id=142797
<rdar://problem/20032670>

Reviewed by Beth Dakin.

* UIProcess/API/mac/WKView.mm:
Don't process mouse events that would make an action menu; call super
and let AppKit take care of it. We have to duplicate the macro so that
we can avoid calling super for the internal-only methods.
Also, otherMouseMoved is simply not a thing, so remove it.

* WebView/WebHTMLView.mm:
(-[WebHTMLView otherMouseDown:]):
Don't override otherMouseDown: if the event would make an action menu.

* platform/spi/mac/NSMenuSPI.h:
Add additional NSMenu SPI.

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