[chromium] Texture layer should not generate zero textureId quads
https://bugs.webkit.org/show_bug.cgi?id=94550

Patch by Alexandre Elias <aelias@google.com> on 2012-08-20
Reviewed by Adrienne Walker.

After a context loss, CCTextureLayerImpl would clear its textureId
but continued to produce external resources and quads with the zero
textureid.  Add early returns so that CCTextureLayerImpl becomes
inert after a context loss.

Added assertion in read lock so that dontUseOldResourcesAfterLostContext
test catches the problem.

* platform/graphics/chromium/cc/CCResourceProvider.h:
(WebCore::CCScopedLockResourceForRead::CCScopedLockResourceForRead):
* platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
(WebCore::CCTextureLayerImpl::willDraw):
(WebCore::CCTextureLayerImpl::appendQuads):
(WebCore::CCTextureLayerImpl::didDraw):
(WebCore::CCTextureLayerImpl::didLoseContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename collectGarbageIfNecessary() to hintForCollectGarbage()
https://bugs.webkit.org/show_bug.cgi?id=94455

Reviewed by Adam Barth.

This is a follow-up patch for r126098.

collectGarbage() always collects garbage. collectGarbageIfNecessary() just sends
an idle notification to V8, which is just a hint for V8 to trigger GC.
To clarify the difference, this patch renames collectGarbageIfNecessary()
to hintForCollectGarbage().

No tests. No change in behavior.

* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::clearForClose):
(WebCore::ScriptController::clearForNavigation):
* bindings/v8/V8GCController.cpp:
(WebCore::V8GCController::hintForCollectGarbage):
* bindings/v8/V8GCController.h:
(V8GCController):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Chromium gardening. Improved how a few test
expectations were merged together in r126117.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a watcher for WTF changes

Unreviewed.

Add myself as a watcher for changes in WTF.

* Scripts/webkitpy/common/config/watchlist:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium-win] Use native digits in parsing/formatting dates in the textfield part of input[type=date]
https://bugs.webkit.org/show_bug.cgi?id=94281

Reviewed by Hajime Morita.

Source/WebCore:

Tests: Add some cases to Source/WebKit/chromium/tests/LocaleWinTest.cpp

* platform/text/LocaleWin.cpp:
(WebCore::LocaleWin::isLocalizedDigit): A helper for parseNumber(). This
return true if the specified character is one of native digits.
(WebCore::LocaleWin::parseNumber):
Try to parse ASCII digits, then try to parse native digtis. This
becomes a member of LocaleWin because it uses
convertFromLocalizedNumber().
(WebCore::LocaleWin::appendNumber): Apply convertToLocalizedNumber().
(WebCore::LocaleWin::appendTwoDigitsNumber): ditto.
(WebCore::LocaleWin::appendFourDigitsNumber): ditto.
* platform/text/LocaleWin.h:
(LocaleWin):
- Make some static functions member functions of LocaleWin.
- Add isLocalizedDigit().

Source/WebKit/chromium:

* tests/LocaleWinTest.cpp:
(TEST_F): Added formatting and parsing tests for Persian locale to check
native digit behavior.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ShadowRoot.cloneNode() must always throw a DATA_CLONE_ERR exception.
https://bugs.webkit.org/show_bug.cgi?id=91704

Reviewed by Dimitri Glazkov.

Source/WebCore:

According to the spec, ShadowRoot.cloneNode() should throw a DATA_CLONE_ERR exception. The existing implementation
returned null object instead.

We change the cloneNode() interface so that we can throw an exception from cloneNode().

Test: fast/dom/shadow/shadowroot-clonenode.html

* dom/Attr.cpp:
(WebCore::Attr::cloneNode):
* dom/Attr.h:
* dom/CDATASection.cpp:
(WebCore::CDATASection::cloneNode):
* dom/CDATASection.h:
(CDATASection):
* dom/Comment.cpp:
(WebCore::Comment::cloneNode):
* dom/Comment.h:
(Comment):
* dom/Document.cpp:
(WebCore::Document::cloneNode):
* dom/Document.h:
(Document):
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::cloneNode):
* dom/DocumentFragment.h:
(DocumentFragment):
* dom/DocumentType.cpp:
(WebCore::DocumentType::cloneNode):
* dom/DocumentType.h:
(DocumentType):
* dom/Element.cpp:
(WebCore::Element::cloneNode):
* dom/Element.h:
(Element):
* dom/EntityReference.cpp:
(WebCore::EntityReference::cloneNode):
* dom/EntityReference.h:
(EntityReference):
* dom/Node.h:
(Node):
(WebCore::Node::cloneNode):
* dom/Node.idl:
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::cloneNode):
* dom/ProcessingInstruction.h:
(ProcessingInstruction):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::cloneNode):
* dom/ShadowRoot.h:
(ShadowRoot):
* dom/Text.cpp:
(WebCore::Text::cloneNode):
* dom/Text.h:
(Text):

LayoutTests:

* fast/dom/shadow/shadowroot-clonenode-expected.txt: Added.
* fast/dom/shadow/shadowroot-clonenode.html: Added.


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