WebKit-https.git
6 years agoUse XPC services in the iOS Simulator, but not in Mountain Lion
mitz@apple.com [Sat, 19 Apr 2014 20:10:49 +0000 (20:10 +0000)]
Use XPC services in the iOS Simulator, but not in Mountain Lion
https://bugs.webkit.org/show_bug.cgi?id=131894

Reviewed by Anders Carlsson.

* Configurations/NetworkService.Development.xcconfig: Defined INFOPLIST_FILE for the
Simulator.
* Configurations/NetworkService.xcconfig: Ditto.
* Configurations/WebContentService.Development.xcconfig: Ditto.
* Configurations/WebContentService.xcconfig: Ditto.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::systemDirectoryPath): Added this helper function that returns a slash-terminated
path to the System directory in the current runtime.
(WebKit::ProcessLauncher::launchProcess): Changed to use the above function to tell whether
a development version of WebKit2 is being used.
* WebKit2Prefix.h: Set WTF_USE_XPC_SERVICES to 1 when targeting the iOS Simulator, but not
when targeting Mountain Lion.

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

6 years agoTelephone number detection should respect its setting consistently
darin@apple.com [Sat, 19 Apr 2014 19:47:27 +0000 (19:47 +0000)]
Telephone number detection should respect its setting consistently
https://bugs.webkit.org/show_bug.cgi?id=131893
rdar://problem/16597639

Reviewed by Tim Horton.

* editing/Editor.cpp:
(WebCore::Editor::respondToChangedSelection): Only start the timer
if shouldDetectTelephoneNumbers returns true.
(WebCore::Editor::shouldDetectTelephoneNumbers): Added. Calls both
isTelephoneNumberParsingEnabled and TelephoneNumberDetector::isSupported.
(WebCore::Editor::scanSelectionForTelephoneNumbers): Use
shouldDetectTelephoneNumbers.
(WebCore::Editor::clearDataDetectedTelephoneNumbers): Use document()
instead of m_frame.document().

* editing/Editor.h: Added declaration of shouldDetectTelephoneNumbers.

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

6 years ago[CSS Regions] Harden the layout in case there are no regions
darin@apple.com [Sat, 19 Apr 2014 18:57:46 +0000 (18:57 +0000)]
[CSS Regions] Harden the layout in case there are no regions
https://bugs.webkit.org/show_bug.cgi?id=131517

Patch by Andrei Bucur <abucur@adobe.com> on 2014-04-19
Reviewed by Mihnea Ovidenie.

Source/WebCore:
The patch fixes the cases when the content of a flow thread is not
properly invalidated when all the regions of its chain are removed.

Test: fast/regions/simplified-layout-no-regions.html

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::ensureOverflowForBox):

LayoutTests:
Add a test that verifies the content of a flow thread is updated when all
the regions are removed.

* fast/regions/simplified-layout-no-regions-expected.txt: Added.
* fast/regions/simplified-layout-no-regions.html: Added.

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

6 years agobmalloc: Mutex should be harder to use wrong
ggaren@apple.com [Sat, 19 Apr 2014 18:36:56 +0000 (18:36 +0000)]
bmalloc: Mutex should be harder to use wrong
https://bugs.webkit.org/show_bug.cgi?id=131879

Reviewed by Andreas Kling.

Mutex now has a proper constructor, so you can't deadlock by forgetting
to initialize it.

* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/Allocator.cpp:
(bmalloc::Allocator::processXSmallAllocatorLog):
(bmalloc::Allocator::processSmallAllocatorLog):
(bmalloc::Allocator::processMediumAllocatorLog):
(bmalloc::Allocator::allocateLarge):
(bmalloc::Allocator::allocateXLarge): Global replace Mutex => StaticMutex,
since the Heap mutex is a static.

* bmalloc/AsyncTask.h:
(bmalloc::Function>::AsyncTask): Use Mutex, since we're not static. No
need for explicit initialization anymore.

* bmalloc/Deallocator.cpp:
(bmalloc::Deallocator::scavenge):
(bmalloc::Deallocator::deallocateLarge):
(bmalloc::Deallocator::deallocateXLarge):
(bmalloc::Deallocator::processObjectLog):
(bmalloc::Deallocator::deallocateSmallLine):
(bmalloc::Deallocator::deallocateXSmallLine):
(bmalloc::Deallocator::allocateSmallLine):
(bmalloc::Deallocator::allocateXSmallLine):
(bmalloc::Deallocator::deallocateMediumLine):
(bmalloc::Deallocator::allocateMediumLine):
* bmalloc/Deallocator.h:
* bmalloc/Heap.cpp:
(bmalloc::sleep):
(bmalloc::Heap::Heap):
(bmalloc::Heap::concurrentScavenge):
(bmalloc::Heap::scavenge):
(bmalloc::Heap::scavengeSmallPages):
(bmalloc::Heap::scavengeXSmallPages):
(bmalloc::Heap::scavengeMediumPages):
(bmalloc::Heap::scavengeLargeRanges):
(bmalloc::Heap::allocateXSmallLineSlowCase):
(bmalloc::Heap::allocateSmallLineSlowCase):
(bmalloc::Heap::allocateMediumLineSlowCase):
(bmalloc::Heap::allocateXLarge):
(bmalloc::Heap::deallocateXLarge):
(bmalloc::Heap::allocateLarge):
(bmalloc::Heap::deallocateLarge):
* bmalloc/Heap.h:
(bmalloc::Heap::deallocateXSmallLine):
(bmalloc::Heap::allocateXSmallLine):
(bmalloc::Heap::deallocateSmallLine):
(bmalloc::Heap::allocateSmallLine):
(bmalloc::Heap::deallocateMediumLine):
(bmalloc::Heap::allocateMediumLine):
* bmalloc/Line.h:
(bmalloc::Line<Traits>::deref):
* bmalloc/Mutex.cpp: Removed.
* bmalloc/Mutex.h:
(bmalloc::Mutex::Mutex):
(bmalloc::Mutex::init): Deleted.
(bmalloc::Mutex::try_lock): Deleted.
(bmalloc::Mutex::lock): Deleted.
(bmalloc::Mutex::unlock): Deleted.
* bmalloc/Page.h:
(bmalloc::Page<Traits>::ref):
(bmalloc::Page<Traits>::deref):
(bmalloc::Page<Traits>::refCount):
* bmalloc/PerProcess.h:
(bmalloc::PerProcess::mutex):
(bmalloc::PerProcess<T>::getSlowCase):
* bmalloc/StaticMutex.cpp: Added.
(bmalloc::StaticMutex::lockSlowCase):
* bmalloc/StaticMutex.h: Added.
(bmalloc::StaticMutex::init):
(bmalloc::StaticMutex::try_lock):
(bmalloc::StaticMutex::lock):
(bmalloc::StaticMutex::unlock):
* bmalloc/VMHeap.h:
(bmalloc::VMHeap::deallocateXSmallPage):
(bmalloc::VMHeap::deallocateSmallPage):
(bmalloc::VMHeap::deallocateMediumPage):
(bmalloc::VMHeap::deallocateLargeRange):
* bmalloc/bmalloc.h:
(bmalloc::api::scavenge): Global replace Mutex => StaticMutex,
since the Heap mutex is a static.

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

6 years agoCleared executable bits on many .html and .txt files.
darin@apple.com [Sat, 19 Apr 2014 18:12:39 +0000 (18:12 +0000)]
Cleared executable bits on many .html and .txt files.

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

6 years agohttps://bugs.webkit.org/show_bug.cgi?id=131594
zalan@apple.com [Sat, 19 Apr 2014 17:48:08 +0000 (17:48 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=131594
Subpixel rendering: WK1: Wrong repaint rect is calculated when layer has non-compositing transform.

Reviewed by Simon Fraser.

We need to snap the repaint rect for transformed object the same way when we paint them.

Test: fast/repaint/hidpi-wrong-repaint-rect-when-parent-has-noncompositing-transform.html

Source/WebCore:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):

LayoutTests:
* fast/repaint/hidpi-wrong-repaint-rect-when-parent-has-noncompositing-transform-expected.txt: Added.
* fast/repaint/hidpi-wrong-repaint-rect-when-parent-has-noncompositing-transform.html: Added.

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

6 years ago[Cocoa] Crash in -[WKWebProcessPlugInHitTestResult nodeHandle] when nodeHandle()...
mitz@apple.com [Sat, 19 Apr 2014 17:46:07 +0000 (17:46 +0000)]
[Cocoa] Crash in -[WKWebProcessPlugInHitTestResult nodeHandle] when nodeHandle() is null
https://bugs.webkit.org/show_bug.cgi?id=131888

Reviewed by Jon Honeycutt.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm:
(-[WKWebProcessPlugInHitTestResult nodeHandle]): Added a null check.

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

6 years ago[iOS WK2] Fuzzy layers on sites using perspective and transforms
simon.fraser@apple.com [Sat, 19 Apr 2014 17:36:22 +0000 (17:36 +0000)]
[iOS WK2] Fuzzy layers on sites using perspective and transforms
https://bugs.webkit.org/show_bug.cgi?id=131873
<rdar://problem/16540576>

Reviewed by Sam Weinig.

Always set rasterizationScale on CALayers in the UI process
(as we do for WK1) so that layers are rasterized taking the
device scale into account. We can do unconditionally; this
is benign on layers that CA doesn't rasterize.

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer):

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

6 years agoUse 'override' in GraphicsLayerCA
simon.fraser@apple.com [Sat, 19 Apr 2014 17:36:16 +0000 (17:36 +0000)]
Use 'override' in GraphicsLayerCA
https://bugs.webkit.org/show_bug.cgi?id=131882

Reviewed by Tim Horton.

Source/WebCore:

Add 'override' to all overridden functions. Found a few that need
not have been virtual. Removed "allowTiledLayer" stuff that was
never called.

* WebCore.exp.in:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::requiresTiledLayer):
(WebCore::GraphicsLayerCA::setAllowTiledLayer): Deleted.
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::platformCALayer):
(WebCore::GraphicsLayerCA::hasContentsLayer): Deleted.
(WebCore::GraphicsLayerCA::allowTiledLayer): Deleted.
(WebCore::GraphicsLayerCA::isGraphicsLayerCA): Deleted.
(WebCore::GraphicsLayerCA::platformCALayerLayoutSublayersOfLayer): Deleted.
(WebCore::GraphicsLayerCA::platformCALayerRespondsToLayoutChanges): Deleted.
(WebCore::GraphicsLayerCA::platformCALayerContentsOrientation): Deleted.
(WebCore::GraphicsLayerCA::platformCALayerShowDebugBorders): Deleted.
(WebCore::GraphicsLayerCA::platformCALayerIncrementRepaintCount): Deleted.
(WebCore::GraphicsLayerCA::platformCALayerContentsOpaque): Deleted.
(WebCore::GraphicsLayerCA::platformCALayerDrawsContent): Deleted.
(WebCore::GraphicsLayerCA::platformCALayerLayerDidDisplay): Deleted.

Source/WebKit2:

Add an 'override'.

* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:

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

6 years agoAssertion in WebPage::runModal accesses object after it may have been destroyed
darin@apple.com [Sat, 19 Apr 2014 17:04:52 +0000 (17:04 +0000)]
Assertion in WebPage::runModal accesses object after it may have been destroyed
https://bugs.webkit.org/show_bug.cgi?id=131875

Reviewed by Anders Carlsson.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runModal): Ref the WebPage so it's still around so we can
check the m_isRunningModal flag.

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

6 years ago[WebGL] Two tests failing on Mountain Lion after r167520
dino@apple.com [Sat, 19 Apr 2014 06:57:27 +0000 (06:57 +0000)]
[WebGL] Two tests failing on Mountain Lion after r167520
https://bugs.webkit.org/show_bug.cgi?id=131886

Skip two failing tests.

* platform/mac/TestExpectations:

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

6 years agoREGRESSION(r164205): WebKit crash @StructureIDTable::get.
mark.lam@apple.com [Sat, 19 Apr 2014 06:53:46 +0000 (06:53 +0000)]
REGRESSION(r164205): WebKit crash @StructureIDTable::get.
<https://webkit.org/b/130539>

Reviewed by Geoffrey Garen.

prepareOSREntry() prepares for OSR entry by first copying the local var
values from the baseline frame to a scartch buffer, which is then used
to fill in the locals in their new position in the DFG frame.  Unfortunately,
prepareOSREntry() was using the DFG frame's frameRegisterCount as the frame
size of the baseline frame.  As a result, some values of locals in the
baseline frame were not saved off, and the DFG frame may get initialized
with random content that happened to be in the uninitialized (and possibly
unallocated) portions of the scratch buffer.

The fix is to use OSREntryData::m_expectedValues.numberOfLocals() as the
number of locals in the baseline frame that we want to copy to the scratch
buffer.

Note: osrEntryThunkGenerator() is expecting the DFG frameRegisterCount
at offset 0 in the scratch buffer.  So, we continue to write that value
there, not the baseline frame size.

* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):

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

6 years agoSkip fast/dom/gc-attribute-node.html which is flaky
timothy@apple.com [Sat, 19 Apr 2014 06:04:56 +0000 (06:04 +0000)]
Skip fast/dom/gc-attribute-node.html which is flaky
https://bugs.webkit.org/show_bug.cgi?id=131885

* platform/mac/TestExpectations:

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

6 years agoWeb Inspector: Move InspectorProfilerAgent to JavaScriptCore
timothy@apple.com [Sat, 19 Apr 2014 06:03:40 +0000 (06:03 +0000)]
Web Inspector: Move InspectorProfilerAgent to JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=131673

Passes existing profiler and inspector tests.

Reviewed by Joseph Pecoraro.

* CMakeLists.txt:
* DerivedSources.make:

Source/JavaScriptCore:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/JSConsoleClient.cpp:
(Inspector::JSConsoleClient::JSConsoleClient):
(Inspector::JSConsoleClient::profile):
(Inspector::JSConsoleClient::profileEnd):
(Inspector::JSConsoleClient::count): Deleted.
* inspector/JSConsoleClient.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
* inspector/agents/InspectorProfilerAgent.cpp: Added.
(Inspector::InspectorProfilerAgent::InspectorProfilerAgent):
(Inspector::InspectorProfilerAgent::~InspectorProfilerAgent):
(Inspector::InspectorProfilerAgent::addProfile):
(Inspector::InspectorProfilerAgent::createProfileHeader):
(Inspector::InspectorProfilerAgent::enable):
(Inspector::InspectorProfilerAgent::disable):
(Inspector::InspectorProfilerAgent::getUserInitiatedProfileName):
(Inspector::InspectorProfilerAgent::getProfileHeaders):
(Inspector::buildInspectorObject):
(Inspector::InspectorProfilerAgent::buildProfileInspectorObject):
(Inspector::InspectorProfilerAgent::getCPUProfile):
(Inspector::InspectorProfilerAgent::removeProfile):
(Inspector::InspectorProfilerAgent::reset):
(Inspector::InspectorProfilerAgent::didCreateFrontendAndBackend):
(Inspector::InspectorProfilerAgent::willDestroyFrontendAndBackend):
(Inspector::InspectorProfilerAgent::start):
(Inspector::InspectorProfilerAgent::stop):
(Inspector::InspectorProfilerAgent::setRecordingProfile):
(Inspector::InspectorProfilerAgent::startProfiling):
(Inspector::InspectorProfilerAgent::stopProfiling):
* inspector/agents/InspectorProfilerAgent.h: Added.
* inspector/agents/JSGlobalObjectProfilerAgent.cpp: Copied from Source/WebCore/inspector/ScriptProfile.idl.
(Inspector::JSGlobalObjectProfilerAgent::JSGlobalObjectProfilerAgent):
(Inspector::JSGlobalObjectProfilerAgent::profilingGlobalExecState):
* inspector/agents/JSGlobalObjectProfilerAgent.h: Copied from Source/WebCore/inspector/ScriptProfile.idl.
* inspector/protocol/Profiler.json: Renamed from Source/WebCore/inspector/protocol/Profiler.json.
* profiler/Profile.h:
* runtime/ConsoleClient.h:

