border-radius on html does not render properly.
https://bugs.webkit.org/show_bug.cgi?id=135706

Reviewed by Simon Fraser.

Ensure that background is initialized when border-radius is present.

Source/WebCore:

Test: fast/borders/border-radius-on-html.html

* rendering/RenderView.cpp:
(WebCore::rendererObscuresBackground):

LayoutTests:

* fast/borders/border-radius-on-html-expected.html: Added.
* fast/borders/border-radius-on-html.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sometimes Gmail cannot load messages, particularly on refresh ("...the application ran into an unexpected error...")
https://bugs.webkit.org/show_bug.cgi?id=135688
<rdar://problem/17886686>

Reviewed by Maciej Stachowiak.

Fixes an issue where gmail.com may fail to load the list of messages. In particular, a SQLTransactionCallback
function may not be executed and hence Gmail will not display the list of messages and
will subsequently display an error message.

When a WebKit client defers loading of a page (e.g. -[WebView setDefersCallbacks:YES]), WebCore
may still load the main resource, say if substitute data is available for it, and defer executing
tasks, such as a SQLTransactionCallback function, by appending such tasks to the end of the list
of pending tasks for the associated Document. This list of pending tasks is never processed when
a client subsequently allows loading (e.g. -[WebView setDefersCallbacks:NO])). Therefore, we never
execute a SQLTransactionCallback function that was deferred.

Ideally WebCore would defer loading of substitute data when a WebKit client requests that loading
be deferred and hence a SQLTransactionCallback function would be deferred as a consequence of the
lack of JavaScript script execution (since substitute data wasn't loaded and hence any JavaScript
script contained in the substitute data that initiates a SQL transaction isn't executed). For now,
it's sufficient to only defer executing tasks when either there are existing pending tasks or the
active DOM objects for the document are suspended (e.g. Document::suspendActiveDOMObjects() was called).

* dom/Document.cpp:
(WebCore::Document::postTask):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Compile scrollbar pseudoclass css selectors.
https://bugs.webkit.org/show_bug.cgi?id=135242

Reviewed by Benjamin Poulain.

Source/WebCore:

Tests: scrollbars/corner-resizer-window-inactive.html
       scrollbars/scrollbar-selectors.html

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
Changed assertion because there are pseudo-elements selectors that return CannotCompileAnything now, which
make SimpleSelectorCheckers.
Add scrollbar, scrollbarPart, and document to the CheckingContext and compile scrollbar pseudo-element selectors.
* css/SelectorChecker.cpp:
(WebCore::hasScrollbarPseudoElement):
Added.  Logic moved from matchRecursively to be easier to read and to add assertions.
context.scrollbar is always non-null when dynamicPseudo is SCROLLBAR_CORNER.
(WebCore::SelectorChecker::matchRecursively):
Moved logic to hasScrollbarPseudoElement.
(WebCore::SelectorChecker::checkOne):
checkScrollbarPseudoClass accesses the document through the element now.
(WebCore::SelectorChecker::checkScrollbarPseudoClass):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
* css/SelectorCheckerTestFunctions.h:
(WebCore::scrollbarMatchesEnabledPseudoClass):
(WebCore::scrollbarMatchesDisabledPseudoClass):
(WebCore::scrollbarMatchesHoverPseudoClass):
(WebCore::scrollbarMatchesActivePseudoClass):
(WebCore::scrollbarMatchesHorizontalPseudoClass):
(WebCore::scrollbarMatchesVerticalPseudoClass):
(WebCore::scrollbarMatchesDecrementPseudoClass):
(WebCore::scrollbarMatchesIncrementPseudoClass):
(WebCore::scrollbarMatchesStartPseudoClass):
(WebCore::scrollbarMatchesEndPseudoClass):
(WebCore::scrollbarMatchesDoubleButtonPseudoClass):
(WebCore::scrollbarMatchesSingleButtonPseudoClass):
(WebCore::scrollbarMatchesNoButtonPseudoClass):
(WebCore::scrollbarMatchesCornerPresentPseudoClass):
Move scrollbar selector logic from SelectorChecker.cpp to SelectorCheckerTestFunctions.h
For window-inactive pseudo classes, we now access the document through the element instead of as a separate parameter.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorFragment::appendUnoptimizedPseudoClassWithContext):
(WebCore::SelectorCompiler::addScrollbarPseudoClassType):
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::isScrollbarPseudoElement):
(WebCore::SelectorCompiler::constructFragments):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
Call functions for unoptimized pseudo classes that require a context.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateContextFunctionCallTest):
Added.  Similar to generateElementFunctionCallTest, but the CheckingContext pointer is stored on the stack instead of a dedicated register.
* cssjit/SelectorCompiler.h:
Added scrollbar, scrollbarPart, and document to the CheckingContext.
(WebCore::SelectorCompiler::CheckingContext::document):
Added method to access the document in a way that is syntactically equal to SelectorCheckingContext.
This way, the template functions in SelectorCheckerTestFunctions.h can be compiled with both context types,
but the context types store the document differently.

LayoutTests:

* platform/wk2/TestExpectations:
Don't run corner-resizer-window-inactive-expected in WK2 because testRunner.setWindowIsKey doesn't work with WK2.
* scrollbars/corner-resizer-window-inactive-expected.html: Added.
* scrollbars/corner-resizer-window-inactive.html: Added.
* scrollbars/scrollbar-selectors-expected.txt: Added.
* scrollbars/scrollbar-selectors.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix after r172220.

* css/SelectorChecker.cpp:
(WebCore::hasScrollbarPseudoElement):
Use ASSERT_UNUSED instead of just ASSERT.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Gardening: Mark test as failing in TestExpectations until the issue can be investigated.
<https://webkit.org/b/135708>

Not reviewed.

* TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Increase width of caption container if a larger font size is selected from user prefs.
https://bugs.webkit.org/show_bug.cgi?id=135677.

Reviewed by Brent Fulgham.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
Upon creation of a VTTCueBox make sure to supply the font size set by the user prefs.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
Increase the width of the cue box based on user prefs font size selection.

* html/track/VTTCue.h:
Keep track of the font size set in the user prefs for use when the cue boxes are created.
(WebCore::VTTCueBox::setFontSizeFromCaptionUserPrefs):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):
Increase the width of the cue box based on user prefs font size selection.
(WebCore::VTTCue::getDisplayTree):
(WebCore::VTTCue::setFontSize):
If the font size set is important then we don't want to use the font size set by user prefs, set it to 0.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r172219.

Caused some /fast/workers tests to fail; will investigate
offline.

Reverted changeset:

"Sometimes Gmail cannot load messages, particularly on refresh
("...the application ran into an unexpected error...")"
https://bugs.webkit.org/show_bug.cgi?id=135688
http://trac.webkit.org/changeset/172219

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix following r172224.

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):
* html/track/VTTCue.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix attempt #2 following r172224.

* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):


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