WebKit-https.git
5 years ago[WK2] Can not convert ‘sessionState.WebKit::SessionState::provisionalURL’ from ‘WebCo...
gyuyoung.kim@samsung.com [Tue, 1 Jul 2014 08:17:46 +0000 (08:17 +0000)]
[WK2] Can not convert ‘sessionState.WebKit::SessionState::provisionalURL’ from ‘WebCore::URL’ to ‘bool’
https://bugs.webkit.org/show_bug.cgi?id=134487

Rubber-stamped by Carlos Garcia Campos.

* UIProcess/WebPageProxy.cpp: Use isNull().
(WebKit::WebPageProxy::restoreFromState):

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

5 years agoFix build break on EFL and GTK ports since r170611 and r170614
gyuyoung.kim@samsung.com [Tue, 1 Jul 2014 07:57:18 +0000 (07:57 +0000)]
Fix build break on EFL and GTK ports since r170611 and r170614
https://bugs.webkit.org/show_bug.cgi?id=134479

Reviewed by Carlos Garcia Campos.

Add LegacySessionStateCodingNone.cpp in order to fix build break on EFL and GTK ports. Additionally
SessionStateConversion.cpp is added to CMakeLists.txt as well.

* CMakeLists.txt:
* UIProcess/LegacySessionStateCoding.h: Copied from Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.h.
* UIProcess/LegacySessionStateCodingNone.cpp: Renamed from Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.h.
(WebKit::encodeLegacySessionHistoryEntryData):
(WebKit::decodeLegacySessionState):
(WebKit::decodeLegacySessionHistoryEntryData):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::restoreFromState):
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoUnreviewed, rolling out r170605.
commit-queue@webkit.org [Tue, 1 Jul 2014 04:16:49 +0000 (04:16 +0000)]
Unreviewed, rolling out r170605.
https://bugs.webkit.org/show_bug.cgi?id=134484

The changes cause crashes on ARM64 (Requested by benjaminp on
#webkit).

Reverted changeset:

"Reduce dynamic memory allocation in css jit."
https://bugs.webkit.org/show_bug.cgi?id=134416
http://trac.webkit.org/changeset/170605

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

5 years ago[iOS][WK2] The long press gesture recognizers should not block the pinch gesture
benjamin@webkit.org [Tue, 1 Jul 2014 03:12:17 +0000 (03:12 +0000)]
[iOS][WK2] The long press gesture recognizers should not block the pinch gesture
https://bugs.webkit.org/show_bug.cgi?id=134477
<rdar://problem/17514936>

Reviewed by Tim Horton.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):

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

5 years agoAdd WebPageProxy::restoreFromState
andersca@apple.com [Tue, 1 Jul 2014 01:40:13 +0000 (01:40 +0000)]
Add WebPageProxy::restoreFromState
https://bugs.webkit.org/show_bug.cgi?id=134480

Reviewed by Tim Horton.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromState):
* UIProcess/WebPageProxy.h:

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

5 years agoAdd a function to restore a WebBackForwardList object from a BackForwardListState...
andersca@apple.com [Tue, 1 Jul 2014 01:29:38 +0000 (01:29 +0000)]
Add a function to restore a WebBackForwardList object from a BackForwardListState object
https://bugs.webkit.org/show_bug.cgi?id=134478

Reviewed by Tim Horton.

* UIProcess/WebBackForwardList.cpp:
(WebKit::generateWebBackForwardItemID):
(WebKit::WebBackForwardList::restoreFromState):
* UIProcess/WebBackForwardList.h:
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::generateWebBackForwardItemID): Deleted.

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

5 years agoChange the AddBackForwardItem message to take a page state object
andersca@apple.com [Tue, 1 Jul 2014 01:06:35 +0000 (01:06 +0000)]
Change the AddBackForwardItem message to take a page state object
https://bugs.webkit.org/show_bug.cgi?id=134475

Reviewed by Andreas Kling.

Source/WebCore:
* WebCore.exp.in:

Source/WebKit2:
* Scripts/webkit2/messages.py:
(struct_or_class):
(headers_for_type):
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setPageState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::updateBackForwardItem):

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

5 years ago[WK2] Add a flatter find-in-page current match indicator style
timothy_horton@apple.com [Tue, 1 Jul 2014 00:50:07 +0000 (00:50 +0000)]
[WK2] Add a flatter find-in-page current match indicator style
https://bugs.webkit.org/show_bug.cgi?id=134434
<rdar://problem/16225673>

Reviewed by Simon Fraser.

* UIProcess/FindIndicator.cpp:
(WebKit::findIndicatorsForTextRectsOverlap):
(WebKit::FindIndicator::frameRect):
(WebKit::flatHighlightColor):
(WebKit::flatRimShadowColor):
(WebKit::flatDropShadowColor):
(WebKit::FindIndicator::draw):
Add a flatter find indicator, with a bigger shadow.

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
(WebKit::FindController::getFindIndicatorBitmapAndRect):
(WebKit::FindController::hideFindIndicator):
(WebKit::FindController::drawRect):
Don't paint a shadow behind the secondary matches if we're using the new style.

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

5 years ago[iOS] GSFontAddCGFont is deprecated and we use it in DumpRenderTree
mmaxfield@apple.com [Tue, 1 Jul 2014 00:45:50 +0000 (00:45 +0000)]
[iOS] GSFontAddCGFont is deprecated and we use it in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=134133

Reviewed by Simon Fraser.

Replace it with CTFontManagerRegisterGraphicsFont

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/mac/DumpRenderTree.mm:
(activateFontIOS):

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

5 years ago[iOS][WK2] Improve double-tap-to-scroll on image documents
benjamin@webkit.org [Tue, 1 Jul 2014 00:42:49 +0000 (00:42 +0000)]
[iOS][WK2] Improve double-tap-to-scroll on image documents
https://bugs.webkit.org/show_bug.cgi?id=134474
<rdar://problem/17496778>

Reviewed by Enrica Casucci.

On image document, we were always rendering the center of the image as the origin, which broke
double tap to scroll.

This patch improves on this in two ways:
1) If the hit testing already got the image, only change the type to replaced (to get the right
   scaling behavior for images since the type is block on iOS's image document).
2) If the hit testing is outside the image, only center the axis that is not in the image.
   This way, we "fix" the component that is not valid, and keep the vali component.
   This works great for viewing comics on iPad.

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

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

5 years ago[iOS][WK2] Do not put tap highlight on images that are not in links, and on applet...
benjamin@webkit.org [Tue, 1 Jul 2014 00:38:12 +0000 (00:38 +0000)]
[iOS][WK2] Do not put tap highlight on images that are not in links, and on applet/embed/object
https://bugs.webkit.org/show_bug.cgi?id=134471
<rdar://problem/17513542>

Reviewed by Enrica Casucci.

UIKit has some special code to avoid tap highlight on certain type of object. This is not very flexible
since the page has no way of overriding that behavior.

This patch implement the same feature by changing the default stylesheet. The tap highlight is disabled
by default for those object, and enabled for images that are in a link.

* css/html.css:
(applet, embed, object, img):
(:-webkit-any-link img):

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

5 years agoREGRESSION (WK2): Weird selection behavior on autos.yahoo.com, en.wikipedia.org.
enrica@apple.com [Tue, 1 Jul 2014 00:27:25 +0000 (00:27 +0000)]
REGRESSION (WK2): Weird selection behavior on autos.yahoo.com, en.wikipedia.org.
https://bugs.webkit.org/show_bug.cgi?id=134466
<rdar://problem/16817263>

Reviewed by Benjamin Poulain.

Avoid selecting blocks across frame boundaries and skip non-selectable
blocks. If the only block we find is almost the same height as the
visible area, we should not select at all.
This patch also fixes the logic to compute the next block when
shrinking the selection. When calculating the new range after shrinking,
we should not include the block that corresponds to the current handle position.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::expandedRangeFromHandle):
(WebKit::WebPage::contractedRangeFromHandle):
(WebKit::WebPage::updateSelectionWithTouches):

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

5 years agoAll Indic text is rendered as boxes on iOS
mmaxfield@apple.com [Tue, 1 Jul 2014 00:17:09 +0000 (00:17 +0000)]
All Indic text is rendered as boxes on iOS
https://bugs.webkit.org/show_bug.cgi?id=134464

Reviewed by Simon Fraser.

Source/WebCore:
I made a typo in r170207.

Test: fast/text/indic.html

* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::languageSpecificFallbackFont):

LayoutTests:
Simply draw some indic text and test that against currently good metric values.

* fast/text/indic.html: Added
* platform/ios-sim/fast/text/indic-expected.txt: Added.
* platform/mac/fast/text/indic-expected.txt: Added.
* platform/mac/fast/text/indic-expected.png: Added.

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

5 years ago[iOS] languageSpecificFallbackFont() is not consistent
mmaxfield@apple.com [Tue, 1 Jul 2014 00:14:38 +0000 (00:14 +0000)]
[iOS] languageSpecificFallbackFont() is not consistent
https://bugs.webkit.org/show_bug.cgi?id=134473

Reviewed by Darin Adler.

It can use "<" throughout the function as well as keeping the fallthrough behavior consistent.

No tests because there is no behavior change.

* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::languageSpecificFallbackFont):

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

5 years ago[Win] Unreviewed gardening.
bfulgham@apple.com [Tue, 1 Jul 2014 00:11:09 +0000 (00:11 +0000)]
[Win] Unreviewed gardening.

* WebCore.vcxproj/WebCore.vcxproj: Do not compile JSFileException
and JSFileReaderSync multiple times.

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

5 years agoAvoid copying function object in lambda function in ScrollingThread::dispatchBarrier...
dbates@webkit.org [Tue, 1 Jul 2014 00:04:11 +0000 (00:04 +0000)]
Avoid copying function object in lambda function in ScrollingThread::dispatchBarrier(); actually use move semantics
https://bugs.webkit.org/show_bug.cgi?id=134470

Reviewed by Anders Carlsson.

Currently we always copy construct the captured std::function object when calling callOnMainThread()
in the lambda function created in ScrollingThread::dispatchBarrier() because captured variables are
const in a lambda expression's body by default. That is, the std::function object is captured as const.
Instead, we should mark this lambda expression as mutable so the captured std::function object is
non-const and hence we can use move semantics when passing it to callOnMainThread().

* page/scrolling/ScrollingThread.cpp:
(WebCore::ScrollingThread::dispatchBarrier):

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

5 years agoMake TransformIterator::TransformIterator() take rvalue references
dbates@webkit.org [Tue, 1 Jul 2014 00:00:27 +0000 (00:00 +0000)]
Make TransformIterator::TransformIterator() take rvalue references
https://bugs.webkit.org/show_bug.cgi?id=134468

Reviewed by Darin Adler.

It's unnecessary to support TransformIterator::TransformIterator() taking const lvalue references
as we only call it with rvalues. As a side benefit, we can use move semantics to initialize the
members of TransformIterator.

* wtf/IteratorAdaptors.h:
(WTF::TransformIterator::TransformIterator): Make constructor take arguments as rvalue references.
(WTF::makeTransformIterator): Substitute std::move() for std::forward().

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

5 years agoWebBackForwardListItem should not store back-forward data
andersca@apple.com [Mon, 30 Jun 2014 23:39:43 +0000 (23:39 +0000)]
WebBackForwardListItem should not store back-forward data
https://bugs.webkit.org/show_bug.cgi?id=134469

Reviewed by Darin Adler.

Change WebBackForwardListItem::backForwardData to encode the main frame state lazily,
and change WebBackForwardListItem::setBackForwardData to decode it into the main frame state.

* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::backForwardData):
(WebKit::WebBackForwardListItem::setBackForwardData):
(WebKit::WebBackForwardListItem::encode):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::backForwardData): Deleted.
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSession):

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

5 years agoWebBackForwardListItems should hold on to PageState objects
andersca@apple.com [Mon, 30 Jun 2014 23:26:42 +0000 (23:26 +0000)]
WebBackForwardListItems should hold on to PageState objects
https://bugs.webkit.org/show_bug.cgi?id=134467

Reviewed by Darin Adler.

* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
(WebKit::WebBackForwardListItem::encode):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setOriginalURL):
(WebKit::WebBackForwardListItem::originalURL):
(WebKit::WebBackForwardListItem::setURL):
(WebKit::WebBackForwardListItem::url):
(WebKit::WebBackForwardListItem::setTitle):
(WebKit::WebBackForwardListItem::title):

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

5 years agoAdd a missing semicolon in WKContentViewInteraction
benjamin@webkit.org [Mon, 30 Jun 2014 23:24:15 +0000 (23:24 +0000)]
Add a missing semicolon in WKContentViewInteraction

* UIProcess/ios/WKContentViewInteraction.mm:
(nsSizeForTapHighlightBorderRadius):
I messed up this when fixing the patch on landing.

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

