[Mac][WK2] Donât let plug-ins use System V shared memory
        https://bugs.webkit.org/show_bug.cgi?id=113466
        <rdar://problem/13159030>

        Reviewed, tweaked and landed by Alexey Proskuryakov.

        Instead of allowing plug-ins to request System V shm, give them a
        temporary but usable alternative if they try to request it.

        * PluginProcess/mac/PluginProcessShim.mm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r147423.

The change r147402 was reverted by r147450.
The rebaseline introduced by r147423 needs to be reverted.

* platform/mac-wk2/http/tests/security/XFrameOptions: Removed.
* platform/mac-wk2/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt: Removed.
* platform/mac/http/tests/security/XFrameOptions: Removed.
* platform/mac/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-expected.txt: Removed.
* platform/mac/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body-expected.txt: Removed.
* platform/mac/http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny-expected.txt: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Filters] Filter outsets clipped on composited layers when filter is applied after first layout
https://bugs.webkit.org/show_bug.cgi?id=109098

Reviewed by Dean Jackson.

Source/WebCore:

This patch addresses the following issues:
(1) Compositors who can compute their own filter outsets don't need WebKit to inflate the
    composited layer bounds. Eventually, all platforms' compositors should be able to
    compute their own filter outsets.
(2) When filter outsets change, we need to update composited layer bounds if the filters are
    painted in software.
(3) When filter outsets change, we need to recompute the overlap map to promote the correct
    layers to composited layers on all platforms.

Tests: css3/filters/composited-layer-bounds-after-sw-blur-animation.html
       css3/filters/composited-layer-bounds-with-composited-blur.html
       css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change.html
       css3/filters/composited-layer-promotion-after-outset-overlap-change-using-composited-shadow.html
       css3/filters/composited-layer-promotion-after-outset-overlap-change-using-sw-shadow.html

* platform/graphics/IntRectExtent.h:
(WebCore::IntRectExtent::isZero):
(IntRectExtent):

    Make isZero public on IntRectExtent.

* rendering/RenderLayer.cpp:
(WebCore::hasOrHadFilters):

    Helper function used to exit early from filters related code.

(WebCore::RenderLayer::updateFilters):

    Move filter updating code from RenderLayer::styleChanged into this new method.

    This method calls RenderLayerBacking::updateFilters instead of
    RenderLayerBacking::updateGraphicsLayerGeometry. RenderLayerBacking::updateFilters lets
    us know whether there was a filter paint mode change (i.e. the filters were painted in
    software and are now painted in the compositor, or vice-versa). We need to know this
    earlier, in RenderLayer::styleChanged, because we may need to rebuild the compositing
    layers due to a filter paint mode change.

(WebCore::RenderLayer::styleChanged):

    Add a condition for filters for setCompositingLayersNeedRebuild. If the filter outsets
    on a layer changed, we need to rebuild the compositing layers because there could be new
    overlap. Likewise, if there are or were filter outsets and the filter paint mode changed
    the layer bounds (and child positions) may have changed. In either case, we don't
    rebuild the compositing layers if there is an accelerated filter animation running.

    Remove old code to detect a filter paint mode change from the end of
    RenderLayer::styleChanged because it could never be executed. The old code counted on
    RenderLayerBacking::canCompositeFilters to change on its own, but it doesn't change
    unless updateFilters gets called. Thus, we could never enter the if statement that
    calls setBackingNeedsRepaint.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateFilters):

    Now return true if there was a filter paint mode change, so RenderLayer::styleChanged
    can decide if it should rebuild the compositing layers.

    Call updateOrRemoveFilterEffectRenderer and setContentsNeedDisplay if there was a
    render mode change. We need to either destroy or create the software renderer and we
    need to repaint the layer contents if there was a render mode change.

(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):

    Don't call updateFilters here. Call it earlier in RenderLayer::styleChanged, for reasons
    explained above.

* rendering/RenderLayerBacking.h:
(RenderLayerBacking):

    Make updateFilters public so RenderLayer::styleChanged can call it.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::calculateCompositedBounds):

    If the platform's compositor computes filter outsets for its layers internally, do not
    inflate WebKit's composited bounds for filter outsets. This results in smaller layers
    on Safari. Note that we still need to include filter outsets in layer bounds for other
    situations like overlap testing in WebKit and when we're painting filters in software.

Source/WTF:

* wtf/Platform.h:
    Add flag for HAVE(COMPOSITOR_FILTER_OUTSETS) macro. This is used to check if a
    platform's compositor expands layers internally for filter outsets when it applies
    filters like drop-shadow and blur. Currently, only CoreAnimation does has this
    capability.

