WebKit-https.git
6 years agoAdd SPI for telling WebKit to prefer pictograph glyphs over monochrome ones
aestes@apple.com [Thu, 10 Oct 2013 23:05:22 +0000 (23:05 +0000)]
Add SPI for telling WebKit to prefer pictograph glyphs over monochrome ones
https://bugs.webkit.org/show_bug.cgi?id=122608

Reviewed by Dan Bernstein.

Based on patches by Dan Bernstein.

Source/WebCore:

Test: fonts/font-fallback-prefers-pictographs.html

Created a mechanism to append a font to the end of a font's fallback
list, before the system fallback list. This mechanism is used when
Settings::fontFallbackPrefersPictographs() is true to insert a
pictograph font ahead of a monochrome one from the system fallback list.

* WebCore.exp.in: Moved
__ZN7WebCore8Settings33setFontFallbackPrefersPictographsEb outside of
an iOS platform guard.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::fallbackFontDataCount): Retuned 1 if
pictograph fonts are preferred.
(WebCore::CSSFontSelector::getFallbackFontData): Returned the
pictograph font's FontData if it is preferred.
* css/CSSFontSelector.h:
* page/Settings.cpp:
(WebCore::Settings::Settings): Initialized
m_fontFallbackPrefersPictographs to false.
(WebCore::Settings::setFontFallbackPrefersPictographs): Set
m_fontFallbackPrefersPictographs and called
Page::setNeedsRecalcStyleInAllFrames().
* page/Settings.h:
(WebCore::Settings::fontFallbackPrefersPictographs):
* platform/graphics/FontGlyphs.cpp:
(WebCore::FontGlyphs::realizeFontDataAt): Realized the selector's
fallback font if necessary.
* platform/graphics/FontSelector.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree): Removed iOS platform guards.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setFontFallbackPrefersPictographs): Set the
corresponding WebCore::Setting.
* testing/InternalSettings.h: Defined an internal setting for the test.
* testing/InternalSettings.idl: Ditto.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _setFontFallbackPrefersPictographs:]): Called
WebCore::Settings::setFontFallbackPrefersPictographs().
* WebView/WebViewPrivate.h:

LayoutTests:

* fonts/font-fallback-prefers-pictographs-expected.html: Added.
* fonts/font-fallback-prefers-pictographs.html: Added.

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

6 years agoOSR exit using llvm.webkit.stackmap should pass more tests
fpizlo@apple.com [Thu, 10 Oct 2013 22:57:10 +0000 (22:57 +0000)]
OSR exit using llvm.webkit.stackmap should pass more tests
https://bugs.webkit.org/show_bug.cgi?id=122518

Reviewed by Mark Hahnenberg.

- Make the X86Assembler capable of dealing with all XMM registers.

- Make the StackMaps code on WebKit's side capable of dealing with XMM registers.

- Factor out most of the smarts of StackMaps::Location into a self-contained object.
  Previously you needed both StackMaps::Location and a StackMaps reference to do most
  things since the Location might have referred to a constant. Now you can just get a
  self-contained Location object.

- Fix a bug where OSR exit generation thunk generator was assuming that the call frame
  register is already in argumentGPR0. In the future, the call frame will just be the
  machine FP and we won't have to do anything special. But for now the "call frame" is
  just a normal value in LLVM IR and may end up in any register. Make the OSR exit
  generation thunk generator polymorphic over the call frame argument's Location.

- Move the stuff that depends on the polymorphic OSR exit generation thunk generator
  into the finalizer, since generating and linking one of those thunks requires a cache
  flush and we need to do that on the main thread.

* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::firstRegister):
(JSC::ARMv7Assembler::lastRegister):
(JSC::ARMv7Assembler::firstFPRegister):
(JSC::ARMv7Assembler::lastFPRegister):
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::firstFPRegister):
(JSC::AbstractMacroAssembler::lastFPRegister):
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::nextFPRegister):
* assembler/MacroAssemblerARMv7.h:
* assembler/MacroAssemblerX86Common.h:
* assembler/X86Assembler.h:
(JSC::X86Assembler::firstFPRegister):
(JSC::X86Assembler::lastFPRegister):
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* ftl/FTLCompile.cpp:
(JSC::FTL::fixFunctionBasedOnStackMaps):
* ftl/FTLExitThunkGenerator.cpp:
(JSC::FTL::ExitThunkGenerator::emitThunk):
(JSC::FTL::ExitThunkGenerator::emitThunks):
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalizeFunction):
* ftl/FTLJITFinalizer.h:
* ftl/FTLLink.cpp:
(JSC::FTL::link):
* ftl/FTLLocation.cpp: Added.
(JSC::FTL::Location::forStackmaps):
(JSC::FTL::Location::dump):
(JSC::FTL::Location::involvesGPR):
(JSC::FTL::Location::isGPR):
(JSC::FTL::Location::gpr):
(JSC::FTL::Location::isFPR):
(JSC::FTL::Location::fpr):
(JSC::FTL::Location::restoreInto):
(WTF::printInternal):
* ftl/FTLLocation.h: Added.
(JSC::FTL::Location::Location):
(JSC::FTL::Location::forRegister):
(JSC::FTL::Location::forIndirect):
(JSC::FTL::Location::forConstant):
(JSC::FTL::Location::kind):
(JSC::FTL::Location::hasDwarfRegNum):
(JSC::FTL::Location::dwarfRegNum):
(JSC::FTL::Location::hasOffset):
(JSC::FTL::Location::offset):
(JSC::FTL::Location::hasConstant):
(JSC::FTL::Location::constant):
(JSC::FTL::Location::operator!):
(JSC::FTL::Location::isHashTableDeletedValue):
(JSC::FTL::Location::operator==):
(JSC::FTL::Location::hash):
(JSC::FTL::LocationHash::hash):
(JSC::FTL::LocationHash::equal):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::appendOSRExit):
(JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks):
* ftl/FTLSaveRestore.cpp:
(JSC::FTL::bytesForFPRs):
(JSC::FTL::requiredScratchMemorySizeInBytes):
(JSC::FTL::offsetOfFPR):
(JSC::FTL::saveAllRegisters):
(JSC::FTL::restoreAllRegisters):
* ftl/FTLSaveRestore.h:
* ftl/FTLStackMaps.cpp:
(JSC::FTL::StackMaps::Location::restoreInto):
* ftl/FTLStackMaps.h:
* ftl/FTLState.h:
* ftl/FTLThunks.cpp:
(JSC::FTL::osrExitGenerationWithoutStackMapThunkGenerator):
(JSC::FTL::osrExitGenerationWithStackMapThunkGenerator):
* ftl/FTLThunks.h:
(JSC::FTL::generateIfNecessary):
(JSC::FTL::Thunks::getOSRExitGenerationThunk):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

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

6 years agoRemove WebScrollBar
andersca@apple.com [Thu, 10 Oct 2013 22:56:58 +0000 (22:56 +0000)]
Remove WebScrollBar
https://bugs.webkit.org/show_bug.cgi?id=122623

Reviewed by Brent Fulgham.

Source/WebKit:

Remove files from VS projects.

* WebKit.vcxproj/Interfaces/Interfaces.vcxproj:
* WebKit.vcxproj/Interfaces/Interfaces.vcxproj.filters:
* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:

Source/WebKit/win:

WebScrollBar isn't used by anyone, remove it.

* ForEachCoClass.h:
* Interfaces/IWebScrollBarDelegatePrivate.idl: Removed.
* Interfaces/IWebScrollBarPrivate.idl: Removed.
* Interfaces/WebKit.idl:
* WebKitClassFactory.cpp:
(WebKitClassFactory::CreateInstance):
* WebScrollBar.cpp: Removed.
* WebScrollBar.h: Removed.

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

6 years agoTools: Make sure that DataTypes.h is in the binary drop.
fpizlo@apple.com [Thu, 10 Oct 2013 22:39:51 +0000 (22:39 +0000)]
Tools: Make sure that DataTypes.h is in the binary drop.

Rubber stamped by Michael Saboff.

* Scripts/export-llvm-build:

WebKitLibraries: Update the binary drops to the latest version of LLVM, built without -fvisibility=hidden
now that we have soft linking. Also include DataTypes.h in the drop.

Rubber stamped by Michael Saboff.

* LLVMIncludesMountainLion.tar.bz2:
* LLVMLibrariesMountainLion.tar.bz2:

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

6 years agoBuild fix after http://trac.webkit.org/changeset/157253
bdakin@apple.com [Thu, 10 Oct 2013 22:27:30 +0000 (22:27 +0000)]
Build fix after trac.webkit.org/changeset/157253

* WebScrollBar.h:

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

6 years agoFTL: Soft-link LLVM as a workaround for LLVM's static initializers and exit-time...
fpizlo@apple.com [Thu, 10 Oct 2013 22:19:00 +0000 (22:19 +0000)]
FTL: Soft-link LLVM as a workaround for LLVM's static initializers and exit-time destructors
https://bugs.webkit.org/show_bug.cgi?id=122566

Source/JavaScriptCore:

Reviewed by Mark Rowe.

The JSC project now builds a libllvmForJSC.dylib. If FTL is enabled, this
gets copied into JavaScriptCore.framework/Versions/A/Libraries. JSC will
load the dylib by finding it using NSBundle APIs and then doing dlopen().
That will only happen lazily, when something happens that requires LLVM.

This mostly takes care of LLVM static initialization overhead by deferring
it until it's really needed.

This takes care of LLVM's exit-time destructors because inside
libllvmForJSC.dylib, we override __cxa_atexit.

* Configurations/JavaScriptCore.xcconfig:
* Configurations/LLVMForJSC.xcconfig: Added.
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* disassembler/LLVMDisassembler.cpp:
(JSC::tryToDisassembleWithLLVM):
* ftl/FTLAbbreviatedTypes.h:
* ftl/FTLAbbreviations.h:
(JSC::FTL::voidType):
(JSC::FTL::int1Type):
(JSC::FTL::int8Type):
(JSC::FTL::int16Type):
(JSC::FTL::int32Type):
(JSC::FTL::int64Type):
(JSC::FTL::intPtrType):
(JSC::FTL::floatType):
(JSC::FTL::doubleType):
(JSC::FTL::pointerType):
(JSC::FTL::structType):
(JSC::FTL::functionType):
(JSC::FTL::typeOf):
(JSC::FTL::mdKindID):
(JSC::FTL::mdString):
(JSC::FTL::mdNode):
(JSC::FTL::setMetadata):
(JSC::FTL::addFunction):
(JSC::FTL::setLinkage):
(JSC::FTL::setFunctionCallingConv):
(JSC::FTL::getParam):
(JSC::FTL::constInt):
(JSC::FTL::constReal):
(JSC::FTL::constIntToPtr):
(JSC::FTL::constBitCast):
(JSC::FTL::appendBasicBlock):
(JSC::FTL::insertBasicBlock):
(JSC::FTL::buildPhi):
(JSC::FTL::addIncoming):
(JSC::FTL::buildAlloca):
(JSC::FTL::buildAdd):
(JSC::FTL::buildSub):
(JSC::FTL::buildMul):
(JSC::FTL::buildDiv):
(JSC::FTL::buildRem):
(JSC::FTL::buildNeg):
(JSC::FTL::buildFAdd):
(JSC::FTL::buildFSub):
(JSC::FTL::buildFMul):
(JSC::FTL::buildFDiv):
(JSC::FTL::buildFRem):
(JSC::FTL::buildFNeg):
(JSC::FTL::buildAnd):
(JSC::FTL::buildOr):
(JSC::FTL::buildXor):
(JSC::FTL::buildShl):
(JSC::FTL::buildAShr):
(JSC::FTL::buildLShr):
(JSC::FTL::buildNot):
(JSC::FTL::buildLoad):
(JSC::FTL::buildStore):
(JSC::FTL::buildSExt):
(JSC::FTL::buildZExt):
(JSC::FTL::buildFPToSI):
(JSC::FTL::buildFPToUI):
(JSC::FTL::buildSIToFP):
(JSC::FTL::buildUIToFP):
(JSC::FTL::buildIntCast):
(JSC::FTL::buildFPCast):
(JSC::FTL::buildIntToPtr):
(JSC::FTL::buildPtrToInt):
(JSC::FTL::buildBitCast):
(JSC::FTL::buildICmp):
(JSC::FTL::buildFCmp):
(JSC::FTL::buildCall):
(JSC::FTL::setTailCall):
(JSC::FTL::buildExtractValue):
(JSC::FTL::buildSelect):
(JSC::FTL::buildBr):
(JSC::FTL::buildCondBr):
(JSC::FTL::buildSwitch):
(JSC::FTL::addCase):
(JSC::FTL::buildRet):
(JSC::FTL::buildUnreachable):
(JSC::FTL::dumpModule):
(JSC::FTL::verifyModule):
* ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* ftl/FTLFail.cpp:
(JSC::FTL::fail):
* ftl/FTLJITCode.h:
* ftl/FTLJITFinalizer.h:
* ftl/FTLLink.cpp:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::lower):
* ftl/FTLOutput.cpp:
(JSC::FTL::Output::Output):
(JSC::FTL::Output::~Output):
* ftl/FTLOutput.h:
(JSC::FTL::Output::appendTo):
* ftl/FTLState.cpp:
(JSC::FTL::State::State):
(JSC::FTL::State::~State):
* ftl/WebKitLLVMLibraryAnchor.cpp: Removed.
* jsc.cpp:
(jscmain):
* llvm: Added.
* llvm/InitializeLLVM.cpp: Added.
(JSC::initializeLLVM):
* llvm/InitializeLLVM.h: Added.
* llvm/InitializeLLVMMac.mm: Added.
(JSC::initializeLLVMImpl):
* llvm/InitializeLLVMPOSIX.cpp: Added.
(JSC::initializeLLVMPOSIX):
* llvm/InitializeLLVMPOSIX.h: Added.
* llvm/LLVMAPI.cpp: Added.
* llvm/LLVMAPI.h: Added.
* llvm/LLVMAPIFunctions.h: Added.
* llvm/LLVMHeaders.h: Added.
* llvm/library: Added.
* llvm/library/LLVMAnchor.cpp: Added.
* llvm/library/LLVMExports.cpp: Added.
(initializeAndGetJSCLLVMAPI):
* llvm/library/LLVMOverrides.cpp: Added.
(__cxa_atexit):
* llvm/library/config_llvm.h: Added.
* runtime/InitializeThreading.cpp:
(JSC::initializeThreadingOnce):
* runtime/Options.h:

