WebKit-https.git
5 years agoTry to fix the iOS build.
weinig@apple.com [Fri, 30 Jan 2015 00:51:32 +0000 (00:51 +0000)]
Try to fix the iOS build.

* WebCore.exp.in:

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

5 years ago[Win] Build fix after r179368.
bfulgham@apple.com [Fri, 30 Jan 2015 00:45:23 +0000 (00:45 +0000)]
[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):

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

5 years agoAnother follow-on, spotted this mistake. This used to be
bdakin@apple.com [Fri, 30 Jan 2015 00:43:26 +0000 (00:43 +0000)]
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):

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

5 years ago[Win] Build fix after r179368.
bfulgham@apple.com [Fri, 30 Jan 2015 00:39:04 +0000 (00:39 +0000)]
[Win] Build fix after r179368.

* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::shapeAndPlaceItem): Don't use the no longer
valid isPrinterFont method.

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

5 years agoFollow-on, fixing a bad merge from my last change.
bdakin@apple.com [Fri, 30 Jan 2015 00:38:33 +0000 (00:38 +0000)]
Follow-on, fixing a bad merge from my last change.

* Shared/WebPreferencesDefinitions.h:

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

5 years agoSkip these two tests in the stress testing since the feature isn't enabled.
rniwa@webkit.org [Fri, 30 Jan 2015 00:33:06 +0000 (00:33 +0000)]
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:

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

5 years agomedia/track/track-in-band-cues-added-once.html fails sometimes
eric.carlson@apple.com [Fri, 30 Jan 2015 00:04:37 +0000 (00:04 +0000)]
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.

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

5 years agoREGRESSION (OS X 10.10.2): media/track/track-in-band-style.html frequently times out
eric.carlson@apple.com [Fri, 30 Jan 2015 00:02:41 +0000 (00:02 +0000)]
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.

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

5 years agoRemove more Mountain Lion code from WebKit
bdakin@apple.com [Fri, 30 Jan 2015 00:02:02 +0000 (00:02 +0000)]
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:]):

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

5 years agoBuilt result takes too long to be compressed on bots
ap@apple.com [Thu, 29 Jan 2015 23:30:18 +0000 (23:30 +0000)]
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):

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

5 years agoRemove more Mountain Lion code from WebKit2
bdakin@apple.com [Thu, 29 Jan 2015 23:19:41 +0000 (23:19 +0000)]
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:

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

5 years agoRemoved op_ret_object_or_this
ggaren@apple.com [Thu, 29 Jan 2015 23:17:18 +0000 (23:17 +0000)]
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.

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

5 years agoImplement ES6 class syntax without inheritance support
rniwa@webkit.org [Thu, 29 Jan 2015 22:59:19 +0000 (22:59 +0000)]
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.

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

5 years agoFix the build after r179368
timothy_horton@apple.com [Thu, 29 Jan 2015 22:58:22 +0000 (22:58 +0000)]
Fix the build after r179368

* platform/graphics/FontDescription.h:
(WebCore::FontDescription::equalForTextAutoSizing):

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

5 years agoBorder-radius clipping on a stacking context causes descendants to not render
simon.fraser@apple.com [Thu, 29 Jan 2015 22:57:53 +0000 (22:57 +0000)]
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.

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

5 years agoRemove support for screen font substitution
weinig@apple.com [Thu, 29 Jan 2015 22:40:17 +0000 (22:40 +0000)]
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.

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

5 years agoFrequent kernel panics when running WebKit regression tests
ap@apple.com [Thu, 29 Jan 2015 22:14:31 +0000 (22:14 +0000)]
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.

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

5 years agoJapanese line breaking rules need to be respected before and after Ruby.
hyatt@apple.com [Thu, 29 Jan 2015 22:03:40 +0000 (22:03 +0000)]
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.

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

5 years ago2015-01-29 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Thu, 29 Jan 2015 21:58:19 +0000 (21:58 +0000)]
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.

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

5 years agoRemove more Mountain Lion code from WebCore
bdakin@apple.com [Thu, 29 Jan 2015 21:57:04 +0000 (21:57 +0000)]
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):

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

5 years agoFix the build with newer Clang
timothy_horton@apple.com [Thu, 29 Jan 2015 21:43:35 +0000 (21:43 +0000)]
Fix the build with newer Clang

* NetworkProcess/NetworkConnectionToWebProcess.h:
These should be 'override's.

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

5 years agoRemove an extraneous check from the parser of :not()
benjamin@webkit.org [Thu, 29 Jan 2015 21:43:05 +0000 (21:43 +0000)]
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.

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

5 years agoUse FastMalloc (bmalloc) instead of BlockAllocator for GC pages
ggaren@apple.com [Thu, 29 Jan 2015 21:41:32 +0000 (21:41 +0000)]
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):

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

5 years agoFix the iOS build after r179347
timothy_horton@apple.com [Thu, 29 Jan 2015 21:32:32 +0000 (21:32 +0000)]
Fix the iOS build after r179347

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):

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

5 years agoUse Vector instead of GCSegmentedArray in CodeBlockSet
ggaren@apple.com [Thu, 29 Jan 2015 20:56:16 +0000 (20:56 +0000)]
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):

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

5 years agoUnreviewed, fix no-JIT build.
fpizlo@apple.com [Thu, 29 Jan 2015 20:49:13 +0000 (20:49 +0000)]
Unreviewed, fix no-JIT build.

* jit/PolymorphicCallStubRoutine.cpp:

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

5 years agoPolymorphic call inlining should be based on polymorphic call inline caching rather...
fpizlo@apple.com [Thu, 29 Jan 2015 20:33:45 +0000 (20:33 +0000)]
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.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CallEdge.h:
(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:

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

5 years agoRefactor String::format to handle unreached va_end.
santoshbit2007@gmail.com [Thu, 29 Jan 2015 19:49:21 +0000 (19:49 +0000)]
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:

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

5 years agoJavaScript bindings constructors should take Ref<ImplType>&&.
akling@apple.com [Thu, 29 Jan 2015 19:41:12 +0000 (19:41 +0000)]
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):

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

5 years agoMark more tests as slow in debug.
ap@apple.com [Thu, 29 Jan 2015 19:28:08 +0000 (19:28 +0000)]
Mark more tests as slow in debug.

* TestExpectations:

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

5 years agoWeb Inspector: ES6: Improved Console Format for Set and Map Objects (like Arrays)
joepeck@webkit.org [Thu, 29 Jan 2015 19:25:16 +0000 (19:25 +0000)]
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:

* TestExpectations:
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.

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

5 years agoUse FastMalloc (bmalloc) instead of BlockAllocator for GC pages
ggaren@apple.com [Thu, 29 Jan 2015 19:20:06 +0000 (19:20 +0000)]
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):

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

5 years agoClean up / modernize PageCache class
cdumez@apple.com [Thu, 29 Jan 2015 18:38:51 +0000 (18:38 +0000)]
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):

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

5 years ago[EFL][GTK] Fix the build after r179326
ossy@webkit.org [Thu, 29 Jan 2015 18:23:45 +0000 (18:23 +0000)]
[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:

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

5 years agoMove HAVE_DTRACE definition back to Platform.h
ossy@webkit.org [Thu, 29 Jan 2015 16:58:15 +0000 (16:58 +0000)]
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:

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

5 years agoHTMLImageLoader: fix build failure on assert condition after r179340
ossy@webkit.org [Thu, 29 Jan 2015 16:19:55 +0000 (16:19 +0000)]
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*.

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

5 years agoMake run-jsc-stress-tests --remote work on Linux too
ossy@webkit.org [Thu, 29 Jan 2015 13:33:51 +0000 (13:33 +0000)]
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.

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

5 years ago[buildbot] Simplify jscore-test buildstep
ossy@webkit.org [Thu, 29 Jan 2015 13:32:25 +0000 (13:32 +0000)]
[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):

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

5 years agoUnreviewed, revert r179337, we don't need this dependency.
ossy@webkit.org [Thu, 29 Jan 2015 12:09:46 +0000 (12:09 +0000)]
Unreviewed, revert r179337, we don't need this dependency.

* efl/install-dependencies:
* gtk/install-dependencies:

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

5 years agoCachedImage: ensure clients overrides imageChanged instead of notifyFinished
commit-queue@webkit.org [Thu, 29 Jan 2015 11:32:53 +0000 (11:32 +0000)]
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:

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

5 years agoAvoid manually handling quickLookWithEvent: if the immediate action gesture recognize...
timothy_horton@apple.com [Thu, 29 Jan 2015 10:56:59 +0000 (10:56 +0000)]
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.

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

5 years agogit-svn-id: https://svn.webkit.org/repository/webkit/trunk@179338 268f45cc-cd09-0410...
shiva.jm@samsung.com [Thu, 29 Jan 2015 08:47:21 +0000 (08:47 +0000)]
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179338 268f45cc-cd09-0410-ab3c-d52691b4dbfc

5 years agoURTBF after r179326, added uuid-dev package as new dependency.
ossy@webkit.org [Thu, 29 Jan 2015 07:44:28 +0000 (07:44 +0000)]
URTBF after r179326, added uuid-dev package as new dependency.

* efl/install-dependencies:
* gtk/install-dependencies:

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

5 years agosecurity/mixedContent/redirect-https-to-http-iframe-in-main-frame test is the same...
commit-queue@webkit.org [Thu, 29 Jan 2015 07:00:37 +0000 (07:00 +0000)]
security/mixedContent/redirect-https-to-http-iframe-in-main-frame test is the same as security/mixedContent/redirect-http-to-https-iframe-in-main-frame.html
https://bugs.webkit.org/show_bug.cgi?id=140876

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2015-01-28
Reviewed by Darin Adler.

Fix the test so it's not identical to the redirect-http-to-https-iframe-in-main-frame
test, and update the expected results.

* http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame-expected.txt:
* http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame.html:

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

5 years agoPoor performance on IE's Chalkboard benchmark.
commit-queue@webkit.org [Thu, 29 Jan 2015 05:23:28 +0000 (05:23 +0000)]
Poor performance on IE's Chalkboard benchmark.
https://bugs.webkit.org/show_bug.cgi?id=140753.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-01-28
Reviewed by Zalan Bujtas.

PerformanceTests:

* SVG/UnderTheSeeBenchmark.html: Added
* SVG/WorldcupBenchmark.html: Added.
* SVG/resources/RenderAnimator.css: Added.
* SVG/resources/RenderAnimator.js: Added.
These are benchmarks for the SVG rendering. Mainly we want to measure how fast
the SVG rendering will be when only a small part of it is drawn.

Source/WebCore:

Test: PerformanceTests/SVG/UnderTheSeeBenchmark.html
      PerformanceTests/SVG/WorldcupBenchmark.html

The SVG rendering code was not skipping the SVG elements which are outside the
clipping rectangle. We were drawing all the SVG elements even if some of them
are completely outside the clipping rectangle. The fix is to pass the correct
dirty rectangle to the ScrollView which then gets propagated to the SVG renderers.

* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::draw):
SVGImage::draw() needs to pass the intersection of 'srcRect' and context->clipBounds(),
to ScrollView::paint(). This will ensure RenderSVGShape::paint() gets the correct
clipping rectangle. If there is no intersection between the boundingBox of the
RenderSVGShape and the clipping rectangle, the RenderSVGShape will not be drawn.

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