5 years agoAdopt the legacy session decoding inside WebPage::restoreSession for now
andersca@apple.com [Mon, 30 Jun 2014 23:05:45 +0000 (23:05 +0000)]
Adopt the legacy session decoding inside WebPage::restoreSession for now
https://bugs.webkit.org/show_bug.cgi?id=134465

Reviewed by Sam Weinig.

Source/WebCore:
* WebCore.exp.in:

Source/WebKit2:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeLegacySessionHistoryEntryData):
* UIProcess/mac/LegacySessionStateCoding.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSession):

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

5 years ago[iOS WK2] Don't crash on status bar tap with overflow scroll views
simon.fraser@apple.com [Mon, 30 Jun 2014 22:58:36 +0000 (22:58 +0000)]
[iOS WK2] Don't crash on status bar tap with overflow scroll views
https://bugs.webkit.org/show_bug.cgi?id=134459

Reviewed by Tim Horton.

The tiled scrolling indicator parents UIViews under CALayers, but that causes
those views to miss -willMoveToWindow:nil notifications on teardown. This can leave
deleted UIScrollViews in UIKit's "scroll to top" list.

Fix by not making UIScrollViews in the debug layer tree host.

* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer):

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

5 years agoUnreviewed, rolling out r170578.
commit-queue@webkit.org [Mon, 30 Jun 2014 22:52:32 +0000 (22:52 +0000)]
Unreviewed, rolling out r170578.
https://bugs.webkit.org/show_bug.cgi?id=134462

causes assertions loading nytimes.com on iOS (Requested by
smfr on #webkit).

Reverted changeset:

"Create NSURLRequest lazily when USE(CFNETWORK) is enabled"
https://bugs.webkit.org/show_bug.cgi?id=134441
http://trac.webkit.org/changeset/170578

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

5 years ago Restrict network process sandbox
oliver@apple.com [Mon, 30 Jun 2014 22:51:39 +0000 (22:51 +0000)]
   Restrict network process sandbox
       https://bugs.webkit.org/show_bug.cgi?id=134360

       Reviewed by Sam Weinig.

       Add more restrictions to the network process sandbox.

       * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
       (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
 Always use the cache directory provided in the initialization parameters,
 and make sure we consume the cookie directory extension.
       * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
 Make the sandbox profile much more restrictive.
       * Shared/Network/NetworkProcessCreationParameters.cpp:
       (WebKit::NetworkProcessCreationParameters::encode):
       (WebKit::NetworkProcessCreationParameters::decode):
       * Shared/Network/NetworkProcessCreationParameters.h:
 The network process now requires an extension to access
 its cookie storage.
       * Shared/mac/SandboxUtilities.cpp:
       (WebKit::pathForProcessContainer):
       * Shared/mac/SandboxUtilities.h:
 We need to be able to get hold of our container so
 that we can get the correct cookie storage directory.
       * UIProcess/WebContext.cpp:
       (WebKit::WebContext::ensureNetworkProcess):
 We have to pass in the an extension for the cookie storage directory when
       initalising the network process
       * UIProcess/mac/WebContextMac.mm:
       (WebKit::WebContext::platformDefaultCookieStorageDirectory):
 Make sure we provide the correct location on IOS
       * WebProcess/cocoa/WebProcessCocoa.mm:
       (WebKit::WebProcess::platformInitializeWebProcess):
 Consume the cookie storage extension

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

5 years ago[iOS WK2] Turn off scrollsToTop on overflow UIScrollViews
simon.fraser@apple.com [Mon, 30 Jun 2014 22:50:59 +0000 (22:50 +0000)]
[iOS WK2] Turn off scrollsToTop on overflow UIScrollViews
https://bugs.webkit.org/show_bug.cgi?id=134456

Reviewed by Tim Horton.

Set scrollsToTop to NO on our UIScrollViews created for overflow scrolling, since
we don't have a good strategy for when to allow it, and doing so would also require
some smarts in the main UIScrollView.

* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):

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

5 years agoREGRESSION (Okemo): The contextual menu on tap and hold does not cancel the other...
enrica@apple.com [Mon, 30 Jun 2014 22:50:28 +0000 (22:50 +0000)]
REGRESSION (Okemo): The contextual menu on tap and hold does not cancel the other gestures.
https://bugs.webkit.org/show_bug.cgi?id=134463
<rdar://problem/17388907>

Reviewed by Benjamin Poulain.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _longPressRecognized:]):

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

5 years agoReduce dynamic memory allocation in css jit.
achristensen@apple.com [Mon, 30 Jun 2014 22:48:47 +0000 (22:48 +0000)]
Reduce dynamic memory allocation in css jit.
https://bugs.webkit.org/show_bug.cgi?id=134416

Reviewed by Benjamin Poulain.

Source/WebCore:
* cssjit/FunctionCall.h:
(WebCore::FunctionCall::FunctionCall):
(WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
* cssjit/RegisterAllocator.h:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
Use inlineCapacity template parameter to reduce malloc calls.
I use 16 and 32 as the inline capacity for non-register related vectors because that
is probably big enough for the selector compiler, and if it is not then a malloc
call will not be significant because the selector is very complex.
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::push):
Pass a vector of stack references to match calls to pop and to avoid a call to appendVector.

Source/WTF:
* wtf/Deque.h:
Added inlineCapacity optional template parameter.

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

5 years agoImplement the last pieces of encodeFrameStateNode
andersca@apple.com [Mon, 30 Jun 2014 22:14:35 +0000 (22:14 +0000)]
Implement the last pieces of encodeFrameStateNode
https://bugs.webkit.org/show_bug.cgi?id=134460

Reviewed by Andreas Kling.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataEncoder::operator<<):
(WebKit::isValidEnum):
(WebKit::encodeFormDataElement):
(WebKit::encodeFormData):
(WebKit::encodeFrameStateNode):

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

5 years agojs/script-tests/function-apply-many-args.js fails on ARM
msaboff@apple.com [Mon, 30 Jun 2014 22:13:37 +0000 (22:13 +0000)]
js/script-tests/function-apply-many-args.js fails on ARM
https://bugs.webkit.org/show_bug.cgi?id=126588

Reviewed by Mark Lam.

Removed three test cases that fail on some platforms and pass on others due
to stack size.  Other test cases cover what will fit on a stack or what will
throw an out of stack exception.

* js/function-apply-many-args-expected.txt:
* js/script-tests/function-apply-many-args.js:

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

5 years agoAdd option to run-jsc-stress-testes to filter out tests that use large heaps
msaboff@apple.com [Mon, 30 Jun 2014 22:12:17 +0000 (22:12 +0000)]
Add option to run-jsc-stress-testes to filter out tests that use large heaps
https://bugs.webkit.org/show_bug.cgi?id=134458

Reviewed by Filip Pizlo.

Source/JavaScriptCore:
Added test to skip js1_5/Regress/regress-159334.js when testing on a memory limited device.

* tests/mozilla/mozilla-tests.yaml:

Tools:
Added new --memory-limited to filter out tests that have large heap usage.
Such tests are either tagged with //@largeHeap or logic is added to their .yaml file.

* Scripts/run-jsc-stress-tests:

LayoutTests:
* js/regress/script-tests/lots-of-fields.js: Added //@largeHeap tag to skip when
running on a memoryLimited device.

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

5 years ago[iOS][WK2] Move tap highlight to the inverseScaleRootView
benjamin@webkit.org [Mon, 30 Jun 2014 22:10:56 +0000 (22:10 +0000)]
[iOS][WK2] Move tap highlight to the inverseScaleRootView
https://bugs.webkit.org/show_bug.cgi?id=134424
<rdar://problem/17480880>

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-30
Reviewed by Tim Horton.

Enrica introduced the inverseScaleRootView that is a dynamic version of _highlightRootView.

This patch moves the tap highlight from its own inverse root to inverseScaleRootView. This provides better handling
of scale, better behavior on crash, and remove one extra view from the hierarchy.

The code is pretty much the same, just moved around. Some of the changes:

Now the code needs to handle repainting live when the view scale. To do that, _showTapHighlightXXX was split in two:
-_showTapHighlight to setup the view.
-_updateTapHighlight to update the view based on the current scale.

Since the view updates live on scaling, we need to recompute the coordinates for each update. To do that, the _potentialTapHighlightInformation
was generalized to handle all cases of highlight.

Since we can no longer test for the nullity of _potentialTapHighlightInformation,
a new attribute is introduced for that: _hasTapHighlightForPotentialTap.

The last bit of change concern reentering the tap highlight. This becomes quite simple:
1) _isTapHighlightIDValid is updated before the animation starts
   so that it can be set again during an animation.
2) The animation checks the "finished" flags before removing the view from its superview
   to avoid breaking the new animation.

* UIProcess/API/Cocoa/WKWebView.mm:
(withinEpsilon): Deleted.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
Make _updateUnscaledView conditional to scale changes, that thing isn't cheap!

* UIProcess/ios/WKContentViewInteraction.h:
(withinEpsilon):
Move withinEpsilon() from WKContentView to use it from both classes.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
(-[WKContentView _updateUnscaledView]):
(-[WKContentView _updateTapHighlight]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
(-[WKContentView _cancelInteraction]):
(-[WKContentView _finishInteraction]):
(-[WKContentView _singleTapDidReset:]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _showTapHighlightWithColor:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]): Deleted.

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

5 years agoAdd code for encoding legacy session history entries
andersca@apple.com [Mon, 30 Jun 2014 21:53:58 +0000 (21:53 +0000)]
Add code for encoding legacy session history entries
https://bugs.webkit.org/show_bug.cgi?id=134452

Reviewed by Andreas Kling.

Source/WebKit2:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataEncoder::HistoryEntryDataEncoder):
(WebKit::HistoryEntryDataEncoder::operator<<):
(WebKit::HistoryEntryDataEncoder::finishEncoding):
(WebKit::HistoryEntryDataEncoder::encodeArithmeticType):
(WebKit::HistoryEntryDataEncoder::encodeFixedLengthData):
(WebKit::HistoryEntryDataEncoder::grow):
(WebKit::HistoryEntryDataEncoder::growCapacity):
(WebKit::encodeFrameStateNode):
(WebKit::encodeLegacySessionHistoryEntryData):
(WebKit::decodeSessionHistoryEntryData):
(WebKit::decodeLegacySessionHistoryEntryData):
* UIProcess/mac/LegacySessionStateCoding.h:

Source/WTF:
* wtf/MallocPtr.h:
(WTF::MallocPtr::malloc):
(WTF::MallocPtr::realloc):

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

5 years agoUse non-thumb registers in armv7 css jit.
achristensen@apple.com [Mon, 30 Jun 2014 21:25:33 +0000 (21:25 +0000)]
Use non-thumb registers in armv7 css jit.
https://bugs.webkit.org/show_bug.cgi?id=134450

Reviewed by Geoff Garen.

* cssjit/RegisterAllocator.h:
(WebCore::RegisterAllocator::isValidRegister):
(WebCore::RegisterAllocator::isCallerSavedRegister):
Use additional general purpose registers.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
Always succeed when compiling css selectors.

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

5 years agoTiles on bottom of screen are not always allocated when necessary
mmaxfield@apple.com [Mon, 30 Jun 2014 21:21:29 +0000 (21:21 +0000)]
Tiles on bottom of screen are not always allocated when necessary
https://bugs.webkit.org/show_bug.cgi?id=134272

Reviewed by Simon Fraser.

Source/WebCore:
The initial visibleRect is in the coordinate of the root layer, so its origin
is at the top left of the view. The initial rect we were using doesn't
include the contents inset, so it was too short, which was causing tiles near
the bottom of the screen to not always be allocated if the tile threshold was
close to the bottom of the view. Instead, we want to include the contents
inset size so the visible rect includes the entire view.
GraphicsLayerCA::recursiveCommitChanges() takes care of mapping and cropping
the visible rect into the tiled layer's coordinate system, at which point it
is used for visible tile logic.

Test: platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html

* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::update):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):

LayoutTests:
Apply a content inset, then dump visible rects.

* platform/mac-wk2/tiled-drawing/visible-rect-content-inset-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html: Added.
* compositing/visible-rect/iframe-no-layers.html: For WK2, the size of the visibleRect
includes the size of the border of the iframe. In order to elliminate platform
differences, set this border to 0.

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

5 years agoDRT in iOS sim crashes while loading fonts
mmaxfield@apple.com [Mon, 30 Jun 2014 20:57:18 +0000 (20:57 +0000)]
DRT in iOS sim crashes while loading fonts
https://bugs.webkit.org/show_bug.cgi?id=134451

Reviewed by Geoffrey Garen.

The magic linker symbols had the same name, and were therefore being unified
to a single font file. Then, adding the same file twice was failing.

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

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

5 years ago[Win] Unreviewed project gardening.
bfulgham@apple.com [Mon, 30 Jun 2014 19:01:49 +0000 (19:01 +0000)]
[Win] Unreviewed project gardening.

* WebCore.vcxproj/WebCore.vcxproj: Clean up path information so
files appear in appropriate places in project view.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.

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

