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
32-bit Windows build fix

Unreviewed build fix.

* heap/SuperRegion.cpp:
* heap/SuperRegion.h: Use uint64_t instead of size_t.
(SuperRegion):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
r147324 broke the world
https://bugs.webkit.org/show_bug.cgi?id=113704

Unreviewed build fix.

Remove a bunch of unused variables and use the correctly sized types for 32-bit platforms.

* heap/BlockAllocator.cpp:
(JSC::BlockAllocator::BlockAllocator):
* heap/BlockAllocator.h:
(BlockAllocator):
* heap/Heap.cpp:
(JSC::Heap::Heap):
* heap/SuperRegion.cpp:
(JSC::SuperRegion::SuperRegion):
* heap/SuperRegion.h:
(SuperRegion):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: follow up to r147323, popover is empty on network panel.
Not reviewed.

* inspector/front-end/DOMExtension.js:
(Element.prototype.measurePreferredSize):
* inspector/front-end/Popover.js:
(WebInspector.Popover.prototype._innerShow):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
More build fallout fixes.

Unreviewed build fix.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: Add new export symbols.
* heap/SuperRegion.cpp: Windows didn't like "LLU". 


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Minor code cleanup by removing duplicated null checks
https://bugs.webkit.org/show_bug.cgi?id=113701

Reviewed by Darin Adler.

Duplicated null check is code redundancy, so delete those.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setFocusedNodeIfNeeded):
* platform/Arena.cpp:
(WebCore::FreeArenaList):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
One more Windows build fix

Unreviewed.

* JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixing borked VS 2010 project file

Unreviewed bot greening.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make a bunch of DocumentLoader functions private
https://bugs.webkit.org/show_bug.cgi?id=113601

Reviewed by Alexey Proskuryakov.

No new tests, cleanup only.

* loader/DocumentLoader.cpp:
* loader/DocumentLoader.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r147319.
http://trac.webkit.org/changeset/147319
https://bugs.webkit.org/show_bug.cgi?id=113707

The unit test is still failing on the buildbot (Requested by
zdobersek on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-04-01

* Scripts/run-gtk-tests:
(TestRunner):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147338 268f45cc-cd09-0410-ab3c-d52691b4dbfc
SharedMemory release build hardening.
<rdar://problem/13546860> and https://bugs.webkit.org/show_bug.cgi?id=113710

Reviewed by Anders Carlsson.

Successful creation of a memory entry with a size less than the size we requested should be treated
as a failure to create the SharedMemory object.

* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::createFromVMBuffer): Early return if the port we get is bogus for our needs.
(WebKit::SharedMemory::createHandle): Ditto.
(WebKit::SharedMemory::create): Guarantee we pass valid input in to mach_vm_map.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: "video element controller" is an overly verbose default description for the playback controls; how about just "playback"
https://bugs.webkit.org/show_bug.cgi?id=113549

Patch by James Craig <james@cookiecrook.com> on 2013-04-01
Reviewed by Chris Fleizach.

Source/WebCore:

Existing test coverage.

Updating the video/audio element's default accessibility labels to be less verbose.
Also cleaned up some erroneous comments related to the sub-level controls on these elements.

* English.lproj/Localizable.strings:
* platform/LocalizedStrings.cpp:
(WebCore::localizedMediaControlElementString):
(WebCore::localizedMediaControlElementHelpText):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::localizedMediaControlElementString):

Source/WebCore/platform/gtk/po:

Existing test coverage.

Updating the video/audio element's default accessibility labels to be less verbose.

* en_CA.po:
* en_GB.po:

LayoutTests:

Updating the video/audio element's default accessibility labels to be less verbose.

* platform/gtk/accessibility/media-controls-panel-title-expected.txt:
* platform/gtk/accessibility/media-controls-panel-title.html:
* platform/gtk/accessibility/media-element-expected.txt:
* platform/mac/accessibility/media-element-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <rdar://problem/13490123> Sandbox extension tracking is incorrect when restoring a session
        https://bugs.webkit.org/show_bug.cgi?id=113709

        Reviewed by Anders Carlsson.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): Added an assertion
        to catch extension tracking logic errors that could result in giving an extension to
        non-local pages.
        (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad): Just like
        below, clearing m_pendingProvisionalSandboxExtension appears incorrect, even though
        I am not aware of any scenarios where this happens in practice.
        (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad): The load may
        be failing exactly because a new one cancels it, so we shouldn't be preventing
        the new one from using its extension.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move definition of nested classes that inherit enclosing class outside class definition.
