WebKit-https.git
7 years ago[Mac][WebKit2] Move action menu code into its own file
timothy_horton@apple.com [Fri, 24 Oct 2014 21:13:14 +0000 (21:13 +0000)]
[Mac][WebKit2] Move action menu code into its own file
https://bugs.webkit.org/show_bug.cgi?id=138034
<rdar://problem/18758758>

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController _addImageToPhotos:]):
Review comments that were not previously addressed.

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

7 years ago[Mac][WebKit2] Move action menu code into its own file
timothy_horton@apple.com [Fri, 24 Oct 2014 21:08:20 +0000 (21:08 +0000)]
[Mac][WebKit2] Move action menu code into its own file
https://bugs.webkit.org/show_bug.cgi?id=138034
<rdar://problem/18758758>

Reviewed by Dan Bernstein.

* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
Make a WKActionMenuController if needed.

(-[WKView prepareForMenu:withEvent:]):
(-[WKView willOpenMenu:withEvent:]):
(-[WKView didCloseMenu:withEvent:]):
(-[WKView _didPerformActionMenuHitTest:]):
Forward these to WKActionMenuController.

(-[WKView _openURLFromActionMenu:]): Deleted.
(-[WKView _addToReadingListFromActionMenu:]): Deleted.
(-[WKView _quickLookURLFromActionMenu:]): Deleted.
(-[WKView _createActionMenuItemForTag:]): Deleted.
(webKitBundleImageNamed): Deleted.
(-[WKView _copyImage:]): Deleted.
(-[WKView _saveImageToDownloads:]): Deleted.
(temporaryPhotosDirectoryPath): Deleted.
(pathToPhotoOnDisk): Deleted.
(-[WKView _addImageToPhotos:]): Deleted.
(-[WKView _defaultMenuItemsForImage]): Deleted.
(-[WKView _defaultMenuItems]): Deleted.
(-[WKView _updateActionMenu]): Deleted.
Moved to WKActionMenuController.

* UIProcess/mac/WKActionMenuController.h: Added.
* UIProcess/mac/WKActionMenuController.mm: Added.
(-[WKActionMenuController initWithPage:view:]):
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController willOpenMenu:withEvent:]):
(-[WKActionMenuController didCloseMenu:withEvent:]):
(-[WKActionMenuController didPerformActionMenuHitTest:]):
(-[WKActionMenuController _defaultMenuItemsForLink]):
(-[WKActionMenuController _openURLFromActionMenu:]):
(-[WKActionMenuController _addToReadingListFromActionMenu:]):
(-[WKActionMenuController _quickLookURLFromActionMenu:]):
(-[WKActionMenuController _defaultMenuItemsForImage]):
(-[WKActionMenuController _copyImage:]):
(-[WKActionMenuController _saveImageToDownloads:]):
(temporaryPhotosDirectoryPath):
(pathToPhotoOnDisk):
(-[WKActionMenuController _addImageToPhotos:]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
(webKitBundleImageNamed):
(imageForResource:name::if):
(-[WKActionMenuController _updateActionMenuItems]):
Moved from WKView.

* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoReplace INT_MIN/MAX / kFixedPointDenominator with intMin/MaxForLayoutUnit.
zalan@apple.com [Fri, 24 Oct 2014 20:59:58 +0000 (20:59 +0000)]
Replace INT_MIN/MAX / kFixedPointDenominator with intMin/MaxForLayoutUnit.
https://bugs.webkit.org/show_bug.cgi?id=138047

Reviewed by Andreas Kling.

No change in functionality.

* css/CSSPrimitiveValue.cpp:

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

7 years ago[Win] More unreviewed gardening/rebaselining of Windows tests.
roger_fong@apple.com [Fri, 24 Oct 2014 20:26:44 +0000 (20:26 +0000)]
[Win] More unreviewed gardening/rebaselining of Windows tests.
* platform/win/TestExpectations:
* platform/win/fast/repaint/select-option-background-color-expected.txt:
* platform/win/fast/repaint/slider-thumb-drag-release-expected.txt: Added.
* platform/win/fast/repaint/slider-thumb-float-expected.txt: Added.
* platform/win/fast/replaced/table-percent-height-expected.txt: Added.
* platform/win/fast/replaced/three-selects-break-expected.txt: Added.
* platform/win/fast/table/remove-td-display-none-expected.txt:
* platform/win/fast/transforms: Added.
* platform/win/fast/transforms/transformed-focused-text-input-expected.txt: Added.
* platform/win/platform/win/accessibility: Added.
* platform/win/platform/win/accessibility/option-element-position-and-size-expected.txt: Added.

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

7 years agoREGRESSION(r174877): WebProcess sends an empty Cookies HTTP header
ap@apple.com [Fri, 24 Oct 2014 20:23:31 +0000 (20:23 +0000)]
REGRESSION(r174877): WebProcess sends an empty Cookies HTTP header
https://bugs.webkit.org/show_bug.cgi?id=138053

Reviewed by Chris Dumez.

Fixes existing tests.

* platform/network/mac/CookieJarMac.mm: (WebCore::cookiesForSession): Restore the
behavior of returning a null string when there are no cookies.

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

7 years ago[Mac] Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
cdumez@apple.com [Fri, 24 Oct 2014 20:12:44 +0000 (20:12 +0000)]
[Mac] Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
https://bugs.webkit.org/show_bug.cgi?id=138039

Reviewed by Darin Adler.

Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
for case-insensitive string comparison instead of converting to UTF-8 and then
using strcasecmp().

No new tests, no behavior change.

* platform/mac/QuickLookMac.mm:
(WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):

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

7 years agoUpdate some results that were incorrect for Yosemite.
ap@apple.com [Fri, 24 Oct 2014 19:28:59 +0000 (19:28 +0000)]
Update some results that were incorrect for Yosemite.

* platform/mac-mavericks/fast/text/international/hindi-spacing-expected.png: Copied from LayoutTests/platform/mac/fast/text/international/hindi-spacing-expected.png.
* platform/mac-mavericks/fast/text/international/hindi-spacing-expected.txt: Copied from LayoutTests/platform/mac/fast/text/international/hindi-spacing-expected.txt.
* platform/mac-mavericks/fast/writing-mode: Added.
* platform/mac-mavericks/fast/writing-mode/Kusa-Makura-background-canvas-expected.png: Copied from LayoutTests/platform/mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.png.
* platform/mac-mavericks/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt: Copied from LayoutTests/platform/mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt.
* platform/mac-mountainlion/fast/writing-mode: Added.
* platform/mac-mountainlion/fast/writing-mode/Kusa-Makura-background-canvas-expected.png: Copied from LayoutTests/platform/mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.png.
* platform/mac-mountainlion/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt: Copied from LayoutTests/platform/mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt.
* platform/mac-mountainlion/mathml: Added.
* platform/mac-mountainlion/mathml/opentype: Added.
* platform/mac-mountainlion/mathml/opentype/opentype-stretchy-horizontal-expected.txt: Copied from LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt.
* platform/mac-wk2/fast/writing-mode/Kusa-Makura-background-canvas-expected.png: Removed.
* platform/mac/fast/text/international/hindi-spacing-expected.png:
* platform/mac/fast/text/international/hindi-spacing-expected.txt:
* platform/mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.png:
* platform/mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt:
* platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt:

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

7 years agoSimplified IndexingType's hasAnyArrayStorage().
mark.lam@apple.com [Fri, 24 Oct 2014 19:16:29 +0000 (19:16 +0000)]
Simplified IndexingType's hasAnyArrayStorage().
<https://webkit.org/b/138051>

Reviewed by Michael Saboff.

IndexingType's hasAnyArrayStorage() currently does subtraction of ArrayStorageShape
with the purpose of making non-ArrayStorage types underflow (with that subtraction)
and have a result that exceeds SlowPutArrayStorageShape.  What it is doing is
basically checking for a shape value that is greater equal to ArrayStorageShape.
We can just simplify the code as such.

Also added a comment to describe the structure of the bits in IndexingType.

* runtime/IndexingType.h:
(JSC::hasAnyArrayStorage):

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

7 years agoAvoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest...
cdumez@apple.com [Fri, 24 Oct 2014 19:13:15 +0000 (19:13 +0000)]
Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest() / doUpdatePlatformHTTPBody()
https://bugs.webkit.org/show_bug.cgi?id=138049

Reviewed by Alexey Proskuryakov.

Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest()
/ doUpdatePlatformHTTPBody(). It turns out that about half the time, the
m_nsRequest member is already mutable so it is unnecessary to call
[NSURLRequest mutableCopy], we can just cast it to an NSMutableURLRequest* and
avoid copying.

This patch also moves the code to a new ensureMutableNSURLRequest() method to
avoid duplicating the logic.

I see that we spend ~21% less time in these 2 functions when loading
http://flickr.com/explore/ (39.6ms -> 31.2ms).

No new tests, no behavior change.

* platform/network/cf/ResourceRequest.h:
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::ensureMutableNSURLRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):

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

7 years agofast/multicol/fixed-stack.html failing since introduction.
ap@apple.com [Fri, 24 Oct 2014 19:11:17 +0000 (19:11 +0000)]
fast/multicol/fixed-stack.html failing since introduction.
https://bugs.webkit.org/show_bug.cgi?id=132421

* platform/mac-wk1/TestExpectations: As of Yosemite, it's failing on mac-wk1 too.

* platform/gtk/TestExpectations: [ Pass ] is no longer needed, because we don't have
an entry in global TestExpectations now.

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

7 years agoMove ComputeLength CSS properties to the new StyleBuilder
cdumez@apple.com [Fri, 24 Oct 2014 18:32:34 +0000 (18:32 +0000)]
Move ComputeLength CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138036

Reviewed by Andreas Kling.

Move ComputeLength CSS properties from DeprecatedStyleBuilder to the
new StyleBuilder so that they are now generated. 3 Converters are
provided for these properties: ComputedLength / LineWidth / Spacing.

This is inspired by the following Blink revision by
<timloh@chromium.org>:
https://src.chromium.org/viewvc/blink?view=rev&revision=154012

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyComputeLength::setValue): Deleted.
(WebCore::ApplyPropertyComputeLength::applyValue): Deleted.
(WebCore::ApplyPropertyComputeLength::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertComputedLength):
(WebCore::StyleBuilderConverter::convertLineWidth):
(WebCore::StyleBuilderConverter::convertSpacing):

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

7 years agoMake ScriptWrappable's destructor protected instead of public
cdumez@apple.com [Fri, 24 Oct 2014 18:13:30 +0000 (18:13 +0000)]
Make ScriptWrappable's destructor protected instead of public
https://bugs.webkit.org/show_bug.cgi?id=138037

Reviewed by Andreas Kling.

Make ScriptWrappable's destructor protected instead of public as it is
not virtual and this class is subclassed a lot.

No new tests, no behavior change.

* bindings/js/ScriptWrappable.h:
(WebCore::ScriptWrappable::~ScriptWrappable):

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

7 years agoAll plug-in tests fail on Yosemite WK1
ap@apple.com [Fri, 24 Oct 2014 17:25:24 +0000 (17:25 +0000)]
All plug-in tests fail on Yosemite WK1
https://bugs.webkit.org/show_bug.cgi?id=138040

Reviewed by Dan Bernstein.

Fix a symlink for WebKitPluginHost.app. There is also a broken symlink for WebKitPluginAgent,
which I don't know what to do about, but that seems harmless.

* WebKit.xcodeproj/project.pbxproj:

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

7 years agobuild.webkit.org/dashboard immediately retries a request to buildbot when the respons...
mitz@apple.com [Fri, 24 Oct 2014 17:03:53 +0000 (17:03 +0000)]
build.webkit.org/dashboard immediately retries a request to buildbot when the response is 404
https://bugs.webkit.org/show_bug.cgi?id=138046

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype._load): Only consider retrying immediately if the error code was
401. Otherwise, we’ll retry normally in 45 seconds.

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

7 years ago[Windows] Skip tests after removing SafariTheme that fail because background renders...
roger_fong@apple.com [Fri, 24 Oct 2014 09:12:41 +0000 (09:12 +0000)]
[Windows] Skip tests after removing SafariTheme that fail because background renders too dark.
https://bugs.webkit.org/show_bug.cgi?id=138042.
* platform/win/TestExpectations:
24  Roger Fong  <roger_fong@apple.com>

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

7 years ago[Windows] Skip tests after removing SafariTheme that fail because borders now render...
roger_fong@apple.com [Fri, 24 Oct 2014 09:04:43 +0000 (09:04 +0000)]
[Windows] Skip tests after removing SafariTheme that fail because borders now render too dark.
https://bugs.webkit.org/show_bug.cgi?id=138041.
* platform/win/TestExpectations:

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

7 years ago[Windows] More unreviewed gardening after getting rid of SafariTheme.
roger_fong@apple.com [Fri, 24 Oct 2014 08:59:30 +0000 (08:59 +0000)]
[Windows] More unreviewed gardening after getting rid of SafariTheme.
* platform/win/TestExpectations: Skip a handful of tests that were failing
on the Windows bots after removing SafariTheme for miscellaneous reasons.

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

7 years ago[Windows] More unreviewed gardening after getting rid of SafariTheme.
roger_fong@apple.com [Fri, 24 Oct 2014 08:51:07 +0000 (08:51 +0000)]
[Windows] More unreviewed gardening after getting rid of SafariTheme.
https://bugs.webkit.org/show_bug.cgi?id=138025
* platform/win/TestExpectations: These tests fail seemingly due to text size difference,
which consequently cause the text containers to be too larger as well.

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

7 years ago[Windows] More rebaselining of Windows tests after removing SafariTheme.
roger_fong@apple.com [Fri, 24 Oct 2014 08:43:12 +0000 (08:43 +0000)]
[Windows] More rebaselining of Windows tests after removing SafariTheme.
* platform/win/editing/selection/select-across-readonly-input-1-expected.txt:
* platform/win/editing/selection/select-across-readonly-input-2-expected.txt:
* platform/win/editing/selection/select-across-readonly-input-3-expected.txt:
* platform/win/fast/block/positioning/inline-block-relposition-expected.txt:
* platform/win/fast/canvas/fallback-content-expected.txt: Added.
* platform/win/fast/css/button-height-expected.txt:
* platform/win/fast/dom/HTMLInputElement: Added.
* platform/win/fast/dom/HTMLInputElement/input-slider-update-expected.txt: Added.
* platform/win/fast/dom/HTMLInputElement/input-slider-update-styled-expected.txt: Added.
* platform/win/fast/dom/tabindex-clamp-expected.txt: Added.
* platform/win/fast/dynamic/positioned-movement-with-positioned-children-expected.txt:
* platform/win/fast/html/details-no-summary4-expected.txt: Added.
* platform/win/fast/html/details-open-javascript-expected.txt: Added.
* platform/win/fast/html/details-open2-expected.txt: Added.
* platform/win/fast/html/details-open4-expected.txt: Added.
* platform/win/fast/html/details-replace-summary-child-expected.txt:
* platform/win/fast/html/details-replace-text-expected.txt:

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

