[Forms] Move multiple fields related functions to BaseDateAndTimeInputType from TimeInputType
https://bugs.webkit.org/show_bug.cgi?id=97521

Reviewed by Kent Tamura.

This patch introduces new class BaseMultipleFieldsDateAndTimeInputType
for sharing code among multiple fields date/time input UI.

Member functions in BaseMultipleFieldsDateAndTimeInputType are moved
from TimeInputType. BaseMultipleFieldsDateAndTimeInputType.{cpp,h}
were copied from TimeInputType.{cpp,h} by r129721.

This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
ENABLE_INPUT_MULTIPLE_FIELDS_UI.

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

* WebCore.gypi: Changed to have html/BaseMultipleFieldsDateAndTimeInputType.{cpp,h}
* html/BaseDateAndTimeInputType.h:
(BaseDateAndTimeInputType): Exposed setMillisecondToDateComponents as protected for BaseMultipleFieldsDateAndTimeInputType::restoreFormControlState().
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::DateTimeEditControlOwnerImpl::DateTimeEditControlOwnerImpl): Moved from TimeInputType::DateTimeEditControlOwnerImpl.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::DateTimeEditControlOwnerImpl::~DateTimeEditControlOwnerImpl): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::DateTimeEditControlOwnerImpl::didBlurFromControl): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::DateTimeEditControlOwnerImpl::didFocusOnControl): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::DateTimeEditControlOwnerImpl::editControlValueChanged): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::DateTimeEditControlOwnerImpl::formatDateTimeFieldsState): Moved from TimeInputType::DateTimeEditControlOwnerImpl and changed to call formatDateTimeFieldsState() in BaseMultipleFieldsDateAndTimeInputTypeInputType class.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::hasCustomFocusLogic): Moved from TimeInputType.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::DateTimeEditControlOwnerImpl::isEditControlOwnerDisabled): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::DateTimeEditControlOwnerImpl::isEditControlOwnerReadOnly): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::~BaseMultipleFieldsDateAndTimeInputType): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::blur): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::createRenderer): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::destroyShadowSubtree): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::focus): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::forwardEvent): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::disabledAttributeChanged): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::isKeyboardFocusable): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::isMouseFocusable): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::minOrMaxAttributeChanged): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::readonlyAttributeChanged): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::isTextField): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::restoreFormControlState): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::saveFormControlState): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::setValue): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldUseInputMethod): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::stepAttributeChanged): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue): Moved from TimeInputType and changed to call setupLayoutParameters() to set date/time format by each input type.
* html/BaseMultipleFieldsDateAndTimeInputType.h:
(BaseMultipleFieldsDateAndTimeInputType): Added.
(DateTimeEditControlOwnerImpl): Moved from TimeInputType.
* html/TimeInputType.cpp: Moved multiple fields UI related functions to BaseMultipleFieldsDateAndTimeInputType.
(WebCore::TimeInputType::TimeInputType): Changed base class name to BaseTimeInput.
(WebCore::TimeInputType::formatDateTimeFieldsState): Moved from TimeINput::DateTImeEditControlOwnerImpl class.
(WebCore::TimeInputType::setupLayoutParameters): Added for set time format.
* html/TimeInputType.h:
(TimeInputType): Chaned base class to BaseTimeInput which is alias of BaseDateAndTimeInputType or BaseMultipleFieldsDateAndTimeInputType.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Allow denormal floats in ARM VFP
https://bugs.webkit.org/show_bug.cgi?id=97008

Patch by Cosmin Truta <ctruta@rim.com> on 2012-09-26
Reviewed by Filip Pizlo.
Reviewed internally by Yong Li.

Cleared the Flush-to-Zero flag in the ARM FPSCR register on QNX.

* wtf/ThreadingPthreads.cpp:
(WTF::enableIEEE754Denormal): Added.
(WTF::initializeThreading):
(WTF::initializeCurrentThreadInternal):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix for !USE(ICU_UNICODE) after r129662.

Convert LChar to UChar so we can call the existing function until the
other TextBreakIterator implemenations provide an overload for LChar.

