Put computed style 'font-family' values in the CSSValuePool.
<http://webkit.org/b/103184>

Reviewed by Ojan Vafai.

Use CSSValuePool::createFontFamilyValue() when handing out 'font-family' values from CSSComputedStyleDeclaration.
This avoids creating extra CSSPrimitiveValue objects since we already have these in the pool from parsing.
Also added a max capacity to the font-family cache (using random eviction.)

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForFamily):
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createFontFamilyValue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] RTSP should use the same MediaDocument as HTTP videos.
https://bugs.webkit.org/show_bug.cgi?id=103185
RIM PR 250114

Patch by Liam Quinn <lquinn@rim.com> on 2012-11-24
Reviewed by George Staikos.

Make our MediaPlayer implementation indicate that it supports RTSP. That way, DOMImplementation::createDocument will create the same MediaDocument as is used for HTTP videos.

* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::supportsType):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Refactor RenderThemeEfl::getThemePartFromCache()
https://bugs.webkit.org/show_bug.cgi?id=103186

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

Refactor getThemePartFromCache() so that a list is used
for the cache instead of a vector. The function moves
items to the head of the container which is much more
efficient with a list than a vector.

The list ordering is also slightly altered so that the
cached parts that were used last come first. Previously,
they were sorted by creation time which may cause an
item to be removed from the cache because it is older
even if is was used recently.

This patch also gets rid of some code duplication at the
end of the function.

No new tests, no behavior change.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::ThemePartCacheEntry::create): Return
a smart pointer instead of a raw pointer.
(WebCore::RenderThemeEfl::getThemePartFromCache):
(WebCore::RenderThemeEfl::clearThemePartCache): Rename
flushThemePartCache to clearThemePartCache for clarity.
(WebCore::RenderThemeEfl::loadTheme):
(WebCore::RenderThemeEfl::RenderThemeEfl):
(WebCore::RenderThemeEfl::~RenderThemeEfl):
* platform/efl/RenderThemeEfl.h:
(ThemePartCacheEntry):
(RenderThemeEfl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Avoid access violation when frame is NULL.
https://bugs.webkit.org/show_bug.cgi?id=68753

BitmapImage::drawFrameMatchingSourceSize causes an access violation
if BitmapImage::frameAtIndex returns NULL. (Found by David Delaune).

Reviewed by Simon Fraser.

* platform/graphics/win/ImageCairoWin.cpp:
(WebCore::BitmapImage::drawFrameMatchingSourceSize): Check for null
cairo_surface_t pointer and avoid dereferencing.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Stop the mess with DECLARE_EWK_VIEW_CALLBACK arg type definition
https://bugs.webkit.org/show_bug.cgi?id=103187

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

Now the client should pass to DECLARE_EWK_VIEW_CALLBACK macro exacly the
same arg type s/he wants to have in the Ewk_View callback.

* UIProcess/API/efl/EwkViewCallbacks.h:
(EvasObjectHolder):
(EwkViewCallbacks::EvasObjectHolder::EvasObjectHolder):
(EwkViewCallbacks):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove traces of MediaControlRootElement
https://bugs.webkit.org/show_bug.cgi?id=103174

Patch by Silvia Pfeiffer <silviapf@chromium.org> on 2012-11-24
Reviewed by Adam Barth.

Now that nothing is using MediaControlRootElement any more,
we can remove the FIXME and MediaControlRootElement enum left
over from bug 88871.

* public/WebContextMenuData.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Layout test comes to crash on WK1
https://bugs.webkit.org/show_bug.cgi?id=103170

Patch by Viatcheslav Ostapenko <v.ostapenko@samsung.com> on 2012-11-24
Reviewed by Kenneth Rohde Christiansen.

Switch off accelerated compositing for WK1 because GraphicsContext3D is
missing direct rendering implementation that is required for EFL WK1.

* ewk/ewk_view.cpp:
(_ewk_view_priv_new):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Refactor RenderThemeEfl::paintThemePart()
https://bugs.webkit.org/show_bug.cgi?id=103192

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

Refactor RenderThemeEfl::paintThemePart() so that:
- Some C'ism is removed
- RTL related code is moved to applyEdjeRTLState()
- evas_render() is called instead of evas_render_updates()
  to avoid creating uselessly update rects.

No new tests, no behavior change for layout tests.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::applyEdjeRTLState):
(WebCore):
(WebCore::RenderThemeEfl::paintThemePart):
* platform/efl/RenderThemeEfl.h:
(RenderThemeEfl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Find-on-page keeps stale pointer
https://bugs.webkit.org/show_bug.cgi?id=103190

Patch by Andy Chen <andchen@rim.com> on 2012-11-24
Reviewed by Rob Buis.

Find on page: pendingScopingEffort stores stale pointer when frames unload,
we need to cancel those scoping efforts.
PR 250807.

Internally reviewed by Yongxin Dai and Mike Fenton.

* WebKitSupport/InPageSearchManager.cpp:
(InPageSearchManager::DeferredScopeStringMatches):
(BlackBerry::WebKit::InPageSearchManager::frameUnloaded):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Substitute "use" for "user" in sentence about naming convention for
enum members so that it reads well.

* coding/coding-style.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Chromium should use TCMalloc on Mac to go fast
https://bugs.webkit.org/show_bug.cgi?id=102866

Reviewed by Eric Seidel.

This patch enables TCMalloc for some WebKit objects. It improves
dom-modify on Mac by 5-10%.

On non-Mac platforms, Chromium already uses TCMalloc throughout the
project. Unfortunately, we haven't yet figured out how to turn TCMalloc
on globally on Mac because the approach we use for other platforms makes
some OS X APIs sad.

The next best thing would be to enable TCMalloc for WebKit by
overriding the global new and delete operator, as is done on apple-mac
and other platforms. Unfortunately, we cannot use that approach either
because the Chromium WebKit API is not memory tight.

Fortunately, WebKit has a mechanism for selectively enabling TCMalloc
for a selection of objects by overriding the new and delete operators
on those objects. This patch opts chromium-mac into that scheme by
setting the appropriate preprocessor macros.

* WTF.gyp/WTF.gyp:
* wtf/Platform.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r135493): HTMLCollection and DynamicNodeList have two vtable pointers
https://bugs.webkit.org/show_bug.cgi?id=103096