https://bugs.webkit.org/show_bug.cgi?id=113454

Patch by Han Shen <shenhan@google.com> on 2013-04-01
Reviewed by Benjamin Poulain.

HashMap.h does not build on GCC 4.8. Inside this file,
HashMapKeysProxy and HashMapValuesProxy are defined as nested
class inside HashMap - which is legal - the illegal part is that
these 2 classes inherit HashMap, that is the enclosing class, that
causes "reference to in-complete definition" error.

The fix is to move outside the definition of these 2 classes, and
leave only declaration part inside HashMap as is illustrated below -

  template class <typename T>
  class HashMap {
    ... ...
    ... ...
  private:
    class HashMapKeysProxy;

    // ERROR - nested class inherits enclosing class.
    class HashMapKeysProxy : private HashMap {
        ... ...
    };
    ... ...
    ... ...
    class HashMapKeysProxy : private HashMap {
        ... ...
    };
    ... ...
    ... ...
  };

Fixed as below:
  template class <typename T>
  class HashMap {
    ... ...
    ... ...
  private:
    class HashMapKeysProxy;
    class HashMapValuesProxy;

    ... ...
    ... ...
  };

  template <typename T>
  class HashMap<T>::HashMapKeysProxy : private HashMap<T> {
    ... ...
  };

  template <typename T>
  class HashMap<T>::HashMapValuesProxy : private HashMap<T> {
    ... ...
  };

* wtf/HashMap.h:
(HashMap):
(WTF): Factor out nested class definition from enclosing class.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSP 1.1: Remove 'type' parameter from CSPDirectiveList::checkSourceAndReportViolation.
https://bugs.webkit.org/show_bug.cgi?id=113502

Reviewed by Adam Barth.

Source/WebCore:

Now that we're passing in 'effectiveDirective', we don't need the 'type'
parameter to generate the proper error message prefix when reporting
violations.

While I'm here, I'll slightly tweak the grammar for the error messages.
Changes are covered via rebaselines of existing tests.

* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::checkSourceAndReportViolation):
    Drop the 'type' parameter. We don't need to pass in a type since
    we're now passing in the 'effectiveDirective'; we can use the latter
    to generate the correct error message prefix.
(WebCore::CSPDirectiveList::allowScriptFromSource):
(WebCore::CSPDirectiveList::allowObjectFromSource):
(WebCore::CSPDirectiveList::allowChildFrameFromSource):
(WebCore::CSPDirectiveList::allowImageFromSource):
(WebCore::CSPDirectiveList::allowStyleFromSource):
(WebCore::CSPDirectiveList::allowFontFromSource):
(WebCore::CSPDirectiveList::allowMediaFromSource):
(WebCore::CSPDirectiveList::allowConnectToSource):
(WebCore::CSPDirectiveList::allowFormAction):
(WebCore::CSPDirectiveList::allowBaseURI):
    Drop the 'type' parameter from the callsites, which has the lovely
    property of allowing us to throw away a bunch of statically allocated
    strings that we don't need anymore.

LayoutTests:

* http/tests/security/contentSecurityPolicy/frame-src-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/frame-src-redirect-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/media-src-track-block-expected.txt:
* http/tests/security/contentSecurityPolicy/object-src-no-url-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/object-src-none-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/object-src-url-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/style-blocked-expected.txt:
* media/csp-blocks-video-expected.txt:
* platform/chromium/http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt:
* platform/chromium/media/csp-blocks-video-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, chromium gardening.

