Timeline



Feb 2, 2015:

10:14 PM Changeset in webkit [179541] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebKit2

Unreviewed, rolling out r179540.
https://bugs.webkit.org/show_bug.cgi?id=141190

need further investigation to fix !WK_API_ENABLED (32bit)
build. (Requested by brrian_ on #webkit).

Reverted changeset:

"Convert WebInspectorProxy to use WKWebView API for the
inspector view"
https://bugs.webkit.org/show_bug.cgi?id=141037
http://trac.webkit.org/changeset/179540

9:28 PM Changeset in webkit [179540] by Brian Burg
  • 6 edits in trunk/Source/WebKit2

Convert WebInspectorProxy to use WKWebView API for the inspector view
https://bugs.webkit.org/show_bug.cgi?id=141037

Reviewed by Timothy Hatcher.

Use the newer API for PLATFORM(MAC). The main difference is that the
WKWebView's page group cannot be set directly; instead, the group identifier
is passed. Also add some preference setters needed for the inspector.

Refactor some code to not use page groups directly. In a future patch,
the PageGroup-based inspector level system will be simplified. It is
it is no longer necessary to keep a static map of PageGroup instances,
since they are only used to save inspector window preferences. (These used
to prevent all levels of inspector from pausing together when a second-level
inspector hit a breakpoint. This is not necessary with multi-process
web inspectors.)

Also, adjust window resizing behavior when the inspector is docked to
the right. Window width resizes should not affect the width of the inspector
frame. This matches the behavior of height changes when docked to the bottom.

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _logsPageMessagesToSystemConsoleEnabled]): Added.
(-[WKPreferences _setLogsPageMessagesToSystemConsoleEnabled:]): Added.
(-[WKPreferences _allowFileAccessFromFileURLs]): Added.
(-[WKPreferences _setAllowFileAccessFromFileURLs:]): Added.

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::WebInspectorProxy):
(WebKit::WebInspectorProxy::inspectorPagePreferences): Added.
(WebKit::WebInspectorProxy::attach):
(WebKit::WebInspectorProxy::detach):
(WebKit::WebInspectorProxy::setAttachedWindowHeight):
(WebKit::WebInspectorProxy::setAttachedWindowWidth):
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::shouldOpenAttached):

  • UIProcess/WebInspectorProxy.h: Use default member initializers.
  • UIProcess/mac/WebInspectorProxyMac.mm:

(-[WKWebInspectorWKWebView _didRelaunchProcess]):
WKWebView doesn't implement this, so remove the super call.
(WebKit::WebInspectorProxy::closeTimerFired):
(WebKit::createDockButton):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformAttach):
(-[WKWebInspectorWKView _didRelaunchProcess]): Deleted.

9:23 PM Changeset in webkit [179539] by Darin Adler
  • 2 edits in trunk/Source/WebCore

REGRESSION (r170576): Storage leaks in parsing of CSS image sizes
https://bugs.webkit.org/show_bug.cgi?id=141026

Reviewed by Brent Fulgham.

Forgot to actually fix the leak in the successful parse case!

  • css/CSSParser.cpp:

(WebCore::CSSParser::sourceSize): Added a call to destroy.

9:20 PM Changeset in webkit [179538] by fpizlo@apple.com
  • 10 edits
    6 adds in trunk/Source/JavaScriptCore

arguments[-1] should have well-defined behavior
https://bugs.webkit.org/show_bug.cgi?id=141183

Reviewed by Mark Lam.

According to JSC's internal argument numbering, 0 is "this" and 1 is the first argument.
In the "arguments[i]" expression, "this" is not accessible and i = 0 refers to the first
argument. Previously we handled the bounds check in "arguments[i]" - where "arguments" is
statically known to be the current function's arguments object - as follows:

add 1, i
branchAboveOrEqual i, callFrame.ArgumentCount, slowPath


The problem with this is that if i = -1, this passes the test, and we end up accessing
what would be the "this" argument slot. That's wrong, since we should really be bottoming
out in arguments-1?, which is usually undefined but could be anything. It's even worse
if the function is inlined or if we're in a constructor - in that case the "this" slot
could be garbage.

It turns out that we had this bug in all of our engines.

This fixes the issue by changing the algorithm to:

load32 callFrame.ArgumentCount, tmp
sub 1, tmp
branchAboveOrEqual i, tmp, slowPath


In some engines, we would have used the modified "i" (the one that had 1 added to it) for
the subsequent argument load; since we don't do this anymore I also had to change some of
the offsets on the BaseIndex arguments load.

This also includes tests that are written in such a way as to get coverage on LLInt and
Baseline JIT (get-my-argument-by-val-wrap-around-no-warm-up), DFG and FTL
(get-my-argument-by-val-wrap-around), and DFG when we're being paranoid about the user
overwriting the "arguments" variable (get-my-argument-by-val-safe-wrap-around). This also
includes off-by-1 out-of-bounds tests for each of these cases, since in the process of
writing the patch I broke the arguments[arguments.length] case in the DFG and didn't see
any test failures.

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::compileGetMyArgumentByVal):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::offsetOfArguments):
(JSC::AssemblyHelpers::offsetOfArgumentsIncludingThis): Deleted.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_get_argument_by_val):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_get_argument_by_val):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • tests/stress/get-my-argument-by-val-out-of-bounds-no-warm-up.js: Added.

(foo):

  • tests/stress/get-my-argument-by-val-out-of-bounds.js: Added.

(foo):

  • tests/stress/get-my-argument-by-val-safe-out-of-bounds.js: Added.

(foo):

  • tests/stress/get-my-argument-by-val-safe-wrap-around.js: Added.

(foo):

  • tests/stress/get-my-argument-by-val-wrap-around-no-warm-up.js: Added.

(foo):

  • tests/stress/get-my-argument-by-val-wrap-around.js: Added.

(foo):

9:06 PM Changeset in webkit [179537] by Brent Fulgham
  • 3 edits in trunk/LayoutTests

[Win] Activate HTTP tests

  • platform/win/TestExpectations:
  • platform/win/fast/dom/adopt-node-crash-2-expected.txt:
8:29 PM Changeset in webkit [179536] by fpizlo@apple.com
  • 3 edits
    1 add in trunk/Source/JavaScriptCore

MultiGetByOffset should be marked NodeMustGenerate
https://bugs.webkit.org/show_bug.cgi?id=140137

Reviewed by Michael Saboff.

  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToGetByOffset): We were sloppy - we should also clear NodeMustGenerate once it's a GetByOffset.
(JSC::DFG::Node::convertToMultiGetByOffset): Assert that we converted from something that already had NodeMustGenerate.

  • dfg/DFGNodeType.h: We shouldn't DCE a node that does checks and could be effectful in baseline. Making MultiGetByOffset as NodeMustGenerate prevents DCE. FTL could still DCE the actual loads, but the checks will stay.
  • tests/stress/multi-get-by-offset-dce.js: Added. This previously failed because the getter wasn't called.

(foo):

8:11 PM Changeset in webkit [179535] by benjamin@webkit.org
  • 3 edits
    16 adds in trunk

JIT Compile simple cases of :nth-last-child()
https://bugs.webkit.org/show_bug.cgi?id=141053

Reviewed by Andreas Kling.

Source/WebCore:

This patch adds the code generator for :nth-last-child(), skipping
any :nth-last-child(An+B of selector list).

The code generator is boring here, nothing fancy.
There is no optimization opportunity here so it is basically the same
speed as the code generated by Clang when the simple selector is alone.

The only reason to JIT compile this is to avoid going to slow-path
for every selector that contain :nth-last-child().

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::addNthChildType):
The code creating the intermediate representation of :nth-child() is exactly
the same as what we need for :nth-last-child(). I extracted the code from addPseudoClassType()
and share it for both simple selectors.

(WebCore::SelectorCompiler::addPseudoClassType):
I fail :nth-last-child(An+B of selector list). Let's add it later.

(WebCore::SelectorCompiler::minimumRegisterRequirements):
Oops, there was a bug with nthChildOfFilters.

(WebCore::SelectorCompiler::hasAnyCombinators):
(WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
(WebCore::SelectorCompiler::computeBacktrackingInformation):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
(WebCore::SelectorCompiler::setChildrenAffectedByBackwardPositionalRules):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):

LayoutTests:

There was almost no test coverage for :nth-last-child(). I copied the main tests
from :nth-child() and updated the expected results.

This is not ideal because we should have style update tests targetting
backward invalidation... Still better than nothing :)

  • fast/selectors/nth-last-child-as-first-simple-selector-style-update-expected.txt: Added.
  • fast/selectors/nth-last-child-as-first-simple-selector-style-update.html: Added.
  • fast/selectors/nth-last-child-basics-expected.txt: Added.
  • fast/selectors/nth-last-child-basics.html: Added.
  • fast/selectors/nth-last-child-bounds-expected.txt: Added.
  • fast/selectors/nth-last-child-bounds.html: Added.
  • fast/selectors/nth-last-child-chained-expected.txt: Added.
  • fast/selectors/nth-last-child-chained.html: Added.
  • fast/selectors/nth-last-child-on-root-expected.txt: Added.
  • fast/selectors/nth-last-child-on-root.html: Added.
  • fast/selectors/nth-last-child-style-update-expected.txt: Added.
  • fast/selectors/nth-last-child-style-update.html: Added.
  • fast/selectors/nth-last-child-with-backtracking-expected.txt: Added.
  • fast/selectors/nth-last-child-with-backtracking.html: Added.
  • fast/selectors/several-nth-last-child-expected.txt: Added.
  • fast/selectors/several-nth-last-child.html: Added.
7:08 PM Changeset in webkit [179534] by Alan Bujtas
  • 6 edits
    2 moves in trunk/Source/WebCore

Simple line layout: Rename FlowContentsIterator to TextFragmentIterator.
https://bugs.webkit.org/show_bug.cgi?id=141177

Rubber-stamped by Antti Koivisto

FlowContentsIterator is easy to confuse with FlowContents::Iterator.
TextFragmentIterator reflects the functionality better.

No change in functionality.

  • CMakeLists.txt:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::LineState::setOverflowedFragment):
(WebCore::SimpleLineLayout::LineState::overflowedFragment):
(WebCore::SimpleLineLayout::LineState::appendFragment):
(WebCore::SimpleLineLayout::begin):
(WebCore::SimpleLineLayout::end):
(WebCore::SimpleLineLayout::preWrap):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::firstFragment):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::splitRunsAtRendererBoundary):
(WebCore::SimpleLineLayout::createTextRuns):

  • rendering/SimpleLineLayoutTextFragmentIterator.cpp: Renamed from Source/WebCore/rendering/SimpleLineLayoutFlowContentsIterator.cpp.

(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
(WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
(WebCore::SimpleLineLayout::nextBreakablePosition):
(WebCore::SimpleLineLayout::TextFragmentIterator::findNextBreakablePosition):
(WebCore::SimpleLineLayout::findNextNonWhitespace):
(WebCore::SimpleLineLayout::TextFragmentIterator::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):

  • rendering/SimpleLineLayoutTextFragmentIterator.h: Renamed from Source/WebCore/rendering/SimpleLineLayoutFlowContentsIterator.h.

(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::start):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::end):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::width):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::type):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsed):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isBreakable):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isEmpty):
(WebCore::SimpleLineLayout::TextFragmentIterator::style):
(WebCore::SimpleLineLayout::TextFragmentIterator::segmentForPosition):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split):
(WebCore::SimpleLineLayout::TextFragmentIterator::characterAt):
(WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
(WebCore::SimpleLineLayout::TextFragmentIterator::isEnd):

6:22 PM Changeset in webkit [179533] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Add diagnostic logging for ResourceResponse's source
https://bugs.webkit.org/show_bug.cgi?id=141170
<rdar://problem/19632080>

Reviewed by Antti Koivisto.

Add diagnostic logging for ResourceResponse's source (network, disk
cache, disk cache after validation) to give us an idea of our network
cache efficacy.

  • loader/ResourceLoader.cpp:

(WebCore::logResourceResponseSource):
(WebCore::ResourceLoader::didReceiveResponse):

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::networkKey):
(WebCore::DiagnosticLoggingKeys::diskCacheKey):
(WebCore::DiagnosticLoggingKeys::diskCacheAfterValidationKey):
(WebCore::DiagnosticLoggingKeys::resourceResponseKey):
(WebCore::DiagnosticLoggingKeys::scriptKey):
(WebCore::DiagnosticLoggingKeys::sourceKey):

  • page/DiagnosticLoggingKeys.h:
6:22 PM Changeset in webkit [179532] by commit-queue@webkit.org
  • 4 edits in trunk/Source

Optimize matchesLangPseudoClass() of :lang()
https://bugs.webkit.org/show_bug.cgi?id=140873

Patch by Dhi Aurrahman <diorahman@rockybars.com> on 2015-02-02
Reviewed by Darin Adler.

Source/WebCore:

Avoid unnecessary memory allocation.

No new tests, no behavior changed.

  • css/SelectorCheckerTestFunctions.h:

(WebCore::equalIgnoringASCIICase):
(WebCore::containslanguageSubtagMatchingRange):
(WebCore::matchesLangPseudoClass):

Source/WTF:

Add some basic equality comparison operators.

  • wtf/text/StringView.h:

(WTF::operator==):
(WTF::operator!=):
(WTF::equal):
(WTF::equalIgnoringASCIICase):

5:47 PM Changeset in webkit [179531] by Brent Fulgham
  • 6 edits in branches/safari-600.5-branch/Source/WebCore

Merge r178661. rdar://problem/19617731

2015-01-19 Brent Fulgham <Brent Fulgham>

Layers need to be already updated before we call adjustViewSize
https://bugs.webkit.org/show_bug.cgi?id=135514

Reviewed by Simon Fraser.

Tested by 'fast/dynamic/layer-no-longer-paginated.html'

Defer painting operations until we have finished layout. This
has a couple of benefits:
(1) We do not attempt to modify render layers during layout.
(2) In WK1 we do not attempt to paint during layout.

Add a new virtual predicate to ScrollView indicating when we are in
layout so that calls to setContentsSize do not attempt
to adjust scrollbars.

Modify FrameView to set its ScrollView state to block paint
operations during layout. Also add a post-layout handler to
complete the scrollbar updates after layout is finished.

  • WebCore.exp.in: Move linker symbol to ScrollView (from FrameView).
  • page/FrameView.cpp: (WebCore::FrameView::layout): (WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange): Added. (WebCore::FrameView::scrollPositionChangedViaPlatformWidget): Removed (Renamed). (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added (Renamed) (WebCore::FrameView::paintContents): Do not paint if we are inside view size adjustment.
  • page/FrameView.h:
  • platform/ScrollView.cpp: (WebCore::ScrollView::scrollPositionChangedViaPlatformWidget): Added. Checks whether we need to defer painting, and calls virtual scrollPositionChangedViaPlatformWidgetImpl if we do not. (WebCore::FrameView::scrollPositionChangedViaPlatformWidgetImpl): Added. (WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange): Added. (WebCore::ScrollView::scrollTo): If we should defer painting, cache the the scroll delta and apply it after the layout is complete. (WebCore::ScrollView::completeUpdatesAfterScrollTo): Split off part of 'scrollTo' into its own method so we can reuse it in handleDeferredScrollUpdateAfterContentSizeChange.
  • platform/ScrollView.h: (WebCore::ScrollView::shouldDeferScrollUpdateAfterContentSizeChange): Added.
5:33 PM Changeset in webkit [179530] by roger_fong@apple.com
  • 9 edits in trunk/Source/WebCore

WebGL2: Implement spec section 3.7.1 Setting and getting state (Part 2).
https://bugs.webkit.org/show_bug.cgi?id=141096
<rdar://problem/15002469>
Reviewed by Brent Fulgham.
This patch handles some of the valid arguments that could be passed into getParameter.
The unhandled cases will be implemented as the associated WebGL2 features are implemented.
In addition, getParameter queries that return 64 bit integer currently just return 0 as
we need to use ::glGetInteger64v which is only available in GLES 3.0 headers.
I will be adding these headers in a future patch.

  • bindings/js/JSWebGL2RenderingContextCustom.cpp:

(WebCore::toJS): Accept a 64 bit integer type.

  • html/canvas/WebGL2RenderingContext.cpp: Handle various parameter inputs.

(WebCore::WebGL2RenderingContext::getParameter):

  • html/canvas/WebGLGetInfo.cpp: Add a 64 bit integer type.

(WebCore::WebGLGetInfo::WebGLGetInfo):
(WebCore::WebGLGetInfo::getInt64):

  • html/canvas/WebGLGetInfo.h:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::getInt64Parameter):

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::getInteger64v):

5:18 PM Changeset in webkit [179529] by Chris Dumez
  • 3 edits in trunk/Source/WebKit2

Make NetworkCache's constructor private
https://bugs.webkit.org/show_bug.cgi?id=141181

Reviewed by Antti Koivisto.

Make NetworkCache's constructor private and mark its destructor as
deleted as it is a singleton class.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::NetworkCache): Deleted.

  • NetworkProcess/cache/NetworkCache.h:
4:58 PM Changeset in webkit [179528] by matthew_hanson@apple.com
  • 1 edit
    1 move in branches/safari-600.5-branch

Merge r178846. rdar://problem/19670542

4:58 PM Changeset in webkit [179527] by matthew_hanson@apple.com
  • 6 edits
    1 add in branches/safari-600.5-branch

Merge r178845. rdar://problem/19670542

4:58 PM Changeset in webkit [179526] by matthew_hanson@apple.com
  • 2 edits in branches/safari-600.5-branch/Source/WebCore

Merge r178834. rdar://problem/19670539

4:58 PM Changeset in webkit [179525] by matthew_hanson@apple.com
  • 4 edits
    2 adds in branches/safari-600.5-branch

Merge r178832. rdar://problem/19670627

4:57 PM Changeset in webkit [179524] by matthew_hanson@apple.com
  • 4 edits
    3 adds in branches/safari-600.5-branch

Merge r178831. rdar://problem/19670604

4:57 PM Changeset in webkit [179523] by matthew_hanson@apple.com
  • 7 edits in branches/safari-600.5-branch

Merge r178829. rdar://problem/19670575

4:57 PM Changeset in webkit [179522] by matthew_hanson@apple.com
  • 3 edits in branches/safari-600.5-branch/Source/WebCore

Merge r178819. rdar://problem/19670617

4:57 PM Changeset in webkit [179521] by matthew_hanson@apple.com
  • 2 edits in branches/safari-600.5-branch/Source/WebCore

Merge r178812. rdar://problem/19670533

4:57 PM Changeset in webkit [179520] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-600.5-branch

Merge r178786. rdar://problem/19670584

4:57 PM Changeset in webkit [179519] by matthew_hanson@apple.com
  • 2 edits in branches/safari-600.5-branch/Source/WebCore

Merge r178783. rdar://problem/19670695

4:57 PM Changeset in webkit [179518] by matthew_hanson@apple.com
  • 3 edits in branches/safari-600.5-branch/Source/WebCore

Merge r178782. rdar://problem/19670695

4:57 PM Changeset in webkit [179517] by matthew_hanson@apple.com
  • 9 edits in branches/safari-600.5-branch

Merge r178781. rdar://problem/19670569

4:57 PM Changeset in webkit [179516] by matthew_hanson@apple.com
  • 10 edits in branches/safari-600.5-branch

Merge r178779. rdar://problem/19670503

4:43 PM Changeset in webkit [179515] by fpizlo@apple.com
  • 2 edits
    1 add in trunk/Source/JavaScriptCore

[FTL] inlined GetMyArgumentByVal with no arguments passed causes instant crash
https://bugs.webkit.org/show_bug.cgi?id=141180
rdar://problem/19677552

Reviewed by Benjamin Poulain.

If we do a GetMyArgumentByVal on an inlined call frame that has no arguments, then the
bounds check already terminates execution. This means we can skip the part where we
previously did an out-of-bound array access on the inlined call frame arguments vector.

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::safelyInvalidateAfterTermination):
(JSC::FTL::LowerDFGToLLVM::compileGetMyArgumentByVal):
(JSC::FTL::LowerDFGToLLVM::terminate):
(JSC::FTL::LowerDFGToLLVM::didAlreadyTerminate):
(JSC::FTL::LowerDFGToLLVM::crash):

  • tests/stress/get-my-argument-by-val-inlined-no-formal-parameters.js: Added.

(foo):
(bar):

4:40 PM Changeset in webkit [179514] by bshafiei@apple.com
  • 5 edits in branches/safari-600.5-branch/Source

Versioning.

4:38 PM Changeset in webkit [179513] by bshafiei@apple.com
  • 1 copy in tags/Safari-600.5.4

New tag.

4:18 PM Changeset in webkit [179512] by matthew_hanson@apple.com
  • 1 edit
    1 copy
    1 move
    1 delete in branches/safari-600.5-branch/LayoutTests

Merge r178778. rdar://problem/19670611

4:18 PM Changeset in webkit [179511] by matthew_hanson@apple.com
  • 6 edits
    2 adds in branches/safari-600.5-branch

Merge r178777. rdar://problem/19670611

3:53 PM Changeset in webkit [179510] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Simple line layout: use std::upper_bound in splitFragmentToFitLine()
https://bugs.webkit.org/show_bug.cgi?id=141146

Reviewed by Antti Koivisto.

Replace the custom binary search implementation with std::upper_bound and
move splitting functionality to TextFragment.

No change in functionality.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator):
(WebCore::SimpleLineLayout::FragmentForwardIterator::operator++):
(WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=):
(WebCore::SimpleLineLayout::FragmentForwardIterator::operator*):
(WebCore::SimpleLineLayout::begin):
(WebCore::SimpleLineLayout::end):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):

  • rendering/SimpleLineLayoutFlowContentsIterator.cpp:

(WebCore::SimpleLineLayout::FlowContentsIterator::runWidth):

  • rendering/SimpleLineLayoutFlowContentsIterator.h:

(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::split):

3:42 PM Changeset in webkit [179509] by matthew_hanson@apple.com
  • 2 edits in branches/safari-600.5-branch/Source/WebKit2

Merge r178750. rdar://problem/19670673

3:42 PM Changeset in webkit [179508] by matthew_hanson@apple.com
  • 6 edits in branches/safari-600.5-branch/Source

Merge r178745. rdar://problem/19670564

3:42 PM Changeset in webkit [179507] by matthew_hanson@apple.com
  • 9 edits
    3 adds in branches/safari-600.5-branch

Merge r178735. rdar://problem/19670597

3:42 PM Changeset in webkit [179506] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-600.5-branch

Merge r178731. rdar://problem/19670592

3:42 PM Changeset in webkit [179505] by matthew_hanson@apple.com
  • 6 edits in branches/safari-600.5-branch/Source/JavaScriptCore

Merge r178730. rdar://problem/19670732

3:36 PM Changeset in webkit [179504] by fpizlo@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

REGRESSION(r179477): arguments simplification no longer works
https://bugs.webkit.org/show_bug.cgi?id=141169

Reviewed by Mark Lam.

The operations involved in callee/scope access don't exit and shouldn't get in the way
of strength-reducing a Flush to a PhantomLocal. Then the PhantomLocal shouldn't get in
the way of further such strength-reduction. We also need to canonicalize PhantomLocal
before running arguments simplification.

  • dfg/DFGMayExit.cpp:

(JSC::DFG::mayExit):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThreadImpl):

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

3:32 PM Changeset in webkit [179503] by fpizlo@apple.com
  • 18 edits
    1 add in trunk/Source/JavaScriptCore

VirtualRegister should really know how to dump itself
https://bugs.webkit.org/show_bug.cgi?id=141171

Reviewed by Geoffrey Garen.

Gives VirtualRegister a dump() method that pretty-prints the virtual register. The rest of
the patch is all about using this new power.

(JSC::constantName):
(JSC::CodeBlock::registerName):

  • bytecode/CodeBlock.h:

(JSC::missingThisObjectMarker): Deleted.

  • bytecode/VirtualRegister.cpp: Added.

(JSC::VirtualRegister::dump):

  • bytecode/VirtualRegister.h:

(WTF::printInternal): Deleted.

  • dfg/DFGArgumentPosition.h:

(JSC::DFG::ArgumentPosition::dump):

  • dfg/DFGFlushedAt.cpp:

(JSC::DFG::FlushedAt::dump):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGPutLocalSinkingPhase.cpp:
  • dfg/DFGSSAConversionPhase.cpp:

