Regions should be allocated from the same contiguous segment of virtual memory
https://bugs.webkit.org/show_bug.cgi?id=113662

Reviewed by Filip Pizlo.

Instead of letting the OS spread our Regions all over the place, we should allocate them all within 
some range of each other. This change will open the door to some other optimizations, e.g. doing simple 
range checks for our write barriers and compressing JSCell pointers to 32-bits.

Source/JavaScriptCore: 

Added new SuperRegion class that encapsulates allocating Regions from a contiguous reserved chunk of 
virtual address space. It functions very similarly to the FixedVMPoolExecutableAllocator class used by the JIT.

Also added two new subclasses of Region, NormalRegion and ExcessRegion. 
        
NormalRegion is the type of Region that is normally allocated when there is available space remaining 
in the SuperRegion. If we ever run out of space in the SuperRegion, we fall back to allocating 
ExcessRegions, which are identical to how Regions have behaved up until now, i.e. they contain a 
PageAllocationAligned.

We only use the SuperRegion (and NormalRegions) on 64-bit systems, since it doesn't make sense to reserve the 
entire 4 GB address space on 32-bit systems just for the JS heap.

* GNUmakefile.list.am:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* heap/BlockAllocator.cpp:
(JSC::BlockAllocator::BlockAllocator):
* heap/BlockAllocator.h:
(JSC):
(BlockAllocator):
(JSC::BlockAllocator::allocate):
(JSC::BlockAllocator::allocateCustomSize):
(JSC::BlockAllocator::deallocateCustomSize):
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC):
(JSC::Heap::didExceedFixedHeapSizeLimit):
* heap/Heap.h:
(Heap):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::create):
* heap/Region.h:
(Region):
(JSC):
(NormalRegion):
(JSC::NormalRegion::base):
(JSC::NormalRegion::size):
(ExcessRegion):
(JSC::ExcessRegion::base):
(JSC::ExcessRegion::size):
(JSC::NormalRegion::NormalRegion):
(JSC::NormalRegion::tryCreate):
(JSC::NormalRegion::tryCreateCustomSize):
(JSC::NormalRegion::reset):
(JSC::ExcessRegion::ExcessRegion):
(JSC::ExcessRegion::~ExcessRegion):
(JSC::ExcessRegion::create):
(JSC::ExcessRegion::createCustomSize):
(JSC::ExcessRegion::reset):
(JSC::Region::Region):
(JSC::Region::initializeBlockList):
(JSC::Region::create):
(JSC::Region::createCustomSize):
(JSC::Region::~Region):
(JSC::Region::destroy):
(JSC::Region::reset):
(JSC::Region::deallocate):
(JSC::Region::base):
(JSC::Region::size):
* heap/SuperRegion.cpp: Added.
(JSC):
(JSC::SuperRegion::SuperRegion):
(JSC::SuperRegion::getAlignedBase):
(JSC::SuperRegion::allocateNewSpace):
(JSC::SuperRegion::notifyNeedPage):
(JSC::SuperRegion::notifyPageIsFree):
* heap/SuperRegion.h: Added.
(JSC):
(SuperRegion):

Source/WTF: 

* wtf/MetaAllocator.cpp: Changed the MetaAllocator to allow custom page sizes if the derived class wants to
use something other than the system page size.
(WTF::MetaAllocator::MetaAllocator):
* wtf/MetaAllocator.h:
(MetaAllocator):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Parsing WebVTT Region Header Metadata
https://bugs.webkit.org/show_bug.cgi?id=109818

Reviewed by Eric Carlson.

Source/WebCore:

This patch enables reading regions from the metadata section of
a WebVTT file. The work for defining generic metadata within the
WebVTT file header is still work in progress in the TextTrack CG.

As previous patches, everything is guarded by WEBVTT_REGIONS and
is by default disabled in all ports.

Test: media/track/regions-webvtt/text-track-region-parser.html

* html/track/LoadableTextTrack.cpp:
(WebCore):
(WebCore::LoadableTextTrack::newRegionsAvailable): Added method
to be called as soon as regions have finished parsing.
* html/track/LoadableTextTrack.h:
(LoadableTextTrack):
* html/track/TextTrack.h: Changed the access modifiers.
(TextTrack):
* html/track/TextTrackRegion.cpp:
(WebCore::TextTrackRegion::setRegionSettings): Entry point for
parsing the region settings from a string.
(WebCore):
(WebCore::TextTrackRegion::getSettingFromString): Maps a string
to a RegionSetting value.
(WebCore::TextTrackRegion::parseSettingValue): Parses the value
of a specific setting.
(WebCore::TextTrackRegion::parseSetting): Parses a setting string.
* html/track/TextTrackRegion.h:
* html/track/WebVTTParser.cpp:
(WebCore):
(WebCore::WebVTTParser::parseFloatPercentageValue): Helper method
to parse a float percentage value (e.g. "50.1%")
(WebCore::WebVTTParser::parseFloatPercentageValuePair): Helper method
to parse a float percentage value pair (e.g. "50.1%, 30.5%")
(WebCore::WebVTTParser::getNewRegions): Retrieves the new regions
available for processing.
(WebCore::WebVTTParser::parseBytes):
(WebCore::WebVTTParser::collectHeader): Generic function to collect
header in the metadata region.
(WebCore::WebVTTParser::createNewRegion): Creates new region using
the existing metadata header name and value.
* html/track/WebVTTParser.h:
(WebVTTParserClient):
(WebVTTParser):
* loader/TextTrackLoader.cpp:
(WebCore):
(WebCore::TextTrackLoader::newRegionsParsed): Called when the
regions have been succesfully parsed.
(WebCore::TextTrackLoader::getNewRegions): Gets the new regions.
* loader/TextTrackLoader.h:
(TextTrackLoaderClient): Added methods that need to be implemented.
(TextTrackLoader):

LayoutTests:

* media/track/captions-webvtt/header-regions.vtt: Added.
* media/track/regions-webvtt/text-track-region-parser-expected.txt: Added.
* media/track/regions-webvtt/text-track-region-parser.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Exception in console on attempt to filter javascript messages.
https://bugs.webkit.org/show_bug.cgi?id=113327

Fixed non-css filtration if console message groups are present. Message groups elements are always shown and are
never filtered out.

Patch by Dmitry Zvorygin <zvorygin@chromium.org> on 2013-04-01
Reviewed by Pavel Feldman.

* inspector/front-end/ConsoleMessage.js:
(WebInspector.ConsoleMessageImpl.prototype.updateRepeatCount):
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.get this):
(WebInspector.ConsoleView.prototype._consoleMessageAdded):
(WebInspector.ConsoleView.prototype._appendConsoleMessage):
(WebInspector.ConsoleView.prototype._consoleCleared):
(WebInspector.ConsoleView.prototype._shouldBeVisible):
(WebInspector.ConsoleView.prototype._updateMessageList):
(WebInspector.ConsoleView.prototype._printResult):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
EFL build fix

Unreviewed build fix.

* CMakeLists.txt:


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