5 years agoAdd API::{FrameInfo, NavigationAction, NavigationResponse} types
timothy_horton@apple.com [Thu, 29 Jan 2015 03:05:12 +0000 (03:05 +0000)]
Add API::{FrameInfo, NavigationAction, NavigationResponse} types
https://bugs.webkit.org/show_bug.cgi?id=140982

Reviewed by Sam Weinig.

Make C++ API objects for WK{FrameInfo, NavigationAction, NavigationResponse}
to wrap around, as a step towards moving Modern API logic down into WebPageProxy.

* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/APIFrameInfo.cpp: Added.
* UIProcess/API/APIFrameInfo.h: Added.
* UIProcess/API/APINavigationAction.h: Added.
* UIProcess/API/APINavigationResponse.h: Added.
Add API::FrameInfo, API::NavigationAction, and API::NavigationResponse.

* UIProcess/API/Cocoa/WKFrameInfo.mm:
* UIProcess/API/Cocoa/WKFrameInfoInternal.h:
Make WKFrameInfo a WKObject, wrapping a API::FrameInfo.

* UIProcess/API/Cocoa/WKNavigationAction.mm:
* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
Make WKNavigationAction a WKObject, wrapping a API::NavigationAction.

* UIProcess/API/Cocoa/WKNavigationResponse.mm:
* UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
Make WKNavigationResponse a WKObject, wrapping a API::NavigationResponse.

* UIProcess/API/Cocoa/WKUserContentController.mm:
Adopt API::FrameInfo.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
Adopt API::FrameInfo, and reorganize the code slightly.
Adopt API::NavigationAction.

(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
Adopt API::FrameInfo.
Adopt API::NavigationResponse.

(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
Adopt API::FrameInfo.

* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
Adopt API::FrameInfo.

* WebKit2.xcodeproj/project.pbxproj:

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

5 years agohttp/tests/xmlhttprequest/workers/methods.html sometimes times out with disk cache...
antti@apple.com [Thu, 29 Jan 2015 02:52:30 +0000 (02:52 +0000)]
http/tests/xmlhttprequest/workers/methods.html sometimes times out with disk cache enabled
https://bugs.webkit.org/show_bug.cgi?id=140976

Reviewed by Chris Dumez.

The previous fix sometimes invoked the completion handler twice. Explicitly track if we
have called it or not.

* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::dispatchRetrieveOperation):

Also move the error case to the done branch. According to the documentation 'done' is always set on error.

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

5 years agoAdd a WebKitMessageRecorder DTrace provider, exposing IPC details to DTrace
timothy_horton@apple.com [Thu, 29 Jan 2015 02:32:24 +0000 (02:32 +0000)]
Add a WebKitMessageRecorder DTrace provider, exposing IPC details to DTrace
https://bugs.webkit.org/show_bug.cgi?id=140673

Reviewed by Sam Weinig.

* Platform/IPC/ArgumentCoders.cpp:
(IPC::ArgumentCoder<uuid_t>::encode):
(IPC::ArgumentCoder<uuid_t>::decode):
* Platform/IPC/ArgumentCoders.h:
Add a uuid_t (simple) argument coder.
Fix a mis-named header-guard #ifdef.

* Platform/IPC/Connection.cpp:
(IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
(IPC::Connection::dispatchSyncMessage):
Sync message replies inherit the message UUID from the incoming sync message.

(IPC::Connection::sendMessage):
(IPC::Connection::waitForMessage):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
Record outgoing messages. Because sendSyncMessage calls sendMessage,
we have to explicitly avoid recording the message twice.

(IPC::Connection::dispatchMessage):
Record the incoming message.

(IPC::Connection::remoteProcessID):
Add remoteProcessID(), which tries to determine the pid of the remote process.

* Platform/IPC/Connection.h:
(IPC::Connection::xpcConnection):
This can be const.

(IPC::Connection::isValid):
Make this public.

* Platform/IPC/MessageDecoder.cpp:
(IPC::MessageDecoder::MessageDecoder):
* Platform/IPC/MessageDecoder.h:
(IPC::MessageDecoder::setMessageProcessingToken):
(IPC::MessageDecoder::UUID):
Decode and store the message UUID.
Store a MessageProcessingToken for the lifetime of the MessageDecoder;
this ensures that all time spent processing the incoming message will be
counted against that message.

* Platform/IPC/MessageEncoder.cpp:
(IPC::MessageEncoder::MessageEncoder):
By default, create a new UUID for the message. Alternatively, allow clients
to pass the message UUID in (used for sync message replies).
Store the messageReceiverName and messageName.

(IPC::MessageEncoder::encodeHeader):
Factor encodeHeader() out of the constructors so most of their code can be shared.

(IPC::MessageEncoder::isSyncMessage):
(IPC::MessageEncoder::shouldDispatchMessageWhenWaitingForSyncReply):
Add getters for these flags.

* Platform/IPC/MessageEncoder.h:
(IPC::MessageEncoder::messageReceiverName):
(IPC::MessageEncoder::messageName):
(IPC::MessageEncoder::destinationID):
(IPC::MessageEncoder::UUID):

* Platform/IPC/MessageRecorder.h: Added.
* Platform/IPC/MessageRecorder.cpp: Added.
(MessageRecorder::MessageRecorder):
Add a class that interfaces with a custom DTrace provider to log incoming and outgoing messages.

(MessageRecorder::shared):
(MessageRecorder::isEnabled):
Determine if either of the message probes are enabled. If not, we'll avoid most of the
work associated with MessageRecorder.

(MessageRecorder::recordOutgoingMessage):
(MessageRecorder::recordIncomingMessage):
Build a WebKitMessageRecord and MessageProcessingToken from the Message(De|En)coder.
Once the MessageProcessingToken is deallocated, the probe will be invoked with the WebKitMessageRecord.

(MessageRecorder::MessageProcessingToken::MessageProcessingToken):
(MessageRecorder::MessageProcessingToken::~MessageProcessingToken):
Keep track of when the token is created and destroyed; these are considered the beginning
and ending "processing" times of the message (and as such the token should be kept alive for
exactly as long as the message is being processed).

* Platform/IPC/MessageRecorderProbes.d: Added.
Add a DTrace provider source file with two probes, message_sent and message_received.
The struct must match the struct in MessageRecorder.h.

* Platform/IPC/ProcessType.h: Added.
Add an enum of process types.

* WebKit2.xcodeproj/project.pbxproj:

* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseToWebProcessConnection.h:
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkProcess.h:
* WebProcess/Databases/WebToDatabaseProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Plugins/PluginProcessConnection.h:
* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspectorUI.h:
* WebProcess/WebProcess.h:
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/WebProcessProxy.h:
* PluginProcess/PluginProcess.h:
* PluginProcess/WebProcessConnection.h:
Annotate Connection::Clients with process types.

* Scripts/dtrace/trace-webkit2-messages.d: Added.
Add a DTrace script that outputs a small blob of JSON per message.

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

5 years agoWindows return -1 when calling vsnprintf with arguments that exceed target buffer...
commit-queue@webkit.org [Thu, 29 Jan 2015 02:32:19 +0000 (02:32 +0000)]
Windows return -1 when calling vsnprintf with arguments that exceed target buffer size
https://bugs.webkit.org/show_bug.cgi?id=140917

Patch by Namhoon Kim <namkim@ea.com> on 2015-01-28
Reviewed by Brent Fulgham.

Fix return value of vsnprintf when windows API return -1 to denote
requested buffer exceeded. Replace return value by calling vscprintf.

* wtf/StringExtras.h:
(snprintf): Fix return value by calling vscprintf when buffer exceeded.
(wtf_vsnprintf): Ditto.

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

5 years agoScroll snap points do not work in the vertical direction
bfulgham@apple.com [Thu, 29 Jan 2015 02:15:47 +0000 (02:15 +0000)]
Scroll snap points do not work in the vertical direction
https://bugs.webkit.org/show_bug.cgi?id=141001
<rdar://problem/19632089>

Reviewed by Beth Dakin.

New scroll snap tests are being prepared separately. A manual test case is attached to the issue.

* page/EventHandler.cpp:
(WebCore::handleWheelEventInAppropriateEnclosingBoxForSingleAxis): We want to consider momentum end phase
when dealing with Scroll Snap Points.
* platform/mac/AxisScrollSnapAnimator.mm:
(WebCore::AxisScrollSnapAnimator::handleWheelEvent): We do NOT want to bail out early here. In fact, it's strange
that this code was like this at all, since it meant a large number of cases were not being used. We also want to
trigger the scroll snap animation (when applicable) upon an inertia scroll end.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::gestureShouldBeginSnap): Added.
(WebCore::ScrollAnimatorMac::allowsVerticalStretching): If we have automatic elasticity, and we have active scroll
snap points, we want to let the scroll snap animator deal with the gesture.
(WebCore::ScrollAnimatorMac::allowsHorizontalStretching): Ditto.

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

5 years agoStart fixing the handling of Element's attributes when they contain non-ASCII characters
benjamin@webkit.org [Thu, 29 Jan 2015 02:05:10 +0000 (02:05 +0000)]
Start fixing the handling of Element's attributes when they contain non-ASCII characters
https://bugs.webkit.org/show_bug.cgi?id=141016

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-01-28
Reviewed by Ryosuke Niwa.

Source/WebCore:

Attribute handling does not work properly when the attribute name contains non-ASCII character.

The HTML parser tokenize those names as ASCII lowercase. Some of the code is CSS and Element use
unicode lowercase for the names. This breaks all the APIs as soon as a name contains a character
that is non-ASCII and uppercase since some APIs change it, other don't.

This patch is a first step toward fixing this mess, it only address the simple cases.
The HTML spec says the names should be compared ASCII case-insensitive, to I spread that behavior
to places that were using unicode.

Tests: fast/css/attribute-ascii-case-insensitive-html.html
       fast/css/attribute-ascii-case-insensitive-xhtml-expected.xhtml
       fast/css/attribute-ascii-case-insensitive-xhtml.xhtml
       fast/css/attribute-ascii-case-insensitive-xml-in-html.html
       fast/dom/Element/attribute-ascii-case-insensitive-1.html
       fast/dom/Element/attribute-ascii-case-insensitive-2.html
       fast/selectors/attribute-ascii-case-insensitive-style-update.html
       fast/selectors/element-matches-attribute-ascii-case-insensitive-html.html
       fast/selectors/querySelector-attribute-ascii-case-insensitive-html.html

* css/CSSSelector.cpp:
(WebCore::CSSSelector::setAttribute):
* dom/Element.cpp:
(WebCore::Element::synchronizeAttribute):
(WebCore::Element::setAttribute):
(WebCore::Element::removeAttribute):
(WebCore::Element::hasAttribute):
* dom/ElementData.cpp:
(WebCore::ElementData::findAttributeIndexByNameSlowCase):
* dom/ElementData.h:
(WebCore::ElementData::findAttributeIndexByName):

LayoutTests:

Start some basic testing.

Some tests are failing due to the more complicated case being handled incorrectly, this will
be fixed in follow ups.

* fast/css/attribute-ascii-case-insensitive-html-expected.html: Added.
* fast/css/attribute-ascii-case-insensitive-html.html: Added.
* fast/css/attribute-ascii-case-insensitive-xhtml-expected.xhtml: Added.
* fast/css/attribute-ascii-case-insensitive-xhtml.xhtml: Added.
* fast/css/attribute-ascii-case-insensitive-xml-in-html-expected.html: Added.
* fast/css/attribute-ascii-case-insensitive-xml-in-html.html: Added.
* fast/dom/Element/attribute-ascii-case-insensitive-1-expected.txt: Added.
* fast/dom/Element/attribute-ascii-case-insensitive-1.html: Added.
* fast/dom/Element/attribute-ascii-case-insensitive-2-expected.txt: Added.
* fast/dom/Element/attribute-ascii-case-insensitive-2.html: Added.
* fast/selectors/attribute-ascii-case-insensitive-style-update-expected.txt: Added.
* fast/selectors/attribute-ascii-case-insensitive-style-update.html: Added.
* fast/selectors/element-matches-attribute-ascii-case-insensitive-html-expected.txt: Added.
* fast/selectors/element-matches-attribute-ascii-case-insensitive-html.html: Added.
* fast/selectors/querySelector-attribute-ascii-case-insensitive-html-expected.txt: Added.
* fast/selectors/querySelector-attribute-ascii-case-insensitive-html.html: Added.

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

5 years agoWeb Inspector: Change Main Frame Status Buttons when debugging Augmented JSContext
joepeck@webkit.org [Thu, 29 Jan 2015 02:01:17 +0000 (02:01 +0000)]
Web Inspector: Change Main Frame Status Buttons when debugging Augmented JSContext
https://bugs.webkit.org/show_bug.cgi?id=141006

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
New "Restart" string.

* UserInterface/Base/Main.js:
(WebInspector.canArchiveMainFrame):
* UserInterface/Views/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype.updateStatusForMainFrame):
(WebInspector.FrameTreeElement.prototype._updateDownloadButton):
Update the tooltip when in a non-Web debuggable, and only show
the Download button when in a Web debuggable.

