Changing pseudoClass (:link) should cause distribution
https://bugs.webkit.org/show_bug.cgi?id=101698

Reviewed by Hajime Morita.

Source/WebCore:

CSSSelector :link matches anchor element with href attribute. When href attribute of an anchor element is changed,
we have to invalidate distribution.

According to the HTML spec, :link matches a link element having href attribute, currently we have not implemented it yet.

Tests: fast/dom/shadow/pseudoclass-update-link-anchor.html
       fast/dom/shadow/pseudoclass-update-link-area.html

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):

LayoutTests:

* fast/dom/shadow/pseudoclass-update-link-anchor-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-link-anchor.html: Added.
* fast/dom/shadow/pseudoclass-update-link-area-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-link-area.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Get rid of a redundant branch in JSValueToNative()
https://bugs.webkit.org/show_bug.cgi?id=102311

Reviewed by Adam Barth.

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(JSValueToNative):
(NativeToJSValue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] We can shave one instruction off toV8Fast
https://bugs.webkit.org/show_bug.cgi?id=102297

Reviewed by Kentaro Hara.

There's no reason to store info.Holder in a local variable. Calling
Holder() is essentially free because it's inlined to an offset read.

I doubt this patch moves the performance needle in any measurable way,
but it makes the code slightly prettier.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
* bindings/scripts/test/V8/V8TestNode.h:
(WebCore::toV8Fast):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Kill $implClassName from CodeGeneratorV8.pm
https://bugs.webkit.org/show_bug.cgi?id=102312

Reviewed by Adam Barth.

$implClassName and $interfaceName are the same.
Sometimes we are passing both $implClassName and $interfaceName to
subroutines. We can kill $implClassName.

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateOpaqueRootForGC):
(GenerateHeader):
(GenerateDomainSafeFunctionGetter):
(GenerateDomainSafeFunctionSetter):
(GenerateConstructorGetter):
(GenerateNormalAttrGetter):
(GenerateReplaceableAttrSetter):
(GenerateNormalAttrSetter):
(GenerateEventListenerCallback):
(GenerateOverloadedFunctionCallback):
(GenerateFunctionCallback):
(GenerateParametersCheck):
(GenerateOverloadedConstructorCallback):
(GenerateSingleConstructorCallback):
(GenerateConstructorCallback):
(GenerateEventConstructorCallback):
(GenerateTypedArrayConstructorCallback):
(GenerateNamedConstructorCallback):
(GenerateImplementation):
(GenerateFunctionCallString):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add tests for week picker
https://bugs.webkit.org/show_bug.cgi?id=101555

Reviewed by Kent Tamura.

Adding tests for month picker.

* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/week-picker-appearance-expected.png: Added.
* platform/chromium-mac/platform/chromium/fast/forms/calendar-picker/week-picker-appearance-step-expected.png: Added.
* platform/chromium/fast/forms/calendar-picker/resources/calendar-picker-common.js:
(selectedWeek): Returns value of selected week.
* platform/chromium/fast/forms/calendar-picker/week-picker-appearance-expected.txt: Added.
* platform/chromium/fast/forms/calendar-picker/week-picker-appearance-step-expected.txt: Added.
* platform/chromium/fast/forms/calendar-picker/week-picker-appearance-step.html: Added.
* platform/chromium/fast/forms/calendar-picker/week-picker-appearance.html: Added.
* platform/chromium/fast/forms/calendar-picker/week-picker-key-operations-expected.txt: Added.
* platform/chromium/fast/forms/calendar-picker/week-picker-key-operations.html: Added.
* platform/chromium/fast/forms/calendar-picker/week-picker-mouse-operations-expected.txt: Added.
* platform/chromium/fast/forms/calendar-picker/week-picker-mouse-operations.html: Added.
* platform/chromium/TestExpectations:


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

Reviewed by Dimitri Glazkov.

Source/WebCore:

When the 'checked' state is changed, we have to invalidate distribution.

According to the HTML5 spec, :checked should match a checked input[type="checkbox"],
a checked input[type="radio"], a selected option, and commands. However, we don't have a command element yet.

Tests: fast/dom/shadow/pseudoclass-update-checked-input.html
       fast/dom/shadow/pseudoclass-update-checked-option.html

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setChecked):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::setSelectedState):

LayoutTests:

Since an option element does not create a renderer, we cannot make its test a reftest.

