Assertion parent->inDocument() failed in WebCore::PseudoElement::PseudoElement
https://bugs.webkit.org/show_bug.cgi?id=106224

Reviewed by Ojan Vafai.

Appending a node that contains a <style> and also elements that should have
generated content can cause us to create PseudoElements in nodes that are not
yet inDocument because we may recalcStyle in HTMLStyleElement::insertedInto
triggering a reattach() which could then traverse into the siblings of the
<style> attaching them even though they are not yet inDocument.

This means that we should not assert about the parent of a PseudoElement
being inDocument as this is not always the case.

Instead forward Node::insertedInto and removedFrom notifications to
PseudoElements so they will correctly get their inDocument bit set. Nothing
in the code appears to depend on them being inDocument we just make sure to
set it so they're consistent with the rest of the document.

No new tests, there's no way to test that PseudoElements are really inDocument.

* dom/Element.cpp:
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::PseudoElement):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make CompactHTMLToken a little more compact
https://bugs.webkit.org/show_bug.cgi?id=107317

Reviewed by Darin Adler.

Reduce the size of CompactHTMLToken by two pointers.
The abuse of the attribute vector to store the DOCTYPE strings
is kinda lame, but makes a lot of sense given how rare DOCTYPE tokens are.

The resulting CompactHTMLToken vector should be a smaller malloc and thus faster.
However I saw no perf change on html-parser-srcdoc.html.

* html/parser/CompactHTMLToken.cpp:
(SameSizeAsCompactHTMLToken):
(WebCore):
(WebCore::CompactHTMLToken::CompactHTMLToken):
(WebCore::CompactHTMLToken::isSafeToSendToAnotherThread):
* html/parser/CompactHTMLToken.h:
(WebCore::CompactHTMLToken::type):
(CompactHTMLToken):
(WebCore::CompactHTMLToken::publicIdentifier):
(WebCore::CompactHTMLToken::systemIdentifier):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a race condition on SkBitmap::lockPixels()/unlockPixels() for lazy image decoding
https://bugs.webkit.org/show_bug.cgi?id=107404

Patch by Min Qin <qinmin@chromium.org> on 2013-01-22
Reviewed by Stephen White.

Skbitmap::lockPixels()/unlockPixels() are not threadsafe.
unlike SkPixelRef, these 2 calls are not protected by an internal mutex.
Bugfix, no behaviral change and hard to test as tests will be flaky.