(JSC::DFG::SSAConversionPhase::run):

  • dfg/DFGValidate.cpp:

(JSC::DFG::Validate::reportValidationContext):

  • dfg/DFGValueSource.cpp:

(JSC::DFG::ValueSource::dump):

  • dfg/DFGVariableEvent.cpp:

(JSC::DFG::VariableEvent::dump):
(JSC::DFG::VariableEvent::dumpSpillInfo):

  • ftl/FTLExitArgumentForOperand.cpp:

(JSC::FTL::ExitArgumentForOperand::dump):

  • ftl/FTLExitValue.cpp:

(JSC::FTL::ExitValue::dumpInContext):

  • profiler/ProfilerBytecodeSequence.cpp:

(JSC::Profiler::BytecodeSequence::BytecodeSequence):

3:14 PM Changeset in webkit [179502] by gyuyoung.kim@samsung.com
  • 2 edits in trunk/LayoutTests

Unreviewed, EFL gardening. Update flakiness tests on W3C SVG 1.1 tests.

  • platform/efl/TestExpectations:
2:44 PM Changeset in webkit [179501] by Joseph Pecoraro
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: CSS Autocompletion: Autodetect many color supporting properties
https://bugs.webkit.org/show_bug.cgi?id=141166

Reviewed by Timothy Hatcher.

  • UserInterface/Base/Utilities.js:

Add String.prototype.endsWith. Group String extensions together.

  • UserInterface/Models/CSSKeywordCompletions.js:

(WebInspector.CSSKeywordCompletions.forProperty):
If a property name ends in "color", provide CSS color completions.

(WebInspector.CSSKeywordCompletions.isColorAwareProperty): Deleted.
This was unused and disagrees slightly with the implementation above.

2:27 PM Changeset in webkit [179500] by ggaren@apple.com
  • 9 edits in trunk/Source

Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
https://bugs.webkit.org/show_bug.cgi?id=140900

Reviewed by Mark Hahnenberg.

Re-landing just the HandleBlock piece of this patch.

Source/JavaScriptCore:

  • heap/HandleBlock.h:
  • heap/HandleBlockInlines.h:

(JSC::HandleBlock::create):
(JSC::HandleBlock::destroy):
(JSC::HandleBlock::HandleBlock):
(JSC::HandleBlock::payloadEnd):

  • heap/HandleSet.cpp:

(JSC::HandleSet::~HandleSet):
(JSC::HandleSet::grow):

Source/WebCore:

  • platform/cocoa/MemoryPressureHandlerCocoa.mm:

(WebCore::MemoryPressureHandler::install):

Source/WTF:

  • wtf/FastMalloc.cpp:

(WTF::fastAlignedMalloc):
(WTF::fastAlignedFree):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):

  • wtf/FastMalloc.h:
2:22 PM Changeset in webkit [179499] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

[Win] 64-bit build fix after r179492.

  • WebCore.vcxproj/WebCore.vcxproj: Forgot to build these files

as standalone under 64-bit target.

2:21 PM Changeset in webkit [179498] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[Win] Unreviewed build fix after r179489.

Correct symbol export definitions for 32-bit and 64-bit builds.
Also add some drive-by fixes for 64-bit symbols.

  • WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
2:00 PM Changeset in webkit [179497] by benjamin@webkit.org
  • 14 edits
    17 adds in trunk

Clean up attribute handling: part 2 - attributeNode
https://bugs.webkit.org/show_bug.cgi?id=141109

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-02-02
Reviewed by Andreas Kling.

Source/WebCore:

Our implementation was covering some old legacy behaviors of Firefox,
even copying bugs in some cases.

The spec (https://dom.spec.whatwg.org) now defines the behavior precisely,
let's move a bit closer to that.

Tests: fast/dom/Element/attribute-ascii-case-insensitive-3.html

fast/dom/Element/attribute-setAttributeNode-multiple-times.html
fast/dom/Element/attribute-setAttributeNodeNS-multiple-times.html
fast/dom/Element/mozilla-dom-base-tests/test_bug1075702.html
fast/dom/Element/mozilla-dom-base-tests/test_bug339494.html
fast/dom/Element/mozilla-dom-base-tests/test_bug364092.xhtml
fast/dom/Element/setAttributeNode-overriding-lowercase-values.html

  • dom/Element.cpp:

(WebCore::findAttrNodeInList):
New getter for the name-without-namespace case.

(WebCore::Element::setAttributeNode):
This one is the tricky one: https://dom.spec.whatwg.org/#dom-element-setattributenode

When setAttributeNode() is used with an AttributeNode without namespace,
getting the old value behaves like getAttribute(), with ASCII lowercase name matching.
When used with a namespace, getting the old value behaves like getAttributeNS().

Setting the value is a whole different story, the name used always keeps
the original case.

Now that's a bit tricky for us because AttributeNodes are just legacy stuff we don't
used internally.

We have 4 cases to handle:
1) The name being set is lowercase, there was no conflicting name on the element.

That's easy, we just override any node that would exist, set the name otherwise.

2) The name is lowercase but there was an existing attribute for it.

-We create a new AttributeNode for the name to represent the old name.
-We check the names are the same with attribute.name().matches(attrNode->qualifiedName())

and override the value.

3) The name has uppercase characters, there is no conflicting name.

We would not find an element to remove, we just use setAttributeInternal() as usual
to add the attribute;

4) The name has uppercase characters, there is a lowercase conflicing name.

This is the weird behavior: we need to nuke the old attribute, then add the new attribute
with a different case.

First we remove the attribute with a lowercase name with removeAttributeInternal().
That becomes the old node.

There might still be an element of the same name as what we are trying to add. We don't want
to add another version of the same attribute. We need to use findAttributeIndexByName() again
to find if there is a conflicting attribute. Then we call setAttributeInternal() which handle
the both the cases where there was an element or not.

(WebCore::Element::setAttributeNodeNS):
This should work like any "NS" method.

(WebCore::Element::removeAttributeNode):
The method removeAttributeNode() is supposed to be exact.

(WebCore::Element::getAttributeNode):
(WebCore::Element::hasAttribute):
(WebCore::Element::attrIfExists):

  • dom/Element.h:
  • dom/ElementData.cpp:

(WebCore::ElementData::findAttributeIndexByNameSlowCase): Deleted.
(WebCore::ElementData::findAttributeIndexByNameForAttributeNode): Deleted.
Kill the slow case, every caller has been updated now.

  • dom/ElementData.h:

(WebCore::ElementData::findAttributeIndexByName):

  • dom/QualifiedName.h:

(WebCore::QualifiedName::matchesIgnoringCaseForLocalName): Deleted.

LayoutTests:

Improve the coverage a little.

Not everything is right yet: some getters return an empty string when they
should return null.

  • fast/dom/Element/attribute-ascii-case-insensitive-1-expected.txt:

This is now fixed :)

  • fast/dom/Element/attribute-ascii-case-insensitive-3-expected.txt: Added.
  • fast/dom/Element/attribute-ascii-case-insensitive-3.html: Added.

Test prefixed-like attribute defined through the parser.

  • fast/dom/Element/attribute-setAttributeNode-multiple-times-expected.txt: Added.
  • fast/dom/Element/attribute-setAttributeNode-multiple-times.html: Added.

Make sure we don't accumulate nodes.

  • fast/dom/Element/attribute-setAttributeNodeNS-multiple-times-expected.txt: Added.
  • fast/dom/Element/attribute-setAttributeNodeNS-multiple-times.html: Added.

Same without the crazy setter.

  • fast/dom/Element/script-tests/getAttribute-check-case-sensitivity.js:
  • fast/dom/Element/getAttribute-check-case-sensitivity-expected.txt:

With the latest spec, getting a node with any uppercase character through
getAttributeNode() always fails. Update the test to use .getAttributeNodeNS()
were needed.

  • fast/dom/Element/mozilla-dom-base-tests/test_bug1075702-expected.txt: Added.
  • fast/dom/Element/mozilla-dom-base-tests/test_bug1075702.html: Added.
  • fast/dom/Element/mozilla-dom-base-tests/test_bug339494-expected.txt: Added.
  • fast/dom/Element/mozilla-dom-base-tests/test_bug339494.html: Added.
  • fast/dom/Element/mozilla-dom-base-tests/test_bug364092-expected.txt: Added.
  • fast/dom/Element/mozilla-dom-base-tests/test_bug364092.xhtml: Added.

(testGetAttributeNodeMixedCase):
(testAttribNodeNamePreservesCaseGetNode):
(testAttribNodeNamePreservesCaseGetNode2):
Some related tests from Gecko, for completeness.

  • fast/dom/Element/setAttributeNode-case-insensitivity-expected.txt:
  • fast/dom/Element/setAttributeNode-case-insensitivity.html:

Test that the getAttribute part of setAttributeNode() do not ignore the prefix. The spec
says to use the name, not the localname.

  • fast/dom/Element/setAttributeNode-for-existing-attribute-expected.txt:
  • fast/dom/Element/setAttributeNode-for-existing-attribute.html:

This test was for legacy behavior that came from Firefox. Firefox does not do that anymore.
Keep the test around for regression catching, but add a sentence explaining the 'incorrect'
behavior.

  • fast/dom/Element/setAttributeNode-overriding-lowercase-values-1-expected.txt: Added.
  • fast/dom/Element/setAttributeNode-overriding-lowercase-values-1.html: Added.
  • fast/dom/Element/setAttributeNode-overriding-lowercase-values-2-expected.txt: Added.
  • fast/dom/Element/setAttributeNode-overriding-lowercase-values-2.html: Added.

Some coverage for the name overriding craziness.

1:55 PM Changeset in webkit [179496] by Joseph Pecoraro
  • 2 edits in trunk/LayoutTests

Rebaseline test with new expected results.

  • http/tests/inspector-protocol/access-inspected-object-expected.txt:
1:39 PM Changeset in webkit [179495] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Memory is written to after deallocated, in GraphicsLayer::setMaskLayer.
https://bugs.webkit.org/show_bug.cgi?id=141168

Patch by peavo@outlook.com <peavo@outlook.com> on 2015-02-02
Reviewed by Brent Fulgham.

Visual Studio detected that a deallocated heap block had been modified in GraphicsLayer::setMaskLayer,
when called from RenderLayerBacking::updateChildClippingStrategy.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateChildClippingStrategy):

1:25 PM Changeset in webkit [179494] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa] Make decoded image data purgeable ASAP.
<https://webkit.org/b/140298>
<rdar://problem/19623377>

Reviewed by Antti Koivisto.

Re-landing this patch since it turned out to not be the cause of
the memory regression we saw around that revision.

Mark decoded images as "transient" which makes CoreGraphics mark
the backing stores as purgeable shortly after they're used.

The decoded representation will remain in CoreGraphics's caches
indefinitely unless the kernel gets starved and needs the pages.

Most resources will now reach a state where the encoded data is
mmap'ed from disk cache (once the entire resource is downloaded)
and the decoded data is purgeable.

This also has the side effect of making the MemoryCache more
palatial since the decoded data cost can be deducted for images,
allowing us to cache more resources.

Note that the worst case for this new behavior would be something
like hovering below 100% memory utilization and constantly having
to drop and re-decode images. While churny, it still beats
crashing the process, plus there's tiling to remove many of the
reasons we'd need the decoded data.

  • platform/graphics/cg/ImageSourceCG.cpp:

(WebCore::ImageSource::createFrameAtIndex):

1:07 PM Changeset in webkit [179493] by Joseph Pecoraro
  • 11 edits in trunk/Source

Web Inspector: Support console.table
https://bugs.webkit.org/show_bug.cgi?id=141058

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/InjectedScriptSource.js:

Include the firstLevelKeys filter when generating previews.

  • runtime/ConsoleClient.cpp:

(JSC::appendMessagePrefix):
Differentiate console.table logs to system log.

Source/WebCore:

  • inspector/CommandLineAPIModuleSource.js:

Include "table(foo)" as an alias of "console.table(foo)" on
the command line.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

New "Index", "(Index)", "Value", table header strings.

  • UserInterface/Views/ConsoleMessage.js:

Add "Table", but add FIXMEs to consider using the protocol generated enums.

  • UserInterface/Views/ConsoleMessageImpl.js:

(WebInspector.ConsoleMessageImpl.prototype._format):
Special case console.table messages.

(WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreviews):
(WebInspector.ConsoleMessageImpl.prototype._propertyPreviewElement):
Factor out ProjectPreview printing. Also, replace newlines in strings
with return characters, like we did elsewhere.

(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsTable):
Ultimately try to create a DataGrid from the output. Search first
for rich object data in the list. If no rich object data is found
just check for simple values. If the table is lossy, also do
a log of the object in case the user wants to see more data.

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid):
The for..in enumeration is unordered and may not give us the
column ordering we wanted. So include an optional preferred
column names list to get the preferred order.

(WebInspector.DataGrid.createSortableDataGrid):
Numerous bug fixes here. Accidental globals, typos, and sorting failures.

(WebInspector.DataGrid.prototype.autoSizeColumns):
(WebInspector.DataGrid.prototype.textForDataGridNodeColumn):
(WebInspector.DataGrid.prototype._copyTextForDataGridNode):
Create a generic method to get the text for a datagrid node in a column.
This is important for getting the text from console.table previews which
contains Nodes.

  • UserInterface/Views/LogContentView.css:

(.console-messages:focus .console-item.selected .data-grid tr.selected):
(.console-item .data-grid tr.selected):
DataGrid selection colors while in the console which may or may
not have selected console items.

1:04 PM Changeset in webkit [179492] by roger_fong@apple.com
  • 5 edits in trunk/Source/WebCore

[Win] Build fix following r179482.

  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • bindings/js/JSBindingsAllInOne.cpp:
  • platform/graphics/GraphicsContext3D.h:
12:54 PM Changeset in webkit [179491] by fpizlo@apple.com
  • 4 edits in trunk

.:
Revert accidental change in r179490.

  • Makefile.shared:

Source/WebKit2:
Revert accidental (and super bad) change in r179490.

  • WebProcess/com.apple.WebProcess.sb.in:
12:52 PM Changeset in webkit [179490] by fpizlo@apple.com
  • 5 edits in trunk

BinarySwitch should be faster on average
https://bugs.webkit.org/show_bug.cgi?id=141046

Reviewed by Anders Carlsson.

This optimizes our binary switch using math. It's strictly better than what we had before
assuming we bottom out in some case (rather than fall through), assuming all cases get
hit with equal probability. The difference is particularly large for large switch
statements. For example, a switch statement with 1000 cases would previously require on
average 13.207 branches to get to some case, while now it just requires 10.464.

This is also a progression for the fall-through case, though we could shave off another
1/6 branch on average if we wanted to - though it would regress taking a case (not falling
through) by 1/6 branch. I believe it's better to bias the BinarySwitch for not falling
through.

This also adds some randomness to the algorithm to minimize the likelihood of us
generating a switch statement that is always particularly bad for some input. Note that
the randomness has no effect on average-case performance assuming all cases are equally
likely.

This ought to have no actual performance change because we don't rely on binary switches
that much. The main reason why this change is interesting is that I'm finding myself
increasingly relying on BinarySwitch, and I'd like to know that it's optimal.

  • jit/BinarySwitch.cpp:

(JSC::BinarySwitch::BinarySwitch):
(JSC::BinarySwitch::~BinarySwitch):
(JSC::BinarySwitch::build):

  • jit/BinarySwitch.h:
12:50 PM Changeset in webkit [179489] by Chris Dumez
  • 29 edits in trunk/Source

Access MemoryCache singleton using MemoryCache::singleton()
https://bugs.webkit.org/show_bug.cgi?id=141104

Reviewed by Andreas Kling.

Access MemoryCache singleton using MemoryCache::singleton() static
member function, instead of a free function, as per the recent
coding style discussion on WebKit-dev.

12:40 PM Changeset in webkit [179488] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Ambiguous naming: Do not call replacedContentRect()'s return value paint rect.
https://bugs.webkit.org/show_bug.cgi?id=141125

Reviewed by Simon Fraser.

It's the content box rect with the object-fit adjustment.

No change in functionality.

  • rendering/RenderHTMLCanvas.cpp:

(WebCore::RenderHTMLCanvas::paintReplaced):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::updateInnerContentRect):
(WebCore::RenderImage::paintReplaced):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::replacedContentRect):

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::splitFragmentToFitLine):

12:29 PM Changeset in webkit [179487] by Brent Fulgham
  • 3 edits in trunk/Source/WebCore

[Win] Build fix after r179476.
https://bugs.webkit.org/show_bug.cgi?id=141026

Reviewed by Anders Carlsson.

MSVC has a compiler bug that forces us to make some explicit statements about how
the passed pointer values are handled.

  • css/CSSParser.cpp:

(WebCore::CSSParser::SourceSize::SourceSize):
(WebCore::CSSParser::sourceSize):

  • css/CSSParser.h:
12:28 PM Changeset in webkit [179486] by fpizlo@apple.com
  • 2 edits in trunk

Unreviewed, revert accidental change to Makefile.shared in r179478

  • Makefile.shared:
12:13 PM Changeset in webkit [179485] by benjamin@webkit.org
  • 2 edits in trunk/Source/WebCore

Get rid of invalidSelectorVector, use Bison's error recovery instead
https://bugs.webkit.org/show_bug.cgi?id=141147

Reviewed by Darin Adler.

  • css/CSSGrammar.y.in:

Instead of reducing a null selector, we can use a real parsing error
to get out of invalid selector endings.

When that happens, Bison will pop the stack until it can reduce any
valid error recovery rules.

The problem is to make sure there is no floating values because
none of the reduce block between the error and the recovery would
be executed.

In this case, "nth_selector_ending" is a non-recursive production of
the NTHCHILDFUNCTIONS. In turn, NTHCHILDFUNCTIONS are productions
of the non-recursive "pseudo". "pseudo" is only used as a trivial
production of "specifier". "specifier" is only used by "specifier_list".

"specifier_list" has error recovery code -> no production could have
generated a floating values between "specifier_list" and "nth_selector_ending".

12:10 PM Changeset in webkit [179484] by benjamin@webkit.org
  • 1 edit
    8 adds in trunk/LayoutTests

Multiple CSS plus selector not working after checkbox:checked
https://bugs.webkit.org/show_bug.cgi?id=110594

Reviewed by Darin Adler.

I fixed the bug not so long ago.

This patch adds coverage for :checked since internal states
tend to have tricky update behaviors.

  • fast/selectors/checked-direct-adjacent-style-update-1-expected.txt: Added.
  • fast/selectors/checked-direct-adjacent-style-update-1.html: Added.
  • fast/selectors/checked-direct-adjacent-style-update-2-expected.txt: Added.
  • fast/selectors/checked-direct-adjacent-style-update-2.html: Added.
  • fast/selectors/checked-direct-adjacent-style-update-3-expected.txt: Added.
  • fast/selectors/checked-direct-adjacent-style-update-3.html: Added.
  • fast/selectors/checked-direct-adjacent-style-update-4-expected.txt: Added.
  • fast/selectors/checked-direct-adjacent-style-update-4.html: Added.
12:07 PM Changeset in webkit [179483] by commit-queue@webkit.org
  • 5 edits in trunk/Source

Web Inspector: Extend CSS.getSupportedCSSProperties to provide values for properties for CSS Augmented JSContext
https://bugs.webkit.org/show_bug.cgi?id=141064

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2015-02-02
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/protocol/CSS.json:

Source/WebInspectorUI:

  • UserInterface/Models/CSSCompletions.js:
  • UserInterface/Models/CSSKeywordCompletions.js:

(WebInspector.CSSKeywordCompletions.addCustomCompletions):
(WebInspector.CSSKeywordCompletions.addPropertyCompletionValues):
If a property is specified with custom values, extend the
keyword completions map to make those values available
in autocompletion.

12:05 PM Changeset in webkit [179482] by roger_fong@apple.com
  • 15 edits in trunk

WebGL2: Implement spec section 3.7.1 Setting and getting state (Part 1).
https://bugs.webkit.org/show_bug.cgi?id=141096
<rdar://problem/15002469>

Reviewed by Brent Fulgham.

This patch implements the WebGL2 versions of getParameter, getIndexedParameter and isEnabled.
It also removes the WebGL1 implementations from WebGLRenderingContextBase and moves it to WebGLRenderingContext.
I’ve stubbed out most of the parameters for now, some of which will be implemented in Part 2,
and the rest as the our WebGL2 implementation progresses.

  • bindings/js/JSWebGL2RenderingContextCustom.cpp:

(WebCore::toJS):
(WebCore::JSWebGL2RenderingContext::getIndexedParameter):

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::getIndexedParameter):
(WebCore::WebGL2RenderingContext::getParameter):
(WebCore::WebGL2RenderingContext::validateCapability):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGL2RenderingContext.idl:
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::validateCapability):

  • html/canvas/WebGLRenderingContext.h:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::getParameter): Deleted.
(WebCore::WebGLRenderingContextBase::validateCapability): Deleted.

  • html/canvas/WebGLRenderingContextBase.h:
  • html/canvas/WebGLRenderingContextBase.idl:
  • platform/graphics/GraphicsContext3D.h:

Two read format parameters were moved from the WebGL2 spec to the WebGL1 spec. Update tests accordingly.

  • fast/canvas/webgl/constants.html:
  • fast/canvas/webgl/webgl-specific-expected.txt:
  • fast/canvas/webgl/webgl-specific.html:
  • webgl/1.0.2/resources/webgl_test_files/conformance/misc/webgl-specific.html:
11:47 AM Changeset in webkit [179481] by dbates@webkit.org
  • 9 edits in trunk

[iOS] ASSERTION FAILED: m_scriptExecutionContext->isContextThread() in ContextDestructionObserver::observeContext
https://bugs.webkit.org/show_bug.cgi?id=141057
<rdar://problem/19068790>

Reviewed by Alexey Proskuryakov.

Source/JavaScriptCore:

  • inspector/remote/RemoteInspector.mm:

(Inspector::RemoteInspector::receivedIndicateMessage): Modified to call WTF::callOnWebThreadOrDispatchAsyncOnMainThread().
(Inspector::dispatchAsyncOnQueueSafeForAnyDebuggable): Deleted; moved logic to common helper function,
WTF::callOnWebThreadOrDispatchAsyncOnMainThread() so that it can be called from both RemoteInspector::receivedIndicateMessage()
and CryptoKeyRSA::generatePair().

Source/WebCore:

Fixes an issue where we would create-/delete- the RSA crypto keys and dispatch callbacks on the wrong
thread in WebKit1 for iOS. In iOS WebKit1 we should perform such operations on thread WebThread.

This change is covered by existing layout tests.

  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::CryptoKeyRSA::generatePair):

Source/WTF:

  • wtf/MainThread.h:
  • wtf/mac/MainThreadMac.mm:

(WTF::callOnWebThreadOrDispatchAsyncOnMainThread): Added.

LayoutTests:

Un-skip crypto tests. Also, group skip entries for tests crypto/subtle/{rsa-indexeddb, rsa-indexeddb-non-exportable}.html
with other skipped IndexedDB tests.

  • platform/ios-simulator/TestExpectations:
11:40 AM Changeset in webkit [179480] by commit-queue@webkit.org
  • 11 edits in trunk/Source

Prevent crash when accessing WebAVPlayerController.delegate.
https://bugs.webkit.org/show_bug.cgi?id=140893

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-02-02
Reviewed by Darin Adler.

Source/WebCore:

This patch aims to prevent a null delegate access during invalidation by adding null checks before accessing the delegate, by making explicit the recreation of m_playerController, and by consolidating and correcting the teardown sequence.

  • WebCore.exp.in:
  • platform/ios/WebVideoFullscreenInterface.h: add resetMediaState()
  • platform/ios/WebVideoFullscreenInterfaceAVKit.h: ditto.
  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Check for null before accessing delegate.