5 years agoAvoid copying closed variables vector; actually use move semantics
dbates@webkit.org [Mon, 30 Jun 2014 18:48:56 +0000 (18:48 +0000)]
Avoid copying closed variables vector; actually use move semantics

Rubber-stamped by Oliver Hunt.

Currently we always copy the closed variables vector passed by Parser::closedVariables()
to ProgramNode::setClosedVariables() because these member functions return and take a const
rvalue reference, respectively. Instead, these member functions should take an return a non-
constant rvalue reference so that we actually move the closed variables vector from the Parser
object to the Node object.

* parser/Nodes.cpp:
(JSC::ProgramNode::setClosedVariables): Remove const qualifier for argument.
* parser/Nodes.h:
(JSC::ScopeNode::setClosedVariables): Ditto.
* parser/Parser.h:
(JSC::Parser::closedVariables): Remove const qualifier on return type.
(JSC::parse): Remove extraneous call to std::move(). Calling std::move() is unnecessary here
because Parser::closedVariables() returns an rvalue reference.

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

5 years agoReduce memory required for js/typedarray-zero-size.js
msaboff@apple.com [Mon, 30 Jun 2014 18:22:25 +0000 (18:22 +0000)]
Reduce memory required for js/typedarray-zero-size.js
https://bugs.webkit.org/show_bug.cgi?id=134448

Reviewed by Mark Hahnenberg.

Reduce the loop count from 10000 to 4000 to further reduce memory requirements
on older devices.

* js/script-tests/typedarray-zero-size.js:

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

5 years agoRemove redundant repaintCompositedLayers() parameter and its dependencies.
zalan@apple.com [Mon, 30 Jun 2014 18:06:56 +0000 (18:06 +0000)]
Remove redundant repaintCompositedLayers() parameter and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=134431

Reviewed by Darin Adler.

No change in functionality.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::convertToPixelSnappedLayerCoords): Deleted.
(WebCore::RenderLayer::convertToLayerCoords): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::repaintCompositedLayers):
(WebCore::RenderLayerCompositor::recursiveRepaintLayer):
* rendering/RenderLayerCompositor.h:

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

5 years agoJSContext Inspection: Provide a way to use a non-Main RunLoop for Inspector JavaScrip...
joepeck@webkit.org [Mon, 30 Jun 2014 17:57:39 +0000 (17:57 +0000)]
JSContext Inspection: Provide a way to use a non-Main RunLoop for Inspector JavaScript Evaluations
https://bugs.webkit.org/show_bug.cgi?id=134371

Reviewed by Timothy Hatcher.

* API/JSContextPrivate.h:
* API/JSContext.mm:
(-[JSContext _debuggerRunLoop]):
(-[JSContext _setDebuggerRunLoop:]):
Private API for setting the CFRunLoop for a debugger to evaluate in.

* API/JSContextRefInternal.h: Added.
* API/JSContextRef.cpp:
(JSGlobalContextGetDebuggerRunLoop):
(JSGlobalContextSetDebuggerRunLoop):
Internal API for setting a CFRunLoop on a JSContextRef.
Set this on the debuggable.

* inspector/remote/RemoteInspectorDebuggable.h:
* inspector/remote/RemoteInspectorDebuggableConnection.h:
(Inspector::RemoteInspectorBlock::RemoteInspectorBlock):
(Inspector::RemoteInspectorBlock::~RemoteInspectorBlock):
(Inspector::RemoteInspectorBlock::operator=):
(Inspector::RemoteInspectorBlock::operator()):
Moved into the header.

* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::inspectorDebuggable):
Lets store the RunLoop on the debuggable instead of this core
platform agnostic class, so expose the debuggable.

* inspector/remote/RemoteInspectorDebuggableConnection.mm:
(Inspector::RemoteInspectorHandleRunSourceGlobal):
(Inspector::RemoteInspectorQueueTaskOnGlobalQueue):
(Inspector::RemoteInspectorInitializeGlobalQueue):
Rename the global functions for clarity.

(Inspector::RemoteInspectorHandleRunSourceWithInfo):
Handler for private run loops.

(Inspector::RemoteInspectorDebuggableConnection::RemoteInspectorDebuggableConnection):
(Inspector::RemoteInspectorDebuggableConnection::~RemoteInspectorDebuggableConnection):
(Inspector::RemoteInspectorDebuggableConnection::dispatchAsyncOnDebuggable):
(Inspector::RemoteInspectorDebuggableConnection::setupRunLoop):
(Inspector::RemoteInspectorDebuggableConnection::teardownRunLoop):
(Inspector::RemoteInspectorDebuggableConnection::queueTaskOnPrivateRunLoop):
Setup and teardown and use private run loop sources if the debuggable needs it.

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

5 years agoReduce memory required for js/typedarray-zero-size.js
msaboff@apple.com [Mon, 30 Jun 2014 17:37:06 +0000 (17:37 +0000)]
Reduce memory required for js/typedarray-zero-size.js
https://bugs.webkit.org/show_bug.cgi?id=134448

Reviewed by Darin Adler.

Making the loop count down reduces memory usage from ~190MB to ~22MB while
still testing the original issue.

* js/script-tests/typedarray-zero-size.js:

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

5 years agoRemove webkit prefix from pointer lock.
commit-queue@webkit.org [Mon, 30 Jun 2014 16:59:24 +0000 (16:59 +0000)]
Remove webkit prefix from pointer lock.
https://bugs.webkit.org/show_bug.cgi?id=134312

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

* dom/Document.cpp:
(WebCore::Document::exitPointerLock):
(WebCore::Document::pointerLockElement):
(WebCore::Document::webkitExitPointerLock): Deleted.
(WebCore::Document::webkitPointerLockElement): Deleted.
* dom/Document.h:
* dom/Document.idl:
* dom/Element.cpp:
(WebCore::Element::requestPointerLock):
(WebCore::Element::webkitRequestPointerLock): Deleted.
* dom/Element.h:
* dom/Element.idl:
* dom/EventNames.h:
* dom/MouseEvent.idl:
* dom/MouseRelatedEvent.h:
(WebCore::MouseRelatedEvent::movementX):
(WebCore::MouseRelatedEvent::movementY):
(WebCore::MouseRelatedEvent::webkitMovementX): Deleted.
(WebCore::MouseRelatedEvent::webkitMovementY): Deleted.
* page/PointerLockController.cpp:
(WebCore::PointerLockController::PointerLockController):
Initialize all data members.
(WebCore::PointerLockController::requestPointerLock):
(WebCore::PointerLockController::didAcquirePointerLock):
(WebCore::PointerLockController::didNotAcquirePointerLock):
(WebCore::PointerLockController::didLosePointerLock):

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

5 years agoU16_IS_SURROGATE should not be called with a UChar32
mmaxfield@apple.com [Mon, 30 Jun 2014 15:13:25 +0000 (15:13 +0000)]
U16_IS_SURROGATE should not be called with a UChar32
https://bugs.webkit.org/show_bug.cgi?id=134440

Reviewed by Darin Adler.

No new tests because there is no behavior change.

* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::advanceByCombiningCharacterSequence):

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

5 years agoAdd missing ENABLE(DFG_JIT) guards
commit-queue@webkit.org [Mon, 30 Jun 2014 14:48:16 +0000 (14:48 +0000)]
Add missing ENABLE(DFG_JIT) guards
https://bugs.webkit.org/show_bug.cgi?id=134444

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-06-30
Reviewed by Darin Adler.

* dfg/DFGFunctionWhitelist.cpp:
* dfg/DFGFunctionWhitelist.h:

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

5 years agoRemove Qt cruft from webkitpy
commit-queue@webkit.org [Mon, 30 Jun 2014 14:45:51 +0000 (14:45 +0000)]
Remove Qt cruft from webkitpy
https://bugs.webkit.org/show_bug.cgi?id=134445

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-06-30
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port):
(QtPort): Deleted.
(QtPort.build_webkit_command): Deleted.
(QtPort.run_webkit_tests_command): Deleted.
(QtWK2Port): Deleted.
(QtWK2Port.build_webkit_command): Deleted.
(QtWK2Port.run_webkit_tests_command): Deleted.
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest): Deleted.
(DeprecatedPortTest.test_qt_port): Deleted.
(DeprecatedPortTest.test_qt_wk2_port): Deleted.

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

5 years ago[EFL] Remove m_evasObject from Widget
ryuan.choi@samsung.com [Mon, 30 Jun 2014 08:46:01 +0000 (08:46 +0000)]
[EFL] Remove m_evasObject from Widget
https://bugs.webkit.org/show_bug.cgi?id=134442

Reviewed by Gyuyoung Kim.

Since WebKit1/EFL was dropped, we don't need to keep the m_evasObject
in the Widget.cpp because it's not used for WebKit2/Efl.

* platform/Widget.h:
(WebCore::Widget::evasObject): Deleted.
* platform/efl/ScrollbarEfl.cpp:
Removed WebKit1/Efl specific code which uses m_evasObject.
It will be a dummy until WebKit2/Efl support proper scrollbar implementation.
(WebCore::ScrollbarEfl::ScrollbarEfl):
(WebCore::ScrollbarEfl::~ScrollbarEfl):
(WebCore::ScrollbarEfl::setParent):
(WebCore::ScrollbarEfl::frameRectsChanged):
(WebCore::ScrollbarEfl::invalidate):
(ScrollbarEfl::ScrollbarEfl): Deleted.
(ScrollbarEfl::~ScrollbarEfl): Deleted.
(scrollbarEflEdjeMessage): Deleted.
(ScrollbarEfl::setParent): Deleted.
(ScrollbarEfl::updateThumbPosition): Deleted.
(ScrollbarEfl::updateThumbProportion): Deleted.
(ScrollbarEfl::updateThumbPositionAndProportion): Deleted.
(ScrollbarEfl::frameRectsChanged): Deleted.
(ScrollbarEfl::invalidate): Deleted.
* platform/efl/ScrollbarEfl.h:
Removed unnecessary methods. In addition, applied final, override keyword.
(WebCore::ScrollbarEfl::handleMouseMoveEvent): Deleted.
(WebCore::ScrollbarEfl::handleMouseOutEvent): Deleted.
(WebCore::ScrollbarEfl::handleMousePressEvent): Deleted.
(WebCore::ScrollbarEfl::handleMouseReleaseEvent): Deleted.
* platform/efl/WidgetEfl.cpp:
(WebCore::Widget::Widget):
(WebCore::Widget::setEvasObject): Deleted.

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

5 years agoFix deprecated warning with bison 3
commit-queue@webkit.org [Mon, 30 Jun 2014 08:35:06 +0000 (08:35 +0000)]
Fix deprecated warning with bison 3
https://bugs.webkit.org/show_bug.cgi?id=133791

Patch by Eva Balazsfalvi <evab.u-szeged@partner.samsung.com> on 2014-06-30
Reviewed by Csaba Osztrogonác.

No new tests because no functional changes.

* css/CSSGrammar.y.in:
* xml/XPathGrammar.y:

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

5 years agoRemove HarfBuzzShaper::setDrawRange()
ljaehun.lim@samsung.com [Mon, 30 Jun 2014 08:32:19 +0000 (08:32 +0000)]
Remove HarfBuzzShaper::setDrawRange()
https://bugs.webkit.org/show_bug.cgi?id=134243

Reviewed by Gyuyoung Kim.

setDrawRange() is not used anywhere. Remove it.
And m_fromIndex and m_toIndex are changed by only setDrawRange().
So remove them too and use the default values instead of them.

No new tests, no behavior changes.

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::HarfBuzzShaper):
(WebCore::HarfBuzzShaper::fillGlyphBufferFromHarfBuzzRun):
    currentCharacterIndex is unsigned, always greater than 0. Clean up if statements.
(WebCore::HarfBuzzShaper::setDrawRange): Deleted.
* platform/graphics/harfbuzz/HarfBuzzShaper.h:

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

5 years agoCreate NSURLRequest lazily when USE(CFNETWORK) is enabled
psolanki@apple.com [Mon, 30 Jun 2014 06:36:13 +0000 (06:36 +0000)]
Create NSURLRequest lazily when USE(CFNETWORK) is enabled
https://bugs.webkit.org/show_bug.cgi?id=134441

Reviewed by Sam Weinig.

No new tests. Should be covered by exsting tests.

* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::setStorageSession):
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::nsURLRequest):

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

5 years ago[EFL] Remove netscape plugin implementation from WebCore
ryuan.choi@samsung.com [Mon, 30 Jun 2014 04:43:29 +0000 (04:43 +0000)]
[EFL] Remove netscape plugin implementation from WebCore
https://bugs.webkit.org/show_bug.cgi?id=134438

Reviewed by Gyuyoung Kim.

Because WebKit1/Efl was dropped, PluginPackageEfl.cpp and PluginViewEfl.cpp are not necessary.

