Remove FIXME comments refering to non-existent code in JSDOMBinding.cpp
https://bugs.webkit.org/show_bug.cgi?id=97977

Reviewed by Adam Barth.

I did a quick grep through the code to determine where these FIXME
comments were suggesting that code should be merged. So far as I can
tell, 'immediatelyReportUnsafeAccessTo' only exists in these comments.

Just cleanup, no functional change.

* bindings/js/JSDOMBinding.cpp:
(WebCore::shouldAllowAccessToFrame):
(WebCore::shouldAllowAccessToDOMWindow):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129995 268f45cc-cd09-0410-ab3c-d52691b4dbfc
444kB below CSSParser::parseDeprecatedGradient() on Membuster3.
<http://webkit.org/b/97981>
<rdar://problem/12403058>

Reviewed by Anders Carlsson.

Slap an inline capacity of 2 on the Vector<CSSGradientColorStop> in CSSGradientValue.
This covers the majority of gradient values, and reduces memory consumption by ~250kB on Membuster3.

* css/CSSGradientValue.h:
(WebCore::CSSGradientValue::stopCount):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseLinearGradient):
(WebCore::CSSParser::parseGradientColorStops):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129996 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean up HasTrivialConstructor/Destructor
https://bugs.webkit.org/show_bug.cgi?id=97754

Reviewed by Sam Weinig.

Mixed up the HasTrivialDestructor/Constructor case for VS2010 and later in the previous patch.

* wtf/TypeTraits.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Split EventTargetData out of NodeRareData to reduce memory use.
<http://webkit.org/b/97987>
<rdar://problem/12403258>

Reviewed by Anders Carlsson.

Move EventTargetData to its own Node-flag/hashmap instead of piggybacking on NodeRareData.
This reduces memory consumption by 1.06MB on Membuster3. Note that NodeRareData shrinks by
one pointer as well.

* dom/Node.cpp:
(WebCore::Node::~Node):
(WebCore::eventTargetDataMap):
(WebCore::Node::eventTargetData):
(WebCore::Node::ensureEventTargetData):
(WebCore::Node::clearEventTargetData):
(WebCore::Node::handleLocalEvents):
* dom/Node.h:
(WebCore::Node::hasEventTargetData):
(WebCore::Node::setHasEventTargetData):
* dom/NodeRareData.h:
(NodeRareData):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add a test to verify that a plugin does not receive touch-events unless it explicitly requests for them
https://bugs.webkit.org/show_bug.cgi?id=97975

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-09-30
Reviewed by Adam Barth.

Tools:

TestWebPlugin can now be configured to accept touch events or not. Use this
configurability to verify that a plugin does not receive touch events unless
it explicitly requests for them.

* DumpRenderTree/chromium/TestWebPlugin.cpp:
(TestWebPlugin::TestWebPlugin):
(TestWebPlugin::initialize):
(TestWebPlugin::parseBoolean):
* DumpRenderTree/chromium/TestWebPlugin.h:
(TestWebPlugin):

LayoutTests:

* platform/chromium/plugins/touch-events-expected.txt: Added.
* platform/chromium/plugins/touch-events.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Adding myself as a committer.

* Scripts/webkitpy/common/config/committers.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Trivial test fix after r127534.
https://bugs.webkit.org/show_bug.cgi?id=95813

Patch by Sergey Glazunov <serg.glazunov@gmail.com> on 2012-09-30
Reviewed by Kentaro Hara.

* fast/innerHTML/innerHTML-iframe-expected.txt:
* fast/innerHTML/innerHTML-iframe.html:
* platform/chromium/TestExpectations:
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Modifications in a shadow tree don't update the Elements panel.
https://bugs.webkit.org/show_bug.cgi?id=97056

Reviewed by Pavel Feldman.

Source/WebCore:

Send characterDataModified event for shadow dom nodes too so they update the elements panel.

Test: inspector/elements/shadow-dom-modify-chardata.html

* dom/CharacterData.cpp:
(WebCore::CharacterData::dispatchModifiedEvent):

LayoutTests:

* inspector/elements/shadow-dom-modify-chardata-expected.txt: Added.
* inspector/elements/shadow-dom-modify-chardata.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make multiple fields date/time input UI related files to available all ports
https://bugs.webkit.org/show_bug.cgi?id=97989

Reviewed by Kent Tamura.

This patch adds multiple fields date/time input UI related files for
ports not using WebCore.gyp and simplifies include directive in
MonthInputType.h and TimeInputType.h.

Added files are:
  - html/BaseMultipleFieldsDateAndTimeInputType.{cpp,h}
  - html/shadow/DateTimeEditElement.{cpp,h}
  - html/shadow/DateTimeFieldElement.{cpp,h}
  - html/shadow/DateTimeFieldElements.{cpp,h}
  - html/shadow/DateTimeNumericFieldElement.{cpp,h}
  - html/shadow/DateTimeSymbolicFieldElement.{cpp,h}