Source/WTF:

Reviewed by Mark Rowe.

Remove all LLVM stuff from WTF since to get LLVM you need to soft-link and it's
entirely the responsibility of JSC to do that.

Also fixed an export goof that I found after fixing the weak thingy script in JSC.

* WTF.xcodeproj/project.pbxproj:
* wtf/LLVMHeaders.h: Removed.
* wtf/text/CString.h:
(WTF::CStringHash::hash):

Tools:

Reviewed by Mark Rowe.

* Scripts/configure-llvm:

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

6 years agoUnreviewed gardening. Add timeout annotation to gtk-wk2-specific expectation for
kov@webkit.org [Thu, 10 Oct 2013 22:16:20 +0000 (22:16 +0000)]
Unreviewed gardening. Add timeout annotation to gtk-wk2-specific expectation for
editing/spelling/spellcheck-paste.html.

* platform/gtk-wk2/TestExpectations:

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

6 years agocurrentThis and currentArguments crash if called from outside a callback
mhahnenberg@apple.com [Thu, 10 Oct 2013 22:03:25 +0000 (22:03 +0000)]
currentThis and currentArguments crash if called from outside a callback
https://bugs.webkit.org/show_bug.cgi?id=122620

Reviewed by Filip Pizlo.

The documentation for these methods claims that they will return nil if called
from somewhere other than an API callback, but currently they both crash.

* API/JSContext.mm:
(+[JSContext currentThis]):
(+[JSContext currentArguments]):
* API/tests/testapi.mm:

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

6 years agoFix changelog entry order.
fpizlo@apple.com [Thu, 10 Oct 2013 22:00:46 +0000 (22:00 +0000)]
Fix changelog entry order.

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

6 years agoCallbackData unnecessarily caches the JSValue for currentThis
fpizlo@apple.com [Thu, 10 Oct 2013 21:59:42 +0000 (21:59 +0000)]
CallbackData unnecessarily caches the JSValue for currentThis
https://bugs.webkit.org/show_bug.cgi?id=122616

Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2013-10-10
Reviewed by Oliver Hunt.

CallbackData implements its own version of caching the JSValue* for the JSValueRef it stores.
+[JSValue valueWithJSValueRef:inContext:] already does caching, thus obviating the need for
CallbackData to do its own caching.

* API/JSContext.mm:
(+[JSContext currentThis]):
(-[JSContext beginCallbackWithData:thisValue:argumentCount:arguments:]):
(-[JSContext endCallbackWithData:]):
* API/JSContextInternal.h:

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

6 years agoRemove unused attribute in CoordinatedTile class
commit-queue@webkit.org [Thu, 10 Oct 2013 21:50:33 +0000 (21:50 +0000)]
Remove unused attribute in CoordinatedTile class
https://bugs.webkit.org/show_bug.cgi?id=122619

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-10-10
Reviewed by Noam Rosenthal.

No new tests, covered by existing ones.

* platform/graphics/texmap/coordinated/CoordinatedTile.h: Remove
m_localBuffer.

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

6 years ago[WK2][Soup] Add platform specific stubs for NetworkProcess
ossy@webkit.org [Thu, 10 Oct 2013 21:47:14 +0000 (21:47 +0000)]
[WK2][Soup] Add platform specific stubs for NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=110115

Reviewed by Carlos Garcia Campos.

Original patch by Balazs Kelemen <kbalazs@webkit.org> and Kwang Yul Seo  <skyul@company100.net>.

* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* NetworkProcess/gtk/NetworkProcessSoup.cpp: Added.
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
(WebKit::NetworkProcess::platformSetCacheModel):
(WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
Stubs.
(WebKit::NetworkProcess::clearCacheForAllOrigins):
(WebKit::NetworkProcess::platformTerminate):
* NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp: Added.
(WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost):
Added platform default based on the comment in ResourceRequestSoup.cpp.
* UIProcess/Network/soup/NetworkProcessProxySoup.cpp: Added.
(WebKit::NetworkProcessProxy::platformGetLaunchOptions):
Stub.
* UIProcess/soup/WebContextSoup.cpp: Added.
(WebKit::WebContext::platformInitializeNetworkProcess):
Stub.

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

6 years agoScrollbars are updated on the main thread rather than the scrolling thread
bdakin@apple.com [Thu, 10 Oct 2013 21:44:06 +0000 (21:44 +0000)]
Scrollbars are updated on the main thread rather than the scrolling thread
(causing scroll bars not to appear/update quickly in some cases)
https://bugs.webkit.org/show_bug.cgi?id=122585
-and corresponding-
<rdar://problem/10710775>

Reviewed by Simon Fraser.

Source/WebCore:

This patch does a few things in order to allow scrollbars to be updated on the
scrolling thread:

1. This patch adds the ability to know if the lower-level APIs necessary to get
this to work right are available, AND if the content is actually capable of taking
advantage of this feature. This is currently implemented as
Scrollbar::supportsUpdateOnSecondaryThread() which makes use of a new
ScrollableArea function called updatesScrollLayerPositionOnMainThread()

2. To update on the scrolling thread, the scrolling tree needs to know about the
ScrollbarPainters.

3. Once it knows about them, it should update the presentation value whenever the
layer position changes.

4. Presentation value is basically the same thing as double value. There is a bit
of code we maintain currently to compute that. This patch moves that code to a
static function on ScrollableArea that can be called from both the main thread and
the scrolling thread.

5. ScrollbarPainter API needs to know about the layers we have created for the
vertical and horizontal scrollbars, then they will use those layers and the
presentation value that we set on the scrolling thread to move the layers around.

This is part of #1 above.
* page/FrameView.cpp:
(WebCore::FrameView::updatesScrollLayerPositionOnMainThread):
* page/FrameView.h:

This is part of #2. ScrollingStateScrollingNodes now have vertical and horizontal
ScrollbarPainters for Mac only.
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
* page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::verticalScrollbarPainter):
(WebCore::ScrollingStateScrollingNode::horizontalScrollbarPainter):

Also part of #2. Make sure to set the ScrollbarPainters for scrolling nodes when
appropriate.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):

Implement this function that was just stubbed out before. This is part of #5 in
that is will allow the ScrollbarPainter API to know about any layer changes.
(WebCore::ScrollingCoordinatorMac::scrollableAreaScrollbarLayerDidChange):

Back to #2, making sure we properly set the ScrollbarPainters to send over to the
scrolling thread.
(WebCore::ScrollingCoordinatorMac::setScrollbarPaintersForNode):
* page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
(WebCore::ScrollingStateScrollingNode::setScrollbarPainters):

This code achieves #3. It uses new ScrollbarPainter API to adjust the position of
the scrollbars from the scrolling thread.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
(WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):

This is for #5. ScrollbarPainter needs to know about our scrollbar layers.
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::verticalScrollbarLayerDidChange):
(WebCore::ScrollAnimator::horizontalScrollbarLayerDidChange):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
(WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):

This is for #4. This code computes the scrollbar’s value and current overhang
amount.
(WebCore::ScrollableArea::computeScrollbarValueAndOverhang):
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::layerForHorizontalScrollbar):
(WebCore::ScrollableArea::layerForVerticalScrollbar):
(WebCore::ScrollableArea::layerForScrolling):

This is for #1. We need to know if we have the ability to update scrollbars on a
different thread. We can do that only on certain versions of the OS, only when
threaded scrolling is enabled, and only when the current page is actually using
the scrolling thread to scroll.
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
* platform/Scrollbar.h:
* platform/ScrollbarThemeClient.h:

New ScrollbarPainter APIs.
* platform/mac/NSScrollerImpDetails.h:

This is for #5, letting the ScrollbarPainter API  know about the layers.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate layer]):
(-[WebScrollbarPainterDelegate convertRectToLayer:]):
(-[WebScrollbarPainterDelegate shouldUseLayerPerPartForScrollerImp:]):

Before we kick off a scroll animation, set the current painting characteristics so
they are up-to-date in case we are scrolling on the scrolling thread.
(-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
(WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):

Only paint the scrollbars through ScrollbarThemeMac if they are NOT being updated
by the scrolling thread.
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::setCurrentPaintCharacteristics):
(WebCore::scrollbarPainterPaint):
(WebCore::ScrollbarThemeMac::paint):

Back to #1.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updatesScrollLayerPositionOnMainThread):
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
* rendering/RenderListBox.h:

Source/WebKit2:

New pure virtual function.
* WebProcess/Plugins/PDF/PDFPlugin.h:

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

6 years ago[Win] Unreviewed build fix after r157228
bfulgham@apple.com [Thu, 10 Oct 2013 21:34:51 +0000 (21:34 +0000)]
[Win] Unreviewed build fix after r157228

The changes in r157228 trigger a bug in VS2010. This patch works around the compiler bug
to allow this platform to build.

* dom/Range.cpp: Move implementation to header file.
* dom/Range.h: Inline the method.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::open): Add stub method (with pointer arguments) to call the real
method with references.
* page/DOMWindow.h: Declare stub method taking pointer arguments to avoid compiler bug.
* testing/Internals.cpp:
(WebCore::Internals::openDummyInspectorFrontend): Use work-around method when building under
the buggy version of Visual Studio.

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

6 years ago[WK2] Port RemoteNetworkingContext for Soup
ossy@webkit.org [Thu, 10 Oct 2013 21:34:45 +0000 (21:34 +0000)]
[WK2] Port RemoteNetworkingContext for Soup
https://bugs.webkit.org/show_bug.cgi?id=110097

Reviewed by Darin Adler.

Original patch by Balazs Kelemen <kbalazs@webkit.org> and Kwang Yul Seo <skyul@company100.net>.

This should be a cross-platform interface so I lifted the header from
the mac directory. Removed mac specific arguments from constructor,
added setters instead. Moved platform things behind ifdefs and added
Soup specific bits.

The following things were fixed by Csaba Osztrogonác:
- solved conflicts in project.pbxproj
- removed the change in the non-existent SyncNetworkResourceLoader.cpp
- marked RemoteNetworkingContext class as FINAL
- reordered the members for platform specific initialization
- added initializers to m_needsSiteSpecificQuirks and m_localFileContentSniffingEnabled members on PLATFORM(MAC)

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
* NetworkProcess/RemoteNetworkingContext.h: Renamed from Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.h.
(WebKit::RemoteNetworkingContext::create):
(WebKit::RemoteNetworkingContext::RemoteNetworkingContext):
(WebKit::RemoteNetworkingContext::setNeedsSiteSpecificQuirks):
(WebKit::RemoteNetworkingContext::setLocalFileContentSniffingEnabled):
* NetworkProcess/mac/RemoteNetworkingContext.mm:
* NetworkProcess/soup/RemoteNetworkingContextSoup.cpp: Added.
(WebKit::RemoteNetworkingContext::~RemoteNetworkingContext):
(WebKit::RemoteNetworkingContext::isValid):
(WebKit::RemoteNetworkingContext::initiatingPageID):
(WebKit::RemoteNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase):
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::RemoteNetworkingContext::destroyPrivateBrowsingSession):
(WebKit::RemoteNetworkingContext::storageSession):
(WebKit::RemoteNetworkingContext::privateBrowsingSession):
* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoMake all functions of EventDispatcher static
rniwa@webkit.org [Thu, 10 Oct 2013 21:11:05 +0000 (21:11 +0000)]
Make all functions of EventDispatcher static
https://bugs.webkit.org/show_bug.cgi?id=122591

Reviewed by Antti Koivisto.

Now that EventDispatchMediator is gone, we don't have to have an EventDispatcher object.
Turn EventDispatcher into an empty class with a bunch of static functions.

We can convert it to a namespace or whatever later.

* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchSimulatedClick):
(WebCore::EventDispatcher::dispatchEvent):
* dom/EventDispatcher.h:

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

6 years agoCallbackData unnecessarily caches the JSValue for currentThis
mhahnenberg@apple.com [Thu, 10 Oct 2013 20:50:18 +0000 (20:50 +0000)]
CallbackData unnecessarily caches the JSValue for currentThis
https://bugs.webkit.org/show_bug.cgi?id=122616

Reviewed by Oliver Hunt.

CallbackData implements its own version of caching the JSValue* for the JSValueRef it stores.
+[JSValue valueWithJSValueRef:inContext:] already does caching, thus obviating the need for
CallbackData to do its own caching.

* API/JSContext.mm:
(+[JSContext currentThis]):
(-[JSContext beginCallbackWithData:thisValue:argumentCount:arguments:]):
(-[JSContext endCallbackWithData:]):
* API/JSContextInternal.h:

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

6 years agoConvert some OwnPtr/PassOwnPtr in CoordinatedGraphics code to std::unique_ptr's
commit-queue@webkit.org [Thu, 10 Oct 2013 20:42:16 +0000 (20:42 +0000)]
Convert some OwnPtr/PassOwnPtr in CoordinatedGraphics code to std::unique_ptr's
https://bugs.webkit.org/show_bug.cgi?id=122614

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-10-10
Reviewed by Anders Carlsson.

Source/WebCore:

No new tests, covered by existing ones.

* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::paintToSurface):
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::adjustContentsScale):
(WebCore::CoordinatedGraphicsLayer::createBackingStore):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::createLayer):
(WebCore::CoordinatedGraphicsScene::deleteLayer):
(WebCore::CoordinatedGraphicsScene::ensureRootLayer):
(WebCore::CoordinatedGraphicsScene::purgeGLResources):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp:
(WebCore::ThreadSafeCoordinatedSurface::ThreadSafeCoordinatedSurface):
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h:
* platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
(WebCore::UpdateAtlas::buildLayoutIfNeeded):
(WebCore::UpdateAtlas::didSwapBuffers):
* platform/graphics/texmap/coordinated/UpdateAtlas.h:
(WebCore::UpdateAtlas::isInUse):

Source/WebKit2:

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:

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

6 years agoStore uniform type information in WebGLUniformationLocation.
roger_fong@apple.com [Thu, 10 Oct 2013 20:15:18 +0000 (20:15 +0000)]
Store uniform type information in WebGLUniformationLocation.
https://bugs.webkit.org/show_bug.cgi?id=122607.

Reviewed by Dean Jackson.

Covered by Khronos Conformance Suite 1.0.2.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getUniform):
(WebCore::WebGLRenderingContext::getUniformLocation):
* html/canvas/WebGLUniformLocation.cpp:
(WebCore::WebGLUniformLocation::create):
(WebCore::WebGLUniformLocation::WebGLUniformLocation):
(WebCore::WebGLUniformLocation::type):
* html/canvas/WebGLUniformLocation.h:

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

6 years agoWeb Inspector: Remove the old front-end from WebKit
commit-queue@webkit.org [Thu, 10 Oct 2013 20:05:41 +0000 (20:05 +0000)]
Web Inspector: Remove the old front-end from WebKit
https://bugs.webkit.org/show_bug.cgi?id=122295

Patch by Marcelo Morais <m.morais@samsung.com> on 2013-10-10
Reviewed by Timothy Hatcher.

Skipping the tests of the old Inspector UI for all ports.

* TestExpectations:
* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk-wk1/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac-lion/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
* platform/win-xp/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:

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

6 years agoREGRESSION(r157203): WebKit crashes after dispatching gesture event
rniwa@webkit.org [Thu, 10 Oct 2013 20:05:29 +0000 (20:05 +0000)]
REGRESSION(r157203): WebKit crashes after dispatching gesture event
https://bugs.webkit.org/show_bug.cgi?id=122615

Reviewed by Anders Carlsson.

Don't release the event until the end of the function where we call member functions on it.

* dom/Node.cpp:
(WebCore::Node::dispatchGestureEvent):

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

6 years agoUnreviewed, roll out r157193. It broke some builds.
fpizlo@apple.com [Thu, 10 Oct 2013 20:04:22 +0000 (20:04 +0000)]
Unreviewed, roll out r157193. It broke some builds.

* JavaScriptCore.xcodeproj/project.pbxproj:

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

6 years agogenerate-message-receiver.py can't handle nested #ifs
ossy@webkit.org [Thu, 10 Oct 2013 20:02:09 +0000 (20:02 +0000)]
generate-message-receiver.py can't handle nested #ifs
https://bugs.webkit.org/show_bug.cgi?id=121877

Reviewed by Alexey Proskuryakov.

* Scripts/webkit2/parser.py:
(parse): Exit early until proper fix instead of generating buggy output.

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

6 years agoMove the rest of EventRetargeter functions to EventPath
rniwa@webkit.org [Thu, 10 Oct 2013 19:49:24 +0000 (19:49 +0000)]
Move the rest of EventRetargeter functions to EventPath
https://bugs.webkit.org/show_bug.cgi?id=122586

Reviewed by Andreas Kling.

Moved the rest of EventRetargeter functiosn either static local or EventPath member functions.

* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchScopedEvent):
(WebCore::EventDispatcher::dispatch):
(WebCore::EventDispatcher::dispatchEventPostProcess):
* dom/EventDispatcher.h:
* dom/EventRetargeter.cpp:
(WebCore::EventPath::EventPath):
(WebCore::calculateAdjustedNodes): Made static local. Also takes const EventPath and returns the size
to which EventPath should be shrunk; this allows us to remove EventPath::shrink.
(WebCore::updateTouchListsInEventPath): Moved and renamed from EventRetargeter::adjustTouchList.
(WebCore::EventPath::updateTouchLists): Moved and renamed from EventRetargeter::adjustForTouchEvent.
(WebCore::EventPath::setRelatedTarget): Moved.
* dom/EventRetargeter.h:
(WebCore::eventTargetRespectingTargetRules): Renamed from EventRetargeter::eventTargetRespectingTargetRules.

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

6 years ago<rdar://problem/13341666> WebKit should always build against an SDK.
mrowe@apple.com [Thu, 10 Oct 2013 19:48:19 +0000 (19:48 +0000)]
<rdar://problem/13341666> WebKit should always build against an SDK.

Have all projects default to building against the OS X Internal SDK for the Production
configuration. For the Debug and Release configurations, look for UseInternalSDK.xcconfig
to determine whether the OS X Internal SDK should be used. If not, use the normal OS X SDK.

Reviewed by Dan Bernstein.

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/ThirdParty:

* gtest/xcode/Config/General.xcconfig:
* gtest/xcode/Config/ProductionProject.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/WebCore:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/WebInspectorUI:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/WebKit/mac:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/WebKit2:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Source/WTF:

* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:

Tools:

* DumpRenderTree/mac/Configurations/Base.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:

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

6 years ago[CoordinatedGraphics][CSS Shaders] marshal color and matrix custom filter parameters
commit-queue@webkit.org [Thu, 10 Oct 2013 19:43:49 +0000 (19:43 +0000)]
[CoordinatedGraphics][CSS Shaders] marshal color and matrix custom filter parameters
https://bugs.webkit.org/show_bug.cgi?id=117904

Correctly encode and decode the "matrix" and "color" custom filter parameter types.
No port currently enables this code, however with this change the relevant layout tests now pass when enabled in EFL.
Patch by Ralph Thomas <ralpht@gmail.com> on 2013-10-10
Reviewed by Noam Rosenthal.

* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):

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

6 years agoSource/JavaScriptCore: <rdar://problem/13871507> JavaScriptCore fails to build with...
mrowe@apple.com [Thu, 10 Oct 2013 19:25:07 +0000 (19:25 +0000)]
Source/JavaScriptCore: <rdar://problem/13871507> JavaScriptCore fails to build with C++ 98 conformance changes

Reviewed by Andreas Kling.

* heap/VTableSpectrum.cpp:
(JSC::VTableSpectrum::dump): strrchr returns a const char* when passed one.
Update the type of the local variable to accommodate that.

Source/WebKit2: <rdar://problem/13871522> WebKit2 fails to build with C++ 98 conformance changes

Reviewed by Andreas Kling.

* Shared/mac/SandboxExtensionMac.mm:
(WebKit::resolveSymlinksInPath): strrchr returns a const char* when passed one.
Update the type of the local variable to accommodate that.

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

6 years ago[CSS Shapes] clampToUnsigned() should return unsigned, not int
hmuller@adobe.com [Thu, 10 Oct 2013 19:22:57 +0000 (19:22 +0000)]
[CSS Shapes] clampToUnsigned() should return unsigned, not int
https://bugs.webkit.org/show_bug.cgi?id=122601

Source/WebCore:

Reviewed by Andreas Kling.

Corrected the return type for clampToUnsigned() in MathExtras.h. It's now unsigned.
No new tests since this is just an internal refactoring of existing code.

* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShape::marginIntervals): Use the redefined clampToUnsigned method.

Source/WTF:

Corrected the return type for clampToUnsigned() in MathExtras.h. It's now unsigned.

Reviewed by Andreas Kling.

* wtf/MathExtras.h:
(clampToUnsigned):

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

6 years agoUnreviewed gardening.
berto@igalia.com [Thu, 10 Oct 2013 18:24:06 +0000 (18:24 +0000)]
Unreviewed gardening.

Move the tests that only fail in wk1 to their file, and unskip the
ones that are passing in all cases.

* platform/gtk-wk1/TestExpectations:
* platform/gtk-wk2/TestExpectations:
* platform/gtk/TestExpectations:

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

6 years ago[CSS Shapes] New positioning model: Shape cropped to margin box
bjonesbe@adobe.com [Thu, 10 Oct 2013 18:22:56 +0000 (18:22 +0000)]
[CSS Shapes] New positioning model: Shape cropped to margin box
https://bugs.webkit.org/show_bug.cgi?id=118092

Reviewed by Alexandru Chiculita.

Source/WebCore:

Clip the shape to the margin box when it extends out the left or right
edges. Also added a few local variables to make the code easier to
read.

Tests: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001-ref.html
       csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-004.html
       csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-005.html
       csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-006.html

* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):

LayoutTests:

Add tests for shapes that extend out left/right of the margin box.

Fix polygon and image threshold tests so that they have a large enough
margin box so the shape isn't clipped.

Also update some of the top/bottom tests to have a better reference,
they should be more likely to break if the implementation fails now.

* csswg/contributors/adobe/submitted/shapes/shape-outside/resources/w3c-import.log:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001-ref-expected.html: Copied from LayoutTests/csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003.html.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001-ref.html: Copied from LayoutTests/csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003.html.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003-expected.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-004-expected.html: Copied from LayoutTests/csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001-expected.html.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-004.html: Copied from LayoutTests/csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003.html.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-005-expected.html: Copied from LayoutTests/csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001-expected.html.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-005.html: Copied from LayoutTests/csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003.html.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-006-expected.html: Copied from LayoutTests/csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001-expected.html.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-006.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-polygon-000.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-polygon-001.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-polygon-002.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/w3c-import.log:
* fast/shapes/shape-outside-floats/shape-outside-floats-image-threshold-001.html:

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

6 years agoAvoid resizing the internal buffer of SharedBuffer when creating a PurgeableBuffer
dbates@webkit.org [Thu, 10 Oct 2013 18:20:36 +0000 (18:20 +0000)]
Avoid resizing the internal buffer of SharedBuffer when creating a PurgeableBuffer
https://bugs.webkit.org/show_bug.cgi?id=122516

Reviewed by Darin Adler.

Currently when we create a PurgeableBuffer from a SharedBuffer we may
resize the internal buffer of the SharedBuffer so that it can fit the
concatenated contents of all of its segments before copying this
internal buffer to the internal buffer of the PurgeableBuffer. Instead,
we can avoid resizing the internal buffer of SharedBuffer by allocating
a PurgeableBuffer and then copying the internal buffer of SharedBuffer
and its segments directly into it.

* platform/PurgeableBuffer.h:
(WebCore::PurgeableBuffer::createUninitialized): Add inline implementation
when building with ENABLE_PURGEABLE_MEMORY disabled.
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::createPurgeableBuffer): Implemented in terms of
SharedBuffer::{copyBufferAndClear, createUninitialized}().
(WebCore::SharedBuffer::copyBufferAndClear): Added.
(WebCore::SharedBuffer::buffer): Moved logic to copy segments/data array to
SharedBuffer::copyBufferAndClear() and modified this function to use it.
* platform/SharedBuffer.h:
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::copyBufferAndClear): Renamed; formerly called SharedBuffer::copyDataArrayAndClear.
* platform/mac/PurgeableBufferMac.cpp:
(WebCore::allocatePurgeableBuffer): Added.
(WebCore::PurgeableBuffer::createUninitialized): Added.
(WebCore::PurgeableBuffer::create): Moved logic to allocate a purgeable buffer into
PurgeableBuffer::createUninitialized() and modified this function to use it.

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

6 years agoObjective-C API: blocks aren't callable via 'new'
mhahnenberg@apple.com [Thu, 10 Oct 2013 18:20:13 +0000 (18:20 +0000)]
Objective-C API: blocks aren't callable via 'new'
https://bugs.webkit.org/show_bug.cgi?id=122561

Reviewed by Oliver Hunt.

Currently the only way for clients to vend new native objects to JavaScript code
is via factory methods in the form of exported class methods or blocks. Blocks can
be called like normal functions from JavaScript code, but they cannot be invoked
with 'new'. This would give a simple way for clients to expose constructor-like
behavior to their JavaScript code.

This patch adds the ability for blocks to be invoked as if they were a constructor.
Blocks invoked as constructors are required to return an object. If the block doesn't
return an object then an error is thrown. The 'this' object is not provided to the
block and must be created within the block itself.

This patch also unifies the native 'construct' callback used in both the C and Obj-C
APIs under the APICallbackFunction struct, similar to how we unified the 'call' callback
between ObjCCallbackFunction and JSCallbackFunction before.

This patch also adds tests to make sure that different blocks generate objects that
correctly behave when queried with instanceof. It also makes sure that the correct
JS exception is thrown when a block fails to return an object.

* API/APICallbackFunction.h:
(JSC::APICallbackFunction::call):
(JSC::APICallbackFunction::construct):
* API/JSCallbackConstructor.cpp:
(JSC::JSCallbackConstructor::getConstructData):
* API/JSCallbackConstructor.h:
(JSC::JSCallbackConstructor::constructCallback):
* API/JSCallbackFunction.h:
(JSC::JSCallbackFunction::functionCallback):
* API/ObjCCallbackFunction.h:
(JSC::ObjCCallbackFunction::functionCallback):
(JSC::ObjCCallbackFunction::constructCallback):
* API/ObjCCallbackFunction.mm:
(JSC::objCCallbackFunctionCallAsConstructor):
(JSC::ObjCCallbackFunction::ObjCCallbackFunction):
(JSC::ObjCCallbackFunction::create):
(JSC::ObjCCallbackFunction::getConstructData):
* API/tests/testapi.mm:

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