* PlatformEfl.cmake:
* plugins/efl/PluginPackageEfl.cpp: Removed.
* plugins/efl/PluginViewEfl.cpp: Removed.
* plugins/x11/PluginViewX11.cpp: Removed.
This file is to share common code between WebKit1/Efl and WebKit1/GTk.
Now, both ports are dropped WebKit1 support and the GTK port already removed the related files at r167016.

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

5 years agoAdd support for HTMLImageElement's sizes attribute
yoav@yoav.ws [Mon, 30 Jun 2014 04:07:08 +0000 (04:07 +0000)]
Add support for HTMLImageElement's sizes attribute
https://bugs.webkit.org/show_bug.cgi?id=133620

Reviewed by Dean Jackson.

.:
Added an ENABLE_PICTURE_SIZES compile flag.

* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:
Added an ENABLE_PICTURE_SIZES compile flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:
Tests: fast/dom/HTMLImageElement/sizes/image-sizes-1x.html
       fast/dom/HTMLImageElement/sizes/image-sizes-2x.html
       fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html
       fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html
       http/tests/loading/sizes/preload-image-sizes-2x.html
       http/tests/loading/sizes/preload-image-sizes.html

This patch adds support for HTMLImageElement's sizes attribute and the
related srcset extended syntax as defined in
http://picture.responsiveimages.org/.
This sizes attribute syntax is added to the CSSGrammar and parsed by
the CSSParser.
The SourceSizeList class is generated by the parser, and used to get
the final source size.
HTMLImageElement and HTMLPreloadScanner send this value to
HTMLSrcsetParser.
HTMLSrcsetParser uses this value in order to pick the right resource.

* CMakeLists.txt: Added css/SourceSizeList.cpp.
* Configurations/FeatureDefines.xcconfig: Added the PICTURE_SIZES flag.
* WebCore.vcxproj/WebCore.vcxproj: Added css/SourceSizeList.*.
* WebCore.vcxproj/WebCore.vcxproj.filters: Added css/SourceSizeList.*.
* WebCore.xcodeproj/project.pbxproj: Added css/SourceSizeList.*.
* css/CSSGrammar.y.in: Added 4 grammar rules that define a Media condition,
Source size list, Source size length and source size.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseSizesAttribute): Parse the sizes attribute.
(WebCore::CSSParser::detectAtToken): Set the token to SIZESATTR.
* css/CSSParser.h:
* css/SourceSizeList.cpp: Added. Defined the SourceSize and SourceSizeList classes.
(WebCore::SourceSize::match):
(WebCore::computeLength):
(WebCore::defaultValue):
(WebCore::SourceSize::length):
(WebCore::SourceSizeList::parseSizesAttribute):
(WebCore::SourceSizeList::getEffectiveSize):
* css/SourceSizeList.h: Added.
(WebCore::SourceSize::SourceSize):
(WebCore::SourceSizeList::append):
* html/HTMLImageElement.cpp: Integrated sizes attribute parsing and added currentSrc.
(WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::currentSrc):
* html/HTMLImageElement.h:
* html/HTMLImageElement.idl:
* html/parser/HTMLDocumentParser.cpp: Added information required for sizes parsing to
HTMLPreloadScanner calls.
(WebCore::HTMLDocumentParser::pumpTokenizer):
(WebCore::HTMLDocumentParser::insert):
(WebCore::HTMLDocumentParser::append):
(WebCore::HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan):
* html/parser/HTMLPreloadScanner.cpp: Integrated sizes attribute parsing.
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
(WebCore::TokenPreloadScanner::scan):
(WebCore::HTMLPreloadScanner::scan):
* html/parser/HTMLPreloadScanner.h:
* html/parser/HTMLSrcsetParser.cpp: Added 'w' descriptor parsing sizes based normalization.
(WebCore::parseDescriptors):
(WebCore::pickBestImageCandidate):
(WebCore::bestFitSourceForImageAttributes):
* html/parser/HTMLSrcsetParser.h:

Source/WebKit/mac:
Added an ENABLE_PICTURE_SIZES compile flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:
Added an ENABLE_PICTURE_SIZES compile flag.

* Configurations/FeatureDefines.xcconfig:

Tools:
Added an ENABLE_PICTURE_SIZES compile flag.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:
These layout tests check that the sizes attribute and the related
srcset syntax are well supported, that the right resource is displayed,
that the currentSrc attribute is well supported and also that the right
resource is preloaded.

* fast/dom/HTMLImageElement/resources/currentSrcHelper.js: Added.
(fileName):
(currentSrcFileName):
* fast/dom/HTMLImageElement/resources/image-set-4x.png: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-1x-expected.txt: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-1x.html: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-2x-expected.txt: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-2x.html: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-js-change-expected.txt: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-js-change.html: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml-expected.txt: Added.
* fast/dom/HTMLImageElement/sizes/image-sizes-js-innerhtml.html: Added.
* http/tests/loading/sizes/preload-image-sizes-2x-expected.txt: Added.
* http/tests/loading/sizes/preload-image-sizes-2x.html: Added.
* http/tests/loading/sizes/preload-image-sizes-expected.txt: Added.
* http/tests/loading/sizes/preload-image-sizes.html: Added.

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

5 years agoNo need to lazily initialize ResourceResponse internals when accessing timing data.
akling@apple.com [Sun, 29 Jun 2014 21:51:00 +0000 (21:51 +0000)]
No need to lazily initialize ResourceResponse internals when accessing timing data.
<https://webkit.org/b/134437>
<rdar://problem/17499876>

When building with ENABLE(WEB_TIMING), the last thing that would happen when
serializing a ResourceResponse in the network process is that we'd retrieve
the ResourceLoadTiming to encode it as part of the response. Doing so would
trigger the lazy instantiation of ResourceResponse's internal data structures.

Since timing data is not actually lazily instantiated, we can just not do that.

This shaves off ~550ms of network process main thread time on PLT, reducing
response latency by not doing unnecessary stuff before letting the web process
look at the downloaded data.

Reviewed by Gavin Barraclough.

* WebCore.exp.in:
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::resourceLoadTiming): Deleted.
(WebCore::ResourceResponseBase::setResourceLoadTiming): Deleted.
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::resourceLoadTiming):

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

5 years agoRefactor ResourceRequest into Cocoa and iOS specific files
psolanki@apple.com [Sun, 29 Jun 2014 20:59:03 +0000 (20:59 +0000)]
Refactor ResourceRequest into Cocoa and iOS specific files
https://bugs.webkit.org/show_bug.cgi?id=134430

Reviewed by Andreas Kling.

No new tests because no functional changes.

* WebCore.xcodeproj/project.pbxproj:
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::applyWebArchiveHackForMail): Deleted.
* platform/network/cocoa/ResourceRequestCocoa.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
(WebCore::ResourceRequest::nsURLRequest):
(WebCore::ResourceRequest::cfURLRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdateResourceHTTPBody):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
(WebCore::ResourceRequest::applyWebArchiveHackForMail):
(WebCore::ResourceRequest::setStorageSession):
* platform/network/ios/ResourceRequestIOS.mm: Added.
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::updateNSURLRequest):
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::initQuickLookResourceCachingQuirks):
(WebCore::ResourceRequest::useQuickLookResourceCachingQuirks):
(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::updateNSURLRequest):
(WebCore::ResourceRequest::applyWebArchiveHackForMail):
(WebCore::ResourceRequest::nsURLRequest): Deleted.
(WebCore::ResourceRequest::cfURLRequest): Deleted.
(WebCore::ResourceRequest::doUpdateResourceRequest): Deleted.
(WebCore::ResourceRequest::doUpdateResourceHTTPBody): Deleted.
(WebCore::ResourceRequest::doUpdatePlatformRequest): Deleted.
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody): Deleted.
(WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Deleted.
(WebCore::ResourceRequest::setStorageSession): Deleted.

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

5 years agoTextCodecICU::encode turns the whole string as yen signs if there is any backslash...
commit-queue@webkit.org [Sun, 29 Jun 2014 17:10:27 +0000 (17:10 +0000)]
TextCodecICU::encode turns the whole string as yen signs if there is any backslash in it
https://bugs.webkit.org/show_bug.cgi?id=133678

Patch by Youenn Fablet <youenn.fablet@crf.canon.fr> on 2014-06-29
Reviewed by Alexey Proskuryakov.

Source/WebCore:
Test: fast/encoding/backslash-encoding-jp.html

* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::encode): fixed the copy of characters other than backslash.

LayoutTests:
* fast/encoding/backslash-encoding-jp-expected.txt: Added.
* fast/encoding/backslash-encoding-jp.html: Added.

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

5 years ago[iOS] Pinching into a video (fullscreen gesture) leaves page zoomed in
dino@apple.com [Sun, 29 Jun 2014 02:44:15 +0000 (02:44 +0000)]
[iOS] Pinching into a video (fullscreen gesture) leaves page zoomed in
https://bugs.webkit.org/show_bug.cgi?id=134433
<rdar://problem/16630794>

Reviewed by Eric Carlson.

Detect the number of target touches (those directly on the
video element) and disable the page zoom if it looks
like the user is trying to trigger fullscreen.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.handleBaseGestureStart): If we are seeing
two touches in this video element, don't trigger fullscreen. The
exception is if we haven't yet started playback.
(ControllerIOS.prototype.handleBaseGestureChange): Don't allow fullscreen
if we haven't started playback (iOS 7 behaviour).
(ControllerIOS.prototype.handleWrapperTouchStart): Keep track of the
number of targetted touches.

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

5 years ago[iOS][WK2] PDFs never load inline again after the Web process crashes
timothy_horton@apple.com [Sat, 28 Jun 2014 22:39:31 +0000 (22:39 +0000)]
[iOS][WK2] PDFs never load inline again after the Web process crashes
https://bugs.webkit.org/show_bug.cgi?id=134432
<rdar://problem/17484205>

Reviewed by Dan Bernstein.

After a crash, the WebPage never gets mimeTypesWithCustomContentProviders filled back in.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Add mimeTypesWithCustomContentProviders to WebPageCreationParameters.

* UIProcess/Cocoa/WKWebViewContentProviderRegistry.h:
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
(-[WKWebViewContentProviderRegistry addPage:]):
We don't need to send the MIME types across when a page is added, because it already got them in its creation parameters.

(-[WKWebViewContentProviderRegistry removePage:]):
(-[WKWebViewContentProviderRegistry _mimeTypesWithCustomContentProviders]):
Return a vector of all registered MIME types.

* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::mimeTypesWithCustomContentProviders):
* UIProcess/PageClient.h:
Add (iOS only for now) mimeTypesWithCustomContentProviders to PageClient.

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

5 years agoREGRESSION: WebPageProxy::attributedSubstringForCharacterRangeAsync never calls its...
mitz@apple.com [Sat, 28 Jun 2014 22:31:26 +0000 (22:31 +0000)]
REGRESSION: WebPageProxy::attributedSubstringForCharacterRangeAsync never calls its callback function
https://bugs.webkit.org/show_bug.cgi?id=134429

Reviewed by Tim Horton.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):

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

5 years ago[iOS WK2] position:fixed inside accelerated overflow:scroll is jumpy
simon.fraser@apple.com [Sat, 28 Jun 2014 14:50:39 +0000 (14:50 +0000)]
[iOS WK2] position:fixed inside accelerated overflow:scroll is jumpy
https://bugs.webkit.org/show_bug.cgi?id=134426
<rdar://problem/17474523>

Reviewed by Tim Horton.

After committing a new layer tree (with possibly stale position:fixed layer
positions), we need the scrolling tree to update those positions based on
the current scroll offset.

Source/WebCore:
Give ScrollingTreeScrollingNode an implementation of updateLayersAfterAncestorChange()
which is required to update fixed/sticky child nodes.

* WebCore.exp.in:
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::updateLayersAfterAncestorChange):
* page/scrolling/ScrollingTreeScrollingNode.h:

Source/WebKit2:
To achieve that, implement ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterAncestorChange()
and have it add to the cumulative delta the difference between the last committed scroll
position and the current scroll position.

Also make sure that ScrollingTreeOverflowScrollingNodeIOS doesn't call back to scrollViewDidScroll()
when we're updating its scroll position inside a scrolling tree commit.

* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterAncestorChange):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):

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

5 years ago[GTK] Use public getter/setter in GObject DOM bindings properties implementation.
commit-queue@webkit.org [Sat, 28 Jun 2014 09:06:09 +0000 (09:06 +0000)]
[GTK] Use public getter/setter in GObject DOM bindings properties implementation.
https://bugs.webkit.org/show_bug.cgi?id=134390.

Patch by Juan A. Suarez Romero  <jasuarez@igalia.com>  and  Carlos Garcia Campos <cgarcia@igalia.com> on 2014-06-28
Reviewed by Carlos Garcia Campos.

The current GObject DOM bindings generator is duplicating code when
implementing the get/set_property methods and the public
getters/setters, instead of making one invoking the other.

This commit changes this behaviour so the code is not duplicated,
making it easier to maintain.

No new tests needed.

* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateProperty):
(GenerateProperties):
(WriteData):
(GetCoreObject): Deleted.
* bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
(webkit_dom_test_active_dom_object_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
(webkit_dom_test_event_constructor_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
(webkit_dom_test_exception_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
(webkit_dom_test_interface_set_property):
(webkit_dom_test_interface_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestNondeterministic.cpp:
(webkit_dom_test_nondeterministic_set_property):
(webkit_dom_test_nondeterministic_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_set_property):
(webkit_dom_test_obj_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
(webkit_dom_test_serialized_script_value_interface_get_property):
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
(webkit_dom_test_typedefs_set_property):
(webkit_dom_test_typedefs_get_property):
* bindings/scripts/test/GObject/WebKitDOMattribute.cpp:
(webkit_dom_test_exception_get_property):
(webkit_dom_attribute_get_property):

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

5 years ago[New Multicolumn] Elements with rounded corners and overflow:hidden do not properly...
stavila@adobe.com [Sat, 28 Jun 2014 08:44:54 +0000 (08:44 +0000)]
[New Multicolumn] Elements with rounded corners and overflow:hidden do not properly clip their content
https://bugs.webkit.org/show_bug.cgi?id=133941

Reviewed by Darin Adler.

Source/WebCore:
When having a multicol element inside an element with overflow:hidden and border-radius,
the fragments representing the columns need to have the border radius set also, to ensure
proper clipping.

Test: fast/multicol/newmulticol/multicol-clip-rounded-corners.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::collectFragments):

LayoutTests:
Added test for multicol element inside an element with overflow:hidden and border radius.

* fast/multicol/newmulticol/multicol-clip-rounded-corners-expected.html: Added.
* fast/multicol/newmulticol/multicol-clip-rounded-corners.html: Added.

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

5 years agocheck-webkit-style should check the order of #imports as well as #includes
timothy_horton@apple.com [Sat, 28 Jun 2014 05:51:13 +0000 (05:51 +0000)]
check-webkit-style should check the order of #imports as well as #includes
https://bugs.webkit.org/show_bug.cgi?id=134428

Reviewed by Dan Bernstein.

* Scripts/webkitpy/style/checkers/cpp.py:
Allow "import" in addition to "include", so that the sort order of headers in ObjC files is checked.

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

5 years agoSubpixel rendering: Background clipping with subpixel behaves differently when compos...
zalan@apple.com [Sat, 28 Jun 2014 01:34:27 +0000 (01:34 +0000)]
Subpixel rendering: Background clipping with subpixel behaves differently when composited.
https://bugs.webkit.org/show_bug.cgi?id=134422

Reviewed by Simon Fraser.

Adjust cliprect with the subpixel offset from the graphics layer the same way we do it for painting.
It ensures that cliprect starts from the right position when graphics layer is not on the same
coordinates as the associated render layer.

Source/WebCore:
Test: compositing/hidpi-compositing-layer-with-subpixel-offset-accumulation-clipping.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
(WebCore::RenderLayer::paintLayer):
(WebCore::RenderLayer::applyFilters):
(WebCore::RenderLayer::paintTransformedLayerIntoFragments):
(WebCore::RenderLayer::paintBackgroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
(WebCore::RenderLayer::paintOutlineForFragments):
(WebCore::RenderLayer::paintMaskForFragments):
(WebCore::RenderLayer::paintOverflowControlsForFragments):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayer.h:

LayoutTests:
* compositing/hidpi-compositing-layer-with-subpixel-offset-accumulation-clipping-expected.html: Added.
* compositing/hidpi-compositing-layer-with-subpixel-offset-accumulation-clipping.html: Added.

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

5 years ago[Win] Implement parts of the AVFOUNDATION_LOADER_DELEGATE logic for Windows
bfulgham@apple.com [Sat, 28 Jun 2014 00:19:41 +0000 (00:19 +0000)]
[Win] Implement parts of the AVFOUNDATION_LOADER_DELEGATE logic for Windows
https://bugs.webkit.org/show_bug.cgi?id=134418

Reviewed by Eric Carlson.

../WebCore:
Land an initial implementation of AVFOUNDATION_LOADER_DELEGATE for
Windows.

* DerivedSources.cpp: Add new IDL files
* DerivedSources.make: Add check for AVFOUNDATION_LOADER_DELEGATE.
* Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp: Added (ported from
Objective C.)
* WebCore.vcxproj/WebCore.vcxproj: Update for new files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.vcxproj/WebCoreCommon.props: Add new search paths.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj: Update for new files.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData):
Moved from MediaPlayerPrivateAVFoundationObjC.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
Update for new API calls.
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp: Added.
* platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Added.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
Updated for new AVFOUNDATION_LOADER_DELEGATE methods.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: Added.
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h: Added.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
Remove method that was moved to base class.

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

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

5 years agoRemove BufferForAppendingHyphen
benjamin@webkit.org [Fri, 27 Jun 2014 23:32:51 +0000 (23:32 +0000)]
Remove BufferForAppendingHyphen
https://bugs.webkit.org/show_bug.cgi?id=134376

Reviewed by Darin Adler.

It is legacy, from a time when that code was using a Vector.

The problem is that StringBuilder's memory was also implicitly used to keep
the string alive for the lifespan of the TextRun. That seems quite dangerous
as changes in StringBuilder could have changed that.

To fix the lifetime issue, my first idea was to make it explicit by passing
a String reference to hold the memory alive, and a boolean to say if the text
need an hyphen. The problem with that is this code is very hot and I made things
worse.

The solution with this patch is to just pass a pointer to a String to do both
the buffer reference, and the decision to add the hyphen. Having a single
argument with 2 meanings is not pretty but that's not worse than the old buffer.

* editing/TextIterator.cpp:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::constructTextRun):
(WebCore::adjustCharactersAndLengthForHyphen): Deleted.
* rendering/InlineTextBox.h:
(WebCore::BufferForAppendingHyphen::BufferForAppendingHyphen): Deleted.
* rendering/RenderText.cpp:

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

5 years agoLazily link frameworks in WebVideoFullscreenInterfaceAVKit.
commit-queue@webkit.org [Fri, 27 Jun 2014 23:28:35 +0000 (23:28 +0000)]
Lazily link frameworks in WebVideoFullscreenInterfaceAVKit.
https://bugs.webkit.org/show_bug.cgi?id=134407

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-06-27
Reviewed by Eric Carlson.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController init]):
Load AVPlayerController on use.
(WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit):
Remove loading on construction.
(WebVideoFullscreenInterfaceAVKit::setCurrentTime): Load AVValueTiming on use.
(WebVideoFullscreenInterfaceAVKit::setupFullscreen): Load several classes on use.
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): Load UIColor on use.

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

5 years agoRemove extra operations from 64-bit or on armv7.
commit-queue@webkit.org [Fri, 27 Jun 2014 22:29:24 +0000 (22:29 +0000)]
Remove extra operations from 64-bit or on armv7.
https://bugs.webkit.org/show_bug.cgi?id=134408

Patch by Alex Christensen <achristensen@webkit.org> on 2014-06-27
Reviewed by Geoffrey Garen.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::addFlagsToElementStyleFromContext):
Only do or operations if it would change values.
Often we're only setting one flag, so half the operations are not necessary.

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

5 years agoScrollView::rootViewToTotalContents() needs to take topContentInset into account
bdakin@apple.com [Fri, 27 Jun 2014 22:12:44 +0000 (22:12 +0000)]
ScrollView::rootViewToTotalContents() needs to take topContentInset into account
https://bugs.webkit.org/show_bug.cgi?id=134415
-and corresponding-
<rdar://problem/17473633>

Reviewed by Simon Fraser.

This affects hit testing in headers aka PageBanners.

The root view will be anchored above the start of the total contents if there is a
topContentInset, so the inset value should be subtracted to get into the right
coordinate space here.
* platform/ScrollView.cpp:
(WebCore::ScrollView::rootViewToTotalContents):

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

5 years agoFlush throttling with remote layers
antti@apple.com [Fri, 27 Jun 2014 21:58:06 +0000 (21:58 +0000)]
Flush throttling with remote layers
https://bugs.webkit.org/show_bug.cgi?id=134398

Reviewed by Darin Adler.

Source/WebCore:
With remote layer trees the flush scheduling lives in the WebKit2 layer. The throttling code
needs to live there as well.

Add the required callbacks and disable the existing throttling code in RenderLayerCompositor
when remote layers are in use. Later we can get rid of the RenderLayerCompositor throttling code.

* WebCore.xcodeproj/project.pbxproj:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadProgressingStatusChanged):
* page/ChromeClient.h:
(WebCore::ChromeClient::adjustLayerFlushThrottling):
* page/FrameView.cpp:
(WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction):
(WebCore::FrameView::loadProgressingStatusChanged):

    Factor the progress status change activities to a function.

(WebCore::FrameView::updateLayerFlushThrottling):
(WebCore::FrameView::setExposedRect):

    Move the call to adjustTiledBackingCoverage from WebKit to here.

(WebCore::FrameView::updateLayerFlushThrottlingInAllFrames): Deleted.
* page/FrameView.h:
* page/LayerFlushThrottleState.h: Added.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):

Source/WebKit2:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::adjustLayerFlushThrottling):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::adjustLayerFlushThrottling):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
(WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):

    Delay layer flushes during page loading.
    If use interacts with the page the next flush in unthrottled even if loading is in progress.

(WebKit::RemoteLayerTreeDrawingArea::adjustLayerFlushThrottling):

    Compute the new delay. The first visual flush uses a shorter delay.
    Flush immediately when we are no longer throttling.

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

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

5 years agoDon't fold a UInt32ToNumber with DoOverflow to Identity since that would result in...
fpizlo@apple.com [Fri, 27 Jun 2014 21:44:05 +0000 (21:44 +0000)]
Don't fold a UInt32ToNumber with DoOverflow to Identity since that would result in an Identity that takes an Int32 and returns a DoubleRep
https://bugs.webkit.org/show_bug.cgi?id=134412

Reviewed by Mark Hahnenberg.

* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::setReplacement):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
* tests/stress/uint32-to-number-fold-constant-with-do-overflow.js: Added.
(foo):
(bar):
(baz):

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

5 years ago[iOS][WK2] <select> tapping "next" does not save new picker value
commit-queue@webkit.org [Fri, 27 Jun 2014 21:36:33 +0000 (21:36 +0000)]
[iOS][WK2] <select> tapping "next" does not save new picker value
https://bugs.webkit.org/show_bug.cgi?id=134409

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-06-27
Reviewed by Enrica Casucci.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView accessoryTab:]):
We know the assisted node will change, so call endEditing
before the assisted node changes in the WebProcess.

(-[WKContentView _stopAssistingNode]):
Ensure we call endEditing to trigger controlEndEditing.

* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKMultipleSelectPicker initWithView:]):
(-[WKMultipleSelectPicker pickerView:row:column:checked:]):
(-[WKSelectSinglePicker dealloc]):
Style fixes.

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

5 years agoThe user pressing a button on a gamepad should cause gamepads to become visible to...
beidson@apple.com [Fri, 27 Jun 2014 21:11:24 +0000 (21:11 +0000)]
The user pressing a button on a gamepad should cause gamepads to become visible to all NavigatorGamepads.
https://bugs.webkit.org/show_bug.cgi?id=134375

Reviewed by Darin Adler.

No new tests (Not yet a tested config)

* Modules/gamepad/GamepadManager.cpp:
(WebCore::GamepadManager::platformGamepadConnected): Also call to makeGamepadsVisibileToBlindNavigators.
(WebCore::GamepadManager::platformGamepadDisconnected):
(WebCore::GamepadManager::platformGamepadInputActivity): Call makeGamepadsVisibileToBlindNavigators.
(WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators): Walk through each blind navigator
  notifying it of each connected Gamepad.
(WebCore::GamepadManager::registerNavigator): Also add to the blind navigator set.
(WebCore::GamepadManager::unregisterNavigator): Also remove from the blind navigator set.
* Modules/gamepad/GamepadManager.h:

* platform/GamepadProviderClient.h: Added platformGamepadInputActivity.

* platform/mac/HIDGamepadProvider.cpp:
(WebCore::HIDGamepadProvider::HIDGamepadProvider):
(WebCore::HIDGamepadProvider::valuesChanged): Set the input notification timer which will notify the clients
  that a button was pressed.
(WebCore::HIDGamepadProvider::inputNotificationTimerFired): Perform that notification.
* platform/mac/HIDGamepadProvider.h:

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

5 years agoInfoClick (from Nisus Software) dies on viewing found items
weinig@apple.com [Fri, 27 Jun 2014 21:04:16 +0000 (21:04 +0000)]
InfoClick (from Nisus Software) dies on viewing found items
<rdar://problem/17395601>
https://bugs.webkit.org/show_bug.cgi?id=134410

Reviewed by Andy Estes.

InfoClick was calling -[WebPreferences setPrivateBrowsingEnabled:] before
setting up a WebView (or anything else that would have set up WebKitSystemInterface),
which now requires a set up WebKitSystemInterface. We can fix this by initializing
it from +[WebPreferences initialize].

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
Add call to InitWebCoreSystemInterface().