(-[WebAVPlayerController play:]): ditto.
(-[WebAVPlayerController pause:]): ditto.
(-[WebAVPlayerController togglePlayback:]): ditto.
(-[WebAVPlayerController setPlaying:]): ditto.
(-[WebAVPlayerController beginScrubbing:]): ditto.
(-[WebAVPlayerController endScrubbing:]): ditto.
(-[WebAVPlayerController seekToTime:]): ditto.
(-[WebAVPlayerController beginScanningForward:]): ditto.
(-[WebAVPlayerController endScanningForward:]): ditto.
(-[WebAVPlayerController beginScanningBackward:]): ditto.
(-[WebAVPlayerController endScanningBackward:]): ditto.
(-[WebAVPlayerController seekToBeginning:]): ditto.
(-[WebAVPlayerController seekToEnd:]): ditto.
(-[WebAVPlayerController setCurrentAudioMediaSelectionOption:]): ditto.
(-[WebAVPlayerController setCurrentLegibleMediaSelectionOption:]): ditto.
(-[WebAVPlayerController layoutSublayersOfLayer:]): ditto.
(WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit): initialize m_playerController
(WebVideoFullscreenInterfaceAVKit::resetMediaState): Added.
(WebVideoFullscreenInterfaceAVKit::setDuration): remove playerController()
(WebVideoFullscreenInterfaceAVKit::setCurrentTime): ditto.
(WebVideoFullscreenInterfaceAVKit::setRate): ditto.
(WebVideoFullscreenInterfaceAVKit::setVideoDimensions): ditto.
(WebVideoFullscreenInterfaceAVKit::setSeekableRanges): ditto.
(WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse): ditto.
(WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): ditto.
(WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): ditto.
(WebVideoFullscreenInterfaceAVKit::setExternalPlayback): ditto.
(WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): ditto.
(WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard): ditto.
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): consolidated cleanup code from invalidate()
(WebVideoFullscreenInterfaceAVKit::invalidate): consolidate cleanup code.
(WebVideoFullscreenInterfaceAVKit::playerController): Deleted.

  • platform/ios/WebVideoFullscreenModelVideoElement.mm:

(WebVideoFullscreenModelVideoElement::setVideoElement): call resetMediaState()

Source/WebKit2:

Plumb new resetMediaState() through IPC interface WebVideoFullscreenManagerProxy.

  • UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
  • UIProcess/ios/WebVideoFullscreenManagerProxy.mm:

(WebKit::WebVideoFullscreenManagerProxy::invalidate): remove redundant set to nullptr.

  • WebProcess/ios/WebVideoFullscreenManager.h:
  • WebProcess/ios/WebVideoFullscreenManager.mm:

(WebKit::WebVideoFullscreenManager::resetMediaState):

11:05 AM Changeset in webkit [179479] by saambarati1@gmail.com
  • 7 edits
    8 adds in trunk

Create tests for JSC's Control Flow Profiler
https://bugs.webkit.org/show_bug.cgi?id=141123

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This patch creates a control flow profiler testing API in jsc.cpp
that accepts a function and a string as arguments. The string must
be a substring of the text of the function argument. The API returns
a boolean indicating whether or not the basic block that encloses the
substring has executed.

This patch uses this API to test that the control flow profiler
behaves as expected on basic block boundaries. These tests do not
provide full coverage for all JavaScript statements that can create
basic blocks boundaries. Full coverage will come in a later patch.

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionHasBasicBlockExecuted):

  • runtime/ControlFlowProfiler.cpp:

(JSC::ControlFlowProfiler::hasBasicBlockAtTextOffsetBeenExecuted):

  • runtime/ControlFlowProfiler.h:
  • tests/controlFlowProfiler: Added.
  • tests/controlFlowProfiler.yaml: Added.
  • tests/controlFlowProfiler/driver: Added.
  • tests/controlFlowProfiler/driver/driver.js: Added.

(assert):

  • tests/controlFlowProfiler/if-statement.js: Added.

(testIf):
(noMatches):

  • tests/controlFlowProfiler/loop-statements.js: Added.

(forRegular):
(forIn):
(forOf):
(whileLoop):

  • tests/controlFlowProfiler/switch-statements.js: Added.

(testSwitch):

  • tests/controlFlowProfiler/test-jit.js: Added.

(tierUpToBaseline):
(tierUpToDFG):
(baselineTest):
(dfgTest):

Tools:

  • Scripts/run-javascriptcore-tests:

(runJSCStressTests):

  • Scripts/run-jsc-stress-tests:
10:38 AM Changeset in webkit [179478] by fpizlo@apple.com
  • 46 edits
    2 adds
    5 deletes in trunk

Polymorphic call inlining should be based on polymorphic call inline caching rather than logging
https://bugs.webkit.org/show_bug.cgi?id=140660

Reviewed by Geoffrey Garen.

When we first implemented polymorphic call inlining, we did the profiling based on a call
edge log. The idea was to store each call edge (a tuple of call site and callee) into a
global log that was processed lazily. Processing the log would give precise counts of call
edges, and could be used to drive well-informed inlining decisions - polymorphic or not.
This was a speed-up on throughput tests but a slow-down for latency tests. It was a net win
nonetheless.

Experience with this code shows three things. First, the call edge profiler is buggy and
complex. It would take work to fix the bugs. Second, the call edge profiler incurs lots of
overhead for latency code that we care deeply about. Third, it's not at all clear that
having call edge counts for every possible callee is any better than just having call edge
counts for the limited number of callees that an inline cache would catch.

So, this patch removes the call edge profiler and replaces it with a polymorphic call inline
cache. If we miss the basic call inline cache, we inflate the cache to be a jump to an
out-of-line stub that cases on the previously known callees. If that misses again, then we
rewrite that stub to include the new callee. We do this up to some number of callees. If we
hit the limit then we switch to using a plain virtual call.

Substantial speed-up on V8Spider; undoes the slow-down that the original call edge profiler
caused. Might be a SunSpider speed-up (below 1%), depending on hardware.

Rolling this back in after fixing https://bugs.webkit.org/show_bug.cgi?id=141107.

(JSC::CallEdge::count):
(JSC::CallEdge::CallEdge):

  • bytecode/CallEdgeProfile.cpp: Removed.
  • bytecode/CallEdgeProfile.h: Removed.
  • bytecode/CallEdgeProfileInlines.h: Removed.
  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::unlink):
(JSC::CallLinkInfo::visitWeak):

  • bytecode/CallLinkInfo.h:
  • bytecode/CallLinkStatus.cpp:

(JSC::CallLinkStatus::CallLinkStatus):
(JSC::CallLinkStatus::computeFor):
(JSC::CallLinkStatus::computeFromCallLinkInfo):
(JSC::CallLinkStatus::isClosureCall):
(JSC::CallLinkStatus::makeClosureCall):
(JSC::CallLinkStatus::dump):
(JSC::CallLinkStatus::computeFromCallEdgeProfile): Deleted.

  • bytecode/CallLinkStatus.h:

(JSC::CallLinkStatus::CallLinkStatus):
(JSC::CallLinkStatus::isSet):
(JSC::CallLinkStatus::variants):
(JSC::CallLinkStatus::size):
(JSC::CallLinkStatus::at):
(JSC::CallLinkStatus::operator[]):
(JSC::CallLinkStatus::canOptimize):
(JSC::CallLinkStatus::edges): Deleted.
(JSC::CallLinkStatus::canTrustCounts): Deleted.

  • bytecode/CallVariant.cpp:

(JSC::variantListWithVariant):
(JSC::despecifiedVariantList):

  • bytecode/CallVariant.h:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::linkIncomingPolymorphicCall):
(JSC::CodeBlock::unlinkIncomingCalls):
(JSC::CodeBlock::noticeIncomingCall):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::isIncomingCallAlreadyLinked): Deleted.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::addCallWithoutSettingResult):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleInlining):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasHeapPrediction):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGPredictionPropagationPhase.cpp:

(JSC::DFG::PredictionPropagationPhase::propagate):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGTierUpCheckInjectionPhase.cpp:

(JSC::DFG::TierUpCheckInjectionPhase::run):
(JSC::DFG::TierUpCheckInjectionPhase::removeFTLProfiling): Deleted.

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • heap/Heap.cpp:

(JSC::Heap::collect):

  • jit/BinarySwitch.h:
  • jit/ClosureCallStubRoutine.cpp: Removed.
  • jit/ClosureCallStubRoutine.h: Removed.
  • jit/JITCall.cpp:

(JSC::JIT::compileOpCall):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileOpCall):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:

(JSC::operationLinkPolymorphicCallFor):
(JSC::operationLinkClosureCallFor): Deleted.

  • jit/JITStubRoutine.h:
  • jit/JITWriteBarrier.h:
  • jit/PolymorphicCallStubRoutine.cpp: Added.

(JSC::PolymorphicCallNode::~PolymorphicCallNode):
(JSC::PolymorphicCallNode::unlink):
(JSC::PolymorphicCallCase::dump):
(JSC::PolymorphicCallStubRoutine::PolymorphicCallStubRoutine):
(JSC::PolymorphicCallStubRoutine::~PolymorphicCallStubRoutine):
(JSC::PolymorphicCallStubRoutine::variants):
(JSC::PolymorphicCallStubRoutine::edges):
(JSC::PolymorphicCallStubRoutine::visitWeak):
(JSC::PolymorphicCallStubRoutine::markRequiredObjectsInternal):

  • jit/PolymorphicCallStubRoutine.h: Added.

(JSC::PolymorphicCallNode::PolymorphicCallNode):
(JSC::PolymorphicCallCase::PolymorphicCallCase):
(JSC::PolymorphicCallCase::variant):
(JSC::PolymorphicCallCase::codeBlock):

  • jit/Repatch.cpp:

(JSC::linkSlowFor):
(JSC::linkFor):
(JSC::revertCall):
(JSC::unlinkFor):
(JSC::linkVirtualFor):
(JSC::linkPolymorphicCall):
(JSC::linkClosureCall): Deleted.

  • jit/Repatch.h:
  • jit/ThunkGenerators.cpp:

(JSC::linkPolymorphicCallForThunkGenerator):
(JSC::linkPolymorphicCallThunkGenerator):
(JSC::linkPolymorphicCallThatPreservesRegsThunkGenerator):
(JSC::linkClosureCallForThunkGenerator): Deleted.
(JSC::linkClosureCallThunkGenerator): Deleted.
(JSC::linkClosureCallThatPreservesRegsThunkGenerator): Deleted.

  • jit/ThunkGenerators.h:

(JSC::linkPolymorphicCallThunkGeneratorFor):
(JSC::linkClosureCallThunkGeneratorFor): Deleted.

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::jitCompileAndSetHeuristics):

  • runtime/Options.h:
  • runtime/VM.cpp:

(JSC::VM::prepareToDiscardCode):
(JSC::VM::ensureCallEdgeLog): Deleted.

  • runtime/VM.h:
10:15 AM Changeset in webkit [179477] by fpizlo@apple.com
  • 4 edits
    1 add in trunk/Source/JavaScriptCore

Converting Flushes and PhantomLocals to Phantoms requires an OSR availability analysis rather than just using the SetLocal's child
https://bugs.webkit.org/show_bug.cgi?id=141107

Reviewed by Michael Saboff.

See the bugzilla for a discussion of the problem. This addresses the problem by ensuring
that Flushes are always strength-reduced to PhantomLocals, and CPS rethreading does a mini
OSR availability analysis to determine the right MovHint value to use for the Phantom.

  • dfg/DFGCPSRethreadingPhase.cpp:

(JSC::DFG::CPSRethreadingPhase::CPSRethreadingPhase):
(JSC::DFG::CPSRethreadingPhase::freeUnnecessaryNodes):
(JSC::DFG::CPSRethreadingPhase::clearVariables):
(JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor):
(JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock):
(JSC::DFG::CPSRethreadingPhase::clearVariablesAtHeadAndTail): Deleted.

  • dfg/DFGNode.h:

(JSC::DFG::Node::convertPhantomToPhantomLocal):
(JSC::DFG::Node::convertFlushToPhantomLocal):
(JSC::DFG::Node::convertToPhantomLocal): Deleted.

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

  • tests/stress/inline-call-that-doesnt-use-all-args.js: Added.

(foo):
(bar):
(baz):

10:12 AM Changeset in webkit [179476] by Darin Adler
  • 11 edits in trunk/Source/WebCore

REGRESSION (r170576): Storage leaks in parsing of CSS image sizes
https://bugs.webkit.org/show_bug.cgi?id=141026

Reviewed by Anders Carlsson.

  • css/CSSGrammar.y.in: Fixed all the shift/reduce conflicts caused

by the ENABLE_PICTURE_SIZES code by removing all the redundant
maybe_space which caused them. Rearranged the productions for
ENABLE_PICTURE_SIZES to tighten up the code quite a bit. Changed
the code to build up the source size vector as a Vector instead of
a special class, and use the SourceSize struct from inside the
CSSParser class.'

  • css/CSSParser.cpp:

(WebCore::CSSParser::setupParser): Changed this to take a StringView.
In the future we can change all the parsing functions to take StringView,
since they don't work with the String in place.
(WebCore::CSSParser::parseSizesAttribute): Changed to return a vector
of SourceSize instead of a SourceSizeList. This is better because it's
a real CSS data structure that does not contain a CSSParserValue.
(WebCore::CSSParser::sourceSize): Added. Helper that creates a
SourceSize, mapping parser data structures into real CSS ones.

  • css/CSSParser.h: Updated for changes above.
  • css/MediaQuery.cpp:

(WebCore::MediaQuery::MediaQuery): Use std::make_unique and the copy
constructor directly instead of using a MediaQuery::copy function.

  • css/MediaQueryExp.cpp: Streamlined the class a little bit.
  • css/MediaQueryExp.h: Removed unneeded includes. Moved functions out

of the class body so the class is easier to read. Removed the unneeded
copy function.

  • css/SourceSizeList.cpp:

(WebCore::SourceSize::match): Changed to use WTF::move instead
of releasing and then re-creating the unique_ptr.
(WebCore::computeLength): Added a comment to explain this function
is using an incorrect strategy. Also added some type checking code
to handle cases where a null or non-primitive CSS value might be
returned. Probably dead code, but we don't want to risk a bad cast.
Worthe cleaning up when we fix the strategy.
(WebCore::SourceSizeList::getEffectiveSize): Updated since the
vector now contains actual SourceSize objects rather than pointers
to SourceSize objects on the heap.

  • css/SourceSizeList.h: Changed the CSSParserValue argument to be

an rvalue reference to make it clearer that we take ownership of it
when it's moved in. Added a move constructor and a destructor. Added
comments explaining that it's not correct design to use a
CSSParserValue here, outside the parser. Changed SourceSizeList's
append function to move a SourceSize in rather than a unique_ptr.
Made getEffectiveSize private. Moved the various inline functions to
the bottom of the file to make the class definitions easier to read.

  • css/SourceSizeList.cpp: Made almost everything about this private

to this source file instead of public in the header.
(WebCore::match): Made this a free function instead of a member function
and made it take the media query expression as an argument.
(WebCore::computeLength): Changed the argument type to CSSValue*,
rather than using CSSParserValue here outside the parser.
(WebCore::parseSizesAttribute): Streamlined and simplified this.
Now that the parser builds the list in the correct order, there was
no need to iterate backwards any more so we could use a modern for
loop.

  • css/SourceSizeList.h: Removed almost everything in this header.
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::parseAttribute): Call the
parseSizesAttribute function as free function since it's no longer
a member of a SourceSizeList class.

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
Ditto.

9:06 AM Changeset in webkit [179475] by Csaba Osztrogonác
  • 2 edits in trunk/Tools

Remove copy/paste code from run-jsc-stress-tests to determine numberOfTests
https://bugs.webkit.org/show_bug.cgi?id=141158

Reviewed by Darin Adler.

  • Scripts/run-jsc-stress-tests:
12:48 AM Changeset in webkit [179474] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GTK] MiniBrowser should close itself on Ctrl+W or Ctrl+Q
https://bugs.webkit.org/show_bug.cgi?id=141142

Patch by Michael Catanzaro <Michael Catanzaro> on 2015-02-02
Reviewed by Carlos Garcia Campos.

  • MiniBrowser/gtk/BrowserWindow.c:

(browser_window_init): Quit on Ctrl+W or Ctrl+Q

12:27 AM Changeset in webkit [179473] by Darin Adler
  • 6 edits in trunk/Source/WebCore

Fix some leaks found by the leak bot
https://bugs.webkit.org/show_bug.cgi?id=141149

Reviewed by Alexey Proskuryakov.

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::importKey): Changed argument types to std::unique_ptr for better code clarity.
(WebCore::JSSubtleCrypto::importKey): Use WTF::move instead of release.
(WebCore::JSSubtleCrypto::wrapKey): Fixed leaks by adding missing delete calls to the
case where we get a DOM exception.
(WebCore::JSSubtleCrypto::unwrapKey): Ditto.

  • dom/SelectorQuery.cpp:

(WebCore::SelectorQuery::SelectorQuery): Use WTF::move here. Not clear how this could
have caused the storage leak, but it does seem obviously missing. The leak is pretty big,
implying that we leak almost all CSSSelectorList objects we parse; not sure this fixes it.

  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse): Added code to
deleted the unguarded pointer if postTaskForModeToWorkerGlobalScope fails.
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData): Ditto.
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail): Ditto.
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck): Ditto.

  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:

(WebCore::MediaSelectionGroupAVFObjC::updateOptions): Added missing adoptNS.

  • platform/graphics/mac/GraphicsContextMac.mm:

(WebCore::GraphicsContext::updateDocumentMarkerResources): Added missing release.

Feb 1, 2015:

4:49 PM Changeset in webkit [179472] by Chris Dumez
  • 26 edits in trunk/Source

Use more references in HistoryItem
https://bugs.webkit.org/show_bug.cgi?id=141133

Reviewed by Andreas Kling.

Use more references in HistoryItem instead of pointers.
Source/WebKit2:

  • WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:

(WebKit::InjectedBundleBackForwardListItem::children):

  • WebProcess/WebCoreSupport/SessionStateConversion.cpp:

(WebKit::toFrameState):
(WebKit::applyFrameState):

  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::WebBackForwardListProxy::addItem):

  • WebProcess/WebPage/WebBackForwardListProxy.h:
3:47 PM Changeset in webkit [179471] by commit-queue@webkit.org
  • 7 edits
    12 adds
    2 deletes in trunk

Unreviewed, rolling out r179467 and r179470.
https://bugs.webkit.org/show_bug.cgi?id=141144

Broke svg/custom/use-events-crash.svg (Requested by ap on
#webkit).

Reverted changesets:

"Stop dispatching events with SVGElementInstance objects as
their targets"
https://bugs.webkit.org/show_bug.cgi?id=141108
http://trac.webkit.org/changeset/179467

"REGRESSION(r179467): svg/custom/use-events-crash.svg times
out"
http://trac.webkit.org/changeset/179470

2:05 PM Changeset in webkit [179470] by ap@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION(r179467): svg/custom/use-events-crash.svg times out

Looks like the new test (svg/custom/use-event-retargeting.html) somehow breaks
subsequent one, let's try skipping it for now.

1:23 PM Changeset in webkit [179469] by youenn.fablet@crf.canon.fr
  • 2 edits in trunk/Tools

Web platform test server is not always launching properly on Mac EWS bots
https://bugs.webkit.org/show_bug.cgi?id=141141

Unreviewed.

  • Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py:

(create_wpt_empty_file_if_needed): Removed creation of empty init.py files from AutoInstalled modules.

10:42 AM Changeset in webkit [179468] by mitz@apple.com
  • 3 edits in trunk/Source/WebKit2

Remove ViewGestureController tracing
https://bugs.webkit.org/show_bug.cgi?id=141137

Reviewed by Tim Horton.

Remove the tracing added in r176133, now that http://webkit.org/b/138750 is fixed.

  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
(WebKit::ViewGestureController::removeSwipeSnapshot):
(WebKit::addLogEntry): Deleted.
(WebKit::dumpLogEntries): Deleted.

  • UIProcess/mac/ViewGestureController.h:
7:22 AM Changeset in webkit [179467] by Darin Adler
  • 6 edits
    2 adds
    12 deletes in trunk

Source/WebCore:
Stop dispatching events to with SVGElementInstance objects as their targets
https://bugs.webkit.org/show_bug.cgi?id=141108

Reviewed by Anders Carlsson.

Test: svg/custom/use-event-retargeting.html

  • dom/EventDispatcher.cpp:

(WebCore::eventTargetRespectingTargetRules): Replaced the code that retargeted
events at SVGElementInstance objects with code that retargets them at the use
element instead. Also wrote the code in a simpler way.

LayoutTests:
Stop dispatching events with SVGElementInstance objects as their targets
https://bugs.webkit.org/show_bug.cgi?id=141108

Reviewed by Anders Carlsson.

Many tests are no longer relevant once we aren't doing this any more.

  • platform/gtk/svg/custom/use-instanceRoot-event-bubbling-expected.png: Removed.
  • platform/gtk/svg/custom/use-instanceRoot-modifications-expected.png: Removed.
  • platform/gtk/svg/custom/use-instanceRoot-modifications-expected.txt: Removed.
  • platform/ios-sim-deprecated/svg/custom/use-instanceRoot-modifications-expected.txt: Removed.
  • platform/ios-simulator/svg/custom/use-instanceRoot-modifications-expected.txt: Removed.
  • platform/mac-mountainlion/svg/custom/use-instanceRoot-modifications-expected.txt: Removed.
  • platform/mac/svg/custom/use-instanceRoot-event-bubbling-expected.png: Removed.
  • platform/mac/svg/custom/use-instanceRoot-modifications-expected.png: Removed.
  • platform/mac/svg/custom/use-instanceRoot-modifications-expected.txt: Removed.
  • svg/custom/use-instanceRoot-modifications.svg: Removed.
  • svg/custom/use-instanceRoot-with-use-removed-expected.txt: Removed.
  • svg/custom/use-instanceRoot-with-use-removed.svg: Removed.
  • svg/custom/resources/use-instanceRoot-event-bubbling.js: Updated this test to expect

the events to be dispatched with the SVGUseElement as the target. I talked this over with
Sam Weinig and we decided this is good behavior for now, and it almost matches what the
spec says. Might be worth refining later.

  • svg/custom/use-instanceRoot-event-bubbling-expected.txt: Updated expected results.
  • svg/custom/use-instanceRoot-event-bubbling.xhtml: Tweaked the test a little. It still

could use improvement; it's like half a "repaint test", which is strange.

  • svg/custom/use-event-retargeting-expected.txt: Added. Got this test from Blink.
  • svg/custom/use-event-retargeting.html: Added. Ditto.
6:53 AM Changeset in webkit [179466] by gyuyoung.kim@samsung.com
  • 2 edits in trunk/LayoutTests

Unreviewd EFL gardening. Add new failing tests related to W3C SVG 1.1.

  • platform/efl/TestExpectations:
5:02 AM Changeset in webkit [179465] by gyuyoung.kim@samsung.com
  • 2 edits in trunk/LayoutTests

Unreviewed EFL gardening. Update crash tests related to webgl because
webgl isn't supported by EFL port at the moment.

  • platform/efl/TestExpectations:
4:22 AM Changeset in webkit [179464] by gyuyoung.kim@samsung.com
  • 2 edits in trunk/LayoutTests

Unreviewed EFL gardening. Update tests which don't have expectation result yet.

  • platform/efl/TestExpectations:
2:25 AM Changeset in webkit [179463] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

[TexMap] Optimize TextureMapperLayer::removeAllChildren()
https://bugs.webkit.org/show_bug.cgi?id=140734

Reviewed by Chris Dumez.

Instead of removing the children from the Vector member one by one,
move the Vector out and iterate through the ex-children, clearing
out the pointer to the parent.

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::removeAllChildren):

2:17 AM Changeset in webkit [179462] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebCore

[TexMap] Avoid unnecessary TransformationMatrix copies in GraphicsLayerTransform
https://bugs.webkit.org/show_bug.cgi?id=140735

Reviewed by Chris Dumez.

  • platform/graphics/GraphicsLayerTransform.cpp:

(WebCore::GraphicsLayerTransform::combined): Return a const reference to the matrix.
(WebCore::GraphicsLayerTransform::combinedForChildren): Ditto.
(WebCore::GraphicsLayerTransform::combineTransforms): First copy the parent transform,
then apply the translation and multiplication. Previously this copied the parent
transform into a temporary object, performed the translation and multiplication, and
copied that temporary object again when assigning to the member variable.
(WebCore::GraphicsLayerTransform::combineTransformsForChildren): Mark const. m_childrenDirty
and m_combinedForChildren members are marked mutable.

  • platform/graphics/GraphicsLayerTransform.h:

Jan 31, 2015:

11:30 PM Changeset in webkit [179461] by gyuyoung.kim@samsung.com
  • 2 edits in trunk/LayoutTests

Unreviewed EFL gardening. Update flaky tests regarding W3C SVG 1.1 tests.

  • platform/efl/TestExpectations:
