APIEntryShims need some love
https://bugs.webkit.org/show_bug.cgi?id=124540

Reviewed by Filip Pizlo.

We were missing them in key places which some other hacking revealed. These could have manifested as
race conditions for VMs being used in multithreaded environments.

* API/JSContext.mm:
(-[JSContext setException:]):
(-[JSContext wrapperForObjCObject:]):
(-[JSContext wrapperForJSObject:]):
* API/JSContextRef.cpp:
(JSContextGroupRelease):
(JSGlobalContextRelease):
* API/JSManagedValue.mm:
(-[JSManagedValue initWithValue:]):
(-[JSManagedValue value]):
* API/JSObjectRef.cpp:
(JSObjectIsFunction):
(JSObjectCopyPropertyNames):
* API/JSValue.mm:
(containerValueToObject):
* API/JSWrapperMap.mm:
(tryUnwrapObjcObject):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a quirk to not respect center text-align when positioning

<rdar://problem/15427571>
https://bugs.webkit.org/show_bug.cgi?id=124522

Reviewed by Simon Fraser.

Added fast/block/legacy-text-align-position-quirk.html

Source/WebCore: 

* page/Settings.in:
Add the quirk setting.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::startAlignedOffsetForLine):
Don't pay attention to center text-align when the quirk is set.

Source/WebKit/mac: 

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences useLegacyTextAlignPositionedElementBehavior]):
(-[WebPreferences setUseLegacyTextAlignPositionedElementBehavior:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2: 

* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesUseLegacyTextAlignPositionedElementBehavior):
(WKPreferencesSetUseLegacyTextAlignPositionedElementBehavior):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

LayoutTests: 

* fast/block/legacy-text-align-position-quirk-expected.html: Added.
* fast/block/legacy-text-align-position-quirk.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename WebNavigationData to API::NavigationData
https://bugs.webkit.org/show_bug.cgi?id=124542

Reviewed by Dan Bernstein.

* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKNavigationDataRef.cpp:
(WKNavigationDataGetTypeID):
* UIProcess/API/Cocoa/WKNavigationData.mm:
(-[WKNavigationData dealloc]):
(-[WKNavigationData title]):
(-[WKNavigationData originalRequest]):
(-[WKNavigationData destinationURL]):
(-[WKNavigationData response]):
* UIProcess/API/Cocoa/WKNavigationDataInternal.h:
(WebKit::wrapper):
* UIProcess/API/mac/WKProcessGroup.mm:
* UIProcess/APINavigationData.cpp: Renamed from Source/WebKit2/UIProcess/WebNavigationData.cpp.
(API::NavigationData::NavigationData):
(API::NavigationData::~NavigationData):
* UIProcess/APINavigationData.h: Renamed from Source/WebKit2/UIProcess/WebNavigationData.h.
(API::NavigationData::create):
(API::NavigationData::title):
(API::NavigationData::url):
(API::NavigationData::originalRequest):
(API::NavigationData::response):
* UIProcess/WebHistoryClient.cpp:
(WebKit::WebHistoryClient::didNavigateWithNavigationData):
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
put_to_scope[5] should not point to the structure if it's a variable access, but it should point to the WatchpointSet
https://bugs.webkit.org/show_bug.cgi?id=124539

Reviewed by Mark Hahnenberg.
        
This is in preparation for getting put_to_scope to directly invalidate the watchpoint set
on stores, which will allow us to run constant inference on all globals.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::finalizeUnconditionally):
* bytecode/Instruction.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* runtime/JSScope.cpp:
(JSC::abstractAccess):
(JSC::JSScope::abstractResolve):
* runtime/JSScope.h:
(JSC::ResolveOp::ResolveOp):
* runtime/SymbolTable.h:
(JSC::SymbolTableEntry::watchpointSet):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
At some scales, opaque compositing layers have garbage pixels around the edges
https://bugs.webkit.org/show_bug.cgi?id=124541

Reviewed by Dean Jackson.

Layers get marked as having opaque contents when their background is
known to paint the entire layer. However, this failed to take into
account two reasons why every pixel may not get painted.

First, subpixel layout can result in non-integral RenderLayer
bounds, which will get rounded up to an integral GraphicsLayer
size. When this happens we may not paint edge pixels.

Second, at non-integral scale factors, graphics context scaling
may cause us to not paint edge pixels.