Source/WebCore:
* ForwardingHeaders/inspector/agents/InspectorProfilerAgent.h: Added.
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptProfile.cpp: Removed.
* bindings/js/ScriptProfile.h:
* bindings/js/ScriptProfiler.cpp: Removed.
* bindings/js/ScriptProfiler.h: Removed.
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::profilerEnabled):
(WebCore::InspectorInstrumentation::startProfiling):
(WebCore::InspectorInstrumentation::stopProfiling):
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorController.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
(WebCore::InspectorInstrumentation::startProfilingImpl):
(WebCore::InspectorInstrumentation::stopProfilingImpl):
(WebCore::InspectorInstrumentation::consoleTimeStampImpl): Deleted.
* inspector/InspectorInstrumentation.h:
* inspector/InspectorProfilerAgent.cpp: Removed.
* inspector/InspectorProfilerAgent.h: Removed.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::startProfiling):
(WebCore::stopProfiling):
(WebCore::InspectorTimelineAgent::willCallFunction):
(WebCore::InspectorTimelineAgent::didCallFunction):
(WebCore::InspectorTimelineAgent::willEvaluateScript):
(WebCore::InspectorTimelineAgent::didEvaluateScript):
(WebCore::InspectorTimelineAgent::didDispatchXHRLoadEvent): Deleted.
* inspector/InstrumentingAgents.h:
(WebCore::InstrumentingAgents::inspectorProfilerAgent):
(WebCore::InstrumentingAgents::setInspectorProfilerAgent):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::sourceMapURLForScript): Deleted.
* inspector/PageDebuggerAgent.h:
* inspector/PageProfilerAgent.cpp: Added.
(WebCore::PageProfilerAgent::PageProfilerAgent):
(WebCore::PageProfilerAgent::profilingGlobalExecState):
* inspector/PageProfilerAgent.h: Added.
(WebCore::PageProfilerAgent::~PageProfilerAgent):
* inspector/ScriptProfile.idl:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::appendProfile):
* inspector/TimelineRecordFactory.h:
* inspector/WebConsoleAgent.cpp:
* inspector/WebProfilerAgent.cpp: Added.
(WebCore::WebProfilerAgent::WebProfilerAgent):
(WebCore::WebProfilerAgent::enable):
(WebCore::WebProfilerAgent::disable):
* inspector/WebProfilerAgent.h: Added.
(WebCore::WebProfilerAgent::~WebProfilerAgent):
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
* inspector/WorkerProfilerAgent.cpp: Added.
(WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
(WebCore::WorkerProfilerAgent::profilingGlobalExecState):
* inspector/WorkerProfilerAgent.h: Added.
(WebCore::WorkerProfilerAgent::~WorkerProfilerAgent):
* loader/appcache/ApplicationCacheGroup.cpp:
* page/PageConsole.cpp:
(WebCore::PageConsole::profile):
(WebCore::PageConsole::profileEnd):
(WebCore::PageConsole::time): Deleted.
(WebCore::PageConsole::timeEnd): Deleted.
(WebCore::PageConsole::timeStamp): Deleted.
* page/PageConsole.h:
* testing/Internals.cpp:
* testing/Internals.h:
* xml/XMLHttpRequest.cpp:

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

6 years agoContents of directly composited image layers are sometimes missing
simon.fraser@apple.com [Sat, 19 Apr 2014 05:31:39 +0000 (05:31 +0000)]
Contents of directly composited image layers are sometimes missing
https://bugs.webkit.org/show_bug.cgi?id=131880

Reviewed by Tim Horton.

Source/WebCore:
RenderLayerBacking::updateGraphicsLayerGeometry() tested whether a
GraphicsLayer had a contents layer to determine whether to call code
that updates the contents rect. However, on Mac, we don't make a contents
layer until later at layer flush time. That would result in an empty
contentsRect being set.

Fix by renaming GraphicsLayer::hasContentsLayer() to usesContentsLayer(),
and on Mac consulting the m_contentsLayerPurpose flag, which is set
at the appropriate time.

Test: compositing/images/update-content-rect.html

* platform/ScrollView.cpp:
(WebCore::positionScrollbarLayer):
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::getDebugBorderInfo):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::usesContentsLayer):
(WebCore::GraphicsLayer::hasContentsLayer): Deleted.
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::hasContentsLayer): Deleted.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::GraphicsLayerTextureMapper::usesContentsLayer):
(WebCore::GraphicsLayerTextureMapper::hasContentsLayer): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
(WebCore::RenderLayerBacking::compositingLayerType):

LayoutTests:
Test that that shows the issue in Safari, but not in the test
runner because of timing issues, but maybe it will some day.

* compositing/images/update-content-rect-expected.html: Added.
* compositing/images/update-content-rect.html: Added.

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

6 years agoUnreviewed, rolling out r167527.
commit-queue@webkit.org [Sat, 19 Apr 2014 05:19:30 +0000 (05:19 +0000)]
Unreviewed, rolling out r167527.
https://bugs.webkit.org/show_bug.cgi?id=131883

Broke 32-bit build (Requested by ap on #webkit).

Reverted changeset:

"[Mac] implement WebKitDataCue"
https://bugs.webkit.org/show_bug.cgi?id=131799
http://trac.webkit.org/changeset/167527

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

6 years ago[Mac] implement WebKitDataCue
eric.carlson@apple.com [Sat, 19 Apr 2014 03:46:44 +0000 (03:46 +0000)]
[Mac] implement WebKitDataCue
https://bugs.webkit.org/show_bug.cgi?id=131799

Reviewed by Dean Jackson.

Source/JavaScriptCore:
* Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.

Source/WebCore:
Tests: http/tests/media/track-in-band-hls-metadata.html
       media/track/track-datacue-value.html

* Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
* DerivedSources.make: Add ENABLE_DATACUE_VALUE to HTML_FLAGS when appropriate.

* CMakeLists.txt: Add JSDataCueCustom.cpp.
* bindings/js/JSBindingsAllInOne.cpp:
* WebCore.xcodeproj/project.pbxproj: Add new files.

* bindings/js/JSDataCueCustom.cpp: Added.
(WebCore::JSDataCue::value):
(WebCore::JSDataCue::setValue):
(WebCore::JSDataCueConstructor::constructJSDataCue): Custom constructor.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by fixes: don't schedule timeupdate
    events when paused, don't call sort on an Vector that can't be sorted.

* html/track/DataCue.cpp:
(WebCore::DataCue::DataCue): Initialize m_type.
(WebCore::DataCue::~DataCue): Unprotect the JSValue if necessary.
(WebCore::DataCue::data): Ask the platform value for data if non-null.
(WebCore::DataCue::setData): Clear m_platformValue and m_value.
(WebCore::DataCue::isEqual): New.
(WebCore::DataCue::value): Return a JSValue from the platform value, or the value passed
    to the constructor/set by script.
(WebCore::DataCue::setValue): Set m_value.
* html/track/DataCue.h:
* html/track/DataCue.idl:

* html/track/InbandDataTextTrack.cpp:
(WebCore::InbandDataTextTrack::addDataCue): Don't add the same cue more than once.
(WebCore::InbandDataTextTrack::updateDataCue): Update a cue's duration.
(WebCore::InbandDataTextTrack::removeDataCue): Remove an incomplete cue.
(WebCore::InbandDataTextTrack::removeCue): Remove a cue from the incomplete cue map if necessary.
* html/track/InbandDataTextTrack.h:

* html/track/InbandGenericTextTrack.cpp:
(WebCore::InbandGenericTextTrack::addGenericCue): CueMatchRules is now in TextTrackCue instead
    of VTTCue.
* html/track/InbandTextTrack.h:

* html/track/InbandWebVTTTextTrack.cpp:
(WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto.

* html/track/TextTrack.cpp:
(WebCore::TextTrack::hasCue): Ditto.
* html/track/TextTrack.h:

* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::isEqual): New, test base class equality.
* html/track/TextTrackCue.h:

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::isEqual): Call TextTrackCue::isEqual first.
* html/track/TextTrackCueGeneric.h:

* html/track/VTTCue.cpp:
(WebCore::VTTCue::isEqual): Call TextTrackCue::isEqual first.
* html/track/VTTCue.h:

* platform/SerializedPlatformRepresentation.h: Added.
(WebCore::SerializedPlatformRepresentation::~SerializedPlatformRepresentation):
(WebCore::SerializedPlatformRepresentation::SerializedPlatformRepresentation):

* platform/graphics/InbandTextTrackPrivateClient.h: Add methods for DataCue with SerializedPlatformRepresentation.

* platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Added.
(WebCore::InbandMetadataTextTrackPrivateAVF::create):
(WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
(WebCore::InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF):
(WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
(WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
(WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
* platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: Added.

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): currentTrack -> currentTextTrack.
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::setCurrentTextTrack):
(WebCore::MediaPlayerPrivateAVFoundation::setCurrentTrack): Deleted.

Renamed currentTrack and setCurrentTrack to currentTextTrack and setCurrentTextTrack.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::currentTextTrack):
(WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTextTrack):
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTextTrack):
(WebCore::AVFWrapper::setCurrentTextTrack):
(WebCore::AVFWrapper::AVFWrapper):
(WebCore::AVFWrapper::processCue):
(WebCore::AVFWrapper::currentTrack): Deleted.
(WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Deleted.
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Deleted.
(WebCore::AVFWrapper::setCurrentTrack): Deleted.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): currentTrack -> currentTextTrack
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): currentTrack -> currentTextTrack.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): New.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): m_currentTrack -> m_currentTextTrack.
(WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): Renamed from setCurrentTextTrack.
(WebCore::metadataType): Map an AVFoundation metadata key space to a metadata cue type.
(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Process new metadata.
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deleted.

Create a JSValue representation from an AVMetadataItem.
* platform/mac/SerializedPlatformRepresentationMac.h: Added.
(WebCore::SerializedPlatformRepresentationMac::platformType):
(WebCore::SerializedPlatformRepresentationMac::nativeValue):
* platform/mac/SerializedPlatformRepresentationMac.mm: Added.
(WebCore::SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac):
(WebCore::SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac):
(WebCore::SerializedPlatformRepresentationMac::create):
(WebCore::SerializedPlatformRepresentationMac::data):
(WebCore::SerializedPlatformRepresentationMac::deserialize):
(WebCore::SerializedPlatformRepresentationMac::isEqual):
(WebCore::toSerializedPlatformRepresentationMac):
(WebCore::jsValueWithValueInContext):
(WebCore::jsValueWithDataInContext):
(WebCore::jsValueWithArrayInContext):
(WebCore::jsValueWithDictionaryInContext):
(WebCore::jsValueWithAVMetadataItemInContext):

Source/WebKit/mac:
* Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.

Source/WebKit2:
* Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.

Source/WTF:
* wtf/FeatureDefines.h: Define ENABLE_DATACUE_VALUE.

LayoutTests:
* http/tests/media/resources/hls: Added.
* http/tests/media/resources/hls/metadata: Added.
* http/tests/media/resources/hls/metadata/fileSequence0.ts: Added.
* http/tests/media/resources/hls/metadata/fileSequence1.ts: Added.
* http/tests/media/resources/hls/metadata/fileSequence2.ts: Added.
* http/tests/media/resources/hls/metadata/fileSequence3.ts: Added.
* http/tests/media/resources/hls/metadata/prog_index.m3u8: Added.
* http/tests/media/track-in-band-hls-metadata-expected.txt: Added.
* http/tests/media/track-in-band-hls-metadata.html: Added.
* media/track/track-datacue-value-expected.txt: Added.
* media/track/track-datacue-value.html: Added.
* platform/efl/TestExpectations: Skip the new tests.
* platform/gtk/TestExpectations: Ditto.
* platform/mac/js/dom/global-constructors-attributes-expected.txt: Update.
* platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: Update.
* platform/mac/TestExpectations: Skip DataCue test on all Mac versions. Skip HLS test on
    Mountain Lion.
* platform/win/TestExpectations: Skip the new tests.

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

6 years agobmalloc: AsyncTask should use Mutex instead of std::mutex
ggaren@apple.com [Sat, 19 Apr 2014 03:23:03 +0000 (03:23 +0000)]
bmalloc: AsyncTask should use Mutex instead of std::mutex
https://bugs.webkit.org/show_bug.cgi?id=131865

Reviewed by Gavin Barraclough.

std::mutex is so slow that it makes parallelizing simple tasks through
AsyncTask a net regression. Mutex fixes this.

* bmalloc/AsyncTask.h:
(bmalloc::Function>::AsyncTask):
(bmalloc::Function>::join):
(bmalloc::Function>::runSlowCase):
(bmalloc::Function>::entryPoint):
* bmalloc/Mutex.h:
(bmalloc::Mutex::init):

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

6 years agoKeep the WebPageProxy alive for the lifetime of all PageLoadState::Transaction objects
andersca@apple.com [Sat, 19 Apr 2014 01:38:31 +0000 (01:38 +0000)]
Keep the WebPageProxy alive for the lifetime of all PageLoadState::Transaction objects
https://bugs.webkit.org/show_bug.cgi?id=131872
<rdar://problem/15758414>

Reviewed by Dan Bernstein.

* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::PageLoadState):
(WebKit::PageLoadState::Transaction::Transaction):
(WebKit::PageLoadState::Transaction::~Transaction):
* UIProcess/PageLoadState.h:
(WebKit::PageLoadState::Transaction::Transaction): Deleted.
(WebKit::PageLoadState::Transaction::~Transaction): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):

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

6 years agoHarden RenderInline::inlineElementContinuation()
jhoneycutt@apple.com [Sat, 19 Apr 2014 00:49:07 +0000 (00:49 +0000)]
Harden RenderInline::inlineElementContinuation()