* UserInterface/Views/TreeElementStatusButton.js:
(WebInspector.TreeElementStatusButton.prototype.set hidden):
Oops! The implementation was backwards. Simplify with classList.toggle.

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

5 years agoWeb Inspector: Crash closing inspected page with frequent activity
commit-queue@webkit.org [Thu, 29 Jan 2015 01:49:21 +0000 (01:49 +0000)]
Web Inspector: Crash closing inspected page with frequent activity
https://bugs.webkit.org/show_bug.cgi?id=140973

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-01-28
Reviewed by Timothy Hatcher.

* WebProcess/WebPage/WebInspector.h:
(WebKit::WebInspector::disconnectFromPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):
Be sure to close the WebInspector connection through the page
when the page is closing so that the WebKit::WebInspector is
relinquishes itself as the InspectorFrontendChannel.

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

5 years agoAvoid manually handling quickLookWithEvent: if the immediate action gesture recognize...
timothy_horton@apple.com [Thu, 29 Jan 2015 01:09:50 +0000 (01:09 +0000)]
Avoid manually handling quickLookWithEvent: if the immediate action gesture recognizer will do Lookup for us
https://bugs.webkit.org/show_bug.cgi?id=141018
<rdar://problem/19619999>

Reviewed by Beth Dakin.

* UIProcess/API/mac/WKView.mm:
(-[WKView quickLookWithEvent:]):
If we have an immediate action gesture recognizer, just call super and
avoid WebKit's special quickLookWithEvent: implementation.

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

5 years agoRemoved fastMallocForbid / fastMallocAllow
ggaren@apple.com [Thu, 29 Jan 2015 00:58:13 +0000 (00:58 +0000)]
Removed fastMallocForbid / fastMallocAllow
https://bugs.webkit.org/show_bug.cgi?id=141012

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:

Copy non-current thread stacks before scanning them instead of scanning
them in-place.

This operation is uncommon (i.e., never in the web content process),
and even in a stress test with 4 threads it only copies about 27kB,
so I think the performance cost is OK.

Scanning in-place requires a complex dance where we constrain our GC
data structures not to use malloc, free, or any other interesting functions
that might acquire locks. We've gotten this wrong many times in the past,
and I just got it wrong again yesterday. Since this code path is rarely
tested, I want it to just make sense, and not depend on or constrain the
details of the rest of the GC heap's design.

* heap/MachineStackMarker.cpp:
(JSC::otherThreadStack): Factored out a helper function for dealing with
unaligned and/or backwards pointers.

(JSC::MachineThreads::tryCopyOtherThreadStack): This is now the only
constrained function, and it only calls memcpy and low-level thread APIs.

(JSC::MachineThreads::tryCopyOtherThreadStacks): The design here is that
you do one pass over all the threads to compute their combined size,
and then a second pass to do all the copying. In theory, the threads may
grow in between passes, in which case you'll continue until the threads
stop growing. In practice, you never continue.

(JSC::growBuffer): Helper function for growing.

(JSC::MachineThreads::gatherConservativeRoots):
(JSC::MachineThreads::gatherFromOtherThread): Deleted.
* heap/MachineStackMarker.h: Updated for interface changes.

Source/WTF:

Removed the forbid / allow API because it is no longer used.

* wtf/FastMalloc.cpp:
(WTF::tryFastMalloc):
(WTF::fastMalloc):
(WTF::tryFastCalloc):
(WTF::fastCalloc):
(WTF::fastFree):
(WTF::tryFastRealloc):
(WTF::fastRealloc):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
(WTF::isForbidden): Deleted.
(WTF::fastMallocForbid): Deleted.
(WTF::fastMallocAllow): Deleted.
(WTF::initializeIsForbiddenKey): Deleted.
* wtf/FastMalloc.h:

Tools:

Fixed a test bug I noticed while testing.

* DumpRenderTree/JavaScriptThreading.cpp:
(stopJavaScriptThreads): Lock the javaScriptThreads lock before
accessing javaScriptThreads -- otherwise, you'll ASSERT.

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