Fix by only marking PlatformCALayers as having opaque contents
when the contentsScale of the layer is integral.

Not testable, because we can't guarantee to get garbage pixels
in a ref test, and layer dumps show GraphicsLayer's notion of
content opaqueness, not the one we set on the PlatformCALayer.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::isIntegral):
(WebCore::clampedContentsScaleForScale):
(WebCore::GraphicsLayerCA::updateRootRelativeScale):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateContentsOpaque):
(WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact):
Drive-by typo fix.
(WebCore::GraphicsLayerCA::noteChangesForScaleSensitiveProperties):
* platform/graphics/ca/GraphicsLayerCA.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix attempt on GTK and EFL port after r159461

* CMakeLists.txt: Added APINavigationData.cpp and removed WebNavigationData.cpp
* GNUmakefile.list.am: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify and reformat the output of performance tests inside test runners
https://bugs.webkit.org/show_bug.cgi?id=124496

Reviewed by Antti Koivisto.

PerformanceTests:

As a preparation to support subtests for Dromaeo and DoYouEvenBench, simplify the output performance tests generate.
Also modernize the output to better support "metric" concept we introduced a while ago.

New output on Dromaeo/dom-attr looks like this:
-----------------------------------------------
Running 5 times
getAttribute -> [1105, 1108, 1134, 1137, 1154]
element.property -> [1634, 1655, 1685, 1696, 1723]
setAttribute -> [646.3536463536464, 651, 651, 656.3436563436563, 658]
element.property = value -> [934, 949, 963, 964, 974]
element.expando = value -> [419, 419.5804195804196, 421.57842157842157, 425.57442557442556, 429]
element.expando -> [501, 517, 519.4805194805194, 521.4785214785214, 525]

    1: 117.40644785571585 runs/s
    2: 118.84720469666297 runs/s
    3: 119.80547640905021 runs/s
    4: 120.51886194758805 runs/s
    5: 121.51924380569295 runs/s

:Time -> [117.40644785571585, 118.84720469666297, 119.80547640905021, 120.51886194758805, 121.51924380569295] runs/s
    mean: 119.619446942942 runs/s
    median: 119.80547640905021 runs/s
    stdev: 1.5769040458730506 runs/s
    min: 117.40644785571585 runs/s
    max: 121.51924380569295 runs/s
-----------------------------------------------

* Dromaeo/resources/dromaeorunner.js:
(DRT.progress): Use the new format for subtest reports.
* resources/runner.js:
(.): Declare verboseLogging, which is set to true outside of test runners.
(PerfTestRunner.logInfo): Use verboseLogging instead of directly checking window.testRunner.
(PerfTestRunner.logDetail): Added. Logs informative text with a label such as "mean: 123 s" with 4-space indentation.
(PerfTestRunner.logStatistics): Use logDetail.
(.start): Initialize verboseLogging. Also log "Running 20 times" as an informative log using logDetail.
(.ignoreWarmUpAndLog): Use logDetail for showing the progress. These logs were useless inside test runners anyway
because perftest didn't get to see any output until the test finished running.
(.finish): Call logStatistics with metric name as opposed to a label. Each metric name is now prefixed with ':' to be
distinguishable from subtests, making the new format forward compatible.

Tools:

As a preparation to support subtests for Dromaeo and DoYouEvenBench, simplify the output
performance tests generate. Instead of spitting out noise in PerfTestRunner (runner.js)
and ignoring it in PerfTest._filter_output (perftest.py), simply avoid generating it in
the first place.

Also modernize the output to adopt "metric" concept better and make it forward compatible
with subtests.

With this patch, performance tests written using runner.js only produces empty lines or
lines of the following format inside test runners (DumpRenderTree and WebKitTestRunner):
<subtest name> -> [<value 1>, <value 2>, ...]
:<metric name> -> [<value 1>, <value 2>, ...]

This greatly simplifies the parsing logic inside PerfTest._run_with_driver.

* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest): Removed a bunch of regular expressions that are no longer used.
(PerfTest._run_with_driver): Just parse the values and description and treat everything
else as errors.