<https://bugs.webkit.org/show_bug.cgi?id=131858>

Reviewed by Sam Weinig.

No new tests, as there are no known cases of this happening.

* rendering/RenderInline.cpp:
(WebCore::RenderInline::inlineElementContinuation):
Return nullptr if the continuation is neither a RenderInline nor a
RenderBlock.

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

6 years agoWe shouldn’t create page throttlers for other pages than WebKit2 pages.
slewis@apple.com [Sat, 19 Apr 2014 00:44:50 +0000 (00:44 +0000)]
We shouldn’t create page throttlers for other pages than WebKit2 pages.

Source/WebCore:
Part of <rdar://problem/16473045> Visibility state counters are often incorrect
https://bugs.webkit.org/show_bug.cgi?id=131696

Reviewed by Gavin Barraclough.

No new test since not web exposed.

Page throttlers were being created for SVG images and other page instances that
were not accurately tracking the states that enable and disable page throttling.
Make the throttler an unique ptr and only initialize it for WebKit2.

This also fixes an inefficiency where we would throttle a new page on creation because
we assumed it was visible even if that was not the case.

* WebCore.exp.in:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute): Check page throttler exists.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::started): ditto
* page/Page.cpp:
(WebCore::Page::Page): Don’t automatically create page throttler.
(WebCore::Page::createPageThrottler): Create page throttler.
(WebCore::Page::setViewState): Check page throttler exists.
* page/Page.h:
(WebCore::Page::pageThrottler): Make the page throttler a unique ptr.
* page/PageThrottler.h:
* page/Settings.cpp:
(WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled): Check page throttler exists.

Source/WebKit2:
Part of <rdar://problem/16473045> Visibility state counters are often incorrect.
https://bugs.webkit.org/show_bug.cgi?id=131696

Reviewed by Gavin Barraclough.

Page throttlers were being created for SVG images and other page instances that
were not accurately tracking the states that enable and disable page throttling.
Make the throttler an unique ptr and only initialize it for WebKit2.

This also fixes  an inefficiency where we would throttle a new page on creation because
we assumed it was visible even if that was not the case.

* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Check page throttler exists.
(WebKit::NPRuntimeObjectMap::evaluate):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize page throttler for WebKit2 views.
(WebKit::WebPage::mouseEvent): Check page throttler exists.
(WebKit::WebPage::wheelEvent): ditto
(WebKit::WebPage::keyEvent): ditto

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

6 years agoMove DOM throttling out of the page throttler
slewis@apple.com [Sat, 19 Apr 2014 00:44:47 +0000 (00:44 +0000)]
Move DOM throttling out of the page throttler
<rdar://problem/16473004>
https://bugs.webkit.org/show_bug.cgi?id=131697

Reviewed by Gavin Barraclough.

No new tests since it's not web exposed.

DOM timer throttling is currently part of the page throttler which uses per process
state and per page state to determine when to throttle.  This led us to being overly
conservative when turning DOM throttling off.  It should only respond to view state changes.

Additionally since creating extra page throttlers SVG images caused bugs
in tracking state we'll reserve the page throttler for WebKit2 views.  To avoid regressing
WebKit1 we should move DOM timer throttling back to the page.

* page/Page.cpp:
(WebCore::Page::Page): set DOM timer throttling.
(WebCore::Page::setIsVisuallyIdleInternal): ditto.
(WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged): ditto.
(WebCore::Page::setIsVisible): Update view state masks for WebKit1 to include IsVisibleOrOccluded and IsVisuallyIdle
* page/Page.h:
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler): remove DOM timer throttling.
(WebCore::PageThrottler::started): ditto.
(WebCore::PageThrottler::stopped): ditto.
(WebCore::PageThrottler::hiddenPageDOMTimerThrottlingStateChanged): Deleted.
* page/PageThrottler.h:
* page/Settings.cpp:
(WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):

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

6 years agoDon't allow app sandboxed apps without the network client entitlement to launch the...
andersca@apple.com [Sat, 19 Apr 2014 00:33:46 +0000 (00:33 +0000)]
Don't allow app sandboxed apps without the network client entitlement to launch the network process
https://bugs.webkit.org/show_bug.cgi?id=131868
<rdar://problem/12354188>

Reviewed by Dan Bernstein.

* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
Add a new delegate that implements checkEntitlements().

(NetworkServiceInitializer):
Pass the new delegate to XPCServiceInitializer.

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
Call checkEntitlements.

(WebKit::XPCServiceInitializerDelegate::checkEntitlements):
Return true.

(WebKit::XPCServiceInitializerDelegate::hasEntitlement):
Helper function that returns whether a client has the given entitlement.

(WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
Helper function that checks whether the client is sandboxed.

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

6 years ago[WebGL] Limit maximum texture sizes on older Intel hardware
dino@apple.com [Sat, 19 Apr 2014 00:29:45 +0000 (00:29 +0000)]
[WebGL] Limit maximum texture sizes on older Intel hardware
https://bugs.webkit.org/show_bug.cgi?id=131867

Reviewed by Geoffrey Garen.

Both Chrome and Firefox limit the MAX_TEXTURE_SIZE on
older Intel hardware to be at most 4096. This does the
same for WebKit.

* platform/graphics/Extensions3D.h: Add requiresRestrictedMaximumTextureSize() accessor.
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon): Record the value of GL_RENDERER
and test for "Intel HD Graphics 3000", which is the problematic hardware.
* platform/graphics/opengl/Extensions3DOpenGLCommon.h:
(WebCore::Extensions3DOpenGLCommon::requiresRestrictedMaximumTextureSize): Getter.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::getIntegerv): If you're asking for MAX_TEXTURE_SIZE or
MAX_CUBE_MAP_TEXTURE_SIZE, and you're on problematic hardware, return a clamped value
(4096 and 1024 respectively).

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

6 years agoFind on page - extend API by providing highlighted match index
alice.barraclough@webkit.org [Fri, 18 Apr 2014 23:45:33 +0000 (23:45 +0000)]
Find on page - extend API by providing highlighted match index
https://bugs.webkit.org/show_bug.cgi?id=131776

Patch by Alice Barraclough <alice.barraclough@webkit.org> on 2014-04-18
Reviewed by Tim Horton.

* Shared/WebFindOptions.h: Add an option for determining match index.

Plumb through the API layers the addition of a parameter for match index.
* UIProcess/API/APIFindClient.h:
(API::FindClient::didFindString):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageFindClient):
* UIProcess/API/Cocoa/WKWebView.mm:
(toFindOptions):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
(NS_OPTIONS):
* UIProcess/API/Cocoa/_WKFindDelegate.h:
* UIProcess/Cocoa/FindClient.h:
* UIProcess/Cocoa/FindClient.mm:
(WebKit::FindClient::setDelegate):
(WebKit::FindClient::didFindString):
* UIProcess/WebFindClient.cpp:
(WebKit::WebFindClient::didFindString):
* UIProcess/WebFindClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFindString):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:

The actual tracking of the match index is contained in FindController class.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::FindController): Start out as -1, understood to be an undefined index in this context.
(WebKit::FindController::updateFindUIAfterPageScroll):
    Perform the calculation of matchCount if the flag for DetermineMatchIndex is on.
If matchCount exceeds max, keep the match index undefined because otherwise the finding could advance
to a point where the index exceeds the match count, legitimately. If matchCount doesn't exceed the max, then make
sure the match index, which had been being incremented or decremented blindly back in findString(), is normalized
to be less than match count.
(WebKit::FindController::findString):
    If there is a user selection existing on the page, the next occurence of the string will be found after that
selection. In that case we still want the index to properly reflect its ordinal  position within the entire document.
Use findStringMatchingRanges to provide the match index, and set a flag that prevents the match index from being
blindly incremented or decremented later. After findString() is actually called on the page, increment or decrement
the find index under specific conditions.
(WebKit::FindController::hideFindIndicator): Reset match index when find UI goes away.
* WebProcess/WebPage/FindController.h: Add m_foundStringMatchIndex to private variables.
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindController::hideFindIndicator): Reset match index when find UI goes away.

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

6 years ago[CSS Shapes] Add parsing support for gradients
hmuller@adobe.com [Fri, 18 Apr 2014 23:30:58 +0000 (23:30 +0000)]
[CSS Shapes] Add parsing support for gradients
https://bugs.webkit.org/show_bug.cgi?id=131444

Reviewed by Bem Jones-Bey.

Source/WebCore:
Added support for shape-outside gradient values.

Test: fast/shapes/shape-outside-floats/shape-outside-linear-gradient.html

* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyShape::applyValue): Accept generated images as shape-outside values.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::checkShapeImageOrigin): Generated images get a pass, others do not.
(WebCore::getShapeImageAndRect): Use StyleImage::image() to get a generated image.
(WebCore::ShapeOutsideInfo::isEnabledFor):
* rendering/style/ShapeValue.h:
(WebCore::ShapeValue::isImageValid): Generated images are always considered valid.

LayoutTests:
* fast/shapes/parsing/parsing-shape-outside-expected.txt:
* fast/shapes/parsing/parsing-test-utils.js:
* fast/shapes/shape-outside-floats/shape-outside-linear-gradient-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-linear-gradient.html: Added.

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

6 years agoREGRESSION (r155700): Pasting an image into content-editable regions is broken.
beidson@apple.com [Fri, 18 Apr 2014 23:29:47 +0000 (23:29 +0000)]
REGRESSION (r155700): Pasting an image into content-editable regions is broken.
<rdar://problem/16654156> and https://bugs.webkit.org/show_bug.cgi?id=131844

Reviewed by Enrica Casucci.

* editing/mac/EditorMac.mm:
(WebCore::Editor::createFragmentForImageResourceAndAddResource): Add the ArchiveResource before
  creating the element that uses it.

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

6 years agoActually address Mark's review feedback.
fpizlo@apple.com [Fri, 18 Apr 2014 23:26:19 +0000 (23:26 +0000)]
Actually address Mark's review feedback.

* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::handleExitCounts):

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

6 years agoOptions::maximumExecutionCountsBetweenCheckpoints() should be higher for DFG->FTL...
fpizlo@apple.com [Fri, 18 Apr 2014 23:20:00 +0000 (23:20 +0000)]
Options::maximumExecutionCountsBetweenCheckpoints() should be higher for DFG->FTL tier-up but the same for other tier-ups
https://bugs.webkit.org/show_bug.cgi?id=131850

Reviewed by Mark Hahnenberg.

Templatize ExecutionCounter to allow for two different styles of calculating the
checkpoint threshold.

Appears to be a slight speed-up on DYEBench.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::llintExecuteCounter):
(JSC::CodeBlock::offsetOfJITExecuteCounter):
(JSC::CodeBlock::offsetOfJITExecutionActiveThreshold):
(JSC::CodeBlock::offsetOfJITExecutionTotalCount):
(JSC::CodeBlock::jitExecuteCounter):
* bytecode/ExecutionCounter.cpp:
(JSC::ExecutionCounter<countingVariant>::ExecutionCounter):
(JSC::ExecutionCounter<countingVariant>::forceSlowPathConcurrently):
(JSC::ExecutionCounter<countingVariant>::checkIfThresholdCrossedAndSet):
(JSC::ExecutionCounter<countingVariant>::setNewThreshold):
(JSC::ExecutionCounter<countingVariant>::deferIndefinitely):
(JSC::applyMemoryUsageHeuristics):
(JSC::applyMemoryUsageHeuristicsAndConvertToInt):
(JSC::ExecutionCounter<countingVariant>::hasCrossedThreshold):
(JSC::ExecutionCounter<countingVariant>::setThreshold):
(JSC::ExecutionCounter<countingVariant>::reset):
(JSC::ExecutionCounter<countingVariant>::dump):
(JSC::ExecutionCounter::ExecutionCounter): Deleted.
(JSC::ExecutionCounter::forceSlowPathConcurrently): Deleted.
(JSC::ExecutionCounter::checkIfThresholdCrossedAndSet): Deleted.
(JSC::ExecutionCounter::setNewThreshold): Deleted.
(JSC::ExecutionCounter::deferIndefinitely): Deleted.
(JSC::ExecutionCounter::applyMemoryUsageHeuristics): Deleted.
(JSC::ExecutionCounter::applyMemoryUsageHeuristicsAndConvertToInt): Deleted.
(JSC::ExecutionCounter::hasCrossedThreshold): Deleted.
(JSC::ExecutionCounter::setThreshold): Deleted.
(JSC::ExecutionCounter::reset): Deleted.
(JSC::ExecutionCounter::dump): Deleted.
* bytecode/ExecutionCounter.h:
(JSC::formattedTotalExecutionCount):
(JSC::ExecutionCounter::maximumExecutionCountsBetweenCheckpoints):
(JSC::ExecutionCounter::clippedThreshold):
(JSC::ExecutionCounter::formattedTotalCount): Deleted.
* dfg/DFGJITCode.h:
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::handleExitCounts):
* llint/LowLevelInterpreter.asm:
* runtime/Options.h:

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

6 years agoCorrect some issues small issues in WK2 file upload InjectedBundle APIs
commit-queue@webkit.org [Fri, 18 Apr 2014 23:11:06 +0000 (23:11 +0000)]
Correct some issues small issues in WK2 file upload InjectedBundle APIs
https://bugs.webkit.org/show_bug.cgi?id=131852

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-04-18
Reviewed by Dan Bernstein.

* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
(API::InjectedBundle::PageUIClient::shouldGenerateFileForUpload):
The default return value, meaning no, should return the null string. The
result is checked later, and null string is a special value meaning no.

* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::generateFileForUpload):
Pre-check for the correct client function we will use.

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

6 years agoAdd mention of Safari Debug menu and finding out the WebProcess that corresponds...
bjonesbe@adobe.com [Fri, 18 Apr 2014 22:56:01 +0000 (22:56 +0000)]
Add mention of Safari Debug menu and finding out the WebProcess that corresponds to a tab
https://bugs.webkit.org/show_bug.cgi?id=131791

Reviewed by Sam Weinig.

* building/debug.html:

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

6 years ago[iOS] REGRESSION (r167039): WebKit incorrectly sets a background process assertion...
aestes@apple.com [Fri, 18 Apr 2014 22:48:39 +0000 (22:48 +0000)]
[iOS] REGRESSION (r167039): WebKit incorrectly sets a background process assertion state when displaying a PDF
https://bugs.webkit.org/show_bug.cgi?id=131860
<rdar://problem/16631282>

Reviewed by Tim Horton.

We were basing our process assertion state on whether or not the
process had a WKContentView in a window, but when displaying a PDF
we've removed the WKContentView from the window. Base this decision
instead on whether or not the WKWebView is in the window.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView didMoveToWindow]):
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewInWindow):

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

6 years agoAdded some more Membuster recordings to MallocBench
ggaren@apple.com [Fri, 18 Apr 2014 22:31:34 +0000 (22:31 +0000)]
Added some more Membuster recordings to MallocBench
https://bugs.webkit.org/show_bug.cgi?id=131862

