Initialize the Event Names' strings from read only memory
https://bugs.webkit.org/show_bug.cgi?id=92435

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-07-26
Reviewed by Anders Carlsson.

Similarily to r123689, we can initialize the event names' strings from memory without copying the data.
This saves us memory and initialization time.

* dom/EventNames.cpp:
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] avoid unneeded object creation when calling Vector::append
https://bugs.webkit.org/show_bug.cgi?id=88805

Patch by Arnaud Renevier <arno@renevier.net> on 2012-07-26
Reviewed by Alexey Proskuryakov.

No new tests: no change in functionality.

* platform/gtk/ContextMenuGtk.cpp:
(WebCore::contextMenuItemVector):
* platform/gtk/KeyBindingTranslator.h:
(WebCore::KeyBindingTranslator::addPendingEditorCommand):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Regression: Global-buffer-overflow in WebCore::mediaControlElementType
https://bugs.webkit.org/show_bug.cgi?id=91333

Patch by Silvia Pfeiffer <silviapf@chromium.org> on 2012-07-26
Reviewed by Eric Seidel.

Source/WebCore:

MediaControlChromiumEnclosureElement now is a subclass of MediaControlElement, which
fixes the broken cast detected in the bug.
The displayType() of MediaControlChromiumEnclosureElement is set to 'MediaControlsPanel',
since the Panel element is sufficiently close in functionality to the Enclosure element.
By reusing this type, we do not need to introduce a Chromium-specific constant into
the generally used MediaControlElementType.

Test: accessibility/media-controls.html

* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlChromiumEnclosureElement::MediaControlChromiumEnclosureElement):
Subclass MediaControlChromiumEnclosureElement from MediaControlElement.
(WebCore::MediaControlChromiumEnclosureElement::displayType):
Give the enclosure the MediaPanels type.
* html/shadow/MediaControlRootElementChromium.h:
Add the MediaControlElement.h header file.
(MediaControlChromiumEnclosureElement):
Subclass MediaControlChromiumEnclosureElement from MediaControlElement.

LayoutTests:

This new test assures that the creation of a audio element with controls does not
break when accessibility is turned on.

* accessibility/media-controls-expected.txt: Added.
* accessibility/media-controls.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reloading substitute-data/alternate html string for unreachableURL will add an item to the back-forward-history for each reload
https://bugs.webkit.org/show_bug.cgi?id=84041

Reviewed by Brady Eidson.

Source/WebCore:

Previously, loadAlternateHTMLString:baseURL:forUnreachableURL: would insert a new history item, regardless of
the load type of the original frame load. This could cause navigation to a broken website to make back and
forward navigation difficult to use. This change ensures that a reload type makes it through all the way.

Added API test 'mac/BackForwardList.mm'.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::load): Prevent m_loadType from being overwritten early and check if it's a reload.
* loader/HistoryController.cpp:
(WebCore::HistoryController::updateForCommit): Amend check when committing the provisional item for a reload.
(WebCore::HistoryController::isReloadTypeWithProvisionalItem): Check that a reload type has a provisional item.
(WebCore):
* loader/HistoryController.h:
(HistoryController): Add prototype for isReloadTypeWithProvisionalItem.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/BackForwardList.mm: Added.
(-[BackForwardListTest webView:didFinishLoadForFrame:]):
(-[BackForwardListTest webView:didFailProvisionalLoadWithError:forFrame:]):
(TestWebKitAPI):
(TestWebKitAPI::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed rebaseline after r123790.

* platform/mac/css3/filters/effect-brightness-clamping-expected.txt: Added.
* platform/mac/css3/filters/effect-brightness-clamping-hw-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium-Android] Don't overlay scrollbars in layout test mode
https://bugs.webkit.org/show_bug.cgi?id=92419

Reviewed by Adam Barth.

No new tests. This fixes failures of existing tests, e.g. css1/box_properties/border.html and many others.

* platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
(WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars): Returns false in layout test mode.
(WebCore):
(WebCore::ScrollbarThemeChromiumAndroid::hasThumb): Returns false in layout test mode (to match pixel test expectations).
* platform/chromium/ScrollbarThemeChromiumAndroid.h:
(ScrollbarThemeChromiumAndroid):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Forms] Introduce runtime feature flags for input type datetime, datetimelocal, month, time, week
https://bugs.webkit.org/show_bug.cgi?id=92339

Reviewed by Kent Tamura.

Source/WebCore: 

To detect compilation errors and test failure earlier, I would like
build and run tests for input type datetime, datetime-local, month,
time and week with runtime feature flags to avoid behavior changes
other than test shell.

This patch adds runtime features for input types, datetime, datetime-local,
month, time and week and integrates them into InputType::createInputTypeFactoryMap
to follow runtime feature flags.