(+[WebPreferences _switchNetworkLoaderToNewTestingSession]):
Remove now unnecessary call to InitWebCoreSystemInterface().

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

5 years agoHIDGamepads should populate themselves with initial input values
beidson@apple.com [Fri, 27 Jun 2014 20:53:14 +0000 (20:53 +0000)]
HIDGamepads should populate themselves with initial input values
https://bugs.webkit.org/show_bug.cgi?id=134381

Reviewed by Darin Adler.

No new tests (Not yet a tested config)

* platform/mac/HIDGamepad.cpp:
(WebCore::HIDGamepad::getCurrentValueForElement):
(WebCore::HIDGamepad::initElements):  Loop through all the saved elements to get current values.
(WebCore::HIDGamepad::maybeAddButton):
(WebCore::HIDGamepad::maybeAddAxis):
* platform/mac/HIDGamepad.h:
(WebCore::HIDGamepadElement::HIDGamepadElement):
(WebCore::HIDGamepadButton::HIDGamepadButton):
(WebCore::HIDGamepadAxis::HIDGamepadAxis):

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

5 years agoSource/JavaScriptCore: Add feature flag for link long-press gesture.
commit-queue@webkit.org [Fri, 27 Jun 2014 20:47:05 +0000 (20:47 +0000)]
Source/JavaScriptCore:  Add feature flag for link long-press gesture.
 https://bugs.webkit.org/show_bug.cgi?id=134262

 Reviewed by Enrica Casucci.

 * Configurations/FeatureDefines.xcconfig:
 Add ENABLE_LINK_LONG_PRESS.

Patch by Peyton Randolph <prandolph@apple.com> on 2014-06-27

Source/WebCore: Add feature flag for link long-press gesture.
https://bugs.webkit.org/show_bug.cgi?id=134262

Patch by Peyton Randolph <prandolph@apple.com> on 2014-06-27
Reviewed by Enrica Casucci.

* Configurations/FeatureDefines.xcconfig:
Add ENABLE_LINK_LONG_PRESS.

Source/WebKit/mac: Add feature flag for link long-press gesture.
https://bugs.webkit.org/show_bug.cgi?id=134262

Patch by Peyton Randolph <prandolph@apple.com> on 2014-06-27
Reviewed by Enrica Casucci.

* Configurations/FeatureDefines.xcconfig:
Add ENABLE_LINK_LONG_PRESS.

Source/WebKit2:  Add feature flag for link long-press gesture.
 https://bugs.webkit.org/show_bug.cgi?id=134262

 Reviewed by Enrica Casucci.

 * Configurations/FeatureDefines.xcconfig:
 Add ENABLE_LINK_LONG_PRESS.

Patch by Peyton Randolph <prandolph@apple.com> on 2014-06-27

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

5 years agoHIDGamepadProvider should only be active when someone is interested in Gamepads.
beidson@apple.com [Fri, 27 Jun 2014 20:35:55 +0000 (20:35 +0000)]
HIDGamepadProvider should only be active when someone is interested in Gamepads.
https://bugs.webkit.org/show_bug.cgi?id=134374

Reviewed by Darin Adler.

No new tests (Not yet a tested config)

* Modules/gamepad/GamepadManager.cpp:
(WebCore::GamepadManager::registerNavigator): Add some logging.
(WebCore::GamepadManager::unregisterNavigator): Ditto.

* platform/mac/HIDGamepadProvider.cpp:
(WebCore::HIDGamepadProvider::HIDGamepadProvider):
(WebCore::HIDGamepadProvider::connectionDelayTimerFired): Stop suppressing connection callbacks
(WebCore::HIDGamepadProvider::openAndScheduleManager):
(WebCore::HIDGamepadProvider::closeAndUnscheduleManager): Stop listening for gamepad events, and clear
  all current gamepads.
(WebCore::HIDGamepadProvider::startMonitoringGamepads): If the first client, call openAndScheduleManager
(WebCore::HIDGamepadProvider::stopMonitoringGamepads): If the last client, call closeAndUnscheduleManager
(WebCore::HIDGamepadProvider::deviceAdded): If this callback came while we were suppressing connection
  callbacks, it is a startup event for already-connected gamepads. Stop suppressing callbacks in a later
  spin of the runloop.
(WebCore::HIDGamepadProvider::deviceRemoved):
* platform/mac/HIDGamepadProvider.h:
(WebCore::HIDGamepadProvider::setShouldDispatchCallbacks): Deleted.

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

5 years agoPrevent unnecessary register saving in css jit.
achristensen@apple.com [Fri, 27 Jun 2014 20:31:31 +0000 (20:31 +0000)]
Prevent unnecessary register saving in css jit.
https://bugs.webkit.org/show_bug.cgi?id=133955

Reviewed by Geoff Garen.

* cssjit/FunctionCall.h:
(WebCore::FunctionCall::prepareAndCall):
(WebCore::FunctionCall::cleanupPostCall):
(WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
(WebCore::FunctionCall::restoreAllocatedCallerSavedRegisters):
(WebCore::FunctionCall::saveAllocatedRegisters): Renamed to saveAllocatedCallerSavedRegisters.
(WebCore::FunctionCall::restoreAllocatedRegisters): Renamed to restoreAllocatedCallerSavedRegisters.
Only push caller saved registers before function calls.
* cssjit/RegisterAllocator.h:
(WebCore::RegisterAllocator::isValidRegister):
Corrected register ranges.
(WebCore::RegisterAllocator::isCallerSavedRegister): Added.

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

5 years agoUnreviewed gardening; fix whitespace issues in the W3C Media Source expected results.
jer.noble@apple.com [Fri, 27 Jun 2014 19:54:49 +0000 (19:54 +0000)]
Unreviewed gardening; fix whitespace issues in the W3C Media Source expected results.

* http/tests/media/media-source/mediasource-addsourcebuffer-expected.txt:
* http/tests/media/media-source/mediasource-append-buffer-expected.txt:
* http/tests/media/media-source/mediasource-append-stream-expected.txt:
* http/tests/media/media-source/mediasource-appendwindow-expected.txt:
* http/tests/media/media-source/mediasource-buffered-expected.txt:
* http/tests/media/media-source/mediasource-closed-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-av-framesize-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-v-framerate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-v-framesize-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-a-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-av-framesize-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-v-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-v-framerate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-v-framesize-expected.txt:
* http/tests/media/media-source/mediasource-duration-expected.txt:
* http/tests/media/media-source/mediasource-endofstream-invaliderror-expected.txt:
* http/tests/media/media-source/mediasource-endofstream-invaliderror.html:
* http/tests/media/media-source/mediasource-getvideoplaybackquality-expected.txt:
* http/tests/media/media-source/mediasource-is-type-supported-expected.txt:
* http/tests/media/media-source/mediasource-multiple-attach-expected.txt:
* http/tests/media/media-source/mediasource-play-expected.txt:
* http/tests/media/media-source/mediasource-play-then-seek-back-expected.txt:
* http/tests/media/media-source/mediasource-redundant-seek-expected.txt:
* http/tests/media/media-source/mediasource-remove-expected.txt:
* http/tests/media/media-source/mediasource-seek-beyond-duration-expected.txt:
* http/tests/media/media-source/mediasource-seek-during-pending-seek-expected.txt:
* http/tests/media/media-source/mediasource-sourcebuffer-mode-expected.txt:
* http/tests/media/media-source/mediasource-sourcebufferlist-expected.txt:

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

5 years agoCustom scrollbars should not create ScrollbarPainters on Mac
bdakin@apple.com [Fri, 27 Jun 2014 19:22:44 +0000 (19:22 +0000)]
Custom scrollbars should not create ScrollbarPainters on Mac
https://bugs.webkit.org/show_bug.cgi?id=134406
-and corresponding-
<rdar://problem/16178301>

Reviewed by Tim Horton.

The solution here is to return early in ScrollbarThemeMac::registerScrollbar() if
the scrollbar is custom. However, since this function is called during the
RenderScrollbar and Scrollbar constructor, we need to re-implement
Scrollbar::isCustomScrollbar() to return a member variable that is passed into the
constructor. Otherwise, we will get Scrollbar’s implementation is
isCustomScrollbar() wrongfully returning false since instead of the derived
class’s implementation.

Scrollbar constructor now has an option parameter isCustomScrollbar that defaults
to false. That value is returned by isCustomScrollbar()
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::Scrollbar):
* platform/Scrollbar.h:

Return early if this is a custom scrollbar since the rest of the function deals
with creating a native scrollbar and getting it in the right state.
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::registerScrollbar):

Send true to the Scrollbar constructor to indicate that this is a custom
scrollbar.
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::RenderScrollbar):
* rendering/RenderScrollbar.h:

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

5 years ago[Mac] AVMetadataKeySpaceISOUserData not defined on 10.8
eric.carlson@apple.com [Fri, 27 Jun 2014 19:17:44 +0000 (19:17 +0000)]
[Mac] AVMetadataKeySpaceISOUserData not defined on 10.8
https://bugs.webkit.org/show_bug.cgi?id=134401

Reviewed by Jer Noble.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::metadataType): Use SOFT_LINK_POINTER_OPTIONAL for AVMetadataKeySpaceISOUserData
    so we don't have problems on OS versions where it isn't defined.

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

5 years agoREGRESSION (r168685): css calc() expression fails
mhodovan.u-szeged@partner.samsung.com [Fri, 27 Jun 2014 18:55:46 +0000 (18:55 +0000)]
REGRESSION (r168685): css calc() expression fails
https://bugs.webkit.org/show_bug.cgi?id=134059

Source/WebCore:
The expression 'calc((100% - 20px) / 3' did not work properly after r168685,
because primitiveType() function in CSSCalculationValue.cpp has handled
CalcPercentLength and CalcPercentNumber categories as if they were angles.
The patch fixes this incorrect behavior.

Reviewed by Simon Fraser.

Test: fast/css/calc-percentage-pixel.html

* css/CSSCalculationValue.cpp:

LayoutTests:
Added test demonstrates that expressions like
'calc((100% - 20px) / 3' work correctly again.

Reviewed by Simon Fraser.

* fast/css/calc-percentage-pixel-expected.html: Added.
* fast/css/calc-percentage-pixel.html: Added.

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

5 years ago[MSE] http/tests/media/media-source/mediasource-append-buffer.html is failing
jer.noble@apple.com [Fri, 27 Jun 2014 18:45:00 +0000 (18:45 +0000)]
[MSE] http/tests/media/media-source/mediasource-append-buffer.html is failing
https://bugs.webkit.org/show_bug.cgi?id=134389

Reviewed by Eric Carlson.

Two subtests in mediasource-append-buffer.html are failing. Bring setDuration() up to spec
by throwing an exception if the duration is called while any SourceBuffer is updating. Do
not cancel pending events when a SourceBuffer is removed from its MediaSource. And mark the
SourceBuffer as having pending activity if there are pending events to be fired.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::setDuration):
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::removedFromMediaSource):
(WebCore::SourceBuffer::hasPendingActivity):

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

5 years ago[MSE] Import latest Media Source tests from W3C test suite
jer.noble@apple.com [Fri, 27 Jun 2014 18:43:01 +0000 (18:43 +0000)]
[MSE] Import latest Media Source tests from W3C test suite
https://bugs.webkit.org/show_bug.cgi?id=134388

Reviewed by Eric Carlson.

Import the most recent Media Source tests from the proposed W3C test suite:
<https://github.com/acolwell/web-platform-tests/tree/submission/acolwell/media-source/media-source>

No ports currently enable these tests, so update the expected results for each
test with the ideal expected result.