Reviewed by Sam Weinig.

* MallocBench/MallocBench/Benchmark.cpp:
(Benchmark::Benchmark):
(Benchmark::run):
* MallocBench/MallocBench/Benchmark.h:
* MallocBench/MallocBench/CommandLine.cpp:
* MallocBench/MallocBench/CommandLine.h:
(CommandLine::runs): Added a --runs option, so we can specify zero runs
for memory warning benchmarks. Those benchmarks want zero runs so that
they can perform a single warmup, which does not free all allocated
objects, and then see how far back to 0MB they can get. Running multiple
times would accumulate leaks, which is not representative of the
simulated scenario.

* MallocBench/MallocBench/Interpreter.cpp:
(Interpreter::Interpreter):
(Interpreter::run):
* MallocBench/MallocBench/Interpreter.h: Support not deallocating all
objects allocated during the recording, so we can do low memory warning
memory use measurements, as above.

* MallocBench/MallocBench/flickr.cpp:
(benchmark_flickr_memory_warning):
* MallocBench/MallocBench/main.cpp:
(main):
* MallocBench/MallocBench/reddit.cpp:
(benchmark_reddit_memory_warning):
* MallocBench/MallocBench/theverge.cpp:
(benchmark_theverge_memory_warning): Adopt the API above.

* MallocBench/run-malloc-benchmarks: I took a first pass at listing all
available benchmarks here. Then I commented out the benchmarks that
probably aren't reasonable to run by default.

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

6 years ago[GTK] Add llvmpipe (Mesa) to the JHBuild moduleset and force it when running layout...
mrobinson@webkit.org [Fri, 18 Apr 2014 21:41:39 +0000 (21:41 +0000)]
[GTK] Add llvmpipe (Mesa) to the JHBuild moduleset and force it when running layout tests
https://bugs.webkit.org/show_bug.cgi?id=131472

Reviewed by Philippe Normand.

* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server): Use the LLVMPIPE_LIBGL_PATH to set the LD_LIBRARY_PATH
when running WebKitTestRunner with run-webkit-tests.
* gtk/jhbuild.modules: Add Mesa to the modulelist so that the llvmpipe libGL is build, but not
installed.
* gtk/jhbuildrc: Set the LLVMPIPE_LIBGL_PATH environment variable so that the test driver knows
how to properly set the LD_LIBRARY_PATH variable. We do this because it is much easier to
calculate the path in the jhbuildrc than in the test driver code. This simplifies things a great
deal.

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

6 years agoWeb Inspector: add entries for probe samples in the JS/Events timeline UI
commit-queue@webkit.org [Fri, 18 Apr 2014 21:21:39 +0000 (21:21 +0000)]
Web Inspector: add entries for probe samples in the JS/Events timeline UI
https://bugs.webkit.org/show_bug.cgi?id=131173

Patch by Katie Madonna <madonnk@gmail.com> on 2014-04-18
Reviewed by Timothy Hatcher.

Create probe sample fired entries for the JS/Events timeline UI.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/ProbeManager.js:
(WebInspector.ProbeManager.prototype.probeForIdentifier): Added.
* UserInterface/Controllers/TimelineManager.js: Added cases for probe sample recorded.
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):
* UserInterface/Images/TimelineRecordProbeSampled.svg: Added.
* UserInterface/Models/ScriptTimelineRecord.js: Create ProbeSampleRecorded record for ProbeSample case.
* UserInterface/Views/TimelineIcons.css:
(.probe-record .icon): Added.
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement): Added case for probe sample recorded.

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

6 years agoRemove DynamicAnnotations.h?
mrobinson@webkit.org [Fri, 18 Apr 2014 21:03:23 +0000 (21:03 +0000)]
Remove DynamicAnnotations.h?
https://bugs.webkit.org/show_bug.cgi?id=131754

Reviewed by Simon Fraser.

This file, which helped support tools like Valgrind was unused.

* WTF.vcxproj/WTF.vcxproj: Remove references to the files.
* WTF.vcxproj/WTF.vcxproj.filters: Remove references to the files.
* WTF.xcodeproj/project.pbxproj: Remove references to the files.
* wtf/CMakeLists.txt: Remove references to the files.
* wtf/DynamicAnnotations.cpp: Removed.
* wtf/DynamicAnnotations.h: Removed.
* wtf/ThreadSafeRefCounted.h: Remove references to the files.
* wtf/text/StringStatics.cpp: Remove references to the files.

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

6 years agoAddress a couple of review comments
andersca@apple.com [Fri, 18 Apr 2014 20:56:13 +0000 (20:56 +0000)]
Address a couple of review comments
https://bugs.webkit.org/show_bug.cgi?id=131856

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/API/Cocoa/WKWebView.h:

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

6 years ago[WK1] media/event-attributes.html is flaky
ap@apple.com [Fri, 18 Apr 2014 20:48:15 +0000 (20:48 +0000)]
[WK1] media/event-attributes.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=131855

* platform/mac/TestExpectations: Marking as such.

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

6 years agoMallocBench: removed the --measure-heap option
ggaren@apple.com [Fri, 18 Apr 2014 20:46:18 +0000 (20:46 +0000)]
MallocBench: removed the --measure-heap option
https://bugs.webkit.org/show_bug.cgi?id=131854

Reviewed by Sam Weinig.

As of <https://bugs.webkit.org/show_bug.cgi?id=131661>, measuring the
heap is fast, so there's no reason to disable it.

* MallocBench/MallocBench/Benchmark.cpp:
(Benchmark::Benchmark):
(Benchmark::run):
(Benchmark::printReport):
* MallocBench/MallocBench/Benchmark.h:
* MallocBench/MallocBench/CommandLine.cpp:
(CommandLine::printUsage):
* MallocBench/MallocBench/CommandLine.h:
(CommandLine::heapSize):
(CommandLine::measureHeap): Deleted.
* MallocBench/MallocBench/main.cpp:
(main):

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

6 years agoForgot to check in this file with <http://trac.webkit.org/changeset/167500>.
ap@apple.com [Fri, 18 Apr 2014 20:43:05 +0000 (20:43 +0000)]
Forgot to check in this file with <trac.webkit.org/changeset/167500>.

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

6 years ago[iOS WK2] Make window.scroll() and window.scrollBy() work
simon.fraser@apple.com [Fri, 18 Apr 2014 20:31:35 +0000 (20:31 +0000)]
[iOS WK2] Make window.scroll() and window.scrollBy() work
https://bugs.webkit.org/show_bug.cgi?id=131848
<rdar://problem/16638319>

Reviewed by Beth Dakin.

The scrolling-related functions in DOMWindow were #ifdeffed for iOS
to use the hacky WK1-specific "actual scroll" functions, which do nothing
in WK2.

Fix by adding a scroll position wrapper (contentsScrollPosition) which does
the right thing on WK1 and WK2, and change almost all the places that used "actualScrollPosition"
to us it (with the exception of contentsScrollOffset() in MouseRelatedEvent.cpp, which has
confusing scaling behavior).

* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
* dom/TreeScope.cpp:
(WebCore::nodeFromPoint): Remove #ifdefs.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::scrollTop):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::scrollX):
(WebCore::DOMWindow::scrollY):
(WebCore::DOMWindow::scrollBy):
(WebCore::DOMWindow::scrollTo):
* platform/ScrollView.cpp:
(WebCore::ScrollView::contentsScrollPosition):
(WebCore::ScrollView::setContentsScrollPosition):
* platform/ScrollView.h:

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

6 years agobmalloc: Added an XSmall line size
ggaren@apple.com [Fri, 18 Apr 2014 20:17:59 +0000 (20:17 +0000)]
bmalloc: Added an XSmall line size
https://bugs.webkit.org/show_bug.cgi?id=131851

Reviewed by Sam Weinig.

Reduces malloc footprint on Membuster recordings by 10%.

This is a throughput regression, but we're still way ahead of TCMalloc.
I have some ideas for how to recover the regression -- but I wanted to
get this win in first.

Full set of benchmark results:

        bmalloc> ~/webkit/PerformanceTests/MallocBench/run-malloc-benchmarks --measure-heap nopatch:~/scratch/Build-nopatch/Release/ patch:~/webkit/WebKitBuild/Release/

                                                       nopatch                      patch                                Δ
        Peak Memory:
            reddit_memory_warning                      7,896kB                    7,532kB                  ^ 1.05x smaller
            flickr_memory_warning                     12,968kB                   12,324kB                  ^ 1.05x smaller
            theverge_memory_warning                   16,672kB                   15,200kB                   ^ 1.1x smaller

            <geometric mean>                          11,952kB                   11,216kB                  ^ 1.07x smaller
            <arithmetic mean>                         12,512kB                   11,685kB                  ^ 1.07x smaller
            <harmonic mean>                           11,375kB                   10,726kB                  ^ 1.06x smaller

        Memory at End:
            reddit_memory_warning                      7,320kB                    6,856kB                  ^ 1.07x smaller
            flickr_memory_warning                     10,848kB                    9,692kB                  ^ 1.12x smaller
            theverge_memory_warning                   16,380kB                   14,872kB                   ^ 1.1x smaller

            <geometric mean>                          10,916kB                    9,961kB                   ^ 1.1x smaller
            <arithmetic mean>                         11,516kB                   10,473kB                   ^ 1.1x smaller
            <harmonic mean>                           10,350kB                    9,485kB                  ^ 1.09x smaller

        MallocBench> ~/webkit/PerformanceTests/MallocBench/run-malloc-benchmarks nopatch:~/scratch/Build-nopatch/Release/ patch:~/webkit/WebKitBuild/Release/

                                           nopatch                patch                         Δ
        Execution Time:
            churn                            127ms                151ms            ! 1.19x slower
            list_allocate                    130ms                164ms            ! 1.26x slower
            tree_allocate                    109ms                127ms            ! 1.17x slower
            tree_churn                       115ms                120ms            ! 1.04x slower
            facebook                         240ms                259ms            ! 1.08x slower
            fragment                          91ms                131ms            ! 1.44x slower
            fragment_iterate                 105ms                106ms            ! 1.01x slower
            message_one                      260ms                259ms             ^ 1.0x faster
            message_many                     149ms                154ms            ! 1.03x slower
            medium                           194ms                248ms            ! 1.28x slower
            big                              157ms                160ms            ! 1.02x slower

            <geometric mean>                 144ms                163ms            ! 1.13x slower
            <arithmetic mean>                152ms                171ms            ! 1.12x slower
            <harmonic mean>                  137ms                156ms            ! 1.14x slower

        MallocBench> ~/webkit/PerformanceTests/MallocBench/run-malloc-benchmarks nopatch:~/scratch/Build-nopatch/Release/ patch:~/webkit/WebKitBuild/Release/

                                                               nopatch                          patch                                     Δ
        Execution Time:
            churn                                                126ms                          148ms                        ! 1.17x slower
            churn --parallel                                      62ms                           76ms                        ! 1.23x slower
            list_allocate                                        130ms                          164ms                        ! 1.26x slower
            list_allocate --parallel                             120ms                          175ms                        ! 1.46x slower
            tree_allocate                                        111ms                          127ms                        ! 1.14x slower
            tree_allocate --parallel                              95ms                          135ms                        ! 1.42x slower
            tree_churn                                           115ms                          124ms                        ! 1.08x slower
            tree_churn --parallel                                107ms                          126ms                        ! 1.18x slower
            facebook                                             240ms                          276ms                        ! 1.15x slower
            facebook --parallel                                  802ms                        1,088ms                        ! 1.36x slower
            fragment                                              92ms                          130ms                        ! 1.41x slower
            fragment --parallel                                   66ms                          124ms                        ! 1.88x slower
            fragment_iterate                                     109ms                          127ms                        ! 1.17x slower
            fragment_iterate --parallel                           55ms                           64ms                        ! 1.16x slower
            message_one                                          260ms                          260ms
            message_many                                         170ms                          238ms                         ! 1.4x slower
            medium                                               185ms                          250ms                        ! 1.35x slower
            medium --parallel                                    210ms                          334ms                        ! 1.59x slower
            big                                                  150ms                          169ms                        ! 1.13x slower
            big --parallel                                       138ms                          144ms                        ! 1.04x slower

            <geometric mean>                                     135ms                          170ms                        ! 1.26x slower
            <arithmetic mean>                                    167ms                          214ms                        ! 1.28x slower
            <harmonic mean>                                      117ms                          148ms                        ! 1.26x slower

        MallocBench> ~/webkit/PerformanceTests/MallocBench/run-malloc-benchmarks TC:~/scratch/Build-TCMalloc/Release/ patch:~/webkit/WebKitBuild/Release/

                                                            TC                      patch                                Δ
        Peak Memory:
            reddit_memory_warning                     13,836kB                   13,436kB                  ^ 1.03x smaller
            flickr_memory_warning                     24,868kB                   25,188kB                   ! 1.01x bigger
            theverge_memory_warning                   24,504kB                   26,636kB                   ! 1.09x bigger

            <geometric mean>                          20,353kB                   20,812kB                   ! 1.02x bigger
            <arithmetic mean>                         21,069kB                   21,753kB                   ! 1.03x bigger
            <harmonic mean>                           19,570kB                   19,780kB                   ! 1.01x bigger

        Memory at End:
            reddit_memory_warning                      8,656kB                   10,016kB                   ! 1.16x bigger
            flickr_memory_warning                     11,844kB                   13,784kB                   ! 1.16x bigger
            theverge_memory_warning                   18,516kB                   22,748kB                   ! 1.23x bigger

            <geometric mean>                          12,382kB                   14,644kB                   ! 1.18x bigger
            <arithmetic mean>                         13,005kB                   15,516kB                   ! 1.19x bigger
            <harmonic mean>                           11,813kB                   13,867kB                   ! 1.17x bigger

        MallocBench> ~/webkit/PerformanceTests/MallocBench/run-malloc-benchmarks TC:~/scratch/Build-TCMalloc/Release/ patch:~/webkit/WebKitBuild/Release/

                                                TC                patch                         Δ
        Execution Time:
            churn                            416ms                148ms            ^ 2.81x faster
            list_allocate                    463ms                164ms            ^ 2.82x faster
            tree_allocate                    292ms                127ms             ^ 2.3x faster
            tree_churn                       157ms                120ms            ^ 1.31x faster
            facebook                         327ms                276ms            ^ 1.18x faster
            fragment                         335ms                129ms             ^ 2.6x faster
            fragment_iterate                 344ms                108ms            ^ 3.19x faster
            message_one                      386ms                258ms             ^ 1.5x faster
            message_many                     410ms                154ms            ^ 2.66x faster
            medium                           391ms                245ms             ^ 1.6x faster
            big                              261ms                167ms            ^ 1.56x faster

            <geometric mean>                 332ms                164ms            ^ 2.02x faster
            <arithmetic mean>                344ms                172ms            ^ 1.99x faster
            <harmonic mean>                  317ms                157ms            ^ 2.02x faster

* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/Allocator.cpp:
(bmalloc::Allocator::Allocator): Don't assume that each allocator's
index corresponds with its size. Instead, use the size selection function
explicitly. Now that we have XSmall, some small allocator entries are
unused.

(bmalloc::Allocator::scavenge):
(bmalloc::Allocator::log):
(bmalloc::Allocator::processXSmallAllocatorLog):
(bmalloc::Allocator::allocateSlowCase):
* bmalloc/Allocator.h:
(bmalloc::Allocator::xSmallAllocatorFor):
(bmalloc::Allocator::allocateFastCase):
* bmalloc/Chunk.h:
* bmalloc/Deallocator.cpp:
(bmalloc::Deallocator::scavenge):
(bmalloc::Deallocator::processObjectLog):
(bmalloc::Deallocator::deallocateSlowCase):
(bmalloc::Deallocator::deallocateXSmallLine):
(bmalloc::Deallocator::allocateXSmallLine):
* bmalloc/Deallocator.h:
(bmalloc::Deallocator::deallocateFastCase):
* bmalloc/Heap.cpp:
(bmalloc::Heap::scavenge):
(bmalloc::Heap::scavengeXSmallPages):
(bmalloc::Heap::allocateXSmallLineSlowCase):
* bmalloc/Heap.h:
(bmalloc::Heap::deallocateXSmallLine):
(bmalloc::Heap::allocateXSmallLine):
* bmalloc/LargeChunk.h:
(bmalloc::LargeChunk::get):
(bmalloc::LargeChunk::endTag):
* bmalloc/Line.h:
* bmalloc/MediumAllocator.h:
(bmalloc::MediumAllocator::allocate):
(bmalloc::MediumAllocator::refill):
* bmalloc/ObjectType.cpp:
(bmalloc::objectType):
* bmalloc/ObjectType.h:
(bmalloc::isXSmall):
(bmalloc::isSmall):
(bmalloc::isMedium):
(bmalloc::isLarge):
(bmalloc::isSmallOrMedium): Deleted.
* bmalloc/SegregatedFreeList.h: I boiler-plate copied existing code for
handling small objects. There's probably a reasonable way to share this
code in the future -- I'll look into that once it's stopped changing.

* bmalloc/Sizes.h: Tweaked size classes to make Membuster happy. This
is the main reason things got slower.

* bmalloc/SmallAllocator.h:
(bmalloc::SmallAllocator::allocate):
* bmalloc/SmallTraits.h:
* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::allocateXSmallChunk):
* bmalloc/VMHeap.h:
(bmalloc::VMHeap::allocateXSmallPage):
(bmalloc::VMHeap::deallocateXSmallPage):
* bmalloc/XSmallAllocator.h: Added.
(bmalloc::XSmallAllocator::isNull):
(bmalloc::XSmallAllocator::canAllocate):
(bmalloc::XSmallAllocator::XSmallAllocator):
(bmalloc::XSmallAllocator::line):
(bmalloc::XSmallAllocator::allocate):
(bmalloc::XSmallAllocator::objectCount):
(bmalloc::XSmallAllocator::derefCount):
(bmalloc::XSmallAllocator::refill):
* bmalloc/XSmallChunk.h: Added.
* bmalloc/XSmallLine.h: Added.
* bmalloc/XSmallPage.h: Added.
* bmalloc/XSmallTraits.h: Added.
* bmalloc/bmalloc.h:
(bmalloc::api::realloc): Boiler-plate copy, as above.

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

6 years agoDeleting properties poisons objects
mhahnenberg@apple.com [Fri, 18 Apr 2014 20:07:50 +0000 (20:07 +0000)]
Deleting properties poisons objects
https://bugs.webkit.org/show_bug.cgi?id=131551

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:
This is ~3% progression on Dromaeo with a ~6% progression on the jslib portion of Dromaeo in particular.

* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::materializePropertyMap): We now re-use deleted properties when materializing the property map.
(JSC::Structure::removePropertyTransition): We allow up to 5 deletes for a particular path through the tree of
Structure transitions. After that, we convert to an uncacheable dictionary like we used to. We don't cache
delete transitions, but we allow transitioning from them.
(JSC::Structure::changePrototypeTransition):
(JSC::Structure::despecifyFunctionTransition):
(JSC::Structure::attributeChangeTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::preventExtensionsTransition):
(JSC::Structure::addPropertyWithoutTransition):
(JSC::Structure::removePropertyWithoutTransition):
(JSC::Structure::pin): Now does only what it says it does--marks the property table as pinned.
(JSC::Structure::pinAndPreventTransitions): More descriptive version of what the old pin() was doing.
* runtime/Structure.h:
* runtime/StructureInlines.h:
(JSC::Structure::checkOffsetConsistency): Rearranged variables to be more sensible.

LayoutTests:
New JS regress test. We're ~3.5x faster on this microbenchmark now.

* js/regress/delete-a-few-properties-then-get-by-id-expected.txt: Added.
* js/regress/delete-a-few-properties-then-get-by-id.html: Added.
* js/regress/script-tests/delete-a-few-properties-then-get-by-id.js: Added.
(MyObject):
(foo):

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

6 years agohttp/tests/multipart/policy-ignore-crash.php erroneously depends on http stack quirks
ap@apple.com [Fri, 18 Apr 2014 20:05:14 +0000 (20:05 +0000)]
http/tests/multipart/policy-ignore-crash.php erroneously depends on http stack quirks
https://bugs.webkit.org/show_bug.cgi?id=131853

Reviewed by Brady Eidson.

* http/tests/multipart/policy-ignore-crash.php: Produce a nice multipart response
with boundaries on their own lines.

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

6 years agoHandle pluginOrigin being null
andersca@apple.com [Fri, 18 Apr 2014 19:45:40 +0000 (19:45 +0000)]
Handle pluginOrigin being null
https://bugs.webkit.org/show_bug.cgi?id=131849
<rdar://problem/16655898>

Reviewed by Alexey Proskuryakov.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):

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

6 years agoWorse animation performance on pages with 3D transforms
simon.fraser@apple.com [Fri, 18 Apr 2014 18:37:04 +0000 (18:37 +0000)]
Worse animation performance on pages with 3D transforms
https://bugs.webkit.org/show_bug.cgi?id=131838
<rdar://problem/16428630&15705876>

Reviewed by Dean Jackson.

Source/WebCore:
r155977 added logic to adjust the contentsScale of compositing layers
based on a root-relative transform. However, this resulted in
the contentsScale continually changing on layers whose transforms
are changed dynamically, which caused lots of expensive painting.

Fix by bucketing the part of the scale computed from the root-relative transform
into buckets of 0.25 via rounding.

Test: compositing/contents-scale/rounded-contents-scale.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::clampedContentsScaleForScale):
(WebCore::GraphicsLayerCA::updateContentsOpaque):
(WebCore::GraphicsLayerCA::updateContentsScale):
(WebCore::GraphicsLayerCA::updateContentsVisibility): Deleted.
(WebCore::GraphicsLayerCA::animatedLayerClones): Deleted.

LayoutTests:
Testcase having layers at various z translates which shows the bucketing
of contentsScale, and fix results affected by the patch.

* compositing/contents-scale/rounded-contents-scale-expected.txt: Added.
* compositing/contents-scale/rounded-contents-scale.html: Added.
* compositing/contents-scale/z-translate-expected.txt:
* platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
* platform/mac/compositing/overflow/composited-scrolling-paint-phases-expected.txt:
* platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
* platform/mac/compositing/visible-rect/3d-transform-style-expected.txt:
* platform/mac/compositing/visible-rect/3d-transformed-expected.txt:
* platform/mac/compositing/visible-rect/nested-transform-expected.txt:

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

6 years agoRemove some includes from image-related headers, and Document.h
simon.fraser@apple.com [Fri, 18 Apr 2014 18:35:20 +0000 (18:35 +0000)]
Remove some includes from image-related headers, and Document.h
https://bugs.webkit.org/show_bug.cgi?id=131797

Reviewed by Martin Robinson.

Remove some #includes from Document.h, DragImage.h, GradientImage.h,
Image.h, and ImageBuffer.h and deal with the fallout.

* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::setInputCursor):
* dom/Document.h:
(WebCore::Document::inputCursor):
* dom/MutationObserverRegistration.cpp:
* html/canvas/WebGLRenderingContext.cpp:
* page/FrameSnapshotting.cpp:
* page/Page.cpp:
* platform/DragImage.h:
* platform/graphics/BitmapImage.cpp:
* platform/graphics/GradientImage.cpp:
(WebCore::GradientImage::GradientImage):
(WebCore::GradientImage::~GradientImage):
* platform/graphics/GradientImage.h:
* platform/graphics/Image.h:
* platform/graphics/ImageBuffer.cpp:
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::create):
(WebCore::ImageBuffer::internalSize):
(WebCore::ImageBuffer::logicalSize):
(WebCore::ImageBuffer::baseTransform):
(WebCore::ImageBuffer::spaceSize):
(WebCore::ImageBuffer::setSpaceSize):
* rendering/RenderThemeMac.mm:
* rendering/shapes/Shape.cpp:
* rendering/svg/RenderSVGContainer.cpp:
* svg/SVGURIReference.h:

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

6 years ago[Cocoa] Add a navigation delegate method corresponding to didFinishDocumentLoadForFra...
mitz@apple.com [Fri, 18 Apr 2014 17:49:24 +0000 (17:49 +0000)]
[Cocoa] Add a navigation delegate method corresponding to didFinishDocumentLoadForFrame for the main frame
https://bugs.webkit.org/show_bug.cgi?id=131847

Reviewed by Anders Carlsson.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didFinishDocumentLoadForFrame): Added a navigationID parameter.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient): Updated for the above change in paramerers.
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
* UIProcess/Cocoa/NavigationState.h: Declare override of didFinishDocumentLoadForFrame.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Initialize
webViewNavigationDidFinishDocumentLoad flag in the delegate methods struct.
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Added override
of the client function which calls the delegate.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame): Get and pass the navigation ID to
the client.
* UIProcess/WebPageProxy.h: Added navigationID parameter.
* UIProcess/WebPageProxy.messages.in: Ditto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad): Get and send the navigation
ID to the UI process.

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

6 years agoDownloadDecideDestinationCrash API test uses an incorrect value for path
ap@apple.com [Fri, 18 Apr 2014 17:32:34 +0000 (17:32 +0000)]
DownloadDecideDestinationCrash API test uses an incorrect value for path
https://bugs.webkit.org/show_bug.cgi?id=131845
<rdar://problem/15925560>

Reviewed by Enrica Casucci.

* TestWebKitAPI/Tests/WebKit2/DownloadDecideDestinationCrash.cpp:
(TestWebKitAPI::decideDestinationWithSuggestedFilename):

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

6 years agoUnreviewed. ARM64 buildfix after r167473.
dbates@webkit.org [Fri, 18 Apr 2014 17:18:13 +0000 (17:18 +0000)]
Unreviewed. ARM64 buildfix after r167473.

Patch by Gabor Rapcsanyi <rgabor@webkit.org> on 2014-04-18

* platform/audio/DenormalDisabler.h: Put back the MathExtras.h include.

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

6 years ago[CSS Regions] Content overflowing a transformed region is clipped
stavila@adobe.com [Fri, 18 Apr 2014 17:08:11 +0000 (17:08 +0000)]
[CSS Regions] Content overflowing a transformed region is clipped
https://bugs.webkit.org/show_bug.cgi?id=116833

Reviewed by Mihnea Ovidenie.

Added test for overflow of content in 3d transformed regions.

* fast/regions/overflow-3dtransformed-region-expected.txt: Added.
* fast/regions/overflow-3dtransformed-region.html: Added.

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

6 years ago[Mac] AttributedStringTest API tests fail with async text input
ap@apple.com [Fri, 18 Apr 2014 17:08:07 +0000 (17:08 +0000)]
[Mac] AttributedStringTest API tests fail with async text input
https://bugs.webkit.org/show_bug.cgi?id=131833

Reviewed by Enrica Casucci.

Don't run sync NSTextInputClient tests where we don't implement these calls.

* TestWebKitAPI/Tests/mac/AttributedString.mm:
(TestWebKitAPI::AttributedStringTest_CustomFont::didLoadURL):
(TestWebKitAPI::AttributedStringTest_CustomFont::runSyncTest):
(TestWebKitAPI::AttributedStringTest_Strikethrough::didLoadURL):
(TestWebKitAPI::AttributedStringTest_Strikethrough::runSyncTest):
(TestWebKitAPI::AttributedStringTest_CustomFont::runTest): Deleted.
(TestWebKitAPI::AttributedStringTest_Strikethrough::runTest): Deleted.

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

6 years agoUnreviewed. ARM64 buildfix after r167473.
rgabor@webkit.org [Fri, 18 Apr 2014 13:48:16 +0000 (13:48 +0000)]
Unreviewed. ARM64 buildfix after r167473.

* platform/audio/DenormalDisabler.h: Put back the MathExtras.h include.

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

6 years ago[CSSRegions] Incorrect background paint on positioned element hover
stavila@adobe.com [Fri, 18 Apr 2014 13:07:48 +0000 (13:07 +0000)]
[CSSRegions] Incorrect background paint on positioned element hover
https://bugs.webkit.org/show_bug.cgi?id=131617

Reviewed by Andrei Bucur.

Source/WebCore:
When computing the repaint rect for absolute elements flowed into regions, the Y location of the
region within the flow thread must no longer be added to the repaint rect's location because absolute
positioned elements get pushed down through the regions by their absolute top. So adding the region's
position in the flow thread and then adding the element's absolute top would cause us to add
something twice.

Tests: fast/regions/repaint/repaint-absolute-pushed-to-next-region.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):

LayoutTests:
Added test for the proper repainting of absolute positioned elements in regions when the
absolute top of the elements causes it to be pushed to the next region.

* fast/regions/repaint/repaint-absolute-pushed-to-next-region-expected.txt: Added.
* fast/regions/repaint/repaint-absolute-pushed-to-next-region.html: Added.

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

6 years agoRemove NETWORK_INFO support
philn@webkit.org [Fri, 18 Apr 2014 12:34:03 +0000 (12:34 +0000)]
Remove NETWORK_INFO support
https://bugs.webkit.org/show_bug.cgi?id=131841

.:
Reviewed by Gyuyoung Kim.

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/WebCore:
Reviewed by Gyuyoung Kim.