6 years agoUnreviewed gardening. plugins/document-open.html will some times timeout.
kov@webkit.org [Thu, 10 Oct 2013 18:14:51 +0000 (18:14 +0000)]
Unreviewed gardening. plugins/document-open.html will some times timeout.

* platform/gtk-wk2/TestExpectations:

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

6 years agoUnreviewed gardening, the inspector protocol timeouts are also affecting TestInspecto...
kov@webkit.org [Thu, 10 Oct 2013 17:54:47 +0000 (17:54 +0000)]
Unreviewed gardening, the inspector protocol timeouts are also affecting TestInspectorServer.

* Scripts/run-gtk-tests:
(TestRunner): skip TestInspectorServer.

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

6 years agoAX: VoiceOver speaking too much when group elements with tabindex=-1 are used
cfleizach@apple.com [Thu, 10 Oct 2013 17:41:24 +0000 (17:41 +0000)]
AX: VoiceOver speaking too much when group elements with tabindex=-1 are used
https://bugs.webkit.org/show_bug.cgi?id=122574

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Tests: accessibility/negative-tabindex-does-not-expose-label.html

Elements that expose tabindex=-1 are being identified as generic focusable elements for accessibility.
Which among other things, determines whether to create an accessible name for the object.
This has the negative effect of causing VoiceOver to speak way too much information when navigating inside
a <div> with this attribute.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::visibleText):
(WebCore::AccessibilityNodeObject::title):

LayoutTests:

* accessibility/negative-tabindex-does-not-expose-label-expected.txt: Added.
* accessibility/negative-tabindex-does-not-expose-label.html: Added.

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

6 years agoRemove custom finalizer for Node JS wrappers.
akling@apple.com [Thu, 10 Oct 2013 17:39:42 +0000 (17:39 +0000)]
Remove custom finalizer for Node JS wrappers.
<https://webkit.org/b/122603>

Reviewed by Geoff Garen.

Node can just use the auto-generated finalizer, the custom one was
identical to what the generator would output.

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

6 years agoRemove duplicate entry for editing/spelling/spellcheck-paste.html.
kov@webkit.org [Thu, 10 Oct 2013 16:38:21 +0000 (16:38 +0000)]
Remove duplicate entry for editing/spelling/spellcheck-paste.html.

* platform/gtk/TestExpectations:

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

6 years agoCTTE: activeDOMWindow() and firstDOMWindow() should return references.
akling@apple.com [Thu, 10 Oct 2013 16:31:25 +0000 (16:31 +0000)]
CTTE: activeDOMWindow() and firstDOMWindow() should return references.
<https://webkit.org/b/122598>

Reviewed by Anders Carlsson.

Now that wrappers vend references to their WebCore objects, follow
up and make these two return references as well.

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

6 years ago[ATK] Missing checks in returnIfWebKitAccessibleIsInvalid
commit-queue@webkit.org [Thu, 10 Oct 2013 16:19:47 +0000 (16:19 +0000)]
[ATK] Missing checks in returnIfWebKitAccessibleIsInvalid
https://bugs.webkit.org/show_bug.cgi?id=122600

Patch by Mario Sanchez Prada <mario.prada@samsung.com> on 2013-10-10
Reviewed by Chris Fleizach.

Check that the AccessibilityObject associated to the ATK wrapper
is not NULL and contains a valid reference to the document before
calling AccessibilityObject::updateBackingStore().

* accessibility/atk/WebKitAccessibleUtil.h: Add extra checks.

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

6 years agoClean up JSDOMWindowShell a little.
akling@apple.com [Thu, 10 Oct 2013 15:43:48 +0000 (15:43 +0000)]
Clean up JSDOMWindowShell a little.
<https://webkit.org/b/122599>

Reviewed by Anders Carlsson.

- Have impl() return a DOMWindow& instead of a pointer.
- Store the DOMWrapperWorld in a Ref instead of a RefPtr.
- Reuse TRY_TO_UNWRAP_WITH_INTERFACE in EventTarget bindings.

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

6 years agoBuildfix for non Mac platforms with enabled NetworkProcess
ossy@webkit.org [Thu, 10 Oct 2013 15:35:02 +0000 (15:35 +0000)]
Buildfix for non Mac platforms with enabled NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=121793

Reviewed by Anders Carlsson.

* Shared/ShareableResource.cpp:
* Shared/ShareableResource.h:
* Shared/WebResourceBuffer.cpp:
* Shared/WebResourceBuffer.h:
* WebKit2Prefix.h:
* WebProcess/Network/NetworkProcessConnection.cpp:
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.messages.in:
* WebProcess/Network/WebResourceLoader.cpp:
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:

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

6 years agoMake XPathGrammar.y bison3-friendly again after r157205
commit-queue@webkit.org [Thu, 10 Oct 2013 15:01:42 +0000 (15:01 +0000)]
Make XPathGrammar.y bison3-friendly again after r157205
https://bugs.webkit.org/show_bug.cgi?id=122595

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-10-10
Reviewed by Anders Carlsson.

No new tests, build fix.

* xml/XPathGrammar.y: Replace YYLEX_PARAM with %lex-param, as the
former was removed in bison3.

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

6 years agoSVGUseElement: Use iterative traversal to find disallowed elements.
akling@apple.com [Thu, 10 Oct 2013 14:51:45 +0000 (14:51 +0000)]
SVGUseElement: Use iterative traversal to find disallowed elements.
<https://webkit.org/b/122596>

Reviewed by Antti Koivisto.

Rewrote subtreeContainsDisallowedElement() in SVGUseElement.cpp to
use iterative traversal with descendantsOfType<Element> instead of
recursing through the tree.

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

6 years agoMove RenderObject::layout() to RenderElement.
akling@apple.com [Thu, 10 Oct 2013 13:55:29 +0000 (13:55 +0000)]
Move RenderObject::layout() to RenderElement.
<https://webkit.org/b/122537>

Reviewed by Antti Koivisto.

RenderText will ASSERT_NOT_REACHED() in its layout(), so move this
to RenderElement. This allows us to use the fast firstChild()
instead of virtual dispatch.

The needsLayout() bit remains on RenderObject for now. Moving that
to RenderElement is a far more involved change.

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

6 years agoAX: Crash at WebCore::accessibleNameForNode when visiting Facebook
cfleizach@apple.com [Thu, 10 Oct 2013 13:42:48 +0000 (13:42 +0000)]
AX: Crash at WebCore::accessibleNameForNode when visiting Facebook
https://bugs.webkit.org/show_bug.cgi?id=122572

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Test: accessibility/aria-labeled-with-hidden-node.html

Handle the case where aria-labelledby references a non-rendered node.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::accessibleNameForNode):

LayoutTests:

* accessibility/aria-labeled-with-hidden-node-expected.txt: Added.
* accessibility/aria-labeled-with-hidden-node.html: Added.

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

6 years agoUnreviewed gardening.
berto@igalia.com [Thu, 10 Oct 2013 13:39:04 +0000 (13:39 +0000)]
Unreviewed gardening.

dom/xhtml/level2/html/HTMLInputElement20.xhtml no longer crashes.

* platform/gtk/TestExpectations:

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

6 years agoREGRESSION(r157210): Crashes in WebCore::ScopedEventQueue::dispatchEvent for platform...
zandobersek@gmail.com [Thu, 10 Oct 2013 13:29:54 +0000 (13:29 +0000)]
REGRESSION(r157210): Crashes in WebCore::ScopedEventQueue::dispatchEvent for platforms using GCC
https://bugs.webkit.org/show_bug.cgi?id=122592

Reviewed by Gustavo Noronha Silva.

* dom/ScopedEventQueue.cpp:
(WebCore::ScopedEventQueue::dispatchEvent): When calling EventDispatcher::dispatchEvent(), the GCC-compiled code
first creates a copy of the PassRefPtr<Event> object that's being passed into the method call. The copy will be used
in that method while the original is left with a null pointer. Only after that is the original queried for its pointer
while trying to get the Event's target, resulting in a crash due to calling the Event::target() on a null pointer.
To avoid it, pass a naked Event pointer to the method call. This will create a new PassRefPtr object without nullifying
the original one.

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

6 years ago[GTK] Provide search functionality to MiniBrowser
commit-queue@webkit.org [Thu, 10 Oct 2013 13:19:12 +0000 (13:19 +0000)]
[GTK] Provide search functionality to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=117631

Patch by Andres Gomez <agomez@igalia.com> on 2013-10-10
Reviewed by Carlos Garcia Campos.

Adds a search bar to MiniBrowser with the minimum functionality
and a new button to the toolbar for showing the new search
bar. Typical keyboard shortcuts are also added.

* MiniBrowser/gtk/BrowserSearchBar.c: Added.
(doSearch):
(searchNext):
(searchPrevious):
(searchCloseButtonClickedCallback):
(searchEntryMenuIconPressedCallback):
(searchEntryClearIconReleasedCallback):
(searchEntryChangedCallback):
(searchEntryActivatedCallback):
(searchPrevButtonClickedCallback):
(searchNextButtonClickedCallback):
(searchMenuCheckButtonToggledCallback):
(browser_search_bar_init):
(browserSearchBarFinalize):
(browser_search_bar_class_init):
(browser_search_bar_new):
(browser_search_bar_add_accelerators):
(browser_search_bar_open):
(browser_search_bar_close):
* MiniBrowser/gtk/BrowserSearchBar.h: Added.
* MiniBrowser/gtk/BrowserWindow.c:
(webViewEnterFullScreen): Closes new search bar.
(webViewLeaveFullScreen): Opens new search bar if previously
visible.
(searchCallback): Added. Shows and hides the new search bar.
(browser_window_init): Added search button to the toolbar.
(browserWindowConstructed): Creates the new search bar.
* MiniBrowser/gtk/GNUmakefile.am: Added new files to compilation.

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

6 years agoWebkit - Updated Tamil translation
commit-queue@webkit.org [Thu, 10 Oct 2013 12:27:44 +0000 (12:27 +0000)]
Webkit - Updated Tamil translation
https://bugs.webkit.org/show_bug.cgi?id=120520

Patch by Shantha kumar <shkumar@redhat.com> on 2013-10-10
Reviewed by Gustavo Noronha Silva.

* ta.po: updated.

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

6 years agoUse more Element iterators in SVG code.
akling@apple.com [Thu, 10 Oct 2013 12:19:52 +0000 (12:19 +0000)]
Use more Element iterators in SVG code.
<http://webkit.org/b/121127>

Reviewed by Antti Koivisto.

Use childrenOfType to iterate over only SVGElement (or even more
specific) children in a bunch of places.

Also auto-generate type helpers for SVGElement and SVGStopElement.

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

6 years agoJS DOM wrappers' impl() functions should return references.
akling@apple.com [Thu, 10 Oct 2013 12:01:51 +0000 (12:01 +0000)]
JS DOM wrappers' impl() functions should return references.
<https://webkit.org/b/122497>

Reviewed by Antti Koivisto.

JS DOM wrappers always have a corresponding WebCore object during
their lifetime, so make impl() return a reference.

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

6 years agoFix debug build after r157210
commit-queue@webkit.org [Thu, 10 Oct 2013 11:17:22 +0000 (11:17 +0000)]
Fix debug build after r157210
https://bugs.webkit.org/show_bug.cgi?id=122593

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-10-10
Reviewed by Andreas Kling.

No new tests, build fix.

* dom/EventContext.cpp:
(WebCore::TouchEventContext::handleLocalEvents): Fix ASSERT, now that
event is a reference instead of a pointer.

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

6 years agoTighten some renderer access in Document.
akling@apple.com [Thu, 10 Oct 2013 11:16:32 +0000 (11:16 +0000)]
Tighten some renderer access in Document.
<https://webkit.org/b/121865>

Reviewed by Antti Koivisto.

A bit of Node/Element and RenderObject/RenderElement tightening.

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

6 years agorangeOfContents() should take a Node&.
akling@apple.com [Thu, 10 Oct 2013 10:49:20 +0000 (10:49 +0000)]
rangeOfContents() should take a Node&.
<https://webkit.org/b/122438>

Reviewed by Darin Adler.

All callers of rangeOfContents() either have a Node& already,
or do some kind of null-checking before calling it.

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

6 years ago[CSS Grid Layout] Implement support for grid-template
svillar@igalia.com [Thu, 10 Oct 2013 08:38:57 +0000 (08:38 +0000)]
[CSS Grid Layout] Implement support for grid-template
https://bugs.webkit.org/show_bug.cgi?id=103313

Reviewed by Dean Jackson.

Source/WebCore:

Based on Blink r153427, r155199 and r155712 by <jchaffraix@chromium.org>

Test: fast/css-grid-layout/grid-template-get-set.html

Recognize, parse, store and return properly the value of
grid-template. It required some extra parsing code because the
specs mandates to check that the defined grid areas are indeed
rectangular. Named grid areas are still not fully supported, will
be done in a follow up patch.

As validating involves building the grid areas a new CSSValue was
added to hold the computed value. Note that we have to track the
explicit size of the named grid areas as the named grid areas
(".") are not tracked in our HashMap of grid areas.

This change also involves moving GridCoordinate and GridSpan to a
separate file in order to share the code that describes the grid
area coordinates.

