WebKit-https.git
5 years agoSpeculative build fix for iOS.
timothy_horton@apple.com [Tue, 13 May 2014 21:27:16 +0000 (21:27 +0000)]
Speculative build fix for iOS.

* UIProcess/ios/WebMemoryPressureHandlerIOS.cpp: Removed.
* UIProcess/ios/WebMemoryPressureHandlerIOS.mm: Added.
(WebKit::WebMemoryPressureHandler::shared):
(WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
* WebKit2.xcodeproj/project.pbxproj:
Make WebMemoryPressureHandlerIOS Obj-C.

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

5 years agoAdd some illustrations about how JSC works.
fpizlo@apple.com [Tue, 13 May 2014 21:11:48 +0000 (21:11 +0000)]
Add some illustrations about how JSC works.

* blog-files/ftl-jit: Added.
* blog-files/ftl-jit/dfg_pipeline.png: Added.
* blog-files/ftl-jit/four_tier_performance.png: Added.
* blog-files/ftl-jit/ftl_asm_bench_performance.png: Added.
* blog-files/ftl-jit/ftl_pipeline.png: Added.
* blog-files/ftl-jit/ftl_timeline.png: Added.
* blog-files/ftl-jit/object_model.png: Added.
* blog-files/ftl-jit/polymorphic_inlining_performance.png: Added.
* blog-files/ftl-jit/polyvariance.png: Added.
* blog-files/ftl-jit/polyvariant_devirtualization_performance.png: Added.
* blog-files/ftl-jit/three_tier_performance.png: Added.
* blog-files/ftl-jit/three_tiers.png: Added.

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

5 years agoDYEBench should run 20 iterations in browser
rniwa@webkit.org [Tue, 13 May 2014 21:08:10 +0000 (21:08 +0000)]
DYEBench should run 20 iterations in browser
https://bugs.webkit.org/show_bug.cgi?id=132795

Reviewed by Gavin Barraclough.

Right now, run-perf-tests runs BYEBench 4 times with different instances of DRT/WTR to get
a more stable time and account for differences in the runtime environment, particularly,
ASLR (Address Space Layout Randomization).

While we can't account for the latter effect when the benchmark is ran inside a browser,
we can at least run 20 iterations to get a more stable (but perhaps biased by ALSR) number.

While the sample size of 20 is statistically unsound to compute the arithmetic mean from,
it's MUCH better than the current sample size of 5.

* DoYouEvenBench/Full.html:
(benchmarkClient.iterationCount): Set the default iteration count to 20.
(startTest): Use benchmarkClient.iterationCount as the iteration count.
* DoYouEvenBench/resources/benchmark-report.js:
(benchmarkClient.iterationCount): Continue to use the old iteration count of 5 when ran
inside run-perf-tests.

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

5 years ago[Win] Enum type with value zero is compatible with void*, potential cause of crashes.
commit-queue@webkit.org [Tue, 13 May 2014 20:57:07 +0000 (20:57 +0000)]
[Win] Enum type with value zero is compatible with void*, potential cause of crashes.
https://bugs.webkit.org/show_bug.cgi?id=132772

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-05-13
Reviewed by Geoffrey Garen.

Using the MSVC compiler, an instance of an enum type with value zero, is compatible with void* (see bug 132683 for a code example).
This has caused crashes on Windows on two occasions (bug 132683, and bug 121001).
This patch tries to prevent these type of crashes by using a type with explicit constructors instead of void*.
The void* parameter in the loadDouble and storeDouble methods are replaced with TrustedImmPtr.

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::loadDouble):
(JSC::MacroAssemblerARM::storeDouble):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::loadDouble):
(JSC::MacroAssemblerARM64::storeDouble):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::loadDouble):
(JSC::MacroAssemblerARMv7::storeDouble):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::loadDouble):
(JSC::MacroAssemblerMIPS::storeDouble):
* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::loadDouble):
(JSC::MacroAssemblerSH4::storeDouble):
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::storeDouble):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::absDouble):
(JSC::MacroAssemblerX86Common::negateDouble):
(JSC::MacroAssemblerX86Common::loadDouble):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::silentFill):
(JSC::DFG::compileClampDoubleToByte):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
(JSC::DFG::SpeculativeJIT::compile):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::purifyNaN):
* jit/JITInlines.h:
(JSC::JIT::emitLoadDouble):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitFloatTypedArrayGetByVal):
* jit/ThunkGenerators.cpp:
(JSC::floorThunkGenerator):
(JSC::roundThunkGenerator):
(JSC::powThunkGenerator):

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

5 years agoUpdate positioning/drawing of the image controls button.
beidson@apple.com [Tue, 13 May 2014 20:43:36 +0000 (20:43 +0000)]
Update positioning/drawing of the image controls button.
<rdar://problem/16885077> and https://bugs.webkit.org/show_bug.cgi?id=132883

Reviewed by Tim Horton.

* html/shadow/mac/ImageControlsButtonElementMac.cpp:
(WebCore::ImageControlsButtonElementMac::maybeCreate): Add inline style for top/right
  positioning based on the metrics from the render theme.

* html/shadow/mac/imageControlsMac.css:
(.x-webkit-image-controls-button): Can’t hard code any positioning.

* rendering/RenderTheme.h:
(WebCore::RenderTheme::imageControlsButtonPositionOffset):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::servicesRolloverButtonCell):
(WebCore::RenderThemeMac::imageControlsButtonPositionOffset):

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

5 years ago[iOS WK2] background-attachment:fixed behaves very poorly
simon.fraser@apple.com [Tue, 13 May 2014 19:32:37 +0000 (19:32 +0000)]
[iOS WK2] background-attachment:fixed behaves very poorly
https://bugs.webkit.org/show_bug.cgi?id=132881
<rdar://problem/16789526>

Reviewed by Beth Dakin.

Source/WebCore:

Remove the old ENABLE_FAST_MOBILE_SCROLLING code, and add a setting that
controls whether fixed backgrounds paint relative to the document, which
is enabled for iOS (WK1 and WK2). This setting is consulted when we repaint
fixed backgrounds on scrolling, when we paint them, and when we decide to make
a layer for fixed backgrounds.

* page/Settings.cpp:
* page/Settings.in:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::willBeRemovedFromTree):
(WebCore::shouldRepaintFixedBackgroundsOnScroll): Deleted.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer):

Source/WTF:

Remove ENABLE_FAST_MOBILE_SCROLLING. Ports can use the fixedBackgroundsPaintRelativeToDocument
setting now.

* wtf/FeatureDefines.h:

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

5 years agoAnother follow-up build fix.
andersca@apple.com [Tue, 13 May 2014 19:32:26 +0000 (19:32 +0000)]
Another follow-up build fix.

* Shared/API/Cocoa/WKFoundation.h:

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

5 years agoAnother follow-up build fix.
andersca@apple.com [Tue, 13 May 2014 19:25:43 +0000 (19:25 +0000)]
Another follow-up build fix.

* Shared/API/Cocoa/WKFoundation.h:

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

5 years agoFollow-up fix.
andersca@apple.com [Tue, 13 May 2014 19:22:30 +0000 (19:22 +0000)]
Follow-up fix.

* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction _initWithNavigationActionData:WebKit::]):
(-[WKNavigationAction _isUserInitiated]):

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

5 years agoAdd -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
andersca@apple.com [Tue, 13 May 2014 19:20:35 +0000 (19:20 +0000)]
Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
https://bugs.webkit.org/show_bug.cgi?id=132880
<rdar://problem/16901354>

Reviewed by Dan Bernstein.

* Shared/API/Cocoa/WKFoundation.h:
Add typedef for older systems.

* UIProcess/API/Cocoa/WKNavigationAction.h:
Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]

* UIProcess/API/Cocoa/WKNavigationAction.mm:
(toWKNavigationType):
This can be static now.

(toNSEventModifierFlags):
Helper to convert WebEvent::Modifiers to NSEventModifierFlags.

(toNSButtonNumber):
Helper to convert WebMouseEvent::Button to an AppKit button number.

(-[WKNavigationAction initWithNavigationActionData:WebKit::]):
New initializer that takes a NavigationActionData and fills in the relevant ivars from it.

(-[WKNavigationAction _isUserInitiated]):
Return the new ivar.

* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
Remove readwrite overrides.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
Use initWithNavigationActionData:

* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
Use initWithNavigationActionData:

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

5 years agoWebKit2 View Gestures (Swipe): Encode snapshots as JPEG on some platforms
timothy_horton@apple.com [Tue, 13 May 2014 18:11:46 +0000 (18:11 +0000)]
WebKit2 View Gestures (Swipe): Encode snapshots as JPEG on some platforms
https://bugs.webkit.org/show_bug.cgi?id=127788
<rdar://problem/15928241>

Reviewed by Anders Carlsson.

Allow JPEG snapshots. Compression is done asynchronously.
Enable JPEG snapshots (for now) on all PLATFORM(MAC).
We'll switch back to IOSurface snapshots on 10.9+ after <rdar://problem/16734031> is resolved.

* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Store the image size on the ViewSnapshot.
Move IOSurface-related code to ViewSnapshotStore.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Adopt asLayerContents().

* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::retrieveSnapshotForItem):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
Adopt asLayerContents().
Put the snapshot on the right layer (the parent of the snapshot image layer);
if it's on the snapshot image layer itself, if there is no image, the shadow
is displayed on top of the white placeholder.
Only reset snapshot purgeability if we're using IOSurface snapshots.

* UIProcess/mac/ViewSnapshotStore.h:
Add a bunch of macros to allow us to switch the snapshot backing store implementation.

* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::~ViewSnapshotStore):
(WebKit::ViewSnapshotStore::recordSnapshot):
If takeViewSnapshot() fails, don't remove the existing snapshot.

(WebKit::createIOSurfaceFromImage):
(WebKit::compressImageAsJPEG):
(WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost):
(WebKit::ViewSnapshotStore::didCompressSnapshot):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::asLayerContents):
Asynchronously compress snapshots - if we're using JPEG snapshots - for a
very large memory win (~20-30x).

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

5 years ago[GTK] Unreviewed GTK gardening
commit-queue@webkit.org [Tue, 13 May 2014 18:01:29 +0000 (18:01 +0000)]
[GTK] Unreviewed GTK gardening

Rebaseline affected tests after svg root element background repaint changes
introduced in r168674.

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2014-05-13

* platform/gtk/http/tests/misc/slow-loading-image-in-pattern-expected.txt:
* platform/gtk/svg/custom/circle-move-invalidation-expected.txt:
* platform/gtk/svg/custom/mouse-move-on-svg-container-expected.txt:
* platform/gtk/svg/custom/mouse-move-on-svg-container-standalone-expected.txt:
* platform/gtk/svg/custom/mouse-move-on-svg-root-expected.txt:
* platform/gtk/svg/custom/mouse-move-on-svg-root-standalone-expected.txt:
* platform/gtk/svg/custom/pattern-userSpaceOnUse-userToBaseTransform-expected.txt:
* platform/gtk/svg/custom/svg-float-border-padding-expected.txt:
* platform/gtk/svg/text/small-fonts-in-html5-expected.txt:

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

5 years agoREGRESSSION(r168528) Subpixel rendering: Selection rect is not positioned properly...
zalan@apple.com [Tue, 13 May 2014 17:56:55 +0000 (17:56 +0000)]
REGRESSSION(r168528) Subpixel rendering: Selection rect is not positioned properly when SVG text is selected.
https://bugs.webkit.org/show_bug.cgi?id=132868

Reviewed by Dirk Schulze.

Scale the selection rect. r168528 missed applying this final transform on the selection/painting rect.

Source/WebCore:
Test: svg/text/hidpi-text-selection-rect-position.html

* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::selectionRectForTextFragment):

LayoutTests:
* svg/text/hidpi-text-selection-rect-position-expected.html: Added.
* svg/text/hidpi-text-selection-rect-position.html: Added.

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

5 years ago[CSS Regions] Add basic tests for inset flows into regions
zoltan@webkit.org [Tue, 13 May 2014 17:30:45 +0000 (17:30 +0000)]
[CSS Regions] Add basic tests for inset flows into regions
https://bugs.webkit.org/show_bug.cgi?id=132871

Reviewed by Mihnea Ovidenie.

* fast/regions/shape-outside-floats/regions-shape-outside-floats-inset-expected.html: Added.
* fast/regions/shape-outside-floats/regions-shape-outside-floats-inset.html: Added.

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

5 years agoASSERTION FAILED: leftCategory != CalcOther && rightCategory != CalcOther
commit-queue@webkit.org [Tue, 13 May 2014 17:08:43 +0000 (17:08 +0000)]
ASSERTION FAILED: leftCategory != CalcOther && rightCategory != CalcOther
in WebCore::CSSCalcBinaryOperation::createSimplified
https://bugs.webkit.org/show_bug.cgi?id=132870

