[chromium] Make prioritized texture manager not touch backings array on the main thread
https://bugs.webkit.org/show_bug.cgi?id=96114

Patch by Christopher Cameron <ccameron@chromium.org> on 2012-09-11
Reviewed by James Robinson.

Take a snapshot of the textures' priorities from the main thread,
and save it in their backings for access by the impl thread.
Update functions that access the sorted backings array to use the
snapshotted values instead of the values that the main thread may
have computed for the next frame.

Make the main thread not touch the m_backings array.  Split
prioritizeTextures into a updateBackingsPriorities function.
In places where the main thread would have touched m_backings,
set a flag specifying that m_backings needs to be re-sorted
before any function that requires it be sorted by priority be
executed.

Update the two functions that require sorted order (acquireBacking
and reduceMemory) to sort the backings array (if needed) before
traversing it.

Updated tests to set correct thread during asserts. Add a test to
verify that requestLate is correctly incorporated into the backing
sorting.

Source/WebCore:

* platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
(WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager):
(WebCore::CCPrioritizedTextureManager::prioritizeTextures):
(WebCore):
(WebCore::CCPrioritizedTextureManager::prioritizeBackings):
(WebCore::CCPrioritizedTextureManager::requestLate):
(WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
(WebCore::CCPrioritizedTextureManager::reduceMemory):
(WebCore::CCPrioritizedTextureManager::returnBackingTexture):
(WebCore::CCPrioritizedTextureManager::destroyBacking):
(WebCore::CCPrioritizedTextureManager::assertInvariants):
* platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
(CCPrioritizedTextureManager):

Source/WebKit/chromium:

* tests/CCPrioritizedTextureTest.cpp:
(WTF::CCPrioritizedTextureTest::validateTexture):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor ValidationMessage class
https://bugs.webkit.org/show_bug.cgi?id=96365

Reviewed by Hajime Morita.

- Move some code from HTMLFormControlElement to ValidationMessage
- ValidationMessage class holds an element pointer as
HTMLFormControlElement, not FormAssociatedElement.

No new tests because of no behavior changes.

* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::updateVisibleValidationMessage):
Moved some code to ValidationMessage::updateValidationMessage().
(WebCore::HTMLFormControlElement::setNeedsValidityCheck):
Ask ValidationMessage whether it is visible or not.
* html/HTMLFormControlElement.h:
(HTMLFormControlElement): Removed visibleValidationMessage().

* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::ValidationMessage):
Change the argument type: FormAssociatedElement -> HTMLFormControlElement
(WebCore::ValidationMessage::create): ditto.
(WebCore::ValidationMessage::updateValidationMessage):
Added. Moved some code from
HTMLFormControlElement::updateVisibleValidationMessage().
(WebCore::ValidationMessage::buildBubbleTree): toHTMLElement() is not needed.
(WebCore::ValidationMessage::deleteBubbleTree): ditto.
(WebCore::ValidationMessage::isVisible): Added.
* html/ValidationMessage.h:
(ValidationMessage):
 - Change some instance of FormAssociatedElement to HTMLFormControlElement
 - Remove message().
 - Added updateValidationMessage() and isVisible()
 - Made setMessage() private.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fixed for http://trac.webkit.org/changeset/128243

Unreviewed build fix.

Added missing include file needed by 96422 for C++ ICU APIs.

* icu/unicode/bytestream.h: Added.
* icu/unicode/rep.h: Added.
* icu/unicode/std_string.h: Added.
* icu/unicode/strenum.h: Added.
* icu/unicode/stringpiece.h: Added.
* icu/unicode/unistr.h: Added.
* icu/unicode/uobject.h: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fixed for http://trac.webkit.org/changeset/128243

Unreviewed build fix.

Added missing include file needed by 96422 for C++ ICU APIs.

* icu/unicode/chariter.h: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Create Localizer factory method for LocaleICU
https://bugs.webkit.org/show_bug.cgi?id=96363

Reviewed by Kent Tamura.

Source/WebCore:

Preparing to use Localizer instead of LocaleMac/Win/ICU

No new tests. Covered in unit test tests/LocalizedNumberICUTest.cpp

* platform/text/LocaleICU.cpp:
(WebCore::Localizer::create):
(WebCore):

Source/WebKit/chromium:

* tests/LocalizedNumberICUTest.cpp:
(testNumberIsReversible):
(testDecimalSeparator):


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