* CMakeLists.txt: Added new files to the build.
* GNUmakefile.list.am: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSGridTemplateValue.cpp: Added.
(WebCore::CSSGridTemplateValue::CSSGridTemplateValue):
(WebCore::stringForPosition):
(WebCore::CSSGridTemplateValue::customCSSText):
* css/CSSGridTemplateValue.h: Added.
(WebCore::CSSGridTemplateValue::create):
(WebCore::CSSGridTemplateValue::~CSSGridTemplateValue):
(WebCore::CSSGridTemplateValue::gridAreaMap):
(WebCore::CSSGridTemplateValue::rowCount):
(WebCore::CSSGridTemplateValue::columnCount):
(WebCore::toCSSGridTemplateValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGridTemplate): create the grid areas and
validate that they define rectangular sections.
* css/CSSParser.h:
* css/CSSPropertyNames.in: Added -webkit-grid-template.
* css/CSSValue.cpp:
(WebCore::CSSValue::equals): add support for the new CSSGridTemplateValue.
(WebCore::CSSValue::cssText): Ditto.
(WebCore::CSSValue::destroy): Ditto.
* css/CSSValue.h:
(WebCore::CSSValue::isGridTemplateValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::cachedGridCoordinate): Replaced RenderGrid::GridSpan by WebCore::GridSpan.
(WebCore::RenderGrid::resolveGridPositionsFromAutoPlacementPosition): Ditto.
(WebCore::RenderGrid::resolveGridPositionsFromStyle): Ditto.
(WebCore::RenderGrid::resolveGridPositionAgainstOppositePosition): Ditto.
(WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition): Ditto.
(WebCore::RenderGrid::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition): Ditto.
(WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Ditto.
* rendering/RenderGrid.h: Took GridSpan and GridCoordinate out.
* rendering/style/GridCoordinate.h: Added.
(WebCore::GridSpan::create):
(WebCore::GridSpan::GridSpan):
(WebCore::GridSpan::operator==):
(WebCore::GridCoordinate::GridCoordinate):
(WebCore::GridCoordinate::operator==):
(WebCore::GridCoordinate::operator!=):
* rendering/style/RenderStyle.h:
* rendering/style/StyleGridData.cpp:
(WebCore::StyleGridData::StyleGridData):
* rendering/style/StyleGridData.h:
(WebCore::StyleGridData::operator==):

LayoutTests:

From Blink r153427, r155199 and r155712  by <jchaffraix@chromium.org>

Added a test to verify that we properly recognize, parse, store
and return the value of grid-template.

* fast/css-grid-layout/grid-template-get-set-expected.txt: Added.
* fast/css-grid-layout/grid-template-get-set.html: Added.

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

6 years agoMake EventDispatcher::dispatch comprehensible
rniwa@webkit.org [Thu, 10 Oct 2013 08:19:22 +0000 (08:19 +0000)]
Make EventDispatcher::dispatch comprehensible
https://bugs.webkit.org/show_bug.cgi?id=122588

Reviewed by Andreas Kling.

Merged EventDispatcher::dispatchEventAtCapturing, EventDispatcher::dispatchEventAtTarget,
EventDispatcher::dispatchEventAtBubbling, and EventDispatcher::dispatchEventPostProcess into EventDispatcher::dispatch,
and extracted static local callDefaultEventHandlersInTheBubblingOrder and dispatchEventInDOM out of it.

Also made handleLocalEvents of subclasses of EventContext and Node take Event& instead of Event*.

* dom/EventContext.cpp: The following functions now take Event& instead of Event*.
(WebCore::EventContext::handleLocalEvents):
(WebCore::MouseOrFocusEventContext::handleLocalEvents):
(WebCore::TouchEventContext::handleLocalEvents):
* dom/EventContext.h:

* dom/EventDispatcher.cpp:
(WebCore::callDefaultEventHandlersInTheBubblingOrder): Extracted from EventDispatcher::dispatchEventPostProcess,
which is now merged into EventDispatcher::dispatch.
(WebCore::dispatchEventInDOM): Extracted out of EventDispatcher::dispatch, EventDispatcher::dispatchEventAtCapturing,
EventDispatcher::dispatchEventAtTarget and EventDispatcher::dispatchEventAtBubbling. This function is responsible for
dispatching the event for capturing, at the target, and then bubbling through the event path chain.
(WebCore::EventDispatcher::dispatch): EventDispatcher::dispatchEventPostProcess got merged into this. The calls to
dispatchEventAtCapturing, dispatchEventAtTarget, and dispatchEventAtBubbling are replaced by a single call to
dispatchEventInDOM.
* dom/EventDispatcher.h:

* dom/FocusEvent.h:
(WebCore::toFocusEvent): Added the version that takes a reference.
* dom/MouseEvent.h:
(WebCore::toMouseEvent): Ditto.
* dom/TouchEvent.h:
(WebCore::toTouchEvent): Ditto.
* dom/Node.cpp:
(WebCore::Node::handleLocalEvents): Now takes Event& instead of Event*.
* dom/Node.h:
* dom/WindowEventContext.cpp:
(WebCore::WindowEventContext::handleLocalEvents): Ditto.
* dom/WindowEventContext.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::handleLocalEvents): Ditto.
* html/HTMLFormElement.h:

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

6 years agoFTL should be able to do simple OSR exits using llvm.webkit.stackmap
fpizlo@apple.com [Thu, 10 Oct 2013 04:24:57 +0000 (04:24 +0000)]
FTL should be able to do simple OSR exits using llvm.webkit.stackmap
https://bugs.webkit.org/show_bug.cgi?id=122538

Reviewed by Oliver Hunt.

This gives the FTL the ability to OSR exit using the llvm.webkit.stackmap intrinsic.

- The FTL compiles all OSR exit calls as calls to llvm.webkit.stackmap with a unique
  ID, passing a requested size that is big enough for own jump replacement.

- After LLVM compilation, we parse the new LLVM stackmap section.

- For all llvm.webkit.stackmaps that we used for OSR exits, we do a jumpReplacement,
  which targets exit thunks that we generate.

- If an exit thunk fires, it causes JSC to compile an exit off-ramp that uses a
  combination of the JSC-internal OSR exit accounting (FTL::ExitValue and friends) and
  LLVM stackmap's accounting of where data actually ended up (register, indirect,
  constant) to reconstruct bytecode state.

This still has shortcomings; for example it cannot handle XMM or YMM registers. Handling
YMM registers will require adding some basic YMM support to our assemblers - really we
just need the ability to move a YMM's value into a GPR.

This patch preserves all of the old, intrinsic-less, FTL OSR exit support. Hence it
manages to pass all existing FTL tests even despite its incompleteness. I think that's
the right way to go since this is already a big patch, and anyway it would be great to
keep the intrinsic-less FTL OSR exit support so long as the LLVM side of this hasn't
landed.

* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::firstRegister):
(JSC::AbstractMacroAssembler::lastRegister):
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::isStackRelated):
(JSC::MacroAssembler::firstRealRegister):
(JSC::MacroAssembler::nextRegister):
(JSC::MacroAssembler::secondRealRegister):
* assembler/MacroAssemblerX86Common.h:
* assembler/X86Assembler.h:
(JSC::X86Assembler::firstRegister):
(JSC::X86Assembler::lastRegister):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* ftl/FTLCArgumentGetter.cpp:
(JSC::FTL::CArgumentGetter::loadNextAndBox):
* ftl/FTLCArgumentGetter.h:
(JSC::FTL::CArgumentGetter::loadNextDoubleIntoGPR):
* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateCodeSection):
(JSC::FTL::mmAllocateDataSection):
(JSC::FTL::dumpDataSection):
(JSC::FTL::fixFunctionBasedOnStackMaps):
(JSC::FTL::compile):
* ftl/FTLExitThunkGenerator.cpp:
(JSC::FTL::ExitThunkGenerator::emitThunk):
(JSC::FTL::ExitThunkGenerator::emitThunks):
* ftl/FTLExitThunkGenerator.h:
* ftl/FTLExitValue.h:
(JSC::FTL::ExitValue::isInJSStackSomehow):
(JSC::FTL::ExitValue::valueFormat):
* ftl/FTLFail.cpp:
(JSC::FTL::fail):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLJITCode.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::generateExitThunks):
(JSC::FTL::LowerDFGToLLVM::LowerDFGToLLVM):
(JSC::FTL::LowerDFGToLLVM::appendOSRExit):
(JSC::FTL::LowerDFGToLLVM::emitOSRExitCall):
(JSC::FTL::LowerDFGToLLVM::linkOSRExitsAndCompleteInitializationBlocks):
* ftl/FTLOSRExit.h:
* ftl/FTLOSRExitCompilationInfo.h:
(JSC::FTL::OSRExitCompilationInfo::OSRExitCompilationInfo):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStubWithOSRExitStackmap):
(JSC::FTL::compileStubWithoutOSRExitStackmap):
(JSC::FTL::compileFTLOSRExit):
* ftl/FTLSaveRestore.cpp: Added.
(JSC::FTL::bytesForGPRs):
(JSC::FTL::requiredScratchMemorySizeInBytes):
(JSC::FTL::offsetOfGPR):
(JSC::FTL::saveAllRegisters):
(JSC::FTL::restoreAllRegisters):
* ftl/FTLSaveRestore.h: Added.
* ftl/FTLStackMaps.cpp: Added.
(JSC::FTL::readObject):
(JSC::FTL::StackMaps::Constant::parse):
(JSC::FTL::StackMaps::Constant::dump):
(JSC::FTL::StackMaps::Location::parse):
(JSC::FTL::StackMaps::Location::dump):
(JSC::FTL::StackMaps::Location::involvesGPR):
(JSC::FTL::StackMaps::Location::isGPR):
(JSC::FTL::StackMaps::Location::gpr):
(JSC::FTL::StackMaps::Location::restoreInto):
(JSC::FTL::StackMaps::Record::parse):
(JSC::FTL::StackMaps::Record::dump):
(JSC::FTL::StackMaps::parse):
(JSC::FTL::StackMaps::dump):
(JSC::FTL::StackMaps::dumpMultiline):
(JSC::FTL::StackMaps::getRecordMap):
(WTF::printInternal):
* ftl/FTLStackMaps.h: Added.
* ftl/FTLState.h:
* ftl/FTLThunks.cpp:
(JSC::FTL::osrExitGenerationThunkGenerator):
* ftl/FTLValueFormat.cpp:
(JSC::FTL::reboxAccordingToFormat):
* ftl/FTLValueFormat.h:
* runtime/DataView.cpp:
(JSC::DataView::create):
* runtime/DataView.h:
(JSC::DataView::read):
* runtime/Options.h:

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

6 years agoFTL should be able to do simple OSR exits using llvm.webkit.stackmap
fpizlo@apple.com [Thu, 10 Oct 2013 04:24:07 +0000 (04:24 +0000)]
FTL should be able to do simple OSR exits using llvm.webkit.stackmap
https://bugs.webkit.org/show_bug.cgi?id=122538

Reviewed by Oliver Hunt.

* wtf/PrintStream.cpp:
(WTF::printInternal):
* wtf/PrintStream.h:
* wtf/RefCountedArray.h:
(WTF::RefCountedArray::byteSize):

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

6 years agoAnother build fix after r157204.
rniwa@webkit.org [Thu, 10 Oct 2013 03:26:36 +0000 (03:26 +0000)]
Another build fix after r157204.

* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatch):

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

6 years agoBuild fix after r157204.
rniwa@webkit.org [Thu, 10 Oct 2013 03:19:32 +0000 (03:19 +0000)]
Build fix after r157204.

* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatch):

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

6 years agoUse unique_ptr instead of deleteAllValues in XPath
darin@apple.com [Thu, 10 Oct 2013 02:46:27 +0000 (02:46 +0000)]
Use unique_ptr instead of deleteAllValues in XPath
https://bugs.webkit.org/show_bug.cgi?id=121082

Reviewed by Anders Carlsson.

* dom/Attr.h: Made the namespaceURI function public so it can be called by
code in XPath. Since the class is FINAL, calls won't do virtual dispatch.

* xml/XPathExpression.cpp:
(WebCore::XPathExpression::XPathExpression): Added. Use std::move.
(WebCore::XPathExpression::createExpression): Use the new Parser::parseStatement
and more std::move.
(WebCore::XPathExpression::~XPathExpression): Removed now-unneeded delete.
* xml/XPathExpression.h: Removed unused create function. Use std::unique_ptr.

* xml/XPathExpressionNode.cpp:
(WebCore::XPath::Expression::evaluationContext): Use NeverDestroyed instead of
DEFINE_STATIC_LOCAL.
(WebCore::XPath::Expression::setSubexpressions): Added. Used to set all the
subexpressions at once rather than adding one at a time.

* xml/XPathExpressionNode.h: Use plain unsigned instead of unsigned long.
Eliminated the ParseNode class, used only by the parser to delete objects,
which we now do with %destructor. Made more functions protected. Fixed the
capitalization of the word "subexpression". Made m_subexpressions be a Vector
of std::unique_ptr.

* xml/XPathFunctions.cpp: Marked all the classes FINAL and all their virtual
functions OVERRIDE. Reduced some of the boilerplate.
(WebCore::XPath::Function::setArguments): Passed in the name so we don't have
to store the function names in all the function objects.
(WebCore::XPath::FunId::evaluate): Use std::move instead of Value::adopt.
(WebCore::XPath::FunLocalName::evaluate): Use emptyString instead of "".
(WebCore::XPath::FunNamespaceURI::evaluate): Ditto.
(WebCore::XPath::FunName::evaluate): Ditto.
(WebCore::XPath::FunSubstringBefore::evaluate): Ditto.
(WebCore::XPath::FunSubstringAfter::evaluate): Ditto.
(WebCore::XPath::FunSubstring::evaluate): Ditto.
(WebCore::XPath::FunLang::evaluate): Use Value(false) so we can make the
constructor that takes a boolean explicit.
(WebCore::XPath::FunFalse::evaluate): Ditto.
(WebCore::XPath::populateFunctionMap): Changed idiom slightly to match other
maps we set up.
(WebCore::XPath::Function::create): Refactored createFunction into three
member functions of this name.

* xml/XPathFunctions.h: Made all the Function members private or protected
except for Function::create.

