AuthorShadowDOM for meter element
https://bugs.webkit.org/show_bug.cgi?id=91970

Reviewed by Hajime Morita.

Source/WebCore:

We add support for AuthorShadowDOM for a meter element.

According to the Shadow DOM spec, a meter element should behave like having a UserAgentShadowRoot and
an element in UserAgentShadowRoot draws a real 'meter' bar. In this patch, we change the inner structure
of a meter element so that we can distribute an element having RenderMeter to AuthorShadowDOM.

Before this patch, a meter element has the following inner structure.

    <meter>--UserAgentShadowRoot -- -- -- -- -- -- -- -- -- -- AuthorShadowRoot
                       |
                       +-- MeterBarElement
                       |
                       +-- MeterValueElement

After this patch, a meter element will have the following inner structure.

    <meter>--UserAgentShadowRoot -- -- -- -- -- -- -- -- -- -- AuthorShadowRoot
                       |
                       +-- MeterInnerElement
                                   |
                                   +-- MeterBarElement
                                   |
                                   +-- MeterValueElement

However, if RenderTheme supports rendering meter, MeterInnerElement will not create a renderer
unless an AuthorShadowDOM is attached to it so that we can keep the current rendering style.

Tests: fast/dom/shadow/shadowdom-for-meter-dynamic.html
       fast/dom/shadow/shadowdom-for-meter-multiple.html
       fast/dom/shadow/shadowdom-for-meter-with-style.html
       fast/dom/shadow/shadowdom-for-meter-without-appearance.html
       fast/dom/shadow/shadowdom-for-meter-without-shadow-element.html
       fast/dom/shadow/shadowdom-for-meter.html

* css/html.css:
(meter): Changed the display type. inline-box is not supported WebKit. inline-block is true.
(meter::-webkit-meter-inner-element):
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::HTMLMeterElement):
(WebCore::HTMLMeterElement::createRenderer):
(WebCore):
(WebCore::HTMLMeterElement::attach): Added didElementStateChange.
(WebCore::HTMLMeterElement::didElementStateChange):
(WebCore::HTMLMeterElement::willAddAuthorShadowRoot):
(WebCore::HTMLMeterElement::renderMeter):
(WebCore::HTMLMeterElement::createShadowSubtree):
* html/HTMLMeterElement.h:
(WebCore):
(WebCore::HTMLMeterElement::hasAuthorShadowRoot):
(HTMLMeterElement):
(WebCore::isHTMLMeterElement):
(WebCore::toHTMLMeterElement):
* html/shadow/MeterShadowElement.cpp:
(WebCore::MeterShadowElement::meterElement):
(WebCore::MeterShadowElement::rendererIsNeeded):
(WebCore):
(WebCore::MeterInnerElement::MeterInnerElement): We introduce a new element having RenderMeter
so that we can distribute an element having RenderMeter to AuthorShadowDOM.
(WebCore::MeterInnerElement::rendererIsNeeded): Different from a progress element, meter element will not be
rendered using a theme. So we don't need to check the style appearance.
(WebCore::MeterInnerElement::createRenderer):
(WebCore::MeterInnerElement::shadowPseudoId):
* html/shadow/MeterShadowElement.h:
(WebCore):
(MeterInnerElement):
(WebCore::MeterInnerElement::create):
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::RenderMeter):
(WebCore::RenderMeter::meterElement):
(WebCore):
(WebCore::RenderMeter::valueRatio):
* rendering/RenderMeter.h:
(RenderMeter):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::levelIndicatorFor):

LayoutTests:

Contains the following tests:
  (1) meter element with AuthorShadowDOM
  (2) meter element with multiple AuthorShadowDOM with a shadow element
  (3) meter element with multiple AuthorShadowDOM without a shadow element
  (4) meter element with AuthorShadowDOM with dynamic value update
  (5) meter element with AuthorShadowDOM with style
  (6) meter element with AuthorShadowDOM with -webkit-appearance: none