Reviewed by Sam Weinig.

Co-authored by Ilya Tikhonovsky.

Made DynamicNodeListCacheBase inherit from NodeList. While HTMLCollection doesn't inherit
from NodeList in IDL, it makes a lot of sense for the C++ implementation to do so via
DynamicNodeListCacheBase since HTMLCollection and live NodeList share a lot of code in
DynamicNodeListCacheBase.

This lets remove proxies for item() and length() in DynamicNodeList and HTMLCollection
and directly implement them in DynamicNodeListCacheBase which used to provide itemCommon()
and lengthCommon().

Also renamed NodeList::itemWithName() to NodeList::namedItem() to match HTMLCollection's
naming convention.

Finally, removed reportMemoryUsage in DynamicNodeList::reportMemoryUsage since DynamicNodeList
now uses single inheritance.

* bindings/js/JSNodeListCustom.cpp:
(WebCore::JSNodeList::canGetItemsForName): Calls namedItem, which has been renamed from
itemWithName.
(WebCore::JSNodeList::nameGetter): Ditto.
* bindings/v8/custom/V8NodeListCustom.cpp:
(WebCore::V8NodeList::namedPropertyGetter): Ditto.
* bindings/v8/custom/V8NamedNodesCollection.cpp:
(WebCore::V8NamedNodesCollection::namedItem): Renamed from itemWithName.
* bindings/v8/custom/V8NamedNodesCollection.h:
* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::nodeMatches): Updated comment.
* dom/DynamicNodeList.cpp:
(WebCore::DynamicNodeList::namedItem): Renamed from itemWithName.
* dom/DynamicNodeList.h:
(DynamicNodeListCacheBase): Inhertis from NodeList and renamed lengthCommon and itemCommon
to virtual length and item respectively.
(DynamicNodeList): Now inherits from just DynamicNodeListCacheBase instead of NodeList
and DynamicNodeListCacheBase since the former now inhertis from NodeList. Also removed
length() and item() since they're implemented in DynamicNodeListCacheBase now and renamed
itemWithName() to namedItem() to match HTMLCollection's naming convention.
* dom/NodeList.h:
(NodeList::namedItem): Renamed from itemWithName. Note that this member function is not
exposed via IDL. It's merely used in the binding code.
* dom/StaticHashSetNodeList.cpp:
(WebCore::StaticHashSetNodeList::namedItem): Ditto.
* dom/StaticHashSetNodeList.h:
(StaticHashSetNodeList::namedItem): Ditto.
* dom/StaticNodeList.cpp:
(WebCore::StaticNodeList::namedItem): Ditto.
* dom/StaticNodeList.h:
(StaticNodeList::namedItem): Ditto.
* html/HTMLCollection.cpp:
(WebCore::DynamicNodeListCacheBase::length): Renamed from lengthCommon.
(WebCore::DynamicNodeListCacheBase::item): Renamed from itemCommon.
* html/HTMLCollection.h:
(HTMLCollection): Inherits from DynamicNodeListCacheBase since DynamicNodeListCacheBase
is already RefCount'ed and NodeList, from which DynamicNodeListCacheBase inherits,
inherits from ScriptWrappable.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make renderer construction less generic
https://bugs.webkit.org/show_bug.cgi?id=103175