* xml/XPathGrammar.y: Changed the parser to use a reference instead of
a pointer, and to pass the reference through to yylex as well. Break up
the union into pieces and add %destructor as needed to make sure everything
gets deallocated if parsing fails. Added a new top level rule "Top" so that
we would not try to set the parse result multiple times during parsing.
Call setParseResult instead of setting m_topExpr directly. Use std::unique_ptr
to adopt pointers from the union. Removed all the register/unregister calls
that used to be used to manage storage. Also changed the four different node
types to be separate tokens instead of using string matching at this level
for them.

* xml/XPathNodeSet.cpp:
(WebCore::XPath::NodeSet::sort): Removed const_cast since m_isSorted and
m_nodes are now both marked mutable. Also set m_isSorted after sorting; this
was an oversight that hurt performance before.
(WebCore::XPath::NodeSet::traversalSort): Ditto.
(WebCore::XPath::NodeSet::firstNode): Use nullptr.
(WebCore::XPath::NodeSet::anyNode): Ditto.

* xml/XPathNodeSet.h: Removed unneeded extra includes. Removed the
WTF_MAKE_FAST_ALLOCATED for NodeSet since we never allocate these on the heap.
Added a constructor that takes a single node. Deleted the swap function, since
we now move instead of swap. Deleted the append function that takes a raw Node*,
since calling the PassRefPtr<Node> overload does the same thing. Removed the
unused reverse function. Marked both m_isSorted and m_nodes mutable so the
sort function can be const.

* xml/XPathParser.cpp: Moved the Token struct in here instead of the header.
(WebCore::XPath::populateAxisNamesMap):Renamed to match our normal naming scheme,
and changed to use add instead of set, use WTF_ARRAY_LENGTH, and not use a typedef.
(WebCore::XPath::parseAxisName): Related style changes, including renaming to
better reflect the way this works with a boolean.
(WebCore::XPath::Parser::nextTokenInternal): Updated to call parseAxisName,
and to produce four separate tokens for the four node type functions.
(WebCore::XPath::Parser::nextToken): Renamed local variable.
(WebCore::XPath::Parser::Parser): Made this a real constructor that takes arguments
and initializes all the fields. Deleted the unneeded reset function.
(WebCore::XPath::Parser::lex): Changed to take an argument of an appropriate type
instead of casting from void*. Also changed the string code to leak a StringImpl,
which is now what the grammar code expects.
(WebCore::XPath::Parser::expandQualifiedName): Renamed from expandQName. Changed
to set m_sawNamespaceError instead of relying on code in the grammar to do it.
(WebCore::XPath::Parser::parseStatement): Removed most of the code in this function.
Changed to a much simpler model. Also made this a static member function so it
takes care of creating the parser itself and does not need to call reset. Also
changed return value to be a std::unique_ptr to make ownership more clear.

* xml/XPathParser.h: Added a declaration of YYSTYPE. Removed unneeded forward
declarations and moved Token into the cpp file. Deleted most public functions,
leaving only parseStatement, the entry point, and the three functions needed by
the grammar, lex, expandQualifiedName, and setParseResult.

* xml/XPathPath.cpp:
(WebCore::XPath::Filter::Filter): Move in the arguments instead of copying them.
(WebCore::XPath::Filter::evaluate): Updated for name and type changes.
(WebCore::XPath::LocationPath::LocationPath): Ditto.
(WebCore::XPath::LocationPath::evaluate): Ditto. Also use std::move instead of
Value::adopt and instead of swap.
(WebCore::XPath::LocationPath::appendStep): Changed to take ownership of a
unique_ptr.
(WebCore::XPath::LocationPath::prependStep): Ditto. Renamed from insertFirstStep.
(WebCore::XPath::Path::Path): Move in the arguments.

* xml/XPathPath.h: Removed unneeded includes. Changed arugument types to use
std::unique_ptr to pass ownership in. Added override to all virtual functions.
Changed data members to use std::unique_ptr.

* xml/XPathPredicate.cpp:
(WebCore::XPath::StringExpression::StringExpression): Use move.
(WebCore::XPath::Negative::Negative): Added.
(WebCore::XPath::Negative::evaluate): Updated for name changes.
(WebCore::XPath::NumericOp::NumericOp): Use move.
(WebCore::XPath::NumericOp::evaluate): Tweak formatting.
(WebCore::XPath::EqTestOp::EqTestOp): Use move.
(WebCore::XPath::EqTestOp::evaluate): Updated for name changes.
(WebCore::XPath::LogicalOp::LogicalOp): Use move.
(WebCore::XPath::LogicalOp::shortCircuitOn): Made shorter.
(WebCore::XPath::LogicalOp::evaluate): Updated for name changes.
(WebCore::XPath::Union::Union): Added.
(WebCore::XPath::Union::evaluate): Updated for name changes.
(WebCore::XPath::evaluatePredicate): Updated for name changes, to use
ASCIILiteral, and to be a free function that takes an expression.
(WebCore::XPath::predicateIsContextPositionSensitive): Added.
Replaces the Predicate::isContextPositionSensitive function.

* xml/XPathPredicate.h: Made all the classes FINAL and added a lot of OVERRIDE.
Added a constructor for Negative and Union. Got rid of the Predicate class and
instead provided two functions that operate on an Expression.

* xml/XPathStep.cpp:
(WebCore::XPath::Step::Step): Use move instea dof copying.
(WebCore::XPath::Step::~Step): Removed calls to deleteAllValues.
(WebCore::XPath::Step::optimize): Use move instead of swap and copy. Also
operate directly on the data members of the node test instead of using functions
that just return references to those data members.
(WebCore::XPath::optimizeStepPair): Use references instead of pointers, move
instead of swap, and early return instead of nested if statements.
(WebCore::XPath::Step::predicatesAreContextListInsensitive): Use references.
(WebCore::XPath::Step::evaluate): Use references instead of pointers and move
instead of swap.
(WebCore::XPath::nodeMatchesBasicTest): Use references instead of pointers and
more specific types when possible.
(WebCore::XPath::nodeMatches): Ditto.
(WebCore::XPath::Step::nodesInAxis): Use references instead of pointers. Added
braces to match style. Use words instead of letters for local variable names.

* xml/XPathStep.h: Make almost everything in NodeTest private since callers
just set these up and Step is what actually uses them. Changed the predicate
vectors to be vectors of Predicate instead of Predicate*, since a Predicate
is just a wrapper around a single std::unique_ptr<Expression>. Changed to use
move instead of copy when making a Step and to use references instead of pointers.

* xml/XPathValue.cpp: Use std::numeric_limits explicitly instead of using using.
Got rid of Value::adopt.
(WebCore::XPath::Value::toNodeSet): Use NeverDestroyed instead of DEFINE_STATE_LOCAL.
Updated for name changes.
(WebCore::XPath::Value::modifiableNodeSet): Ditto.
(WebCore::XPath::Value::toBoolean): Ditto.
(WebCore::XPath::Value::toNumber): Ditto.
(WebCore::XPath::Value::toString): Ditto. Use ASCIILiteral.

* xml/XPathValue.h: Moved ValueData class inside the Value class and renamed
it Value::Data. Removed fancy trick that avoids turning pointers into bool, and
just take the risk. Made many, but not all, of the Value constructors explicit
since we normally are explicit at call sites. Removed unneeded unsigned long
overload of the constructor. Changed the NodeSet version of the constructor to
use std::move and use that instead of AdoptTag.

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

6 years agoBuild fix. Add back the missing call to EventRetargeter::adjustForTouchEvent.
rniwa@webkit.org [Thu, 10 Oct 2013 01:59:54 +0000 (01:59 +0000)]
Build fix. Add back the missing call to EventRetargeter::adjustForTouchEvent.

* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatch):

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

6 years agoEventDispatchMediator is goner
rniwa@webkit.org [Thu, 10 Oct 2013 01:44:42 +0000 (01:44 +0000)]
EventDispatchMediator is goner
https://bugs.webkit.org/show_bug.cgi?id=122581

Reviewed by Antti Koivisto.

Killed the death.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMAllInOne.cpp:
* dom/Element.cpp:
(WebCore::Element::dispatchWheelEvent):
(WebCore::Element::dispatchKeyEvent):
(WebCore::Element::dispatchFocusEvent):
(WebCore::Element::dispatchBlurEvent):
* dom/EventDispatchMediator.cpp: Removed.
* dom/EventDispatchMediator.h: Removed.
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent):
(WebCore::EventDispatcher::dispatchScopedEvent):
* dom/EventDispatcher.h:
* dom/KeyboardEvent.h:
* dom/MouseEvent.h:
* dom/Node.cpp:
(WebCore::Node::dispatchScopedEvent):
(WebCore::Node::dispatchEvent):
(WebCore::Node::dispatchGestureEvent):
(WebCore::Node::dispatchTouchEvent):
(WebCore::Node::dispatchUIRequestEvent):
* dom/Node.h:
* dom/ScopedEventQueue.cpp:
(WebCore::ScopedEventQueue::~ScopedEventQueue):
(WebCore::ScopedEventQueue::enqueueEvent):
(WebCore::ScopedEventQueue::dispatchAllEvents):
(WebCore::ScopedEventQueue::dispatchEvent):
* dom/ScopedEventQueue.h:
* dom/TouchEvent.cpp:
* dom/TouchEvent.h:
* dom/UIEvent.h:
* dom/WheelEvent.h:

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

6 years agoKill some RenderObject::firstChildSlow/lastChildSlow usage.
akling@apple.com [Thu, 10 Oct 2013 01:37:35 +0000 (01:37 +0000)]
Kill some RenderObject::firstChildSlow/lastChildSlow usage.
<https://webkit.org/b/122582>

Reviewed by Antti Koivisto.

Use tighter typing in some random places to flush out unnecessary use
of virtual first/last child getters on RenderObject.

There are more of these opportunities, but I left them untouched to
avoid snowballing this patch.

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

6 years agowebkit-patch failure-reason fails with UnicodeDecodeError when name has non-ascii...
commit-queue@webkit.org [Thu, 10 Oct 2013 01:23:46 +0000 (01:23 +0000)]
webkit-patch failure-reason fails with UnicodeDecodeError when name has non-ascii characters
https://bugs.webkit.org/show_bug.cgi?id=122552

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.com> on 2013-10-09
Reviewed by Darin Adler.

* Scripts/webkitpy/common/checkout/commitinfo.py:
(CommitInfo.blame_string): ensure objects are made into unicode strings, not regular ones that
will cause UnicodeDecodeError for non-ascii characters.

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

6 years agoFix some bad paths in the Xcode project
simon.fraser@apple.com [Thu, 10 Oct 2013 01:23:34 +0000 (01:23 +0000)]
Fix some bad paths in the Xcode project
https://bugs.webkit.org/show_bug.cgi?id=122583

Reviewed by Mark Rowe.

Fix paths for some storage quota-related files, and remove
reference to mediaControlsQuickTime.css which was removed in r156546.

* WebCore.xcodeproj/project.pbxproj:

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

6 years agoWeb Inspector: [CSS Regions] Display the correct fragment boxes for content inside...
achicu@adobe.com [Thu, 10 Oct 2013 01:17:54 +0000 (01:17 +0000)]
Web Inspector: [CSS Regions] Display the correct fragment boxes for content inside flow threads
https://bugs.webkit.org/show_bug.cgi?id=122291

Reviewed by Timothy Hatcher.

Source/WebCore:

Tests: inspector/elements/highlight-regions-flow-horiz-bt.html
       inspector/elements/highlight-regions-flow-transform-horiz-bt.html
       inspector/elements/highlight-regions-flow-transform-vert-lr.html
       inspector/elements/highlight-regions-flow-transform-vert-rl.html
       inspector/elements/highlight-regions-flow-transform.html
       inspector/elements/highlight-regions-flow-vert-lr.html
       inspector/elements/highlight-regions-flow-vert-rl.html
       inspector/elements/highlight-regions-flow.html

Nodes inside a RenderFlowThread can be split across multiple regions. This patch adds the required
code to compute "fragments" for each region. Each fragment will display its own label.