7 years ago[GTK] Implement is_selected method on WebKitHitTestResult
commit-queue@webkit.org [Fri, 24 Oct 2014 07:09:57 +0000 (07:09 +0000)]
[GTK] Implement is_selected method on WebKitHitTestResult
https://bugs.webkit.org/show_bug.cgi?id=137110

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2014-10-24
Reviewed by Tim Horton.

Source/WebKit2:

Expose CONTEXT_SELECTION for WebKitHitTestResult.

* Shared/WebHitTestResult.cpp: Add is_selected field and getter for this field.
(WebKit::WebHitTestResult::Data::Data):
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* Shared/WebHitTestResult.h:
(WebKit::WebHitTestResult::isSelected):
* UIProcess/API/gtk/WebKitHitTestResult.cpp: Add WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION context and method to check it.
(webkitHitTestResultCreate):
(webkitHitTestResultCompare):
(webkit_hit_test_result_context_is_selection):
* UIProcess/API/gtk/WebKitHitTestResult.h:
* UIProcess/API/gtk/WebKitWebView.cpp: Modify context-menu callback to set the new context option.
(webkitWebViewPopulateContextMenu):
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add documentation about new function.

Tools:

Add tests for new context SELECTION on WebKitHitTestResult.

* TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp:
(testContextMenuDefaultMenu):
* TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:
(testWebViewMouseTarget):

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

7 years ago[GTK][Cairo] Remove GTK dependency of WidgetBackingStoreGtkX11
carlosgc@webkit.org [Fri, 24 Oct 2014 06:58:13 +0000 (06:58 +0000)]
[GTK][Cairo] Remove GTK dependency of WidgetBackingStoreGtkX11
https://bugs.webkit.org/show_bug.cgi?id=138004

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

Rename all WidgetBackingStore* classes as
BackingStoreBackendCairo* since all of them are actually
BackingStore backends based on cairo, and move them from
platform/cairo and platform/gtk to platform/graphics/cairo.
BackingStoreBackendCairo is the base class that contains common
members like the surface and size. BackingStoreBackendCairoImpl is
the implementation using only cairo, and BackingStoreBackendCairoX11
using xlib. BackingStoreBackendCairoX11 receives all the X11
information it needs as constructor parameters, instead of using a
GtkWidget and GTK+ X11 API. BackingStoreBackendCairoImpl receives
the surface already created as constructor parameter, so that it
doesn't have any platform specific code now.

* PlatformEfl.cmake: Update compilation files.
* PlatformGTK.cmake: Ditto.
* platform/cairo/WidgetBackingStoreCairo.cpp: Removed.
* platform/graphics/cairo/BackingStoreBackendCairo.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStore.h.
(WebCore::BackingStoreBackendCairo::~BackingStoreBackendCairo):
(WebCore::BackingStoreBackendCairo::surface):
(WebCore::BackingStoreBackendCairo::size):
(WebCore::BackingStoreBackendCairo::BackingStoreBackendCairo):
* platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp: Added.
(WebCore::BackingStoreBackendCairoImpl::BackingStoreBackendCairoImpl):
(WebCore::BackingStoreBackendCairoImpl::~BackingStoreBackendCairoImpl):
(WebCore::BackingStoreBackendCairoImpl::scroll):
* platform/graphics/cairo/BackingStoreBackendCairoImpl.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStoreCairo.h.
* platform/graphics/cairo/BackingStoreBackendCairoX11.cpp: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.cpp.
(WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11):
(WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11):
(WebCore::BackingStoreBackendCairoX11::scroll):
* platform/graphics/cairo/BackingStoreBackendCairoX11.h: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.h.
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::cairoSurfaceGetDeviceScale):
* platform/graphics/cairo/CairoUtilities.h:

Source/WebKit2:

* UIProcess/BackingStore.h: Rename m_backingStore as m_backend,
since it's a bit confusing that a BackingStore class has a
m_backingStore member and WidgetBackingStore has been renamed as
BackingStoreBackendCairo.
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::createBackend): Helper function to create
the BackingStore backend depending on the platform.
(WebKit::BackingStore::paint): Use m_backend instead of m_backingStore.
(WebKit::BackingStore::incorporateUpdate): Ditto.
(WebKit::BackingStore::scroll): Ditto.
(WebKit::createBackingStoreForGTK): Deleted.

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

7 years agoWebContent crash at WebCore::RenderTextControl::textFormControlElement const.
zalan@apple.com [Fri, 24 Oct 2014 03:35:27 +0000 (03:35 +0000)]
WebContent crash at WebCore::RenderTextControl::textFormControlElement const.
https://bugs.webkit.org/show_bug.cgi?id=138035

Reviewed by Antti Koivisto.

NULL-check element().renderer() before using it.

* html/SearchInputType.cpp:
(WebCore::SearchInputType::didSetValueByUserEdit):

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

7 years agoFix a bad find-and-replace in r175153
benjamin@webkit.org [Fri, 24 Oct 2014 03:00:35 +0000 (03:00 +0000)]
Fix a bad find-and-replace in r175153

Looks like I messed up the commit on landing.

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-10-23

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::didCommitLoadForFrame):

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

7 years agoRemove HarfBuzzRun::create() factory function
gyuyoung.kim@samsung.com [Fri, 24 Oct 2014 02:12:23 +0000 (02:12 +0000)]
Remove HarfBuzzRun::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137945

Reviewed by Ryosuke Niwa.

As a step to use std::unique_ptr<>, this patch applies std::unique_ptr<> and std::make_unique<>.
Thus HarfBuzzRun::create() is needed no longer.

No new tests, no behavior changes.

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::collectHarfBuzzRuns):
* platform/graphics/harfbuzz/HarfBuzzShaper.h:
(WebCore::HarfBuzzShaper::HarfBuzzRun::create): Deleted.

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

7 years agoUnreviewed iOS build fix
mmaxfield@apple.com [Fri, 24 Oct 2014 01:32:48 +0000 (01:32 +0000)]
Unreviewed iOS build fix

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2014-10-23

* editing/FrameSelection.cpp:

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

7 years ago[Mac] Optimize URL::createCFURL() for the common case
cdumez@apple.com [Fri, 24 Oct 2014 01:29:46 +0000 (01:29 +0000)]
[Mac] Optimize URL::createCFURL() for the common case
https://bugs.webkit.org/show_bug.cgi?id=138030

Reviewed by Alexey Proskuryakov.

Optimize URL::createCFURL() for the common case by adding a fast path
for when the URL String is already 8-bit (common case).
When the string is 8-bit, we don't need to copy the bytes into a
temporary buffer and we can construct the CFURLRef directly from it.

This makes URL::createCFURL() ~34% faster on my machine.

No new tests, no behavior change.

* platform/mac/URLMac.mm:
(WebCore::URL::createCFURL):

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

7 years ago[iOS WK2] If a page has the exact same VisibleContentRect as the page before, its...
benjamin@webkit.org [Fri, 24 Oct 2014 00:44:09 +0000 (00:44 +0000)]
[iOS WK2] If a page has the exact same VisibleContentRect as the page before, its VisibleContentRectUpdate can be ignored
https://bugs.webkit.org/show_bug.cgi?id=138031
rdar://problem/18739335

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-10-23
Reviewed by Simon Fraser.

Since any VisibleContentRectUpdate is costly for the WebProcess, we avoid sending updates
if none of the important parameters have changed (scale and geometry).

One unintended side effect is that the update of a page can be blocked if the parameters
of the previous page were identical.

What happen is this:
1) Page [A] sends its content rect update as needed. WebPageProxy saves the last update
   in m_lastVisibleContentRectUpdate and use that value to avoid useless updates.
2) Page [B] load after page [A] and have the exact VisibleContentRect. When receiving the first
   layer tree commit after didCommitLoadForFrame, WKWebView sends its VisibleContentRect
   to WebPageProxy to synchronize the state of the WebProcess with what is on screen.
3) Since the two VisibleContentRect update has the same value as the ones of page [A], WebPageProxy
   discards the update. The WebProcess has its initialization viewport and is not udpated until
   a major parameter changes (scale or position).

In rdar://problem/18739335, the problem is the similar but with a different failure point:
1) Everything above happened already.
2) The layer tree transaction has a scrolling request. This is processed by WKWebView.
3) Since the scrolling position is invalid, the request is ignored and we send the last
   VisibleContentRect to the WebProcess with WebPageProxy::resendLastVisibleContentRects().
4) Since the VisibleContentRect was never updated after didCommitLoadForFrame, the one we send
   is for the previous page, which the web process correctly ignores.

This patch solves the problem by nuking the cached m_lastVisibleContentRectUpdate before
any valid VisibleContentRectUpdate for a new page.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::didCommitLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree):

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

7 years agoCarets in GMail and iCloud compositions are the foreground text color
mmaxfield@apple.com [Thu, 23 Oct 2014 23:49:05 +0000 (23:49 +0000)]
Carets in GMail and iCloud compositions are the foreground text color
https://bugs.webkit.org/show_bug.cgi?id=138029

Reviewed by Simon Fraser.

Source/WebCore:

Previously, we were only checking whether the background colors of the foreground and background
elements were the same, rather than taking validity and opacity into consideration.

Test: editing/caret/color-span-inside-editable-background.html

* editing/FrameSelection.cpp:
(WebCore::disappearsIntoBackground):
(WebCore::CaretBase::paintCaret):

LayoutTests:

Test the case where the content editable root has a background color specified.

* editing/caret/color-span-inside-editable-background-expected.html: Added.
* editing/caret/color-span-inside-editable-background.html: Added.

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

7 years agoWeb Inspector: Provide a way to have alternate inspector agents
joepeck@webkit.org [Thu, 23 Oct 2014 23:43:14 +0000 (23:43 +0000)]
Web Inspector: Provide a way to have alternate inspector agents
https://bugs.webkit.org/show_bug.cgi?id=137901

Reviewed by Brian Burg.

Source/JavaScriptCore:

Provide a way to use alternate inspector agents debugging a JSContext.
Expose a very slim private API that a client could use to know when
an inspector has connected/disconnected, and a way to register its
augmentative agents.

* Configurations/FeatureDefines.xcconfig:
* JavaScriptCore.xcodeproj/project.pbxproj:
New feature guard. New files.

* API/JSContextRef.cpp:
(JSGlobalContextGetAugmentableInspectorController):
* API/JSContextRefInspectorSupport.h: Added.
Access to the private interface from a JSContext.

* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
(Inspector::JSGlobalObjectInspectorController::connectFrontend):
(Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
* inspector/JSGlobalObjectInspectorController.h:
* inspector/augmentable/AugmentableInspectorController.h: Added.
(Inspector::AugmentableInspectorController::~AugmentableInspectorController):
(Inspector::AugmentableInspectorController::connected):
* inspector/augmentable/AugmentableInspectorControllerClient.h: Added.
(Inspector::AugmentableInspectorControllerClient::~AugmentableInspectorControllerClient):
* inspector/augmentable/AlternateDispatchableAgent.h: Added.
(Inspector::AlternateDispatchableAgent::AlternateDispatchableAgent):
Provide the private APIs a client could use to add alternate agents using alternate backend dispatchers.

* inspector/scripts/codegen/__init__.py:
* inspector/scripts/generate-inspector-protocol-bindings.py:
(generate_from_specification):
New includes, and use the new generator.

* inspector/scripts/codegen/generate_alternate_backend_dispatcher_header.py: Added.
(AlternateBackendDispatcherHeaderGenerator):
(AlternateBackendDispatcherHeaderGenerator.__init__):
(AlternateBackendDispatcherHeaderGenerator.output_filename):
(AlternateBackendDispatcherHeaderGenerator.generate_output):
(AlternateBackendDispatcherHeaderGenerator._generate_handler_declarations_for_domain):
(AlternateBackendDispatcherHeaderGenerator._generate_handler_declaration_for_command):
Generate the abstract AlternateInspectorBackendDispatcher interfaces.

* inspector/scripts/codegen/generate_backend_dispatcher_header.py:
(BackendDispatcherHeaderGenerator.generate_output):
(BackendDispatcherHeaderGenerator._generate_alternate_handler_forward_declarations_for_domains):
(BackendDispatcherHeaderGenerator._generate_alternate_handler_forward_declarations_for_domains.AlternateInspector):
Forward declare alternate dispatchers, and allow setting an alternate dispatcher on a domain dispatcher.

* inspector/scripts/codegen/generate_backend_dispatcher_implementation.py:
(BackendDispatcherImplementationGenerator.generate_output):
(BackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):
Check for and dispatch on an AlternateInspectorBackendDispatcher if there is one for this domain.

* inspector/scripts/codegen/generator_templates.py:
(AlternateInspectorBackendDispatcher):
(AlternateInspector):
Template boilerplate for prelude and postlude.

* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
Rebaseline tests.

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

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

7 years agoDon't assume that style.overflowX() == style.overflowY()
simon.fraser@apple.com [Thu, 23 Oct 2014 23:36:19 +0000 (23:36 +0000)]
Don't assume that style.overflowX() == style.overflowY()
https://bugs.webkit.org/show_bug.cgi?id=138028

Reviewed by Zalan Bujtas.

WebKit doesn't support independent overflow scroll/hidden on different axes,
but the RenderStyle does report the correct values. So check both overflowX()
and overflowY() in a couple of places where we need to.

* rendering/RenderLayerCompositor.cpp:
(WebCore::styleHasTouchScrolling):
(WebCore::styleChangeRequiresLayerRebuild):

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

7 years agoGet rid of unnecessary vtables in WebKit
cdumez@apple.com [Thu, 23 Oct 2014 23:30:34 +0000 (23:30 +0000)]
Get rid of unnecessary vtables in WebKit
https://bugs.webkit.org/show_bug.cgi?id=138024

Reviewed by Benjamin Poulain.

Get rid of unnecessary vtables in WebKit by de-virtualizing destructors
when possible and marking the class as final to make sure people don't
subclass it.

No new tests, no behavior change.

* WebCore.exp.in:
* css/WebKitCSSMatrix.h:
* css/WebKitCSSMatrix.idl:
* html/canvas/WebGLContextGroup.h:
* html/canvas/WebGLGetInfo.h:
* html/canvas/WebGLUniformLocation.h:
(WebCore::WebGLUniformLocation::~WebGLUniformLocation): Deleted.
* html/canvas/WebGLUniformLocation.idl:
* inspector/DOMPatchSupport.h:
* inspector/InspectorHistory.h:
* inspector/InspectorStyleSheet.h:
* page/WheelEventDeltaTracker.h:
* page/scrolling/ScrollLatchingState.h:
* platform/audio/Biquad.h:
* platform/graphics/Pattern.h:

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

7 years agoClean up virtual functions in dom/
cdumez@apple.com [Thu, 23 Oct 2014 23:26:01 +0000 (23:26 +0000)]
Clean up virtual functions in dom/
https://bugs.webkit.org/show_bug.cgi?id=138019

Reviewed by Benjamin Poulain.

Clean up virtual functions in dom/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Using 'override' when appropriate
- Explicitly marking functions / destructors as virtual when they are
  inherently virtual
- Making isXXX() virtual functions private on XXX classes to avoid
  unnecessary type checks
- Dropping final for virtual functions in classes already marked as
  final

No new tests, no behavior change.

* WebCore.exp.in:
* dom/AutocompleteErrorEvent.h:
* dom/BeforeLoadEvent.h:
(WebCore::BeforeLoadEventInit::BeforeLoadEventInit):
* dom/BeforeTextInsertedEvent.h:
* dom/ClipboardEvent.h:
* dom/CompositionEvent.h:
* dom/CustomEvent.h:
* dom/DeviceMotionController.h:
(WebCore::DeviceMotionController::~DeviceMotionController): Deleted.
* dom/DeviceMotionEvent.h:
* dom/DeviceOrientationController.h:
(WebCore::DeviceOrientationController::~DeviceOrientationController): Deleted.
* dom/DeviceOrientationEvent.h:
* dom/Document.h:
* dom/DocumentFragment.h:
* dom/ErrorEvent.h:
* dom/FocusEvent.h:
* dom/HashChangeEvent.h:
* dom/KeyboardEvent.h:
* dom/LiveNodeList.h:
* dom/MessageEvent.h:
* dom/MessagePort.h:
* dom/MouseEvent.h:
* dom/MouseRelatedEvent.h:
* dom/MutationEvent.h:
* dom/NamedFlowCollection.h:
* dom/OverflowEvent.h:
* dom/PageTransitionEvent.h:
* dom/PendingScript.h:
* dom/PopStateEvent.h:
* dom/RawDataDocumentParser.h:
(WebCore::RawDataDocumentParser::finish): Deleted.
(WebCore::RawDataDocumentParser::flush): Deleted.
(WebCore::RawDataDocumentParser::insert): Deleted.
(WebCore::RawDataDocumentParser::append): Deleted.
* dom/ScriptableDocumentParser.h:
* dom/SecurityPolicyViolationEvent.h:
* dom/TextEvent.h:
* dom/TouchEvent.h:
* dom/TransitionEvent.h:
* dom/UIEvent.h:
* dom/WebKitAnimationEvent.h:
* dom/WebKitTransitionEvent.h:
* dom/WheelEvent.h:
* page/DeviceController.h:
(WebCore::DeviceController::~DeviceController):

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

7 years agoAdd some SPI headers for NSExtension and NSSharingService{Picker}
timothy_horton@apple.com [Thu, 23 Oct 2014 23:00:31 +0000 (23:00 +0000)]
Add some SPI headers for NSExtension and NSSharingService{Picker}
https://bugs.webkit.org/show_bug.cgi?id=138027

Reviewed by Anders Carlsson.

* WebCore.xcodeproj/project.pbxproj:
* platform/spi/cocoa/NSExtensionSPI.h: Added.
* platform/spi/mac/NSSharingServicePickerSPI.h: Added.
* platform/spi/mac/NSSharingServiceSPI.h: Added.
Add modern SPI headers for NSExtension, and NSSharingService{Picker}.

* rendering/RenderThemeMac.mm:
Replace redefinitions with an SPI header #import.

* UIProcess/API/mac/WKView.mm:
* UIProcess/mac/ServicesController.mm:
* UIProcess/mac/WebContextMenuProxyMac.mm:
Replace redefinitions with SPI header #imports.

* Misc/WebSharingServicePickerController.h:
* Misc/WebSharingServicePickerController.mm:
* WebCoreSupport/WebSelectionServiceController.mm:
* WebCoreSupport/WebContextMenuClient.mm:
Fix a sorting issue.
Replace redefinitions with SPI header #imports.

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

7 years ago[Windows] Unreviewed gardening after removing SafariTheme.
roger_fong@apple.com [Thu, 23 Oct 2014 22:58:29 +0000 (22:58 +0000)]
[Windows] Unreviewed gardening after removing SafariTheme.
https://bugs.webkit.org/show_bug.cgi?id=138025.
* platform/win/TestExpectations:

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

7 years ago[iOS WK2] Make sure any dynamic viewport update schedules a layer tree commit
benjamin@webkit.org [Thu, 23 Oct 2014 22:22:51 +0000 (22:22 +0000)]
[iOS WK2] Make sure any dynamic viewport update schedules a layer tree commit
https://bugs.webkit.org/show_bug.cgi?id=138021

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-10-23
Reviewed by Simon Fraser.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
Sometimes, the clients can do a dynamic viewport update but only change the minimum
layout size (see rdar://problem/18755250).

When that happens, it is possible to do the full state update without ever scheduling
a layer tree commit. For example, if the new minimum layout height is only a few pixels
smaller than the old value and the layout of the page is equal or larger than the old value,
the layout is done without any side effect to the content (assuming a viewport configuration
based on width).

The contract with the client is that the next layer tree commit after a dynamic viewport update
carries all the valid parameters for the new viewport size. Since the new layout never scheduled
a layer tree commit, the UIProcess is just waiting for one, discarding all input.

This patch solves the issue by explicitely scheduling a layer flush after updating all the layout
and view parameters to their final values. In most cases, this makes no difference since a layer
tree commit was already scheduled. In the rare cases where nothing was scheduled, scheduling
the layer tree commit ensure we unlock the UIProcess.

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

7 years ago[Win] Rebaseline a bunch of forms tests that no longer match after removing SafariTheme.
roger_fong@apple.com [Thu, 23 Oct 2014 22:01:57 +0000 (22:01 +0000)]
[Win] Rebaseline a bunch of forms tests that no longer match after removing SafariTheme.
https://bugs.webkit.org/show_bug.cgi?id=138022.
* platform/win/fast/forms/HTMLOptionElement_label06-expected.txt: Added.
* platform/win/fast/forms/basic-inputs-expected.txt:
* platform/win/fast/forms/basic-textareas-expected.txt: Added.
* platform/win/fast/forms/basic-textareas-quirks-expected.txt: Added.
* platform/win/fast/forms/blankbuttons-expected.txt:
* platform/win/fast/forms/button-generated-content-expected.txt:
* platform/win/fast/forms/button-inner-block-reuse-expected.txt: Added.
* platform/win/fast/forms/control-clip-expected.txt: Added.
* platform/win/fast/forms/fieldset-align-expected.txt: Added.
* platform/win/fast/forms/fieldset-legend-padding-unclipped-fieldset-border-expected.txt: Added.
* platform/win/fast/forms/fieldset-with-float-expected.txt: Added.
* platform/win/fast/forms/float-before-fieldset-expected.txt: Added.
* platform/win/fast/forms/focus-selection-textarea-expected.txt: Added.
* platform/win/fast/forms/indeterminate-expected.txt: Added.
* platform/win/fast/forms/input-appearance-readonly-expected.txt: Added.
* platform/win/fast/forms/input-appearance-visibility-expected.txt: Added.
* platform/win/fast/forms/input-first-letter-expected.txt: Added.
* platform/win/fast/forms/input-readonly-dimmed-expected.txt: Added.
* platform/win/fast/forms/input-spaces-expected.txt: Added.
* platform/win/fast/forms/input-text-click-outside-expected.txt: Added.
* platform/win/fast/forms/input-type-text-min-width-expected.txt: Added.
* platform/win/fast/forms/input-width-expected.txt: Added.
* platform/win/fast/forms/listbox-onchange-expected.txt: Added.
* platform/win/fast/forms/menulist-clip-expected.txt:
* platform/win/fast/forms/menulist-option-wrap-expected.txt: Added.
* platform/win/fast/forms/menulist-separator-painting-expected.txt: Added.
* platform/win/fast/forms/menulist-width-change-expected.txt:
* platform/win/fast/forms/negativeLineHeight-expected.txt: Added.
* platform/win/fast/forms/onselect-textarea-expected.txt: Added.
* platform/win/fast/forms/option-script-expected.txt:
* platform/win/fast/forms/option-text-clip-expected.txt:
* platform/win/fast/forms/placeholder-pseudo-style-expected.txt: Added.
* platform/win/fast/forms/range/input-appearance-range-expected.txt: Added.
* platform/win/fast/forms/range/range-thumb-height-percentage-expected.txt: Added.
* platform/win/fast/forms/range/slider-padding-expected.txt: Added.
* platform/win/fast/forms/range/slider-thumb-shared-style-expected.txt: Added.
* platform/win/fast/forms/range/slider-thumb-stylability-expected.txt: Added.
* platform/win/fast/forms/range/thumbslider-no-parent-slider-expected.txt: Added.
* platform/win/fast/forms/search-cancel-button-style-sharing-expected.txt: Added.
* platform/win/fast/forms/search-display-none-cancel-button-expected.txt: Added.
* platform/win/fast/forms/search-rtl-expected.txt: Added.
* platform/win/fast/forms/search-styled-expected.txt:
* platform/win/fast/forms/search-vertical-alignment-expected.txt: Added.
* platform/win/fast/forms/select-background-none-expected.txt: Added.
* platform/win/fast/forms/select-empty-option-height-expected.txt: Added.
* platform/win/fast/forms/select-size-expected.txt: Added.
* platform/win/fast/forms/select-style-expected.txt: Added.
* platform/win/fast/forms/select-visual-hebrew-expected.txt: Added.
* platform/win/fast/forms/select-writing-direction-natural-expected.txt:
* platform/win/fast/forms/selectlist-minsize-expected.txt: Added.
* platform/win/fast/forms/stuff-on-my-optgroup-expected.txt: Added.
* platform/win/fast/forms/textAreaLineHeight-expected.txt: Added.
* platform/win/fast/forms/textarea-align-expected.txt: Added.
* platform/win/fast/forms/textarea-metrics-expected.txt: Added.
* platform/win/fast/forms/textarea-placeholder-pseudo-style-expected.txt: Added.
* platform/win/fast/forms/textarea-placeholder-visibility-1-expected.txt:
* platform/win/fast/forms/textarea-placeholder-visibility-2-expected.txt:
* platform/win/fast/forms/textarea-scroll-height-expected.txt: Added.
* platform/win/fast/forms/textarea-scrollbar-expected.txt:
* platform/win/fast/forms/textarea-scrolled-type-expected.txt: Added.
* platform/win/fast/forms/textarea-setinnerhtml-expected.txt: Added.
* platform/win/fast/forms/textarea-width-expected.txt:
* platform/win/fast/forms/textfield-overflow-by-value-update-expected.txt: Added.
* platform/win/fast/forms/textfield-overflow-expected.txt: Added.

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

7 years agoWebContent crash in WebKit::WebPage::expandedRangeFromHandle
rniwa@webkit.org [Thu, 23 Oct 2014 21:51:08 +0000 (21:51 +0000)]
WebContent crash in WebKit::WebPage::expandedRangeFromHandle
https://bugs.webkit.org/show_bug.cgi?id=138023

Reviewed by Enrica Casucci.

The crashes are caused by rangeForBlockAtPoint returning a null Range.
Exit early or continue if a range is null in various places.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::expandedRangeFromHandle): Continue looking for another point if the range returned by
rangeForBlockAtPoint is null.
(WebKit::WebPage::contractedRangeFromHandle): Ditto.
(WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle): Removed the FIXME now that Enrica has
verified that this early exit added in r173788 is correct.

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

7 years ago[Win] Skip failing JSC tests following r175078
roger_fong@apple.com [Thu, 23 Oct 2014 21:04:15 +0000 (21:04 +0000)]
[Win] Skip failing JSC tests following r175078
https://bugs.webkit.org/show_bug.cgi?id=130967.
* Scripts/run-javascriptcore-tests:

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

7 years agooffsets.rb:183:in `buildOffsetsMap': unhandled exception - is offlineasm dependency...
msaboff@apple.com [Thu, 23 Oct 2014 20:54:22 +0000 (20:54 +0000)]
offsets.rb:183:in `buildOffsetsMap': unhandled exception - is offlineasm dependency tracking broken? (132668)
https://bugs.webkit.org/show_bug.cgi?id=138017

Reviewed by Mark Lam.

Removed from the nput file $(SRCROOT)/llint/LowLevelAssembler.asm and output file
$(BUILT_PRODUCTS_DIR)/LLIntOffsets/LLIntDesiredOffsets.h from the Generate Derived Sources
build phase in the LLInt Offset target.  There is no need for Xcode to do any dependency
checking with these files as the ruby script offlineasm/generate_offset_extractor.rb will
do that for us.

* JavaScriptCore.xcodeproj/project.pbxproj:

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

7 years ago[Mac] don't update caption user style sheet during parsing
eric.carlson@apple.com [Thu, 23 Oct 2014 20:27:27 +0000 (20:27 +0000)]
[Mac] don't update caption user style sheet during parsing
https://bugs.webkit.org/show_bug.cgi?id=137983
rdar://problem/18735366

Reviewed by Jer Noble.

No new tests, existing tests cover the changes.

* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF): Initialize m_updateStyleSheetTimer.
(WebCore::CaptionUserPreferencesMediaAF::updateTimerFired): Call updateCaptionStyleSheetOveride.
(WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges): Prime a timer to update
    the captions style sheet after a slight delay.

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

7 years agoWeb Inspector: Double border appearing in node sidebar in expanded items in OS X...
jonowells@apple.com [Thu, 23 Oct 2014 19:56:22 +0000 (19:56 +0000)]
Web Inspector: Double border appearing in node sidebar in expanded items in OS X Mavericks.
https://bugs.webkit.org/show_bug.cgi?id=138011

Reviewed by Timothy Hatcher.

Selector added for OS X Mavericks and earlier versions using .mac-platform.legacy.

* UserInterface/Views/DetailsSection.css:
(body.mac-platform.legacy .details-section .details-section:first-child):

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

7 years agoMove remaining Length-type properties to the new StyleBuilder
cdumez@apple.com [Thu, 23 Oct 2014 19:51:09 +0000 (19:51 +0000)]
Move remaining Length-type properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138012

Reviewed by Antti Koivisto.

Move remaining Length-type properties from DeprecatedStyleBuilder to
the new StyleBuilder so that they are now generated from
CSSPropertyNames.in as well. The patch introduces a couple of type
converters for those: "LengthSizing / LengthMaxSizing".

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertLengthSizing):
(WebCore::StyleBuilderConverter::convertLengthMaxSizing):

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

7 years agoTeach Bugzilla how to set permissions for *.js files correctly
ddkilzer@apple.com [Thu, 23 Oct 2014 19:42:03 +0000 (19:42 +0000)]
Teach Bugzilla how to set permissions for *.js files correctly

* Bugzilla/Install/Filesystem.pm:
(Bugzilla::Install::Filesystem::FILESYSTEM): Set permissions for
*.js files correctly when checksetup.pl is run.

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

7 years ago[iOS] iPhone unselecting items in <select multiple> shows incorrect values selected
commit-queue@webkit.org [Thu, 23 Oct 2014 19:38:26 +0000 (19:38 +0000)]
[iOS] iPhone unselecting items in <select multiple> shows incorrect values selected
https://bugs.webkit.org/show_bug.cgi?id=137989

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-10-23
Reviewed by Alexey Proskuryakov.

* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKMultipleSelectPicker pickerView:row:column:checked:]):
The second argument is "allowsMultipleSelection" and should only be set
when we are making a selection in a <select multiple>.

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