* http/tests/media/media-source/mediasource-addsourcebuffer-expected.txt:
* http/tests/media/media-source/mediasource-addsourcebuffer.html:
* http/tests/media/media-source/mediasource-append-buffer-expected.txt:
* http/tests/media/media-source/mediasource-append-buffer.html:
* http/tests/media/media-source/mediasource-append-stream-expected.txt: Added.
* http/tests/media/media-source/mediasource-append-stream.html: Added.
* http/tests/media/media-source/mediasource-appendwindow-expected.txt: Added.
* http/tests/media/media-source/mediasource-appendwindow.html: Added.
* http/tests/media/media-source/mediasource-buffered-expected.txt:
* http/tests/media/media-source/mediasource-buffered.html:
* http/tests/media/media-source/mediasource-closed-expected.txt:
* http/tests/media/media-source/mediasource-closed.html:
* http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html:
* http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html:
* http/tests/media/media-source/mediasource-config-change-mp4-av-framesize-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-av-framesize.html:
* http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html:
* http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html:
* http/tests/media/media-source/mediasource-config-change-mp4-v-framerate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html:
* http/tests/media/media-source/mediasource-config-change-mp4-v-framesize-expected.txt:
* http/tests/media/media-source/mediasource-config-change-mp4-v-framesize.html:
* http/tests/media/media-source/mediasource-config-change-webm-a-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-a-bitrate.html:
* http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate.html:
* http/tests/media/media-source/mediasource-config-change-webm-av-framesize-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-av-framesize.html:
* http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate.html:
* http/tests/media/media-source/mediasource-config-change-webm-v-bitrate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-v-bitrate.html:
* http/tests/media/media-source/mediasource-config-change-webm-v-framerate-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-v-framerate.html:
* http/tests/media/media-source/mediasource-config-change-webm-v-framesize-expected.txt:
* http/tests/media/media-source/mediasource-config-change-webm-v-framesize.html:
* http/tests/media/media-source/mediasource-config-changes.js:
* http/tests/media/media-source/mediasource-duration-expected.txt: Added.
* http/tests/media/media-source/mediasource-duration.html: Added.
* http/tests/media/media-source/mediasource-endofstream-invaliderror-expected.txt: Added.
* http/tests/media/media-source/mediasource-endofstream-invaliderror.html: Added.
* http/tests/media/media-source/mediasource-getvideoplaybackquality-expected.txt: Added.
* http/tests/media/media-source/mediasource-getvideoplaybackquality.html: Added.
* http/tests/media/media-source/mediasource-is-type-supported-expected.txt:
* http/tests/media/media-source/mediasource-is-type-supported.html:
* http/tests/media/media-source/mediasource-multiple-attach-expected.txt:
* http/tests/media/media-source/mediasource-multiple-attach.html:
* http/tests/media/media-source/mediasource-play-expected.txt:
* http/tests/media/media-source/mediasource-play-then-seek-back-expected.txt: Added.
* http/tests/media/media-source/mediasource-play-then-seek-back.html: Added.
* http/tests/media/media-source/mediasource-play.html:
* http/tests/media/media-source/mediasource-redundant-seek-expected.txt: Added.
* http/tests/media/media-source/mediasource-redundant-seek.html: Added.
* http/tests/media/media-source/mediasource-remove-expected.txt: Added.
* http/tests/media/media-source/mediasource-remove.html: Added.
* http/tests/media/media-source/mediasource-seek-beyond-duration-expected.txt: Added.
* http/tests/media/media-source/mediasource-seek-beyond-duration.html: Added.
* http/tests/media/media-source/mediasource-seek-during-pending-seek-expected.txt: Added.
* http/tests/media/media-source/mediasource-seek-during-pending-seek.html: Added.
* http/tests/media/media-source/mediasource-sourcebuffer-mode-expected.txt: Added.
* http/tests/media/media-source/mediasource-sourcebuffer-mode.html: Added.
* http/tests/media/media-source/mediasource-sourcebufferlist-expected.txt:
* http/tests/media/media-source/mediasource-sourcebufferlist.html:
* http/tests/media/media-source/mediasource-util.js:
* http/tests/media/media-source/mp4/test-a-128k-44100Hz-1ch-manifest.json: Added.
* http/tests/media/media-source/mp4/test-a-128k-44100Hz-1ch.mp4: Added.
* http/tests/media/media-source/mp4/test-a-192k-44100Hz-1ch-manifest.json: Added.
* http/tests/media/media-source/mp4/test-a-192k-44100Hz-1ch.mp4: Added.
* http/tests/media/media-source/mp4/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/mp4/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.mp4: Added.
* http/tests/media/media-source/mp4/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/mp4/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr.mp4: Added.
* http/tests/media/media-source/mp4/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/mp4/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr.mp4: Added.
* http/tests/media/media-source/mp4/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/mp4/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr.mp4: Added.
* http/tests/media/media-source/mp4/test-v-128k-320x240-24fps-8kfr-manifest.json: Added.
* http/tests/media/media-source/mp4/test-v-128k-320x240-24fps-8kfr.mp4: Added.
* http/tests/media/media-source/mp4/test-v-128k-320x240-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/mp4/test-v-128k-320x240-30fps-10kfr.mp4: Added.
* http/tests/media/media-source/mp4/test-v-128k-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/mp4/test-v-128k-640x480-30fps-10kfr.mp4: Added.
* http/tests/media/media-source/mp4/test-v-256k-320x240-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/mp4/test-v-256k-320x240-30fps-10kfr.mp4: Added.
* http/tests/media/media-source/mp4/test.mp4: Added.
* http/tests/media/media-source/seek-to-end-after-duration-change-expected.txt: Removed.
* http/tests/media/media-source/seek-to-end-after-duration-change.html: Removed.
* http/tests/media/media-source/video-media-source-abort-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-abort.html: Removed.
* http/tests/media/media-source/video-media-source-add-and-remove-buffers-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-add-and-remove-buffers.html: Removed.
* http/tests/media/media-source/video-media-source-append-in-ended-state-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-append-in-ended-state.html: Removed.
* http/tests/media/media-source/video-media-source-append-with-offset-in-ended-state-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-append-with-offset-in-ended-state.html: Removed.
* http/tests/media/media-source/video-media-source-async-events-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-async-events.html: Removed.
* http/tests/media/media-source/video-media-source-closed-on-htmlmediaelement-destruction-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-closed-on-htmlmediaelement-destruction.html: Removed.
* http/tests/media/media-source/video-media-source-duration-boundaryconditions-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-duration-boundaryconditions.html: Removed.
* http/tests/media/media-source/video-media-source-duration-changed-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-duration-changed.html: Removed.
* http/tests/media/media-source/video-media-source-duration-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-duration.html: Removed.
* http/tests/media/media-source/video-media-source-errors-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-errors.html: Removed.
* http/tests/media/media-source/video-media-source-event-attributes-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-event-attributes.html: Removed.
* http/tests/media/media-source/video-media-source-garbage-collection-before-sourceopen-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-garbage-collection-before-sourceopen.html: Removed.
* http/tests/media/media-source/video-media-source-is-type-supported-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-is-type-supported.html: Removed.
* http/tests/media/media-source/video-media-source-objects-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-objects.html: Removed.
* http/tests/media/media-source/video-media-source-play-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-play.html: Removed.
* http/tests/media/media-source/video-media-source-reject-append-after-reopening-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-reject-append-after-reopening.html: Removed.
* http/tests/media/media-source/video-media-source-seek-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-seek.html: Removed.
* http/tests/media/media-source/video-media-source-sourcebufferlist-crash-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-sourcebufferlist-crash.html: Removed.
* http/tests/media/media-source/video-media-source-state-changes-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-state-changes.html: Removed.
* http/tests/media/media-source/video-media-source-zero-byte-append-in-ended-state-expected.txt: Removed.
* http/tests/media/media-source/video-media-source-zero-byte-append-in-ended-state.html: Removed.
* http/tests/media/media-source/webm/segment-info.js: Added.
* http/tests/media/media-source/webm/test-a-128k-44100Hz-1ch-manifest.json: Added.
* http/tests/media/media-source/webm/test-a-128k-44100Hz-1ch.webm: Added.
* http/tests/media/media-source/webm/test-a-192k-44100Hz-1ch-manifest.json: Added.
* http/tests/media/media-source/webm/test-a-192k-44100Hz-1ch.webm: Added.
* http/tests/media/media-source/webm/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/webm/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.webm: Added.
* http/tests/media/media-source/webm/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/webm/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr.webm: Added.
* http/tests/media/media-source/webm/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/webm/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr.webm: Added.
* http/tests/media/media-source/webm/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/webm/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr.webm: Added.
* http/tests/media/media-source/webm/test-v-128k-320x240-24fps-8kfr-manifest.json: Added.
* http/tests/media/media-source/webm/test-v-128k-320x240-24fps-8kfr.webm: Added.
* http/tests/media/media-source/webm/test-v-128k-320x240-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/webm/test-v-128k-320x240-30fps-10kfr.webm: Added.
* http/tests/media/media-source/webm/test-v-128k-640x480-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/webm/test-v-128k-640x480-30fps-10kfr.webm: Added.
* http/tests/media/media-source/webm/test-v-256k-320x240-30fps-10kfr-manifest.json: Added.
* http/tests/media/media-source/webm/test-v-256k-320x240-30fps-10kfr.webm: Added.
* http/tests/media/media-source/webm/test-vp8-vorbis-webvtt.webm: Added.
* http/tests/media/media-source/webm/test.webm: Added.

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

5 years ago[iOS WK2] Fix touch-scrollable elements with overflow:scroll on just one axis, and...
simon.fraser@apple.com [Fri, 27 Jun 2014 18:28:39 +0000 (18:28 +0000)]
[iOS WK2] Fix touch-scrollable elements with overflow:scroll on just one axis, and RTL scrolling
https://bugs.webkit.org/show_bug.cgi?id=134377
<rdar://problem/16762224>

Reviewed by Tim Horton.

Source/WebCore:

Make -webkit-overflow-scrolling:touch scrolling work correctly when one axis
has overflow:scroll and the other overflow:hidden. Also fix scrolling in RTL
contexts.

An RTL scroller with overflow-x:hidden will have a non-zero scroll origin,
and needs to truncate the scrolled content on the left side. To pass the
correct geometry to the UI process, we need to introduce the concept of
"reachable" size as well as total content size; normally these are the same,
but will differ when scrolling is only allowed on one axis but there is overflow
on both axes.

To get the reachable size, add RenderLayer::scrollableContentsSize().

RenderLayer::visibleSize() was wrong; the function should return the size of the
scrollable portion, but used layer size which includes borders. Fix to use pixelSnappedClientWidth()/Height(),
which is what we use for scrollbar computations.

* WebCore.exp.in:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
(WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setReachableContentsSize):
* page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::reachableContentsSize):
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::reachableContentsSize):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::visibleSize):
(WebCore::RenderLayer::scrollableContentsSize):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::updateScrollingLayerWithClient):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

Source/WebKit2:

Make -webkit-overflow-scrolling:touch scrolling work correctly when one axis
has overflow:scroll and the other overflow:hidden. Also fix scrolling in RTL
contexts.

An RTL scroller with overflow-x:hidden will have a non-zero scroll origin,
and needs to truncate the scrolled content on the left side. To pass the
correct geometry to the UI process, we need to introduce the concept of
"reachable" size as well as total content size; normally these are the same,
but will differ when scrolling is only allowed on one axis but there is overflow
on both axes.

ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren() uses the total and
reachable content sizes to set a negative edge inset on the left (for RTL) or top
(for bottom-to-top) so prevent scrolling into these areas.

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
(WebKit::RemoteScrollingTreeTextStream::dump):
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):

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

5 years agoFix various leaks, RetainPtrs should adopt allocs
joepeck@webkit.org [Fri, 27 Jun 2014 18:13:58 +0000 (18:13 +0000)]
Fix various leaks, RetainPtrs should adopt allocs
https://bugs.webkit.org/show_bug.cgi?id=134308

Reviewed by Alexey Proskuryakov.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _remoteObjectRegistry]):

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

5 years ago[Feature Queries] Fix feature queries build on Mac
betravis@adobe.com [Fri, 27 Jun 2014 18:13:55 +0000 (18:13 +0000)]
[Feature Queries] Fix feature queries build on Mac
https://bugs.webkit.org/show_bug.cgi?id=134359

Reviewed by Antti Koivisto.

Update the XCode project and Feature Queries code to build on Mac.

There are existing tests for supports in the LayoutTests/css3 directory.

* WebCore.xcodeproj/project.pbxproj: Add the Feature Queries files
to the XCode project.
* css/CSSGrammar.y.in: Update CSSParserExpression to CSSParserValueList.
* css/DOMWindowCSS.idl: Add ImplementationLacksVTable metadata.

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

5 years agoRemove unused definitions that were mistakenly added back in r170323 and then again...
mitz@apple.com [Fri, 27 Jun 2014 18:09:54 +0000 (18:09 +0000)]
Remove unused definitions that were mistakenly added back in r170323 and then again in r170329
https://bugs.webkit.org/show_bug.cgi?id=134397

Reviewed by Geoff Garen.

* UIProcess/API/Cocoa/WKBackForwardList.mm:

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

5 years ago[GTK] Unreviewed GTK gardening.
commit-queue@webkit.org [Fri, 27 Jun 2014 18:08:08 +0000 (18:08 +0000)]
[GTK] Unreviewed GTK gardening.

Rebaseline tests after r170207, r170249, r170304, r170418 and r170433.
Update expectations for new crashing tests.

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