Reviewed by Ojan Vafai.

The renderer construction code currently operates on Nodes and is very generic. In reality
only Element and Text nodes can have renderers and the Text case is much simpler.

This patch separates the Text and Element renderer construction paths and makes it statically
known that other Node types can't have renderers. Less generic code is less branchy and enables
further optimizations.

* dom/CharacterData.cpp:
(WebCore::CharacterData::parserAppendData):
(WebCore::CharacterData::setDataAndUpdate):
(WebCore):
(WebCore::CharacterData::rendererIsNeeded):
(WebCore::CharacterData::createRenderer):
        
    Only Text subclass of CharacterData can have renderers.

* dom/CharacterData.h:
(CharacterData):
* dom/ContainerNode.h:
(WebCore::ContainerNode::childShouldCreateRenderer):
        
    Move childShouldCreateRenderer from Node to ContainerNode.

(ContainerNode):
* dom/Element.cpp:
(WebCore::Element::rendererIsNeeded):
(WebCore):
(WebCore::Element::attach):
(WebCore::Element::childShouldCreateRenderer):
* dom/Element.h:
        
    Move rendererIsNeeded and createRenderer from Node to Element.

(Element):
* dom/Node.cpp:
(WebCore::Node::attach):
(WebCore):
* dom/Node.h:
(Node):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
(WebCore::NodeRenderingContext::createRendererForTextIfNeeded):
        
    Separate the Element and Text renderer creation paths. Both are less branchy.
    The Text path is much simpler and avoids a bunch of virtual calls.

(WebCore):
* dom/NodeRenderingContext.h:
(NodeRenderingContext):
* dom/Text.cpp:
(WebCore::Text::textRendererIsNeeded):
(WebCore::Text::createTextRendererIfNeeded):
(WebCore):
(WebCore::Text::createTextRenderer):
(WebCore::Text::attach):
(WebCore::Text::updateTextRenderer):
* dom/Text.h:
        
        Add non-virtual Text specific functions.

(WebCore):
(Text):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::clone):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] TiledBackingStore: page contents is scaled wrongly
https://bugs.webkit.org/show_bug.cgi?id=103090

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

Source/WebKit2:

Before this change the page contents scaling in PageViewportController was
defined all the times by m_rawAttributes.initialScale. If initial scale had not
been specified in the viewport meta tag it was set to m_minimumScaleToFit inside
PageViewportController::didChangeViewportAttributes().

The problem was that m_minimumScaleToFit could have wrong value as contents size
might have not be updated by the time PageViewportController::didChangeViewportAttributes()
was invoked.

The solution is to use m_minimumScaleToFit for contents scaling if initial scale
is not specified in the viewport meta tag, as it is updated all the time.
Also a flag m_initiallyFitToViewport is added to PageViewportController to detect
whether m_minimumScaleToFit should be used for scaling.

* UIProcess/PageViewportController.cpp:
(WebKit::PageViewportController::PageViewportController):
(WebKit::PageViewportController::didChangeContentsSize):
(WebKit::PageViewportController::pageTransitionViewportReady):
(WebKit::PageViewportController::didChangeViewportAttributes):
* UIProcess/PageViewportController.h:
(PageViewportController):

LayoutTests:

Added new layout test to verify that viewport 'width' descriptor does not
affect contents width of next loaded page.

* css3/device-adapt/resources/check-contents-width.html: Added.
* css3/device-adapt/viewport-width-not-affecting-next-page-expected.txt: Added.
* css3/device-adapt/viewport-width-not-affecting-next-page.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Changing position:relative to position:static results in mis-positioned div
https://bugs.webkit.org/show_bug.cgi?id=26397

Reviewed by Ojan Vafai.

Source/WebCore:

When a block changes position from relative to static it is no longer the containing block for any
positioned objects it may have. If any of those positioned objects actually have a position specified
they are going to need a layout as their new containing block will likely have a different location they
need to offset from. Positioned objects without a specified position always get a layout anyway
in layoutPositionedObjects() so no need to worry about them in this situation.

Test: fast/block/abspos-child-container-changes-from-relative-to-static-expected.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleWillChange):
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::removePositionedObjects):
* rendering/RenderBlock.h:
(RenderBlock):

LayoutTests:

