RenderGrid should have a function to resolve grid position
https://bugs.webkit.org/show_bug.cgi?id=102441

Reviewed by Ojan Vafai.

The code was doing this conversion implicitly inside RenderGrid::findChildLogicalPosition.
Also note that we also provided a fallback by returning LayoutPoint() (ie the (0, 0) position
on the grid) if we couldn't handle the value. The explicit conversion is needed in order to
support render areas and add a proper grid model to RenderGrid.

No expected change in behavior.

* rendering/RenderGrid.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPosition):
Added this new function to handle the conversion. We re-use Length but should never see
a lot of the <length> values so I added some ASSERTs to enforce and catch that.

(WebCore::RenderGrid::findChildLogicalPosition):
Simplified the function now that it just use resolveGridPosition.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Expand PlatformCookieJar interface to allow for other ports
https://bugs.webkit.org/show_bug.cgi?id=102456

Reviewed by Adam Barth.

Add firstParty and cookieURL arguments to several functions to
prepare for integrating Chromium port into new PlatformCookieJar
interface.

* loader/CookieJar.cpp:
(WebCore::cookiesEnabled):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::getRawCookies):
* platform/network/PlatformCookieJar.h:
(WebCore):
* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::cookiesEnabled):
(WebCore::getRawCookies):
* platform/network/curl/CookieJarCurl.cpp:
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::cookiesEnabled):
(WebCore::getRawCookies):
* platform/network/mac/CookieJarMac.mm:
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::cookiesEnabled):
(WebCore::getRawCookies):
* platform/network/qt/CookieJarQt.cpp:
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::cookiesEnabled):
(WebCore::getRawCookies):
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::cookiesEnabled):
(WebCore::getRawCookies):
* platform/network/win/CookieJarWin.cpp:
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::cookiesEnabled):
(WebCore::getRawCookies):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Factorize the creation of primitive values with a pair into a function.
https://bugs.webkit.org/show_bug.cgi?id=102485

Reviewed by Antti Koivisto.

The pattern is already existing in various call sites inside CSSParser
and more will be added in the future (see bug 102104).

No new tests : It's a refactoring only, the tests should cover it.

* css/CSSParser.cpp:
(WebCore):
(WebCore::createPrimitiveValuePair):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillSize):
(WebCore::CSSParser::parseBorderImageRepeat):
(WebCore::CSSParser::parseBorderRadius):
(WebCore::CSSParser::parseCounter):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Changing pseudoClass (:indeterminate) should cause distribution
https://bugs.webkit.org/show_bug.cgi?id=101903

Reviewed by Dimitri Glazkov.

Source/WebCore:

<progress> and <input type="checkbox"> have 'indeterminate' state. When their state is changed, we have to
invalidate distribution if necessary. To check it, we collect a feature that :invalidate is used in select attributes.

For <input>, we also have to see 'type' is changed. According to the spec, :indeterminate should match only
progress element or <input type="checkbox">. So changing 'type' might also change :indeterminate state.

Tests: fast/dom/shadow/pseudoclass-update-indeterminate-input.html
       fast/dom/shadow/pseudoclass-update-indeterminate-progress.html

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::setIndeterminate):
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::didElementStateChange):

LayoutTests:

I've used "-webkit-appearance: none" for progress element because of Bug 102459.
It prevents from testing progress element on Windows.

* fast/dom/shadow/pseudoclass-update-indeterminate-input-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-indeterminate-input.html: Added.
* fast/dom/shadow/pseudoclass-update-indeterminate-progress-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-indeterminate-progress.html: Added.


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