10:54 PM Changeset in webkit [179460] by Brent Fulgham
  • 2 edits in trunk/LayoutTests

[Win] Unreviewed test machine configuration change.

  • http/conf/apache2.4-httpd-win.conf: Provide reasonable default PidFile location for xampp-based install.
8:18 PM Changeset in webkit [179459] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

REGRESSION (r177689): Emoji variation sequences rendered incorrectly (as characters from other non-emoji font)
https://bugs.webkit.org/show_bug.cgi?id=141112

Patch by Myles C. Maxfield <litherum@gmail.com> on 2015-01-31
Reviewed by Sam Weinig.

Source/WebCore:

Typo in r177689.

Test: platform/mac/fast/text/combining-mark-paint.html

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

LayoutTests:

  • platform/mac/fast/text/combining-mark-paint-expected.html: Added.
  • platform/mac/fast/text/combining-mark-paint.html: Added.
8:03 PM Changeset in webkit [179458] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Unreviewed, rolling out r178183.
https://bugs.webkit.org/show_bug.cgi?id=141132

Caused more mallocing than the volatility saved. (Requested by
kling on #webkit).

Reverted changeset:

"[Cocoa] Make decoded image data purgeable ASAP."
https://bugs.webkit.org/show_bug.cgi?id=140298
http://trac.webkit.org/changeset/178183

7:58 PM Changeset in webkit [179457] by msaboff@apple.com
  • 3 edits
    3 adds in trunk

Crash (DFG assertion) beneath AbstractInterpreter::verifyEdge() @ http://experilous.com/1/planet-generator/2014-09-28/version-1
https://bugs.webkit.org/show_bug.cgi?id=141111

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

In LowerDFGToLLVM::compileNode(), if we determine while compiling a node that we would have
exited, we don't need to process the OSR availability or abstract interpreter.

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::safelyInvalidateAfterTermination): Broke this out a a separate
method since we need to call it at the top and near the bottom of compileNode().
(JSC::FTL::LowerDFGToLLVM::compileNode):

LayoutTests:

New tests.

  • js/regress-141111-expected.txt: Added.
  • js/regress-141111.html: Added.
  • js/script-tests/regress-141111.js: Added.

(MyObject):
(foo):
(.result):
(bar):

7:11 PM Changeset in webkit [179456] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Use simpler CachedResourceMap structure in MemoryCache with CACHE_PARTITIONING enabled
https://bugs.webkit.org/show_bug.cgi?id=141110

Reviewed by Antti Koivisto.

Use simpler CachedResourceMap structure in MemoryCache with CACHE_PARTITIONING
enabled. Previously, we would be using a HashMap of HashMap to store
CachedResources. The outer HashMap would use the URL as key and the inner
HashMap would use the partition name as key. This would make traversing the
structure overly complicated, especially considering that the code needs to
traverse a simple HashMap if CACHE_PARTITIONING is disabled.

This patch updates the CachedResourceMap structure to be a simple HashMap,
whose key is an std::pair<URL, String /* partitionName */>. Having a flat
structure simplifies the traversal code a lot and enables more code sharing
between CACHE_PARTITIONING and !CACHE_PARTITIONING. This shouldn't regress
performance because we always have both a URL and a partition name when we
need to look up a resource. We never need to retrieve all resources with
a particular URL.

This patch also switches to using a URL as key instead of a String as we
always have a URL has input.

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::add):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequestImpl):
(WebCore::MemoryCache::removeImageFromCache):
(WebCore::MemoryCache::remove):
After removing the resource from the CachedResourceMap, remove the
sessionID from m_sessionResources if the CachedResourceMap is now
empty. Previously, no code was removing sessionIDs from
m_sessionResources.

(WebCore::MemoryCache::removeResourcesWithOrigin):
(WebCore::MemoryCache::getOriginsWithCache):
(WebCore::MemoryCache::getStatistics):
(WebCore::MemoryCache::setDisabled):

  • loader/cache/MemoryCache.h:
7:04 PM Changeset in webkit [179455] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Merge the iOS implementations of GraphicsContext::drawText and GraphicsContext::drawBidiText with the platform independent ones
https://bugs.webkit.org/show_bug.cgi?id=141131

Patch by Sam Weinig <sam@webkit.org> on 2015-01-31
Reviewed by Antti Koivisto.

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::drawText):
The only difference between the two implementation here was the iOS one returns the length of
the text that was drawn. As all platforms now support that, we can merge by keeping the iOS one.

(WebCore::GraphicsContext::drawBidiText):
This function had a few differences:

  • iOS returns the length of the text that was drawn.

Since this is not used anywhere, I dropped this ability.

  • iOS took additional inputs of initial bidi status and run length (and returned the the final bidi status as an out parameter)

Since this was also unused, I dropped it.

  • iOS used the fact that font.drawText() returns the length that was drawn, to avoid measuring the text twice.

I kept this, since all platforms now support this.

  • platform/graphics/GraphicsContext.h:

Update signatures. Remove WEBCORE_EXPORT for function that is not used outside of WebCore.

6:58 PM Changeset in webkit [179454] by akling@apple.com
  • 8 edits in trunk/Source/WebCore

Shrink RenderBlock.
<https://webkit.org/b/141129>

Reviewed by Antti Koivisto.

Get rid of the bitfield in RenderBlock by moving the essential bits to
RenderElement (plenty of space in the bitfield there.)

RenderBlock also had a cache of its line-height, but it doesn't appear
to help any of the benchmarks that we're tracking so I'd say it's okay
to lose this optimization.

This knocks 8 bytes off of RenderBlock (and all of its subclasses.)

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::recomputeLogicalWidth):
(WebCore::RenderBlock::lineHeight):

  • rendering/RenderBlock.h:

(WebCore::RenderBlock::setHasMarginBeforeQuirk):
(WebCore::RenderBlock::setHasMarginAfterQuirk):
(WebCore::RenderBlock::setHasBorderOrPaddingLogicalWidthChanged):
(WebCore::RenderBlock::hasMarginBeforeQuirk):
(WebCore::RenderBlock::hasMarginAfterQuirk):
(WebCore::RenderBlock::hasBorderOrPaddingLogicalWidthChanged):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::invalidateLineLayoutPath):
(WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
(WebCore::RenderBlockFlow::ensureLineBoxes):

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::lineLayoutPath):
(WebCore::RenderBlockFlow::setLineLayoutPath):
(WebCore::RenderBlockFlow::setHasMarkupTruncation):
(WebCore::RenderBlockFlow::hasMarkupTruncation):
(WebCore::RenderBlockFlow::simpleLineLayout):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::RenderElement):

  • rendering/RenderElement.h:

(WebCore::RenderElement::setRenderBlockHasMarginBeforeQuirk):
(WebCore::RenderElement::setRenderBlockHasMarginAfterQuirk):
(WebCore::RenderElement::setRenderBlockHasBorderOrPaddingLogicalWidthChanged):
(WebCore::RenderElement::renderBlockHasMarginBeforeQuirk):
(WebCore::RenderElement::renderBlockHasMarginAfterQuirk):
(WebCore::RenderElement::renderBlockHasBorderOrPaddingLogicalWidthChanged):
(WebCore::RenderElement::setRenderBlockFlowLineLayoutPath):
(WebCore::RenderElement::setRenderBlockFlowHasMarkupTruncation):
(WebCore::RenderElement::renderBlockFlowLineLayoutPath):
(WebCore::RenderElement::renderBlockFlowHasMarkupTruncation):

  • rendering/RenderFlowThread.cpp:

(WebCore::RenderFlowThread::removeLineRegionInfo):

6:06 PM Changeset in webkit [179453] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Remove useless PageCache::singleton() call from PageCache member function
https://bugs.webkit.org/show_bug.cgi?id=141127

Reviewed by Andreas Kling.

  • history/PageCache.cpp:

(WebCore::PageCache::get):

4:38 PM Changeset in webkit [179452] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Remove empty #if/#endif

Rubber-stamped by Antti Koivisto.

  • platform/graphics/FontPlatformData.h:
3:52 PM Changeset in webkit [179451] by weinig@apple.com
  • 5 edits in trunk/Source/WebCore

Remove support for disabling drawing of emoji
https://bugs.webkit.org/show_bug.cgi?id=141126

Reviewed by Antti Koivisto.

Remove unused support for disabling the drawing of emoji.

  • WebCore.exp.in:
  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::emojiDrawingEnabled): Deleted.
(WebCore::GraphicsContext::setEmojiDrawingEnabled): Deleted.

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContextState::GraphicsContextState):

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::FontCascade::drawGlyphs):

2:55 PM Changeset in webkit [179450] by weinig@apple.com
  • 65 edits in trunk

Remove even more Mountain Lion support
https://bugs.webkit.org/show_bug.cgi?id=141124

Reviewed by Alexey Proskuryakov.

Source/bmalloc:

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:

Source/JavaScriptCore:

  • API/tests/DateTests.mm:
  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • Configurations/FeatureDefines.xcconfig:
  • Configurations/Version.xcconfig:
  • jit/ExecutableAllocatorFixedVMPool.cpp:

Source/WebCore:

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • Configurations/FeatureDefines.xcconfig:
  • Configurations/Version.xcconfig:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityActionNames]):
(-[WebAccessibilityObjectWrapper subrole]):

  • platform/graphics/ca/mac/PlatformCALayerMac.mm:

(PlatformCALayer::drawLayerContents):

  • platform/mac/ThemeMac.mm:

(-[WebCoreThemeView _focusRingVisibleRect]):

Source/WebKit/mac:

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • Configurations/FeatureDefines.xcconfig:
  • Configurations/Version.xcconfig:
  • Configurations/WebKitLegacy.xcconfig:

Source/WebKit2:

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • Configurations/FeatureDefines.xcconfig:
  • Configurations/Version.xcconfig:
  • Configurations/WebContentService.Development.xcconfig:
  • Configurations/WebContentService.xcconfig:
  • Configurations/WebKit.xcconfig:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

Source/WTF:

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • wtf/Assertions.cpp:
  • wtf/FeatureDefines.h:
  • wtf/Platform.h:

Tools:

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(AccessibilityUIElement::attributedStringRangeIsMisspelled):

  • DumpRenderTree/mac/Configurations/Base.xcconfig:
  • DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
  • DumpRenderTree/mac/DumpRenderTree.mm:

(activateTestingFonts):
(prepareConsistentTestingEnvironment):

  • DumpRenderTree/mac/EventSendingController.mm:

(-[EventSendingController mouseScrollByX:andY:withWheel:andMomentumPhases:]):
(-[EventSendingController contextClick]):

  • DumpRenderTree/mac/TextInputController.m:
  • LayoutTestRelay/Configurations/Base.xcconfig:
  • LayoutTestRelay/Configurations/DebugRelease.xcconfig:
  • MiniBrowser/Configurations/Base.xcconfig:
  • MiniBrowser/Configurations/DebugRelease.xcconfig:
  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[WK2BrowserWindowController webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:]):
(-[WK2BrowserWindowController webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:]):

  • TestWebKitAPI/Configurations/Base.xcconfig:
  • TestWebKitAPI/Configurations/DebugRelease.xcconfig:
  • TestWebKitAPI/Tests/WebKit2Cocoa/Download.mm:

(-[DownloadDelegate _downloadDidFinish:]):

  • TestWebKitAPI/Tests/mac/StringTruncator.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/mac/InjectedBundleControllerMac.mm:

(TestWebKitAPI::InjectedBundleController::platformInitialize):

  • WebKitLauncher/Configurations/Base.xcconfig:
  • WebKitTestRunner/Configurations/Base.xcconfig:
  • WebKitTestRunner/Configurations/DebugRelease.xcconfig:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled):

  • WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:

(WTR::activateFonts):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::initialize):
(WTR::TestController::webProcessName):

  • WebKitTestRunner/mac/EventSenderProxy.mm:
  • asan/asan.xcconfig:
2:54 PM Changeset in webkit [179449] by Antti Koivisto
  • 4 edits in trunk

Enable WebKit disk cache on OS X
https://bugs.webkit.org/show_bug.cgi?id=141022

Reviewed by Gavin Barraclough.

Source/WebKit2:

  • config.h: Flip the switch.

LayoutTests:

2:51 PM Changeset in webkit [179448] by Antti Koivisto
  • 2 edits in trunk/Source/WebKit2

Unreviewed, rolling out r179447.

Forgot to include the test.

Reverted changeset:

"Enable WebKit disk cache on OS X"
https://bugs.webkit.org/show_bug.cgi?id=141022
http://trac.webkit.org/changeset/179447

2:43 PM Changeset in webkit [179447] by Antti Koivisto
  • 2 edits in trunk/Source/WebKit2

Enable WebKit disk cache on OS X
https://bugs.webkit.org/show_bug.cgi?id=141022

Reviewed by Gavin Barraclough.

  • config.h: Flip the switch.
12:43 PM Changeset in webkit [179446] by Antti Koivisto
  • 3 edits in trunk/Source/WebKit2

OSObjectPtr does not work with dispatch_data_t on Maverics
https://bugs.webkit.org/show_bug.cgi?id=141081

Reviewed by Zalan Bujtas.

Previous attempt to special case dispatch_data_t in OSObjectPtr didn't work in all cases
probably due to the context sensitivity of the definition of the dispatch_data_t type.

For now, add DispatchPtr for the cache code and use it.

  • NetworkProcess/cache/NetworkCacheStorage.h:

(WebKit::DispatchPtr::DispatchPtr):
(WebKit::DispatchPtr::~DispatchPtr):
(WebKit::DispatchPtr::operator=):
(WebKit::DispatchPtr::get):
(WebKit::DispatchPtr::operator bool):
(WebKit::adoptDispatch):

  • NetworkProcess/cache/NetworkCacheStorageCocoa.mm:

(WebKit::NetworkCacheStorage::Data::Data):
(WebKit::NetworkCacheStorage::Data::data):
(WebKit::NetworkCacheStorage::NetworkCacheStorage):
(WebKit::createIOChannelForKey):
(WebKit::decodeEntry):
(WebKit::encodeEntryMetaData):
(WebKit::encodeEntry):

12:42 PM Changeset in webkit [179445] by weinig@apple.com
  • 3 edits
    1 move
    1 delete in trunk/Source/WebCore

Merge SimpleFontDataIOS.mm and SimpleFontDataMac.mm into FontCocoa.mm
https://bugs.webkit.org/show_bug.cgi?id=141101

Rubber-stamped by Dan Bernstein.

  • WebCore.xcodeproj/project.pbxproj:

Remove SimpleFontDataIOS.mm and SimpleFontDataMac.mm. Add FontCocoa.mm.

  • platform/graphics/Font.h:

Remove a few CG only functions from the header that can be implemented as static functions
in the implementation file.

  • platform/graphics/cocoa/FontCocoa.mm: Copied from Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm.

(WebCore::fontFamilyShouldNotBeUsedForArabic):
(WebCore::Font::platformInit):
(WebCore::Font::platformCharWidthInit):
(WebCore::Font::platformCreateScaledFont):
(WebCore::Font::determinePitch):
(WebCore::renderingStyle):
(WebCore::advanceForColorBitmapFont):
(WebCore::hasCustomTracking):
(WebCore::canUseFastGlyphAdvanceGetter):
(WebCore::Font::platformWidthForGlyph):
(WebCore::Font::compositeFontReferenceFont):
(WebCore::copyFontTableForTag): Deleted.
(WebCore::Font::renderingStyle): Deleted.
Merge in the iOS specific parts.

  • platform/graphics/ios/SimpleFontDataIOS.mm: Removed.
  • platform/graphics/mac/SimpleFontDataMac.mm: Removed.
12:30 PM Changeset in webkit [179444] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Regression(r179438) Simple line layout: ASSERTION at SimpleLineLayout::FlowContentsIterator::runWidth().
https://bugs.webkit.org/show_bug.cgi?id=141121

Reviewed by Antti Koivisto.

When a breakable text fragment does not fit the current line, we split it.
The first part stays on the current line, while the second part gets pushed to the next line.
In certain cases, the first part could end up being empty.
This patch ensures that we don't measure empty fragments.

Covered by existing tests.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::splitFragmentToFitLine):

10:28 AM Changeset in webkit [179443] by commit-queue@webkit.org
  • 9 edits in trunk/Source

Unreviewed, rolling out r179426.
https://bugs.webkit.org/show_bug.cgi?id=141119

"caused a memory use regression" (Requested by Guest45 on
#webkit).

Reverted changeset:

"Use FastMalloc (bmalloc) instead of BlockAllocator for GC
pages"
https://bugs.webkit.org/show_bug.cgi?id=140900
http://trac.webkit.org/changeset/179426

10:12 AM Changeset in webkit [179442] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[Win] Unreviewed 64-bit build fix.

  • WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Correct symbol

definitions for 64-bit build.

9:43 AM Changeset in webkit [179441] by commit-queue@webkit.org
  • 4 edits in trunk

Unreviewed, rolling out r179408.
https://bugs.webkit.org/show_bug.cgi?id=141117

This didn't fully fix the issue (Requested by anttik on
#webkit).

Reverted changeset:

"OSObjectPtr does not work with dispatch_data_t on Maverics"
https://bugs.webkit.org/show_bug.cgi?id=141081
http://trac.webkit.org/changeset/179408

3:24 AM Changeset in webkit [179440] by youenn.fablet@crf.canon.fr
  • 2 edits in trunk/Tools

https://trac.webkit.org/changeset/179439 breaks a python test
https://bugs.webkit.org/show_bug.cgi?id=141114

Unreviewed.

  • Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:

(WebPlatformTestServer._install_modules): Checks whether WPTModules file exists before reading it as no such file exists in mock tests.

1:46 AM Changeset in webkit [179439] by youenn.fablet@crf.canon.fr
  • 6 edits
    137 adds in trunk

Import W3C web platform tests infrastructure
https://bugs.webkit.org/show_bug.cgi?id=140934

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Initial import of the web-platform-tests repository.
This includes all infrastructure folders.
web-platform-tests submodules are downloaded when needed based on resources/WPTModules.

This patch also adds two tests from the domparsing folder to ensure
W3C test infrastructure works properly on WebKit bots.

  • resources/WPTModules: Added
  • web-platform-tests/.gitignore: Added.
  • web-platform-tests/_certs: Added.
  • web-platform-tests/common: Added.
  • web-platform-tests/config.default.json: Added.
  • web-platform-tests/fonts: Added.
  • web-platform-tests/images: Added.
  • web-platform-tests/resource: Added.
  • web-platform-tests/serve.py: Added.
  • web-platform-tests/tools: Added.
  • web-platform-tests/w3c-import.log: Added
  • web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt: Added.
  • web-platform-tests/domparsing/DOMParser-parseFromString-html.html: Added.
  • web-platform-tests/domparsing/insert-adjacent-expected.txt: Added.
  • web-platform-tests/domparsing/insert-adjacent.html: Added.
  • web-platform-tests/domparsing/w3c-import.log: Added.

Tools:

Loading necessary web platform tests modules before launching server.
Ensuring that some empty init.py files are present and create them if necessary.

  • Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py:
  • Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:

LayoutTests:

infrastructure folders. Added one line for a partially passing test.

Jan 30, 2015:

10:26 PM Changeset in webkit [179438] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Simple line layout: Improve FlowContentsIterator::TextFragment's encapsulation.
https://bugs.webkit.org/show_bug.cgi?id=141090

Reviewed by Andreas Kling.

Make members private to avoid accidental change in TextFragment.

No change in functionality.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::LineState::addFragment):
(WebCore::SimpleLineLayout::LineState::addWhitespace):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::firstFragment):
(WebCore::SimpleLineLayout::createLineRuns):

  • rendering/SimpleLineLayoutFlowContentsIterator.cpp:

(WebCore::SimpleLineLayout::FlowContentsIterator::nextTextFragment):

  • rendering/SimpleLineLayoutFlowContentsIterator.h:

(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::start):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::end):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::width):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::type):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::isCollapsed):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::isBreakable):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::isEmpty):

9:27 PM Changeset in webkit [179437] by Brent Fulgham
  • 2 edits in trunk/Tools

[Win] Another unreviewed test fix.

Correct copy/paste error in buildbot handling.

  • Scripts/webkitpy/layout_tests/servers/apache_http_server.py:

(LayoutTestApacheHttpd.init):
(LayoutTestApacheHttpd._get_apache_config_file_path):

8:59 PM Changeset in webkit [179436] by Brent Fulgham
  • 2 edits in trunk/Tools

[Win] Unreviewed test fix.

Correct path handling based on failures on test bots to get things running again.

  • Scripts/webkitpy/layout_tests/servers/apache_http_server.py:

(LayoutTestApacheHttpd.init):
(LayoutTestApacheHttpd._get_apache_config_file_path):

7:37 PM Changeset in webkit [179435] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Simple line layout: Make LineState fragment handling simpler.
https://bugs.webkit.org/show_bug.cgi?id=141100

Reviewed by Andreas Kling.

New fragments are appeneded to the Run's last entry
instead of accumulating them until after a new run is required.
(whitespace collapse or line end)
LineState::appendFragment manages whitespace collapsing now.
This makes createLineRuns() logic lighter and no need to "flush"
the LineState when the line ends.

No change in functionality.

  • rendering/SimpleLineLayout.cpp: Make LineState members private and introduce getters.

(WebCore::SimpleLineLayout::LineState::setAvailableWidth):
(WebCore::SimpleLineLayout::LineState::setLogicalLeftOffset):
(WebCore::SimpleLineLayout::LineState::setOverflowedFragment):
(WebCore::SimpleLineLayout::LineState::availableWidth):
(WebCore::SimpleLineLayout::LineState::logicalLeftOffset):
(WebCore::SimpleLineLayout::LineState::overflowedFragment):
(WebCore::SimpleLineLayout::LineState::hasTrailingWhitespace):
(WebCore::SimpleLineLayout::LineState::isWhitespaceOnly):
(WebCore::SimpleLineLayout::LineState::fits):
(WebCore::SimpleLineLayout::LineState::firstCharacterFits):
(WebCore::SimpleLineLayout::LineState::width):
(WebCore::SimpleLineLayout::LineState::appendFragment): Append each fragment to the Run
by either creating a new run or expanding the last one.
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace): Remove trailing whitespace from
the Run's and reset the trailing whitespace variables.
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::updateLineConstrains):
(WebCore::SimpleLineLayout::firstFragment):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::LineState::createRun): Deleted.
(WebCore::SimpleLineLayout::LineState::addFragment): Deleted.
(WebCore::SimpleLineLayout::LineState::addWhitespace): Deleted.
(WebCore::SimpleLineLayout::LineState::hasWhitespaceOnly): Deleted.

7:06 PM Changeset in webkit [179434] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Drop HistoryItem's m_prev / m_next
https://bugs.webkit.org/show_bug.cgi?id=141105

Reviewed by Zalan Bujtas.

Drop HistoryItem's m_prev / m_next. Those are no longer needed after
the PageCache refactoring in <http://trac.webkit.org/r179347>.

  • history/HistoryItem.cpp:

(WebCore::HistoryItem::HistoryItem):

  • history/HistoryItem.h:
6:23 PM Changeset in webkit [179433] by commit-queue@webkit.org
  • 4 edits in trunk/Source/JavaScriptCore

Clean up: Remove unnecessary <dispatch/dispatch.h> header from RemoteInspectorDebuggableConnection.h
https://bugs.webkit.org/show_bug.cgi?id=141067

Patch by Daniel Bates <dabates@apple.com> on 2015-01-30
Reviewed by Timothy Hatcher.

Remove the header <dispatch/dispatch.h> from RemoteInspectorDebuggableConnection.h as we
do not make use of its functionality. Instead, include this header in RemoteInspectorDebuggableConnection.mm
and RemoteInspector.mm. The latter depended on <dispatch/dispatch.h> being included via
header RemoteInspectorDebuggableConnection.h.

  • inspector/remote/RemoteInspector.mm: Include header <dispatch/dispatch.h>.
  • inspector/remote/RemoteInspectorDebuggableConnection.h: Remove header <dispatch/dispatch.h>.
  • inspector/remote/RemoteInspectorDebuggableConnection.mm: Include header <dispatch/dispatch.h>.
6:09 PM Changeset in webkit [179432] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Update the comment in RenderLayer for clarity as related code location is changed
https://bugs.webkit.org/show_bug.cgi?id=141103

Patch by Jeongmin Kim <jm86.kim@lge.com> on 2015-01-30
Reviewed by Simon Fraser.

