[iOS][WK2] Align the highlight rects with device pixels
https://bugs.webkit.org/show_bug.cgi?id=133464

Source/WebCore: 

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-03
Reviewed by Enrica Casucci.

Add utility functions to pixel align points and rects.

* WebCore.exp.in:
* platform/graphics/FloatPoint.h:
(WebCore::flooredToDevicePixels):
(WebCore::ceiledToDevicePixels):
* platform/graphics/FloatRect.cpp:
(WebCore::enclosingRectExtendedToDevicePixels):
* platform/graphics/FloatRect.h:

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

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-03
Reviewed by Enrica Casucci.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _showTapHighlightWithColor:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update PlatformTimeRanges to use MediaTime rather than doubles for time values.
https://bugs.webkit.org/show_bug.cgi?id=133454

Reviewed by Eric Carlson.

Source/WebCore:
PlatformTimeRanges will now use MediaTime, so operations at the platform level won't
lose precision when converting to and from doubles and rational time values like CMTime.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::currentTimeFudgeFactor):
(WebCore::SourceBuffer::hasCurrentTime):
(WebCore::SourceBuffer::hasFutureTime):
(WebCore::SourceBuffer::canPlayThrough):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/TimeRanges.cpp:
(WebCore::TimeRanges::TimeRanges):
(WebCore::TimeRanges::start):
(WebCore::TimeRanges::end):
(WebCore::TimeRanges::add):
(WebCore::TimeRanges::contain):
(WebCore::TimeRanges::find):
(WebCore::TimeRanges::nearest):
(WebCore::TimeRanges::totalDuration):
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::seekable):
* platform/graphics/PlatformTimeRanges.cpp:
(WebCore::PlatformTimeRanges::create):
(WebCore::PlatformTimeRanges::PlatformTimeRanges):
(WebCore::PlatformTimeRanges::invert):
(WebCore::PlatformTimeRanges::start):
(WebCore::PlatformTimeRanges::end):
(WebCore::PlatformTimeRanges::add):
(WebCore::PlatformTimeRanges::contain):
(WebCore::PlatformTimeRanges::find):
(WebCore::PlatformTimeRanges::nearest):
(WebCore::PlatformTimeRanges::totalDuration):
* platform/graphics/PlatformTimeRanges.h:
(WebCore::PlatformTimeRanges::Range::Range):
(WebCore::PlatformTimeRanges::Range::isPointInRange):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered): Deleted.
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::buffered):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::buffered):
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
(WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):

LayoutTests:
Update the video-pause-immediately to allow for small floating point differences.

* media/video-pause-immediately-expected.txt:
* media/video-pause-immediately.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS JIT: add support for the "any" pseudo class
https://bugs.webkit.org/show_bug.cgi?id=133473

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

Add support for the :any pseudo class.

Source/WebCore:
Test: fast/selectors/pseudo-class-any.html

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::minimumRegisterRequirements):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesAnyPseudoClass):

LayoutTests:
* fast/selectors/pseudo-class-any-expected.txt: Added.
* fast/selectors/pseudo-class-any.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Start ignoring common bogus viewport parameters
https://bugs.webkit.org/show_bug.cgi?id=133466
<rdar://problem/16203396>

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-03
Reviewed by Sam Weinig.

Incorrect viewports are spreading really quickly lately. We have to start ignoring
some combinations of arguments as they are almost always used incorrectly, causing
a poor user experience on those websites.

* dom/ViewportArguments.cpp:
(WebCore::finalizeViewportArguments):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Corrected arm64 assertion in css jit.

Rubber stamped by Benjamin Poulain.

* cssjit/StackAllocator.h:
(WebCore::StackAllocator::pop):
Changed assertion from incorrectly matching x86_64 to using the correct minimum offset,
taking into account that a stackUnitInBytes is used for two registers on arm64
except the last stack unit, which could only be used for one register if there are
an odd number of registers.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] accessibility/textarea-selected-text-range.html is failing
https://bugs.webkit.org/show_bug.cgi?id=133479

Reviewed by Chris Fleizach.

Implement atk_text_set_caret_offset() in terms of
atk_text_set_selection() for zero-length selections.

No new tests needed, the following test should just start
passing again now: accessibility/textarea-selected-text-range.html.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextSetCaretOffset): Reimplemented this function
in terms of webkitAccessibleTextSetSelection().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor the srcset parser into its own file
https://bugs.webkit.org/show_bug.cgi?id=133480

Reviewed by Andreas Kling.

No new tests, since this patch doesn't change the parser's behavior.

This patch moves the srcset parser into its own file,
in order to prepare the code for alignment with recent spec changes.

* CMakeLists.txt:
* html/HTMLImageElement.cpp:
* html/parser/HTMLParserIdioms.cpp:
(WebCore::compareByScaleFactor): Deleted.
(WebCore::parseDescriptors): Deleted.
(WebCore::parseImagesWithScaleFromSrcsetAttribute): Deleted.
(WebCore::bestFitSourceForImageAttributes): Deleted.
* html/parser/HTMLParserIdioms.h:
(WebCore::ImageWithScale::ImageWithScale): Deleted.
(WebCore::ImageWithScale::imageURL): Deleted.
(WebCore::ImageWithScale::scaleFactor): Deleted.
* html/parser/HTMLPreloadScanner.cpp:
* html/parser/HTMLSrcsetParser.cpp: Added.
(WebCore::compareByScaleFactor):
(WebCore::parseDescriptors):
(WebCore::parseImagesWithScaleFromSrcsetAttribute):
(WebCore::bestFitSourceForImageAttributes):
* html/parser/HTMLSrcsetParser.h: Added.
(WebCore::ImageWithScale::ImageWithScale):
(WebCore::ImageWithScale::imageURL):
(WebCore::ImageWithScale::scaleFactor):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add myself (yoav@yoav.ws) to contributors.json

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