* fast/dom/shadow/pseudoclass-update-checked-input-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-checked-input.html: Added.
* fast/dom/shadow/pseudoclass-update-checked-option-expected.txt: Added.
* fast/dom/shadow/pseudoclass-update-checked-option.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix windows build exports (again)
https://bugs.webkit.org/show_bug.cgi?id=102324

Unreviewed windows-only build fix.

Add one more export that was causing unit tests to fail to link.


* win/WebKit2.def:
* win/WebKit2CFLite.def:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix code generator warnings.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateFunctionCallback):
(GenerateImplementation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support animation of basic shape 'polygon'
https://bugs.webkit.org/show_bug.cgi?id=102080

Reviewed by Daniel Bates.

Source/WebCore:

The basic shapes 'circle', 'rectangle' and 'ellipse' are animatable with the committed
patch http://trac.webkit.org/changeset/134352.
This is a follow-up patch to make 'polygon' animatable as well, as long as the number
of vertices between start and end polygon is the same.

Added polygon animation test to existing test:
    fast/exclusions/shape-inside/shape-inside-animation.html
    css3/masking/clip-path-animation.html

* page/animation/CSSPropertyAnimation.cpp: Forgot to add copyright with last commits.
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShape::canBlend): Polygons are allowed now.
(WebCore::BasicShapePolygon::blend): Interpolate polygon shapes.

LayoutTests:

Added animation test for basic shape 'polygon' to existing test
css3/masking/clip-path-animation.html and
fast/exclusions/shape-inside/shape-inside-animation.html.

* animations/resources/animation-test-helpers.js:
(parseBasicShape):
* css3/masking/clip-path-animation-expected.txt:
* css3/masking/clip-path-animation.html:
* fast/exclusions/shape-inside/shape-inside-animation-expected.txt:
* fast/exclusions/shape-inside/shape-inside-animation.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't use temporary clip rects when hit testing
https://bugs.webkit.org/show_bug.cgi?id=102329

Reviewed by Beth Dakin.

We now cache clip rects separately for painting, hit testing etc. Hit testing
clip rects are always shrunk to exclude scrollbars (so that hit testing on
the scrollbars works), so we no longer every need to use temporary clip rects
during hit testing.

Added an assertion that the scrollbar relevancy when we computed the clip rects
is the same as that when using them.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::updateClipRects):
* rendering/RenderLayer.h:
(WebCore::ClipRectsCache::ClipRectsCache):
(ClipRectsCache):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Rebaselined run-bindings-tests.

* bindings/scripts/test/V8/V8TestNode.h:
(WebCore::toV8Fast):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attempt to fix the Apple Windows Debug and GTK builds after <http://trac.webkit.org/changeset/134691>
(https://bugs.webkit.org/show_bug.cgi?id=96818)

.: 

Export symbols similar to the ones we added to WebCore.exp.in in
<http://trac.webkit.org/changeset/134691>.

* Source/autotools/symbols.filter:

Source/WebKit2: 

Export symbols of the form:
?deserializeBuffer@Internals@WebCore[...]
?serializeObject@Internals@WebCore[...]

* win/WebKit2.def:
* win/WebKit2CFLite.def:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled DEPS.

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-14

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Port tiled backing store
https://bugs.webkit.org/show_bug.cgi?id=71352

Patch by Ryuan Choi <ryuan.choi@gmail.com> on 2012-11-14
Reviewed by Gyuyoung Kim.

Source/WebKit/efl:

Added ewk_view_setting_tiled_backing_store_enabled_{get|set} to give possibility
to use WebCore's tiled backing store in WebKit/Efl port. This makes WebKit/Efl
compliant with WebKit's generic solution of tiled backing store.

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::invalidateRootView):
(WebCore):
(WebCore::ChromeClientEfl::visibleRectForTiledBackingStore):
* WebCoreSupport/ChromeClientEfl.h:
(ChromeClientEfl):
* ewk/ewk_frame_private.h:
Declared missing classes which used in this file.
* ewk/ewk_paint_context.cpp:
(ewk_paint_context_paint): Implemented to paint tiled backing store
* ewk/ewk_view.cpp:
(ewk_view_setting_tiled_backing_store_enabled_set):
Added API to enable/disable the WebCore's tiled backing store.
(ewk_view_setting_tiled_backing_store_enabled_get):
Added API to query if the WebCore's tiled backing store is enabled.
(ewk_view_tiled_backing_store_invalidate):
* ewk/ewk_view.h:
* ewk/ewk_view_private.h:
* ewk/ewk_view_single.cpp:
(_ewk_view_single_smart_repaints_process):
Implemented to update visible area of tiled backing store.
* tests/test_ewk_view.cpp: Added test case of ewk_view_setting_tiled_backing_store.
(TEST_F):