Update the comment in RenderLayer for clarity as related code location is changed
The repainting in implicitClose() that is now called in setVisualUpdatesAllowed(bool) is removed

  • rendering/RenderLayer.cpp:

(WebCore::shouldSuppressPaintingLayer):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateCompositingLayers):

5:39 PM Changeset in webkit [179431] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Optimize MemoryCache::getSessionMap() a bit
https://bugs.webkit.org/show_bug.cgi?id=141069

Reviewed by Anders Carlsson.

Optimize MemoryCache::getSessionMap() a bit by doing 1 HashMap lookup
instead of previously 3. Also rename the method to
ensureSessionResourceMap() as we usually don't use "get" prefix for
getters and the implementation will also create the HashMap value if
the key is not found.

Also add a alternative sessionResourceMap() method which returns
the HashMap value if the key exists but doesn't try to create it if
missing. This is actually what we really want for some call sites.

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::add):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequest):
(WebCore::MemoryCache::removeImageFromCache):
(WebCore::MemoryCache::remove):
(WebCore::MemoryCache::getSessionMap): Deleted.

  • loader/cache/MemoryCache.h:
5:28 PM Changeset in webkit [179430] by timothy_horton@apple.com
  • 11 edits
    1 add in trunk/Source/WebKit2

Add and hook up APINavigationClient
https://bugs.webkit.org/show_bug.cgi?id=140698

Reviewed by Sam Weinig.

Add a single APINavigationClient that NavigationState implements and
WebPageProxy prefers over APILoaderClient and APIPolicyClient.

  • UIProcess/API/APILoaderClient.h:

Fix a comment.

  • UIProcess/API/APINavigationClient.h: Added.

APINavigationClient is the union of NavigationState's overrides of APILoaderClient and APIPolicyClient.
Names are adjusted to more closely match the Modern API.

  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

Instead of having policy and loader clients, NavigationState has a single navigation client.
Adjust as necessary.

Move as much logic as possible (isMainFrame checks, construction of API objects) out of here
and into WebPageProxy.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView initWithFrame:configuration:]):
Install the aforementioned single navigation client.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setNavigationClient):
Add a navigation client setter.

For all policy and loader client calls, if we have a navigation client, use that;
otherwise, fall back on the policy and loader clients.

  • UIProcess/WebPageProxy.h:
  • WebKit2.xcodeproj/project.pbxproj:
5:23 PM Changeset in webkit [179429] by Yusuke Suzuki
  • 52 edits
    7 copies
    7 moves
    18 adds
    2 deletes in trunk

Implement ES6 Symbol
https://bugs.webkit.org/show_bug.cgi?id=140435

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This patch implements ES6 Symbol. In this patch, we don't support
Symbol.keyFor, Symbol.for, Object.getOwnPropertySymbols. They will be
supported in the subsequent patches.

Since ES6 Symbol is introduced as new primitive value, we implement
Symbol as a derived class from JSCell. And now JSValue accepts Symbol*
as a new primitive value.

Symbol has a *unique* flagged StringImpl* as an uid. Which pointer
value represents the Symbol's identity. So don't compare Symbol's
JSCell pointer value for comparison.
This enables re-producing Symbol primitive value from StringImpl* uid
by executingSymbol::create(vm, uid). This is needed to produce
Symbol primitive values from stored StringImpl* in Object.getOwnPropertySymbols.

And Symbol.Description? is folded into the string value of Symbol's uid.
By doing so, we can represent ES6 Symbol without extending current PropertyTable key; StringImpl*.

(JSC::BuiltinExecutables::createBuiltinExecutable):

  • builtins/BuiltinNames.h:
  • dfg/DFGOperations.cpp:

(JSC::DFG::operationPutByValInternal):

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::subtype):

  • interpreter/Interpreter.cpp:
  • jit/JITOperations.cpp:

(JSC::getByVal):

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::getByVal):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • runtime/CommonIdentifiers.h:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::opIn):

  • runtime/ExceptionHelpers.cpp:

(JSC::createUndefinedVariableError):

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::synthesizePrototype):
(JSC::JSValue::dumpInContextAssumingStructure):
(JSC::JSValue::toStringSlowCase):

  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::isSymbol):
(JSC::JSValue::isPrimitive):
(JSC::JSValue::toPropertyKey):

It represents ToPropertyKey abstract operation in the ES6 spec.
It cleans up the old implementation's isName checks.
And to prevent performance regressions in

js/regress/fold-get-by-id-to-multi-get-by-offset-rare-int.html
js/regress/fold-get-by-id-to-multi-get-by-offset.html

we annnotate this function as ALWAYS_INLINE.

(JSC::JSValue::getPropertySlot):
(JSC::JSValue::get):
(JSC::JSValue::equalSlowCaseInline):
(JSC::JSValue::strictEqualSlowCaseInline):

  • runtime/JSCell.cpp:

(JSC::JSCell::put):
(JSC::JSCell::putByIndex):
(JSC::JSCell::toPrimitive):
(JSC::JSCell::getPrimitiveNumber):
(JSC::JSCell::toNumber):
(JSC::JSCell::toObject):

  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::isSymbol):
(JSC::JSCell::toBoolean):
(JSC::JSCell::pureToBoolean):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::symbolPrototype):
(JSC::JSGlobalObject::symbolObjectStructure):

  • runtime/JSONObject.cpp:

(JSC::Stringifier::Stringifier):

  • runtime/JSSymbolTableObject.cpp:

(JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):

  • runtime/JSType.h:
  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::isName): Deleted.

  • runtime/MapData.cpp:

(JSC::MapData::find):
(JSC::MapData::add):
(JSC::MapData::remove):
(JSC::MapData::replaceAndPackBackingStore):

  • runtime/MapData.h:

(JSC::MapData::clear):

  • runtime/NameInstance.h: Removed.
  • runtime/NamePrototype.cpp: Removed.
  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorDefineProperty):

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):
(JSC::objectProtoFuncPropertyIsEnumerable):

  • runtime/Operations.cpp:

(JSC::jsTypeStringForValue):
(JSC::jsIsObjectType):

  • runtime/PrivateName.h:

(JSC::PrivateName::PrivateName):
(JSC::PrivateName::operator==):
(JSC::PrivateName::operator!=):

  • runtime/PropertyMapHashTable.h:

(JSC::PropertyTable::find):
(JSC::PropertyTable::get):

  • runtime/PropertyName.h:

(JSC::PropertyName::PropertyName):
(JSC::PropertyName::publicName):

  • runtime/SmallStrings.h:
  • runtime/StringConstructor.cpp:

(JSC::callStringConstructor):

In ES6, String constructor accepts Symbol to execute String(symbol).

  • runtime/Structure.cpp:

(JSC::Structure::getPropertyNamesFromStructure):

  • runtime/StructureInlines.h:

(JSC::Structure::prototypeForLookup):

  • runtime/Symbol.cpp: Added.

(JSC::Symbol::Symbol):
(JSC::SymbolObject::create):
(JSC::Symbol::toPrimitive):
(JSC::Symbol::toBoolean):
(JSC::Symbol::getPrimitiveNumber):
(JSC::Symbol::toObject):
(JSC::Symbol::toNumber):
(JSC::Symbol::destroy):
(JSC::Symbol::descriptiveString):

  • runtime/Symbol.h: Added.

(JSC::Symbol::createStructure):
(JSC::Symbol::create):
(JSC::Symbol::privateName):
(JSC::Symbol::finishCreation):
(JSC::asSymbol):

  • runtime/SymbolConstructor.cpp: Renamed from Source/JavaScriptCore/runtime/NameConstructor.cpp.

(JSC::SymbolConstructor::SymbolConstructor):
(JSC::SymbolConstructor::finishCreation):
(JSC::callSymbol):
(JSC::SymbolConstructor::getConstructData):
(JSC::SymbolConstructor::getCallData):

  • runtime/SymbolConstructor.h: Renamed from Source/JavaScriptCore/runtime/NameConstructor.h.

(JSC::SymbolConstructor::create):
(JSC::SymbolConstructor::createStructure):

  • runtime/SymbolObject.cpp: Renamed from Source/JavaScriptCore/runtime/NameInstance.cpp.

(JSC::SymbolObject::SymbolObject):
(JSC::SymbolObject::finishCreation):
(JSC::SymbolObject::defaultValue):

Now JSC doesn't support @@toPrimitive. So instead of it, we implement
Symbol.prototype[@@toPrimitive] as ES5 Symbol.DefaultValue?.

  • runtime/SymbolObject.h: Added.

(JSC::SymbolObject::create):
(JSC::SymbolObject::internalValue):
(JSC::SymbolObject::createStructure):

  • runtime/SymbolPrototype.cpp: Added.

(JSC::SymbolPrototype::SymbolPrototype):
(JSC::SymbolPrototype::finishCreation):
(JSC::SymbolPrototype::getOwnPropertySlot):
(JSC::symbolProtoFuncToString):
(JSC::symbolProtoFuncValueOf):

  • runtime/SymbolPrototype.h: Renamed from Source/JavaScriptCore/runtime/NamePrototype.h.

(JSC::SymbolPrototype::create):
(JSC::SymbolPrototype::createStructure):

SymbolPrototype object is ordinary JS object. Not wrapper object of Symbol.
It is tested in js/symbol-prototype-is-ordinary-object.html.

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Source/WTF:

Introduce new unique string mechanizm into StringImpl.
It is used for implementing Symbol which holds a Description? value.

  • wtf/text/AtomicString.h:

(WTF::AtomicString::add):
(WTF::AtomicString::addWithStringTableProvider):

Previously, we checked isAtomic() or !length(). This guard can filter out EmptyUnique.
But now, we introduced new unique StringImpl. Since it has an actual string value, we need to check isUnique().

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::~StringImpl):
(WTF::StringImpl::createUnique):

In createUnique, we leverage Substring mechanizm to produce a new unique
string from an existing string.

  • wtf/text/StringImpl.h:

(WTF::StringImpl::StringImpl):
(WTF::StringImpl::createUniqueEmpty):
(WTF::StringImpl::flagIsUnique):
(WTF::StringImpl::isUnique):
(WTF::StringImpl::setIsAtomic):
(WTF::StringImpl::createEmptyUnique): Deleted.
(WTF::StringImpl::isEmptyUnique): Deleted.

Instead of EmptyUnique, we introduced new flag to StringImpl, isUnique.
While EmptyUnique cannot hold any string values except for empty string,
the unique StringImpl can hold any String values.
We fold the Symbol's descriptiveString value here.

  • wtf/text/StringStatics.cpp:

(WTF::StringImpl::hashAndFlagsForUnique):
(WTF::StringImpl::hashAndFlagsForEmptyUnique): Deleted.

LayoutTests:

  • js/script-tests/symbol-abstract-equality-comparison.js: Added.

(Pair):
(relationalOperators.forEach):

  • js/script-tests/symbol-abstract-relational-comparison.js: Added.

(relationalOperators.forEach):

  • js/script-tests/symbol-in-map.js: Added.

(set shouldBe):

  • js/script-tests/symbol-object.js: Added.
  • js/script-tests/symbol-prototype-is-ordinary-object.js: Added.
  • js/script-tests/symbol-strict-equality-comparison.js: Added.

(Pair):
(relationalOperators.forEach):

  • js/script-tests/symbol-tostring.js: Added.
  • js/script-tests/symbols.js: Renamed from LayoutTests/js/script-tests/names.js.

(forIn):

  • js/symbol-abstract-equality-comparison-expected.txt: Added.
  • js/symbol-abstract-equality-comparison.html: Copied from LayoutTests/js/names.html.
  • js/symbol-abstract-relational-comparison-expected.txt: Added.
  • js/symbol-abstract-relational-comparison.html: Copied from LayoutTests/js/names.html.
  • js/symbol-in-map-expected.txt: Added.
  • js/symbol-in-map.html: Copied from LayoutTests/js/names.html.
  • js/symbol-object-expected.txt: Added.
  • js/symbol-object.html: Copied from LayoutTests/js/names.html.
  • js/symbol-prototype-is-ordinary-object-expected.txt: Added.
  • js/symbol-prototype-is-ordinary-object.html: Copied from LayoutTests/js/names.html.
  • js/symbol-strict-equality-comparison-expected.txt: Added.
  • js/symbol-strict-equality-comparison.html: Copied from LayoutTests/js/names.html.
  • js/symbol-tostring-expected.txt: Added.
  • js/symbol-tostring.html: Copied from LayoutTests/js/names.html.
  • js/symbols-expected.txt: Renamed from LayoutTests/js/names-expected.txt.
  • js/symbols.html: Renamed from LayoutTests/js/names.html.
5:22 PM Changeset in webkit [179428] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed. Remove outdated comment.

  • loader/cache/MemoryCache.cpp:
4:58 PM Changeset in webkit [179427] by eric.carlson@apple.com
  • 5 edits
    1 delete in trunk/Source

Remove MediaPlayerProxy.h
https://bugs.webkit.org/show_bug.cgi?id=141087

Reviewed by Sam Weinig.

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj: Remove reference to MediaPlayerProxy.h.
  • platform/graphics/mac/MediaPlayerProxy.h: Removed.

Source/WebKit/mac:

  • MigrateHeaders.make: Don't need to copy MediaPlayerProxy.h.
  • Plugins/WebPluginController.mm: Don't include MediaPlayerProxy.h.
4:51 PM Changeset in webkit [179426] by ggaren@apple.com
  • 9 edits in trunk/Source

Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
https://bugs.webkit.org/show_bug.cgi?id=140900

Reviewed by Mark Hahnenberg.

Re-landing just the HandleBlock piece of this patch.

Source/JavaScriptCore:

  • heap/HandleBlock.h:
  • heap/HandleBlockInlines.h:

(JSC::HandleBlock::create):
(JSC::HandleBlock::destroy):
(JSC::HandleBlock::HandleBlock):
(JSC::HandleBlock::payloadEnd):

  • heap/HandleSet.cpp:

(JSC::HandleSet::~HandleSet):
(JSC::HandleSet::grow):

Source/WebCore:

  • platform/cocoa/MemoryPressureHandlerCocoa.mm:

(WebCore::MemoryPressureHandler::install):

Source/WTF:

  • wtf/FastMalloc.cpp:

(WTF::fastAlignedMalloc):
(WTF::fastAlignedFree):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):

  • wtf/FastMalloc.h:
4:40 PM Changeset in webkit [179425] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

[EFL] Gardening: update some accessibility tests as failed
https://bugs.webkit.org/show_bug.cgi?id=141034

Unreviewed EFL gardening.

Patch by Dariusz Frankiewicz <Dariusz Frankiewicz> on 2015-01-30

  • platform/efl/TestExpectations:
  • platform/efl/accessibility/roles-exposed-expected.txt:

update expectation after bumping ATK to 2.15.2

4:39 PM Changeset in webkit [179424] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Call vsnprintf instead of _vsnprintf in vprintf_stderr_common
https://bugs.webkit.org/show_bug.cgi?id=141078

In windows _vsnprintf api does not place null character
automatically. Simply replace it with vsnprintf. Which is
polyfill to call wtf_vsnprintf in windows.

Patch by Namhoon Kim <yanhkim@gmail.com> on 2015-01-30
Reviewed by Brent Fulgham.

  • wtf/Assertions.cpp:
4:37 PM Changeset in webkit [179423] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[EFL] Mark test css3/masking/mask-repeat-space-padding.html as passing
https://bugs.webkit.org/show_bug.cgi?id=141077

Unreviewed EFL gardening.

Patch by Piotr Pajak <p.pajak@samsung.com> on 2015-01-30

  • platform/efl/TestExpectations:
4:29 PM Changeset in webkit [179422] by ggaren@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

GC marking threads should clear malloc caches
https://bugs.webkit.org/show_bug.cgi?id=141097

Reviewed by Sam Weinig.

Follow-up based on Mark Hahnenberg's review: Release after the copy
phase, rather than after any phase, since we'd rather not release
between marking and copying.

  • heap/GCThread.cpp:

(JSC::GCThread::waitForNextPhase):
(JSC::GCThread::gcThreadMain):

4:04 PM Changeset in webkit [179421] by Chris Dumez
  • 16 edits in trunk/Source

Update MemoryCache code to use more references instead of pointers
https://bugs.webkit.org/show_bug.cgi?id=141099

Reviewed by Andreas Kling.
Source/WebKit2:

  • WebProcess/ResourceCache/WebResourceCacheManager.cpp:

(WebKit::WebResourceCacheManager::clearCacheForOrigin):

3:58 PM Changeset in webkit [179420] by bshafiei@apple.com
  • 1 copy in tags/Safari-600.1.4.15.3

New tag.

3:56 PM Changeset in webkit [179419] by Brian Burg
  • 4 edits in trunk/Source

Web Inspector: ASSERT in InspectorTimelineAgent::internalStop
https://bugs.webkit.org/show_bug.cgi?id=141039

Reviewed by Timothy Hatcher.

Source/WebCore:

Don't unconditionally stop the environment stopwatch, since it could have
already stopped due to the debugger pausing.

  • inspector/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::internalStop):

Source/WTF:

Add messages to Stopwatch assertions, and clean up constructor.

  • wtf/Stopwatch.h:

(WTF::Stopwatch::Stopwatch):
(WTF::Stopwatch::start):
(WTF::Stopwatch::stop):

3:56 PM Changeset in webkit [179418] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Remote Web Inspector should not show undock toolbar buttons
https://bugs.webkit.org/show_bug.cgi?id=141061

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2015-01-30
Reviewed by Timothy Hatcher.

  • UserInterface/Base/Main.js:

(WebInspector.contentLoaded):
Be sure to update the toolbar's dock navigation icons because they
may need to be hidden (the default state).

3:55 PM Changeset in webkit [179417] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[EFL] Rebaseline efl/js/dom/global-constructors-attributes-expected.txt
https://bugs.webkit.org/show_bug.cgi?id=141029

Unreviewed EFL gardening

Patch by Karol Pawlowski <k.pawlowski@samsung.com> on 2015-01-30

  • platform/efl/js/dom/global-constructors-attributes-expected.txt:
3:32 PM Changeset in webkit [179416] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Add match_constness<Reference, T> helper struct
https://bugs.webkit.org/show_bug.cgi?id=140905

Reviewed by Benjamin Poulain.

Add match_constness<Reference, T> helper struct to simplify downcast<>()
a bit. The purpose of this helper is to update T's constness to match
Reference's.

  • wtf/TypeCasts.h:

(WTF::downcast):

3:25 PM Changeset in webkit [179415] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Add assertion in RefPtr's operator*() to make sure we don't dereference nullptr
https://bugs.webkit.org/show_bug.cgi?id=141092

Reviewed by Anders Carlsson.

Add assertion in RefPtr's operator*() to make sure we don't dereference
nullptr.

  • wtf/RefPtr.h:

(WTF::RefPtr::operator*):

3:13 PM Changeset in webkit [179414] by Chris Dumez
  • 2 edits in trunk/Tools

Unreviewed. Fix Windows build after r179409.

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::notifyDone):
(TestRunner::queueLoad):

2:54 PM Changeset in webkit [179413] by Chris Dumez
  • 5 edits
    2 adds in trunk

When no background-size is specified on the 2nd background layer, it takes the first instead of the initial value
https://bugs.webkit.org/show_bug.cgi?id=141059

Reviewed by Antti Koivisto.

Source/WebCore:

This patch fixes fill size support for 'initial' value.

Test: fast/css/background-layers-initial-size.html

  • css/CSSToStyleMap.cpp:
  • Add check for initial values and set fill size to initialFillSize() in this case (which is 'auto'). Previously, we were handling all non CSSPrimitiveValues the same way and setting the fill size type to SizeNone, which means no size (not 'auto').
  • Clean up the rest of the function (no behavior change).
  • rendering/style/FillLayer.cpp:

(WebCore::FillLayer::FillLayer):

  • Initialize m_sizeLength to SizeNone instead of calling initialFillSizeType(). There is no behavior change here. However, initialFillSizeType() was not supposed to return SizeNone.
  • Stop explicitly initializing m_sizeLength to LengthSize() as this is already what happens implicitly.
  • rendering/style/FillLayer.h:

(WebCore::FillLayer::initialFillSize):
Return FillSize() instead of FillSize(SizeNone, LengthSize()).
FillSize() is equivalent to FillSize(SizeLength, LengthSize())
which is resolved to 'auto'. SizeNone means no size which isn't
what we want as an initial value.

(WebCore::FillLayer::initialFillSizeType): Deleted.
(WebCore::FillLayer::initialFillSizeLength): Deleted.
Remove Individual initialFillSizeType() / initialFillSizeLength()
functions now that all caller use initialFillSize() instead.

LayoutTests:

Add layout test to cover the case where we have 2 background layers, with an explicit
size only for the first one.

  • fast/css/background-layers-initial-size-expected.txt: Added.
  • fast/css/background-layers-initial-size.html: Added.
2:27 PM Changeset in webkit [179412] by ggaren@apple.com
  • 6 edits in trunk/Source

GC marking threads should clear malloc caches
https://bugs.webkit.org/show_bug.cgi?id=141097

Reviewed by Andreas Kling.

Split the scavenging API into per-thread vs global, so that you can
request to scavenge your own thread without scavenging the whole heap.

Source/bmalloc:

  • bmalloc/Cache.cpp:

(bmalloc::Cache::scavenge):

  • bmalloc/bmalloc.h:

(bmalloc::api::scavengeThisThread):
(bmalloc::api::scavenge):

Source/WTF:

  • wtf/FastMalloc.cpp:

(WTF::releaseFastMallocFreeMemoryForThisThread):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):

  • wtf/FastMalloc.h:
2:22 PM Changeset in webkit [179411] by ggaren@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

GC marking threads should clear malloc caches
https://bugs.webkit.org/show_bug.cgi?id=141097

Reviewed by Andreas Kling.

This is an attempt to ameliorate a potential memory use regression
caused by https://bugs.webkit.org/show_bug.cgi?id=140900
Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages.

FastMalloc may accumulate a per-thread cache on each of the 8-ish
GC marking threads, which can be expensive.

  • heap/GCThread.cpp:

(JSC::GCThread::waitForNextPhase): Scavenge the current thread before
going to sleep. There's probably not too much value to keeping our
per-thread cache between GCs, and it has some memory footprint.

2:00 PM Changeset in webkit [179410] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Unreviewed, rolling out r179403.
https://bugs.webkit.org/show_bug.cgi?id=141091