* CMakeLists.txt:
* Modules/networkinfo/NavigatorNetworkInfoConnection.cpp: Removed.
* Modules/networkinfo/NavigatorNetworkInfoConnection.h: Removed.
* Modules/networkinfo/NavigatorNetworkInfoConnection.idl: Removed.
* Modules/networkinfo/NetworkInfo.cpp: Removed.
* Modules/networkinfo/NetworkInfo.h: Removed.
* Modules/networkinfo/NetworkInfoClient.h: Removed.
* Modules/networkinfo/NetworkInfoConnection.cpp: Removed.
* Modules/networkinfo/NetworkInfoConnection.h: Removed.
* Modules/networkinfo/NetworkInfoConnection.idl: Removed.
* Modules/networkinfo/NetworkInfoController.cpp: Removed.
* Modules/networkinfo/NetworkInfoController.h: Removed.
* PlatformEfl.cmake:
* dom/EventTargetFactory.in:
* platform/efl/NetworkInfoProviderEfl.cpp: Removed.
* platform/efl/NetworkInfoProviderEfl.h: Removed.
* testing/Internals.cpp:
(WebCore::Internals::setNetworkInformation): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:
Reviewed by NOBODY (OOPS!).

* PlatformEfl.cmake:

Source/WebKit/efl:
Reviewed by Gyuyoung Kim.

* WebCoreSupport/NetworkInfoClientEfl.cpp: Removed.
* WebCoreSupport/NetworkInfoClientEfl.h: Removed.
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):

Source/WebKit2:
Reviewed by Gyuyoung Kim.

* CMakeLists.txt:
* PlatformEfl.cmake:
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* Shared/WebNetworkInfo.cpp: Removed.
* Shared/WebNetworkInfo.h: Removed.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetNetworkInfoManager): Deleted.
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKNetworkInfo.cpp: Removed.
* UIProcess/API/C/WKNetworkInfo.h: Removed.
* UIProcess/API/C/WKNetworkInfoManager.cpp: Removed.
* UIProcess/API/C/WKNetworkInfoManager.h: Removed.
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
* UIProcess/WebContext.h:
* UIProcess/WebNetworkInfoManagerProxy.cpp: Removed.
* UIProcess/WebNetworkInfoManagerProxy.h: Removed.
* UIProcess/WebNetworkInfoManagerProxy.messages.in: Removed.
* UIProcess/WebNetworkInfoProvider.cpp: Removed.
* UIProcess/WebNetworkInfoProvider.h: Removed.
* UIProcess/efl/NetworkInfoProvider.cpp: Removed.
* UIProcess/efl/NetworkInfoProvider.h: Removed.
* WebProcess/NetworkInfo/WebNetworkInfoManager.cpp: Removed.
* WebProcess/NetworkInfo/WebNetworkInfoManager.h: Removed.
* WebProcess/NetworkInfo/WebNetworkInfoManager.messages.in: Removed.
* WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp: Removed.
* WebProcess/WebCoreSupport/WebNetworkInfoClient.h: Removed.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):

Source/WTF:
Reviewed by Gyuyoung Kim.

* wtf/FeatureDefines.h:

Tools:
Reviewed by Gyuyoung Kim.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:
Reviewed by Gyuyoung Kim.

* networkinformation/add-listener-from-callback-expected.txt: Removed.
* networkinformation/add-listener-from-callback.html: Removed.
* networkinformation/basic-all-types-of-events-expected.txt: Removed.
* networkinformation/basic-all-types-of-events.html: Removed.
* networkinformation/basic-operation-expected.txt: Removed.
* networkinformation/basic-operation.html: Removed.
* networkinformation/event-after-navigation-expected.txt: Removed.
* networkinformation/event-after-navigation.html: Removed.
* networkinformation/multiple-frames-expected.txt: Removed.
* networkinformation/multiple-frames.html: Removed.
* networkinformation/resources/event-after-navigation-new.html: Removed.
* networkinformation/script-tests/add-listener-from-callback.js: Removed.
* networkinformation/script-tests/basic-all-types-of-events.js: Removed.
* networkinformation/script-tests/basic-operation.js: Removed.
* networkinformation/script-tests/event-after-navigation.js: Removed.
* networkinformation/script-tests/multiple-frames.js: Removed.
* networkinformation/script-tests/updates.js: Removed.
* networkinformation/script-tests/window-property.js: Removed.
* networkinformation/updates-expected.txt: Removed.
* networkinformation/updates.html: Removed.
* networkinformation/window-property-expected.txt: Removed.
* networkinformation/window-property.html: Removed.

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

6 years agoUnreviewed, rolling out r167478.
commit-queue@webkit.org [Fri, 18 Apr 2014 05:10:38 +0000 (05:10 +0000)]
Unreviewed, rolling out r167478.
https://bugs.webkit.org/show_bug.cgi?id=131840

Broke multicol tests (Requested by ap on #webkit).

Reverted changeset:

"[New Multicolumn] Pagination mode messed up with non-inline
axis and reversed direction."
https://bugs.webkit.org/show_bug.cgi?id=131811
http://trac.webkit.org/changeset/167478

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

6 years ago[GTK] YouCompleteMe doesn't work for cmake build system.
changseok.oh@collabora.com [Fri, 18 Apr 2014 05:05:41 +0000 (05:05 +0000)]
[GTK] YouCompleteMe doesn't work for cmake build system.
https://bugs.webkit.org/show_bug.cgi?id=131591

Reviewed by Martin Robinson.

Add cmake build system support for YouCompleteMe. It should work regardless of
using make or ninja. In addition, autotools related code is removed since it's
not used anymore in WebKit.

* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject):
* gtk/ycm_extra_conf.py:
(transform_relative_paths_to_absolute_paths):
(FlagsForFile):

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

6 years ago[iOS] Hook up screen.{availHeight, availWidth, height, width}
dbates@webkit.org [Fri, 18 Apr 2014 03:51:14 +0000 (03:51 +0000)]
[iOS] Hook up screen.{availHeight, availWidth, height, width}
https://bugs.webkit.org/show_bug.cgi?id=131821
<rdar://problem/16413795>

Reviewed by Benjamin Poulain and Tim Horton.

Source/WebCore:
Implement support for screen.{availHeight, availWidth, height, width} in WebKit2 for iOS.

Additionally substitute "screenSize" for "viewporScreenSize" to make the code more understandable.

* WebCore.exp.in: Export symbol for WebCore System Interface function
_wkGetViewportAvailableScreenSize.
* dom/Document.cpp:
(WebCore::Document::processViewport): Modified to call Chrome::screenSize(); formerly it
called ChromeClient::viewportScreenSize().
* page/Chrome.cpp:
(WebCore::Chrome::screenSize): Added; turns around and calls ChromeClient::screenSize().
(WebCore::Chrome::availableScreenSize): Added; turns around and calls ChromeClient::availableScreenSize().
* page/Chrome.h:
* page/ChromeClient.h:
(WebCore::ChromeClient::screenSize): Renamed; formerly named viewportScreenSize.
(WebCore::ChromeClient::availableScreenSize): Added; default implementation, which
returns the size of Chrome::windowRect().
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::textDocumentParameters):
* platform/HostWindow.h: Added declarations for availableScreenSize() and screenSize()
so that a caller (e.g. WebCore::screenRect()) can query for such screen information using
only the HostWindow interface. That is, a caller doesn't need to know about ChromeClient.
* platform/ios/PlatformScreenIOS.mm:
(WebCore::screenRect): Modified to query HostWindow::screenSize() when computing the
screen rectangle in WebKit2 for iOS.
(WebCore::screenAvailableRect): Modified to query HostWindow::availableScreenSize()
when computing the available screen rectangle in WebKit2 for iOS.
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:

Source/WebKit/ios:
Provide iOS-specific WebKit1 implementation for ChromeClient::availableScreenSize().

Additionally substitute "screenSize" for "viewporScreenSize" to make the code more understandable.

* WebCoreSupport/WebChromeClientIOS.h:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::screenSize): Renamed; formerly named viewportScreenSize.
(WebChromeClientIOS::availableScreenSize): Added; ASSERT_NOT_REACHED() as a widget
should consult it's associated WAKWindow for the available screen size.

Source/WebKit/mac:
Add declaration for WKGetViewportAvailableScreenSize() to return the available screen size.

Additionally substitute "ScreenSize" for "ViewportScreenSize" to make the code more understandable.

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

Source/WebKit2:
Implement WebKit2-specific support infrastructure.

Additionally substitute "screenSize" for "viewporScreenSize" to make the code more understandable.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Modified to encode the available screen size
creation parameter.
(WebKit::WebPageCreationParameters::decode): Modified to decode the available screen size
creation parameter.
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters): Initialize the available screen size
parameter.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::screenSize): Renamed; formerly named viewportScreenSize.
(WebKit::WebPageProxy::availableScreenSize): Added.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::screenSize): Renamed; formerly named viewportScreenSize.
(WebKit::WebChromeClient::availableScreenSize): Added; turns around and calls WebPage::availableScreenSize().
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Hook up WebKit System Interface function WKGetAvailableScreenSize.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize available screen size instance variable.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::screenSize):
(WebKit::WebPage::availableScreenSize):

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

6 years agoSource/WebCore: origin spoofing possible (HTTP Origin, postMessage event.origin)...
darin@apple.com [Fri, 18 Apr 2014 02:41:00 +0000 (02:41 +0000)]
Source/WebCore: origin spoofing possible (HTTP Origin, postMessage event.origin) due to inappropriate URL escape sequence decoding
https://bugs.webkit.org/show_bug.cgi?id=131837
rdar://problem/15211936

Reviewed by Anders Carlsson and Dave Hyatt.

Tests: fast/dom/DOMURL/parsing.html
       fast/dom/HTMLAnchorElement/anchor-element-href-parsing.html

* platform/URL.cpp:
(WebCore::URL::host): Removed unnecessary call to decodeURLEscapeSequences, which caused
problems and was not needed.

LayoutTests: hostname extraction from a URL should not decode percent-escape sequences
https://bugs.webkit.org/show_bug.cgi?id=131837
rdar://problem/15211936

Reviewed by Anders Carlsson and Dave Hyatt.

* fast/dom/DOMURL/parsing-expected.txt: Added.
* fast/dom/DOMURL/parsing.html: Added.
* fast/dom/HTMLAnchorElement/anchor-element-href-parsing-expected.txt: Added.
* fast/dom/HTMLAnchorElement/anchor-element-href-parsing.html: Added.

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

6 years agoFix build.
andersca@apple.com [Fri, 18 Apr 2014 02:35:32 +0000 (02:35 +0000)]
Fix build.

* TestWebKitAPI/Tests/WebKit2Cocoa/Download.mm:
(-[DownloadNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[ConvertResponseToDownloadNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):

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

6 years ago[New Multicolumn] Pagination mode messed up with non-inline axis and reversed direction.
hyatt@apple.com [Fri, 18 Apr 2014 02:11:12 +0000 (02:11 +0000)]
[New Multicolumn] Pagination mode messed up with non-inline axis and reversed direction.
https://bugs.webkit.org/show_bug.cgi?id=131811

Reviewed by Dean Jackson.

Source/WebCore:
Added fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html

With block axis pagination mode, it is possible to set a column height that is not the same
as the available fill height for a block. The new multi-column code had the assumption that
the column height was the same as the amount of fill room you had available. This is not
the case.

To correct the issue, I added a member variable to RenderMultiColumnSet that stores the
available column height as a separate variable from the computed column height. This allows
the pagination API to specify a different column height that is not the same as the view's
content height.

Even though it isn't involved in the solution, I also patched pageOrViewLogicalHeight on
RenderView to work with the new column code as well.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
(WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
(WebCore::RenderMultiColumnSet::computeLogicalHeight):
* rendering/RenderMultiColumnSet.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::pageOrViewLogicalHeight):

LayoutTests:
* fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb-expected.html: Added.
* fast/multicol/newmulticol/compare-with-old-impl/BottomToTop-tb.html: Added.

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

6 years agoBuild fix.
andersca@apple.com [Fri, 18 Apr 2014 02:04:14 +0000 (02:04 +0000)]
Build fix.

* svg/animation/SMILTime.h:

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

6 years agoRemove unused API enums
andersca@apple.com [Fri, 18 Apr 2014 01:42:03 +0000 (01:42 +0000)]
Remove unused API enums
https://bugs.webkit.org/show_bug.cgi?id=131836

Reviewed by Tim Horton.

Source/WebKit2:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):

Tools:
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController webView:decidePolicyForNavigationResponse:decisionHandler:]):

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

6 years ago[EFL][WK1] SSL Strict is set according to input parameter.
commit-queue@webkit.org [Fri, 18 Apr 2014 01:10:55 +0000 (01:10 +0000)]
[EFL][WK1] SSL Strict is set according to input parameter.
https://bugs.webkit.org/show_bug.cgi?id=131734.

Patch by Jeongeun Kim <je_julie.kim@samsung.com> on 2014-04-17
Reviewed by Gyuyoung Kim.

The param, 'enable', should be used for setting SSL-Strict.
If it is true, SSLStrict is set. Otherwise, SSLStrict is unset.

* ewk/ewk_network.cpp:
(ewk_network_tls_certificate_check_set):

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

6 years agoUnreviewed, rolling out r167384.
bjonesbe@adobe.com [Fri, 18 Apr 2014 01:05:23 +0000 (01:05 +0000)]
Unreviewed, rolling out r167384.

Sounds like this isn't the right fix, and causes generation to
run far too often.

Reverted changeset:

"Fix CodeGenerator.pm to only write files if the generated
content has changed"
https://bugs.webkit.org/show_bug.cgi?id=131756
http://trac.webkit.org/changeset/167384

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

6 years agoRemove unnecessary MathExtras.h includes
ryuan.choi@samsung.com [Fri, 18 Apr 2014 00:51:29 +0000 (00:51 +0000)]
Remove unnecessary MathExtras.h includes
https://bugs.webkit.org/show_bug.cgi?id=131789

Reviewed by Anders Carlsson.

* platform/FileSystem.h:
* platform/Scrollbar.h:
* platform/animation/AnimationUtilities.h:
* platform/audio/DenormalDisabler.h:
* platform/graphics/Font.h:
* platform/graphics/IntPoint.h: Included cmath instad of MathExtras.h.
* platform/graphics/LayoutPoint.h:
* platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
* rendering/svg/SVGMarkerData.h:
* svg/animation/SMILTime.h:

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

6 years agoMake RenderLayerBacking get the timingFunction of the correct animation.
bfulgham@apple.com [Fri, 18 Apr 2014 00:44:53 +0000 (00:44 +0000)]
Make RenderLayerBacking get the timingFunction of the correct animation.
https://bugs.webkit.org/show_bug.cgi?id=100632

Source/WebCore:
Patch by Huang Dongsung <luxtella@company100.net> on 2014-04-16
Reviewed by Simon Fraser.

When an element has multiple animations that have different timingFunctions,
the progress of each animation should be calculated using its respective
timingFunction. But at this point, the timingFunction of the first animation is
only used in RenderLayerBacking::startAnimation(), regardless of how many
animations the element has.

getAnimationFromStyleByName() was introduced in r89462 so that the
timingFunction of the correct animation searched by its name would be
used. This patch moves the function to KeyframeValue::timingFunction()
so that RenderLayerBacking reuses this method.

