[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: http://svn.webkit.org/repository/webkit/trunk@167444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@167445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build bustage.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@167447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@167448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix Cocoa build.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@167450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@167451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@167452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@167453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stub out MemoryPressureHandler::ReliefLogger on older OS X'es.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@167455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@167456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
_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: http://svn.webkit.org/repository/webkit/trunk@167457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@167460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@167463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cheesy Mountain Lion build fix.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[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: http://svn.webkit.org/repository/webkit/trunk@167465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@167466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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: http://svn.webkit.org/repository/webkit/trunk@167467 268f45cc-cd09-0410-ab3c-d52691b4dbfc