Broke fast/files/workers/worker-apply-blob-url-to-xhr.html
(Requested by ap_ on #webkit).

Reverted changeset:

"Optimize MemoryCache::getSessionMap() a bit"
https://bugs.webkit.org/show_bug.cgi?id=141069
http://trac.webkit.org/changeset/179403

Patch by Commit Queue <commit-queue@webkit.org> on 2015-01-30

1:57 PM WebReplayMechanics created by Brian Burg
Import from Github gist.
1:39 PM WikiStart edited by Brian Burg
(diff)
12:49 PM Changeset in webkit [179409] by Chris Dumez
  • 281 edits in trunk

Rename shared() static member functions to singleton() for singleton classes.
https://bugs.webkit.org/show_bug.cgi?id=141088

Reviewed by Ryosuke Niwa and Benjamin Poulain.

Rename shared() static member functions to singleton() for singleton
classes as per the recent coding style change.
Source/JavaScriptCore:

  • inspector/remote/RemoteInspector.h:
  • inspector/remote/RemoteInspector.mm:

(Inspector::RemoteInspector::singleton):
(Inspector::RemoteInspector::start):
(Inspector::RemoteInspector::shared): Deleted.

  • inspector/remote/RemoteInspectorDebuggable.cpp:

(Inspector::RemoteInspectorDebuggable::~RemoteInspectorDebuggable):
(Inspector::RemoteInspectorDebuggable::init):
(Inspector::RemoteInspectorDebuggable::update):
(Inspector::RemoteInspectorDebuggable::setRemoteDebuggingAllowed):
(Inspector::RemoteInspectorDebuggable::pauseWaitingForAutomaticInspection):
(Inspector::RemoteInspectorDebuggable::unpauseForInitializedInspector):

  • inspector/remote/RemoteInspectorDebuggableConnection.mm:

(Inspector::RemoteInspectorDebuggableConnection::setup):
(Inspector::RemoteInspectorDebuggableConnection::sendMessageToFrontend):

Source/WebKit:

  • Storage/WebDatabaseProvider.cpp:

(WebDatabaseProvider::singleton):
(WebDatabaseProvider::shared): Deleted.

  • Storage/WebDatabaseProvider.h:
12:46 PM Changeset in webkit [179408] by Antti Koivisto
  • 4 edits in trunk

OSObjectPtr does not work with dispatch_data_t on Maverics
https://bugs.webkit.org/show_bug.cgi?id=141081

Reviewed by Pratik Solanki.
Source/WTF:


Trying to use OSObjectPtr<dispatch_data_t> throws

-[OS_dispatch_data _xref_dispose]: unrecognized selector sent to instance 0

  • wtf/OSObjectPtr.h:

(WTF::retainOSObject<dispatch_data_t>):
(WTF::releaseOSObject<dispatch_data_t>):

Add specialization for dispatch_data_t on Maverics.

Tools:

  • TestWebKitAPI/Tests/WTF/darwin/OSObjectPtr.cpp:

(TestWebKitAPI::TEST):

11:57 AM Changeset in webkit [179407] by ggaren@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
https://bugs.webkit.org/show_bug.cgi?id=140900

Reviewed by NOBODY (OOPS!).

Re-landing just the CopyWorkListSegment piece of this patch.

  • heap/CopiedBlockInlines.h:

(JSC::CopiedBlock::reportLiveBytes):

  • heap/CopyWorkList.h:

(JSC::CopyWorkListSegment::create):
(JSC::CopyWorkListSegment::destroy):
(JSC::CopyWorkListSegment::CopyWorkListSegment):
(JSC::CopyWorkList::CopyWorkList):
(JSC::CopyWorkList::~CopyWorkList):
(JSC::CopyWorkList::append):

11:09 AM Changeset in webkit [179406] by mmirman@apple.com
  • 5 edits in trunk

Source/WebCore:
Added ClientRect as an interface that requires attributes
on instance for compatibility.
https://bugs.webkit.org/show_bug.cgi?id=141063
<rdar://problem/18437653>

Reviewed by Oliver Hunt.

Added a new test to LayoutTests/js/resources/JSON-stringify.js

  • bindings/scripts/CodeGeneratorJS.pm:

(InterfaceRequiresAttributesOnInstanceForCompatibility):

LayoutTests:
Added a test for JSON.stringify on ClientRect.
https://bugs.webkit.org/show_bug.cgi?id=141063
<rdar://problem/18437653>

Reviewed by Oliver Hunt.

  • js/resources/JSON-stringify.js:

(createTests.var):
(createTests.result):

  • js/resources/JSON-stringify-expected.txt:
10:26 AM Changeset in webkit [179405] by Brent Fulgham
  • 10 edits
    1 add in trunk

[Win] Switch to Apache on Windows
https://bugs.webkit.org/show_bug.cgi?id=141060

Reviewed by Alexey Proskuryakov.

Tools:

Update our scripts under Windows (and Cygwin) to locate and use
the XAMPP installation of Apache for running tests.

  • Scripts/run-webkit-httpd:
  • Scripts/webkitperl/httpd.pm:

(getHTTPDPath):
(getDefaultConfigForTestDirectory):
(getHTTPDConfigPathForTestDirectory):

  • Scripts/webkitpy/common/system/executive_unittest.py:

(ExecutiveTest.serial_test_kill_process):

  • Scripts/webkitpy/layout_tests/servers/apache_http_server.py:

(LayoutTestApacheHttpd.init):
(LayoutTestApacheHttpd._get_apache_config_file_path):
(LayoutTestApacheHttpd._stop_running_server):

  • Scripts/webkitpy/layout_tests/servers/http_server_base.py:

(HttpServerBase._is_server_running_on_all_ports):

  • Scripts/webkitpy/port/base.py:

(Port._apache_config_file_name_for_platform):

  • Scripts/webkitpy/port/port_testcase.py:

(test_apache_config_file_name_for_platform):

  • Scripts/webkitpy/port/win.py:

(WinPort.show_results_html_file):
(WinPort._uses_apache):
(WinPort):
(WinPort._path_to_apache):

LayoutTests:

Add a new Windows XAMPP Apache configuration file for running
the http test suite on Windows.

Reviewed by Alexey Proskuryakov.

  • http/conf/apache2.4-httpd-win.conf: Added.
10:08 AM Changeset in webkit [179404] by ap@apple.com
  • 3 edits in trunk/Source/WebKit2

Build fix.

  • Shared/API/c/WKDeprecatedFunctions.cpp:
  • UIProcess/API/C/WKPreferencesRefPrivate.h:

The screen font substitution functions still need to be present in the header.

9:43 AM Changeset in webkit [179403] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Optimize MemoryCache::getSessionMap() a bit
https://bugs.webkit.org/show_bug.cgi?id=141069

Reviewed by Anders Carlsson.

Optimize MemoryCache::getSessionMap() a bit by doing 1 HashMap lookup
instead of previously 3. Also rename the method to sessionResources()
as we usually don't use "get" prefix for getters.

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::sessionResources):
(WebCore::MemoryCache::add):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequest):
(WebCore::MemoryCache::removeImageFromCache):
(WebCore::MemoryCache::remove):
(WebCore::MemoryCache::getSessionMap): Deleted.

  • loader/cache/MemoryCache.h:
9:40 AM Changeset in webkit [179402] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Store MemoryCache's live decoded resources in a ListHashSet
https://bugs.webkit.org/show_bug.cgi?id=141051

Reviewed by Antti Koivisto.

Store MemoryCache's live decoded resources in a ListHashSet instead of
a linked list. The frequent operations are:

  1. Add items to one end
  2. Remove items from the other end or anywhere in the container by value

Using a ListHashSet instead of a manual linked list results in *much*
simpler / shorter code and is fast for all operations (faster than
linked list even for removing an given element from the container given
its value). The previous implementation required us to keep a lot of
pointers up-to-date, which was error prone.

This is a first step towards simplifying the MemoryCache implementation.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::setDecodedSize):
(WebCore::CachedResource::didAccessDecodedData):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::inLiveDecodedResourcesList): Deleted.

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::pruneLiveResourcesToSize):
(WebCore::MemoryCache::removeFromLiveDecodedResourcesList):
(WebCore::MemoryCache::insertInLiveDecodedResourcesList):

  • loader/cache/MemoryCache.h:

(WebCore::MemoryCache::inLiveDecodedResourcesList):

9:38 AM Changeset in webkit [179401] by Chris Dumez
  • 2 edits in trunk/Websites/webkit.org

Add "Singleton pattern" section to the WebKit coding style
https://bugs.webkit.org/show_bug.cgi?id=141040

Reviewed by Ryosuke Niwa.

Add "Singleton pattern" section to the WebKit coding style to document
what was discussed on webkit-dev:
https://lists.webkit.org/pipermail/webkit-dev/2015-January/027199.html

  • coding/coding-style.html:
9:22 AM Changeset in webkit [179400] by ddkilzer@apple.com
  • 2 edits in branches/safari-600.1.4.15-branch/LayoutTests

Fix lint warnings for ios-simulator (wk1) TestExpectations

  • platform/ios-simulator/TestExpectations: Remove tests that

don't exist on the branch or are duplicate expectations.

9:22 AM Changeset in webkit [179399] by ddkilzer@apple.com
  • 57 edits
    5 copies
    19 adds
    2 deletes in branches/safari-600.1.4.15-branch

run-webkit-tests: Merge 46 commits from trunk to make it work

r171686, r171687, r171789, r171800, r171967, r171968, r171969,
r172115, r172117, r172118, r172174, r172602, r172942, r172967,
r173129, r173452, r173647, r173937, r174406, r174626, r174628,
r174634, r174642, r174650, r174702, r174728, r174824, r174835,
r174844, r175204, r176669, r176677, r176872, r176880, r176885,
r176897, r177129, r177363, r177370, r177510, r178444, r178570,
r178601, r178656, r178867, r178925

5:56 AM Changeset in webkit [179398] by Csaba Osztrogonác
  • 31 edits in trunk/Source/WebCore

[cairo] Fix #if guards in platform/graphics/cairo directory
https://bugs.webkit.org/show_bug.cgi?id=141076

Reviewed by Sergio Villar Senin.

  • platform/graphics/cairo/BackingStoreBackendCairo.h:
  • platform/graphics/cairo/BitmapImageCairo.cpp:
  • platform/graphics/cairo/CairoUtilities.cpp:
  • platform/graphics/cairo/CairoUtilities.h:
  • platform/graphics/cairo/DrawErrorUnderline.h:
  • platform/graphics/cairo/DrawingBufferCairo.cpp:
  • platform/graphics/cairo/FloatRectCairo.cpp:
  • platform/graphics/cairo/FontCairo.cpp:
  • platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
  • platform/graphics/cairo/FontCustomPlatformData.h:
  • platform/graphics/cairo/GradientCairo.cpp:
  • platform/graphics/cairo/GraphicsContext3DCairo.cpp:
  • platform/graphics/cairo/GraphicsContextCairo.cpp:
  • platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
  • platform/graphics/cairo/ImageBufferCairo.cpp:
  • platform/graphics/cairo/ImageBufferDataCairo.h:
  • platform/graphics/cairo/ImageCairo.cpp:
  • platform/graphics/cairo/IntRectCairo.cpp:
  • platform/graphics/cairo/OwnPtrCairo.cpp:
  • platform/graphics/cairo/OwnPtrCairo.h:
  • platform/graphics/cairo/PathCairo.cpp:
  • platform/graphics/cairo/PatternCairo.cpp:
  • platform/graphics/cairo/PlatformContextCairo.cpp:
  • platform/graphics/cairo/PlatformContextCairo.h:
  • platform/graphics/cairo/PlatformPathCairo.cpp:
  • platform/graphics/cairo/PlatformPathCairo.h:
  • platform/graphics/cairo/RefPtrCairo.cpp:
  • platform/graphics/cairo/RefPtrCairo.h:
  • platform/graphics/cairo/TileCairo.h:
  • platform/graphics/cairo/TransformationMatrixCairo.cpp:

Jan 29, 2015:

11:38 PM Changeset in webkit [179397] by Carlos Garcia Campos
  • 5 edits in trunk/Source/WebKit2

[GTK] Resize the redirected XComposite again after leaving accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=140935

Reviewed by Sergio Villar Senin.

Since r178414 we don't resize the redirected XComposite window
until we enter accelerated compositing mode, but after leaving it
the redirected window keeps its size. We should resize it to 1x1
again and free the XPixmap and cairo surface to save that memory
while not in accelerated compositing mode.

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::enterAcceleratedCompositingMode): Notify
the WebKitWebViewBase.
(WebKit::PageClientImpl::exitAcceleratedCompositingMode): Ditto.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseEnterAcceleratedCompositingMode): Resize the
XComposite window to the current drawing area size.
(webkitWebViewBaseExitAcceleratedCompositingMode): Resize the
XComposite window to and empty size.

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/gtk/RedirectedXCompositeWindow.cpp:

(WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
Do not initialize m_size since we now handle the empty size as a
especial case. Make sure we always create the X window with at
least 1x1 size.
(WebKit::RedirectedXCompositeWindow::resize): Resize the window to
at least 1x1, but when en empty size is given, call
cleanupPixmapAndPixmapSurface() to release those resources.
(WebKit::RedirectedXCompositeWindow::surface): Create the cairo
surface with at least 1x1 size.

11:24 PM Changeset in webkit [179396] by saambarati1@gmail.com
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Allow text selection when the BasicBlockAnnotator is enabled
https://bugs.webkit.org/show_bug.cgi?id=140987

Reviewed by Timothy Hatcher.

Because the BasicBlockAnnotator no longer sets the background color of
lines that haven't executed to gray, text selection while the
BasicBlockAnnotator is enabled no longer results in a bad user interface.
This patch both allows text selection while the BasicBlockAnnotator is
enabled and also removes the now unused listeners to CodeMirror's focus
and blur events.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler.scrollHandler):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler):
(WebInspector.SourceCodeTextEditor.prototype.gainedFocus): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.lostFocus): Deleted.

  • UserInterface/Views/TextEditor.js:

(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.gainedFocus): Deleted.
(WebInspector.TextEditor.prototype.lostFocus): Deleted.

11:23 PM Changeset in webkit [179395] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit2

[GTK] Runtime critical warnings sometimes at start up when using the network process
https://bugs.webkit.org/show_bug.cgi?id=140998

Reviewed by Žan Doberšek.

This is caused by the CustomProtocolManager work queue
theread. This WorkQueue is created when the CustomProtocolManager
object is constructed, but destroyed when it's initialized when
the UI process asks to use the network process. In this case,
sometimes happens that the work queue thread that runs the main
loop is executed once the object has been destroyed and the main
loop pointer is nullptr.

  • Platform/WorkQueue.h:
  • Platform/gtk/WorkQueueGtk.cpp:

(WorkQueue::platformInitialize): Use a lambda function for the
thread body.
(WorkQueue::platformInvalidate): Detach the worker thread before
deleting the main loop object.
(WorkQueue::startWorkQueueThread): Deleted.
(WorkQueue::workQueueThreadBody): Deleted.

10:44 PM Changeset in webkit [179394] by Chris Dumez
  • 1 edit
    1 add in trunk/LayoutTests

Unreviewed. Further rebaselining after r179368.

  • platform/mac-mavericks/fast/forms/select-visual-hebrew-expected.txt: Added.
9:51 PM Changeset in webkit [179393] by gyuyoung.kim@samsung.com
  • 2 edits in trunk/LayoutTests

Unreviewed, gardening on EFL port. some tests aren't flaky anymore.
Unskip those tests on EFL port.

  • platform/efl/TestExpectations:
8:28 PM Changeset in webkit [179392] by akling@apple.com
  • 45 edits
    2 copies
    3 adds
    2 deletes in trunk/Source/JavaScriptCore

Unreviewed, rolling out r179357 and r179358.
https://bugs.webkit.org/show_bug.cgi?id=141062

Suspect this caused WebGL tests to start flaking (Requested by
kling on #webkit).

Reverted changesets:

"Polymorphic call inlining should be based on polymorphic call
inline caching rather than logging"
https://bugs.webkit.org/show_bug.cgi?id=140660
http://trac.webkit.org/changeset/179357

"Unreviewed, fix no-JIT build."
http://trac.webkit.org/changeset/179358

Patch by Commit Queue <commit-queue@webkit.org> on 2015-01-29

8:23 PM Changeset in webkit [179391] by Darin Adler
  • 18 edits
    25 deletes in trunk

Remove SVGUseElement.instanceRoot and all tests that depend on it
https://bugs.webkit.org/show_bug.cgi?id=141025

Reviewed by Anders Carlsson.

Source/WebCore:

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::instanceRoot): Deleted.

  • svg/SVGUseElement.h: Removed instanceRoot.
  • svg/SVGUseElement.idl: Ditto.

LayoutTests:

  • platform/gtk/TestExpectations: Removed expected failure for now-removed test.
  • platform/ios-simulator-wk2/TestExpectations: Ditto.
  • platform/mac/TestExpectations: Ditto.
  • platform/gtk/svg/custom/use-elementInstance-event-target-expected.png: Removed.
  • platform/gtk/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
  • platform/gtk/svg/custom/use-elementInstance-methods-expected.png: Removed.
  • platform/gtk/svg/custom/use-elementInstance-methods-expected.txt: Removed.
  • platform/ios-sim-deprecated/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
  • platform/ios-sim-deprecated/svg/custom/use-elementInstance-methods-expected.txt: Removed.
  • platform/ios-simulator/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
  • platform/ios-simulator/svg/custom/use-elementInstance-methods-expected.txt: Removed.
  • platform/mac-mountainlion/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
  • platform/mac-mountainlion/svg/custom/use-elementInstance-methods-expected.txt: Removed.
  • platform/mac/svg/custom/use-elementInstance-event-target-expected.png: Removed.
  • platform/mac/svg/custom/use-elementInstance-event-target-expected.txt: Removed.
  • platform/mac/svg/custom/use-elementInstance-methods-expected.png: Removed.
  • platform/mac/svg/custom/use-elementInstance-methods-expected.txt: Removed.
  • svg/custom/element-instance-held-by-js-crash-expected.txt: Removed.
  • svg/custom/element-instance-held-by-js-crash.svg: Removed.
  • svg/custom/resources/use-instanceRoot-event-bubbling.js: Find element by id instead

of using use.instanceRoot.correspondingElement.

  • svg/custom/resources/use-instanceRoot-event-listeners.js: Removed.
  • svg/custom/use-crash-using-children-before-destroy.svg: Removed a line of code that

got at the instanceRoot. It's possible this test no longer has value, and if so, then
we could later delete it, but it does no harm.

  • svg/custom/use-elementInstance-event-target.svg: Removed.
  • svg/custom/use-elementInstance-methods.svg: Removed.
  • svg/custom/use-instanceRoot-as-event-target-expected.txt: Removed.
  • svg/custom/use-instanceRoot-as-event-target.xhtml: Removed.
  • svg/custom/use-instanceRoot-event-listener-liveness-expected.txt: Removed.
  • svg/custom/use-instanceRoot-event-listener-liveness.xhtml: Removed.
  • svg/custom/use-instanceRoot-event-listeners-expected.txt: Removed.
  • svg/custom/use-instanceRoot-event-listeners.xhtml: Removed.
  • svg/custom/use-instanceRoot-modifications.svg: Removed the part of this that involved

the instanceRoot property. It's possible this test now has reduced value, and if so, we
could later delete it but it does no harm.

  • svg/custom/use-instanceRoot-with-use-removed.svg: Removed the use of instanceRoot

and correspondingUseElement. Not certain this remains a useful test. Also converted line
endings to LF instead of CRLF.

  • svg/custom/use-listener-append-crash.html: Get elements by id instead of instanceRoot.
  • svg/custom/use-modify-target-container.svg: Ditto.
  • svg/custom/use-modify-target-symbol.svg: Ditto.
  • svg/custom/use-on-use-with-child-expected.txt: Updated since we don't dump an instance

tree any more.

  • svg/custom/use-on-use-with-child.svg: Removed the part about dumping the instance tree,

and added in the part about dragging to make sure it doesn't crash.

  • svg/dom/use-transform.svg: Get element by id instead of instanceRoot.
8:02 PM Changeset in webkit [179390] by saambarati1@gmail.com
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Make BasicBlockAnnotator lessen the saturation of syntax highlighting instead of graying out unexecuted code
https://bugs.webkit.org/show_bug.cgi?id=141011

Reviewed by Timothy Hatcher.

This patch removes a lot of the complicated logic associated around
determining which code can be grayed out by the BasicBlockAnnotator.
Instead, the BasicBlockAnnotator now applies a CSS class to all the
code that has not executed which lessens the saturation of the
syntax coloring for the code. This creates both a nicer user
interface and a nicer user experience because it makes reading
source code with the BasicBlockAnnotator enabled more pleasant.

  • UserInterface/Controllers/BasicBlockAnnotator.js:

(WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges.):
(WebInspector.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges):
(WebInspector.BasicBlockAnnotator.prototype.set _highlightTextForBasicBlock):
(WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyWhitespace): Deleted.
(WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyClosingBrace): Deleted.
(_canGrayOutEntireLine): Deleted.
(_grayOutLine): Deleted.
(_clearRangeForBasicBlockMarker.get marker): Deleted.
(_clearRangeForBasicBlockMarker): Deleted.

  • UserInterface/Views/SourceCodeTextEditor.css:

(.hover-menu.color > img):
(.basic-block-has-not-executed): Deleted.
(.basic-block-has-not-executed-prepend::before): Deleted.

  • UserInterface/Views/SyntaxHighlightingDefaultTheme.css:

(.cm-s-default .basic-block-has-not-executed):
(.cm-s-default .basic-block-has-not-executed.cm-comment):
(.cm-s-default .basic-block-has-not-executed.cm-m-css:matches(.cm-atom, .cm-meta, .cm-variable-3, .cm-property)):
(.cm-s-default .basic-block-has-not-executed:matches(.cm-number, .cm-atom.cm-hex-color)):
(.cm-s-default .basic-block-has-not-executed.cm-string):
(.cm-s-default .basic-block-has-not-executed.cm-m-xml.cm-meta):
(.cm-s-default .basic-block-has-not-executed.cm-m-xml.cm-attribute):

6:00 PM Changeset in webkit [179389] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Fix the build with newer Clang.

  • platform/graphics/ca/GraphicsLayerCA.h:
5:56 PM Changeset in webkit [179388] by gyuyoung.kim@samsung.com
  • 2 edits in trunk/LayoutTests

Unreviewed EFL port gardening. Some tests have been passed since r172999 though,
those have marked with "Failure".

  • platform/efl/TestExpectations:
5:49 PM Changeset in webkit [179387] by gyuyoung.kim@samsung.com
  • 2 edits in trunk/LayoutTests

Unreviewed, gardening on EFL port. Unskip tests which don't come to crash or
timeout anymore.

  • platform/efl/TestExpectations:
5:17 PM Changeset in webkit [179386] by weinig@apple.com
  • 3 edits in trunk/LayoutTests

More follow up to https://bugs.webkit.org/show_bug.cgi?id=141038

  • platform/mac-mavericks/fast/text/international/hindi-spacing-expected.txt:
  • platform/mac/fast/text/international/hindi-spacing-expected.txt:
4:55 PM Changeset in webkit [179385] by weinig@apple.com
  • 12 edits in trunk/LayoutTests

Follow up to https://bugs.webkit.org/show_bug.cgi?id=141038

Update test results on Yosemite now that we don't use the screen font
in controls.

  • platform/mac/fast/css/rtl-ordering-expected.png:
  • platform/mac/fast/css/rtl-ordering-expected.txt:
  • platform/mac/fast/forms/search-rtl-expected.png:
  • platform/mac/fast/forms/search-rtl-expected.txt:
  • platform/mac/fast/forms/select-visual-hebrew-expected.png:
  • platform/mac/fast/forms/select-visual-hebrew-expected.txt:
  • platform/mac/fast/forms/select-writing-direction-natural-expected.png:
  • platform/mac/fast/forms/select-writing-direction-natural-expected.txt:
  • platform/mac/fast/text/international/hindi-spacing-expected.txt:
  • platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png:
  • platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:
4:51 PM Changeset in webkit [179384] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Try to fix the iOS build.

  • WebCore.exp.in:
4:45 PM Changeset in webkit [179383] by Brent Fulgham
  • 7 edits in trunk/Source/WebKit

[Win] Build fix after r179368.

../WebKit:

  • WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Remove missing symbol.

../WebKit/win:

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferences.cpp:

(WebPreferences::screenFontSubstitutionEnabled): Deleted.
(WebPreferences::setScreenFontSubstitutionEnabled): Deleted.

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

4:43 PM Changeset in webkit [179382] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

Another follow-on, spotted this mistake. This used to be

#if PLATFORM(IOS)
MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 , so it should now be

COCOA.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::registerUserDefaultsIfNeeded):

4:39 PM Changeset in webkit [179381] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

[Win] Build fix after r179368.

  • platform/graphics/win/UniscribeController.cpp:

(WebCore::UniscribeController::shapeAndPlaceItem): Don't use the no longer
valid isPrinterFont method.

4:38 PM Changeset in webkit [179380] by Beth Dakin
  • 2 edits in trunk/Source/WebKit2

Follow-on, fixing a bad merge from my last change.

  • Shared/WebPreferencesDefinitions.h:
4:33 PM Changeset in webkit [179379] by rniwa@webkit.org
  • 3 edits in trunk/LayoutTests

Skip these two tests in the stress testing since the feature isn't enabled.

  • js/script-tests/class-syntax-declaration.js:
  • js/script-tests/class-syntax-expression.js:
4:04 PM Changeset in webkit [179378] by eric.carlson@apple.com
  • 4 edits in trunk/LayoutTests

media/track/track-in-band-cues-added-once.html fails sometimes
https://bugs.webkit.org/show_bug.cgi?id=138806

Reviewed by Brent Fulgham.

  • media/track/track-in-band-cues-added-once-expected.txt: Update results.
  • media/track/track-in-band-cues-added-once.html: Seek before beginning playback so

the media engine is more likely to buffer and process the initial cue.

  • platform/mac/TestExpectations: Unskip track-in-band-cues-added-once.html.
4:02 PM Changeset in webkit [179377] by eric.carlson@apple.com
  • 4 edits in trunk/LayoutTests