Test: animations/keyframe-multiple-timing-functions-transform.html

* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
* rendering/style/KeyframeList.cpp:
(WebCore::KeyframeValue::timingFunction):
(WebCore):
* rendering/style/KeyframeList.h:
(WebCore):
(KeyframeValue):

Source/WebKit2:
Reviewed by Simon Fraser.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Update for new signatures for
FloatAnimationValue, TransformAnimationValue, etc.

LayoutTests:
Patch by Huang Dongsung <luxtella@company100.net> on 2014-04-16
Reviewed by Simon Fraser.

When an element on a compositing layer has multiple animations that have
different timingFunctions, the progress of each animation should be
calculated using its respective timingFunction in Accelerated
Compositing.

* animations/keyframe-multiple-timing-functions-transform-expected.txt: Added.
* animations/keyframe-multiple-timing-functions-transform.html: Added.

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

6 years agoUnreviewed, EFL gardening. Remove duplicated test case in EFL WK2 TestExpectations.
gyuyoung.kim@samsung.com [Fri, 18 Apr 2014 00:37:39 +0000 (00:37 +0000)]
Unreviewed, EFL gardening. Remove duplicated test case in EFL WK2 TestExpectations.

* platform/efl-wk2/TestExpectations:

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

6 years agoUnreviewed, fix a test case path, which was moved to different folder.
gyuyoung.kim@samsung.com [Fri, 18 Apr 2014 00:35:08 +0000 (00:35 +0000)]
Unreviewed, fix a test case path, which was moved to different folder.

* platform/efl/TestExpectations:

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

6 years ago[iOS WebKit2] support replacements for misspelled words.
enrica@apple.com [Fri, 18 Apr 2014 00:01:59 +0000 (00:01 +0000)]
[iOS WebKit2] support replacements for misspelled words.
https://bugs.webkit.org/show_bug.cgi?id=131827
<rdar://problem/16319657>

Reviewed by Benjamin Poulain.

This is the first part of the work to add support for replacements.
It handles _promptForReplace in canPerformAction to decide
whether to show the Replace button in the menu and add the
implementation of the replace action.

* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView selectedText]):
(-[WKContentView replaceText:withText:]):
(-[WKContentView _promptForReplace:]):
(-[WKContentView replace:]):
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView selectWordForReplacement]): This is called
by UIKit when the user taps on a mispelled word to select it.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::replaceSelectedText):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::editorState):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture): Removed m_shouldReturnWordForSelection.
We now return always the word corresponding to the caret selection or
the selected text up to a maximum of 200 characters.
(WebKit::WebPage::extendSelection):
(WebKit::WebPage::replaceSelectedText):

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

6 years agoInlineCallFrameSet should be refcounted
fpizlo@apple.com [Thu, 17 Apr 2014 23:33:32 +0000 (23:33 +0000)]
InlineCallFrameSet should be refcounted
https://bugs.webkit.org/show_bug.cgi?id=131829

Reviewed by Geoffrey Garen.

And DFG::Plan should hold a ref to it. Previously it was owned by Graph until it
became owned by JITCode. Except that if we're "failing" to compile, JITCode may die.
Even as it dies, the GC may still want to scan the DFG::Plan, which leads to scanning
the DesiredWriteBarriers, which leads to scanning the InlineCallFrameSet.

So, just make the darn thing refcounted.

* bytecode/InlineCallFrameSet.h:
* dfg/DFGArgumentsSimplificationPhase.cpp:
(JSC::DFG::ArgumentsSimplificationPhase::run):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* dfg/DFGCommonData.h:
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::Graph):
(JSC::DFG::Graph::requiredRegisterCountForExit):
* dfg/DFGGraph.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
* dfg/DFGPlan.h:
* dfg/DFGStackLayoutPhase.cpp:
(JSC::DFG::StackLayoutPhase::run):
* ftl/FTLFail.cpp:
(JSC::FTL::fail):
* ftl/FTLLink.cpp:
(JSC::FTL::link):

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

6 years agoRollout: Add a way to cache never-changing IDL attributes in the wrapper.
akling@apple.com [Thu, 17 Apr 2014 23:32:09 +0000 (23:32 +0000)]
Rollout: Add a way to cache never-changing IDL attributes in the wrapper.
<https://webkit.org/b/131759>

This behavior may be observable from the web, so we can't do it this way.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/*:
* dom/Element.idl:
* dom/Node.idl:

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

6 years ago[iOS] REGRESSION (r166975): WKPDFView is broken
timothy_horton@apple.com [Thu, 17 Apr 2014 23:29:42 +0000 (23:29 +0000)]
[iOS] REGRESSION (r166975): WKPDFView is broken
https://bugs.webkit.org/show_bug.cgi?id=131828

Reviewed by Simon Fraser.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
Bail from updating the scroll view parameters from the layer tree update
while it's being managed by a custom content view.
We'll get any changes again in the next commit after removing the custom
content view (and painting the new page) anyway, so this should be OK.

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

6 years agoCheesy Mountain Lion build fix.
akling@apple.com [Thu, 17 Apr 2014 23:21:41 +0000 (23:21 +0000)]
Cheesy Mountain Lion build fix.

* platform/MemoryPressureHandler.h:
(WebCore::MemoryPressureHandler::ReliefLogger::logString):

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

6 years ago[New Multicolumn] Column rules don't respect the specified stacking order.
hyatt@apple.com [Thu, 17 Apr 2014 23:06:02 +0000 (23:06 +0000)]
[New Multicolumn] Column rules don't respect the specified stacking order.
https://bugs.webkit.org/show_bug.cgi?id=131804

Reviewed by Beth Dakin.

Source/WebCore:
Added fast/multicol/newmulticol/compare_with_old_impl/column-rules-stacking.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::paintBoxDecorations):
* rendering/RenderBlockFlow.h:
Override paintBoxDecorations for block flows so that we can iterate over our column sets
and paint their rules just after painting our background and border. We can't wait until
the child column sets paint their backgrounds, since that is specified as being above negative
z-index children. We have to pretend that the column sets don't exist as
far as column rule painting is concerned.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::paintObject): Deleted.
* rendering/RenderMultiColumnSet.h:
Turn paintObject in RenderMultiColumnSet into an override that doesn't paint anything.

LayoutTests:
* fast/multicol/newmulticol/compare-with-old-impl/column-rules-stacking-expected.html: Added.
* fast/multicol/newmulticol/compare-with-old-impl/column-rules-stacking.html: Added.

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

6 years agoHit-testing is incorrect for plugins inside iframes when there is a
bdakin@apple.com [Thu, 17 Apr 2014 22:58:56 +0000 (22:58 +0000)]
Hit-testing is incorrect for plugins inside iframes when there is a
topContentInset
https://bugs.webkit.org/show_bug.cgi?id=131826
-and corresponding-
<rdar://problem/16649996>

Reviewed by Tim Horton.

I missed one coordinate-conversion spot when getting hit-testing to work. Like
headerHeight() which also manipulates the location of the root layer,
topContentInset() has to be factored into all of these conversions.
* page/FrameView.cpp:
(WebCore::FrameView::convertFromRenderer):

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

6 years ago_webProcessIdentifier should return 0 if the web process crashed
psolanki@apple.com [Thu, 17 Apr 2014 22:39:18 +0000 (22:39 +0000)]
_webProcessIdentifier should return 0 if the web process crashed
https://bugs.webkit.org/show_bug.cgi?id=131813
<rdar://problem/16650605>

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _hasWebProcess]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

6 years agoFTL::fail() should manage memory "correctly"
fpizlo@apple.com [Thu, 17 Apr 2014 22:30:46 +0000 (22:30 +0000)]
FTL::fail() should manage memory "correctly"
https://bugs.webkit.org/show_bug.cgi?id=131823
<rdar://problem/16384297>

Reviewed by Oliver Hunt.

* ftl/FTLFail.cpp:
(JSC::FTL::fail):

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

6 years agoPrediction propagator should correctly model Int52s flowing through arguments
fpizlo@apple.com [Thu, 17 Apr 2014 22:25:53 +0000 (22:25 +0000)]
Prediction propagator should correctly model Int52s flowing through arguments
https://bugs.webkit.org/show_bug.cgi?id=131822
<rdar://problem/16641408>

Reviewed by Oliver Hunt.

* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* tests/stress/int52-argument.js: Added.
(foo):
* tests/stress/int52-variable.js: Added.
(foo):

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

6 years agoStub out MemoryPressureHandler::ReliefLogger on older OS X'es.
akling@apple.com [Thu, 17 Apr 2014 21:32:17 +0000 (21:32 +0000)]
Stub out MemoryPressureHandler::ReliefLogger on older OS X'es.

* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):

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

6 years agoDon't include CompilationThread.h from StringImpl.h
fpizlo@apple.com [Thu, 17 Apr 2014 21:10:29 +0000 (21:10 +0000)]
Don't include CompilationThread.h from StringImpl.h
https://bugs.webkit.org/show_bug.cgi?id=131817

Reviewed by Simon Fraser.

* wtf/CompilationThread.h:
* wtf/StdLibExtras.h:
* wtf/text/StringImpl.h:

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

6 years agoREGRESSION: ASSERT(!typeInfo().hasImpureGetOwnPropertySlot() || typeInfo().newImpureP...
fpizlo@apple.com [Thu, 17 Apr 2014 21:05:43 +0000 (21:05 +0000)]
REGRESSION: ASSERT(!typeInfo().hasImpureGetOwnPropertySlot() || typeInfo().newImpurePropertyFiresWatchpoints()) on jquery tests
https://bugs.webkit.org/show_bug.cgi?id=131798

Reviewed by Alexey Proskuryakov.

Some day, we will fix https://bugs.webkit.org/show_bug.cgi?id=131810 and some version
of this assertion can return. For now, it's not clear that the assertion is guarding
any truly undesirable behavior - so it should just go away and be replaced with a
FIXME.

* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeForStubInfo):
* runtime/Structure.h:
(JSC::Structure::takesSlowPathInDFGForImpureProperty):

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

6 years agoRemove CANVAS_PATH where possible
krit@webkit.org [Thu, 17 Apr 2014 20:32:19 +0000 (20:32 +0000)]
Remove CANVAS_PATH where possible
https://bugs.webkit.org/show_bug.cgi?id=131788

Reviewed by Dean Jackson.

Since Firefox and Chrome ship the same interoperable subset of Path2D soon,
it is time to remove CANVAS_PATH where possible.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::clip):
(WebCore::CanvasRenderingContext2D::isPointInStroke):
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.h:
* html/canvas/DOMPath.idl:

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

6 years ago[GStreamer] Store TrackPrivateBaseGStreamer's label and language as AtomicStrings
b.long@cablelabs.com [Thu, 17 Apr 2014 20:31:13 +0000 (20:31 +0000)]
[GStreamer] Store TrackPrivateBaseGStreamer's label and language as AtomicStrings
https://bugs.webkit.org/show_bug.cgi?id=130404

Reviewed by Philippe Normand.

No new tests, this just makes things more efficient.

* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::getLanguageCode):
(WebCore::TrackPrivateBaseGStreamer::getTag):
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:

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

6 years agoFix Cocoa build.
akling@apple.com [Thu, 17 Apr 2014 20:25:53 +0000 (20:25 +0000)]
Fix Cocoa build.

* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):

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

6 years ago[CSS Blending] Remove the -webkit- prefix for mix-blend-mode and isolation CSS properties
cabanier@adobe.com [Thu, 17 Apr 2014 20:24:43 +0000 (20:24 +0000)]
[CSS Blending] Remove the -webkit- prefix for mix-blend-mode and isolation CSS properties
https://bugs.webkit.org/show_bug.cgi?id=131355

Reviewed by Dean Jackson.

Source/WebCore:
Removed webkit prefix from mix-blend-mode and isolation. These properties
never shipped and their spec is now in CR.

Covered by existing tests.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):

LayoutTests:
Removed prefix from mix-blend-mode and isolation in layout tests.

* css3/compositing/blend-mode-accelerated-with-multiple-stacking-contexts.html:
* css3/compositing/blend-mode-ancestor-clipping-layer.html:
* css3/compositing/blend-mode-background.html:
* css3/compositing/blend-mode-blended-element-overlapping-composited-sibling-should-have-compositing-layer.html:
* css3/compositing/blend-mode-isolated-group-1.html:
* css3/compositing/blend-mode-isolated-group-2.html:
* css3/compositing/blend-mode-isolated-group-3.html:
* css3/compositing/blend-mode-layers.html:
* css3/compositing/blend-mode-parent-of-composited-blended-has-layer.html:
* css3/compositing/blend-mode-property-expected.txt:
* css3/compositing/blend-mode-property-parsing-expected.txt:
* css3/compositing/blend-mode-property-parsing-invalid-expected.txt:
* css3/compositing/blend-mode-reflection.html:
* css3/compositing/blend-mode-simple-composited.html:
* css3/compositing/blend-mode-simple.html:
* css3/compositing/blend-mode-transform-style-expected.txt:
* css3/compositing/blend-mode-transform-style.html:
* css3/compositing/blend-mode-with-accelerated-sibling.html:
* css3/compositing/blend-mode-with-composited-descendant-should-have-layer.html:
* css3/compositing/isolation-isolate-blended-child-expected.html:
* css3/compositing/isolation-isolate-blended-child.html:
* css3/compositing/isolation-parsing.html:
* css3/compositing/script-tests/blend-mode-property-parsing-invalid.js:
(testInvalidFilterRule):
* css3/compositing/script-tests/blend-mode-property-parsing.js:
(testBlendModeRule):
* css3/compositing/script-tests/blend-mode-property.js:
(testblendmode):
* css3/compositing/svg-blend-color-dodge.html:
* css3/compositing/svg-blend-color.html:
* css3/compositing/svg-blend-hard-light.html:
* css3/compositing/svg-blend-hue.html:
* css3/compositing/svg-blend-layer-blend.html:
* css3/compositing/svg-blend-layer-clip-path.html:
* css3/compositing/svg-blend-layer-filter.html:
* css3/compositing/svg-blend-layer-opacity.html:
* css3/compositing/svg-blend-layer-shadow.html:
* css3/compositing/svg-blend-luminosity.html:
* css3/compositing/svg-blend-multiply-alpha.html:
* css3/compositing/svg-blend-multiply.html:
* css3/compositing/svg-blend-saturation.html:
* css3/compositing/svg-blend-screen.html:
* css3/compositing/svg-blend-soft-light.html:
* css3/compositing/svg-isolation-default-expected.html:
* css3/compositing/svg-isolation-default.html:
* css3/compositing/svg-isolation-isolated-group-expected.html:
* css3/compositing/svg-isolation-isolated-group.html:
* fast/repaint/blend-mode-isolate-stacking-context.html:
* inspector-protocol/layers/layers-blending-compositing-reasons.html:
* transitions/blendmode-transitions-expected.txt:
* transitions/blendmode-transitions.html:

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