Source/WebCore:
According to the standard, calc() should be able to handle angle, time
and frequency values as well: http://www.w3.org/TR/css3-values/#calc

Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-05-13
Reviewed by Darin Adler.

Test: fast/css/calc-with-angle-time-frequency.html

* css/CSSCalculationValue.cpp:
(WebCore::unitCategory):
(WebCore::CSSCalcPrimitiveValue::createCalcExpression):
(WebCore::CSSCalcPrimitiveValue::computeLengthPx):
(WebCore::CSSCalcPrimitiveValue::addSubtractResult):
(WebCore::CSSCalcPrimitiveValue::determineCategory):
(WebCore::CSSCalcBinaryOperation::primitiveType)
* css/CSSCalculationValue.h: extending CalculationCategory
* css/CSSParser.cpp:
(WebCore::CSSParser::validCalculationUnit):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::primitiveType):

LayoutTests:
Added test contains calc() expressions with angle, time and frequency values,
covering all the newly introduced unit types, each of which used to fail.

Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-05-13
Reviewed by Darin Adler.

* fast/css/calc-with-angle-time-frequency-expected.txt: Added.
* fast/css/calc-with-angle-time-frequency.html: Added.

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

5 years agoTry to fix the !ENABLE(ICONDATABASE) build
darin@apple.com [Tue, 13 May 2014 16:26:16 +0000 (16:26 +0000)]
Try to fix the !ENABLE(ICONDATABASE) build

* loader/icon/IconDatabase.h: Include WTFString.h.

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

5 years agoREGRESSION(r167771): [GTK] Text fields and areas are rendered unthemed
carlosgc@webkit.org [Tue, 13 May 2014 15:34:00 +0000 (15:34 +0000)]
REGRESSION(r167771): [GTK] Text fields and areas are rendered unthemed
https://bugs.webkit.org/show_bug.cgi?id=132864

Reviewed by Philippe Normand.

This is because the virtual methods changed the API in the parent,
and since we don't have the methods marked as override we didn't
noticed it. After using override keyword for all virtual methods
in the derived class another problem showed up, the ActiveListBox
selection methods were incorrectly named.

* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintTextArea): Update to API changes in the
parent class.
* platform/gtk/RenderThemeGtk.h: Mark all virtual methods as
override and the class as final.
* platform/gtk/RenderThemeGtk2.cpp:
(WebCore::RenderThemeGtk::paintTextField): Update to API changes
in the parent class.
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor): Deleted.
(WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor): Deleted.
(WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor): Deleted.
(WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor): Deleted.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::RenderThemeGtk::paintTextField): Update to API changes
in the parent class.
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor): Deleted.
(WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor): Deleted.
(WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor): Deleted.
(WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor): Deleted.

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

5 years ago[EFL] Rebaseline after r168575
commit-queue@webkit.org [Tue, 13 May 2014 15:30:29 +0000 (15:30 +0000)]
[EFL] Rebaseline after r168575
https://bugs.webkit.org/show_bug.cgi?id=132867

Unreviewed gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-05-13

* platform/efl-wk2/fast/css/input-search-padding-expected.png:
* platform/efl/fast/css/css1_forward_compatible_parsing-expected.txt:
* platform/efl/fast/css/first-line-text-decoration-expected.txt:
* platform/efl/fast/css/h1-in-section-elements-expected.png:
* platform/efl/fast/css/h1-in-section-elements-expected.txt:
* platform/efl/fast/css/input-search-padding-expected.txt:
* platform/efl/fast/css/word-space-extra-expected.txt:
* platform/efl/fast/encoding/utf-16-big-endian-expected.txt:
* platform/efl/fast/encoding/utf-16-little-endian-expected.txt:
* platform/efl/fast/forms/searchfield-heights-expected.txt:
* platform/efl/fast/forms/textAreaLineHeight-expected.txt:
* platform/efl/fast/inline/continuation-outlines-expected.txt:
* platform/efl/fast/inline/outline-continuations-expected.txt:
* platform/efl/fast/invalid/nestedh3s-expected.txt:
* platform/efl/fast/overflow/clip-rects-fixed-ancestor-expected.txt:
* platform/efl/fast/table/014-expected.txt:
* platform/efl/fast/table/dynamic-caption-add-remove-before-child-expected.txt:
* platform/efl/fast/text/international/bidi-LDB-2-HTML-expected.txt:
* platform/efl/mathml/presentation/mo-stretch-expected.png:
* platform/efl/mathml/presentation/mo-stretch-expected.txt:
* platform/efl/scrollbars/custom-scrollbar-with-incomplete-style-expected.txt:
* platform/efl/svg/hixie/error/012-expected.png:
* platform/efl/svg/hixie/error/012-expected.txt:
* platform/efl/svg/hixie/mixed/010-expected.txt:
* platform/efl/svg/in-html/circle-expected.txt:
* platform/efl/svg/wicd/rightsizing-grid-expected.txt:
* platform/efl/svg/wicd/test-rightsizing-b-expected.txt:
* platform/efl/tables/mozilla/bugs/bug113235-1-expected.txt:
* platform/efl/tables/mozilla/bugs/bug113235-2-expected.txt:
* platform/efl/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
* platform/efl/tables/mozilla/other/wa_table_tr_align-expected.txt:

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

5 years ago[GStreamer] Move toGstClockTime to utilities
calvaris@igalia.com [Tue, 13 May 2014 15:20:19 +0000 (15:20 +0000)]
[GStreamer] Move toGstClockTime to utilities
https://bugs.webkit.org/show_bug.cgi?id=132702

Reviewed by Philippe Normand.

toGstClockTime should be in GStreamerUtilities and corrected typo
in getGstPlayFlag.

No new tests needed.

* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::getGstPlayFlag): Renamed from getGstPlaysFlag.
(WebCore::toGstClockTime): Moved from MediaPlayerPrivateGStreamer.
(WebCore::getGstPlaysFlag): Deleted.
* platform/graphics/gstreamer/GStreamerUtilities.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
Corrected getGstPlayFlag typo.
(WebCore::toGstClockTime): Deleted.

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

5 years agoMake a few icon database improvements
darin@apple.com [Tue, 13 May 2014 14:44:50 +0000 (14:44 +0000)]
Make a few icon database improvements
https://bugs.webkit.org/show_bug.cgi?id=132812

Reviewed by Brady Eidson.

Source/WebCore:
* WebCore.exp.in: Export more IconDatabase functions, since they are now called
by WebKit2 through pointers to a class marked final.

* loader/icon/IconDatabase.cpp: Removed unneeded includes. Use override for
virtual functions.

* loader/icon/IconDatabase.h: Removed unneeded includes. Marked the class final.
Use override for virtual functions. Use a public constructor instead of a create
function.

* loader/icon/IconDatabaseBase.h: Removed unneeded includes.

Source/WebKit2:
* UIProcess/API/C/WKIconDatabase.cpp:
(WKIconDatabaseCopyIconDataForPageURL): Moved the actual implementation of this
out of the bindings into the WebIconDatabase class.

* UIProcess/API/C/WKIconDatabase.h: Fixed argument names that were inconsistent.

* UIProcess/WebIconDatabase.cpp: Removed unneeded includes.
(WebKit::WebIconDatabase::create): Pass a reference instead of a pointer.
(WebKit::WebIconDatabase::WebIconDatabase): Take a reference instead of a pointer.
(WebKit::WebIconDatabase::invalidate): Use nullptr.
(WebKit::WebIconDatabase::setDatabasePath): Use make_unique.
(WebKit::WebIconDatabase::setIconDataForIconURL): Removed unneeded local variable.
(WebKit::WebIconDatabase::imageForPageURL): Use nullptr.
(WebKit::WebIconDatabase::nativeImageForPageURL): Ditto.
(WebKit::WebIconDatabase::didFinishURLImport): Use a modern for loop.
(WebKit::WebIconDatabase::iconDataForPageURL): Added. Moved this here from
WKIconDatabase.cpp, but also changed to use createWithoutCopying to avoid making
another copy of the data for each icon.

* UIProcess/WebIconDatabase.h: Removed unneeded includes. Derive from
IconDatabaseClient privately. Use nullptr. Added iconDataForPageURL member
function. Use a reference for the constructor argument. Use override for
virtual functions. Use unique_ptr instead of OwnPtr.

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

5 years ago[MediaStream] MediaStream.addTrack Should not check for active state.
berto@igalia.com [Tue, 13 May 2014 13:56:15 +0000 (13:56 +0000)]
[MediaStream] MediaStream.addTrack Should not check for active state.

Source/WebCore:
https://bugs.webkit.org/show_bug.cgi?id=132558

Patch by Kiran <kiran.guduru@samsung.com> on 2014-05-13
Reviewed by Eric Carlson.

MediaStream.addTrack method is checking for active state of a
MediaStream, but it should not check for active state while adding a Track.

Test: fast/mediastream/MediaStream-add-tracks-to-inactive-stream.html

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::addTrack):

LayoutTests:
Nhttps://bugs.webkit.org/show_bug.cgi?id=132558.

Patch by Kiran <kiran.guduru@samsung.com> on 2014-05-13
Reviewed by Eric Carlson.

MediaStream.addTrack method is checking for active state of a
MediaStream, but it should not check for active state while adding a Track

Removed check not to add tracks to ended stream:relative which forced tests to avoid this bug.
* fast/mediastream/MediaStream-add-remove-tracks-expected.txt:
* fast/mediastream/MediaStream-add-remove-tracks.html:

New tests:
* fast/mediastream/MediaStream-add-tracks-to-inactive-stream-expected.txt: Added.
* fast/mediastream/MediaStream-add-tracks-to-inactive-stream.html: Added.

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

5 years agoWeb Inspector: Restore regionLayoutUpdated event in iOS7 inspector and remove regionO...
stavila@adobe.com [Tue, 13 May 2014 13:11:25 +0000 (13:11 +0000)]
Web Inspector: Restore regionLayoutUpdated event in iOS7 inspector and remove regionOversetChanged
https://bugs.webkit.org/show_bug.cgi?id=132731

Reviewed by Joseph Pecoraro.

Added the regionLayoutUpdated event back into the inspector for compatibility with iOS 7
and removed regionOversetChanged from the iOS7 inspector as iOS 7 does not implement that event.

* UserInterface/Models/ScriptTimelineRecord.js:
* UserInterface/Protocol/CSSObserver.js:
(WebInspector.CSSObserver.prototype.regionLayoutUpdated):
* UserInterface/Protocol/Legacy/7.0/InspectorWebBackendCommands.js:
* Versions/Inspector-iOS-7.0.json:

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

5 years ago[GTK] Unreviewed GTK gardening
commit-queue@webkit.org [Tue, 13 May 2014 10:21:07 +0000 (10:21 +0000)]
[GTK] Unreviewed GTK gardening

Rebaseline affected tests by changes to avoid increasing empty
LayoutRects introduced at r168575.

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2014-05-13

* platform/gtk/fast/css/css1_forward_compatible_parsing-expected.txt:
* platform/gtk/fast/css/first-line-text-decoration-expected.txt:
* platform/gtk/fast/css/h1-in-section-elements-expected.txt:
* platform/gtk/fast/css/text-input-with-webkit-border-radius-expected.txt:
* platform/gtk/fast/css/text-overflow-input-expected.txt:
* platform/gtk/fast/css/word-space-extra-expected.txt:
* platform/gtk/fast/encoding/utf-16-big-endian-expected.txt:
* platform/gtk/fast/encoding/utf-16-little-endian-expected.txt:
* platform/gtk/fast/forms/box-shadow-override-expected.txt:
* platform/gtk/fast/forms/control-restrict-line-height-expected.txt:
* platform/gtk/fast/forms/fieldset-align-expected.txt:
* platform/gtk/fast/forms/input-appearance-height-expected.txt:
* platform/gtk/fast/forms/placeholder-position-expected.txt:
* platform/gtk/fast/forms/placeholder-pseudo-style-expected.txt:
* platform/gtk/fast/forms/search-cancel-button-style-sharing-expected.txt:
* platform/gtk/fast/forms/search-display-none-cancel-button-expected.txt:
* platform/gtk/fast/forms/search/search-size-with-decorations-expected.txt:
* platform/gtk/fast/forms/textAreaLineHeight-expected.txt:
* platform/gtk/fast/inline/continuation-outlines-expected.txt:
* platform/gtk/fast/inline/continuation-outlines-with-layers-expected.txt:
* platform/gtk/fast/inline/outline-continuations-expected.txt:
* platform/gtk/fast/invalid/nestedh3s-expected.txt:
* platform/gtk/fast/multicol/client-rects-expected.txt:
* platform/gtk/fast/multicol/client-rects-spanners-complex-expected.txt:
* platform/gtk/fast/multicol/client-rects-spanners-expected.txt:
* platform/gtk/fast/multicol/newmulticol/client-rects-expected.txt:
* platform/gtk/fast/multicol/span/span-as-immediate-columns-child-expected.txt:
* platform/gtk/fast/multicol/span/span-margin-collapsing-expected.txt:
* platform/gtk/fast/overflow/clip-rects-fixed-ancestor-expected.txt:
* platform/gtk/fast/regions/repaint/repaint-regions-overflow-expected.txt:
* platform/gtk/fast/repaint/search-field-cancel-expected.txt:
* platform/gtk/fast/replaced/width100percent-searchfield-expected.txt:
* platform/gtk/fast/table/014-expected.txt:
* platform/gtk/fast/text/international/bidi-LDB-2-HTML-expected.txt:
* platform/gtk/mathml/presentation/mo-stretch-expected.txt:
* platform/gtk/scrollbars/custom-scrollbar-with-incomplete-style-expected.txt:
* platform/gtk/svg/custom/use-font-face-crash-expected.txt:
* platform/gtk/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.txt:
* platform/gtk/svg/wicd/rightsizing-grid-expected.txt:
* platform/gtk/tables/mozilla/bugs/bug113235-1-expected.txt:
* platform/gtk/tables/mozilla/bugs/bug113235-2-expected.txt:
* platform/gtk/tables/mozilla/other/wa_table_thtd_rowspan-expected.txt:
* platform/gtk/tables/mozilla/other/wa_table_tr_align-expected.txt:

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