* platform/chromium-linux-x86/fast/backgrounds/repeat: Removed.
* platform/chromium-linux-x86/fast/backgrounds/repeat/mask-negative-offset-repeat-expected.png: Removed.
* platform/chromium-linux-x86/fast/borders/border-image-scale-transform-expected.png: Removed.
* platform/chromium-linux-x86/fast/borders/border-image-scaled-expected.png: Removed.
* platform/chromium-linux-x86/fast/borders/scaled-border-image-expected.png: Removed.
* platform/chromium-linux/css2.1/20110323/replaced-min-max-001-expected.png:
* platform/chromium-linux/css2.1/t090501-c5525-flt-l-00-b-g-expected.png:
* platform/chromium-linux/css2.1/t090501-c5525-flt-r-00-b-g-expected.png:
* platform/chromium-linux/fast/backgrounds/repeat/mask-negative-offset-repeat-expected.png:
* platform/chromium-linux/fast/backgrounds/size/contain-and-cover-expected.png:
* platform/chromium-linux/fast/backgrounds/size/contain-and-cover-zoomed-expected.png:
* platform/chromium-linux/fast/block/positioning/replaced-inside-fixed-top-bottom-expected.png: Added.
* platform/chromium-linux/fast/borders/border-image-scale-transform-expected.png:
* platform/chromium-linux/fast/borders/border-image-scaled-expected.png:
* platform/chromium-linux/fast/borders/scaled-border-image-expected.png:
* platform/chromium-linux/fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.png:
* platform/chromium-linux/fast/images/imagemap-focus-ring-zero-outline-width-expected.png:
* platform/chromium-linux/fast/replaced/absolute-image-sizing-expected.png:
* platform/chromium-linux/fast/writing-mode/block-level-images-expected.png:
* platform/chromium-linux/platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-zero-outline-width-expected.png: Added.
* platform/chromium-linux/svg/W3C-I18N/g-dirLTR-ubNone-expected.png:
* platform/chromium-linux/svg/W3C-I18N/g-dirLTR-ubOverride-expected.png:
* platform/chromium-linux/svg/W3C-I18N/g-dirRTL-ubNone-expected.png:
* platform/chromium-linux/svg/W3C-I18N/g-dirRTL-ubOverride-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-anchor-no-markup-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-dirLTR-ubNone-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-dirLTR-ubOverride-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-dirRTL-ubNone-expected.png:
* platform/chromium-linux/svg/W3C-I18N/text-dirRTL-ubOverride-expected.png:
* platform/chromium-mac-lion/css2.1/20110323/replaced-min-max-001-expected.png:
* platform/chromium-mac-lion/css2.1/t090501-c5525-flt-l-00-b-g-expected.png:
* platform/chromium-mac-lion/css2.1/t090501-c5525-flt-r-00-b-g-expected.png:
* platform/chromium-mac-lion/fast/backgrounds/repeat/mask-negative-offset-repeat-expected.png:
* platform/chromium-mac-lion/fast/borders/border-image-scale-transform-expected.png:
* platform/chromium-mac-lion/fast/borders/border-image-scaled-expected.png:
* platform/chromium-mac-lion/fast/borders/scaled-border-image-expected.png:
* platform/chromium-mac-lion/fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.png:
* platform/chromium-mac-lion/fast/images/imagemap-focus-ring-zero-outline-width-expected.png:
* platform/chromium-mac-lion/fast/replaced/absolute-image-sizing-expected.png:
* platform/chromium-mac-lion/platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-zero-outline-width-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/g-dirLTR-ubNone-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/g-dirLTR-ubOverride-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/g-dirRTL-ubNone-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/g-dirRTL-ubOverride-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-anchor-no-markup-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-dirLTR-ubNone-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-dirLTR-ubOverride-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-dirRTL-ubNone-expected.png:
* platform/chromium-mac-lion/svg/W3C-I18N/text-dirRTL-ubOverride-expected.png:
* platform/chromium-mac-snowleopard/css2.1/20110323/replaced-min-max-001-expected.png:
* platform/chromium-mac-snowleopard/css2.1/t090501-c5525-flt-l-00-b-g-expected.png:
* platform/chromium-mac-snowleopard/css2.1/t090501-c5525-flt-r-00-b-g-expected.png:
* platform/chromium-mac-snowleopard/fast/backgrounds/repeat/mask-negative-offset-repeat-expected.png:
* platform/chromium-mac-snowleopard/fast/borders/border-image-scale-transform-expected.png:
* platform/chromium-mac-snowleopard/fast/borders/border-image-scaled-expected.png:
* platform/chromium-mac-snowleopard/fast/borders/scaled-border-image-expected.png:
* platform/chromium-mac-snowleopard/fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.png:
* platform/chromium-mac-snowleopard/fast/images/imagemap-focus-ring-zero-outline-width-expected.png:
* platform/chromium-mac-snowleopard/fast/replaced/absolute-image-sizing-expected.png:
* platform/chromium-mac-snowleopard/platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-zero-outline-width-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/g-dirLTR-ubNone-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/g-dirLTR-ubOverride-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/g-dirRTL-ubNone-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/g-dirRTL-ubOverride-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-anchor-no-markup-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-dirLTR-ubNone-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-dirLTR-ubOverride-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-dirRTL-ubNone-expected.png:
* platform/chromium-mac-snowleopard/svg/W3C-I18N/text-dirRTL-ubOverride-expected.png:
* platform/chromium-mac/css2.1/20110323/replaced-min-max-001-expected.png:
* platform/chromium-mac/css2.1/t090501-c5525-flt-l-00-b-g-expected.png:
* platform/chromium-mac/css2.1/t090501-c5525-flt-r-00-b-g-expected.png:
* platform/chromium-mac/fast/backgrounds/repeat/mask-negative-offset-repeat-expected.png:
* platform/chromium-mac/fast/backgrounds/size/backgroundSize02-expected.png:
* platform/chromium-mac/fast/backgrounds/size/backgroundSize04-expected.png:
* platform/chromium-mac/fast/backgrounds/size/backgroundSize06-expected.png:
* platform/chromium-mac/fast/backgrounds/size/backgroundSize13-expected.png:
* platform/chromium-mac/fast/backgrounds/size/backgroundSize14-expected.png:
* platform/chromium-mac/fast/backgrounds/size/contain-and-cover-expected.png:
* platform/chromium-mac/fast/backgrounds/size/contain-and-cover-zoomed-expected.png:
* platform/chromium-mac/fast/block/positioning/replaced-inside-fixed-top-bottom-expected.png:
* platform/chromium-mac/fast/borders/border-image-scale-transform-expected.png:
* platform/chromium-mac/fast/borders/border-image-scaled-expected.png:
* platform/chromium-mac/fast/borders/border-image-side-reduction-expected.png:
* platform/chromium-mac/fast/borders/scaled-border-image-expected.png:
* platform/chromium-mac/fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.png:
* platform/chromium-mac/fast/images/imagemap-focus-ring-zero-outline-width-expected.png:
* platform/chromium-mac/fast/replaced/absolute-image-sizing-expected.png:
* platform/chromium-mac/fast/writing-mode/block-level-images-expected.png:
* platform/chromium-mac/platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-zero-outline-width-expected.png:
* platform/chromium-mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.png:
* platform/chromium-mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.png:
* platform/chromium-mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.png:
* platform/chromium-mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-anchor-no-markup-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.png:
* platform/chromium-mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.png:
* platform/chromium-win/css2.1/20110323/replaced-min-max-001-expected.png:
* platform/chromium-win/css2.1/t090501-c5525-flt-l-00-b-g-expected.png:
* platform/chromium-win/css2.1/t090501-c5525-flt-r-00-b-g-expected.png:
* platform/chromium-win/fast/backgrounds/repeat/mask-negative-offset-repeat-expected.png:
* platform/chromium-win/fast/backgrounds/size/backgroundSize02-expected.png:
* platform/chromium-win/fast/backgrounds/size/backgroundSize04-expected.png:
* platform/chromium-win/fast/backgrounds/size/backgroundSize06-expected.png:
* platform/chromium-win/fast/backgrounds/size/backgroundSize13-expected.png:
* platform/chromium-win/fast/backgrounds/size/backgroundSize14-expected.png:
* platform/chromium-win/fast/backgrounds/size/contain-and-cover-expected.png:
* platform/chromium-win/fast/backgrounds/size/contain-and-cover-zoomed-expected.png:
* platform/chromium-win/fast/block/positioning/replaced-inside-fixed-top-bottom-expected.png:
* platform/chromium-win/fast/borders/border-image-scale-transform-expected.png:
* platform/chromium-win/fast/borders/border-image-scaled-expected.png:
* platform/chromium-win/fast/borders/border-image-side-reduction-expected.png:
* platform/chromium-win/fast/borders/scaled-border-image-expected.png:
* platform/chromium-win/fast/css/absolute-child-with-percent-height-inside-relative-parent-expected.png:
* platform/chromium-win/fast/images/imagemap-focus-ring-zero-outline-width-expected.png:
* platform/chromium-win/fast/replaced/absolute-image-sizing-expected.png:
* platform/chromium-win/fast/writing-mode/block-level-images-expected.png:
* platform/chromium-win/platform/chromium/virtual/deferred/fast/images/imagemap-focus-ring-zero-outline-width-expected.png: Added.
* platform/chromium-win/svg/W3C-I18N/g-dirLTR-ubNone-expected.png:
* platform/chromium-win/svg/W3C-I18N/g-dirLTR-ubOverride-expected.png:
* platform/chromium-win/svg/W3C-I18N/g-dirRTL-ubNone-expected.png:
* platform/chromium-win/svg/W3C-I18N/g-dirRTL-ubOverride-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-anchor-no-markup-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-dirLTR-ubNone-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-dirLTR-ubOverride-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-dirRTL-ubNone-expected.png:
* platform/chromium-win/svg/W3C-I18N/text-dirRTL-ubOverride-expected.png:
* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147347 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[SVG2] Add support for the buffered-rendering hint
https://bugs.webkit.org/show_bug.cgi?id=104207