No new tests. This patch doesn't change behavior.

* CMakeLists.txt: Changed to add multiple fields date/time input UI related files.
* GNUmakefile.list.am: ditto
* Target.pri: ditto
* WebCore.vcproj/WebCore.vcproj: ditto
* WebCore.xcodeproj/project.pbxproj: ditto
* html/MonthInputType.h: Changed to simplify include directive for base class.
* html/TimeInputType.h: ditto

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=97988
Crash on FrameTree::scopedChildCount()

Reviewed by Kent Tamura.

The series of crash reports says that there are some null pointer
access in scopedChildCount(). This change added a null guard
against Frame::document(), that can return null.

No new tests. This is tied to some specific timing and is hard to reproduce.

* page/FrameTree.cpp:
(WebCore::FrameTree::scopedChildCount):
(WebCore::FrameTree::scopedChild):
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sign in front of keyframe selector causes stylesheet parsing to abort
https://bugs.webkit.org/show_bug.cgi?id=96844

Patch by Glenn Adams <glenn@skynav.com> on 2012-09-30
Reviewed by Simon Fraser.

Source/WebCore:

Allow optional unary operator (+|-) on PERCENTAGE in keyframe selector.

Test: animations/keyframe-selector-negative-percentage.html

* css/CSSGrammar.y:
Add maybe_unary_operator to PERCENTAGE on keyframe selector. Negative keyframe
selector value is already ignored in StyleKeyframe::parseKeyString.

LayoutTests:

Add test case for correct handling of negative percentage in keyframe selector.

* animations/keyframe-selector-negative-percentage-expected.txt: Added.
* animations/keyframe-selector-negative-percentage.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r127727): Calendar picker is ignoring step
https://bugs.webkit.org/show_bug.cgi?id=97893

Reviewed by Kent Tamura.

Source/WebCore:

There were two mistakes:
- An if-statement to check step attribute validity was wrong, and
- DateTiemChooserParameters.step was milleseconds when it should be number of days.
This will be changing the DateTimeChooserParameters.step to milliseconds so we can handle steps for other input types in the future.

Test: fast/forms/date/calendar-picker-appearance-with-step.html

* Resources/pagepopups/calendarPicker.js:
(CalendarPicker):
* html/shadow/CalendarPickerElement.cpp:
(WebCore::CalendarPickerElement::openPopup): If statement was wrong.

LayoutTests:

* fast/forms/date/calendar-picker-appearance-with-step-expected.txt: Added.
* fast/forms/date/calendar-picker-appearance-with-step.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130008 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r130004.
http://trac.webkit.org/changeset/130004
https://bugs.webkit.org/show_bug.cgi?id=97996

Test shadow-dom-modify-chardata.html is failing (Requested by
keishi on #webkit).

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

Source/WebCore:

* dom/CharacterData.cpp:
(WebCore::CharacterData::dispatchModifiedEvent):

LayoutTests:

* inspector/elements/shadow-dom-modify-chardata-expected.txt: Removed.
* inspector/elements/shadow-dom-modify-chardata.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add appearance tests for multiple fields month input UI
https://bugs.webkit.org/show_bug.cgi?id=97888

Reviewed by Kent Tamura.

This patch adds tests for multiple fields month input UI and disables
these tests on ports which don't enable both ENABLE_INPUT_TYPE_MONTH
and ENABLE_INPUT_MULTIPLE_FIELDS_UI.

Note: We need to do rebaseline tests to update images for Chromium-Mac
and Chromium-Win.

Note: This patch affects ports which enable both ENABLE_INPUT_TYPE_MONTH
and ENABLE_INPUT_MULTIPLE_FIELDS_UI.

* fast/forms/month-multiple-fields/month-multiple-fields-appearance-basic-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-appearance-basic.html:  Added for checking basic appearance.
* fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes.html: Added for checking appearance of applying CSS pseudo classes, e.g. :enabled, :invalid, and so on.
* fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements.html: Added for checking appearance of applying CSS pseudo elements, e.g. :after, :before, and so on.
* fast/forms/month-multiple-fields/month-multiple-fields-appearance-style-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-appearance-style.html: Added for checking appearance of applying CSS styles
* platform/chromium-android/TestExpectations: Changed to disable tests for multiple fields month input UI.
* platform/chromium-linux/fast/forms/month-multiple-fields/month-multiple-fields-appearance-basic-expected.png: Added.
* platform/chromium-linux/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-classes-expected.png: Added.
* platform/chromium-linux/fast/forms/month-multiple-fields/month-multiple-fields-appearance-pseudo-elements-expected.png: Added.
* platform/chromium-linux/fast/forms/month-multiple-fields/month-multiple-fields-appearance-style-expected.png: Added.
* platform/chromium/TestExpectations: Changed to disable tests for multiple fields month input UI of Mac and Win for rebaseline.
* platform/efl/TestExpectations: Changed to disable tests for multiple fields month input UI.
* platform/gtk/TestExpectations: ditto
* platform/mac/TestExpectations: ditto
* platform/qt/TestExpectations: ditto
* platform/win/TestExpectations: ditto

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove overzealous assert in SVGElement::localAttributeToPropertyMap
https://bugs.webkit.org/show_bug.cgi?id=97291

Reviewed by Nikolas Zimmermann.

This patch removes an assert where we did not expect
SVGElement::localAttributeToPropertyMap where we did not to be called. This
function turns out to be useful and this patch removes that assert.

If we encounter a non-SVG tag during SVG parsing (e.g. <svg><price></svg>) we return a
vanilla SVGElement instance from SVGElementFactory::createSVGElement. Previously,
trying to animate this would ASSERT because it was not possible to determine the
animated type. After this patch, an empty localAttributeToPropertyMap is used so
that the animated type returned from SVGAnimateElement::determineAnimatedPropertyType
is AnimatedUnknown.

This patch simply removes an ASSERT so no test is provided.

* svg/SVGElement.cpp:
(WebCore::SVGElement::localAttributeToPropertyMap):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Unskip fast/innerHTML/innerHTML-iframe.html after r130003.

* platform/efl/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Fix GTK+ build after r129908.

* GNUmakefile.list.am: Add new files to compilation.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused sys/mman.h include
https://bugs.webkit.org/show_bug.cgi?id=97995

Patch by Jonathan Liu <net147@gmail.com> on 2012-10-01
Reviewed by Kentaro Hara.

The sys/mman.h is not used and removing it improves portability as not
all systems have sys/mman.h.

* jit/ExecutableAllocatorFixedVMPool.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Device Metrics] Remove the gutter overlay moving its functionality into the InspectorOverlay
https://bugs.webkit.org/show_bug.cgi?id=97799