7 years agoCrashes under WebSelectionServiceController::hasRelevantSelectionServices
timothy_horton@apple.com [Thu, 23 Oct 2014 19:03:38 +0000 (19:03 +0000)]
Crashes under WebSelectionServiceController::hasRelevantSelectionServices
https://bugs.webkit.org/show_bug.cgi?id=138013

Reviewed by Dan Bernstein.

* WebCoreSupport/WebSelectionServiceController.mm:
(WebSelectionServiceController::hasRelevantSelectionServices):
Don't adopt this autoreleased object.

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

7 years ago[Mac] Safari cannot play 'audio/amr' content.
jer.noble@apple.com [Thu, 23 Oct 2014 18:28:56 +0000 (18:28 +0000)]
[Mac] Safari cannot play 'audio/amr' content.
https://bugs.webkit.org/show_bug.cgi?id=137894

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-can-play-case-insensitive.html

Sites are returning 'video/amr' for AMR audio content, but the IANA spec says 'audio/AMR', which is also what
AVFoundation claims to support.  However, MIME types are supposed to be case-insensitive. When creating our
mime type cache, case-fold to lower all MIME types given to us by our media frameworks.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::mimeTypeCache):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::addFileTypesToCache):

LayoutTests:

* media/media-can-play-case-insensitive-expected.txt: Added.
* media/media-can-play-case-insensitive.html: Added.

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

7 years agoAssertion failures in ImageKit soft linking
timothy_horton@apple.com [Thu, 23 Oct 2014 17:46:40 +0000 (17:46 +0000)]
Assertion failures in ImageKit soft linking
https://bugs.webkit.org/show_bug.cgi?id=138009

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm:
Soft-link ImageKit correctly.
ImageKit is inside the Quartz umbrella framework.

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

7 years ago[iOS] Fix the build after <http://trac.webkit.org/changeset/175079>
dbates@webkit.org [Thu, 23 Oct 2014 16:34:27 +0000 (16:34 +0000)]
[iOS] Fix the build after <trac.webkit.org/changeset/175079>
(https://bugs.webkit.org/show_bug.cgi?id=137995)

Rubber-stamped by Anders Carlsson.

Remove PageClientImpl::didPerformActionMenuHitTest() for iOS.

* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didPerformActionMenuHitTest): Deleted.

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

7 years agoMove Length-type CSS properties from DeprecatedStyleBuilder to the new Style Builder
cdumez@apple.com [Thu, 23 Oct 2014 16:14:25 +0000 (16:14 +0000)]
Move Length-type CSS properties from DeprecatedStyleBuilder to the new Style Builder
https://bugs.webkit.org/show_bug.cgi?id=138000

Reviewed by Andreas Kling.

Move most Length-type CSS properties from DeprecatedStyleBuilder to the
new Style Builder so that they are now generated. This patch adds
support for a "Converter" option in CSSPropertyNames.in that can be
used to specify a type converter function in
css/StyleBuilderConverter.h. This patch adds support for Length and
LengthOrAuto converters so that most Length-type properties can now be
generated.

Another converter (likely called "LengthSizing") will be needed to
generate the remaining Length-type properties. This will be taken care
of in a follow-up patch.

This patch is inspired by the following Blink revision by
<timloh@chromium.org>:
https://src.chromium.org/viewvc/blink?view=rev&revision=150500

No new tests, no behavior change.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/SVGCSSPropertyNames.in:
* css/StyleBuilder.h:
* css/StyleBuilderConverter.h: Added.
(WebCore::StyleBuilderConverter::convertLength):
(WebCore::StyleBuilderConverter::convertLengthOrAuto):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* css/makeprop.pl:

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

7 years agoChange CallFrame::lexicalGlobalObject() to use Callee instead of JSScope
msaboff@apple.com [Thu, 23 Oct 2014 13:15:58 +0000 (13:15 +0000)]
Change CallFrame::lexicalGlobalObject() to use Callee instead of JSScope
https://bugs.webkit.org/show_bug.cgi?id=136901

Reviewed by Mark Lam.

Implement ExecState::lexicalGlobalObject() using Callee.

* runtime/JSScope.h:
(JSC::ExecState::lexicalGlobalObject):

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

7 years agoConst-ify static s_resourceType members in RenderSVGResource* classes
zandobersek@gmail.com [Thu, 23 Oct 2014 12:20:44 +0000 (12:20 +0000)]
Const-ify static s_resourceType members in RenderSVGResource* classes
https://bugs.webkit.org/show_bug.cgi?id=137911

Reviewed by Andreas Kling.

Make s_resourceType static members in RenderSVGResource* classes const.
Also update the resourceType() methods, where necessary, so that they
return the s_resourceType constant.

* rendering/svg/RenderSVGResourceClipper.cpp:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceLinearGradient.cpp:
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.cpp:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.cpp:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.cpp:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGResourceSolidColor.cpp:
* rendering/svg/RenderSVGResourceSolidColor.h:

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

7 years ago[TexMap] Clean up virtual method declarations in GraphicsLayerTextureMapper
zandobersek@gmail.com [Thu, 23 Oct 2014 11:17:38 +0000 (11:17 +0000)]
[TexMap] Clean up virtual method declarations in GraphicsLayerTextureMapper
https://bugs.webkit.org/show_bug.cgi?id=137957

Reviewed by Martin Robinson.

Added override notation to the GraphicsLayerTextureMapper methods that are
overriding the base methods from the GraphicsLayer class and don't have it yet.
Also reordered these methods to follow the order of declaration in the
GraphicsLayer class.

Removed ::setName() and ::willBeDestroyed() methods since they just called
the base class' methods.

Also removed the ::solidColor() and ::changeMask() methods. The first one was
only called in one place which can reference the m_solidColor member directly,
and the second one wasn't used at all.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::GraphicsLayerTextureMapper::setName): Deleted.
(WebCore::GraphicsLayerTextureMapper::willBeDestroyed): Deleted.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::GraphicsLayerTextureMapper::solidColor): Deleted.
(WebCore::GraphicsLayerTextureMapper::usesContentsLayer): Deleted.
(WebCore::GraphicsLayerTextureMapper::platformLayer): Deleted.
(WebCore::GraphicsLayerTextureMapper::changeMask): Deleted.

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

7 years ago[GTK] Fix build on Hurd
berto@igalia.com [Thu, 23 Oct 2014 09:55:03 +0000 (09:55 +0000)]
[GTK] Fix build on Hurd
https://bugs.webkit.org/show_bug.cgi?id=138003

Reviewed by Carlos Garcia Campos.

* wtf/InlineASM.h:
* wtf/Platform.h:

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

7 years ago[EFL] Fix build problem after r175098
k.czech@samsung.com [Thu, 23 Oct 2014 09:35:46 +0000 (09:35 +0000)]
[EFL] Fix build problem after r175098
https://bugs.webkit.org/show_bug.cgi?id=138002

Reviewed by Gyuyoung Kim.

Add ECORE_X dependency to avoid linking problems while building unit tests.

* PlatformEfl.cmake:

Change-Id: I9228d141456c3b34b61424aa4715cef85534104f

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

7 years agoAX: Do the early return when role is different than UnknownRole
k.czech@samsung.com [Thu, 23 Oct 2014 09:02:00 +0000 (09:02 +0000)]
AX: Do the early return when role is different than UnknownRole
https://bugs.webkit.org/show_bug.cgi?id=137880

Reviewed by Chris Fleizach.

We do not need to call ariaRoleAttribute() to check whether m_ariaRole is different than UnknownRole.
Just check m_ariaRole instead.

No new tests, no behavior change, just some cleanup

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::determineAccessibilityRole):

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

7 years ago[EFL] Set proper default value for WebPageAccessibilityObject
k.czech@samsung.com [Thu, 23 Oct 2014 08:21:40 +0000 (08:21 +0000)]
[EFL] Set proper default value for WebPageAccessibilityObject
https://bugs.webkit.org/show_bug.cgi?id=137951

Reviewed by Csaba Osztrogonác.

Initial value for WebPageAccessibilityObject should be nullptr.

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

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

7 years ago[EFL] Introduce EFL Accessibility in WebKit
k.czech@samsung.com [Thu, 23 Oct 2014 08:02:35 +0000 (08:02 +0000)]
[EFL] Introduce EFL Accessibility in WebKit
https://bugs.webkit.org/show_bug.cgi?id=137819

Reviewed by Gyuyoung Kim.

EFL Accessibility provides an API that is used to notify clients that certain
Accessibility events occur. Utilizing it makes WebKit-EFL coherent with EFL native
accessibility approach.

* PlatformEfl.cmake:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
* UIProcess/API/efl/EwkView.h:
(EwkView::webAccessibility):
* UIProcess/API/efl/WebAccessibility.cpp: Added.
(WebKit::WebAccessibility::WebAccessibility):
(WebKit::WebAccessibility::~WebAccessibility):
(WebKit::WebAccessibility::eventHandler):
(WebKit::WebAccessibility::executeGestureAction):
(WebKit::WebAccessibility::activate):
(WebKit::WebAccessibility::read):
(WebKit::WebAccessibility::readNext):
(WebKit::WebAccessibility::readPrev):
(WebKit::WebAccessibility::up):
(WebKit::WebAccessibility::down):
(WebKit::WebAccessibility::scroll):
(WebKit::WebAccessibility::mouse):
(WebKit::WebAccessibility::enable):
(WebKit::WebAccessibility::disable):
* UIProcess/API/efl/WebAccessibility.h: Added.
(WebKit::WebAccessibility::activateAction):
(WebKit::WebAccessibility::nextAction):
(WebKit::WebAccessibility::prevAction):
(WebKit::WebAccessibility::readAction):
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_accessibility_action_activate_get):
(ewk_view_accessibility_action_next_get):
(ewk_view_accessibility_action_prev_get):
(ewk_view_accessibility_action_read_by_point_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Added.
(EWK2Accessibility::xwindow):
(TEST_F):
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::accessibilityObjectReadByPoint):
(WebKit::WebPageProxy::accessibilityObjectReadPrevious):
(WebKit::WebPageProxy::accessibilityObjectReadNext):

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

7 years agoCSS JIT: Implement :matches
utatane.tea@gmail.com [Thu, 23 Oct 2014 07:27:38 +0000 (07:27 +0000)]
CSS JIT: Implement :matches
https://bugs.webkit.org/show_bug.cgi?id=137947

Reviewed by Benjamin Poulain.

Source/WebCore:

Initial patch for supporting :matches in CSS JIT.
In this patch, we implement :matches
by leveraging the generalized nested backtracking implementation.

Tests: fast/selectors/matches-backtracking.html
       fast/selectors/matches-complex.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::hasAnyCombinators):
(WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
(WebCore::SelectorCompiler::computeBacktrackingInformation):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesMatchesPseudoClass):

LayoutTests:

* fast/selectors/matches-backtracking-expected.txt: Added.
* fast/selectors/matches-backtracking.html: Added.
* fast/selectors/matches-complex-expected.txt: Added.
* fast/selectors/matches-complex.html: Added.
    - nested :matches
    - multiple :matches
    - :matches with CannotMatchAnything
    - :matches with :not
    - :matches(with a lot of selectors)
    are tested.

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

7 years agoRenderThemeGtk::mediaControlsScript() is not defined when VIDEO is disabled.
commit-queue@webkit.org [Thu, 23 Oct 2014 07:17:50 +0000 (07:17 +0000)]
RenderThemeGtk::mediaControlsScript() is not defined when VIDEO is disabled.
<https://webkit.org/b/137970>.

Patch by Milan Crha <mcrha@redhat.com> on 2014-10-23
Reviewed by Carlos Garcia Campos.

* rendering/RenderThemeGtk.cpp:

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

7 years agoPrefix isnan() with std::.
commit-queue@webkit.org [Thu, 23 Oct 2014 06:54:06 +0000 (06:54 +0000)]
Prefix isnan() with std::.
<https://webkit.org/b/137966>.

Patch by Milan Crha <mcrha@redhat.com> on 2014-10-22
Reviewed by Carlos Garcia Campos.

* profiler/ProfileNode.h:
(JSC::ProfileNode::Call::setStartTime):
(JSC::ProfileNode::Call::setElapsedTime):

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

7 years agoDo not include GraphicsContext3D.h when 3D_GRAPHICS is not used.
commit-queue@webkit.org [Thu, 23 Oct 2014 06:45:49 +0000 (06:45 +0000)]
Do not include GraphicsContext3D.h when 3D_GRAPHICS is not used.
<https://webkit.org/b/137969>.

Patch by Milan Crha <mcrha@redhat.com> on 2014-10-22
Reviewed by Carlos Garcia Campos.

* platform/graphics/cairo/GraphicsContext3DCairo.cpp:

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

7 years agoDo not build WidgetBackingStoreGtkX11 when not used.
commit-queue@webkit.org [Thu, 23 Oct 2014 06:41:51 +0000 (06:41 +0000)]
Do not build WidgetBackingStoreGtkX11 when not used.
<https://webkit.org/b/137972>.

Patch by Milan Crha <mcrha@redhat.com> on 2014-10-22
Reviewed by Carlos Garcia Campos.

* platform/gtk/WidgetBackingStoreGtkX11.cpp:
* platform/gtk/WidgetBackingStoreGtkX11.h:

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

7 years ago[iOS] Toggling overflow:scroll to hidden on element with -webkit-overflow-scrolling...
simon.fraser@apple.com [Thu, 23 Oct 2014 06:15:44 +0000 (06:15 +0000)]
[iOS] Toggling overflow:scroll to hidden on element with -webkit-overflow-scrolling:touch can cause children to disappear
https://bugs.webkit.org/show_bug.cgi?id=137999
rdar://problem/18425550

Reviewed by Zalan Bujtas.

Source/WebCore:

When toggling overflow from scroll to hidden on an element with -webkit-overflow-scrolling:touch,
we'd fail to do a compositing layer rebuild, which caused various issues like unparented
descendants, and misplaced and unrepainted content.

This happened because we'd get to RenderLayerBacking::updateConfiguration() via styleChanged
with the view needing layout, so never hit the updateScrollingLayers() code, and the subsequent
updateCompositingLayers() would be a no-op.

Fix by explicitly triggering a layer rebuild when style changes such that the touch-scrollability
of an element changes, as we do for changes in clip.

Test: compositing/scrolling/touch-scroll-to-clip.html

* rendering/RenderLayerCompositor.cpp:
(WebCore::isScrollableOverflow):
(WebCore::styleHasTouchScrolling):
(WebCore::styleChangeRequiresLayerRebuild):

LayoutTests:

Test that toggles overflow on a touch scrolling div, and dumps layers.

* compositing/scrolling/touch-scroll-to-clip-expected.txt: Added.
* compositing/scrolling/touch-scroll-to-clip.html: Added.
* platform/ios-simulator/compositing/scrolling/touch-scroll-to-clip-expected.txt: Added.

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

7 years agoClean up virtual functions in rendering/
cdumez@apple.com [Thu, 23 Oct 2014 04:32:27 +0000 (04:32 +0000)]
Clean up virtual functions in rendering/
https://bugs.webkit.org/show_bug.cgi?id=137984