* platform/graphics/chromium/ImageDecodingStore.cpp:
(WebCore::ImageDecodingStore::lockCache):
(WebCore::ImageDecodingStore::unlockCache):
(WebCore::ImageDecodingStore::insertAndLockCache):
(WebCore::ImageDecodingStore::overwriteAndLockCache):
* platform/graphics/chromium/ImageDecodingStore.h:
(ImageDecodingStore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
TRANSFORMATION_MATRIX_USE_X86_64_SSE2 broken for 64-bit Windows builds
https://bugs.webkit.org/show_bug.cgi?id=107498

Reviewed by James Robinson.

Enable TRANSFORMATION_MATRIX_USE_X86_64_SSE2 for 64-bit Windows.

No new tests. Covered by existing tests.

* platform/graphics/transforms/TransformationMatrix.h:
(WebCore):
(TransformationMatrix):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove uses of deprecated unittest.TestCase aliases
https://bugs.webkit.org/show_bug.cgi?id=102252

Reviewed by Adam Barth.

Replace the deprecated assertEquals method of the TestCase interface
used in some webkitpy unittests with the assertEqual method.

* Scripts/webkitpy/common/system/profiler_unittest.py:
(ProfilerFactoryTest._assert_default_profiler_name):
(ProfilerFactoryTest.test_default_profiler_output):
* Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
(GtkPortTest.test_expectations_files):
* Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
(TestHttpServer.test_win32_start_and_stop):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Remove dependency on IDBKey type from IDLs
https://bugs.webkit.org/show_bug.cgi?id=106912

Reviewed by Kentaro Hara.

This is a preamble to wkbug.com/97375 "Remove IDBKey from WebKitIDL"; IDBKey is
not a concept from the Indexed DB spec but a convenient internal type. It was
exposed in the IDL with custom binding code and special cases in the generator
to map from script values to the WebCore type. To remove those special cases
and match the WebIDL in the spec, the IDLs are changed to use "any" and the
implementations now take ScriptValues. This does mean that each call site must
call into IDBBindingUtilities to map from ScriptValue to IDBKey.

No new tests - just a refactor.

* Modules/indexeddb/IDBAny.cpp: Remove IDBKey as a variant type - just use ScriptValue.
* Modules/indexeddb/IDBAny.h:
(WebCore):
(IDBAny):
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::continueFunction): Now takes any/ScriptValue.
(WebCore):
* Modules/indexeddb/IDBCursor.h:
(WebCore::IDBCursor::continueFunction):
(IDBCursor):
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::deleteFunction):
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::cmp): Now takes any/ScriptValue.
* Modules/indexeddb/IDBFactory.h:
(IDBFactory):
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::openCursor): Now takes any/ScriptValue.
(WebCore::IDBIndex::count): Now takes any/ScriptValue.
(WebCore::IDBIndex::openKeyCursor): Now takes any/ScriptValue.
(WebCore::IDBIndex::get): Now takes any/ScriptValue.
(WebCore::IDBIndex::getKey): Now takes any/ScriptValue.
* Modules/indexeddb/IDBIndex.h:
(WebCore::IDBIndex::openCursor):
(IDBIndex):
(WebCore::IDBIndex::openKeyCursor):
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.cpp:
(WebCore::IDBKeyRange::create): Add helper for back-end creation of single-key ranges.
(WebCore):
(WebCore::IDBKeyRange::lowerValue): Impl. of new "any" type accessor exposed to script.
(WebCore::IDBKeyRange::upperValue): Ditto.
(WebCore::IDBKeyRange::only): Now takes any/ScriptValue.
(WebCore::IDBKeyRange::lowerBound): Now takes any/ScriptValue.
(WebCore::IDBKeyRange::upperBound): Now takes any/ScriptValue.
(WebCore::IDBKeyRange::bound): Now takes any/ScriptValue.
* Modules/indexeddb/IDBKeyRange.h:
(IDBKeyRange):
(WebCore::IDBKeyRange::lowerBound):
(WebCore::IDBKeyRange::upperBound):
(WebCore::IDBKeyRange::bound):
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::get): Now takes any/ScriptValue.
(WebCore::IDBObjectStore::add): Now takes any/ScriptValue.
(WebCore):
(WebCore::IDBObjectStore::put): Now takes any/ScriptValue.
(WebCore::IDBObjectStore::deleteFunction): Now takes any/ScriptValue.
(WebCore::IDBObjectStore::openCursor): Now takes any/ScriptValue.
(WebCore::IDBObjectStore::count): Now takes any/ScriptValue.
* Modules/indexeddb/IDBObjectStore.h:
(IDBObjectStore):
(WebCore::IDBObjectStore::openCursor):
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.cpp: Result IDBAny type is now ScriptValue.
(WebCore::IDBRequest::onSuccess):
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::scriptValueToIDBKey): The inverse of idbKeyToScriptValue().
(WebCore):
* bindings/js/IDBBindingUtilities.h:
(WebCore):
* bindings/js/JSIDBAnyCustom.cpp:
(WebCore::toJS):
* bindings/v8/IDBBindingUtilities.cpp:
(WebCore::scriptValueToIDBKey): Ditto.
(WebCore):
* bindings/v8/IDBBindingUtilities.h:
(WebCore):
* bindings/v8/custom/V8IDBAnyCustom.cpp:
(WebCore::toV8): Remove IDBKey variant type.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Prettify the output of the override-feature-defines script
https://bugs.webkit.org/show_bug.cgi?id=106542

Patch by Zan Dobersek <zandobersek@gmail.com> on 2013-01-22
Reviewed by Martin Robinson.