LayoutTests:

* compositing/filters/sw-layer-overlaps-hw-shadow-expected.txt:
* compositing/filters/sw-nested-shadow-overlaps-hw-nested-shadow-expected.txt:
* compositing/filters/sw-shadow-overlaps-hw-layer-expected.txt:
* compositing/filters/sw-shadow-overlaps-hw-shadow-expected.txt:

    The above tests needed rebaselining because we're now using smaller layers on Safari.
    We aren't inflating layers for filter outsets since CoreAnimation does it for us
    already.

* css3/filters/composited-layer-bounds-after-sw-blur-animation-expected.txt: Added.
* css3/filters/composited-layer-bounds-after-sw-blur-animation.html: Added.
* css3/filters/composited-layer-bounds-with-composited-blur-expected.txt: Added.
* css3/filters/composited-layer-bounds-with-composited-blur.html: Added.
* css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change-expected.txt: Added.
* css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change.html: Added.
* css3/filters/composited-layer-promotion-after-outset-overlap-change-using-composited-shadow-expected.txt: Added.
* css3/filters/composited-layer-promotion-after-outset-overlap-change-using-composited-shadow.html: Added.
* css3/filters/composited-layer-promotion-after-outset-overlap-change-using-sw-shadow-expected.txt: Added.
* css3/filters/composited-layer-promotion-after-outset-overlap-change-using-sw-shadow.html: Added.

    The above tests are all new. They mostly test edge cases with filter render mode
    changes, filter outset changes, and composited layer promotion due to overlap.

    Before this patch, composited-layer-bounds-after-sw-blur-animation.html breaks
    visibly on Safari WebKit nightly. The blur filter in the test appears clipped before
    this patch. The other tests render the same before and after this patch, but now their
    layer sizes are smaller.

* css3/filters/filter-change-repaint-composited-expected.png:
* css3/filters/filter-change-repaint-composited.html:

    This test has been expanded with two more cases, including the original reproduction of
    this bug. The test needs rebaselining on Chromium Linux and Win.

* platform/chromium-win/css3/filters/filter-change-repaint-composited-expected.png: Removed.
* platform/chromium/TestExpectations:
* platform/chromium/compositing/filters/sw-nested-shadow-overlaps-hw-nested-shadow-expected.txt: Added.
* platform/chromium/compositing/filters/sw-shadow-overlaps-hw-shadow-expected.txt: Added.
* platform/chromium/css3/filters/composited-layer-bounds-after-sw-blur-animation-expected.txt: Added.
* platform/chromium/css3/filters/composited-layer-bounds-with-composited-blur-expected.txt: Added.
* platform/chromium/css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change-expected.txt: Added.
* platform/chromium/css3/filters/composited-layer-promotion-after-outset-overlap-change-using-composited-shadow-expected.txt: Added.
* platform/chromium/css3/filters/composited-layer-promotion-after-outset-overlap-change-using-sw-shadow-expected.txt: Added.

    We need different expectations for Chromium for the new tests because layer bounds
    include filter outsets on Chromium but not on Safari.

* platform/chromium/css3/filters/filter-change-repaint-composited-expected.png: Added.
* platform/qt/TestExpectations:

    Note that we need baselines on Qt for the new and updated tests.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use cross-port testRunner methods in fast/loader/url-selected-user-gesture.html
https://bugs.webkit.org/show_bug.cgi?id=113827

Reviewed by Benjamin Poulain.

* fast/loader/url-selected-user-gesture-expected.txt:
* fast/loader/url-selected-user-gesture.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: InlineIterator needs to be updated when RenderCombineText shrinks at a line break
https://bugs.webkit.org/show_bug.cgi?id=113733

Reviewed by Emil A Eklund.

Update stale InlineIterators that point beyond the end of a RenderCombineText that's
shrunk when RenderCombineText::combineText() is called.

Test: fast/text/international/combine-at-line-break-crash.html

* rendering/BidiRun.h:
(WebCore::BidiRun::BidiRun): Adding an assertion that runs are created within
the bounds of their associated RenderText.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::iteratorIsBeyondEndOfRenderCombineText): Added.
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Update stale iterators.

LayoutTests: InlineIterator needs to be updated when RenderCombineText shrinks at a line break
https://bugs.webkit.org/show_bug.cgi?id=113732

Reviewed by Emil A Eklund.