5 years agoWebKit2 on iOS needs to capture the main thread's floating point environment.
mark.lam@apple.com [Tue, 13 May 2014 06:40:08 +0000 (06:40 +0000)]
WebKit2 on iOS needs to capture the main thread's floating point environment.
<https://webkit.org/b/132755>

Reviewed by Geoffrey Garen.

Source/WebCore:
For iOS, WorkerThread::workerThread() expects to be able to initialize the
worker thread's floating point environment to be the same as the one in the
main thread.  The FP env of the main thread is expected to have been captured
in the mainThreadFEnv global.  On WebKit2 for iOS, we neglected to initialize
mainThreadFEnv.

We now introduce a FloatingPointEnvironment class that will encapsulate the main
thread (aka "UIThread") fenv, and we'll call FloatingPointEnv::saveMainThreadEnvironment()
from ChildProcess::platformInitialize() to ensure that the FloatingPointEnvironment
singleton instance is initialized properly for WebKit2.

In the ChildProcess::platformInitialize(), we also need to initialize the ARMv7
FP env to support denormalized numbers.  We'll do this before calling
saveMainThreadEnvironment().

Tests: fast/workers/worker-floating-point.html
       js/floating-point-denormalized.html

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/ios/wak/FloatingPointEnvironment.cpp: Added.
(WebCore::FloatingPointEnvironment::env):
(WebCore::FloatingPointEnvironment::FloatingPointEnvironment):
(WebCore::FloatingPointEnvironment::enableDenormalSupport):
(WebCore::FloatingPointEnvironment::saveMainThreadEnvironment):
(WebCore::FloatingPointEnvironment::propagateMainThreadEnvironment):
* platform/ios/wak/FloatingPointEnvironment.h: Added.
* platform/ios/wak/WebCoreThread.h:
* platform/ios/wak/WebCoreThread.mm:
(RunWebThread):
(StartWebThread):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):

Source/WebKit2:
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::platformInitialize):
- Call FloatingPointEnv::enableNeededFloatingPointModes() to initialize
  the ARMv7 FP env to support denormalized numbers.
- Call FloatingPointEnv::saveMainThreadEnvironment() to capture the main thread
  fp env.

LayoutTests:
* fast/workers/resources/worker-floating-point.js: Added.
(runTest1):
(doDiv):
(runTest2):
* fast/workers/worker-floating-point-expected.txt: Added.
* fast/workers/worker-floating-point.html: Added.
* js/floating-point-denormalized-expected.txt: Added.
* js/floating-point-denormalized.html: Added.
* js/script-tests/floating-point-denormalized.js: Added.

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

5 years ago[EFL][WK2] Fix ewk_view_navigation test in EWK2ViewTest
gyuyoung.kim@samsung.com [Tue, 13 May 2014 06:14:17 +0000 (06:14 +0000)]
[EFL][WK2] Fix ewk_view_navigation test in EWK2ViewTest
https://bugs.webkit.org/show_bug.cgi?id=132817

Reviewed by Dirk Schulze.

To load test html pages, call ewk_view_uri_set() instead of EWK2UnitTestServer.
Besides this patch adds test html page for ewk_view_navigation unit test.

* UIProcess/API/efl/tests/resources/Page1.html: Added.
* UIProcess/API/efl/tests/resources/Page2.html: Added.
* UIProcess/API/efl/tests/resources/Page3.html: Added.
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):

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

5 years agoSVG root element accepts background color but fails to repaint it
krit@webkit.org [Tue, 13 May 2014 06:04:58 +0000 (06:04 +0000)]
SVG root element accepts background color but fails to repaint it
https://bugs.webkit.org/show_bug.cgi?id=63153

Reviewed by Dean Jackson.

Source/WebCore:
This is back ported from Blink. Don't know the exact commit though.
The patch checks if the SVGSVGElement is an outermost root element.
If it is, mark the whole element for repaint.

Test: svg/custom/svg-root-background.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateHasBoxDecorations):
(WebCore::RenderBoxModelObject::updateFromStyle):
* rendering/RenderBoxModelObject.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::RenderSVGRoot):
(WebCore::RenderSVGRoot::layout):
(WebCore::RenderSVGRoot::paintReplaced):
(WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
    This is a simple optimization by taking the necessary parts
    from RenderReplaced and SVGRenderSupport.
* rendering/svg/RenderSVGRoot.h:

LayoutTests:
Check that background color updates if the size of an outermost
root SVG element changes.

* svg/custom/svg-root-background-expected.png: Added.
* svg/custom/svg-root-background-expected.txt: Added.
* svg/custom/svg-root-background.html: Added.

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

5 years ago[Win] Unreviewed build fix after r168668.
bfulgham@apple.com [Tue, 13 May 2014 04:53:57 +0000 (04:53 +0000)]
[Win] Unreviewed build fix after r168668.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add
missing export symbols.

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

5 years ago[iOS] Fixed items are sometimes clipped after rubber-banding
simon.fraser@apple.com [Tue, 13 May 2014 04:32:09 +0000 (04:32 +0000)]
[iOS] Fixed items are sometimes clipped after rubber-banding
https://bugs.webkit.org/show_bug.cgi?id=132851
<rdar://problem/16870790>

Reviewed by Benjamin Poulain.

On iOS fixed-position layers would get clipped to the document rect,
but with rubber-banding, we can now have a custom fixed postion rect
that extends outside the document rect.

Another issue was that we would un-composite fixed elements sometimes
when scrolling fast, again because they could fall outside of the document rect.

A final issue was that pinching could reveal parts of fixed elements that should
lie outside the viewport, rather than clipping the layers.

Fix by converting both call points to use viewportConstrainedVisibleContentRect()
rather than viewportConstrainedExtentRect(). On non-iOS platforms these are
the same, but on iOS viewportConstrainedVisibleContentRect() uses the
custom fixed position rect, which is the correct rect to intersect with.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):

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

5 years agoUnreviewed, fix mismatched test expectation.
jpfau@apple.com [Tue, 13 May 2014 03:19:29 +0000 (03:19 +0000)]
Unreviewed, fix mismatched test expectation.

* webgl/many-contexts-expected.txt:

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

5 years agoDon't dispatch 'beforeload' event inside FrameView::layout()
jhoneycutt@apple.com [Tue, 13 May 2014 02:25:28 +0000 (02:25 +0000)]
Don't dispatch 'beforeload' event inside FrameView::layout()

https://bugs.webkit.org/show_bug.cgi?id=132621
<rdar://problem/15661470>

This merges Blink revision 162073 with minor renaming and style
changes. From that commit:

Executing JavaScript code inside FrameView::layout() is problematic.
e.g. an assertion failure tested in fast/events/beforeload-assertion.html.
We should avoid it.

This CL makes 'beforeload' event dispatching for plugins and iframes asynchronous,
except plugin access from JavaScript code (HTMLPlugInElement::
renderWidgetForJSBindings).

Reviewed by Brent Fulgham.

Source/WebCore:
Tests: fast/events/beforeload-assertion.html
       fast/events/beforeload-iframe-crash.html
       fast/events/beforeload-input-time-crash.html

* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
* dom/Document.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::renderWidgetForJSBindings):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::renderWidgetForJSBindings):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::updateEmbeddedObjectsTimerFired):
(WebCore::FrameView::flushAnyPendingPostLayoutTasks):
(WebCore::FrameView::performPostLayoutTasks):
* page/FrameView.h:
* testing/Internals.cpp:
(WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:
* compositing/plugins/composited-plugin.html:
* compositing/plugins/no-backing-store.html:
* fast/dom/beforeload/flash-before-load.html:
* fast/events/beforeload-assertion-expected.txt: Added.
* fast/events/beforeload-assertion.html: Added.
* fast/events/beforeload-iframe-crash-expected.txt: Added.
* fast/events/beforeload-iframe-crash.html: Added.
* fast/events/beforeload-input-time-crash-expected.txt: Added.
* fast/events/beforeload-input-time-crash.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html:
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-none-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-none-blocked.html:
* http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js:
(testImpl.iframe.onload):
(testImpl):
* http/tests/security/mixedContent/insecure-plugin-in-iframe.html:
* platform/mac/plugins/supports-carbon-event-model.html:
* plugins/get-user-agent-with-null-npp-from-npp-new.html:
* plugins/mouse-click-plugin-clears-selection.html:
* plugins/netscape-plugin-map-data-to-src.html:
* plugins/no-mime-with-valid-extension.html:
* plugins/plugin-initiate-popup-window.html:
* plugins/windowless_plugin_paint_test.html:
* resources/plugin.js: Added.
(runAfterPluginLoad):

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

5 years agoUnreviewed. Adjust expected result for test added in r168666.
roger_fong@apple.com [Tue, 13 May 2014 01:29:05 +0000 (01:29 +0000)]
Unreviewed. Adjust expected result for test added in r168666.
* webgl/many-contexts-expected.txt:

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

5 years agoLimit number of active graphics contexts per web process.
roger_fong@apple.com [Tue, 13 May 2014 01:07:52 +0000 (01:07 +0000)]
Limit number of active graphics contexts per web process.
https://bugs.webkit.org/show_bug.cgi?id=132833.
<rdar://problem/16888459>

Reviewed by Dean Jackson.

Test: webgl/many-contexts.html

* platform/graphics/GraphicsContext3D.h:
* platform/graphics/mac/GraphicsContext3DMac.mm: Limit number of active contexts to 16.
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
* webgl/many-contexts-expected.txt: Added.
* webgl/many-contexts.html: Added.

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

5 years agoBuild fix fix.
simon.fraser@apple.com [Tue, 13 May 2014 00:32:24 +0000 (00:32 +0000)]
Build fix fix.

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

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

5 years agoDataDetectorUI doesn't update with resize
bfulgham@apple.com [Tue, 13 May 2014 00:29:30 +0000 (00:29 +0000)]
DataDetectorUI doesn't update with resize
https://bugs.webkit.org/show_bug.cgi?id=132830
<rdar://problem/16871179>

Reviewed by Simon Fraser.

* editing/Editor.cpp:
(WebCore::Editor::scanSelectionForTelephoneNumbers): Add public, no-argument
version that can be called after layout changes.
(WebCore::Editor::didLayout): Reprocess telephone number data
since Ranges will have changed.
* editing/Editor.h:
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::updateDataDetectorsForSelection): Added.
* editing/FrameSelection.h:
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks): Ask the FrameSelection to update the
Range information for selected phone numbers.

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

5 years agoUnreviewed, EFL build fix since r168625.
gyuyoung.kim@samsung.com [Tue, 13 May 2014 00:27:36 +0000 (00:27 +0000)]
Unreviewed, EFL build fix since r168625.

* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformDefaultLocalStorageDirectory): Remove const keyword.

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

5 years agoFix the iOS build.
simon.fraser@apple.com [Tue, 13 May 2014 00:21:04 +0000 (00:21 +0000)]
Fix the iOS build.

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

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

5 years ago[iOS WK2] Fuzzy tiles on some sites on loading
simon.fraser@apple.com [Tue, 13 May 2014 00:14:01 +0000 (00:14 +0000)]
[iOS WK2] Fuzzy tiles on some sites on loading
https://bugs.webkit.org/show_bug.cgi?id=132847
<rdar://problem/16816178>

Reviewed by Benjamin Poulain.

Source/WebCore:

Export WebCore::TileController::contentsScale() const

* WebCore.exp.in:

Source/WebKit2:

PlatformCALayerRemoteTiledBacking overrode setContentsScale() but not contentsScale(),
causing us to early-return from GraphicsLayerCA::updateContentsScale() and leave the
scale wrong. Fix by overriding contentsScale() also.

* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
(WebKit::PlatformCALayerRemoteTiledBacking::contentsScale):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:

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

5 years agoAdd debug dumping for ViewportConfiguration
simon.fraser@apple.com [Tue, 13 May 2014 00:13:58 +0000 (00:13 +0000)]
Add debug dumping for ViewportConfiguration
https://bugs.webkit.org/show_bug.cgi?id=132843

Reviewed by Benjamin Poulain.

Add some TextStream-based dumping for ViewportConfiguration.

* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::updateConfiguration):
(WebCore::ViewportConfigurationTextStream::ViewportConfigurationTextStream):
(WebCore::ViewportConfigurationTextStream::increaseIndent):
(WebCore::ViewportConfigurationTextStream::decreaseIndent):
(WebCore::dumpProperty):
(WebCore::ViewportConfigurationTextStream::writeIndent):
(WebCore::ViewportConfigurationTextStream::operator<<):
(WebCore::ViewportConfiguration::description):
(WebCore::ViewportConfiguration::dump):
* page/ViewportConfiguration.h:

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

5 years agoFollowup to "Teach Editor to support more direct replacement of a Node"
beidson@apple.com [Tue, 13 May 2014 00:05:55 +0000 (00:05 +0000)]
Followup to "Teach Editor to support more direct replacement of a Node"
<rdar://problem/16817952> and https://bugs.webkit.org/show_bug.cgi?id=132834

Pair programmed and pair reviewed by Brady Eidson and Darin Adler.

* editing/mac/EditorMac.mm:
(WebCore::maybeCopyNodeAttributesToFragment):
(WebCore::Editor::replaceNodeFromPasteboard):

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

5 years agoTriple-buffer RemoteLayerBackingStore
timothy_horton@apple.com [Mon, 12 May 2014 23:31:56 +0000 (23:31 +0000)]
Triple-buffer RemoteLayerBackingStore
https://bugs.webkit.org/show_bug.cgi?id=132786
<rdar://problem/16877498>

Reviewed by Simon Fraser.

We need three buffers because we're currently unable to synchronize
with the render server to swap when they're not in use, so we were
throwing surfaces away far too frequently.

This hugely reduces time spent in IOSurface::create on various repaint benchmarks.

* Shared/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::hasFrontBuffer):
(WebKit::RemoteLayerBackingStore::volatility): Deleted.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::clearBackingStore):
(WebKit::RemoteLayerBackingStore::encode):
(WebKit::RemoteLayerBackingStore::decode):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
(WebKit::RemoteLayerBackingStore::display):
(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
(WebKit::RemoteLayerBackingStore::setBufferVolatility):
(WebKit::RemoteLayerBackingStore::Buffer::discard):
(WebKit::RemoteLayerBackingStore::setVolatility): Deleted.
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::purgeabilityTimerFired):
Put the ShareableBitmap/IOSurface and a volatility bit in a Buffer struct.
Also factor out "throw away this buffer and put it in the pool" into Buffer::discard().
We keep a volatility bit because querying IOSurface purgeability is expensive,
and we have a guarantee that any changes will happen in the Web process
and go through this class (the lack of this guarantee in most cases is why I'm not
putting this bit in WebCore::IOSurface itself).

Make it so that each buffer's volatility can be adjusted individually
by setBufferVolatility(), and adopt in RemoteLayerBackingStoreCollection.

Add a third buffer, m_secondaryBackBuffer, which will swap with the back buffer
before swapping front and back if the back buffer (soon to be the front buffer)
is still in use by the render server. This means that we will almost never
have to throw away a surface because it's in use (and conversely never need
to make a new surface).

Adjust RemoteLayerBackingStoreCollection to make secondary back surfaces purgeable
more aggressively than others.

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

5 years agoDon't make a Frameworks symlink inside WebKitLegacy.framework
andersca@apple.com [Mon, 12 May 2014 23:29:18 +0000 (23:29 +0000)]
Don't make a Frameworks symlink inside WebKitLegacy.framework
https://bugs.webkit.org/show_bug.cgi?id=132842
<rdar://problem/16886939>

Reviewed by Dan Bernstein.

* WebKit.xcodeproj/project.pbxproj:

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

5 years agoContent shadow layer needs to move in sync with the content layer
bdakin@apple.com [Mon, 12 May 2014 23:21:51 +0000 (23:21 +0000)]
Content shadow layer needs to move in sync with the content layer
https://bugs.webkit.org/show_bug.cgi?id=132841
-and corresponding-
<rdar://problem/16641115>

Reviewed by Simon Fraser.

Now that the root content layer moves a little bit (for y scroll positions between
0 and topContentInset), the shadow layer needs to move along with it since the
shadow layer should always have the same position as the root content layer.

Set the root state node’s shadow layer, and update the position whenever the root
content layer’s position is updated.
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):

Fetch the compositor’s layerForContentShadow().
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
* page/scrolling/ScrollingCoordinator.h:

Hook up the contentShadowLayer in the state node.
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setContentShadowLayer):

Hook it up in the ScrollingTreeNode as well. Move the layer whenever the m
_scrolledContentsLayer is moved.
* page/scrolling/ScrollingStateScrollingNode.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):

The shadow layer needs an anchor point now that we are moving it around.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):

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

5 years agoREGRESSION (r165972): Can't type into text fields in Flash
ap@apple.com [Mon, 12 May 2014 23:17:46 +0000 (23:17 +0000)]
REGRESSION (r165972): Can't type into text fields in Flash
https://bugs.webkit.org/show_bug.cgi?id=132840
<rdar://problem/16671969>

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm: (-[WKView inputContext]): Restore a function that
got accidentally lost when adding async text input code.

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

5 years agoAX: .js dialogs shown in unload while AX is running crash WebKit.
cfleizach@apple.com [Mon, 12 May 2014 23:02:59 +0000 (23:02 +0000)]
AX: .js dialogs shown in unload while AX is running crash WebKit.
https://bugs.webkit.org/show_bug.cgi?id=123828

Reviewed by Anders Carlsson.

Utilize platform API to inform AX clients when the WebProcess will suspend and resume.
This allows us to avoid having special behavior for accessibility when the WebProcess needs
to wait on a reply.

* Platform/IPC/Connection.cpp:
(IPC::Connection::waitForSyncReply):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::willSendSyncMessage):
(IPC::Connection::didReceiveSyncReply):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
(WebKit::WebChromeClient::print):
(WebKit::WebChromeClient::exceededDatabaseQuota):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):

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

5 years ago<svg> with opacity and compositing double-applies its opacity
krit@webkit.org [Mon, 12 May 2014 22:57:46 +0000 (22:57 +0000)]
<svg> with opacity and compositing double-applies its opacity
https://bugs.webkit.org/show_bug.cgi?id=116856

Reviewed by Simon Fraser.

Source/WebCore:
The opacity is applied by the compositor. However, all SVG elements
create transparency layers on their own to apply opacity. So did
SVGSVGElement.

Added a check if the current element has a compositing layer and skip
creating transparency layer if it has.

Test: svg/custom/composited-svg-with-opacity.html

* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):

LayoutTests:
Test that opacity is not applied twice for composited inline SVG.

* svg/custom/composited-svg-with-opacity-expected.html: Added.
* svg/custom/composited-svg-with-opacity.html: Added.

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

5 years agoTeach Editor to support more direct replacement of a Node
beidson@apple.com [Mon, 12 May 2014 22:47:39 +0000 (22:47 +0000)]
Teach Editor to support more direct replacement of a Node
<rdar://problem/16817952> and https://bugs.webkit.org/show_bug.cgi?id=132834

Reviewed by Enrica Casucci.

The new method "Editor::replaceNodeFromPasteboard" has the intent that the new DocumentFragment
from the pasteboard is as similar to the old Node as possible.

In practice, the new DocumentFragment:
1 - Can represent a single node that's missing various attributes the original Node had.
2 - Can be an unwanted fragment of arbitrary depth when the replacement happens inside Mail.app

This fixes both of these issues.

Add a MailBlockquoteHandling enum class for various Editor operations to pass through to the
ReplaceSelectionCommand:
* editing/Editor.cpp:
(WebCore::Editor::handleTextEvent):
(WebCore::Editor::pasteAsFragment):
(WebCore::Editor::pasteWithPasteboard):
(WebCore::Editor::replaceSelectionWithFragment):
* editing/Editor.h:

* dom/TextEvent.cpp:
(WebCore::TextEvent::createForPlainTextPaste):
(WebCore::TextEvent::createForFragmentPaste):
(WebCore::TextEvent::TextEvent):
* dom/TextEvent.h:
(WebCore::TextEvent::mailBlockquoteHandling):

* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
(WebCore::ReplaceSelectionCommand::doApply): Consider whether or not this particular Editor
  operation was meant to give special consideration to Mail's Blockquotes.
* editing/ReplaceSelectionCommand.h:

* editing/efl/EditorEfl.cpp:
(WebCore::Editor::pasteWithPasteboard):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::pasteWithPasteboard):

* editing/mac/EditorMac.mm:
(WebCore::Editor::pasteWithPasteboard):
(WebCore::Editor::readSelectionFromPasteboard):
(WebCore::maybeCopyNodeAttributesToFragment): If the new DocumentFragment represents a single HTML node
  with the same tag name is the original HTML node, copy over most attributes from the original node.
(WebCore::Editor::replaceNodeFromPasteboard): Create the fragment, run it through maybeCopyNodeAttributesToFragment.

* WebCore.exp.in:

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

5 years agoUnreviewed, rolling out r168642.
commit-queue@webkit.org [Mon, 12 May 2014 22:21:16 +0000 (22:21 +0000)]
Unreviewed, rolling out r168642.
https://bugs.webkit.org/show_bug.cgi?id=132839

Broke ARM build (Requested by jpfau on #webkit).

Reverted changeset:

"[Win] Enum type with value zero is compatible with void*,
potential cause of crashes."
https://bugs.webkit.org/show_bug.cgi?id=132772
http://trac.webkit.org/changeset/168642

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

5 years ago[Win] Correct Cygwin Path Confusion in WebInspectorUI Build
bfulgham@apple.com [Mon, 12 May 2014 22:19:35 +0000 (22:19 +0000)]
[Win] Correct Cygwin Path Confusion in WebInspectorUI Build
https://bugs.webkit.org/show_bug.cgi?id=132826

Reviewed by Joseph Pecoraro.

* Scripts/copy-user-interface-resources.pl: If the build is running
under Cygwin, be sure to use '/usr/bin/python', instead of just
'python' to avoid build errors.

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

5 years agoProgress on web timing.
achristensen@apple.com [Mon, 12 May 2014 21:38:02 +0000 (21:38 +0000)]
Progress on web timing.
https://bugs.webkit.org/show_bug.cgi?id=132574

Reviewed by Alexey Proskuryakov.

Source/WebCore:
* CMakeLists.txt:
Removed ResourceLoadTiming.cpp.
* WebCore.exp.in:
Added linker symbols for ResourceLoadTiming.
* WebCore.xcodeproj/project.pbxproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Removed ResourceLoadTiming.cpp.
* inspector/InspectorResourceAgent.cpp:
(WebCore::buildObjectForTiming):
* inspector/protocol/Network.json:
Updated ResourceTiming structure.
* loader/DocumentLoadTiming.cpp:
(WebCore::DocumentLoadTiming::setNavigationStart):
* loader/DocumentLoadTiming.h:
 Deleted unused setNavigationStart function.
* page/Performance.idl:
Updated spec URL.
* page/PerformanceResourceTiming.cpp:
(WebCore::PerformanceResourceTiming::domainLookupStart):
(WebCore::PerformanceResourceTiming::domainLookupEnd):
(WebCore::PerformanceResourceTiming::connectStart):
(WebCore::PerformanceResourceTiming::secureConnectionStart):
(WebCore::PerformanceResourceTiming::responseEnd):
Updated ResourceLoadTiming member variable names.
(WebCore::PerformanceResourceTiming::responseStart):
* page/PerformanceResourceTiming.h:
* page/PerformanceResourceTiming.idl:
Deleted responseStart because it is not in the spec.
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::domainLookupStart):
(WebCore::PerformanceTiming::domainLookupEnd):
(WebCore::PerformanceTiming::connectStart):
(WebCore::PerformanceTiming::secureConnectionStart):
(WebCore::PerformanceTiming::requestStart):
(WebCore::PerformanceTiming::responseStart):
Updated ResourceLoadTiming member variable names.
(WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute):
Use navigationStart as base for resource load times.
* page/PerformanceTiming.idl:
Updated spec URL.
* platform/network/HTTPParsers.h:
Removed unused class declarations.
* platform/network/ResourceHandle.h:
Moved soup request time from ResourceLoadTiming to ResourceHandle.
* platform/network/ResourceLoadTiming.cpp: Removed.
* platform/network/ResourceLoadTiming.h:
(WebCore::ResourceLoadTiming::deepCopy):
(WebCore::ResourceLoadTiming::operator==):
(WebCore::ResourceLoadTiming::ResourceLoadTiming):
Updated ResourceLoadTiming member variable names.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
Collect timing data.
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
Save timing data to a ResourceLoadTiming on the ResourceResponse.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::gotHeadersCallback):
(WebCore::restartedCallback):
(WebCore::milisecondsSinceRequest):
(WebCore::ResourceHandle::didStartRequest):
(WebCore::networkEventCallback):
(WebCore::createSoupMessageForHandleAndRequest):
(WebCore::ResourceHandle::sendPendingRequest):
Updated ResourceLoadTiming member variable names.
(WebCore::wroteBodyCallback): Deleted.