6 years agoTidy up isIsolatedInline() and highestContainingIsolateWithinRoot()
ddkilzer@apple.com [Thu, 17 Apr 2014 19:39:22 +0000 (19:39 +0000)]
Tidy up isIsolatedInline() and highestContainingIsolateWithinRoot()
<http://webkit.org/b/131117>

Reviewed by Daniel Bates.

Based on review feedback for r166650.

* rendering/InlineIterator.h:
(WebCore::isIsolatedInline):
- Switch argument to a reference since it is never called with a
  nullptr.
(WebCore::highestContainingIsolateWithinRoot):
- Switch first argument to a reference since it's never a
  nullptr.
- Use nullptr for pointer initialization.
- Switch while() loop to for() loop. Pass reference to
  isIsolatedInline().
(WebCore::numberOfIsolateAncestors):
- Switch while() loop to for() loop. Pass reference to
  isIsolatedInline().
* rendering/RenderBlockLineLayout.cpp:
(WebCore::constructBidiRunsForSegment):
- Rename startObj to startObject.
- No longer need to pass the address of startObject here.

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

6 years agoFix build bustage.
hyatt@apple.com [Thu, 17 Apr 2014 19:27:28 +0000 (19:27 +0000)]
Fix build bustage.

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

6 years agoLog number of bytes reclaimed at each step of memory pressure relief.
akling@apple.com [Thu, 17 Apr 2014 19:19:58 +0000 (19:19 +0000)]
Log number of bytes reclaimed at each step of memory pressure relief.
<https://webkit.org/b/131751>

Reviewed by Antti Koivisto.

* platform/MemoryPressureHandler.h:
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
(WebCore::MemoryPressureHandler::ReliefLogger::ReliefLogger):
(WebCore::MemoryPressureHandler::ReliefLogger::~ReliefLogger):
* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandlerCocoa::ReliefLogger::platformMemoryUsage):
(WebCore::MemoryPressureHandlerCocoa::ReliefLogger::platformLog):

    Add a simple RAII helper to check memory usage before and after
    a block of code, and then dump the delta to system log.

(WebCore::MemoryPressureHandler::releaseMemory):
* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::platformReleaseMemory):

    Use ReliefLogger to annotate the various attempts to reduce
    our memory footprint. This will help us understand the efficiency
    of our current strategy.

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

6 years ago[New Multicolumn] columnNumberForOffset is not patched for new multicolumn code yet.
hyatt@apple.com [Thu, 17 Apr 2014 18:48:15 +0000 (18:48 +0000)]
[New Multicolumn] columnNumberForOffset is not patched for new multicolumn code yet.
https://bugs.webkit.org/show_bug.cgi?id=131740

Reviewed by Enrica Casucci.

I took the opportunity to clean this code up while adding support for the new columns.
columnNumberForOffset only applied for paginated RenderViews and was really about
pages and not columns. It also only returns an actual page number if the columns are
block progressed (e.g., right-to-left vertical Japanese books).

Therefore I renamed columnNumberForOffset to pageNumberForBlockProgressionOffset and
moved it to RenderView.

I also renamed the member variable of SelectionRect to be pageNumber instead of
columnNumber in order to make it more obvious that this isn't about columns per se
(since the fact that we implemented RenderView's pagination mode using columns is an
implementation detail).

* dom/Range.cpp:
(WebCore::coalesceSelectionRects):
(WebCore::Range::collectSelectionRects):
* platform/ios/SelectionRect.h:
(WebCore::SelectionRect::pageNumber):
(WebCore::SelectionRect::columnNumber): Deleted.
* rendering/RenderImage.cpp:
(WebCore::RenderImage::collectSelectionRects):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::collectSelectionRects):
(WebCore::RenderObject::columnNumberForOffset): Deleted.
* rendering/RenderObject.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::collectSelectionRects):
* rendering/RenderView.cpp:
(WebCore::RenderView::pageNumberForBlockProgressionOffset):
* rendering/RenderView.h:

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

6 years ago[Win] Unreviewed 64-bit build fix.
bfulgham@apple.com [Thu, 17 Apr 2014 18:26:58 +0000 (18:26 +0000)]
[Win] Unreviewed 64-bit build fix.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Do not
export 32-bit symbol in 64-bit build.

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

6 years ago[Win] A few final cleanups to the DataObject classes.
bfulgham@apple.com [Thu, 17 Apr 2014 18:14:12 +0000 (18:14 +0000)]
[Win] A few final cleanups to the DataObject classes.
https://bugs.webkit.org/show_bug.cgi?id=131784

Reviewed by Anders Carlsson.

Source/WebCore:
* platform/win/WCDataObject.cpp:
(WebCore::WCDataObject::clearData): Use 'last()' method.

Tools:
* DumpRenderTree/win/DRTDataObject.cpp:
(DRTDataObject::clearData): Use 'last()' method.
* DumpRenderTree/win/UIDelegate.cpp:
(DRTUndoStack::pop): Use 'takeLast()' method.

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

6 years agoFullscreen media controls are unusable in pagination mode
jer.noble@apple.com [Thu, 17 Apr 2014 17:59:26 +0000 (17:59 +0000)]
Fullscreen media controls are unusable in pagination mode
https://bugs.webkit.org/show_bug.cgi?id=131705

Reviewed by Darin Adler.

Source/WebCore:
When pagination mode is enabled, the full screen media will (depending on the width of the
pagination columns) overflow its column, and hit testing will be clipped to the column. In extreme
cases, where the column width < 0.5 * media element width, the media controls will be entirely
unclickable.

Rather than making the RenderFullScreen a child of the full screen element's parent's renderer,
make it a child of the RenderView, putting it outside of the columns entirely. Always create and
insert the fullscreenRenderer's placeholder, using it as the remembered insertion point for the
fullscreen element's renderer when we exit full screen.

Drive-by fix: don't wrap the full screen element's renderer in webkitWillEnterFullScreenForElement();
it will just be re-wrapped in createRendererIfNeeded().

* dom/Document.cpp:
(WebCore::Document::webkitWillEnterFullScreenForElement): Don't wrap the full screen element's renderer.
(WebCore::Document::setFullScreenRenderer): Call setPlaceholderStyle.
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreenPlaceholder::willBeDestroyed): Call clearPlaceholder.
(WebCore::RenderFullScreen::wrapRenderer): Make fullscreenRenderer a child of the view().
(WebCore::RenderFullScreen::unwrapRenderer): Return the children to the parent of the placeholder().
(WebCore::RenderFullScreen::clearPlaceholder): Renamed from setPlaceholder().
(WebCore::RenderFullScreen::ensurePlaceholder): Added.
(WebCore::RenderFullScreen::setPlaceholderStyle): Renamed from createPlaceholder().
(WebCore::RenderFullScreen::setPlaceholder): Deleted.
(WebCore::RenderFullScreen::createPlaceholder): Deleted.
* rendering/RenderFullScreen.h:

LayoutTests:
* fullscreen/full-screen-no-style-sharing-expected.txt: Rebaselined.
* fullscreen/video-cursor-auto-hide.html: Corrected test to move cursor
    to the middle of the video element.

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

6 years ago[MSE] Multiple initialization segments with same codecs in tracks fail validation.
jer.noble@apple.com [Thu, 17 Apr 2014 17:54:59 +0000 (17:54 +0000)]
[MSE] Multiple initialization segments with same codecs in tracks fail validation.
https://bugs.webkit.org/show_bug.cgi?id=131768

Source/WebCore:
Additional initialization segments added to the same SourceBuffer with the same
codec values will fail validation. Update the validation check to add the correct
codec information for the initial segment, and check against the correct codecs during
the validation step.

Additionally, after validation, if successful update the Audio, Video, and TextTracks
for the SourceBuffer with the updated initialization segment information.

Reviewed by Eric Carlson.

Test: media/media-source/media-source-multiple-initialization-segments.html

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::appendBufferTimerFired): m_source may have been cleared
    as a result of the append, so check it before using.
(WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Call streamEndedWithError
    instead of endOfStream as the latter is safe to call within an update.
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Ditto.
    Update the track lists if validation succeeds.
(WebCore::SourceBuffer::validateInitializationSegment): Switch the audio and video
    codec checks.

Add the ability for Audio, Video, and InbandTextTracks to replace their private tracks:
* html/track/AudioTrack.cpp:
(WebCore::AudioTrack::AudioTrack): Call updateKindFromPrivate().
(WebCore::AudioTrack::setPrivate):
(WebCore::AudioTrack::updateKindFromPrivate): Split out from constructor.
* html/track/AudioTrack.h:
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::InbandTextTrack): Call updateKindFromPrivate().
(WebCore::InbandTextTrack::setPrivate):
(WebCore::InbandTextTrack::setMode): Split up into setModeInternal().
(WebCore::InbandTextTrack::setModeInternal): Broke out from setMode().
(WebCore::InbandTextTrack::updateKindFromPrivate): Split out from constructor.
* html/track/InbandTextTrack.h:
* html/track/TextTrack.h:
(WebCore::TextTrack::isInband): Added, returns false.
* html/track/VideoTrack.cpp:
(WebCore::VideoTrack::VideoTrack): Call updateKindFromPrivate().
(WebCore::VideoTrack::setPrivate):
(WebCore::VideoTrack::updateKindFromPrivate):  Split out from constructor.
* html/track/VideoTrack.h:

LayoutTests:
Reviewed by Eric Carlson.

* media/media-source/media-source-multiple-initialization-segments-expected.txt: Added.
* media/media-source/media-source-multiple-initialization-segments.html: Added.

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

6 years ago[New Multicolumn] Column sets below spanners don't repaint properly.
hyatt@apple.com [Thu, 17 Apr 2014 17:53:40 +0000 (17:53 +0000)]
[New Multicolumn] Column sets below spanners don't repaint properly.
https://bugs.webkit.org/show_bug.cgi?id=131778

Reviewed by Beth Dakin.

Source/WebCore:
Added fast/repaint/spanner-with-margins.html.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
Turn off some code that was running for in-flow RenderFlowThreads that made no sense.
I'm not convinced the code is right for other types of RenderFlowThreads either,
but will leave that to the named flow thread experts. :)

LayoutTests:
* fast/repaint/spanner-with-margin-expected.txt: Added.
* fast/repaint/spanner-with-margin.html: Added.

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

6 years ago[GTK] [Gardening] Updates GTK test expectations
mrobinson@webkit.org [Thu, 17 Apr 2014 17:52:23 +0000 (17:52 +0000)]
[GTK] [Gardening] Updates GTK test expectations

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2014-04-17

* platform/gtk/TestExpectations:
  - Marked as flaky
    - fast/frames/frame-programmatic-noresize.html
    - fast/frames/frame-with-noresize-can-be-resized-after-removal-of-noresize.html
    - fast/frames/frame-with-noresize-can-be-resized-after-setting-noResize-to-false.html
  - Removed because are passing now
    - fast/dom/gc-dom-tree-lifetime.html
    - http/tests/loading/authentication-after-redirect-stores-wrong-credentials/authentication-after-redirect-stores-wrong-credentials.html
    - editing/editability/ignored-content.html

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

6 years agoCatch up ruby and its tag omission rule changes in HTML5 CR Feb 2014
commit-queue@webkit.org [Thu, 17 Apr 2014 17:41:38 +0000 (17:41 +0000)]
Catch up ruby and its tag omission rule changes in HTML5 CR Feb 2014
https://bugs.webkit.org/show_bug.cgi?id=131175

Patch by Koji Ishii <kojishi@gmail.com> on 2014-04-17
Reviewed by Darin Adler.

Source/WebCore:
Tests: html5lib/resources/ruby.dat
       html5lib/resources/tests19.dat

This patch makes WebKit HTML parser to match to the tag omission rules of HTML5 CR Feb 2014:
http://www.w3.org/TR/2014/CR-html5-20140204/syntax.html#syntax-tag-omission
with the support for two new elements (rb, rtc) which were also defined in the spec:
http://www.w3.org/TR/2014/CR-html5-20140204/text-level-semantics.html#the-rb-element
http://www.w3.org/TR/2014/CR-html5-20140204/text-level-semantics.html#the-rtc-element
to better support use cases presented by W3C I18N WG:
http://www.w3.org/TR/ruby-use-cases/

* html/HTMLTagNames.in: rb and rtc added as HTMLElement interfaces.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::hasImpliedEndTag): the spec says rb and rtc have implied end tags.
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody): rb and rtc added. rt excludes rtc from its implied end tags.

LayoutTests:
25 new test cases in 2 test files imported from pull requests to html5lib-tests,
with run- and expected-files generated.
All new tests pass with the changes included in this patch.

* html5lib/generated/run-ruby-data-expected.txt: Added.
* html5lib/generated/run-ruby-data.html: Added (generated by generate-test-wrappers.py)
* html5lib/generated/run-ruby-write-expected.txt: Added.
* html5lib/generated/run-ruby-write.html: Added (generated by generate-test-wrappers.py)
* html5lib/resources/ruby.dat: Added from https://github.com/darobin/html5lib-tests/pull/1
* html5lib/resources/tests19.dat: Updated from https://github.com/html5lib/html5lib-tests/pull/27

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

6 years ago Try to fix EFL and GTK builds.
darin@apple.com [Thu, 17 Apr 2014 17:37:40 +0000 (17:37 +0000)]
    Try to fix EFL and GTK builds.

        * Source/cmake/OptionsEfl.cmake: Add INDEXED_DATABASE_IN_WORKERS.
        * Source/cmake/OptionsGTK.cmake: Ditto.
        * Source/cmakeconfig.h.cmake: Ditto.

        * Source/WebCore/workers/WorkerGlobalScope.idl: Touch file to make it rebuild,
        assuming that module dependencies aren't working right with CMake. Tweaked
        formatting quite a bit while I was in here.

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

6 years agoBlind attempt to fix Windows build after r166837
ddkilzer@apple.com [Thu, 17 Apr 2014 17:34:52 +0000 (17:34 +0000)]
Blind attempt to fix Windows build after r166837
<http://webkit.org/b/131246>

Hoping to fix this build error:

    warning MSB8027: Two or more files with the name of GCLogging.cpp will produce outputs to the same location. This can lead to an incorrect build result.  The files involved are ..\heap\GCLogging.cpp, ..\heap\GCLogging.cpp.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Fix copy-paste
boo-boo by changing the GCLogging.cpp ClCompile entry to a
GCLogging.h ClInclude entry.

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

6 years agoDon't skip inspector/dom/content-flow-list.html and inspector/dom/content-flow-conten...
ap@apple.com [Thu, 17 Apr 2014 17:04:29 +0000 (17:04 +0000)]
Don't skip inspector/dom/content-flow-list.html and inspector/dom/content-flow-content-removal.html.

First, they no longer crash/assert. They fail most of the time, but that's tracked as bug 129817.

Second, skipping was ineffective anyway, because we had a preceding [ Pass Failure ]
entry for the same files.

* TestExpectations:

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