Reviewed by Darin Adler.

Clean up virtual functions in rendering/ by:
- Making virtual functions final when possible
- Making classes final when possible
- Using 'override' when appropriate
- Explicitly marking functions / destructors as virtual when they are
  inherently virtual
- Dropping virtual destructors when the class does not have subclasses
  and mark the class as final, to get rid of unnecessary vtables
- Making isXXX() virtual functions private on XXX classes to avoid
  unnecessary type checks
- De-virtualizing some functions that do not need to be virtual
- Dropping final for virtual functions in classes already marked as
  final

No new tests, no behavior change.

* html/shadow/SliderThumbElement.cpp:
* rendering/AutoTableLayout.h:
* rendering/ClipPathOperation.h:
(WebCore::ClipPathOperation::type):
(WebCore::ClipPathOperation::isSameType):
* rendering/EllipsisBox.h:
* rendering/FixedTableLayout.h:
* rendering/InlineElementBox.h:
* rendering/RenderBlockFlow.h:
* rendering/RenderCombineText.h:
* rendering/RenderCounter.h:
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.h:
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.h:
* rendering/RenderLayerFilterInfo.h:
* rendering/RenderLineBreak.h:
* rendering/RenderMarquee.h:
* rendering/RenderMediaControlElements.h:
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderMultiColumnSpannerPlaceholder.h:
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderQuote.h:
* rendering/RenderRegion.h:
(WebCore::RenderRegion::renderName): Deleted.
* rendering/RenderReplica.h:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.h:
* rendering/RenderScrollbar.h:
* rendering/RenderScrollbarPart.h:
* rendering/RenderScrollbarTheme.h:
(WebCore::RenderScrollbarTheme::~RenderScrollbarTheme): Deleted.
(WebCore::RenderScrollbarTheme::scrollbarThickness): Deleted.
(WebCore::RenderScrollbarTheme::buttonsPlacement): Deleted.
(WebCore::RenderScrollbarTheme::supportsControlTints): Deleted.
(WebCore::RenderScrollbarTheme::shouldCenterOnThumb): Deleted.
(WebCore::RenderScrollbarTheme::initialAutoscrollTimerDelay): Deleted.
(WebCore::RenderScrollbarTheme::autoscrollTimerDelay): Deleted.
(WebCore::RenderScrollbarTheme::registerScrollbar): Deleted.
(WebCore::RenderScrollbarTheme::unregisterScrollbar): Deleted.
* rendering/RenderSnapshottedPlugIn.h:
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextFragment.h:
* rendering/RenderThemeGtk.h:
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeWin.h:
* rendering/RenderVideo.h:
* rendering/TextAutosizer.h:
* rendering/TrailingFloatsRootInlineBox.h:
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLMenclose.h:
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRadicalOperator.h:
* rendering/mathml/RenderMathMLRoot.h:
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLScripts.h:
* rendering/mathml/RenderMathMLToken.h:
* rendering/mathml/RenderMathMLUnderOver.h:
* rendering/shapes/BoxShape.h:
* rendering/shapes/PolygonShape.h:
* rendering/shapes/RasterShape.h:
* rendering/shapes/RectangleShape.h:
* rendering/style/BasicShapes.h:
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::computeIntrinsicDimensions): Deleted.
* rendering/svg/RenderSVGBlock.h:
* rendering/svg/RenderSVGContainer.h:
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.h:
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGRootInlineBox.h:

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

7 years agoREGRESSION(r175000): Crash in SourceBufferPrivateAVFObjC::destroyParser()
jer.noble@apple.com [Thu, 23 Oct 2014 03:49:41 +0000 (03:49 +0000)]
REGRESSION(r175000): Crash in SourceBufferPrivateAVFObjC::destroyParser()
https://bugs.webkit.org/show_bug.cgi?id=137990

Reviewed by Alexey Proskuryakov.

NULL-check m_mediaSource before using.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::destroyParser):

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

7 years agocommitqueuetask_unittest.py should be made more concise.
commit-queue@webkit.org [Thu, 23 Oct 2014 02:54:24 +0000 (02:54 +0000)]
commitqueuetask_unittest.py should be made more concise.
https://bugs.webkit.org/show_bug.cgi?id=137985

Patch by Jake Nielsen <jacob_nielsen@apple.com> on 2014-10-22
Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
Refactors tests to use MockSimpleTestPlanCommitQueue where possible.
(MockCommitQueue.__init__):
(MockCommitQueue.report_flaky_tests):
(MockCommitQueue):
(MockCommitQueue.get_reported_flaky_tests):
(MockSimpleTestPlanCommitQueue.__init__):
(MockSimpleTestPlanCommitQueue.run_command):
(MockSimpleTestPlanCommitQueue.did_run_clean_tests):
(CommitQueueTaskTest._run_and_expect_patch_analysis_result):
(test_land_failure):
(test_failed_archive):
(test_double_flaky_test_failure):
(test_test_failure):
(test_red_test_failure):
(test_very_red_tree_retry):
(test_red_tree_patch_rejection):
(test_one_flaky_test):
(test_tree_more_red_than_patch):
(MockCommitQueue.test_results): Deleted.
(test_simple_flaky_test_failure): Deleted.
(_expect_validate): Deleted.
(_expect_validate.MockDelegate): Deleted.
(_expect_validate.MockDelegate.refetch_patch): Deleted.
(_expect_validate.MockDelegate.expected_failures): Deleted.
(_mock_patch): Deleted.
(test_validate): Deleted.
* Scripts/webkitpy/tool/bot/patchanalysistask.py:
Fixes a bug that slipped through the cracks prior to this change.
(PatchAnalysisTask._test_patch):

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

7 years ago[iOS WK2] Protect WKWebView dynamic viewport change against empty sizes
benjamin@webkit.org [Thu, 23 Oct 2014 02:40:07 +0000 (02:40 +0000)]
[iOS WK2] Protect WKWebView dynamic viewport change against empty sizes
https://bugs.webkit.org/show_bug.cgi?id=137988
rdar://problem/17785162

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-10-22
Reviewed by Simon Fraser.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
The algorithm behind dynamic size update finds the best content area to put in the viewport
after a viewport change. If an initial size or a target size is empty, it is impossible to
compute a reasonable area to keep in the view. We end up handling NaN scales
and/or sizes and CoreAnimation raises an exception when applying that value.

This patch add early exits when that occurs and fallback to the common code.

On Input, things are easy. If any of the initial values is empty, we just execute the updateBlock
without attempting any of the dynamic behaviors.

For the target values, things are trickier. We do not know what the values are going to be before we execute
the block. But once we executed the block, we have already skipped all the setters that call the web process.

To handle that, every value is set manually on WebPageProxy. This is a bit unfortunate because the setters
get yet another entry point.

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

7 years agoRefactoring to simplify some code in DatePrototype.cpp.
mark.lam@apple.com [Thu, 23 Oct 2014 02:39:14 +0000 (02:39 +0000)]
Refactoring to simplify some code in DatePrototype.cpp.
<https://webkit.org/b/137997>

Reviewed by Filip Pizlo.

A bunch of functions in DatePrototype.cpp have the pattern of loading a
constant into a local variable only to pass it to a callee function
immediately after.  There is no other use for that variable.  This adds
additional verbosity with no added benefit.

This patch refactors those functions to just pass the constant arg directly.

* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):

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

7 years agoEFL and GTK ports have broken since r175075
gyuyoung.kim@samsung.com [Thu, 23 Oct 2014 01:37:08 +0000 (01:37 +0000)]
EFL and GTK ports have broken since r175075
https://bugs.webkit.org/show_bug.cgi?id=137995

Unreviewed, EFL and GTK ports build fix.

Need to use PLATFORM(MAC) guard for ActionMenuHitTest functions.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::removeNavigationGestureSnapshot):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

7 years agoString(new Date(Mar 30 2014 01:00:00)) is wrong in CET
commit-queue@webkit.org [Thu, 23 Oct 2014 01:15:08 +0000 (01:15 +0000)]
String(new Date(Mar 30 2014 01:00:00)) is wrong in CET
https://bugs.webkit.org/show_bug.cgi?id=130967

Patch by Byungseon Shin <sun.shin@lge.com> on 2014-10-22
Reviewed by Mark Lam.

Source/JavaScriptCore:

By definition of calculateLocalTimeOffset, input time should be UTC time.
But there are many cases when input time is based on local time.
So, it gives erroneous results while calculating offset of DST boundary time.
By adding a argument to distinguish UTC and local time, we can get the correct offset.

* JavaScriptCore.order:
* runtime/DateConstructor.cpp:
(JSC::constructDate):
(JSC::callDate):
(JSC::dateUTC):
* runtime/DateInstance.cpp:
(JSC::DateInstance::calculateGregorianDateTime):
(JSC::DateInstance::calculateGregorianDateTimeUTC):
* runtime/DatePrototype.cpp:
(JSC::setNewValueFromTimeArgs):
(JSC::setNewValueFromDateArgs):
(JSC::dateProtoFuncSetMilliSeconds):
(JSC::dateProtoFuncSetUTCMilliseconds):
(JSC::dateProtoFuncSetSeconds):
(JSC::dateProtoFuncSetUTCSeconds):
(JSC::dateProtoFuncSetMinutes):
(JSC::dateProtoFuncSetUTCMinutes):
(JSC::dateProtoFuncSetHours):
(JSC::dateProtoFuncSetUTCHours):
(JSC::dateProtoFuncSetDate):
(JSC::dateProtoFuncSetUTCDate):
(JSC::dateProtoFuncSetMonth):
(JSC::dateProtoFuncSetUTCMonth):
(JSC::dateProtoFuncSetFullYear):
(JSC::dateProtoFuncSetUTCFullYear):
(JSC::dateProtoFuncSetYear):
* runtime/JSDateMath.cpp:
(JSC::localTimeOffset):
(JSC::gregorianDateTimeToMS):
(JSC::msToGregorianDateTime):
(JSC::parseDateFromNullTerminatedCharacters):
* runtime/JSDateMath.h:
* runtime/VM.h:
(JSC::LocalTimeOffsetCache::LocalTimeOffsetCache):
(JSC::LocalTimeOffsetCache::reset):
Passing TimeType argument to distingush UTC time and local time.

Source/WTF:

By definition of calculateLocalTimeOffset, input time should be UTC time.
But there are many cases when input time is based on local time.
So, it gives erroneous results while calculating offset of DST boundary time.
By adding a argument to distinguish UTC and local time, we can get the correct offset.

* wtf/DateMath.cpp:
(WTF::calculateLocalTimeOffset):
(WTF::parseDateFromNullTerminatedCharacters):
Compensate time offset depends on UTC time or local time.
* wtf/DateMath.h:
Add argument to differenciate UTC or local time.

LayoutTests:

Set latest DST timezone boundary values on
<http://www.timeanddate.com/time/zone/usa/los-angeles>

* js/dom/script-tests/date-DST-time-cusps.js:

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

7 years ago[Win] Rebaseline various tests after switching to Windows rendering for native controls.
bfulgham@apple.com [Thu, 23 Oct 2014 01:13:35 +0000 (01:13 +0000)]
[Win] Rebaseline various tests after switching to Windows rendering for native controls.

* platform/win/editing/inserting/before-after-input-element-expected.txt: Added.
* platform/win/editing/pasteboard/4806874-expected.txt: Added.
* platform/win/editing/pasteboard/pasting-tabs-expected.txt:
* platform/win/editing/selection/4397952-expected.txt:
* platform/win/editing/selection/4895428-3-expected.txt: Added.
* platform/win/editing/selection/select-across-readonly-input-4-expected.txt:
* platform/win/editing/selection/select-across-readonly-input-5-expected.txt:
* platform/win/fast/block/basic: Added.
* platform/win/fast/block/basic/fieldset-stretch-to-legend-expected.txt: Added.
* platform/win/fast/block/float/032-expected.txt: Added.
* platform/win/fast/css/text-input-with-webkit-border-radius-expected.txt:
* platform/win/fast/dom/isindex-001-expected.txt: Added.
* platform/win/fast/dom/isindex-002-expected.txt: Added.
* platform/win/fast/forms/007-expected.txt: Added.
* platform/win/fast/forms/button-align-expected.txt: Added.
* platform/win/fast/forms/button-cannot-be-nested-expected.txt: Added.
* platform/win/fast/forms/button-default-title-expected.txt:
* platform/win/fast/forms/button-table-styles-expected.txt:
* platform/win/fast/forms/button-white-space-expected.txt: Added.
* platform/win/fast/forms/encoding-test-expected.txt: Added.
* platform/win/fast/forms/floating-textfield-relayout-expected.txt: Added.
* platform/win/fast/forms/input-align-expected.txt: Added.
* platform/win/fast/forms/input-appearance-bkcolor-expected.txt: Added.
* platform/win/fast/forms/input-appearance-default-bkcolor-expected.txt: Added.
* platform/win/fast/forms/input-appearance-disabled-expected.txt: Added.
* platform/win/fast/forms/input-appearance-preventDefault-expected.txt: Added.
* platform/win/fast/forms/input-appearance-width-expected.txt: Added.
* platform/win/fast/forms/input-baseline-expected.txt: Added.
* platform/win/fast/forms/input-disabled-color-expected.txt: Added.
* platform/win/fast/forms/input-field-text-truncated-expected.txt: Added.
* platform/win/fast/forms/input-placeholder-visibility-1-expected.txt: Added.
* platform/win/fast/forms/input-placeholder-visibility-3-expected.txt: Added.
* platform/win/fast/forms/input-readonly-empty-expected.txt: Added.
* platform/win/fast/forms/input-table-expected.txt: Added.
* platform/win/fast/forms/input-text-click-inside-expected.txt: Added.
* platform/win/fast/forms/input-text-option-delete-expected.txt: Added.
* platform/win/fast/forms/input-text-scroll-left-on-blur-expected.txt: Added.
* platform/win/fast/forms/input-text-self-emptying-click-expected.txt: Added.
* platform/win/fast/forms/input-text-word-wrap-expected.txt: Added.
* platform/win/fast/forms/menulist-restrict-line-height-expected.txt: Added.
* platform/win/fast/forms/menulist-style-color-expected.txt:
* platform/win/fast/forms/minWidthPercent-expected.txt: Added.
* platform/win/fast/forms/placeholder-position-expected.txt: Added.
* platform/win/fast/forms/select-listbox-multiple-no-focusring-expected.txt:
* platform/win/fast/forms/select-overflow-scroll-expected.txt:
* platform/win/fast/forms/select-overflow-scroll-inherited-expected.txt:
* platform/win/fast/forms/text-style-color-expected.txt: Added.
* platform/win/fast/forms/textfield-focus-ring-expected.txt: Added.
* platform/win/fast/forms/textfield-outline-expected.txt: Added.
* platform/win/fast/forms/visual-hebrew-text-field-expected.txt: Added.
* platform/win/fast/lists/dynamic-marker-crash-expected.txt: Added.
* platform/win/fast/table/spanOverlapRepaint-expected.txt: Added.
* platform/win/fast/table/text-field-baseline-expected.txt: Added.
* platform/win/fast/text/textIteratorNilRenderer-expected.txt:
* platform/win/svg/custom/inline-svg-in-html-expected.txt: Added.
* platform/win/svg/hixie/mixed: Added.
* platform/win/svg/hixie/mixed/003-expected.txt: Added.
* platform/win/tables/mozilla/bugs/45621-expected.txt: Added.
* platform/win/tables/mozilla/bugs/bug138725-expected.txt:
* platform/win/tables/mozilla/bugs/bug194024-expected.txt: Added.
* platform/win/tables/mozilla/bugs/bug24200-expected.txt: Added.
* platform/win/tables/mozilla/bugs/bug2479-3-expected.txt:
* platform/win/tables/mozilla/bugs/bug2479-4-expected.txt:
* platform/win/tables/mozilla/bugs/bug39209-expected.txt:
* platform/win/tables/mozilla/bugs/bug4527-expected.txt:
* platform/win/tables/mozilla/bugs/bug46368-1-expected.txt:
* platform/win/tables/mozilla/bugs/bug46368-2-expected.txt:
* platform/win/tables/mozilla/bugs/bug51727-expected.txt:
* platform/win/tables/mozilla/bugs/bug52505-expected.txt:
* platform/win/tables/mozilla/bugs/bug52506-expected.txt:
* platform/win/tables/mozilla/bugs/bug59354-expected.txt: Added.
* platform/win/tables/mozilla/bugs/bug60749-expected.txt:
* platform/win/tables/mozilla/bugs/bug68912-expected.txt: Added.
* platform/win/tables/mozilla/bugs/bug7342-expected.txt:
* platform/win/tables/mozilla/bugs/bugs28928-expected.txt: Added.
* platform/win/tables/mozilla/collapsing_borders/bug41262-4-expected.txt:
* platform/win/tables/mozilla_expected_failures/bugs/bug92647-1-expected.txt: Added.
* platform/win/tables/mozilla_expected_failures/collapsing_borders: Added.
* platform/win/tables/mozilla_expected_failures/collapsing_borders/bug41262-5-expected.txt: Added.
* platform/win/tables/mozilla_expected_failures/collapsing_borders/bug41262-6-expected.txt: Added.
* platform/win/tables/mozilla_expected_failures/core/captions1-expected.txt:
* platform/win/tables/mozilla_expected_failures/core/captions2-expected.txt:

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