Reviewed by Stephen Chenney.

Source/WebCore: 

This patch adds the SVG2 buffered-rendering property and implements it for the image
element. For reference, the spec can be found at:
    https://svgwg.org/svg2-draft/single-page.html#painting-BufferedRendering

The buffered-rendering hint causes our implementation to create a temporary image buffer
for caching an element's foreground rendering. This behavior has been designed to support
other graphical and container elements in followup patches (such as the use and g elements).
This patch should not affect rendering, and a test has been added showing the image
results are unchanged. 

The performance aspects of this patch can be tested using the following test:
    http://philbit.com/bouncingTigers.html
Without the patch, rendering is below 1fps. With the patch, rendering is fluid.

Tests: svg/css/buffered-rendering.html
       svg/repaint/buffered-rendering-dynamic-image.html
       svg/repaint/buffered-rendering-static-image.html

Other than the changes to RenderSVGImage and SVGRenderingContext, the changes below are to
support the new buffered-rendering property:

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore):
(WebCore::CSSPrimitiveValue::operator EBufferedRendering):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
* css/SVGCSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/SVGCSSValueKeywords.in:
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::diff):
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::initialBufferedRendering):
(WebCore::SVGRenderStyle::setBufferedRendering):
(WebCore::SVGRenderStyle::bufferedRendering):
(WebCore::SVGRenderStyle::setBitDefaults):
* rendering/style/SVGRenderStyleDefs.h:
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint):

    The foreground painting has been extracted out into a separate function. This has also
    been changed so that if the buffered-rendering hint is present, bufferForeground
    is used.

(WebCore::RenderSVGImage::paintForeground):
(WebCore):
(WebCore::RenderSVGImage::invalidateBufferedForeground):

    This function could be replaced with "m_bufferedForeground.clear()" but other renderers
    (such as container elements) will require more complex invalidation logic. To
    maintain consistency with this future code, invalidateBufferedForeground has been used.

(WebCore::RenderSVGImage::imageChanged):
* rendering/svg/RenderSVGImage.h:
(RenderSVGImage):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::bufferForeground):
(WebCore):
* rendering/svg/SVGRenderingContext.h:
(SVGRenderingContext):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName):
(WebCore::cssPropertyToTypeMap):
* svg/svgattrs.in:

LayoutTests: 

* svg/css/buffered-rendering-expected.txt: Added.
* svg/css/buffered-rendering.html: Added.
* svg/repaint/buffered-rendering-dynamic-image-expected.html: Added.
* svg/repaint/buffered-rendering-dynamic-image.html: Added.
* svg/repaint/buffered-rendering-static-image-expected.html: Added.
* svg/repaint/buffered-rendering-static-image.html: Added.


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