* fast/block/abspos-child-container-changes-from-relative-to-static-expected.html: Added
* fast/block/abspos-child-container-changes-from-relative-to-static.html: Added

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename DynamicNodeList to LiveNodeList
https://bugs.webkit.org/show_bug.cgi?id=103197

Reviewed by Ojan Vafai.

Rename DynamicNodeList to LiveNodeList to match the terminology used in DOM4 working draft:
http://www.w3.org/TR/2012/WD-dom-20120405/#concept-collection-live
"A collection (either NodeList or HTMLCollection) can be either live or static".

Also rename DynamicNodeListCacheBase to LiveNodeListBase, and merge DynamicSubtreeNodeList
into LiveNodeList (old DynamicNodeList) now that the only difference between those two classes
is the former calling registerNodeListCache and unregisterNodeListCache on Document.

This patch completes the series of simplification of NodeList/HTMLCollection classes.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::getNamedItems):
* bindings/js/JSNodeListCustom.cpp:
(WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
* bindings/v8/custom/V8NodeListCustom.cpp:
(WebCore::V8NodeList::opaqueRootForGC):
* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::ChildNodeList):
(WebCore::ChildNodeList::nodeMatches):
* dom/ChildNodeList.h:
* dom/ClassNodeList.cpp:
(WebCore::ClassNodeList::ClassNodeList):
* dom/ClassNodeList.h:
* dom/DOMAllInOne.cpp:
* dom/Document.cpp:
(WebCore::Document::registerNodeListCache):
(WebCore::Document::unregisterNodeListCache):
(WebCore):
* dom/Document.h:
(WebCore):
(Document):
* dom/DynamicNodeList.cpp: Removed.
* dom/DynamicNodeList.h: Removed.
* dom/LiveNodeList.cpp: Copied from Source/WebCore/dom/DynamicNodeList.cpp.
(WebCore::LiveNodeListBase::rootNode):
(WebCore::LiveNodeListBase::invalidateCache):
(WebCore::LiveNodeListBase::invalidateIdNameCacheMaps):
(WebCore::LiveNodeListBase::reportMemoryUsage):
(WebCore::LiveNodeList::namedItem):
* dom/LiveNodeList.h: Copied from Source/WebCore/dom/DynamicNodeList.h.
(WebCore::LiveNodeListBase::LiveNodeListBase):
(WebCore::LiveNodeListBase::shouldInvalidateTypeOnAttributeChange):
(WebCore::LiveNodeList::LiveNodeList):
(WebCore::LiveNodeList::~LiveNodeList):
(LiveNodeList):
* dom/MicroDataItemList.cpp:
(WebCore::MicroDataItemList::MicroDataItemList):
* dom/MicroDataItemList.h:
* dom/NameNodeList.cpp:
(WebCore::NameNodeList::NameNodeList):
* dom/NameNodeList.h:
* dom/Node.cpp:
(WebCore::shouldInvalidateNodeListCachesForAttr):
(WebCore::Document::invalidateNodeListCaches):
* dom/Node.h:
(WebCore):
* dom/NodeList.h:
(WebCore::NodeList::isLiveNodeList):
* dom/NodeRareData.h:
(NodeListsNodeData):
(WebCore::NodeListsNodeData::removeCacheWithAtomicName):
(WebCore::NodeListsNodeData::removeCacheWithName):
(WebCore::NodeListsNodeData::removeCacheWithQualifiedName):
(WebCore::NodeListsNodeData::adoptTreeScope):
* dom/PropertyNodeList.cpp:
(WebCore::PropertyNodeList::PropertyNodeList):
* dom/PropertyNodeList.h:
* dom/TagNodeList.cpp:
(WebCore::TagNodeList::TagNodeList):
* dom/TagNodeList.h:
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::LiveNodeListBase::iterateForNextNode):
(WebCore::LiveNodeListBase::itemBeforeOrAfter):
(WebCore::LiveNodeListBase::itemBefore):
(WebCore::LiveNodeListBase::itemAfter):
(WebCore::LiveNodeListBase::isLastItemCloserThanLastOrCachedItem):
(WebCore::LiveNodeListBase::isFirstItemCloserThanCachedItem):
(WebCore::LiveNodeListBase::setItemCache):
(WebCore::LiveNodeListBase::length):
(WebCore::LiveNodeListBase::item):
(WebCore::LiveNodeListBase::itemBeforeOrAfterCachedItem):
* html/HTMLCollection.h:
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::LabelsNodeList):
* html/LabelsNodeList.h:
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList):
* html/RadioNodeList.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Get rid of resetBitmapZoomScale()
https://bugs.webkit.org/show_bug.cgi?id=103200