7 years agoFlakiness dashboard should support OS X Yosemite
ap@apple.com [Thu, 23 Oct 2014 00:05:03 +0000 (00:05 +0000)]
Flakiness dashboard should support OS X Yosemite
https://bugs.webkit.org/show_bug.cgi?id=137986

Reviewed by Ryosuke Niwa.

* TestResultServer/app.yaml:
* TestResultServer/static-dashboards/builders.jsonp:
* TestResultServer/static-dashboards/flakiness_dashboard.js:

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

7 years agoAdd action menu support for images
timothy_horton@apple.com [Wed, 22 Oct 2014 23:48:38 +0000 (23:48 +0000)]
Add action menu support for images
https://bugs.webkit.org/show_bug.cgi?id=137987
<rdar://problem/18717767>

Reviewed by Anders Carlsson, Sam Weinig, and Beth Dakin.

* Resources/AddImageToPhotos.pdf: Added.
* Resources/CopyImage.pdf: Added.
* Resources/SaveImageToDownloads.pdf: Added.
* Resources/ShareImage.pdf: Added.
Add some temporary artwork.

* Scripts/webkit/messages.py:
(struct_or_class):
ActionMenuHitTestResult is a struct.

* Shared/API/c/WKActionMenuItemTypes.h:
Add new items for image menus.

* Shared/mac/ActionMenuHitTestResult.cpp:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
For now, pass the hit image data across to the UI process as a ShareableBitmap.

* Shared/mac/ActionMenuHitTestResult.h:

* UIProcess/API/mac/WKView.mm:
(-[WKView _createActionMenuItemForTag:]):
Refactor action menu item creation into a single function, so that
callers can share code and be much simpler.

(webKitBundleImageNamed):
Add a helper to acquire an image from the WebKit2 bundle.

(-[WKView _copyImage:]):
(-[WKView _saveImageToDownloads:]):
(temporaryPhotosDirectoryPath):
(pathToPhotoOnDisk):
(-[WKView _addImageToPhotos:]):
Add rudimentary implementations of image actions.

(-[WKView _defaultMenuItemsForImage]):
Support the image menu, plus a submenu acquired from NSSharingServicePicker
for the Share menu.

(-[WKView _defaultMenuItems]):
Call _defaultMenuItemsForImage if needed.

(-[WKView _updateActionMenu]):
Refactor _updateActionMenu out of prepareForMenu:withEvent:.

(-[WKView prepareForMenu:withEvent:]):
Ask the Web process to re-hit-test under the location that the menu
will appear. Mark the menu as pending.

(-[WKView _didPerformActionMenuHitTest:]):
When we get the hit test reply, record the result for future use.

(-[WKView willOpenMenu:withEvent:]):
If we got a hit test reply, rebuild the menu immediately. If not, wait
up to 500ms for the reply to come in. This eventually needs to be
cancellable if the menu is rejected in the interim.

(-[WKView didCloseMenu:withEvent:]):
Clear all state when the menu closes.

* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performActionMenuHitTestAtLocation):
(WebKit::WebPageProxy::didPerformActionMenuHitTest):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didPerformActionMenuHitTest):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Plumb didPerformActionMenuHitTest back from WebPageProxy to WKView.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Hit test at the given location, recording the image data if there is any,
and return the result to the UI process.

* WebKit2.xcodeproj/project.pbxproj:
Add the PDFs.

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

7 years agoSVG loaded through html <img> can't request to load any external resources.
dbates@webkit.org [Wed, 22 Oct 2014 23:43:11 +0000 (23:43 +0000)]
SVG loaded through html <img> can't request to load any external resources.
https://bugs.webkit.org/show_bug.cgi?id=137762.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2014-10-22
Reviewed by Daniel Bates.

Source/WebCore:

SVG images have unique security rules that prevent them from loading any external
resources. This patch enforces these rules in CachedResourceLoader::canRequest for
all non-data-uri resources.

The fix and the tests are ported but modified a little from the chromium fix:
http://src.chromium.org/viewvc/blink?view=rev&rev=176084

Test: http/tests/security/svg-image-with-cached-remote-image.html
      http/tests/security/svg-image-with-css-cross-domain.html

For the SVG image, prevent loading any external sub-resource except for data urls.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):

LayoutTests:

Ensure that SVG images, which are loaded through the <img> tag or through the
CSS background image, cannot load any external sub-resource except for data-
URL resources (though this doesn't work at the time of writing, see bug #137941).
Also ensure the same rule is enforced on cached resources.

The tests are ported but modified a little from the chromium fix:
http://src.chromium.org/viewvc/blink?view=rev&rev=176084

Set the circle background to orange
* http/tests/security/resources/image-with-css-cross-domain-circle.css: Added.
(circle):

Set the circle stroke-width = 2 and the circle stroke = red
* http/tests/security/resources/image-with-css-cross-domain-circle2.css: Added.
(circle):

This svg references the two css files: one is relative path and the other is absolute path
* http/tests/security/resources/image-with-css-cross-domain.svg: Added.

This svg references an external image.
* http/tests/security/resources/image-with-remote-image.svg: Added.

A helper css which sets the formatting style for some html tags
* http/tests/security/svg-image-with-css-cross-domain.css: Added.
(span):
(span.circle-css-cross-domain):
(embed):
(iframe):

Test the svg which is referenced as a cached image by an <object> tag, does not load
external sub-resource.
* http/tests/security/svg-image-with-cached-remote-image-expected.html: Added.
* http/tests/security/svg-image-with-cached-remote-image.html: Added.

Test loading sub-resources for an svg which is included in the html by different ways
and which references external css files.
Ensure the image object does not load any external sub-resources.
* http/tests/security/svg-image-with-css-cross-domain-expected.html: Added.
* http/tests/security/svg-image-with-css-cross-domain.html: Added.

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

7 years agocommitqueuetask should include more tests to ensure that the behavior
commit-queue@webkit.org [Wed, 22 Oct 2014 23:27:27 +0000 (23:27 +0000)]
commitqueuetask should include more tests to ensure that the behavior
of PatchAnalysisTask._test_patch() is well defined
https://bugs.webkit.org/show_bug.cgi?id=137977

Patch by Jake Nielsen <jacob_nielsen@apple.com> on 2014-10-22
Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
Adds the MockSimpleTestPlanCommitQueue class, which makes it easier
and more readable to define tests that are meant to test the behaviour
of PatchAnalysisTask._test_patch(), and adds several unit tests.
(FailingTestCommitQueue.test_results):
(PatchAnalysisResult):
(MockSimpleTestPlanCommitQueue):
(MockSimpleTestPlanCommitQueue.__init__):
(MockSimpleTestPlanCommitQueue.run_command):
(MockSimpleTestPlanCommitQueue._mock_test_result):
(MockSimpleTestPlanCommitQueue.test_results):
(CommitQueueTaskTest._run_and_expect_patch_analysis_result):
(test_flaky_test_failure):
(test_failed_archive):
(test_two_flaky_tests):
(test_one_flaky_test):
(test_very_flaky_patch):
(test_very_flaky_patch_with_some_tree_redness):
(test_different_test_failures):
(test_different_test_failures_with_some_tree_redness):
(test_mildly_flaky_patch):
(test_mildly_flaky_patch_with_some_tree_redness):
(test_tree_more_red_than_patch):

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

7 years agoMediaPlayerPrivateAVFoundation::hasAudio() returns false even when there is an audibl...
adachan@apple.com [Wed, 22 Oct 2014 23:18:30 +0000 (23:18 +0000)]
MediaPlayerPrivateAVFoundation::hasAudio() returns false even when there is an audible AVMediaSelectionOption selected
https://bugs.webkit.org/show_bug.cgi?id=137935

Reviewed by Eric Carlson.

Source/WebCore:

Set hasAudio to true if there's a selected audible AVMediaSelectionOption
after the call to updateAudioTracks(). Ditto for video.

Test: http/tests/media/hls/hls-audio-tracks-has-audio.html

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):

* testing/Internals.cpp:
(WebCore::Internals::mediaElementHasCharacteristic):
* testing/Internals.h:
* testing/Internals.idl:
Add internals.mediaElementHasCharacteristic for the new test.

LayoutTests:

* http/tests/media/hls/hls-audio-tracks-has-audio-expected.txt: Added.
* http/tests/media/hls/hls-audio-tracks-has-audio.html: Added.

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

7 years agoRemove WidgetBackingStoreCairo::create() factory function
gyuyoung.kim@samsung.com [Wed, 22 Oct 2014 23:03:15 +0000 (23:03 +0000)]
Remove WidgetBackingStoreCairo::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137943

Reviewed by Darin Adler.

WidgetBackingStoreCairo::create() can be replaced by std::make_unique<>.
Thus this patch removes it, then use std::make_unique<>|std::unique_ptr<>.

Source/WebCore:

No new tests, no behavior changes.

* platform/cairo/WidgetBackingStoreCairo.cpp:
(WebCore::WidgetBackingStoreCairo::create): Deleted.
* platform/cairo/WidgetBackingStoreCairo.h:
* platform/gtk/WidgetBackingStoreGtkX11.cpp:
(WebCore::WidgetBackingStoreGtkX11::create): Deleted.
* platform/gtk/WidgetBackingStoreGtkX11.h:

Source/WebKit2:

* UIProcess/BackingStore.h:
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::createBackingStoreForGTK):
(WebKit::BackingStore::incorporateUpdate):

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

7 years agoRemove TextCheckerEnchant::create() factory function
gyuyoung.kim@samsung.com [Wed, 22 Oct 2014 23:01:08 +0000 (23:01 +0000)]
Remove TextCheckerEnchant::create() factory function
https://bugs.webkit.org/show_bug.cgi?id=137944

Reviewed by Darin Adler.

TextCheckerEnchant::create() can be replaced by std::make_unique<> and std::unique_ptr<>.

Source/WebCore:

No new tests, no behavior change.

* platform/text/enchant/TextCheckerEnchant.h:
(WebCore::TextCheckerEnchant::create): Deleted.

Source/WebKit2:

* UIProcess/API/gtk/WebKitTextChecker.cpp:
(WebKitTextChecker::WebKitTextChecker):
* UIProcess/API/gtk/WebKitTextChecker.h:
* UIProcess/efl/TextCheckerClientEfl.cpp:
(TextCheckerClientEfl::TextCheckerClientEfl):
* UIProcess/efl/TextCheckerClientEfl.h:

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

7 years agoAvoid confusion between AccessibilityObject::isTable() / isAccessibilityTable()
cdumez@apple.com [Wed, 22 Oct 2014 21:45:20 +0000 (21:45 +0000)]
Avoid confusion between AccessibilityObject::isTable() / isAccessibilityTable()
https://bugs.webkit.org/show_bug.cgi?id=137899

Reviewed by Darin Adler.

Avoid confusion between AccessibilityObject::isTable() and
isAccessibilityTable(). isTable() is equivalent to
is<AccessibilityTable>(), while isAccessibilityTable() is an
AccessibilityTable that is exposed as an AccessibilityTable to the
platform.

This patch is renaming isAccessibilityTable() to
isExposableThroughAccessibility(), makes it non-virtual and defines it
on AccessibilityTable only, for clarity.

This patch also renames isTableExposableThroughAccessibility() to
computeIisTableExposableThroughAccessibility() as it is called only
once to initialize the m_isExposableThroughAccessibility data member.

No new tests, no behavior change.

* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityARIAGrid.h:
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::parentTable):
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
(WebCore::AccessibilityARIAGridCell::columnIndexRange):
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::disclosedRows):
(WebCore::AccessibilityARIAGridRow::disclosedByRow):
(WebCore::AccessibilityARIAGridRow::parentTable):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::shouldUseAccessiblityObjectInnerText):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
(WebCore::appendChildrenToArray):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isAccessibilityTable): Deleted.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::ariaSelectedRows):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::AccessibilityTable):
(WebCore::AccessibilityTable::init):
(WebCore::AccessibilityTable::isExposableThroughAccessibility):
(WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
(WebCore::AccessibilityTable::addChildren):
(WebCore::AccessibilityTable::tableLevel):
(WebCore::AccessibilityTable::roleValue):
(WebCore::AccessibilityTable::computeAccessibilityIsIgnored):
(WebCore::AccessibilityTable::title):
(WebCore::AccessibilityTable::isAccessibilityTable): Deleted.
(WebCore::AccessibilityTable::isTableExposableThroughAccessibility): Deleted.
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::isTableCell):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::headerObject):
(WebCore::AccessibilityTableColumn::addChildren):
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::addChildren):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::isTableRow):
(WebCore::AccessibilityTableRow::parentTable):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetNChildren):
(webkitAccessibleRefChild):
(webkitAccessibleGetAttributes):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

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