REGRESSION (OS X 10.10.2): media/track/track-in-band-style.html frequently times out
https://bugs.webkit.org/show_bug.cgi?id=140974

Reviewed by Brent Fulgham.

  • media/track/track-in-band-style-expected.txt: Updated.
  • media/track/track-in-band-style.html: Introduce a brief pause between receiving the 'seeked'

event and checking caption style to allow for media engine latency. Add additional logging
when the test fails to make future failure diagnosis easier.

  • platform/mac/TestExpectations: Remove track-in-band-style.html.
4:02 PM Changeset in webkit [179376] by Beth Dakin
  • 6 edits in trunk/Source/WebKit/mac

Remove more Mountain Lion code from WebKit
https://bugs.webkit.org/show_bug.cgi?id=141050

Reviewed by Anders Carlsson.

  • History/WebHistory.mm:

(getDayBoundaries):

  • Panels/WebAuthenticationPanel.m:

(-[WebAuthenticationPanel cancel:]):
(-[WebAuthenticationPanel logIn:]):
(-[WebAuthenticationPanel runAsSheetOnWindow:withChallenge:]):

  • WebCoreSupport/WebSystemInterface.mm:

(InitWebCoreSystemInterface):

  • WebView/WebFrameView.mm:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(needsScreenFontsEnabledQuirk):

  • WebView/WebView.mm:

(+[WebView registerForMemoryNotifications]):
(-[WebView _preferencesChanged:]):
(+[WebView initialize]):
(+[WebView _shouldAutomaticQuoteSubstitutionBeEnabled]):
(+[WebView _shouldAutomaticDashSubstitutionBeEnabled]):
(+[WebView _didChangeAutomaticDashSubstitutionEnabled:]):

3:57 PM Changeset in webkit [179375] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-600.4.5

New Tag.

3:30 PM Changeset in webkit [179374] by ap@apple.com
  • 2 edits in trunk/Tools

Built result takes too long to be compressed on bots
https://bugs.webkit.org/show_bug.cgi?id=141056

Reviewed by Daniel Bates.

Reduces compression time from ~3.5 min to ~1.5 min. Archive size gets 2% bigger.

  • BuildSlaveSupport/test-result-archive: (archiveTestResults):
3:19 PM Changeset in webkit [179373] by Beth Dakin
  • 27 edits in trunk/Source/WebKit2

Remove more Mountain Lion code from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=141052

Reviewed by Tim Horton.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::sendBufferMaybeAborting):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):

  • NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
  • NetworkProcess/mac/NetworkResourceLoaderMac.mm:

(WebKit::NetworkResourceLoader::willCacheResponseAsync):

  • Platform/IPC/MessageDecoder.cpp:
  • Platform/IPC/MessageDecoder.h:
  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
(IPC::Connection::open):
(IPC::Connection::receiveSourceEventHandler):
(IPC::Connection::kill):

  • Platform/IPC/mac/ImportanceAssertion.h:
  • PluginProcess/mac/PluginProcessMac.mm:

(WebKit::PluginProcess::initializeProcessName):

  • Shared/WebPreferencesDefinitions.h:
  • Shared/mac/ChildProcessMac.mm:

(WebKit::initializeTimerCoalescingPolicy):
(WebKit::ChildProcess::setApplicationIsDaemon):
(WebKit::ChildProcess::platformInitialize):
(WebKit::ChildProcess::setQOS):

  • Shared/mac/CookieStorageShim.mm:

(WebKit::CookieStorageShim::initialize):

  • UIProcess/API/mac/WKView.mm:

(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
(-[WKView _windowDidChangeOcclusionState:]):

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::registerUserDefaultsIfNeeded):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):
(WebKit::privateBrowsingSession):
(WebKit::WebProcessPool::isURLKnownHSTSHost):
(WebKit::WebProcessPool::resetHSTSHosts):

  • UIProcess/Databases/mac/DatabaseProcessProxyMac.mm:

(WebKit::shouldUseXPC):

  • UIProcess/Plugins/mac/PluginProcessProxyMac.mm:

(WebKit::shouldUseXPC):

  • UIProcess/WebProcessPool.h:
  • UIProcess/mac/TextCheckerMac.mm:

(WebKit::shouldAutomaticQuoteSubstitutionBeEnabled):
(WebKit::shouldAutomaticDashSubstitutionBeEnabled):
(WebKit::TextChecker::didChangeAutomaticQuoteSubstitutionEnabled):
(WebKit::TextChecker::didChangeAutomaticDashSubstitutionEnabled):

  • UIProcess/mac/ViewGestureControllerMac.mm:

(WebKit::ViewGestureController::applyDebuggingPropertiesToSwipeViews):

  • UIProcess/mac/WebProcessProxyMac.mm:

(WebKit::shouldUseXPC):

  • WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:

(InitWebCoreSystemInterface):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::updateActivePages):

  • WebProcess/com.apple.WebProcess.sb.in:
  • config.h:
3:17 PM Changeset in webkit [179372] by ggaren@apple.com
  • 12 edits in trunk/Source/JavaScriptCore

Removed op_ret_object_or_this
https://bugs.webkit.org/show_bug.cgi?id=141048

Reviewed by Michael Saboff.

op_ret_object_or_this was one opcode that would keep us out of the
optimizing compilers.

We don't need a special-purpose opcode; we can just use a branch.

  • bytecode/BytecodeBasicBlock.cpp:

(JSC::isTerminal): Removed.

  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset): Removed.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode): Removed.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitReturn): Use an explicit branch to determine
if we need to substitute 'this' for the return value. Our engine no longer
benefits from fused opcodes that dispatch less in the interpreter.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITCall32_64.cpp:

(JSC::JIT::emit_op_ret_object_or_this): Deleted.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_ret_object_or_this): Deleted.

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm: Removed.
2:59 PM Changeset in webkit [179371] by rniwa@webkit.org
  • 10 edits
    6 adds in trunk

Implement ES6 class syntax without inheritance support
https://bugs.webkit.org/show_bug.cgi?id=140918

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Added the most basic support for ES6 class syntax. After this patch, we support basic class definition like:
class A {

constructor() { }
someMethod() { }

}

We'll add the support for "extends" keyword and automatically generating a constructor in follow up patches.
We also don't support block scoping of a class declaration.

We support both class declaration and class expression. A class expression is implemented by the newly added
ClassExprNode AST node. A class declaration is implemented by ClassDeclNode, which is a thin wrapper around
AssignResolveNode.

Tests: js/class-syntax-declaration.html

js/class-syntax-expression.html

  • bytecompiler/NodesCodegen.cpp:

(JSC::ObjectLiteralNode::emitBytecode): Create a new object instead of delegating the work to PropertyListNode.
Also fixed the 5-space indentation.
(JSC::PropertyListNode::emitBytecode): Don't create a new object now that ObjectLiteralNode does this.
(JSC::ClassDeclNode::emitBytecode): Added. Just let the AssignResolveNode node emit the byte code.
(JSC::ClassExprNode::emitBytecode): Create the class constructor and add static methods to the constructor by
emitting the byte code for PropertyListNode. Add instance methods to the class's prototype object the same way.

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createClassExpr): Added. Creates a ClassExprNode.
(JSC::ASTBuilder::createClassDeclStatement): Added. Creates a AssignResolveNode and wraps it by a ClassDeclNode.

  • parser/NodeConstructors.h:

(JSC::ClassDeclNode::ClassDeclNode): Added.
(JSC::ClassExprNode::ClassExprNode): Added.

  • parser/Nodes.h:

(JSC::ClassExprNode): Added.
(JSC::ClassDeclNode): Added.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseStatement): Added the support for class declaration.
(JSC::stringForFunctionMode): Return "method" for MethodMode.
(JSC::Parser<LexerType>::parseClassDeclaration): Added. Uses parseClass to create a class expression and wraps
it with ClassDeclNode as described above.
(JSC::Parser<LexerType>::parseClass): Parses a class expression.
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parseGetterSetter): Extracted from parseProperty to share the code between parseProperty
and parseClass.
(JSC::Parser<LexerType>::parsePrimaryExpression): Added the support for class expression.

  • parser/Parser.h:

(FunctionParseMode): Added MethodMode.

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::createClassExpr): Added.
(JSC::SyntaxChecker::createClassDeclStatement): Added.

LayoutTests:

Added two tests for class declarations and class expressions.

  • TestExpectations:
  • js/class-syntax-declaration-expected.txt: Added.
  • js/class-syntax-declaration.html: Added.
  • js/class-syntax-expression-expected.txt: Added.
  • js/class-syntax-expression.html: Added.
  • js/script-tests/class-syntax-declaration.js: Added.
  • js/script-tests/class-syntax-expression.js: Added.
2:58 PM Changeset in webkit [179370] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Fix the build after r179368

  • platform/graphics/FontDescription.h:

(WebCore::FontDescription::equalForTextAutoSizing):

2:57 PM Changeset in webkit [179369] by Simon Fraser
  • 7 edits
    2 adds in trunk

Border-radius clipping on a stacking context causes descendants to not render
https://bugs.webkit.org/show_bug.cgi?id=140536

Reviewed by Zalan Bujtas.

Source/WebCore:

Fix one of the issues introduced in r178029. The changes in GraphicsLayerCA
failed to adhere to the "set a bit and flush later" pattern that this class uses,
instead poking the platform layers directly. This caused an issue where the bounds
of the clipping layer would later be set to 0x0, causing content to disappear.

Fix by changing the "applyClippingBorder" function to "setMasksToBoundsRect"
and have it update via a new MasksToBoundsRectChanged dirty bit.

In order to avoid clobbering the mask layer used to clip contents, we need another
shape mask layer, so rename m_shapeMaskLayer to m_contentsShapeMaskLayer, then
introduce a new m_shapeMaskLayer which is used for masks-to-bounds clipping. Update
the reflection cloning code to correctly clone this layer.

Test: compositing/clipping/border-radius-stacking-context-clip.html

  • WebCore.exp.in:
  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::maskToBoundsRect):
(WebCore::GraphicsLayer::setMasksToBoundsRect):
(WebCore::GraphicsLayer::applyClippingBorder): Deleted.
(WebCore::GraphicsLayer::clearClippingBorder): Deleted.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::willBeDestroyed):
(WebCore::GraphicsLayerCA::setMasksToBoundsRect):
(WebCore::GraphicsLayerCA::setContentsToSolidColor):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateContentsImage):
(WebCore::GraphicsLayerCA::updateContentsRects):
(WebCore::GraphicsLayerCA::updateMasksToBoundsRect):
(WebCore::GraphicsLayerCA::dumpAdditionalProperties):
(WebCore::GraphicsLayerCA::applyClippingBorder): Deleted.
(WebCore::GraphicsLayerCA::clearClippingBorder): Deleted.

  • platform/graphics/ca/GraphicsLayerCA.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateChildClippingStrategy): Add a FIXME since
this code is trying to access geometry and we may not have done layout yet.
Also, to clear the rounded rect, just set a non-rounded rect the size of the layer.

LayoutTests:

Ref test that clips out the middle of a composited rounded-rect overflow element,
and also tests reflections.

  • compositing/clipping/border-radius-stacking-context-clip-expected.html: Added.
  • compositing/clipping/border-radius-stacking-context-clip.html: Added.
2:40 PM Changeset in webkit [179368] by weinig@apple.com
  • 47 edits in trunk

Remove support for screen font substitution
https://bugs.webkit.org/show_bug.cgi?id=141038

Reviewed by Tim Horton.

Source/WebCore:

  • Removes the screen font substitution setting (which was only on in Mountain Lion)
  • Remove the concept of a printer font, from the family of Font related classes.
  • WebCore.exp.in:
  • css/StyleResolver.cpp:

(WebCore::StyleResolver::initializeFontStyle):

  • page/Settings.cpp:

(WebCore::Settings::Settings):
(WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Deleted.
(WebCore::Settings::setScreenFontSubstitutionEnabled): Deleted.

  • page/Settings.h:

(WebCore::Settings::screenFontSubstitutionEnabled): Deleted.

  • page/mac/SettingsMac.mm:

(WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Deleted.

  • platform/graphics/FontCache.h:

(WebCore::FontDescriptionFontDataCacheKey::makeFlagKey):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::FontCascade):

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::isPrinterFont): Deleted.

  • platform/graphics/FontDescription.h:

(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::setWeight):
(WebCore::FontDescription::equalForTextAutoSizing):
(WebCore::FontDescription::operator==):
(WebCore::FontDescription::usePrinterFont): Deleted.
(WebCore::FontDescription::setUsePrinterFont): Deleted.

  • platform/graphics/FontPlatformData.h:

(WebCore::FontPlatformData::isCompositeFontReference):
(WebCore::FontPlatformData::hash):
(WebCore::FontPlatformData::operator==):
(WebCore::FontPlatformData::isPrinterFont): Deleted.

  • platform/graphics/WidthIterator.h:

(WebCore::WidthIterator::supportsTypesettingFeatures):

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::platformDataInit):
(WebCore::FontPlatformData::platformDataAssign):

  • platform/graphics/ios/FontCacheIOS.mm:

(WebCore::FontCache::getSystemFontFallbackForCharacters):
(WebCore::FontCache::createFontPlatformData):

  • platform/graphics/ios/SimpleFontDataIOS.mm:

(WebCore::Font::platformCreateScaledFont):

  • platform/graphics/mac/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

  • platform/graphics/mac/FontCacheMac.mm:

(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::FontCache::createFontPlatformData):

  • platform/graphics/mac/SimpleFontDataMac.mm:

(WebCore::Font::compositeFontReferenceFont):
(WebCore::Font::platformCreateScaledFont):

  • platform/mac/DragImageMac.mm:

(WebCore::fontFromNSFont):
(WebCore::widthWithFont):
(WebCore::drawAtPoint):

  • style/StyleResolveForDocument.cpp:

(WebCore::Style::resolveForDocument):

Source/WebKit/mac:

  • Misc/WebKitNSStringExtras.mm:

(-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]):
(-[NSString _web_widthWithFont:]):

  • Misc/WebStringTruncator.mm:

(fontFromNSFont):
Update for new signature of the FontPlatformData constructor, which no longer cares about
whether to use printer fonts.

  • WebView/WebPreferenceKeysPrivate.h:

Remove the WebKitScreenFontSubstitutionEnabledKey key.

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
Remove support for WebKitScreenFontSubstitutionEnabledKey.

(needsScreenFontsEnabledQuirk): Deleted.
Remove support for the Mountain Lion era 1-Password quirk.

(-[WebPreferences screenFontSubstitutionEnabled]): Deleted.
(-[WebPreferences setScreenFontSubstitutionEnabled:]): Deleted.

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
(-[WebView _preferencesChanged:]):
Remove support for the screen font substitution setting.

Source/WebKit/win:

  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::screenFontSubstitutionEnabled):
(WebPreferences::setScreenFontSubstitutionEnabled):
Remove implementations. Have this setting set on windows didn't have any effect before,
so this doesn't change behavior.

Source/WebKit2:

  • Shared/API/c/WKDeprecatedFunctions.cpp:

(WKPreferencesSetScreenFontSubstitutionEnabled):
(WKPreferencesGetScreenFontSubstitutionEnabled):
Move now empty preferences SPI to WKDeprecatedFunctions.

  • Shared/WebPreferencesDefinitions.h:
  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetScreenFontSubstitutionEnabled): Deleted.
(WKPreferencesGetScreenFontSubstitutionEnabled): Deleted.

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

  • WebProcess/WebProcess.h:

(WebKit::WebProcess::presenterApplicationPid):
(WebKit::WebProcess::shouldForceScreenFontSubstitution): Deleted.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):
Stop piping screen font substitution setting to the web process.

Tools:

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebPreferencesToConsistentValues):
Remove call to now setScreenFontSubstitutionEnabled() which is a no-op.

LayoutTests:

  • platform/mac/fast/text/international/hindi-spacing-expected.txt:

Update results now that buttons always use printer fonts. We were accidentally
allowing buttons to use screen fonts, which usually didn't make a difference,
but does with some fallback fonts.

2:14 PM Changeset in webkit [179367] by ap@apple.com
  • 6 edits
    1 copy
    1 move in trunk/Source/WebKit2

Frequent kernel panics when running WebKit regression tests
https://bugs.webkit.org/show_bug.cgi?id=141043

Reviewed by Sam Weinig.

Split PluginService.Development into 32-bit and 64-bit variants, to better match
production variant. When building FAT, we'll have the right architecture from
the start now, so no need to re-exec into a different architecture.

  • Configurations/PluginService.Development.xcconfig: Removed.
  • Configurations/PluginService.32.Development.xcconfig: Copied from Source/WebKit2/Configurations/PluginService.Development.xcconfig.
  • Configurations/PluginService.64.Development.xcconfig: Copied from Source/WebKit2/Configurations/PluginService.Development.xcconfig.

Changed to use ONLY_ACTIVE_ARCH instead of CONFIGURATION, so that we build the
right thing even in debug FAT builds.

  • Configurations/PluginService.32.xcconfig:
  • Configurations/PluginService.64.xcconfig:

While at it, applied the same changes as in Development variants. This means that
FAT builds will now build only the correct architecture for PluginService.64
(it used to build FAT, unnecessarily).

  • PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:

Updated to support multiple product names.

  • UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): Launch the

right development service.

  • WebKit2.xcodeproj/project.pbxproj: Split the Plugin.Development target into two.
2:03 PM Changeset in webkit [179366] by hyatt@apple.com
  • 15 edits
    2 adds in trunk

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.

Japanese line breaking rules need to be respected before and after Ruby.
https://bugs.webkit.org/show_bug.cgi?id=91588
<rdar://problem/17306535>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/ruby/ruby-punctuation-avoid-breaking.html.

This patch has to add support for following line breaking rules at both
sides of a Ruby boundary. For breaking before a Ruby, unfortunately we
just hard-code the rules (and apply this hard-coding only to Ruby and not
to other inline replaced elements).

For breaking after a Ruby we do better. The Ruby run caches its prior characters
and line layout is able to obtain them and use them when deciding whether or not
to break. This means for the "after" side of a Ruby, we're able to behave the same
as if no Ruby was used.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::cachePriorCharactersIfNeeded):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):

  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::cachePriorCharactersIfNeeded):

  • rendering/RenderRubyBase.h:
  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::RenderRubyRun):
(WebCore::RenderRubyRun::updatePriorContextFromCachedBreakIterator):
(WebCore::RenderRubyRun::canBreakBefore):

  • rendering/RenderRubyRun.h:
  • rendering/RenderRubyText.cpp:

(WebCore::RenderRubyText::canBreakBefore):

  • rendering/RenderRubyText.h:
  • rendering/line/BreakingContextInlineHeaders.h:

(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):

LayoutTests:

  • fast/ruby/ruby-block-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-block-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content-expected.txt:
  • fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html:
  • fast/ruby/ruby-punctuation-avoid-breaking-expected.html: Added.
  • fast/ruby/ruby-punctuation-avoid-breaking.html: Added.
1:58 PM Changeset in webkit [179365] by ggaren@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

2015-01-29 Geoffrey Garen <ggaren@apple.com>

Try to fix the Windows build.

Not reviewed.

  • heap/WeakBlock.h: Use the fully qualified name when declaring our friend.
1:57 PM Changeset in webkit [179364] by Beth Dakin
  • 27 edits in trunk/Source/WebCore

Remove more Mountain Lion code from WebCore
https://bugs.webkit.org/show_bug.cgi?id=141014

Reviewed by Anders Carlsson.

  • WebCore.exp.in:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(AXAttributeStringSetSpelling):
(AXAttributedStringAppendText):

  • crypto/CommonCryptoUtilities.h:
  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::transformAES_CBC):

  • editing/cocoa/HTMLConverter.mm:

(_dateForString):

  • html/canvas/ANGLEInstancedArrays.cpp:

(WebCore::ANGLEInstancedArrays::supported):

  • loader/cocoa/DiskCacheMonitorCocoa.mm:
  • page/mac/SettingsMac.mm:

(WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
(WebCore::Settings::initializeDefaultFontFamilies):

  • platform/audio/mac/MediaSessionManagerMac.cpp:

(MediaSessionManager::updateSessionState):

  • platform/cocoa/MemoryPressureHandlerCocoa.mm:

(WebCore::MemoryPressureHandler::install):
(WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): Deleted.

  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:

(WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption):

  • platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):

  • platform/graphics/cocoa/IOSurface.mm:

(IOSurface::state):
(IOSurface::isVolatile):
(IOSurface::setIsVolatile):

  • platform/graphics/mac/SimpleFontDataMac.mm:

(WebCore::Font::platformInit):

  • platform/graphics/opengl/Extensions3DOpenGL.cpp:

(WebCore::Extensions3DOpenGL::drawArraysInstanced):
(WebCore::Extensions3DOpenGL::drawElementsInstanced):
(WebCore::Extensions3DOpenGL::vertexAttribDivisor):

  • platform/mac/WebCoreSystemInterface.h:
  • platform/mac/WebCoreSystemInterface.mm:
  • platform/network/cf/ResourceHandleCFNet.cpp:

(WebCore::ResourceHandle::createCFURLConnection):

  • platform/network/cocoa/ProtectionSpaceCocoa.h:

(WebCore::ProtectionSpace::encodingRequiresPlatformData):

  • platform/network/cocoa/ProtectionSpaceCocoa.mm:

(WebCore::ProtectionSpace::encodingRequiresPlatformData):

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::createNSURLConnection):

  • platform/network/mac/WebCoreURLResponse.mm:

(WebCore::synthesizeRedirectResponseIfNecessary):

  • platform/spi/cf/CFNetworkSPI.h:
  • platform/text/mac/LocaleMac.mm:

(WebCore::LocaleMac::LocaleMac):

1:43 PM Changeset in webkit [179363] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix the build with newer Clang

  • NetworkProcess/NetworkConnectionToWebProcess.h:

These should be 'override's.

1:43 PM Changeset in webkit [179362] by benjamin@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove an extraneous check from the parser of :not()
https://bugs.webkit.org/show_bug.cgi?id=141021

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-01-29
Reviewed by Darin Adler.

  • css/CSSGrammar.y.in:

:not() takes a selector list, it can be null if there selector list is invalid,
but there cannot be a invalid pointer.

1:41 PM Changeset in webkit [179361] by ggaren@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
https://bugs.webkit.org/show_bug.cgi?id=140900

Reviewed by Mark Hahnenberg.

Re-landing just the WeakBlock piece of this patch.

  • heap/WeakBlock.cpp:

(JSC::WeakBlock::create):
(JSC::WeakBlock::destroy):
(JSC::WeakBlock::WeakBlock):

  • heap/WeakBlock.h:
  • heap/WeakSet.cpp:

(JSC::WeakSet::~WeakSet):
(JSC::WeakSet::addAllocator):
(JSC::WeakSet::removeAllocator):

1:32 PM Changeset in webkit [179360] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Fix the iOS build after r179347

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::commitProvisionalLoad):

12:56 PM Changeset in webkit [179359] by ggaren@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Use Vector instead of GCSegmentedArray in CodeBlockSet
https://bugs.webkit.org/show_bug.cgi?id=141044

Reviewed by Ryosuke Niwa.

This is allowed now that we've gotten rid of fastMallocForbid.

4kB was a bit overkill for just storing a few pointers.

  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::CodeBlockSet):

  • heap/CodeBlockSet.h:
  • heap/Heap.cpp:

(JSC::Heap::Heap):

12:49 PM Changeset in webkit [179358] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix no-JIT build.

  • jit/PolymorphicCallStubRoutine.cpp:
12:33 PM Changeset in webkit [179357] by fpizlo@apple.com
  • 45 edits
    2 adds
    5 deletes in trunk/Source/JavaScriptCore

Polymorphic call inlining should be based on polymorphic call inline caching rather than logging
https://bugs.webkit.org/show_bug.cgi?id=140660

Reviewed by Geoffrey Garen.

When we first implemented polymorphic call inlining, we did the profiling based on a call
edge log. The idea was to store each call edge (a tuple of call site and callee) into a
global log that was processed lazily. Processing the log would give precise counts of call
edges, and could be used to drive well-informed inlining decisions - polymorphic or not.
This was a speed-up on throughput tests but a slow-down for latency tests. It was a net win
nonetheless.

Experience with this code shows three things. First, the call edge profiler is buggy and
complex. It would take work to fix the bugs. Second, the call edge profiler incurs lots of
overhead for latency code that we care deeply about. Third, it's not at all clear that
having call edge counts for every possible callee is any better than just having call edge
counts for the limited number of callees that an inline cache would catch.