Source/WebKit2:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceResponse>::encode):
(IPC::ArgumentCoder<ResourceResponse>::decode):
Transfer ResourceLoadTiming values if they exist.

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

5 years ago[Cocoa] Expose WebPage::usesEphemeralSession to the bundle
mitz@apple.com [Mon, 12 May 2014 21:34:06 +0000 (21:34 +0000)]
[Cocoa] Expose WebPage::usesEphemeralSession to the bundle
https://bugs.webkit.org/show_bug.cgi?id=132836

Reviewed by Anders Carlsson.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _usesNonPersistentWebsiteDataStore]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:

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

5 years agoSVG outline property is broken and inefficient
krit@webkit.org [Mon, 12 May 2014 21:18:24 +0000 (21:18 +0000)]
SVG outline property is broken and inefficient
https://bugs.webkit.org/show_bug.cgi?id=113666

Reviewed by Dean Jackson.

Source/WebCore:
"[SVG2] css 'outline' property should apply to svg elements

The 'outline' property was only partially working in SVG before
this patch, this makes it work on text and text content child
elements too.

This makes SVG render the outlines as part of the foreground paint
phase.

Partly based on Florin Malita's webkit patch https://bugs.webkit.org/show_bug.cgi?id=113666#c12."

Tests: svg/custom/outline-stacking-expected.svg
       svg/custom/outline-stacking.svg
       svg/custom/rgba-color-outline.svg
       svg/text/text-outline-expected.svg
       svg/text/text-outline-rgba.html
       svg/text/text-outline.html
       svg/text/textpath-outline-expected.svg
       svg/text/textpath-outline.svg
       svg/text/tspan-multiple-outline.svg
       svg/text/tspan-outline-2-expected.svg
       svg/text/tspan-outline-2.svg
       svg/text/tspan-outline-expected.svg
       svg/text/tspan-outline.html

* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint): Draw outline in forground
    paint phase.
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint): Draw outline in forground
    paint phase.
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced): Pass paint offset.
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::paint): Draw outline in forground
    paint phase.
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::paint): Draw outline in forground
    paint phase.
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::paint): Pass paint offset.
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paint): Draw outline in forground
    paint phase.
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::paint): Pass paint offset.

LayoutTests:
Test stacking for outline properties. 'outline' should
not draw above overlapping content anymore.
Test outline drawing for text elements.

* svg/custom/outline-stacking-expected.svg: Added.
* svg/custom/outline-stacking.svg: Added.
* svg/custom/rgba-color-outline-expected.html: Added.
* svg/custom/rgba-color-outline.svg: Added.
* svg/text/text-outline-expected.svg: Added.
* svg/text/text-outline-rgba-expected.html: Added.
* svg/text/text-outline-rgba.html: Added.
* svg/text/text-outline.html: Added.
* svg/text/textpath-outline-expected.svg: Added.
* svg/text/textpath-outline.svg: Added.
* svg/text/tspan-multiple-outline-expected.html: Added.
* svg/text/tspan-multiple-outline.svg: Added.
* svg/text/tspan-outline-2-expected.svg: Added.
* svg/text/tspan-outline-2.svg: Added.
* svg/text/tspan-outline-expected.svg: Added.
* svg/text/tspan-outline.html: Added.

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

5 years agoLayer for bottom overhang area needs to be offset by the topContentInset
bdakin@apple.com [Mon, 12 May 2014 21:06:53 +0000 (21:06 +0000)]
Layer for bottom overhang area needs to be offset by the topContentInset
https://bugs.webkit.org/show_bug.cgi?id=132835
-and corresponding-
<rdar://problem/16641115>

Reviewed by Simon Fraser.

Push this layer down by the topContentInset in addition to the root layer height,
footer height, and header height.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):

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

5 years ago[Win] Enum type with value zero is compatible with void*, potential cause of crashes.
commit-queue@webkit.org [Mon, 12 May 2014 20:42:24 +0000 (20:42 +0000)]
[Win] Enum type with value zero is compatible with void*, potential cause of crashes.
https://bugs.webkit.org/show_bug.cgi?id=132772

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-05-12
Reviewed by Geoffrey Garen.

Using the MSVC compiler, an instance of an enum type with value zero, is compatible with void* (see bug 132683 for a code example).
This has caused crashes on Windows on two occasions (bug 132683, and bug 121001).
This patch tries to prevent these type of crashes by using a type with explicit constructors instead of void*.
The void* parameter in the loadDouble and storeDouble methods are replaced with TrustedImmPtr.

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::loadDouble):
(JSC::MacroAssemblerARM::storeDouble):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::loadDouble):
(JSC::MacroAssemblerARM64::storeDouble):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::loadDouble):
(JSC::MacroAssemblerARMv7::storeDouble):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::loadDouble):
(JSC::MacroAssemblerMIPS::storeDouble):
* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::loadDouble):
(JSC::MacroAssemblerSH4::storeDouble):
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::storeDouble):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::absDouble):
(JSC::MacroAssemblerX86Common::negateDouble):
(JSC::MacroAssemblerX86Common::loadDouble):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::silentFill):
(JSC::DFG::compileClampDoubleToByte):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
(JSC::DFG::SpeculativeJIT::compile):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::purifyNaN):
* jit/JITInlines.h:
(JSC::JIT::emitLoadDouble):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitFloatTypedArrayGetByVal):
* jit/ThunkGenerators.cpp:
(JSC::floorThunkGenerator):
(JSC::roundThunkGenerator):
(JSC::powThunkGenerator):

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

5 years agoREGRESSION (r167818): editing/inserting/typing-space-to-trigger-smart-link.html fails...
jhoneycutt@apple.com [Mon, 12 May 2014 20:31:29 +0000 (20:31 +0000)]
REGRESSION (r167818): editing/inserting/typing-space-to-trigger-smart-link.html fails on WebKit1 bots

<https://bugs.webkit.org/show_bug.cgi?id=132207>
<rdar://problem/16730393>

Source/WebCore:
Reverts the previous workaround in favor of a more specific fix for the
null dereference.

Reviewed by Darin Adler.

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
Check whether the run's start and end are still in the document, as
removeConflictingInlineStyleFromRun() may have removed them.

* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::apply):
Reverted previous workaround.
(WebCore::ApplyEditCommand::ReentrancyGuard::isRecursiveCall): Deleted.
(WebCore::ApplyEditCommand::ReentrancyGuard::Scope::Scope): Deleted.
(WebCore::ApplyEditCommand::ReentrancyGuard::Scope::~Scope): Deleted.

LayoutTests:
Reviewed by Darin Adler.

* editing/apply-style-iframe-crash-expected.txt:
Rebased test result has one fewer new line.
* platform/mac-wk1/TestExpectations:
Remove test from list of expected failures.

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

5 years agoClean up CrossThreadTask
zandobersek@gmail.com [Mon, 12 May 2014 20:16:43 +0000 (20:16 +0000)]
Clean up CrossThreadTask
https://bugs.webkit.org/show_bug.cgi?id=132800

Reviewed by Darin Adler.

Remove the createCallbackTask overloads and the related CrossThreadTask helper classes.

Instead, have one simple CrossThreadTask class that derives from ScriptExecutionContext::Task.
Its templated constructor takes in the method and the variadic pack of parameters. The cross-thread
copies of the parameters are then bound to that method and the resulting bind expression is used to
initialize the base class. The bind expression is constructed with a placeholder for the
ScriptExecutionContext* parameter that's provided through ScriptExecutionContext::Task::performTask().

* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
(WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
(WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
(WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Peer::send):
(WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
* dom/CrossThreadTask.h:
(WebCore::CrossThreadTask::CrossThreadTask):
(WebCore::CrossThreadTask1::CrossThreadTask1): Deleted.
(WebCore::CrossThreadTask1::performTask): Deleted.
(WebCore::CrossThreadTask2::CrossThreadTask2): Deleted.
(WebCore::CrossThreadTask2::performTask): Deleted.
(WebCore::CrossThreadTask3::CrossThreadTask3): Deleted.
(WebCore::CrossThreadTask3::performTask): Deleted.
(WebCore::CrossThreadTask4::CrossThreadTask4): Deleted.
(WebCore::CrossThreadTask4::performTask): Deleted.
(WebCore::CrossThreadTask5::CrossThreadTask5): Deleted.
(WebCore::CrossThreadTask5::performTask): Deleted.
(WebCore::CrossThreadTask6::CrossThreadTask6): Deleted.
(WebCore::CrossThreadTask6::performTask): Deleted.
(WebCore::CrossThreadTask7::CrossThreadTask7): Deleted.
(WebCore::CrossThreadTask7::performTask): Deleted.
(WebCore::CrossThreadTask8::CrossThreadTask8): Deleted.
(WebCore::CrossThreadTask8::performTask): Deleted.
(WebCore::createCallbackTask): Deleted.
* fileapi/FileReader.cpp:
(WebCore::FileReader::abort):
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
(WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
(WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
* loader/WorkerThreadableLoader.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeRequestFromCache):
(WebCore::MemoryCache::removeRequestFromSessionCaches):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
(WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::workerObjectDestroyed):
(WebCore::WorkerMessagingProxy::connectToInspector):
(WebCore::WorkerMessagingProxy::disconnectFromInspector):
(WebCore::WorkerMessagingProxy::sendMessageToInspector):

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

5 years agoImplement EXT_shader_texture_lod in WebGL.
commit-queue@webkit.org [Mon, 12 May 2014 20:13:44 +0000 (20:13 +0000)]
Implement EXT_shader_texture_lod in WebGL.
https://bugs.webkit.org/show_bug.cgi?id=128985
<rdar://problem/16111396>

Source/WebCore:
Based on Chromium patch by bajones@chromium.org.
https://src.chromium.org/viewvc/blink?revision=171465&view=revision

Patch by Alex Christensen <achristensen@webkit.org> on 2014-05-12
Reviewed by Dean Jackson.

Test: webgl/conformance/extensions/ext-shader-texture-lod.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Added new EXTShaderTextureLOD files.
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
Added EXTShaderTextureLOD.
* html/canvas/EXTShaderTextureLOD.cpp: Added.
(WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
(WebCore::EXTShaderTextureLOD::~EXTShaderTextureLOD):
(WebCore::EXTShaderTextureLOD::getName):
* html/canvas/EXTShaderTextureLOD.h: Added.
* html/canvas/EXTShaderTextureLOD.idl: Added.
* html/canvas/WebGLExtension.h:
Added EXTShaderTextureLODName.
* html/canvas/WebGLObject.cpp:
Removed unused inclusion of EXTTextureFilterAnisotropic.h.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
Added EXT_shader_texture_lod.
* html/canvas/WebGLRenderingContext.h:
Added a EXTShaderTextureLOD member variable.

LayoutTests:
Based on Firefox patch by Vladimir Vukicevic.
https://bug965848.bugzilla.mozilla.org/attachment.cgi?id=8367994

Patch by Alex Christensen <achristensen@webkit.org> on 2014-05-12
Reviewed by Dean Jackson.

* webgl/conformance/extensions/ext-shader-texture-lod-expected.txt: Added.
* webgl/conformance/extensions/ext-shader-texture-lod.html: Added.
* webgl/resources/webgl_test_files/conformance/extensions/ext-shader-texture-lod.html: Added.

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

5 years agoREGRESSION(168625): [GTK] build broken due to WKContextSetLocalStorageDirectory
commit-queue@webkit.org [Mon, 12 May 2014 19:54:38 +0000 (19:54 +0000)]
REGRESSION(168625): [GTK] build broken due to WKContextSetLocalStorageDirectory
https://bugs.webkit.org/show_bug.cgi?id=132831

Unreviewed GTK build fix.

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-05-12

* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultLocalStorageDirectory):
This is now a static member function.

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

5 years agoWKWebViewConfiguration should fill in the blanks
andersca@apple.com [Mon, 12 May 2014 19:53:28 +0000 (19:53 +0000)]
WKWebViewConfiguration should fill in the blanks
https://bugs.webkit.org/show_bug.cgi?id=132832
<rdar://problem/16886408>

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration _validate]):
* UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:

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

5 years agoDisallow drag and drop of non-displayable resources.
mhock@apple.com [Mon, 12 May 2014 19:47:12 +0000 (19:47 +0000)]
Disallow drag and drop of non-displayable resources.
https://bugs.webkit.org/show_bug.cgi?id=132745
<rdar://problem/10562662>

Reviewed by Alexey Proskuryakov.

Source/WebCore:
Test: http/tests/security/drag-drop-local-file.html

* page/DragController.cpp:
(WebCore::DragController::startDrag):

LayoutTests:
* http/tests/security/drag-drop-local-file-expected.txt: Added.
* http/tests/security/drag-drop-local-file.html: Added.

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

5 years ago0.4% of PLT3 in JSCell::structure() below JSObject::visitChildren().
akling@apple.com [Mon, 12 May 2014 18:26:17 +0000 (18:26 +0000)]
0.4% of PLT3 in JSCell::structure() below JSObject::visitChildren().
<https://webkit.org/b/132828>
<rdar://problem/16886285>

Reviewed by Michael Saboff.

* runtime/JSObject.cpp:
(JSC::JSObject::visitButterfly):
(JSC::JSObject::visitChildren):

    Use JSCell::structure(VM&) to reduce the number of hoops we jump
    through to find Structures during marking.

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

5 years agofast/multicol/newmulticol/first-letter-create.html is very flaky
stavila@adobe.com [Mon, 12 May 2014 18:19:36 +0000 (18:19 +0000)]
fast/multicol/newmulticol/first-letter-create.html is very flaky
https://bugs.webkit.org/show_bug.cgi?id=132744

Reviewed by Antti Koivisto.

Modified test to not display anything as its only purpose is to ensure it doesn't crash.

* TestExpectations:
* fast/multicol/newmulticol/first-letter-create-expected.html:
* fast/multicol/newmulticol/first-letter-create.html:

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

5 years agoWKWebView should default to _backgroundExtendsBeyondPage = YES
andersca@apple.com [Mon, 12 May 2014 18:18:53 +0000 (18:18 +0000)]
WKWebView should default to _backgroundExtendsBeyondPage = YES
https://bugs.webkit.org/show_bug.cgi?id=132829
<rdar://problem/16886364>

Reviewed by Beth Dakin.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):

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

5 years agoPass local storage directory to StorageManager::create
andersca@apple.com [Mon, 12 May 2014 18:12:18 +0000 (18:12 +0000)]
Pass local storage directory to StorageManager::create
https://bugs.webkit.org/show_bug.cgi?id=132827

Reviewed by Tim Horton.

Since we know the local storage directory at creation time and we know it never changes,
we can get rid of setLocalStorageDirectory and just pass the local storage directory at creation time.

* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::create):
(WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
(WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
(WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory): Deleted.
(WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): Deleted.
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::create):
(WebKit::StorageManager::StorageManager):
(WebKit::StorageManager::setLocalStorageDirectory): Deleted.
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):

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