7 years agoAvoid repeated is<MutableStyleProperties>() checks in StyleProperties
cdumez@apple.com [Wed, 22 Oct 2014 21:16:48 +0000 (21:16 +0000)]
Avoid repeated is<MutableStyleProperties>() checks in StyleProperties
https://bugs.webkit.org/show_bug.cgi?id=137978

Reviewed by Andreas Kling.

Reduce the amount of is<MutableStyleProperties>() checks in
StyleProperties by:
- Removing the checks in each method of StyleProperties::PropertyReference,
  and replace them by a single check in StyleProperties::propertyAt().
- Providing faster propertyCount() / propertyAt() / isEmpty() methods on
  MutableStyleProperties / ImmutableStyleProperties as a lot of callers use
  tight typing.
- Using tighter typing at call sites whenever possible.

Ideally, we could be able to use iterators instead of propertyCount() /
propertyAt() but this is not trivial to do efficiently as the
representation in memory is fundamentally different for MutableStyleProperties
/ ImmutableStyleProperties. We may be able to do better longer term, but
this is already more efficient short term at least.

No new tests, no behavior change.

* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::MutableStyleProperties):
(WebCore::StyleProperties::PropertyReference::cssText):
* css/StyleProperties.h:
(WebCore::StyleProperties::PropertyReference::PropertyReference):
(WebCore::StyleProperties::PropertyReference::id):
(WebCore::StyleProperties::PropertyReference::shorthandID):
(WebCore::StyleProperties::PropertyReference::isImportant):
(WebCore::StyleProperties::PropertyReference::isInherited):
(WebCore::StyleProperties::PropertyReference::isImplicit):
(WebCore::StyleProperties::PropertyReference::value):
(WebCore::StyleProperties::PropertyReference::toCSSProperty):
(WebCore::StyleProperties::isEmpty):
(WebCore::ImmutableStyleProperties::isEmpty):
(WebCore::MutableStyleProperties::isEmpty):
(WebCore::ImmutableStyleProperties::propertyAt):
(WebCore::MutableStyleProperties::propertyAt):
(WebCore::StyleProperties::propertyAt):
(WebCore::StyleProperties::propertyCount):
(WebCore::StyleProperties::PropertyReference::propertyMetadata): Deleted.
(WebCore::StyleProperties::PropertyReference::propertyValue): Deleted.
* editing/EditingStyle.cpp:
(WebCore::removePropertiesInStyle):
(WebCore::EditingStyle::removePropertiesInElementDefaultStyle):

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

7 years ago[Mac][MediaStream] clean up bit rot
eric.carlson@apple.com [Wed, 22 Oct 2014 21:14:07 +0000 (21:14 +0000)]
[Mac][MediaStream] clean up bit rot
https://bugs.webkit.org/show_bug.cgi?id=137976

Reviewed by Jer Noble.

No new tests, this just gets the Mac port compiling again.

* Modules/mediastream/MediaStream.h: Add a virtual destructor to Observer since it has
    a virtual method.

* WebCore.exp.in: Export RTCPeerConnectionHandler::create and RTCPeerConnectionHandlerMock::create(WebCore::RTCPeerConnectionHandlerClient*),
    they are both use by Internals for testing.

* WebCore.xcodeproj/project.pbxproj: Add RTC and MediaStream files.

* html/HTMLMediaElement.h: Forward declare MediaStream instead of including MediaStream.h.

* platform/mediastream/RTCPeerConnectionHandler.h: EXPORT the create method.

* platform/mock/MediaConstraintsMock.cpp:
(WebCore::isSupported): Make static.
(WebCore::isValid): Ditto.

* platform/mock/RTCPeerConnectionHandlerMock.h: EXPORT the create method.

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

7 years agoRevert fix for REGRESSION (r173356): Safari can't install a profile, gets 'Download...
antti@apple.com [Wed, 22 Oct 2014 20:14:29 +0000 (20:14 +0000)]
Revert fix for REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
(https://bugs.webkit.org/show_bug.cgi?id=137493)

Turns out the root cause was a bug in MIME type sniffing, https://bugs.webkit.org/show_bug.cgi?id=137855

Remove the workaround.

* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::startWithHandle):
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::startWithHandle):

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

7 years agoPatchAnalysisTask._test_patch() needs refactoring
commit-queue@webkit.org [Wed, 22 Oct 2014 20:04:37 +0000 (20:04 +0000)]
PatchAnalysisTask._test_patch() needs refactoring
https://bugs.webkit.org/show_bug.cgi?id=137904

Patch by Jake Nielsen <jacob_nielsen@apple.com> on 2014-10-22
Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
Fixes several small bugs, and makes minor changes to accomodate the
changes in PatchAnalysisTask.
(MockCommitQueue.refetch_patch):
(MockCommitQueue.test_results):
(test_flaky_test_failure):
(test_failed_archive):
(test_very_red_tree_retry):
(_expect_validate.MockDelegate.refetch_patch):
(MockCommitQueue.expected_failures): Deleted.
(_expect_validate.MockDelegate.expected_failures): Deleted.
* Scripts/webkitpy/tool/bot/expectedfailures.py: Removed.
* Scripts/webkitpy/tool/bot/expectedfailures_unittest.py: Removed.
* Scripts/webkitpy/tool/bot/patchanalysistask.py:
Removes the unexpected_failures member, adds the _clean_tree_results
member, adds a helper function for _test_patch, and refactors
_test_patch to be more readable.
(PatchAnalysisTask.__init__):
(PatchAnalysisTask._continue_testing_patch_that_exceeded_failure_limit_on_first_or_second_try):
(PatchAnalysisTask._test_patch):
(PatchAnalysisTask.results_from_test_run_without_patch):
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
Removes AbstractEarlyWarningSystem's dependancy on ExpectedFailures.
(AbstractEarlyWarningSystem.begin_work_queue):
(AbstractEarlyWarningSystem._failing_tests_message):
(AbstractEarlyWarningSystem.command_failed):
(AbstractEarlyWarningSystem.expected_failures): Deleted.
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
Makes changes to accomodate the changes made to PatchAnalysisTask.
(AbstractEarlyWarningSystemTest.test_failing_tests_message):
* Scripts/webkitpy/tool/commands/perfalizer.py:
Removes Perfalizer's dependancy on ExpectedFailures.
(PerfalizerTask.refetch_patch):
(PerfalizerTask.expected_failures): Deleted.
* Scripts/webkitpy/tool/commands/queues.py:
Removes CommitQueue's dependancy on ExpectedFailures, and adds an
initializer to allow for mock injection.
(CommitQueue.__init__):
(CommitQueue.begin_work_queue):
(CommitQueue.process_work_item):
(CommitQueue._failing_tests_message):
* Scripts/webkitpy/tool/commands/queues_unittest.py:
Removes dependancy on ExpectedFailures, and instead uses mock
injection.
(MockCommitQueueTask):
(MockCommitQueueTask.results_from_patch_test_run):
(MockCommitQueueTask.results_from_test_run_without_patch):
(mock_run_webkit_patch):

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

7 years agoRemove action menu web preference
bdakin@apple.com [Wed, 22 Oct 2014 19:13:30 +0000 (19:13 +0000)]
Remove action menu web preference
https://bugs.webkit.org/show_bug.cgi?id=137975

Reviewed by Tim Horton.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetActionMenuSupportEnabled): Deleted.
(WKPreferencesGetActionMenuSupportEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):

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

7 years agoWeb Inspector: Fix generator importing of protocol type "any", treat as value
commit-queue@webkit.org [Wed, 22 Oct 2014 19:11:18 +0000 (19:11 +0000)]
Web Inspector: Fix generator importing of protocol type "any", treat as value
https://bugs.webkit.org/show_bug.cgi?id=137931

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

Treat incoming "any" objects as InspectorValues, which can be any type.
Add the necessary boilerplate to import.

* inspector/InspectorBackendDispatcher.cpp:
(Inspector::AsMethodBridges::asValue):
(Inspector::InspectorBackendDispatcher::getValue):
* inspector/InspectorBackendDispatcher.h:
* inspector/scripts/codegen/generator.py:
(Generator.keyed_get_method_for_type):
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:

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

7 years agoREGRESSION(r174996): Broke C_LOOP
msaboff@apple.com [Wed, 22 Oct 2014 18:59:04 +0000 (18:59 +0000)]
REGRESSION(r174996): Broke C_LOOP
https://bugs.webkit.org/show_bug.cgi?id=137971

Reviewed by Mark Lam.

Removed incorrect move to cfr (CallFrameRegister) before we make the call to a native function.
After r174996, the source register for the move contained garbage causing the crash.  The move
to cfr before making the call to the native function is wrong and should have been removed
some time ago.  This brings the ARM64 / C_LOOP code path inline with the other CPU paths.
Tested on ARM64 as well as a C_LOOP build.

* llint/LowLevelInterpreter64.asm:

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

7 years ago[EFL] Unreviewed EFL gardening.
commit-queue@webkit.org [Wed, 22 Oct 2014 17:50:23 +0000 (17:50 +0000)]
[EFL] Unreviewed EFL gardening.
https://bugs.webkit.org/show_bug.cgi?id=137950

Some tests that are passed in latest build.

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2014-10-22

* platform/efl/TestExpectations: Remove passing tests from TestExceptation file.

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

7 years ago[Win] Mark a number of tests as failing due to white selected text color.
bfulgham@apple.com [Wed, 22 Oct 2014 17:45:22 +0000 (17:45 +0000)]
[Win] Mark a number of tests as failing due to white selected text color.
https://bugs.webkit.org/show_bug.cgi?id=137963

* platform/win/TestExpectations:

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

7 years ago[Mac][WK2] Fix applicationIsSafari() detection
cdumez@apple.com [Wed, 22 Oct 2014 17:43:07 +0000 (17:43 +0000)]
[Mac][WK2] Fix applicationIsSafari() detection
https://bugs.webkit.org/show_bug.cgi?id=137893

Reviewed by Alexey Proskuryakov.

Source/WebCore:

I noticed when profiling Safari on Mac that we were exercising a code
path we shouldn't because it is meant for other applications that
Safari.

The detection relies on the applicationIsSafari() function in
RuntimeApplicationChecks.cpp. This was in some cases returning false on
my machine even though I was running Safari so I investigated a bit and
noticed that the check relies on the main bundle identifier string and
is doing:
isSafari = mainBundleIsEqualTo("com.apple.Safari")
    || mainBundleIsEqualTo("com.apple.WebProcess");

This WebProcess detection is very unreliable because:
- It matches other apps than Safari's WebProcesses
- The bundle name for the WebProcess is sometimes
"com.apple.WebKit.WebContent" or
"com.apple.WebKit.WebContent.Development".

The solution used in this patch is to move the applicationIsSafari()
check to the UIProcess so that the check actually succeeds reliably.
The call site for applicationIsSafari() was in
ResourceRequest::useQuickLookResourceCachingQuirks(). This match
removes that logic from ResourceRequest and move it to
FrameLoaderClient as only the FrameLoader is interested in this
information. The logic to determine if we should use QuickLook
resource caching quirks is moved to a new QuickLook class under
platform/ as the code needs to be shared between WebKit and WebKit2.
On WebKit2, we make use that code on the UIProcess side and pass
the flag as a parameter when constructing the WebProcess. The flag
is then stored on the WebProcess and queried by WebFrameLoaderClient.

Previously, we would spend ~1% of the WebProcess cpu time (when loading
apple.com) trying to detect if we should use QuickLook resource caching
quirks even though that check was supposed to be disabled and return
early when running Safari.

No new tests, not easily testable.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy):
* loader/FrameLoaderClient.h:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsSafari):
Remove "com.apple.WebProcess" bundle name matching as this causes false
positives (matches other applications than Safari's WebProcesses) and
it is no longer needed now that applicationIsSafari() is always called
from the UIProcess.

* platform/mac/QuickLookMac.h: Added.
* platform/mac/QuickLookMac.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
(WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
* platform/network/cf/ResourceRequest.h:
* platform/network/ios/ResourceRequestIOS.mm:
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::initQuickLookResourceCachingQuirks): Deleted.
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.

Source/WebKit/mac:

Provide an implementation for FrameLoaderClient's new
needsQuickLookResourceCachingQuirks() that returns
a static flag initialized using
QuickLookMac::computeNeedsQuickLookResourceCachingQuirks().

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:

Source/WebKit2:

Provide an implementation for FrameLoaderClient's new
needsQuickLookResourceCachingQuirks(), which accesses the flag stored
on the WebProcess, which is initialized upon WebProcess creation.

QuickLookMac::computeNeedsQuickLookResourceCachingQuirks() is called
on UIProcess side so that it works reliably and the flag is passed as
parameter when constructing the WebProcess.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::needsQuickLookResourceCachingQuirks):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::needsQuickLookResourceCachingQuirks):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

7 years ago[Win] Mark a number of tests as failing due to <select> bug.
bfulgham@apple.com [Wed, 22 Oct 2014 17:41:57 +0000 (17:41 +0000)]
[Win] Mark a number of tests as failing due to <select> bug.
https://bugs.webkit.org/show_bug.cgi?id=137962

* platform/win/TestExpectations:

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

7 years agoXMLHttpRequest should support attribute responseURL as per latest XHR spec.
commit-queue@webkit.org [Wed, 22 Oct 2014 17:16:44 +0000 (17:16 +0000)]
XMLHttpRequest should support attribute responseURL as per latest XHR spec.
https://bugs.webkit.org/show_bug.cgi?id=136938

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-10-22
Reviewed by Alexey Proskuryakov.

Source/WebCore:

Tests: http/tests/xmlhttprequest/basic-auth-responseURL.html
       http/tests/xmlhttprequest/cross-origin-redirect-responseURL.html
       http/tests/xmlhttprequest/redirect-credentials-responseURL.html
       http/tests/xmlhttprequest/xmlhttprequest-responseURL.html

XMLHttpRequest should support attribute responseURL

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseURL):
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequest.idl:

LayoutTests:

Added test to check responseURL attribute in XMLHttpRequest.

* http/tests/xmlhttprequest/basic-auth-responseURL-expected.txt: Added.
* http/tests/xmlhttprequest/basic-auth-responseURL.html: Added.
* http/tests/xmlhttprequest/cross-origin-redirect-responseURL-expected.txt: Added.
* http/tests/xmlhttprequest/cross-origin-redirect-responseURL.html: Added.
* http/tests/xmlhttprequest/redirect-credentials-responseURL-expected.txt: Added.
* http/tests/xmlhttprequest/redirect-credentials-responseURL.html: Added.
* http/tests/xmlhttprequest/xmlhttprequest-responseURL-expected.txt: Added.
* http/tests/xmlhttprequest/xmlhttprequest-responseURL.html: Added.

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

7 years agoAdd initial support for generating the StyleBuilder from CSSPropertyNames.in
cdumez@apple.com [Wed, 22 Oct 2014 16:56:36 +0000 (16:56 +0000)]
Add initial support for generating the StyleBuilder from CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=137910

Reviewed by Andreas Kling.

Add initial support for generating the StyleBuilder from
CSSPropertyNames.in. This is a first step towards getting rid of the
legacy DeprecatedStyleBuilder class and having everything defined in one
place (CSSPropertyNames.in).