5 years agoRemove remaining PLATFORM(WIN) code blocks from WebKit2.
commit-queue@webkit.org [Thu, 29 Jan 2015 00:40:53 +0000 (00:40 +0000)]
Remove remaining PLATFORM(WIN) code blocks from WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=140972

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-01-28
Reviewed by Darin Adler.

* WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):

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

5 years ago[Win] Actually delete the file!
bfulgham@apple.com [Thu, 29 Jan 2015 00:39:05 +0000 (00:39 +0000)]
[Win] Actually delete the file!

* platform/win/fast/events/ondrop-text-htmlt-expected.txt: Removed.

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

5 years ago[Win] Unreviewed gardening. Get rid of misspelled expected file.
bfulgham@apple.com [Thu, 29 Jan 2015 00:37:04 +0000 (00:37 +0000)]
[Win] Unreviewed gardening. Get rid of misspelled expected file.

Get rid of the 'ondrop-text-htmlt-expected.txt' file, and commit a new baseline
from the test system.

* platform/win/fast/events/ondrop-text-htmlt-expected.txt: Removed.
* platform/win/fast/text/backslash-to-yen-sign-euc-expected.txt:

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

5 years agoasan.xcconfig should use CLANG_ADDRESS_SANITIZER=YES instead of -fsanitize=address
dburkart@apple.com [Thu, 29 Jan 2015 00:30:07 +0000 (00:30 +0000)]
asan.xcconfig should use CLANG_ADDRESS_SANITIZER=YES instead of -fsanitize=address
https://bugs.webkit.org/show_bug.cgi?id=141015

Reviewed by Alexey Proskuryakov.

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

5 years agoFix the build.
weinig@apple.com [Wed, 28 Jan 2015 23:56:34 +0000 (23:56 +0000)]
Fix the build.

* Scripts/copy-webkitlibraries-to-product-directory:

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

5 years agoRemove libWebKitSystemInterfaceMountainLion.a
weinig@apple.com [Wed, 28 Jan 2015 23:46:59 +0000 (23:46 +0000)]
Remove libWebKitSystemInterfaceMountainLion.a

Reviewed by Mark Rowe.

* libWebKitSystemInterfaceMountainLion.a: Removed.

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

5 years agoSimple line layout: Drop uncommitted/committed terms from LineState.
zalan@apple.com [Wed, 28 Jan 2015 23:36:46 +0000 (23:36 +0000)]
Simple line layout: Drop uncommitted/committed terms from LineState.
https://bugs.webkit.org/show_bug.cgi?id=141005

Reviewed by Antti Koivisto.

Fragments form segments and segments turn into runs on the lines.
We add fragments only when they fit so they should not be in 'uncommitted' state at all.

No change in functionality.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::LineState::createRun):
(WebCore::SimpleLineLayout::LineState::addFragment):
(WebCore::SimpleLineLayout::LineState::addWhitespace):
(WebCore::SimpleLineLayout::LineState::hasWhitespaceOnly):
(WebCore::SimpleLineLayout::LineState::width):
(WebCore::SimpleLineLayout::LineState::firstCharacterFits):
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::firstFragment):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns): Unnecessary assert.
(WebCore::SimpleLineLayout::LineState::commitAndCreateRun): Deleted.
(WebCore::SimpleLineLayout::LineState::addUncommitted): Deleted.
(WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): Deleted.

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

5 years agoRegression(r177494): Bad cast to WebKitCSSResourceValue in StyleBuilderConverter...
cdumez@apple.com [Wed, 28 Jan 2015 23:20:36 +0000 (23:20 +0000)]
Regression(r177494): Bad cast to WebKitCSSResourceValue in StyleBuilderConverter::convertMaskImageOperations()
https://bugs.webkit.org/show_bug.cgi?id=140991
<rdar://problem/19625305>

Reviewed by Antti Koivisto.

Source/WebCore:

convertMaskImageOperations() was assuming that the CSSValueList's values
were always WebKitCSSResourceValue values. However, they can be
CSSInitialValues as well so we should check before casting.

Test: css3/masking/mask-image-initial-value-crash.html

* css/StyleBuilderConverter.h:
(WebCore::maskImageValueFromIterator):
(WebCore::StyleBuilderConverter::convertMaskImageOperations):

LayoutTests:

Add layout test to cover the case where a CSSValue is incorrectly casted to
a WebKitCSSResourceValue in StyleBuilderConverter::convertMaskImageOperations(),
thus hitting an assertion in downcast<>() on debug builds.

* css3/masking/mask-image-initial-value-crash-expected.txt: Added.
* css3/masking/mask-image-initial-value-crash.html: Added.

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

5 years agoIncrease the FileUpload block size in an attempt to improve network performance.
lforschler@apple.com [Wed, 28 Jan 2015 22:37:04 +0000 (22:37 +0000)]
Increase the FileUpload block size in an attempt to improve network performance.

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(UploadBuiltProduct.__init__):

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

5 years agoRemove Mountain Lion code from WebKit and WebKit2
bdakin@apple.com [Wed, 28 Jan 2015 22:22:16 +0000 (22:22 +0000)]
Remove Mountain Lion code from WebKit and WebKit2
https://bugs.webkit.org/show_bug.cgi?id=141010

Reviewed by Sam Weinig.

Source/WebKit/mac:

* DOM/WebDOMOperations.mm:
(toNSEventPhase):
* WebView/WebHTMLView.mm:
(isQuickLookEvent):

Source/WebKit2:

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::initializeSandbox):
* Shared/mac/WebEventFactory.mm:
(WebKit::phaseForEvent):
* UIProcess/API/mac/WKView.mm:
(-[WKView quickLookWithEvent:]):
(-[WKView updateLayer]):
(-[WKView createFullScreenWindow]):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didFinishLaunching):
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit::shouldUseXPC):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didFinishLaunching):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::isViewVisible):
* WebKit2Prefix.h:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebProcess/com.apple.WebProcess.sb.in:

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

5 years agoRemove dead code from MemoryCache
cdumez@apple.com [Wed, 28 Jan 2015 22:20:36 +0000 (22:20 +0000)]
Remove dead code from MemoryCache
https://bugs.webkit.org/show_bug.cgi?id=140964

Reviewed by Andreas Kling.

Remove dead code from MemoryCache, make more things private and
clean up a little bit.

* WebCore.exp.in:
* inspector/InspectorResourceAgent.cpp:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::MemoryCache):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::removeImageFromCache):
(WebCore::MemoryCache::pruneLiveResources):
(WebCore::MemoryCache::pruneDeadResources):
(WebCore::MemoryCache::pruneDeadResourcesToSize):
(WebCore::MemoryCache::remove):
(WebCore::MemoryCache::removeRequestFromSessionCaches):
(WebCore::MemoryCache::setDisabled):
(WebCore::MemoryCache::resourceForURL): Deleted.
(WebCore::MemoryCache::pruneLiveResourcesToPercentage): Deleted.
(WebCore::MemoryCache::pruneDeadResourcesToPercentage): Deleted.
(WebCore::MemoryCache::evict): Deleted.
(WebCore::MemoryCache::removeUrlFromCache): Deleted.
(WebCore::MemoryCache::removeRequestFromCache): Deleted.
(WebCore::MemoryCache::pruneToPercentage): Deleted.
* loader/cache/MemoryCache.h:
(WebCore::MemoryCache::LRUList::LRUList): Deleted.
(WebCore::MemoryCache::remove): Deleted.
(WebCore::MemoryCache::setPruneEnabled): Deleted.
(WebCore::MemoryCache::minDeadCapacity): Deleted.
(WebCore::MemoryCache::maxDeadCapacity): Deleted.
(WebCore::MemoryCache::capacity): Deleted.
(WebCore::MemoryCache::liveSize): Deleted.
(WebCore::MemoryCache::deadSize): Deleted.
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):

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

5 years agoWeb Inspector: remove CSS.setPropertyText, CSS.toggleProperty and related dead code
burg@cs.washington.edu [Wed, 28 Jan 2015 21:45:00 +0000 (21:45 +0000)]
Web Inspector: remove CSS.setPropertyText, CSS.toggleProperty and related dead code
https://bugs.webkit.org/show_bug.cgi?id=140961

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/protocol/CSS.json: Remove unused protocol methods.

Source/WebCore:

No new tests, no behavior changed.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::setPropertyText): Deleted.
(WebCore::InspectorCSSAgent::toggleProperty): Deleted.
* inspector/InspectorCSSAgent.h:
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyle::InspectorStyle):
(WebCore::InspectorStyle::populateAllProperties):
(WebCore::InspectorStyleSheet::InspectorStyleSheet):
(WebCore::InspectorStyleSheet::reparseStyleSheet):
(WebCore::InspectorStyleSheet::inspectorStyleForId):
(WebCore::InspectorStyle::setPropertyText): Deleted.
(WebCore::InspectorStyle::toggleProperty): Deleted.
(WebCore::InspectorStyle::newLineAndWhitespaceDelimiters): Deleted.
(WebCore::InspectorStyleSheet::setPropertyText): Deleted.
(WebCore::InspectorStyleSheet::toggleProperty): Deleted.
(WebCore::InspectorStyleSheet::rememberInspectorStyle): Deleted.
(WebCore::InspectorStyleSheet::forgetInspectorStyle): Deleted.
(WebCore::InspectorStyleSheet::revalidateStyle): Deleted.
* inspector/InspectorStyleSheet.h:
* inspector/InspectorStyleTextEditor.cpp: Removed.
* inspector/InspectorStyleTextEditor.h: Removed.