* platform/text/TextBreakIterator.cpp:
(WebCore):
(WebCore::acquireLineBreakIterator):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WINCE] Enable JIT by default

* Source/cmake/OptionsWinCE.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions]Refactor RenderFlowThread::contentLogical(Width/Height/Left)OfFirstRegion
https://bugs.webkit.org/show_bug.cgi?id=97577

Reviewed by Andreas Kling.

RenderFlowThread methods contentLogicalWidthOfFirstRegion, contentLogicalHeightOfFirstRegion, contentLogicalLeftOfFirstRegion
were using code to get the first valid region associated with the flow. We can use RenderFlowThread::firstRegion() method instead.

No new tests as this is just refactoring of existing code, the change is covered by existing regions tests.

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::contentLogicalWidthOfFirstRegion):
(WebCore::RenderFlowThread::contentLogicalHeightOfFirstRegion):
(WebCore):
(WebCore::RenderFlowThread::contentLogicalLeftOfFirstRegion):
(WebCore::RenderFlowThread::firstRegion):
(WebCore::RenderFlowThread::lastRegion):
(WebCore::RenderFlowThread::computeOverflowStateForRegions):
(WebCore::RenderFlowThread::objectInFlowRegion):
(WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: expose debug memory instrumentation debug data through the protocol
https://bugs.webkit.org/show_bug.cgi?id=97683

Reviewed by Pavel Feldman.

Memory.getProcessMemoryDistribution command now returns number of instrumented
objects that were found and the number of the objects that were counted by
the instrumentation but were not actually allocated by the memory allocator.
These numbers are only added to the response if embedder provides access to the
set of all live heap objects. These numbers are intended to be used for testing
memory instrumentation.

* inspector/InspectorMemoryAgent.cpp:
(WebCore::collectDomTreeInfo):
* inspector/MemoryInstrumentationImpl.cpp:
(WebCore::MemoryInstrumentationImpl::MemoryInstrumentationImpl):
(WebCore::MemoryInstrumentationImpl::checkCountedObject):
* inspector/MemoryInstrumentationImpl.h:
(WebCore::MemoryInstrumentationImpl::checkInstrumentedObjects):
(WebCore::MemoryInstrumentationImpl::totalCountedObjects):
(WebCore::MemoryInstrumentationImpl::totalObjectsNotInAllocatedSet):
(MemoryInstrumentationImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129734 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] fast/layers/video-layer.html needs rebaselining after r129687
https://bugs.webkit.org/show_bug.cgi?id=97764

Unreviewed EFL gardening.

Rebaseline fast/layers/video-layer.html due to r129687. The volume
button is no longer shown for that test.

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-27

* platform/efl/fast/layers/video-layer-expected.png:
* platform/efl/fast/layers/video-layer-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMake] Fix build with static JavaScriptCore library

* shell/CMakeLists.txt: Define STATICALLY_LINKED_WITH_JavaScriptCore if
                        JavaScriptCore_LIBRARY_TYPE is set to STATIC.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Follow-up to r129723 to once more allow parsing of scoped names in IDL files.

Patch by Takashi Sakamoto <tasak@google.com> on 2012-09-27
Reviewed by Kentaro Hara.

This functionality was supported by the old IDL parser but was lost in the rewrite of the parser
in r129723. It is being reinstated to unbreak clients that currently depend on it, but will likely
be removed in the future once those clients have a chance to adopt an approach that more closely
follows the WebIDL syntax.

* bindings/scripts/IDLParser.pm:
(parseDefinition):
(parseInheritance):
(parseImplementsStatement):
(parseExtendedAttribute):
(parseExtendedAttribute2):
(parseExtendedAttributeRest2):
(parseExtendedAttributeRest3):
(parseScopedNameListNoComma):
(parseNonAnyType):
(parseExceptionList):
(parseDefinitionOld):
(parseScopedName):
(parseAbsoluteScopedName):
(parseRelativeScopedName):
(parseScopedNameParts):
(parseScopedNameList):
(parseScopedNames):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129737 268f45cc-cd09-0410-ab3c-d52691b4dbfc
SuggestionPicker should support rtl
https://bugs.webkit.org/show_bug.cgi?id=97555

