Redraw slider tick marks when datalist changes.
https://bugs.webkit.org/show_bug.cgi?id=89544

Reviewed by Kent Tamura.

Source/WebCore:

Updating the datalist should redraw the slider tick marks. This patch monitors
the id target element of the list attribute using ListAttributeTargetObserver
and notifies changes to the option element inside of a datalist element.

Test: fast/forms/datalist/update-range-with-datalist.html

* html/HTMLDataListElement.cpp:
(WebCore::HTMLDataListElement::optionElementChildrenChanged): Called when a child option element's value might have changed.
(WebCore):
* html/HTMLDataListElement.h:
(HTMLDataListElement):
* html/HTMLInputElement.cpp:
(ListAttributeTargetObserver): Inherits IdTargetObserver.
(WebCore):
(WebCore::HTMLInputElement::parseAttribute): Observe the form attribute target.
(WebCore::HTMLInputElement::insertedInto): Observe the form attribute id target.
(WebCore::HTMLInputElement::removedFrom): Remove the observer.
(WebCore::HTMLInputElement::resetListAttributeTargetObserver):
(WebCore::HTMLInputElement::listAttributeTargetChanged):
(WebCore::ListAttributeTargetObserver::create):
(WebCore::ListAttributeTargetObserver::ListAttributeTargetObserver):
(WebCore::ListAttributeTargetObserver::idTargetChanged):
* html/HTMLInputElement.h:
(WebCore):
(HTMLInputElement):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::parseAttribute): If the value attribute changed, notify the owner datalist element.
(WebCore::HTMLOptionElement::childrenChanged): If the children changed, notify the owner datalist element.
(WebCore):
(WebCore::HTMLOptionElement::ownerDataListElement): The datalist that the option element is inside of.
* html/HTMLOptionElement.h:
(WebCore):
(HTMLOptionElement):
* html/InputType.cpp:
(WebCore):
(WebCore::InputType::listAttributeTargetChanged):
* html/InputType.h:
(InputType):
* html/RangeInputType.cpp:
(WebCore):
(WebCore::RangeInputType::listAttributeTargetChanged):
* html/RangeInputType.h:
(RangeInputType):

LayoutTests:

Updating the datalist should redraw the slider tick marks.

* fast/forms/datalist/update-range-with-datalist-expected.html: Added.
* fast/forms/datalist/update-range-with-datalist.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Refactoring] Use userAgentShadowRoot() to take user agent shadow root.
https://bugs.webkit.org/show_bug.cgi?id=91716

Reviewed by Hajime Morita.

We have introduced Element::userAgentShadowRoot in r123071 to take user agent shadow root.
We have used shadow()->oldestShadowRoot() to take the user agent shadow root, however its code intention was
not so clear. Using userAgentShadowRoot() will make it clearer.

No new tests, simple refactoring.

* html/ColorInputType.cpp:
(WebCore::ColorInputType::createShadowSubtree):
(WebCore::ColorInputType::shadowColorSwatch):
* html/FileInputType.cpp:
(WebCore::FileInputType::createShadowSubtree):
(WebCore::FileInputType::multipleAttributeChanged):
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::findMainSummary):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::willAddAuthorShadowRoot):
(WebCore::HTMLImageElement::imageElement):
(WebCore::HTMLImageElement::innerElement):
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::shadowSelect):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::innerTextElement):
(WebCore::HTMLTextAreaElement::updatePlaceholderText):
* html/InputType.cpp:
(WebCore::InputType::destroyShadowSubtree):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleMouseDownEvent):
(WebCore::RangeInputType::createShadowSubtree):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createShadowSubtree):
(WebCore::TextFieldInputType::updatePlaceholderText):
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::deleteBubbleTree):
* html/shadow/SliderThumbElement.cpp:
(WebCore::sliderThumbElementOf):
(WebCore::trackLimiterElementOf):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][GTK] Complete implementation of AccessibilityController in WKTR for GTK
https://bugs.webkit.org/show_bug.cgi?id=89224

Reviewed by Chris Fleizach.

Tools:

Implement logAccessibilityEvents() and resetToConsistentState(),
so we can ask WKTR from the layout tests for logging all the
accessibility related events into the result.