Source/WebInspectorUI:

Setters for CSSProperty (except override) are not used, so delete them. These setters
and their callees in DOMNodeStyles were the only clients of the removed protocol commands.

* UserInterface/Models/CSSProperty.js:
(WebInspector.CSSProperty.prototype.update):
(WebInspector.CSSProperty.prototype.get name):
(WebInspector.CSSProperty.prototype.get value):
(WebInspector.CSSProperty.prototype.get priority):
(WebInspector.CSSProperty.prototype.hasOtherVendorNameOrKeyword):
(WebInspector.CSSProperty.prototype.set text): Deleted.
(WebInspector.CSSProperty.prototype.set name): Deleted.
(WebInspector.CSSProperty.prototype.set value): Deleted.
(WebInspector.CSSProperty.prototype.set important): Deleted.
(WebInspector.CSSProperty.prototype.set priority): Deleted.
(WebInspector.CSSProperty.prototype.set enabled): Deleted.
(WebInspector.CSSProperty.prototype.add): Deleted.
(WebInspector.CSSProperty.prototype.remove): Deleted.
(WebInspector.CSSProperty.prototype._updatePropertySoon.performUpdate): Deleted.
(WebInspector.CSSProperty.prototype._updatePropertySoon): Deleted.
(WebInspector.CSSProperty.prototype._cancelPendingUpdate): Deleted.
* UserInterface/Models/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.addProperty): Deleted.
(WebInspector.CSSStyleDeclaration.prototype.removeProperty): Deleted.
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.addEmptyRule):
(WebInspector.DOMNodeStyles.prototype.addRule): Deleted.
(WebInspector.DOMNodeStyles.prototype.changeProperty): Deleted.
(WebInspector.DOMNodeStyles.prototype.changePropertyText): Deleted.
(WebInspector.DOMNodeStyles.prototype.changePropertyEnabledState): Deleted.
(WebInspector.DOMNodeStyles.prototype.addProperty): Deleted.
(WebInspector.DOMNodeStyles.prototype.removeProperty): Deleted.
(WebInspector.DOMNodeStyles.prototype._handlePropertyChange): Deleted.
* UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype._newRuleClicked):
* Versions/Inspector-iOS-6.0.json:
* Versions/Inspector-iOS-7.0.json:
* Versions/Inspector-iOS-8.0.json:

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

5 years agoSimple line layout: Move FlowContents iterator interface to FlowContentsIterator.
zalan@apple.com [Wed, 28 Jan 2015 21:37:40 +0000 (21:37 +0000)]
Simple line layout: Move FlowContents iterator interface to FlowContentsIterator.
https://bugs.webkit.org/show_bug.cgi?id=140944

Reviewed by Antti Koivisto.

This patch cleans up FlowContents's interface by moving the iterator functionality
to this new FlowContentsIterator class.

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::addUncommitted):
(WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace):
(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/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::Style::Style): Deleted.
(WebCore::SimpleLineLayout::FlowContents::nextTextFragment): Deleted.
(WebCore::SimpleLineLayout::nextBreakablePosition): Deleted.
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition): Deleted.
(WebCore::SimpleLineLayout::findNextNonWhitespace): Deleted.
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition): Deleted.
(WebCore::SimpleLineLayout::FlowContents::textWidth): Deleted.
(WebCore::SimpleLineLayout::FlowContents::runWidth): Deleted.
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator):
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
(WebCore::SimpleLineLayout::FlowContents::begin):
(WebCore::SimpleLineLayout::FlowContents::end):
(WebCore::SimpleLineLayout::FlowContents::length):
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator++):
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator==):
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=):
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition):
(WebCore::SimpleLineLayout::FlowContents::TextFragment::TextFragment): Deleted.
(WebCore::SimpleLineLayout::FlowContents::TextFragment::isEmpty): Deleted.
(WebCore::SimpleLineLayout::FlowContents::hasOneSegment): Deleted.
(WebCore::SimpleLineLayout::FlowContents::style): Deleted.
(WebCore::SimpleLineLayout::FlowContents::characterAt): Deleted.
(WebCore::SimpleLineLayout::FlowContents::isLineBreak): Deleted.
(WebCore::SimpleLineLayout::FlowContents::isEnd): Deleted.
* rendering/SimpleLineLayoutFlowContentsIterator.cpp: Copied from Source/WebCore/rendering/SimpleLineLayoutFlowContents.cpp.
(WebCore::SimpleLineLayout::FlowContentsIterator::Style::Style):
(WebCore::SimpleLineLayout::FlowContentsIterator::FlowContentsIterator):
(WebCore::SimpleLineLayout::FlowContentsIterator::nextTextFragment):
(WebCore::SimpleLineLayout::FlowContentsIterator::textWidth):
(WebCore::SimpleLineLayout::nextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContentsIterator::findNextBreakablePosition):
(WebCore::SimpleLineLayout::findNextNonWhitespace):
(WebCore::SimpleLineLayout::FlowContentsIterator::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContentsIterator::runWidth):
* rendering/SimpleLineLayoutFlowContentsIterator.h: Copied from Source/WebCore/rendering/SimpleLineLayoutFlowContents.h.
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::FlowContentsIterator::TextFragment::isEmpty):
(WebCore::SimpleLineLayout::FlowContentsIterator::style):
(WebCore::SimpleLineLayout::FlowContentsIterator::segmentForPosition):
(WebCore::SimpleLineLayout::FlowContentsIterator::characterAt):
(WebCore::SimpleLineLayout::FlowContentsIterator::isLineBreak):
(WebCore::SimpleLineLayout::FlowContentsIterator::isEnd):

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

5 years agoRemove Mountain Lion code from WebCore
bdakin@apple.com [Wed, 28 Jan 2015 21:27:39 +0000 (21:27 +0000)]
Remove Mountain Lion code from WebCore
https://bugs.webkit.org/show_bug.cgi?id=141007

Reviewed by Sam Weinig.

* WebCore.exp.in:
* page/AlternativeTextClient.h:
* page/mac/SettingsMac.mm:
(WebCore::Settings::initializeDefaultFontFamilies):
* platform/cocoa/SystemVersion.mm:
(WebCore::callGestalt): Deleted.
(WebCore::createSystemMarketingVersion): Deleted.
* platform/graphics/Font.cpp:
(WebCore::Font::applyTransforms):
* platform/graphics/WidthIterator.h:
(WebCore::WidthIterator::supportsTypesettingFeatures):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::supportsAcceleratedFilterAnimations):
* platform/graphics/ca/PlatformCAFilters.h:
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::platformInit):
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::phaseForEvent):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::createStreams):
* platform/network/cocoa/CredentialCocoa.mm:
(WebCore::toCredentialPersistence):
* platform/spi/cocoa/CoreTextSPI.h:

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

5 years agoWeb Inspector: Crash when closing inspected page
commit-queue@webkit.org [Wed, 28 Jan 2015 21:24:13 +0000 (21:24 +0000)]
Web Inspector: Crash when closing inspected page
https://bugs.webkit.org/show_bug.cgi?id=140968

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-01-28
Reviewed by Timothy Hatcher.

Handle cases where the corePage could be null. With the Inspector Process
in its own process, messages may come to the WebContentProcess after
the WebCore::Page has itself been destroyed.

* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::show):
(WebKit::WebInspector::close):
(WebKit::WebInspector::openInNewTab):
(WebKit::WebInspector::evaluateScriptForTest):
(WebKit::WebInspector::showConsole):
(WebKit::WebInspector::showResources):
(WebKit::WebInspector::showMainResourceForFrame):
(WebKit::WebInspector::startPageProfiling):
(WebKit::WebInspector::stopPageProfiling):
(WebKit::WebInspector::canAttachWindow):
(WebKit::WebInspector::sendMessageToBackend):
(WebKit::WebInspector::remoteFrontendConnected):
(WebKit::WebInspector::remoteFrontendDisconnected):

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

5 years agoConvert WebPreferences and VisitedLinkProvider to be bridged API::Objects
commit-queue@webkit.org [Wed, 28 Jan 2015 21:16:56 +0000 (21:16 +0000)]
Convert WebPreferences and VisitedLinkProvider to be bridged API::Objects
https://bugs.webkit.org/show_bug.cgi?id=141002

Patch by Sam Weinig <sam@webkit.org> on 2015-01-28
Reviewed by Tim Horton.

* Shared/API/APIObject.h:
Add VisitedLinkProvider type.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Allocate WebPreferences and VisitedLinkProvider as their Objective-C counterpart.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences init]):
Switch to constructInWrapper.

(-[WKPreferences dealloc]):
Call the WebPreferences destructor.

(-[WKPreferences _apiObject]):
Add implementation of the WKObject protocol.

* UIProcess/API/Cocoa/WKPreferencesInternal.h:
Convert to using ObjectStorage.

* UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
(-[_WKVisitedLinkProvider init]):
Switch to constructInWrapper.

(-[_WKVisitedLinkProvider dealloc]):
Call the VisitedLinkProvider destructor.

(-[_WKVisitedLinkProvider _apiObject]):
Add implementation of the WKObject protocol.

* UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h:
Convert to using ObjectStorage.

* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::create):
* UIProcess/VisitedLinkProvider.h:
Switch create() to return a Ref.

* UIProcess/WebPreferences.h:
Make the constructor public for use by constructInWrapper.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:
Store the VisitedLinkProvider in a Ref.

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