Reviewed by Pavel Feldman.

Source/WebCore:

Re-applying r129746 with test flakiness fixed.

In order to reduce the amount of port-specific code, the gutter overlay painted in the device metrics emulation mode
has been replaced by the respective functionality in the HTML-based InspectorOverlay in WebCore. The InspectorOverlay
now covers the entire WebView rather than the FrameView only.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::webViewResized):
(WebCore):
* inspector/InspectorController.h:
(WebCore):
(InspectorController):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::InspectorOverlay):
(WebCore::InspectorOverlay::paint):
(WebCore::InspectorOverlay::resize):
(WebCore):
(WebCore::InspectorOverlay::update):
(WebCore::InspectorOverlay::drawGutter):
(WebCore::InspectorOverlay::reset):
* inspector/InspectorOverlay.h:
(InspectorOverlay):
* inspector/InspectorOverlayPage.html: Introduce the gutter painting functionality previously found in the Chromium's
DeviceMetricsSupport class, which used to implement WebPageOverlay.

Source/WebKit/chromium:

- Dispatch the webViewResized() event on InspectorController, which is necessary to update the InspectorOverlay.
- Remove the gutter overlay painting code.

* src/WebDevToolsAgentImpl.cpp:
(WebKit::DeviceMetricsSupport::DeviceMetricsSupport):
(WebKit::DeviceMetricsSupport::~DeviceMetricsSupport):
(WebKit::WebDevToolsAgentImpl::attach):
(WebKit::WebDevToolsAgentImpl::webViewResized):
(WebKit::WebDevToolsAgentImpl::overrideDeviceMetrics):
* src/WebDevToolsAgentImpl.h:
(WebDevToolsAgentImpl):
* src/WebDevToolsAgentPrivate.h:
(WebDevToolsAgentPrivate):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::resize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Separate CSSStyleModelResourceBinding into resource and content binding.
https://bugs.webkit.org/show_bug.cgi?id=97994

Reviewed by Pavel Feldman.

Extracted StyleContentBinding from CSSStyleModelResourceBinding.
Now CSSStyleModelResourceBinding is responsible for mapping between stylesheets and resources.
StyleContentBinding is now responsible for synchronization between stylesheet content and uiSourceCode content.

* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModelResourceBinding):
(WebInspector.CSSStyleModelResourceBinding.prototype.requestStyleSheetIdForResource):
(WebInspector.CSSStyleModelResourceBinding.prototype.requestResourceURLForStyleSheetId):
* inspector/front-end/StyleSource.js:
(WebInspector.StyleSource.prototype._commitIncrementalEdit):
* inspector/front-end/StylesSourceMapping.js:
(WebInspector.StyleContentBinding):
(WebInspector.StyleContentBinding.prototype.setStyleContent.callback):
(WebInspector.StyleContentBinding.prototype.setStyleContent):
(WebInspector.StyleContentBinding.prototype._innerSetContent.callback):
(WebInspector.StyleContentBinding.prototype._innerSetContent):
(WebInspector.StyleContentBinding.prototype._styleSheetChanged.callback):
(WebInspector.StyleContentBinding.prototype._styleSheetChanged):
(WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged):
* inspector/front-end/inspector.js:

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