* fast/text/international/combine-at-line-break-crash-expected.txt: Added.
* fast/text/international/combine-at-line-break-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Padding applied twice for empty generated RenderInlines
https://bugs.webkit.org/show_bug.cgi?id=113800

Source/WebCore:

Reviewed by Levi Weintraub.

The padding for empty generated content render objects is
incorrectly applied twice. Regression from r140693.

Test: fast/css-generated-content/margin-empty-content.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::inlineLogicalWidth):

LayoutTests:

Reviewed by Levi Weintraub.

Add test for empty generated content with padding.

* fast/css-generated-content/margin-empty-content-expected.html: Added.
* fast/css-generated-content/margin-empty-content.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Generalize prior line break context state and names.
https://bugs.webkit.org/show_bug.cgi?id=113823

Reviewed by Darin Adler.

No new tests required due to no behavioral change.

* platform/text/TextBreakIterator.h:
(WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
(WebCore::LazyLineBreakIterator::lastCharacter):
(WebCore::LazyLineBreakIterator::secondToLastCharacter):
(WebCore::LazyLineBreakIterator::setPriorContext):
(WebCore::LazyLineBreakIterator::updatePriorContext):
(WebCore::LazyLineBreakIterator::resetPriorContext):
(WebCore::LazyLineBreakIterator::resetStringAndReleaseIterator):
Store previous characters as prior context buffer used directly
by line break iterator implementation. Rename members to reflect
somewhat more general usage. Also fix bad indentations.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
Use renamed line break iterator methods.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Need japanese line layout performance test
https://bugs.webkit.org/show_bug.cgi?id=113811

Reviewed by Ryosuke Niwa.

Will be used by https://bugs.webkit.org/show_bug.cgi?id=105692 to test potential performance regression
for Japanese (and other CJK) line break changes.

* Layout/LineLayoutJapanese.html: Added.
* Skipped: Skip this test by default.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Be more robust against empty message receiver names in incoming messages
https://bugs.webkit.org/show_bug.cgi?id=113833
<rdar://problem/13284433>

Reviewed by Beth Dakin.

Turns out that we either send or receive messages whose receiver names are empty. This leads to bad things when we try to look
up the message receiver name in a hash map since the empty name is used to represent an empty hash map value.

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::addWorkQueueMessageReceiverOnConnectionWorkQueue):
Sprinkle assertions.

(CoreIPC::Connection::processIncomingMessage):
If the message receiver name is not valid, make sure to call didReceiveInvalidMessage on the client thread.

(CoreIPC::Connection::dispatchDidReceiveInvalidMessage):
Add new helper function.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Disable running tests on Win EWS queue.

* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(WinEWS):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Compositing tests failing after http://trac.webkit.org/changeset/147502
https://bugs.webkit.org/show_bug.cgi?id=113838

Temporarily marking as failing.

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG should compile a little sooner
https://bugs.webkit.org/show_bug.cgi?id=113835

Reviewed by Michael Saboff.

2% speedup on SunSpider.

2% speedup on JSRegress.

Neutral on Octane, v8, and Kraken.

The worst-hit single sub-test is kraken-stanford-crypto-ccm.js, which gets
18% slower. Since Kraken is neutral overall in its preferred mean, I
think that's OK for now.

(Our array indexing speculation fails pathologically on
kraken-stanford-crypto-ccm.js. Compiling sooner is a regression because
it triggers those failures sooner. I'm going to file some follow-up bugs
explaining how to fix our speculations on this sub-test, at which point
compiling earlier should become a slight speedup on Kraken overall.)

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::optimizationThresholdScalingFactor): I experimented
with a few different options, including reducing the coefficient 'a'.
A simple linear reduction on instruction count worked best.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: [css3-text] Rendering -webkit-each-line value for text-indent from css3-text
https://bugs.webkit.org/show_bug.cgi?id=113259

Patch by Jaehun Lim <ljaehun.lim@samsung.com> on 2013-04-02
Reviewed by Levi Weintraub.

CSS3 TEXT introduces new value, "each-line" for text-indent.
Indentation affects the first line of the block container as well as each line
after a forced line break, but does not affect lines after a soft wrap break.

This patch is the rendering part to support each-line value for text-indent.
It's prefixed and guarded by CSS3_TEXT flag.

Test: fast/css3-text/css3-text-indent/text-indent-each-line.html

* rendering/RenderBlock.h:
(WebCore::RenderBlock::availableLogicalWidthForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::startOffsetForLine):
(WebCore::RenderBlock::endOffsetForLine):
(WebCore::RenderBlock::pixelSnappedLogicalLeftOffsetForLine):
(WebCore::RenderBlock::pixelSnappedLogicalRightOffsetForLine):
    Rename a parameter from firstLine to shouldIndentText.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::shouldIndentText): Return boolean according to m_shouldIndentText.