* platform/gtk/TestExpectations: Report and mark new crashing tests. Adjust some tests expectations.
* platform/gtk/fast/canvas/canvas-blend-image-expected.txt: Rebaseline after r170433.
* platform/gtk/fast/canvas/canvas-blend-solid-expected.txt: Rebaseline after r170433.
* platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt: Rebaseline after r170249.
* platform/gtk/fast/dynamic/text-combine-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/multicol/pagination/RightToLeft-rl-dynamic-expected.txt: Added. Add baseline after r170304.
* platform/gtk/fast/regions/repaint/japanese-rl-selection-repaint-in-regions-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/repaint/japanese-rl-selection-clear-expected.txt: Added. Rebaseline after r170418.
* platform/gtk/fast/repaint/japanese-rl-selection-repaint-expected.txt: Added. Rebaseline after r170418.
* platform/gtk/fast/text/decorations-with-text-combine-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/text/emphasis-vertical-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/text/international/002-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/text/international/text-combine-image-test-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/text/international/text-spliced-font-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/text/international/wrap-CJK-001-expected.txt: Added. Rebaseline after r170418.
* platform/gtk/fast/text/khmer-lao-font-expected.txt: Added. Add baseline after r170207.
* platform/gtk/fast/writing-mode/border-vertical-lr-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/writing-mode/japanese-lr-selection-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/writing-mode/japanese-lr-text-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/writing-mode/japanese-rl-selection-expected.txt: Rebaseline after r170418.
* platform/gtk/fast/writing-mode/japanese-rl-text-expected.txt: Rebaseline after r170418.
* platform/gtk/svg/W3C-SVG-1.1/filters-blend-01-b-expected.txt: Added. Rebaseline after r170433.
* platform/gtk/svg/filters/feBlend-all-blendmodes-expected.txt: Added. Add baseline after r170433.

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

5 years ago[ARMv7] Skip one particularly expensive fastFree() alignment check.
akling@apple.com [Fri, 27 Jun 2014 18:06:41 +0000 (18:06 +0000)]
[ARMv7] Skip one particularly expensive fastFree() alignment check.
<https://webkit.org/b/134402>

The size class alignment check in fastFree() was crazy expensive on ARMv7
due to its use of modulo. Disabling it shaves 470ms off of PLT main thread
time in the web process.

Note that this was very hard to identify in profiles due to TCO.

Reviewed by Gavin Barraclough.

* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):

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

5 years ago[MSE] media/media-source/media-source-tracks.html is crashy
jer.noble@apple.com [Fri, 27 Jun 2014 17:50:36 +0000 (17:50 +0000)]
[MSE] media/media-source/media-source-tracks.html is crashy
https://bugs.webkit.org/show_bug.cgi?id=134385

Reviewed by Eric Carlson.

Fix the refactoring error (self assignment) introduced by r170488.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):

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

5 years agoXHR should keep attributes on instance
mhahnenberg@apple.com [Fri, 27 Jun 2014 17:49:25 +0000 (17:49 +0000)]
XHR should keep attributes on instance
https://bugs.webkit.org/show_bug.cgi?id=134363

Reviewed by Sam Weinig.

Source/WebCore:
Test: js/dom/xhr-prototype-define-property.html

Having them on the prototype broke some sites due to the fact that these DOM attributes are currently
not configurable. Once we make them configurable, we can move XHR attributes back to the prototype.

* bindings/scripts/CodeGeneratorJS.pm:
(InterfaceRequiresAttributesOnInstanceForCompatibility):

LayoutTests:
Added a new test for defining properties on XHR prototype.

* js/dom/xhr-prototype-define-property-expected.txt: Added.
* js/dom/xhr-prototype-define-property.html: Added.

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

5 years agoremoveCodedFrames should modify ref to TrackBuffer no a copy.
commit-queue@webkit.org [Fri, 27 Jun 2014 17:06:57 +0000 (17:06 +0000)]
removeCodedFrames should modify ref to TrackBuffer no a copy.
https://bugs.webkit.org/show_bug.cgi?id=134380

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-06-27
Reviewed by Daniel Bates.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::removeCodedFrames):
Iterate with a reference.

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

5 years agoSet cliprect radius unconditionally in RenderLayer.
zalan@apple.com [Fri, 27 Jun 2014 16:55:34 +0000 (16:55 +0000)]
Set cliprect radius unconditionally in RenderLayer.
https://bugs.webkit.org/show_bug.cgi?id=134396

Reviewed by Simon Fraser.

No change in functionality.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):

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

5 years ago[CSS Grid Layout] Interaction between auto-placement and column / row spanning
rego@igalia.com [Fri, 27 Jun 2014 16:41:08 +0000 (16:41 +0000)]
[CSS Grid Layout] Interaction between auto-placement and column / row spanning
https://bugs.webkit.org/show_bug.cgi?id=110633

Reviewed by Sergio Villar Senin.

Source/WebCore:
Modify auto-placement algorithm in order to support span in both
definite and automatic positions.

This patch fixes examples like:
grid-row: auto;
grid-column: 2 / span 3;

And also:
grid-row: auto;
grid-column: span 3;

Tests: fast/css-grid-layout/grid-item-auto-placement-automatic-span.html
       fast/css-grid-layout/grid-item-auto-placement-definite-span.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::isEmptyAreaEnough): New method that
checks if a grid area is or not empty.
(WebCore::RenderGrid::GridIterator::nextEmptyGridArea): Updated method
that now receives two arguments with the span value in both directions.
(WebCore::RenderGrid::ensureGridSize): Renamed from gridRow(). Adapted
method to grow in both directions at the same time if needed. It ensures
that the grid is big enough to insert a new item.
(WebCore::RenderGrid::insertItemIntoGrid): Only leave the method that
receives a GridCoordinate. It uses ensureGridSize() before inserting the
item in the grid.
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ensure that
the grid is big enough to place the largest span for auto-positioned
items.
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
New method that returns a GridCoordinate outside current grid with the
requested dimensions.
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Adapted
method to calculate the item's span and use the new version of
nextEmptyGridArea(). If an empty area is not found it uses
createEmptyGridAreaAtSpecifiedPositionsOutsideGrid() to place the item.
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Ditto.
(WebCore::RenderGrid::growGrid): Renamed to ensureGridSize().
* rendering/RenderGrid.h: Modify methods headers and add new method
signature.
* rendering/style/GridCoordinate.h:
(WebCore::GridSpan::integerSpan): Add new simple method to return the
span value of a position.
* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
Implement method to take into account span in auto-placement algorithm.
(WebCore::GridResolvedPosition::adjustGridPositionsFromStyle): Add new
checks related with named grid line spans in auto-positioned items,
which is not allowed according to the spec.
* rendering/style/GridResolvedPosition.h: Update method header.

LayoutTests:
Add new specific test cases for span in auto-placement algorithm.

* fast/css-grid-layout/grid-item-auto-placement-automatic-span-expected.txt: Added.
* fast/css-grid-layout/grid-item-auto-placement-automatic-span.html: Added.
* fast/css-grid-layout/grid-item-auto-placement-definite-span-expected.txt: Added.
* fast/css-grid-layout/grid-item-auto-placement-definite-span.html: Added.
* fast/css-grid-layout/grid-item-spanning-resolution.html: Update test
case now that span in auto-positioned items is supported.

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

5 years ago[XHR] open method must uppercase only standard method types
commit-queue@webkit.org [Fri, 27 Jun 2014 16:01:33 +0000 (16:01 +0000)]
[XHR] open method must uppercase only standard method types
https://bugs.webkit.org/show_bug.cgi?id=134264

Patch by Mahesh Kulkarni <mahesh.kk@samsung.com> on 2014-06-27
Reviewed by Darin Adler.

Source/WebCore:
As per step-5 of http://xhr.spec.whatwg.org/#the-open()-method only
DELETE, PUT, GET, POST, OPTIONS, HEAD are standard. Use other methods as is without case change.
All tests from w3c-test suite pass http://w3c-test.org/XMLHttpRequest/open-method-case-sensitive.htm.
This merges blink changes from r176592.

Tests: http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html
       http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive.html

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod):

LayoutTests:
All tests from w3c-test suite pass http://w3c-test.org/XMLHttpRequest/open-method-case-sensitive.htm.
This merges blink changes from r176592.

* http/tests/xmlhttprequest/resources/echo-request-method.php: Added.
* http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed-expected.txt: Added.
* http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html: Added.
* http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive-expected.txt: Added.
* http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive.html: Added.

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

5 years agoIncrease priority on SharedTimer source.
andre.magalhaes@collabora.co.uk [Fri, 27 Jun 2014 15:51:01 +0000 (15:51 +0000)]
Increase priority on SharedTimer source.
http://bugs.webkit.org/show_bug.cgi?id=134109

While running webkit on a Debian virtual machine I stumbled upon an issue where JS
setTimeout callbacks were not being properly invoked due to machine limitations and the
usage of a low priority on setTimeout timers.

This patch increases the SharedTimer source priority to use the default glib priority which
fixes the issue, making setTimeout JS calls work properly on the test environment.

Reviewed by Gustavo Noronha Silva.

* platform/gtk/SharedTimerGtk.cpp:
(WebCore::setSharedTimerFireInterval):

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

5 years agoRemove redundant offsetFromAncestor() call from RenderLayer::localClipRect().
zalan@apple.com [Fri, 27 Jun 2014 14:20:34 +0000 (14:20 +0000)]
Remove redundant offsetFromAncestor() call from RenderLayer::localClipRect().
https://bugs.webkit.org/show_bug.cgi?id=134378

Reviewed by Simon Fraser.

No change in functionality.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):

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

5 years ago[EFL] Remove efl-wk2 from baseline search path
m.pakula@samsung.com [Fri, 27 Jun 2014 14:00:29 +0000 (14:00 +0000)]
[EFL] Remove efl-wk2 from baseline search path
https://bugs.webkit.org/show_bug.cgi?id=134391

Reviewed by Gyuyoung Kim.

As WebKit1 EFL is removed and platform/efl and platform/efl-wk2 baselines and test expectations files
are merged efl-wk2 search path should be removed.

* Scripts/webkitpy/port/base.py:
(Port.test_expectations_file_postion): Added method to determine port test expectations file position in expectations_dict.
* Scripts/webkitpy/port/efl.py:
(EflPort._search_paths): Changed baseline search paths from efl-wk2 -> wk2 -> efl -> generic is changed to: efl -> wk2 -> generic.
(EflPort.test_expectations_file_postion): Added method to determine EFL port specific test expectation file position.
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.test_expectations_ordering): Changed constant value to one returned from test_expectations_file_postion().
* Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
(TestExpectationsTestCase.test_determine_port_from_expectations_path): Removed efl-wk2 test case.
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(TestRebaselineTest.test_baseline_directory): Changed directory name in assertion from platform/efl-wk2 to platform/efl.

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

5 years ago[GTK] 8tracks.com triggers annoying pop-up window/installation of "About protocol...
philn@webkit.org [Fri, 27 Jun 2014 11:28:20 +0000 (11:28 +0000)]
[GTK] 8tracks.com triggers annoying pop-up window/installation of "About protocol source plugin" (GStreamer?)
https://bugs.webkit.org/show_bug.cgi?id=133605

Reviewed by Carlos Garcia Campos.

Don't attempt to load blank URLs with the GStreamer media
player. Those URLs trigger the codec installer which is useless in
this scenario. This patch also renames some of the variables of
the ::load method, as suggested by Carlos.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
Check video-sink validity before disconnecting its signal handlers.
(WebCore::MediaPlayerPrivateGStreamer::load): Don't load blank
URLs (about:blank).
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
Disconnect repaint handler only if it's valid.

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

5 years ago[JavaScriptCore] FTL buildfix for EFL platform.
llango.u-szeged@partner.samsung.com [Fri, 27 Jun 2014 07:28:49 +0000 (07:28 +0000)]
[JavaScriptCore] FTL buildfix for EFL platform.
https://bugs.webkit.org/show_bug.cgi?id=133546

Reviewed by Darin Adler.

* ftl/FTLAbstractHeap.cpp:
(JSC::FTL::IndexedAbstractHeap::IndexedAbstractHeap):
* ftl/FTLLocation.cpp:
(JSC::FTL::Location::forStackmaps):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::opposite):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
* ftl/FTLStackMaps.cpp:
(JSC::FTL::StackMaps::Constant::dump):
* llvm/InitializeLLVMPOSIX.cpp:
(JSC::initializeLLVMPOSIX):

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

5 years ago[GTK] Expose getter and setter functions for attributes named type
carlosgc@webkit.org [Fri, 27 Jun 2014 07:27:28 +0000 (07:27 +0000)]
[GTK] Expose getter and setter functions for attributes named type
https://bugs.webkit.org/show_bug.cgi?id=134300

Reviewed by Martin Robinson.

We skip those because the getter conflicts with the get_type()
function of all GObjects. We should use a different name for them. As
a general rule we use the last word of the class name, something like:

  webkit_dom_blob_get_type() -> webkit_dom_blob_get_blob_type()
  webkit_dom_event_get_type() -> webkit_dom_event_get_event_type()

It's consistent with other existing DOM methods like
webkit_dom_xpath_result_get_result_type() or webkit_dom_css_value_get_css_value_type().
This patch also adds some exceptions for particular cases.

* bindings/gobject/webkitdom.symbols: Add new public symbols.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetFunctionSigName): Helper function to return the function name
that takes into account all exceptions when generating getters and
setters of attributes named type. Otherwise the name is returned unmodified.
(GenerateFunction): Use GetFunctionSigName().
(GenerateFunctions): Do not skip functions for type attributes.

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