* Scripts/webkitpy/performance_tests/perftest_unittest.py:
(TestPerfTest.test_parse_output): Removed the junk.
(TestPerfTest._assert_failed_on_line): Extracted from test_parse_output_with_failing_line,
which was removed in favor of the tests below.
(TestPerfTest.test_parse_output_with_running_five_times): Added.
(TestPerfTest.test_parse_output_with_detailed_info): Added.
(TestPerfTest.test_parse_output_with_statistics): Added.
(TestPerfTest.test_parse_output_with_description): Removed the junk.
(TestPerfTest.test_parse_output_with_subtests): Ditto.
(TestSingleProcessPerfTest.test_use_only_one_process): Ditto.

* Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
(EventTargetWrapperTestData): Ditto.
(SomeParserTestData): Ditto.
(MemoryTestData): Ditto.

LayoutTests:

Rebaseline the expected result now that the output has been simplified.

* fast/harness/perftests/runs-per-second-log-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ARM64: Update getHostCallReturnValue() to use architected frame pointer register
https://bugs.webkit.org/show_bug.cgi?id=124520

Reviewed by Filip Pizlo.

Changed from using the prior JSC specific x25 callframe register to the ARM64
architected x29 (fp) register.  This change should have been done as part of
https://bugs.webkit.org/show_bug.cgi?id=123956.

* jit/JITOperations.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Update localizedStrings, remove stale string
https://bugs.webkit.org/show_bug.cgi?id=124543

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-11-18
Reviewed by Jessie Berlin.

Remove stale localized strings after r124543 remove the old color picker.

* Localizations/en.lproj/localizedStrings.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Add ability to fetch only visible table rows.
https://bugs.webkit.org/show_bug.cgi?id=124430

Reviewed by Chris Fleizach.

Source/WebCore:

Adding AccessibilityTable::visibleRows method to support AXVisibleRows attribute mac platform.

Test: platform/mac/accessibility/table-visible-rows.html

* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::columnHeaders):
(WebCore::AccessibilityTable::rowHeaders):
(WebCore::AccessibilityTable::visibleRows):
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableRow.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

Tools:

Adding method to fetch array of AccessibilityUIElements to help with test brevity and test breakage. Specifically, we
have a good deal of churn any time we add or update an element attribute. This happens because the number of tests
that rely on a simple element description text dump to verify a single attribute is non trivial. So any time you
change add an attribute, you have to update all the tests that are now implicitly verifying this new attribute. But
as the test guidelines state, our tests should be more focused and specific about what they test.

* DumpRenderTree/AccessibilityUIElement.cpp:
(uiElementArrayAttributeValueCallback):
(AccessibilityUIElement::uiElementArrayAttributeValue):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::uiElementArrayAttributeValue):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::uiElementArrayAttributeValue):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::uiElementArrayAttributeValue):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::getUIElementsWithAttribute):
(WTR::AccessibilityUIElement::uiElementArrayAttributeValue):

LayoutTests:

Adding test to make sure AXVisibleRows behaves correctly.

* platform/mac/accessibility/table-visible-rows-expected.txt: Added.
* platform/mac/accessibility/table-visible-rows.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ARM64 CRASH: Debug builds crash in emitPointerValidation()
https://bugs.webkit.org/show_bug.cgi?id=124545

Reviewed by Filip Pizlo.

Changed emitPointerValidation() to use pushToSave() and popToRestore() as
all macro assemblers have an implementation of these functions.

* jit/ThunkGenerators.cpp:
(JSC::emitPointerValidation):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove IDBServerConnection's deprecatedBackingStore()
https://bugs.webkit.org/show_bug.cgi?id=124547

Reviewed by Tim Horton.

It is no longer needed, as the front end no longer knows about the backing store.

* Modules/indexeddb/IDBServerConnection.h:

* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
TestWebKitAPI crashes when running under GuardMalloc
https://bugs.webkit.org/show_bug.cgi?id=124546

Reviewed by Tim Horton.

* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::downloadFinished):
Grab the download ID before removing the DownloadProxy from the map.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Disable assertions in PageLoadState.cpp for now.

* UIProcess/PageLoadState.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r159430.
http://trac.webkit.org/changeset/159430
https://bugs.webkit.org/show_bug.cgi?id=124548

WebCore can know nothing about nor use files from WebKit/
(Requested by thorton on #webkit).

Source/WebCore:

* DerivedSources.make:

Source/WebKit/win:

* WebView.cpp:
(webKitVersionString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Let's try this again.

* UIProcess/PageLoadState.cpp:

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