The output now clearly lists the feature defines being overridden
along with the default and overriding values for each feature define.

* gtk/override-feature-defines:
(adjust_feature_defines_makefile):
(adjust_feature_defines_makefile.override_feature_define):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Enable the <template> element support in development builds
https://bugs.webkit.org/show_bug.cgi?id=106575

Patch by Zan Dobersek <zandobersek@gmail.com> on 2013-01-22
Reviewed by Martin Robinson.

Source/WebCore: 

Add a missing build target that contains the custom JS bindings.

No new tests - the related tests are being unskipped and mostly pass.

* GNUmakefile.list.am:

Tools: 

Enable the <template> element support in the development builds of the GTK port.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests: 

Remove the skip entry for the layout tests of the element.
Add a failure expectation for a flaky test that's being unskipped.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Enable CSS Image Orientation feature
https://bugs.webkit.org/show_bug.cgi?id=99040

Patch by Zan Dobersek <zandobersek@gmail.com> on 2013-01-22
Reviewed by Martin Robinson.

Tools: 

Enable the CSS Image Orientation feature in the development
builds of the GTK port. The feature is still disabled in the release
builds.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests: 

Remove the general expectation, replacing it with a failure expectation
for the test that's failing due to whitespace problems in the cssText attribute
value after the image orientation attribute is set.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Disable CSS Regions in release builds
https://bugs.webkit.org/show_bug.cgi?id=106541

Patch by Zan Dobersek <zandobersek@gmail.com> on 2013-01-22
Reviewed by Martin Robinson.

The CSS Regions feature is not yet deemed stable enough to be enabled
in release builds, so disable it. It's still enabled for development
builds, via FeatureList.pm.

No new tests - no testable changes.

* GNUmakefile.features.am.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] webaudio/realtimeanalyser-fft-sizing.html is failing on Win7
https://bugs.webkit.org/show_bug.cgi?id=107581

Unreviewed build fix. Mark the following test as failing on Win7:
webaudio/realtimeanalyser-fft-sizing.html

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Update test expectations.

Unreviewed rebaseline for layout test:
platform/chromium/fast/events/touch/touch-hit-rects-in-iframe.html

* platform/chromium-mac/platform/chromium/fast/events/touch/touch-hit-rects-in-iframe-expected.txt: Renamed from LayoutTests/platform/chromium-mac-snowleopard/platform/chromium/fast/events/touch/touch-hit-rects-in-iframe-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Don't assert when deprecated setCallbacks is called
https://bugs.webkit.org/show_bug.cgi?id=107580

Reviewed by Tony Chang.

Remove an assert for IDBTransactionBackendImpl that was deprecated
in a previous commit, but is still called by old chromium code.
After the chromium code is removed, this method will be removed
entirely.

* Modules/indexeddb/IDBTransactionBackendImpl.h:
(WebCore::IDBTransactionBackendImpl::setCallbacks):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Update test expectations
https://bugs.webkit.org/show_bug.cgi?id=107328

Unreviewed. Mark this test as missing:
fast/forms/form-associated-element-crash3.html

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make BackgroundHTMLParser track line/column numbers
https://bugs.webkit.org/show_bug.cgi?id=107561

Reviewed by Adam Barth.

No new tests because covered by existing fast/parser tests.

* html/parser/BackgroundHTMLParser.cpp:
(WebCore::BackgroundHTMLParser::pumpTokenizer):
* html/parser/CompactHTMLToken.cpp:
(WebCore::CompactHTMLToken::CompactHTMLToken):
* html/parser/CompactHTMLToken.h:
(CompactHTMLToken):
(WebCore::CompactHTMLToken::textPosition):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser):
(WebCore::HTMLDocumentParser::lineNumber):
(WebCore::HTMLDocumentParser::textPosition):
* html/parser/HTMLDocumentParser.h:
(HTMLDocumentParser):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove empty file WebPageProxyMessageKinds.h
https://bugs.webkit.org/show_bug.cgi?id=107335

