Plugins should not be allowed to override standard properties/attributes in non-standard worlds
<rdar://problem/11975252> and https://bugs.webkit.org/show_bug.cgi?id=92519

Reviewed by Anders Carlsson.

Source/WebCore:

Change the 3 plugin-owning element's custom bindings to prefer built-in properties if they exist.
When they do they don't give the plugin a chance to override.

Test: plugins/npruntime/overrides-all-properties.html

Add plugin custom functions to prefer built-in properties over plugin scriptable object properties:
* bindings/js/JSPluginElementFunctions.h:
(WebCore::pluginElementCustomGetOwnPropertySlot):
(WebCore::pluginElementCustomGetOwnPropertyDescriptor):

Use those new custom functions for getting properties:
* bindings/js/JSHTMLAppletElementCustom.cpp:
(WebCore::JSHTMLAppletElement::getOwnPropertySlotDelegate):
(WebCore::JSHTMLAppletElement::getOwnPropertyDescriptorDelegate):
* bindings/js/JSHTMLEmbedElementCustom.cpp:
(WebCore::JSHTMLEmbedElement::getOwnPropertySlotDelegate):
(WebCore::JSHTMLEmbedElement::getOwnPropertyDescriptorDelegate):
* bindings/js/JSHTMLObjectElementCustom.cpp:
(WebCore::JSHTMLObjectElement::getOwnPropertySlotDelegate):
(WebCore::JSHTMLObjectElement::getOwnPropertyDescriptorDelegate):

Tools:

Add a test plugin which overrides all properties it is asked about:
* DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableObjectOverridesAllProperties.cpp: Added.
(PluginScriptableObjectOverridesAllProperties):
(PluginScriptableObjectOverridesAllProperties::PluginScriptableObjectOverridesAllProperties):
(PluginObject):
(PluginScriptableObjectOverridesAllProperties::PluginObject::PluginObject):
(PluginScriptableObjectOverridesAllProperties::PluginObject::~PluginObject):
(PluginScriptableObjectOverridesAllProperties::PluginObject::hasProperty):
(PluginScriptableObjectOverridesAllProperties::PluginObject::getProperty):
(PluginScriptableObjectOverridesAllProperties::NPP_GetValue):

Expose NPN_MemAlloc to the test plugin:
* DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
(PluginTest::NPN_MemAlloc):
* DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
(PluginTest):

* DumpRenderTree/DumpRenderTree.gypi:
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
* DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:

LayoutTests:

* plugins/npruntime/overrides-all-properties-expected.txt: Added.
* plugins/npruntime/overrides-all-properties.html: Added.
* platform/chromium/TestExpectations: Test behaves different in V8, so skip on chromium

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change navigator.webkitGamepads[] to navigator.webkitGetGamepads()
https://bugs.webkit.org/show_bug.cgi?id=92533

Patch by Scott Graham <scottmg@chromium.org> on 2012-07-27
Reviewed by Adam Barth.

Source/WebCore:

Per discussion on public-webapps. Pages that enumerate navigator were
causing background resources to be created to poll hardware
unintentionally. By changing to an explicit function call, this is
avoided (and the API becomes more clear too). This change updates the
implementation to match the current ED spec.

* Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::webkitGetGamepads):
* Modules/gamepad/NavigatorGamepad.h:
(NavigatorGamepad):
* Modules/gamepad/NavigatorGamepad.idl:
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebkitGetGamepadsEnabled):
(WebCore::RuntimeEnabledFeatures::webkitGetGamepadsEnabled):

Source/WebKit/chromium:

Renames for updated access point.

* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enableGamepad):
(WebKit::WebRuntimeFeatures::isGamepadEnabled):

LayoutTests:

Updates for renamed access point.

* gamepad/gamepad-api-expected.txt:
* gamepad/gamepad-api.html:
* gamepad/gamepad-polling-access-expected.txt:
* gamepad/gamepad-polling-access.html:
* platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed perf-o-matic build fix for dashboard image generation.
Also, only show Parser/html5-full-render on the dashboard by default
so that it won't take forever to load it.

* Websites/webkit-perf.appspot.com/controller.py:
(schedule_runs_update):
(RunsChartHandler.post):
* Websites/webkit-perf.appspot.com/models.py:
(Runs.chart_params):
(DashboardImage.get_image):
* Websites/webkit-perf.appspot.com/models_unittest.py:
(RunsTest.test_chart_params_with_value):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Return 0 when network is offline
https://bugs.webkit.org/show_bug.cgi?id=92454

Patch by Gyuyoung Kim <gyuyoung.kim@samsung.com> on 2012-07-27
Reviewed by Kenneth Rohde Christiansen.

Network Info latest spec says 0 is returned when network is offline.
r123769 modified to return infinity value when network is offiline.

* platform/efl/NetworkInfoProviderEfl.cpp:
(WebCore::NetworkInfoProviderEfl::bandwidth):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
execCommand copies the backgroung-color of the enclosing element to the element being edited.
https://bugs.webkit.org/show_bug.cgi?id=91783

Patch by Sukolsak Sakshuwong <sukolsak@google.com> on 2012-07-27
Reviewed by Ryosuke Niwa.

Source/WebCore:

InsertListCommand and some other edit commands remove redundant
style properties after their DOM modification by using
StylePropertySet::removeEquivalentProperties.  However, this method
does not remove redundant background-color properties such as
"background-color: white" and "background-color: #fff" because
it compares them using cssText and thus treats them as different.
Add code to convert background colors to RGBA and then compare them.

Test: editing/style/redundant-background-color.html

* editing/EditingStyle.cpp:
(WebCore::getRGBABackgroundColor):
(WebCore):
(WebCore::getPropertiesNotIn):

LayoutTests:

This tests to make sure that WebKit removes redundant "background-color"
property after execCommand.

* editing/style/redundant-background-color-expected.txt: Added.
* editing/style/redundant-background-color.html: Added.

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