Page previews should be loaded sooner
https://bugs.webkit.org/show_bug.cgi?id=138814

Reviewed by Tim Horton.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willOpenMenu:withEvent:]):
Send -_createPreviewPopover..
(-[WKActionMenuController _previewURLFromActionMenu:]):
Relocate some logic to the new -_createPreviewPopover; gate early return on popover visibility.
(-[WKActionMenuController _createPreviewPopover]):
Renamed from -_createPreviewPopoverForURL:originRect:; explicitly send -loadView to warm up the preview view.
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add initial layout testing coverage for timer throttling
https://bugs.webkit.org/show_bug.cgi?id=138809

Reviewed by Simon Fraser.

Source/WebCore:

Add isTimerThrottled() API to Internals so that we can add layout test
coverage for timer throttling.

Tests: fast/dom/nested-timer-invisible-element-throttling.html
       fast/dom/nested-timer-visible-element-throttling.html
       fast/dom/repeating-timer-invisible-element-throttling.html
       fast/dom/repeating-timer-visible-element-throttling.html

* page/DOMTimer.h:
* testing/Internals.cpp:
(WebCore::Internals::isTimerThrottled):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Add initial layout test coverage for timer throttling. It currently
covers the following cases:
- Repeating timer changes the style of an Element that is visible
- Repeating timer changes the style of an Element that is not visible
  (i.e. "display: none").
- Repeating timer doing DOM mutations
- Nested timer changes the style of an Element that is visible
- Nested timer changes the style of an Element that is not visible
  (i.e. "display: none").
- Nested timer doing DOM mutations

More layout tests are coming. In particular, we should add coverage for
changing the style of an Element outside the viewport. We should also
Test that the timer gets unthrottled if necessary on scrolling / layout.

* fast/dom/nested-timer-invisible-element-throttling-expected.txt: Added.
* fast/dom/nested-timer-invisible-element-throttling.html: Added.
* fast/dom/nested-timer-visible-element-throttling-expected.txt: Added.
* fast/dom/nested-timer-visible-element-throttling.html: Added.
* fast/dom/repeating-timer-invisible-element-throttling-expected.txt: Added.
* fast/dom/repeating-timer-invisible-element-throttling.html: Added.
* fast/dom/repeating-timer-visible-element-throttling-expected.txt: Added.
* fast/dom/repeating-timer-visible-element-throttling.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WK1] Sometimes, missing tiles in -webkit-overflow-scrolling: touch in UIWebViews
https://bugs.webkit.org/show_bug.cgi?id=138815
rdar://problem/18746203

Reviewed by Tim Horton.

The scroll-velocity-related data members on FrameView, added in r168233, were uninitialized in UIWebViews,
so FrameView::computeCoverageRect() could return garbage results, leading to too much or too little tile coverage.

We still add additional coverage from the new inclusion of a margin area, but, for simplicity, leave that the same
between WK1 and WK2 for now.

* page/FrameView.cpp:
(WebCore::FrameView::FrameView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176240 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add parsing for :role()
https://bugs.webkit.org/show_bug.cgi?id=138310

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2014-11-17
Reviewed by Benjamin Poulain.

Source/WebCore:

Add support for parsing :role() pseudo class. The implementation of selector
matching will be in a follow-up patch.

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::detectFunctionTypeToken):
* css/CSSSelector.cpp:
(WebCore::appendPseudoClassFunctionTail):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):

LayoutTests:

* fast/css/css-selector-text-expected.txt:
* fast/css/css-selector-text.html:
* fast/css/css-set-selector-text-expected.txt:
* fast/css/css-set-selector-text.html:
* fast/selectors/invalid-functional-pseudo-class-expected.txt:
* fast/selectors/invalid-functional-pseudo-class.html:

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