There are a couple of changes:
1. The node highlight object now has a "scroll" property to hold the main view's scroll offset.
2. There's a "fragment" array to get a list of quads for each renderer fragment. Renderers outside
RenderFlowThreads will just have one fragment.
3. ElementInfo now has two more properties: "regionFlowInfo" (renamed from former flowInfo) and "contentFlowInfo".
If the renderer is a RenderRegion it will have a regionFlowInfo. If the renderer is inside a RenderFlowThread
then it will have a "contentFlowInfo".

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::getHighlight): It should now take a "region" parameter to customize the output for a specific
containing region.
(WebCore::buildObjectForHighlight):
(WebCore::buildObjectForCSSRegionContentClip): We need to know how to clip the fragments inside regions.
(WebCore::buildObjectForRendererFragments): Extracted code from buildObjectForHighlight and added
the new regions lookup code.
(WebCore::buildObjectForElementInfo): Extracted from buildObjectForHighlight.
(WebCore::InspectorOverlay::buildObjectForHighlightedNode):
(WebCore::InspectorOverlay::drawQuadHighlight):
* inspector/InspectorOverlayPage.css: There can be multiple labels on screen at once, so I've
created the #element-title-template element that we clone for each label. .element-title-container is now
holding all the .element-title elements, so that we can remove them all at once.
(.element-title-container):
(.element-title):
(#element-title-template):
(.tag-name):
(.node-id):
(.class-name):
* inspector/InspectorOverlayPage.html:
* inspector/InspectorOverlayPage.js:
(reset):
(_toggleOptionalValue):
(_createElementTitle): Creates an element populated with data read from elementInfo.
(_drawElementTitle): Added code to create more labels for multiple fragments.
(_drawRegionsHighlight):
(_drawFragmentHighlight):
(drawNodeHighlight): Consolidated the scroll property into a canvas.transform.

LayoutTests:

Added tests to check the result of the InspectorOverlay when it inspects nodes inside RenderFlowThreads.

* http/tests/inspector/elements-test.js:
* inspector/elements/highlight-regions-flow-expected.txt: Added.
* inspector/elements/highlight-regions-flow-horiz-bt-expected.txt: Added.
* inspector/elements/highlight-regions-flow-horiz-bt.html: Added.
* inspector/elements/highlight-regions-flow-transform-expected.txt: Added.
* inspector/elements/highlight-regions-flow-transform-horiz-bt-expected.txt: Added.
* inspector/elements/highlight-regions-flow-transform-horiz-bt.html: Added.
* inspector/elements/highlight-regions-flow-transform-vert-lr-expected.txt: Added.
* inspector/elements/highlight-regions-flow-transform-vert-lr.html: Added.
* inspector/elements/highlight-regions-flow-transform-vert-rl-expected.txt: Added.
* inspector/elements/highlight-regions-flow-transform-vert-rl.html: Added.
* inspector/elements/highlight-regions-flow-transform.html: Added.
* inspector/elements/highlight-regions-flow-vert-lr-expected.txt: Added.
* inspector/elements/highlight-regions-flow-vert-lr.html: Added.
* inspector/elements/highlight-regions-flow-vert-rl-expected.txt: Added.
* inspector/elements/highlight-regions-flow-vert-rl.html: Added.
* inspector/elements/highlight-regions-flow.html: Added.

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

6 years agoLayout assertion failure in WebCore::RenderView::paint
simon.fraser@apple.com [Thu, 10 Oct 2013 00:53:23 +0000 (00:53 +0000)]
Layout assertion failure in WebCore::RenderView::paint
https://bugs.webkit.org/show_bug.cgi?id=121925

Reviewed by Tim Horton.

This fixes the assertion seen when running WK2 API tests.

If RenderLayerCompositor::flushPendingLayerChanges() was called before
the root layer was attached, it would set m_shouldFlushOnReattach
to do the flush later, after attaching (bypassing the runloop observer
that updated layout if necessary).

This could cause us to get to a CA commit without having updated
layout, hence the assertion.

Fix by having attachRootLayer() schedule a layer flush, rather than doing
one right away.

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

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

6 years agoMove float logical location/dimension methods to RenderBlockFlow
bjonesbe@adobe.com [Thu, 10 Oct 2013 00:35:38 +0000 (00:35 +0000)]
Move float logical location/dimension methods to RenderBlockFlow
https://bugs.webkit.org/show_bug.cgi?id=122282

Reviewed by David Hyatt.

I recently moved the logical location and dimension methods from
RenderBlock to FloatingObject. This made it so that the methods needed
to take in the horizontal writing mode of the FloatingObject's
container in order to do their thing. When looking into how to fix
this, I came to understand why RenderBlock has methods to determine
the logical location and dimensions of its children, when the children
themselves have those methods: the methods on RenderBlock are for
determining the logical value in the writing mode of that RenderBlock,
and the method on the child is for determining the logical value in
the writing mode of the child.

Since the floating object list has moved from RenderBlock to
RenderBlockFlow, this change moves the logical dimension methods from
FloatingObject to RenderBlockFlow.

No new tests, no new behavior.

* rendering/FloatingObjects.cpp:
(WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
(WebCore::FloatingObjects::FloatingObjects):
(WebCore::::updateOffsetIfNeeded):
(WebCore::::collectIfNeeded):
(WebCore::::getHeightRemaining):
* rendering/FloatingObjects.h:
* rendering/LineWidth.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::clearFloats):
(WebCore::RenderBlockFlow::repaintOverhangingFloats):
(WebCore::RenderBlockFlow::insertFloatingObject):
(WebCore::RenderBlockFlow::removeFloatingObject):
(WebCore::RenderBlockFlow::removeFloatingObjectsBelow):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
(WebCore::RenderBlockFlow::positionNewFloats):
(WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
(WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
(WebCore::RenderBlockFlow::addOverhangingFloats):
(WebCore::RenderBlockFlow::hasOverhangingFloat):
(WebCore::RenderBlockFlow::addIntrudingFloats):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::logicalTopForFloat):
(WebCore::RenderBlockFlow::logicalBottomForFloat):
(WebCore::RenderBlockFlow::logicalLeftForFloat):
(WebCore::RenderBlockFlow::logicalRightForFloat):
(WebCore::RenderBlockFlow::logicalWidthForFloat):
(WebCore::RenderBlockFlow::logicalHeightForFloat):
(WebCore::RenderBlockFlow::logicalSizeForFloat):
(WebCore::RenderBlockFlow::pixelSnappedLogicalTopForFloat):
(WebCore::RenderBlockFlow::pixelSnappedLogicalBottomForFloat):
(WebCore::RenderBlockFlow::pixelSnappedLogicalLeftForFloat):
(WebCore::RenderBlockFlow::pixelSnappedLogicalRightForFloat):
(WebCore::RenderBlockFlow::setLogicalTopForFloat):
(WebCore::RenderBlockFlow::setLogicalLeftForFloat):
(WebCore::RenderBlockFlow::setLogicalHeightForFloat):
(WebCore::RenderBlockFlow::setLogicalWidthForFloat):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded):
(WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
(WebCore::updateSegmentsForShapes):
(WebCore::LineBreaker::nextSegmentBreak):
(WebCore::RenderBlockFlow::positionNewFloatOnLine):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
* rendering/shapes/ShapeOutsideInfo.h:

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

6 years agoRemove MouseEventDispatchMediator
rniwa@webkit.org [Thu, 10 Oct 2013 00:29:08 +0000 (00:29 +0000)]
Remove MouseEventDispatchMediator
https://bugs.webkit.org/show_bug.cgi?id=122580

Reviewed by Antti Koivisto.

Removed. Will remove EventDispatchMediator next.

* dom/Element.cpp:
(WebCore::Element::dispatchMouseEvent):
* dom/MouseEvent.cpp:
* dom/MouseEvent.h:
* dom/Node.cpp:
(WebCore::Node::dispatchEvent):
(WebCore::Node::dispatchTouchEvent):

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

6 years agoRemove all subclasses of EventDispatchMediator except MouseEventDispatchMediator
rniwa@webkit.org [Wed, 9 Oct 2013 23:49:21 +0000 (23:49 +0000)]
Remove all subclasses of EventDispatchMediator except MouseEventDispatchMediator
https://bugs.webkit.org/show_bug.cgi?id=122579

Reviewed by Antti Koivisto.

Removed UIRequestEventDispatchMediator, GestureEventDispatchMediator, KeyboardEventDispatchMediator,
and WheelEventDispatchMediator. Moved the code in the respective mediateAndDispatchEvent functions
to their respective dispatch*Event functions in Node.cpp and Element.cpp.

* Modules/indieui/UIRequestEvent.cpp:
(WebCore::UIRequestEvent::eventInterface):
* Modules/indieui/UIRequestEvent.h:
* dom/Element.cpp:
(WebCore::deltaMode):
(WebCore::Element::dispatchWheelEvent):
(WebCore::Element::dispatchKeyEvent):
* dom/GestureEvent.cpp:
* dom/GestureEvent.h:
* dom/KeyboardEvent.cpp:
* dom/KeyboardEvent.h:
* dom/Node.cpp:
(WebCore::Node::dispatchGestureEvent):
(WebCore::Node::dispatchUIRequestEvent):
* dom/WheelEvent.cpp:
* dom/WheelEvent.h:

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

6 years agoWould like a link to dashboard from build.webkit.org main page
ap@apple.com [Wed, 9 Oct 2013 23:03:49 +0000 (23:03 +0000)]
Would like a link to dashboard from build.webkit.org main page
https://bugs.webkit.org/show_bug.cgi?id=122577

Reviewed by Tim Hatcher.

* BuildSlaveSupport/build.webkit.org-config/templates/root.html: Added.

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

6 years agoMinor clean-ups in the JSC Xcode project.
fpizlo@apple.com [Wed, 9 Oct 2013 22:57:55 +0000 (22:57 +0000)]
Minor clean-ups in the JSC Xcode project.

Rubber stamped by Mark Rowe.

- When we copy the jsc binary into the framework,
  $(BUILT_PRODUCTS_DIR)/JavaScriptCore.framework/Resources/jsc is the *output* file not
  the input file. The input file is $(BUILT_PRODUCTS_DIR)/jsc.

- Correct capitalization of "JavaScriptcore.framework" in a comment in a shell script in
  the project.

* JavaScriptCore.xcodeproj/project.pbxproj:

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

6 years ago[CSS Shapes] Lines that don't intersect shape-outside should ignore both left and...
bjonesbe@adobe.com [Wed, 9 Oct 2013 22:54:57 +0000 (22:54 +0000)]
[CSS Shapes] Lines that don't intersect shape-outside should ignore both left and right margins
https://bugs.webkit.org/show_bug.cgi?id=122570

Reviewed by Alexandru Chiculita.

Source/WebCore:

Due to an oversight, the left margin on left floats and the right
margin on right floats was having an effect on lines that did not
intersect the shape (but did intersect the margin box of the float).
By the spec, lines that do not intersect the shape should act as if
the float isn't there, so those margins should have no effect on
those lines. This patch fixes this.

No new tests, it is covered by the existing tests now that they have
been fixed to have the proper behavior.

* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):

LayoutTests:

Update tests to work with the proper behavior for margins. Yes, the
tests were not correct before.

* csswg/contributors/adobe/submitted/shapes/shape-outside/resources/w3c-import.log:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-000.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-007.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-margin-009.html:
* csswg/contributors/adobe/submitted/shapes/shape-outside/w3c-import.log:
* fast/shapes/shape-outside-floats/shape-outside-floats-different-writing-modes.html:

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

6 years ago[Win] Check for MathML fonts and warn user if they are missing.
bfulgham@apple.com [Wed, 9 Oct 2013 22:39:13 +0000 (22:39 +0000)]
[Win] Check for MathML fonts and warn user if they are missing.
https://bugs.webkit.org/show_bug.cgi?id=122568

Reviewed by Tim Horton.

* Scripts/webkitdirs.pm:
(checkRequiredSystemConfig): Use common gperf/bison/flex tests, rather than
Windows-specific code I added previously.
(fontExists): Added
(checkInstalledTools): Add check for MathML fonts.

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

6 years agohttp://build.webkit.org/dashboard/ doesn't link to webkitpy failures
ap@apple.com [Wed, 9 Oct 2013 22:32:03 +0000 (22:32 +0000)]
build.webkit.org/dashboard/ doesn't link to webkitpy failures
https://bugs.webkit.org/show_bug.cgi?id=122471

Reviewed by Tim Hatcher.

Added links to webkitpy, webkitperl and bindings-tests results.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot.prototype.apiTestResultsURLForIteration):
(Buildbot.prototype.webkitpyTestResultsURLForIteration):
(Buildbot.prototype.webkitperlTestResultsURLForIteration):
(Buildbot.prototype.bindingsTestResultsURLForIteration):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus):

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

6 years agoMove some functions from WebKitBuildbot to Buildbot class.
ap@apple.com [Wed, 9 Oct 2013 22:03:54 +0000 (22:03 +0000)]
Move some functions from WebKitBuildbot to Buildbot class.

Suggested by Tim Hatcher.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot.prototype.javascriptTestResultsURLForIteration):
(Buildbot.prototype.apiTestResultsURLForIteration):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot.prototype.layoutTestResultsURLForIteration):

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

6 years agoAdd API tests to the Dashbord page.
ap@apple.com [Wed, 9 Oct 2013 21:58:28 +0000 (21:58 +0000)]
Add API tests to the Dashbord page.

https://bugs.webkit.org/show_bug.cgi?id=122283

Patch by Timothy Hatcher <timothy@apple.com> on 2013-10-09
Reviewed by Timothy Hatcher.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot.prototype.apiTestResultsURLForIteration):

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

6 years agoAdd API tests to the Dashbord page.
timothy@apple.com [Wed, 9 Oct 2013 21:56:15 +0000 (21:56 +0000)]
Add API tests to the Dashbord page.

https://bugs.webkit.org/show_bug.cgi?id=122283

Reviewed by Timothy Hatcher.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot.prototype.apiTestResultsURLForIteration):

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

6 years ago[CSS Shapes] Clip shape-outside to the bottom of the margin box
bjonesbe@adobe.com [Wed, 9 Oct 2013 21:45:44 +0000 (21:45 +0000)]
[CSS Shapes] Clip shape-outside to the bottom of the margin box
https://bugs.webkit.org/show_bug.cgi?id=122562

Reviewed by Alexandru Chiculita.

Source/WebCore:

The spec says that a shape-outside shape must be clipped to the
margin box. This implements clipping the bottom of the shape to the
bottom of the margin box.

Test: csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-000.html
      csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001.html
      csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-002.html
      csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):

LayoutTests:

Test that the shape is properly clipped to the bottom of the float.

* csswg/contributors/adobe/submitted/shapes/shape-outside/resources/w3c-import.log:
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-000-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-000.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-001.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-002-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-002.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003-expected.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/shape-outside-floats-clipped-003.html: Added.
* csswg/contributors/adobe/submitted/shapes/shape-outside/w3c-import.log:

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

6 years agoAttempt to fix faulty Dashboard iteration updating by always rebuilding test result...
timothy@apple.com [Wed, 9 Oct 2013 21:34:28 +0000 (21:34 +0000)]
Attempt to fix faulty Dashboard iteration updating by always rebuilding test result objects.

https://bugs.webkit.org/show_bug.cgi?id=122515

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.update):

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

6 years ago[CoordinatedGraphics] ASSERTION FAILED: !m_flushingLayers (after r156291)
commit-queue@webkit.org [Wed, 9 Oct 2013 21:01:10 +0000 (21:01 +0000)]
[CoordinatedGraphics] ASSERTION FAILED: !m_flushingLayers (after r156291)
https://bugs.webkit.org/show_bug.cgi?id=122016

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-10-09
Reviewed by Noam Rosenthal.