5 years agoWinCairo buildfix after r168611
commit-queue@webkit.org [Mon, 12 May 2014 18:00:58 +0000 (18:00 +0000)]
WinCairo buildfix after r168611
https://bugs.webkit.org/show_bug.cgi?id=132825

Patch by Jozsef Berta <jberta.u-szeged@partner.samsung.com> on 2014-05-12
Reviewed by Darin Adler.

* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownloadManager::downloadThread):
(WebCore::CurlDownload::didReceiveHeader):
(WebCore::CurlDownload::didReceiveData):

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

5 years agoReplace WKContextSetLocalStorageDirectory with a context configuration getter/setter
andersca@apple.com [Mon, 12 May 2014 17:56:42 +0000 (17:56 +0000)]
Replace WKContextSetLocalStorageDirectory with a context configuration getter/setter
https://bugs.webkit.org/show_bug.cgi?id=132809

Reviewed by Dan Bernstein.

Source/WebKit2:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetLocalStorageDirectory): Deleted.

* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationCopyLocalStorageDirectory):
(WKContextConfigurationSetLocalStorageDirectory):
* UIProcess/API/C/WKContextConfigurationRef.h:
Add getters and setters for the local storage directory.

* UIProcess/API/C/WKContextPrivate.h:
Remove WKContextSetLocalStorageDirectory.

* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup initWithInjectedBundleURL:]):
Call WebContext::applyPlatformSpecificConfigurationDefaults.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _initWithConfiguration:]):
Call WebContext::applyPlatformSpecificConfigurationDefaults (for now).

* UIProcess/APIContextConfiguration.cpp:
(API::ContextConfiguration::webContextConfiguration):
Set the local storage. Also, call WebContext::applyPlatformSpecificConfigurationDefaults.

* UIProcess/APIContextConfiguration.h:
(API::ContextConfiguration::injectedBundlePath):
This should be const.

(API::ContextConfiguration::localStorageDirectory):
(API::ContextConfiguration::setLocalStorageDirectory):
Add getter and setter.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::setLocalStorageDirectory):
ASSERT that the path isn't null.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
New helper function that will fill in platform specific defaults for empty parameters.

(WebKit::WebContext::WebContext):
Get the local storage directory from the configuration.

(WebKit::WebContext::setLocalStorageDirectory): Deleted.
(WebKit::WebContext::localStorageDirectory): Deleted.
These are no longer needed.

* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultLocalStorageDirectory):
This should be a static member function.

Tools:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
Set the local storage directory using WKContextConfigurationSetLocalStorageDirectory.

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

5 years agoREGRESSION (r159560): Text clips on tile border if line-height < font-size
antti@apple.com [Mon, 12 May 2014 17:56:17 +0000 (17:56 +0000)]
REGRESSION (r159560): Text clips on tile border if line-height < font-size
https://bugs.webkit.org/show_bug.cgi?id=132822

Reviewed by Andreas Kling.

Source/WebCore:

The first line of simple line layout run range was miscomputed.

Test: fast/text/simple-lines-range-low-line-height.html

* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):

    Lines may overlap if line-height < font-size. Apply different adjustment when searching for range begin
    so that overflowing earlier lines are taken into account.

(WebCore::SimpleLineLayout::RunResolver::rangeForRect):

LayoutTests:

* fast/text/simple-lines-range-low-line-height-expected.html: Added.
* fast/text/simple-lines-range-low-line-height.html: Added.

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

5 years agoTypo fix in generate-forwarding-headers
commit-queue@webkit.org [Mon, 12 May 2014 16:04:56 +0000 (16:04 +0000)]
Typo fix in generate-forwarding-headers
https://bugs.webkit.org/show_bug.cgi?id=132820

Patch by Martin Hodovan <mhodovan.u-szeged@partner.samsung.com> on 2014-05-12
Reviewed by Anders Carlsson.

* Scripts/generate-forwarding-headers.pl:
(collectFrameworkHeaderPaths):

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

5 years ago[EFL] Rebaseline after adding tests in r168350
commit-queue@webkit.org [Mon, 12 May 2014 16:00:07 +0000 (16:00 +0000)]
[EFL] Rebaseline after adding tests in r168350
https://bugs.webkit.org/show_bug.cgi?id=132824

Unreviewed gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-05-12

* platform/efl/TestExpectations:
* platform/efl/fast/multicol/client-rects-expected.txt:
* platform/efl/fast/multicol/client-rects-spanners-complex-expected.txt:
* platform/efl/fast/multicol/client-rects-spanners-expected.txt:
* platform/efl/fast/multicol/span/span-as-immediate-columns-child-expected.txt:
* platform/efl/fast/multicol/span/span-margin-collapsing-expected.txt:
* platform/efl/svg/zoom/page/zoom-foreignObject-expected.txt:
* platform/efl/svg/zoom/page/zoom-svg-as-relative-image-expected.png:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.png:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.txt:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
* platform/efl/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt:
* platform/efl/svg/zoom/text/zoom-foreignObject-expected.txt:

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

5 years agoInvalid information remaining in lineToRegion map of RenderFlowThread.
stavila@adobe.com [Mon, 12 May 2014 15:23:34 +0000 (15:23 +0000)]
Invalid information remaining in lineToRegion map of RenderFlowThread.
https://bugs.webkit.org/show_bug.cgi?id=132690

Reviewed by Antti Koivisto.

Source/WebCore:
Test: fast/multicol/newmulticol/lines-region-map-crash.html

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::deleteLines):
* rendering/RenderFlowThread.h:

LayoutTests:
Added test for crash caused by invalid information in the lineToRegion map.

* fast/multicol/newmulticol/lines-region-map-crash-expected.html: Added.
* fast/multicol/newmulticol/lines-region-map-crash.html: Added.

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

5 years ago[EFL][WK1] Enable region based columns
commit-queue@webkit.org [Mon, 12 May 2014 14:30:51 +0000 (14:30 +0000)]
[EFL][WK1] Enable region based columns
https://bugs.webkit.org/show_bug.cgi?id=132646

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-05-12
Reviewed by Gyuyoung Kim.

Enable new multi-column mode as it was enabled in WK2 (r168046).

* ewk/ewk_view.cpp:
(_ewk_view_priv_new):

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

5 years ago[EFL] TLSErrors do not cause page load to fail when not ignored
pmolnar.u-szeged@partner.samsung.com [Mon, 12 May 2014 12:48:54 +0000 (12:48 +0000)]
[EFL] TLSErrors do not cause page load to fail when not ignored
https://bugs.webkit.org/show_bug.cgi?id=131104

Reviewed by Gyuyoung Kim.

Added EFL unit test for the bug https://bugs.webkit.org/show_bug.cgi?id=121548

* UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Added new test: ewk_ssl_bad_cert_redirect_https_to_http

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

5 years ago[cmake] Add missing FTL source files to the build system.
ossy@webkit.org [Mon, 12 May 2014 11:58:32 +0000 (11:58 +0000)]
[cmake] Add missing FTL source files to the build system.

Patch by László Langó <llango.u-szeged@partner.samsung.com> on 2014-05-12
Reviewed by Csaba Osztrogonác.

* CMakeLists.txt:

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

5 years agoUnreviewed. Bump version numbers.
carlosgc@webkit.org [Mon, 12 May 2014 11:32:08 +0000 (11:32 +0000)]
Unreviewed. Bump version numbers.

* Source/cmake/OptionsGTK.cmake:

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

5 years ago[CSS Blending] Adjust blending pixel test expectations
commit-queue@webkit.org [Mon, 12 May 2014 09:20:13 +0000 (09:20 +0000)]
[CSS Blending] Adjust blending pixel test expectations
https://bugs.webkit.org/show_bug.cgi?id=132737

Patch by Ion Rosca <rosca@adobe.com> on 2014-05-12
Reviewed by Mihnea Ovidenie.

Changing failing gif file with with one pixel base64 data and make them different for the two tests,
otherwise they might get cached and the gif animation is shared among multiple tests.
Changing the incorrect expectations for *gif-color-2* and adjusting test expectation for *gif-color-1*
* css3/blending/background-blend-mode-gif-color-2.html:
* css3/blending/background-blend-mode-gif-color.html:
* css3/blending/resources/squares.gif: Removed.
* platform/mac/css3/blending/background-blend-mode-gif-color-2-expected.png:
* platform/mac/css3/blending/background-blend-mode-gif-color-expected.png:

* platform/mac-wk1/TestExpectations:
The background-blend-mode-gif-color-2 does not pass on WK1: the git animation doesn't get started.

* platform/mac/TestExpectations: Adding bugs to the excepted blending tests.

Adjusting this test to avoid scrollbars. Adjusting test expectations.
* css3/blending/blend-mode-overflow-expected.txt: Removed.
* css3/blending/blend-mode-overflow.html:
* platform/mac/css3/blending/blend-mode-overflow-expected.png:
* platform/mac/css3/blending/blend-mode-overflow-expected.txt:

Adding pixel expectations for newly added tests:
* platform/mac/css3/blending/blend-mode-isolation-flags-append-non-stacking-context-blending-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-append-stacking-context-blending-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-remove-non-stacking-context-blending-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-remove-stacking-context-blending-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-turn-off-blending-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-turn-off-blending-no-isolation-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-turn-off-stacking-context-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-turn-on-blending-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-flags-turn-on-stacking-context-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-turn-off-self-painting-layer-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-turn-off-self-painting-layer1-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-turn-off-self-painting-layer2-expected.png: Added.
* platform/mac/css3/blending/blend-mode-isolation-turn-on-self-painting-layer-expected.png: Added.

Adjusting pixel tests after removing non separable blend modes.
* platform/mac/css3/blending/blend-mode-simple-composited-expected.png:
* platform/mac/css3/blending/blend-mode-simple-expected.png:
* platform/mac/css3/blending/effect-background-blend-mode-expected.png:
* platform/mac/css3/blending/effect-background-blend-mode-tiled-expected.png:

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

5 years agoREGRESSION(CMAKE): [GTK] JavaScriptCore API tests are not built anymore
carlosgc@webkit.org [Mon, 12 May 2014 08:57:58 +0000 (08:57 +0000)]
REGRESSION(CMAKE): [GTK] JavaScriptCore API tests are not built anymore
https://bugs.webkit.org/show_bug.cgi?id=132739