So, this patch removes the call edge profiler and replaces it with a polymorphic call inline
cache. If we miss the basic call inline cache, we inflate the cache to be a jump to an
out-of-line stub that cases on the previously known callees. If that misses again, then we
rewrite that stub to include the new callee. We do this up to some number of callees. If we
hit the limit then we switch to using a plain virtual call.

Substantial speed-up on V8Spider; undoes the slow-down that the original call edge profiler
caused. Might be a SunSpider speed-up (below 1%), depending on hardware.

(JSC::CallEdge::count):
(JSC::CallEdge::CallEdge):

  • bytecode/CallEdgeProfile.cpp: Removed.
  • bytecode/CallEdgeProfile.h: Removed.
  • bytecode/CallEdgeProfileInlines.h: Removed.
  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::unlink):
(JSC::CallLinkInfo::visitWeak):

  • bytecode/CallLinkInfo.h:
  • bytecode/CallLinkStatus.cpp:

(JSC::CallLinkStatus::CallLinkStatus):
(JSC::CallLinkStatus::computeFor):
(JSC::CallLinkStatus::computeFromCallLinkInfo):
(JSC::CallLinkStatus::isClosureCall):
(JSC::CallLinkStatus::makeClosureCall):
(JSC::CallLinkStatus::dump):
(JSC::CallLinkStatus::computeFromCallEdgeProfile): Deleted.

  • bytecode/CallLinkStatus.h:

(JSC::CallLinkStatus::CallLinkStatus):
(JSC::CallLinkStatus::isSet):
(JSC::CallLinkStatus::variants):
(JSC::CallLinkStatus::size):
(JSC::CallLinkStatus::at):
(JSC::CallLinkStatus::operator[]):
(JSC::CallLinkStatus::canOptimize):
(JSC::CallLinkStatus::edges): Deleted.
(JSC::CallLinkStatus::canTrustCounts): Deleted.

  • bytecode/CallVariant.cpp:

(JSC::variantListWithVariant):
(JSC::despecifiedVariantList):

  • bytecode/CallVariant.h:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::linkIncomingPolymorphicCall):
(JSC::CodeBlock::unlinkIncomingCalls):
(JSC::CodeBlock::noticeIncomingCall):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::isIncomingCallAlreadyLinked): Deleted.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::addCallWithoutSettingResult):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleInlining):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasHeapPrediction):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGPredictionPropagationPhase.cpp:

(JSC::DFG::PredictionPropagationPhase::propagate):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGTierUpCheckInjectionPhase.cpp:

(JSC::DFG::TierUpCheckInjectionPhase::run):
(JSC::DFG::TierUpCheckInjectionPhase::removeFTLProfiling): Deleted.

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • heap/Heap.cpp:

(JSC::Heap::collect):

  • jit/BinarySwitch.h:
  • jit/ClosureCallStubRoutine.cpp: Removed.
  • jit/ClosureCallStubRoutine.h: Removed.
  • jit/JITCall.cpp:

(JSC::JIT::compileOpCall):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileOpCall):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:

(JSC::operationLinkPolymorphicCallFor):
(JSC::operationLinkClosureCallFor): Deleted.

  • jit/JITStubRoutine.h:
  • jit/JITWriteBarrier.h:
  • jit/PolymorphicCallStubRoutine.cpp: Added.

(JSC::PolymorphicCallNode::~PolymorphicCallNode):
(JSC::PolymorphicCallNode::unlink):
(JSC::PolymorphicCallCase::dump):
(JSC::PolymorphicCallStubRoutine::PolymorphicCallStubRoutine):
(JSC::PolymorphicCallStubRoutine::~PolymorphicCallStubRoutine):
(JSC::PolymorphicCallStubRoutine::variants):
(JSC::PolymorphicCallStubRoutine::edges):
(JSC::PolymorphicCallStubRoutine::visitWeak):
(JSC::PolymorphicCallStubRoutine::markRequiredObjectsInternal):

  • jit/PolymorphicCallStubRoutine.h: Added.

(JSC::PolymorphicCallNode::PolymorphicCallNode):
(JSC::PolymorphicCallCase::PolymorphicCallCase):
(JSC::PolymorphicCallCase::variant):
(JSC::PolymorphicCallCase::codeBlock):

  • jit/Repatch.cpp:

(JSC::linkSlowFor):
(JSC::linkFor):
(JSC::revertCall):
(JSC::unlinkFor):
(JSC::linkVirtualFor):
(JSC::linkPolymorphicCall):
(JSC::linkClosureCall): Deleted.

  • jit/Repatch.h:
  • jit/ThunkGenerators.cpp:

(JSC::linkPolymorphicCallForThunkGenerator):
(JSC::linkPolymorphicCallThunkGenerator):
(JSC::linkPolymorphicCallThatPreservesRegsThunkGenerator):
(JSC::linkClosureCallForThunkGenerator): Deleted.
(JSC::linkClosureCallThunkGenerator): Deleted.
(JSC::linkClosureCallThatPreservesRegsThunkGenerator): Deleted.

  • jit/ThunkGenerators.h:

(JSC::linkPolymorphicCallThunkGeneratorFor):
(JSC::linkClosureCallThunkGeneratorFor): Deleted.

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::jitCompileAndSetHeuristics):

  • runtime/Options.h:
  • runtime/VM.cpp:

(JSC::VM::prepareToDiscardCode):
(JSC::VM::ensureCallEdgeLog): Deleted.

  • runtime/VM.h:
12:12 PM Changeset in webkit [179356] by matthew_hanson@apple.com
  • 2 edits in branches/safari-600.5-branch/Source/WebKit2

Merge r179339. rdar://problem/19619999

12:12 PM Changeset in webkit [179355] by matthew_hanson@apple.com
  • 2 edits in branches/safari-600.5-branch/Source/WebKit2

Merge r179320. rdar://problem/19619999

11:49 AM Changeset in webkit [179354] by santoshbit2007@gmail.com
  • 2 edits in trunk/Source/WTF

Refactor String::format to handle unreached va_end.
https://bugs.webkit.org/show_bug.cgi?id=140938

Reviewed by Alexey Proskuryakov.

Now va_end is called for all platform after getting length
of formatted string and again va_start/va_end is called to write
formatted string in buffer. This way it ensure va_end is always
reached for each va_start.

  • wtf/text/WTFString.cpp:
11:41 AM Changeset in webkit [179353] by akling@apple.com
  • 40 edits in trunk/Source/WebCore

JavaScript bindings constructors should take Ref<ImplType>&&.
<https://webkit.org/b/140952>

Reviewed by Darin Adler.

When constructing a JS wrapper object, there is always going to be a
corresponding DOM object.

Tweak the JavaScript DOM bindings generator to spit out constructors
that take the DOM object by Ref&& rather than PassRefPtr.

This avoids generating unnecessary null checks around every instance
of wrapper construction.

  • bindings/js/JSDOMBinding.h:

(WebCore::createWrapper):

  • bindings/js/JSDOMWindowShell.cpp:

(WebCore::JSDOMWindowShell::setWindow):

  • bindings/js/JSDocumentCustom.cpp:

(WebCore::JSDocument::location):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):

11:34 AM Changeset in webkit [179352] by matthew_hanson@apple.com
  • 2 edits in branches/safari-600.4-branch/Source/WebKit2

Merge r179339. rdar://problem/19619999

11:34 AM Changeset in webkit [179351] by matthew_hanson@apple.com
  • 2 edits in branches/safari-600.4-branch/Source/WebKit2

Merge r179320. rdar://problem/19619999

11:28 AM Changeset in webkit [179350] by ap@apple.com
  • 2 edits in trunk/LayoutTests

Mark more tests as slow in debug.

11:25 AM Changeset in webkit [179349] by Joseph Pecoraro
  • 22 edits
    2 adds in trunk

Web Inspector: ES6: Improved Console Format for Set and Map Objects (like Arrays)
https://bugs.webkit.org/show_bug.cgi?id=122867

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Add new Runtime.RemoteObject object subtypes for "map", "set", and "weakmap".

Upgrade Runtime.ObjectPreview to include type/subtype information. Now,
an ObjectPreview can be used for any value, in place of a RemoteObject,
and not capture / hold a reference to the value. The value will be in
the string description.

Adding this information to ObjectPreview can duplicate some information
in the protocol messages if a preview is provided, but simplifies
previews, so that all the information you need for any RemoteObject
preview is available. To slim messages further, make "overflow" and
"properties" only available on previews that may contain properties.
So, not primitives or null.

Finally, for "Map/Set/WeakMap" add an "entries" list to the preview
that will return previews with "key" and "value" properties depending
on the collection type. To get live, non-preview objects from a
collection, use Runtime.getCollectionEntries.

In order to keep the WeakMap's values Weak the frontend may provide
a unique object group name when getting collection entries. It may
then release that object group, e.g. when not showing the WeakMap's
values to the user, and thus remove the strong reference to the keys
so they may be garbage collected.

  • runtime/WeakMapData.h:

(JSC::WeakMapData::begin):
(JSC::WeakMapData::end):
Expose iterators so the Inspector may access WeakMap keys/values.

  • inspector/JSInjectedScriptHostPrototype.cpp:

(Inspector::JSInjectedScriptHostPrototype::finishCreation):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakMapEntries):

  • inspector/JSInjectedScriptHost.h:
  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::subtype):
Discern "map", "set", and "weakmap" object subtypes.

(Inspector::JSInjectedScriptHost::weakMapEntries):
Return a list of WeakMap entries. These are strong references
that the Inspector code is responsible for releasing.

  • inspector/protocol/Runtime.json:

Update types and expose the new getCollectionEntries command.

  • inspector/agents/InspectorRuntimeAgent.h:
  • inspector/agents/InspectorRuntimeAgent.cpp:

(Inspector::InspectorRuntimeAgent::getCollectionEntries):

  • inspector/InjectedScript.h:
  • inspector/InjectedScript.cpp:

(Inspector::InjectedScript::getInternalProperties):
(Inspector::InjectedScript::getCollectionEntries):
Pass through to the InjectedScript and call getCollectionEntries.

  • inspector/scripts/codegen/generator.py:

Add another type with runtime casting.

  • inspector/InjectedScriptSource.js:
  • Implement getCollectionEntries to get a range of values from a

collection. The non-Weak collections have an order to their keys (in
order of added) so range'd gets are okay. WeakMap does not have an
order, so only allow fetching a number of values.

  • Update preview generation to address the Runtime.ObjectPreview

type changes.

Source/WebInspectorUI:

This includes Set/Map/WeakMap previews:

  • Set previews: Set {1, 2, 3}
  • Map/WeakMap previews: Map {1 => 2, "key" => "value"}

For WeakMaps:

  • the preview itself shows up to 5 key/value pairs from when the object was logged
  • the previews are strings only, and thus do not retain the actual keys/values
  • when expanding, we get RemoteObjects and strongly retain the keys/values
  • when collapsing / clearing, we release the RemoteObjects so they can get collected

Currently you collapse the <entries> section, and re-expand later the
collection may show you knew keys/values. The UI for this will change.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Protocol/RemoteObject.js:

(WebInspector.RemoteObject.prototype.isCollectionType):
(WebInspector.RemoteObject.prototype.isWeakCollection):
(WebInspector.RemoteObject.prototype.getCollectionEntries):
(WebInspector.RemoteObject.prototype.releaseWeakCollectionEntries):
(WebInspector.RemoteObject.prototype.arrayLength):
(WebInspector.RemoteObject.prototype._weakCollectionObjectGroup):
High level functions for dealing with a RemoteObject that may be a
collection / weak collection.

  • UserInterface/Views/ConsoleMessageImpl.js:

(WebInspector.ConsoleMessageImpl):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
Include default formatters for collection types.

(WebInspector.ConsoleMessageImpl.prototype._appendPreview):
(WebInspector.ConsoleMessageImpl.prototype._appendEntryPreviews):
(WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreviews):
(WebInspector.ConsoleMessageImpl.prototype._appendValuePreview):
(WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview): Deleted.
Refactor preview generation a bit and include a specific path for
generation the output of a preview with "entries".

  • UserInterface/Views/LogContentView.css:

(.console-object-preview-body .console-object-preview-name.console-object-preview-name-Object):
With nested Object previews ("Map {{a:1} => 1}") don't show "Object" for the inner
object preview. Only show it if it has a unique type ("Map {Foo {a:1} => 1}")

(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap):
(:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .section):
(:matches(.console-formatted-object, .console-formatted-node, .console-formatted-error, .console-formatted-map, .console-formatted-set, .console-formatted-weakmap) .properties):
Make map/set/weakmap display like Objects.

  • UserInterface/Views/ObjectPropertiesSection.js:

(WebInspector.ObjectPropertiesSection.prototype.update):
(WebInspector.ObjectPropertiesSection.prototype.updateProperties):
(WebInspector.ObjectPropertyTreeElement.prototype.onpopulate.callback):
(WebInspector.ObjectPropertyTreeElement.prototype.onpopulate):
(WebInspector.CollectionEntriesMainTreeElement):
(WebInspector.CollectionEntriesMainTreeElement.prototype.onexpand.callback):
(WebInspector.CollectionEntriesMainTreeElement.prototype.onexpand):
(WebInspector.CollectionEntriesMainTreeElement.prototype.oncollapse):
(WebInspector.CollectionEntriesMainTreeElement.prototype.ondetach):
(WebInspector.CollectionEntriesMainTreeElement.prototype._trackWeakEntries):
(WebInspector.CollectionEntriesMainTreeElement.prototype._untrackWeakEntries):
(WebInspector.CollectionEntryTreeElement):
(WebInspector.CollectionEntryTreeElement.prototype.onpopulate):
(WebInspector.CollectionEntryTreeElement.prototype.onattach):
(WebInspector.EmptyCollectionTreeElement):
(WebInspector.ObjectPropertiesSection.prototype.update.callback): Deleted.
Add a quick UI for exploring the entries of a collection. We are actively
changing the styles of objects in the Console, so this should change soon.

LayoutTests:

The test unexpectedly fails in Debug builds, so skip it.

  • inspector/model/remote-object-expected.txt:
  • inspector/model/remote-object.html:

Update based on Runtime.ObjectPreview changes.

  • inspector/model/remote-object-weak-collection-expected.txt: Added.
  • inspector/model/remote-object-weak-collection.html: Added.

New test for weak collection handling.

11:20 AM Changeset in webkit [179348] by ggaren@apple.com
  • 10 edits in trunk/Source/JavaScriptCore

Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
https://bugs.webkit.org/show_bug.cgi?id=140900

Reviewed by Mark Hahnenberg.

Re-landing just the GCArraySegment piece of this patch.

  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::CodeBlockSet):

  • heap/CodeBlockSet.h:
  • heap/GCSegmentedArray.h:

(JSC::GCArraySegment::GCArraySegment):

  • heap/GCSegmentedArrayInlines.h:

(JSC::GCSegmentedArray<T>::GCSegmentedArray):
(JSC::GCSegmentedArray<T>::~GCSegmentedArray):
(JSC::GCSegmentedArray<T>::clear):
(JSC::GCSegmentedArray<T>::expand):
(JSC::GCSegmentedArray<T>::refill):
(JSC::GCArraySegment<T>::create):
(JSC::GCArraySegment<T>::destroy):

  • heap/GCThreadSharedData.cpp:

(JSC::GCThreadSharedData::GCThreadSharedData):

  • heap/Heap.cpp:

(JSC::Heap::Heap):

  • heap/MarkStack.cpp:

(JSC::MarkStackArray::MarkStackArray):

  • heap/MarkStack.h:
  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::SlotVisitor):

10:38 AM Changeset in webkit [179347] by Chris Dumez
  • 29 edits in trunk/Source

Clean up / modernize PageCache class
https://bugs.webkit.org/show_bug.cgi?id=141009

Reviewed by Darin Adler.

Source/WebCore:

Clean up / modernize PageCache class:

  • Use more references instead of pointers
  • Use a ListHashSet<Ref<HistoryItem>> internally instead of a linked list of HistoryItem*. This avoids having the ref/unref HistoryItems manually and maintaining the list size separately. It also simplifies the code dealing with the container and makes looking up HistoryItems faster as a bonus. Similarly to the previous implementation, we are adding elements to one end and removing from the opposite end when pruning to drop old history items first. Note that even though the previous implementation was called LRUList, it did not move items to the front when accessed. The new implementation doesn't either.
    • Rename "capacity" to "maxSize" to avoid confusing with containers' capacity (which doesn't limit the size of the container).
    • Use unsigned instead of int for all values that are supposed to be positive.
    • Do not explicitely define the default constructor and let the compiler generate it for us (and use in-class initialization for members)
    • Fix indentation in the header.

Source/WebKit/mac:

Clean up / modernize PageCache class.

  • History/WebBackForwardList.mm:

(-[WebBackForwardList pageCacheSize]):

  • WebView/WebView.mm:

(-[WebView _loadBackForwardListFromOtherView:]):
(-[WebView goToBackForwardItem:]):
(+[WebView _setCacheModel:]):

Source/WebKit/win:

Clean up / modernize PageCache class.

  • WebView.cpp:

(WebView::setCacheModel):

Source/WebKit2:

Clean up / modernize PageCache class.

  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::WebBackForwardListProxy::removeItem):
(WebKit::WebBackForwardListProxy::close):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::goForward):
(WebKit::WebPage::goBack):
(WebKit::WebPage::goToBackForwardItem):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::releasePageCache):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformSetCacheModel):

  • WebProcess/soup/WebProcessSoup.cpp:

(WebKit::WebProcess::platformSetCacheModel):

10:23 AM Changeset in webkit [179346] by Csaba Osztrogonác
  • 9 edits in trunk/Source/WebKit2

[EFL][GTK] Fix the build after r179326
https://bugs.webkit.org/show_bug.cgi?id=141027

Reviewed by Alexey Proskuryakov.

Guard MessageRecorder implementation with USE(DTRACE)
for platforms not supporting DTrace.

Original patch by Carlos Garcia Campos <cgarcia@igalia.com>

  • Platform/IPC/ArgumentCoders.cpp:
  • Platform/IPC/ArgumentCoders.h:
  • Platform/IPC/Connection.cpp:

(IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
(IPC::Connection::sendMessage):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::dispatchSyncMessage):
(IPC::Connection::dispatchMessage):

  • Platform/IPC/MessageDecoder.cpp:

(IPC::MessageDecoder::MessageDecoder):

  • Platform/IPC/MessageDecoder.h:
  • Platform/IPC/MessageEncoder.cpp:

(IPC::MessageEncoder::MessageEncoder):
(IPC::MessageEncoder::encodeHeader):

  • Platform/IPC/MessageEncoder.h:
  • Platform/IPC/MessageRecorder.h:
8:58 AM Changeset in webkit [179345] by Csaba Osztrogonác
  • 5 edits in trunk/Source

Move HAVE_DTRACE definition back to Platform.h
https://bugs.webkit.org/show_bug.cgi?id=141033

Reviewed by Dan Bernstein.

Source/JavaScriptCore:

  • Configurations/Base.xcconfig:
  • JavaScriptCore.xcodeproj/project.pbxproj:

Source/WTF:

  • wtf/Platform.h:
8:19 AM Changeset in webkit [179344] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebCore

HTMLImageLoader: fix build failure on assert condition after r179340
https://bugs.webkit.org/show_bug.cgi?id=140722

Patch by Julien Isorce <j.isorce@samsung.com> on 2015-01-29
Reviewed by Csaba Osztrogonác.

  • html/HTMLImageLoader.cpp:

(WebCore::HTMLImageLoader::imageChanged): image() directly
returns a CachedImage*.

5:33 AM Changeset in webkit [179343] by Csaba Osztrogonác
  • 3 edits in trunk/Tools

Make run-jsc-stress-tests --remote work on Linux too
https://bugs.webkit.org/show_bug.cgi?id=141000

Reviewed by Darin Adler.

  • Scripts/jsc-stress-test-helpers/shell-runner.sh: Omit error message of sysctl,

use bash/dash compatible signal names, use Linux/Mac compatible find options,
use bash/dash compatible functions.

  • Scripts/run-jsc-stress-tests: Use Linux/Mac compatible find options.
5:32 AM Changeset in webkit [179342] by Csaba Osztrogonác
  • 3 edits in trunk/Tools

[buildbot] Simplify jscore-test buildstep
https://bugs.webkit.org/show_bug.cgi?id=140821

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/build.webkit.org-config/master.cfg:

(RunJavaScriptCoreTests): Inherited from TestWithFailureCount and removed useless actual.html logfile.
(RunJavaScriptCoreTests.countFailures): Added.
(RunJavaScriptCoreTests.commandComplete): Deleted.
(RunJavaScriptCoreTests.evaluateCommand): Deleted.
(RunJavaScriptCoreTests.getText): Deleted.
(RunJavaScriptCoreTests.getText2): Deleted.

  • BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py: Updated.

(RunJavaScriptCoreTestsTest.test_mozilla_failure_old_output):
(RunJavaScriptCoreTestsTest.test_mozilla_failures_old_output):
(RunJavaScriptCoreTestsTest.test_jsc_stress_failure_new_output):
(RunJavaScriptCoreTestsTest.test_jsc_stress_failures_new_output):

4:09 AM Changeset in webkit [179341] by Csaba Osztrogonác
  • 3 edits in trunk/Tools

Unreviewed, revert r179337, we don't need this dependency.

  • efl/install-dependencies:
  • gtk/install-dependencies:
3:32 AM Changeset in webkit [179340] by commit-queue@webkit.org
  • 11 edits in trunk/Source/WebCore

CachedImage: ensure clients overrides imageChanged instead of notifyFinished
https://bugs.webkit.org/show_bug.cgi?id=140722

Patch by Julien Isorce <j.isorce@samsung.com> on 2015-01-29
Reviewed by Tim Horton.

imageChanged is called whenever a frame of an image changes
because we got more data from the network.

notifyFinished was called when the image was entirely loaded.

The problem was that some clients were implementing only
imageChanged (ex: RenderBox), some only notifyFinished and
some both (ex: RenderImage) which made the situation difficult
to understand and to maintain.

For example when the image finished loading, both imageChanged
and notifyFinished were called with the difference that for the
first one isLoaded() returned false.
It could result in functions being called twice in a row,
ex: contentChanged(ImageChanged).

So this patch tries to simplify the situation by marking
CachedImageClient::notifyFinished final in order to prevent
clients from implementing it.
Indeed this patch ensure that CachedImage clients implement
and only implement imageChanged function.

Also Clients can now differentiate intermediate and end
calls by checking isLoaded() in imageChanged.

  • html/HTMLImageLoader.cpp:

(WebCore::HTMLImageLoader::imageChanged): Added instead
of notifyFinished.
(WebCore::HTMLImageLoader::notifyFinished): Deleted.

  • html/HTMLImageLoader.h:
  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::imageChanged): Added instead
of notifyFinished.
(WebCore::ImageLoader::notifyFinished): Deleted.

  • loader/ImageLoader.h:
  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::finishLoading): Explicilty mark image as
loaded and before notifying observers. So that it avoids to call
notifyFinished (from CachedResource::finishLoading).

  • loader/cache/CachedImageClient.h:

Make CachedImageClient::notifyFinished final to make sure
sub classes implement imageChanged instead.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::notifyFinished): Deleted.
ImageChanged already exists and is more clever than notifyFinished.
Indeed invalidateBackgroundObscurationStatus() will be called by
RenderReplaced::layout() upon call to setNeedsLayout() in
RenderImage::imageDimensionsChanged.
Also contentChanged(ImageChanged) is now called only when necessary.

  • rendering/RenderImage.h:
  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::imageChanged): Added instead
of notifyFinished.
(WebCore::SVGFEImageElement::notifyFinished): Deleted.

  • svg/SVGFEImageElement.h:
2:56 AM Changeset in webkit [179339] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit2

Avoid manually handling quickLookWithEvent: if the immediate action gesture recognizer will do Lookup for us
https://bugs.webkit.orgshow_bug.cgi?id=141018
<rdar://problem/19619999>

  • UIProcess/API/mac/WKView.mm:

(-[WKView quickLookWithEvent:]):
Yosemite is 101000, not 10100.

12:47 AM Changeset in webkit [179338] by shiva.jm@samsung.com
  • 2 edits in trunk/Tools
Note: See TracTimeline for information about the timeline view.