REGRESSION: Web Inspector: Legacy toolbar has two different colors in unfocused windowed mode
https://bugs.webkit.org/show_bug.cgi?id=136289

Reviewed by Darin Adler.

* UserInterface/Views/Toolbar.css:
(body.mac-platform.legacy .toolbar): Override the background-color as transparent. Non-legacy
uses a solid color instead of a gradient for window-inactive.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update the CSS Grammar selector names to get closer to the latest terminology
https://bugs.webkit.org/show_bug.cgi?id=136277

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-08-27
Reviewed by Andreas Kling.

CSS Selector Level 4 gives useful definitions for various parts of a selector
(see http://dev.w3.org/csswg/selectors4/#structure). This patch updates our names to be closer
to that spec.

Stricto sensu, our definition of "simple selector list" is wrong. I did not attempt to fix this
because updates of CSS Selector Level 4 and WebVTT will eventually make that whole concept useless.

* css/CSSGrammar.y.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Updating attributes on HTML elements do not invalidate the style correctly unless the attribute name is lowercase in the stylesheet
https://bugs.webkit.org/show_bug.cgi?id=136270
Source/WebCore:


Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-08-27
Reviewed by Andreas Kling.

In HTML, WebKit treats every attribute name lowercase to implement case-insensitive matching.
When invalidating style, the StyleResolver was ignoring HTML and always using the XML names.

This patch split the names on RuleFeatureSet in two sets: one for XML, one for HTML.
In StyleResolver, the name used depends on the type of the element being updated.

This patch also adds nodeNeedsStyleRecalc() to Internals to test the optimization and various cases
of style update.

Tests: fast/css/attribute-for-content-property-style-update-html.html
       fast/css/attribute-for-content-property-style-update-xhtml.xhtml
       fast/css/attribute-style-invalidation-optimization-html.html
       fast/css/attribute-style-invalidation-optimization-xhtml.xhtml
       fast/css/attribute-style-update-html.html
       fast/selectors/attribute-style-update-html.html
       fast/selectors/attribute-style-update-svg-in-html.html
       fast/selectors/attribute-style-update-xhtml.xhtml

* css/RuleFeature.cpp:
(WebCore::RuleFeatureSet::collectFeaturesFromSelector):
(WebCore::RuleFeatureSet::add):
(WebCore::RuleFeatureSet::clear):
* css/RuleFeature.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* css/StyleResolver.h:
(WebCore::StyleResolver::hasSelectorForAttribute):
* dom/Element.cpp:
(WebCore::Element::willModifyAttribute):
* testing/Internals.cpp:
(WebCore::Internals::address):
(WebCore::Internals::nodeNeedsStyleRecalc):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

rdar://problem/16190617

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-08-27
Reviewed by Andreas Kling.

The test coverage for attribute update was abysmal. This adds the basic cases for HTML and XML.

* fast/css/attribute-for-content-property-style-update-html-expected.html: Added.
* fast/css/attribute-for-content-property-style-update-html.html: Added.
* fast/css/attribute-for-content-property-style-update-xhtml-expected.html: Added.
* fast/css/attribute-for-content-property-style-update-xhtml.xhtml: Added.
* fast/css/attribute-style-invalidation-optimization-html-expected.txt: Added.
* fast/css/attribute-style-invalidation-optimization-html.html: Added.
* fast/css/attribute-style-invalidation-optimization-xhtml-expected.txt: Added.
* fast/css/attribute-style-invalidation-optimization-xhtml.xhtml: Added.
* fast/css/attribute-style-update-html-expected.html: Added.
* fast/css/attribute-style-update-html.html: Added.
* fast/selectors/attribute-style-update-html-expected.txt: Added.
* fast/selectors/attribute-style-update-html.html: Added.
* fast/selectors/attribute-style-update-svg-in-html-expected.txt: Added.
* fast/selectors/attribute-style-update-svg-in-html.html: Added.
* fast/selectors/attribute-style-update-xhtml-expected.txt: Added.
* fast/selectors/attribute-style-update-xhtml.xhtml: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Link error.
https://bugs.webkit.org/show_bug.cgi?id=136286

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-08-27
Reviewed by Darin Adler.

Link with the dynamic runtime libraries, since the WinCairo libraries link with these.

* win/tools/vsprops/common.props:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
overflow:scroll elements should not latch to the body if the body is 
overflow:hidden
https://bugs.webkit.org/show_bug.cgi?id=136273

Reviewed by Darin Adler.

Source/WebCore:

This patch adds an optional parameter to isScrollable(). The Scrollability 
parameter that allows the caller to define what they mean by 'scrollable.' Most 
callers are interested in the default value, Scrollability::Scrollable, which 
means that there is actually content to scroll to, and a scrollbar that will allow 
you to access it. In some cases, such as this latching case, callers want to know 
if the FrameView is allowed to rubber-band, which the main frame might be allowed 
to do even if there is no content to scroll to. In that case, callers use 
Scrollability::ScrollableOrRubberbandable.
* page/FrameView.cpp:
(WebCore::FrameView::isScrollable):
(WebCore::FrameView::hasScrollableOrRubberbandableAncestor):

New virtual function on ScrollableArea answers whether a ScrollableArea has any 
scrollable or rubber-bandable ancestor.
* page/FrameView.h:
* platform/ScrollableArea.h:

Events should only be allowed to prevent stretching if there is some ancestor 
ScrollableArea that will be able to make use of the event. 
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::allowsVerticalStretching):
(WebCore::ScrollAnimatorMac::allowsHorizontalStretching):

New ScrollableArea virtual function.
* platform/win/PopupMenuWin.h:

New RenderBox isScrollableOrRubberbandable() returns just 
canBeScrolledAndHasScrollableArea() for most RenderBox, but will be overridden by 
RenderView.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::isScrollableOrRubberbandable):
* rendering/RenderBox.h:

Recurse up the parent chain to find out if anything is scrollable or just rubber-
bandable.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
* rendering/RenderLayer.h:

Call into RenderLayer.
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::hasScrollableOrRubberbandableAncestor):
* rendering/RenderListBox.h:

Override isScrollableOrRubberbandable() to handle the main frame case where the 
main frame is typically allowed to rubber-band even if there is no content to 
scroll to.
* rendering/RenderView.cpp:
(WebCore::RenderView::isScrollableOrRubberbandable):
* rendering/RenderView.h:

Source/WebKit2:

New ScrollabeArea virtual function.
* WebProcess/Plugins/PDF/PDFPlugin.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Layout issues for popover on not legacy OS
https://bugs.webkit.org/show_bug.cgi?id=136268

Patch by Saam Barati <sbarati@apple.com> on 2014-08-27
Reviewed by Joseph Pecoraro.

On the latest OS, popovers invade the title bar's space which will
cause layout issues because the title bar will render above
the popover. Fix this by providing some padding for popovers on
not legacy OSs.

* UserInterface/Views/Popover.js:

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