5 years ago[WinCairo] Compile error in media player implementation.
commit-queue@webkit.org [Wed, 28 Jan 2015 21:01:06 +0000 (21:01 +0000)]
[WinCairo] Compile error in media player implementation.
https://bugs.webkit.org/show_bug.cgi?id=141004

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

MediaPlayer::cachedResourceLoader() returns a pointer to the resource loader, not a reference.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::setSize):
(WebCore::MediaPlayerPrivateMediaFoundation::createVideoWindow):

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

5 years agoPrevent implicit animation when setting fullscreen background to clear.
commit-queue@webkit.org [Wed, 28 Jan 2015 20:48:19 +0000 (20:48 +0000)]
Prevent implicit animation when setting fullscreen background to clear.
https://bugs.webkit.org/show_bug.cgi?id=140888

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-01-28
Reviewed by Eric Carlson.

This patch decreases flicker when exiting fullscreen by preventing
an implicit animation when changing the background to clear.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):

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

5 years ago[WinCairo] Message loop is flooded with timer messages when animating in accelerated...
commit-queue@webkit.org [Wed, 28 Jan 2015 20:41:01 +0000 (20:41 +0000)]
[WinCairo] Message loop is flooded with timer messages when animating in accelerated compositing mode.
https://bugs.webkit.org/show_bug.cgi?id=140985

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

The animation timer has zero timeout, which makes it hard for other messages to slip through.

* WebCoreSupport/AcceleratedCompositingContext.cpp:
(AcceleratedCompositingContext::scheduleLayerFlush):

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

5 years ago[WinCairo] Enable CSS_SELECTORS_LEVEL4.
commit-queue@webkit.org [Wed, 28 Jan 2015 20:35:51 +0000 (20:35 +0000)]
[WinCairo] Enable CSS_SELECTORS_LEVEL4.
https://bugs.webkit.org/show_bug.cgi?id=141003

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

* win/tools/vsprops/FeatureDefinesCairo.props:

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

5 years ago[Win] More gardening to get the bot green.
bfulgham@apple.com [Wed, 28 Jan 2015 20:33:46 +0000 (20:33 +0000)]
[Win] More gardening to get the bot green.

* css3/scroll-snap/resources: Added.
* platform/win/TestExpectations:
* platform/win/fast/events/ondrop-text-html-expected.txt: Copied from platform/win/fast/events/ondrop-text-htmlt-expected.txt.
* platform/win/fast/events/ondrop-text-htmlt-expected.txt: Removed.
* platform/win/fast/html/marquee-scrollamount-expected.txt: Added.
* platform/win/fast/text/backslash-to-yen-sign-euc-expected.txt:
* platform/win/fast/text/fallback-traits-fixup-expected.txt:
* platform/win/fast/text/international/complex-character-based-fallback-expected.txt:

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

5 years ago[Win] Unreviewed gardening. Reskip some region tests.
bfulgham@apple.com [Wed, 28 Jan 2015 20:21:30 +0000 (20:21 +0000)]
[Win] Unreviewed gardening. Reskip some region tests.

* platform/win/TestExpectations:

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

5 years agoMove ASan flag settings from DebugRelease.xcconfig to Base.xcconfig
dburkart@apple.com [Wed, 28 Jan 2015 18:28:22 +0000 (18:28 +0000)]
Move ASan flag settings from DebugRelease.xcconfig to Base.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=136765

Reviewed by Alexey Proskuryakov.

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

5 years agoUse an enum class for createFontFamilyValue()'s fromSystemFontID argument
cdumez@apple.com [Wed, 28 Jan 2015 18:24:48 +0000 (18:24 +0000)]
Use an enum class for createFontFamilyValue()'s fromSystemFontID argument
https://bugs.webkit.org/show_bug.cgi?id=140981

Reviewed by Darin Adler.

Use an enum class for createFontFamilyValue()'s fromSystemFontID argument
instead of a simple enum, as suggested by Sam. This is a bit nicer.

Also, use a boolean type for CSSFontFamily.fromSystemFontID instead of
the enum type to facilitate handling. Using a enum (class) for
CSSFontFamily's fromSystemFontID member is not useful as it is always
accessed by name.

* css/CSSFontFamily.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseSystemFont):
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createFontFamilyValue):
* css/CSSValuePool.h:

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

5 years agoFix typo in markPagesForVistedLinkStyleRecalc()
cdumez@apple.com [Wed, 28 Jan 2015 18:09:00 +0000 (18:09 +0000)]
Fix typo in markPagesForVistedLinkStyleRecalc()
https://bugs.webkit.org/show_bug.cgi?id=140977

Reviewed by Darin Adler.

Source/WebCore:

* WebCore.exp.in:
* history/CachedPage.h:
(WebCore::CachedPage::markForVisitedLinkStyleRecalc):
(WebCore::CachedPage::markForVistedLinkStyleRecalc): Deleted.
* history/PageCache.cpp:
(WebCore::PageCache::markPagesForVisitedLinkStyleRecalc):
(WebCore::PageCache::markPagesForVistedLinkStyleRecalc): Deleted.
* history/PageCache.h:

Source/WebKit/mac:

* WebCoreSupport/WebVisitedLinkStore.mm:
(WebVisitedLinkStore::removeAllVisitedLinks):
(WebVisitedLinkStore::removeVisitedLink):
(WebVisitedLinkStore::addVisitedLinkHash):

Source/WebKit/win:

* WebCoreSupport/WebVisitedLinkStore.cpp:
(WebVisitedLinkStore::removeAllVisitedLinks):
(WebVisitedLinkStore::addVisitedLinkHash):

Source/WebKit2:

* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::setVisitedLinkTable):
(WebKit::VisitedLinkTableController::visitedLinkStateChanged):
(WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
(WebKit::VisitedLinkTableController::removeAllVisitedLinks):

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

5 years agoUnreviewed. Remove duplicate friend class statement after r179255.
cdumez@apple.com [Wed, 28 Jan 2015 18:02:32 +0000 (18:02 +0000)]
Unreviewed. Remove duplicate friend class statement after r179255.

* history/PageCache.h:

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

5 years agoMake SVGElement::instancesForElement point to elements in the shadow tree, not SVGEle...
darin@apple.com [Wed, 28 Jan 2015 17:59:50 +0000 (17:59 +0000)]
Make SVGElement::instancesForElement point to elements in the shadow tree, not SVGElementInstance objects
https://bugs.webkit.org/show_bug.cgi?id=140984

Reviewed by Anders Carlsson.

Refactoring of code that is pretty well covered by existing tests, so
not adding new tests.

Inspired by work Rob Buis did in Blink:

    http://src.chromium.org/viewvc/blink?view=revision&revision=173275

* page/EventHandler.cpp:
(WebCore::EventHandler::clear): Removed code to zero m_lastInstanceUnderMouse.
(WebCore::instanceAssociatedWithShadowTreeElement): Deleted.
(WebCore::EventHandler::updateMouseEventTargetNode): Removed code that used
m_lastInstanceUnderMouse to track events on an object after recloning.
This behavior doesn't seem to be needed to pass any existing tests, and Rob
removed it from Blink, so I'll take it out and we can bring if back, based
on the original element rather than on the SVGElementInstance, if we find we
need to restore the behavior in the future.

* page/EventHandler.h: Removed m_lastInstanceUnderMouse.

* svg/SVGAnimateElementBase.cpp:
(WebCore::SVGAnimateElementBase::determineAnimatedPropertyType):
Changed this function to take a reference and to call the updated version
of the targetElement.animatedPropertyTypesForAttribute function.
(WebCore::SVGAnimateElementBase::calculateAnimatedValue): Updated to pass
a reference rather than a pointer.
(WebCore::SVGAnimateElementBase::resetAnimatedType): Updated to pass
references rather than pointers.
(WebCore::applyCSSPropertyToTarget): Updated to take a reference.
(WebCore::removeCSSPropertyFromTarget): Ditto.
(WebCore::applyCSSPropertyToTargetAndInstances): Ditto. Also use a modern
for loop, and iterate over shadow tree instances, not over SVGElementInstance.
(WebCore::removeCSSPropertyFromTargetAndInstances): Ditto.
(WebCore::notifyTargetAboutAnimValChange): Ditto.
(WebCore::notifyTargetAndInstancesAboutAnimValChange): Ditto.
(WebCore::SVGAnimateElementBase::clearAnimatedType): More of the same.
(WebCore::SVGAnimateElementBase::applyResultsToTarget): Ditto.
(WebCore::SVGAnimateElementBase::resetAnimatedPropertyType): Ditto.

* svg/SVGAnimateElementBase.h: Changed determineAnimatedPropertyType to take
a reference rahter than a pointer.

* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::applyResultsToTarget): Updated to use the
new instances instead of SVGElementInstance. Also added code to skip work if
the transform is not changing, and use the assignment operator instead of
breaking one matrix down and calling setMatrix on the other.

* svg/SVGAnimatedTypeAnimator.cpp:
(WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
Changed to take a reference rather than a pointer, and rewrote to streamline,
using modern for loops and using the new instances set.

* svg/SVGAnimatedTypeAnimator.h: Removed the constructors from the
SVGElementAnimatedProperties struct since we can build them just fine without
them. Changed findAnimatedPropertiesForAttributeName to take a reference.

* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation): Pass a
reference rather than a pointer. Also streamlined the code a bit and removed
a comment that tried to say exactly what the code was doing, but was outdated.