Tools:

* EWebLauncher/main.c: Added option to test the WebCore's tiled backing store.
(_User_Arguments):
(windowCreate):
(parseUserArguments):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r134741.
http://trac.webkit.org/changeset/134741
https://bugs.webkit.org/show_bug.cgi?id=102337

"Change is incorrect." (Requested by dydx on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-14

.:

* Source/autotools/symbols.filter:

Source/WebKit2:

* win/WebKit2.def:
* win/WebKit2CFLite.def:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Not reviewed: fixing inspector tests under Qt.

* inspector/front-end/TestController.js:
* inspector/front-end/utilities.js:
(.):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Rebaselined images.

* platform/chromium-linux/platform/chromium/fast/forms/calendar-picker/week-picker-appearance-expected.png: Added.
* platform/chromium-linux/platform/chromium/fast/forms/calendar-picker/week-picker-appearance-step-expected.png: Added.
* platform/chromium-win/platform/chromium/fast/forms/calendar-picker/week-picker-appearance-expected.png: Added.
* platform/chromium-win/platform/chromium/fast/forms/calendar-picker/week-picker-appearance-step-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r134691, r134703, r134715, r134716,
and r134733.
http://trac.webkit.org/changeset/134691
http://trac.webkit.org/changeset/134703
http://trac.webkit.org/changeset/134715
http://trac.webkit.org/changeset/134716
http://trac.webkit.org/changeset/134733
https://bugs.webkit.org/show_bug.cgi?id=102342

"Broke the Apple Windows Debug and GTK builds." (Requested by
dydx on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-14

Source/WebCore:

* WebCore.exp.in:
* bindings/js/SerializedScriptValue.h:
* testing/Internals.cpp:
* testing/Internals.h:
(WebCore):
* testing/Internals.idl:

Source/WebKit2:

* win/WebKit2.def:
* win/WebKit2CFLite.def:

LayoutTests:

* platform/chromium/fast/storage/serialized-script-value-expected.txt: Removed.
* platform/chromium/fast/storage/serialized-script-value.html: Removed.

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

Reviewed by Hajime Morita.

Source/WebCore:

We have to invalidate distribution when pseudo-class (:disabled) is changed.

According to the HTML5 spec, :disabled will match button, input, select, textarea, optgroup,
option, command, li, and fieldset. However, command is not implemented yet, we skip li and command. li might
have 'disabled' state, but we need a command element to make it 'disabled' state.

Tests: fast/dom/shadow/pseudoclass-update-disabled-button.html
       fast/dom/shadow/pseudoclass-update-disabled-fieldset.html
       fast/dom/shadow/pseudoclass-update-disabled-input.html
       fast/dom/shadow/pseudoclass-update-disabled-optgroup.html
       fast/dom/shadow/pseudoclass-update-disabled-option.html
       fast/dom/shadow/pseudoclass-update-disabled-select.html
       fast/dom/shadow/pseudoclass-update-disabled-textarea.html

* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::disabledAttributeChanged):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::parseAttribute):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::parseAttribute):

LayoutTests:

* fast/dom/shadow/pseudoclass-update-disabled-button-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-button.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-fieldset-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-fieldset.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-input-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-input.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-optgroup-expected.txt: Added.
* fast/dom/shadow/pseudoclass-update-disabled-optgroup.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-option-expected.txt: Added.
* fast/dom/shadow/pseudoclass-update-disabled-option.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-select-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-select.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-textarea-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-textarea.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor ViewportArguments to only use CSS units
https://bugs.webkit.org/show_bug.cgi?id=102287

Reviewed by Noam Rosenthal.

Refactor the ViewportArgument code to use a member method for
resolving the viewport. This new method only uses arguments in
CSS units.

This is preparation for adding the CSS Device Adaptation support.

Tested by existing tests fast/viewport.

* dom/ViewportArguments.cpp:
(WebCore::clampLengthValue):
(WebCore::clampScaleValue): New utility functions.
(WebCore::ViewportArguments::resolve):
(WebCore::convertToUserSpace): Added until everyone provides arguments
only in CSS units and not device ones.
(WebCore::computeViewportAttributes):
(WebCore::computeMinimumScaleFactorForContentContained):
(WebCore):
(WebCore::restrictMinimumScaleFactorToViewportSize):
* dom/ViewportArguments.h:
(ViewportArguments):

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