* fast/dom/HTMLMeterElement/meter-clone-expected.txt:
* fast/dom/HTMLMeterElement/meter-clone.html:
* fast/dom/HTMLMeterElement/meter-element-markup-expected.txt:
* fast/dom/shadow/resources/replaced-element-styles.css:
(.meter-like):
(.meter-inner-element-like):
* fast/dom/shadow/shadowdom-for-meter-dynamic-expected.html: Added.
* fast/dom/shadow/shadowdom-for-meter-dynamic.html: Added.
* fast/dom/shadow/shadowdom-for-meter-expected.html: Added.
* fast/dom/shadow/shadowdom-for-meter-multiple-expected.html: Added.
* fast/dom/shadow/shadowdom-for-meter-multiple.html: Added.
* fast/dom/shadow/shadowdom-for-meter-with-style-expected.html: Added.
* fast/dom/shadow/shadowdom-for-meter-with-style.html: Added.
* fast/dom/shadow/shadowdom-for-meter-without-appearance-expected.html: Added.
* fast/dom/shadow/shadowdom-for-meter-without-appearance.html: Added.
* fast/dom/shadow/shadowdom-for-meter-without-shadow-element-expected.html: Added.
* fast/dom/shadow/shadowdom-for-meter-without-shadow-element.html: Added.
* fast/dom/shadow/shadowdom-for-meter.html: Added.
* platform/chromium-win/fast/dom/HTMLMeterElement/meter-appearances-capacity-expected.txt:
* platform/chromium-win/fast/dom/HTMLMeterElement/meter-appearances-rating-relevancy-expected.txt:
* platform/chromium-win/fast/dom/HTMLMeterElement/meter-boundary-values-expected.txt:
* platform/chromium-win/fast/dom/HTMLMeterElement/meter-element-expected.txt:
* platform/chromium-win/fast/dom/HTMLMeterElement/meter-element-repaint-on-update-value-expected.txt:
* platform/chromium-win/fast/dom/HTMLMeterElement/meter-optimums-expected.txt:
* platform/chromium-win/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt:
* platform/chromium-win/fast/dom/HTMLMeterElement/meter-styles-expected.txt:
* platform/chromium-win/fast/dom/HTMLMeterElement/meter-writing-mode-expected.txt:
* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Refactoring] The debug version and release version of toHTMLSelectElement can be merged without any penalty
https://bugs.webkit.org/show_bug.cgi?id=94084

Reviewed by Kent Tamura.

We have two versions of toHTMLSelectElement. One has ASSERT() and the other one does not have ASSERT().
We can merge them without any penalty.

No new tests, no change in behavior.

* html/HTMLSelectElement.cpp:
* html/HTMLSelectElement.h:
(WebCore::isHTMLSelectElement):
(WebCore::toHTMLSelectElement):
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: split standalone test runner, test scanner and test stub.
https://bugs.webkit.org/show_bug.cgi?id=94001

Reviewed by Vsevolod Vlasov.

Source/WebCore:

This change starts sending loacCompleted message to the embedder.

* inspector/front-end/InspectorFrontendAPI.js:
(InspectorFrontendAPI.loadCompleted):
* inspector/front-end/test-runner.html: Added.

LayoutTests:

This change allows opening a) test runner, b) layout tests and c) inspector front-end off different
hosts. It is one more step towards extension-driven runner.

* http/tests/inspector/inspector-test.js:
* http/tests/inspector/resources/test-runner.html: Removed.
* http/tests/inspector/resources/test-scanner.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewd gardening. Readd removed expectations in r125658 with some modification.

Patch by Zoltan Arvai <zarvai@inf.u-szeged.hu> on 2012-08-15

* platform/qt/http/tests/security/aboutBlank/xss-DENIED-navigate-opener-document-write-expected.txt: Added.
* platform/qt/http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Relative units are not set when the canvas has not parent
https://bugs.webkit.org/show_bug.cgi?id=93840

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-08-15
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Set the default font when no parent style is set. It will make
possible to apply relative units when a parent is not set.

No new tests, unskipped the existing ones.

* css/StyleBuilder.cpp:
(WebCore::ApplyPropertyFontSize::applyValue):
Make it possible to apply relative units if a parent style exist but
not a parent node. It works like this for em and ex, but not for
percent units.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore):
(WebCore::CanvasRenderingContext2D::setFont):

LayoutTests:

Unskipped tests that will now pass, removed wrong expectations
and updated test case which was fixed by the W3C.

* canvas/philip/tests/2d.text.font.parse.size.percentage.default.html:
This test case was fixed on W3C upstream:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=18522
* fast/canvas/canvas-font-ex-units-crash-expected.txt:
* fast/canvas/script-tests/canvas-font-ex-units-crash.js:
* platform/chromium/TestExpectations:
* platform/chromium/canvas/philip/tests/2d.text.font.parse.size.percentage-expected.txt: Removed.
* platform/chromium/canvas/philip/tests/2d.text.font.parse.size.percentage.default-expected.txt: Removed.
* platform/efl/Skipped:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/mac/canvas/philip/tests/2d.text.font.parse.size.percentage-expected.txt: Removed.
* platform/mac/canvas/philip/tests/2d.text.font.parse.size.percentage.default-expected.txt: Removed.
* platform/qt/Skipped:

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