* svg/SVGElement.cpp:
(WebCore::SVGElement::~SVGElement): Disconnect all instances from this element
and also disconnect the corresponding element from this element if it itself
is an instance. This guarantees we have no dangling pointers.
(WebCore::SVGElement::mapInstanceToElement): Deleted.
(WebCore::SVGElement::removeInstanceMapping): Deleted.
(WebCore::SVGElement::instances): Renamed from instancesForElement and changed
to be a set of SVG element instances in the shadow tree, rather than
SVGElementInstance objects.
(WebCore::SVGElement::correspondingElement): Tweaked assertion a little and use
nullptr instead of 0.
(WebCore::SVGElement::correspondingUseElement): Added. Finds the use element
that owns the shadow tree this element is in by following the host element
pointer from the shadow root.
(WebCore::SVGElement::setCorrespondingElement): Added code to insert or remove
this element from the instances set of the corresponding element.
(WebCore::SVGElement::animatedPropertyTypesForAttribute): Renamed from
animatedPropertyTypeForAttribute and switched to use a return value instead of
an out argument.
(WebCore::SVGElement::addEventListener): Updated to use instances rather than
the old instancesForElement.
(WebCore::SVGElement::removeEventListener): Ditto.
(WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute): Pass a reference.
(WebCore::SVGElement::synchronizeAnimatedSVGAttribute): Ditto.
(WebCore::SVGElement::isPresentationAttributeWithSVGDOM): Updated to use the
new function from AttributeToPropertyMap.

* svg/SVGElement.h: Changed animatedPropertyTypesForAttribute name to be plural
since it returns a vector of types, and made it use a return value instead of
an out argument. Added the correspondingUseElement function, and removed the
mapInstanceToElement and removeInstanceMapping functions.

* svg/SVGElementInstance.cpp:
(WebCore::SVGElementInstance::SVGElementInstance): Removed now-unneeded call to
mapInstanceToElement. This is now handled entirely by the SVGElement itself.
(WebCore::SVGElementInstance::detach): Removed now-unneeded call to
removeInstanceMapping. This is now handled entirely by the SVGElement itself.
(WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Rewrote to be
based on the instances set; logic is different now because we remove each
element from that set as we go.

* svg/SVGElementRareData.h:
(WebCore::SVGElementRareData::SVGElementRareData): Removed initialization of
pointers since we can do that where they are defined instead.
(WebCore::SVGElementRareData::instances): Renamed from elementInstances and
changed the type.
(WebCore::SVGElementRareData::destroyAnimatedSMILStyleProperties): Deleted.
Unneeded since it was already called just before deleting the rare data.

* svg/SVGTests.cpp:
(WebCore::SVGTests::SVGTests): Took advantage of using namespace.
(WebCore::createSVGTestPropertyInfo): Added. Helper for function below.
(WebCore::createSVGTextAttributeToPropertyMap): Ditto.
(WebCore::SVGTests::attributeToPropertyMap): Changed to use the create function
above. No longer allocates objects on the heap.
(WebCore::SVGTests::hasExtension): Reworked #if code to make the MathML part
independent rather than repeating the return statement.
(WebCore::SVGTests::synchronizeAttribute): Added. Helper for functions below.
(WebCore::SVGTests::synchronizeRequiredFeatures): Call synchronizeAttribute.
(WebCore::SVGTests::synchronizeRequiredExtensions): Ditto.
(WebCore::SVGTests::synchronizeSystemLanguage): Ditto.

* svg/SVGTests.h: Removed unneeded forward declarations. Mark the many functions
that do not depend on object state as static so the call sites don't wastefully
pass a this pointer. Removed the unneeded requiredFeaturesPropertyInfo,
requiredExtensionsPropertyInfo, and systemLanguagePropertyInfo functions.
Added synchronizeAttribute helper function.

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::invalidateDependentShadowTrees): Updated to use the
new instances set and a modern for loop.

* svg/properties/SVGAnimatedPropertyMacros.h: Pass reference to addProperty and
made a few other small refinements.

* svg/properties/SVGAttributeToPropertyMap.cpp:
(WebCore::SVGAttributeToPropertyMap::addProperties): Fixed problems mentioned
in FIXME where we did too much hashing and vector resizing.
(WebCore::SVGAttributeToPropertyMap::addProperty): Streamlined to use a single
hash table lookup.
(WebCore::SVGAttributeToPropertyMap::properties): Renamed from
animatedPropertiesForAttribute and changed to return a vector rather than using
an out argument. Also had to change some since the vectors are in the hash table
now rather than allocated on the heap.
(WebCore::SVGAttributeToPropertyMap::types): Renamed from
animatedPropertyTypeForAttribute and made changes just like the ones above.
(WebCore::SVGAttributeToPropertyMap::synchronizeProperties): Use modern for
loops, take a reference rather than a pointer, and use the function pointer
directly instead of calling through a helper with various assertions.
(WebCore::SVGAttributeToPropertyMap::synchronizeProperty): Ditto.

* svg/properties/SVGAttributeToPropertyMap.h: Updated to match the changes
above. Also changed the map to contain vectors instead of pointers to vectors.

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

5 years agoREGRESSION (r173698): Leaks of selector lists in CSS parsing
darin@apple.com [Wed, 28 Jan 2015 17:50:00 +0000 (17:50 +0000)]
REGRESSION (r173698): Leaks of selector lists in CSS parsing
https://bugs.webkit.org/show_bug.cgi?id=140993

Reviewed by Anders Carlsson.

* css/CSSGrammar.y.in: Fixed logic in rules that were not moving a parser-
owned pointer into a unique_ptr in all code paths. The magic value
invalidSelectorVector makes this really messy. We might want to find a
different seolution in the future.

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

5 years ago[Win] Unreviewed build fix after r179247.
bfulgham@apple.com [Wed, 28 Jan 2015 17:22:14 +0000 (17:22 +0000)]
[Win] Unreviewed build fix after r179247.

* history/PageCache.h: Need to declare NeverDestroyed specialization as
a friend.

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

5 years agohttp/tests/xmlhttprequest/workers/methods.html sometimes times out with disk cache...
antti@apple.com [Wed, 28 Jan 2015 17:08:16 +0000 (17:08 +0000)]
http/tests/xmlhttprequest/workers/methods.html sometimes times out with disk cache enabled
https://bugs.webkit.org/show_bug.cgi?id=140976

Reviewed by Chris Dumez.

Running

    run-webkit-tests --release -2 http/tests/xmlhttprequest/workers/methods.html --iterations=100

would usually time out an iteration.

* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::dispatchRetrieveOperation):

Using dispatch_io_read with an empty file calls the handler block immediately with done boolean set
without it being an error. We failed to call the completion handler and any synchronous xhr would hang.
We may see an empty cache file if we are just in process of writing it.

Fix by handling this case specifically.

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

5 years agoAX: [ATK] Implement support for new AtkRole types for MathML
jdiggs@igalia.com [Wed, 28 Jan 2015 17:02:32 +0000 (17:02 +0000)]
AX: [ATK] Implement support for new AtkRole types for MathML
https://bugs.webkit.org/show_bug.cgi?id=140916

Reviewed by Chris Fleizach.

Source/WebCore:

Expose mfrac as ATK_ROLE_MATH_FRACTION, and both mroot and msqrt as
ATK_ROLE_MATH_ROOT. In the case of script elements, expose the container
(msub, msup, msubsup, and mmultiscripts) using the generic text block role
ATK_ROLE_SECTION. Then expose the actual script child elements using role
ATK_ROLE_SUBSCRIPT/ATK_ROLE_SUPERSCRIPT. In the case of mmultiscripts,
expose whether it is a prescript or postscript via AtkObject attribute.

Test: accessibility/math-multiscript-attributes.html
Also added additional test cases to accessibility/roles-exposed.html

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isMathScriptObject): Added.
(WebCore::AccessibilityObject::isMathMultiscriptObject): Added.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isMathScriptObject): Added.
(WebCore::AccessibilityRenderObject::isMathMultiscriptObject): Added.
* accessibility/AccessibilityRenderObject.h:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes): Expose whether a multiscript object is a prescript or postscript.
(atkRole): Map WebCore Accessibility objects to the new ATK roles.

Tools:

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: Add mapping for new ATK roles
* gtk/jhbuild.modules: Bump minimum version of ATK used by jhbuild to 2.15.4

LayoutTests:

* accessibility/math-multiscript-attributes.html: Added.
* accessibility/roles-exposed.html: New test cases added.
* platform/efl/accessibility/roles-exposed-expected.txt: Updated for new test cases.
* platform/gtk/accessibility/math-multiscript-attributes-expected.txt: Added.
* platform/gtk/accessibility/roles-exposed-expected.txt: Updated for new test cases.
* platform/mac-mavericks/accessibility/roles-exposed-expected.txt: Updated for new test cases.
* platform/mac-mountainlion/accessibility/roles-exposed-expected.txt: Updated for new test cases.
* platform/mac/accessibility/math-multiscript-attributes-expected.txt: Added.
* platform/mac/accessibility/roles-exposed-expected.txt: Updated for new test cases.

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

5 years agoREGRESSION: Re-skip media tests. (Unreviewed)
bfulgham@apple.com [Wed, 28 Jan 2015 16:46:51 +0000 (16:46 +0000)]
REGRESSION: Re-skip media tests. (Unreviewed)
https://bugs.webkit.org/show_bug.cgi?id=140995

* platform/win/TestExpectations: Re-skip the tests.

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

5 years ago[CMake] Minimum python version should be 2.7.
clopez@igalia.com [Wed, 28 Jan 2015 16:30:32 +0000 (16:30 +0000)]
[CMake] Minimum python version should be 2.7.
https://bugs.webkit.org/show_bug.cgi?id=140997