At this time, these runtime features are enabled by default for all
ports define ENABLE_INPUT_TYPE_XXX except for Chromium port other than
Android. I'll remove these #if after I update Chromium browser for
disabling them for non-Android.

No new tests. Enabling disabled tests (fast/forms/datetime, fast/forms/dattimelocal,
fast/forms/month, fast/forms/time, fast/forms/week)

* bindings/generic/RuntimeEnabledFeatures.cpp: Added initializations of
variables for runtime features of input types.
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::inputTypeDateTimeEnabled): Added.
(WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeEnabled): Added.
(WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled): Added.
(WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled): Added.
(WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled): Added.
(WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled): Added.
(WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled): Added.
(WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled): Added.
(WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled): Added.
(WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled): Added.
* html/InputType.cpp:
(WebCore::createInputTypeFactoryMap): Register input types datetime,
datetime-local, month, time and week if corresponding runtime feature
flag is enabled.
* html/InputType.h: Changed indentation to force building *InputType.cpp for
making Chromium-win bots to be happy.

Source/WebKit/chromium: 

To detect compilation errors and test failure earlier, I would like
build and run tests for input type datetime, datetime-local, month,
time and week with runtime feature flags to avoid behavior changes
on chromium browser.

This patch adds query and change functions for runtime features of
input type datetime, datetime-local, month, time and week to WebRuntimeFeatures
class for exposing DRT and chromium browser expermental flags.

* features.gypi: Turn on ENABLE_INPUT_TYPE_DATETIME, ENABLE_INPUT_TYPE_DATETIMELOCAL,
ENABLE_INPUT_TYPE_MONTH, ENABLE_INPUT_TYPE_TIME, and ENABLE_INPUT_TYPE_WEEK for all OS.
* public/WebRuntimeFeatures.h:
(WebRuntimeFeatures):
* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enableInputTypeDateTime): Added.
(WebKit::WebRuntimeFeatures::isInputTypeDateTimeEnabled): Added.
(WebKit::WebRuntimeFeatures::enableInputTypeDateTimeLocal): Added.
(WebKit::WebRuntimeFeatures::isInputTypeDateTimeLocalEnabled): Added.
(WebKit::WebRuntimeFeatures::enableInputTypeMonth): Added.
(WebKit::WebRuntimeFeatures::isInputTypeMonthEnabled): Added.
(WebKit::WebRuntimeFeatures::enableInputTypeTime): Added.
(WebKit::WebRuntimeFeatures::isInputTypeTimeEnabled): Added.
(WebKit::WebRuntimeFeatures::enableInputTypeWeek): Added.
(WebKit::WebRuntimeFeatures::isInputTypeWeekEnabled): Added.

Tools: 

This patch enables runtime features for input type datetime, datetime-local,
month, time and week for Chromium DRT.

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell): Call enableInputType{DateTime,DateTimeLocal,Month,Time,Week}.

LayoutTests: 

This patch enables tests for input type datetime, datetime-local,
month, time and week for Chromium ports.

* platform/chromium/TestExpectations: Removed disabled directives for
input type datetime, datetime-local, month, time and week.
* platform/chromium/fast/forms/datalist/input-list-expected.txt: Updated
expecations for input type datetime, datetime-local, month, time and week
to null for IDL list attribute. So far, these expectations specified
HTMLDataListElement for input type "text" as unsupported input types.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement undoscope attribute.
https://bugs.webkit.org/show_bug.cgi?id=88793

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

Source/WebCore:

undoscope attribute support as specified at
http://dvcs.w3.org/hg/undomanager/raw-file/tip/undomanager.html

Test: editing/undomanager/undoscope-attribute.html

* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* dom/Document.cpp:
(WebCore::Document::~Document):
* dom/Element.cpp:
(WebCore):
(WebCore::Element::undoScope):
(WebCore::Element::setUndoScope):
(WebCore::Element::undoManager):
(WebCore::Element::disconnectUndoManager):
(WebCore::Element::disconnectUndoManagersInSubtree):
* dom/Element.h:
(Element):
* dom/Element.idl:
* dom/ElementRareData.h:
(ElementRareData):
* editing/UndoManager.cpp:
(WebCore::UndoManager::disconnect):
(WebCore::UndoManager::transact):
(WebCore::UndoManager::undo):
(WebCore::UndoManager::redo):
(WebCore::UndoManager::clearUndo):
(WebCore):
(WebCore::UndoManager::clearRedo):
(WebCore::UndoManager::clearUndoRedo):
(WebCore::UndoManager::isConnected):
* editing/UndoManager.h:
(WebCore):
(UndoManager):
(WebCore::UndoManager::length):
* editing/UndoManager.idl:
* html/HTMLAttributeNames.in:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseAttribute):
(WebCore::HTMLElement::setContentEditable):

LayoutTests:

* editing/undomanager/undoscope-attribute-expected.txt: Added.
* editing/undomanager/undoscope-attribute.html: Added.

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