* WebKitTestRunner/GNUmakefile.am:
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR::AccessibilityController::AccessibilityController):
(WTR):
(WTR::AccessibilityController::logAccessibilityEvents):
(WTR::AccessibilityController::resetToConsistentState):
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
(AccessibilityController):
* WebKitTestRunner/InjectedBundle/gtk/AccessibilityControllerGtk.cpp: Added.
(WTR):
(WTR::printAccessibilityEvent):
(WTR::axObjectEventListener):
(WTR::AccessibilityController::logAccessibilityEvents):
(WTR::AccessibilityController::resetToConsistentState):

Ensure we reset the accessibility controller to a consistent
whenever a test has finished running.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::done):

LayoutTests:

Unskip tests now passing.

* platform/gtk-wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] fast/selectors tests needs update after rebaseline and new testfonts
https://bugs.webkit.org/show_bug.cgi?id=91640

Patch by Bruno de Oliveira Abinader <bruno.abinader@basyskom.com> on 2012-07-19
Reviewed by Simon Hausmann.

After the rebaseline from changeset 121971 - [Qt] DumpRenderTree does not use
'monospace' font when directed, fast/selectors tests directory needs to be
updated.

* platform/qt-5.0/Skipped:
* platform/qt/fast/selectors/001-expected.png:
* platform/qt/fast/selectors/001-expected.txt:
* platform/qt/fast/selectors/002-expected.png:
* platform/qt/fast/selectors/002-expected.txt:
* platform/qt/fast/selectors/003-expected.png:
* platform/qt/fast/selectors/003-expected.txt:
* platform/qt/fast/selectors/004-expected.png:
* platform/qt/fast/selectors/004-expected.txt:
* platform/qt/fast/selectors/005-expected.png:
* platform/qt/fast/selectors/005-expected.txt:
* platform/qt/fast/selectors/006-expected.png:
* platform/qt/fast/selectors/006-expected.txt:
* platform/qt/fast/selectors/007a-expected.png:
* platform/qt/fast/selectors/007a-expected.txt:
* platform/qt/fast/selectors/007b-expected.png:
* platform/qt/fast/selectors/007b-expected.txt:
* platform/qt/fast/selectors/008-expected.png:
* platform/qt/fast/selectors/008-expected.txt:
* platform/qt/fast/selectors/009-expected.png:
* platform/qt/fast/selectors/009-expected.txt:
* platform/qt/fast/selectors/010-expected.png:
* platform/qt/fast/selectors/010-expected.txt:
* platform/qt/fast/selectors/011-expected.png:
* platform/qt/fast/selectors/011-expected.txt:
* platform/qt/fast/selectors/012-expected.png:
* platform/qt/fast/selectors/012-expected.txt:
* platform/qt/fast/selectors/013-expected.png:
* platform/qt/fast/selectors/013-expected.txt:
* platform/qt/fast/selectors/014-expected.png:
* platform/qt/fast/selectors/014-expected.txt:
* platform/qt/fast/selectors/015-expected.png:
* platform/qt/fast/selectors/015-expected.txt:
* platform/qt/fast/selectors/016-expected.png:
* platform/qt/fast/selectors/016-expected.txt:
* platform/qt/fast/selectors/017-expected.png:
* platform/qt/fast/selectors/017-expected.txt:
* platform/qt/fast/selectors/018-expected.png:
* platform/qt/fast/selectors/018-expected.txt:
* platform/qt/fast/selectors/018b-expected.png:
* platform/qt/fast/selectors/018b-expected.txt:
* platform/qt/fast/selectors/019-expected.png:
* platform/qt/fast/selectors/019-expected.txt:
* platform/qt/fast/selectors/020-expected.png:
* platform/qt/fast/selectors/020-expected.txt:
* platform/qt/fast/selectors/021-expected.png:
* platform/qt/fast/selectors/021-expected.txt:
* platform/qt/fast/selectors/021b-expected.png:
* platform/qt/fast/selectors/021b-expected.txt:
* platform/qt/fast/selectors/027-expected.png:
* platform/qt/fast/selectors/027-expected.txt:
* platform/qt/fast/selectors/032-expected.png:
* platform/qt/fast/selectors/032-expected.txt:
* platform/qt/fast/selectors/034-expected.png:
* platform/qt/fast/selectors/034-expected.txt:
* platform/qt/fast/selectors/038-expected.png:
* platform/qt/fast/selectors/038-expected.txt:
* platform/qt/fast/selectors/039-expected.png:
* platform/qt/fast/selectors/039-expected.txt:
* platform/qt/fast/selectors/039b-expected.png:
* platform/qt/fast/selectors/039b-expected.txt:
* platform/qt/fast/selectors/040-expected.png:
* platform/qt/fast/selectors/040-expected.txt:
* platform/qt/fast/selectors/041-expected.png:
* platform/qt/fast/selectors/041-expected.txt:
* platform/qt/fast/selectors/042-expected.png:
* platform/qt/fast/selectors/042-expected.txt:
* platform/qt/fast/selectors/043-expected.png:
* platform/qt/fast/selectors/043-expected.txt:
* platform/qt/fast/selectors/043b-expected.png:
* platform/qt/fast/selectors/043b-expected.txt:
* platform/qt/fast/selectors/044-expected.png:
* platform/qt/fast/selectors/044-expected.txt:
* platform/qt/fast/selectors/044b-expected.png:
* platform/qt/fast/selectors/044b-expected.txt:
* platform/qt/fast/selectors/044c-expected.png:
* platform/qt/fast/selectors/044c-expected.txt:
* platform/qt/fast/selectors/044d-expected.png:
* platform/qt/fast/selectors/044d-expected.txt:
* platform/qt/fast/selectors/045-expected.png:
* platform/qt/fast/selectors/045-expected.txt:
* platform/qt/fast/selectors/045b-expected.png:
* platform/qt/fast/selectors/045b-expected.txt:
* platform/qt/fast/selectors/045c-expected.png:
* platform/qt/fast/selectors/045c-expected.txt:
* platform/qt/fast/selectors/046-expected.png:
* platform/qt/fast/selectors/046-expected.txt:
* platform/qt/fast/selectors/054-expected.png:
* platform/qt/fast/selectors/054-expected.txt:
* platform/qt/fast/selectors/056-expected.png:
* platform/qt/fast/selectors/056-expected.txt:
* platform/qt/fast/selectors/058-expected.png:
* platform/qt/fast/selectors/058-expected.txt:
* platform/qt/fast/selectors/059-expected.png:
* platform/qt/fast/selectors/059-expected.txt:
* platform/qt/fast/selectors/060-expected.png:
* platform/qt/fast/selectors/060-expected.txt:
* platform/qt/fast/selectors/061-expected.png:
* platform/qt/fast/selectors/061-expected.txt:
* platform/qt/fast/selectors/062-expected.png:
* platform/qt/fast/selectors/062-expected.txt:
* platform/qt/fast/selectors/063-expected.png:
* platform/qt/fast/selectors/063-expected.txt:
* platform/qt/fast/selectors/064-expected.png:
* platform/qt/fast/selectors/064-expected.txt:
* platform/qt/fast/selectors/065-expected.png:
* platform/qt/fast/selectors/065-expected.txt:
* platform/qt/fast/selectors/066-expected.png:
* platform/qt/fast/selectors/066-expected.txt:
* platform/qt/fast/selectors/066b-expected.png:
* platform/qt/fast/selectors/066b-expected.txt:
* platform/qt/fast/selectors/072-expected.png:
* platform/qt/fast/selectors/072-expected.txt:
* platform/qt/fast/selectors/072b-expected.png:
* platform/qt/fast/selectors/072b-expected.txt:
* platform/qt/fast/selectors/077-expected.png:
* platform/qt/fast/selectors/077-expected.txt:
* platform/qt/fast/selectors/077b-expected.png:
* platform/qt/fast/selectors/077b-expected.txt:
* platform/qt/fast/selectors/078b-expected.png:
* platform/qt/fast/selectors/078b-expected.txt:
* platform/qt/fast/selectors/083-expected.png:
* platform/qt/fast/selectors/083-expected.txt:
* platform/qt/fast/selectors/087b-expected.png:
* platform/qt/fast/selectors/087b-expected.txt:
* platform/qt/fast/selectors/088b-expected.png:
* platform/qt/fast/selectors/088b-expected.txt:
* platform/qt/fast/selectors/089-expected.png:
* platform/qt/fast/selectors/089-expected.txt:
* platform/qt/fast/selectors/090b-expected.png:
* platform/qt/fast/selectors/090b-expected.txt:
* platform/qt/fast/selectors/154-expected.png:
* platform/qt/fast/selectors/154-expected.txt:
* platform/qt/fast/selectors/155-expected.png:
* platform/qt/fast/selectors/155-expected.txt:
* platform/qt/fast/selectors/155a-expected.png:
* platform/qt/fast/selectors/155a-expected.txt:
* platform/qt/fast/selectors/155b-expected.png:
* platform/qt/fast/selectors/155b-expected.txt:
* platform/qt/fast/selectors/155c-expected.png:
* platform/qt/fast/selectors/155c-expected.txt:
* platform/qt/fast/selectors/155d-expected.png:
* platform/qt/fast/selectors/155d-expected.txt:
* platform/qt/fast/selectors/156b-expected.png:
* platform/qt/fast/selectors/156b-expected.txt:
* platform/qt/fast/selectors/157-expected.png:
* platform/qt/fast/selectors/157-expected.txt:
* platform/qt/fast/selectors/158-expected.png:
* platform/qt/fast/selectors/158-expected.txt:
* platform/qt/fast/selectors/159-expected.png:
* platform/qt/fast/selectors/159-expected.txt:
* platform/qt/fast/selectors/160-expected.png:
* platform/qt/fast/selectors/160-expected.txt:
* platform/qt/fast/selectors/166-expected.png:
* platform/qt/fast/selectors/166-expected.txt:
* platform/qt/fast/selectors/166a-expected.png:
* platform/qt/fast/selectors/166a-expected.txt:
* platform/qt/fast/selectors/167-expected.png:
* platform/qt/fast/selectors/167-expected.txt:
* platform/qt/fast/selectors/167a-expected.png:
* platform/qt/fast/selectors/167a-expected.txt:
* platform/qt/fast/selectors/168-expected.png:
* platform/qt/fast/selectors/168-expected.txt:
* platform/qt/fast/selectors/168a-expected.png:
* platform/qt/fast/selectors/168a-expected.txt:
* platform/qt/fast/selectors/169-expected.png:
* platform/qt/fast/selectors/169-expected.txt:
* platform/qt/fast/selectors/169a-expected.png:
* platform/qt/fast/selectors/169a-expected.txt:
* platform/qt/fast/selectors/170-expected.png:
* platform/qt/fast/selectors/170-expected.txt:
* platform/qt/fast/selectors/170a-expected.png:
* platform/qt/fast/selectors/170a-expected.txt:
* platform/qt/fast/selectors/170b-expected.png:
* platform/qt/fast/selectors/170b-expected.txt:
* platform/qt/fast/selectors/170c-expected.png:
* platform/qt/fast/selectors/170c-expected.txt:
* platform/qt/fast/selectors/170d-expected.png:
* platform/qt/fast/selectors/170d-expected.txt:
* platform/qt/fast/selectors/175a-expected.png:
* platform/qt/fast/selectors/175a-expected.txt:
* platform/qt/fast/selectors/175b-expected.png:
* platform/qt/fast/selectors/175b-expected.txt:
* platform/qt/fast/selectors/175c-expected.png:
* platform/qt/fast/selectors/175c-expected.txt:
* platform/qt/fast/selectors/177a-expected.png:
* platform/qt/fast/selectors/177a-expected.txt:
* platform/qt/fast/selectors/177b-expected.png:
* platform/qt/fast/selectors/177b-expected.txt:
* platform/qt/fast/selectors/lang-inheritance-expected.png:
* platform/qt/fast/selectors/lang-inheritance-expected.txt:
* platform/qt/fast/selectors/lang-inheritance2-expected.png:
* platform/qt/fast/selectors/lang-inheritance2-expected.txt:
* platform/qt/fast/selectors/lang-vs-xml-lang-expected.png:
* platform/qt/fast/selectors/lang-vs-xml-lang-expected.txt:
* platform/qt/fast/selectors/lang-vs-xml-lang-xhtml-expected.png:
* platform/qt/fast/selectors/lang-vs-xml-lang-xhtml-expected.txt:
* platform/qt/fast/selectors/nondeterministic-combinators-expected.png:
* platform/qt/fast/selectors/nondeterministic-combinators-expected.txt:
* platform/qt/fast/selectors/unqualified-hover-quirks-expected.png:
* platform/qt/fast/selectors/unqualified-hover-quirks-expected.txt:
* platform/qt/fast/selectors/visited-descendant-expected.png:
* platform/qt/fast/selectors/visited-descendant-expected.txt:

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