Reviewed by Kent Tamura.

.:

* ManualTests/forms/calendar-picker.html: Added tests for Arabic with datalist.

Source/WebCore:

Add support for rtl to SuggestionPicker. We add another parameter
because text direction for the calendar picker should depend on the UI
language but the text direction for suggestion picker should depend on
the input element style.

Test: platform/chromium/fast/forms/date/date-suggestion-picker-appearance-rtl.html

* Resources/pagepopups/calendarPicker.js:
(CalendarPicker.prototype._layout):
* Resources/pagepopups/pickerCommon.css:
(.rtl): Added so we can change styles when in rtl mode.
* Resources/pagepopups/suggestionPicker.css:
(.suggestion-list-entry .label):
(.rtl .suggestion-list-entry .label): Change float direction to left.
* Resources/pagepopups/suggestionPicker.js:
(SuggestionPicker.prototype._layout):
* html/shadow/CalendarPickerElement.cpp:
(WebCore::CalendarPickerElement::openPopup): Set isAnchorElementRTL to true if the input element is rtl.
* platform/DateTimeChooser.h:
(DateTimeChooserParameters): Added isAnchorElementRTL.

Source/WebKit/chromium:

* src/DateTimeChooserImpl.cpp:
(WebKit::DateTimeChooserImpl::writeDocument):

LayoutTests:

* platform/chromium-mac/platform/chromium/fast/forms/date/date-suggestion-picker-appearance-rtl-expected.png: Added.
* platform/chromium/TestExpectations:
* platform/chromium/fast/forms/date/date-suggestion-picker-appearance-rtl-expected.txt: Added.
* platform/chromium/fast/forms/date/date-suggestion-picker-appearance-rtl.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Forms] BaseMultipleFieldsDateAndTimeInputType class should inherit DateTimeEditElement::EditControlOwner rather than containing
https://bugs.webkit.org/show_bug.cgi?id=97756

Reviewed by Kent Tamura.

This patch changes class hierarchy of BaseMultipleFieldsDateAndTimeInputType
to inherit from DateTimeEditElement::EditControlOwner rather than
containing an instance of DateTimeEditElement::EditControlOwner for
saving memory, although one pointer, and one memory fetch on using
HTMLInputElement.

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

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

* html/BaseMultipleFieldsDateAndTimeInputType.cpp: DateTimeEditElement::EditControlOwner::DateTimeformatDateTimeFieldsState was removed. We no longer need to redirection. Each date/time input type classe implements it.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::didBlurFromControl): Moved from DateTimeEditControlOwnerImpl and removed reference of m_dateTimeInputType.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::didFocusOnControl): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::editControlValueChanged): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerDisabled): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerReadOnly): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType): ditto.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree): Changed to pass BaseMultipleFieldsDateAndTimeInputType instead of DateTimeEditControlOwnerImpl.
* html/BaseMultipleFieldsDateAndTimeInputType.h: Changed base class to have DateTImeEditElement::EditControlOwner.
(BaseMultipleFieldsDateAndTimeInputType): Removed DateTimeEditControlOwnerImpl class and member variable m_dateTimeEditControlOwner.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Unskip http/tests/security/xss-eval.html again.

Fix was re-landed in r129712.

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Skip fast/dom/Geolocation to make LayoutTests faster
https://bugs.webkit.org/show_bug.cgi?id=97765

Unreviewed EFL gardening.

Skip fast/dom/Geolocation for EFL port instead of marking
them with "Failure" expectation. This makes running
LayoutTests much faster.

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-27

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] IconDatabase: Add a way to notify when icon data is available
https://bugs.webkit.org/show_bug.cgi?id=63945

Reviewed by Anders Carlsson.

Provide new API to notify the API layer when icon data is
available, and use it from the implementation layer when needed,
that is, either when the data has been loaded from the network or
imported from disk.

Added new callback to WKIconDatabaseClient API.