Patch by Jacky Jiang  <zhajiang@rim.com>.
Reviewed by Rob Buis.
Internally reviewed by Gen Mak.

PR: 235707
Right now, resetBitmapZoomScale() takes an unused paramter and
dispatches a message to end the bitmap zooming. However, the
interaction has its own state machine to start bitmap zooming when it
is active and end bitmap zooming when it is inactive. This is
expecially for pinch zoom and scroll. From WebKit side, block zoom
which will call zoomBlock when the bitmap zoom finished doesn't even
need to dispatch the useless ending message to ZoomHandler.
resetBitmapZoomScale() is basically a noop for block zoom. And likewise
that is useless for zoomToInitialScaleOnLoad(). It can also potentially
cause problem if it is used somewhere else in the future and
incidentally breaks the interaction's own state machine. So just remove
this completely.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
(BlackBerry::WebKit::WebPagePrivate::zoomBlock):
* Api/WebPageClient.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Refactor RenderThemeEfl::ThemePartCacheEntry::reuse()
https://bugs.webkit.org/show_bug.cgi?id=103189

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

Check if the entry size and type changed in
RenderThemeEfl::ThemePartCacheEntry::reuse() to avoid
useless processing if one of them did not change.

Remove useless call to cairo_surface_finish() since
we are using a smart pointer for the surface.

Resize the edge object *after* loading its content
from the theme file as it seems more logical this
way.

No new tests, no behavior change for layout tests.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse):
* platform/efl/RenderThemeEfl.h:
(ThemePartCacheEntry):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Move WorkerExecutionContextProxy::initializeIfNeeded() to V8Initializer
https://bugs.webkit.org/show_bug.cgi?id=103061

Reviewed by Adam Barth.

This is an incremental step to remove WorkerExecutionContextProxy.
This patch moves WorkerExecutionContextProxy::initializeIfNeeded() to V8Initializer.
This patch also renames methods so that the names become consistent
between the main thread and workers.

No tests. No change in behavior.

* bindings/v8/V8Initializer.cpp:
(WebCore::reportFatalErrorInMainThread):
(WebCore::messageHandlerInMainThread):
(WebCore::failedAccessCheckCallbackInMainThread):
(WebCore::V8Initializer::initializeMainThreadIfNeeded):
(WebCore::reportFatalErrorInWorker):
(WebCore):
(WebCore::messageHandlerInWorker):
(WebCore::V8Initializer::initializeWorkerIfNeeded):
* bindings/v8/V8Initializer.h:
(V8Initializer):
* bindings/v8/WorkerContextExecutionProxy.cpp:
(WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
* bindings/v8/WorkerContextExecutionProxy.h:
(WorkerContextExecutionProxy):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactoring: Move the content of HTMLInputElement::subtreeHasChanged to TextFieldInputType
https://bugs.webkit.org/show_bug.cgi?id=103195

Reviewed by Kentaro Hara.

HTMLInputElement::subtreeHasChanged is called only if the input is
a text field. The code should be moved to TextFieldInputType.

No new tests. This should not change any behavior.

* html/HTMLInputElement.cpp:
- Remove unnecessary NumberInputType.h inclusion.
- Remove convertFromVisibleValue. It was used only by subtreeHasChanged.
(WebCore::HTMLInputElement::subtreeHasChanged):
Move the code to TextFieldInputType::subtreeHasChanged except
calculateAndAdjustDirectionality, which is a protected member of
HTMLElement.
* html/HTMLInputElement.h:
(HTMLInputElement): Remove convertFromVisibleValue.

* html/InputType.cpp:
Move convertFromVisibleValue to TextFieldInputType.
(WebCore::InputType::subtreeHasChanged):
Add ASSERT_NOT_REACHED.
* html/InputType.h:
(InputType): Remove convertFromVisibleValue.

* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::convertFromVisibleValue):
Moved from InputType.
(WebCore::TextFieldInputType::subtreeHasChanged):
Moved from HTMLInputElement. A latter part is moved to
didSetValueByUserEdit to be hooked by SearchInputType.
(WebCore::TextFieldInputType::didSetValueByUserEdit):
Moved from HTMLInputElement::subtreeHasChanged, and clean up the code.
* html/TextFieldInputType.h:
(TextFieldInputType):
- Move convertFromVisibleValue from InputType.
- Add didSetValueByUserEdit and subtreeHasChanged.

* html/SearchInputType.cpp:
(WebCore::SearchInputType::didSetValueByUserEdit):
Renamed from subtreeHasChanged, and calls TextFieldInputType::didSetValueByUserEdit.
* html/SearchInputType.h:
(SearchInputType): Rename subtreeHasChanged to didSetValueByUserEdit.


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