To prevent calling scheduleLayerFlush() inside flushCompositingState(),
we now only call m_client->notifyFlushRequired() - which will trigger
scheduleLayerFlush() - if we are not already flushing layer changes.

No new tests, covered by existing ones.

* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::notifyFlushRequired): Check if we
are already flushing layer changes before calling notifyFlushRequired.
(WebCore::CompositingCoordinator::sizeDidChange): Use notifyFlushRequired()
from CompositingCoordinator instead of calling the one from m_client
directly.
(WebCore::CompositingCoordinator::createGraphicsLayer): Ditto.
(WebCore::CompositingCoordinator::detachLayer): Ditto.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::notifyFlushRequired): Added helper
to check whether we are flushing layer changes before calling client()'s
notifyFlushRequired(). It returns a boolean indicating whether it
called the client's method.
(WebCore::CoordinatedGraphicsLayer::didChangeLayerState): Use the
notifyFlushRequired() helper.
(WebCore::CoordinatedGraphicsLayer::didChangeAnimations): Ditto.
(WebCore::CoordinatedGraphicsLayer::didChangeChildren): Ditto.
(WebCore::CoordinatedGraphicsLayer::didChangeFilters): Ditto.
(WebCore::CoordinatedGraphicsLayer::didChangeImageBacking): Ditto.
(WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay): Ditto.
(WebCore::CoordinatedGraphicsLayer::setContentsToCanvas): Ditto.
(WebCore::CoordinatedGraphicsLayer::flushCompositingState): Ditto.
(WebCore::CoordinatedGraphicsLayer::tiledBackingStoreHasPendingTileCreation):Ditto.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
Declaration of the notifyFlushRequired() helper.

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

6 years agoAX: VoiceOver double speaks all items in <li> nodes
cfleizach@apple.com [Wed, 9 Oct 2013 21:00:02 +0000 (21:00 +0000)]
AX: VoiceOver double speaks all items in <li> nodes
https://bugs.webkit.org/show_bug.cgi?id=122564

Reviewed by Brent Fulgham.

Source/WebCore:

Test: platform/mac/accessibility/native-list-item-should-not-expose-label.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::visibleText):

LayoutTests:

Make a mac specific expectation for listitem-title on Mac.
Make a more directed test for Mac regarding listitem labeling.

* platform/mac/accessibility/lists-expected.txt:
* platform/mac/accessibility/listitem-title-expected.txt: Added.
* platform/mac/accessibility/native-list-item-should-not-expose-label-expected.txt: Added.
* platform/mac/accessibility/native-list-item-should-not-expose-label.html: Added.

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

6 years agoUnreviewed gardening. Many inspector protocol tests are timing out on the bots, unrep...
kov@webkit.org [Wed, 9 Oct 2013 20:44:02 +0000 (20:44 +0000)]
Unreviewed gardening. Many inspector protocol tests are timing out on the bots, unreproducible locally.

* platform/gtk/TestExpectations:

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

6 years agoUnreviewed gardening. A couple of paste tests began timing out after
kov@webkit.org [Wed, 9 Oct 2013 20:31:57 +0000 (20:31 +0000)]
Unreviewed gardening. A couple of paste tests began timing out after
http://trac.webkit.org/changeset/156678.

* platform/gtk/TestExpectations:

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

6 years agoCoordinatedGraphics: Fix integer rounding when computing pixel alignment
commit-queue@webkit.org [Wed, 9 Oct 2013 20:26:00 +0000 (20:26 +0000)]
CoordinatedGraphics: Fix integer rounding when computing pixel alignment
https://bugs.webkit.org/show_bug.cgi?id=122565

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-10-09
Reviewed by Noam Rosenthal.

Source/WebCore:

Replace roundedIntRect call in computePixelAlignment() with enclosingIntRect,
so that very small rectangles (after content scaling) don't appear to be empty,
creating a crash later.

Test: transforms/3d/general/rotate-45-degrees-long-inner-text-in-dt.html

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::computePixelAlignment):

LayoutTests:

Added test that rotates 45 degrees a very long text in a dt tag that
might crash the browser depending on how it handles the integer
rounding when computing pixel alignment.

* transforms/3d/general/rotate-45-degrees-long-inner-text-in-dt-expected.txt: Added.
* transforms/3d/general/rotate-45-degrees-long-inner-text-in-dt.html: Added.

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

6 years agohttp://build.webkit.org/dashboard/ links to a wrong jscore-test results page
ap@apple.com [Wed, 9 Oct 2013 20:22:37 +0000 (20:22 +0000)]
build.webkit.org/dashboard/ links to a wrong jscore-test results page
https://bugs.webkit.org/show_bug.cgi?id=122569

Reviewed by Tim Hatcher.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot.prototype.javascriptTestResultsURLForIteration): "actual.html" used
to be produced by the old Mozilla test harness that we don't use any more.

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

6 years agoSet view to active in ViewClientEfl after WebProcess has relaunched
commit-queue@webkit.org [Wed, 9 Oct 2013 20:15:35 +0000 (20:15 +0000)]
Set view to active in ViewClientEfl after WebProcess has relaunched
https://bugs.webkit.org/show_bug.cgi?id=118650

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-10-09
Reviewed by Noam Rosenthal.

Once WebProcess relaunches, the underlying scene from the view is recreated
and is not active by default, which means it will be in `background'. In
practice, from that point on we are going to get a blank screen, unless we
set it to active.

In the normal flow, the view is set to active during its initialization; this
patch sets it to active also in ViewClientEfl, in the webProcessDidRelaunch
callback.

* UIProcess/efl/ViewClientEfl.cpp:
(WebKit::ViewClientEfl::webProcessDidRelaunch): Added WKViewSetIsActive call.

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

6 years agoRename EventRetargeter::adjustForRelatedTarget to EventPath::setRelatedTarget
rniwa@webkit.org [Wed, 9 Oct 2013 20:05:13 +0000 (20:05 +0000)]
Rename EventRetargeter::adjustForRelatedTarget to EventPath::setRelatedTarget
https://bugs.webkit.org/show_bug.cgi?id=122539

Reviewed by Darin Adler.

Renamed EventRetargeter::adjustForRelatedTarget to EventPath::setRelatedTarget and got rid of
EventDispatchMediators for focus events. We set the related target inside EventDispatcher's
dispatch via Event::relatedTarget, which is now virtual and overridden by mouse/focus events.

* dom/Element.cpp: The following functions no longer use FocusEventDispatchMediators.
(WebCore::Element::dispatchFocusInEvent):
(WebCore::Element::dispatchFocusOutEvent):
(WebCore::Element::dispatchFocusEvent):
(WebCore::Element::dispatchBlurEvent):

* dom/Event.h:
(WebCore::Event::relatedTarget): Added as a virtual function.

* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent): Cache Event*.
(WebCore::EventDispatcher::dispatch): Call setRelatedTargetToPath at the beginning to update
related targets in the path.

* dom/EventDispatcher.h:

* dom/EventRetargeter.cpp:
(WebCore::EventPath::EventPath): Initialize m_origin, used in EventPath::setRelatedTarget.
(WebCore::EventRetargeter::adjustTouchList):
(WebCore::EventPath::setRelatedTarget): Renamed from EventRetargeter::adjustForRelatedTarget.
Delegated the nullity checks to callers by taking references instead of pointers.
(WebCore::EventRetargeter::calculateAdjustedNodes):

* dom/EventRetargeter.h: Removed AdjustedNodes typedef. It's just a Vector of RefPtr<Node>.

* dom/FocusEvent.cpp: Removed FocusEventDispatchMediators for focus events.
* dom/FocusEvent.h:

* dom/MouseEvent.cpp:
(WebCore::MouseEvent::toElement): Cache the related target now that relatedTarget() is virtual.
(WebCore::MouseEvent::fromElement): Ditto.
(WebCore::MouseEventDispatchMediator::mediateAndDispatchEvent): No longer sets the related
targets since that's done in EventDispatcher::dispatch now.

* dom/MouseEvent.h:

* dom/Node.cpp: Removed obnoxious Node::dispatchScopedEventDispatchMediator.
(WebCore::Node::dispatchScopedEvent):
* dom/Node.h:

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler): Cache the related
target in a local variable now that relatedTarget() is virtual.

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

6 years agoChange to std::unique_ptr breaks wtf/DataLog.cpp when DATA_LOG_TO_FILE set to 1
msaboff@apple.com [Wed, 9 Oct 2013 18:22:08 +0000 (18:22 +0000)]
Change to std::unique_ptr breaks wtf/DataLog.cpp when DATA_LOG_TO_FILE set to 1
https://bugs.webkit.org/show_bug.cgi?id=122557

Reviewed by Filip Pizlo.

Changed the leakPtr() to release().

* wtf/DataLog.cpp:
(WTF::initializeLogFileOnce):

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

6 years agoAdd GTK 64 bits release to the buildbot dashboard
commit-queue@webkit.org [Wed, 9 Oct 2013 17:07:13 +0000 (17:07 +0000)]
Add GTK 64 bits release to the buildbot dashboard
https://bugs.webkit.org/show_bug.cgi?id=122548

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.com> on 2013-10-09
Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/GTK.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot): add 64 bits release wk2 and wk1 testers.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
(table.queue-grid tr.platform.linux-gtk img.logo): use the GTK+ logo in its dashboard line.

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

6 years ago[Win] BeginPaint should only be called in response to WM_PAINT.
commit-queue@webkit.org [Wed, 9 Oct 2013 17:05:39 +0000 (17:05 +0000)]
[Win] BeginPaint should only be called in response to WM_PAINT.
https://bugs.webkit.org/show_bug.cgi?id=122549

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-10-09
Reviewed by Brent Fulgham.

According to the documentation, the Win32 api function BeginPaint should only be called in response to a WM_PAINT message.
Currently, the WebView window procedure might call this function (via WebView::paint(0, 0)) for all types of messages.
Also, there is potential for double drawing. If some message is dispatched before WM_PAINT, WebView::paint(0, 0) will be called.
This call does not validate the area drawn, so later the WM_PAINT will arrive, drawing the same area.
This can be fixed by calling the Win32 function UpdateWindow(), which will do a synchronous window update, and validate the area.

* WebView.cpp:
(WebView::WebViewWndProc): Use Win32 function UpdateWindow() to draw invalid area.

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

6 years ago[arm] Inverted src and dest FP registers in DFG speculative JIT when using hardfp.
commit-queue@webkit.org [Wed, 9 Oct 2013 17:02:37 +0000 (17:02 +0000)]
[arm] Inverted src and dest FP registers in DFG speculative JIT when using hardfp.
https://bugs.webkit.org/show_bug.cgi?id=122555

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-10-09
Reviewed by Michael Saboff.

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheckSetResult):
(JSC::DFG::SpeculativeJIT::appendCallSetResult):

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

6 years ago[EFL] Some accessibility tests are failing
commit-queue@webkit.org [Wed, 9 Oct 2013 16:47:52 +0000 (16:47 +0000)]
[EFL] Some accessibility tests are failing
https://bugs.webkit.org/show_bug.cgi?id=122553

Unreviewed EFL gardening

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-10-09

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:

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

6 years agoAX: VoiceOver does not speak aria-expanded state on iOS
cfleizach@apple.com [Wed, 9 Oct 2013 16:16:34 +0000 (16:16 +0000)]
AX: VoiceOver does not speak aria-expanded state on iOS
https://bugs.webkit.org/show_bug.cgi?id=122540

Expose aria-pressed state for iOS.

Reviewed by Mario Sanchez Prada.

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):

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

6 years agoUnreviewed. Update GObject DOM symbols file after r157163.
carlosgc@webkit.org [Wed, 9 Oct 2013 15:33:56 +0000 (15:33 +0000)]
Unreviewed. Update GObject DOM symbols file after r157163.

* bindings/gobject/webkitdom.symbols:

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

6 years agoAdd Frédéric Wang's blog to the planet
commit-queue@webkit.org [Wed, 9 Oct 2013 15:24:57 +0000 (15:24 +0000)]
Add Frédéric Wang's blog to the planet
https://bugs.webkit.org/show_bug.cgi?id=122541

Patch by Frédéric Wang <fred.wang@free.fr> on 2013-10-09
Reviewed by Martin Robinson.

* config.ini: Add my blog to the planet.

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

6 years agoRemove RunLoopMac.mm
andersca@apple.com [Wed, 9 Oct 2013 15:24:05 +0000 (15:24 +0000)]
Remove RunLoopMac.mm
https://bugs.webkit.org/show_bug.cgi?id=122527

Reviewed by Antti Koivisto.

RunLoop::setUseApplicationRunLoopOnMainRunLoop() is no longer used, so we can just use the run() and stop()
implementations from RunLoopCF.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/RunLoop.cpp:
* platform/RunLoop.h:
* platform/cf/RunLoopCF.cpp:
(WebCore::RunLoop::stop):
* platform/mac/RunLoopMac.mm: Removed.

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

6 years agoUnreviewed gardening. Add timeout as expected result for fast/history/go-back-to...
kov@webkit.org [Wed, 9 Oct 2013 14:54:46 +0000 (14:54 +0000)]
Unreviewed gardening. Add timeout as expected result for fast/history/go-back-to-iframe-with-plugin.html,
since it times out sometimes.

* platform/gtk/TestExpectations:

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

6 years agoUnreviewed gardening. Add timeout as expected result for mathml/very-large-stretchy...
kov@webkit.org [Wed, 9 Oct 2013 14:48:10 +0000 (14:48 +0000)]
Unreviewed gardening. Add timeout as expected result for mathml/very-large-stretchy-operators.html,
since it times out on the bots.

* platform/gtk/TestExpectations:

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