* UIProcess/API/C/WKIconDatabase.h: Added new callback.
* UIProcess/WebIconDatabaseClient.cpp:
(WebKit::WebIconDatabaseClient::iconDataReadyForPageURL):
Implementation of the new callback at this level in the UI
process, by using its implementation in the API layer if present.
* UIProcess/WebIconDatabaseClient.h:
(WebIconDatabaseClient): Added new callback.

Implemented WebFrameLoaderClient::dispatchDidReceiveIcon, so we
get notified in the UI process when loading a new icon.

* UIProcess/WebIconDatabase.messages.in: Added new message to
notify the UI process: DidReceiveIconForPageURL.
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::notifyIconDataReadyForPageURL): New
private helper function to notify the API layer both that new icon
data is ready and that the icon has changed.
(WebKit::WebIconDatabase::didReceiveIconForPageURL):
Implementation of the new message added, by calling
notifyIconDataReadyForPageURL() to notify the API layer.
(WebKit::WebIconDatabase::didImportIconDataForPageURL): Call
notifyIconDataReadyForPageURL() from here as well.
* UIProcess/WebIconDatabase.h: Added new prototypes.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveIcon): Send a
message to the UI process telling a new icon has been received.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Injected bundle API implementation should use toWTFString()
https://bugs.webkit.org/show_bug.cgi?id=97766

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-09-27
Reviewed by Kenneth Rohde Christiansen.

Injected bundle API implementation should call toWTFString() rather than convert
WKStringRef and WKURLRef to their impls and then call string() method directly.
The rational for that are both safety (toWTFString checks the given pointer) and
code readability.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundlePostMessage):
(WKBundlePostSynchronousMessage):
(WKBundleOverrideBoolPreferenceForTestRunner):
(WKBundleAddOriginAccessWhitelistEntry):
(WKBundleRemoveOriginAccessWhitelistEntry):
(WKBundleClearApplicationCacheForOrigin):
(WKBundleGetAppCacheUsageForOrigin):
(WKBundleSetApplicationCacheOriginQuota):
(WKBundleResetApplicationCacheOriginQuota):
(WKBundlePageNumberForElementById):
(WKBundleSetUserStyleSheetLocation):
(WKBundleSetWebNotificationPermission):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFramePauseAnimationOnElementWithId):
(WKBundleFramePauseTransitionOnElementWithId):
(WKBundleFrameAllowsFollowingLink):
(WKBundleFrameCopySuggestedFilenameForResourceWithURL):
(WKBundleFrameCopyMIMETypeForResourceWithURL):
(WKBundleFrameSetTextDirection):
* WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
(WKBundleInspectorEvaluateScriptForTest):
* WebProcess/InjectedBundle/API/c/WKBundleIntent.cpp:
(WKBundleIntentCreate):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageExecuteEditingCommand):
(WKBundlePageIsEditingCommandEnabled):
(WKBundlePageHasLocalDataForURL):
(WKBundlePageFindString):
(WKBundlePageSetComposition):
(WKBundlePageConfirmCompositionWithText):
(WKBundlePageCanShowMIMEType):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed inspector test unskipped on qt, expectations updated.

* http/tests/inspector/console-cross-origin-iframe-logging-expected.txt:
* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] No way to exit video fullscreen mode once entered
https://bugs.webkit.org/show_bug.cgi?id=97631

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-27
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Show fullscreen media control in fullscreen so that
we now have a way to exit fullscreen mode.

No new tests, no behavior change for layout tests.

* css/mediaControlsEflFullscreen.css:
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::emitMediaButtonSignal):
(WebCore::RenderThemeEfl::paintMediaFullscreenButton):

Source/WebKit/efl:

Fix default theme so that we have 2 fullscreen buttons, one
to enter fullscreen mode and another to exit it.

New icon by Alexander Shalamov.

* DefaultTheme/widget/mediacontrol/fullscreenbutton/enterfullscreenbutton.png: Added.
* DefaultTheme/widget/mediacontrol/fullscreenbutton/exitfullscreenbutton.png: Added.
* DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc:
* DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreenbutton.png: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Merge branch 'master' of git://github.com/WebKit/webkit