Reviewed by Kentaro Hara.

* GNUmakefile.list.am:
* Shared/CoreIPCSupport/WebPageProxyMessageKinds.h: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Enable Page Visibility (PAGE_VISIBILITY_API)
https://bugs.webkit.org/show_bug.cgi?id=107230

Reviewed by David Kilzer.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No new tests. Covered by existing tests which are now unskipped.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::resetPageVisibility):
Fix a typo in the original implementation. resetPageVisibility should
pass initialState YES so an event is not dispatched, which causes
issues in multiple tests. This now matches other ports.

LayoutTests:

* fast/events/page-visibility-iframe-delete-test-expected.txt:
* fast/events/page-visibility-iframe-delete-test.html:
Fix a typo.

* platform/mac/TestExpectations:
Unskip the tests on OS X.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Blackberry] Static code analysis warning fixes
https://bugs.webkit.org/show_bug.cgi?id=107464

Patch by Anthony Scian <ascian@rim.com> on 2013-01-22
Reviewed by Rob Buis.

Klocwork issues: 1367, 2367
- add NULL pointer checks detected by static code analysis

* platform/blackberry/WidgetBlackBerry.cpp:
(WebCore::Widget::setCursor):
* plugins/blackberry/PluginViewBlackBerry.cpp:
(WebCore::PluginView::updatePluginWidget):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Update test expectations
https://bugs.webkit.org/show_bug.cgi?id=107587

Unreviewed. Mark these tests as slow on Win7 Debug:
platform/chromium/virtual/gpu/fast/hidpi/clip-text-in-hidpi.html
platform/chromium/virtual/gpu/fast/hidpi/device-scale-factor-paint.html
platform/chromium/virtual/gpu/fast/hidpi/focus-rings.html

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore property sheets, project files and modified build scripts.
https://bugs.webkit.org/show_bug.cgi?id=106987

Reviewed by Brent Fulgham.

* JavaScriptCore.vcxproj: Added.
* JavaScriptCore.vcxproj/JavaScriptCore.resources: Added.
* JavaScriptCore.vcxproj/JavaScriptCore.resources/Info.plist: Added.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Added.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Added.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.user: Added.
* JavaScriptCore.vcxproj/JavaScriptCoreCF.props: Added.
* JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: Added.
* JavaScriptCore.vcxproj/JavaScriptCoreDebug.props: Added.
* JavaScriptCore.vcxproj/JavaScriptCoreExports.def: Added.
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make: Added.
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: Added.
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters: Added.
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.user: Added.
* JavaScriptCore.vcxproj/JavaScriptCoreGeneratedCommon.props: Added.
* JavaScriptCore.vcxproj/JavaScriptCoreGeneratedDebug.props: Added.
* JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props: Added.
* JavaScriptCore.vcxproj/JavaScriptCorePostBuild.cmd: Added.
* JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd: Added.
* JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd: Added.
* JavaScriptCore.vcxproj/JavaScriptCoreRelease.props: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.make: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.vcxproj: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/LLIntAssembly.vcxproj.user: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntAssembly/build-LLIntAssembly.sh: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.make: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj.user: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj.user: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: Added.
* JavaScriptCore.vcxproj/LLInt.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props: Added.
* JavaScriptCore.vcxproj/build-generated-files.sh: Added.
* JavaScriptCore.vcxproj/copy-files.cmd: Added.
* JavaScriptCore.vcxproj/jsc: Added.
* JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Added.
* JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters: Added.
* JavaScriptCore.vcxproj/jsc/jsc.vcxproj.user: Added.
* JavaScriptCore.vcxproj/jsc/jscCommon.props: Added.
* JavaScriptCore.vcxproj/jsc/jscDebug.props: Added.
* JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd: Added.
* JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd: Added.
* JavaScriptCore.vcxproj/jsc/jscPreLink.cmd: Added.
* JavaScriptCore.vcxproj/jsc/jscRelease.props: Added.
* config.h:


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