Reviewed Anders Carlsson.

* TestWebKitAPI/CMakeLists.txt: Add missing includes required by
the JSC unit tests.
* TestWebKitAPI/PlatformGTK.cmake: Bring back JavaScriptCore unit tests.

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

5 years agoAdd potential illustrations for a potential future blog post about the viewport meta tag
benjamin@webkit.org [Mon, 12 May 2014 07:23:17 +0000 (07:23 +0000)]
Add potential illustrations for a potential future blog post about the viewport meta tag

* blog-files/simple-viewport-configuration: Added.
* blog-files/simple-viewport-configuration/860_viewport.html: Added.
* blog-files/simple-viewport-configuration/blog_with_viewport.png: Added.
* blog-files/simple-viewport-configuration/blog_without_viewport.png: Added.
* blog-files/simple-viewport-configuration/default_viewport.html: Added.
* blog-files/simple-viewport-configuration/horizontal_design.html: Added.
* blog-files/simple-viewport-configuration/inspector.png: Added.
* blog-files/simple-viewport-configuration/report_size.js: Added.

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

5 years agoClean up MainThreadTask
zandobersek@gmail.com [Mon, 12 May 2014 07:04:59 +0000 (07:04 +0000)]
Clean up MainThreadTask
https://bugs.webkit.org/show_bug.cgi?id=132799

Reviewed by Darin Adler.

Only have one simple MainThreadTask class that derives from std::function<void ()>.
Its templated constructor takes in the method and a variadic pack of parameters.
The cross-thread copies of the parameter are then bound to the given method through
std::bind(), with the resulting bind expression used to initialize the base
std::function<void ()> class.

The WebCore::callOnMainThread() functions and the helper classes are removed in favor
of passing MainThreadTask rvalues directly to WTF::callOnMainThread().

* fileapi/AsyncFileStream.cpp:
(WebCore::AsyncFileStream::startOnFileThread):
(WebCore::AsyncFileStream::stopOnFileThread):
(WebCore::AsyncFileStream::getSizeOnFileThread):
(WebCore::AsyncFileStream::openForReadOnFileThread):
(WebCore::AsyncFileStream::openForWriteOnFileThread):
(WebCore::AsyncFileStream::readOnFileThread):
(WebCore::AsyncFileStream::writeOnFileThread):
(WebCore::AsyncFileStream::truncateOnFileThread):
* platform/MainThreadTask.h:
(WebCore::MainThreadTask::MainThreadTask):
(WebCore::MainThreadTaskBase::MainThreadTaskBase): Deleted.
(WebCore::MainThreadTaskBase::~MainThreadTaskBase): Deleted.
(WebCore::MainThreadTask1::create): Deleted.
(WebCore::MainThreadTask1::MainThreadTask1): Deleted.
(WebCore::MainThreadTask2::create): Deleted.
(WebCore::MainThreadTask2::MainThreadTask2): Deleted.
(WebCore::MainThreadTask3::create): Deleted.
(WebCore::MainThreadTask3::MainThreadTask3): Deleted.
(WebCore::MainThreadTask4::create): Deleted.
(WebCore::MainThreadTask4::MainThreadTask4): Deleted.
(WebCore::MainThreadTask5::create): Deleted.
(WebCore::MainThreadTask5::MainThreadTask5): Deleted.
(WebCore::MainThreadTask6::create): Deleted.
(WebCore::MainThreadTask6::MainThreadTask6): Deleted.
(WebCore::MainThreadTask7::create): Deleted.
(WebCore::MainThreadTask7::MainThreadTask7): Deleted.
(WebCore::MainThreadTask8::create): Deleted.
(WebCore::MainThreadTask8::MainThreadTask8): Deleted.
(WebCore::executeMainThreadTask): Deleted.
(WebCore::callOnMainThread): Deleted.

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

5 years agoSimplify FileThread::Task usage
zandobersek@gmail.com [Mon, 12 May 2014 07:01:24 +0000 (07:01 +0000)]
Simplify FileThread::Task usage
https://bugs.webkit.org/show_bug.cgi?id=132798

Reviewed by Darin Adler.

Remove the createFileThreadTask functions and the related FileThreadTask helper classes.

Instead, the FileThread::Task class now has a templated constructor that takes in a pointer
to the object instance, a method, and a variadic pack of parameters. The pointer and the
cross-thread copies of all the parameters are then bound to the given method through std::bind().

Instead of createFileThreadTask, std::make_unique<>() should be used to construct unique pointers
that wrap FileThread::Task objects.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* fileapi/AsyncFileStream.cpp:
(WebCore::AsyncFileStream::create):
(WebCore::AsyncFileStream::stop):
(WebCore::AsyncFileStream::getSize):
(WebCore::AsyncFileStream::openForRead):
(WebCore::AsyncFileStream::openForWrite):
(WebCore::AsyncFileStream::close):
(WebCore::AsyncFileStream::read):
(WebCore::AsyncFileStream::write):
(WebCore::AsyncFileStream::truncate):
* fileapi/FileThread.h:
(WebCore::FileThread::Task::Task):
(WebCore::FileThread::Task::performTask):
(WebCore::FileThread::Task::~Task): Deleted.
* fileapi/FileThreadTask.h: Removed.

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

5 years agoExpose a function to copy favicon data without image conversion.
commit-queue@webkit.org [Mon, 12 May 2014 06:30:37 +0000 (06:30 +0000)]
Expose a function to copy favicon data without image conversion.
https://bugs.webkit.org/show_bug.cgi?id=132805

Patch by Gordon Sheridan <gordon_sheridan@apple.com> on 2014-05-11
Reviewed by Darin Adler.

* UIProcess/API/C/WKIconDatabase.cpp:
(WKIconDatabaseCopyIconDataForPageURL):
Add a function to copy the data from the image of a favicon for an associated page url.

* UIProcess/API/C/WKIconDatabase.h:
Declare WKIconDatabaseCopyIconDataForPageURL.

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

5 years agoREGRESSION(r168603): [GTK] Build broken.
commit-queue@webkit.org [Mon, 12 May 2014 06:21:47 +0000 (06:21 +0000)]
REGRESSION(r168603): [GTK] Build broken.
https://bugs.webkit.org/show_bug.cgi?id=132810

Patch by Seongjun Kim <isAir@company100.com> on 2014-05-11
Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):
Construct a WebContextConfiguration object and pass it to WebContext::create.

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

5 years agoDo not create a temporary string to append the SVGLength's unit
benjamin@webkit.org [Mon, 12 May 2014 04:54:34 +0000 (04:54 +0000)]
Do not create a temporary string to append the SVGLength's unit
https://bugs.webkit.org/show_bug.cgi?id=132807

Reviewed by Geoffrey Garen.

* svg/SVGLength.cpp:
(WebCore::lengthTypeToString):
The caller just append the string to a number string. The function
lengthTypeToString() was creating a new WTF::String from scratch,
copied the characters to make a new string, and destroyed the WTF::String.

Instead, just append the string literal.

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

5 years agoCSS JIT: reduce cost of computing backtracking height
commit-queue@webkit.org [Mon, 12 May 2014 04:23:12 +0000 (04:23 +0000)]
CSS JIT: reduce cost of computing backtracking height
https://bugs.webkit.org/show_bug.cgi?id=132546

Patch by Yusuke Suzuki <utatane.tea@gmail.com> on 2014-05-11
Reviewed by Benjamin Poulain.

Because compiler previously compute backtracking height for
previous child fragment, by leveraging this, we can limit the
`maxPrefixSize` for `computeBacktrackingHeightFromDescendant`.

For example, consider selector "c>a>b>d>a>b e"'s descendant chain,
"c>a>b>d>a>b".

At the <a> position, we have matching pattern [b, a, d, b, a] and
calculate the backtracking height by following method.

pattern:    [b, a, d, b, a]
candidate0:    [b, a, d, b]  => Not matched.
candidate1:       [b, a, d]  => Not matched.
candidate2:          [b, a]  => Matched against the pattern.

At this time, first candidate0's pattern size is `pattern.size() - 1`.
And get backtracking height from descendant 3, that is
`pattern.size() - candidate.size()`, `5 - 2`.

And next, at the <c> position, we calcucate the backtracking height
for this pattern.

pattern:    [b, a, d, b, a, c]
candidate0:    [b, a, d, b, a]  => Not matched.
candidate1:       [b, a, d, b]  => Not matched.
candidate2:          [b, a, d]  => Not matched.
candidate3:             [b, a]  => Not matched.
candidate4:                [b]  => Not matched.
candidate5:                 []  => Matched against the pattern.

Then, we get the backtracking height, which is 6 (6 - 0).
However, in the above case, we already know that attempts from candidate0
to candidate1 always fail, since parts of these are already tested at
the <b> position trial and we know they don't match.

So in this case, we should start this computation from candidate2,
such as,

pattern:    [b, a, d, b, a, c]
candidate2:          [b, a, d]  => Not matched.
candidate3:             [b, a]  => Not matched.
candidate4:                [b]  => Not matched.
candidate5:                 []  => Matched against the pattern.

We can start computation with candidate size
`pattern.size() - previousChildFragmentBacktrackingHeight`.
In this example, `pattern.size()` is 6 and
`previousChildFragmentBacktrackingHeight` is 3, so candidate size is
3, that is candidate2.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::computeBacktrackingStartHeightFromDescendant):
(WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):

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

5 years agoRemove local storage directory and sandbox extension from WebProcessCreationParameters
andersca@apple.com [Mon, 12 May 2014 00:08:02 +0000 (00:08 +0000)]
Remove local storage directory and sandbox extension from WebProcessCreationParameters
https://bugs.webkit.org/show_bug.cgi?id=132808

Reviewed by Beth Dakin.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

5 years agoUnreviewed, CMake build fix after r168603
ljaehun.lim@samsung.com [Sun, 11 May 2014 23:44:49 +0000 (23:44 +0000)]
Unreviewed, CMake build fix after r168603

Add APIContextConfiguration.cpp and WKContextConfigurationRef.cpp to the source list.

* CMakeLists.txt:

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

5 years agoAdd a WKContextConfigurationRef object and make the injected bundle path part of...
andersca@apple.com [Sun, 11 May 2014 22:12:17 +0000 (22:12 +0000)]
Add a WKContextConfigurationRef object and make the injected bundle path part of the configuration
https://bugs.webkit.org/show_bug.cgi?id=132806

Source/WebKit2:
<rdar://problem/16830143>

Reviewed by Beth Dakin.

Many setters on WKContextRef really only make sense to set early on, so move to a pattern where we create a
configuration object, a WKContextConfiguration which WKContexts can be created from. Add the injected bundle path
as a configuration property. More setters will follow.

* Shared/API/c/WKBase.h:
Add WKContextConfigurationRef.

* Shared/APIObject.h:
Add ContextConfiguration enum declaration.

* UIProcess/API/C/WKAPICast.h:
Handle WKContextConfigurationRef.

* UIProcess/API/C/WKContext.cpp:
(WKContextCreate):
Create an empty WKContextConfigurationRef object and pass it to WKContextCreateWithConfiguration.

(WKContextCreateWithInjectedBundlePath):
Create a WKContextConfigurationRef object, set its bundle path and pass the configuration to WKContextCreateWithConfiguration.

(WKContextCreateWithConfiguration):
Convert the WKContextConfigurationRef object to a WebContextConfiguration and pass it to WebContext::create.

* UIProcess/API/C/WKContext.h:
Add WKContextCreateWithConfiguration.

* UIProcess/API/C/WKContextConfigurationRef.cpp: Added.
(WKContextConfigurationCreate):
Create an API::ContextConfiguration object.

(WKContextConfigurationCopyInjectedBundlePath):
Return the injected bundle path.

(WKContextConfigurationSetInjectedBundlePath):
Set the injected bundle path.

* UIProcess/API/C/WKContextConfigurationRef.h: Added.
New C SPI header.

* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup initWithInjectedBundleURL:]):
Construct a WebContextConfiguration object and pass it to WebContext::Create.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _initWithConfiguration:]):
Construct a WebContextConfiguration object and pass it to WebContext::Create.

* UIProcess/APIContextConfiguration.cpp: Added.
New API::ContextConfiguration object.

(API::ContextConfiguration::webContextConfiguration):
Construct a WebContextConfiguration struct from our current configuration.

* UIProcess/APIContextConfiguration.h: Added.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::create):
Pass the WebContextConfiguration to the constructor.

(WebKit::WebContext::WebContext):
Set the injected bundle path from the WebContextConfiguration object.

* UIProcess/WebContext.h:
Change the WebContext constructor and create function to take a WebContextConfiguration object.

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

Tools:

Reviewed by Beth Dakin.

Migrate to WKContextConfiguration.

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

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