Reviewed by Csaba Osztrogonác.

* CMakeLists.txt:

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

5 years ago[GTK] Stop removing color marks from unit tests output
carlosgc@webkit.org [Wed, 28 Jan 2015 14:48:29 +0000 (14:48 +0000)]
[GTK] Stop removing color marks from unit tests output
https://bugs.webkit.org/show_bug.cgi?id=140996

Reviewed by Philippe Normand.

Since r178236 google tests use a custom simplified output without
any colors, so we don't need to handle the case of non ttys to
remove the color marks.

* Scripts/run-gtk-tests:
(TestRunner.__init__):
(TestRunner._run_test_command.parse_line):

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

5 years agoUnreviewed. Add missing file to WebInspector compilation for GTK+.
carlosgc@webkit.org [Wed, 28 Jan 2015 14:47:07 +0000 (14:47 +0000)]
Unreviewed. Add missing file to WebInspector compilation for GTK+.

* PlatformGTK.cmake: Add UserInterface/External/ESLint/eslint.js

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

5 years ago[GTK] Unit test /webkit2/WebKitWebView/page-visibility from WebKit2Gtk/TestWebKitWebV...
carlosgc@webkit.org [Wed, 28 Jan 2015 13:44:56 +0000 (13:44 +0000)]
[GTK] Unit test /webkit2/WebKitWebView/page-visibility from WebKit2Gtk/TestWebKitWebView fails
https://bugs.webkit.org/show_bug.cgi?id=131731

Reviewed by Žan Doberšek.

A web page loaded offscreen is in prerender state not hidden.

* Scripts/run-gtk-tests:
(TestRunner): Unskip /webkit2/WebKitWebView/page-visibility.
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
(testWebViewPageVisibility):

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

5 years agoRename pageCache() to PageCache::shared() and return a reference
cdumez@apple.com [Wed, 28 Jan 2015 09:33:54 +0000 (09:33 +0000)]
Rename pageCache() to PageCache::shared() and return a reference
https://bugs.webkit.org/show_bug.cgi?id=140983

Reviewed by Andreas Kling.

Rename pageCache() to PageCache::shared() as this is a singleton class
and have it return a reference instead of a pointer.

Source/WebCore:

* history/BackForwardList.cpp:
(WebCore::BackForwardList::addItem):
(WebCore::BackForwardList::setCapacity):
(WebCore::BackForwardList::clearAllPageCaches):
(WebCore::BackForwardList::close):
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
* history/HistoryItem.cpp:
(WebCore::HistoryItem::setURL):
* history/PageCache.cpp:
(WebCore::PageCache::shared):
(WebCore::PageCache::get):
(WebCore::pageCache): Deleted.
* history/PageCache.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/HistoryController.cpp:
(WebCore::HistoryController::invalidateCurrentItemCachedPage):
(WebCore::HistoryController::updateForReload):
* page/Frame.cpp:
(WebCore::Frame::setPageAndTextZoomFactors):
* page/Page.cpp:
(WebCore::Page::setDeviceScaleFactor):
(WebCore::Page::setPagination):
(WebCore::Page::setVisitedLinkStore):
* page/PageGroup.cpp:
(WebCore::PageGroup::captionPreferencesChanged):
* page/Settings.cpp:
(WebCore::Settings::setUsesPageCache):
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):

Source/WebKit/mac:

* History/WebBackForwardList.mm:
(-[WebBackForwardList pageCacheSize]):
* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics cachedPageCount]):
(+[WebCoreStatistics cachedFrameCount]):
* WebCoreSupport/WebVisitedLinkStore.mm:
(WebVisitedLinkStore::removeAllVisitedLinks):
(WebVisitedLinkStore::removeVisitedLink):
(WebVisitedLinkStore::addVisitedLinkHash):
* WebView/WebView.mm:
(+[WebView _setCacheModel:]):

Source/WebKit/win:

* WebCoreStatistics.cpp:
(WebCoreStatistics::cachedPageCount):
(WebCoreStatistics::cachedFrameCount):
* WebCoreSupport/WebVisitedLinkStore.cpp:
(WebVisitedLinkStore::removeAllVisitedLinks):
(WebVisitedLinkStore::addVisitedLinkHash):
* WebView.cpp:
(WebView::setCacheModel):

Source/WebKit2:

* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::setVisitedLinkTable):
(WebKit::VisitedLinkTableController::visitedLinkStateChanged):
(WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
(WebKit::VisitedLinkTableController::removeAllVisitedLinks):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::removeItem):
(WebKit::WebBackForwardListProxy::close):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::releasePageCache):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformSetCacheModel):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel):

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

5 years agoFix MediaPlayerEngine leaks
darin@apple.com [Wed, 28 Jan 2015 09:22:02 +0000 (09:22 +0000)]
Fix MediaPlayerEngine leaks
https://bugs.webkit.org/show_bug.cgi?id=140992

Reviewed by Jer Noble.

* platform/graphics/MediaPlayer.cpp:
(WebCore::mutableInstalledMediaEnginesVector): Added.
(WebCore::buildMediaEnginesVector): Added.
(WebCore::installedMediaEngines): Changed this to be a vector of factories
instead of a vector of heap-allocated factories. The old code would leak
all the factories when this was called with the ResetEngines option.
(WebCore::addMediaEngine): Updated for above change.
(WebCore::bestMediaEngineForSupportParameters): Ditto.
(WebCore::nextMediaEngine): Ditto.
(WebCore::MediaPlayer::nextBestMediaEngine): Ditto.
(WebCore::MediaPlayer::loadWithNextMediaEngine): Ditto.
(WebCore::MediaPlayer::supportsType): Ditto.
(WebCore::MediaPlayer::getSupportedTypes): Ditto.
(WebCore::MediaPlayer::getSitesInMediaCache): Ditto.
(WebCore::MediaPlayer::clearMediaCache): Ditto.
(WebCore::MediaPlayer::clearMediaCacheForSite): Ditto.
(WebCore::MediaPlayer::supportsKeySystem): Ditto.
(WebCore::MediaPlayer::resetMediaEngines): Ditto.
* platform/graphics/MediaPlayer.h: Ditto.

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

5 years agoFix small leak in Collator
darin@apple.com [Wed, 28 Jan 2015 08:44:28 +0000 (08:44 +0000)]
Fix small leak in Collator
https://bugs.webkit.org/show_bug.cgi?id=140990

Reviewed by Andreas Kling.

* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::Collator): Use fastStrDup instead of strdup.
(WTF::Collator::~Collator): Use fastFree on the collator locale that we
are abandoning. The old code instead just called free on a null pointer.

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

5 years agoRename descendentxxx to descendantxxxx in RenderLayerBacking
commit-queue@webkit.org [Wed, 28 Jan 2015 08:09:25 +0000 (08:09 +0000)]
Rename descendentxxx to descendantxxxx in RenderLayerBacking
https://bugs.webkit.org/show_bug.cgi?id=140979

Patch by Jeongmin Kim <jm86.kim@lge.com> on 2015-01-28
Reviewed by Martin Robinson.

Rename descendentxxx to descendantxxxx in RenderLayerBacking
for matching other variables and function names.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateAfterDescendants):
(WebCore::RenderLayerBacking::updateChildClippingStrategy):
(WebCore::RenderLayerBacking::paintsChildren):
(WebCore::descendantLayerPaintsIntoAncestor):
(WebCore::RenderLayerBacking::isPaintDestinationForDescendantLayers):
(WebCore::descendentLayerPaintsIntoAncestor): Deleted.
(WebCore::RenderLayerBacking::isPaintDestinationForDescendentLayers): Deleted.

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

5 years agoUse a Ref<CachedResourceLoader> in Document instead of a RefPtr
cdumez@apple.com [Wed, 28 Jan 2015 05:53:53 +0000 (05:53 +0000)]
Use a Ref<CachedResourceLoader> in Document instead of a RefPtr
https://bugs.webkit.org/show_bug.cgi?id=140971

Reviewed by Andreas Kling.

Source/WebCore:

Use a Ref<CachedResourceLoader> in Document instead of a RefPtr as it
can never be null. Also have Document::cachedResourceLoader() return a
reference instead of a pointer. This gets rid of a lot of unnecessary
null-checks.

Source/WebKit/win:

Use more references instead of pointers.

* WebDataSource.cpp:
(WebDataSource::subresourceForURL):

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

5 years agoExitSiteData saying m_takesSlowPath shouldn't mean early returning takesSlowPath...
fpizlo@apple.com [Wed, 28 Jan 2015 05:48:59 +0000 (05:48 +0000)]
ExitSiteData saying m_takesSlowPath shouldn't mean early returning takesSlowPath() since for the non-LLInt case we later set m_couldTakeSlowPath, which is more precise
https://bugs.webkit.org/show_bug.cgi?id=140980

Reviewed by Oliver Hunt.

* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFor):

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

5 years agoPartially revert r178802.
ap@apple.com [Wed, 28 Jan 2015 05:29:09 +0000 (05:29 +0000)]
Partially revert r178802.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/MountainLion.png:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/MountainLion@2x.png:

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

5 years agoVersioning.
bshafiei@apple.com [Wed, 28 Jan 2015 05:11:46 +0000 (05:11 +0000)]
Versioning.

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

5 years agoREGRESSION (OS X 10.10.2): media/track/track-in-band-style.html frequently times out
ap@apple.com [Wed, 28 Jan 2015 02:37:39 +0000 (02:37 +0000)]
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

* platform/mac/TestExpectations: Added an expectation.

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