This patch updates makeprop.pl script to generate a StyleBuilder.cpp
file that generate a the StyleBuilder::applyProperty() method
implementation using a huge switch statement for all the CSS
properties. With this patch, we are now generating the new StyleBuilder
code for all the "simple" CSS properties (i.e. those that were using
ApplyPropertyDefault<> in DeprecatedStyleBuilder.cpp). I am using a
"NewStyleBuilder" option in CSSPropertyNames.in for properties that
we generate to help with improving incrementally the generator. Once
we are able to generate all properties, this transition option will
do away and become the default.

By default, the generator will make an educated guess for the type
name, the getter, the setter and the initial function of each property.
For example, for the border-collapse property, it will use:
- TypeName: EBorderCollapse (i.e. 'E' + PropertyId)
- Getter: borderCollapse() (i.e. PropertyId with first letter lowercased)
- Setter: setBorderCollapse() (i.e. 'set' + PropertyId)
- Initial: initialBorderCollapse() (i.e. 'initial' + PropertyId)

This works for most properties. For properties that need
special-casing, developers can use the following options in
CSSPropertyNames.in:
- TypeName: Overrides the type name
- Getter: Overrides the getter name
- Setter: Overrides the setter name
- Initial: Overrides the initial function name
- NameForMethods: Overrides the Getter / Setter / Initial function
  names. For e.g. "NameForMethods=OverflowWrap" will use
  "overflowWrap() / setOverflowWrap() / initialOverflowWrap()".

The patch is inspired by the following Blink revision by
<timloh@chromium.org>:
https://src.chromium.org/viewvc/blink?view=rev&revision=150424

No new tests, no behavior change.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyVerticalAlign::createHandler):
(WebCore::ApplyPropertyDisplay::applyInitialValue):
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleBuilder.h: Added.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::applyProperty):
* css/makeprop.pl:
* rendering/style/RenderStyle.h:
Move the initialXXX() methods that were in NonInheritedFlags to
RenderStyle class, with the other initialXXX() methods to facilitate
code generation.

* rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::StyleMultiColData):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):

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

7 years agoUnreviewed. Fix GStreamer debug build after r175050.
carlosgc@webkit.org [Wed, 22 Oct 2014 15:56:24 +0000 (15:56 +0000)]
Unreviewed. Fix GStreamer debug build after r175050.

Explicitly include wtf/MainThread.h.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

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

7 years ago[GStreamer] Do not use CachedResourceLoader, SecurityOrigin, ResourceBuffer and other...
carlosgc@webkit.org [Wed, 22 Oct 2014 15:12:08 +0000 (15:12 +0000)]
[GStreamer] Do not use CachedResourceLoader, SecurityOrigin, ResourceBuffer and other WebCore types
https://bugs.webkit.org/show_bug.cgi?id=137064

Reviewed by Philippe Normand.

Source/WebCore:

Move the media resource loader to a new class in WebCore/loader
that inherits from a PlatformMediaResourceLoader class defined in
the platform layer. The platform specific behaviour is implemented
using a client also defined in the platform layer, implemented by
every media backend, and used by the WebCore MediaResourceLoader.

* CMakeLists.txt: Add new files to compilation.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):
Create a MediaResourceLoader.
(WebCore::HTMLMediaElement::mediaPlayerCORSMode): Deleted. This is
no longer used.
* html/HTMLMediaElement.h:
* loader/MediaResourceLoader.cpp: Added.
(WebCore::MediaResourceLoader::MediaResourceLoader):
(WebCore::MediaResourceLoader::~MediaResourceLoader):
(WebCore::MediaResourceLoader::start): Start a new load for the
given request and load options.
(WebCore::MediaResourceLoader::stop): Stop the load if needed.
(WebCore::MediaResourceLoader::setDefersLoading):
(WebCore::MediaResourceLoader::responseReceived): Handle CORS
access check and notify the client about the response.
(WebCore::MediaResourceLoader::dataReceived): Notify the client.
(WebCore::MediaResourceLoader::notifyFinished): Ditto.
(WebCore::MediaResourceLoader::getOrCreateReadBuffer): Ask the
client to create the read buffer.
* loader/MediaResourceLoader.h: Added.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::createResourceLoader): Call
mediaPlayerCreateResourceLoader() if there's a client.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerCreateResourceLoader):
(WebCore::MediaPlayerClient::mediaPlayerCORSMode): Deleted.
* platform/graphics/PlatformMediaResourceLoader.h: Added.
(WebCore::PlatformMediaResourceLoaderClient::responseReceived):
(WebCore::PlatformMediaResourceLoaderClient::dataReceived):
(WebCore::PlatformMediaResourceLoaderClient::bufferReceived):
(WebCore::PlatformMediaResourceLoaderClient::accessControlCheckFailed):
(WebCore::PlatformMediaResourceLoaderClient::loadFailed):
(WebCore::PlatformMediaResourceLoaderClient::loadFinished):
(WebCore::PlatformMediaResourceLoaderClient::getOrCreateReadBuffer):
(WebCore::PlatformMediaResourceLoader::~PlatformMediaResourceLoader):
(WebCore::PlatformMediaResourceLoader::stop):
(WebCore::PlatformMediaResourceLoader::setDefersLoading):
(WebCore::PlatformMediaResourceLoader::didPassAccessControlCheck):
(WebCore::PlatformMediaResourceLoader::PlatformMediaResourceLoader):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStop): Also delete the PlatformMediaResourceLoader.
(webKitWebSrcStart): Create a new resource loader using
MediaPlayer::createResourceLoader() with a new
CachedResourceStreamingClient as client.
(webKitWebSrcNeedDataMainCb): Call setDefersLoading() for the
resource loader if there's one.
(webKitWebSrcEnoughDataMainCb): Ditto.
(webKitSrcPassedCORSAccessCheck): Return didPassAccessControlCheck.
(StreamingClient::handleResponseReceived): Remove the CORS check
result parameter since that's now handled by MediaResourceLoader.
(CachedResourceStreamingClient::CachedResourceStreamingClient):
(CachedResourceStreamingClient::~CachedResourceStreamingClient):
(CachedResourceStreamingClient::getOrCreateReadBuffer):
(CachedResourceStreamingClient::responseReceived): Update didPassAccessControlCheck.
(CachedResourceStreamingClient::dataReceived):
(CachedResourceStreamingClient::accessControlCheckFailed): Log the
error and stop the load.
(CachedResourceStreamingClient::loadFailed): Log the error if it
was not a cancellation.
(CachedResourceStreamingClient::loadFinished):
(ResourceHandleStreamingClient::didReceiveResponse):
(CachedResourceStreamingClient::setDefersLoading): Deleted.
(CachedResourceStreamingClient::notifyFinished): Deleted.

LayoutTests:

Update expected results of http/tests/security/video-cross-origin-accessfailure.html, since
now the error is also logged in the console.

* http/tests/security/video-cross-origin-accessfailure-expected.txt:

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

7 years ago[EFL][WK2] Minibrowser : Add support for mouse middle button to open links in new...
commit-queue@webkit.org [Wed, 22 Oct 2014 15:09:43 +0000 (15:09 +0000)]
[EFL][WK2] Minibrowser : Add support for mouse middle button to open links in new window
https://bugs.webkit.org/show_bug.cgi?id=136736

Patch by Rohit Kumar <kumar.rohit@samsung.com> on 2014-10-22
Reviewed by Gyuyoung Kim.

* MiniBrowser/efl/main.c:
(on_navigation_policy_decision): Check whether it's a link clicked with the middle mouse button and load the request in a new window.
(window_create):

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

7 years agoSpeed up line parsing for simple line layout (part I)
zalan@apple.com [Wed, 22 Oct 2014 14:59:00 +0000 (14:59 +0000)]
Speed up line parsing for simple line layout (part I)
https://bugs.webkit.org/show_bug.cgi?id=137275

Reviewed by Antti Koivisto.

Extend simple line layout performance test with a few more cases.
Now we've got:
<div center
<div right
<div justify
<div white-space: pre (new)
<div overflow-wrap: break-word (new)
<pre
<pre white-space: pre-wrap
<pre white-space: pre-line (new)
<pre white-space: nowrap (new)
<pre white-space: pre-wrap overflow-wrap: break-word
<div + embedded <span etc.
<div + br

* Layout/line-layout-simple.html:

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

7 years agoUnreviewed. Fix GTK+ debug build after r175046.
carlosgc@webkit.org [Wed, 22 Oct 2014 14:03:34 +0000 (14:03 +0000)]
Unreviewed. Fix GTK+ debug build after r175046.

Remove invalid ASSERT.

* UIProcess/gtk/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::setCursorRect):

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

7 years ago[GTK] Move GtkInputMethodFilter from Platform to WebKit2
carlosgc@webkit.org [Wed, 22 Oct 2014 13:00:12 +0000 (13:00 +0000)]
[GTK] Move GtkInputMethodFilter from Platform to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=137884

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

Remove GtkInputMethodFilter.

* PlatformGTK.cmake:
* platform/gtk/GtkInputMethodFilter.cpp: Removed.
* platform/gtk/GtkInputMethodFilter.h: Removed.

Source/WebKit2:

Merge WebViewBaseInputMethodFilter and GtkInputMethodFilter into a
single class InputMethodFilter. The code is mostly the same, but
instead of having a setWebView method only to get the WebPageProxy,
it has a setPage method that passes the WebPageProxy. The GtkIMContext
client window is set by the WebView when it's realized/unrealized.

* PlatformGTK.cmake:
* Shared/NativeWebKeyboardEvent.h:
* Shared/gtk/NativeWebKeyboardEventGtk.cpp:
(WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize):
(webkitWebViewBaseUnrealize):
(webkit_web_view_base_class_init):
(webkitWebViewBaseCreateWebPage):
(webkitWebViewBaseEnterFullScreen): Deleted.
* UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Removed.
* UIProcess/API/gtk/WebViewBaseInputMethodFilter.h: Removed.
* UIProcess/gtk/InputMethodFilter.cpp: Added.
(WebKit::InputMethodFilter::handleCommitCallback):
(WebKit::InputMethodFilter::handlePreeditStartCallback):
(WebKit::InputMethodFilter::handlePreeditChangedCallback):
(WebKit::InputMethodFilter::handlePreeditEndCallback):
(WebKit::InputMethodFilter::InputMethodFilter):
(WebKit::InputMethodFilter::~InputMethodFilter):
(WebKit::InputMethodFilter::setEnabled):
(WebKit::InputMethodFilter::setCursorRect):
(WebKit::InputMethodFilter::handleKeyboardEvent):
(WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults):
(WebKit::InputMethodFilter::filterKeyEvent):
(WebKit::InputMethodFilter::confirmComposition):
(WebKit::InputMethodFilter::updatePreedit):
(WebKit::InputMethodFilter::notifyFocusedIn):
(WebKit::InputMethodFilter::notifyFocusedOut):
(WebKit::InputMethodFilter::notifyMouseButtonPress):
(WebKit::InputMethodFilter::confirmCurrentComposition):
(WebKit::InputMethodFilter::cancelContextComposition):
(WebKit::InputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents):
(WebKit::InputMethodFilter::handleCommit):
(WebKit::InputMethodFilter::handlePreeditStart):
(WebKit::InputMethodFilter::handlePreeditChanged):
(WebKit::InputMethodFilter::handlePreeditEnd):
(WebKit::InputMethodFilter::logHandleKeyboardEventForTesting):
(WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting):
(WebKit::InputMethodFilter::logConfirmCompositionForTesting):
(WebKit::InputMethodFilter::logSetPreeditForTesting):
* UIProcess/gtk/InputMethodFilter.h: Added.
(WebKit::InputMethodFilter::context):
(WebKit::InputMethodFilter::setPage):
(WebKit::InputMethodFilter::setTestingMode):
(WebKit::InputMethodFilter::events):

Tools:

Move InputMethodFilter test from WebCore tests to WebKit2 tests
and adapt it to use the new InputMethodFilter WebKit class. Instead
of having virtual methods just for testing, it has a testing mode
that logs the events.

* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebKit2/gtk/InputMethodFilter.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebCore/gtk/InputMethodFilter.cpp.
(TestWebKitAPI::TestInputMethodFilter::TestInputMethodFilter):
(TestWebKitAPI::TestInputMethodFilter::~TestInputMethodFilter):
(TestWebKitAPI::TestInputMethodFilter::sendKeyEventToFilter):
(TestWebKitAPI::TestInputMethodFilter::sendPressAndReleaseKeyEventPairToFilter):
(TestWebKitAPI::TEST):
(TestWebKitAPI::temporaryGetPreeditStringOverride):
(TestWebKitAPI::temporaryResetOverride):
(TestWebKitAPI::verifyCanceledComposition):

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

7 years agoMatch spec for font-weight: bolder|lighter
commit-queue@webkit.org [Wed, 22 Oct 2014 11:16:39 +0000 (11:16 +0000)]
Match spec for font-weight: bolder|lighter
https://bugs.webkit.org/show_bug.cgi?id=137919

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-10-22
Reviewed by Andreas Kling.

This patch is a merge of Blink's
Source/WebCore:

https://chromiumcodereview.appspot.com/15994009

Currently, bolder and lighter change font-weight in a non-compliant way.
The spec (http://www.w3.org/TR/css3-fonts/#bolderlighter) defines
exactly what the computed values should be given the inherited weight values,
so we should match those.

The removed FIXME's for selecting the next lightest/heaviest weight from
the used font family seems to refer to behaviour from
CSS1 (http://www.w3.org/TR/CSS1/#font-weight), while this is replaced
with a simpler procedure for resolving bolder and lighter in font weights
in CSS2 (http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight) and CSS3 (link above).

and https://codereview.chromium.org/137813004

According to http://dev.w3.org/csswg/css-fonts/#font-weight-prop, the computed
weight of 'lighter' and 'bolder' are based on the inherited 'font-weight', so set
that inherited weight before calculating 'lighter' and 'bolder'.

Tests: css3/font-weight-multiple-selectors.html
       css3/font-weight.html

* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontWeight::applyValue):
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::lighterWeight):
(WebCore::FontDescription::bolderWeight):

LayoutTests:

https://chromiumcodereview.appspot.com/15994009 and
https://codereview.chromium.org/137813004

* css3/font-weight-expected.txt: Added.
* css3/font-weight-multiple-selectors-expected.txt: Added.
* css3/font-weight-multiple-selectors.html: Added.
* css3/font-weight.html: Added.

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

7 years ago[GTK]: Fix unused parameter build warnings in WebCore/platform module
commit-queue@webkit.org [Wed, 22 Oct 2014 10:11:58 +0000 (10:11 +0000)]
[GTK]: Fix unused parameter build warnings in WebCore/platform module
https://bugs.webkit.org/show_bug.cgi?id=137921

Patch by Rohit Kumar <kumar.rohit@samsung.com> on 2014-10-22
Reviewed by Carlos Garcia Campos.

* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::PerAxisData::PerAxisData):
(WebCore::ScrollAnimatorNone::animationTimerFired):

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