5 years agoHeaders and footers are not positioned correctly with topContentInset
bdakin@apple.com [Sun, 11 May 2014 21:02:52 +0000 (21:02 +0000)]
Headers and footers are not positioned correctly with topContentInset
https://bugs.webkit.org/show_bug.cgi?id=132787
-and corresponding-
<rdar://problem/16641115>

Reviewed by Tim Horton.

Headers and footers need to take the inset into account, and they also need to
factor in the fact that the root layer moves around now too.

The existing yPositionForRootContentLayer() is actually the right calculation for
the header layer. The root content layer wants that value, but pushed down by the
header height. Now there are static functions for both of them and the footer to
avoid duplicated code in the three spots where we need this information.
* page/FrameView.cpp:
(WebCore::FrameView::yPositionForHeaderLayer):
(WebCore::FrameView::yPositionForRootContentLayer):
(WebCore::FrameView::yPositionForFooterLayer):
* page/FrameView.h:

Use the static functions to compute the layer positions.
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):

How did headers ever work with this bug?? I don’t know. We need to return that
layer.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::headerLayerForFrameView):

Use the static functions to compute the layer positions.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):

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

5 years agoSubpixel rendering[iOS]: <select> decoration is misaligned when the renderer is on...
zalan@apple.com [Sun, 11 May 2014 19:46:53 +0000 (19:46 +0000)]
Subpixel rendering[iOS]: <select> decoration is misaligned when the renderer is on subpixel position.
https://bugs.webkit.org/show_bug.cgi?id=132779
<rdar://problem/16631071>

Reviewed by Simon Fraser.

Push <select> theme decoration's rect to device pixel position to ensure
that the theme bounds are aligned with the renderer's bounds. (in painting terms)
However, as the decoration code paints multiple items, they all need to use snapped
final coordinates for painting : tracked here https://bugs.webkit.org/show_bug.cgi?id=132780
This patch also changes the padding values for <select> [iOS] to compensate for the integer
truncation that happened before subpixel.

Not testable.

* css/html.css:
(select):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
* platform/efl/RenderThemeEfl.h:
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintMenuListButtonDecorations):
* platform/gtk/RenderThemeGtk.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paintDecorations):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintMenuListButtonDecorations):
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuListButtonDecorations):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintMenuListButtonDecorations):
* rendering/RenderThemeSafari.h:
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::paintMenuList):
(WebCore::RenderThemeWin::paintMenuListButtonDecorations):
* rendering/RenderThemeWin.h:

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

5 years agoMove Source/WebCore/workers/ code to std::unique_ptr
zandobersek@gmail.com [Sun, 11 May 2014 19:10:41 +0000 (19:10 +0000)]
Move Source/WebCore/workers/ code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=132401

Reviewed by Darin Adler.

Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/workers (and related places)
with std::unique_ptr.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::setTimeout):
(WebCore::JSDOMWindow::setInterval):
* bindings/js/JSWorkerGlobalScopeCustom.cpp:
(WebCore::JSWorkerGlobalScope::setTimeout):
(WebCore::JSWorkerGlobalScope::setInterval):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::create):
* bindings/js/ScheduledAction.h:
* page/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::fired):
(WebCore::DOMTimer::didStop):
* page/DOMTimer.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::setInterval):
* page/DOMWindow.h:
* workers/WorkerEventQueue.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::setInterval):
* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::clearScript):
* workers/WorkerLoaderProxy.h:
* workers/WorkerMessagingProxy.h:
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::WorkerRunLoop):
* workers/WorkerRunLoop.h:
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):
(WebCore::WorkerScriptLoader::createResourceRequest):
* workers/WorkerScriptLoader.h:
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::workerThread):
(WebCore::WorkerThreadStartupData::create): Deleted.
* workers/WorkerThread.h:

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

5 years ago[Mac] [iOS] Underlines are too low
mmaxfield@apple.com [Sun, 11 May 2014 17:35:14 +0000 (17:35 +0000)]
[Mac] [iOS] Underlines are too low
https://bugs.webkit.org/show_bug.cgi?id=132770

Reviewed by Darin Adler.

Source/WebCore:
computeUnderlineOffset() inside InlineTextBox.cpp lowers underlines from text
baseline by a value that is proportional to the font size. However, this
lowering was done a second time in
GraphicsContext::computeLineBoundsAndAntialiasingModeForText(). This patch
removes this second, platform-dependent lowering.

This duplication was caused by merging iOS into open source, where iOS used
the GraphicsContext approach and open source used the InlineTextBox approach.

Covered by fast/css3-text/css3-text-decoration/text-decoration-thickness.html.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText): Remove
redundant lowering code
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration): Clean up textDecorationThickness
variable

LayoutTests:
See per-file descriptions.

* fast/css3-text/css3-text-decoration/text-decoration-style-double-space-scales.html: Made
test more robust so it does not barely clip underlines, but rather gives them a couple
pixels of wiggle room.
* fast/css3-text/css3-text-decoration/text-decoration-thickness.html: Not only does this test
underline thickness, but it also tests underline position. Updated this test to not expect
incorrect results.

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

5 years agoText with simple line layout not getting pushed below float when there is not enough...
antti@apple.com [Sun, 11 May 2014 09:42:47 +0000 (09:42 +0000)]
Text with simple line layout not getting pushed below float when there is not enough space for it
https://bugs.webkit.org/show_bug.cgi?id=126991

Reviewed by Andreas Kling.

Source/WebCore:
Tests: fast/text/simple-lines-intruding-wide-float-dynamic.html
       fast/text/simple-lines-intruding-wide-float.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):

    Invalidate the line layout path when floats change. We need to check SimpleLineLayout::canUseFor again as
    intruding floats may make this flow ineligible to use the path.

* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::floatingObjectSet):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):

    Test the top positions of all floats for case that would push text below the float instead of just testing
    the first line. We may have floats in the middle of the paragraph too.

LayoutTests:
* fast/text/simple-lines-intruding-wide-float-dynamic-expected.html: Added.
* fast/text/simple-lines-intruding-wide-float-dynamic.html: Added.
* fast/text/simple-lines-intruding-wide-float-expected.html: Added.
* fast/text/simple-lines-intruding-wide-float.html: Added.

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

5 years agoWinCairo crashes on acid3 test
commit-queue@webkit.org [Sun, 11 May 2014 07:01:15 +0000 (07:01 +0000)]
WinCairo crashes on acid3 test
https://bugs.webkit.org/show_bug.cgi?id=131364

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-05-11
Reviewed by Brent Fulgham.

When the 304 (Not-modified) response is received, the Curl backend should look up the cached response,
and call the client method didReceiveResponse with the cached response, instead of the 304 response.
Otherwise the response will contain an empty MIME type, which causes the request to be cancelled, and the client deleted.
When the Curl cache manager then accesses the client afterwards, it is deleted, and we crash.

* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::didReceiveResponse): Return early if request is cancelled.
(WebCore::CurlCacheManager::getCachedResponse): Added method to get cached response.
* platform/network/curl/CurlCacheManager.h: Ditto.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback): When 304 response is received, look up cached response, and use it.

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

5 years ago[WK2] URTBF after r168585.
ossy@webkit.org [Sun, 11 May 2014 05:30:54 +0000 (05:30 +0000)]
[WK2] URTBF after r168585.

* Platform/IPC/Connection.h:
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::terminate):

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

5 years ago[WKWebView _updateScrollViewBackground] churns UI-and-CGColors while repainting
timothy_horton@apple.com [Sun, 11 May 2014 03:57:05 +0000 (03:57 +0000)]
[WKWebView _updateScrollViewBackground] churns UI-and-CGColors while repainting
https://bugs.webkit.org/show_bug.cgi?id=132793
<rdar://problem/16877870>

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]):
Don't bypass the cache and make a copy of the CGColor just to set its alpha.
Cache the last color and don't bother creating a UIColor nor updating the
color on our views if it hasn't changed.

* WebCore.exp.in:
Export a Color convenience function.

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

5 years agoImplement -forwardingTargetForSelector on WKScrollViewDelegateForwarder
timothy_horton@apple.com [Sun, 11 May 2014 03:32:29 +0000 (03:32 +0000)]
Implement -forwardingTargetForSelector on WKScrollViewDelegateForwarder
https://bugs.webkit.org/show_bug.cgi?id=132790
<rdar://problem/16877802>

Reviewed by Dan Bernstein.

* UIProcess/ios/WKScrollView.mm:
(-[WKScrollViewDelegateForwarder forwardingTargetForSelector:]):
If only one of the delegates will respond to a selector,
we can return it from forwardingTargetForSelector: to avoid
NSInvocation overhead.

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

5 years ago[Mac] Some targets that link or soft-link WebKit.framework don't depend on it
mitz@apple.com [Sun, 11 May 2014 03:02:04 +0000 (03:02 +0000)]
[Mac] Some targets that link or soft-link WebKit.framework don't depend on it
https://bugs.webkit.org/show_bug.cgi?id=132776

Reviewed by Darin Adler.

* WebKit2.xcodeproj/project.pbxproj:

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

5 years ago[GTK][CMake] Unable to do make install
mrobinson@webkit.org [Sun, 11 May 2014 02:14:09 +0000 (02:14 +0000)]
[GTK][CMake] Unable to do make install
https://bugs.webkit.org/show_bug.cgi?id=130188

Reviewed by Carlos Garcia Campos.

Only try to install the HTML documentation if the build is configured to generate it via
the new ENABLE_GTKDOC option. We cannot conditionally install something, so this allows us
to keep the HTML documentation directory as an installation source.

* Source/PlatformGTK.cmake: The gtkdoc target now always builds HTML documentation, but
is only added to the default target when ENABLE_GTKDOC is turned on. gtkdoc-no-html is
now only added to the default target when DEVELOPER_MODE is true and ENABLE_GTKDOC is
false. When both ENABLE_GTKDOC and DEVELOPER_MODE are false, documentation isn't built at all.
* Source/cmake/OptionsGTK.cmake: Add an ENABLE_GTKDOC option to the build.

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

5 years ago[EFL][WK2] Move the ownership of EwkSettings from EwkView to EwkPageGroup
ryuan.choi@samsung.com [Sun, 11 May 2014 01:35:08 +0000 (01:35 +0000)]
[EFL][WK2] Move the ownership of EwkSettings from EwkView to EwkPageGroup
https://bugs.webkit.org/show_bug.cgi?id=132771

Reviewed by Gyuyoung Kim.

Moved ownership of EwkSettings from EwkView to EwkPageGroup.

* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
* UIProcess/API/efl/EwkView.h:
(EwkView::settings): Deleted.
* UIProcess/API/efl/ewk_page_group.cpp:
(EwkPageGroup::EwkPageGroup):
* UIProcess/API/efl/ewk_page_group_private.h:
(EwkPageGroup::settings):
* UIProcess/API/efl/ewk_settings_private.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_settings_get):

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

5 years ago[iOS WebKit2] REGRESSION (r168493): Canvasmark 2013 benchmark always hits the RELEASE...
timothy_horton@apple.com [Sun, 11 May 2014 00:53:31 +0000 (00:53 +0000)]
[iOS WebKit2] REGRESSION (r168493): Canvasmark 2013 benchmark always hits the RELEASE_ASSERT in RemoteLayerTreeDrawingArea::flushLayers()
https://bugs.webkit.org/show_bug.cgi?id=132783
<rdar://problem/16877326>

Reviewed by Anders Carlsson.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
There's a race window between the BackingStoreFlusher sending the new
layer tree to the UI process and updating m_hasFlushed where we can
get a reply back in (on the Web process main thread) from the UI process
that we committed the new layer tree (didUpdate).
This will cause the RELEASE_ASSERT in flushLayers() to fire incorrectly.
Since the RELEASE_ASSERT is there only to avoid painting garbage, move
our code to set m_hasFlushed=true to after we finish calling CGContextFlush
on all of the contexts, instead of after we send the layer tree commit message,
which will remove the race entirely.

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

5 years agoASSERTION FAILED: !m_connection under RunJavaScriptAlert
andersca@apple.com [Sun, 11 May 2014 00:30:19 +0000 (00:30 +0000)]
ASSERTION FAILED: !m_connection under RunJavaScriptAlert
https://bugs.webkit.org/show_bug.cgi?id=132792
<rdar://problem/16691138>

Reviewed by Dan Bernstein.

Detect if someone implementing a UI delegate method with a completion handler never calls the completion
handler and raise an exception instead of asserting.

* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::CompletionHandlerCallChecker::create):
(WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker):
(WebKit::CompletionHandlerCallChecker::didCallCompletionHandler):
(WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker):
(WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):

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

5 years agoMultiple svg-in-object-placeholder-height tests fail
ap@apple.com [Sun, 11 May 2014 00:09:04 +0000 (00:09 +0000)]
Multiple svg-in-object-placeholder-height tests fail
https://bugs.webkit.org/show_bug.cgi?id=132791

* TestExpectations: Skipped them, the tests take a long time before they fail.

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