(WebCore::LineWidth::updateAvailableWidth):
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
(WebCore::LineWidth::fitBelowFloats):
    Add enum IndentTextOrNot and m_shouldIndentText.
    Use m_shouldIndentText instead of m_isFirstLine.

(WebCore::requiresIndent): Decide whether text indentation is required.
(WebCore::updateLogicalInlinePositions):
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):

LayoutTests: [css3-text] Rendering -webkit-each-line value for text-indent from css3-text
https://bugs.webkit.org/show_bug.cgi?id=113259

CSS3 TEXT introduces new value, "each-line" for text-indent.
Indentation affects the first line of the block container as well as each line
after a forced line break, but does not affect lines after a soft wrap break.

Patch by Jaehun Lim <ljaehun.lim@samsung.com> on 2013-04-02
Reviewed by Levi Weintraub.

* fast/css3-text/css3-text-indent/text-indent-each-line-expected.html: Added.
* fast/css3-text/css3-text-indent/text-indent-each-line.html: Added.
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG should compile a little sooner
https://bugs.webkit.org/show_bug.cgi?id=113835

Unreviewed.

Rolled out r147511 because it was based on incorrect performance
measurement.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::optimizationThresholdScalingFactor):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unskip filter-fallback-to-software.html on Mac WK2 Release

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-02

* platform/mac-wk2/TestExpectations:
The test seems to pass in Release. Let's see how the bots feel about that.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Unskip and update inspector tests
https://bugs.webkit.org/show_bug.cgi?id=113840

Unreviewed gardening.

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-04-02

* platform/efl/TestExpectations:
* platform/efl/http/tests/inspector/console-websocket-error-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
needsLeopardMailQuirks should be removed
https://bugs.webkit.org/show_bug.cgi?id=113749

Reviewed by Benjamin Poulain.

Removed needsLeopardMailQuirks from settings.in after r147447.

* page/Settings.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening; rebaseline mac expected results after r147470.

* platform/mac/css3/filters/effect-reference-composite-expected.png: Added.
* platform/mac/css3/filters/effect-reference-composite-expected.txt: Added.
* platform/mac/css3/filters/effect-reference-composite-hw-expected.png: Added.
* platform/mac/css3/filters/effect-reference-composite-hw-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [Network] Split business logic and presentation for initiator column.
https://bugs.webkit.org/show_bug.cgi?id=113486

Reviewed by Pavel Feldman.

Currently business logic and presentation are mixed.
This prevents making cell renderer static and applying
viewport rendering, because initiator sorting function
depends on data written when cell is rendered.

* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell):
Removed business logic. Use "initiatorInfo".
(WebInspector.NetworkDataGridNode.InitiatorComparator):
Use "initiatorInfo".
* inspector/front-end/NetworkRequest.js:
(WebInspector.NetworkRequest.prototype.initiatorInfo):
Extracted business logic from "refreshInitiatorCell".


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AXRoleDescripton for DL is "list"; should be "description list"
https://bugs.webkit.org/show_bug.cgi?id=111665

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

Source/WebCore:

Defining the role and description strings, and accessors for DL.
This previously relied on getting the role and description from the platform API.

Updated existing test coverage.

* English.lproj/Localizable.strings:
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):
* platform/LocalizedStrings.cpp:
(WebCore::AXDescriptionListText):
(WebCore):
* platform/LocalizedStrings.h:
(WebCore):
* platform/blackberry/LocalizedStringsBlackBerry.cpp:
(WebCore::AXDescriptionListText):
(WebCore):
* platform/chromium/LocalizedStringsChromium.cpp:
(WebCore::AXDescriptionListText):
(WebCore):
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::AXDescriptionListText):
(WebCore):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::AXDescriptionListText):
(WebCore):
* platform/qt/LocalizedStringsQt.cpp:
(WebCore::AXDescriptionListText):
(WebCore):

Source/WebKit/chromium:

Defining the role and description strings.

* public/WebAccessibilityRole.h:
* src/AssertMatchingEnums.cpp:

Tools:

Defining the role and description strings.

* DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:

LayoutTests:

Updating expectation strings for DL role description.

* platform/mac/accessibility/lists-expected.txt:
* platform/mac/accessibility/role-subrole-roledescription-expected.txt:
* platform/mac/accessibility/role-subrole-roledescription.html:

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