summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-11 19:54:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-11 19:54:20 +0200
commit88a04ac016f57c2d78e714682445dff2e7db4ade (patch)
treea48ca81ee3b29953121308168db22532d5b57fe2
parent284837daa07b29d6a63a748544a90b1f5842ac5c (diff)
Imported WebKit commit 42d95198c30c2d1a94a5081181aad0b2be7c316c (http://svn.webkit.org/repository/webkit/trunk@128206)
This includes the rewrite of the configure part of the build system which should fix the QtQuick2 detection and allow for further simplifications in the future
-rw-r--r--ChangeLog83
-rw-r--r--Makefile17
-rw-r--r--Source/JavaScriptCore/API/JSContextRef.cpp6
-rw-r--r--Source/JavaScriptCore/CMakeLists.txt6
-rw-r--r--Source/JavaScriptCore/ChangeLog348
-rw-r--r--Source/JavaScriptCore/GNUmakefile.list.am1
-rwxr-xr-xSource/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def4
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj4
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj6
-rw-r--r--Source/JavaScriptCore/PlatformEfl.cmake4
-rw-r--r--Source/JavaScriptCore/Target.pri1
-rw-r--r--Source/JavaScriptCore/bytecode/CodeBlock.cpp7
-rw-r--r--Source/JavaScriptCore/bytecode/Opcode.h4
-rw-r--r--Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp32
-rw-r--r--Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h2
-rw-r--r--Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp1
-rw-r--r--Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp8
-rw-r--r--Source/JavaScriptCore/dfg/DFGCommon.h1
-rw-r--r--Source/JavaScriptCore/dfg/DFGNode.h6
-rw-r--r--Source/JavaScriptCore/dfg/DFGOperations.cpp36
-rw-r--r--Source/JavaScriptCore/dfg/DFGOperations.h8
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h43
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp36
-rw-r--r--Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp39
-rw-r--r--Source/JavaScriptCore/heap/GCThreadSharedData.cpp1
-rw-r--r--Source/JavaScriptCore/heap/GCThreadSharedData.h8
-rw-r--r--Source/JavaScriptCore/heap/Heap.h6
-rw-r--r--Source/JavaScriptCore/heap/HeapRootVisitor.h1
-rw-r--r--Source/JavaScriptCore/heap/MarkStack.cpp398
-rw-r--r--Source/JavaScriptCore/heap/MarkStack.h339
-rw-r--r--Source/JavaScriptCore/heap/MarkStackInlineMethods.h105
-rw-r--r--Source/JavaScriptCore/heap/MarkedAllocator.cpp55
-rw-r--r--Source/JavaScriptCore/heap/MarkedAllocator.h15
-rw-r--r--Source/JavaScriptCore/heap/MarkedSpace.cpp13
-rw-r--r--Source/JavaScriptCore/heap/MarkedSpace.h36
-rw-r--r--Source/JavaScriptCore/heap/SlotVisitor.cpp412
-rw-r--r--Source/JavaScriptCore/heap/SlotVisitor.h126
-rw-r--r--Source/JavaScriptCore/heap/SlotVisitorInlineMethods.h120
-rw-r--r--Source/JavaScriptCore/interpreter/Interpreter.cpp50
-rw-r--r--Source/JavaScriptCore/jit/JITInlineMethods.h3
-rw-r--r--Source/JavaScriptCore/jit/JITOpcodes.cpp18
-rw-r--r--Source/JavaScriptCore/jit/JITOpcodes32_64.cpp18
-rw-r--r--Source/JavaScriptCore/jit/JITStubs.cpp25
-rw-r--r--Source/JavaScriptCore/jit/JITWriteBarrier.h4
-rw-r--r--Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp1
-rw-r--r--Source/JavaScriptCore/llint/LLIntSlowPaths.cpp21
-rw-r--r--Source/JavaScriptCore/llint/LowLevelInterpreter.asm8
-rw-r--r--Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm13
-rw-r--r--Source/JavaScriptCore/llint/LowLevelInterpreter64.asm13
-rw-r--r--Source/JavaScriptCore/offlineasm/armv7.rb13
-rw-r--r--Source/JavaScriptCore/offlineasm/instructions.rb6
-rw-r--r--Source/JavaScriptCore/offlineasm/x86.rb12
-rw-r--r--Source/JavaScriptCore/runtime/JSCell.h8
-rw-r--r--Source/JavaScriptCore/runtime/JSObject.h3
-rw-r--r--Source/JavaScriptCore/runtime/PropertyOffset.h4
-rw-r--r--Source/JavaScriptCore/runtime/Structure.h18
-rw-r--r--Source/JavaScriptCore/runtime/WriteBarrier.h6
-rw-r--r--Source/JavaScriptCore/shell/PlatformEfl.cmake4
-rw-r--r--Source/JavaScriptCore/tests/mozilla/js1_4/Functions/function-001.js6
-rw-r--r--Source/JavaScriptCore/yarr/YarrJIT.cpp1
-rw-r--r--Source/Platform/ChangeLog36
-rw-r--r--Source/Platform/chromium/public/WebRTCPeerConnectionHandlerClient.h1
-rw-r--r--Source/Platform/chromium/public/WebVideoFrameProvider.h12
-rw-r--r--Source/Platform/chromium/src/WebFilterOperations.cpp2
-rw-r--r--Source/QtWebKit.pro10
-rw-r--r--Source/WTF/ChangeLog128
-rw-r--r--Source/WTF/GNUmakefile.list.am1
-rw-r--r--Source/WTF/WTF.gypi1
-rw-r--r--Source/WTF/WTF.pri2
-rw-r--r--Source/WTF/WTF.pro1
-rw-r--r--Source/WTF/WTF.vcproj/WTF.vcproj4
-rw-r--r--Source/WTF/WTF.xcodeproj/project.pbxproj4
-rw-r--r--Source/WTF/wtf/CMakeLists.txt4
-rw-r--r--Source/WTF/wtf/MemoryInstrumentation.h (renamed from Source/WebCore/dom/MemoryInstrumentation.h)0
-rw-r--r--Source/WTF/wtf/OwnPtr.h53
-rw-r--r--Source/WTF/wtf/Platform.h6
-rw-r--r--Source/WTF/wtf/PlatformEfl.cmake8
-rw-r--r--Source/WebCore/CMakeLists.txt32
-rw-r--r--Source/WebCore/ChangeLog1821
-rw-r--r--Source/WebCore/DerivedSources.pri90
-rw-r--r--Source/WebCore/English.lproj/Localizable.stringsbin55756 -> 56132 bytes
-rw-r--r--Source/WebCore/English.lproj/localizedStrings.js2
-rw-r--r--Source/WebCore/GNUmakefile.list.am9
-rw-r--r--Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp13
-rw-r--r--Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp5
-rw-r--r--Source/WebCore/Modules/mediastream/RTCPeerConnection.h2
-rw-r--r--Source/WebCore/Modules/mediastream/RTCPeerConnection.idl1
-rw-r--r--Source/WebCore/Modules/notifications/Notification.cpp20
-rw-r--r--Source/WebCore/Modules/notifications/Notification.h12
-rw-r--r--Source/WebCore/Modules/notifications/Notification.idl2
-rw-r--r--Source/WebCore/PlatformEfl.cmake21
-rw-r--r--Source/WebCore/Target.pri100
-rwxr-xr-xSource/WebCore/UseV8.cmake1
-rw-r--r--Source/WebCore/WebCore.exp.in1
-rw-r--r--Source/WebCore/WebCore.gypi15
-rw-r--r--Source/WebCore/WebCore.pri54
-rwxr-xr-xSource/WebCore/WebCore.vcproj/WebCore.vcproj36
-rw-r--r--Source/WebCore/WebCore.xcodeproj/project.pbxproj132
-rw-r--r--Source/WebCore/accessibility/AccessibilityObject.h1
-rw-r--r--Source/WebCore/accessibility/AccessibilityRenderObject.cpp2
-rw-r--r--Source/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp2
-rw-r--r--Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp27
-rw-r--r--Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm3
-rw-r--r--Source/WebCore/bindings/js/BindingState.h4
-rw-r--r--Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp8
-rw-r--r--Source/WebCore/bindings/js/JSDOMBinding.h9
-rw-r--r--Source/WebCore/bindings/scripts/CodeGeneratorV8.pm20
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp5
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp7
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp1
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp29
-rw-r--r--Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp1
-rw-r--r--Source/WebCore/bindings/v8/BindingState.cpp29
-rw-r--r--Source/WebCore/bindings/v8/BindingState.h4
-rw-r--r--Source/WebCore/bindings/v8/DOMData.cpp4
-rw-r--r--Source/WebCore/bindings/v8/DOMWrapperWorld.cpp5
-rw-r--r--Source/WebCore/bindings/v8/DOMWrapperWorld.h10
-rw-r--r--Source/WebCore/bindings/v8/IDBBindingUtilities.cpp8
-rw-r--r--Source/WebCore/bindings/v8/NPV8Object.cpp6
-rw-r--r--Source/WebCore/bindings/v8/ScriptController.cpp130
-rw-r--r--Source/WebCore/bindings/v8/ScriptController.h52
-rw-r--r--Source/WebCore/bindings/v8/SharedPersistent.h31
-rw-r--r--Source/WebCore/bindings/v8/V8Binding.cpp6
-rw-r--r--Source/WebCore/bindings/v8/V8Callback.h30
-rw-r--r--Source/WebCore/bindings/v8/V8DOMWindowShell.cpp155
-rw-r--r--Source/WebCore/bindings/v8/V8DOMWindowShell.h46
-rw-r--r--Source/WebCore/bindings/v8/V8DOMWrapper.cpp17
-rw-r--r--Source/WebCore/bindings/v8/V8DOMWrapper.h11
-rw-r--r--Source/WebCore/bindings/v8/V8GCController.cpp76
-rw-r--r--Source/WebCore/bindings/v8/V8GCController.h60
-rw-r--r--Source/WebCore/bindings/v8/V8IsolatedContext.cpp128
-rw-r--r--Source/WebCore/bindings/v8/V8IsolatedContext.h129
-rw-r--r--Source/WebCore/bindings/v8/V8LazyEventListener.cpp30
-rw-r--r--Source/WebCore/bindings/v8/V8PerIsolateData.cpp14
-rw-r--r--Source/WebCore/bindings/v8/V8PerIsolateData.h23
-rw-r--r--Source/WebCore/bindings/v8/V8Utilities.cpp23
-rw-r--r--Source/WebCore/bindings/v8/V8Utilities.h39
-rw-r--r--Source/WebCore/bindings/v8/WorldContextHandle.cpp15
-rw-r--r--Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp8
-rw-r--r--Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp3
-rw-r--r--Source/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.cpp11
-rw-r--r--Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp4
-rw-r--r--Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp1
-rw-r--r--Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp14
-rw-r--r--Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp9
-rw-r--r--Source/WebCore/bindings/v8/custom/V8LocationCustom.cpp13
-rw-r--r--Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp22
-rw-r--r--Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp2
-rw-r--r--Source/WebCore/bindings/v8/custom/V8NotificationCustom.cpp1
-rw-r--r--Source/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp2
-rw-r--r--Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp4
-rw-r--r--Source/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp4
-rw-r--r--Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp12
-rw-r--r--Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp4
-rw-r--r--Source/WebCore/css/CSSAspectRatioValue.cpp6
-rw-r--r--Source/WebCore/css/CSSPrimitiveValue.cpp108
-rw-r--r--Source/WebCore/css/MediaQueryEvaluator.cpp6
-rw-r--r--Source/WebCore/css/StyleResolver.cpp4
-rw-r--r--Source/WebCore/dom/EventNames.h1
-rw-r--r--Source/WebCore/dom/WebCoreMemoryInstrumentation.h3
-rw-r--r--Source/WebCore/html/ButtonInputType.cpp1
-rw-r--r--Source/WebCore/html/CheckboxInputType.cpp1
-rw-r--r--Source/WebCore/html/ColorInputType.cpp1
-rw-r--r--Source/WebCore/html/DateInputType.cpp1
-rw-r--r--Source/WebCore/html/DateTimeInputType.cpp1
-rw-r--r--Source/WebCore/html/DateTimeLocalInputType.cpp1
-rw-r--r--Source/WebCore/html/EmailInputType.cpp1
-rw-r--r--Source/WebCore/html/FileInputType.cpp1
-rw-r--r--Source/WebCore/html/HiddenInputType.cpp1
-rw-r--r--Source/WebCore/html/ImageInputType.cpp1
-rw-r--r--Source/WebCore/html/InputType.cpp147
-rw-r--r--Source/WebCore/html/InputType.h30
-rw-r--r--Source/WebCore/html/InputTypeNames.cpp172
-rw-r--r--Source/WebCore/html/InputTypeNames.h59
-rw-r--r--Source/WebCore/html/MonthInputType.cpp1
-rw-r--r--Source/WebCore/html/NumberInputType.cpp1
-rw-r--r--Source/WebCore/html/PasswordInputType.cpp1
-rw-r--r--Source/WebCore/html/RadioInputType.cpp1
-rw-r--r--Source/WebCore/html/RangeInputType.cpp1
-rw-r--r--Source/WebCore/html/ResetInputType.cpp1
-rw-r--r--Source/WebCore/html/SearchInputType.cpp1
-rw-r--r--Source/WebCore/html/SubmitInputType.cpp1
-rw-r--r--Source/WebCore/html/TelephoneInputType.cpp1
-rw-r--r--Source/WebCore/html/TextInputType.cpp1
-rw-r--r--Source/WebCore/html/TimeInputType.cpp1
-rw-r--r--Source/WebCore/html/URLInputType.cpp1
-rw-r--r--Source/WebCore/html/WeekInputType.cpp1
-rw-r--r--Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp68
-rw-r--r--Source/WebCore/html/canvas/CanvasRenderingContext2D.h10
-rw-r--r--Source/WebCore/html/canvas/CanvasRenderingContext2D.idl4
-rw-r--r--Source/WebCore/html/parser/HTMLPreloadScanner.cpp2
-rw-r--r--Source/WebCore/html/shadow/DateTimeEditElement.cpp30
-rw-r--r--Source/WebCore/html/shadow/DateTimeEditElement.h2
-rw-r--r--Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp171
-rw-r--r--Source/WebCore/html/shadow/MediaControlRootElementChromium.h13
-rw-r--r--Source/WebCore/inspector/InspectorInstrumentation.cpp4
-rw-r--r--Source/WebCore/inspector/InspectorInstrumentation.h9
-rw-r--r--Source/WebCore/inspector/InspectorOverlay.cpp2
-rw-r--r--Source/WebCore/inspector/InspectorTimelineAgent.cpp10
-rw-r--r--Source/WebCore/inspector/InspectorTimelineAgent.h3
-rw-r--r--Source/WebCore/inspector/MemoryInstrumentationImpl.h2
-rw-r--r--Source/WebCore/inspector/TimelineRecordFactory.cpp13
-rw-r--r--Source/WebCore/inspector/TimelineRecordFactory.h2
-rw-r--r--Source/WebCore/inspector/front-end/TimelinePanel.js3
-rw-r--r--Source/WebCore/inspector/front-end/TimelinePresentationModel.js16
-rw-r--r--Source/WebCore/inspector/front-end/treeoutline.js19
-rw-r--r--Source/WebCore/page/FocusController.cpp2
-rw-r--r--Source/WebCore/page/FrameView.cpp16
-rw-r--r--Source/WebCore/page/FrameView.h3
-rw-r--r--Source/WebCore/page/Location.idl3
-rw-r--r--Source/WebCore/page/Page.cpp41
-rw-r--r--Source/WebCore/page/Page.h5
-rw-r--r--Source/WebCore/page/scrolling/ScrollingCoordinator.cpp43
-rw-r--r--Source/WebCore/page/scrolling/ScrollingCoordinator.h9
-rw-r--r--Source/WebCore/page/scrolling/ScrollingCoordinatorNone.cpp4
-rw-r--r--Source/WebCore/page/scrolling/ScrollingTree.cpp2
-rw-r--r--Source/WebCore/page/scrolling/ScrollingTree.h2
-rw-r--r--Source/WebCore/page/scrolling/ScrollingTreeNode.cpp6
-rw-r--r--Source/WebCore/page/scrolling/ScrollingTreeNode.h5
-rw-r--r--Source/WebCore/page/scrolling/ScrollingTreeState.cpp10
-rw-r--r--Source/WebCore/page/scrolling/ScrollingTreeState.h18
-rw-r--r--Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp6
-rw-r--r--Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm2
-rw-r--r--Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm59
-rw-r--r--Source/WebCore/platform/LocalizedStrings.cpp4
-rw-r--r--Source/WebCore/platform/ScrollAnimator.h2
-rw-r--r--Source/WebCore/platform/ScrollableArea.cpp6
-rw-r--r--Source/WebCore/platform/ScrollableArea.h4
-rw-r--r--Source/WebCore/platform/chromium/FramelessScrollView.cpp2
-rw-r--r--Source/WebCore/platform/chromium/FramelessScrollView.h2
-rw-r--r--Source/WebCore/platform/chromium/PlatformSupport.h1
-rw-r--r--Source/WebCore/platform/chromium/TraceEvent.h8
-rw-r--r--Source/WebCore/platform/efl/RenderThemeEfl.cpp2
-rw-r--r--Source/WebCore/platform/graphics/DashArray.h8
-rw-r--r--Source/WebCore/platform/graphics/FloatPoint.h4
-rw-r--r--Source/WebCore/platform/graphics/FloatRect.h4
-rw-r--r--Source/WebCore/platform/graphics/FloatSize.h5
-rw-r--r--Source/WebCore/platform/graphics/IntRect.h5
-rw-r--r--Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp1
-rw-r--r--Source/WebCore/platform/graphics/gpu/LoopBlinnPathProcessor.cpp10
-rw-r--r--Source/WebCore/platform/graphics/mac/ImageMac.mm3
-rw-r--r--Source/WebCore/platform/leveldb/LevelDBTransaction.cpp35
-rw-r--r--Source/WebCore/platform/leveldb/LevelDBTransaction.h17
-rw-r--r--Source/WebCore/platform/mac/ScrollAnimatorMac.h2
-rw-r--r--Source/WebCore/platform/mac/ScrollAnimatorMac.mm41
-rw-r--r--Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h1
-rw-r--r--Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp5
-rw-r--r--Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h1
-rw-r--r--Source/WebCore/platform/network/blackberry/NetworkManager.cpp12
-rw-r--r--Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp2
-rw-r--r--Source/WebCore/platform/text/LocaleICU.cpp4
-rw-r--r--Source/WebCore/platform/text/LocaleICU.h6
-rw-r--r--Source/WebCore/platform/text/LocaleWin.cpp4
-rw-r--r--Source/WebCore/platform/text/LocaleWin.h8
-rw-r--r--Source/WebCore/platform/text/Localizer.cpp (renamed from Source/WebCore/platform/text/NumberLocalizer.cpp)28
-rw-r--r--Source/WebCore/platform/text/Localizer.h (renamed from Source/WebCore/platform/text/NumberLocalizer.h)17
-rw-r--r--Source/WebCore/platform/text/mac/LocaleMac.h6
-rw-r--r--Source/WebCore/platform/text/mac/LocaleMac.mm9
-rw-r--r--Source/WebCore/platform/win/PopupMenuWin.cpp2
-rw-r--r--Source/WebCore/platform/win/PopupMenuWin.h2
-rw-r--r--Source/WebCore/rendering/AutoTableLayout.cpp2
-rw-r--r--Source/WebCore/rendering/ExclusionInterval.cpp166
-rw-r--r--Source/WebCore/rendering/ExclusionInterval.h58
-rw-r--r--Source/WebCore/rendering/ExclusionRectangle.cpp112
-rw-r--r--Source/WebCore/rendering/ExclusionRectangle.h67
-rw-r--r--Source/WebCore/rendering/ExclusionShape.cpp106
-rw-r--r--Source/WebCore/rendering/ExclusionShape.h54
-rw-r--r--Source/WebCore/rendering/FixedTableLayout.cpp2
-rwxr-xr-xSource/WebCore/rendering/RenderBlock.cpp34
-rw-r--r--Source/WebCore/rendering/RenderBlock.h2
-rwxr-xr-xSource/WebCore/rendering/RenderBlockLineLayout.cpp4
-rw-r--r--Source/WebCore/rendering/RenderBox.cpp82
-rw-r--r--Source/WebCore/rendering/RenderBox.h16
-rw-r--r--Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp22
-rw-r--r--Source/WebCore/rendering/RenderEmbeddedObject.cpp4
-rw-r--r--Source/WebCore/rendering/RenderFileUploadControl.cpp10
-rw-r--r--Source/WebCore/rendering/RenderFlexibleBox.cpp18
-rw-r--r--Source/WebCore/rendering/RenderFlowThread.cpp6
-rw-r--r--Source/WebCore/rendering/RenderFlowThread.h4
-rw-r--r--Source/WebCore/rendering/RenderGrid.cpp4
-rw-r--r--Source/WebCore/rendering/RenderHTMLCanvas.cpp4
-rw-r--r--Source/WebCore/rendering/RenderIFrame.cpp22
-rw-r--r--Source/WebCore/rendering/RenderIFrame.h4
-rw-r--r--Source/WebCore/rendering/RenderImage.cpp4
-rw-r--r--Source/WebCore/rendering/RenderLayer.cpp7
-rw-r--r--Source/WebCore/rendering/RenderLayer.h2
-rw-r--r--Source/WebCore/rendering/RenderListBox.cpp21
-rw-r--r--Source/WebCore/rendering/RenderListBox.h4
-rw-r--r--Source/WebCore/rendering/RenderListMarker.cpp1
-rw-r--r--Source/WebCore/rendering/RenderMenuList.cpp10
-rw-r--r--Source/WebCore/rendering/RenderMeter.cpp8
-rw-r--r--Source/WebCore/rendering/RenderMeter.h4
-rw-r--r--Source/WebCore/rendering/RenderMultiColumnBlock.cpp6
-rw-r--r--Source/WebCore/rendering/RenderMultiColumnBlock.h2
-rw-r--r--Source/WebCore/rendering/RenderMultiColumnFlowThread.h2
-rw-r--r--Source/WebCore/rendering/RenderMultiColumnSet.cpp4
-rw-r--r--Source/WebCore/rendering/RenderMultiColumnSet.h4
-rw-r--r--Source/WebCore/rendering/RenderRegion.cpp40
-rw-r--r--Source/WebCore/rendering/RenderRegion.h11
-rw-r--r--Source/WebCore/rendering/RenderReplaced.cpp4
-rw-r--r--Source/WebCore/rendering/RenderSearchField.cpp4
-rw-r--r--Source/WebCore/rendering/RenderSlider.cpp10
-rw-r--r--Source/WebCore/rendering/RenderTable.cpp8
-rw-r--r--Source/WebCore/rendering/RenderTable.h2
-rw-r--r--Source/WebCore/rendering/RenderTableCell.cpp4
-rw-r--r--Source/WebCore/rendering/RenderTableCell.h4
-rw-r--r--Source/WebCore/rendering/RenderTableSection.cpp2
-rw-r--r--Source/WebCore/rendering/RenderTextControl.cpp14
-rw-r--r--Source/WebCore/rendering/RenderTextControl.h2
-rw-r--r--Source/WebCore/rendering/RenderThemeChromiumCommon.cpp3
-rw-r--r--Source/WebCore/rendering/RenderView.cpp4
-rw-r--r--Source/WebCore/rendering/RenderView.h4
-rw-r--r--Source/WebCore/rendering/WrapShapeInfo.cpp35
-rw-r--r--Source/WebCore/rendering/WrapShapeInfo.h25
-rw-r--r--Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp4
-rw-r--r--Source/WebCore/rendering/svg/RenderSVGForeignObject.h4
-rw-r--r--Source/WebCore/rendering/svg/RenderSVGRoot.cpp4
-rw-r--r--Source/WebCore/svg/SVGPointList.cpp2
-rw-r--r--Source/WebCore/svg/animation/SMILTimeContainer.cpp56
-rw-r--r--Source/WebKit/ChangeLog33
-rw-r--r--Source/WebKit/PlatformEfl.cmake34
-rw-r--r--Source/WebKit/WebKit1.pri14
-rw-r--r--Source/WebKit/WebKit1.pro14
-rw-r--r--Source/WebKit/blackberry/Api/InRegionScroller.cpp16
-rw-r--r--Source/WebKit/blackberry/Api/WebPage.cpp5
-rw-r--r--Source/WebKit/blackberry/Api/WebPageClient.h2
-rw-r--r--Source/WebKit/blackberry/ChangeLog155
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/DatePickerClient.cpp30
-rw-r--r--Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.cpp60
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp2
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/InRegionScrollableArea.cpp1
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp39
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/InputHandler.h2
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp27
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h4
-rw-r--r--Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp6
-rw-r--r--Source/WebKit/chromium/ChangeLog226
-rw-r--r--Source/WebKit/chromium/DEPS2
-rw-r--r--Source/WebKit/chromium/public/WebAccessibilityRole.h1
-rw-r--r--Source/WebKit/chromium/public/WebInputEvent.h2
-rw-r--r--Source/WebKit/chromium/public/WebSharedWorkerRepository.h3
-rw-r--r--Source/WebKit/chromium/public/WebView.h6
-rw-r--r--Source/WebKit/chromium/public/mac/WebSubstringUtil.h2
-rw-r--r--Source/WebKit/chromium/src/AssertMatchingEnums.cpp1
-rw-r--r--Source/WebKit/chromium/src/PageWidgetDelegate.cpp1
-rw-r--r--Source/WebKit/chromium/src/ScrollbarGroup.cpp2
-rw-r--r--Source/WebKit/chromium/src/ScrollbarGroup.h2
-rw-r--r--Source/WebKit/chromium/src/SharedWorkerRepository.cpp50
-rw-r--r--Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp1
-rw-r--r--Source/WebKit/chromium/src/WebFrameImpl.cpp14
-rw-r--r--Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp17
-rw-r--r--Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h2
-rw-r--r--Source/WebKit/chromium/src/WebPopupMenuImpl.cpp1
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.cpp16
-rw-r--r--Source/WebKit/chromium/src/WebViewImpl.h1
-rw-r--r--Source/WebKit/chromium/src/mac/WebSubstringUtil.mm6
-rw-r--r--Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp2
-rw-r--r--Source/WebKit/chromium/tests/IDBBindingUtilitiesTest.cpp21
-rw-r--r--Source/WebKit/chromium/tests/LocaleMacTest.cpp6
-rw-r--r--Source/WebKit/chromium/tests/ScrollAnimatorNoneTest.cpp2
-rw-r--r--Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp10
-rw-r--r--Source/WebKit/chromium/tests/WebViewTest.cpp39
-rw-r--r--Source/WebKit/mac/ChangeLog69
-rw-r--r--Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h2
-rw-r--r--Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm10
-rw-r--r--Source/WebKit/mac/WebView/WebNotification.h2
-rw-r--r--Source/WebKit/mac/WebView/WebNotification.mm18
-rw-r--r--Source/WebKit/qt/ChangeLog53
-rw-r--r--Source/WebKit/qt/declarative/declarative.pro2
-rw-r--r--Source/WebKit/qt/declarative/public.pri4
-rw-r--r--Source/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro2
-rw-r--r--Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp13
-rw-r--r--Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp8
-rw-r--r--Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp6
-rw-r--r--Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp4
-rw-r--r--Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp20
-rw-r--r--Source/WebKit/win/ChangeLog16
-rw-r--r--Source/WebKit/win/WebScrollBar.cpp2
-rw-r--r--Source/WebKit/win/WebScrollBar.h2
-rw-r--r--Source/WebKit2/CMakeLists.txt4
-rw-r--r--Source/WebKit2/ChangeLog515
-rw-r--r--Source/WebKit2/PlatformEfl.cmake29
-rw-r--r--Source/WebKit2/PluginProcess/PluginProcess.cpp17
-rw-r--r--Source/WebKit2/PluginProcess/PluginProcess.h7
-rw-r--r--Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp3
-rw-r--r--Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h1
-rw-r--r--Source/WebKit2/Shared/WebMemorySampler.cpp2
-rw-r--r--Source/WebKit2/Shared/WebPageCreationParameters.h2
-rw-r--r--Source/WebKit2/Target.pri16
-rw-r--r--Source/WebKit2/UIProcess/API/C/WKNotification.cpp10
-rw-r--r--Source/WebKit2/UIProcess/API/C/WKNotification.h2
-rw-r--r--Source/WebKit2/UIProcess/API/C/WKPage.cpp10
-rw-r--r--Source/WebKit2/UIProcess/API/C/WKPage.h3
-rw-r--r--Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp7
-rw-r--r--Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_view.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp8
-rw-r--r--Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp12
-rw-r--r--Source/WebKit2/UIProcess/API/mac/WKView.h1
-rw-r--r--Source/WebKit2/UIProcess/API/mac/WKView.mm14
-rw-r--r--Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h1
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp8
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h1
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h1
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory.cpp11
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p.h7
-rw-r--r--Source/WebKit2/UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp1
-rw-r--r--Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml17
-rw-r--r--Source/WebKit2/UIProcess/API/qt/tests/qmltests/common/TestWebView.qml11
-rw-r--r--Source/WebKit2/UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/qt/tests/tests.pri2
-rw-r--r--Source/WebKit2/UIProcess/InspectorServer/WebSocketServerConnection.cpp15
-rw-r--r--Source/WebKit2/UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp28
-rw-r--r--Source/WebKit2/UIProcess/Notifications/WebNotification.cpp4
-rw-r--r--Source/WebKit2/UIProcess/Notifications/WebNotification.h10
-rw-r--r--Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp4
-rw-r--r--Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h2
-rw-r--r--Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp4
-rw-r--r--Source/WebKit2/UIProcess/WebContext.cpp9
-rw-r--r--Source/WebKit2/UIProcess/WebContext.h2
-rw-r--r--Source/WebKit2/UIProcess/WebPageProxy.cpp18
-rw-r--r--Source/WebKit2/UIProcess/WebPageProxy.h7
-rw-r--r--Source/WebKit2/UIProcess/WebPageProxy.messages.in2
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebPageLoadClient.cpp12
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebPageLoadClient.h1
-rw-r--r--Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp9
-rw-r--r--Source/WebKit2/UIProcess/win/WebPopupMenuProxyWin.h2
-rw-r--r--Source/WebKit2/WebKit2.pri4
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp25
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h5
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp34
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h5
-rw-r--r--Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp4
-rw-r--r--Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp2
-rw-r--r--Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h1
-rw-r--r--Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h3
-rw-r--r--Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.mm2
-rw-r--r--Source/WebKit2/WebProcess/Plugins/Plugin.h2
-rw-r--r--Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp8
-rw-r--r--Source/WebKit2/WebProcess/Plugins/PluginProxy.h1
-rw-r--r--Source/WebKit2/WebProcess/Plugins/PluginView.cpp15
-rw-r--r--Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp2
-rw-r--r--Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp4
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebPage.cpp7
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebPage.h2
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebPage.messages.in2
-rw-r--r--Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm6
-rw-r--r--Source/WebKit2/config.h2
-rw-r--r--Source/api.pri12
-rw-r--r--Source/cmake/EFLHelpers.cmake72
-rw-r--r--Source/cmake/FindEFL.cmake28
-rw-r--r--Source/cmake/FindE_DBus.cmake62
-rw-r--r--Source/cmake/FindEcore.cmake80
-rw-r--r--Source/cmake/FindEdje.cmake46
-rw-r--r--Source/cmake/FindEeze.cmake41
-rw-r--r--Source/cmake/FindEfreet.cmake41
-rw-r--r--Source/cmake/FindEina.cmake41
-rw-r--r--Source/cmake/FindEvas.cmake41
-rw-r--r--Source/cmake/OptionsEfl.cmake17
-rw-r--r--Source/tests.pri8
-rw-r--r--Tools/BuildSlaveSupport/built-product-archive2
-rwxr-xr-xTools/BuildSlaveSupport/kill-old-processes2
-rw-r--r--Tools/ChangeLog498
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp5
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp39
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp2
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp2
-rw-r--r--Tools/DumpRenderTree/chromium/TestWebPlugin.cpp1
-rw-r--r--Tools/DumpRenderTree/efl/CMakeLists.txt23
-rw-r--r--Tools/DumpRenderTree/qt/DumpRenderTree.pro4
-rw-r--r--Tools/DumpRenderTree/qt/main.cpp1
-rw-r--r--Tools/EWebLauncher/CMakeLists.txt19
-rw-r--r--Tools/MiniBrowser/efl/CMakeLists.txt20
-rw-r--r--Tools/MiniBrowser/qt/MiniBrowser.pro2
-rw-r--r--Tools/MiniBrowser/qt/MiniBrowserApplication.cpp2
-rw-r--r--Tools/MiniBrowser/qt/raw/View.cpp4
-rw-r--r--Tools/QtTestBrowser/QtTestBrowser.pro4
-rwxr-xr-xTools/Scripts/build-webkit8
-rwxr-xr-xTools/Scripts/run-webkit-tests6
-rwxr-xr-xTools/Scripts/webkitdirs.pm227
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/port/base.py2
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/port/chromium.py7
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py86
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/factory.py4
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py6
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/test_expectations.py11
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py3
-rw-r--r--Tools/TestResultServer/static-dashboards/builders.js2
-rw-r--r--Tools/TestResultServer/static-dashboards/flakiness_dashboard.js4
-rw-r--r--Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js51
-rw-r--r--Tools/TestWebKitAPI/PlatformEfl.cmake4
-rw-r--r--Tools/Tools.pro14
-rw-r--r--Tools/WebKitTestRunner/CMakeLists.txt4
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm1
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl5
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/DerivedSources.pri2
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp2
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Target.pri2
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp26
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/TestRunner.h5
-rw-r--r--Tools/WebKitTestRunner/PlatformEfl.cmake17
-rw-r--r--Tools/WebKitTestRunner/Target.pri2
-rw-r--r--Tools/WebKitTestRunner/TestController.cpp4
-rw-r--r--Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp2
-rw-r--r--Tools/qmake/.qmake.cache0
-rw-r--r--Tools/qmake/configure.pri28
-rw-r--r--Tools/qmake/configure.pro18
-rw-r--r--Tools/qmake/dump-features.pl27
-rw-r--r--Tools/qmake/mkspecs/features/configure.prf239
-rw-r--r--Tools/qmake/mkspecs/features/default_post.prf6
-rw-r--r--Tools/qmake/mkspecs/features/default_pre.prf57
-rw-r--r--Tools/qmake/mkspecs/features/features.prf297
-rw-r--r--Tools/qmake/mkspecs/features/features.pri3
-rw-r--r--Tools/qmake/mkspecs/features/functions.prf83
-rw-r--r--Tools/qmake/mkspecs/features/gprof.prf2
-rw-r--r--Tools/qmake/mkspecs/features/mac/default_pre.prf5
-rw-r--r--Tools/qmake/mkspecs/features/win32/default_pre.prf2
-rw-r--r--Tools/qmake/syncqt-4.81139
-rw-r--r--WebKit.pro41
527 files changed, 9648 insertions, 5169 deletions
diff --git a/ChangeLog b/ChangeLog
index 499705b81..1936d0c7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,86 @@
+2012-09-11 Raphael Kubo da Costa <rakuco@webkit.org>
+
+ [EFL] Rewrite the EFL-related Find modules
+ https://bugs.webkit.org/show_bug.cgi?id=95237
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ FindEFL.cmake had several problems which caused unnecessary trouble
+ when building the EFL port under some setups:
+
+ o It looked for some modules (such as ecore) more than once for no
+ reason, which led to people adding libraries and include paths in
+ different ways across the build system.
+
+ o It depended on pkg-config being present for the searches to
+ succeed.
+
+ o It obtained the library definitions from pkg-config, so
+ ${FOO_LIBRARIES} would be set to something like "foo;bar" which
+ expanded to "-lfoo -lbar" to the linker. If a wrong -L<path> was
+ passed before that, the wrong library installation would end up
+ being picked up.
+
+ o Due to the problem above, we also needed to set the LINK_FLAGS
+ property for each target with the value of ${FOO_LDFLAGS}, which was
+ also obtained from pkg-config and sort of compensated the fact that
+ the libraries did not use absolute paths and added the required -L
+ paths. This also included dependencies for these libraries, so we
+ ended up including libraries indirectly, which is bad.
+
+ We have now replaced that file with a set of Find-modules which are
+ much more granular, each of them responsible for looking for a
+ single library and its components and setting library and include
+ locations the right way (with FIND_PATH() and FIND_LIBRARY()), so
+ that all the problems above are fixed.
+
+ * Source/cmake/EFLHelpers.cmake: Added.
+ * Source/cmake/FindEDBus.cmake: Added.
+ * Source/cmake/FindEFL.cmake: Removed.
+ * Source/cmake/FindEcore.cmake: Added.
+ * Source/cmake/FindEdje.cmake: Added.
+ * Source/cmake/FindEeze.cmake: Added.
+ * Source/cmake/FindEfreet.cmake: Added.
+ * Source/cmake/FindEina.cmake: Added.
+ * Source/cmake/FindEvas.cmake: Added.
+ * Source/cmake/OptionsEfl.cmake:
+
+2012-09-11 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] In-source builds are broken
+
+ Reviewed by Tor Arne Vestbø.
+
+ The Tools sub-directory contains a Makefile checked into SVN. For in-source builds let's not try to
+ overwrite it but instead generate a dedicated Makefile.Tools.
+
+ * Makefile:
+ * WebKit.pro:
+
+2012-09-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Add a configure step to the Qt build system
+
+ This allows building the Qt port using just 'qmake WebKit.pro'. Using
+ the build-webkit script is still supported, and will add slightly more
+ logic to the build, such as detecting the need for clean or incremental
+ builds.
+
+ Internally, the build system now uses a new variable, WEBKIT_CONFIG, for
+ all things related to configuring the build, such as use/have/enable flags,
+ and these are translated to defines in default_post. Project files should
+ no longer check contains(DEFINES,...) to detect features, but use the new
+ enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2
+ options have been translated into WEBKIT_CONFIG options as well, and can
+ be checked using build?().
+
+ Reviewed by Simon Hausmann.
+
+ * Source/QtWebKit.pro:
+ * Source/api.pri:
+ * Source/tests.pri:
+ * WebKit.pro:
+
2012-09-10 Thiago Marcos P. Santos <thiago.santos@intel.com>
[CMake][EFL] Enable the LLInt
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 19d889ad3..000000000
--- a/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-MODULES = Source Tools
-
-all:
- @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
- if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
-
-debug d development dev develop:
- @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
- if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
-
-release r deployment dep deploy:
- @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
- if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
-
-clean:
- @for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
- if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
diff --git a/Source/JavaScriptCore/API/JSContextRef.cpp b/Source/JavaScriptCore/API/JSContextRef.cpp
index 7c815355b..e2a102948 100644
--- a/Source/JavaScriptCore/API/JSContextRef.cpp
+++ b/Source/JavaScriptCore/API/JSContextRef.cpp
@@ -185,9 +185,7 @@ JSStringRef JSContextCreateBacktrace(JSContextRef ctx, unsigned maxStackSize)
intptr_t sourceID;
String urlString;
JSValue function;
-
- String levelStr = String::number(count);
-
+
exec->interpreter()->retrieveLastCaller(callFrame, signedLineNumber, sourceID, urlString, function);
if (function)
@@ -202,7 +200,7 @@ JSStringRef JSContextCreateBacktrace(JSContextRef ctx, unsigned maxStackSize)
if (!builder.isEmpty())
builder.append('\n');
builder.append('#');
- builder.append(levelStr);
+ builder.appendNumber(count);
builder.append(' ');
builder.append(functionName);
builder.appendLiteral("() at ");
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
index 22d571933..2065c5b39 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
@@ -119,6 +119,7 @@ SET(JavaScriptCore_SOURCES
heap/MarkedBlock.cpp
heap/MarkedSpace.cpp
heap/MarkStack.cpp
+ heap/SlotVisitor.cpp
heap/WeakSet.cpp
heap/WeakHandleOwner.cpp
heap/WeakBlock.cpp
@@ -331,6 +332,7 @@ IF (ENABLE_LLINT)
ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h)
ADD_EXECUTABLE(LLIntOffsetsExtractor ${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp)
+ TARGET_LINK_LIBRARIES(LLIntOffsetsExtractor ${WTF_LIBRARY_NAME})
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
@@ -407,10 +409,6 @@ TARGET_LINK_LIBRARIES(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES}
SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
-IF (JavaScriptCore_LINK_FLAGS)
- ADD_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} LINK_FLAGS "${JavaScriptCore_LINK_FLAGS}")
-ENDIF ()
-
IF (SHARED_CORE)
SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
INSTALL(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 83cae4a31..e92f02211 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,351 @@
+2012-09-11 Raphael Kubo da Costa <rakuco@webkit.org>
+
+ [EFL] Rewrite the EFL-related Find modules
+ https://bugs.webkit.org/show_bug.cgi?id=95237
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * CMakeLists.txt: Stop setting the LINK_FLAGS property.
+ * PlatformEfl.cmake: Ditto.
+ * shell/PlatformEfl.cmake: Ditto.
+
+2012-09-11 Raphael Kubo da Costa <rakuco@webkit.org>
+
+ [EFL] Unreviewed build fix after r128065.
+
+ * CMakeLists.txt: Link against WTF for FastMalloc symbols, which
+ are needed when building with SYSTEM_MALLOC off.
+
+2012-09-10 Mark Hahnenberg <mhahnenberg@apple.com>
+
+ Remove m_classInfo from JSCell
+ https://bugs.webkit.org/show_bug.cgi?id=96311
+
+ Reviewed by Oliver Hunt.
+
+ Now that no one is using the ClassInfo in JSCell, we can remove it for the greater good. This is a 1.5% win on v8v7 and
+ a 1.7% win on kraken, and is an overall performance progression.
+
+ * dfg/DFGSpeculativeJIT.h:
+ (JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject): Had to rearrange the order of when we take things off the free list
+ and when we store the Structure in the object because we would clobber the free list otherwise. This made it not okay for
+ the structure argument and the scratch register to alias one another. Also removed the store of the ClassInfo pointer in the
+ object. Yay!
+ (SpeculativeJIT):
+ * dfg/DFGSpeculativeJIT32_64.cpp: Since it's no longer okay for for the scratch register and structure register to alias
+ one another as stated above, had to add an extra temporary for passing the Structure.
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGSpeculativeJIT64.cpp: Ditto.
+ (JSC::DFG::SpeculativeJIT::compile):
+ * jit/JITInlineMethods.h:
+ (JSC::JIT::emitAllocateBasicJSObject): Similar changes to DFG's inline allocation except that it removed the object from
+ the free list first, so no changes were necessary there.
+ * llint/LowLevelInterpreter.asm: Change the constants for amount of inline storage to match PropertyOffset.h and remove
+ the store of the ClassInfo pointer during inline allocation.
+ * llint/LowLevelInterpreter32_64.asm:
+ * llint/LowLevelInterpreter64.asm:
+ * runtime/JSCell.h: Remove the m_classInfo field and associated methods.
+ (JSCell):
+ * runtime/JSObject.h:
+ (JSObject):
+ * runtime/PropertyOffset.h: Expand the number of inline storage properties to take up the extra space that we're freeing
+ with the removal of the ClassInfo pointer.
+ (JSC):
+ * runtime/Structure.h:
+ (JSC):
+ (JSC::JSCell::JSCell):
+ (JSC::JSCell::finishCreation):
+
+2012-09-10 Geoffrey Garen <ggaren@apple.com>
+
+ Added large allocation support to MarkedSpace
+ https://bugs.webkit.org/show_bug.cgi?id=96214
+
+ Originally reviewed by Oliver Hunt, then I added a design revision by
+ suggested by Phil Pizlo.
+
+ I expanded the imprecise size classes to cover up to 32KB, then added
+ an mmap-based allocator for everything bigger. There's a lot of tuning
+ we could do in these size classes, but currently they're almost
+ completely unused, so I haven't done any tuning.
+
+ Subtle point: the large allocator is a degenerate case of our free list
+ logic. Its list only ever contains zero or one items.
+
+ * heap/Heap.h:
+ (JSC::Heap::allocateStructure): Pipe in size information.
+
+ * heap/MarkedAllocator.cpp:
+ (JSC::MarkedAllocator::tryAllocateHelper): Handle the case where we
+ find a free item in the sweep list but the item isn't big enough. This
+ can happen in the large allocator because it mixes sizes.
+
+ (JSC::MarkedAllocator::tryAllocate):
+ (JSC::MarkedAllocator::allocateSlowCase): More piping.
+
+ (JSC::MarkedAllocator::allocateBlock): Handle the oversize case.
+
+ (JSC::MarkedAllocator::addBlock): I moved the call to didAddBlock here
+ because it made more sense.
+
+ * heap/MarkedAllocator.h:
+ (MarkedAllocator):
+ (JSC::MarkedAllocator::allocate):
+ * heap/MarkedSpace.cpp:
+ (JSC::MarkedSpace::MarkedSpace):
+ (JSC::MarkedSpace::resetAllocators):
+ (JSC::MarkedSpace::canonicalizeCellLivenessData):
+ (JSC::MarkedSpace::isPagedOut):
+ (JSC::MarkedSpace::freeBlock):
+ * heap/MarkedSpace.h:
+ (MarkedSpace):
+ (JSC::MarkedSpace::allocatorFor):
+ (JSC::MarkedSpace::destructorAllocatorFor):
+ (JSC::MarkedSpace::allocateWithoutDestructor):
+ (JSC::MarkedSpace::allocateWithDestructor):
+ (JSC::MarkedSpace::allocateStructure):
+ (JSC::MarkedSpace::forEachBlock):
+ * runtime/Structure.h:
+ (JSC::Structure): More piping.
+
+2012-09-10 Geoffrey Garen <ggaren@apple.com>
+
+ Try to fix the Windows (32-bit) build.
+
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_tear_off_arguments):
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::emit_op_tear_off_arguments): Get operands 1 and 2, not 1 and 1. :(
+
+ Also took this opportunity to rename to indicate that these values are
+ not destinations anymore.
+
+2012-09-10 Geoffrey Garen <ggaren@apple.com>
+
+ DFG misses arguments tear-off for function.arguments if 'arguments' is used
+ https://bugs.webkit.org/show_bug.cgi?id=96227
+
+ Reviewed by Gavin Barraclough.
+
+ We've decided not to allow function.arguments to alias the local
+ 'arguments' object, or a local var or function named 'arguments'.
+ Aliasing complicates the implementation (cf, this bug) and can produce
+ surprising behavior for web programmers.
+
+ Eliminating the aliasing has the side-effect of fixing this bug.
+
+ The compatibilty story: function.arguments is deprecated, was never
+ specified, and throws an exception in strict mode, so we expect it to
+ disappear over time. Firefox does not alias to 'arguments'; Chrome
+ does, but not if you use eval or with; IE does; Safari did.
+
+ * dfg/DFGByteCodeParser.cpp: Noticed a little cleanup while verifying
+ this code. Use the CodeBlock method for better encapsulation.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::retrieveArgumentsFromVMCode): Behavior change: don't
+ alias.
+
+ * tests/mozilla/js1_4/Functions/function-001.js:
+ (TestFunction_4): Updated test expectations for changed behavior.
+
+2012-09-10 Filip Pizlo <fpizlo@apple.com>
+
+ offlineasm has some impossible to implement, and unused, instructions
+ https://bugs.webkit.org/show_bug.cgi?id=96310
+
+ Reviewed by Mark Hahnenberg.
+
+ * offlineasm/armv7.rb:
+ * offlineasm/instructions.rb:
+ * offlineasm/x86.rb:
+
+2012-09-09 Geoffrey Garen <ggaren@apple.com>
+
+ Refactored op_tear_off* to support activations that don't allocate space for 'arguments'
+ https://bugs.webkit.org/show_bug.cgi?id=96231
+
+ Reviewed by Gavin Barraclough.
+
+ This is a step toward smaller activations.
+
+ As a side-effect, this patch eliminates a load and branch from the hot path
+ of activation tear-off by moving it to the cold path of arguments tear-off. Our
+ optimizing assumptions are that activations are common and that reifying the
+ arguments object is less common.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::dump):
+ * bytecode/Opcode.h:
+ (JSC::padOpcodeName): Updated for new opcode lengths.
+
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ (JSC::BytecodeGenerator::addConstantValue): Added support for JSValue()
+ in the bytecode, which we use when we have 'arguments' but no activation.
+
+ (JSC::BytecodeGenerator::emitReturn): Always emit tear_off_arguments
+ if we've allocated the arguments registers. This allows tear_off_activation
+ not to worry about the arguments object anymore.
+
+ Also, pass the activation and arguments values directly to these opcodes
+ instead of requiring the opcodes to infer the values through special
+ registers. This gives us more flexibility to move or eliminate registers.
+
+ * dfg/DFGArgumentsSimplificationPhase.cpp:
+ (JSC::DFG::ArgumentsSimplificationPhase::run):
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::parseBlock):
+ * dfg/DFGNode.h:
+ (Node): Updated for new opcode lengths.
+
+ * dfg/DFGOperations.cpp: Activation tear-off doesn't worry about the
+ arguments object anymore. If 'arguments' is in use and reified, it's
+ responsible for aliasing back to the activation object in tear_off_arguments.
+
+ * dfg/DFGOperations.h:
+ * dfg/DFGSpeculativeJIT.h:
+ (JSC::DFG::SpeculativeJIT::callOperation):
+ (SpeculativeJIT):
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile): Don't pass the arguments object to
+ activation tear-off; do pass the activation object to arguments tear-off.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::privateExecute): Ditto.
+
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_tear_off_activation):
+ (JSC::JIT::emit_op_tear_off_arguments):
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::emit_op_tear_off_activation):
+ (JSC::JIT::emit_op_tear_off_arguments):
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ * llint/LLIntSlowPaths.cpp:
+ (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+ * llint/LowLevelInterpreter32_64.asm:
+ * llint/LowLevelInterpreter64.asm: Same change in a few more execution engines.
+
+2012-09-10 Patrick Gansterer <paroga@webkit.org>
+
+ [JSC] Use StringBuilder::appendNumber() instead of String::number()
+ https://bugs.webkit.org/show_bug.cgi?id=96236
+
+ Reviewed by Benjamin Poulain.
+
+ * API/JSContextRef.cpp:
+ (JSContextCreateBacktrace):
+
+2012-09-06 Mark Hahnenberg <mhahnenberg@apple.com>
+
+ Combine MarkStack and SlotVisitor into single class
+ https://bugs.webkit.org/show_bug.cgi?id=96043
+
+ Reviewed by Geoff Garen.
+
+ Move all of MarkStack into SlotVisitor. The remaining stuff in MarkStack.cpp actually has to do
+ with MarkStack management/allocation. Cleaned up a few of the header files while I was at it.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * Target.pri:
+ * bytecode/CodeBlock.cpp:
+ * dfg/DFGCommon.h:
+ * heap/GCThreadSharedData.cpp:
+ * heap/GCThreadSharedData.h:
+ (GCThreadSharedData):
+ * heap/HeapRootVisitor.h:
+ * heap/MarkStack.cpp:
+ (JSC):
+ * heap/MarkStack.h:
+ (JSC):
+ (MarkStackSegment):
+ (JSC::MarkStackSegment::data):
+ (JSC::MarkStackSegment::capacityFromSize):
+ (JSC::MarkStackSegment::sizeFromCapacity):
+ (MarkStackSegmentAllocator):
+ (MarkStackArray):
+ * heap/MarkStackInlineMethods.h:
+ (JSC::MarkStackArray::postIncTop):
+ (JSC):
+ (JSC::MarkStackArray::preDecTop):
+ (JSC::MarkStackArray::setTopForFullSegment):
+ (JSC::MarkStackArray::setTopForEmptySegment):
+ (JSC::MarkStackArray::top):
+ (JSC::MarkStackArray::validatePrevious):
+ (JSC::MarkStackArray::append):
+ (JSC::MarkStackArray::canRemoveLast):
+ (JSC::MarkStackArray::removeLast):
+ (JSC::MarkStackArray::isEmpty):
+ (JSC::MarkStackArray::size):
+ * heap/SlotVisitor.cpp: Added.
+ (JSC):
+ (JSC::SlotVisitor::SlotVisitor):
+ (JSC::SlotVisitor::~SlotVisitor):
+ (JSC::SlotVisitor::setup):
+ (JSC::SlotVisitor::reset):
+ (JSC::SlotVisitor::append):
+ (JSC::visitChildren):
+ (JSC::SlotVisitor::donateKnownParallel):
+ (JSC::SlotVisitor::drain):
+ (JSC::SlotVisitor::drainFromShared):
+ (JSC::SlotVisitor::mergeOpaqueRoots):
+ (JSC::SlotVisitor::startCopying):
+ (JSC::SlotVisitor::allocateNewSpaceSlow):
+ (JSC::SlotVisitor::allocateNewSpaceOrPin):
+ (JSC::JSString::tryHashConstLock):
+ (JSC::JSString::releaseHashConstLock):
+ (JSC::JSString::shouldTryHashConst):
+ (JSC::SlotVisitor::internalAppend):
+ (JSC::SlotVisitor::copyAndAppend):
+ (JSC::SlotVisitor::doneCopying):
+ (JSC::SlotVisitor::harvestWeakReferences):
+ (JSC::SlotVisitor::finalizeUnconditionalFinalizers):
+ (JSC::SlotVisitor::validate):
+ * heap/SlotVisitor.h:
+ (JSC):
+ (SlotVisitor):
+ (JSC::SlotVisitor::sharedData):
+ (JSC::SlotVisitor::isEmpty):
+ (JSC::SlotVisitor::visitCount):
+ (JSC::SlotVisitor::resetChildCount):
+ (JSC::SlotVisitor::childCount):
+ (JSC::SlotVisitor::incrementChildCount):
+ (ParallelModeEnabler):
+ (JSC::ParallelModeEnabler::ParallelModeEnabler):
+ (JSC::ParallelModeEnabler::~ParallelModeEnabler):
+ * heap/SlotVisitorInlineMethods.h:
+ (JSC::SlotVisitor::append):
+ (JSC):
+ (JSC::SlotVisitor::appendUnbarrieredPointer):
+ (JSC::SlotVisitor::appendUnbarrieredValue):
+ (JSC::SlotVisitor::internalAppend):
+ (JSC::SlotVisitor::addWeakReferenceHarvester):
+ (JSC::SlotVisitor::addUnconditionalFinalizer):
+ (JSC::SlotVisitor::addOpaqueRoot):
+ (JSC::SlotVisitor::containsOpaqueRoot):
+ (JSC::SlotVisitor::opaqueRootCount):
+ (JSC::SlotVisitor::mergeOpaqueRootsIfNecessary):
+ (JSC::SlotVisitor::mergeOpaqueRootsIfProfitable):
+ (JSC::SlotVisitor::donate):
+ (JSC::SlotVisitor::donateAndDrain):
+ * jit/JITWriteBarrier.h:
+ (JSC::SlotVisitor::append):
+ * jit/JumpReplacementWatchpoint.cpp:
+ * runtime/JSCell.h:
+ * runtime/Structure.h:
+ (JSC::SlotVisitor::internalAppend):
+ * runtime/WriteBarrier.h:
+ (JSC):
+ (JSC::SlotVisitor::append):
+ (JSC::SlotVisitor::appendValues):
+ * yarr/YarrJIT.cpp:
+
2012-09-10 Hojong Han <hojong.han@samsung.com>
[EFL] JIT memory usage is not retrieved
diff --git a/Source/JavaScriptCore/GNUmakefile.list.am b/Source/JavaScriptCore/GNUmakefile.list.am
index dd584f747..9d8161fdd 100644
--- a/Source/JavaScriptCore/GNUmakefile.list.am
+++ b/Source/JavaScriptCore/GNUmakefile.list.am
@@ -266,6 +266,7 @@ javascriptcore_sources += \
Source/JavaScriptCore/heap/HeapTimer.cpp \
Source/JavaScriptCore/heap/IncrementalSweeper.h \
Source/JavaScriptCore/heap/IncrementalSweeper.cpp \
+ Source/JavaScriptCore/heap/SlotVisitor.cpp \
Source/JavaScriptCore/heap/SlotVisitor.h \
Source/JavaScriptCore/heap/SlotVisitorInlineMethods.h \
Source/JavaScriptCore/heap/HandleStack.cpp \
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
index aa7ec78df..843bd1475 100755
--- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
+++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
@@ -63,7 +63,7 @@ EXPORTS
?addSlowCase@Identifier@JSC@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVExecState@2@PAVStringImpl@4@@Z
?addSlowCase@Identifier@JSC@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@WTF@@PAVJSGlobalData@2@PAVStringImpl@4@@Z
?addStaticGlobals@JSGlobalObject@JSC@@IAEXPAUGlobalPropertyInfo@12@H@Z
- ?allocateSlowCase@MarkedAllocator@JSC@@AAEPAXXZ
+ ?allocateSlowCase@MarkedAllocator@JSC@@AAEPAXI@Z
?append@StringBuilder@WTF@@QAEXPBEI@Z
?append@StringBuilder@WTF@@QAEXPB_WI@Z
?appendNumber@StringBuilder@WTF@@QAEXH@Z
@@ -365,7 +365,7 @@ EXPORTS
?unlock@Mutex@WTF@@QAEXXZ
?unlockAtomicallyInitializedStaticMutex@WTF@@YAXXZ
?unprotect@Heap@JSC@@QAE_NVJSValue@2@@Z
- ?validate@MarkStack@JSC@@KAXPAVJSCell@2@@Z
+ ?validate@SlotVisitor@JSC@@CAXPAVJSCell@2@@Z
?visitChildren@JSGlobalObject@JSC@@SAXPAVJSCell@2@AAVSlotVisitor@2@@Z
?visitChildren@JSGlobalThis@JSC@@KAXPAVJSCell@2@AAVSlotVisitor@2@@Z
?visitChildren@JSObject@JSC@@SAXPAVJSCell@2@AAVSlotVisitor@2@@Z
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
index a7f7cf9af..43fdfb21a 100644
--- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
+++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
@@ -2386,6 +2386,10 @@
>
</File>
<File
+ RelativePath="..\..\heap\SlotVisitor.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\heap\Strong.h"
>
</File>
diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
index 948cecc11..7d180ebae 100644
--- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
+++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
@@ -693,6 +693,8 @@
C21122E115DD9AB300790E3A /* GCThreadSharedData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C21122DE15DD9AB300790E3A /* GCThreadSharedData.cpp */; };
C21122E215DD9AB300790E3A /* GCThreadSharedData.h in Headers */ = {isa = PBXBuildFile; fileRef = C21122DF15DD9AB300790E3A /* GCThreadSharedData.h */; settings = {ATTRIBUTES = (Private, ); }; };
C21122E315DD9AB300790E3A /* MarkStackInlineMethods.h in Headers */ = {isa = PBXBuildFile; fileRef = C21122E015DD9AB300790E3A /* MarkStackInlineMethods.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ C2160FE715F7E95E00942DFC /* SlotVisitorInlineMethods.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCB408515C0A3C30048932B /* SlotVisitorInlineMethods.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ C225494315F7DBAA0065E898 /* SlotVisitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C225494215F7DBAA0065E898 /* SlotVisitor.cpp */; };
C22B31B9140577D700DB475A /* SamplingCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F77008E1402FDD60078EB39 /* SamplingCounter.h */; settings = {ATTRIBUTES = (Private, ); }; };
C240305514B404E60079EB64 /* CopiedSpace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C240305314B404C90079EB64 /* CopiedSpace.cpp */; };
C25F8BCD157544A900245B71 /* IncrementalSweeper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C25F8BCB157544A900245B71 /* IncrementalSweeper.cpp */; };
@@ -1455,6 +1457,7 @@
C21122DE15DD9AB300790E3A /* GCThreadSharedData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GCThreadSharedData.cpp; sourceTree = "<group>"; };
C21122DF15DD9AB300790E3A /* GCThreadSharedData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCThreadSharedData.h; sourceTree = "<group>"; };
C21122E015DD9AB300790E3A /* MarkStackInlineMethods.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkStackInlineMethods.h; sourceTree = "<group>"; };
+ C225494215F7DBAA0065E898 /* SlotVisitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SlotVisitor.cpp; sourceTree = "<group>"; };
C240305314B404C90079EB64 /* CopiedSpace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CopiedSpace.cpp; sourceTree = "<group>"; };
C25F8BCB157544A900245B71 /* IncrementalSweeper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IncrementalSweeper.cpp; sourceTree = "<group>"; };
C25F8BCC157544A900245B71 /* IncrementalSweeper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IncrementalSweeper.h; sourceTree = "<group>"; };
@@ -1784,6 +1787,7 @@
142E312A134FF0A600AFADB5 /* heap */ = {
isa = PBXGroup;
children = (
+ C225494215F7DBAA0065E898 /* SlotVisitor.cpp */,
C21122DE15DD9AB300790E3A /* GCThreadSharedData.cpp */,
C21122DF15DD9AB300790E3A /* GCThreadSharedData.h */,
C21122E015DD9AB300790E3A /* MarkStackInlineMethods.h */,
@@ -2527,6 +2531,7 @@
C2B916C214DA014E00CBAC86 /* MarkedAllocator.h in Headers */,
FE20CE9E15F04A9500DF3430 /* LLIntCLoop.h in Headers */,
C21122E215DD9AB300790E3A /* GCThreadSharedData.h in Headers */,
+ C2160FE715F7E95E00942DFC /* SlotVisitorInlineMethods.h in Headers */,
C2E526BE1590EF000054E48D /* HeapTimer.h in Headers */,
C21122E315DD9AB300790E3A /* MarkStackInlineMethods.h in Headers */,
C25F8BCE157544A900245B71 /* IncrementalSweeper.h in Headers */,
@@ -3503,6 +3508,7 @@
14874AE515EBDE4A002E3587 /* JSScope.cpp in Sources */,
1442566115EDE98D0066A49B /* JSWithScope.cpp in Sources */,
FE20CE9D15F04A9500DF3430 /* LLIntCLoop.cpp in Sources */,
+ C225494315F7DBAA0065E898 /* SlotVisitor.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Source/JavaScriptCore/PlatformEfl.cmake b/Source/JavaScriptCore/PlatformEfl.cmake
index 78a3a1f17..3b4115514 100644
--- a/Source/JavaScriptCore/PlatformEfl.cmake
+++ b/Source/JavaScriptCore/PlatformEfl.cmake
@@ -18,7 +18,3 @@ IF (ENABLE_GLIB_SUPPORT)
${JAVASCRIPTCORE_DIR}/wtf/gobject
)
ENDIF ()
-
-LIST(APPEND JavaScriptCore_LINK_FLAGS
- ${ECORE_LDFLAGS}
-)
diff --git a/Source/JavaScriptCore/Target.pri b/Source/JavaScriptCore/Target.pri
index bcbc0363a..336d8008b 100644
--- a/Source/JavaScriptCore/Target.pri
+++ b/Source/JavaScriptCore/Target.pri
@@ -89,6 +89,7 @@ SOURCES += \
heap/MarkedAllocator.cpp \
heap/MarkedBlock.cpp \
heap/MarkedSpace.cpp \
+ heap/SlotVisitor.cpp \
heap/VTableSpectrum.cpp \
heap/WriteBarrierSupport.cpp \
debugger/DebuggerActivation.cpp \
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.cpp b/Source/JavaScriptCore/bytecode/CodeBlock.cpp
index f15e5b0dd..d79a37668 100644
--- a/Source/JavaScriptCore/bytecode/CodeBlock.cpp
+++ b/Source/JavaScriptCore/bytecode/CodeBlock.cpp
@@ -45,6 +45,7 @@
#include "LowLevelInterpreter.h"
#include "MethodCallLinkStatus.h"
#include "RepatchBuffer.h"
+#include "SlotVisitorInlineMethods.h"
#include <stdio.h>
#include <wtf/StringExtras.h>
#include <wtf/UnusedParam.h>
@@ -1406,14 +1407,14 @@ void CodeBlock::dump(ExecState* exec, const Vector<Instruction>::const_iterator&
}
case op_tear_off_activation: {
int r0 = (++it)->u.operand;
- int r1 = (++it)->u.operand;
- dataLog("[%4d] tear_off_activation\t %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data());
+ dataLog("[%4d] tear_off_activation\t %s", location, registerName(exec, r0).data());
dumpBytecodeCommentAndNewLine(location);
break;
}
case op_tear_off_arguments: {
int r0 = (++it)->u.operand;
- dataLog("[%4d] tear_off_arguments %s", location, registerName(exec, r0).data());
+ int r1 = (++it)->u.operand;
+ dataLog("[%4d] tear_off_arguments %s, %s", location, registerName(exec, r0).data(), registerName(exec, r1).data());
dumpBytecodeCommentAndNewLine(location);
break;
}
diff --git a/Source/JavaScriptCore/bytecode/Opcode.h b/Source/JavaScriptCore/bytecode/Opcode.h
index a63cccaec..5cbae8a09 100644
--- a/Source/JavaScriptCore/bytecode/Opcode.h
+++ b/Source/JavaScriptCore/bytecode/Opcode.h
@@ -174,8 +174,8 @@ namespace JSC {
macro(op_call, 6) \
macro(op_call_eval, 6) \
macro(op_call_varargs, 5) \
- macro(op_tear_off_activation, 3) \
- macro(op_tear_off_arguments, 2) \
+ macro(op_tear_off_activation, 2) \
+ macro(op_tear_off_arguments, 3) \
macro(op_ret, 2) \
macro(op_call_put_result, 3) /* has value profiling */ \
macro(op_ret_object_or_this, 3) \
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
index 52b576da2..82f9d6f60 100644
--- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
+++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
@@ -272,6 +272,7 @@ BytecodeGenerator::BytecodeGenerator(ProgramNode* programNode, JSScope* scope, S
, m_scopeNode(programNode)
, m_codeBlock(codeBlock)
, m_thisRegister(CallFrame::thisArgumentOffset())
+ , m_emptyValueRegister(0)
, m_finallyDepth(0)
, m_dynamicScopeDepth(0)
, m_baseScopeDepth(0)
@@ -353,6 +354,7 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, JSScope* sc
, m_scopeNode(functionBody)
, m_codeBlock(codeBlock)
, m_activationRegister(0)
+ , m_emptyValueRegister(0)
, m_finallyDepth(0)
, m_dynamicScopeDepth(0)
, m_baseScopeDepth(0)
@@ -386,8 +388,6 @@ BytecodeGenerator::BytecodeGenerator(FunctionBodyNode* functionBody, JSScope* sc
m_codeBlock->setActivationRegister(m_activationRegister->index());
}
- // Both op_tear_off_activation and op_tear_off_arguments tear off the 'arguments'
- // object, if created.
if (m_codeBlock->needsFullScopeChain() || functionBody->usesArguments()) {
RegisterID* unmodifiedArgumentsRegister = addVar(); // Anonymous, so it can't be modified by user code.
RegisterID* argumentsRegister = addVar(propertyNames().arguments, false); // Can be changed by assigning to 'arguments'.
@@ -526,6 +526,7 @@ BytecodeGenerator::BytecodeGenerator(EvalNode* evalNode, JSScope* scope, SymbolT
, m_scopeNode(evalNode)
, m_codeBlock(codeBlock)
, m_thisRegister(CallFrame::thisArgumentOffset())
+ , m_emptyValueRegister(0)
, m_finallyDepth(0)
, m_dynamicScopeDepth(0)
, m_baseScopeDepth(codeBlock->baseScopeDepth())
@@ -1111,18 +1112,33 @@ unsigned BytecodeGenerator::addConstant(const Identifier& ident)
return result.iterator->second;
}
+// We can't hash JSValue(), so we use a dedicated data member to cache it.
+RegisterID* BytecodeGenerator::addConstantEmptyValue()
+{
+ if (!m_emptyValueRegister) {
+ int index = m_nextConstantOffset;
+ m_constantPoolRegisters.append(FirstConstantRegisterIndex + m_nextConstantOffset);
+ ++m_nextConstantOffset;
+ m_codeBlock->addConstant(JSValue());
+ m_emptyValueRegister = &m_constantPoolRegisters[index];
+ }
+
+ return m_emptyValueRegister;
+}
+
RegisterID* BytecodeGenerator::addConstantValue(JSValue v)
{
- int index = m_nextConstantOffset;
+ if (!v)
+ return addConstantEmptyValue();
+ int index = m_nextConstantOffset;
JSValueMap::AddResult result = m_jsValueMap.add(JSValue::encode(v), m_nextConstantOffset);
if (result.isNewEntry) {
m_constantPoolRegisters.append(FirstConstantRegisterIndex + m_nextConstantOffset);
++m_nextConstantOffset;
- m_codeBlock->addConstant(JSValue(v));
+ m_codeBlock->addConstant(v);
} else
index = result.iterator->second;
-
return &m_constantPoolRegisters[index];
}
@@ -2046,10 +2062,12 @@ RegisterID* BytecodeGenerator::emitReturn(RegisterID* src)
if (m_codeBlock->needsFullScopeChain()) {
emitOpcode(op_tear_off_activation);
instructions().append(m_activationRegister->index());
- instructions().append(m_codeBlock->argumentsRegister());
- } else if (m_codeBlock->usesArguments() && m_codeBlock->numParameters() != 1 && !m_codeBlock->isStrictMode()) {
+ }
+
+ if (m_codeBlock->usesArguments() && m_codeBlock->numParameters() != 1 && !m_codeBlock->isStrictMode()) {
emitOpcode(op_tear_off_arguments);
instructions().append(m_codeBlock->argumentsRegister());
+ instructions().append(m_activationRegister ? m_activationRegister->index() : emitLoad(0, JSValue())->index());
}
// Constructors use op_ret_object_or_this to check the result is an
diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
index 037a2ce25..28a806eb3 100644
--- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
+++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
@@ -637,6 +637,7 @@ namespace JSC {
unsigned addConstant(const Identifier&);
RegisterID* addConstantValue(JSValue);
+ RegisterID* addConstantEmptyValue();
unsigned addRegExp(RegExp*);
unsigned addConstantBuffer(unsigned length);
@@ -713,6 +714,7 @@ namespace JSC {
RegisterID m_thisRegister;
RegisterID m_calleeRegister;
RegisterID* m_activationRegister;
+ RegisterID* m_emptyValueRegister;
SegmentedVector<RegisterID, 32> m_constantPoolRegisters;
SegmentedVector<RegisterID, 32> m_calleeRegisters;
SegmentedVector<RegisterID, 32> m_parameters;
diff --git a/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp b/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp
index 640a0a966..ab0da20c7 100644
--- a/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp
@@ -616,6 +616,7 @@ public:
node.setOpAndDefaultFlags(Nop);
m_graph.clearAndDerefChild1(node);
+ m_graph.clearAndDerefChild2(node);
node.setRefCount(0);
break;
}
diff --git a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
index b96b8d9a3..201c42e71 100644
--- a/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
+++ b/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
@@ -2855,13 +2855,13 @@ bool ByteCodeParser::parseBlock(unsigned limit)
}
case op_tear_off_activation: {
- addToGraph(TearOffActivation, OpInfo(unmodifiedArgumentsRegister(currentInstruction[2].u.operand)), get(currentInstruction[1].u.operand), get(currentInstruction[2].u.operand));
+ addToGraph(TearOffActivation, get(currentInstruction[1].u.operand));
NEXT_OPCODE(op_tear_off_activation);
}
-
+
case op_tear_off_arguments: {
m_graph.m_hasArguments = true;
- addToGraph(TearOffArguments, get(unmodifiedArgumentsRegister(currentInstruction[1].u.operand)));
+ addToGraph(TearOffArguments, get(unmodifiedArgumentsRegister(currentInstruction[1].u.operand)), get(currentInstruction[2].u.operand));
NEXT_OPCODE(op_tear_off_arguments);
}
@@ -3191,7 +3191,7 @@ ByteCodeParser::InlineStackEntry::InlineStackEntry(
inlineCallFrame.capturedVars.set(i);
}
- if (codeBlock->usesArguments() || codeBlock->needsActivation()) {
+ if (codeBlock->argumentsAreCaptured()) {
for (int i = argumentCountIncludingThis; i--;)
inlineCallFrame.capturedVars.set(argumentToOperand(i) + inlineCallFrame.stackOffset);
}
diff --git a/Source/JavaScriptCore/dfg/DFGCommon.h b/Source/JavaScriptCore/dfg/DFGCommon.h
index ddbefd2d5..c3726ed85 100644
--- a/Source/JavaScriptCore/dfg/DFGCommon.h
+++ b/Source/JavaScriptCore/dfg/DFGCommon.h
@@ -31,6 +31,7 @@
#if ENABLE(DFG_JIT)
#include "CodeOrigin.h"
+#include "Options.h"
#include "VirtualRegister.h"
/* DFG_ENABLE() - turn on a specific features in the DFG JIT */
diff --git a/Source/JavaScriptCore/dfg/DFGNode.h b/Source/JavaScriptCore/dfg/DFGNode.h
index fb31f935e..0a51b71d7 100644
--- a/Source/JavaScriptCore/dfg/DFGNode.h
+++ b/Source/JavaScriptCore/dfg/DFGNode.h
@@ -337,12 +337,6 @@ struct Node {
return variableAccessData()->local();
}
- VirtualRegister unmodifiedArgumentsRegister()
- {
- ASSERT(op() == TearOffActivation);
- return static_cast<VirtualRegister>(m_opInfo);
- }
-
VirtualRegister unlinkedLocal()
{
ASSERT(op() == GetLocalUnlinked);
diff --git a/Source/JavaScriptCore/dfg/DFGOperations.cpp b/Source/JavaScriptCore/dfg/DFGOperations.cpp
index 824a0a37a..b5bfd2334 100644
--- a/Source/JavaScriptCore/dfg/DFGOperations.cpp
+++ b/Source/JavaScriptCore/dfg/DFGOperations.cpp
@@ -1165,40 +1165,28 @@ JSCell* DFG_OPERATION operationCreateInlinedArguments(
return result;
}
-void DFG_OPERATION operationTearOffActivation(ExecState* exec, JSCell* activationCell, int32_t unmodifiedArgumentsRegister)
+void DFG_OPERATION operationTearOffActivation(ExecState* exec, JSCell* activationCell)
{
JSGlobalData& globalData = exec->globalData();
NativeCallFrameTracer tracer(&globalData, exec);
- if (!activationCell) {
- if (JSValue v = exec->uncheckedR(unmodifiedArgumentsRegister).jsValue()) {
- if (!exec->codeBlock()->isStrictMode())
- asArguments(v)->tearOff(exec);
- }
- return;
- }
- JSActivation* activation = jsCast<JSActivation*>(activationCell);
- activation->tearOff(exec->globalData());
- if (JSValue v = exec->uncheckedR(unmodifiedArgumentsRegister).jsValue())
- asArguments(v)->didTearOffActivation(exec->globalData(), activation);
+ jsCast<JSActivation*>(activationCell)->tearOff(exec->globalData());
}
-
-void DFG_OPERATION operationTearOffArguments(ExecState* exec, JSCell* argumentsCell)
+void DFG_OPERATION operationTearOffArguments(ExecState* exec, JSCell* argumentsCell, JSCell* activationCell)
{
ASSERT(exec->codeBlock()->usesArguments());
- ASSERT(!exec->codeBlock()->needsFullScopeChain());
- asArguments(argumentsCell)->tearOff(exec);
+ if (activationCell) {
+ jsCast<Arguments*>(argumentsCell)->didTearOffActivation(exec->globalData(), jsCast<JSActivation*>(activationCell));
+ return;
+ }
+ jsCast<Arguments*>(argumentsCell)->tearOff(exec);
}
void DFG_OPERATION operationTearOffInlinedArguments(
- ExecState* exec, JSCell* argumentsCell, InlineCallFrame* inlineCallFrame)
-{
- // This should only be called when the inline code block uses arguments but does not
- // need a full scope chain. We could assert it, except that the assertion would be
- // rather expensive and may cause side effects that would greatly diverge debug-mode
- // behavior from release-mode behavior, since getting the code block of an inline
- // call frame implies call frame reification.
- asArguments(argumentsCell)->tearOff(exec, inlineCallFrame);
+ ExecState* exec, JSCell* argumentsCell, JSCell* activationCell, InlineCallFrame* inlineCallFrame)
+{
+ ASSERT_UNUSED(activationCell, !activationCell); // Currently, we don't inline functions with activations.
+ jsCast<Arguments*>(argumentsCell)->tearOff(exec, inlineCallFrame);
}
EncodedJSValue DFG_OPERATION operationGetArgumentsLength(ExecState* exec, int32_t argumentsRegister)
diff --git a/Source/JavaScriptCore/dfg/DFGOperations.h b/Source/JavaScriptCore/dfg/DFGOperations.h
index 82babe875..aa52703c7 100644
--- a/Source/JavaScriptCore/dfg/DFGOperations.h
+++ b/Source/JavaScriptCore/dfg/DFGOperations.h
@@ -98,8 +98,10 @@ typedef size_t DFG_OPERATION (*S_DFGOperation_J)(EncodedJSValue);
typedef void DFG_OPERATION (*V_DFGOperation_EAZJ)(ExecState*, JSArray*, int32_t, EncodedJSValue);
typedef void DFG_OPERATION (*V_DFGOperation_EC)(ExecState*, JSCell*);
typedef void DFG_OPERATION (*V_DFGOperation_ECIcf)(ExecState*, JSCell*, InlineCallFrame*);
+typedef void DFG_OPERATION (*V_DFGOperation_ECCIcf)(ExecState*, JSCell*, JSCell*, InlineCallFrame*);
typedef void DFG_OPERATION (*V_DFGOperation_ECJJ)(ExecState*, JSCell*, EncodedJSValue, EncodedJSValue);
typedef void DFG_OPERATION (*V_DFGOperation_ECZ)(ExecState*, JSCell*, int32_t);
+typedef void DFG_OPERATION (*V_DFGOperation_ECC)(ExecState*, JSCell*, JSCell*);
typedef void DFG_OPERATION (*V_DFGOperation_EJCI)(ExecState*, EncodedJSValue, JSCell*, Identifier*);
typedef void DFG_OPERATION (*V_DFGOperation_EJJJ)(ExecState*, EncodedJSValue, EncodedJSValue, EncodedJSValue);
typedef void DFG_OPERATION (*V_DFGOperation_EJPP)(ExecState*, EncodedJSValue, EncodedJSValue, void*);
@@ -173,9 +175,9 @@ char* DFG_OPERATION operationLinkConstruct(ExecState*) WTF_INTERNAL;
JSCell* DFG_OPERATION operationCreateActivation(ExecState*) WTF_INTERNAL;
JSCell* DFG_OPERATION operationCreateArguments(ExecState*) WTF_INTERNAL;
JSCell* DFG_OPERATION operationCreateInlinedArguments(ExecState*, InlineCallFrame*) WTF_INTERNAL;
-void DFG_OPERATION operationTearOffActivation(ExecState*, JSCell*, int32_t unmodifiedArgumentsRegister) WTF_INTERNAL;
-void DFG_OPERATION operationTearOffArguments(ExecState*, JSCell*) WTF_INTERNAL;
-void DFG_OPERATION operationTearOffInlinedArguments(ExecState*, JSCell*, InlineCallFrame*) WTF_INTERNAL;
+void DFG_OPERATION operationTearOffActivation(ExecState*, JSCell*) WTF_INTERNAL;
+void DFG_OPERATION operationTearOffArguments(ExecState*, JSCell*, JSCell*) WTF_INTERNAL;
+void DFG_OPERATION operationTearOffInlinedArguments(ExecState*, JSCell*, JSCell*, InlineCallFrame*) WTF_INTERNAL;
EncodedJSValue DFG_OPERATION operationGetArgumentsLength(ExecState*, int32_t) WTF_INTERNAL;
EncodedJSValue DFG_OPERATION operationGetInlinedArgumentByVal(ExecState*, int32_t, InlineCallFrame*, int32_t) WTF_INTERNAL;
EncodedJSValue DFG_OPERATION operationGetArgumentByVal(ExecState*, int32_t, int32_t) WTF_INTERNAL;
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
index f7b125e1b..06a8d9e31 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
@@ -1353,6 +1353,11 @@ public:
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(arg2));
return appendCallWithExceptionCheck(operation);
}
+ JITCompiler::Call callOperation(V_DFGOperation_ECCIcf operation, GPRReg arg1, GPRReg arg2, InlineCallFrame* arg3)
+ {
+ m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(arg3));
+ return appendCallWithExceptionCheck(operation);
+ }
JITCompiler::Call callOperation(V_DFGOperation_EJPP operation, GPRReg arg1, GPRReg arg2, void* pointer)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(pointer));
@@ -1388,6 +1393,11 @@ public:
m_jit.setupArgumentsWithExecState(arg1, TrustedImm32(arg2));
return appendCallWithExceptionCheck(operation);
}
+ JITCompiler::Call callOperation(V_DFGOperation_ECC operation, GPRReg arg1, GPRReg arg2)
+ {
+ m_jit.setupArgumentsWithExecState(arg1, arg2);
+ return appendCallWithExceptionCheck(operation);
+ }
JITCompiler::Call callOperation(V_DFGOperation_W operation, WatchpointSet* watchpointSet)
{
m_jit.setupArguments(TrustedImmPtr(watchpointSet));
@@ -1651,6 +1661,11 @@ public:
m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(inlineCallFrame));
return appendCallWithExceptionCheck(operation);
}
+ JITCompiler::Call callOperation(V_DFGOperation_ECCIcf operation, GPRReg arg1, GPRReg arg2, InlineCallFrame* inlineCallFrame)
+ {
+ m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(inlineCallFrame));
+ return appendCallWithExceptionCheck(operation);
+ }
JITCompiler::Call callOperation(V_DFGOperation_EJPP operation, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2, void* pointer)
{
m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2, TrustedImmPtr(pointer));
@@ -1671,6 +1686,11 @@ public:
m_jit.setupArgumentsWithExecState(arg1, TrustedImm32(arg2));
return appendCallWithExceptionCheck(operation);
}
+ JITCompiler::Call callOperation(V_DFGOperation_ECC operation, GPRReg arg1, GPRReg arg2)
+ {
+ m_jit.setupArgumentsWithExecState(arg1, arg2);
+ return appendCallWithExceptionCheck(operation);
+ }
JITCompiler::Call callOperation(V_DFGOperation_EPZJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3Tag, GPRReg arg3Payload)
{
m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG arg3Payload, arg3Tag);
@@ -1696,6 +1716,11 @@ public:
{
return callOperation(operation, arg1, arg2);
}
+ template<typename FunctionType, typename ArgumentType1, typename ArgumentType2, typename ArgumentType3>
+ JITCompiler::Call callOperation(FunctionType operation, NoResultTag, ArgumentType1 arg1, ArgumentType2 arg2, ArgumentType3 arg3)
+ {
+ return callOperation(operation, arg1, arg2, arg3);
+ }
template<typename FunctionType, typename ArgumentType1, typename ArgumentType2, typename ArgumentType3, typename ArgumentType4>
JITCompiler::Call callOperation(FunctionType operation, NoResultTag, ArgumentType1 arg1, ArgumentType2 arg2, ArgumentType3 arg3, ArgumentType4 arg4)
{
@@ -2136,7 +2161,9 @@ public:
void compileNewFunctionNoCheck(Node&);
void compileNewFunctionExpression(Node&);
bool compileRegExpExec(Node&);
-
+
+ // It is NOT okay for the structure and the scratch register to be the same thing because if they are then the Structure will
+ // get clobbered.
template <typename ClassType, bool destructor, typename StructureType>
void emitAllocateBasicJSObject(StructureType structure, GPRReg resultGPR, GPRReg scratchGPR, MacroAssembler::JumpList& slowPath)
{
@@ -2151,24 +2178,16 @@ public:
// The object is half-allocated: we have what we know is a fresh object, but
// it's still on the GC's free list.
-
- // Ditch the structure by placing it into the structure slot, so that we can reuse
- // scratchGPR.
- m_jit.storePtr(structure, MacroAssembler::Address(resultGPR, JSObject::structureOffset()));
-
- // Now that we have scratchGPR back, remove the object from the free list
m_jit.loadPtr(MacroAssembler::Address(resultGPR), scratchGPR);
m_jit.storePtr(scratchGPR, &allocator->m_freeList.head);
-
- // Initialize the object's classInfo pointer
- m_jit.storePtr(MacroAssembler::TrustedImmPtr(&ClassType::s_info), MacroAssembler::Address(resultGPR, JSCell::classInfoOffset()));
+
+ // Initialize the object's Structure.
+ m_jit.storePtr(structure, MacroAssembler::Address(resultGPR, JSCell::structureOffset()));
// Initialize the object's property storage pointer.
m_jit.storePtr(MacroAssembler::TrustedImmPtr(0), MacroAssembler::Address(resultGPR, ClassType::offsetOfOutOfLineStorage()));
}
- // It is acceptable to have structure be equal to scratch, so long as you're fine
- // with the structure GPR being clobbered.
template<typename T>
void emitAllocateJSFinalObject(T structure, GPRReg resultGPR, GPRReg scratchGPR, MacroAssembler::JumpList& slowPath)
{
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
index 34b8dae46..38889fd05 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
@@ -3296,18 +3296,20 @@ void SpeculativeJIT::compile(Node& node)
SpeculateCellOperand callee(this, node.child1());
GPRTemporary result(this);
+ GPRTemporary structure(this);
GPRTemporary scratch(this);
GPRReg calleeGPR = callee.gpr();
GPRReg resultGPR = result.gpr();
+ GPRReg structureGPR = structure.gpr();
GPRReg scratchGPR = scratch.gpr();
// Load the inheritorID. If the inheritorID is not set, go to slow path.
- m_jit.loadPtr(MacroAssembler::Address(calleeGPR, JSFunction::offsetOfCachedInheritorID()), scratchGPR);
+ m_jit.loadPtr(MacroAssembler::Address(calleeGPR, JSFunction::offsetOfCachedInheritorID()), structureGPR);
MacroAssembler::JumpList slowPath;
- slowPath.append(m_jit.branchTestPtr(MacroAssembler::Zero, scratchGPR));
+ slowPath.append(m_jit.branchTestPtr(MacroAssembler::Zero, structureGPR));
- emitAllocateJSFinalObject(scratchGPR, resultGPR, scratchGPR, slowPath);
+ emitAllocateJSFinalObject(structureGPR, resultGPR, scratchGPR, slowPath);
addSlowPathGenerator(slowPathCall(slowPath, this, operationCreateThis, resultGPR, calleeGPR));
@@ -4023,43 +4025,39 @@ void SpeculativeJIT::compile(Node& node)
case TearOffActivation: {
JSValueOperand activationValue(this, node.child1());
- JSValueOperand argumentsValue(this, node.child2());
GPRReg activationValueTagGPR = activationValue.tagGPR();
GPRReg activationValuePayloadGPR = activationValue.payloadGPR();
- GPRReg argumentsValueTagGPR = argumentsValue.tagGPR();
-
- JITCompiler::JumpList created;
- created.append(m_jit.branch32(JITCompiler::NotEqual, activationValueTagGPR, TrustedImm32(JSValue::EmptyValueTag)));
- created.append(m_jit.branch32(JITCompiler::NotEqual, argumentsValueTagGPR, TrustedImm32(JSValue::EmptyValueTag)));
-
+
+ JITCompiler::Jump created = m_jit.branch32(JITCompiler::NotEqual, activationValueTagGPR, TrustedImm32(JSValue::EmptyValueTag));
+
addSlowPathGenerator(
slowPathCall(
- created, this, operationTearOffActivation, NoResult, activationValuePayloadGPR,
- static_cast<int32_t>(node.unmodifiedArgumentsRegister())));
+ created, this, operationTearOffActivation, NoResult, activationValuePayloadGPR));
noResult(m_compileIndex);
break;
}
case TearOffArguments: {
- JSValueOperand argumentsValue(this, node.child1());
- GPRReg argumentsValueTagGPR = argumentsValue.tagGPR();
- GPRReg argumentsValuePayloadGPR = argumentsValue.payloadGPR();
+ JSValueOperand unmodifiedArgumentsValue(this, node.child1());
+ JSValueOperand activationValue(this, node.child2());
+ GPRReg unmodifiedArgumentsValuePayloadGPR = unmodifiedArgumentsValue.payloadGPR();
+ GPRReg activationValuePayloadGPR = activationValue.payloadGPR();
- JITCompiler::Jump created = m_jit.branch32(
- JITCompiler::NotEqual, argumentsValueTagGPR, TrustedImm32(JSValue::EmptyValueTag));
+ JITCompiler::Jump created = m_jit.branchTest32(
+ JITCompiler::NonZero, unmodifiedArgumentsValuePayloadGPR);
if (node.codeOrigin.inlineCallFrame) {
addSlowPathGenerator(
slowPathCall(
created, this, operationTearOffInlinedArguments, NoResult,
- argumentsValuePayloadGPR, node.codeOrigin.inlineCallFrame));
+ unmodifiedArgumentsValuePayloadGPR, activationValuePayloadGPR, node.codeOrigin.inlineCallFrame));
} else {
addSlowPathGenerator(
slowPathCall(
created, this, operationTearOffArguments, NoResult,
- argumentsValuePayloadGPR));
+ unmodifiedArgumentsValuePayloadGPR, activationValuePayloadGPR));
}
noResult(m_compileIndex);
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
index a1ac899a2..0435df930 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
@@ -3289,18 +3289,20 @@ void SpeculativeJIT::compile(Node& node)
SpeculateCellOperand callee(this, node.child1());
GPRTemporary result(this);
+ GPRTemporary structure(this);
GPRTemporary scratch(this);
GPRReg calleeGPR = callee.gpr();
GPRReg resultGPR = result.gpr();
+ GPRReg structureGPR = structure.gpr();
GPRReg scratchGPR = scratch.gpr();
// Load the inheritorID. If the inheritorID is not set, go to slow path.
- m_jit.loadPtr(MacroAssembler::Address(calleeGPR, JSFunction::offsetOfCachedInheritorID()), scratchGPR);
+ m_jit.loadPtr(MacroAssembler::Address(calleeGPR, JSFunction::offsetOfCachedInheritorID()), structureGPR);
MacroAssembler::JumpList slowPath;
- slowPath.append(m_jit.branchTestPtr(MacroAssembler::Zero, scratchGPR));
+ slowPath.append(m_jit.branchTestPtr(MacroAssembler::Zero, structureGPR));
- emitAllocateJSFinalObject(scratchGPR, resultGPR, scratchGPR, slowPath);
+ emitAllocateJSFinalObject(structureGPR, resultGPR, scratchGPR, slowPath);
addSlowPathGenerator(slowPathCall(slowPath, this, operationCreateThis, resultGPR, calleeGPR));
@@ -3972,43 +3974,40 @@ void SpeculativeJIT::compile(Node& node)
cellResult(resultGPR, m_compileIndex);
break;
}
-
+
case TearOffActivation: {
ASSERT(!node.codeOrigin.inlineCallFrame);
JSValueOperand activationValue(this, node.child1());
- JSValueOperand argumentsValue(this, node.child2());
GPRReg activationValueGPR = activationValue.gpr();
- GPRReg argumentsValueGPR = argumentsValue.gpr();
-
- JITCompiler::JumpList created;
- created.append(m_jit.branchTestPtr(JITCompiler::NonZero, activationValueGPR));
- created.append(m_jit.branchTestPtr(JITCompiler::NonZero, argumentsValueGPR));
+
+ JITCompiler::Jump created = m_jit.branchTestPtr(JITCompiler::NonZero, activationValueGPR);
addSlowPathGenerator(
slowPathCall(
- created, this, operationTearOffActivation, NoResult, activationValueGPR,
- static_cast<int32_t>(node.unmodifiedArgumentsRegister())));
+ created, this, operationTearOffActivation, NoResult, activationValueGPR));
noResult(m_compileIndex);
break;
}
-
+
case TearOffArguments: {
- JSValueOperand argumentsValue(this, node.child1());
- GPRReg argumentsValueGPR = argumentsValue.gpr();
-
- JITCompiler::Jump created = m_jit.branchTestPtr(JITCompiler::NonZero, argumentsValueGPR);
-
+ JSValueOperand unmodifiedArgumentsValue(this, node.child1());
+ JSValueOperand activationValue(this, node.child2());
+ GPRReg unmodifiedArgumentsValueGPR = unmodifiedArgumentsValue.gpr();
+ GPRReg activationValueGPR = activationValue.gpr();
+
+ JITCompiler::Jump created = m_jit.branchTestPtr(JITCompiler::NonZero, unmodifiedArgumentsValueGPR);
+
if (node.codeOrigin.inlineCallFrame) {
addSlowPathGenerator(
slowPathCall(
created, this, operationTearOffInlinedArguments, NoResult,
- argumentsValueGPR, node.codeOrigin.inlineCallFrame));
+ unmodifiedArgumentsValueGPR, activationValueGPR, node.codeOrigin.inlineCallFrame));
} else {
addSlowPathGenerator(
slowPathCall(
- created, this, operationTearOffArguments, NoResult, argumentsValueGPR));
+ created, this, operationTearOffArguments, NoResult, unmodifiedArgumentsValueGPR, activationValueGPR));
}
noResult(m_compileIndex);
diff --git a/Source/JavaScriptCore/heap/GCThreadSharedData.cpp b/Source/JavaScriptCore/heap/GCThreadSharedData.cpp
index 82c52d22e..23a6b97a1 100644
--- a/Source/JavaScriptCore/heap/GCThreadSharedData.cpp
+++ b/Source/JavaScriptCore/heap/GCThreadSharedData.cpp
@@ -29,6 +29,7 @@
#include "JSGlobalData.h"
#include "MarkStack.h"
#include "SlotVisitor.h"
+#include "SlotVisitorInlineMethods.h"
#include <wtf/MainThread.h>
namespace JSC {
diff --git a/Source/JavaScriptCore/heap/GCThreadSharedData.h b/Source/JavaScriptCore/heap/GCThreadSharedData.h
index 8868b440c..3f09a2820 100644
--- a/Source/JavaScriptCore/heap/GCThreadSharedData.h
+++ b/Source/JavaScriptCore/heap/GCThreadSharedData.h
@@ -26,7 +26,12 @@
#ifndef GCThreadSharedData_h
#define GCThreadSharedData_h
+#include "ListableHandler.h"
#include "MarkStack.h"
+#include "UnconditionalFinalizer.h"
+#include "WeakReferenceHarvester.h"
+#include <wtf/HashSet.h>
+#include <wtf/Threading.h>
#include <wtf/Vector.h>
namespace JSC {
@@ -48,7 +53,6 @@ public:
#endif
private:
- friend class MarkStack;
friend class SlotVisitor;
#if ENABLE(PARALLEL_GC)
@@ -64,7 +68,7 @@ private:
bool m_shouldHashConst;
Vector<ThreadIdentifier> m_markingThreads;
- Vector<MarkStack*> m_markingThreadsMarkStack;
+ Vector<SlotVisitor*> m_markingThreadsMarkStack;
Mutex m_markingLock;
ThreadCondition m_markingCondition;
diff --git a/Source/JavaScriptCore/heap/Heap.h b/Source/JavaScriptCore/heap/Heap.h
index 69aa97e33..e48386791 100644
--- a/Source/JavaScriptCore/heap/Heap.h
+++ b/Source/JavaScriptCore/heap/Heap.h
@@ -185,7 +185,7 @@ namespace JSC {
void* allocateWithDestructor(size_t);
void* allocateWithoutDestructor(size_t);
- void* allocateStructure();
+ void* allocateStructure(size_t);
static const size_t minExtraCost = 256;
static const size_t maxExtraCost = 1024 * 1024;
@@ -372,9 +372,9 @@ namespace JSC {
return m_objectSpace.allocateWithoutDestructor(bytes);
}
- inline void* Heap::allocateStructure()
+ inline void* Heap::allocateStructure(size_t bytes)
{
- return m_objectSpace.allocateStructure();
+ return m_objectSpace.allocateStructure(bytes);
}
inline CheckedBoolean Heap::tryAllocateStorage(size_t bytes, void** outPtr)
diff --git a/Source/JavaScriptCore/heap/HeapRootVisitor.h b/Source/JavaScriptCore/heap/HeapRootVisitor.h
index 76c97290a..9849d7c39 100644
--- a/Source/JavaScriptCore/heap/HeapRootVisitor.h
+++ b/Source/JavaScriptCore/heap/HeapRootVisitor.h
@@ -27,6 +27,7 @@
#define HeapRootVisitor_h
#include "SlotVisitor.h"
+#include "SlotVisitorInlineMethods.h"
namespace JSC {
diff --git a/Source/JavaScriptCore/heap/MarkStack.cpp b/Source/JavaScriptCore/heap/MarkStack.cpp
index 9a4a01f04..582439fd2 100644
--- a/Source/JavaScriptCore/heap/MarkStack.cpp
+++ b/Source/JavaScriptCore/heap/MarkStack.cpp
@@ -223,402 +223,4 @@ void MarkStackArray::stealSomeCellsFrom(MarkStackArray& other, size_t idleThread
append(other.removeLast());
}
-MarkStack::MarkStack(GCThreadSharedData& shared)
- : m_stack(shared.m_segmentAllocator)
-#if !ASSERT_DISABLED
- , m_isCheckingForDefaultMarkViolation(false)
- , m_isDraining(false)
-#endif
- , m_visitCount(0)
- , m_isInParallelMode(false)
- , m_shared(shared)
- , m_shouldHashConst(false)
-{
-}
-
-MarkStack::~MarkStack()
-{
- ASSERT(m_stack.isEmpty());
-}
-
-void MarkStack::setup()
-{
- m_shared.m_shouldHashConst = m_shared.m_globalData->haveEnoughNewStringsToHashConst();
- m_shouldHashConst = m_shared.m_shouldHashConst;
-#if ENABLE(PARALLEL_GC)
- for (unsigned i = 0; i < m_shared.m_markingThreadsMarkStack.size(); ++i)
- m_shared.m_markingThreadsMarkStack[i]->m_shouldHashConst = m_shared.m_shouldHashConst;
-#endif
-}
-
-void MarkStack::reset()
-{
- m_visitCount = 0;
- ASSERT(m_stack.isEmpty());
-#if ENABLE(PARALLEL_GC)
- ASSERT(m_opaqueRoots.isEmpty()); // Should have merged by now.
-#else
- m_opaqueRoots.clear();
-#endif
- if (m_shouldHashConst) {
- m_uniqueStrings.clear();
- m_shouldHashConst = false;
- }
-}
-
-void MarkStack::append(ConservativeRoots& conservativeRoots)
-{
- JSCell** roots = conservativeRoots.roots();
- size_t size = conservativeRoots.size();
- for (size_t i = 0; i < size; ++i)
- internalAppend(roots[i]);
-}
-
-ALWAYS_INLINE static void visitChildren(SlotVisitor& visitor, const JSCell* cell)
-{
-#if ENABLE(SIMPLE_HEAP_PROFILING)
- m_visitedTypeCounts.count(cell);
-#endif
-
- ASSERT(Heap::isMarked(cell));
-
- if (isJSString(cell)) {
- JSString::visitChildren(const_cast<JSCell*>(cell), visitor);
- return;
- }
-
- if (isJSFinalObject(cell)) {
- JSFinalObject::visitChildren(const_cast<JSCell*>(cell), visitor);
- return;
- }
-
- if (isJSArray(cell)) {
- JSArray::visitChildren(const_cast<JSCell*>(cell), visitor);
- return;
- }
-
- cell->methodTable()->visitChildren(const_cast<JSCell*>(cell), visitor);
-}
-
-void SlotVisitor::donateKnownParallel()
-{
- // NOTE: Because we re-try often, we can afford to be conservative, and
- // assume that donating is not profitable.
-
- // Avoid locking when a thread reaches a dead end in the object graph.
- if (m_stack.size() < 2)
- return;
-
- // If there's already some shared work queued up, be conservative and assume
- // that donating more is not profitable.
- if (m_shared.m_sharedMarkStack.size())
- return;
-
- // If we're contending on the lock, be conservative and assume that another
- // thread is already donating.
- MutexTryLocker locker(m_shared.m_markingLock);
- if (!locker.locked())
- return;
-
- // Otherwise, assume that a thread will go idle soon, and donate.
- m_stack.donateSomeCellsTo(m_shared.m_sharedMarkStack);
-
- if (m_shared.m_numberOfActiveParallelMarkers < Options::numberOfGCMarkers())
- m_shared.m_markingCondition.broadcast();
-}
-
-void SlotVisitor::drain()
-{
- ASSERT(m_isInParallelMode);
-
-#if ENABLE(PARALLEL_GC)
- if (Options::numberOfGCMarkers() > 1) {
- while (!m_stack.isEmpty()) {
- m_stack.refill();
- for (unsigned countdown = Options::minimumNumberOfScansBetweenRebalance(); m_stack.canRemoveLast() && countdown--;)
- visitChildren(*this, m_stack.removeLast());
- donateKnownParallel();
- }
-
- mergeOpaqueRootsIfNecessary();
- return;
- }
-#endif
-
- while (!m_stack.isEmpty()) {
- m_stack.refill();
- while (m_stack.canRemoveLast())
- visitChildren(*this, m_stack.removeLast());
- }
-}
-
-void SlotVisitor::drainFromShared(SharedDrainMode sharedDrainMode)
-{
- ASSERT(m_isInParallelMode);
-
- ASSERT(Options::numberOfGCMarkers());
-
- bool shouldBeParallel;
-
-#if ENABLE(PARALLEL_GC)
- shouldBeParallel = Options::numberOfGCMarkers() > 1;
-#else
- ASSERT(Options::numberOfGCMarkers() == 1);
- shouldBeParallel = false;
-#endif
-
- if (!shouldBeParallel) {
- // This call should be a no-op.
- ASSERT_UNUSED(sharedDrainMode, sharedDrainMode == MasterDrain);
- ASSERT(m_stack.isEmpty());
- ASSERT(m_shared.m_sharedMarkStack.isEmpty());
- return;
- }
-
-#if ENABLE(PARALLEL_GC)
- {
- MutexLocker locker(m_shared.m_markingLock);
- m_shared.m_numberOfActiveParallelMarkers++;
- }
- while (true) {
- {
- MutexLocker locker(m_shared.m_markingLock);
- m_shared.m_numberOfActiveParallelMarkers--;
-
- // How we wait differs depending on drain mode.
- if (sharedDrainMode == MasterDrain) {
- // Wait until either termination is reached, or until there is some work
- // for us to do.
- while (true) {
- // Did we reach termination?
- if (!m_shared.m_numberOfActiveParallelMarkers && m_shared.m_sharedMarkStack.isEmpty()) {
- // Let any sleeping slaves know it's time for them to give their private CopiedBlocks back
- m_shared.m_markingCondition.broadcast();
- return;
- }
-
- // Is there work to be done?
- if (!m_shared.m_sharedMarkStack.isEmpty())
- break;
-
- // Otherwise wait.
- m_shared.m_markingCondition.wait(m_shared.m_markingLock);
- }
- } else {
- ASSERT(sharedDrainMode == SlaveDrain);
-
- // Did we detect termination? If so, let the master know.
- if (!m_shared.m_numberOfActiveParallelMarkers && m_shared.m_sharedMarkStack.isEmpty())
- m_shared.m_markingCondition.broadcast();
-
- while (m_shared.m_sharedMarkStack.isEmpty() && !m_shared.m_parallelMarkersShouldExit) {
- if (!m_shared.m_numberOfActiveParallelMarkers && m_shared.m_sharedMarkStack.isEmpty())
- doneCopying();
- m_shared.m_markingCondition.wait(m_shared.m_markingLock);
- }
-
- // Is the VM exiting? If so, exit this thread.
- if (m_shared.m_parallelMarkersShouldExit) {
- doneCopying();
- return;
- }
- }
-
- size_t idleThreadCount = Options::numberOfGCMarkers() - m_shared.m_numberOfActiveParallelMarkers;
- m_stack.stealSomeCellsFrom(m_shared.m_sharedMarkStack, idleThreadCount);
- m_shared.m_numberOfActiveParallelMarkers++;
- }
-
- drain();
- }
-#endif
-}
-
-void MarkStack::mergeOpaqueRoots()
-{
- ASSERT(!m_opaqueRoots.isEmpty()); // Should only be called when opaque roots are non-empty.
- {
- MutexLocker locker(m_shared.m_opaqueRootsLock);
- HashSet<void*>::iterator begin = m_opaqueRoots.begin();
- HashSet<void*>::iterator end = m_opaqueRoots.end();
- for (HashSet<void*>::iterator iter = begin; iter != end; ++iter)
- m_shared.m_opaqueRoots.add(*iter);
- }
- m_opaqueRoots.clear();
-}
-
-void SlotVisitor::startCopying()
-{
- ASSERT(!m_copiedAllocator.isValid());
-}
-
-void* SlotVisitor::allocateNewSpaceSlow(size_t bytes)
-{
- m_shared.m_copiedSpace->doneFillingBlock(m_copiedAllocator.resetCurrentBlock());
- m_copiedAllocator.setCurrentBlock(m_shared.m_copiedSpace->allocateBlockForCopyingPhase());
-
- void* result = 0;
- CheckedBoolean didSucceed = m_copiedAllocator.tryAllocate(bytes, &result);
- ASSERT(didSucceed);
- return result;
-}
-
-void* SlotVisitor::allocateNewSpaceOrPin(void* ptr, size_t bytes)
-{
- if (!checkIfShouldCopyAndPinOtherwise(ptr, bytes))
- return 0;
-
- return allocateNewSpace(bytes);
-}
-
-ALWAYS_INLINE bool JSString::tryHashConstLock()
-{
-#if ENABLE(PARALLEL_GC)
- unsigned currentFlags = m_flags;
-
- if (currentFlags & HashConstLock)
- return false;
-
- unsigned newFlags = currentFlags | HashConstLock;
-
- if (!WTF::weakCompareAndSwap(&m_flags, currentFlags, newFlags))
- return false;
-
- WTF::memoryBarrierAfterLock();
- return true;
-#else
- if (isHashConstSingleton())
- return false;
-
- m_flags |= HashConstLock;
-
- return true;
-#endif
-}
-
-ALWAYS_INLINE void JSString::releaseHashConstLock()
-{
-#if ENABLE(PARALLEL_GC)
- WTF::memoryBarrierBeforeUnlock();
-#endif
- m_flags &= ~HashConstLock;
-}
-
-ALWAYS_INLINE bool JSString::shouldTryHashConst()
-{
- return ((length() > 1) && !isRope() && !isHashConstSingleton());
-}
-
-ALWAYS_INLINE void MarkStack::internalAppend(JSValue* slot)
-{
- // This internalAppend is only intended for visits to object and array backing stores.
- // as it can change the JSValue pointed to be the argument when the original JSValue
- // is a string that contains the same contents as another string.
-
- ASSERT(slot);
- JSValue value = *slot;
- ASSERT(value);
- if (!value.isCell())
- return;
-
- JSCell* cell = value.asCell();
- if (!cell)
- return;
-
- if (m_shouldHashConst && cell->isString()) {
- JSString* string = jsCast<JSString*>(cell);
- if (string->shouldTryHashConst() && string->tryHashConstLock()) {
- UniqueStringMap::AddResult addResult = m_uniqueStrings.add(string->string().impl(), value);
- if (addResult.isNewEntry)
- string->setHashConstSingleton();
- else {
- JSValue existingJSValue = addResult.iterator->second;
- if (value != existingJSValue)
- jsCast<JSString*>(existingJSValue.asCell())->clearHashConstSingleton();
- *slot = existingJSValue;
- string->releaseHashConstLock();
- return;
- }
- string->releaseHashConstLock();
- }
- }
-
- internalAppend(cell);
-}
-
-void SlotVisitor::copyAndAppend(void** ptr, size_t bytes, JSValue* values, unsigned length)
-{
- void* oldPtr = *ptr;
- void* newPtr = allocateNewSpaceOrPin(oldPtr, bytes);
- if (newPtr) {
- size_t jsValuesOffset = static_cast<size_t>(reinterpret_cast<char*>(values) - static_cast<char*>(oldPtr));
-
- JSValue* newValues = reinterpret_cast_ptr<JSValue*>(static_cast<char*>(newPtr) + jsValuesOffset);
- for (unsigned i = 0; i < length; i++) {
- JSValue& value = values[i];
- newValues[i] = value;
- if (!value)
- continue;
- internalAppend(&newValues[i]);
- }
-
- memcpy(newPtr, oldPtr, jsValuesOffset);
- *ptr = newPtr;
- } else
- append(values, length);
-}
-
-void SlotVisitor::doneCopying()
-{
- if (!m_copiedAllocator.isValid())
- return;
-
- m_shared.m_copiedSpace->doneFillingBlock(m_copiedAllocator.resetCurrentBlock());
-}
-
-void SlotVisitor::harvestWeakReferences()
-{
- for (WeakReferenceHarvester* current = m_shared.m_weakReferenceHarvesters.head(); current; current = current->next())
- current->visitWeakReferences(*this);
-}
-
-void SlotVisitor::finalizeUnconditionalFinalizers()
-{
- while (m_shared.m_unconditionalFinalizers.hasNext())
- m_shared.m_unconditionalFinalizers.removeNext()->finalizeUnconditionally();
-}
-
-#if ENABLE(GC_VALIDATION)
-void MarkStack::validate(JSCell* cell)
-{
- if (!cell) {
- dataLog("cell is NULL\n");
- CRASH();
- }
-
- if (!cell->structure()) {
- dataLog("cell at %p has a null structure\n" , cell);
- CRASH();
- }
-
- // Both the cell's structure, and the cell's structure's structure should be the Structure Structure.
- // I hate this sentence.
- if (cell->structure()->structure()->JSCell::classInfo() != cell->structure()->JSCell::classInfo()) {
- const char* parentClassName = 0;
- const char* ourClassName = 0;
- if (cell->structure()->structure() && cell->structure()->structure()->JSCell::classInfo())
- parentClassName = cell->structure()->structure()->JSCell::classInfo()->className;
- if (cell->structure()->JSCell::classInfo())
- ourClassName = cell->structure()->JSCell::classInfo()->className;
- dataLog("parent structure (%p <%s>) of cell at %p doesn't match cell's structure (%p <%s>)\n",
- cell->structure()->structure(), parentClassName, cell, cell->structure(), ourClassName);
- CRASH();
- }
-}
-#else
-void MarkStack::validate(JSCell*)
-{
-}
-#endif
-
} // namespace JSC
diff --git a/Source/JavaScriptCore/heap/MarkStack.h b/Source/JavaScriptCore/heap/MarkStack.h
index 54ae1cb02..0245e4be5 100644
--- a/Source/JavaScriptCore/heap/MarkStack.h
+++ b/Source/JavaScriptCore/heap/MarkStack.h
@@ -26,25 +26,6 @@
#ifndef MarkStack_h
#define MarkStack_h
-#include "CopiedSpace.h"
-#include "HandleTypes.h"
-#include "JSValue.h"
-#include "Options.h"
-#include "Register.h"
-#include "UnconditionalFinalizer.h"
-#include "VTableSpectrum.h"
-#include "WeakReferenceHarvester.h"
-#include <wtf/DataLog.h>
-#include <wtf/Forward.h>
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/OSAllocator.h>
-#include <wtf/PageBlock.h>
-#include <wtf/TCSpinLock.h>
-#include <wtf/text/StringHash.h>
-#include <wtf/Vector.h>
-
#if ENABLE(OBJECT_MARK_LOGGING)
#define MARK_LOG_MESSAGE0(message) dataLog(message)
#define MARK_LOG_MESSAGE1(message, arg1) dataLog(message, arg1)
@@ -69,276 +50,86 @@
#define MARK_LOG_CHILD(visitor, child) do { } while (false)
#endif
-namespace JSC {
-
- class ConservativeRoots;
- class JSGlobalData;
- class MarkStack;
- class GCThreadSharedData;
- class ParallelModeEnabler;
- class Register;
- class SlotVisitor;
- template<typename T> class WriteBarrierBase;
- template<typename T> class JITWriteBarrier;
-
- struct MarkStackSegment {
- MarkStackSegment* m_previous;
-#if !ASSERT_DISABLED
- size_t m_top;
-#endif
-
- const JSCell** data()
- {
- return bitwise_cast<const JSCell**>(this + 1);
- }
-
- static size_t capacityFromSize(size_t size)
- {
- return (size - sizeof(MarkStackSegment)) / sizeof(const JSCell*);
- }
-
- static size_t sizeFromCapacity(size_t capacity)
- {
- return sizeof(MarkStackSegment) + capacity * sizeof(const JSCell*);
- }
- };
-
- class MarkStackSegmentAllocator {
- public:
- MarkStackSegmentAllocator();
- ~MarkStackSegmentAllocator();
-
- MarkStackSegment* allocate();
- void release(MarkStackSegment*);
-
- void shrinkReserve();
-
- private:
- SpinLock m_lock;
- MarkStackSegment* m_nextFreeSegment;
- };
-
- class MarkStackArray {
- public:
- MarkStackArray(MarkStackSegmentAllocator&);
- ~MarkStackArray();
-
- void append(const JSCell*);
-
- bool canRemoveLast();
- const JSCell* removeLast();
- bool refill();
-
- bool isEmpty();
-
- void donateSomeCellsTo(MarkStackArray& other);
-
- void stealSomeCellsFrom(MarkStackArray& other, size_t idleThreadCount);
-
- size_t size();
-
- private:
- MarkStackSegment* m_topSegment;
-
- JS_EXPORT_PRIVATE void expand();
-
- MarkStackSegmentAllocator& m_allocator;
-
- size_t m_segmentCapacity;
- size_t m_top;
- size_t m_numberOfPreviousSegments;
-
- size_t postIncTop()
- {
- size_t result = m_top++;
- ASSERT(result == m_topSegment->m_top++);
- return result;
- }
-
- size_t preDecTop()
- {
- size_t result = --m_top;
- ASSERT(result == --m_topSegment->m_top);
- return result;
- }
-
- void setTopForFullSegment()
- {
- ASSERT(m_topSegment->m_top == m_segmentCapacity);
- m_top = m_segmentCapacity;
- }
-
- void setTopForEmptySegment()
- {
- ASSERT(!m_topSegment->m_top);
- m_top = 0;
- }
-
- size_t top()
- {
- ASSERT(m_top == m_topSegment->m_top);
- return m_top;
- }
-
-#if ASSERT_DISABLED
- void validatePrevious() { }
-#else
- void validatePrevious()
- {
- unsigned count = 0;
- for (MarkStackSegment* current = m_topSegment->m_previous; current; current = current->m_previous)
- count++;
- ASSERT(count == m_numberOfPreviousSegments);
- }
-#endif
- };
-
- class MarkStack {
- WTF_MAKE_NONCOPYABLE(MarkStack);
- friend class HeapRootVisitor; // Allowed to mark a JSValue* or JSCell** directly.
-
- public:
- MarkStack(GCThreadSharedData&);
- ~MarkStack();
-
- void append(ConservativeRoots&);
-
- template<typename T> void append(JITWriteBarrier<T>*);
- template<typename T> void append(WriteBarrierBase<T>*);
- void appendValues(WriteBarrierBase<Unknown>*, size_t count);
-
- template<typename T>
- void appendUnbarrieredPointer(T**);
- void appendUnbarrieredValue(JSValue*);
-
- void addOpaqueRoot(void*);
- bool containsOpaqueRoot(void*);
- int opaqueRootCount();
-
- GCThreadSharedData& sharedData() { return m_shared; }
- bool isEmpty() { return m_stack.isEmpty(); }
-
- void setup();
- void reset();
-
- size_t visitCount() const { return m_visitCount; }
-
-#if ENABLE(SIMPLE_HEAP_PROFILING)
- VTableSpectrum m_visitedTypeCounts;
-#endif
-
- void addWeakReferenceHarvester(WeakReferenceHarvester*);
- void addUnconditionalFinalizer(UnconditionalFinalizer*);
-
-#if ENABLE(OBJECT_MARK_LOGGING)
- inline void resetChildCount() { m_logChildCount = 0; }
- inline unsigned childCount() { return m_logChildCount; }
- inline void incrementChildCount() { m_logChildCount++; }
-#endif
+#include <wtf/StdLibExtras.h>
+#include <wtf/TCSpinLock.h>
- protected:
- JS_EXPORT_PRIVATE static void validate(JSCell*);
+namespace JSC {
- void append(JSValue*);
- void append(JSValue*, size_t count);
- void append(JSCell**);
+class JSCell;
- void internalAppend(JSCell*);
- void internalAppend(JSValue);
- void internalAppend(JSValue*);
-
- JS_EXPORT_PRIVATE void mergeOpaqueRoots();
-
- void mergeOpaqueRootsIfNecessary()
- {
- if (m_opaqueRoots.isEmpty())
- return;
- mergeOpaqueRoots();
- }
-
- void mergeOpaqueRootsIfProfitable()
- {
- if (static_cast<unsigned>(m_opaqueRoots.size()) < Options::opaqueRootMergeThreshold())
- return;
- mergeOpaqueRoots();
- }
-
- MarkStackArray m_stack;
- HashSet<void*> m_opaqueRoots; // Handle-owning data structures not visible to the garbage collector.
-
+struct MarkStackSegment {
+ MarkStackSegment* m_previous;
#if !ASSERT_DISABLED
- public:
- bool m_isCheckingForDefaultMarkViolation;
- bool m_isDraining;
+ size_t m_top;
#endif
- protected:
- friend class ParallelModeEnabler;
- size_t m_visitCount;
- bool m_isInParallelMode;
-
- GCThreadSharedData& m_shared;
-
- bool m_shouldHashConst; // Local per-thread copy of shared flag for performance reasons
- typedef HashMap<StringImpl*, JSValue> UniqueStringMap;
- UniqueStringMap m_uniqueStrings;
-
-#if ENABLE(OBJECT_MARK_LOGGING)
- unsigned m_logChildCount;
-#endif
- };
-
- inline void MarkStackArray::append(const JSCell* cell)
+ const JSCell** data()
{
- if (m_top == m_segmentCapacity)
- expand();
- m_topSegment->data()[postIncTop()] = cell;
+ return bitwise_cast<const JSCell**>(this + 1);
}
-
- inline bool MarkStackArray::canRemoveLast()
+
+ static size_t capacityFromSize(size_t size)
{
- return !!m_top;
+ return (size - sizeof(MarkStackSegment)) / sizeof(const JSCell*);
}
-
- inline const JSCell* MarkStackArray::removeLast()
+
+ static size_t sizeFromCapacity(size_t capacity)
{
- return m_topSegment->data()[preDecTop()];
+ return sizeof(MarkStackSegment) + capacity * sizeof(const JSCell*);
}
+};
- inline bool MarkStackArray::isEmpty()
- {
- if (m_top)
- return false;
- if (m_topSegment->m_previous) {
- ASSERT(m_topSegment->m_previous->m_top == m_segmentCapacity);
- return false;
- }
- return true;
- }
+class MarkStackSegmentAllocator {
+public:
+ MarkStackSegmentAllocator();
+ ~MarkStackSegmentAllocator();
+
+ MarkStackSegment* allocate();
+ void release(MarkStackSegment*);
+
+ void shrinkReserve();
+
+private:
+ SpinLock m_lock;
+ MarkStackSegment* m_nextFreeSegment;
+};
- inline size_t MarkStackArray::size()
- {
- return m_top + m_segmentCapacity * m_numberOfPreviousSegments;
- }
+class MarkStackArray {
+public:
+ MarkStackArray(MarkStackSegmentAllocator&);
+ ~MarkStackArray();
- class ParallelModeEnabler {
- public:
- ParallelModeEnabler(MarkStack& stack)
- : m_stack(stack)
- {
- ASSERT(!m_stack.m_isInParallelMode);
- m_stack.m_isInParallelMode = true;
- }
-
- ~ParallelModeEnabler()
- {
- ASSERT(m_stack.m_isInParallelMode);
- m_stack.m_isInParallelMode = false;
- }
-
- private:
- MarkStack& m_stack;
- };
+ void append(const JSCell*);
+
+ bool canRemoveLast();
+ const JSCell* removeLast();
+ bool refill();
+
+ void donateSomeCellsTo(MarkStackArray& other);
+ void stealSomeCellsFrom(MarkStackArray& other, size_t idleThreadCount);
+
+ size_t size();
+ bool isEmpty();
+
+private:
+ JS_EXPORT_PRIVATE void expand();
+
+ size_t postIncTop();
+ size_t preDecTop();
+ void setTopForFullSegment();
+ void setTopForEmptySegment();
+ size_t top();
+
+ void validatePrevious();
+
+ MarkStackSegment* m_topSegment;
+ MarkStackSegmentAllocator& m_allocator;
+
+ size_t m_segmentCapacity;
+ size_t m_top;
+ size_t m_numberOfPreviousSegments;
+
+};
} // namespace JSC
diff --git a/Source/JavaScriptCore/heap/MarkStackInlineMethods.h b/Source/JavaScriptCore/heap/MarkStackInlineMethods.h
index 031dfff39..d3276d7fa 100644
--- a/Source/JavaScriptCore/heap/MarkStackInlineMethods.h
+++ b/Source/JavaScriptCore/heap/MarkStackInlineMethods.h
@@ -31,94 +31,81 @@
namespace JSC {
-ALWAYS_INLINE void MarkStack::append(JSValue* slot, size_t count)
+inline size_t MarkStackArray::postIncTop()
{
- for (size_t i = 0; i < count; ++i) {
- JSValue& value = slot[i];
- internalAppend(value);
- }
+ size_t result = m_top++;
+ ASSERT(result == m_topSegment->m_top++);
+ return result;
}
-
-template<typename T>
-inline void MarkStack::appendUnbarrieredPointer(T** slot)
+
+inline size_t MarkStackArray::preDecTop()
{
- ASSERT(slot);
- JSCell* cell = *slot;
- internalAppend(cell);
+ size_t result = --m_top;
+ ASSERT(result == --m_topSegment->m_top);
+ return result;
}
-
-ALWAYS_INLINE void MarkStack::append(JSValue* slot)
+
+inline void MarkStackArray::setTopForFullSegment()
{
- ASSERT(slot);
- internalAppend(*slot);
+ ASSERT(m_topSegment->m_top == m_segmentCapacity);
+ m_top = m_segmentCapacity;
}
-ALWAYS_INLINE void MarkStack::appendUnbarrieredValue(JSValue* slot)
+inline void MarkStackArray::setTopForEmptySegment()
{
- ASSERT(slot);
- internalAppend(*slot);
+ ASSERT(!m_topSegment->m_top);
+ m_top = 0;
}
-ALWAYS_INLINE void MarkStack::append(JSCell** slot)
+inline size_t MarkStackArray::top()
{
- ASSERT(slot);
- internalAppend(*slot);
+ ASSERT(m_top == m_topSegment->m_top);
+ return m_top;
}
-ALWAYS_INLINE void MarkStack::internalAppend(JSValue value)
+#if ASSERT_DISABLED
+inline void MarkStackArray::validatePrevious() { }
+#else
+inline void MarkStackArray::validatePrevious()
{
- if (!value || !value.isCell())
- return;
- internalAppend(value.asCell());
+ unsigned count = 0;
+ for (MarkStackSegment* current = m_topSegment->m_previous; current; current = current->m_previous)
+ count++;
+ ASSERT(count == m_numberOfPreviousSegments);
}
+#endif
-inline void MarkStack::addWeakReferenceHarvester(WeakReferenceHarvester* weakReferenceHarvester)
+inline void MarkStackArray::append(const JSCell* cell)
{
- m_shared.m_weakReferenceHarvesters.addThreadSafe(weakReferenceHarvester);
+ if (m_top == m_segmentCapacity)
+ expand();
+ m_topSegment->data()[postIncTop()] = cell;
}
-inline void MarkStack::addUnconditionalFinalizer(UnconditionalFinalizer* unconditionalFinalizer)
+inline bool MarkStackArray::canRemoveLast()
{
- m_shared.m_unconditionalFinalizers.addThreadSafe(unconditionalFinalizer);
+ return !!m_top;
}
-inline void MarkStack::addOpaqueRoot(void* root)
+inline const JSCell* MarkStackArray::removeLast()
{
-#if ENABLE(PARALLEL_GC)
- if (Options::numberOfGCMarkers() == 1) {
- // Put directly into the shared HashSet.
- m_shared.m_opaqueRoots.add(root);
- return;
- }
- // Put into the local set, but merge with the shared one every once in
- // a while to make sure that the local sets don't grow too large.
- mergeOpaqueRootsIfProfitable();
- m_opaqueRoots.add(root);
-#else
- m_opaqueRoots.add(root);
-#endif
+ return m_topSegment->data()[preDecTop()];
}
-inline bool MarkStack::containsOpaqueRoot(void* root)
+inline bool MarkStackArray::isEmpty()
{
- ASSERT(!m_isInParallelMode);
-#if ENABLE(PARALLEL_GC)
- ASSERT(m_opaqueRoots.isEmpty());
- return m_shared.m_opaqueRoots.contains(root);
-#else
- return m_opaqueRoots.contains(root);
-#endif
+ if (m_top)
+ return false;
+ if (m_topSegment->m_previous) {
+ ASSERT(m_topSegment->m_previous->m_top == m_segmentCapacity);
+ return false;
+ }
+ return true;
}
-inline int MarkStack::opaqueRootCount()
+inline size_t MarkStackArray::size()
{
- ASSERT(!m_isInParallelMode);
-#if ENABLE(PARALLEL_GC)
- ASSERT(m_opaqueRoots.isEmpty());
- return m_shared.m_opaqueRoots.size();
-#else
- return m_opaqueRoots.size();
-#endif
+ return m_top + m_segmentCapacity * m_numberOfPreviousSegments;
}
} // namespace JSC
diff --git a/Source/JavaScriptCore/heap/MarkedAllocator.cpp b/Source/JavaScriptCore/heap/MarkedAllocator.cpp
index 20b556969..ab37ead4c 100644
--- a/Source/JavaScriptCore/heap/MarkedAllocator.cpp
+++ b/Source/JavaScriptCore/heap/MarkedAllocator.cpp
@@ -27,7 +27,7 @@ bool MarkedAllocator::isPagedOut(double deadline)
return false;
}
-inline void* MarkedAllocator::tryAllocateHelper()
+inline void* MarkedAllocator::tryAllocateHelper(size_t bytes)
{
if (!m_freeList.head) {
if (m_onlyContainsStructures && !m_heap->isSafeToSweepStructures()) {
@@ -42,12 +42,20 @@ inline void* MarkedAllocator::tryAllocateHelper()
}
for (MarkedBlock*& block = m_blocksToSweep; block; block = block->next()) {
- m_freeList = block->sweep(MarkedBlock::SweepToFreeList);
- if (m_freeList.head) {
- m_currentBlock = block;
- break;
+ MarkedBlock::FreeList freeList = block->sweep(MarkedBlock::SweepToFreeList);
+ if (!freeList.head) {
+ block->didConsumeFreeList();
+ continue;
}
- block->didConsumeFreeList();
+
+ if (bytes > block->cellSize()) {
+ block->zapFreeList(freeList);
+ continue;
+ }
+
+ m_currentBlock = block;
+ m_freeList = freeList;
+ break;
}
if (!m_freeList.head) {
@@ -62,16 +70,16 @@ inline void* MarkedAllocator::tryAllocateHelper()
return head;
}
-inline void* MarkedAllocator::tryAllocate()
+inline void* MarkedAllocator::tryAllocate(size_t bytes)
{
ASSERT(!m_heap->isBusy());
m_heap->m_operationInProgress = Allocation;
- void* result = tryAllocateHelper();
+ void* result = tryAllocateHelper(bytes);
m_heap->m_operationInProgress = NoOperation;
return result;
}
-void* MarkedAllocator::allocateSlowCase()
+void* MarkedAllocator::allocateSlowCase(size_t bytes)
{
ASSERT(m_heap->globalData()->apiLock().currentThreadIsHoldingLock());
#if COLLECT_ON_EVERY_ALLOCATION
@@ -82,7 +90,7 @@ void* MarkedAllocator::allocateSlowCase()
ASSERT(!m_freeList.head);
m_heap->didAllocate(m_freeList.bytes);
- void* result = tryAllocate();
+ void* result = tryAllocate(bytes);
if (LIKELY(result != 0))
return result;
@@ -90,27 +98,39 @@ void* MarkedAllocator::allocateSlowCase()
if (m_heap->shouldCollect()) {
m_heap->collect(Heap::DoNotSweep);
- result = tryAllocate();
+ result = tryAllocate(bytes);
if (result)
return result;
}
ASSERT(!m_heap->shouldCollect());
- MarkedBlock* block = allocateBlock();
+ MarkedBlock* block = allocateBlock(bytes);
ASSERT(block);
addBlock(block);
- result = tryAllocate();
+ result = tryAllocate(bytes);
ASSERT(result);
return result;
}
-MarkedBlock* MarkedAllocator::allocateBlock()
+MarkedBlock* MarkedAllocator::allocateBlock(size_t bytes)
{
- MarkedBlock* block = MarkedBlock::create(m_heap->blockAllocator().allocate(), m_heap, m_cellSize, m_cellsNeedDestruction, m_onlyContainsStructures);
- m_markedSpace->didAddBlock(block);
- return block;
+ size_t minBlockSize = MarkedBlock::blockSize;
+ size_t minAllocationSize = WTF::roundUpToMultipleOf(WTF::pageSize(), sizeof(MarkedBlock) + bytes);
+ size_t blockSize = std::max(minBlockSize, minAllocationSize);
+
+ size_t cellSize = m_cellSize ? m_cellSize : WTF::roundUpToMultipleOf<MarkedBlock::atomSize>(bytes);
+
+ if (blockSize == MarkedBlock::blockSize) {
+ PageAllocationAligned allocation = m_heap->blockAllocator().allocate();
+ return MarkedBlock::create(allocation, m_heap, cellSize, m_cellsNeedDestruction, m_onlyContainsStructures);
+ }
+
+ PageAllocationAligned allocation = PageAllocationAligned::allocate(blockSize, MarkedBlock::blockSize, OSAllocator::JSGCHeapPages);
+ if (!static_cast<bool>(allocation))
+ CRASH();
+ return MarkedBlock::create(allocation, m_heap, cellSize, m_cellsNeedDestruction, m_onlyContainsStructures);
}
void MarkedAllocator::addBlock(MarkedBlock* block)
@@ -121,6 +141,7 @@ void MarkedAllocator::addBlock(MarkedBlock* block)
m_blockList.append(block);
m_blocksToSweep = m_currentBlock = block;
m_freeList = block->sweep(MarkedBlock::SweepToFreeList);
+ m_markedSpace->didAddBlock(block);
}
void MarkedAllocator::removeBlock(MarkedBlock* block)
diff --git a/Source/JavaScriptCore/heap/MarkedAllocator.h b/Source/JavaScriptCore/heap/MarkedAllocator.h
index c1c431194..7273c13e4 100644
--- a/Source/JavaScriptCore/heap/MarkedAllocator.h
+++ b/Source/JavaScriptCore/heap/MarkedAllocator.h
@@ -25,7 +25,7 @@ public:
size_t cellSize() { return m_cellSize; }
bool cellsNeedDestruction() { return m_cellsNeedDestruction; }
bool onlyContainsStructures() { return m_onlyContainsStructures; }
- void* allocate();
+ void* allocate(size_t);
Heap* heap() { return m_heap; }
template<typename Functor> void forEachBlock(Functor&);
@@ -39,10 +39,10 @@ public:
private:
friend class LLIntOffsetsExtractor;
- JS_EXPORT_PRIVATE void* allocateSlowCase();
- void* tryAllocate();
- void* tryAllocateHelper();
- MarkedBlock* allocateBlock();
+ JS_EXPORT_PRIVATE void* allocateSlowCase(size_t);
+ void* tryAllocate(size_t);
+ void* tryAllocateHelper(size_t);
+ MarkedBlock* allocateBlock(size_t);
MarkedBlock::FreeList m_freeList;
MarkedBlock* m_currentBlock;
@@ -75,12 +75,11 @@ inline void MarkedAllocator::init(Heap* heap, MarkedSpace* markedSpace, size_t c
m_onlyContainsStructures = onlyContainsStructures;
}
-inline void* MarkedAllocator::allocate()
+inline void* MarkedAllocator::allocate(size_t bytes)
{
MarkedBlock::FreeCell* head = m_freeList.head;
- // This is a light-weight fast path to cover the most common case.
if (UNLIKELY(!head))
- return allocateSlowCase();
+ return allocateSlowCase(bytes);
m_freeList.head = head->next;
return head;
diff --git a/Source/JavaScriptCore/heap/MarkedSpace.cpp b/Source/JavaScriptCore/heap/MarkedSpace.cpp
index 68b059c36..689e5f9ab 100644
--- a/Source/JavaScriptCore/heap/MarkedSpace.cpp
+++ b/Source/JavaScriptCore/heap/MarkedSpace.cpp
@@ -90,6 +90,7 @@ MarkedSpace::MarkedSpace(Heap* heap)
destructorAllocatorFor(cellSize).init(heap, this, cellSize, true, false);
}
+ m_largeAllocator.init(heap, this, 0, true, false);
m_structureAllocator.init(heap, this, WTF::roundUpToMultipleOf(32, sizeof(Structure)), true, true);
}
@@ -127,6 +128,7 @@ void MarkedSpace::resetAllocators()
destructorAllocatorFor(cellSize).reset();
}
+ m_largeAllocator.reset();
m_structureAllocator.reset();
}
@@ -153,6 +155,7 @@ void MarkedSpace::canonicalizeCellLivenessData()
destructorAllocatorFor(cellSize).zapFreeList();
}
+ m_largeAllocator.zapFreeList();
m_structureAllocator.zapFreeList();
}
@@ -168,6 +171,9 @@ bool MarkedSpace::isPagedOut(double deadline)
return true;
}
+ if (m_largeAllocator.isPagedOut(deadline))
+ return true;
+
if (m_structureAllocator.isPagedOut(deadline))
return true;
@@ -178,7 +184,12 @@ void MarkedSpace::freeBlock(MarkedBlock* block)
{
allocatorFor(block).removeBlock(block);
m_blocks.remove(block);
- m_heap->blockAllocator().deallocate(MarkedBlock::destroy(block));
+ if (block->capacity() == MarkedBlock::blockSize) {
+ m_heap->blockAllocator().deallocate(MarkedBlock::destroy(block));
+ return;
+ }
+
+ MarkedBlock::destroy(block).deallocate();
}
void MarkedSpace::freeOrShrinkBlock(MarkedBlock* block)
diff --git a/Source/JavaScriptCore/heap/MarkedSpace.h b/Source/JavaScriptCore/heap/MarkedSpace.h
index d5dae3584..03679d9d3 100644
--- a/Source/JavaScriptCore/heap/MarkedSpace.h
+++ b/Source/JavaScriptCore/heap/MarkedSpace.h
@@ -80,7 +80,7 @@ public:
MarkedAllocator& destructorAllocatorFor(size_t);
void* allocateWithDestructor(size_t);
void* allocateWithoutDestructor(size_t);
- void* allocateStructure();
+ void* allocateStructure(size_t);
void resetAllocators();
@@ -115,15 +115,15 @@ public:
private:
friend class LLIntOffsetsExtractor;
-
- // [ 32... 256 ]
+
+ // [ 32... 512 ]
static const size_t preciseStep = MarkedBlock::atomSize;
- static const size_t preciseCutoff = 256;
+ static const size_t preciseCutoff = 512;
static const size_t preciseCount = preciseCutoff / preciseStep;
- // [ 512... 2048 ]
- static const size_t impreciseStep = preciseCutoff;
- static const size_t impreciseCutoff = maxCellSize;
+ // [ 1024... blockSize ]
+ static const size_t impreciseStep = 2 * preciseCutoff;
+ static const size_t impreciseCutoff = MarkedBlock::blockSize / 2;
static const size_t impreciseCount = impreciseCutoff / impreciseStep;
struct Subspace {
@@ -133,6 +133,7 @@ private:
Subspace m_destructorSpace;
Subspace m_normalSpace;
+ MarkedAllocator m_largeAllocator;
MarkedAllocator m_structureAllocator;
Heap* m_heap;
@@ -162,10 +163,12 @@ inline MarkedAllocator& MarkedSpace::firstAllocator()
inline MarkedAllocator& MarkedSpace::allocatorFor(size_t bytes)
{
- ASSERT(bytes && bytes <= maxCellSize);
+ ASSERT(bytes);
if (bytes <= preciseCutoff)
return m_normalSpace.preciseAllocators[(bytes - 1) / preciseStep];
- return m_normalSpace.impreciseAllocators[(bytes - 1) / impreciseStep];
+ if (bytes <= impreciseCutoff)
+ return m_normalSpace.impreciseAllocators[(bytes - 1) / impreciseStep];
+ return m_largeAllocator;
}
inline MarkedAllocator& MarkedSpace::allocatorFor(MarkedBlock* block)
@@ -181,25 +184,27 @@ inline MarkedAllocator& MarkedSpace::allocatorFor(MarkedBlock* block)
inline MarkedAllocator& MarkedSpace::destructorAllocatorFor(size_t bytes)
{
- ASSERT(bytes && bytes <= maxCellSize);
+ ASSERT(bytes);
if (bytes <= preciseCutoff)
return m_destructorSpace.preciseAllocators[(bytes - 1) / preciseStep];
- return m_destructorSpace.impreciseAllocators[(bytes - 1) / impreciseStep];
+ if (bytes <= impreciseCutoff)
+ return m_normalSpace.impreciseAllocators[(bytes - 1) / impreciseStep];
+ return m_largeAllocator;
}
inline void* MarkedSpace::allocateWithoutDestructor(size_t bytes)
{
- return allocatorFor(bytes).allocate();
+ return allocatorFor(bytes).allocate(bytes);
}
inline void* MarkedSpace::allocateWithDestructor(size_t bytes)
{
- return destructorAllocatorFor(bytes).allocate();
+ return destructorAllocatorFor(bytes).allocate(bytes);
}
-inline void* MarkedSpace::allocateStructure()
+inline void* MarkedSpace::allocateStructure(size_t bytes)
{
- return m_structureAllocator.allocate();
+ return m_structureAllocator.allocate(bytes);
}
template <typename Functor> inline typename Functor::ReturnType MarkedSpace::forEachBlock(Functor& functor)
@@ -214,6 +219,7 @@ template <typename Functor> inline typename Functor::ReturnType MarkedSpace::for
m_destructorSpace.impreciseAllocators[i].forEachBlock(functor);
}
+ m_largeAllocator.forEachBlock(functor);
m_structureAllocator.forEachBlock(functor);
return functor.returnValue();
diff --git a/Source/JavaScriptCore/heap/SlotVisitor.cpp b/Source/JavaScriptCore/heap/SlotVisitor.cpp
new file mode 100644
index 000000000..0f003e79d
--- /dev/null
+++ b/Source/JavaScriptCore/heap/SlotVisitor.cpp
@@ -0,0 +1,412 @@
+#include "config.h"
+#include "SlotVisitor.h"
+
+#include "ConservativeRoots.h"
+#include "CopiedSpace.h"
+#include "CopiedSpaceInlineMethods.h"
+#include "JSArray.h"
+#include "JSGlobalData.h"
+#include "JSObject.h"
+#include "JSString.h"
+
+namespace JSC {
+
+SlotVisitor::SlotVisitor(GCThreadSharedData& shared)
+ : m_stack(shared.m_segmentAllocator)
+ , m_visitCount(0)
+ , m_isInParallelMode(false)
+ , m_shared(shared)
+ , m_shouldHashConst(false)
+#if !ASSERT_DISABLED
+ , m_isCheckingForDefaultMarkViolation(false)
+ , m_isDraining(false)
+#endif
+{
+}
+
+SlotVisitor::~SlotVisitor()
+{
+ ASSERT(m_stack.isEmpty());
+}
+
+void SlotVisitor::setup()
+{
+ m_shared.m_shouldHashConst = m_shared.m_globalData->haveEnoughNewStringsToHashConst();
+ m_shouldHashConst = m_shared.m_shouldHashConst;
+#if ENABLE(PARALLEL_GC)
+ for (unsigned i = 0; i < m_shared.m_markingThreadsMarkStack.size(); ++i)
+ m_shared.m_markingThreadsMarkStack[i]->m_shouldHashConst = m_shared.m_shouldHashConst;
+#endif
+}
+
+void SlotVisitor::reset()
+{
+ m_visitCount = 0;
+ ASSERT(m_stack.isEmpty());
+#if ENABLE(PARALLEL_GC)
+ ASSERT(m_opaqueRoots.isEmpty()); // Should have merged by now.
+#else
+ m_opaqueRoots.clear();
+#endif
+ if (m_shouldHashConst) {
+ m_uniqueStrings.clear();
+ m_shouldHashConst = false;
+ }
+}
+
+void SlotVisitor::append(ConservativeRoots& conservativeRoots)
+{
+ JSCell** roots = conservativeRoots.roots();
+ size_t size = conservativeRoots.size();
+ for (size_t i = 0; i < size; ++i)
+ internalAppend(roots[i]);
+}
+
+ALWAYS_INLINE static void visitChildren(SlotVisitor& visitor, const JSCell* cell)
+{
+#if ENABLE(SIMPLE_HEAP_PROFILING)
+ m_visitedTypeCounts.count(cell);
+#endif
+
+ ASSERT(Heap::isMarked(cell));
+
+ if (isJSString(cell)) {
+ JSString::visitChildren(const_cast<JSCell*>(cell), visitor);
+ return;
+ }
+
+ if (isJSFinalObject(cell)) {
+ JSFinalObject::visitChildren(const_cast<JSCell*>(cell), visitor);
+ return;
+ }
+
+ if (isJSArray(cell)) {
+ JSArray::visitChildren(const_cast<JSCell*>(cell), visitor);
+ return;
+ }
+
+ cell->methodTable()->visitChildren(const_cast<JSCell*>(cell), visitor);
+}
+
+void SlotVisitor::donateKnownParallel()
+{
+ // NOTE: Because we re-try often, we can afford to be conservative, and
+ // assume that donating is not profitable.
+
+ // Avoid locking when a thread reaches a dead end in the object graph.
+ if (m_stack.size() < 2)
+ return;
+
+ // If there's already some shared work queued up, be conservative and assume
+ // that donating more is not profitable.
+ if (m_shared.m_sharedMarkStack.size())
+ return;
+
+ // If we're contending on the lock, be conservative and assume that another
+ // thread is already donating.
+ MutexTryLocker locker(m_shared.m_markingLock);
+ if (!locker.locked())
+ return;
+
+ // Otherwise, assume that a thread will go idle soon, and donate.
+ m_stack.donateSomeCellsTo(m_shared.m_sharedMarkStack);
+
+ if (m_shared.m_numberOfActiveParallelMarkers < Options::numberOfGCMarkers())
+ m_shared.m_markingCondition.broadcast();
+}
+
+void SlotVisitor::drain()
+{
+ ASSERT(m_isInParallelMode);
+
+#if ENABLE(PARALLEL_GC)
+ if (Options::numberOfGCMarkers() > 1) {
+ while (!m_stack.isEmpty()) {
+ m_stack.refill();
+ for (unsigned countdown = Options::minimumNumberOfScansBetweenRebalance(); m_stack.canRemoveLast() && countdown--;)
+ visitChildren(*this, m_stack.removeLast());
+ donateKnownParallel();
+ }
+
+ mergeOpaqueRootsIfNecessary();
+ return;
+ }
+#endif
+
+ while (!m_stack.isEmpty()) {
+ m_stack.refill();
+ while (m_stack.canRemoveLast())
+ visitChildren(*this, m_stack.removeLast());
+ }
+}
+
+void SlotVisitor::drainFromShared(SharedDrainMode sharedDrainMode)
+{
+ ASSERT(m_isInParallelMode);
+
+ ASSERT(Options::numberOfGCMarkers());
+
+ bool shouldBeParallel;
+
+#if ENABLE(PARALLEL_GC)
+ shouldBeParallel = Options::numberOfGCMarkers() > 1;
+#else
+ ASSERT(Options::numberOfGCMarkers() == 1);
+ shouldBeParallel = false;
+#endif
+
+ if (!shouldBeParallel) {
+ // This call should be a no-op.
+ ASSERT_UNUSED(sharedDrainMode, sharedDrainMode == MasterDrain);
+ ASSERT(m_stack.isEmpty());
+ ASSERT(m_shared.m_sharedMarkStack.isEmpty());
+ return;
+ }
+
+#if ENABLE(PARALLEL_GC)
+ {
+ MutexLocker locker(m_shared.m_markingLock);
+ m_shared.m_numberOfActiveParallelMarkers++;
+ }
+ while (true) {
+ {
+ MutexLocker locker(m_shared.m_markingLock);
+ m_shared.m_numberOfActiveParallelMarkers--;
+
+ // How we wait differs depending on drain mode.
+ if (sharedDrainMode == MasterDrain) {
+ // Wait until either termination is reached, or until there is some work
+ // for us to do.
+ while (true) {
+ // Did we reach termination?
+ if (!m_shared.m_numberOfActiveParallelMarkers && m_shared.m_sharedMarkStack.isEmpty()) {
+ // Let any sleeping slaves know it's time for them to give their private CopiedBlocks back
+ m_shared.m_markingCondition.broadcast();
+ return;
+ }
+
+ // Is there work to be done?
+ if (!m_shared.m_sharedMarkStack.isEmpty())
+ break;
+
+ // Otherwise wait.
+ m_shared.m_markingCondition.wait(m_shared.m_markingLock);
+ }
+ } else {
+ ASSERT(sharedDrainMode == SlaveDrain);
+
+ // Did we detect termination? If so, let the master know.
+ if (!m_shared.m_numberOfActiveParallelMarkers && m_shared.m_sharedMarkStack.isEmpty())
+ m_shared.m_markingCondition.broadcast();
+
+ while (m_shared.m_sharedMarkStack.isEmpty() && !m_shared.m_parallelMarkersShouldExit) {
+ if (!m_shared.m_numberOfActiveParallelMarkers && m_shared.m_sharedMarkStack.isEmpty())
+ doneCopying();
+ m_shared.m_markingCondition.wait(m_shared.m_markingLock);
+ }
+
+ // Is the VM exiting? If so, exit this thread.
+ if (m_shared.m_parallelMarkersShouldExit) {
+ doneCopying();
+ return;
+ }
+ }
+
+ size_t idleThreadCount = Options::numberOfGCMarkers() - m_shared.m_numberOfActiveParallelMarkers;
+ m_stack.stealSomeCellsFrom(m_shared.m_sharedMarkStack, idleThreadCount);
+ m_shared.m_numberOfActiveParallelMarkers++;
+ }
+
+ drain();
+ }
+#endif
+}
+
+void SlotVisitor::mergeOpaqueRoots()
+{
+ ASSERT(!m_opaqueRoots.isEmpty()); // Should only be called when opaque roots are non-empty.
+ {
+ MutexLocker locker(m_shared.m_opaqueRootsLock);
+ HashSet<void*>::iterator begin = m_opaqueRoots.begin();
+ HashSet<void*>::iterator end = m_opaqueRoots.end();
+ for (HashSet<void*>::iterator iter = begin; iter != end; ++iter)
+ m_shared.m_opaqueRoots.add(*iter);
+ }
+ m_opaqueRoots.clear();
+}
+
+void SlotVisitor::startCopying()
+{
+ ASSERT(!m_copiedAllocator.isValid());
+}
+
+void* SlotVisitor::allocateNewSpaceSlow(size_t bytes)
+{
+ m_shared.m_copiedSpace->doneFillingBlock(m_copiedAllocator.resetCurrentBlock());
+ m_copiedAllocator.setCurrentBlock(m_shared.m_copiedSpace->allocateBlockForCopyingPhase());
+
+ void* result = 0;
+ CheckedBoolean didSucceed = m_copiedAllocator.tryAllocate(bytes, &result);
+ ASSERT(didSucceed);
+ return result;
+}
+
+void* SlotVisitor::allocateNewSpaceOrPin(void* ptr, size_t bytes)
+{
+ if (!checkIfShouldCopyAndPinOtherwise(ptr, bytes))
+ return 0;
+
+ return allocateNewSpace(bytes);
+}
+
+ALWAYS_INLINE bool JSString::tryHashConstLock()
+{
+#if ENABLE(PARALLEL_GC)
+ unsigned currentFlags = m_flags;
+
+ if (currentFlags & HashConstLock)
+ return false;
+
+ unsigned newFlags = currentFlags | HashConstLock;
+
+ if (!WTF::weakCompareAndSwap(&m_flags, currentFlags, newFlags))
+ return false;
+
+ WTF::memoryBarrierAfterLock();
+ return true;
+#else
+ if (isHashConstSingleton())
+ return false;
+
+ m_flags |= HashConstLock;
+
+ return true;
+#endif
+}
+
+ALWAYS_INLINE void JSString::releaseHashConstLock()
+{
+#if ENABLE(PARALLEL_GC)
+ WTF::memoryBarrierBeforeUnlock();
+#endif
+ m_flags &= ~HashConstLock;
+}
+
+ALWAYS_INLINE bool JSString::shouldTryHashConst()
+{
+ return ((length() > 1) && !isRope() && !isHashConstSingleton());
+}
+
+ALWAYS_INLINE void SlotVisitor::internalAppend(JSValue* slot)
+{
+ // This internalAppend is only intended for visits to object and array backing stores.
+ // as it can change the JSValue pointed to be the argument when the original JSValue
+ // is a string that contains the same contents as another string.
+
+ ASSERT(slot);
+ JSValue value = *slot;
+ ASSERT(value);
+ if (!value.isCell())
+ return;
+
+ JSCell* cell = value.asCell();
+ if (!cell)
+ return;
+
+ if (m_shouldHashConst && cell->isString()) {
+ JSString* string = jsCast<JSString*>(cell);
+ if (string->shouldTryHashConst() && string->tryHashConstLock()) {
+ UniqueStringMap::AddResult addResult = m_uniqueStrings.add(string->string().impl(), value);
+ if (addResult.isNewEntry)
+ string->setHashConstSingleton();
+ else {
+ JSValue existingJSValue = addResult.iterator->second;
+ if (value != existingJSValue)
+ jsCast<JSString*>(existingJSValue.asCell())->clearHashConstSingleton();
+ *slot = existingJSValue;
+ string->releaseHashConstLock();
+ return;
+ }
+ string->releaseHashConstLock();
+ }
+ }
+
+ internalAppend(cell);
+}
+
+void SlotVisitor::copyAndAppend(void** ptr, size_t bytes, JSValue* values, unsigned length)
+{
+ void* oldPtr = *ptr;
+ void* newPtr = allocateNewSpaceOrPin(oldPtr, bytes);
+ if (newPtr) {
+ size_t jsValuesOffset = static_cast<size_t>(reinterpret_cast<char*>(values) - static_cast<char*>(oldPtr));
+
+ JSValue* newValues = reinterpret_cast_ptr<JSValue*>(static_cast<char*>(newPtr) + jsValuesOffset);
+ for (unsigned i = 0; i < length; i++) {
+ JSValue& value = values[i];
+ newValues[i] = value;
+ if (!value)
+ continue;
+ internalAppend(&newValues[i]);
+ }
+
+ memcpy(newPtr, oldPtr, jsValuesOffset);
+ *ptr = newPtr;
+ } else
+ append(values, length);
+}
+
+void SlotVisitor::doneCopying()
+{
+ if (!m_copiedAllocator.isValid())
+ return;
+
+ m_shared.m_copiedSpace->doneFillingBlock(m_copiedAllocator.resetCurrentBlock());
+}
+
+void SlotVisitor::harvestWeakReferences()
+{
+ for (WeakReferenceHarvester* current = m_shared.m_weakReferenceHarvesters.head(); current; current = current->next())
+ current->visitWeakReferences(*this);
+}
+
+void SlotVisitor::finalizeUnconditionalFinalizers()
+{
+ while (m_shared.m_unconditionalFinalizers.hasNext())
+ m_shared.m_unconditionalFinalizers.removeNext()->finalizeUnconditionally();
+}
+
+#if ENABLE(GC_VALIDATION)
+void SlotVisitor::validate(JSCell* cell)
+{
+ if (!cell) {
+ dataLog("cell is NULL\n");
+ CRASH();
+ }
+
+ if (!cell->structure()) {
+ dataLog("cell at %p has a null structure\n" , cell);
+ CRASH();
+ }
+
+ // Both the cell's structure, and the cell's structure's structure should be the Structure Structure.
+ // I hate this sentence.
+ if (cell->structure()->structure()->JSCell::classInfo() != cell->structure()->JSCell::classInfo()) {
+ const char* parentClassName = 0;
+ const char* ourClassName = 0;
+ if (cell->structure()->structure() && cell->structure()->structure()->JSCell::classInfo())
+ parentClassName = cell->structure()->structure()->JSCell::classInfo()->className;
+ if (cell->structure()->JSCell::classInfo())
+ ourClassName = cell->structure()->JSCell::classInfo()->className;
+ dataLog("parent structure (%p <%s>) of cell at %p doesn't match cell's structure (%p <%s>)\n",
+ cell->structure()->structure(), parentClassName, cell, cell->structure(), ourClassName);
+ CRASH();
+ }
+}
+#else
+void SlotVisitor::validate(JSCell*)
+{
+}
+#endif
+
+} // namespace JSC
diff --git a/Source/JavaScriptCore/heap/SlotVisitor.h b/Source/JavaScriptCore/heap/SlotVisitor.h
index 6364b23e4..230ed3334 100644
--- a/Source/JavaScriptCore/heap/SlotVisitor.h
+++ b/Source/JavaScriptCore/heap/SlotVisitor.h
@@ -27,35 +27,52 @@
#define SlotVisitor_h
#include "CopiedSpace.h"
-#include "MarkStack.h"
+#include "HandleTypes.h"
#include "MarkStackInlineMethods.h"
+#include <wtf/text/StringHash.h>
+
namespace JSC {
-class Heap;
+class ConservativeRoots;
class GCThreadSharedData;
+class Heap;
+template<typename T> class WriteBarrierBase;
+template<typename T> class JITWriteBarrier;
+
+class SlotVisitor {
+ WTF_MAKE_NONCOPYABLE(SlotVisitor);
+ friend class HeapRootVisitor; // Allowed to mark a JSValue* or JSCell** directly.
-class SlotVisitor : public MarkStack {
- friend class HeapRootVisitor;
public:
SlotVisitor(GCThreadSharedData&);
+ ~SlotVisitor();
- void donate()
- {
- ASSERT(m_isInParallelMode);
- if (Options::numberOfGCMarkers() == 1)
- return;
-
- donateKnownParallel();
- }
+ void append(ConservativeRoots&);
- void drain();
+ template<typename T> void append(JITWriteBarrier<T>*);
+ template<typename T> void append(WriteBarrierBase<T>*);
+ void appendValues(WriteBarrierBase<Unknown>*, size_t count);
- void donateAndDrain()
- {
- donate();
- drain();
- }
+ template<typename T>
+ void appendUnbarrieredPointer(T**);
+ void appendUnbarrieredValue(JSValue*);
+
+ void addOpaqueRoot(void*);
+ bool containsOpaqueRoot(void*);
+ int opaqueRootCount();
+
+ GCThreadSharedData& sharedData() { return m_shared; }
+ bool isEmpty() { return m_stack.isEmpty(); }
+
+ void setup();
+ void reset();
+
+ size_t visitCount() const { return m_visitCount; }
+
+ void donate();
+ void drain();
+ void donateAndDrain();
enum SharedDrainMode { SlaveDrain, MasterDrain };
void drainFromShared(SharedDrainMode);
@@ -78,19 +95,84 @@ public:
void doneCopying();
+#if ENABLE(SIMPLE_HEAP_PROFILING)
+ VTableSpectrum m_visitedTypeCounts;
+#endif
+
+ void addWeakReferenceHarvester(WeakReferenceHarvester*);
+ void addUnconditionalFinalizer(UnconditionalFinalizer*);
+
+#if ENABLE(OBJECT_MARK_LOGGING)
+ inline void resetChildCount() { m_logChildCount = 0; }
+ inline unsigned childCount() { return m_logChildCount; }
+ inline void incrementChildCount() { m_logChildCount++; }
+#endif
+
private:
+ friend class ParallelModeEnabler;
+
+ JS_EXPORT_PRIVATE static void validate(JSCell*);
+
+ void append(JSValue*);
+ void append(JSValue*, size_t count);
+ void append(JSCell**);
+
+ void internalAppend(JSCell*);
+ void internalAppend(JSValue);
+ void internalAppend(JSValue*);
+
+ JS_EXPORT_PRIVATE void mergeOpaqueRoots();
+ void mergeOpaqueRootsIfNecessary();
+ void mergeOpaqueRootsIfProfitable();
+
void* allocateNewSpaceOrPin(void*, size_t);
void* allocateNewSpaceSlow(size_t);
void donateKnownParallel();
+ MarkStackArray m_stack;
+ HashSet<void*> m_opaqueRoots; // Handle-owning data structures not visible to the garbage collector.
+
+ size_t m_visitCount;
+ bool m_isInParallelMode;
+
+ GCThreadSharedData& m_shared;
+
+ bool m_shouldHashConst; // Local per-thread copy of shared flag for performance reasons
+ typedef HashMap<StringImpl*, JSValue> UniqueStringMap;
+ UniqueStringMap m_uniqueStrings;
+
+#if ENABLE(OBJECT_MARK_LOGGING)
+ unsigned m_logChildCount;
+#endif
+
CopiedAllocator m_copiedAllocator;
+
+public:
+#if !ASSERT_DISABLED
+ bool m_isCheckingForDefaultMarkViolation;
+ bool m_isDraining;
+#endif
};
-inline SlotVisitor::SlotVisitor(GCThreadSharedData& shared)
- : MarkStack(shared)
-{
-}
+class ParallelModeEnabler {
+public:
+ ParallelModeEnabler(SlotVisitor& stack)
+ : m_stack(stack)
+ {
+ ASSERT(!m_stack.m_isInParallelMode);
+ m_stack.m_isInParallelMode = true;
+ }
+
+ ~ParallelModeEnabler()
+ {
+ ASSERT(m_stack.m_isInParallelMode);
+ m_stack.m_isInParallelMode = false;
+ }
+
+private:
+ SlotVisitor& m_stack;
+};
} // namespace JSC
diff --git a/Source/JavaScriptCore/heap/SlotVisitorInlineMethods.h b/Source/JavaScriptCore/heap/SlotVisitorInlineMethods.h
index f02564e10..540da3bc4 100644
--- a/Source/JavaScriptCore/heap/SlotVisitorInlineMethods.h
+++ b/Source/JavaScriptCore/heap/SlotVisitorInlineMethods.h
@@ -27,10 +27,115 @@
#define SlotVisitorInlineMethods_h
#include "CopiedSpaceInlineMethods.h"
+#include "Options.h"
#include "SlotVisitor.h"
namespace JSC {
+ALWAYS_INLINE void SlotVisitor::append(JSValue* slot, size_t count)
+{
+ for (size_t i = 0; i < count; ++i) {
+ JSValue& value = slot[i];
+ internalAppend(value);
+ }
+}
+
+template<typename T>
+inline void SlotVisitor::appendUnbarrieredPointer(T** slot)
+{
+ ASSERT(slot);
+ JSCell* cell = *slot;
+ internalAppend(cell);
+}
+
+ALWAYS_INLINE void SlotVisitor::append(JSValue* slot)
+{
+ ASSERT(slot);
+ internalAppend(*slot);
+}
+
+ALWAYS_INLINE void SlotVisitor::appendUnbarrieredValue(JSValue* slot)
+{
+ ASSERT(slot);
+ internalAppend(*slot);
+}
+
+ALWAYS_INLINE void SlotVisitor::append(JSCell** slot)
+{
+ ASSERT(slot);
+ internalAppend(*slot);
+}
+
+ALWAYS_INLINE void SlotVisitor::internalAppend(JSValue value)
+{
+ if (!value || !value.isCell())
+ return;
+ internalAppend(value.asCell());
+}
+
+inline void SlotVisitor::addWeakReferenceHarvester(WeakReferenceHarvester* weakReferenceHarvester)
+{
+ m_shared.m_weakReferenceHarvesters.addThreadSafe(weakReferenceHarvester);
+}
+
+inline void SlotVisitor::addUnconditionalFinalizer(UnconditionalFinalizer* unconditionalFinalizer)
+{
+ m_shared.m_unconditionalFinalizers.addThreadSafe(unconditionalFinalizer);
+}
+
+inline void SlotVisitor::addOpaqueRoot(void* root)
+{
+#if ENABLE(PARALLEL_GC)
+ if (Options::numberOfGCMarkers() == 1) {
+ // Put directly into the shared HashSet.
+ m_shared.m_opaqueRoots.add(root);
+ return;
+ }
+ // Put into the local set, but merge with the shared one every once in
+ // a while to make sure that the local sets don't grow too large.
+ mergeOpaqueRootsIfProfitable();
+ m_opaqueRoots.add(root);
+#else
+ m_opaqueRoots.add(root);
+#endif
+}
+
+inline bool SlotVisitor::containsOpaqueRoot(void* root)
+{
+ ASSERT(!m_isInParallelMode);
+#if ENABLE(PARALLEL_GC)
+ ASSERT(m_opaqueRoots.isEmpty());
+ return m_shared.m_opaqueRoots.contains(root);
+#else
+ return m_opaqueRoots.contains(root);
+#endif
+}
+
+inline int SlotVisitor::opaqueRootCount()
+{
+ ASSERT(!m_isInParallelMode);
+#if ENABLE(PARALLEL_GC)
+ ASSERT(m_opaqueRoots.isEmpty());
+ return m_shared.m_opaqueRoots.size();
+#else
+ return m_opaqueRoots.size();
+#endif
+}
+
+inline void SlotVisitor::mergeOpaqueRootsIfNecessary()
+{
+ if (m_opaqueRoots.isEmpty())
+ return;
+ mergeOpaqueRoots();
+}
+
+inline void SlotVisitor::mergeOpaqueRootsIfProfitable()
+{
+ if (static_cast<unsigned>(m_opaqueRoots.size()) < Options::opaqueRootMergeThreshold())
+ return;
+ mergeOpaqueRoots();
+}
+
ALWAYS_INLINE bool SlotVisitor::checkIfShouldCopyAndPinOtherwise(void* oldPtr, size_t bytes)
{
if (CopiedSpace::isOversize(bytes)) {
@@ -55,6 +160,21 @@ ALWAYS_INLINE void* SlotVisitor::allocateNewSpace(size_t bytes)
return result;
}
+inline void SlotVisitor::donate()
+{
+ ASSERT(m_isInParallelMode);
+ if (Options::numberOfGCMarkers() == 1)
+ return;
+
+ donateKnownParallel();
+}
+
+inline void SlotVisitor::donateAndDrain()
+{
+ donate();
+ drain();
+}
+
} // namespace JSC
#endif // SlotVisitorInlineMethods_h
diff --git a/Source/JavaScriptCore/interpreter/Interpreter.cpp b/Source/JavaScriptCore/interpreter/Interpreter.cpp
index 87b77d639..358a24096 100644
--- a/Source/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/Source/JavaScriptCore/interpreter/Interpreter.cpp
@@ -4475,50 +4475,43 @@ skip_id_custom_self:
goto vm_throw;
}
DEFINE_OPCODE(op_tear_off_activation) {
- /* tear_off_activation activation(r) arguments(r)
+ /* tear_off_activation activation(r)
Copy locals and named parameters from the register file to the heap.
- Point the bindings in 'activation' and 'arguments' to this new backing
- store. (Note that 'arguments' may not have been created. If created,
- 'arguments' already holds a copy of any extra / unnamed parameters.)
+ Point the bindings in 'activation' to this new backing store.
This opcode appears before op_ret in functions that require full scope chains.
*/
int activation = vPC[1].u.operand;
- int arguments = vPC[2].u.operand;
ASSERT(codeBlock->needsFullScopeChain());
JSValue activationValue = callFrame->r(activation).jsValue();
- if (activationValue) {
+ if (activationValue)
asActivation(activationValue)->tearOff(*globalData);
- if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue())
- asArguments(argumentsValue)->didTearOffActivation(*globalData, asActivation(activationValue));
- } else if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) {
- if (!codeBlock->isStrictMode())
- asArguments(argumentsValue)->tearOff(callFrame);
- }
-
vPC += OPCODE_LENGTH(op_tear_off_activation);
NEXT_INSTRUCTION();
}
DEFINE_OPCODE(op_tear_off_arguments) {
- /* tear_off_arguments arguments(r)
+ /* tear_off_arguments arguments(r) activation(r)
Copy named parameters from the register file to the heap. Point the
- bindings in 'arguments' to this new backing store. (Note that
- 'arguments' may not have been created. If created, 'arguments' already
- holds a copy of any extra / unnamed parameters.)
+ bindings in 'arguments' to this new backing store. (If 'activation'
+ was also copied to the heap, 'arguments' will point to its storage.)
This opcode appears before op_ret in functions that don't require full
scope chains, but do use 'arguments'.
*/
- int src1 = vPC[1].u.operand;
- ASSERT(!codeBlock->needsFullScopeChain() && codeBlock->ownerExecutable()->usesArguments());
-
- if (JSValue arguments = callFrame->r(unmodifiedArgumentsRegister(src1)).jsValue())
- asArguments(arguments)->tearOff(callFrame);
+ int arguments = vPC[1].u.operand;
+ int activation = vPC[2].u.operand;
+ ASSERT(codeBlock->usesArguments());
+ if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) {
+ if (JSValue activationValue = callFrame->r(activation).jsValue())
+ asArguments(argumentsValue)->didTearOffActivation(callFrame->globalData(), asActivation(activationValue));
+ else
+ asArguments(argumentsValue)->tearOff(callFrame);
+ }
vPC += OPCODE_LENGTH(op_tear_off_arguments);
NEXT_INSTRUCTION();
@@ -5112,19 +5105,6 @@ JSValue Interpreter::retrieveArgumentsFromVMCode(CallFrame* callFrame, JSFunctio
if (!functionCallFrame)
return jsNull();
- CodeBlock* codeBlock = functionCallFrame->someCodeBlockForPossiblyInlinedCode();
- if (codeBlock->usesArguments()) {
- ASSERT(codeBlock->codeType() == FunctionCode);
- int argumentsRegister = codeBlock->argumentsRegister();
- int realArgumentsRegister = unmodifiedArgumentsRegister(argumentsRegister);
- if (JSValue arguments = functionCallFrame->uncheckedR(argumentsRegister).jsValue())
- return arguments;
- JSValue arguments = JSValue(Arguments::create(callFrame->globalData(), functionCallFrame));
- functionCallFrame->r(argumentsRegister) = arguments;
- functionCallFrame->r(realArgumentsRegister) = arguments;
- return arguments;
- }
-
Arguments* arguments = Arguments::create(functionCallFrame->globalData(), functionCallFrame);
arguments->tearOff(functionCallFrame);
return JSValue(arguments);
diff --git a/Source/JavaScriptCore/jit/JITInlineMethods.h b/Source/JavaScriptCore/jit/JITInlineMethods.h
index e68ecbe78..3f32597fa 100644
--- a/Source/JavaScriptCore/jit/JITInlineMethods.h
+++ b/Source/JavaScriptCore/jit/JITInlineMethods.h
@@ -422,9 +422,6 @@ template <typename ClassType, bool destructor, typename StructureType> inline vo
// initialize the object's structure
storePtr(structure, Address(result, JSCell::structureOffset()));
- // initialize the object's classInfo pointer
- storePtr(TrustedImmPtr(&ClassType::s_info), Address(result, JSCell::classInfoOffset()));
-
// initialize the object's property storage pointer
storePtr(TrustedImmPtr(0), Address(result, ClassType::offsetOfOutOfLineStorage()));
}
diff --git a/Source/JavaScriptCore/jit/JITOpcodes.cpp b/Source/JavaScriptCore/jit/JITOpcodes.cpp
index 9b7dc634f..f859f8b93 100644
--- a/Source/JavaScriptCore/jit/JITOpcodes.cpp
+++ b/Source/JavaScriptCore/jit/JITOpcodes.cpp
@@ -559,25 +559,23 @@ void JIT::emit_op_construct(Instruction* currentInstruction)
void JIT::emit_op_tear_off_activation(Instruction* currentInstruction)
{
- unsigned activation = currentInstruction[1].u.operand;
- unsigned arguments = currentInstruction[2].u.operand;
- Jump activationCreated = branchTestPtr(NonZero, addressFor(activation));
- Jump argumentsNotCreated = branchTestPtr(Zero, addressFor(arguments));
- activationCreated.link(this);
+ int activation = currentInstruction[1].u.operand;
+ Jump activationNotCreated = branchTestPtr(Zero, addressFor(activation));
JITStubCall stubCall(this, cti_op_tear_off_activation);
stubCall.addArgument(activation, regT2);
- stubCall.addArgument(unmodifiedArgumentsRegister(arguments), regT2);
stubCall.call();
- argumentsNotCreated.link(this);
+ activationNotCreated.link(this);
}
void JIT::emit_op_tear_off_arguments(Instruction* currentInstruction)
{
- unsigned dst = currentInstruction[1].u.operand;
+ int arguments = currentInstruction[1].u.operand;
+ int activation = currentInstruction[2].u.operand;
- Jump argsNotCreated = branchTestPtr(Zero, Address(callFrameRegister, sizeof(Register) * (unmodifiedArgumentsRegister(dst))));
+ Jump argsNotCreated = branchTestPtr(Zero, Address(callFrameRegister, sizeof(Register) * (unmodifiedArgumentsRegister(arguments))));
JITStubCall stubCall(this, cti_op_tear_off_arguments);
- stubCall.addArgument(unmodifiedArgumentsRegister(dst), regT2);
+ stubCall.addArgument(unmodifiedArgumentsRegister(arguments), regT2);
+ stubCall.addArgument(activation, regT2);
stubCall.call();
argsNotCreated.link(this);
}
diff --git a/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp b/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
index c94f5d910..adfb57341 100644
--- a/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
+++ b/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
@@ -703,24 +703,22 @@ void JIT::emit_op_is_string(Instruction* currentInstruction)
void JIT::emit_op_tear_off_activation(Instruction* currentInstruction)
{
unsigned activation = currentInstruction[1].u.operand;
- unsigned arguments = currentInstruction[2].u.operand;
- Jump activationCreated = branch32(NotEqual, tagFor(activation), TrustedImm32(JSValue::EmptyValueTag));
- Jump argumentsNotCreated = branch32(Equal, tagFor(arguments), TrustedImm32(JSValue::EmptyValueTag));
- activationCreated.link(this);
+ Jump activationNotCreated = branch32(Equal, tagFor(activation), TrustedImm32(JSValue::EmptyValueTag));
JITStubCall stubCall(this, cti_op_tear_off_activation);
- stubCall.addArgument(currentInstruction[1].u.operand);
- stubCall.addArgument(unmodifiedArgumentsRegister(currentInstruction[2].u.operand));
+ stubCall.addArgument(activation);
stubCall.call();
- argumentsNotCreated.link(this);
+ activationNotCreated.link(this);
}
void JIT::emit_op_tear_off_arguments(Instruction* currentInstruction)
{
- int dst = currentInstruction[1].u.operand;
+ int arguments = currentInstruction[1].u.operand;
+ int activation = currentInstruction[2].u.operand;
- Jump argsNotCreated = branch32(Equal, tagFor(unmodifiedArgumentsRegister(dst)), TrustedImm32(JSValue::EmptyValueTag));
+ Jump argsNotCreated = branch32(Equal, tagFor(unmodifiedArgumentsRegister(arguments)), TrustedImm32(JSValue::EmptyValueTag));
JITStubCall stubCall(this, cti_op_tear_off_arguments);
- stubCall.addArgument(unmodifiedArgumentsRegister(dst));
+ stubCall.addArgument(unmodifiedArgumentsRegister(arguments));
+ stubCall.addArgument(activation);
stubCall.call();
argsNotCreated.link(this);
}
diff --git a/Source/JavaScriptCore/jit/JITStubs.cpp b/Source/JavaScriptCore/jit/JITStubs.cpp
index 8fc395a63..5fad9c8d7 100644
--- a/Source/JavaScriptCore/jit/JITStubs.cpp
+++ b/Source/JavaScriptCore/jit/JITStubs.cpp
@@ -2311,20 +2311,8 @@ DEFINE_STUB_FUNCTION(void, op_tear_off_activation)
{
STUB_INIT_STACK_FRAME(stackFrame);
- CallFrame* callFrame = stackFrame.callFrame;
- ASSERT(callFrame->codeBlock()->needsFullScopeChain());
- JSValue activationValue = stackFrame.args[0].jsValue();
- if (!activationValue) {
- if (JSValue v = stackFrame.args[1].jsValue()) {
- if (!callFrame->codeBlock()->isStrictMode())
- asArguments(v)->tearOff(callFrame);
- }
- return;
- }
- JSActivation* activation = asActivation(stackFrame.args[0].jsValue());
- activation->tearOff(*stackFrame.globalData);
- if (JSValue v = stackFrame.args[1].jsValue())
- asArguments(v)->didTearOffActivation(*stackFrame.globalData, activation);
+ ASSERT(stackFrame.callFrame->codeBlock()->needsFullScopeChain());
+ jsCast<JSActivation*>(stackFrame.args[0].jsValue())->tearOff(*stackFrame.globalData);
}
DEFINE_STUB_FUNCTION(void, op_tear_off_arguments)
@@ -2332,8 +2320,13 @@ DEFINE_STUB_FUNCTION(void, op_tear_off_arguments)
STUB_INIT_STACK_FRAME(stackFrame);
CallFrame* callFrame = stackFrame.callFrame;
- ASSERT(callFrame->codeBlock()->usesArguments() && !callFrame->codeBlock()->needsFullScopeChain());
- asArguments(stackFrame.args[0].jsValue())->tearOff(callFrame);
+ ASSERT(callFrame->codeBlock()->usesArguments());
+ Arguments* arguments = jsCast<Arguments*>(stackFrame.args[0].jsValue());
+ if (JSValue activationValue = stackFrame.args[1].jsValue()) {
+ arguments->didTearOffActivation(callFrame->globalData(), jsCast<JSActivation*>(activationValue));
+ return;
+ }
+ arguments->tearOff(callFrame);
}
DEFINE_STUB_FUNCTION(void, op_profile_will_call)
diff --git a/Source/JavaScriptCore/jit/JITWriteBarrier.h b/Source/JavaScriptCore/jit/JITWriteBarrier.h
index 81a3653a0..ee73b702f 100644
--- a/Source/JavaScriptCore/jit/JITWriteBarrier.h
+++ b/Source/JavaScriptCore/jit/JITWriteBarrier.h
@@ -29,7 +29,7 @@
#if ENABLE(JIT)
#include "MacroAssembler.h"
-#include "MarkStack.h"
+#include "SlotVisitor.h"
#include "WriteBarrier.h"
namespace JSC {
@@ -135,7 +135,7 @@ public:
}
};
-template<typename T> inline void MarkStack::append(JITWriteBarrier<T>* slot)
+template<typename T> inline void SlotVisitor::append(JITWriteBarrier<T>* slot)
{
internalAppend(slot->get());
}
diff --git a/Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp b/Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp
index 00311dab4..26eae57be 100644
--- a/Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp
+++ b/Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp
@@ -29,6 +29,7 @@
#if ENABLE(JIT)
#include "LinkBuffer.h"
+#include "Options.h"
namespace JSC {
diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
index 1a34a09d4..fa50fedb6 100644
--- a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
+++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
@@ -1454,26 +1454,19 @@ LLINT_SLOW_PATH_DECL(slow_path_tear_off_activation)
{
LLINT_BEGIN();
ASSERT(exec->codeBlock()->needsFullScopeChain());
- JSValue activationValue = LLINT_OP(1).jsValue();
- if (!activationValue) {
- if (JSValue v = exec->uncheckedR(unmodifiedArgumentsRegister(pc[2].u.operand)).jsValue()) {
- if (!exec->codeBlock()->isStrictMode())
- asArguments(v)->tearOff(exec);
- }
- LLINT_END();
- }
- JSActivation* activation = asActivation(activationValue);
- activation->tearOff(globalData);
- if (JSValue v = exec->uncheckedR(unmodifiedArgumentsRegister(pc[2].u.operand)).jsValue())
- asArguments(v)->didTearOffActivation(globalData, activation);
+ jsCast<JSActivation*>(LLINT_OP(1).jsValue())->tearOff(globalData);
LLINT_END();
}
LLINT_SLOW_PATH_DECL(slow_path_tear_off_arguments)
{
LLINT_BEGIN();
- ASSERT(exec->codeBlock()->usesArguments() && !exec->codeBlock()->needsFullScopeChain());
- asArguments(exec->uncheckedR(unmodifiedArgumentsRegister(pc[1].u.operand)).jsValue())->tearOff(exec);
+ ASSERT(exec->codeBlock()->usesArguments());
+ Arguments* arguments = jsCast<Arguments*>(exec->uncheckedR(unmodifiedArgumentsRegister(pc[1].u.operand)).jsValue());
+ if (JSValue activationValue = LLINT_OP_C(2).jsValue())
+ arguments->didTearOffActivation(globalData, jsCast<JSActivation*>(activationValue));
+ else
+ arguments->tearOff(exec);
LLINT_END();
}
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
index db4b71dfd..4c590a1c3 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
@@ -86,9 +86,9 @@ const HashFlags8BitBuffer = 64
# Property storage constants
if JSVALUE64
- const InlineStorageCapacity = 5
-else
const InlineStorageCapacity = 6
+else
+ const InlineStorageCapacity = 7
end
# Allocation constants
@@ -310,7 +310,7 @@ macro functionInitialization(profileArgSkip)
.stackHeightOK:
end
-macro allocateBasicJSObject(sizeClassIndex, classInfoOffset, structure, result, scratch1, scratch2, slowCase)
+macro allocateBasicJSObject(sizeClassIndex, structure, result, scratch1, scratch2, slowCase)
if ALWAYS_ALLOCATE_SLOW
jmp slowCase
else
@@ -338,8 +338,6 @@ macro allocateBasicJSObject(sizeClassIndex, classInfoOffset, structure, result,
storep scratch2, offsetOfMySizeClass + offsetOfFirstFreeCell[scratch1]
# Initialize the object.
- loadp classInfoOffset[scratch1], scratch2
- storep scratch2, [result]
storep structure, JSCell::m_structure[result]
storep 0, JSObject::m_outOfLineStorage[result]
end
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
index b011c5425..103a3f978 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
@@ -352,7 +352,7 @@ _llint_op_create_this:
loadp Callee[cfr], t0
loadp JSFunction::m_cachedInheritorID[t0], t2
btpz t2, .opCreateThisSlow
- allocateBasicJSObject(JSFinalObjectSizeClassIndex, JSGlobalData::jsFinalObjectClassInfo, t2, t0, t1, t3, .opCreateThisSlow)
+ allocateBasicJSObject(JSFinalObjectSizeClassIndex, t2, t0, t1, t3, .opCreateThisSlow)
loadi 4[PC], t1
storei CellTag, TagOffset[cfr, t1, 8]
storei t0, PayloadOffset[cfr, t1, 8]
@@ -384,7 +384,7 @@ _llint_op_new_object:
loadp CodeBlock[cfr], t0
loadp CodeBlock::m_globalObject[t0], t0
loadp JSGlobalObject::m_emptyObjectStructure[t0], t1
- allocateBasicJSObject(JSFinalObjectSizeClassIndex, JSGlobalData::jsFinalObjectClassInfo, t1, t0, t2, t3, .opNewObjectSlow)
+ allocateBasicJSObject(JSFinalObjectSizeClassIndex, t1, t0, t2, t3, .opNewObjectSlow)
loadi 4[PC], t1
storei CellTag, TagOffset[cfr, t1, 8]
storei t0, PayloadOffset[cfr, t1, 8]
@@ -1639,13 +1639,10 @@ end
_llint_op_tear_off_activation:
traceExecution()
loadi 4[PC], t0
- loadi 8[PC], t1
- bineq TagOffset[cfr, t0, 8], EmptyValueTag, .opTearOffActivationCreated
- bieq TagOffset[cfr, t1, 8], EmptyValueTag, .opTearOffActivationNotCreated
-.opTearOffActivationCreated:
+ bieq TagOffset[cfr, t0, 8], EmptyValueTag, .opTearOffActivationNotCreated
callSlowPath(_llint_slow_path_tear_off_activation)
.opTearOffActivationNotCreated:
- dispatch(3)
+ dispatch(2)
_llint_op_tear_off_arguments:
@@ -1655,7 +1652,7 @@ _llint_op_tear_off_arguments:
bieq TagOffset[cfr, t0, 8], EmptyValueTag, .opTearOffArgumentsNotCreated
callSlowPath(_llint_slow_path_tear_off_arguments)
.opTearOffArgumentsNotCreated:
- dispatch(2)
+ dispatch(3)
_llint_op_ret:
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
index d429542e7..4bb7b8e1c 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
@@ -236,7 +236,7 @@ _llint_op_create_this:
loadp Callee[cfr], t0
loadp JSFunction::m_cachedInheritorID[t0], t2
btpz t2, .opCreateThisSlow
- allocateBasicJSObject(JSFinalObjectSizeClassIndex, JSGlobalData::jsFinalObjectClassInfo, t2, t0, t1, t3, .opCreateThisSlow)
+ allocateBasicJSObject(JSFinalObjectSizeClassIndex, t2, t0, t1, t3, .opCreateThisSlow)
loadis 8[PB, PC, 8], t1
storep t0, [cfr, t1, 8]
dispatch(2)
@@ -267,7 +267,7 @@ _llint_op_new_object:
loadp CodeBlock[cfr], t0
loadp CodeBlock::m_globalObject[t0], t0
loadp JSGlobalObject::m_emptyObjectStructure[t0], t1
- allocateBasicJSObject(JSFinalObjectSizeClassIndex, JSGlobalData::jsFinalObjectClassInfo, t1, t0, t2, t3, .opNewObjectSlow)
+ allocateBasicJSObject(JSFinalObjectSizeClassIndex, t1, t0, t2, t3, .opNewObjectSlow)
loadis 8[PB, PC, 8], t1
storep t0, [cfr, t1, 8]
dispatch(2)
@@ -1483,13 +1483,10 @@ end
_llint_op_tear_off_activation:
traceExecution()
loadis 8[PB, PC, 8], t0
- loadis 16[PB, PC, 8], t1
- btpnz [cfr, t0, 8], .opTearOffActivationCreated
- btpz [cfr, t1, 8], .opTearOffActivationNotCreated
-.opTearOffActivationCreated:
+ btpz [cfr, t0, 8], .opTearOffActivationNotCreated
callSlowPath(_llint_slow_path_tear_off_activation)
.opTearOffActivationNotCreated:
- dispatch(3)
+ dispatch(2)
_llint_op_tear_off_arguments:
@@ -1499,7 +1496,7 @@ _llint_op_tear_off_arguments:
btpz [cfr, t0, 8], .opTearOffArgumentsNotCreated
callSlowPath(_llint_slow_path_tear_off_arguments)
.opTearOffArgumentsNotCreated:
- dispatch(2)
+ dispatch(3)
_llint_op_ret:
diff --git a/Source/JavaScriptCore/offlineasm/armv7.rb b/Source/JavaScriptCore/offlineasm/armv7.rb
index 6595fdc71..eb9472af3 100644
--- a/Source/JavaScriptCore/offlineasm/armv7.rb
+++ b/Source/JavaScriptCore/offlineasm/armv7.rb
@@ -527,8 +527,8 @@ def armV7LowerMisplacedAddresses(list)
node.opcode,
armV7AsRegisters(newList, postInstructions, node.operands, "i"),
annotation)
- when "bbeq", "bbneq", "bba", "bbaeq", "bbb", "bbbeq", "btbo", "btbz", "btbnz", "tbz", "tbnz",
- "tbo", "cbeq", "cbneq", "cba", "cbaeq", "cbb", "cbbeq"
+ when "bbeq", "bbneq", "bba", "bbaeq", "bbb", "bbbeq", "btbz", "btbnz", "tbz", "tbnz",
+ "cbeq", "cbneq", "cba", "cbaeq", "cbb", "cbbeq"
newList << Instruction.new(node.codeOrigin,
node.opcode,
armV7AsRegisters(newList, postInstructions, node.operands, "b"),
@@ -579,8 +579,8 @@ def armV7LowerRegisterReuse(list)
case node.opcode
when "cieq", "cineq", "cia", "ciaeq", "cib", "cibeq", "cigt", "cigteq", "cilt", "cilteq",
"cpeq", "cpneq", "cpa", "cpaeq", "cpb", "cpbeq", "cpgt", "cpgteq", "cplt", "cplteq",
- "tio", "tis", "tiz", "tinz", "tbo", "tbs", "tbz", "tbnz", "tpo", "tps", "tpz", "tpnz",
- "cbeq", "cbneq", "cba", "cbaeq", "cbb", "cbbeq", "cbgt", "cbgteq", "cblt", "cblteq"
+ "tis", "tiz", "tinz", "tbs", "tbz", "tbnz", "tps", "tpz", "tpnz", "cbeq", "cbneq",
+ "cba", "cbaeq", "cbb", "cbbeq", "cbgt", "cbgteq", "cblt", "cblteq"
if node.operands.size == 2
if node.operands[0] == node.operands[1]
tmp = Tmp.new(node.codeOrigin, :gpr)
@@ -940,9 +940,6 @@ class Instruction
when "btinz", "btpnz", "btbnz"
emitArmV7Test(operands)
$asm.puts "bne #{operands[-1].asmLabel}"
- when "btio", "btpo", "btbo"
- emitArmV7Test(operands)
- $asm.puts "bvs #{operands[-1].asmLabel}"
when "btis", "btps", "btbs"
emitArmV7Test(operands)
$asm.puts "bmi #{operands[-1].asmLabel}"
@@ -982,8 +979,6 @@ class Instruction
emitArmV7Compare(operands, "lt")
when "cilteq", "cplteq", "cblteq"
emitArmV7Compare(operands, "le")
- when "tio", "tbo", "tpo"
- emitArmV7TestSet(operands, "vs")
when "tis", "tbs", "tps"
emitArmV7TestSet(operands, "mi")
when "tiz", "tbz", "tpz"
diff --git a/Source/JavaScriptCore/offlineasm/instructions.rb b/Source/JavaScriptCore/offlineasm/instructions.rb
index 211c10933..d046bee6f 100644
--- a/Source/JavaScriptCore/offlineasm/instructions.rb
+++ b/Source/JavaScriptCore/offlineasm/instructions.rb
@@ -107,11 +107,9 @@ MACRO_INSTRUCTIONS =
"bbgteq",
"bblt",
"bblteq",
- "btio",
"btis",
"btiz",
"btinz",
- "btbo",
"btbs",
"btbz",
"btbnz",
@@ -155,15 +153,12 @@ MACRO_INSTRUCTIONS =
"cigteq",
"cilt",
"cilteq",
- "tio",
"tis",
"tiz",
"tinz",
- "tbo",
"tbs",
"tbz",
"tbnz",
- "tpo",
"tps",
"tpz",
"tpnz",
@@ -197,7 +192,6 @@ MACRO_INSTRUCTIONS =
"cplt",
"cplteq",
"storep",
- "btpo",
"btps",
"btpz",
"btpnz",
diff --git a/Source/JavaScriptCore/offlineasm/x86.rb b/Source/JavaScriptCore/offlineasm/x86.rb
index cebc83326..033c200d7 100644
--- a/Source/JavaScriptCore/offlineasm/x86.rb
+++ b/Source/JavaScriptCore/offlineasm/x86.rb
@@ -835,10 +835,6 @@ class Instruction
handleX86IntBranch("jl", :byte)
when "bblteq"
handleX86IntBranch("jlteq", :byte)
- when "btio"
- handleX86BranchTest("jo", :int)
- when "btpo"
- handleX86BranchTest("jo", :ptr)
when "btis"
handleX86BranchTest("js", :int)
when "btps"
@@ -851,8 +847,6 @@ class Instruction
handleX86BranchTest("jnz", :int)
when "btpnz"
handleX86BranchTest("jnz", :ptr)
- when "btbo"
- handleX86BranchTest("jo", :byte)
when "btbs"
handleX86BranchTest("js", :byte)
when "btbz"
@@ -967,24 +961,18 @@ class Instruction
handleX86IntCompareSet("setle", :byte)
when "cplteq"
handleX86IntCompareSet("setle", :ptr)
- when "tio"
- handleX86SetTest("seto", :int)
when "tis"
handleX86SetTest("sets", :int)
when "tiz"
handleX86SetTest("setz", :int)
when "tinz"
handleX86SetTest("setnz", :int)
- when "tpo"
- handleX86SetTest("seto", :ptr)
when "tps"
handleX86SetTest("sets", :ptr)
when "tpz"
handleX86SetTest("setz", :ptr)
when "tpnz"
handleX86SetTest("setnz", :ptr)
- when "tbo"
- handleX86SetTest("seto", :byte)
when "tbs"
handleX86SetTest("sets", :byte)
when "tbz"
diff --git a/Source/JavaScriptCore/runtime/JSCell.h b/Source/JavaScriptCore/runtime/JSCell.h
index ef06b1ecf..a63e08e33 100644
--- a/Source/JavaScriptCore/runtime/JSCell.h
+++ b/Source/JavaScriptCore/runtime/JSCell.h
@@ -30,6 +30,7 @@
#include "JSLock.h"
#include "JSValueInlineMethods.h"
#include "SlotVisitor.h"
+#include "SlotVisitorInlineMethods.h"
#include "WriteBarrier.h"
#include <wtf/Noncopyable.h>
@@ -108,7 +109,6 @@ namespace JSC {
// Object operations, with the toObject operation included.
const ClassInfo* classInfo() const;
- const ClassInfo* validatedClassInfo() const;
const MethodTable* methodTable() const;
static void put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&);
static void putByIndex(JSCell*, ExecState*, unsigned propertyName, JSValue, bool shouldThrow);
@@ -133,11 +133,6 @@ namespace JSC {
return OBJECT_OFFSETOF(JSCell, m_structure);
}
- static ptrdiff_t classInfoOffset()
- {
- return OBJECT_OFFSETOF(JSCell, m_classInfo);
- }
-
void* structureAddress()
{
return &m_structure;
@@ -170,7 +165,6 @@ namespace JSC {
private:
friend class LLIntOffsetsExtractor;
- const ClassInfo* m_classInfo;
WriteBarrier<Structure> m_structure;
};
diff --git a/Source/JavaScriptCore/runtime/JSObject.h b/Source/JavaScriptCore/runtime/JSObject.h
index f4b847b4c..5e2c12f2f 100644
--- a/Source/JavaScriptCore/runtime/JSObject.h
+++ b/Source/JavaScriptCore/runtime/JSObject.h
@@ -346,9 +346,6 @@ namespace JSC {
Structure* createInheritorID(JSGlobalData&);
StorageBarrier m_outOfLineStorage;
-#if USE(JSVALUE32_64)
- void* m_padding;
-#endif
};
diff --git a/Source/JavaScriptCore/runtime/PropertyOffset.h b/Source/JavaScriptCore/runtime/PropertyOffset.h
index 511c5e334..aa82eb468 100644
--- a/Source/JavaScriptCore/runtime/PropertyOffset.h
+++ b/Source/JavaScriptCore/runtime/PropertyOffset.h
@@ -34,9 +34,9 @@
namespace JSC {
#if USE(JSVALUE32_64)
-#define INLINE_STORAGE_CAPACITY 6
+#define INLINE_STORAGE_CAPACITY 7
#else
-#define INLINE_STORAGE_CAPACITY 5
+#define INLINE_STORAGE_CAPACITY 6
#endif
typedef int PropertyOffset;
diff --git a/Source/JavaScriptCore/runtime/Structure.h b/Source/JavaScriptCore/runtime/Structure.h
index 57368bee8..73ec0789e 100644
--- a/Source/JavaScriptCore/runtime/Structure.h
+++ b/Source/JavaScriptCore/runtime/Structure.h
@@ -460,7 +460,7 @@ namespace JSC {
ASSERT(!heap.globalData()->isInitializingObject());
heap.globalData()->setInitializingObjectClass(&Structure::s_info);
#endif
- JSCell* result = static_cast<JSCell*>(heap.allocateStructure());
+ JSCell* result = static_cast<JSCell*>(heap.allocateStructure(sizeof(Structure)));
result->clearStructure();
return result;
}
@@ -554,17 +554,7 @@ namespace JSC {
m_structure.set(globalData, this, structure);
}
- inline const ClassInfo* JSCell::validatedClassInfo() const
- {
-#if ENABLE(GC_VALIDATION)
- ASSERT(m_structure.unvalidatedGet()->classInfo() == m_classInfo);
-#else
- ASSERT(m_structure->classInfo() == m_classInfo);
-#endif
- return m_classInfo;
- }
-
- ALWAYS_INLINE void MarkStack::internalAppend(JSCell* cell)
+ ALWAYS_INLINE void SlotVisitor::internalAppend(JSCell* cell)
{
ASSERT(!m_isCheckingForDefaultMarkViolation);
if (!cell)
@@ -603,8 +593,7 @@ namespace JSC {
}
inline JSCell::JSCell(JSGlobalData& globalData, Structure* structure)
- : m_classInfo(structure->classInfo())
- , m_structure(globalData, this, structure)
+ : m_structure(globalData, this, structure)
{
}
@@ -616,7 +605,6 @@ namespace JSC {
if (structure)
#endif
m_structure.setEarlyValue(globalData, this, structure);
- m_classInfo = structure->classInfo();
// Very first set of allocations won't have a real structure.
ASSERT(m_structure || !globalData.structureStructure);
}
diff --git a/Source/JavaScriptCore/runtime/WriteBarrier.h b/Source/JavaScriptCore/runtime/WriteBarrier.h
index 9784a921e..ef8c3aff8 100644
--- a/Source/JavaScriptCore/runtime/WriteBarrier.h
+++ b/Source/JavaScriptCore/runtime/WriteBarrier.h
@@ -225,14 +225,14 @@ template <typename U, typename V> inline bool operator==(const WriteBarrierBase<
return lhs.get() == rhs.get();
}
-// MarkStack functions
+// SlotVisitor functions
-template<typename T> inline void MarkStack::append(WriteBarrierBase<T>* slot)
+template<typename T> inline void SlotVisitor::append(WriteBarrierBase<T>* slot)
{
internalAppend(*slot->slot());
}
-ALWAYS_INLINE void MarkStack::appendValues(WriteBarrierBase<Unknown>* barriers, size_t count)
+ALWAYS_INLINE void SlotVisitor::appendValues(WriteBarrierBase<Unknown>* barriers, size_t count)
{
append(barriers->slot(), count);
}
diff --git a/Source/JavaScriptCore/shell/PlatformEfl.cmake b/Source/JavaScriptCore/shell/PlatformEfl.cmake
index 53755727b..22fe20a8e 100644
--- a/Source/JavaScriptCore/shell/PlatformEfl.cmake
+++ b/Source/JavaScriptCore/shell/PlatformEfl.cmake
@@ -3,7 +3,3 @@ LIST(APPEND JSC_LIBRARIES
${ECORE_LIBRARIES}
${CMAKE_DL_LIBS}
)
-
-LIST(APPEND JSC_LINK_FLAGS
- ${ECORE_LDFLAGS}
-)
diff --git a/Source/JavaScriptCore/tests/mozilla/js1_4/Functions/function-001.js b/Source/JavaScriptCore/tests/mozilla/js1_4/Functions/function-001.js
index c1e6a3df1..fd2ceb0c3 100644
--- a/Source/JavaScriptCore/tests/mozilla/js1_4/Functions/function-001.js
+++ b/Source/JavaScriptCore/tests/mozilla/js1_4/Functions/function-001.js
@@ -82,7 +82,7 @@
SECTION,
"return function.arguments when function contains an arguments property",
"PASS",
- TestFunction_4( "F", "A", "I", "L" ) +"");
+ TestFunction_4( "P", "A", "S", "S" ) +"");
test();
@@ -100,7 +100,7 @@
}
function TestFunction_4( a, b, c, d, e ) {
- var arguments = "PASS";
- return TestFunction_4.arguments;
+ var arguments = "FAIL";
+ return Array.prototype.join.call(TestFunction_4.arguments, "");
}
diff --git a/Source/JavaScriptCore/yarr/YarrJIT.cpp b/Source/JavaScriptCore/yarr/YarrJIT.cpp
index ee6e39753..ce84e2c74 100644
--- a/Source/JavaScriptCore/yarr/YarrJIT.cpp
+++ b/Source/JavaScriptCore/yarr/YarrJIT.cpp
@@ -28,6 +28,7 @@
#include <wtf/ASCIICType.h>
#include "LinkBuffer.h"
+#include "Options.h"
#include "Yarr.h"
#include "YarrCanonicalizeUCS2.h"
diff --git a/Source/Platform/ChangeLog b/Source/Platform/ChangeLog
index 6e913e781..240d932cf 100644
--- a/Source/Platform/ChangeLog
+++ b/Source/Platform/ChangeLog
@@ -1,3 +1,39 @@
+2012-09-11 Zach Kuznia <zork@chromium.org>
+
+ Fix FilterTypeZoom to properly call canvas->restore()
+ https://bugs.webkit.org/show_bug.cgi?id=96082
+
+ Reviewed by Adrienne Walker.
+
+ Fix zoom filter to properly indicate that it affects pixels.
+
+ * chromium/src/WebFilterOperations.cpp:
+ (WebKit::WebFilterOperations::hasFilterThatMovesPixels):
+ (WebKit::WebFilterOperations::hasFilterThatAffectsOpacity):
+
+2012-09-11 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: add RTCPeerConnection::onnegotiationneeded
+ https://bugs.webkit.org/show_bug.cgi?id=96097
+
+ Reviewed by Adam Barth.
+
+ * chromium/public/WebRTCPeerConnectionHandlerClient.h:
+ (WebRTCPeerConnectionHandlerClient):
+
+2012-09-10 Adrienne Walker <enne@google.com>
+
+ [chromium] Fix deadlock between WebMediaPlayerClientImpl dtor and PutCurrentFrame
+ https://bugs.webkit.org/show_bug.cgi?id=96010
+
+ Reviewed by James Robinson.
+
+ Add some additional clarifying comments.
+
+ * chromium/public/WebVideoFrameProvider.h:
+ (Client):
+ (WebVideoFrameProvider):
+
2012-09-10 Tommy Widenflycht <tommyw@google.com>
[chromium] MediaStream API: Remove the Descriptor postfix
diff --git a/Source/Platform/chromium/public/WebRTCPeerConnectionHandlerClient.h b/Source/Platform/chromium/public/WebRTCPeerConnectionHandlerClient.h
index 815981d87..316ce5c30 100644
--- a/Source/Platform/chromium/public/WebRTCPeerConnectionHandlerClient.h
+++ b/Source/Platform/chromium/public/WebRTCPeerConnectionHandlerClient.h
@@ -58,6 +58,7 @@ public:
virtual ~WebRTCPeerConnectionHandlerClient() { }
+ virtual void negotiationNeeded() = 0;
virtual void didGenerateICECandidate(const WebRTCICECandidate&) = 0;
virtual void didChangeReadyState(ReadyState) = 0;
virtual void didChangeICEState(ICEState) = 0;
diff --git a/Source/Platform/chromium/public/WebVideoFrameProvider.h b/Source/Platform/chromium/public/WebVideoFrameProvider.h
index 4d656a268..24552e802 100644
--- a/Source/Platform/chromium/public/WebVideoFrameProvider.h
+++ b/Source/Platform/chromium/public/WebVideoFrameProvider.h
@@ -46,7 +46,8 @@ public:
class Client {
public:
// Provider will call this method to tell the client to stop using it.
- // stopUsingProvider() may be called from any thread.
+ // stopUsingProvider() may be called from any thread. The client should
+ // block until it has putCurrentFrame any outstanding frames.
virtual void stopUsingProvider() = 0;
// Notifies the provider's client that a call to getCurrentFrame() will return new data.
@@ -57,17 +58,20 @@ public:
virtual void didUpdateMatrix(const float*) = 0;
};
- // May be called from any thread.
+ // May be called from any thread, but there must be some external guarantee
+ // that the provider is not destroyed before this call returns.
virtual void setVideoFrameProviderClient(Client*) = 0;
// This function places a lock on the current frame and returns a pointer to it.
// Calls to this method should always be followed with a call to putCurrentFrame().
// The ownership of the object is not transferred to the caller and
- // the caller should not free the returned object.
+ // the caller should not free the returned object. Only the current provider
+ // client should call this function.
virtual WebVideoFrame* getCurrentFrame() = 0;
// This function releases the lock on the video frame in chromium. It should
// always be called after getCurrentFrame(). Frames passed into this method
- // should no longer be referenced after the call is made.
+ // should no longer be referenced after the call is made. Only the current
+ // provider client should call this function.
virtual void putCurrentFrame(WebVideoFrame*) = 0;
};
diff --git a/Source/Platform/chromium/src/WebFilterOperations.cpp b/Source/Platform/chromium/src/WebFilterOperations.cpp
index 882d5a1e8..d724d5316 100644
--- a/Source/Platform/chromium/src/WebFilterOperations.cpp
+++ b/Source/Platform/chromium/src/WebFilterOperations.cpp
@@ -116,6 +116,7 @@ bool WebFilterOperations::hasFilterThatMovesPixels() const
switch (op.type()) {
case WebFilterOperation::FilterTypeBlur:
case WebFilterOperation::FilterTypeDropShadow:
+ case WebFilterOperation::FilterTypeZoom:
return true;
default:
break;
@@ -132,6 +133,7 @@ bool WebFilterOperations::hasFilterThatAffectsOpacity() const
case WebFilterOperation::FilterTypeOpacity:
case WebFilterOperation::FilterTypeBlur:
case WebFilterOperation::FilterTypeDropShadow:
+ case WebFilterOperation::FilterTypeZoom:
return true;
case WebFilterOperation::FilterTypeColorMatrix: {
const SkScalar* matrix = op.matrix();
diff --git a/Source/QtWebKit.pro b/Source/QtWebKit.pro
index b10c7acf4..b15862556 100644
--- a/Source/QtWebKit.pro
+++ b/Source/QtWebKit.pro
@@ -10,10 +10,10 @@ CONFIG += ordered
api.file = api.pri
SUBDIRS += api
-!no_webkit2 {
+build?(webkit2) {
webprocess.file = WebKit2/WebProcess.pro
SUBDIRS += webprocess
- contains(DEFINES, ENABLE_PLUGIN_PROCESS=1) {
+ enable?(PLUGIN_PROCESS) {
pluginprocess.file = WebKit2/PluginProcess.pro
SUBDIRS += pluginprocess
}
@@ -23,10 +23,10 @@ include(WebKit/qt/docs/docs.pri)
declarative.file = WebKit/qt/declarative/declarative.pro
declarative.makefile = Makefile.declarative
-contains(DEFINES, HAVE_QTQUICK=1): SUBDIRS += declarative
+have?(QTQUICK): SUBDIRS += declarative
-!no_webkit1 {
- contains(DEFINES, HAVE_QTTESTLIB=1) {
+build?(webkit1) {
+ build?(tests) {
tests.file = tests.pri
SUBDIRS += tests
}
diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog
index cf4eada78..e07e85b7d 100644
--- a/Source/WTF/ChangeLog
+++ b/Source/WTF/ChangeLog
@@ -1,3 +1,131 @@
+2012-09-11 Adrienne Walker <enne@google.com>
+
+ Clang doesn't optimize away undefined OwnPtr copy constructor
+ https://bugs.webkit.org/show_bug.cgi?id=74625
+
+ Reviewed by Anders Carlsson.
+
+ Original patch by Anders Carlsson, with a minor edit.
+
+ The publicly declared-but-not-defined copy constructor is a compiler
+ optimization-dependent landmine. Clang often fails to optimize the use
+ of this function out, leading to internal linkage errors for the missing
+ definition. gcc doesn't have this problem and optimizes that function
+ out, leading to code that inconsistently fails to link across platforms.
+
+ As a partial fix for this problem, on any compiler that supports C++11
+ move semantics, replace the bogus copy constructor with the move
+ constructors. In the future, if all compilers support this, then the
+ copy constructor can be removed.
+
+ This still leaves other compilers that don't support move semantics
+ like Visual Studio vulnerable to linking inconsistencies.
+
+ * wtf/OwnPtr.h:
+ (OwnPtr):
+ (WTF):
+ (WTF::::OwnPtr):
+ (WTF::=):
+
+2012-09-11 Raphael Kubo da Costa <rakuco@webkit.org>
+
+ [EFL] Rewrite the EFL-related Find modules
+ https://bugs.webkit.org/show_bug.cgi?id=95237
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * CMakeLists.txt: Stop setting the LINK_FLAGS property.
+ * PlatformEfl.cmake: Add libraries and include directories for
+ each Enlightenment Foundation Library used by the port.
+
+2012-09-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Add a configure step to the Qt build system
+
+ This allows building the Qt port using just 'qmake WebKit.pro'. Using
+ the build-webkit script is still supported, and will add slightly more
+ logic to the build, such as detecting the need for clean or incremental
+ builds.
+
+ Internally, the build system now uses a new variable, WEBKIT_CONFIG, for
+ all things related to configuring the build, such as use/have/enable flags,
+ and these are translated to defines in default_post. Project files should
+ no longer check contains(DEFINES,...) to detect features, but use the new
+ enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2
+ options have been translated into WEBKIT_CONFIG options as well, and can
+ be checked using build?().
+
+ Reviewed by Simon Hausmann.
+
+ * WTF.pri:
+ * wtf/Platform.h:
+
+2012-09-10 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: NMI: move MemoryInstrumentation.h to wtf
+ https://bugs.webkit.org/show_bug.cgi?id=96356
+
+ Reviewed by Yury Semikhatsky.
+
+ It is necessary step because it helps us to remove dependency between platform and WebCore.
+
+ * GNUmakefile.list.am:
+ * WTF.gypi:
+ * WTF.pro:
+ * WTF.vcproj/WTF.vcproj:
+ * WTF.xcodeproj/project.pbxproj:
+ * wtf/MemoryInstrumentation.h: Renamed from Source/WebCore/dom/MemoryInstrumentation.h.
+ (WebCore):
+ (GenericMemoryTypes):
+ (MemoryInstrumentationTraits):
+ (MemoryInstrumentation):
+ (WebCore::MemoryInstrumentation::~MemoryInstrumentation):
+ (WebCore::MemoryInstrumentation::addRootObject):
+ (InstrumentedPointerBase):
+ (WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase):
+ (InstrumentedPointer):
+ (WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer):
+ (WebCore::MemoryInstrumentation::addObject):
+ (WebCore::MemoryInstrumentation::addInstrumentedObject):
+ (WebCore::MemoryInstrumentation::addRawBuffer):
+ (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedObject):
+ (WebCore::MemoryInstrumentation::OwningTraits::addObject):
+ (WebCore::MemoryInstrumentationTraits::addInstrumentedObject):
+ (WebCore::MemoryInstrumentationTraits::addObject):
+ (MemoryObjectInfo):
+ (WebCore::MemoryObjectInfo::MemoryObjectInfo):
+ (WebCore::MemoryObjectInfo::objectType):
+ (WebCore::MemoryObjectInfo::objectSize):
+ (WebCore::MemoryObjectInfo::memoryInstrumentation):
+ (WebCore::MemoryObjectInfo::reportObjectInfo):
+ (MemoryClassInfo):
+ (WebCore::MemoryClassInfo::MemoryClassInfo):
+ (WebCore::MemoryClassInfo::addInstrumentedMember):
+ (WebCore::MemoryClassInfo::addMember):
+ (WebCore::MemoryClassInfo::addHashMap):
+ (WebCore::MemoryClassInfo::addHashSet):
+ (WebCore::MemoryClassInfo::addHashCountedSet):
+ (WebCore::MemoryClassInfo::addInstrumentedHashSet):
+ (WebCore::MemoryClassInfo::addInstrumentedVector):
+ (WebCore::MemoryClassInfo::addInstrumentedVectorPtr):
+ (WebCore::MemoryClassInfo::addInstrumentedMapEntries):
+ (WebCore::MemoryClassInfo::addInstrumentedMapValues):
+ (WebCore::MemoryClassInfo::addListHashSet):
+ (WebCore::MemoryClassInfo::addVector):
+ (WebCore::MemoryClassInfo::addVectorPtr):
+ (WebCore::MemoryClassInfo::addRawBuffer):
+ (WebCore::MemoryInstrumentation::addInstrumentedObjectImpl):
+ (WebCore::MemoryInstrumentation::addObjectImpl):
+ (WebCore::MemoryInstrumentation::addHashMap):
+ (WebCore::MemoryInstrumentation::addHashSet):
+ (WebCore::MemoryInstrumentation::addInstrumentedCollection):
+ (WebCore::MemoryInstrumentation::addInstrumentedMapEntries):
+ (WebCore::MemoryInstrumentation::addInstrumentedMapValues):
+ (WebCore::MemoryInstrumentation::addListHashSet):
+ (WebCore::MemoryInstrumentation::addVector):
+ (WebCore::MemoryInstrumentation::calculateContainerSize):
+ (WebCore::::process):
+
2012-09-09 Mark Lam <mark.lam@apple.com>
Fixed ASSERT() and ASSERT_AT() macros so that they can be used in
diff --git a/Source/WTF/GNUmakefile.list.am b/Source/WTF/GNUmakefile.list.am
index a40803455..e8e42edd3 100644
--- a/Source/WTF/GNUmakefile.list.am
+++ b/Source/WTF/GNUmakefile.list.am
@@ -79,6 +79,7 @@ wtf_sources += \
Source/WTF/wtf/MathExtras.h \
Source/WTF/wtf/MediaTime.h \
Source/WTF/wtf/MediaTime.cpp \
+ Source/WTF/wtf/MemoryInstrumentation.h \
Source/WTF/wtf/MessageQueue.h \
Source/WTF/wtf/MetaAllocator.cpp \
Source/WTF/wtf/MetaAllocator.h \
diff --git a/Source/WTF/WTF.gypi b/Source/WTF/WTF.gypi
index cdc73fd45..5dcd01ed7 100644
--- a/Source/WTF/WTF.gypi
+++ b/Source/WTF/WTF.gypi
@@ -49,6 +49,7 @@
'wtf/MD5.h',
'wtf/MainThread.h',
'wtf/MathExtras.h',
+ 'wtf/MemoryInstrumentation.h',
'wtf/MessageQueue.h',
'wtf/NonCopyingSort.h',
'wtf/Noncopyable.h',
diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri
index 9e9493301..bcfb491a4 100644
--- a/Source/WTF/WTF.pri
+++ b/Source/WTF/WTF.pri
@@ -22,7 +22,7 @@ mac {
}
}
-linux-*:contains(DEFINES, WTF_USE_GSTREAMER=1) {
+linux-*:use?(GSTREAMER) {
DEFINES += ENABLE_GLIB_SUPPORT=1
PKGCONFIG += glib-2.0 gio-2.0
}
diff --git a/Source/WTF/WTF.pro b/Source/WTF/WTF.pro
index 5d6a6e54f..789e49bfa 100644
--- a/Source/WTF/WTF.pro
+++ b/Source/WTF/WTF.pro
@@ -81,6 +81,7 @@ HEADERS += \
MathExtras.h \
MD5.h \
MediaTime.h \
+ MemoryInstrumentation.h \
MessageQueue.h \
MetaAllocator.h \
MetaAllocatorHandle.h \
diff --git a/Source/WTF/WTF.vcproj/WTF.vcproj b/Source/WTF/WTF.vcproj/WTF.vcproj
index 789a2546d..4ec3e5544 100644
--- a/Source/WTF/WTF.vcproj/WTF.vcproj
+++ b/Source/WTF/WTF.vcproj/WTF.vcproj
@@ -901,6 +901,10 @@
>
</File>
<File
+ RelativePath="..\wtf\MemoryInstrumentation.h"
+ >
+ </File>
+ <File
RelativePath="..\wtf\MessageQueue.h"
>
</File>
diff --git a/Source/WTF/WTF.xcodeproj/project.pbxproj b/Source/WTF/WTF.xcodeproj/project.pbxproj
index d236bd77c..750b61749 100644
--- a/Source/WTF/WTF.xcodeproj/project.pbxproj
+++ b/Source/WTF/WTF.xcodeproj/project.pbxproj
@@ -16,6 +16,7 @@
2CCD892A15C0390200285083 /* GregorianDateTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD892915C0390200285083 /* GregorianDateTime.cpp */; };
4330F38F15745B0500AAFA8F /* URLString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4330F38E15745B0500AAFA8F /* URLString.cpp */; };
4F0321BC156AA8D1006EBAF6 /* BitArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F0321BB156AA8D1006EBAF6 /* BitArray.h */; };
+ 4F1D115415FF11BE0026E908 /* MemoryInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F1D115315FF11BE0026E908 /* MemoryInstrumentation.h */; };
8134013815B092FD001FF0B8 /* Base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8134013615B092FD001FF0B8 /* Base64.cpp */; };
8134013915B092FD001FF0B8 /* Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8134013715B092FD001FF0B8 /* Base64.h */; };
A876DBD8151816E500DADB95 /* Platform.h in Headers */ = {isa = PBXBuildFile; fileRef = A876DBD7151816E500DADB95 /* Platform.h */; };
@@ -262,6 +263,7 @@
2CCD892915C0390200285083 /* GregorianDateTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GregorianDateTime.cpp; sourceTree = "<group>"; };
4330F38E15745B0500AAFA8F /* URLString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLString.cpp; sourceTree = "<group>"; };
4F0321BB156AA8D1006EBAF6 /* BitArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitArray.h; sourceTree = "<group>"; };
+ 4F1D115315FF11BE0026E908 /* MemoryInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryInstrumentation.h; sourceTree = "<group>"; };
5D247B6214689B8600E78B76 /* libWTF.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libWTF.a; sourceTree = BUILT_PRODUCTS_DIR; };
5D247B6E14689C4700E78B76 /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
5D247B6F14689C4700E78B76 /* CompilerVersion.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = CompilerVersion.xcconfig; sourceTree = "<group>"; };
@@ -647,6 +649,7 @@
A8A472CB151A825B004123FF /* MD5.h */,
CD5497AA15857D0300B5BC30 /* MediaTime.cpp */,
CD5497AB15857D0300B5BC30 /* MediaTime.h */,
+ 4F1D115315FF11BE0026E908 /* MemoryInstrumentation.h */,
A8A472CC151A825B004123FF /* MessageQueue.h */,
A8A472CD151A825B004123FF /* MetaAllocator.cpp */,
A8A472CE151A825B004123FF /* MetaAllocator.h */,
@@ -1070,6 +1073,7 @@
A8A47480151A825B004123FF /* VMTags.h in Headers */,
A8A47446151A825B004123FF /* WTFString.h in Headers */,
A8A47487151A825B004123FF /* WTFThreadData.h in Headers */,
+ 4F1D115415FF11BE0026E908 /* MemoryInstrumentation.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Source/WTF/wtf/CMakeLists.txt b/Source/WTF/wtf/CMakeLists.txt
index 679b20e96..847807f21 100644
--- a/Source/WTF/wtf/CMakeLists.txt
+++ b/Source/WTF/wtf/CMakeLists.txt
@@ -217,7 +217,3 @@ ADD_DEFINITIONS(-DBUILDING_WTF)
ADD_LIBRARY(${WTF_LIBRARY_NAME} STATIC ${WTF_HEADERS} ${WTF_SOURCES})
TARGET_LINK_LIBRARIES(${WTF_LIBRARY_NAME} ${WTF_LIBRARIES})
SET_TARGET_PROPERTIES(${WTF_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
-
-IF (WTF_LINK_FLAGS)
- ADD_TARGET_PROPERTIES(${WTF_LIBRARY_NAME} LINK_FLAGS "${WTF_LINK_FLAGS}")
-ENDIF ()
diff --git a/Source/WebCore/dom/MemoryInstrumentation.h b/Source/WTF/wtf/MemoryInstrumentation.h
index ac67ffff6..ac67ffff6 100644
--- a/Source/WebCore/dom/MemoryInstrumentation.h
+++ b/Source/WTF/wtf/MemoryInstrumentation.h
diff --git a/Source/WTF/wtf/OwnPtr.h b/Source/WTF/wtf/OwnPtr.h
index 326e3fd61..fa79aa1e3 100644
--- a/Source/WTF/wtf/OwnPtr.h
+++ b/Source/WTF/wtf/OwnPtr.h
@@ -22,6 +22,7 @@
#define WTF_OwnPtr_h
#include <wtf/Assertions.h>
+#include <wtf/Noncopyable.h>
#include <wtf/NullPtr.h>
#include <wtf/OwnPtrCommon.h>
#include <wtf/TypeTraits.h>
@@ -36,6 +37,11 @@ namespace WTF {
template<typename T> PassOwnPtr<T> adoptPtr(T*);
template<typename T> class OwnPtr {
+#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
+ // If rvalue references are not supported, the copy constructor is
+ // public so OwnPtr cannot be marked noncopyable. See note below.
+ WTF_MAKE_NONCOPYABLE(OwnPtr);
+#endif
public:
typedef typename RemovePointer<T>::Type ValueType;
typedef ValueType* PtrType;
@@ -46,11 +52,13 @@ namespace WTF {
// See comment in PassOwnPtr.h for why this takes a const reference.
template<typename U> OwnPtr(const PassOwnPtr<U>& o);
+#if !COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
// This copy constructor is used implicitly by gcc when it generates
// transients for assigning a PassOwnPtr<T> object to a stack-allocated
// OwnPtr<T> object. It should never be called explicitly and gcc
// should optimize away the constructor when generating code.
OwnPtr(const OwnPtr<ValueType>&);
+#endif
~OwnPtr() { deleteOwnedPtr(m_ptr); }
@@ -73,10 +81,21 @@ namespace WTF {
OwnPtr& operator=(std::nullptr_t) { clear(); return *this; }
template<typename U> OwnPtr& operator=(const PassOwnPtr<U>&);
+#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
+ OwnPtr(OwnPtr&&);
+ template<typename U> OwnPtr(OwnPtr<U>&&);
+
+ OwnPtr& operator=(OwnPtr&&);
+ template<typename U> OwnPtr& operator=(OwnPtr<U>&&);
+#endif
+
void swap(OwnPtr& o) { std::swap(m_ptr, o.m_ptr); }
private:
- OwnPtr& operator=(const OwnPtr<T>&);
+#if !COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
+ // If rvalue references are supported, noncopyable takes care of this.
+ OwnPtr& operator=(const OwnPtr&);
+#endif
// We should never have two OwnPtrs for the same underlying object (otherwise we'll get
// double-destruction), so these equality operators should never be needed.
@@ -132,6 +151,38 @@ namespace WTF {
return *this;
}
+#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
+ template<typename T> inline OwnPtr<T>::OwnPtr(OwnPtr<T>&& o)
+ : m_ptr(o.leakPtr())
+ {
+ }
+
+ template<typename T> template<typename U> inline OwnPtr<T>::OwnPtr(OwnPtr<U>&& o)
+ : m_ptr(o.leakPtr())
+ {
+ }
+
+ template<typename T> inline OwnPtr<T>& OwnPtr<T>::operator=(OwnPtr<T>&& o)
+ {
+ PtrType ptr = m_ptr;
+ m_ptr = o.leakPtr();
+ ASSERT(!ptr || m_ptr != ptr);
+ deleteOwnedPtr(ptr);
+
+ return *this;
+ }
+
+ template<typename T> template<typename U> inline OwnPtr<T>& OwnPtr<T>::operator=(OwnPtr<U>&& o)
+ {
+ PtrType ptr = m_ptr;
+ m_ptr = o.leakPtr();
+ ASSERT(!ptr || m_ptr != ptr);
+ deleteOwnedPtr(ptr);
+
+ return *this;
+ }
+#endif
+
template<typename T> inline void swap(OwnPtr<T>& a, OwnPtr<T>& b)
{
a.swap(b);
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index eb0e73228..e5cc9ccb8 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -522,11 +522,7 @@
#endif /* OS(WINCE) && !PLATFORM(QT) */
-#if PLATFORM(QT)
-#ifndef WTF_USE_ICU_UNICODE
-#define WTF_USE_QT4_UNICODE 1
-#endif
-#elif OS(WINCE)
+#if OS(WINCE)
#define WTF_USE_WCHAR_UNICODE 1
#elif PLATFORM(GTK)
/* The GTK+ Unicode backend is configurable */
diff --git a/Source/WTF/wtf/PlatformEfl.cmake b/Source/WTF/wtf/PlatformEfl.cmake
index eb85fb9d3..05ad8478d 100644
--- a/Source/WTF/wtf/PlatformEfl.cmake
+++ b/Source/WTF/wtf/PlatformEfl.cmake
@@ -15,6 +15,7 @@ LIST(APPEND WTF_LIBRARIES
pthread
${GLIB_LIBRARIES}
${GLIB_GIO_LIBRARIES}
+ ${GLIB_GOBJECT_LIBRARIES}
${ICU_LIBRARIES}
${ICU_I18N_LIBRARIES}
${ECORE_LIBRARIES}
@@ -24,15 +25,10 @@ LIST(APPEND WTF_LIBRARIES
${CMAKE_DL_LIBS}
)
-LIST(APPEND WTF_LINK_FLAGS
- ${ECORE_LDFLAGS}
- ${ECORE_EVAS_LDFLAGS}
- ${EVAS_LDFLAGS}
-)
-
LIST(APPEND WTF_INCLUDE_DIRECTORIES
${ECORE_INCLUDE_DIRS}
${ECORE_EVAS_INCLUDE_DIRS}
+ ${EINA_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${ICU_INCLUDE_DIRS}
diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt
index 76a115d20..e5683b362 100644
--- a/Source/WebCore/CMakeLists.txt
+++ b/Source/WebCore/CMakeLists.txt
@@ -1420,6 +1420,7 @@ SET(WebCore_SOURCES
html/ImageDocument.cpp
html/ImageInputType.cpp
html/InputType.cpp
+ html/InputTypeNames.cpp
html/LabelableElement.cpp
html/LabelsNodeList.cpp
html/LinkRelAttribute.cpp
@@ -2015,6 +2016,9 @@ SET(WebCore_SOURCES
rendering/BidiRun.cpp
rendering/CounterNode.cpp
rendering/EllipsisBox.cpp
+ rendering/ExclusionInterval.cpp
+ rendering/ExclusionRectangle.cpp
+ rendering/ExclusionShape.cpp
rendering/FilterEffectRenderer.cpp
rendering/FixedTableLayout.cpp
rendering/FlowThreadController.cpp
@@ -2678,28 +2682,6 @@ IF (WTF_USE_3D_GRAPHICS)
)
ENDIF ()
-IF (ENABLE_REQUEST_ANIMATION_FRAME)
- LIST(APPEND WebCore_IDL_FILES
- dom/RequestAnimationFrameCallback.idl
- )
- LIST(APPEND WebCore_SOURCES
- dom/ScriptedAnimationController.cpp
- )
-ENDIF ()
-
-IF (ENABLE_VIBRATION)
- LIST(APPEND WebCore_INCLUDE_DIRECTORIES
- ${WEBCORE_DIR}/Modules/vibration
- )
- LIST(APPEND WebCore_IDL_FILES
- Modules/vibration/NavigatorVibration.idl
- )
- LIST(APPEND WebCore_SOURCES
- Modules/vibration/NavigatorVibration.cpp
- Modules/vibration/Vibration.cpp
- )
-ENDIF ()
-
SET(WebCoreTestSupport_INCLUDE_DIRECTORIES
"${WebCore_INCLUDE_DIRECTORIES}"
"${WEBCORE_DIR}/testing"
@@ -2737,7 +2719,6 @@ SET(IDL_ATTRIBUTES_FILE ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt)
INCLUDE(${WEBCORE_DIR}/UseJSC.cmake)
SET(WebCore_LIBRARIES ${WTF_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_NAME})
-SET(WebCore_LINK_FLAGS "")
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
# ANGLE tokenizer & parser
@@ -2982,11 +2963,6 @@ ENDIF ()
TARGET_LINK_LIBRARIES(${WebCore_LIBRARY_NAME} ${WebCore_LIBRARIES})
-IF (WebCore_LINK_FLAGS)
- ADD_TARGET_PROPERTIES(${WebCore_LIBRARY_NAME} LINK_FLAGS "${WebCore_LINK_FLAGS}")
- ADD_TARGET_PROPERTIES(${WebCoreTestSupport_LIBRARY_NAME} LINK_FLAGS "${WebCore_LINK_FLAGS}")
-ENDIF ()
-
IF (SHARED_CORE)
SET_TARGET_PROPERTIES(${WebCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
INSTALL(TARGETS ${WebCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index dde6e7578..cbbb64320 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,1824 @@
+2012-09-11 Jinwoo Song <jinwoo7.song@samsung.com>
+
+ Deploy StringBuilder::appendNumber() and StringBuilder::appendLiteral() in more places
+ https://bugs.webkit.org/show_bug.cgi?id=96344
+
+ Reviewed by Benjamin Poulain.
+
+ Use StringBuilder::appendNumber() instead of String::number(). Also deploy
+ StringBuilder::appendLiteral() instead of String::append() in the surrounding code.
+
+ * css/CSSAspectRatioValue.cpp:
+ (WebCore::CSSAspectRatioValue::customCssText):
+ * platform/graphics/gpu/LoopBlinnPathProcessor.cpp:
+ (WebCore):
+ * svg/SVGPointList.cpp:
+ (WebCore::SVGPointList::valueAsString):
+
+2012-09-11 Tony Chang <tony@chromium.org>
+
+ Rename computeLogicalHeight to updateLogicalHeight
+ https://bugs.webkit.org/show_bug.cgi?id=96305
+
+ Reviewed by Ojan Vafai.
+
+ computeLogicalHeight changes the value of 4 member variables of the
+ render box, so give it a name that makes it more clear that it is
+ updating member variables.
+
+ No new tests, this is just a refactor.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::computeInitialRegionRangeForBlock):
+ (WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
+ (WebCore::RenderBlock::layoutBlock):
+ (WebCore::RenderBlock::layoutPositionedObjects):
+ (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::updateLogicalHeight):
+ (WebCore::RenderBox::computePercentageLogicalHeight):
+ (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
+ (WebCore::RenderBox::availableLogicalHeightUsing):
+ * rendering/RenderBox.h:
+ (RenderBox):
+ (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly):
+ * rendering/RenderDeprecatedFlexibleBox.cpp:
+ (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
+ (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
+ (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
+ * rendering/RenderEmbeddedObject.cpp:
+ (WebCore::RenderEmbeddedObject::layout):
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::layoutBlock):
+ (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
+ * rendering/RenderFlowThread.cpp:
+ (WebCore::RenderFlowThread::updateLogicalHeight):
+ * rendering/RenderFlowThread.h:
+ * rendering/RenderGrid.cpp:
+ (WebCore::RenderGrid::layoutBlock):
+ * rendering/RenderHTMLCanvas.cpp:
+ (WebCore::RenderHTMLCanvas::canvasSizeChanged):
+ * rendering/RenderIFrame.cpp:
+ (WebCore::RenderIFrame::updateLogicalHeight):
+ (WebCore::RenderIFrame::layoutSeamlessly):
+ (WebCore::RenderIFrame::layout):
+ * rendering/RenderIFrame.h:
+ (RenderIFrame):
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::imageDimensionsChanged):
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::updateLogicalHeight):
+ * rendering/RenderListBox.h:
+ (RenderListBox):
+ * rendering/RenderMeter.cpp:
+ (WebCore::RenderMeter::updateLogicalHeight):
+ * rendering/RenderMeter.h:
+ (RenderMeter):
+ * rendering/RenderMultiColumnBlock.cpp:
+ (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
+ * rendering/RenderMultiColumnFlowThread.h:
+ * rendering/RenderMultiColumnSet.cpp:
+ (WebCore::RenderMultiColumnSet::updateLogicalHeight):
+ * rendering/RenderMultiColumnSet.h:
+ (RenderMultiColumnSet):
+ * rendering/RenderReplaced.cpp:
+ (WebCore::RenderReplaced::layout):
+ * rendering/RenderSearchField.cpp:
+ (WebCore::RenderSearchField::computeControlHeight):
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::layout):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::updateLogicalHeight):
+ * rendering/RenderTextControl.h:
+ (RenderTextControl):
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::updateLogicalHeight):
+ * rendering/RenderView.h:
+ * rendering/svg/RenderSVGForeignObject.cpp:
+ (WebCore::RenderSVGForeignObject::updateLogicalHeight):
+ * rendering/svg/RenderSVGForeignObject.h:
+ (RenderSVGForeignObject):
+ * rendering/svg/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::layout):
+
+2012-09-11 Zach Kuznia <zork@chromium.org>
+
+ Fix FilterTypeZoom to properly call canvas->restore()
+ https://bugs.webkit.org/show_bug.cgi?id=96082
+
+ Reviewed by Adrienne Walker.
+
+ Fix zoom filter to properly call canvas->restore()
+
+ * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
+ (WebCore::CCRenderSurfaceFilters::apply):
+
+2012-09-11 Sergio Villar Senin <svillar@igalia.com>
+
+ [GTK] WebKitGtk+ crashes with non-UTF8 HTTP header names
+ https://bugs.webkit.org/show_bug.cgi?id=96284
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Non UTF-8 characters sent as part of a HTTP header name were
+ causing crashes as String::fromUTF8() was returning NULL for
+ them. Use String::fromUTF8WithLatin1Fallback() instead.
+
+ Test: http/tests/misc/non-utf8-header-name.php
+
+ * platform/network/soup/ResourceResponseSoup.cpp:
+ (WebCore::ResourceResponse::updateFromSoupMessage):
+
+2012-09-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r128175.
+ http://trac.webkit.org/changeset/128175
+ https://bugs.webkit.org/show_bug.cgi?id=96395
+
+ broke hunders of tests for EFL and GTK (Requested by rakuco on
+ #webkit).
+
+ * platform/network/soup/ResourceResponseSoup.cpp:
+ (WebCore::ResourceResponse::updateFromSoupMessage):
+
+2012-09-11 Raphael Kubo da Costa <rakuco@webkit.org>
+
+ [EFL] Rewrite the EFL-related Find modules
+ https://bugs.webkit.org/show_bug.cgi?id=95237
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * CMakeLists.txt: Stop setting the LINK_FLAGS property now that no
+ port sets WebCore_LINK_FLAGS.
+ * PlatformEfl.cmake: Add libraries and include directories for
+ each Enlightenment Foundation Library used by the port.
+
+2012-09-11 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed, rolling out 128054, because it broke the Windows build.
+
+ * DerivedSources.pri:
+
+2012-09-11 Andras Becsi <andras.becsi@nokia.com>
+
+ [Qt] Fix the build with libwebp
+
+ Rubber-stamped by Tor Arne Vestbø
+
+ The use-flag is called WEBP not LIBWEBP, so use that when appending -lwebp.
+
+ * WebCore.pri:
+
+2012-09-10 Andrey Kosyakov <caseq@chromium.org>
+
+ Web Inspector: visualize layout root in Timeline
+ https://bugs.webkit.org/show_bug.cgi?id=96279
+
+ Reviewed by Pavel Feldman.
+
+ - pass layout root to InspectorTimelineAgent::didLayout
+ - show rectangles of the layout root upon hover over the Layout record;
+
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore):
+ (WebCore::InspectorInstrumentation::didLayoutImpl):
+ * inspector/InspectorInstrumentation.h:
+ (WebCore):
+ (InspectorInstrumentation):
+ (WebCore::InspectorInstrumentation::didLayout):
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::didLayout):
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore):
+ (InspectorTimelineAgent):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createPaintData):
+ (WebCore::TimelineRecordFactory::addRectData):
+ (WebCore):
+ * inspector/TimelineRecordFactory.h:
+ (TimelineRecordFactory):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._mouseMove):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout):
+
+2012-09-10 Andrey Kosyakov <caseq@chromium.org>
+
+ Web Inspector: highlight of paint rectangles is broken
+ https://bugs.webkit.org/show_bug.cgi?id=96276
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/InspectorOverlay.cpp:
+ (WebCore::InspectorOverlay::drawRectHighlight): Fix JS method name to match the one in InspectorOverlayPage.html
+
+2012-09-11 Chris Guan <chris.guan@torchmobile.com.cn>
+
+ [Blackberry] use ReadOnlyLatin1String to save a deep copy
+ https://bugs.webkit.org/show_bug.cgi?id=96364
+
+ Reviewed by Yong Li.
+ Internally reviewed by Yong li.
+
+ * platform/network/blackberry/NetworkManager.cpp:
+ (WebCore::NetworkManager::startJob):
+
+2012-09-11 Sergio Villar Senin <svillar@igalia.com>
+
+ [GTK] WebKitGtk+ crashes with non-UTF8 HTTP header names
+ https://bugs.webkit.org/show_bug.cgi?id=96284
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Non UTF-8 characters sent as part of a HTTP header name were
+ causing crashes as String::fromUTF8() was returning NULL for
+ them. Use String::fromUTF8WithLatin1Fallback() instead.
+
+ Test: http/tests/misc/non-utf8-header-name.php
+
+ * platform/network/soup/ResourceResponseSoup.cpp:
+ (WebCore::ResourceResponse::updateFromSoupMessage):
+
+2012-09-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Add a configure step to the Qt build system
+
+ This allows building the Qt port using just 'qmake WebKit.pro'. Using
+ the build-webkit script is still supported, and will add slightly more
+ logic to the build, such as detecting the need for clean or incremental
+ builds.
+
+ Internally, the build system now uses a new variable, WEBKIT_CONFIG, for
+ all things related to configuring the build, such as use/have/enable flags,
+ and these are translated to defines in default_post. Project files should
+ no longer check contains(DEFINES,...) to detect features, but use the new
+ enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2
+ options have been translated into WEBKIT_CONFIG options as well, and can
+ be checked using build?().
+
+ Reviewed by Simon Hausmann.
+
+ * DerivedSources.pri:
+ * Target.pri:
+ * WebCore.pri:
+
+2012-09-11 Alexander Pavlov <apavlov@chromium.org>
+
+ Web Inspector: Remove no-op TreeElement.prototype.didChange method
+ https://bugs.webkit.org/show_bug.cgi?id=96376
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/front-end/treeoutline.js:
+ (TreeElement.prototype.set title):
+ (TreeElement.prototype.set tooltip):
+ (TreeElement.prototype.set hasChildren):
+
+2012-09-11 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: add RTCPeerConnection::onnegotiationneeded
+ https://bugs.webkit.org/show_bug.cgi?id=96097
+
+ Reviewed by Adam Barth.
+
+ This patch adds the last callback to RTCPeerConnection: onnegotiationneeded.
+ This is called whenever the state in the RTCPeerConnection changes and that
+ change needs to be sent to the other side.
+
+ Test: fast/mediastream/RTCPeerConnection-onnegotiationneeded.html
+
+ * Modules/mediastream/RTCPeerConnection.cpp:
+ (WebCore::RTCPeerConnection::negotiationNeeded):
+ (WebCore):
+ * Modules/mediastream/RTCPeerConnection.h:
+ (RTCPeerConnection):
+ * Modules/mediastream/RTCPeerConnection.idl:
+ * dom/EventNames.h:
+ (WebCore):
+ * platform/mediastream/RTCPeerConnectionHandlerClient.h:
+ (RTCPeerConnectionHandlerClient):
+ * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
+ (WebCore::RTCPeerConnectionHandlerChromium::negotiationNeeded):
+ (WebCore):
+ * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
+ (RTCPeerConnectionHandlerChromium):
+
+2012-09-11 Kent Tamura <tkent@chromium.org>
+
+ Sort an Xcode project file.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2012-09-11 Dan Carney <dcarney@google.com>
+
+ Removed V8IsolatedContext
+ https://bugs.webkit.org/show_bug.cgi?id=95735
+
+ Reviewed by Adam Barth.
+
+ Remove V8IsolatedContext and merge functionality into V8DOMWindowShell.
+ This brings the V8 isolated world model into closer alignment with
+ that of JSC.
+
+ No new tests. No change in functionality.
+
+ * UseV8.cmake:
+ * WebCore.gypi:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ (GenerateImplementation):
+ * bindings/scripts/test/V8/V8Float64Array.cpp:
+ * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
+ * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
+ * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
+ * bindings/scripts/test/V8/V8TestEventTarget.cpp:
+ * bindings/scripts/test/V8/V8TestException.cpp:
+ * bindings/scripts/test/V8/V8TestInterface.cpp:
+ * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
+ * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
+ * bindings/scripts/test/V8/V8TestNode.cpp:
+ * bindings/scripts/test/V8/V8TestObj.cpp:
+ * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
+ * bindings/v8/DOMData.cpp:
+ (WebCore::DOMData::getCurrentStore):
+ * bindings/v8/DOMWrapperWorld.cpp:
+ (WebCore::DOMWrapperWorld::ensureIsolatedWorld):
+ * bindings/v8/DOMWrapperWorld.h:
+ (DOMWrapperWorld):
+ * bindings/v8/ScriptController.cpp:
+ (WebCore::ScriptController::ScriptController):
+ (WebCore::ScriptController::resetIsolatedWorlds):
+ (WebCore::ScriptController::ensureIsolatedWorldContext):
+ (WebCore::ScriptController::existingWindowShellInternal):
+ (WebCore):
+ (WebCore::ScriptController::windowShell):
+ (WebCore::ScriptController::evaluateInIsolatedWorld):
+ (WebCore::ScriptController::setIsolatedWorldSecurityOrigin):
+ (WebCore::ScriptController::currentWorldContext):
+ (WebCore::ScriptController::evaluateInWorld):
+ (WebCore::ScriptController::collectIsolatedContexts):
+ * bindings/v8/ScriptController.h:
+ (WebCore):
+ (ScriptController):
+ (WebCore::ScriptController::existingWindowShell):
+ * bindings/v8/SharedPersistent.h:
+ (WebCore):
+ (WebCore::SharedPersistent::create):
+ (WebCore::SharedPersistent::get):
+ (WebCore::SharedPersistent::SharedPersistent):
+ (SharedPersistent):
+ * bindings/v8/V8Binding.cpp:
+ (WebCore::perContextDataForCurrentWorld):
+ * bindings/v8/V8DOMWindowShell.cpp:
+ (WebCore::setIsolatedWorldField):
+ (WebCore::V8DOMWindowShell::enteredIsolatedWorldContext):
+ (WebCore):
+ (WebCore::setInjectedScriptContextDebugId):
+ (WebCore::V8DOMWindowShell::create):
+ (WebCore::V8DOMWindowShell::V8DOMWindowShell):
+ (WebCore::V8DOMWindowShell::destroyIsolatedShell):
+ (WebCore::isolatedContextWeakCallback):
+ (WebCore::V8DOMWindowShell::disposeContext):
+ (WebCore::V8DOMWindowShell::initializeIfNeeded):
+ (WebCore::V8DOMWindowShell::createContext):
+ (WebCore::V8DOMWindowShell::installDOMWindow):
+ (WebCore::V8DOMWindowShell::updateDocumentWrapper):
+ (WebCore::V8DOMWindowShell::updateDocumentProperty):
+ (WebCore::V8DOMWindowShell::clearDocumentProperty):
+ (WebCore::V8DOMWindowShell::setSecurityToken):
+ (WebCore::V8DOMWindowShell::updateDocument):
+ (WebCore::V8DOMWindowShell::namedItemAdded):
+ (WebCore::V8DOMWindowShell::namedItemRemoved):
+ (WebCore::V8DOMWindowShell::updateSecurityOrigin):
+ (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
+ * bindings/v8/V8DOMWindowShell.h:
+ (V8DOMWindowShell):
+ (WebCore::V8DOMWindowShell::world):
+ (WebCore::V8DOMWindowShell::isolatedWorldSecurityOrigin):
+ (WebCore::V8DOMWindowShell::getEntered):
+ * bindings/v8/V8DOMWrapper.h:
+ (WebCore::V8DOMWrapper::getCachedWrapper):
+ * bindings/v8/V8IsolatedContext.cpp: Removed.
+ * bindings/v8/V8IsolatedContext.h: Removed.
+ * bindings/v8/V8LazyEventListener.cpp:
+ * bindings/v8/WorldContextHandle.cpp:
+ (WebCore::WorldContextHandle::WorldContextHandle):
+ (WebCore::WorldContextHandle::adjustedContext):
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8SVGDocumentCustom.cpp:
+ (WebCore::toV8):
+ * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
+ (WebCore::V8XMLHttpRequest::constructorCallback):
+
+2012-09-11 Keishi Hattori <keishi@webkit.org>
+
+ Create Localizer factory method for LocaleMac
+ https://bugs.webkit.org/show_bug.cgi?id=96355
+
+ Reviewed by Kent Tamura.
+
+ Preparing to use Localizer instead of LocaleMac/Win/ICU
+
+ No new tests. Covered in unit test tests/LocaleMacTest.cpp
+
+ * platform/text/Localizer.h:
+ (Localizer):
+ * platform/text/mac/LocaleMac.mm:
+ (WebCore::Localizer::create):
+ (WebCore):
+
+2012-09-11 Mihnea Ovidenie <mihnea@adobe.com>
+
+ [CSS Regions] Auto width is not working for Regions
+ https://bugs.webkit.org/show_bug.cgi?id=74135
+
+ Reviewed by Julien Chaffraix.
+
+ It was not possible to flow content into a region having { width: auto; } since in such case, the region width was computed to 0.
+ Now, a region having auto width, will have its width computed following the rules for calculation of widths and margins
+ (http://www.w3.org/TR/CSS2/visudet.html#Computing_widths_and_margins).
+ For those cases in which resolving the width requires measuring of content's min/max-content values, we use the associated named flow min/max-content
+ values (the same for all regions with width auto in a region chain).
+ When a region has width:auto, the computation of width should be done using normal block/box sizing code, instead of replaced element code.
+ Contains code contributed by Alexandru Chiculita(achicu@adobe.com).
+
+ Tests: fast/regions/autowidth-abspos-regionchain.html
+ fast/regions/autowidth-abspos.html
+ fast/regions/autowidth-attachedinvalidregion.html
+ fast/regions/autowidth-float.html
+ fast/regions/autowidth-inlineblock.html
+ fast/regions/autowidth-nonreplaced-abspos.html
+ fast/regions/autowidth-nonreplacedblock-normalflow.html
+ fast/regions/autowidth-normalflow-maxwidth.html
+ fast/regions/autowidth-normalflow-minmaxwidth.html
+ fast/regions/autowidth-normalflow-minwidth.html
+ fast/regions/autowidth-normalflow-vertrl.html
+ fast/regions/autowidth-normalflow.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::computePositionedLogicalWidth): For positioned auto-width regions, skip the code path for replaced elements.
+ * rendering/RenderRegion.cpp:
+ (WebCore): Override min/maxPreferredLogicalWidth as they are used in the process of computing width for regions with auto width.
+ As this moment, a region is still a RenderReplaced element, so this code needs to be revisited when the region will become a RenderBlock.
+ Also, for min/max-width, we support only <length> values. We will extend support for other values in a following patch.
+ We only attempt to use the flowThread min/maxPreferredLogicalWidth if the region is valid (there are no circular dependencies).
+ (WebCore::RenderRegion::minPreferredLogicalWidth):
+ (WebCore::RenderRegion::maxPreferredLogicalWidth):
+ * rendering/RenderRegion.h:
+ (RenderRegion): Override isInlineBlockOrInlineTable() and shouldComputeSizeAsReplaced() to ensure that computation for width auto follows the normal
+ block/box sizing code.
+ (WebCore::RenderRegion::expandToEncompassFlowThreadContentsIfNeeded):
+
+2012-09-10 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: NMI: move MemoryInstrumentation.h to wtf
+ https://bugs.webkit.org/show_bug.cgi?id=96356
+
+ Reviewed by Yury Semikhatsky.
+
+ It is necessary step because it helps us to remove dependency between platform and WebCore.
+
+ * GNUmakefile.list.am:
+ * Target.pri:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/WebCoreMemoryInstrumentation.h:
+ * inspector/MemoryInstrumentationImpl.h:
+
+2012-09-10 Keishi Hattori <keishi@webkit.org>
+
+ Move InputTypeNames to a separate file
+ https://bugs.webkit.org/show_bug.cgi?id=96255
+
+ Reviewed by Kent Tamura.
+
+ We want to move InputTypeNames to a separate file so we can use it without including InputType.h.
+
+ No new tests. No behavior change.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * Target.pri:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * html/ButtonInputType.cpp:
+ * html/CheckboxInputType.cpp:
+ * html/ColorInputType.cpp:
+ * html/DateInputType.cpp:
+ * html/DateTimeInputType.cpp:
+ * html/DateTimeLocalInputType.cpp:
+ * html/EmailInputType.cpp:
+ * html/FileInputType.cpp:
+ * html/HiddenInputType.cpp:
+ * html/ImageInputType.cpp:
+ * html/InputType.cpp:
+ * html/InputType.h:
+ * html/InputTypeNames.cpp: Added.
+ (WebCore):
+ (InputTypeNames):
+ (WebCore::InputTypeNames::button):
+ (WebCore::InputTypeNames::checkbox):
+ (WebCore::InputTypeNames::color):
+ (WebCore::InputTypeNames::date):
+ (WebCore::InputTypeNames::datetime):
+ (WebCore::InputTypeNames::datetimelocal):
+ (WebCore::InputTypeNames::email):
+ (WebCore::InputTypeNames::file):
+ (WebCore::InputTypeNames::hidden):
+ (WebCore::InputTypeNames::image):
+ (WebCore::InputTypeNames::month):
+ (WebCore::InputTypeNames::number):
+ (WebCore::InputTypeNames::password):
+ (WebCore::InputTypeNames::radio):
+ (WebCore::InputTypeNames::range):
+ (WebCore::InputTypeNames::reset):
+ (WebCore::InputTypeNames::search):
+ (WebCore::InputTypeNames::submit):
+ (WebCore::InputTypeNames::telephone):
+ (WebCore::InputTypeNames::text):
+ (WebCore::InputTypeNames::time):
+ (WebCore::InputTypeNames::url):
+ (WebCore::InputTypeNames::week):
+ * html/InputTypeNames.h: Added.
+ (WebCore):
+ (InputTypeNames):
+ * html/MonthInputType.cpp:
+ * html/NumberInputType.cpp:
+ * html/PasswordInputType.cpp:
+ * html/RadioInputType.cpp:
+ * html/RangeInputType.cpp:
+ * html/ResetInputType.cpp:
+ * html/SearchInputType.cpp:
+ * html/SubmitInputType.cpp:
+ * html/TelephoneInputType.cpp:
+ * html/TextInputType.cpp:
+ * html/TimeInputType.cpp:
+ * html/URLInputType.cpp:
+ * html/WeekInputType.cpp:
+ * html/parser/HTMLPreloadScanner.cpp:
+ * platform/efl/RenderThemeEfl.cpp:
+ * rendering/RenderThemeChromiumCommon.cpp:
+
+2012-09-10 Yoshifumi Inoue <yosin@chromium.org>
+
+ REGRESSION (r127226): Calling DateTimeEditElement::layout() in focus handler should not dispatch blur event
+ https://bugs.webkit.org/show_bug.cgi?id=96232
+
+ Reviewed by Kent Tamura.
+
+ This patch makes DateTimeEditElement::layout() not to dispatch blur
+ event by removing existing fields, one of them can be focused, after
+ moving focus to newly created field.
+
+ This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
+ ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
+
+ Test: fast/forms/time-multiple-fields/time-multiple-fields-state-change-on-focus-or-blur.html
+
+ * html/shadow/DateTimeEditElement.cpp:
+ (WebCore::DateTimeEditBuilder::build): Changed to call resetFields().
+ (WebCore::DateTimeEditElement::focusedFieldIndex): Changed to use
+ Document::focusedNode(). When this function is called during handling
+ focus event, Element::focused() isn't true.
+ (WebCore::DateTimeEditElement::layout): Changed to remove existing
+ child nodes after moving focus to newly created field.
+ (WebCore::DateTimeEditElement::resetFields): Renamed from resetLayout().
+ This function makes m_fields vector empty.
+ (WebCore::DateTimeEditElement::resetLayout): Renamed to resetFields().
+ We moved removing field elements and spin button to layout().
+ * html/shadow/DateTimeEditElement.h:
+ (DateTimeEditElement): Renamed resetLayout() to resetFields().
+
+2012-09-10 Keishi Hattori <keishi@webkit.org>
+
+ Rename NumberLocalizer to Localizer
+ https://bugs.webkit.org/show_bug.cgi?id=96350
+
+ Reviewed by Kent Tamura.
+
+ Renaming NumberLocalizer to Localizer so we can unify our localization methods into this class in the future.
+
+ No new tests. No behavior change.
+
+ * WebCore.gypi:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/text/LocaleICU.cpp:
+ (WebCore::LocaleICU::initializeLocalizerData):
+ * platform/text/LocaleICU.h:
+ (LocaleICU):
+ * platform/text/LocaleWin.cpp:
+ (WebCore::LocaleWin::initializeLocalizerData):
+ * platform/text/LocaleWin.h:
+ (LocaleWin):
+ * platform/text/Localizer.cpp: Renamed from Source/WebCore/platform/text/NumberLocalizer.cpp.
+ (WebCore):
+ (WebCore::Localizer::~Localizer):
+ (WebCore::Localizer::setLocalizerData):
+ (WebCore::Localizer::convertToLocalizedNumber):
+ (WebCore::matches):
+ (WebCore::Localizer::detectSignAndGetDigitRange):
+ (WebCore::Localizer::matchedDecimalSymbolIndex):
+ (WebCore::Localizer::convertFromLocalizedNumber):
+ (WebCore::Localizer::localizedDecimalSeparator):
+ * platform/text/Localizer.h: Renamed from Source/WebCore/platform/text/NumberLocalizer.h.
+ (WebCore):
+ (Localizer):
+ (WebCore::Localizer::Localizer):
+ * platform/text/mac/LocaleMac.h:
+ (LocaleMac):
+ * platform/text/mac/LocaleMac.mm:
+ (WebCore::LocaleMac::initializeLocalizerData):
+
+2012-09-10 Dan Bernstein <mitz@apple.com>
+
+ Use an API symbol instead of a hardcoded string for the TIFF uniform type identifier.
+
+ Reviewed by Mark Rowe.
+
+ * platform/graphics/mac/ImageMac.mm:
+ (WebCore::BitmapImage::getTIFFRepresentation): Replaced CFSTR("public.tiff") with kUTTypeTIFF.
+
+2012-09-10 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ [CMake] Remove duplicated file in CMakeLists.txt
+ https://bugs.webkit.org/show_bug.cgi?id=96346
+
+ Reviewed by Benjamin Poulain.
+
+ * CMakeLists.txt: Remove duplicated files.
+
+2012-09-10 Joanmarie Diggs <jdiggs@igalia.com>
+
+ Properly expose <legend> elements to ATs
+ https://bugs.webkit.org/show_bug.cgi?id=84137
+
+ Reviewed by Chris Fleizach.
+
+ Created a new WebCore Accessibility Role, LegendRole. Used it to map to
+ the expected platform role, ATK_ROLE_LABEL. Also established the needed
+ AtkRelation pair, label-for/labelled-by between the legend and fieldset.
+
+ No new test needed - Existing legend.html test is now unskipped for Gtk.
+
+ * accessibility/AccessibilityObject.h: Added LegendRole
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::determineAccessibilityRole): Map legendTag to LegendRole
+ * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
+ (webkitAccessibleGetName): Fieldset accessible should take its name from the associated LegendRole/label
+ (setAtkRelationSetFromCoreObject): Set label-for/labelled-by AtkRelation pair between fieldset and legend
+ (atkRole): Map LegendRole to ATK_ROLE_LABEL
+ * accessibility/mac/WebAccessibilityObjectWrapper.mm:
+ (createAccessibilityRoleMap): Map LegendRole to NSAccessibilityGroupRole
+
+2012-09-10 Adam Barth <abarth@chromium.org>
+
+ [V8] Code assumes that getScriptExecutionContext can return 0
+ https://bugs.webkit.org/show_bug.cgi?id=96340
+
+ Reviewed by Eric Seidel.
+
+ This function can never return 0 (as long as V8 is on the stack).
+ There's no reason to try to handle a 0 return as an error.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ (GenerateCallWith):
+ (GenerateConstructorCallback):
+ * bindings/scripts/test/V8/V8TestInterface.cpp:
+ (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
+ (WebCore::V8TestInterface::constructorCallback):
+ * bindings/scripts/test/V8/V8TestObj.cpp:
+ (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrGetter):
+ (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter):
+ (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter):
+ (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter):
+ (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetter):
+ (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter):
+ (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter):
+ (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter):
+ (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter):
+ (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter):
+ (WebCore::TestObjV8Internal::withScriptExecutionContextCallback):
+ (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateCallback):
+ (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback):
+ (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesCallback):
+ * bindings/v8/custom/V8BlobCustom.cpp:
+ (WebCore::V8Blob::constructorCallback):
+ * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
+ (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
+ * bindings/v8/custom/V8MessageChannelConstructor.cpp:
+ (WebCore::V8MessageChannel::constructorCallback):
+ * bindings/v8/custom/V8MutationObserverCustom.cpp:
+ (WebCore::V8MutationObserver::constructorCallback):
+ * bindings/v8/custom/V8SQLTransactionCustom.cpp:
+ (WebCore::V8SQLTransaction::executeSqlCallback):
+ * bindings/v8/custom/V8WebSocketCustom.cpp:
+ (WebCore::V8WebSocket::constructorCallback):
+ * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
+ (WebCore::V8XMLHttpRequest::constructorCallback):
+ * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+ (WebCore::V8XMLHttpRequest::openCallback):
+
+2012-09-10 Adam Barth <abarth@chromium.org>
+
+ [V8] We don't us the global handle map for anything useful---let's remove it
+ https://bugs.webkit.org/show_bug.cgi?id=96343
+
+ Reviewed by Kentaro Hara.
+
+ The global handle map was a dream of tracking all the persistent V8
+ handles in WebCore. Unfortunately, it has never been complete, and I'm
+ not aware of us using it for anything. This patch removes what little
+ is left of it.
+
+ * bindings/v8/NPV8Object.cpp:
+ (WebCore::freeV8NPObject):
+ (WebCore::npCreateV8ScriptObject):
+ * bindings/v8/V8GCController.cpp:
+ (WebCore):
+ (WebCore::V8GCController::gcEpilogue):
+ (WebCore::V8GCController::collectGarbage):
+ * bindings/v8/V8GCController.h:
+ (V8GCController):
+ * bindings/v8/V8PerIsolateData.h:
+ (WebCore):
+ (V8PerIsolateData):
+
+2012-09-10 John Bates <jbates@google.com>
+
+ [chromium] Fix trace event macro naming issue
+ https://bugs.webkit.org/show_bug.cgi?id=96337
+
+ Reviewed by James Robinson.
+
+ * platform/chromium/TraceEvent.h:
+
+2012-09-10 Joshua Bell <jsbell@chromium.org>
+
+ IndexedDB: IDBFactory.deleteDatabase() is slow
+ https://bugs.webkit.org/show_bug.cgi?id=96036
+
+ Reviewed by Tony Chang.
+
+ The deleteDatabase() operation is implemented by creating a LevelDBTansaction to accumulate
+ the records to delete, then committing it. The transaction is a tree of key/operation pairs.
+ As each (key, delete) entry is added to the tree compares need to be made, potentially
+ requiring full key decodes. Since this temporary transaction is never read from, this is
+ overkill.
+
+ Add a new "write only" transaction type that simply wraps a write batch, which provides
+ transaction integrity but avoids the insertion overhead and has a minimal interface.
+
+ No new tests - no functional changes, only perf improvement.
+
+ * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
+ (WebCore::IDBLevelDBBackingStore::deleteDatabase): Use new write-only transaction type.
+ * platform/leveldb/LevelDBTransaction.cpp:
+ (WebCore::LevelDBWriteOnlyTransaction::create):
+ (WebCore):
+ (WebCore::LevelDBWriteOnlyTransaction::LevelDBWriteOnlyTransaction):
+ (WebCore::LevelDBWriteOnlyTransaction::~LevelDBWriteOnlyTransaction):
+ (WebCore::LevelDBWriteOnlyTransaction::remove):
+ (WebCore::LevelDBWriteOnlyTransaction::commit):
+ * platform/leveldb/LevelDBTransaction.h:
+ (WebCore):
+ (LevelDBWriteOnlyTransaction):
+
+2012-09-10 Adam Barth <abarth@chromium.org>
+
+ [V8] createFunctionOnlyCallback should be in V8Callback.h with the other callback functions
+ https://bugs.webkit.org/show_bug.cgi?id=96336
+
+ Reviewed by Kentaro Hara.
+
+ Moving this function to V8Callback.h also lets us delete
+ setTypeMismatchException because we no longer have a header inclusion
+ cycle.
+
+ * bindings/v8/V8Callback.h:
+ (WebCore::createFunctionOnlyCallback):
+ (WebCore):
+ * bindings/v8/V8Utilities.cpp:
+ * bindings/v8/V8Utilities.h:
+ (WebCore):
+ * bindings/v8/custom/V8GeolocationCustom.cpp:
+ * bindings/v8/custom/V8NotificationCustom.cpp:
+
+2012-09-10 Beth Dakin <bdakin@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=96158
+ Need API to suppress scrollbar animations
+ -and corresponding-
+ <rdar://problem/12210972>
+
+ Reviewed by Sam Weinig.
+
+ This patch re-names ScrollableAre::isOnActivePage() to
+ ScrollableArea::scrollbarsCanBeActive(). The new name better reflects
+ how the function is actually used, and it allows us to use the same
+ function for the new API that has been added to WebKit2. Now when a
+ client has used that API to indicate that scrollbars should be
+ suppressed, ScrollableArea::scrollbarsCanBeActive() will return
+ false.
+
+ Page has a new member variable which indicated whether scrollbar
+ animations for all scrollbars associated with that page should be
+ suppressed. Whenever it is set to true (meaning the animations
+ should be suppressed), Page iterates through all of the
+ ScrollableAreas to tell each one to finishCurrentScrollAnimations().
+ * WebCore.exp.in:
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ (WebCore::Page::setShouldSuppressScrollbarAnimations):
+ (WebCore):
+ * page/Page.h:
+ (WebCore::Page::shouldSuppressScrollbarAnimations):
+ (Page):
+
+ FrameView::isOnActivePage() is renamed to scrollbarsCanBeActive ()
+ and it will now return false if the Page says that scrollbar
+ animations should be suppressed.
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollbarsCanBeActive):
+
+ scrollbarsCanBeActive() must now be a public member of FrameView so
+ that it can be called from RenderLayer and RenderListBox.
+ * page/FrameView.h:
+ (FrameView):
+
+ New ScrollAnimator function calls hideOverlayScrollers.
+ * platform/ScrollAnimator.h:
+ (WebCore::ScrollAnimator::finishCurrentScrollAnimations):
+ (ScrollAnimator):
+ * platform/ScrollableArea.cpp:
+ (WebCore::ScrollableArea::finishCurrentScrollAnimations):
+ (WebCore):
+ * platform/ScrollableArea.h:
+ (ScrollableArea):
+ * platform/mac/ScrollAnimatorMac.h:
+ (ScrollAnimatorMac):
+ (WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):
+
+ Re-name. isOnActivePage() -> scrollbarsCanBeActive()
+ (WebCore::FrameView::setAnimatorsAreActive):
+ (WebCore::FrameView::notifyPageThatContentAreaWillPaint):
+ * platform/mac/ScrollAnimatorMac.mm:
+ (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
+ (WebCore::ScrollAnimatorMac::contentAreaWillPaint):
+ (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
+ (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
+ (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
+ (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
+ (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
+ (WebCore::ScrollAnimatorMac::willStartLiveResize):
+ (WebCore::ScrollAnimatorMac::contentsResized):
+ (WebCore::ScrollAnimatorMac::willEndLiveResize):
+ (WebCore::ScrollAnimatorMac::contentAreaDidShow):
+ (WebCore::ScrollAnimatorMac::contentAreaDidHide):
+ (WebCore::ScrollAnimatorMac::didBeginScrollGesture):
+ (WebCore::ScrollAnimatorMac::didEndScrollGesture):
+ (WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
+ (WebCore):
+ (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
+ (WebCore::ScrollAnimatorMac::updateScrollerStyle):
+ * rendering/RenderLayer.cpp:
+
+ RenderLayer and RenderListBox should call into FrameView's
+ scrollbarsCanBeActive() so that they also return false when Page::
+ shouldSuppressScrollbarAnimations() is true.
+ (WebCore::RenderLayer::scrollbarsCanBeActive):
+ * rendering/RenderLayer.h:
+ (RenderLayer):
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::scrollbarsCanBeActive):
+ * rendering/RenderListBox.h:
+
+ This is the one caller of ScrollableArea:: scrollbarsCanBeActive()
+ that needs to distinguish between the scrollbar-suppressing scenario
+ and the in-the-page-cache scenario.
+ * page/FocusController.cpp:
+ (WebCore::FocusController::setContainingWindowIsVisible):
+
+2012-09-10 James Robinson <jamesr@chromium.org>
+
+ Unreviewed, rolling out r127837.
+ http://trac.webkit.org/changeset/127837
+ https://bugs.webkit.org/show_bug.cgi?id=93898
+
+ Broke ScrollingCoordinator on chromium
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * page/scrolling/ScrollingCoordinator.cpp:
+ (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
+ (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
+ (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
+ (WebCore::ScrollingCoordinator::hasNonLayerFixedObjects):
+ (WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread):
+ (WebCore::ScrollingCoordinator::setForceMainThreadScrollLayerPositionUpdates):
+ (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
+ * page/scrolling/ScrollingCoordinator.h:
+ (ScrollingCoordinator):
+ * page/scrolling/ScrollingCoordinatorNone.cpp:
+ (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
+ * page/scrolling/ScrollingTree.cpp:
+ (WebCore::ScrollingTree::scrollingPeformanceLoggingEnabled):
+ * page/scrolling/ScrollingTree.h:
+ * page/scrolling/ScrollingTreeNode.cpp:
+ (WebCore::ScrollingTreeNode::ScrollingTreeNode):
+ (WebCore::ScrollingTreeNode::update):
+ * page/scrolling/ScrollingTreeNode.h:
+ (WebCore::ScrollingTreeNode::shouldUpdateScrollLayerPositionOnMainThread):
+ (ScrollingTreeNode):
+ * page/scrolling/ScrollingTreeState.cpp:
+ (WebCore::ScrollingTreeState::ScrollingTreeState):
+ (WebCore::ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThread):
+ * page/scrolling/ScrollingTreeState.h:
+ (WebCore::ScrollingTreeState::shouldUpdateScrollLayerPositionOnMainThread):
+ (ScrollingTreeState):
+ * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
+ (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
+ * page/scrolling/mac/ScrollingTreeMac.mm:
+ (WebCore::ScrollingTree::updateDebugRootLayer):
+ * page/scrolling/mac/ScrollingTreeNodeMac.mm:
+ (WebCore::ScrollingTreeNodeMac::update):
+ (WebCore::ScrollingTreeNodeMac::scrollPosition):
+ (WebCore::ScrollingTreeNodeMac::setScrollPosition):
+ (WebCore::ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints):
+ (WebCore::ScrollingTreeNodeMac::setScrollLayerPosition):
+
+2012-09-10 Philip Rogers <pdr@google.com>
+
+ Remove unnecessary codepaths in SMILTimeContainer::updateAnimations
+ https://bugs.webkit.org/show_bug.cgi?id=96224
+
+ Reviewed by Nikolas Zimmermann.
+
+ This change removes two sources of unnecessary code in
+ SMILTimeContainer::updateAnimations:
+ 1) After r117711 we now accumulate the result of multiple
+ animations into the first _contributing_ animation
+ element. As a result it is no longer necessary to
+ track both which elements are contributing AND which elements
+ we are storing results into. Both cases are now handled
+ together with resultsElements.
+
+ 2) r32044 added a second sort of the animation elements
+ in order to process animateTransform last. This change
+ was added 4 years ago, before we correctly handled <use>
+ and the instance tree, and I think the extra sort is no
+ longer necessary. A test has been added to ensure this
+ is the case.
+
+ This change also does a minor cleanup of resultsElements. Previously,
+ we added animation elements to resultsElements and then removed them
+ if the animation element did not contribute. After this change, we
+ only add to resultsElements (no more add-then-remove).
+
+ Test: svg/animations/use-animate-transform-and-position.html
+
+ * svg/animation/SMILTimeContainer.cpp:
+ (WebCore::SMILTimeContainer::sortByPriority):
+ (WebCore::SMILTimeContainer::updateAnimations):
+
+2012-09-10 Ojan Vafai <ojan@chromium.org>
+
+ Rename box-sizing applying methods to be more clear about just applying box-sizing.
+ https://bugs.webkit.org/show_bug.cgi?id=96319
+
+ Reviewed by Tony Chang.
+
+ This is strictly a rename. No logic or web-exposed changes.
+
+ * rendering/AutoTableLayout.cpp:
+ (WebCore::AutoTableLayout::recalcColumn):
+ * rendering/FixedTableLayout.cpp:
+ (WebCore::FixedTableLayout::calcWidthArray):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::computePreferredLogicalWidths):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
+ (WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
+ (WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
+ (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
+ (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
+ (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
+ (WebCore::RenderBox::computeLogicalHeightUsing):
+ (WebCore::RenderBox::computeLogicalClientHeight):
+ (WebCore::RenderBox::computePercentageLogicalHeight):
+ (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
+ (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
+ (WebCore::RenderBox::availableLogicalHeightUsing):
+ (WebCore::RenderBox::computePositionedLogicalWidthUsing):
+ (WebCore::RenderBox::computePositionedLogicalHeightUsing):
+ * rendering/RenderBox.h:
+ (RenderBox):
+ * rendering/RenderDeprecatedFlexibleBox.cpp:
+ (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
+ * rendering/RenderFileUploadControl.cpp:
+ (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
+ (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::computePreferredLogicalWidths):
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::computePreferredLogicalWidths):
+ * rendering/RenderSlider.cpp:
+ (WebCore::RenderSlider::computePreferredLogicalWidths):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::computePreferredLogicalWidths):
+
+2012-09-10 Jer Noble <jer.noble@apple.com>
+
+ Unreviewed; rolling out r128081.
+ http://trac.webkit.org/changeset/128081
+ https://bugs.webkit.org/show_bug.cgi?id=96134
+
+ New test http/tests/media/video-donottrack.html fails to run on Apple test bots.
+
+ * html/HTMLMediaElement.cpp:
+ * html/HTMLMediaElement.h:
+ (HTMLMediaElement):
+ * loader/FrameLoaderClient.h:
+ * platform/graphics/MediaPlayer.h:
+ (MediaPlayer):
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
+
+2012-09-10 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Reduce the number of treeScope queries when matching rules.
+ https://bugs.webkit.org/show_bug.cgi?id=96315
+
+ Reviewed by Eric Seidel.
+
+ In the worst case, treeScope() requires a HashMap lookup, which could be slow. Since the value is always the same for the element,
+ we can just ask for it once.
+
+ No new tests, no change in behavior.
+
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::collectMatchingRulesForList): Moved the call to treeScope out of the loop.
+
+2012-09-10 Adam Barth <abarth@chromium.org>
+
+ [V8] V8PerIsolateData::m_toStringTemplate leaks memory
+ https://bugs.webkit.org/show_bug.cgi?id=96322
+
+ Reviewed by Kentaro Hara.
+
+ We never call Dispose to balance the call to v8::Persistent::New. This
+ patch uses ScopedPersistent to call Dispose automatically.
+
+ * bindings/v8/V8PerIsolateData.cpp:
+ (WebCore::V8PerIsolateData::toStringTemplate):
+ - I've changed this function to return a new local handle in case
+ anyone is trying to hold on to these handles during shutdown.
+ * bindings/v8/V8PerIsolateData.h:
+ (V8PerIsolateData):
+
+2012-09-10 Adam Barth <abarth@chromium.org>
+
+ [V8] V8LazyEventListener::prepareListenerObject uses inefficient string operations
+ https://bugs.webkit.org/show_bug.cgi?id=96324
+
+ Reviewed by Kentaro Hara.
+
+ Previously, this code called String::append several times, which
+ mallocs a new string buffer each time. This patch switches this code to
+ use operator+, which uses StringAppend to optimize these operations
+ down to a single malloc.
+
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::prepareListenerObject):
+
+2012-09-10 Adam Barth <abarth@chromium.org>
+
+ [V8] V8AuxiliaryContext used by IDB leaks memory
+ https://bugs.webkit.org/show_bug.cgi?id=96317
+
+ Reviewed by Tony Chang.
+
+ Before this patch, we leaked m_auxiliaryContext on V8PerIsolateData
+ because no one ever called Dispose to balance the call to
+ V8::Context::New. This patch uses ScopedPersistent to call Dispose
+ automatically.
+
+ Also, I've deleted the V8AuxiliaryContext because it just reinvents
+ V8::Context::Scope.
+
+ * bindings/v8/IDBBindingUtilities.cpp:
+ (WebCore::createIDBKeyFromSerializedValueAndKeyPath):
+ (WebCore::injectIDBKeyIntoSerializedValue):
+ * bindings/v8/V8PerIsolateData.cpp:
+ (WebCore::V8PerIsolateData::ensureAuxiliaryContext):
+ (WebCore):
+ * bindings/v8/V8PerIsolateData.h:
+ (V8PerIsolateData):
+ * bindings/v8/V8Utilities.cpp:
+ * bindings/v8/V8Utilities.h:
+
+2012-09-10 Adam Barth <abarth@chromium.org>
+
+ [V8] currentDocument doesn't need to handle the case where there is no v8::Context
+ https://bugs.webkit.org/show_bug.cgi?id=96312
+
+ Reviewed by Eric Seidel.
+
+ This function is always called while V8 is on the stack. It doesn't
+ need to handle this impossible error condition.
+
+ * bindings/v8/BindingState.cpp:
+ (WebCore::currentDocument):
+
+2012-09-10 Adam Barth <abarth@chromium.org>
+
+ [V8] Inline firstFrame and currentFrame into their unique callers
+ https://bugs.webkit.org/show_bug.cgi?id=96309
+
+ Reviewed by Eric Seidel.
+
+ These functions have only one caller. We'd prefer not to have more
+ callers (because there's usually no reason to indirect through the
+ Frame), so we should inline them into their one caller (which is the
+ Chromium WebKit API).
+
+ * bindings/js/BindingState.h:
+ (WebCore):
+ * bindings/v8/BindingState.cpp:
+ * bindings/v8/BindingState.h:
+ (WebCore):
+ * bindings/v8/ScriptController.cpp:
+ * bindings/v8/ScriptController.h:
+ (ScriptController):
+
+2012-09-10 Justin Novosad <junov@chromium.org>
+
+ Implement canvas v5 line dash feature
+ https://bugs.webkit.org/show_bug.cgi?id=82560
+
+ Reviewed by Darin Adler.
+
+ Adding new canvas 2d context API methods getLineDash and setLineDash,
+ and new attribute lineDashOffset. Implementation mostly based on
+ the existing webkitLineDash feature, with changes that reflect the
+ canvas v5 specification. This change is visible to all JS ports,
+ unlike webkitLineDash which is not exposed to V8. The new lineDash
+ and the legacy webkitLineDash features access the same rendering
+ context state. The JavasScriptCore binding layer was augmented to
+ support the sequence<float> IDL type.
+
+ Tests: fast/canvas/canvas-lineDash-invalid.html
+ fast/canvas/canvas-lineDash.html
+
+ * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
+ (WebCore::JSCanvasRenderingContext2D::webkitLineDash):
+ (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
+ * bindings/js/JSDOMBinding.h:
+ Added template specialization on float to NativeValueTraits in order to
+ add support for the sequence<double> IDL type to JavaScriptCore.
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::getLineDash):
+ New 2D canvas API method, returns the current line dash array
+ (WebCore::lineDashSequenceIsValid):
+ Returns true if the line dash array contains only non-negative finite
+ numbers.
+ (WebCore::CanvasRenderingContext2D::setLineDash):
+ New 2D canvas API method, set the line dash array.
+ (WebCore::CanvasRenderingContext2D::setWebkitLineDash):
+ Legacy implementation, does not double the new line dash array if
+ it contains an odd number of elements. Just accepts it as is.
+ (WebCore::CanvasRenderingContext2D::lineDashOffset):
+ Attribute getter
+ (WebCore::CanvasRenderingContext2D::setLineDashOffset):
+ Attribute setter
+ (WebCore::CanvasRenderingContext2D::webkitLineDashOffset):
+ Alias for lineDashOffset
+ (WebCore::CanvasRenderingContext2D::setWebkitLineDashOffset):
+ Alias for setLineDashOffset
+ (WebCore::CanvasRenderingContext2D::applyLineDash):
+ Sends the line dash state to the GraphicsContext
+ * html/canvas/CanvasRenderingContext2D.h:
+ (CanvasRenderingContext2D):
+ (State):
+ * html/canvas/CanvasRenderingContext2D.idl:
+ * platform/graphics/DashArray.h:
+
+2012-09-10 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r128109.
+ http://trac.webkit.org/changeset/128109
+ https://bugs.webkit.org/show_bug.cgi?id=96326
+
+ broke win and lion builds (Requested by kling on #webkit).
+
+ * WebCore.exp.in:
+ * dom/Element.cpp:
+ (WebCore::Element::createMutableAttributeData):
+ * dom/ElementAttributeData.cpp:
+ (WebCore::immutableElementAttributeDataSize):
+ (WebCore::ElementAttributeData::createImmutable):
+ (WebCore::ElementAttributeData::ElementAttributeData):
+ (WebCore::ElementAttributeData::~ElementAttributeData):
+ (WebCore::ElementAttributeData::addAttribute):
+ (WebCore::ElementAttributeData::removeAttribute):
+ (WebCore::ElementAttributeData::reportMemoryUsage):
+ (WebCore::ElementAttributeData::cloneDataFrom):
+ (WebCore::ElementAttributeData::clearAttributes):
+ * dom/ElementAttributeData.h:
+ (WebCore):
+ (WebCore::ElementAttributeData::create):
+ (ElementAttributeData):
+ (WebCore::ElementAttributeData::isMutable):
+ (WebCore::ElementAttributeData::makeMutable):
+ (WebCore::ElementAttributeData::length):
+ (WebCore::ElementAttributeData::attributeItem):
+
+2012-09-10 Chris Fleizach <cfleizach@apple.com>
+
+ AccessibilityNodeObject* is not in Mac xcode file
+ https://bugs.webkit.org/show_bug.cgi?id=96327
+
+ Reviewed by Sam Weinig.
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+2012-09-07 Jon Lee <jonlee@apple.com>
+
+ Update notifications to latest spec
+ https://bugs.webkit.org/show_bug.cgi?id=91726
+ <rdar://problem/11910451>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Among the changes:
+
+ Addition of lang attribute
+ http://lists.w3.org/Archives/Public/public-web-notification/2012Jul/0025.html
+
+ Specification of icon URL is icon instead of iconURL
+ http://lists.w3.org/Archives/Public/public-web-notification/2012Jul/0012.html
+
+ Tests are not possible since at best they only verify exposure of the attributes, which isn't
+ terribly useful, and use of the attributes depend on the platform.
+
+ * Modules/notifications/Notification.cpp:
+ (WebCore::Notification::create): Add support for reading lang, dir, and icon from option dictionary.
+ * Modules/notifications/Notification.h:
+ (Notification): Make url() and setURL(), which are used for HTML notifications, only available with
+ ENABLE(LEGACY_NOTIFICATIONS).
+ (WebCore::Notification::setIconURL): Added so that it can be set from the option dictionary.
+ (WebCore::Notification::lang):
+ (WebCore::Notification::setLang):
+ * Modules/notifications/Notification.idl: According to specification, dir is not exposed.
+
+2012-08-31 Jon Lee <jonlee@apple.com>
+
+ The options dictionary in Notification constructor should not accept event listeners
+ https://bugs.webkit.org/show_bug.cgi?id=95538
+ <rdar://problem/12213901>
+
+ Reviewed by Alexey Proskuryakov.
+
+ The latest spec only allows setting the event listeners after the notification has been created.
+
+ Test: http/tests/notifications/events-in-dictionary.html
+
+ * Modules/notifications/Notification.cpp:
+ (WebCore::Notification::create): Do not look for the event handlers in the options dictionary.
+
+2012-09-10 Tony Chang <tony@chromium.org>
+
+ Rename computeLogicalWidth to updateLogicalWidth
+ https://bugs.webkit.org/show_bug.cgi?id=96288
+
+ Reviewed by Ojan Vafai.
+
+ Also rename recomputeLogicalWidth to updateLogicalWidthAndColumnWidth.
+ Also rename RenderTableCell::updateLogicalWidth to RenderTableCell::setCellLogicalWidth.
+
+ No new tests, this is just a refactor.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::updateLogicalWidthAndColumnWidth):
+ (WebCore::RenderBlock::layoutBlock):
+ (WebCore::RenderBlock::layoutPositionedObjects):
+ (WebCore::RenderBlock::insertFloatingObject):
+ (WebCore::RenderBlock::getClearDelta):
+ * rendering/RenderBlock.h:
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::updateLogicalWidth):
+ * rendering/RenderBox.h:
+ (RenderBox):
+ (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly):
+ * rendering/RenderDeprecatedFlexibleBox.cpp:
+ (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
+ * rendering/RenderEmbeddedObject.cpp:
+ (WebCore::RenderEmbeddedObject::layout):
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::layoutBlock):
+ * rendering/RenderFlowThread.cpp:
+ (WebCore::RenderFlowThread::layout):
+ (WebCore::RenderFlowThread::updateLogicalWidth):
+ * rendering/RenderFlowThread.h:
+ * rendering/RenderGrid.cpp:
+ (WebCore::RenderGrid::layoutBlock):
+ * rendering/RenderHTMLCanvas.cpp:
+ (WebCore::RenderHTMLCanvas::canvasSizeChanged):
+ * rendering/RenderIFrame.cpp:
+ (WebCore::RenderIFrame::updateLogicalWidth):
+ (WebCore::RenderIFrame::layoutSeamlessly):
+ (WebCore::RenderIFrame::layout):
+ * rendering/RenderIFrame.h:
+ (RenderIFrame):
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::imageDimensionsChanged):
+ * rendering/RenderMeter.cpp:
+ (WebCore::RenderMeter::updateLogicalWidth):
+ * rendering/RenderMeter.h:
+ (RenderMeter):
+ * rendering/RenderMultiColumnBlock.cpp:
+ (WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth):
+ * rendering/RenderMultiColumnBlock.h:
+ (RenderMultiColumnBlock):
+ * rendering/RenderMultiColumnSet.cpp:
+ (WebCore::RenderMultiColumnSet::updateLogicalWidth):
+ * rendering/RenderMultiColumnSet.h:
+ (RenderMultiColumnSet):
+ * rendering/RenderReplaced.cpp:
+ (WebCore::RenderReplaced::layout):
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::updateLogicalWidth):
+ (WebCore::RenderTable::layout):
+ * rendering/RenderTable.h:
+ (RenderTable):
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::updateLogicalWidth):
+ (WebCore::RenderTableCell::setCellLogicalWidth):
+ * rendering/RenderTableCell.h:
+ (RenderTableCell):
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::setCellLogicalWidths):
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::updateLogicalWidth):
+ * rendering/RenderView.h:
+ * rendering/svg/RenderSVGForeignObject.cpp:
+ (WebCore::RenderSVGForeignObject::updateLogicalWidth):
+ * rendering/svg/RenderSVGForeignObject.h:
+ (RenderSVGForeignObject):
+ * rendering/svg/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::layout):
+
+2012-09-10 Andreas Kling <kling@webkit.org>
+
+ ElementAttributeData: Use subclasses to manage varying object layouts.
+ <http://webkit.org/b/94465>
+
+ Reviewed by Antti Koivisto.
+
+ Add two ElementAttributeData subclasses:
+
+ - MutableElementAttributeData
+ - ImmutableElementAttributeData
+
+ The ElementAttributeData::m_isMutable bit determines which subclass to cast to when accessing
+ the attribute storage. Added mutableAttributeVector() and immutableAttributeArray() helpers
+ to ElementAttributeData (with appropriate assertions.)
+
+ This patch removes one step of indirection in the mutable case, since the Vector<Attribute> is no
+ longer heap-allocated, but part of MutableElementAttributeData.
+
+ Added a WTF::deleteOwnedPtr(ElementAttributeData*) specialization so that the appropriate subclass
+ destructor is called for these objects.
+
+ * WebCore.exp.in:
+ * dom/Element.cpp:
+ (WebCore::Element::createMutableAttributeData):
+ * dom/ElementAttributeData.cpp:
+ (WebCore::ElementAttributeData::createImmutable):
+ (WebCore::ElementAttributeData::create):
+ (WebCore::ElementAttributeData::ElementAttributeData):
+ (WebCore::MutableElementAttributeData::MutableElementAttributeData):
+ (WebCore::ImmutableElementAttributeData::ImmutableElementAttributeData):
+ (WebCore::ImmutableElementAttributeData::~ImmutableElementAttributeData):
+ (WebCore::ElementAttributeData::makeMutableCopy):
+ (WebCore::ElementAttributeData::addAttribute):
+ (WebCore::ElementAttributeData::removeAttribute):
+ (WebCore::ElementAttributeData::reportMemoryUsage):
+ (WebCore::ElementAttributeData::cloneDataFrom):
+ (WebCore::ElementAttributeData::clearAttributes):
+ * dom/ElementAttributeData.h:
+ (ElementAttributeData):
+ (WebCore::ElementAttributeData::isMutable):
+ (ImmutableElementAttributeData):
+ (MutableElementAttributeData):
+ (WebCore::MutableElementAttributeData::MutableElementAttributeData):
+ (WebCore::ElementAttributeData::immutableAttributeArray):
+ (WebCore::ElementAttributeData::mutableAttributeVector):
+ (WebCore::ElementAttributeData::length):
+ (WebCore::ElementAttributeData::attributeItem):
+
+2012-09-10 Tony Chang <tony@chromium.org>
+
+ Remove stray spaces found after :: in case statements
+ https://bugs.webkit.org/show_bug.cgi?id=96314
+
+ Reviewed by Ojan Vafai.
+
+ New contributors keep copy/pasting this style error and it makes me sad.
+ Also remove the extra spaces in MediaQueryEvaluator.cpp.
+
+ No new tests, this is just a style refactor.
+
+ * css/CSSPrimitiveValue.cpp:
+ (WebCore::isValidCSSUnitTypeForDoubleConversion):
+ (WebCore::unitCategory):
+ * css/MediaQueryEvaluator.cpp:
+ (WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
+
+2012-09-10 Adam Barth <abarth@webkit.org>
+
+ [V8] setNamedHiddenWindowReference doesn't need to be a special case
+ https://bugs.webkit.org/show_bug.cgi?id=96198
+
+ Reviewed by Nate Chapin.
+
+ Prior to this patch, the DOMWindow cached its properties on the outter
+ global object rather than on the Holder of the properties. (We cache
+ properties to prevent their DOM wrappers from being garbage collected
+ too early.) There doesn't seem to be any reason why DOMWindow need to
+ be special-cased in this regard. We can just cache the properities on
+ their Holders, as usual.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ (GenerateNormalAttrGetter):
+ * bindings/v8/V8DOMWrapper.cpp:
+ * bindings/v8/V8DOMWrapper.h:
+ (V8DOMWrapper):
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ * page/Location.idl:
+ - Previously, Location had a custom toV8 function so that
+ document.location would cache its wrapper in the same place as
+ window.location. However, that's no longer necessary as the
+ DOMWindow now holds its Document in a hidden property, which
+ means the DOMWindow keeps the cached location property on
+ Document alive anyway.
+
+2012-09-10 Anders Carlsson <andersca@apple.com>
+
+ Silence a warning when running update-webkit-localizable-strings
+ https://bugs.webkit.org/show_bug.cgi?id=96307
+
+ Reviewed by John Sullivan.
+
+ Since both the blockedPluginByContentSecurityPolicyText and insecurePluginVersionText strings use exact the same wording,
+ use WEB_UI_STRING_KEY to indicate that they are different.
+
+ * English.lproj/Localizable.strings:
+ Update the localizable strings file.
+
+ * platform/LocalizedStrings.cpp:
+ (WebCore::blockedPluginByContentSecurityPolicyText):
+ (WebCore::insecurePluginVersionText):
+
+2012-09-10 Adam Barth <abarth@chromium.org>
+
+ [V8] V8HTMLDocument::write and friends should not indirect through Frame
+ https://bugs.webkit.org/show_bug.cgi?id=96289
+
+ Reviewed by Eric Seidel.
+
+ There is no reason why document.write and friends need to indirect
+ through the Frame to find the active document. This patch makes these
+ functions work the same as the JSC versions.
+
+ * bindings/v8/BindingState.cpp:
+ * bindings/v8/BindingState.h:
+ - This patch removes the last callers of activeFrame, so we can
+ remove the function entirely.
+ * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
+ (WebCore::V8HTMLDocument::writeCallback):
+ (WebCore::V8HTMLDocument::writelnCallback):
+ (WebCore::V8HTMLDocument::openCallback):
+
+2012-09-10 Adam Barth <abarth@chromium.org>
+
+ [V8] Constructors try to handle errors that cannot occur
+ https://bugs.webkit.org/show_bug.cgi?id=96304
+
+ Reviewed by Kentaro Hara.
+
+ There's no reason for constructors to indirect through the Frame. Now
+ that we can reliably get the Document from the v8::Context, we can just
+ grab it without worrying about handling error conditions related to not
+ being able to find the Document.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ (GenerateNamedConstructorCallback):
+ * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
+ (WebCore::V8TestNamedConstructorConstructorCallback):
+ * bindings/v8/custom/V8AudioContextCustom.cpp:
+ (WebCore::V8AudioContext::constructorCallback):
+ * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
+ (WebCore::v8HTMLImageElementConstructorCallback):
+
+2012-09-10 Andrey Kosyakov <caseq@chromium.org>
+
+ Web Inspector: highlight of paint rectangles is broken
+ https://bugs.webkit.org/show_bug.cgi?id=96276
+
+ Reviewed by Vsevolod Vlasov.
+
+ * inspector/InspectorOverlay.cpp:
+ (WebCore::InspectorOverlay::drawRectHighlight): Fix JS method name to match the one in InspectorOverlayPage.html
+
+2012-09-10 Catalin Badea <badea@adobe.com>
+
+ webkit build for 64-bit Mac chromium
+ https://bugs.webkit.org/show_bug.cgi?id=95977
+
+ Reviewed by Eric Seidel.
+
+ Use the correct definitions for NS types in order to fix build issues for 64-bit chromium on mac.
+
+ * platform/chromium/PlatformSupport.h:
+ Remove a deprecated Carbon typedef.
+ * platform/graphics/FloatPoint.h:
+ (FloatPoint):
+ * platform/graphics/FloatRect.h:
+ (FloatRect):
+ * platform/graphics/FloatSize.h:
+ (FloatSize):
+ * platform/graphics/IntRect.h:
+ (IntRect):
+
+2012-09-10 Hans Muller <hmuller@adobe.com>
+
+ [CSS Exlusions] add support for the basic shapes
+ https://bugs.webkit.org/show_bug.cgi?id=95490
+
+ Reviewed by David Hyatt.
+
+ Initial commit of a subset of the ExclusionShape classes.
+
+ This set of classes enables the exclusions layout code to determine how to break up a line into segments
+ that will fit within or around a shape, given the Y coordinates of the line's top edge and bottom edges.
+ The ExclusionShape class represents BasicShapes whose coordinates have been resolved to actual values. It
+ provides a pair of methods, getInsideIntervals() and getOutsideIntervals(), that return the line segments'
+ start and end X coordinates, and a method that computes the shape's bounding box. The line segments'
+ coordinates are represented by a Vector of ExclusionIntervals. ExclusionInterval is just a pair
+ of X coordinates.
+
+ The other classes, ExclusionRectangle (and TBD ExclusionPolygon et al), are internal to the
+ ExclusionShape implementation.
+
+ This is the initial version of the ExclusionShapes code and it's only being used to the limited extent WebKit
+ currently supports shape-inside exclusions. It will be extended to support computing a minimal
+ line segment's "first layout location" and other improvements, in tandem with the exclusions layout code.
+
+ No new tests have been added since this code just replaces a provisional implementation stub.
+
+ More information about the algorithms used by the ExclusionShapes classes can be found here: http://hansmuller-webkit.blogspot.com.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * Target.pri:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * rendering/ExclusionInterval.cpp: Added.
+ (WebCore):
+ (WebCore::IntervalX1Comparator::operator()):
+ Compare x1 ExclusionInterval fields.
+ (WebCore::ExclusionInterval::intersect):
+ Compute the intersection of this interval with another interval. Unlike merge/subtract,
+ the result is always a single interval.
+ (WebCore::sortExclusionIntervals):
+ Sort a vector of intervals by their x1 (start) field.
+ (WebCore::mergeExclusionIntervals):
+ Union of two vectors of intervals.
+ (WebCore::intersectExclusionIntervals):
+ Intersecion of two vectors of intervals.
+ (WebCore::subtractExclusionIntervals):
+ Difference of two vectors of intervals.
+
+ * rendering/ExclusionInterval.h: Added.
+ Represents the actual start and end coordinates of a horizontal line segment.
+ (WebCore):
+ (ExclusionInterval):
+ (WebCore::ExclusionInterval::ExclusionInterval):
+
+ * rendering/ExclusionRectangle.cpp: Added.
+ (WebCore):
+ (WebCore::ellipseXIntercept):
+ (WebCore::ExclusionRectangle::getOutsideIntervals):
+ (WebCore::ExclusionRectangle::getInsideIntervals):
+
+ * rendering/ExclusionRectangle.h: Added.
+ A subclass of ExclusionShape used to represent rounded rectangles, circles, and ellipses.
+ (WebCore):
+ (ExclusionRectangle)
+ (WebCore::ExclusionRectangle::ExclusionRectangle):
+ (WebCore::ExclusionRectangle::shapeBoundingBox):
+
+ * rendering/ExclusionShape.cpp: Added.
+ (WebCore):
+ (WebCore::createExclusionRectangle):
+ (WebCore::createExclusionCircle):
+ (WebCore::createExclusionEllipse):
+ (WebCore::Exclusionhape::createExclusionShape):
+ Creates an ExclusionShape given a BasicShape and the width/height of a border box. Currently rounded
+ rectangles, circles, and ellipses are supported. Support for polygons will be included in the
+ next patch.
+
+ * rendering/ExclusionShape.h: Added.
+ The rest of the exclusions implementation will only depend on the definitions included by this file: ExclusionShape,
+ and ExclusionInterval. ExclusionShape subclasses define shape-specific implementations of the methods that compute the
+ horizontal intervals that fit within or around a specific shape, a shape's bounding box, and - in future
+ revisions - other operations required by the exclusions implementation, like computing the first possible
+ layout location within a shape. ExclusionShapes are created for BasicShape objects as needed, using the
+ createExclusionShape() method.
+ (WebCore):
+ (ExclusionShape):
+ (WebCore::ExclusionShape::~ExclusionShape):
+
+ * rendering/WrapShapeInfo.cpp:
+ (WebCore::WrapShapeInfo::computeShapeSize):
+ Create an ExclusionShape for the RenderBlock's BasicShape.
+ (WebCore::WrapShapeInfo::computeSegmentsForLine):
+ Use ExclusionShape::getInsideIntervals() to compute the shape-inside intervals within which a line will fit.
+
+ * rendering/WrapShapeInfo.h:
+ (WebCore::WrapShapeInfo::shapeTop):
+ Removed - no longer used.
+ (WrapShapeInfo):
+ (WebCore::WrapShapeInfo::lineState):
+ Use the ExclusionShape's bounding box to compute lineState.
+
+2012-09-07 Jer Noble <jer.noble@apple.com>
+
+ <audio> and <video> should send Do Not Track when appropriate
+ https://bugs.webkit.org/show_bug.cgi?id=96134
+
+ Reviewed by Eric Carlson.
+
+ Add a FrameLoaderClient function to determine whether the DNT header should be sent,
+ and plumb that new function down into the MediaPlayerPrivateAVFoundationObjC class.
+
+ Test: http/tests/media/video-donottrack.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::mediaPlayerShouldSendDoNotTrackHTTPHeader):
+ Pass the question on through to the FrameLoaderClient.
+ * html/HTMLMediaElement.h:
+ * loader/FrameLoaderClient.h:
+ (WebCore::FrameLoaderClient::shouldSendDoNotTrackHTTPHeader):
+ Call through to the implementation in WebKit or WebKit2.
+ * platform/graphics/MediaPlayer.h:
+ (WebCore::MediaPlayerClient::mediaPlayerShouldSendDoNotTrackHTTPHeader):
+ Pass the question on to the HTMLMediaElement.
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
+ If we should send the DNT header, add it to the header options array
+ when creating the AVAsset.
+
+2012-08-31 Jon Lee <jonlee@apple.com>
+
+ The options dictionary in Notification constructor should not accept event listeners
+ https://bugs.webkit.org/show_bug.cgi?id=95538
+ <rdar://problem/12213901>
+
+ Reviewed by Alexey Proskuryakov.
+
+ The latest spec only allows setting the event listeners after the notification has been created.
+
+ Test: http/tests/notifications/events-in-dictionary.html
+
+ * Modules/notifications/Notification.cpp:
+ (WebCore::Notification::create): Do not look for the event handlers in the options dictionary.
+
+2012-09-04 Robert Hogan <robert@webkit.org>
+
+ CSS 2.1 failure: content-counter-010.htm fails
+ https://bugs.webkit.org/show_bug.cgi?id=81447
+
+ Reviewed by Alexey Proskuryakov.
+
+ Test: fast/css/content-counter-010.htm
+
+ Per http://lists.w3.org/Archives/Public/public-css-testsuite/2010Nov/0064.html, the correct rendering of
+ 7000 to 7999 in Armenian changed in Nov 2010. Update implementation to match the revised spec.
+
+ * rendering/RenderListMarker.cpp:
+ (WebCore::toArmenianUnder10000):
+
+2012-09-10 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ Font value should be parsed as a individual property
+ https://bugs.webkit.org/show_bug.cgi?id=96271
+
+ Reviewed by Eric Seidel.
+
+ Parsing the font value as an individual CSS property instead of a style
+ body should make it significantly more effective and will not
+ validate something like ctx.font = "25px serif; background: green".
+
+ Updated canvas/philip/tests/2d.text.font.parse.invalid.html to cover
+ this use case.
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::setFont):
+
+2012-09-10 Silvia Pfeiffer <silviapf@chromium.org>
+
+ [Chromium] Handle smaller sizes of media elements in media controls.
+ https://bugs.webkit.org/show_bug.cgi?id=89344
+
+ Reviewed by Eric Carlson.
+
+ The redesign of the Chrome video controls calls for successive removal of individual
+ elements in the Chrome video and audio controls as the element becomes smaller in width.
+ It also requires decreasing padding on the enclosure element of videos.
+
+ This patch introduces a layout() function into the MediaControlRootElementChromium to
+ react to any changes of the media controls width and appropriately hide/show the
+ interactive elements and apply the correct padding on video elements.
+
+ Tests: platform/chromium/media/controls-audio-sizes.html
+ platform/chromium/media/controls-video-sizes-padding.html
+ platform/chromium/media/controls-video-sizes.html
+
+ * html/shadow/MediaControlRootElementChromium.cpp:
+ (WebCore):
+ (RenderMediaControlPanelEnclosureElement):
+ Introduce a renderer for the MediaControlPanelEnclosureElement in which to deal with the layout changes.
+ Following the pattern in MediaControlElements.cpp .
+ (WebCore::RenderMediaControlPanelEnclosureElement::RenderMediaControlPanelEnclosureElement):
+ Definition of the new RenderMediaControlPanelEnclosureElement class.
+ (WebCore::RenderMediaControlPanelEnclosureElement::layout):
+ Definition of the layout() function for the renderer. This does most of the actual work.
+ (WebCore::MediaControlPanelEnclosureElement::createRenderer):
+ Create the renderer for the MediaControlPanelEnclosureElement.
+ (WebCore::MediaControlPanelEnclosureElement::updatePadding):
+ Update padding as part of the MediaControlPanelEnclosureElement functions.
+ (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
+ Add a class property to store whether the duration and current time display are hidden.
+ (WebCore::MediaControlRootElementChromium::reset):
+ Include the hiding/showing of the timeline into the updateTimeDisplay() function to reduce code duplication.
+ (WebCore::MediaControlRootElementChromium::playbackStarted):
+ Include the hiding/showing of the timeline and time display into the updateTimeDisplay() function
+ to reduce code duplication.
+ (WebCore::MediaControlRootElementChromium::playbackProgressed):
+ Include the hiding/showing of the timeline into the updateTimeDisplay() function to reduce code duplication.
+ (WebCore::MediaControlRootElementChromium::playbackStopped):
+ Include the hiding/showing of the timeline into the updateTimeDisplay() function to reduce code duplication.
+ (WebCore::MediaControlRootElementChromium::updateTimeDisplay):
+ Only show time display if not hidden. Add timeline update here to reduce code duplication/
+ (WebCore::MediaControlRootElementChromium::hideVolumeSlider):
+ New function to allow layout() function to hide the volume slider.
+ (WebCore::MediaControlRootElementChromium::showTimeDisplay):
+ New function to allow layout() function to show the time display.
+ (WebCore::MediaControlRootElementChromium::hideTimeDisplay):
+ New function to allow layout() function to hide the time display.
+ (WebCore::MediaControlRootElementChromium::showMuteButton):
+ New function to allow layout() function to show the mute button.
+ (WebCore::MediaControlRootElementChromium::hideMuteButton):
+ New function to allow layout() function to hide the mute button.
+ (WebCore::MediaControlRootElementChromium::showFullscreenButton):
+ New function to allow layout() function to show the fullscreen button.
+ (WebCore::MediaControlRootElementChromium::hideFullscreenButton):
+ New function to allow layout() function to hide the fullscreen button.
+ (WebCore::MediaControlRootElementChromium::showTimeline):
+ New function to allow layout() function to show the timeline.
+ (WebCore::MediaControlRootElementChromium::hideTimeline):
+ New function to allow layout() function to hide the timeline.
+
+ * html/shadow/MediaControlRootElementChromium.h:
+ (MediaControlPanelEnclosureElement):
+ Add a createRender() and a updatePadding() function to the MediaControlPanelEnclosureElement class.
+ (MediaControlRootElementChromium):
+ Add hide/show functions for volume slider, time display, mute button, fullscreen button and timeline.
+ Add a class property to store whether the duration and current time display are hidden.
+
+2012-09-10 Joanmarie Diggs <jdiggs@igalia.com>
+
+ [GTK][a11y] editing/pasteboard/paste-blockquote-into-blockquote-4.html crashes
+ https://bugs.webkit.org/show_bug.cgi?id=96199
+
+ Reviewed by Martin Robinson.
+
+ Added sanity check to correct erroneous assumption that there will
+ always be a child object.
+
+ No new tests as the bug crashes two existing Layout Tests which should
+ no longer crash as a result of this fix.
+
+ * accessibility/gtk/AccessibilityObjectAtk.cpp:
+ (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
+
2012-09-10 Mike West <mkwst@chromium.org>
Clarify the cause of console warnings generated by "cross-origin" access to sandboxed iframes.
diff --git a/Source/WebCore/DerivedSources.pri b/Source/WebCore/DerivedSources.pri
index 011d7f470..a269e0573 100644
--- a/Source/WebCore/DerivedSources.pri
+++ b/Source/WebCore/DerivedSources.pri
@@ -26,7 +26,7 @@ XLINK_NAMES = $$PWD/svg/xlinkattrs.in
CSSBISON = $$PWD/css/CSSGrammar.y
-contains(DEFINES, ENABLE_XSLT=1) {
+enable?(XSLT) {
XMLVIEWER_CSS = $$PWD/xml/XMLViewer.css
XMLVIEWER_JS = $$PWD/xml/XMLViewer.js
}
@@ -69,7 +69,7 @@ ARRAY_BUFFER_VIEW_CUSTOM_SCRIPT_SOURCE = $$PWD/bindings/v8/custom/V8ArrayBufferV
XPATHBISON = $$PWD/xml/XPathGrammar.y
-contains(DEFINES, ENABLE_SVG=1) {
+enable?(SVG) {
EXTRACSSPROPERTIES += $$PWD/css/SVGCSSPropertyNames.in
EXTRACSSVALUES += $$PWD/css/SVGCSSValueKeywords.in
}
@@ -479,7 +479,7 @@ IDL_BINDINGS += \
$$PWD/xml/XPathEvaluator.idl \
$$PWD/xml/XSLTProcessor.idl
-contains(DEFINES, ENABLE_SVG=1) {
+enable?(SVG) {
IDL_BINDINGS += \
$$PWD/svg/SVGAElement.idl \
$$PWD/svg/SVGAltGlyphDefElement.idl \
@@ -626,14 +626,14 @@ contains(DEFINES, ENABLE_SVG=1) {
$$PWD/svg/SVGZoomEvent.idl
}
-contains(DEFINES, ENABLE_GAMEPAD=1) {
+enable?(GAMEPAD) {
IDL_BINDINGS += \
$$PWD/Modules/gamepad/Gamepad.idl \
$$PWD/Modules/gamepad/GamepadList.idl \
$$PWD/Modules/gamepad/NavigatorGamepad.idl
}
-contains(DEFINES, ENABLE_VIDEO_TRACK=1) {
+enable?(VIDEO_TRACK) {
IDL_BINDINGS += \
$$PWD/html/track/TextTrack.idl \
$$PWD/html/track/TextTrackCue.idl \
@@ -642,7 +642,7 @@ contains(DEFINES, ENABLE_VIDEO_TRACK=1) {
$$PWD/html/track/TrackEvent.idl \
}
-contains(DEFINES, ENABLE_MEDIA_SOURCE=1) {
+enable?(MEDIA_SOURCE) {
IDL_BINDINGS += \
$$PWD/Modules/mediasource/MediaSource.idl \
$$PWD/Modules/mediasource/SourceBuffer.idl \
@@ -653,7 +653,7 @@ mathmlnames.output = MathMLNames.cpp
mathmlnames.input = MATHML_NAMES
mathmlnames.depends = $$PWD/mathml/mathattrs.in
mathmlnames.script = $$PWD/dom/make_names.pl
-mathmlnames.commands = perl -I$$PWD/bindings/scripts $$mathmlnames.script --tags $$PWD/mathml/mathtags.in --attrs $$PWD/mathml/mathattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
+mathmlnames.commands = perl -I$$PWD/bindings/scripts $$mathmlnames.script --tags $$PWD/mathml/mathtags.in --attrs $$PWD/mathml/mathattrs.in --extraDefines \"$${DEFINES} $$configDefines()\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
mathmlnames.extra_sources = MathMLElementFactory.cpp
GENERATORS += mathmlnames
@@ -662,7 +662,7 @@ svgnames.output = SVGNames.cpp
svgnames.input = SVG_NAMES
svgnames.depends = $$PWD/svg/svgattrs.in
svgnames.script = $$PWD/dom/make_names.pl
-svgnames.commands = perl -I$$PWD/bindings/scripts $$svgnames.script --tags $$PWD/svg/svgtags.in --attrs $$PWD/svg/svgattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
+svgnames.commands = perl -I$$PWD/bindings/scripts $$svgnames.script --tags $$PWD/svg/svgtags.in --attrs $$PWD/svg/svgattrs.in --extraDefines \"$${DEFINES} $$configDefines()\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
svgnames.extra_sources = SVGElementFactory.cpp
svgnames.extra_sources += JSSVGElementWrapperFactory.cpp
GENERATORS += svgnames
@@ -678,7 +678,7 @@ GENERATORS += xlinknames
cssprops.script = $$PWD/css/makeprop.pl
cssprops.output = CSSPropertyNames.cpp
cssprops.input = WALDOCSSPROPS
-cssprops.commands = perl -ne \"print $1\" ${QMAKE_FILE_NAME} $${EXTRACSSPROPERTIES} > ${QMAKE_FUNC_FILE_OUT_PATH}/${QMAKE_FILE_BASE}.in && cd ${QMAKE_FUNC_FILE_OUT_PATH} && perl -I$$PWD/bindings/scripts $$cssprops.script --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME} && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
+cssprops.commands = perl -ne \"print $1\" ${QMAKE_FILE_NAME} $${EXTRACSSPROPERTIES} > ${QMAKE_FUNC_FILE_OUT_PATH}/${QMAKE_FILE_BASE}.in && cd ${QMAKE_FUNC_FILE_OUT_PATH} && perl -I$$PWD/bindings/scripts $$cssprops.script --defines \"$$javascriptFeatureDefines()\" --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME} && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
cssprops.depends = ${QMAKE_FILE_NAME} $${EXTRACSSPROPERTIES} $$cssprops.script
GENERATORS += cssprops
@@ -686,7 +686,7 @@ GENERATORS += cssprops
cssvalues.script = $$PWD/css/makevalues.pl
cssvalues.output = CSSValueKeywords.cpp
cssvalues.input = WALDOCSSVALUES
-cssvalues.commands = perl -ne \"print $1\" ${QMAKE_FILE_NAME} $$EXTRACSSVALUES > ${QMAKE_FUNC_FILE_OUT_PATH}/${QMAKE_FILE_BASE}.in && cd ${QMAKE_FUNC_FILE_OUT_PATH} && perl -I$$PWD/bindings/scripts $$cssvalues.script --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME} && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
+cssvalues.commands = perl -ne \"print $1\" ${QMAKE_FILE_NAME} $$EXTRACSSVALUES > ${QMAKE_FUNC_FILE_OUT_PATH}/${QMAKE_FILE_BASE}.in && cd ${QMAKE_FUNC_FILE_OUT_PATH} && perl -I$$PWD/bindings/scripts $$cssvalues.script --defines \"$$javascriptFeatureDefines()\" --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME} && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
cssvalues.depends = ${QMAKE_FILE_NAME} $${EXTRACSSVALUES} $$cssvalues.script
cssvalues.clean = ${QMAKE_FILE_OUT} ${QMAKE_FUNC_FILE_OUT_PATH}/${QMAKE_FILE_BASE}.h
GENERATORS += cssvalues
@@ -700,7 +700,6 @@ IDL_ATTRIBUTES_FILE = $$PWD/bindings/scripts/IDLAttributes.txt
preprocessIdls.input = IDL_ATTRIBUTES_FILE
preprocessIdls.script = $$PREPROCESS_IDLS_SCRIPT
# FIXME : We need to use only perl at some point.
-EOC = $$escape_expand(\\n\\t)
win_cmd_shell: preprocessIdls.commands = type nul > $$IDL_FILES_TMP $$EOC
else: preprocessIdls.commands = cat /dev/null > $$IDL_FILES_TMP $$EOC
for(binding, IDL_BINDINGS) {
@@ -709,7 +708,7 @@ for(binding, IDL_BINDINGS) {
preprocessIdls.commands += echo $$binding>> $$IDL_FILES_TMP$$EOC
}
preprocessIdls.commands += perl -I$$PWD/bindings/scripts $$preprocessIdls.script \
- --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" \
+ --defines \"$$javascriptFeatureDefines()\" \
--idlFilesList $$IDL_FILES_TMP \
--supplementalDependencyFile ${QMAKE_FUNC_FILE_OUT_PATH}/$$SUPPLEMENTAL_DEPENDENCY_FILE \
--idlAttributesFile $${IDL_ATTRIBUTES_FILE} \
@@ -719,44 +718,38 @@ preprocessIdls.add_output_to_sources = false
preprocessIdls.depends = $$PWD/bindings/scripts/IDLParser.pm $$IDL_BINDINGS
GENERATORS += preprocessIdls
-win32 {
- env_export = set
-} else {
- env_export = export
-}
-
# GENERATOR 1: Generate .h and .cpp from IDLs
generateBindings.input = IDL_BINDINGS
generateBindings.script = $$PWD/bindings/scripts/generate-bindings.pl
-generateBindings.commands = $$env_export \"SOURCE_ROOT=$$toSystemPath($$PWD)\" && perl -I$$PWD/bindings/scripts $$generateBindings.script \
- --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" \
+generateBindings.commands = perl -I$$PWD/bindings/scripts $$generateBindings.script \
+ --defines \"$$javascriptFeatureDefines()\" \
--generator JS \
- --include Modules/filesystem \
- --include Modules/geolocation \
- --include Modules/indexeddb \
- --include Modules/mediasource \
- --include Modules/notifications \
- --include Modules/quota \
- --include Modules/webaudio \
- --include Modules/webdatabase \
- --include Modules/websockets \
- --include css \
- --include dom \
- --include editing \
- --include fileapi \
- --include html \
- --include html/canvas \
- --include html/shadow \
- --include html/track \
- --include inspector \
- --include loader/appcache \
- --include page \
- --include plugins \
- --include storage \
- --include svg \
- --include testing \
- --include workers \
- --include xml \
+ --include $$PWD/Modules/filesystem \
+ --include $$PWD/Modules/geolocation \
+ --include $$PWD/Modules/indexeddb \
+ --include $$PWD/Modules/mediasource \
+ --include $$PWD/Modules/notifications \
+ --include $$PWD/Modules/quota \
+ --include $$PWD/Modules/webaudio \
+ --include $$PWD/Modules/webdatabase \
+ --include $$PWD/Modules/websockets \
+ --include $$PWD/css \
+ --include $$PWD/dom \
+ --include $$PWD/editing \
+ --include $$PWD/fileapi \
+ --include $$PWD/html \
+ --include $$PWD/html/canvas \
+ --include $$PWD/html/shadow \
+ --include $$PWD/html/track \
+ --include $$PWD/inspector \
+ --include $$PWD/loader/appcache \
+ --include $$PWD/page \
+ --include $$PWD/plugins \
+ --include $$PWD/storage \
+ --include $$PWD/svg \
+ --include $$PWD/testing \
+ --include $$PWD/workers \
+ --include $$PWD/xml \
--outputDir ${QMAKE_FUNC_FILE_OUT_PATH} \
--supplementalDependencyFile ${QMAKE_FUNC_FILE_OUT_PATH}/$$SUPPLEMENTAL_DEPENDENCY_FILE \
--preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME}
@@ -838,7 +831,7 @@ htmlnames.output = HTMLNames.cpp
htmlnames.input = HTML_NAMES
htmlnames.script = $$PWD/dom/make_names.pl
htmlnames.depends = $$PWD/html/HTMLAttributeNames.in
-htmlnames.commands = perl -I$$PWD/bindings/scripts $$htmlnames.script --tags $$PWD/html/HTMLTagNames.in --attrs $$PWD/html/HTMLAttributeNames.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
+htmlnames.commands = perl -I$$PWD/bindings/scripts $$htmlnames.script --tags $$PWD/html/HTMLTagNames.in --attrs $$PWD/html/HTMLAttributeNames.in --extraDefines \"$${DEFINES} $$configDefines()\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir ${QMAKE_FUNC_FILE_OUT_PATH}
htmlnames.extra_sources = HTMLElementFactory.cpp
htmlnames.extra_sources += JSHTMLElementWrapperFactory.cpp
GENERATORS += htmlnames
@@ -908,7 +901,7 @@ colordata.clean = ${QMAKE_FILE_OUT}
colordata.depends = $$PWD/make-hash-tools.pl
GENERATORS += colordata
-contains(DEFINES, ENABLE_XSLT=1) {
+enable?(XSLT) {
# GENERATOR 8-C:
xmlviewercss.output = XMLViewerCSS.h
xmlviewercss.input = XMLVIEWER_CSS
@@ -955,4 +948,3 @@ webkitversion.commands = perl $$webkitversion.script --config $$PWD/../WebKit/ma
webkitversion.clean = ${QMAKE_FUNC_FILE_OUT_PATH}/WebKitVersion.h
webkitversion.add_output_to_sources = false
GENERATORS += webkitversion
-
diff --git a/Source/WebCore/English.lproj/Localizable.strings b/Source/WebCore/English.lproj/Localizable.strings
index b5e54ea33..12c96b480 100644
--- a/Source/WebCore/English.lproj/Localizable.strings
+++ b/Source/WebCore/English.lproj/Localizable.strings
Binary files differ
diff --git a/Source/WebCore/English.lproj/localizedStrings.js b/Source/WebCore/English.lproj/localizedStrings.js
index cf4b784d3..66938a35d 100644
--- a/Source/WebCore/English.lproj/localizedStrings.js
+++ b/Source/WebCore/English.lproj/localizedStrings.js
@@ -731,7 +731,7 @@ localizedStrings["Override Geolocation"] = "Override Geolocation";
localizedStrings["Geolocation Position"] = "Geolocation Position";
localizedStrings["Override Device Orientation"] = "Override Device Orientation";
localizedStrings["Note"] = "Note";
-localizedStrings["Forced synchronous layout is a possible performance bottlenck."] = "Forced synchronous layout is a possible performance bottlenck.";
+localizedStrings["Forced synchronous layout is a possible performance bottleneck."] = "Forced synchronous layout is a possible performance bottleneck.";
localizedStrings["Styles invalidated"] = "Styles invalidated";
localizedStrings["Styles recalculation forced"] = "Styles recalculation forced";
localizedStrings["Layout invalidated"] = "Layout invalidated";
diff --git a/Source/WebCore/GNUmakefile.list.am b/Source/WebCore/GNUmakefile.list.am
index df8121eff..cb547d57d 100644
--- a/Source/WebCore/GNUmakefile.list.am
+++ b/Source/WebCore/GNUmakefile.list.am
@@ -2808,7 +2808,6 @@ webcore_sources += \
Source/WebCore/dom/HashChangeEvent.h \
Source/WebCore/dom/KeyboardEvent.cpp \
Source/WebCore/dom/KeyboardEvent.h \
- Source/WebCore/dom/MemoryInstrumentation.h \
Source/WebCore/dom/MessageChannel.cpp \
Source/WebCore/dom/MessageChannel.h \
Source/WebCore/dom/MessageEvent.cpp \
@@ -3434,6 +3433,8 @@ webcore_sources += \
Source/WebCore/html/ImageInputType.h \
Source/WebCore/html/InputType.cpp \
Source/WebCore/html/InputType.h \
+ Source/WebCore/html/InputTypeNames.cpp \
+ Source/WebCore/html/InputTypeNames.h \
Source/WebCore/html/LabelableElement.cpp \
Source/WebCore/html/LabelableElement.h \
Source/WebCore/html/LabelsNodeList.cpp \
@@ -4870,6 +4871,12 @@ webcore_sources += \
Source/WebCore/rendering/CounterNode.h \
Source/WebCore/rendering/EllipsisBox.cpp \
Source/WebCore/rendering/EllipsisBox.h \
+ Source/WebCore/rendering/ExclusionInterval.cpp \
+ Source/WebCore/rendering/ExclusionInterval.h \
+ Source/WebCore/rendering/ExclusionRectangle.cpp \
+ Source/WebCore/rendering/ExclusionRectangle.h \
+ Source/WebCore/rendering/ExclusionShape.cpp \
+ Source/WebCore/rendering/ExclusionShape.h \
Source/WebCore/rendering/FilterEffectRenderer.cpp \
Source/WebCore/rendering/FilterEffectRenderer.h \
Source/WebCore/rendering/FixedTableLayout.cpp \
diff --git a/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp b/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp
index 15be89610..dcdeecd00 100644
--- a/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp
+++ b/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp
@@ -372,22 +372,19 @@ static bool deleteRange(LevelDBTransaction* transaction, const Vector<char>& beg
bool IDBLevelDBBackingStore::deleteDatabase(const String& name)
{
IDB_TRACE("IDBLevelDBBackingStore::deleteDatabase");
- RefPtr<LevelDBTransaction> transaction = LevelDBTransaction::create(m_db.get());
+ OwnPtr<LevelDBWriteOnlyTransaction> transaction = LevelDBWriteOnlyTransaction::create(m_db.get());
int64_t databaseId;
String version;
int64_t intVersion;
- if (!getIDBDatabaseMetaData(name, version, intVersion, databaseId)) {
- transaction->rollback();
+ if (!getIDBDatabaseMetaData(name, version, intVersion, databaseId))
return true;
- }
const Vector<char> startKey = DatabaseMetaDataKey::encode(databaseId, DatabaseMetaDataKey::OriginName);
const Vector<char> stopKey = DatabaseMetaDataKey::encode(databaseId + 1, DatabaseMetaDataKey::OriginName);
- if (!deleteRange(transaction.get(), startKey, stopKey)) {
- transaction->rollback();
- return false;
- }
+ OwnPtr<LevelDBIterator> it = m_db->createIterator();
+ for (it->seek(startKey); it->isValid() && compareKeys(it->key(), stopKey) < 0; it->next())
+ transaction->remove(it->key());
const Vector<char> key = DatabaseNameKey::encode(m_identifier, name);
transaction->remove(key);
diff --git a/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp b/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
index 6fa7c3882..da2bb5845 100644
--- a/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
+++ b/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
@@ -391,6 +391,11 @@ void RTCPeerConnection::close(ExceptionCode& ec)
stop();
}
+void RTCPeerConnection::negotiationNeeded()
+{
+ dispatchEvent(Event::create(eventNames().negotationneededEvent, false, false));
+}
+
void RTCPeerConnection::didGenerateIceCandidate(PassRefPtr<RTCIceCandidateDescriptor> iceCandidateDescriptor)
{
ASSERT(scriptExecutionContext()->isContextThread());
diff --git a/Source/WebCore/Modules/mediastream/RTCPeerConnection.h b/Source/WebCore/Modules/mediastream/RTCPeerConnection.h
index 326c968c7..1615581a5 100644
--- a/Source/WebCore/Modules/mediastream/RTCPeerConnection.h
+++ b/Source/WebCore/Modules/mediastream/RTCPeerConnection.h
@@ -86,6 +86,7 @@ public:
void close(ExceptionCode&);
+ DEFINE_ATTRIBUTE_EVENT_LISTENER(negotationneeded);
DEFINE_ATTRIBUTE_EVENT_LISTENER(icecandidate);
DEFINE_ATTRIBUTE_EVENT_LISTENER(open);
DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange);
@@ -94,6 +95,7 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(icechange);
// RTCPeerConnectionHandlerClient
+ virtual void negotiationNeeded() OVERRIDE;
virtual void didGenerateIceCandidate(PassRefPtr<RTCIceCandidateDescriptor>) OVERRIDE;
virtual void didChangeReadyState(ReadyState) OVERRIDE;
virtual void didChangeIceState(IceState) OVERRIDE;
diff --git a/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl b/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
index 8312ecea2..967ad4023 100644
--- a/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
+++ b/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl
@@ -75,6 +75,7 @@ module mediastream {
void close()
raises(DOMException);
+ attribute EventListener onnegotationneeded;
attribute EventListener onicecandidate;
attribute EventListener onopen;
attribute EventListener onstatechange;
diff --git a/Source/WebCore/Modules/notifications/Notification.cpp b/Source/WebCore/Modules/notifications/Notification.cpp
index 36a1c8cbb..32d8efd76 100644
--- a/Source/WebCore/Modules/notifications/Notification.cpp
+++ b/Source/WebCore/Modules/notifications/Notification.cpp
@@ -138,13 +138,6 @@ PassRefPtr<Notification> Notification::create(const String& title, const String&
#endif
#if ENABLE(NOTIFICATIONS)
-static void getAndAddEventListener(const AtomicString& eventName, const char* property, const Dictionary& options, Notification* notification)
-{
- RefPtr<EventListener> listener = options.getEventListener(property, notification);
- if (listener)
- notification->addEventListener(eventName, listener.release(), false);
-}
-
PassRefPtr<Notification> Notification::create(ScriptExecutionContext* context, const String& title, const Dictionary& options)
{
RefPtr<Notification> notification(adoptRef(new Notification(context, title)));
@@ -153,10 +146,15 @@ PassRefPtr<Notification> Notification::create(ScriptExecutionContext* context, c
notification->setBody(argument);
if (options.get("tag", argument))
notification->setTag(argument);
- getAndAddEventListener(eventNames().showEvent, "onshow", options, notification.get());
- getAndAddEventListener(eventNames().closeEvent, "onclose", options, notification.get());
- getAndAddEventListener(eventNames().errorEvent, "onerror", options, notification.get());
- getAndAddEventListener(eventNames().clickEvent, "onclick", options, notification.get());
+ if (options.get("lang", argument))
+ notification->setLang(argument);
+ if (options.get("dir", argument))
+ notification->setDir(argument);
+ if (options.get("icon", argument)) {
+ KURL iconURI = argument.isEmpty() ? KURL() : context->completeURL(argument);
+ if (!iconURI.isEmpty() && iconURI.isValid())
+ notification->setIconURL(iconURI);
+ }
notification->suspendIfNeeded();
return notification.release();
diff --git a/Source/WebCore/Modules/notifications/Notification.h b/Source/WebCore/Modules/notifications/Notification.h
index 995a70032..6fce5edc8 100644
--- a/Source/WebCore/Modules/notifications/Notification.h
+++ b/Source/WebCore/Modules/notifications/Notification.h
@@ -86,14 +86,20 @@ public:
bool isHTML() const { return m_isHTML; }
void setHTML(bool isHTML) { m_isHTML = isHTML; }
+#if ENABLE(LEGACY_NOTIFICATIONS)
KURL url() const { return m_notificationURL; }
void setURL(KURL url) { m_notificationURL = url; }
-
+#endif
+
KURL iconURL() const { return m_icon; }
+ void setIconURL(const KURL& url) { m_icon = url; }
String title() const { return m_title; }
String body() const { return m_body; }
+ String lang() const { return m_lang; }
+ void setLang(const String& lang) { m_lang = lang; }
+
String dir() const { return m_direction; }
void setDir(const String& dir) { m_direction = dir; }
@@ -174,10 +180,12 @@ private:
KURL m_icon;
String m_title;
String m_body;
- // FIXME: Deprecate HTML Notifications.
+#if ENABLE(LEGACY_NOTIFICATIONS)
KURL m_notificationURL;
+#endif
String m_direction;
+ String m_lang;
String m_tag;
enum NotificationState {
diff --git a/Source/WebCore/Modules/notifications/Notification.idl b/Source/WebCore/Modules/notifications/Notification.idl
index 0f029f863..c61b3cd66 100644
--- a/Source/WebCore/Modules/notifications/Notification.idl
+++ b/Source/WebCore/Modules/notifications/Notification.idl
@@ -64,8 +64,8 @@ module threads {
attribute EventListener onclose;
attribute EventListener onclick;
- attribute DOMString dir;
#if defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS
+ attribute DOMString dir;
attribute DOMString replaceId;
#endif
#if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
diff --git a/Source/WebCore/PlatformEfl.cmake b/Source/WebCore/PlatformEfl.cmake
index b9af98e9f..793c82178 100644
--- a/Source/WebCore/PlatformEfl.cmake
+++ b/Source/WebCore/PlatformEfl.cmake
@@ -1,8 +1,3 @@
-LIST(APPEND WebCore_LINK_FLAGS
- ${ECORE_X_LDFLAGS}
- ${EFLDEPS_LDFLAGS}
-)
-
LIST(APPEND WebCore_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/accessibility/efl"
"${WEBCORE_DIR}/page/efl"
@@ -194,9 +189,15 @@ ENDIF ()
LIST(APPEND WebCore_LIBRARIES
${CAIRO_LIBRARIES}
+ ${ECORE_LIBRARIES}
+ ${ECORE_EVAS_LIBRARIES}
+ ${ECORE_FILE_LIBRARIES}
${ECORE_X_LIBRARIES}
+ ${E_DBUS_LIBRARIES}
+ ${E_DBUS_EUKIT_LIBRARIES}
+ ${EDJE_LIBRARIES}
${EEZE_LIBRARIES}
- ${EFLDEPS_LIBRARIES}
+ ${EINA_LIBRARIES}
${EVAS_LIBRARIES}
${FONTCONFIG_LIBRARIES}
${FREETYPE_LIBRARIES}
@@ -215,9 +216,15 @@ LIST(APPEND WebCore_LIBRARIES
LIST(APPEND WebCore_INCLUDE_DIRECTORIES
${CAIRO_INCLUDE_DIRS}
+ ${ECORE_INCLUDE_DIRS}
+ ${ECORE_EVAS_INCLUDE_DIRS}
+ ${ECORE_FILE_INCLUDE_DIRS}
${ECORE_X_INCLUDE_DIRS}
+ ${E_DBUS_INCLUDE_DIRS}
+ ${E_DBUS_EUKIT_INCLUDE_DIRS}
+ ${EDJE_INCLUDE_DIRS}
${EEZE_INCLUDE_DIRS}
- ${EFLDEPS_INCLUDE_DIRS}
+ ${EINA_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${FREETYPE_INCLUDE_DIRS}
${ICU_INCLUDE_DIRS}
diff --git a/Source/WebCore/Target.pri b/Source/WebCore/Target.pri
index edbe2f437..873254ee8 100644
--- a/Source/WebCore/Target.pri
+++ b/Source/WebCore/Target.pri
@@ -662,6 +662,7 @@ SOURCES += \
html/ImageDocument.cpp \
html/ImageInputType.cpp \
html/InputType.cpp \
+ html/InputTypeNames.cpp \
html/LabelableElement.cpp \
html/LabelsNodeList.cpp \
html/LinkRelAttribute.cpp \
@@ -1096,6 +1097,9 @@ SOURCES += \
rendering/BidiRun.cpp \
rendering/CounterNode.cpp \
rendering/EllipsisBox.cpp \
+ rendering/ExclusionInterval.cpp \
+ rendering/ExclusionRectangle.cpp \
+ rendering/ExclusionShape.cpp \
rendering/FilterEffectRenderer.cpp \
rendering/FixedTableLayout.cpp \
rendering/FlowThreadController.cpp \
@@ -1552,7 +1556,6 @@ HEADERS += \
dom/IdTargetObserver.h \
dom/IdTargetObserverRegistry.h \
dom/KeyboardEvent.h \
- dom/MemoryInstrumentation.h \
dom/MessageChannel.h \
dom/MessageEvent.h \
dom/MessagePortChannel.h \
@@ -2050,6 +2053,7 @@ HEADERS += \
platform/graphics/filters/CustomFilterOperation.h \
platform/graphics/filters/CustomFilterParameter.h \
platform/graphics/filters/CustomFilterProgram.h \
+ platform/graphics/filters/CustomFilterProgramInfo.h \
platform/graphics/filters/CustomFilterTransformParameter.h \
platform/graphics/filters/CustomFilterValidatedProgram.h \
platform/graphics/filters/FEBlend.h \
@@ -2278,6 +2282,9 @@ HEADERS += \
rendering/break_lines.h \
rendering/CounterNode.h \
rendering/EllipsisBox.h \
+ rendering/ExclusionInterval.h \
+ rendering/ExclusionRectangle.h \
+ rendering/ExclusionShape.h \
rendering/FilterEffectRenderer.h \
rendering/FixedTableLayout.h \
rendering/HitTestingTransformState.h \
@@ -2800,7 +2807,7 @@ SOURCES += \
platform/text/qt/TextCodecQt.cpp \
platform/qt/WidgetQt.cpp
-contains(DEFINES, WTF_USE_LIBXML2=1) {
+use?(LIBXML2) {
HEADERS += xml/parser/XMLDocumentParserScope.h
SOURCES += \
xml/parser/XMLDocumentParserLibxml2.cpp \
@@ -2809,7 +2816,7 @@ contains(DEFINES, WTF_USE_LIBXML2=1) {
SOURCES += xml/parser/XMLDocumentParserQt.cpp
}
-contains(DEFINES, ENABLE_SMOOTH_SCROLLING=1) {
+enable?(SMOOTH_SCROLLING) {
HEADERS += platform/ScrollAnimatorNone.h
SOURCES += platform/ScrollAnimatorNone.cpp
}
@@ -2837,7 +2844,7 @@ mac {
SOURCES += editing/SmartReplaceICU.cpp
}
-contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
+enable?(NETSCAPE_PLUGIN_API) {
SOURCES += plugins/npapi.cpp
@@ -2875,12 +2882,12 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
plugins/PluginViewNone.cpp
}
-plugin_backend_xlib {
+use?(PLUGIN_BACKEND_XLIB) {
SOURCES += plugins/qt/QtX11ImageConversion.cpp
HEADERS += plugins/qt/QtX11ImageConversion.h
}
-contains(DEFINES, ENABLE_SQL_DATABASE=1) {
+enable?(SQL_DATABASE) {
SOURCES += \
Modules/webdatabase/ChangeVersionWrapper.cpp \
Modules/webdatabase/DatabaseTask.cpp \
@@ -2905,7 +2912,7 @@ contains(DEFINES, ENABLE_SQL_DATABASE=1) {
bindings/js/JSSQLTransactionSyncCustom.cpp
}
-contains(DEFINES, ENABLE_INDEXED_DATABASE=1) {
+enable?(INDEXED_DATABASE) {
HEADERS += \
bindings/js/IDBBindingUtilities.h \
@@ -2965,7 +2972,7 @@ contains(DEFINES, ENABLE_INDEXED_DATABASE=1) {
Modules/indexeddb/WorkerContextIndexedDatabase.cpp
}
-contains(DEFINES, ENABLE_DATA_TRANSFER_ITEMS=1) {
+enable?(DATA_TRANSFER_ITEMS) {
HEADERS += \
dom/DataTransferItem.h \
dom/DataTransferItemList.h \
@@ -2979,7 +2986,7 @@ contains(DEFINES, ENABLE_DATA_TRANSFER_ITEMS=1) {
platform/qt/DataTransferItemListQt.cpp
}
-contains(DEFINES, ENABLE_FILE_SYSTEM=1) {
+enable?(FILE_SYSTEM) {
HEADERS += \
Modules/filesystem/AsyncFileWriter.h \
Modules/filesystem/DOMFilePath.h \
@@ -3024,7 +3031,7 @@ contains(DEFINES, ENABLE_FILE_SYSTEM=1) {
platform/AsyncFileSystem.cpp
}
-contains(DEFINES, ENABLE_MEDIA_SOURCE=1) {
+enable?(MEDIA_SOURCE) {
HEADERS += \
Modules/mediasource/MediaSource.h \
Modules/mediasource/MediaSourceRegistry.h \
@@ -3037,14 +3044,14 @@ contains(DEFINES, ENABLE_MEDIA_SOURCE=1) {
Modules/mediasource/SourceBufferList.cpp
}
-contains(DEFINES, ENABLE_ICONDATABASE=1) {
+enable?(ICONDATABASE) {
SOURCES += \
loader/icon/IconDatabase.cpp \
loader/icon/IconRecord.cpp \
loader/icon/PageURLRecord.cpp
}
-contains(DEFINES, ENABLE_WORKERS=1) {
+enable?(WORKERS) {
SOURCES += \
bindings/js/JSDedicatedWorkerContextCustom.cpp \
bindings/js/JSWorkerContextBase.cpp \
@@ -3069,7 +3076,7 @@ contains(DEFINES, ENABLE_WORKERS=1) {
workers/WorkerScriptLoader.cpp
}
-contains(DEFINES, ENABLE_SHARED_WORKERS=1) {
+enable?(SHARED_WORKERS) {
SOURCES += \
bindings/js/JSSharedWorkerCustom.cpp
@@ -3080,7 +3087,7 @@ contains(DEFINES, ENABLE_SHARED_WORKERS=1) {
workers/SharedWorkerThread.cpp
}
-contains(DEFINES, ENABLE_INPUT_SPEECH=1) {
+enable?(INPUT_SPEECH) {
SOURCES += \
page/SpeechInput.cpp \
page/SpeechInputEvent.cpp \
@@ -3089,11 +3096,11 @@ contains(DEFINES, ENABLE_INPUT_SPEECH=1) {
rendering/RenderInputSpeech.cpp
}
-contains(DEFINES, ENABLE_SCRIPTED_SPEECH=1) {
+enable?(SCRIPTED_SPEECH) {
SOURCES += # FIXME!
}
-contains(DEFINES, ENABLE_QUOTA=1) {
+enable?(QUOTA) {
HEADERS += \
Modules/quota/DOMWindowQuota.idl \
Modules/quota/StorageInfo.h \
@@ -3106,7 +3113,7 @@ contains(DEFINES, ENABLE_QUOTA=1) {
Modules/quota/StorageInfo.cpp
}
-contains(DEFINES, ENABLE_GAMEPAD=1) {
+enable?(GAMEPAD) {
HEADERS += \
Modules/gamepad/Gamepad.h\
Modules/gamepad/GamepadList.h \
@@ -3122,7 +3129,7 @@ contains(DEFINES, ENABLE_GAMEPAD=1) {
platform/qt/GamepadsQt.cpp
}
-contains(DEFINES, WTF_USE_GSTREAMER=1) {
+use?(GSTREAMER) {
HEADERS += \
platform/graphics/gstreamer/GRefPtrGStreamer.h \
platform/graphics/gstreamer/GStreamerUtilities.h \
@@ -3134,7 +3141,7 @@ contains(DEFINES, WTF_USE_GSTREAMER=1) {
platform/graphics/gstreamer/GStreamerVersioning.cpp
}
-contains(DEFINES, ENABLE_VIDEO=1) {
+enable?(VIDEO) {
SOURCES += \
html/HTMLAudioElement.cpp \
html/HTMLMediaElement.cpp \
@@ -3148,7 +3155,7 @@ contains(DEFINES, ENABLE_VIDEO=1) {
rendering/RenderVideo.cpp \
rendering/RenderMedia.cpp
- contains(DEFINES, WTF_USE_QTKIT=1) {
+ use?(QTKIT) {
INCLUDEPATH += \
$$SOURCE_DIR/../WebKitLibraries/ \
$$PWD/platform/mac
@@ -3193,7 +3200,7 @@ contains(DEFINES, ENABLE_VIDEO=1) {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
- } else: contains(DEFINES, WTF_USE_GSTREAMER=1) {
+ } else: use?(GSTREAMER) {
HEADERS += \
platform/graphics/gstreamer/GStreamerGWorld.h \
platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h \
@@ -3210,7 +3217,7 @@ contains(DEFINES, ENABLE_VIDEO=1) {
platform/graphics/gstreamer/PlatformVideoWindowQt.cpp \
platform/graphics/gstreamer/ImageGStreamerQt.cpp
- } else:contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
+ } else:use?(QT_MULTIMEDIA) {
HEADERS += \
platform/graphics/qt/MediaPlayerPrivateQt.h
@@ -3219,7 +3226,7 @@ contains(DEFINES, ENABLE_VIDEO=1) {
}
}
-contains(DEFINES, ENABLE_WEB_AUDIO=1) {
+enable?(WEB_AUDIO) {
HEADERS += \
Modules/webaudio/AsyncAudioDecoder.h \
Modules/webaudio/AudioBasicInspectorNode.h \
@@ -3388,7 +3395,7 @@ contains(DEFINES, ENABLE_WEB_AUDIO=1) {
platform/audio/VectorMath.cpp \
platform/audio/ZeroPole.cpp
- contains(DEFINES, WTF_USE_GSTREAMER=1) {
+ use?(GSTREAMER) {
HEADERS += \
platform/audio/gstreamer/AudioDestinationGStreamer.h \
platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.h
@@ -3400,21 +3407,21 @@ contains(DEFINES, ENABLE_WEB_AUDIO=1) {
}
}
-contains(DEFINES, ENABLE_FULLSCREEN_API=1) {
+enable?(FULLSCREEN_API) {
SOURCES += \
rendering/RenderFullScreen.cpp
HEADERS += \
rendering/RenderFullScreen.h
}
-contains(DEFINES, ENABLE_XSLT=1) {
+enable?(XSLT) {
SOURCES += \
bindings/js/JSXSLTProcessorCustom.cpp
SOURCES += xml/XMLTreeViewer.cpp
HEADERS += xml/XMLTreeViewer.h
- contains(DEFINES, WTF_USE_LIBXML2=1) {
+ use?(LIBXML2) {
SOURCES += \
xml/XSLTProcessor.cpp \
xml/XSLTProcessorLibxslt.cpp \
@@ -3440,11 +3447,12 @@ contains(DEFINES, ENABLE_XSLT=1) {
}
}
-contains(DEFINES, ENABLE_FILTERS=1) {
+enable?(FILTERS) {
SOURCES += \
platform/graphics/filters/CustomFilterGlobalContext.cpp \
platform/graphics/filters/CustomFilterOperation.cpp \
platform/graphics/filters/CustomFilterProgram.cpp \
+ platform/graphics/filters/CustomFilterProgramInfo.cpp \
platform/graphics/filters/CustomFilterCompiledProgram.cpp \
platform/graphics/filters/CustomFilterMesh.cpp \
platform/graphics/filters/CustomFilterMeshGenerator.cpp \
@@ -3479,7 +3487,7 @@ contains(DEFINES, ENABLE_FILTERS=1) {
platform/graphics/filters/arm/FELightingNEON.cpp \
}
-contains(DEFINES, ENABLE_MATHML=1) {
+enable?(MATHML) {
SOURCES += \
mathml/MathMLElement.cpp \
mathml/MathMLInlineContainerElement.cpp \
@@ -3500,11 +3508,11 @@ contains(DEFINES, ENABLE_MATHML=1) {
mathml/MathMLAllInOne.cpp
}
-contains(DEFINES, ENABLE_TEXT_AUTOSIZING=1) {
+enable?(TEXT_AUTOSIZING) {
SOURCES += # FIXME!
}
-contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) {
+enable?(DEVICE_ORIENTATION) {
HEADERS += \
platform/qt/DeviceMotionClientQt.h \
platform/qt/DeviceMotionProviderQt.h \
@@ -3517,7 +3525,7 @@ contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) {
platform/qt/DeviceOrientationProviderQt.cpp
}
-contains(DEFINES, ENABLE_SVG=1) {
+enable?(SVG) {
SOURCES += \
# TODO: this-one-is-not-auto-added! FIXME! tmp/SVGElementFactory.cpp \
bindings/js/JSSVGElementInstanceCustom.cpp \
@@ -3754,7 +3762,7 @@ contains(DEFINES, ENABLE_SVG=1) {
svg/SVGAllInOne.cpp
}
-contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1) {
+enable?(JAVASCRIPT_DEBUGGER) {
SOURCES += \
bindings/js/JSJavaScriptCallFrameCustom.cpp \
bindings/js/ScriptProfiler.cpp \
@@ -3762,7 +3770,7 @@ contains(DEFINES, ENABLE_JAVASCRIPT_DEBUGGER=1) {
}
-contains(DEFINES, ENABLE_VIDEO_TRACK=1) {
+enable?(VIDEO_TRACK) {
SOURCES += \
bindings/js/JSTextTrackCueCustom.cpp \
bindings/js/JSTextTrackCustom.cpp \
@@ -3773,7 +3781,7 @@ contains(DEFINES, ENABLE_VIDEO_TRACK=1) {
bindings/js/JSTextTrackListCustom.cpp
}
-contains(DEFINES, ENABLE_WEB_SOCKETS=1) {
+enable?(WEB_SOCKETS) {
HEADERS += \
Modules/websockets/CloseEvent.h \
Modules/websockets/ThreadableWebSocketChannel.h \
@@ -3812,7 +3820,7 @@ contains(DEFINES, ENABLE_WEB_SOCKETS=1) {
SOURCES += \
bindings/js/JSWebSocketCustom.cpp
- contains(DEFINES, ENABLE_WORKERS=1) {
+ enable?(WORKERS) {
HEADERS += \
Modules/websockets/WorkerThreadableWebSocketChannel.h
@@ -3821,7 +3829,7 @@ contains(DEFINES, ENABLE_WEB_SOCKETS=1) {
}
}
-contains(DEFINES, ENABLE_WEBGL=1) {
+enable?(WEBGL) {
HEADERS += \
html/canvas/CanvasContextAttributes.h \
html/canvas/WebGLObject.h \
@@ -3887,7 +3895,7 @@ contains(DEFINES, ENABLE_WEBGL=1) {
html/canvas/WebGLVertexArrayObjectOES.cpp
}
-contains(DEFINES, WTF_USE_3D_GRAPHICS=1) {
+use?(3D_GRAPHICS) {
HEADERS += \
platform/graphics/ANGLEWebKitBridge.h \
platform/graphics/Extensions3D.h \
@@ -3939,7 +3947,7 @@ contains(DEFINES, WTF_USE_3D_GRAPHICS=1) {
}
-contains(DEFINES, ENABLE_MHTML=1) {
+enable?(MHTML) {
INCLUDEPATH += $$PWD/loader/archive/mhtml
@@ -3955,23 +3963,23 @@ contains(DEFINES, ENABLE_MHTML=1) {
page/PageSerializer.cpp
}
-contains(DEFINES, ENABLE_UNDO_MANAGER=1) {
+enable?(UNDO_MANAGER) {
SOURCES += \
editing/UndoManager.cpp
HEADERS += \
editing/UndoManager.h
}
-contains(DEFINES, WTF_USE_LIBPNG=1) {
+use?(LIBPNG) {
SOURCES += platform/image-decoders/ico/ICOImageDecoder.cpp \
platform/image-decoders/png/PNGImageDecoder.cpp
}
-contains(DEFINES, WTF_USE_LIBJPEG=1) {
+use?(LIBJPEG) {
SOURCES += platform/image-decoders/jpeg/JPEGImageDecoder.cpp
}
-contains(DEFINES, WTF_USE_WEBP=1) {
+use?(WEBP) {
HEADERS += platform/image-decoders/webp/WEBPImageDecoder.h
SOURCES += platform/image-decoders/webp/WEBPImageDecoder.cpp
}
@@ -4006,12 +4014,12 @@ contains(CONFIG, opengl-shims) {
DEFINES += QT_OPENGL_SHIMS=1
}
-contains(DEFINES, WTF_USE_GRAPHICS_SURFACE=1) {
+use?(GRAPHICS_SURFACE) {
mac {
SOURCES += platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp
INCLUDEPATH += /System/Library/Frameworks/CoreFoundation.framework/Headers
}
- contains(DEFINES, HAVE_XCOMPOSITE=1) {
+ have?(XCOMPOSITE) {
SOURCES += platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp
}
}
@@ -4023,7 +4031,7 @@ ALL_IN_ONE_SOURCES += \
platform/text/TextAllInOne.cpp \
rendering/style/StyleAllInOne.cpp
-contains(DEFINES, ENABLE_XSLT=1):contains(DEFINES, WTF_USE_LIBXML2=1) {
+enable?(XSLT):use?(LIBXML2) {
ALL_IN_ONE_SOURCES += \
dom/DOMAllInOne.cpp
}
diff --git a/Source/WebCore/UseV8.cmake b/Source/WebCore/UseV8.cmake
index d041c8164..9862588a8 100755
--- a/Source/WebCore/UseV8.cmake
+++ b/Source/WebCore/UseV8.cmake
@@ -57,7 +57,6 @@ LIST(APPEND WebCore_SOURCES
bindings/v8/V8GCController.cpp
bindings/v8/V8GCForContextDispose.cpp
bindings/v8/V8HiddenPropertyName.cpp
- bindings/v8/V8IsolatedContext.cpp
bindings/v8/V8LazyEventListener.cpp
bindings/v8/V8NodeFilterCondition.cpp
bindings/v8/V8ObjectConstructor.cpp
diff --git a/Source/WebCore/WebCore.exp.in b/Source/WebCore/WebCore.exp.in
index b4769f918..df9a5cc8d 100644
--- a/Source/WebCore/WebCore.exp.in
+++ b/Source/WebCore/WebCore.exp.in
@@ -683,6 +683,7 @@ __ZN7WebCore4Page31setCustomHTMLTokenizerChunkSizeEi
__ZN7WebCore4Page31setCustomHTMLTokenizerTimeDelayEd
__ZN7WebCore4Page32setMemoryCacheClientCallsEnabledEb
__ZN7WebCore4Page35resumeActiveDOMObjectsAndAnimationsEv
+__ZN7WebCore4Page36setShouldSuppressScrollbarAnimationsEb
__ZN7WebCore4Page36suspendActiveDOMObjectsAndAnimationsEv
__ZN7WebCore4Page37setInLowQualityImageInterpolationModeEb
__ZN7WebCore4Page43setRelevantRepaintedObjectsCounterThresholdEy
diff --git a/Source/WebCore/WebCore.gypi b/Source/WebCore/WebCore.gypi
index 03237f6fc..feda60bba 100644
--- a/Source/WebCore/WebCore.gypi
+++ b/Source/WebCore/WebCore.gypi
@@ -2301,8 +2301,6 @@
'bindings/v8/V8GCForContextDispose.h',
'bindings/v8/V8HiddenPropertyName.cpp',
'bindings/v8/V8HiddenPropertyName.h',
- 'bindings/v8/V8IsolatedContext.cpp',
- 'bindings/v8/V8IsolatedContext.h',
'bindings/v8/V8LazyEventListener.cpp',
'bindings/v8/V8LazyEventListener.h',
'bindings/v8/V8NPObject.cpp',
@@ -3289,6 +3287,12 @@
'rendering/CounterNode.h',
'rendering/EllipsisBox.cpp',
'rendering/EllipsisBox.h',
+ 'rendering/ExclusionInterval.cpp',
+ 'rendering/ExclusionInterval.h',
+ 'rendering/ExclusionRectangle.cpp',
+ 'rendering/ExclusionRectangle.h',
+ 'rendering/ExclusionShape.cpp',
+ 'rendering/ExclusionShape.h',
'rendering/FilterEffectRenderer.cpp',
'rendering/FilterEffectRenderer.h',
'rendering/FixedTableLayout.cpp',
@@ -3854,7 +3858,6 @@
'dom/IdTargetObserverRegistry.cpp',
'dom/IdTargetObserverRegistry.h',
'dom/KeyboardEvent.cpp',
- 'dom/MemoryInstrumentation.h',
'dom/MessageChannel.cpp',
'dom/MessageChannel.h',
'dom/MessageEvent.cpp',
@@ -4201,6 +4204,8 @@
'html/ImageInputType.cpp',
'html/ImageInputType.h',
'html/InputType.cpp',
+ 'html/InputTypeNames.cpp',
+ 'html/InputTypeNames.h',
'html/LabelableElement.cpp',
'html/LabelsNodeList.cpp',
'html/LabelsNodeList.h',
@@ -5671,8 +5676,8 @@
'platform/text/LocalizedNumber.h',
'platform/text/LocalizedNumberICU.cpp',
'platform/text/LocalizedNumberNone.cpp',
- 'platform/text/NumberLocalizer.cpp',
- 'platform/text/NumberLocalizer.h',
+ 'platform/text/Localizer.cpp',
+ 'platform/text/Localizer.h',
'platform/text/ParserUtilities.h',
'platform/text/QuotedPrintable.h',
'platform/text/QuotedPrintable.cpp',
diff --git a/Source/WebCore/WebCore.pri b/Source/WebCore/WebCore.pri
index d2823a4e5..53549a6e6 100644
--- a/Source/WebCore/WebCore.pri
+++ b/Source/WebCore/WebCore.pri
@@ -102,8 +102,8 @@ INCLUDEPATH += \
INCLUDEPATH += $$WEBCORE_GENERATED_SOURCES_DIR
-contains(DEFINES, ENABLE_XSLT=1) {
- contains(DEFINES, WTF_USE_LIBXML2=1) {
+enable?(XSLT) {
+ use?(LIBXML2) {
mac {
INCLUDEPATH += /usr/include/libxml2
LIBS += -lxml2 -lxslt
@@ -115,15 +115,15 @@ contains(DEFINES, ENABLE_XSLT=1) {
}
}
-contains(DEFINES, WTF_USE_LIBXML2=1) {
+use?(LIBXML2) {
PKGCONFIG += libxml-2.0
}
-contains(DEFINES, WTF_USE_ZLIB=1) {
+use?(ZLIB) {
LIBS += -lz
}
-contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
+enable?(NETSCAPE_PLUGIN_API) {
unix {
mac {
INCLUDEPATH += platform/mac
@@ -149,56 +149,56 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
}
}
-contains(DEFINES, ENABLE_ORIENTATION_EVENTS=1)|contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) {
+enable?(ORIENTATION_EVENTS)|enable?(DEVICE_ORIENTATION) {
QT += sensors
}
-contains(DEFINES, WTF_USE_QT_MOBILITY_SYSTEMINFO=1) {
+use?(QT_MOBILITY_SYSTEMINFO) {
CONFIG *= mobility
MOBILITY *= systeminfo
}
-contains(DEFINES, ENABLE_GAMEPAD=1) {
+enable?(GAMEPAD) {
INCLUDEPATH += \
$$SOURCE_DIR/platform/linux \
$$SOURCE_DIR/Modules/gamepad
PKGCONFIG += libudev
}
-contains(DEFINES, WTF_USE_GSTREAMER=1) {
+use?(GSTREAMER) {
DEFINES += ENABLE_GLIB_SUPPORT=1
PKGCONFIG += glib-2.0 gio-2.0 gstreamer-0.10 gstreamer-app-0.10 gstreamer-base-0.10 gstreamer-interfaces-0.10 gstreamer-pbutils-0.10 gstreamer-plugins-base-0.10
}
-contains(DEFINES, ENABLE_VIDEO=1) {
- contains(DEFINES, WTF_USE_QTKIT=1) {
+enable?(VIDEO) {
+ use?(QTKIT) {
INCLUDEPATH += $$SOURCE_DIR/platform/graphics/mac
LIBS += -framework AppKit -framework AudioUnit \
-framework AudioToolbox -framework CoreAudio \
-framework QuartzCore -framework QTKit
- } else:contains(DEFINES, WTF_USE_GSTREAMER=1) {
+ } else:use?(GSTREAMER) {
INCLUDEPATH += $$SOURCE_DIR/platform/graphics/gstreamer
PKGCONFIG += gstreamer-video-0.10
- } else:contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
+ } else:use?(QT_MULTIMEDIA) {
CONFIG *= mobility
MOBILITY *= multimedia
}
}
-contains(DEFINES, ENABLE_WEB_AUDIO=1) {
- contains(DEFINES, WTF_USE_GSTREAMER=1) {
+enable?(WEB_AUDIO) {
+ use?(GSTREAMER) {
DEFINES += WTF_USE_WEBAUDIO_GSTREAMER=1
INCLUDEPATH += $$SOURCE_DIR/platform/audio/gstreamer
PKGCONFIG += gstreamer-audio-0.10 gstreamer-fft-0.10
}
}
-contains(DEFINES, WTF_USE_3D_GRAPHICS=1) {
+use?(3D_GRAPHICS) {
contains(QT_CONFIG, opengles2):!win32: LIBS += -lEGL
mac: LIBS += -framework IOSurface -framework CoreFoundation
- linux-*:contains(DEFINES, HAVE_XCOMPOSITE=1): LIBS += -lXcomposite
+ linux-*:have?(XCOMPOSITE): LIBS += -lXcomposite
}
!system-sqlite:exists( $${SQLITE3SRCDIR}/sqlite3.c ) {
@@ -209,23 +209,9 @@ contains(DEFINES, WTF_USE_3D_GRAPHICS=1) {
LIBS += -lsqlite3
}
-# Qt5 allows us to use config tests to check for the presence of these libraries
-config_libjpeg {
- DEFINES += WTF_USE_LIBJPEG=1
- LIBS += -ljpeg
-} else {
- warning("JPEG library not found! QImageDecoder will decode JPEG images.")
-}
-config_libpng {
- DEFINES += WTF_USE_LIBPNG=1
- LIBS += -lpng
-} else {
- warning("PNG library not found! QImageDecoder will decode PNG images.")
-}
-config_libwebp {
- DEFINES += WTF_USE_WEBP=1
- LIBS += -lwebp
-}
+use?(libjpeg): LIBS += -ljpeg
+use?(libpng): LIBS += -lpng
+use?(webp): LIBS += -lwebp
mac {
LIBS += -framework Carbon -framework AppKit
diff --git a/Source/WebCore/WebCore.vcproj/WebCore.vcproj b/Source/WebCore/WebCore.vcproj/WebCore.vcproj
index 2c78609f5..673293571 100755
--- a/Source/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/Source/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -38386,6 +38386,30 @@
RelativePath="..\rendering\EllipsisBox.h"
>
</File>
+ <File
+ RelativePath="..\rendering\ExclusionInterval.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\ExclusionInterval.h"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\ExclusionRectangle.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\ExclusionSRectangle.h"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\ExclusionShape.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\rendering\ExclusionShape.h"
+ >
+ </File>
<File
RelativePath="..\rendering\FilterEffectRenderer.cpp"
>
@@ -51891,10 +51915,6 @@
>
</File>
<File
- RelativePath="..\dom\MemoryInstrumentation.h"
- >
- </File>
- <File
RelativePath="..\dom\MessageChannel.cpp"
>
<FileConfiguration
@@ -63589,6 +63609,14 @@
<File
RelativePath="..\html\InputType.h"
>
+ </File>
+ <File
+ RelativePath="..\html\InputTypeNames.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\html\InputTypeNames.h"
+ >
</File>
<File
RelativePath="..\html\LabelableElement.cpp"
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
index 84fcad81c..d1a031ba9 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -511,7 +511,7 @@
1AAADDA314DB409F00AF64B3 /* ScrollingTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDA114DB409F00AF64B3 /* ScrollingTree.cpp */; };
1AAADDA414DB409F00AF64B3 /* ScrollingTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDA214DB409F00AF64B3 /* ScrollingTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
1AAADDBE14DC640700AF64B3 /* ScrollingTreeState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDBC14DC640600AF64B3 /* ScrollingTreeState.cpp */; };
- 1AAADDBF14DC640700AF64B3 /* ScrollingTreeState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDBD14DC640600AF64B3 /* ScrollingTreeState.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 1AAADDBF14DC640700AF64B3 /* ScrollingTreeState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDBD14DC640600AF64B3 /* ScrollingTreeState.h */; };
1AAADDDA14DC74EC00AF64B3 /* ScrollingTreeStateMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDD814DC74EC00AF64B3 /* ScrollingTreeStateMac.mm */; };
1AAADDE314DC8C8F00AF64B3 /* ScrollingTreeNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAADDE114DC8C8F00AF64B3 /* ScrollingTreeNode.cpp */; };
1AAADDE414DC8C8F00AF64B3 /* ScrollingTreeNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAADDE214DC8C8F00AF64B3 /* ScrollingTreeNode.h */; };
@@ -1455,7 +1455,6 @@
4F2D205512EAE7B3005C2874 /* InspectorAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F2D205312EAE7B3005C2874 /* InspectorAgent.cpp */; };
4F3289B511A42AAB005ABE7E /* InspectorValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F3289B311A42AAB005ABE7E /* InspectorValues.cpp */; };
4F3289B611A42AAB005ABE7E /* InspectorValues.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F3289B411A42AAB005ABE7E /* InspectorValues.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 4F32BB1B14FA85E800F6C1A3 /* MemoryInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F32BB1A14FA85AA00F6C1A3 /* MemoryInstrumentation.h */; settings = {ATTRIBUTES = (Private, ); }; };
4F377FF515FA356A00E5D60D /* WebCoreMemoryInstrumentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F377FF415FA356A00E5D60D /* WebCoreMemoryInstrumentation.h */; settings = {ATTRIBUTES = (Private, ); }; };
4F4F5FFB11CBD2E100A186BF /* InspectorFrontend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F4F5FFA11CBD2D200A186BF /* InspectorFrontend.cpp */; };
4F6FDD641341DEDD001F8EE3 /* InspectorPageAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F6FDD621341DEDD001F8EE3 /* InspectorPageAgent.cpp */; };
@@ -1839,6 +1838,12 @@
6E67D2A61280E8A4008758F7 /* Extensions3DOpenGL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E67D2A41280E8A4008758F7 /* Extensions3DOpenGL.cpp */; };
6E67D2A71280E8A4008758F7 /* Extensions3DOpenGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E67D2A51280E8A4008758F7 /* Extensions3DOpenGL.h */; };
6E67D2A91280E8BD008758F7 /* Extensions3D.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E67D2A81280E8BD008758F7 /* Extensions3D.h */; };
+ 6E8798BA15F81E4A00BFE4AA /* ExclusionInterval.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E8798B415F81E4A00BFE4AA /* ExclusionInterval.cpp */; };
+ 6E8798BB15F81E4A00BFE4AA /* ExclusionInterval.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E8798B515F81E4A00BFE4AA /* ExclusionInterval.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 6E8798BC15F81E4A00BFE4AA /* ExclusionRectangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E8798B615F81E4A00BFE4AA /* ExclusionRectangle.cpp */; };
+ 6E8798BD15F81E4A00BFE4AA /* ExclusionRectangle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E8798B715F81E4A00BFE4AA /* ExclusionRectangle.h */; };
+ 6E8798BE15F81E4A00BFE4AA /* ExclusionShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E8798B815F81E4A00BFE4AA /* ExclusionShape.cpp */; };
+ 6E8798BF15F81E4A00BFE4AA /* ExclusionShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E8798B915F81E4A00BFE4AA /* ExclusionShape.h */; settings = {ATTRIBUTES = (Private, ); }; };
6EBC5EAF138B50F200A0CF8A /* JSFloat64Array.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EBC5EAD138B50F200A0CF8A /* JSFloat64Array.cpp */; };
6EBC5EB0138B50F200A0CF8A /* JSFloat64Array.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EBC5EAE138B50F200A0CF8A /* JSFloat64Array.h */; };
6EBF0E4812A8926100DB1709 /* OESTextureFloat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EBF0E4512A8926100DB1709 /* OESTextureFloat.cpp */; };
@@ -5768,6 +5773,8 @@
C330A22313EC196B0000B45B /* ColorChooser.h in Headers */ = {isa = PBXBuildFile; fileRef = C330A22113EC196B0000B45B /* ColorChooser.h */; settings = {ATTRIBUTES = (Private, ); }; };
C33EE5C414FB49610002095A /* BaseClickableWithKeyInputType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C33EE5C214FB49610002095A /* BaseClickableWithKeyInputType.cpp */; };
C33EE5C514FB49610002095A /* BaseClickableWithKeyInputType.h in Headers */ = {isa = PBXBuildFile; fileRef = C33EE5C314FB49610002095A /* BaseClickableWithKeyInputType.h */; };
+ C348612315FDE21E007A1CC9 /* InputTypeNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C348612115FDE21E007A1CC9 /* InputTypeNames.cpp */; };
+ C348612415FDE21E007A1CC9 /* InputTypeNames.h in Headers */ = {isa = PBXBuildFile; fileRef = C348612215FDE21E007A1CC9 /* InputTypeNames.h */; };
C37CDEBD149EF2030042090D /* ColorChooserClient.h in Headers */ = {isa = PBXBuildFile; fileRef = C37CDEBC149EF2030042090D /* ColorChooserClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
C3CF17A415B0063F00276D39 /* IdTargetObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C3CF17A015B0063F00276D39 /* IdTargetObserver.cpp */; };
C3CF17A515B0063F00276D39 /* IdTargetObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = C3CF17A115B0063F00276D39 /* IdTargetObserver.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -6224,8 +6231,8 @@
F5122C901547FA1B0028A93B /* PagePopupDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = F5122C8F1547FA1B0028A93B /* PagePopupDriver.h */; };
F5142C69123F12B000F5BD4C /* LocalizedNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = F5142C68123F12B000F5BD4C /* LocalizedNumber.h */; };
F52AD5E41534245F0059FBE6 /* EmptyClients.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F52AD5E31534245F0059FBE6 /* EmptyClients.cpp */; };
- F544F78815CFB2A800AF33A8 /* NumberLocalizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F544F78615CFB2A800AF33A8 /* NumberLocalizer.cpp */; };
- F544F78915CFB2A800AF33A8 /* NumberLocalizer.h in Headers */ = {isa = PBXBuildFile; fileRef = F544F78715CFB2A800AF33A8 /* NumberLocalizer.h */; };
+ F544F78815CFB2A800AF33A8 /* Localizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F544F78615CFB2A800AF33A8 /* Localizer.cpp */; };
+ F544F78915CFB2A800AF33A8 /* Localizer.h in Headers */ = {isa = PBXBuildFile; fileRef = F544F78715CFB2A800AF33A8 /* Localizer.h */; };
F55B3DAD1251F12D003EF269 /* BaseTextInputType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55B3D791251F12D003EF269 /* BaseTextInputType.cpp */; };
F55B3DAE1251F12D003EF269 /* BaseTextInputType.h in Headers */ = {isa = PBXBuildFile; fileRef = F55B3D7A1251F12D003EF269 /* BaseTextInputType.h */; };
F55B3DAF1251F12D003EF269 /* ButtonInputType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55B3D7B1251F12D003EF269 /* ButtonInputType.cpp */; };
@@ -7826,6 +7833,8 @@
2981CAAD131822EC00D12F2A /* AccessibilityTableHeaderContainer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityTableHeaderContainer.cpp; sourceTree = "<group>"; };
2981CAAE131822EC00D12F2A /* AccessibilityTableRow.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityTableRow.cpp; sourceTree = "<group>"; };
2981CAAF131822EC00D12F2A /* AXObjectCache.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AXObjectCache.cpp; sourceTree = "<group>"; };
+ 2985709215CC532D006355CD /* AccessibilityNodeObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityNodeObject.cpp; sourceTree = "<group>"; };
+ 2985709315CC532D006355CD /* AccessibilityNodeObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccessibilityNodeObject.h; sourceTree = "<group>"; };
29A309AB1561C99B00BBD8E5 /* RunLoopCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RunLoopCF.cpp; sourceTree = "<group>"; };
29A309AE1561CAC400BBD8E5 /* VisitedLinks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisitedLinks.cpp; sourceTree = "<group>"; };
29A309AF1561CAC400BBD8E5 /* VisitedLinks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisitedLinks.h; sourceTree = "<group>"; };
@@ -8615,7 +8624,6 @@
4F2D205312EAE7B3005C2874 /* InspectorAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorAgent.cpp; sourceTree = "<group>"; };
4F3289B311A42AAB005ABE7E /* InspectorValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorValues.cpp; sourceTree = "<group>"; };
4F3289B411A42AAB005ABE7E /* InspectorValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorValues.h; sourceTree = "<group>"; };
- 4F32BB1A14FA85AA00F6C1A3 /* MemoryInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryInstrumentation.h; sourceTree = "<group>"; };
4F377FF415FA356A00E5D60D /* WebCoreMemoryInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreMemoryInstrumentation.h; sourceTree = "<group>"; };
4F4F5FFA11CBD2D200A186BF /* InspectorFrontend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorFrontend.cpp; sourceTree = "<group>"; };
4F4F5FFC11CBD30100A186BF /* InspectorFrontend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFrontend.h; sourceTree = "<group>"; };
@@ -9022,6 +9030,12 @@
6E67D2A41280E8A4008758F7 /* Extensions3DOpenGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Extensions3DOpenGL.cpp; sourceTree = "<group>"; };
6E67D2A51280E8A4008758F7 /* Extensions3DOpenGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Extensions3DOpenGL.h; sourceTree = "<group>"; };
6E67D2A81280E8BD008758F7 /* Extensions3D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Extensions3D.h; sourceTree = "<group>"; };
+ 6E8798B415F81E4A00BFE4AA /* ExclusionInterval.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExclusionInterval.cpp; sourceTree = "<group>"; };
+ 6E8798B515F81E4A00BFE4AA /* ExclusionInterval.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExclusionInterval.h; sourceTree = "<group>"; };
+ 6E8798B615F81E4A00BFE4AA /* ExclusionRectangle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExclusionRectangle.cpp; sourceTree = "<group>"; };
+ 6E8798B715F81E4A00BFE4AA /* ExclusionRectangle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExclusionRectangle.h; sourceTree = "<group>"; };
+ 6E8798B815F81E4A00BFE4AA /* ExclusionShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExclusionShape.cpp; sourceTree = "<group>"; };
+ 6E8798B915F81E4A00BFE4AA /* ExclusionShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExclusionShape.h; sourceTree = "<group>"; };
6EBC5D80138B4C4E00A0CF8A /* Float64Array.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Float64Array.idl; path = canvas/Float64Array.idl; sourceTree = "<group>"; };
6EBC5EAD138B50F200A0CF8A /* JSFloat64Array.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFloat64Array.cpp; sourceTree = "<group>"; };
6EBC5EAE138B50F200A0CF8A /* JSFloat64Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFloat64Array.h; sourceTree = "<group>"; };
@@ -13083,6 +13097,8 @@
C330A22113EC196B0000B45B /* ColorChooser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorChooser.h; sourceTree = "<group>"; };
C33EE5C214FB49610002095A /* BaseClickableWithKeyInputType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BaseClickableWithKeyInputType.cpp; sourceTree = "<group>"; };
C33EE5C314FB49610002095A /* BaseClickableWithKeyInputType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseClickableWithKeyInputType.h; sourceTree = "<group>"; };
+ C348612115FDE21E007A1CC9 /* InputTypeNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InputTypeNames.cpp; sourceTree = "<group>"; };
+ C348612215FDE21E007A1CC9 /* InputTypeNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputTypeNames.h; sourceTree = "<group>"; };
C37CDEBC149EF2030042090D /* ColorChooserClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorChooserClient.h; sourceTree = "<group>"; };
C3CF17A015B0063F00276D39 /* IdTargetObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IdTargetObserver.cpp; sourceTree = "<group>"; };
C3CF17A115B0063F00276D39 /* IdTargetObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IdTargetObserver.h; sourceTree = "<group>"; };
@@ -13611,8 +13627,8 @@
F523D30302DE4476018635CA /* Range.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Range.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F523D30402DE4476018635CA /* Range.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Range.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F52AD5E31534245F0059FBE6 /* EmptyClients.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmptyClients.cpp; sourceTree = "<group>"; };
- F544F78615CFB2A800AF33A8 /* NumberLocalizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NumberLocalizer.cpp; sourceTree = "<group>"; };
- F544F78715CFB2A800AF33A8 /* NumberLocalizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NumberLocalizer.h; sourceTree = "<group>"; };
+ F544F78615CFB2A800AF33A8 /* Localizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Localizer.cpp; sourceTree = "<group>"; };
+ F544F78715CFB2A800AF33A8 /* Localizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Localizer.h; sourceTree = "<group>"; };
F55B3D791251F12D003EF269 /* BaseTextInputType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BaseTextInputType.cpp; sourceTree = "<group>"; };
F55B3D7A1251F12D003EF269 /* BaseTextInputType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseTextInputType.h; sourceTree = "<group>"; };
F55B3D7B1251F12D003EF269 /* ButtonInputType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ButtonInputType.cpp; sourceTree = "<group>"; };
@@ -14802,6 +14818,8 @@
76CDD2EF1103DA6600680521 /* AccessibilityMenuListPopup.h */,
29ACB213143E7498006BCA5F /* AccessibilityMockObject.cpp */,
29ACB211143E7128006BCA5F /* AccessibilityMockObject.h */,
+ 2985709215CC532D006355CD /* AccessibilityNodeObject.cpp */,
+ 2985709315CC532D006355CD /* AccessibilityNodeObject.h */,
2981CAA5131822EC00D12F2A /* AccessibilityObject.cpp */,
29A812180FBB9C1D00510293 /* AccessibilityObject.h */,
A409C982116D0DDD007197BD /* AccessibilityProgressIndicator.cpp */,
@@ -16028,6 +16046,9 @@
85CA975B0A962E5400690CCF /* DOMDocumentType.mm */,
8518DCE70A9CC80C0091B7A6 /* DOMDOMImplementation.h */,
8518DCE80A9CC80D0091B7A6 /* DOMDOMImplementation.mm */,
+ 52CCA9E515E3F64C0053C77F /* DOMDOMNamedFlowCollection.h */,
+ 52CCA9E615E3F64C0053C77F /* DOMDOMNamedFlowCollection.mm */,
+ 52CCA9E715E3F64C0053C77F /* DOMDOMNamedFlowCollectionInternal.h */,
2D9A247015B9C29500D34527 /* DOMDOMSecurityPolicy.h */,
2D9A247215B9C2C700D34527 /* DOMDOMSecurityPolicy.mm */,
2D9A247115B9C29500D34527 /* DOMDOMSecurityPolicyInternal.h */,
@@ -16053,9 +16074,6 @@
8A19592F147EA16E00D1EA61 /* DOMWebKitNamedFlow.h */,
8A195930147EA16E00D1EA61 /* DOMWebKitNamedFlow.mm */,
8A195931147EA16E00D1EA61 /* DOMWebKitNamedFlowInternal.h */,
- 52CCA9E515E3F64C0053C77F /* DOMDOMNamedFlowCollection.h */,
- 52CCA9E615E3F64C0053C77F /* DOMDOMNamedFlowCollection.mm */,
- 52CCA9E715E3F64C0053C77F /* DOMDOMNamedFlowCollectionInternal.h */,
);
name = Core;
sourceTree = "<group>";
@@ -17631,6 +17649,8 @@
F55B3D8E1251F12D003EF269 /* ImageInputType.h */,
37E3524A12450C5200BAF5D9 /* InputType.cpp */,
37E3524C12450C6600BAF5D9 /* InputType.h */,
+ C348612115FDE21E007A1CC9 /* InputTypeNames.cpp */,
+ C348612215FDE21E007A1CC9 /* InputTypeNames.h */,
450CEBEE15073BBE002BB149 /* LabelableElement.cpp */,
450CEBEF15073BBE002BB149 /* LabelableElement.h */,
A456FA2411AD4A830020B420 /* LabelsNodeList.cpp */,
@@ -18154,9 +18174,6 @@
A75E8B7F0E1DE2B0007F2481 /* filters */ = {
isa = PBXGroup;
children = (
- 7E12E90D15FA5D3A005E4126 /* CustomFilterMeshGenerator.h */,
- 7E12E90E15FA5D3A005E4126 /* CustomFilterMeshGenerator.cpp */,
- 509EC10815E848CA00E82581 /* CustomFilterTransformParameter.h */,
49ECEB5C1499790D00CDD3A4 /* arm */,
50D4060F147D49DE00D30BB5 /* CustomFilterCompiledProgram.cpp */,
50D40610147D49DE00D30BB5 /* CustomFilterCompiledProgram.h */,
@@ -18164,6 +18181,8 @@
50987C25157D676D00BDA835 /* CustomFilterGlobalContext.h */,
50D405F7147D31F300D30BB5 /* CustomFilterMesh.cpp */,
50D405F8147D31F300D30BB5 /* CustomFilterMesh.h */,
+ 7E12E90E15FA5D3A005E4126 /* CustomFilterMeshGenerator.cpp */,
+ 7E12E90D15FA5D3A005E4126 /* CustomFilterMeshGenerator.h */,
50CC089914C6E99C0017AB51 /* CustomFilterNumberParameter.h */,
50CC0A3814C6F5B10017AB51 /* CustomFilterOperation.cpp */,
50ACE2CA14B5D79300446666 /* CustomFilterOperation.h */,
@@ -18173,6 +18192,7 @@
503D0CA914B5B08700F32F57 /* CustomFilterProgramClient.h */,
50D88CB315BDFDAA001809F4 /* CustomFilterProgramInfo.cpp */,
50D88CB415BDFDAA001809F4 /* CustomFilterProgramInfo.h */,
+ 509EC10815E848CA00E82581 /* CustomFilterTransformParameter.h */,
A29532CD15DD5E1700469EBC /* CustomFilterValidatedProgram.cpp */,
A29532CE15DD5E1700469EBC /* CustomFilterValidatedProgram.h */,
A1E1154313015C3D0054AC8C /* DistantLightSource.cpp */,
@@ -18883,8 +18903,6 @@
A83B79100CCB001B000B0825 /* Core */ = {
isa = PBXGroup;
children = (
- 52CCA9E015E3F62C0053C77F /* JSDOMNamedFlowCollection.cpp */,
- 52CCA9E115E3F62C0053C77F /* JSDOMNamedFlowCollection.h */,
65DF31D809D1C122000BE325 /* JSAttr.cpp */,
65DF31D909D1C123000BE325 /* JSAttr.h */,
93F9B79E0BA6032600854064 /* JSCDATASection.cpp */,
@@ -18911,6 +18929,8 @@
BC60D7BF0D29A46300B9918F /* JSDOMCoreException.h */,
65DF31E309D1CC60000BE325 /* JSDOMImplementation.cpp */,
65DF31E409D1CC60000BE325 /* JSDOMImplementation.h */,
+ 52CCA9E015E3F62C0053C77F /* JSDOMNamedFlowCollection.cpp */,
+ 52CCA9E115E3F62C0053C77F /* JSDOMNamedFlowCollection.h */,
C5137CF011A58378004ADB99 /* JSDOMStringList.cpp */,
C5137CF111A58378004ADB99 /* JSDOMStringList.h */,
BC64649511D82349006455B0 /* JSDOMStringMap.cpp */,
@@ -19878,8 +19898,8 @@
144FCFDE14EF2509000D17A3 /* FractionalLayoutRect.cpp */,
144FCFDF14EF2509000D17A3 /* FractionalLayoutRect.h */,
144FCE5814EC79E7000D17A3 /* FractionalLayoutSize.h */,
- BC23F0DA0DAFF4A4009FDC91 /* GeneratedImage.h */,
4FB390AC15EF61F3007AD51F /* GeneratedImage.cpp */,
+ BC23F0DA0DAFF4A4009FDC91 /* GeneratedImage.h */,
BCE04C890DAFF7A0007A0F41 /* Generator.h */,
2D2FC0561460CD6F00263633 /* GeneratorGeneratedImage.cpp */,
2D2FC0571460CD6F00263633 /* GeneratorGeneratedImage.h */,
@@ -19994,8 +20014,8 @@
A5732B0C136A16C4005C8D7C /* LocalizedDate.h */,
A5732B0E136A1715005C8D7C /* LocalizedDateNone.cpp */,
F5142C68123F12B000F5BD4C /* LocalizedNumber.h */,
- F544F78615CFB2A800AF33A8 /* NumberLocalizer.cpp */,
- F544F78715CFB2A800AF33A8 /* NumberLocalizer.h */,
+ F544F78615CFB2A800AF33A8 /* Localizer.cpp */,
+ F544F78715CFB2A800AF33A8 /* Localizer.h */,
BC76AC110DD7AD5C00415F34 /* ParserUtilities.h */,
379E371413736A6600B9E919 /* QuotedPrintable.cpp */,
379E371513736A6600B9E919 /* QuotedPrintable.h */,
@@ -21056,9 +21076,9 @@
F523D18402DE42E8018635CA /* css */ = {
isa = PBXGroup;
children = (
+ 93CA4C9C09DF93FA00DF8677 /* maketokenizer */,
FBD6AF8415EF21D4008B7110 /* BasicShapeFunctions.cpp */,
FBD6AF8515EF21D4008B7110 /* BasicShapeFunctions.h */,
- 93CA4C9C09DF93FA00DF8677 /* maketokenizer */,
A80E6CDA0A1989CA007FB8C5 /* Counter.h */,
930705C709E0C95F00B17FE4 /* Counter.idl */,
CAE9F90D146441F000C245B0 /* CSSAspectRatioValue.cpp */,
@@ -21305,6 +21325,12 @@
9392F14B0AD1861B00691BD4 /* CounterNode.h */,
A8CFF6CA0A1561CD000A4234 /* EllipsisBox.cpp */,
A8CFF6BD0A156118000A4234 /* EllipsisBox.h */,
+ 6E8798B415F81E4A00BFE4AA /* ExclusionInterval.cpp */,
+ 6E8798B515F81E4A00BFE4AA /* ExclusionInterval.h */,
+ 6E8798B615F81E4A00BFE4AA /* ExclusionRectangle.cpp */,
+ 6E8798B715F81E4A00BFE4AA /* ExclusionRectangle.h */,
+ 6E8798B815F81E4A00BFE4AA /* ExclusionShape.cpp */,
+ 6E8798B915F81E4A00BFE4AA /* ExclusionShape.h */,
31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */,
31313F641443B35E006E2A90 /* FilterEffectRenderer.h */,
A8CFF0480A154F09000A4234 /* FixedTableLayout.cpp */,
@@ -21526,9 +21552,6 @@
F523D32402DE4478018635CA /* dom */ = {
isa = PBXGroup;
children = (
- 52B6C9BF15E3F4DF00690B05 /* DOMNamedFlowCollection.idl */,
- 52B6C9C015E3F4DF00690B05 /* NamedFlowCollection.cpp */,
- 52B6C9C115E3F4DF00690B05 /* NamedFlowCollection.h */,
E1C4DE6D0EA75C650023CCD6 /* ActiveDOMObject.cpp */,
E1C4DE680EA75C1E0023CCD6 /* ActiveDOMObject.h */,
A8C4A7FC09D563270003AC8D /* Attr.cpp */,
@@ -21644,6 +21667,7 @@
93EEC1E909C2877700C515D1 /* DOMImplementation.idl */,
52B6C9BD15E3F4DF00690B05 /* DOMNamedFlowCollection.cpp */,
52B6C9BE15E3F4DF00690B05 /* DOMNamedFlowCollection.h */,
+ 52B6C9BF15E3F4DF00690B05 /* DOMNamedFlowCollection.idl */,
C55610F011A704EB00B82D27 /* DOMStringList.cpp */,
C544274911A57E7A0063A749 /* DOMStringList.h */,
C544274A11A57E7A0063A749 /* DOMStringList.idl */,
@@ -21722,7 +21746,6 @@
BC9A6144146859D9006057FD /* make_dom_exceptions.pl */,
BC9A6145146859D9006057FD /* make_event_factory.pl */,
BC9A6146146859D9006057FD /* make_names.pl */,
- 4F32BB1A14FA85AA00F6C1A3 /* MemoryInstrumentation.h */,
E1ADECCD0E76AD8B004A1A5E /* MessageChannel.cpp */,
E1ADECCC0E76AD8B004A1A5E /* MessageChannel.h */,
E1ADECD00E76ADAB004A1A5E /* MessageChannel.idl */,
@@ -21756,6 +21779,8 @@
C6F08FB91430FE8F00685849 /* MutationRecord.cpp */,
C6F08FBA1430FE8F00685849 /* MutationRecord.h */,
C6F08FBB1430FE8F00685849 /* MutationRecord.idl */,
+ 52B6C9C015E3F4DF00690B05 /* NamedFlowCollection.cpp */,
+ 52B6C9C115E3F4DF00690B05 /* NamedFlowCollection.h */,
BCF34A3611A231CD00C71804 /* NamedNodeMap.cpp */,
A81872180977D3C0005826D9 /* NamedNodeMap.h */,
85ACA9F90A9B631000671E90 /* NamedNodeMap.idl */,
@@ -22347,6 +22372,8 @@
C33EE5C514FB49610002095A /* BaseClickableWithKeyInputType.h in Headers */,
F59C96001255B23F000623C0 /* BaseDateAndTimeInputType.h in Headers */,
F55B3DAE1251F12D003EF269 /* BaseTextInputType.h in Headers */,
+ FBD6AF8A15EF25DF008B7110 /* BasicShapeFunctions.h in Headers */,
+ FBD6AF8C15EF2604008B7110 /* BasicShapes.h in Headers */,
BC9462D8107A7B4C00857193 /* BeforeLoadEvent.h in Headers */,
AB23A32809BBA7D00067CC53 /* BeforeTextInsertedEvent.h in Headers */,
85031B3D0A44EFC700F992E0 /* BeforeUnloadEvent.h in Headers */,
@@ -22492,6 +22519,7 @@
E169803D1133542D00894115 /* CRuntimeObject.h in Headers */,
975CA28B130365F800E99AD9 /* Crypto.h in Headers */,
CAE9F910146441F000C245B0 /* CSSAspectRatioValue.h in Headers */,
+ FBD6AF8815EF25C9008B7110 /* CSSBasicShapes.h in Headers */,
E16A84FA14C85CCC002977DF /* CSSBorderImage.h in Headers */,
BC274B2F140EBEB200EADFA6 /* CSSBorderImageSliceValue.h in Headers */,
49AE2D8F134EE50C0072920A /* CSSCalculationValue.h in Headers */,
@@ -22556,6 +22584,7 @@
50D40612147D49DE00D30BB5 /* CustomFilterCompiledProgram.h in Headers */,
50987C27157D676D00BDA835 /* CustomFilterGlobalContext.h in Headers */,
50D405FA147D31F300D30BB5 /* CustomFilterMesh.h in Headers */,
+ 7E12E90F15FA5D3A005E4126 /* CustomFilterMeshGenerator.h in Headers */,
50CC089A14C6E99C0017AB51 /* CustomFilterNumberParameter.h in Headers */,
50ACE2CB14B5D79300446666 /* CustomFilterOperation.h in Headers */,
509CC9FB14C069ED00BBECBD /* CustomFilterParameter.h in Headers */,
@@ -23332,6 +23361,9 @@
148AFDA50AF58360008CC700 /* ExceptionHandlers.h in Headers */,
9767CE0B145ABC13005E64DB /* ExceptionHeaders.h in Headers */,
9767CE0C145ABC13005E64DB /* ExceptionInterfaces.h in Headers */,
+ 6E8798BB15F81E4A00BFE4AA /* ExclusionInterval.h in Headers */,
+ 6E8798BD15F81E4A00BFE4AA /* ExclusionRectangle.h in Headers */,
+ 6E8798BF15F81E4A00BFE4AA /* ExclusionShape.h in Headers */,
6E67D2A91280E8BD008758F7 /* Extensions3D.h in Headers */,
6E67D2A71280E8A4008758F7 /* Extensions3DOpenGL.h in Headers */,
44DAB5B215A623580097C1E4 /* Extensions3DOpenGLCommon.h in Headers */,
@@ -23709,6 +23741,7 @@
BCE789161120D6080060ECE5 /* InlineIterator.h in Headers */,
BCEA485A097D93020094C9E4 /* InlineTextBox.h in Headers */,
37E3524D12450C6600BAF5D9 /* InputType.h in Headers */,
+ C348612415FDE21E007A1CC9 /* InputTypeNames.h in Headers */,
93309DEA099E64920056E581 /* InsertIntoTextNodeCommand.h in Headers */,
57CF497514EE36D700ECFF14 /* InsertionPoint.h in Headers */,
93309DEC099E64920056E581 /* InsertLineBreakCommand.h in Headers */,
@@ -23861,9 +23894,9 @@
2E0888D51148848A00AF4265 /* JSDOMFormData.h in Headers */,
E1C36C030EB076D6007410BC /* JSDOMGlobalObject.h in Headers */,
65DF31F809D1CC60000BE325 /* JSDOMImplementation.h in Headers */,
- 52CCA9E315E3F62C0053C77F /* JSDOMNamedFlowCollection.h in Headers */,
A9D248070D757E7D00FDF959 /* JSDOMMimeType.h in Headers */,
A9D248090D757E7D00FDF959 /* JSDOMMimeTypeArray.h in Headers */,
+ 52CCA9E315E3F62C0053C77F /* JSDOMNamedFlowCollection.h in Headers */,
1ACE53E00A8D18810022947D /* JSDOMParser.h in Headers */,
A9D247FF0D757E6900FDF959 /* JSDOMPlugin.h in Headers */,
A9D248010D757E6900FDF959 /* JSDOMPluginArray.h in Headers */,
@@ -24333,6 +24366,7 @@
2D9066070BE141D400956998 /* LayoutState.h in Headers */,
D630E2AC149BF344005B2F93 /* LayoutTestSupport.h in Headers */,
BACF290113B2A0D500781F90 /* LayoutTypes.h in Headers */,
+ 31B801BB15EC58C700CE643D /* LayoutTypesInlineMethods.h in Headers */,
512DD8F50D91E6AF000F89EE /* LegacyWebArchive.h in Headers */,
BCE65BEB0EACDF16007E4533 /* Length.h in Headers */,
BCFF64910EAD15C200C1D6F7 /* LengthBox.h in Headers */,
@@ -24363,6 +24397,7 @@
A5732B0D136A16C4005C8D7C /* LocalizedDate.h in Headers */,
F5142C69123F12B000F5BD4C /* LocalizedNumber.h in Headers */,
935207BE09BD410A00F2038D /* LocalizedStrings.h in Headers */,
+ F544F78915CFB2A800AF33A8 /* Localizer.h in Headers */,
BCE1C41B0D982980003B02F2 /* Location.h in Headers */,
A8239E0109B3CF8A00B60641 /* Logging.h in Headers */,
656D37410ADBA5DE00A4554D /* MainResourceLoader.h in Headers */,
@@ -24406,7 +24441,6 @@
FD671A78159BB07000197559 /* MediaStreamAudioSourceNode.h in Headers */,
BCB16C180979C3BD00467741 /* MemoryCache.h in Headers */,
9FFE3E7B11B59C5D0037874E /* MemoryInfo.h in Headers */,
- 4F32BB1B14FA85E800F6C1A3 /* MemoryInstrumentation.h in Headers */,
4F8565EA1530356E00FAE776 /* MemoryInstrumentationImpl.h in Headers */,
6571DCC81385E6A400702DD0 /* MemoryPressureHandler.h in Headers */,
D630E2AC149BF344005B2F95 /* MemoryUsageSupport.h in Headers */,
@@ -24480,7 +24514,6 @@
1A927FD41416A15B003A83C8 /* nptypes.h in Headers */,
93500F3213FDE3BE0099EC24 /* NSScrollerImpDetails.h in Headers */,
F55B3DC81251F12D003EF269 /* NumberInputType.h in Headers */,
- F544F78915CFB2A800AF33A8 /* NumberLocalizer.h in Headers */,
1A569D120D7E2B82007C3983 /* objc_class.h in Headers */,
1A569D140D7E2B82007C3983 /* objc_header.h in Headers */,
1A569D150D7E2B82007C3983 /* objc_instance.h in Headers */,
@@ -24518,6 +24551,7 @@
E1284AE110447D4500EAEB52 /* PageTransitionEvent.h in Headers */,
51E1ECC30C91C90400DC255B /* PageURLRecord.h in Headers */,
FFD5B97B135CC97800D5E92A /* PageVisibilityState.h in Headers */,
+ 9377ABA015DEFEEF0031FD04 /* Pagination.h in Headers */,
0885067F11DA045B00182B98 /* PaintInfo.h in Headers */,
0885068011DA045B00182B98 /* PaintPhase.h in Headers */,
A80E6CFB0A1989CA007FB8C5 /* Pair.h in Headers */,
@@ -24635,6 +24669,7 @@
9392F1420AD185F400691BD4 /* RenderCounter.h in Headers */,
BCEA486E097D93020094C9E4 /* RenderDeprecatedFlexibleBox.h in Headers */,
D302754A12A5FE84004BD828 /* RenderDetailsMarker.h in Headers */,
+ 76F2E2EC15F74CEF005FF664 /* RenderDialog.h in Headers */,
A76E5F7F135E0DCF00A69837 /* RenderedDocumentMarker.h in Headers */,
9B32CDA913DF7FA900F34D13 /* RenderedPosition.h in Headers */,
0F5B7A5510F65D7A00376302 /* RenderEmbeddedObject.h in Headers */,
@@ -24838,6 +24873,7 @@
0FE71406142170B800DB33BA /* ScrollbarThemeMock.h in Headers */,
5D925B680F64D4DD00B847F0 /* ScrollBehavior.h in Headers */,
1AA84F05143BA7BD0051D153 /* ScrollElasticityController.h in Headers */,
+ 0F605AED15F94848004DF0C0 /* ScrollingConstraints.h in Headers */,
1AF62EE814DA22A70041556C /* ScrollingCoordinator.h in Headers */,
1AF62F2614DAFEA10041556C /* ScrollingThread.h in Headers */,
1AAADDA414DB409F00AF64B3 /* ScrollingTree.h in Headers */,
@@ -25355,6 +25391,7 @@
CD127DEE14F3098400E84779 /* WebCoreFullScreenWindow.h in Headers */,
BC53D911114310CC000D817E /* WebCoreJSClientData.h in Headers */,
93F199BB08245E59001E9ABC /* WebCoreKeyboardUIMode.h in Headers */,
+ 4F377FF515FA356A00E5D60D /* WebCoreMemoryInstrumentation.h in Headers */,
371941971566B37200A276D8 /* WebCoreNSCellExtras.h in Headers */,
934D9BA70B8C1175007B42A9 /* WebCoreNSStringExtras.h in Headers */,
C5B4C24D1509236C00A6EF37 /* WebCoreNSURLExtras.h in Headers */,
@@ -25468,6 +25505,7 @@
93309E24099E64920056E581 /* WrapContentsInDummySpanCommand.h in Headers */,
FD748AC015BF74ED0059CF0D /* WrapShapeInfo.h in Headers */,
9BAF3B2412C1A39800014BF1 /* WritingDirection.h in Headers */,
+ 14476AA815DC4BB100305DB2 /* WritingMode.h in Headers */,
6565820209D1508D000E61D7 /* XLinkNames.h in Headers */,
00D0464B13C4D14500326FCC /* XMLCharacterReferenceParser.h in Headers */,
00B9318813BA8DBA0035A948 /* XMLDocumentParser.h in Headers */,
@@ -25508,16 +25546,6 @@
E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
977E2E0F12F0FC9C00C13379 /* XSSAuditor.h in Headers */,
FD537353137B651800008DCE /* ZeroPole.h in Headers */,
- 9377ABA015DEFEEF0031FD04 /* Pagination.h in Headers */,
- 14476AA815DC4BB100305DB2 /* WritingMode.h in Headers */,
- 31B801BB15EC58C700CE643D /* LayoutTypesInlineMethods.h in Headers */,
- FBD6AF8815EF25C9008B7110 /* CSSBasicShapes.h in Headers */,
- FBD6AF8A15EF25DF008B7110 /* BasicShapeFunctions.h in Headers */,
- FBD6AF8C15EF2604008B7110 /* BasicShapes.h in Headers */,
- 76F2E2EC15F74CEF005FF664 /* RenderDialog.h in Headers */,
- 0F605AED15F94848004DF0C0 /* ScrollingConstraints.h in Headers */,
- 4F377FF515FA356A00E5D60D /* WebCoreMemoryInstrumentation.h in Headers */,
- 7E12E90F15FA5D3A005E4126 /* CustomFilterMeshGenerator.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -25964,6 +25992,8 @@
C33EE5C414FB49610002095A /* BaseClickableWithKeyInputType.cpp in Sources */,
F59C95FF1255B23F000623C0 /* BaseDateAndTimeInputType.cpp in Sources */,
F55B3DAD1251F12D003EF269 /* BaseTextInputType.cpp in Sources */,
+ FBD6AF8915EF25DB008B7110 /* BasicShapeFunctions.cpp in Sources */,
+ FBD6AF8D15EF260A008B7110 /* BasicShapes.cpp in Sources */,
AB23A32709BBA7D00067CC53 /* BeforeTextInsertedEvent.cpp in Sources */,
85031B3C0A44EFC700F992E0 /* BeforeUnloadEvent.cpp in Sources */,
B2C3DA230D006C1D00EF6F26 /* BidiContext.cpp in Sources */,
@@ -25976,6 +26006,7 @@
FDC54F041399B0DA008D9117 /* BiquadFilterNode.cpp in Sources */,
FD31602612B0267600C1A359 /* BiquadProcessor.cpp in Sources */,
A89943290B42338800D7C802 /* BitmapImage.cpp in Sources */,
+ 377A3A9015EFCE9B0059F5C7 /* BitmapImageCG.cpp in Sources */,
976D6C78122B8A3D001FD1F7 /* Blob.cpp in Sources */,
2EDEF1F3121B0EFC00726DB2 /* BlobData.cpp in Sources */,
2EDEF1F6121B0EFC00726DB2 /* BlobRegistryImpl.cpp in Sources */,
@@ -26080,6 +26111,7 @@
E16980491133644700894115 /* CRuntimeObject.cpp in Sources */,
975CA28A130365F800E99AD9 /* Crypto.cpp in Sources */,
CAE9F90F146441F000C245B0 /* CSSAspectRatioValue.cpp in Sources */,
+ FBD6AF8B15EF25E5008B7110 /* CSSBasicShapes.cpp in Sources */,
E16A84F914C85CCC002977DF /* CSSBorderImage.cpp in Sources */,
BC274B31140EBED800EADFA6 /* CSSBorderImageSliceValue.cpp in Sources */,
49AE2D8E134EE50C0072920A /* CSSCalculationValue.cpp in Sources */,
@@ -26136,6 +26168,7 @@
50D40611147D49DE00D30BB5 /* CustomFilterCompiledProgram.cpp in Sources */,
50987C26157D676D00BDA835 /* CustomFilterGlobalContext.cpp in Sources */,
50D405F9147D31F300D30BB5 /* CustomFilterMesh.cpp in Sources */,
+ 7E12E91015FA5D3A005E4126 /* CustomFilterMeshGenerator.cpp in Sources */,
50CC0A3914C6F5B10017AB51 /* CustomFilterOperation.cpp in Sources */,
503D0CAA14B5B08700F32F57 /* CustomFilterProgram.cpp in Sources */,
50D88CB515BDFDAA001809F4 /* CustomFilterProgramInfo.cpp in Sources */,
@@ -26236,6 +26269,7 @@
85089CDC0A98C42800A275AA /* DOMDocumentFragment.mm in Sources */,
85CA975D0A962E5400690CCF /* DOMDocumentType.mm in Sources */,
8518DCEA0A9CC80D0091B7A6 /* DOMDOMImplementation.mm in Sources */,
+ 52CCA9E915E3F64C0053C77F /* DOMDOMNamedFlowCollection.mm in Sources */,
2D9A247315B9C2D100D34527 /* DOMDOMSecurityPolicy.mm in Sources */,
7694565C1214DB630007CBAE /* DOMDOMTokenList.mm in Sources */,
7AABA25914BC613300AA9A11 /* DOMEditor.cpp in Sources */,
@@ -26327,6 +26361,7 @@
A9C6E4E70D745E18006442E9 /* DOMMimeTypeArray.cpp in Sources */,
857E0B260AB043460036E447 /* DOMMouseEvent.mm in Sources */,
85C7F5C00AAFB7CD004014DD /* DOMMutationEvent.mm in Sources */,
+ 52B6C9C215E3F4DF00690B05 /* DOMNamedFlowCollection.cpp in Sources */,
8518DD790A9CF31B0091B7A6 /* DOMNamedNodeMap.mm in Sources */,
853BF4DC0ABB6B55008647BB /* DOMNode.mm in Sources */,
85526C380AB0A17E000302EA /* DOMNodeIterator.mm in Sources */,
@@ -26578,6 +26613,9 @@
973DC63F145A9409002842C2 /* ExceptionCodeDescription.cpp in Sources */,
A7CACDB113CE875C00BBBE3F /* ExceptionCodePlaceholder.cpp in Sources */,
148AFDA60AF58360008CC700 /* ExceptionHandlers.mm in Sources */,
+ 6E8798BA15F81E4A00BFE4AA /* ExclusionInterval.cpp in Sources */,
+ 6E8798BC15F81E4A00BFE4AA /* ExclusionRectangle.cpp in Sources */,
+ 6E8798BE15F81E4A00BFE4AA /* ExclusionShape.cpp in Sources */,
6E67D2A61280E8A4008758F7 /* Extensions3DOpenGL.cpp in Sources */,
44DAB5B115A623580097C1E4 /* Extensions3DOpenGLCommon.cpp in Sources */,
7728694E14F8882500F484DC /* EXTTextureFilterAnisotropic.cpp in Sources */,
@@ -26686,6 +26724,7 @@
97205AAF123928CA00B17380 /* FTPDirectoryDocument.cpp in Sources */,
51C81B890C4422F70019ECE3 /* FTPDirectoryParser.cpp in Sources */,
1432E8490C51493F00B1500F /* GCController.cpp in Sources */,
+ 4FB390AD15EF61F3007AD51F /* GeneratedImage.cpp in Sources */,
2D481F03146B5C6500AA7834 /* GeneratorGeneratedImage.cpp in Sources */,
0720B0A014D3323500642955 /* GenericEventQueue.cpp in Sources */,
9746AF2314F4DDE6003E7A70 /* Geolocation.cpp in Sources */,
@@ -26905,6 +26944,7 @@
A8CFF5E40A155A05000A4234 /* InlineFlowBox.cpp in Sources */,
BCEA4859097D93020094C9E4 /* InlineTextBox.cpp in Sources */,
37E3524B12450C5200BAF5D9 /* InputType.cpp in Sources */,
+ C348612315FDE21E007A1CC9 /* InputTypeNames.cpp in Sources */,
93309DE9099E64920056E581 /* InsertIntoTextNodeCommand.cpp in Sources */,
57CF497414EE36D700ECFF14 /* InsertionPoint.cpp in Sources */,
93309DEB099E64920056E581 /* InsertLineBreakCommand.cpp in Sources */,
@@ -27082,6 +27122,7 @@
A9D248060D757E7D00FDF959 /* JSDOMMimeType.cpp in Sources */,
A9D248080D757E7D00FDF959 /* JSDOMMimeTypeArray.cpp in Sources */,
A9C6E6470D7465CA006442E9 /* JSDOMMimeTypeArrayCustom.cpp in Sources */,
+ 52CCA9E215E3F62C0053C77F /* JSDOMNamedFlowCollection.cpp in Sources */,
1ACE53DF0A8D18810022947D /* JSDOMParser.cpp in Sources */,
A9D247FE0D757E6900FDF959 /* JSDOMPlugin.cpp in Sources */,
A9D248000D757E6900FDF959 /* JSDOMPluginArray.cpp in Sources */,
@@ -27669,6 +27710,7 @@
F5CC42DC12F801CA00D5F7E3 /* LocalizedNumberMac.mm in Sources */,
C046E1AC1208A9FE00BA2CF7 /* LocalizedStrings.cpp in Sources */,
BC25B52A131C6D3900180E10 /* LocalizedStringsMac.cpp in Sources */,
+ F544F78815CFB2A800AF33A8 /* Localizer.cpp in Sources */,
BCE1C41C0D982981003B02F2 /* Location.cpp in Sources */,
A8239E0009B3CF8A00B60641 /* Logging.cpp in Sources */,
1402645E0AFDC19B005919E2 /* LoggingMac.mm in Sources */,
@@ -27736,6 +27778,7 @@
D6E528A3149A926D00EFE1F3 /* MutationObserverInterestGroup.cpp in Sources */,
D6E276AF14637455001D280A /* MutationObserverRegistration.cpp in Sources */,
C6F08FBC1430FE8F00685849 /* MutationRecord.cpp in Sources */,
+ 52B6C9C515E3F4DF00690B05 /* NamedFlowCollection.cpp in Sources */,
BCF34A3711A231CD00C71804 /* NamedNodeMap.cpp in Sources */,
A81872240977D3C0005826D9 /* NameNodeList.cpp in Sources */,
E10B9B6D0B747599003ED890 /* NativeXPathNSResolver.cpp in Sources */,
@@ -27763,7 +27806,6 @@
1A569D0D0D7E2B82007C3983 /* npruntime.cpp in Sources */,
52F52E1114A0134F00ACC397 /* NSScrollerImpDetails.mm in Sources */,
F55B3DC71251F12D003EF269 /* NumberInputType.cpp in Sources */,
- F544F78815CFB2A800AF33A8 /* NumberLocalizer.cpp in Sources */,
1A569D130D7E2B82007C3983 /* objc_class.mm in Sources */,
1A569D160D7E2B82007C3983 /* objc_instance.mm in Sources */,
1A569D180D7E2B82007C3983 /* objc_runtime.mm in Sources */,
@@ -27880,6 +27922,7 @@
9392F1440AD185FE00691BD4 /* RenderCounter.cpp in Sources */,
BCEA486D097D93020094C9E4 /* RenderDeprecatedFlexibleBox.cpp in Sources */,
D302754912A5FE84004BD828 /* RenderDetailsMarker.cpp in Sources */,
+ 76F2E2EB15F74CEF005FF664 /* RenderDialog.cpp in Sources */,
9B32CDAA13DF7FA900F34D13 /* RenderedPosition.cpp in Sources */,
0F5B7A5410F65D7A00376302 /* RenderEmbeddedObject.cpp in Sources */,
A8EA73C30A1900E300A8EF5F /* RenderFieldset.cpp in Sources */,
@@ -28044,6 +28087,7 @@
0FE71405142170B800DB33BA /* ScrollbarThemeMock.cpp in Sources */,
5D925B670F64D4DD00B847F0 /* ScrollBehavior.cpp in Sources */,
1AA84F04143BA7BD0051D153 /* ScrollElasticityController.mm in Sources */,
+ 0F605AEC15F94848004DF0C0 /* ScrollingConstraints.cpp in Sources */,
1AF62EE714DA22A70041556C /* ScrollingCoordinator.cpp in Sources */,
1AF62EE614DA22A70041556C /* ScrollingCoordinatorMac.mm in Sources */,
3866AF3814F1C17100283D68 /* ScrollingCoordinatorNone.cpp in Sources */,
@@ -28371,6 +28415,7 @@
CE7B2DB61586ABAD0098B3FA /* TextAlternativeWithRange.mm in Sources */,
372C00C4129611F1005C9575 /* TextBoundaries.cpp in Sources */,
B2AFFC970D00A5DF0030074D /* TextBoundaries.mm in Sources */,
+ BCD8A5F015F56F2C0098D071 /* TextBreakIterator.cpp in Sources */,
B2C3DA370D006C1D00EF6F26 /* TextBreakIteratorICU.cpp in Sources */,
B2AFFC980D00A5DF0030074D /* TextBreakIteratorInternalICUMac.mm in Sources */,
A7DBF8DD1276919C006B6008 /* TextCheckingHelper.cpp in Sources */,
@@ -28598,19 +28643,6 @@
E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
977E2E0E12F0FC9C00C13379 /* XSSAuditor.cpp in Sources */,
FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
- 52B6C9C215E3F4DF00690B05 /* DOMNamedFlowCollection.cpp in Sources */,
- 52B6C9C515E3F4DF00690B05 /* NamedFlowCollection.cpp in Sources */,
- 52CCA9E215E3F62C0053C77F /* JSDOMNamedFlowCollection.cpp in Sources */,
- 52CCA9E915E3F64C0053C77F /* DOMDOMNamedFlowCollection.mm in Sources */,
- FBD6AF8915EF25DB008B7110 /* BasicShapeFunctions.cpp in Sources */,
- FBD6AF8B15EF25E5008B7110 /* CSSBasicShapes.cpp in Sources */,
- FBD6AF8D15EF260A008B7110 /* BasicShapes.cpp in Sources */,
- 4FB390AD15EF61F3007AD51F /* GeneratedImage.cpp in Sources */,
- 377A3A9015EFCE9B0059F5C7 /* BitmapImageCG.cpp in Sources */,
- BCD8A5F015F56F2C0098D071 /* TextBreakIterator.cpp in Sources */,
- 76F2E2EB15F74CEF005FF664 /* RenderDialog.cpp in Sources */,
- 0F605AEC15F94848004DF0C0 /* ScrollingConstraints.cpp in Sources */,
- 7E12E91015FA5D3A005E4126 /* CustomFilterMeshGenerator.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Source/WebCore/accessibility/AccessibilityObject.h b/Source/WebCore/accessibility/AccessibilityObject.h
index ca63f3f1d..9e4181212 100644
--- a/Source/WebCore/accessibility/AccessibilityObject.h
+++ b/Source/WebCore/accessibility/AccessibilityObject.h
@@ -144,6 +144,7 @@ enum AccessibilityRole {
LandmarkMainRole,
LandmarkNavigationRole,
LandmarkSearchRole,
+ LegendRole,
LinkRole,
ListRole,
ListBoxRole,
diff --git a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
index 87e2f8179..4f295b354 100644
--- a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -3192,6 +3192,8 @@ AccessibilityRole AccessibilityRenderObject::determineAccessibilityRole()
return ListMarkerRole;
if (node && node->hasTagName(buttonTag))
return buttonRoleType();
+ if (node && node->hasTagName(legendTag))
+ return LegendRole;
if (m_renderer->isText())
return StaticTextRole;
if (cssBox && cssBox->isImage()) {
diff --git a/Source/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp b/Source/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
index 4cf6979bb..42cf02ed5 100644
--- a/Source/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
+++ b/Source/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
@@ -89,7 +89,7 @@ AccessibilityObjectInclusion AccessibilityObject::accessibilityPlatformIncludesO
return DefaultBehavior;
child = child->firstChild();
- if (child->isLink() || !child->firstAnonymousBlockChild())
+ if (child && (child->isLink() || !child->firstAnonymousBlockChild()))
return IncludeObject;
}
diff --git a/Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp b/Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp
index ec990376f..ec223aa02 100644
--- a/Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp
+++ b/Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp
@@ -99,6 +99,15 @@ static const gchar* webkitAccessibleGetName(AtkObject* object)
if (!coreObject->isAccessibilityRenderObject())
return returnString(coreObject->stringValue());
+ if (coreObject->isFieldset()) {
+ AccessibilityObject* label = coreObject->titleUIElement();
+ if (label) {
+ AtkObject* atkObject = label->wrapper();
+ if (ATK_IS_TEXT(atkObject))
+ return atk_text_get_text(ATK_TEXT(atkObject), 0, -1);
+ }
+ }
+
if (coreObject->isControl()) {
AccessibilityObject* label = coreObject->correspondingLabelForControlElement();
if (label) {
@@ -166,6 +175,23 @@ static const gchar* webkitAccessibleGetDescription(AtkObject* object)
static void setAtkRelationSetFromCoreObject(AccessibilityObject* coreObject, AtkRelationSet* relationSet)
{
+ if (coreObject->isFieldset()) {
+ AccessibilityObject* label = coreObject->titleUIElement();
+ if (label)
+ atk_relation_set_add_relation_by_type(relationSet, ATK_RELATION_LABELLED_BY, label->wrapper());
+ return;
+ }
+
+ if (coreObject->roleValue() == LegendRole) {
+ for (AccessibilityObject* parent = coreObject->parentObjectUnignored(); parent; parent = parent->parentObjectUnignored()) {
+ if (parent->isFieldset()) {
+ atk_relation_set_add_relation_by_type(relationSet, ATK_RELATION_LABEL_FOR, parent->wrapper());
+ break;
+ }
+ }
+ return;
+ }
+
if (coreObject->isControl()) {
AccessibilityObject* label = coreObject->correspondingLabelForControlElement();
if (label)
@@ -519,6 +545,7 @@ static AtkRole atkRole(AccessibilityRole role)
case ParagraphRole:
return ATK_ROLE_PARAGRAPH;
case LabelRole:
+ case LegendRole:
return ATK_ROLE_LABEL;
case DivRole:
return ATK_ROLE_SECTION;
diff --git a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm
index b509dacd1..26c7aae27 100644
--- a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm
+++ b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm
@@ -1579,7 +1579,8 @@ static const AccessibilityRoleMap& createAccessibilityRoleMap()
{ SpinButtonRole, NSAccessibilityIncrementorRole },
{ FooterRole, NSAccessibilityGroupRole },
{ ToggleButtonRole, NSAccessibilityButtonRole },
- { CanvasRole, NSAccessibilityImageRole }
+ { CanvasRole, NSAccessibilityImageRole },
+ { LegendRole, NSAccessibilityGroupRole }
};
AccessibilityRoleMap& roleMap = *new AccessibilityRoleMap;
diff --git a/Source/WebCore/bindings/js/BindingState.h b/Source/WebCore/bindings/js/BindingState.h
index 9270604d3..0dbabff78 100644
--- a/Source/WebCore/bindings/js/BindingState.h
+++ b/Source/WebCore/bindings/js/BindingState.h
@@ -44,10 +44,6 @@ typedef JSC::ExecState BindingState;
DOMWindow* activeDOMWindow(BindingState*);
DOMWindow* firstDOMWindow(BindingState*);
-// FIXME: Implement these functions.
-inline Frame* activeFrame(BindingState*) { return 0; }
-inline Frame* firstFrame(BindingState*) { return 0; }
-
}
#endif
diff --git a/Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp b/Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
index 026b1ae1d..fb92cedc9 100644
--- a/Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
+++ b/Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
@@ -94,11 +94,11 @@ void JSCanvasRenderingContext2D::setFillStyle(ExecState* exec, JSValue value)
JSValue JSCanvasRenderingContext2D::webkitLineDash(ExecState* exec) const
{
CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl());
- const DashArray* dash = context->webkitLineDash();
+ const Vector<float>& dash = context->getLineDash();
MarkedArgumentBuffer list;
- DashArray::const_iterator end = dash->end();
- for (DashArray::const_iterator it = dash->begin(); it != end; ++it)
+ Vector<float>::const_iterator end = dash.end();
+ for (Vector<float>::const_iterator it = dash.begin(); it != end; ++it)
list.append(JSValue(*it));
return constructArray(exec, globalObject(), list);
}
@@ -108,7 +108,7 @@ void JSCanvasRenderingContext2D::setWebkitLineDash(ExecState* exec, JSValue valu
if (!isJSArray(value))
return;
- DashArray dash;
+ Vector<float> dash;
JSArray* valueArray = asArray(value);
for (unsigned i = 0; i < valueArray->length(); ++i) {
float elem = valueArray->getIndex(i).toFloat(exec);
diff --git a/Source/WebCore/bindings/js/JSDOMBinding.h b/Source/WebCore/bindings/js/JSDOMBinding.h
index 009b27c3a..acfb0d849 100644
--- a/Source/WebCore/bindings/js/JSDOMBinding.h
+++ b/Source/WebCore/bindings/js/JSDOMBinding.h
@@ -375,6 +375,15 @@ enum ParameterDefaultPolicy {
}
};
+ template<>
+ struct NativeValueTraits<float> {
+ static inline bool arrayNativeValue(JSC::ExecState* exec, JSC::JSValue jsValue, float& indexedValue)
+ {
+ indexedValue = jsValue.toFloat(exec);
+ return !exec->hadException();
+ }
+ };
+
template <class T>
Vector<T> toNativeArray(JSC::ExecState* exec, JSC::JSValue value)
{
diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm b/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
index 94f1a1bce..c29cc5c0f 100644
--- a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -984,7 +984,7 @@ END
# Special case for readonly or Replaceable attributes (with a few exceptions). This attempts to ensure that JS wrappers don't get
# garbage-collected prematurely when their lifetime is strongly tied to their owner. We accomplish this by inserting a reference to
# the newly created wrapper into an internal field of the holder object.
- if (!IsNodeSubType($dataNode) && $attrName ne "self" && (IsWrapperType($returnType) && ($attribute->type =~ /^readonly/ || $attribute->signature->extendedAttributes->{"Replaceable"})
+ if (!IsNodeSubType($dataNode) && $attrName ne "self" && (IsWrapperType($returnType) && ($attribute->type =~ /^readonly/ || $attribute->signature->extendedAttributes->{"Replaceable"} || $attrName eq "location")
&& $returnType ne "EventTarget" && $returnType ne "SerializedScriptValue" && $returnType ne "DOMWindow"
&& $returnType ne "MessagePortArray"
&& $returnType !~ /SVG/ && $returnType !~ /HTML/ && !IsDOMNodeType($returnType))) {
@@ -1009,12 +1009,7 @@ END
push(@implContentDecls, " if (wrapper.IsEmpty()) {\n");
push(@implContentDecls, " wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());\n");
push(@implContentDecls, " if (!wrapper.IsEmpty())\n");
- if ($dataNode->name eq "DOMWindow") {
- AddToImplIncludes("Frame.h");
- push(@implContentDecls, " V8DOMWrapper::setNamedHiddenWindowReference(imp->frame(), \"${attrName}\", wrapper);\n");
- } else {
- push(@implContentDecls, " V8DOMWrapper::setNamedHiddenReference(info.Holder(), \"${attrName}\", wrapper);\n");
- }
+ push(@implContentDecls, " V8DOMWrapper::setNamedHiddenReference(info.Holder(), \"${attrName}\", wrapper);\n");
push(@implContentDecls, " }\n");
push(@implContentDecls, " return wrapper;\n");
push(@implContentDecls, "}\n\n");
@@ -1603,8 +1598,6 @@ sub GenerateCallWith
}
if ($codeGenerator->ExtendedAttributeContains($callWith, "ScriptExecutionContext")) {
push(@$outputArray, $indent . "ScriptExecutionContext* scriptContext = getScriptExecutionContext();\n");
- push(@$outputArray, $indent . "if (!scriptContext)\n");
- push(@$outputArray, $indent . " return" . ($returnVoid ? "" : " v8Undefined()") . ";\n");
push(@callWithArgs, "scriptContext");
}
if ($function and $codeGenerator->ExtendedAttributeContains($callWith, "ScriptArguments")) {
@@ -1853,8 +1846,6 @@ END
push(@implContent, <<END);
ScriptExecutionContext* context = getScriptExecutionContext();
- if (!context)
- return throwError(ReferenceError, "${implClassName} constructor's associated context is not available", args.GetIsolate());
END
}
@@ -2027,11 +2018,7 @@ static v8::Handle<v8::Value> V8${implClassName}ConstructorCallback(const v8::Arg
if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
return args.Holder();
- Frame* frame = currentFrame(BindingState::instance());
- if (!frame)
- return throwError(ReferenceError, "${implClassName} constructor associated frame is unavailable", args.GetIsolate());
-
- Document* document = frame->document();
+ Document* document = currentDocument(BindingState::instance());
// Make sure the document is added to the DOM Node map. Otherwise, the ${implClassName} instance
// may end up being the only node in the map and get garbage-collected prematurely.
@@ -2532,7 +2519,6 @@ sub GenerateImplementation
AddToImplIncludes("RuntimeEnabledFeatures.h");
AddToImplIncludes("V8Binding.h");
AddToImplIncludes("V8DOMWrapper.h");
- AddToImplIncludes("V8IsolatedContext.h");
AddIncludesForType($interfaceName);
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp b/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp
index e4703bc91..00ebd6db8 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp
@@ -32,7 +32,6 @@
#include "V8DOMWrapper.h"
#include "V8Float32Array.h"
#include "V8Int32Array.h"
-#include "V8IsolatedContext.h"
#include <wtf/Float32Array.h>
#include <wtf/Float64Array.h>
#include <wtf/GetPtr.h>
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp
index b996c8155..bdc3ea43c 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp
@@ -28,7 +28,6 @@
#include "RuntimeEnabledFeatures.h"
#include "V8Binding.h"
#include "V8DOMWrapper.h"
-#include "V8IsolatedContext.h"
#include "V8Node.h"
#include <wtf/UnusedParam.h>
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp
index 7c32be6e0..3f30bd516 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp
@@ -28,7 +28,6 @@
#include "RuntimeEnabledFeatures.h"
#include "V8Binding.h"
#include "V8DOMWrapper.h"
-#include "V8IsolatedContext.h"
#include <wtf/UnusedParam.h>
namespace WebCore {
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp
index b3a3534f2..701b89ac8 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp
@@ -28,7 +28,6 @@
#include "RuntimeEnabledFeatures.h"
#include "V8Binding.h"
#include "V8DOMWrapper.h"
-#include "V8IsolatedContext.h"
#include <wtf/UnusedParam.h>
namespace WebCore {
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp
index b78369e95..b5965dc92 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp
@@ -30,7 +30,6 @@
#include "V8Collection.h"
#include "V8DOMWrapper.h"
#include "V8Event.h"
-#include "V8IsolatedContext.h"
#include "V8Node.h"
#include <wtf/UnusedParam.h>
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp
index d80199d9f..1a6e8399a 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestException.cpp
@@ -27,7 +27,6 @@
#include "RuntimeEnabledFeatures.h"
#include "V8Binding.h"
#include "V8DOMWrapper.h"
-#include "V8IsolatedContext.h"
#include <wtf/UnusedParam.h>
namespace WebCore {
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
index c53507671..ff7ba0def 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
@@ -31,7 +31,6 @@
#include "TestSupplemental.h"
#include "V8Binding.h"
#include "V8DOMWrapper.h"
-#include "V8IsolatedContext.h"
#include "V8Node.h"
#include "V8TestObj.h"
#include <wtf/GetPtr.h>
@@ -163,8 +162,6 @@ static v8::Handle<v8::Value> supplementalMethod2Callback(const v8::Arguments& ar
STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined));
EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 1, DefaultIsUndefined)) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 1, DefaultIsUndefined))) : 0);
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return v8Undefined();
RefPtr<TestObj> result = TestSupplemental::supplementalMethod2(scriptContext, imp, strArg, objArg, ec);
if (UNLIKELY(ec))
goto fail;
@@ -259,8 +256,6 @@ v8::Handle<v8::Value> V8TestInterface::constructorCallback(const v8::Arguments&
STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str2, MAYBE_MISSING_PARAMETER(args, 1, DefaultIsUndefined));
ScriptExecutionContext* context = getScriptExecutionContext();
- if (!context)
- return throwError(ReferenceError, "TestInterface constructor's associated context is not available", args.GetIsolate());
RefPtr<TestInterface> impl = TestInterface::create(context, str1, str2, ec);
v8::Handle<v8::Object> wrapper = args.Holder();
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp
index 24c4df698..7b1e77446 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp
@@ -29,7 +29,6 @@
#include "RuntimeEnabledFeatures.h"
#include "V8Binding.h"
#include "V8DOMWrapper.h"
-#include "V8IsolatedContext.h"
#include <wtf/UnusedParam.h>
namespace WebCore {
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp
index 6e262d43c..162a9a5dc 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp
@@ -28,7 +28,6 @@
#include "RuntimeEnabledFeatures.h"
#include "V8Binding.h"
#include "V8DOMWrapper.h"
-#include "V8IsolatedContext.h"
#include <wtf/UnusedParam.h>
namespace WebCore {
@@ -53,11 +52,7 @@ static v8::Handle<v8::Value> V8TestNamedConstructorConstructorCallback(const v8:
if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
return args.Holder();
- Frame* frame = currentFrame(BindingState::instance());
- if (!frame)
- return throwError(ReferenceError, "TestNamedConstructor constructor associated frame is unavailable", args.GetIsolate());
-
- Document* document = frame->document();
+ Document* document = currentDocument(BindingState::instance());
// Make sure the document is added to the DOM Node map. Otherwise, the TestNamedConstructor instance
// may end up being the only node in the map and get garbage-collected prematurely.
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp
index 5655a8c01..76cacdd97 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestNode.cpp
@@ -27,7 +27,6 @@
#include "RuntimeEnabledFeatures.h"
#include "V8Binding.h"
#include "V8DOMWrapper.h"
-#include "V8IsolatedContext.h"
#include "V8Node.h"
#include <wtf/UnusedParam.h>
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
index 46b415d28..5fd323eee 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
@@ -43,7 +43,6 @@
#include "V8DOMWrapper.h"
#include "V8Document.h"
#include "V8Float32Array.h"
-#include "V8IsolatedContext.h"
#include "V8SVGDocument.h"
#include "V8SVGPoint.h"
#include "V8ScriptProfile.h"
@@ -546,8 +545,6 @@ static v8::Handle<v8::Value> withScriptExecutionContextAttributeAttrGetter(v8::L
INC_STATS("DOM.TestObj.withScriptExecutionContextAttribute._get");
TestObj* imp = V8TestObj::toNative(info.Holder());
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return v8Undefined();
return toV8(imp->withScriptExecutionContextAttribute(scriptContext), info.Holder(), info.GetIsolate());
}
@@ -557,8 +554,6 @@ static void withScriptExecutionContextAttributeAttrSetter(v8::Local<v8::String>
TestObj* imp = V8TestObj::toNative(info.Holder());
TestObj* v = V8TestObj::HasInstance(value) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return;
imp->setWithScriptExecutionContextAttribute(scriptContext, WTF::getPtr(v));
return;
}
@@ -602,8 +597,6 @@ static v8::Handle<v8::Value> withScriptExecutionContextAttributeRaisesAttrGetter
TestObj* imp = V8TestObj::toNative(info.Holder());
ExceptionCode ec = 0;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return v8Undefined();
RefPtr<TestObj> v = imp->withScriptExecutionContextAttributeRaises(scriptContext, ec);
if (UNLIKELY(ec))
return setDOMException(ec, info.GetIsolate());
@@ -617,8 +610,6 @@ static void withScriptExecutionContextAttributeRaisesAttrSetter(v8::Local<v8::St
TestObj* v = V8TestObj::HasInstance(value) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
ExceptionCode ec = 0;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return;
imp->setWithScriptExecutionContextAttributeRaises(scriptContext, WTF::getPtr(v), ec);
if (UNLIKELY(ec))
setDOMException(ec, info.GetIsolate());
@@ -633,8 +624,6 @@ static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeAt
if (!state)
return v8Undefined();
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return v8Undefined();
return toV8(imp->withScriptExecutionContextAndScriptStateAttribute(state, scriptContext), info.Holder(), info.GetIsolate());
}
@@ -647,8 +636,6 @@ static void withScriptExecutionContextAndScriptStateAttributeAttrSetter(v8::Loca
if (!state)
return;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return;
imp->setWithScriptExecutionContextAndScriptStateAttribute(state, scriptContext, WTF::getPtr(v));
if (state.hadException())
throwError(state.exception(), info.GetIsolate());
@@ -664,8 +651,6 @@ static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeRa
if (!state)
return v8Undefined();
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return v8Undefined();
RefPtr<TestObj> v = imp->withScriptExecutionContextAndScriptStateAttributeRaises(state, scriptContext, ec);
if (UNLIKELY(ec))
return setDOMException(ec, info.GetIsolate());
@@ -684,8 +669,6 @@ static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter(v8
if (!state)
return;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return;
imp->setWithScriptExecutionContextAndScriptStateAttributeRaises(state, scriptContext, WTF::getPtr(v), ec);
if (UNLIKELY(ec))
setDOMException(ec, info.GetIsolate());
@@ -702,8 +685,6 @@ static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesA
if (!state)
return v8Undefined();
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return v8Undefined();
return toV8(imp->withScriptExecutionContextAndScriptStateWithSpacesAttribute(state, scriptContext), info.Holder(), info.GetIsolate());
}
@@ -716,8 +697,6 @@ static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSette
if (!state)
return;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return;
imp->setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(state, scriptContext, WTF::getPtr(v));
if (state.hadException())
throwError(state.exception(), info.GetIsolate());
@@ -1311,8 +1290,6 @@ static v8::Handle<v8::Value> withScriptExecutionContextCallback(const v8::Argume
INC_STATS("DOM.TestObj.withScriptExecutionContext");
TestObj* imp = V8TestObj::toNative(args.Holder());
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return v8Undefined();
imp->withScriptExecutionContext(scriptContext);
return v8Undefined();
}
@@ -1323,8 +1300,6 @@ static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateCallback(co
TestObj* imp = V8TestObj::toNative(args.Holder());
EmptyScriptState state;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return v8Undefined();
imp->withScriptExecutionContextAndScriptState(&state, scriptContext);
if (state.hadException())
return throwError(state.exception(), args.GetIsolate());
@@ -1339,8 +1314,6 @@ static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateObjExceptio
{
EmptyScriptState state;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return v8Undefined();
RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateObjException(&state, scriptContext, ec);
if (UNLIKELY(ec))
goto fail;
@@ -1358,8 +1331,6 @@ static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesC
TestObj* imp = V8TestObj::toNative(args.Holder());
EmptyScriptState state;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
- if (!scriptContext)
- return v8Undefined();
RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateWithSpaces(&state, scriptContext);
if (state.hadException())
return throwError(state.exception(), args.GetIsolate());
diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
index ba4c40d56..f8fc5e590 100644
--- a/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
+++ b/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
@@ -32,7 +32,6 @@
#include "SerializedScriptValue.h"
#include "V8Binding.h"
#include "V8DOMWrapper.h"
-#include "V8IsolatedContext.h"
#include "V8MessagePort.h"
#include <wtf/ArrayBuffer.h>
#include <wtf/UnusedParam.h>
diff --git a/Source/WebCore/bindings/v8/BindingState.cpp b/Source/WebCore/bindings/v8/BindingState.cpp
index c59bb8915..9a3d7081b 100644
--- a/Source/WebCore/bindings/v8/BindingState.cpp
+++ b/Source/WebCore/bindings/v8/BindingState.cpp
@@ -66,36 +66,9 @@ DOMWindow* firstDOMWindow(BindingState*)
return toDOMWindow(v8::Context::GetEntered());
}
-Frame* activeFrame(BindingState*)
-{
- v8::Handle<v8::Context> context = activeContext();
- if (context.IsEmpty())
- return 0;
- return toFrameIfNotDetached(context);
-}
-
-Frame* firstFrame(BindingState*)
-{
- v8::Handle<v8::Context> context = v8::Context::GetEntered();
- if (context.IsEmpty())
- return 0;
- return toFrameIfNotDetached(context);
-}
-
-Frame* currentFrame(BindingState*)
-{
- v8::Handle<v8::Context> context = v8::Context::GetCurrent();
- if (context.IsEmpty())
- return 0;
- return toFrameIfNotDetached(context);
-}
-
Document* currentDocument(BindingState*)
{
- DOMWindow* current = toDOMWindow(v8::Context::GetCurrent());
- if (!current)
- return 0;
- return current->document();
+ return toDOMWindow(v8::Context::GetCurrent())->document();
}
void printErrorMessageForFrame(Frame* frame, const String& message)
diff --git a/Source/WebCore/bindings/v8/BindingState.h b/Source/WebCore/bindings/v8/BindingState.h
index 9564224ea..8eaa4946e 100644
--- a/Source/WebCore/bindings/v8/BindingState.h
+++ b/Source/WebCore/bindings/v8/BindingState.h
@@ -49,12 +49,8 @@ public:
DOMWindow* activeDOMWindow(BindingState*);
DOMWindow* firstDOMWindow(BindingState*);
-Frame* activeFrame(BindingState*);
-Frame* firstFrame(BindingState*);
-
// FIXME: When implementing this function for JSC, we need to understand if there
// are any subtle differences between the currentFrame and the lexicalGlobalObject.
-Frame* currentFrame(BindingState*);
Document* currentDocument(BindingState*);
// FIXME: This function is redundant with the copy in JSDOMBinding.cpp.
diff --git a/Source/WebCore/bindings/v8/DOMData.cpp b/Source/WebCore/bindings/v8/DOMData.cpp
index 1a63c2f2b..af50a1eca 100644
--- a/Source/WebCore/bindings/v8/DOMData.cpp
+++ b/Source/WebCore/bindings/v8/DOMData.cpp
@@ -31,7 +31,7 @@
#include "config.h"
#include "DOMData.h"
#include "V8Binding.h"
-#include "V8IsolatedContext.h"
+#include "V8DOMWindowShell.h"
#include "WebGLContextAttributes.h"
#include "WebGLUniformLocation.h"
@@ -43,7 +43,7 @@ DOMDataStore& DOMData::getCurrentStore(v8::Isolate* isolate)
V8PerIsolateData* data = V8PerIsolateData::current(isolate);
if (UNLIKELY(data->domDataStore() != 0))
return *data->domDataStore();
- V8IsolatedContext* context = V8IsolatedContext::getEntered();
+ V8DOMWindowShell* context = V8DOMWindowShell::getEntered();
if (UNLIKELY(context != 0))
return *context->world()->domDataStore();
return defaultStore;
diff --git a/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp b/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp
index 31a0286c4..859e836f2 100644
--- a/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp
+++ b/Source/WebCore/bindings/v8/DOMWrapperWorld.cpp
@@ -90,13 +90,12 @@ void DOMWrapperWorld::deallocate(DOMWrapperWorld* world)
static int temporaryWorldId = DOMWrapperWorld::uninitializedWorldId-1;
-PassRefPtr<DOMWrapperWorld> DOMWrapperWorld::getOrCreateIsolatedWorld(int worldId, int extensionGroup)
+PassRefPtr<DOMWrapperWorld> DOMWrapperWorld::ensureIsolatedWorld(int worldId, int extensionGroup)
{
ASSERT(worldId != mainWorldId);
- ASSERT(worldId != uninitializedWorldId);
WorldMap& map = isolatedWorldMap();
- if (!worldId)
+ if (worldId == uninitializedWorldId)
worldId = temporaryWorldId--;
else {
WorldMap::iterator i = map.find(worldId);
diff --git a/Source/WebCore/bindings/v8/DOMWrapperWorld.h b/Source/WebCore/bindings/v8/DOMWrapperWorld.h
index 01125b7f3..9cccd5fc6 100644
--- a/Source/WebCore/bindings/v8/DOMWrapperWorld.h
+++ b/Source/WebCore/bindings/v8/DOMWrapperWorld.h
@@ -41,12 +41,12 @@ namespace WebCore {
// This class represent a collection of DOM wrappers for a specific world.
class DOMWrapperWorld : public WTF::RefCountedBase {
public:
- static const int mainWorldId = -1;
- static const int mainWorldExtensionGroup = -1;
- static const int uninitializedWorldId = -2;
- static const int uninitializedExtensionGroup = -2;
+ static const int mainWorldId = 0;
+ static const int mainWorldExtensionGroup = 0;
+ static const int uninitializedWorldId = -1;
+ static const int uninitializedExtensionGroup = -1;
// If 0 is passed as worldId, the world will be assigned a temporary id instead.
- static PassRefPtr<DOMWrapperWorld> getOrCreateIsolatedWorld(int worldId, int extensionGroup);
+ static PassRefPtr<DOMWrapperWorld> ensureIsolatedWorld(int worldId, int extensionGroup);
static bool isolatedWorldsExist() { return isolatedWorldCount; }
// FIXME: this is a workaround for a problem in WebViewImpl.
// Do not use this anywhere else!!
diff --git a/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp b/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp
index 19fd91d90..ca62b33dc 100644
--- a/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp
+++ b/Source/WebCore/bindings/v8/IDBBindingUtilities.cpp
@@ -162,7 +162,9 @@ static PassRefPtr<IDBKey> createIDBKeyFromSerializedValueAndKeyPath(PassRefPtr<S
RefPtr<SerializedScriptValue> value = prpValue;
- V8AuxiliaryContext context;
+ v8::HandleScope handleScope;
+ v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext());
+
v8::Handle<v8::Value> v8Value(value->deserialize());
v8::Handle<v8::Value> v8Key(getNthValueOnKeyPath(v8Value, keyPathElements, keyPathElements.size()));
if (v8Key.IsEmpty())
@@ -207,7 +209,9 @@ PassRefPtr<SerializedScriptValue> injectIDBKeyIntoSerializedValue(PassRefPtr<IDB
if (!keyPathElements.size())
return 0;
- V8AuxiliaryContext context;
+ v8::HandleScope handleScope;
+ v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext());
+
v8::Handle<v8::Value> v8Value(value->deserialize());
v8::Handle<v8::Value> parent(ensureNthValueOnKeyPath(v8Value, keyPathElements, keyPathElements.size() - 1));
if (parent.IsEmpty())
diff --git a/Source/WebCore/bindings/v8/NPV8Object.cpp b/Source/WebCore/bindings/v8/NPV8Object.cpp
index 02243859e..eb854da98 100644
--- a/Source/WebCore/bindings/v8/NPV8Object.cpp
+++ b/Source/WebCore/bindings/v8/NPV8Object.cpp
@@ -102,9 +102,6 @@ static void freeV8NPObject(NPObject* npObject)
staticV8NPObjectMap()->clear();
}
-#ifndef NDEBUG
- V8GCController::unregisterGlobalHandle(v8NpObject, v8NpObject->v8Object);
-#endif
v8NpObject->v8Object.Dispose();
free(v8NpObject);
}
@@ -176,9 +173,6 @@ NPObject* npCreateV8ScriptObject(NPP npp, v8::Handle<v8::Object> object, DOMWind
V8NPObject* v8npObject = reinterpret_cast<V8NPObject*>(_NPN_CreateObject(npp, &V8NPObjectClass));
v8npObject->v8Object = v8::Persistent<v8::Object>::New(object);
-#ifndef NDEBUG
- V8GCController::registerGlobalHandle(NPOBJECT, v8npObject, v8npObject->v8Object);
-#endif
v8npObject->rootObject = root;
iter->second.append(v8npObject);
diff --git a/Source/WebCore/bindings/v8/ScriptController.cpp b/Source/WebCore/bindings/v8/ScriptController.cpp
index 7bee97cbd..211ba947a 100644
--- a/Source/WebCore/bindings/v8/ScriptController.cpp
+++ b/Source/WebCore/bindings/v8/ScriptController.cpp
@@ -62,7 +62,6 @@
#include "V8GCController.h"
#include "V8HiddenPropertyName.h"
#include "V8HTMLEmbedElement.h"
-#include "V8IsolatedContext.h"
#include "V8NPObject.h"
#include "V8RecursionScope.h"
#include "Widget.h"
@@ -92,16 +91,6 @@ void ScriptController::setFlags(const char* string, int length)
v8::V8::SetFlagsFromString(string, length);
}
-Frame* ScriptController::retrieveFrameForEnteredContext()
-{
- return firstFrame(BindingState::instance());
-}
-
-Frame* ScriptController::retrieveFrameForCurrentContext()
-{
- return currentFrame(BindingState::instance());
-}
-
bool ScriptController::canAccessFromCurrentOrigin(Frame *frame)
{
return !v8::Context::InContext() || BindingSecurity::shouldAllowAccessToFrame(BindingState::instance(), frame);
@@ -110,7 +99,7 @@ bool ScriptController::canAccessFromCurrentOrigin(Frame *frame)
ScriptController::ScriptController(Frame* frame)
: m_frame(frame)
, m_sourceURL(0)
- , m_windowShell(V8DOMWindowShell::create(frame))
+ , m_windowShell(V8DOMWindowShell::create(frame, mainThreadNormalWorld()))
, m_paused(false)
#if ENABLE(NETSCAPE_PLUGIN_API)
, m_wrappedWindowScriptNPObject(0)
@@ -157,7 +146,7 @@ void ScriptController::resetIsolatedWorlds()
{
for (IsolatedWorldMap::iterator iter = m_isolatedWorlds.begin();
iter != m_isolatedWorlds.end(); ++iter) {
- iter->second->destroy();
+ iter->second->destroyIsolatedShell();
}
m_isolatedWorlds.clear();
m_isolatedWorldSecurityOrigins.clear();
@@ -324,50 +313,72 @@ ScriptValue ScriptController::evaluate(const ScriptSourceCode& sourceCode)
return ScriptValue(object);
}
-void ScriptController::evaluateInIsolatedWorld(unsigned worldID, const Vector<ScriptSourceCode>& sources, Vector<ScriptValue>* results)
+V8DOMWindowShell* ScriptController::ensureIsolatedWorldContext(int worldId, int extensionGroup)
{
- evaluateInIsolatedWorld(worldID, sources, 0, results);
+ ASSERT(worldId != DOMWrapperWorld::mainWorldId);
+
+ // Check the map for non-temporary worlds.
+ if (worldId != DOMWrapperWorld::uninitializedWorldId) {
+ IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(worldId);
+ if (iter != m_isolatedWorlds.end()) {
+ ASSERT(iter->second->world()->worldId() == worldId);
+ ASSERT(iter->second->world()->extensionGroup() == extensionGroup);
+ return iter->second;
+ }
+ }
+
+ RefPtr<DOMWrapperWorld> world = DOMWrapperWorld::ensureIsolatedWorld(worldId, extensionGroup);
+ OwnPtr<V8DOMWindowShell> isolatedWorldShell = V8DOMWindowShell::create(m_frame, world);
+ m_isolatedWorlds.set(world->worldId(), isolatedWorldShell.get());
+ return isolatedWorldShell.leakPtr();
}
-void ScriptController::evaluateInIsolatedWorld(unsigned worldID, const Vector<ScriptSourceCode>& sources, int extensionGroup, Vector<ScriptValue>* results)
+V8DOMWindowShell* ScriptController::existingWindowShellInternal(DOMWrapperWorld* world)
{
- v8::HandleScope handleScope;
+ ASSERT(world);
- // FIXME: This will need to get reorganized once we have a windowShell for the isolated world.
- if (!windowShell()->initializeIfNeeded())
- return;
+ if (LIKELY(world->isMainWorld()))
+ return m_windowShell.get();
+
+ IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(world->worldId());
+ return iter == m_isolatedWorlds.end() ? 0 : iter->second;
+}
+
+V8DOMWindowShell* ScriptController::windowShell(DOMWrapperWorld* world)
+{
+ V8DOMWindowShell* shell = existingWindowShellInternal(world);
+ if (LIKELY(!!shell))
+ return shell;
+
+ OwnPtr<V8DOMWindowShell> isolatedWorldShell = V8DOMWindowShell::create(m_frame, world);
+ m_isolatedWorlds.set(world->worldId(), isolatedWorldShell.get());
+ return isolatedWorldShell.leakPtr();
+}
+
+void ScriptController::evaluateInIsolatedWorld(int worldID, const Vector<ScriptSourceCode>& sources, int extensionGroup, Vector<ScriptValue>* results)
+{
+ // Except in the test runner, worldID should be non 0 as it conflicts with the mainWorldId.
+ // FIXME: Change the test runner to perform this swap and make this an ASSERT.
+ if (UNLIKELY(!worldID))
+ worldID = DOMWrapperWorld::uninitializedWorldId;
+ v8::HandleScope handleScope;
v8::Local<v8::Array> v8Results;
{
v8::HandleScope evaluateHandleScope;
- V8IsolatedContext* isolatedContext = 0;
- if (worldID > 0) {
- IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(worldID);
- if (iter != m_isolatedWorlds.end())
- isolatedContext = iter->second;
- else {
- isolatedContext = new V8IsolatedContext(m_frame, DOMWrapperWorld::getOrCreateIsolatedWorld(worldID, extensionGroup));
- if (isolatedContext->context().IsEmpty()) {
- delete isolatedContext;
- return;
- }
-
- // FIXME: We should change this to using window shells to match JSC.
- m_isolatedWorlds.set(worldID, isolatedContext);
- }
+ V8DOMWindowShell* isolatedWorldShell = ensureIsolatedWorldContext(worldID, extensionGroup);
+ if (worldID != DOMWrapperWorld::uninitializedWorldId) {
IsolatedWorldSecurityOriginMap::iterator securityOriginIter = m_isolatedWorldSecurityOrigins.find(worldID);
if (securityOriginIter != m_isolatedWorldSecurityOrigins.end())
- isolatedContext->setSecurityOrigin(securityOriginIter->second);
- } else {
- isolatedContext = new V8IsolatedContext(m_frame, DOMWrapperWorld::getOrCreateIsolatedWorld(worldID, extensionGroup));
- if (isolatedContext->context().IsEmpty()) {
- delete isolatedContext;
- return;
- }
+ isolatedWorldShell->setIsolatedWorldSecurityOrigin(securityOriginIter->second);
}
- v8::Local<v8::Context> context = v8::Local<v8::Context>::New(isolatedContext->context());
+ isolatedWorldShell->initializeIfNeeded();
+ if (isolatedWorldShell->context().IsEmpty())
+ return;
+
+ v8::Local<v8::Context> context = v8::Local<v8::Context>::New(isolatedWorldShell->context());
v8::Context::Scope contextScope(context);
v8::Local<v8::Array> resultArray = v8::Array::New(sources.size());
@@ -378,8 +389,12 @@ void ScriptController::evaluateInIsolatedWorld(unsigned worldID, const Vector<Sc
resultArray->Set(i, evaluationResult);
}
- if (!worldID)
- isolatedContext->destroy();
+ // Mark temporary shell for weak destruction.
+ if (worldID == DOMWrapperWorld::uninitializedWorldId) {
+ int actualWorldId = isolatedWorldShell->world()->worldId();
+ m_isolatedWorlds.remove(actualWorldId);
+ isolatedWorldShell->destroyIsolatedShell();
+ }
v8Results = evaluateHandleScope.Close(resultArray);
}
@@ -396,7 +411,7 @@ void ScriptController::setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<Se
m_isolatedWorldSecurityOrigins.set(worldID, securityOrigin);
IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(worldID);
if (iter != m_isolatedWorlds.end())
- iter->second->setSecurityOrigin(securityOrigin);
+ iter->second->setIsolatedWorldSecurityOrigin(securityOrigin);
}
TextPosition ScriptController::eventHandlerPosition() const
@@ -413,11 +428,11 @@ void ScriptController::finishedWithEvent(Event* event)
v8::Local<v8::Context> ScriptController::currentWorldContext()
{
- if (V8IsolatedContext* isolatedContext = V8IsolatedContext::getEntered()) {
- RefPtr<SharedPersistent<v8::Context> > context = isolatedContext->sharedContext();
- if (m_frame != toFrameIfNotDetached(context->get()))
+ if (V8DOMWindowShell* isolatedShell = V8DOMWindowShell::getEntered()) {
+ v8::Persistent<v8::Context> context = isolatedShell->context();
+ if (context.IsEmpty() || m_frame != toFrameIfNotDetached(context))
return v8::Local<v8::Context>();
- return v8::Local<v8::Context>::New(context->get());
+ return v8::Local<v8::Context>::New(context);
}
windowShell()->initializeIfNeeded();
return v8::Local<v8::Context>::New(windowShell()->context());
@@ -542,10 +557,13 @@ void ScriptController::getAllWorlds(Vector<RefPtr<DOMWrapperWorld> >& worlds)
void ScriptController::evaluateInWorld(const ScriptSourceCode& source,
DOMWrapperWorld* world)
{
+ if (world == mainThreadNormalWorld()) {
+ evaluate(source);
+ return;
+ }
Vector<ScriptSourceCode> sources;
sources.append(source);
- // FIXME: Get an ID from the world param.
- evaluateInIsolatedWorld(0, sources, 0);
+ evaluateInIsolatedWorld(world->worldId(), sources, world->extensionGroup(), 0);
}
V8Extensions& ScriptController::registeredExtensions()
@@ -646,14 +664,14 @@ void ScriptController::collectIsolatedContexts(Vector<std::pair<ScriptState*, Se
{
v8::HandleScope handleScope;
for (IsolatedWorldMap::iterator it = m_isolatedWorlds.begin(); it != m_isolatedWorlds.end(); ++it) {
- V8IsolatedContext* isolatedContext = it->second;
- if (!isolatedContext->securityOrigin())
+ V8DOMWindowShell* isolatedWorldShell = it->second;
+ if (!isolatedWorldShell->isolatedWorldSecurityOrigin())
continue;
- v8::Handle<v8::Context> v8Context = isolatedContext->context();
+ v8::Handle<v8::Context> v8Context = isolatedWorldShell->context();
if (v8Context.IsEmpty())
continue;
ScriptState* scriptState = ScriptState::forContext(v8::Local<v8::Context>::New(v8Context));
- result.append(std::pair<ScriptState*, SecurityOrigin*>(scriptState, isolatedContext->securityOrigin()));
+ result.append(std::pair<ScriptState*, SecurityOrigin*>(scriptState, isolatedWorldShell->isolatedWorldSecurityOrigin()));
}
}
#endif
diff --git a/Source/WebCore/bindings/v8/ScriptController.h b/Source/WebCore/bindings/v8/ScriptController.h
index ddf0d4961..040215238 100644
--- a/Source/WebCore/bindings/v8/ScriptController.h
+++ b/Source/WebCore/bindings/v8/ScriptController.h
@@ -57,20 +57,8 @@ class ScriptSourceCode;
class ScriptState;
class SecurityOrigin;
class V8DOMWindowShell;
-class V8IsolatedContext;
class Widget;
-// Note: although the pointer is raw, the instance is kept alive by a strong
-// reference to the v8 context it contains, which is not made weak until we
-// call world->destroy().
-//
-// FIXME: We want to eventually be holding window shells instead of the
-// IsolatedContext directly.
-// https://bugs.webkit.org/show_bug.cgi?id=94875
-typedef HashMap<int, V8IsolatedContext*> IsolatedWorldMap;
-
-typedef HashMap<int, RefPtr<SecurityOrigin> > IsolatedWorldSecurityOriginMap;
-
typedef WTF::Vector<v8::Extension*> V8Extensions;
class ScriptController {
@@ -78,9 +66,11 @@ public:
ScriptController(Frame*);
~ScriptController();
- // FIXME: This should eventually take DOMWrapperWorld argument.
- // https://bugs.webkit.org/show_bug.cgi?id=94875
V8DOMWindowShell* windowShell() const { return m_windowShell.get(); }
+ V8DOMWindowShell* windowShell(DOMWrapperWorld*);
+ // FIXME: Replace existingWindowShell with existingWindowShellInternal see comment in V8DOMWindowShell::initializeIfNeeded.
+ ScriptController* existingWindowShell(DOMWrapperWorld*) { return this; }
+ V8DOMWindowShell* existingWindowShellInternal(DOMWrapperWorld*);
ScriptValue executeScript(const ScriptSourceCode&);
ScriptValue executeScript(const String& script, bool forceUserGesture = false);
@@ -105,12 +95,6 @@ public:
// The caller must hold an execution context.
ScriptValue evaluate(const ScriptSourceCode&);
- // Evaluate JavaScript in a new isolated world. The script gets its own
- // global scope, its own prototypes for intrinsic JavaScript objects (String,
- // Array, and so-on), and its own wrappers for all DOM nodes and DOM
- // constructors.
- void evaluateInIsolatedWorld(unsigned worldID, const Vector<ScriptSourceCode>& sources, Vector<ScriptValue>* results);
-
// Executes JavaScript in an isolated world. The script gets its own global scope,
// its own prototypes for intrinsic JavaScript objects (String, Array, and so-on),
// and its own wrappers for all DOM nodes and DOM constructors.
@@ -118,22 +102,16 @@ public:
// If an isolated world with the specified ID already exists, it is reused.
// Otherwise, a new world is created.
//
- // If the worldID is 0, a new world is always created.
+ // If the worldID is 0 or DOMWrapperWorld::uninitializedWorldId, a new world is always created.
//
// FIXME: Get rid of extensionGroup here.
- void evaluateInIsolatedWorld(unsigned worldID, const Vector<ScriptSourceCode>& sources, int extensionGroup, Vector<ScriptValue>* results);
+ void evaluateInIsolatedWorld(int worldID, const Vector<ScriptSourceCode>& sources, int extensionGroup, Vector<ScriptValue>* results);
// Associates an isolated world (see above for description) with a security
// origin. XMLHttpRequest instances used in that world will be considered
// to come from that origin, not the frame's.
void setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<SecurityOrigin>);
- // Masquerade 'this' as the windowShell.
- // This is a bit of a hack, but provides reasonable compatibility
- // with what JSC does as well.
- ScriptController* windowShell(DOMWrapperWorld*) { return this; }
- ScriptController* existingWindowShell(DOMWrapperWorld*) { return this; }
-
// Creates a property of the global object of a frame.
void bindToWindowObject(Frame*, const String& key, NPObject*);
@@ -157,15 +135,6 @@ public:
// FIXME: void* is a compile hack.
void attachDebugger(void*);
- // --- Static methods assume we are running VM in single thread, ---
- // --- and there is only one VM instance. ---
-
- // Returns the frame for the entered context. See comments in
- static Frame* retrieveFrameForEnteredContext();
-
- // Returns the frame for the current context. See comments in
- static Frame* retrieveFrameForCurrentContext();
-
// Returns V8 Context. If none exists, creates a new context.
// It is potentially slow and consumes memory.
static v8::Local<v8::Context> mainWorldContext(Frame*);
@@ -217,19 +186,24 @@ public:
static int contextDebugId(v8::Handle<v8::Context>);
private:
+ // Note: although the pointer is raw, the instance is kept alive by a strong
+ // reference to the v8 context it contains, which is not made weak until we
+ // call world->destroyIsolatedShell().
+ typedef HashMap<int, V8DOMWindowShell*> IsolatedWorldMap;
+ typedef HashMap<int, RefPtr<SecurityOrigin> > IsolatedWorldSecurityOriginMap;
+
void resetIsolatedWorlds();
Frame* m_frame;
const String* m_sourceURL;
- // For the moment, we have one of these. Soon we will have one per DOMWrapperWorld.
+ V8DOMWindowShell* ensureIsolatedWorldContext(int worldId, int extensionGroup);
OwnPtr<V8DOMWindowShell> m_windowShell;
// The isolated worlds we are tracking for this frame. We hold them alive
// here so that they can be used again by future calls to
// evaluateInIsolatedWorld().
IsolatedWorldMap m_isolatedWorlds;
-
IsolatedWorldSecurityOriginMap m_isolatedWorldSecurityOrigins;
bool m_paused;
diff --git a/Source/WebCore/bindings/v8/SharedPersistent.h b/Source/WebCore/bindings/v8/SharedPersistent.h
index 8825bd5ed..2e39a0630 100644
--- a/Source/WebCore/bindings/v8/SharedPersistent.h
+++ b/Source/WebCore/bindings/v8/SharedPersistent.h
@@ -31,45 +31,28 @@
#ifndef SharedPersistent_h
#define SharedPersistent_h
+#include "ScopedPersistent.h"
#include <v8.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
- // A shareable reference to a v8 persistent handle. Using a shared
- // persistent any number of objects can share a reference to a v8
- // object and when it should no longer be accessible the object's
- // owner can clear it.
+ // FIXME: Remove this class.
template <typename T>
class SharedPersistent : public RefCounted<SharedPersistent<T> > {
public:
- void set(v8::Persistent<T> value)
- {
- m_value = value;
- }
- v8::Persistent<T> get()
- {
- return m_value;
- }
- void disposeHandle()
- {
- if (!m_value.IsEmpty()) {
- m_value.Dispose();
- m_value.Clear();
- }
- }
- static PassRefPtr<SharedPersistent<T> > create(v8::Persistent<T> value)
+ static PassRefPtr<SharedPersistent<T> > create(v8::Handle<T> value)
{
return adoptRef(new SharedPersistent<T>(value));
}
- static PassRefPtr<SharedPersistent<T> > create()
+ inline v8::Persistent<T> get()
{
- return create(v8::Persistent<T>());
+ return m_value.get();
}
private:
- explicit SharedPersistent(v8::Persistent<T> value) : m_value(value) { }
- v8::Persistent<T> m_value;
+ explicit SharedPersistent(v8::Handle<T> value) : m_value(value) { }
+ ScopedPersistent<T> m_value;
};
} // namespace WebCore
diff --git a/Source/WebCore/bindings/v8/V8Binding.cpp b/Source/WebCore/bindings/v8/V8Binding.cpp
index f92148656..5c9046fdf 100644
--- a/Source/WebCore/bindings/v8/V8Binding.cpp
+++ b/Source/WebCore/bindings/v8/V8Binding.cpp
@@ -310,9 +310,9 @@ v8::Local<v8::Context> toV8Context(ScriptExecutionContext* context, const WorldC
V8PerContextData* perContextDataForCurrentWorld(Frame* frame)
{
- V8IsolatedContext* isolatedContext;
- if (UNLIKELY(!!(isolatedContext = V8IsolatedContext::getEntered())))
- return isolatedContext->perContextData();
+ V8DOMWindowShell* isolatedShell;
+ if (UNLIKELY(!!(isolatedShell = V8DOMWindowShell::getEntered())))
+ return isolatedShell->perContextData();
return frame->script()->windowShell()->perContextData();
}
diff --git a/Source/WebCore/bindings/v8/V8Callback.h b/Source/WebCore/bindings/v8/V8Callback.h
index 9253647fc..fee18b130 100644
--- a/Source/WebCore/bindings/v8/V8Callback.h
+++ b/Source/WebCore/bindings/v8/V8Callback.h
@@ -31,6 +31,8 @@
#ifndef V8Callback_h
#define V8Callback_h
+#include "ExceptionCode.h"
+#include "V8Binding.h"
#include <v8.h>
namespace WebCore {
@@ -40,6 +42,34 @@ class ScriptExecutionContext;
bool invokeCallback(v8::Persistent<v8::Object> callback, int argc, v8::Handle<v8::Value> argv[], bool& callbackReturnValue, ScriptExecutionContext*);
bool invokeCallback(v8::Persistent<v8::Object> callback, v8::Handle<v8::Object> thisObject, int argc, v8::Handle<v8::Value> argv[], bool& callbackReturnValue, ScriptExecutionContext*);
+enum CallbackAllowedValueFlag {
+ CallbackAllowUndefined = 1,
+ CallbackAllowNull = 1 << 1
+};
+
+typedef unsigned CallbackAllowedValueFlags;
+
+// 'FunctionOnly' is assumed for the created callback.
+template <typename V8CallbackType>
+PassRefPtr<V8CallbackType> createFunctionOnlyCallback(v8::Local<v8::Value> value, bool& succeeded, v8::Isolate* isolate, CallbackAllowedValueFlags acceptedValues = 0)
+{
+ succeeded = true;
+
+ if (value->IsUndefined() && (acceptedValues & CallbackAllowUndefined))
+ return 0;
+
+ if (value->IsNull() && (acceptedValues & CallbackAllowNull))
+ return 0;
+
+ if (!value->IsFunction()) {
+ succeeded = false;
+ setDOMException(TYPE_MISMATCH_ERR, isolate);
+ return 0;
+ }
+
+ return V8CallbackType::create(value, getScriptExecutionContext());
+}
+
} // namespace WebCore
#endif // V8Callback_h
diff --git a/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp b/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
index 8abc9e147..3f595547c 100644
--- a/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
+++ b/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
@@ -37,6 +37,7 @@
#include "DocumentLoader.h"
#include "Frame.h"
#include "FrameLoaderClient.h"
+#include "InspectorInstrumentation.h"
#include "MemoryUsageSupport.h"
#include "Page.h"
#include "PageGroup.h"
@@ -170,13 +171,34 @@ static void checkDocumentWrapper(v8::Handle<v8::Object> wrapper, Document* docum
ASSERT(!document->isHTMLDocument() || (V8Document::toNative(v8::Handle<v8::Object>::Cast(wrapper->GetPrototype())) == document));
}
-PassOwnPtr<V8DOMWindowShell> V8DOMWindowShell::create(Frame* frame)
+static void setIsolatedWorldField(V8DOMWindowShell* shell, v8::Local<v8::Context> context)
{
- return adoptPtr(new V8DOMWindowShell(frame));
+ toInnerGlobalObject(context)->SetPointerInInternalField(V8DOMWindow::enteredIsolatedWorldIndex, shell);
}
-V8DOMWindowShell::V8DOMWindowShell(Frame* frame)
+V8DOMWindowShell* V8DOMWindowShell::enteredIsolatedWorldContext()
+{
+ return static_cast<V8DOMWindowShell*>(toInnerGlobalObject(v8::Context::GetEntered())->GetPointerFromInternalField(V8DOMWindow::enteredIsolatedWorldIndex));
+}
+
+static void setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContext, int debugId)
+{
+ char buffer[32];
+ if (debugId == -1)
+ snprintf(buffer, sizeof(buffer), "injected");
+ else
+ snprintf(buffer, sizeof(buffer), "injected,%d", debugId);
+ targetContext->SetData(v8::String::New(buffer));
+}
+
+PassOwnPtr<V8DOMWindowShell> V8DOMWindowShell::create(Frame* frame, PassRefPtr<DOMWrapperWorld> world)
+{
+ return adoptPtr(new V8DOMWindowShell(frame, world));
+}
+
+V8DOMWindowShell::V8DOMWindowShell(Frame* frame, PassRefPtr<DOMWrapperWorld> world)
: m_frame(frame)
+ , m_world(world)
{
}
@@ -186,18 +208,41 @@ bool V8DOMWindowShell::isContextInitialized()
return !m_context.isEmpty();
}
-void V8DOMWindowShell::disposeContext()
+void V8DOMWindowShell::destroyIsolatedShell()
+{
+ disposeContext(true);
+}
+
+static void isolatedContextWeakCallback(v8::Persistent<v8::Value> object, void* parameter)
{
+ // Handle will be disposed in delete.
+ delete static_cast<V8DOMWindowShell*>(parameter);
+}
+
+void V8DOMWindowShell::disposeContext(bool weak)
+{
+ ASSERT(!m_context.get().IsWeak());
m_perContextData.clear();
- if (!m_context.isEmpty()) {
- m_frame->loader()->client()->willReleaseScriptContext(m_context.get(), 0);
+ if (m_context.isEmpty())
+ return;
+
+ m_frame->loader()->client()->willReleaseScriptContext(m_context.get(), m_world->worldId());
+
+ if (!weak)
m_context.clear();
+ else {
+ ASSERT(!m_world->isMainWorld());
+ destroyGlobal();
+ m_frame = 0;
+ m_context.get().MakeWeak(this, isolatedContextWeakCallback);
+ }
- // It's likely that disposing the context has created a lot of
- // garbage. Notify V8 about this so it'll have a chance of cleaning
- // it up when idle.
- bool isMainFrame = m_frame->page() && (m_frame->page()->mainFrame() == m_frame);
+ // It's likely that disposing the context has created a lot of
+ // garbage. Notify V8 about this so it'll have a chance of cleaning
+ // it up when idle.
+ if (m_world->isMainWorld()) {
+ bool isMainFrame = m_frame->page() && (m_frame->page()->mainFrame() == m_frame);
V8GCForContextDispose::instance().notifyContextDisposed(isMainFrame);
}
}
@@ -284,10 +329,12 @@ bool V8DOMWindowShell::initializeIfNeeded()
initializeV8IfNeeded();
- m_context.adopt(createNewContext(m_global.get(), 0, 0));
+ createContext();
if (m_context.isEmpty())
return false;
+ bool isMainWorld = m_world->isMainWorld();
+
v8::Local<v8::Context> context = v8::Local<v8::Context>::New(m_context.get());
v8::Context::Scope contextScope(context);
@@ -299,47 +346,63 @@ bool V8DOMWindowShell::initializeIfNeeded()
}
}
+ // Flag context as isolated.
+ if (!isMainWorld) {
+ V8DOMWindowShell* mainWindow = m_frame->script()->windowShell();
+ mainWindow->initializeIfNeeded();
+ if (!mainWindow->context().IsEmpty())
+ setInjectedScriptContextDebugId(m_context.get(), m_frame->script()->contextDebugId(mainWindow->context()));
+ setIsolatedWorldField(this, context);
+ }
+
m_perContextData = V8PerContextData::create(m_context.get());
if (!m_perContextData->init()) {
disposeContext();
return false;
}
- if (!installDOMWindow(context, m_frame->document()->domWindow())) {
+ if (!installDOMWindow()) {
disposeContext();
return false;
}
- updateDocument();
-
- setSecurityToken();
-
- if (m_frame->document())
- context->AllowCodeGenerationFromStrings(m_frame->document()->contentSecurityPolicy()->allowEval(0, ContentSecurityPolicy::SuppressReport));
-
- m_frame->loader()->client()->didCreateScriptContext(m_context.get(), 0, 0);
+ if (isMainWorld) {
+ updateDocument();
+ setSecurityToken();
+ if (m_frame->document())
+ context->AllowCodeGenerationFromStrings(m_frame->document()->contentSecurityPolicy()->allowEval(0, ContentSecurityPolicy::SuppressReport));
+ } else {
+ // Using the default security token means that the canAccess is always
+ // called, which is slow.
+ // FIXME: Use tokens where possible. This will mean keeping track of all
+ // created contexts so that they can all be updated when the
+ // document domain
+ // changes.
+ m_context->UseDefaultSecurityToken();
+ }
+ m_frame->loader()->client()->didCreateScriptContext(m_context.get(), m_world->extensionGroup(), m_world->worldId());
- // FIXME: This is wrong. We should actually do this for the proper world once
- // we do isolated worlds the WebCore way.
- m_frame->loader()->dispatchDidClearWindowObjectInWorld(0);
+ if (isMainWorld) {
+ // FIXME: This call is probably in the wrong spot, but causes a test timeout for http/tests/misc/window-open-then-write.html when removed.
+ // Additionally, ScriptController::existingWindowShell cannot be correctly implemented until this call is gone.
+ m_frame->loader()->dispatchDidClearWindowObjectInWorld(0);
+ }
return true;
}
-v8::Persistent<v8::Context> V8DOMWindowShell::createNewContext(v8::Handle<v8::Object> global, int extensionGroup, int worldId)
+void V8DOMWindowShell::createContext()
{
- v8::Persistent<v8::Context> result;
-
// The activeDocumentLoader pointer could be 0 during frame shutdown.
// FIXME: Can we remove this check?
if (!m_frame->loader()->activeDocumentLoader())
- return result;
+ return;
// Create a new environment using an empty template for the shadow
// object. Reuse the global object if one has been created earlier.
v8::Persistent<v8::ObjectTemplate> globalTemplate = V8DOMWindow::GetShadowObjectTemplate();
if (globalTemplate.IsEmpty())
- return result;
+ return;
// Used to avoid sleep calls in unload handlers.
ScriptController::registerExtensionIfNeeded(DateExtension::get());
@@ -354,6 +417,8 @@ v8::Persistent<v8::Context> V8DOMWindowShell::createNewContext(v8::Handle<v8::Ob
const V8Extensions& extensions = ScriptController::registeredExtensions();
OwnArrayPtr<const char*> extensionNames = adoptArrayPtr(new const char*[extensions.size()]);
int index = 0;
+ int extensionGroup = m_world->extensionGroup();
+ int worldId = m_world->worldId();
for (size_t i = 0; i < extensions.size(); ++i) {
// Ensure our date extension is always allowed.
if (extensions[i] != DateExtension::get()
@@ -363,13 +428,13 @@ v8::Persistent<v8::Context> V8DOMWindowShell::createNewContext(v8::Handle<v8::Ob
extensionNames[index++] = extensions[i]->name();
}
v8::ExtensionConfiguration extensionConfiguration(index, extensionNames.get());
- result = v8::Context::New(&extensionConfiguration, globalTemplate, global);
- return result;
+ m_context.adopt(v8::Context::New(&extensionConfiguration, globalTemplate, m_global.get()));
}
-bool V8DOMWindowShell::installDOMWindow(v8::Handle<v8::Context> context, DOMWindow* window)
+bool V8DOMWindowShell::installDOMWindow()
{
+ DOMWindow* window = m_frame->document()->domWindow();
v8::Local<v8::Object> windowWrapper = V8ObjectConstructor::newInstance(V8DOMWrapper::constructorForType(&V8DOMWindow::info, window));
if (windowWrapper.IsEmpty())
return false;
@@ -393,7 +458,7 @@ bool V8DOMWindowShell::installDOMWindow(v8::Handle<v8::Context> context, DOMWind
// outer, inner, and DOMWindow instance all appear to be the same
// JavaScript object.
//
- v8::Handle<v8::Object> innerGlobalObject = toInnerGlobalObject(context);
+ v8::Handle<v8::Object> innerGlobalObject = toInnerGlobalObject(m_context.get());
V8DOMWrapper::setDOMWrapper(innerGlobalObject, &V8DOMWindow::info, window);
innerGlobalObject->SetPrototype(windowWrapper);
return true;
@@ -401,11 +466,15 @@ bool V8DOMWindowShell::installDOMWindow(v8::Handle<v8::Context> context, DOMWind
void V8DOMWindowShell::updateDocumentWrapper(v8::Handle<v8::Object> wrapper)
{
+ ASSERT(m_world->isMainWorld());
m_document.set(wrapper);
}
void V8DOMWindowShell::updateDocumentProperty()
{
+ if (!m_world->isMainWorld())
+ return;
+
v8::HandleScope handleScope;
// FIXME: Should we use a new Local handle here?
v8::Context::Scope contextScope(m_context.get());
@@ -434,11 +503,15 @@ void V8DOMWindowShell::updateDocumentProperty()
void V8DOMWindowShell::clearDocumentProperty()
{
ASSERT(!m_context.isEmpty());
+ if (!m_world->isMainWorld())
+ return;
m_context->Global()->ForceDelete(v8::String::New("document"));
}
void V8DOMWindowShell::setSecurityToken()
{
+ ASSERT(m_world->isMainWorld());
+
Document* document = m_frame->document();
// Ask the document's SecurityOrigin to generate a security token.
@@ -469,6 +542,7 @@ void V8DOMWindowShell::setSecurityToken()
void V8DOMWindowShell::updateDocument()
{
+ ASSERT(m_world->isMainWorld());
if (m_global.isEmpty())
return;
if (!initializeIfNeeded())
@@ -494,6 +568,8 @@ static v8::Handle<v8::Value> getter(v8::Local<v8::String> property, const v8::Ac
void V8DOMWindowShell::namedItemAdded(HTMLDocument* document, const AtomicString& name)
{
+ ASSERT(m_world->isMainWorld());
+
if (!initializeIfNeeded())
return;
@@ -507,6 +583,8 @@ void V8DOMWindowShell::namedItemAdded(HTMLDocument* document, const AtomicString
void V8DOMWindowShell::namedItemRemoved(HTMLDocument* document, const AtomicString& name)
{
+ ASSERT(m_world->isMainWorld());
+
if (document->hasNamedItem(name.impl()) || document->hasExtraNamedItem(name.impl()))
return;
@@ -523,10 +601,23 @@ void V8DOMWindowShell::namedItemRemoved(HTMLDocument* document, const AtomicStri
void V8DOMWindowShell::updateSecurityOrigin()
{
+ ASSERT(m_world->isMainWorld());
if (m_context.isEmpty())
return;
v8::HandleScope handleScope;
setSecurityToken();
}
+void V8DOMWindowShell::setIsolatedWorldSecurityOrigin(PassRefPtr<SecurityOrigin> securityOrigin)
+{
+ ASSERT(!m_world->isMainWorld());
+ // FIXME: Should this be here?
+ if (!m_isolatedWorldShellSecurityOrigin && !context().IsEmpty() && InspectorInstrumentation::hasFrontends()) {
+ v8::HandleScope handleScope;
+ ScriptState* scriptState = ScriptState::forContext(v8::Local<v8::Context>::New(context()));
+ InspectorInstrumentation::didCreateIsolatedContext(m_frame, scriptState, securityOrigin.get());
+ }
+ m_isolatedWorldShellSecurityOrigin = securityOrigin;
+}
+
} // WebCore
diff --git a/Source/WebCore/bindings/v8/V8DOMWindowShell.h b/Source/WebCore/bindings/v8/V8DOMWindowShell.h
index c61525738..01d29817f 100644
--- a/Source/WebCore/bindings/v8/V8DOMWindowShell.h
+++ b/Source/WebCore/bindings/v8/V8DOMWindowShell.h
@@ -31,7 +31,9 @@
#ifndef V8DOMWindowShell_h
#define V8DOMWindowShell_h
+#include "DOMWrapperWorld.h"
#include "ScopedPersistent.h"
+#include "SecurityOrigin.h"
#include "V8PerContextData.h"
#include "WrapperTypeInfo.h"
#include <wtf/Forward.h>
@@ -51,7 +53,7 @@ class HTMLDocument;
// persist between navigations.
class V8DOMWindowShell {
public:
- static PassOwnPtr<V8DOMWindowShell> create(Frame*);
+ static PassOwnPtr<V8DOMWindowShell> create(Frame*, PassRefPtr<DOMWrapperWorld>);
v8::Persistent<v8::Context> context() const { return m_context.get(); }
@@ -68,7 +70,6 @@ public:
bool isContextInitialized();
v8::Persistent<v8::Context> createNewContext(v8::Handle<v8::Object> global, int extensionGroup, int worldId);
- static bool installDOMWindow(v8::Handle<v8::Context> context, DOMWindow*);
bool initializeIfNeeded();
void updateDocumentWrapper(v8::Handle<v8::Object> wrapper);
@@ -80,10 +81,38 @@ public:
V8PerContextData* perContextData() { return m_perContextData.get(); }
+ DOMWrapperWorld* world() { return m_world.get(); }
+
+ void setIsolatedWorldSecurityOrigin(PassRefPtr<SecurityOrigin>);
+ SecurityOrigin* isolatedWorldSecurityOrigin() const
+ {
+ ASSERT(!m_world->isMainWorld());
+ return m_isolatedWorldShellSecurityOrigin.get();
+ };
+
+ // Returns the isolated world associated with
+ // v8::Context::GetEntered(). Because worlds are isolated, the entire
+ // JavaScript call stack should be from the same isolated world.
+ // Returns 0 if the entered context is from the main world.
+ //
+ // FIXME: Consider edge cases with DOM mutation events that might
+ // violate this invariant.
+ //
+ // FIXME: This is poorly named after the deletion of isolated contexts.
+ static V8DOMWindowShell* getEntered()
+ {
+ if (!DOMWrapperWorld::isolatedWorldsExist())
+ return 0;
+ if (!v8::Context::InContext())
+ return 0;
+ return enteredIsolatedWorldContext();
+ }
+
+ void destroyIsolatedShell();
private:
- explicit V8DOMWindowShell(Frame*);
+ V8DOMWindowShell(Frame*, PassRefPtr<DOMWrapperWorld>);
- void disposeContext();
+ void disposeContext(bool weak = false);
void setSecurityToken();
@@ -94,13 +123,22 @@ private:
void updateDocumentProperty();
void clearDocumentProperty();
+ void createContext();
+ bool installDOMWindow();
+
+ static V8DOMWindowShell* enteredIsolatedWorldContext();
+
Frame* m_frame;
+ RefPtr<DOMWrapperWorld> m_world;
OwnPtr<V8PerContextData> m_perContextData;
ScopedPersistent<v8::Context> m_context;
ScopedPersistent<v8::Object> m_global;
ScopedPersistent<v8::Object> m_document;
+
+ // FIXME: Either remove this or the map in ScriptController.
+ RefPtr<SecurityOrigin> m_isolatedWorldShellSecurityOrigin;
};
} // namespace WebCore
diff --git a/Source/WebCore/bindings/v8/V8DOMWrapper.cpp b/Source/WebCore/bindings/v8/V8DOMWrapper.cpp
index c94c579ae..fc3ab77a8 100644
--- a/Source/WebCore/bindings/v8/V8DOMWrapper.cpp
+++ b/Source/WebCore/bindings/v8/V8DOMWrapper.cpp
@@ -121,23 +121,6 @@ void V8DOMWrapper::setNamedHiddenReference(v8::Handle<v8::Object> parent, const
parent->SetHiddenValue(V8HiddenPropertyName::hiddenReferenceName(name), child);
}
-void V8DOMWrapper::setNamedHiddenWindowReference(Frame* frame, const char* name, v8::Handle<v8::Value> jsObject)
-{
- // Get DOMWindow
- if (!frame)
- return; // Object might be detached from window
- v8::Handle<v8::Context> context = frame->script()->currentWorldContext();
- if (context.IsEmpty())
- return;
-
- v8::Handle<v8::Object> global = context->Global();
- // Look for real DOM wrapper.
- global = V8DOMWrapper::lookupDOMWrapper(V8DOMWindow::GetTemplate(), global);
- ASSERT(!global.IsEmpty());
-
- setNamedHiddenReference(global, name, jsObject);
-}
-
WrapperTypeInfo* V8DOMWrapper::domWrapperType(v8::Handle<v8::Object> object)
{
ASSERT(V8DOMWrapper::maybeDOMWrapper(object));
diff --git a/Source/WebCore/bindings/v8/V8DOMWrapper.h b/Source/WebCore/bindings/v8/V8DOMWrapper.h
index a609e3279..e24479a1c 100644
--- a/Source/WebCore/bindings/v8/V8DOMWrapper.h
+++ b/Source/WebCore/bindings/v8/V8DOMWrapper.h
@@ -37,7 +37,7 @@
#include "NodeFilter.h"
#include "V8CustomXPathNSResolver.h"
#include "V8DOMMap.h"
-#include "V8IsolatedContext.h"
+#include "V8DOMWindowShell.h"
#include "V8Utilities.h"
#include "WrapperTypeInfo.h"
#include <v8.h>
@@ -110,14 +110,7 @@ namespace WebCore {
// Check whether a V8 value is a wrapper of type |classType|.
static bool isWrapperOfType(v8::Handle<v8::Value>, WrapperTypeInfo*);
- // Proper object lifetime support.
- //
- // Helper functions to make sure the child object stays alive
- // while the parent is alive. Using the name more than once
- // overwrites previous references making it possible to free
- // old children.
static void setNamedHiddenReference(v8::Handle<v8::Object> parent, const char* name, v8::Handle<v8::Value> child);
- static void setNamedHiddenWindowReference(Frame*, const char*, v8::Handle<v8::Value>);
static v8::Local<v8::Object> instantiateV8Object(WrapperTypeInfo*, void*);
@@ -130,7 +123,7 @@ namespace WebCore {
return *wrapper;
}
- V8IsolatedContext* context = V8IsolatedContext::getEntered();
+ V8DOMWindowShell* context = V8DOMWindowShell::getEntered();
if (LIKELY(!context)) {
v8::Persistent<v8::Object>* wrapper = node->wrapper();
if (!wrapper)
diff --git a/Source/WebCore/bindings/v8/V8GCController.cpp b/Source/WebCore/bindings/v8/V8GCController.cpp
index 2a882dc76..f9d67531b 100644
--- a/Source/WebCore/bindings/v8/V8GCController.cpp
+++ b/Source/WebCore/bindings/v8/V8GCController.cpp
@@ -67,63 +67,6 @@
namespace WebCore {
-#ifndef NDEBUG
-// Keeps track of global handles created (not JS wrappers
-// of DOM objects). Often these global handles are source
-// of leaks.
-//
-// If you want to let a C++ object hold a persistent handle
-// to a JS object, you should register the handle here to
-// keep track of leaks.
-//
-// When creating a persistent handle, call:
-//
-// #ifndef NDEBUG
-// V8GCController::registerGlobalHandle(type, host, handle);
-// #endif
-//
-// When releasing the handle, call:
-//
-// #ifndef NDEBUG
-// V8GCController::unregisterGlobalHandle(type, host, handle);
-// #endif
-//
-
-static GlobalHandleMap& currentGlobalHandleMap()
-{
- return V8PerIsolateData::current()->globalHandleMap();
-}
-
-// The function is the place to set the break point to inspect
-// live global handles. Leaks are often come from leaked global handles.
-static void enumerateGlobalHandles()
-{
- GlobalHandleMap& globalHandleMap = currentGlobalHandleMap();
- for (GlobalHandleMap::iterator it = globalHandleMap.begin(), end = globalHandleMap.end(); it != end; ++it) {
- GlobalHandleInfo* info = it->second;
- UNUSED_PARAM(info);
- v8::Value* handle = it->first;
- UNUSED_PARAM(handle);
- }
-}
-
-void V8GCController::registerGlobalHandle(GlobalHandleType type, void* host, v8::Persistent<v8::Value> handle)
-{
- GlobalHandleMap& globalHandleMap = currentGlobalHandleMap();
- ASSERT(!globalHandleMap.contains(*handle));
- globalHandleMap.set(*handle, new GlobalHandleInfo(host, type));
-}
-
-void V8GCController::unregisterGlobalHandle(void* host, v8::Persistent<v8::Value> handle)
-{
- GlobalHandleMap& globalHandleMap = currentGlobalHandleMap();
- ASSERT(globalHandleMap.contains(*handle));
- GlobalHandleInfo* info = globalHandleMap.take(*handle);
- ASSERT(info->m_host == host);
- delete info;
-}
-#endif // ifndef NDEBUG
-
typedef HashMap<Node*, v8::Object*> DOMNodeMap;
typedef HashMap<void*, v8::Object*> DOMObjectMap;
@@ -475,11 +418,6 @@ public:
int V8GCController::workingSetEstimateMB = 0;
-namespace {
-
-
-} // anonymous namespace
-
void V8GCController::gcEpilogue()
{
v8::HandleScope scope;
@@ -500,8 +438,6 @@ void V8GCController::gcEpilogue()
EnsureWeakDOMNodeVisitor weakDOMNodeVisitor;
visitDOMNodes(&weakDOMNodeVisitor);
-
- enumerateGlobalHandles();
#endif
#if PLATFORM(CHROMIUM)
@@ -536,11 +472,14 @@ void V8GCController::collectGarbage()
{
v8::HandleScope handleScope;
- v8::Persistent<v8::Context> context = v8::Context::New();
- if (context.IsEmpty())
+ ScopedPersistent<v8::Context> context;
+
+ context.adopt(v8::Context::New());
+ if (context.isEmpty())
return;
+
{
- v8::Context::Scope scope(context);
+ v8::Context::Scope scope(context.get());
v8::Local<v8::String> source = v8::String::New("if (gc) gc();");
v8::Local<v8::String> name = v8::String::New("gc");
v8::Handle<v8::Script> script = v8::Script::Compile(source, name);
@@ -549,7 +488,8 @@ void V8GCController::collectGarbage()
script->Run();
}
}
- context.Dispose();
+
+ context.clear();
}
} // namespace WebCore
diff --git a/Source/WebCore/bindings/v8/V8GCController.h b/Source/WebCore/bindings/v8/V8GCController.h
index f5f9c3a3a..b050dfc2d 100644
--- a/Source/WebCore/bindings/v8/V8GCController.h
+++ b/Source/WebCore/bindings/v8/V8GCController.h
@@ -35,54 +35,18 @@
namespace WebCore {
-#ifndef NDEBUG
-
-#define GlobalHandleTypeList(V) \
- V(PROXY) \
- V(NPOBJECT) \
- V(SCHEDULED_ACTION) \
- V(EVENT_LISTENER) \
- V(NODE_FILTER) \
- V(SCRIPTINSTANCE) \
- V(SCRIPTVALUE) \
- V(DATASOURCE)
-
-
- // Host information of persistent handles.
- enum GlobalHandleType {
-#define ENUM(name) name,
- GlobalHandleTypeList(ENUM)
-#undef ENUM
- };
-
- class GlobalHandleInfo {
- public:
- GlobalHandleInfo(void* host, GlobalHandleType type) : m_host(host), m_type(type) { }
- void* m_host;
- GlobalHandleType m_type;
- };
-
-#endif // NDEBUG
-
- class V8GCController {
- public:
-#ifndef NDEBUG
- // For debugging and leak detection purpose.
- static void registerGlobalHandle(GlobalHandleType, void*, v8::Persistent<v8::Value>);
- static void unregisterGlobalHandle(void*, v8::Persistent<v8::Value>);
-#endif
-
- static void gcPrologue();
- static void gcEpilogue();
-
- static void checkMemoryUsage();
- static void hintForCollectGarbage();
- static void collectGarbage();
-
- private:
- // Estimate of current working set.
- static int workingSetEstimateMB;
- };
+class V8GCController {
+public:
+ static void gcPrologue();
+ static void gcEpilogue();
+
+ static void checkMemoryUsage();
+ static void hintForCollectGarbage();
+ static void collectGarbage();
+
+private:
+ static int workingSetEstimateMB;
+};
}
diff --git a/Source/WebCore/bindings/v8/V8IsolatedContext.cpp b/Source/WebCore/bindings/v8/V8IsolatedContext.cpp
deleted file mode 100644
index 98f8ec918..000000000
--- a/Source/WebCore/bindings/v8/V8IsolatedContext.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "V8IsolatedContext.h"
-
-#include "Frame.h"
-#include "FrameLoaderClient.h"
-#include "InspectorInstrumentation.h"
-#include "SecurityOrigin.h"
-#include "V8DOMWindow.h"
-#include "V8PerContextData.h"
-#include <wtf/StringExtras.h>
-
-namespace WebCore {
-
-V8IsolatedContext* V8IsolatedContext::isolatedContext()
-{
- return reinterpret_cast<V8IsolatedContext*>(getGlobalObject(v8::Context::GetEntered())->GetPointerFromInternalField(V8DOMWindow::enteredIsolatedWorldIndex));
-}
-
-void V8IsolatedContext::contextWeakReferenceCallback(v8::Persistent<v8::Value> object, void* isolatedContext)
-{
- // Our context is going away. Time to clean up the world.
- V8IsolatedContext* context = static_cast<V8IsolatedContext*>(isolatedContext);
- delete context;
-}
-
-static void setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContext, int debugId)
-{
- char buffer[32];
- if (debugId == -1)
- snprintf(buffer, sizeof(buffer), "injected");
- else
- snprintf(buffer, sizeof(buffer), "injected,%d", debugId);
- targetContext->SetData(v8::String::New(buffer));
-}
-
-V8IsolatedContext::V8IsolatedContext(Frame* frame, PassRefPtr<DOMWrapperWorld> world)
- : m_world(world),
- m_frame(frame)
-{
- v8::HandleScope scope;
- v8::Handle<v8::Context> mainWorldContext = frame->script()->windowShell()->context();
- if (mainWorldContext.IsEmpty())
- return;
-
- // FIXME: We should be creating a new V8DOMWindowShell here instead of riping out the context.
- m_context = SharedPersistent<v8::Context>::create(frame->script()->windowShell()->createNewContext(v8::Handle<v8::Object>(), m_world->extensionGroup(), m_world->worldId()));
- if (m_context->get().IsEmpty())
- return;
-
- // Run code in the new context.
- v8::Context::Scope contextScope(m_context->get());
-
- setInjectedScriptContextDebugId(m_context->get(), ScriptController::contextDebugId(mainWorldContext));
-
- getGlobalObject(m_context->get())->SetPointerInInternalField(V8DOMWindow::enteredIsolatedWorldIndex, this);
-
- m_perContextData = V8PerContextData::create(m_context->get());
- m_perContextData->init();
-
- // FIXME: This will go away once we have a windowShell for the isolated world.
- frame->script()->windowShell()->installDOMWindow(m_context->get(), m_frame->document()->domWindow());
-
- // Using the default security token means that the canAccess is always
- // called, which is slow.
- // FIXME: Use tokens where possible. This will mean keeping track of all
- // created contexts so that they can all be updated when the
- // document domain
- // changes.
- m_context->get()->UseDefaultSecurityToken();
-
- m_frame->loader()->client()->didCreateScriptContext(context(), m_world->extensionGroup(), m_world->worldId());
-}
-
-void V8IsolatedContext::destroy()
-{
- m_perContextData.clear();
- m_frame->loader()->client()->willReleaseScriptContext(context(), m_world->worldId());
- m_context->get().MakeWeak(this, &contextWeakReferenceCallback);
- m_frame = 0;
-}
-
-V8IsolatedContext::~V8IsolatedContext()
-{
- m_context->disposeHandle();
-}
-
-void V8IsolatedContext::setSecurityOrigin(PassRefPtr<SecurityOrigin> securityOrigin)
-{
- if (!m_securityOrigin && InspectorInstrumentation::hasFrontends() && !context().IsEmpty()) {
- v8::HandleScope handleScope;
- ScriptState* scriptState = ScriptState::forContext(v8::Local<v8::Context>::New(context()));
- InspectorInstrumentation::didCreateIsolatedContext(m_frame, scriptState, securityOrigin.get());
- }
- m_securityOrigin = securityOrigin;
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/bindings/v8/V8IsolatedContext.h b/Source/WebCore/bindings/v8/V8IsolatedContext.h
deleted file mode 100644
index 9d1c2807d..000000000
--- a/Source/WebCore/bindings/v8/V8IsolatedContext.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef V8IsolatedContext_h
-#define V8IsolatedContext_h
-
-#include "DOMWrapperWorld.h"
-#include "ScriptSourceCode.h" // for WebCore::ScriptSourceCode
-#include "SharedPersistent.h"
-#include "V8Utilities.h"
-#include <v8.h>
-
-namespace WebCore {
-
-class Frame;
-class SecurityOrigin;
-class V8PerContextData;
-
-// V8IsolatedContext
-//
-// V8IsolatedContext represents a isolated execution environment for
-// JavaScript. Each isolated world executes in parallel with the main
-// JavaScript world. An isolated world has access to the same DOM data
-// structures as the main world but none of the JavaScript pointers.
-//
-// It is an error to ever share a JavaScript pointer between two isolated
-// worlds or between an isolated world and the main world. Because
-// isolated worlds have access to the DOM, they need their own DOM wrappers
-// to avoid having pointers to the main world's DOM wrappers (which are
-// JavaScript objects).
-class V8IsolatedContext {
-public:
- // Creates an isolated world. To destroy it, call destroy().
- // This will delete the isolated world when the context it owns is GC'd.
- V8IsolatedContext(Frame*, PassRefPtr<DOMWrapperWorld>);
- ~V8IsolatedContext();
-
- // Call this to destroy the isolated world. It will be deleted sometime
- // after this call, once all script references to the world's context
- // have been dropped.
- void destroy();
-
- // Returns the isolated world associated with
- // v8::Context::GetEntered(). Because worlds are isolated, the entire
- // JavaScript call stack should be from the same isolated world.
- // Returns 0 if the entered context is from the main world.
- //
- // FIXME: Consider edge cases with DOM mutation events that might
- // violate this invariant.
- //
- static V8IsolatedContext* getEntered()
- {
- // This is a temporary performance optimization. Essentially,
- // GetHiddenValue is too slow for this code path. We need to get the
- // V8 team to add a real property to v8::Context for isolated worlds.
- // Until then, we optimize the common case of not having any isolated
- // worlds at all.
- if (!DOMWrapperWorld::isolatedWorldsExist())
- return 0;
- if (!v8::Context::InContext())
- return 0;
- return isolatedContext();
- }
-
- v8::Handle<v8::Context> context() { return m_context->get(); }
- PassRefPtr<SharedPersistent<v8::Context> > sharedContext() { return m_context; }
-
- DOMWrapperWorld* world() const { return m_world.get(); }
-
- SecurityOrigin* securityOrigin() const { return m_securityOrigin.get(); }
- void setSecurityOrigin(PassRefPtr<SecurityOrigin>);
-
- V8PerContextData* perContextData() { return m_perContextData.get(); }
-
-private:
- static v8::Handle<v8::Object> getGlobalObject(v8::Handle<v8::Context> context)
- {
- return v8::Handle<v8::Object>::Cast(context->Global()->GetPrototype());
- }
-
- // Called by the garbage collector when our JavaScript context is about
- // to be destroyed.
- static void contextWeakReferenceCallback(v8::Persistent<v8::Value> object, void* isolatedContext);
-
- static V8IsolatedContext* isolatedContext();
-
- // The underlying v8::Context. This object is keep on the heap as
- // long as |m_context| has not been garbage collected.
- RefPtr<SharedPersistent<v8::Context> > m_context;
-
- RefPtr<DOMWrapperWorld> m_world;
-
- RefPtr<SecurityOrigin> m_securityOrigin;
-
- Frame* m_frame;
-
- OwnPtr<V8PerContextData> m_perContextData;
-};
-
-} // namespace WebCore
-
-#endif // V8IsolatedContext_h
diff --git a/Source/WebCore/bindings/v8/V8LazyEventListener.cpp b/Source/WebCore/bindings/v8/V8LazyEventListener.cpp
index c1bbdbf77..cdb00179f 100644
--- a/Source/WebCore/bindings/v8/V8LazyEventListener.cpp
+++ b/Source/WebCore/bindings/v8/V8LazyEventListener.cpp
@@ -37,6 +37,7 @@
#include "HTMLElement.h"
#include "HTMLFormElement.h"
#include "Node.h"
+#include "ScriptSourceCode.h"
#include "V8Binding.h"
#include "V8DOMWrapper.h"
#include "V8Document.h"
@@ -145,16 +146,15 @@ void V8LazyEventListener::prepareListenerObject(ScriptExecutionContext* context)
// Call with 4 arguments instead of 3, pass additional null as the last parameter.
// By calling the function with 4 arguments, we create a setter on arguments object
// which would shadow property "3" on the prototype.
- String code = ASCIILiteral("(function() {" \
- "with (this[2]) {" \
- "with (this[1]) {" \
- "with (this[0]) {");
- code.append("return function(");
- code.append(m_eventParameterName);
- code.append(") {");
- code.append(m_code);
- // Insert '\n' otherwise //-style comments could break the handler.
- code.append("\n};}}}})");
+ String code = "(function() {"
+ "with (this[2]) {"
+ "with (this[1]) {"
+ "with (this[0]) {"
+ "return function(" + m_eventParameterName + ") {" +
+ m_code + "\n" // Insert '\n' otherwise //-style comments could break the handler.
+ "};"
+ "}}}})";
+
v8::Handle<v8::String> codeExternalString = v8ExternalString(code);
v8::Handle<v8::Script> script = ScriptSourceCode::compileScript(codeExternalString, m_sourceURL, m_position);
@@ -219,14 +219,8 @@ void V8LazyEventListener::prepareListenerObject(ScriptExecutionContext* context)
if (!toStringTemplate.IsEmpty())
toStringFunction = toStringTemplate->GetFunction();
if (!toStringFunction.IsEmpty()) {
- String toStringResult = ASCIILiteral("function ");
- toStringResult.append(m_functionName);
- toStringResult.append("(");
- toStringResult.append(m_eventParameterName);
- toStringResult.append(") {\n ");
- toStringResult.append(m_code);
- toStringResult.append("\n}");
- wrappedFunction->SetHiddenValue(V8HiddenPropertyName::toStringString(), v8ExternalString(toStringResult));
+ String toStringString = "function " + m_functionName + "(" + m_eventParameterName + ") {\n " + m_code + "\n}";
+ wrappedFunction->SetHiddenValue(V8HiddenPropertyName::toStringString(), v8ExternalString(toStringString));
wrappedFunction->Set(v8::String::NewSymbol("toString"), toStringFunction);
}
diff --git a/Source/WebCore/bindings/v8/V8PerIsolateData.cpp b/Source/WebCore/bindings/v8/V8PerIsolateData.cpp
index 33028a7ba..a7fc8d620 100644
--- a/Source/WebCore/bindings/v8/V8PerIsolateData.cpp
+++ b/Source/WebCore/bindings/v8/V8PerIsolateData.cpp
@@ -74,6 +74,13 @@ void V8PerIsolateData::dispose(v8::Isolate* isolate)
isolate->SetData(0);
}
+v8::Handle<v8::FunctionTemplate> V8PerIsolateData::toStringTemplate()
+{
+ if (m_toStringTemplate.isEmpty())
+ m_toStringTemplate.set(v8::FunctionTemplate::New(constructorOfToString));
+ return v8::Local<v8::FunctionTemplate>::New(m_toStringTemplate.get());
+}
+
void V8PerIsolateData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Binding);
@@ -107,6 +114,13 @@ void V8PerIsolateData::visitExternalStrings(ExternalStringVisitor* visitor)
}
#endif
+v8::Handle<v8::Context> V8PerIsolateData::ensureAuxiliaryContext()
+{
+ if (m_auxiliaryContext.isEmpty())
+ m_auxiliaryContext.adopt(v8::Context::New());
+ return m_auxiliaryContext.get();
+}
+
v8::Handle<v8::Value> V8PerIsolateData::constructorOfToString(const v8::Arguments& args)
{
// The DOM constructors' toString functions grab the current toString
diff --git a/Source/WebCore/bindings/v8/V8PerIsolateData.h b/Source/WebCore/bindings/v8/V8PerIsolateData.h
index 31acf0ee6..fd0a77edd 100644
--- a/Source/WebCore/bindings/v8/V8PerIsolateData.h
+++ b/Source/WebCore/bindings/v8/V8PerIsolateData.h
@@ -26,6 +26,7 @@
#ifndef V8PerIsolateData_h
#define V8PerIsolateData_h
+#include "ScopedPersistent.h"
#include <v8.h>
#include <wtf/HashMap.h>
#include <wtf/OwnPtr.h>
@@ -47,11 +48,6 @@ class ExternalStringVisitor;
typedef WTF::Vector<DOMDataStore*> DOMDataList;
-#ifndef NDEBUG
-class GlobalHandleInfo;
-typedef HashMap<v8::Value*, GlobalHandleInfo*> GlobalHandleMap;
-#endif
-
class V8PerIsolateData {
public:
static V8PerIsolateData* create(v8::Isolate*);
@@ -70,13 +66,7 @@ public:
TemplateMap& rawTemplateMap() { return m_rawTemplates; }
TemplateMap& templateMap() { return m_templates; }
- v8::Persistent<v8::FunctionTemplate>& toStringTemplate()
- {
- if (m_toStringTemplate.IsEmpty())
- m_toStringTemplate = v8::Persistent<v8::FunctionTemplate>::New(v8::FunctionTemplate::New(constructorOfToString));
- return m_toStringTemplate;
- }
-
+ v8::Handle<v8::FunctionTemplate> toStringTemplate();
v8::Persistent<v8::FunctionTemplate>& lazyEventListenerToStringTemplate()
{
return m_lazyEventListenerToStringTemplate;
@@ -91,7 +81,7 @@ public:
DOMDataList& allStores() { return m_domDataList; }
V8HiddenPropertyName* hiddenPropertyName() { return m_hiddenPropertyName.get(); }
- v8::Persistent<v8::Context>& auxiliaryContext() { return m_auxiliaryContext; }
+ v8::Handle<v8::Context> ensureAuxiliaryContext();
void registerDOMDataStore(DOMDataStore* domDataStore)
{
@@ -116,8 +106,6 @@ public:
int nextDependentRetainedId() { return m_nextDependentRetainedId++; }
#ifndef NDEBUG
- GlobalHandleMap& globalHandleMap() { return m_globalHandleMap; }
-
int internalScriptRecursionLevel() const { return m_internalScriptRecursionLevel; }
int incrementInternalScriptRecursionLevel() { return ++m_internalScriptRecursionLevel; }
int decrementInternalScriptRecursionLevel() { return --m_internalScriptRecursionLevel; }
@@ -142,7 +130,7 @@ private:
TemplateMap m_rawTemplates;
TemplateMap m_templates;
- v8::Persistent<v8::FunctionTemplate> m_toStringTemplate;
+ ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate;
v8::Persistent<v8::FunctionTemplate> m_lazyEventListenerToStringTemplate;
OwnPtr<StringCache> m_stringCache;
OwnPtr<IntegerCache> m_integerCache;
@@ -151,7 +139,7 @@ private:
DOMDataStore* m_domDataStore;
OwnPtr<V8HiddenPropertyName> m_hiddenPropertyName;
- v8::Persistent<v8::Context> m_auxiliaryContext;
+ ScopedPersistent<v8::Context> m_auxiliaryContext;
bool m_constructorMode;
friend class ConstructorMode;
@@ -160,7 +148,6 @@ private:
int m_nextDependentRetainedId;
#ifndef NDEBUG
- GlobalHandleMap m_globalHandleMap;
int m_internalScriptRecursionLevel;
#endif
OwnPtr<GCEventData> m_gcEventData;
diff --git a/Source/WebCore/bindings/v8/V8Utilities.cpp b/Source/WebCore/bindings/v8/V8Utilities.cpp
index 4621818e6..8c93e8341 100644
--- a/Source/WebCore/bindings/v8/V8Utilities.cpp
+++ b/Source/WebCore/bindings/v8/V8Utilities.cpp
@@ -48,24 +48,6 @@
namespace WebCore {
-V8AuxiliaryContext::V8AuxiliaryContext()
-{
- auxiliaryContext()->Enter();
-}
-
-V8AuxiliaryContext::~V8AuxiliaryContext()
-{
- auxiliaryContext()->Exit();
-}
-
-v8::Persistent<v8::Context>& V8AuxiliaryContext::auxiliaryContext()
-{
- v8::Persistent<v8::Context>& context = V8PerIsolateData::current()->auxiliaryContext();
- if (context.IsEmpty())
- context = v8::Context::New();
- return context;
-}
-
// Use an array to hold dependents. It works like a ref-counted scheme.
// A value can be added more than once to the DOM object.
void createHiddenDependency(v8::Handle<v8::Object> object, v8::Local<v8::Value> value, int cacheIndex)
@@ -181,9 +163,4 @@ ScriptExecutionContext* getScriptExecutionContext()
return currentDocument(BindingState::instance());
}
-void setTypeMismatchException(v8::Isolate* isolate)
-{
- setDOMException(TYPE_MISMATCH_ERR, isolate);
-}
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/v8/V8Utilities.h b/Source/WebCore/bindings/v8/V8Utilities.h
index d473a3940..4bc56ccaf 100644
--- a/Source/WebCore/bindings/v8/V8Utilities.h
+++ b/Source/WebCore/bindings/v8/V8Utilities.h
@@ -53,24 +53,6 @@ namespace WebCore {
ScriptExecutionContext* getScriptExecutionContext();
- void setTypeMismatchException(v8::Isolate*);
-
- enum CallbackAllowedValueFlag {
- CallbackAllowUndefined = 1,
- CallbackAllowNull = 1 << 1
- };
-
- typedef unsigned CallbackAllowedValueFlags;
-
- class V8AuxiliaryContext {
- public:
- V8AuxiliaryContext();
- virtual ~V8AuxiliaryContext();
- private:
- v8::HandleScope m_handleScope;
- static v8::Persistent<v8::Context>& auxiliaryContext();
- };
-
typedef WTF::Vector<RefPtr<MessagePort>, 1> MessagePortArray;
typedef WTF::Vector<RefPtr<ArrayBuffer>, 1> ArrayBufferArray;
@@ -81,27 +63,6 @@ namespace WebCore {
bool extractTransferables(v8::Local<v8::Value>, MessagePortArray&, ArrayBufferArray&, v8::Isolate*);
bool getMessagePortArray(v8::Local<v8::Value>, MessagePortArray&, v8::Isolate*);
- // 'FunctionOnly' is assumed for the created callback.
- template <typename V8CallbackType>
- PassRefPtr<V8CallbackType> createFunctionOnlyCallback(v8::Local<v8::Value> value, bool& succeeded, v8::Isolate* isolate, CallbackAllowedValueFlags acceptedValues = 0)
- {
- succeeded = true;
-
- if (value->IsUndefined() && (acceptedValues & CallbackAllowUndefined))
- return 0;
-
- if (value->IsNull() && (acceptedValues & CallbackAllowNull))
- return 0;
-
- if (!value->IsFunction()) {
- succeeded = false;
- setTypeMismatchException(isolate);
- return 0;
- }
-
- return V8CallbackType::create(value, getScriptExecutionContext());
- }
-
} // namespace WebCore
#endif // V8Utilities_h
diff --git a/Source/WebCore/bindings/v8/WorldContextHandle.cpp b/Source/WebCore/bindings/v8/WorldContextHandle.cpp
index 488f3b527..180280abc 100644
--- a/Source/WebCore/bindings/v8/WorldContextHandle.cpp
+++ b/Source/WebCore/bindings/v8/WorldContextHandle.cpp
@@ -32,7 +32,7 @@
#include "WorldContextHandle.h"
#include "ScriptController.h"
-#include "V8IsolatedContext.h"
+#include "V8DOMWindowShell.h"
namespace WebCore {
@@ -42,15 +42,22 @@ WorldContextHandle::WorldContextHandle(WorldToUse worldToUse)
if (worldToUse == UseMainWorld)
return;
- if (V8IsolatedContext* context = V8IsolatedContext::getEntered())
- m_context = context->sharedContext();
+ V8DOMWindowShell* shell = V8DOMWindowShell::getEntered();
+ if (LIKELY(!shell)) {
+ m_worldToUse = UseMainWorld;
+ return;
+ }
+
+ ASSERT(!shell->context().IsEmpty());
+ m_context = SharedPersistent<v8::Context>::create(shell->context());
}
v8::Local<v8::Context> WorldContextHandle::adjustedContext(ScriptController* script) const
{
- if (m_worldToUse == UseMainWorld || !m_context || m_context->get().IsEmpty())
+ if (m_worldToUse == UseMainWorld)
return script->mainWorldContext();
+ ASSERT(!m_context->get().IsEmpty());
return v8::Local<v8::Context>::New(m_context->get());
}
diff --git a/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp b/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp
index 56b12dcdf..01a8ca7bd 100644
--- a/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8AudioContextCustom.cpp
@@ -49,13 +49,7 @@ v8::Handle<v8::Value> V8AudioContext::constructorCallback(const v8::Arguments& a
if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
return args.Holder();
- Frame* frame = currentFrame(BindingState::instance());
- if (!frame)
- return throwError(ReferenceError, "AudioContext constructor associated frame is unavailable", args.GetIsolate());
-
- Document* document = frame->document();
- if (!document)
- return throwError(ReferenceError, "AudioContext constructor associated document is unavailable", args.GetIsolate());
+ Document* document = currentDocument(BindingState::instance());
RefPtr<AudioContext> audioContext;
diff --git a/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp b/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp
index ea2a3a1da..0a81a8d66 100644
--- a/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8BlobCustom.cpp
@@ -64,10 +64,7 @@ v8::Handle<v8::Value> V8Blob::constructorCallback(const v8::Arguments& args)
if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
return args.Holder();
- // Get the script execution context.
ScriptExecutionContext* context = getScriptExecutionContext();
- if (!context)
- return throwError(ReferenceError, "Blob constructor associated document is unavailable", args.GetIsolate());
if (!args.Length()) {
RefPtr<Blob> blob = Blob::create();
diff --git a/Source/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.cpp b/Source/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.cpp
index 8eddc6bd8..3a3e9f72f 100644
--- a/Source/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.cpp
@@ -30,6 +30,8 @@
#include "config.h"
#include "V8CustomXPathNSResolver.h"
+#include "Console.h"
+#include "DOMWindow.h"
#include "ScriptCallStack.h"
#include "ScriptController.h"
#include "ScriptExecutionContext.h"
@@ -66,14 +68,13 @@ String V8CustomXPathNSResolver::lookupNamespaceURI(const String& prefix)
}
if (lookupNamespaceURIFunc.IsEmpty() && !m_resolver->IsFunction()) {
- if (ScriptExecutionContext* context = getScriptExecutionContext())
- context->addConsoleMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "XPathNSResolver does not have a lookupNamespaceURI method.");
+ activeDOMWindow(BindingState::instance())->console()->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "XPathNSResolver does not have a lookupNamespaceURI method.");
return String();
}
// Catch exceptions from calling the namespace resolver.
- v8::TryCatch try_catch;
- try_catch.SetVerbose(true); // Print exceptions to console.
+ v8::TryCatch tryCatch;
+ tryCatch.SetVerbose(true); // Print exceptions to console.
const int argc = 1;
v8::Handle<v8::Value> argv[argc] = { v8String(prefix) };
@@ -82,7 +83,7 @@ String V8CustomXPathNSResolver::lookupNamespaceURI(const String& prefix)
v8::Handle<v8::Value> retval = ScriptController::callFunctionWithInstrumentation(0, function, m_resolver, argc, argv);
// Eat exceptions from namespace resolver and return an empty string. This will most likely cause NAMESPACE_ERR.
- if (try_catch.HasCaught())
+ if (tryCatch.HasCaught())
return String();
return toWebCoreStringWithNullCheck(retval);
diff --git a/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp b/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
index 591144f8b..781a7b726 100644
--- a/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8DocumentCustom.cpp
@@ -44,9 +44,9 @@
#include "V8CanvasRenderingContext2D.h"
#include "V8CustomXPathNSResolver.h"
#include "V8DOMImplementation.h"
+#include "V8DOMWindowShell.h"
#include "V8DOMWrapper.h"
#include "V8HTMLDocument.h"
-#include "V8IsolatedContext.h"
#include "V8Node.h"
#include "V8Touch.h"
#include "V8TouchList.h"
@@ -130,7 +130,7 @@ v8::Handle<v8::Value> toV8(Document* impl, v8::Handle<v8::Object> creationContex
v8::Handle<v8::Object> wrapper = V8Document::wrap(impl, creationContext, isolate, forceNewObject);
if (wrapper.IsEmpty())
return wrapper;
- if (!V8IsolatedContext::getEntered()) {
+ if (!V8DOMWindowShell::getEntered()) {
if (Frame* frame = impl->frame())
frame->script()->windowShell()->updateDocumentWrapper(wrapper);
}
diff --git a/Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp b/Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
index 3734a23d5..ec2f54f27 100644
--- a/Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8GeolocationCustom.cpp
@@ -31,6 +31,7 @@
#include "Frame.h"
#include "Geolocation.h"
#include "V8Binding.h"
+#include "V8Callback.h"
#include "V8PositionCallback.h"
#include "V8PositionErrorCallback.h"
#include "V8Utilities.h"
diff --git a/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp b/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
index ca397547d..e50a2603e 100644
--- a/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
@@ -40,9 +40,9 @@
#include "HTMLNames.h"
#include "V8Binding.h"
#include "V8DOMWindow.h"
+#include "V8DOMWindowShell.h"
#include "V8HTMLAllCollection.h"
#include "V8HTMLCollection.h"
-#include "V8IsolatedContext.h"
#include "V8Node.h"
#include "V8RecursionScope.h"
#include <wtf/text/StringBuilder.h>
@@ -119,8 +119,7 @@ v8::Handle<v8::Value> V8HTMLDocument::writeCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLDocument.write()");
HTMLDocument* htmlDocument = V8HTMLDocument::toNative(args.Holder());
- Frame* frame = activeFrame(BindingState::instance());
- htmlDocument->write(writeHelperGetString(args), frame ? frame->document() : NULL);
+ htmlDocument->write(writeHelperGetString(args), activeDOMWindow(BindingState::instance())->document());
return v8::Undefined();
}
@@ -128,8 +127,7 @@ v8::Handle<v8::Value> V8HTMLDocument::writelnCallback(const v8::Arguments& args)
{
INC_STATS("DOM.HTMLDocument.writeln()");
HTMLDocument* htmlDocument = V8HTMLDocument::toNative(args.Holder());
- Frame* frame = activeFrame(BindingState::instance());
- htmlDocument->writeln(writeHelperGetString(args), frame ? frame->document() : NULL);
+ htmlDocument->writeln(writeHelperGetString(args), activeDOMWindow(BindingState::instance())->document());
return v8::Undefined();
}
@@ -160,9 +158,7 @@ v8::Handle<v8::Value> V8HTMLDocument::openCallback(const v8::Arguments& args)
}
}
- Frame* frame = activeFrame(BindingState::instance());
- htmlDocument->open(frame ? frame->document() : NULL);
- // Return the document.
+ htmlDocument->open(activeDOMWindow(BindingState::instance())->document());
return args.Holder();
}
@@ -187,7 +183,7 @@ v8::Handle<v8::Value> toV8(HTMLDocument* impl, v8::Handle<v8::Object> creationCo
v8::Handle<v8::Object> wrapper = V8HTMLDocument::wrap(impl, creationContext, isolate, forceNewObject);
if (wrapper.IsEmpty())
return wrapper;
- if (!V8IsolatedContext::getEntered()) {
+ if (!V8DOMWindowShell::getEntered()) {
if (Frame* frame = impl->frame())
frame->script()->windowShell()->updateDocumentWrapper(wrapper);
}
diff --git a/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp b/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp
index 9e8dfe830..60a84a0cb 100644
--- a/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp
@@ -55,14 +55,7 @@ static v8::Handle<v8::Value> v8HTMLImageElementConstructorCallback(const v8::Arg
if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
return args.Holder();
- // FIXME: We shouldn't need to go through the Frame to get the Document.
- Frame* frame = currentFrame(BindingState::instance());
- if (!frame)
- return throwError(ReferenceError, "Image constructor associated frame is unavailable", args.GetIsolate());
-
- Document* document = frame->document();
- if (!document)
- return throwError(ReferenceError, "Image constructor associated document is unavailable", args.GetIsolate());
+ Document* document = currentDocument(BindingState::instance());
// Make sure the document is added to the DOM Node map. Otherwise, the HTMLImageElement instance
// may end up being the only node in the map and get garbage-collected prematurely.
diff --git a/Source/WebCore/bindings/v8/custom/V8LocationCustom.cpp b/Source/WebCore/bindings/v8/custom/V8LocationCustom.cpp
index 45fdce79b..7833ea4bc 100644
--- a/Source/WebCore/bindings/v8/custom/V8LocationCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8LocationCustom.cpp
@@ -270,17 +270,4 @@ bool V8Location::namedSecurityCheck(v8::Local<v8::Object> host, v8::Local<v8::Va
return BindingSecurity::shouldAllowAccessToFrame(BindingState::instance(), imp->frame(), DoNotReportSecurityError);
}
-v8::Handle<v8::Value> toV8(Location* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
-{
- if (!impl)
- return v8NullWithCheck(isolate);
- v8::Handle<v8::Object> wrapper = getDOMObjectMap().get(impl);
- if (wrapper.IsEmpty()) {
- wrapper = V8Location::wrap(impl, creationContext, isolate);
- if (!wrapper.IsEmpty())
- V8DOMWrapper::setNamedHiddenWindowReference(impl->frame(), "location", wrapper);
- }
- return wrapper;
-}
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp b/Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp
index 78cf4f319..c9e6c109c 100644
--- a/Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp
@@ -47,36 +47,28 @@ namespace WebCore {
v8::Handle<v8::Value> V8MessageChannel::constructorCallback(const v8::Arguments& args)
{
INC_STATS("DOM.MessageChannel.Constructor");
- // FIXME: The logic here is almost exact duplicate of V8::constructDOMObject.
- // Consider refactoring to reduce duplication.
+
if (!args.IsConstructCall())
return throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
return args.Holder();
- // Get the ScriptExecutionContext (WorkerContext or Document)
ScriptExecutionContext* context = getScriptExecutionContext();
- if (!context)
- return v8::Undefined();
- // Note: it's OK to let this RefPtr go out of scope because we also call
- // SetDOMWrapper(), which effectively holds a reference to obj.
RefPtr<MessageChannel> obj = MessageChannel::create(context);
- v8::Local<v8::Object> messageChannel = args.Holder();
+ v8::Local<v8::Object> wrapper = args.Holder();
// Create references from the MessageChannel wrapper to the two
// MessagePort wrappers to make sure that the MessagePort wrappers
// stay alive as long as the MessageChannel wrapper is around.
- V8DOMWrapper::setNamedHiddenReference(messageChannel, "port1", toV8(obj->port1(), args.Holder(), args.GetIsolate()));
- V8DOMWrapper::setNamedHiddenReference(messageChannel, "port2", toV8(obj->port2(), args.Holder(), args.GetIsolate()));
+ V8DOMWrapper::setNamedHiddenReference(wrapper, "port1", toV8(obj->port1(), args.Holder(), args.GetIsolate()));
+ V8DOMWrapper::setNamedHiddenReference(wrapper, "port2", toV8(obj->port2(), args.Holder(), args.GetIsolate()));
- // Setup the standard wrapper object internal fields.
- V8DOMWrapper::setDOMWrapper(messageChannel, &info, obj.get());
- V8DOMWrapper::setJSWrapperForDOMObject(obj.release(), messageChannel);
- return messageChannel;
+ V8DOMWrapper::setDOMWrapper(wrapper, &info, obj.get());
+ V8DOMWrapper::setJSWrapperForDOMObject(obj.release(), wrapper);
+ return wrapper;
}
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp b/Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp
index d1ce128d9..68f4c7aa5 100644
--- a/Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8MutationObserverCustom.cpp
@@ -61,8 +61,6 @@ v8::Handle<v8::Value> V8MutationObserver::constructorCallback(const v8::Argument
return setDOMException(TYPE_MISMATCH_ERR, args.GetIsolate());
ScriptExecutionContext* context = getScriptExecutionContext();
- if (!context)
- return throwError(ReferenceError, "MutationObserver constructor's associated frame unavailable", args.GetIsolate());
RefPtr<MutationCallback> callback = V8MutationCallback::create(arg, context);
RefPtr<MutationObserver> observer = MutationObserver::create(callback.release());
diff --git a/Source/WebCore/bindings/v8/custom/V8NotificationCustom.cpp b/Source/WebCore/bindings/v8/custom/V8NotificationCustom.cpp
index 7565ffe48..c1f142ce9 100644
--- a/Source/WebCore/bindings/v8/custom/V8NotificationCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8NotificationCustom.cpp
@@ -29,6 +29,7 @@
#include "V8Notification.h"
#include "ExceptionCode.h"
+#include "V8Callback.h"
#include "V8NotificationPermissionCallback.h"
namespace WebCore {
diff --git a/Source/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp b/Source/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
index 1ce14c10d..593acbb94 100644
--- a/Source/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp
@@ -89,8 +89,6 @@ v8::Handle<v8::Value> V8SQLTransaction::executeSqlCallback(const v8::Arguments&
SQLTransaction* transaction = V8SQLTransaction::toNative(args.Holder());
ScriptExecutionContext* scriptExecutionContext = getScriptExecutionContext();
- if (!scriptExecutionContext)
- return v8::Undefined();
RefPtr<SQLStatementCallback> callback;
if (args.Length() > 2 && !isUndefinedOrNull(args[2])) {
diff --git a/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp b/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp
index a6f41b6db..da166a7af 100644
--- a/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8SVGDocumentCustom.cpp
@@ -34,7 +34,7 @@
#include "V8SVGDocument.h"
#include "Frame.h"
-#include "V8IsolatedContext.h"
+#include "V8DOMWindowShell.h"
namespace WebCore {
@@ -45,7 +45,7 @@ v8::Handle<v8::Value> toV8(SVGDocument* impl, v8::Handle<v8::Object> creationCon
v8::Handle<v8::Object> wrapper = V8SVGDocument::wrap(impl, creationContext, isolate, forceNewObject);
if (wrapper.IsEmpty())
return wrapper;
- if (!V8IsolatedContext::getEntered()) {
+ if (!V8DOMWindowShell::getEntered()) {
if (Frame* frame = impl->frame())
frame->script()->windowShell()->updateDocumentWrapper(wrapper);
}
diff --git a/Source/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp b/Source/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp
index 7411dac0d..900a5625e 100644
--- a/Source/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8WebSocketCustom.cpp
@@ -71,11 +71,7 @@ v8::Handle<v8::Value> V8WebSocket::constructorCallback(const v8::Arguments& args
if (urlstring.IsEmpty())
return throwError(SyntaxError, "Empty URL", args.GetIsolate());
- // Get the script execution context.
ScriptExecutionContext* context = getScriptExecutionContext();
- if (!context)
- return throwError(ReferenceError, "WebSocket constructor's associated frame is not available", args.GetIsolate());
-
const KURL& url = context->completeURL(toWebCoreString(urlstring));
RefPtr<WebSocket> webSocket = WebSocket::create(context);
diff --git a/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp b/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp
index c0e9c5b92..050b7fb4d 100644
--- a/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestConstructor.cpp
@@ -35,7 +35,7 @@
#include "OriginAccessEntry.h"
#include "SecurityOrigin.h"
#include "V8Binding.h"
-#include "V8IsolatedContext.h"
+#include "V8DOMWindowShell.h"
#include "V8Utilities.h"
#include "WorkerContext.h"
#include "WorkerContextExecutionProxy.h"
@@ -52,16 +52,14 @@ v8::Handle<v8::Value> V8XMLHttpRequest::constructorCallback(const v8::Arguments&
if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
return args.Holder();
- // Expect no parameters.
- // Allocate a XMLHttpRequest object as its internal field.
ScriptExecutionContext* context = getScriptExecutionContext();
- if (!context)
- return throwError(ReferenceError, "XMLHttpRequest constructor's associated context is not available", args.GetIsolate());
RefPtr<SecurityOrigin> securityOrigin;
- if (V8IsolatedContext* isolatedContext = V8IsolatedContext::getEntered())
- securityOrigin = isolatedContext->securityOrigin();
+ if (V8DOMWindowShell* isolatedWorldShell = V8DOMWindowShell::getEntered())
+ securityOrigin = isolatedWorldShell->isolatedWorldSecurityOrigin();
+
RefPtr<XMLHttpRequest> xmlHttpRequest = XMLHttpRequest::create(context, securityOrigin);
+
v8::Handle<v8::Object> wrapper = args.Holder();
V8DOMWrapper::setDOMWrapper(wrapper, &info, xmlHttpRequest.get());
V8DOMWrapper::setJSWrapperForActiveDOMObject(xmlHttpRequest.release(), wrapper);
diff --git a/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp b/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
index 154d67054..8584560b4 100644
--- a/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
@@ -117,10 +117,8 @@ v8::Handle<v8::Value> V8XMLHttpRequest::openCallback(const v8::Arguments& args)
String method = toWebCoreString(args[0]);
String urlstring = toWebCoreString(args[1]);
- ScriptExecutionContext* context = getScriptExecutionContext();
- if (!context)
- return v8::Undefined();
+ ScriptExecutionContext* context = getScriptExecutionContext();
KURL url = context->completeURL(urlstring);
ExceptionCode ec = 0;
diff --git a/Source/WebCore/css/CSSAspectRatioValue.cpp b/Source/WebCore/css/CSSAspectRatioValue.cpp
index 15292be2e..830f8cf79 100644
--- a/Source/WebCore/css/CSSAspectRatioValue.cpp
+++ b/Source/WebCore/css/CSSAspectRatioValue.cpp
@@ -36,11 +36,7 @@ namespace WebCore {
String CSSAspectRatioValue::customCssText() const
{
- StringBuilder result;
- result.append(String::number(m_numeratorValue));
- result.append("/");
- result.append(String::number(m_denominatorValue));
- return result.toString();
+ return String::number(m_numeratorValue) + '/' + String::number(m_denominatorValue);
}
void CSSAspectRatioValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
diff --git a/Source/WebCore/css/CSSPrimitiveValue.cpp b/Source/WebCore/css/CSSPrimitiveValue.cpp
index c1bd02233..5d2a7f7e4 100644
--- a/Source/WebCore/css/CSSPrimitiveValue.cpp
+++ b/Source/WebCore/css/CSSPrimitiveValue.cpp
@@ -56,65 +56,65 @@ namespace WebCore {
static inline bool isValidCSSUnitTypeForDoubleConversion(CSSPrimitiveValue::UnitTypes unitType)
{
switch (unitType) {
- case CSSPrimitiveValue:: CSS_CALC:
- case CSSPrimitiveValue:: CSS_CALC_PERCENTAGE_WITH_NUMBER:
- case CSSPrimitiveValue:: CSS_CALC_PERCENTAGE_WITH_LENGTH:
- case CSSPrimitiveValue:: CSS_CM:
- case CSSPrimitiveValue:: CSS_DEG:
- case CSSPrimitiveValue:: CSS_DIMENSION:
+ case CSSPrimitiveValue::CSS_CALC:
+ case CSSPrimitiveValue::CSS_CALC_PERCENTAGE_WITH_NUMBER:
+ case CSSPrimitiveValue::CSS_CALC_PERCENTAGE_WITH_LENGTH:
+ case CSSPrimitiveValue::CSS_CM:
+ case CSSPrimitiveValue::CSS_DEG:
+ case CSSPrimitiveValue::CSS_DIMENSION:
#if ENABLE(CSS_IMAGE_RESOLUTION)
- case CSSPrimitiveValue:: CSS_DPPX:
- case CSSPrimitiveValue:: CSS_DPI:
- case CSSPrimitiveValue:: CSS_DPCM:
+ case CSSPrimitiveValue::CSS_DPPX:
+ case CSSPrimitiveValue::CSS_DPI:
+ case CSSPrimitiveValue::CSS_DPCM:
#endif
- case CSSPrimitiveValue:: CSS_EMS:
- case CSSPrimitiveValue:: CSS_EXS:
- case CSSPrimitiveValue:: CSS_GRAD:
- case CSSPrimitiveValue:: CSS_HZ:
- case CSSPrimitiveValue:: CSS_IN:
- case CSSPrimitiveValue:: CSS_KHZ:
- case CSSPrimitiveValue:: CSS_MM:
- case CSSPrimitiveValue:: CSS_MS:
- case CSSPrimitiveValue:: CSS_NUMBER:
- case CSSPrimitiveValue:: CSS_PERCENTAGE:
- case CSSPrimitiveValue:: CSS_PC:
- case CSSPrimitiveValue:: CSS_PT:
- case CSSPrimitiveValue:: CSS_PX:
- case CSSPrimitiveValue:: CSS_RAD:
- case CSSPrimitiveValue:: CSS_REMS:
- case CSSPrimitiveValue:: CSS_S:
- case CSSPrimitiveValue:: CSS_TURN:
- case CSSPrimitiveValue:: CSS_VW:
- case CSSPrimitiveValue:: CSS_VH:
- case CSSPrimitiveValue:: CSS_VMIN:
+ case CSSPrimitiveValue::CSS_EMS:
+ case CSSPrimitiveValue::CSS_EXS:
+ case CSSPrimitiveValue::CSS_GRAD:
+ case CSSPrimitiveValue::CSS_HZ:
+ case CSSPrimitiveValue::CSS_IN:
+ case CSSPrimitiveValue::CSS_KHZ:
+ case CSSPrimitiveValue::CSS_MM:
+ case CSSPrimitiveValue::CSS_MS:
+ case CSSPrimitiveValue::CSS_NUMBER:
+ case CSSPrimitiveValue::CSS_PERCENTAGE:
+ case CSSPrimitiveValue::CSS_PC:
+ case CSSPrimitiveValue::CSS_PT:
+ case CSSPrimitiveValue::CSS_PX:
+ case CSSPrimitiveValue::CSS_RAD:
+ case CSSPrimitiveValue::CSS_REMS:
+ case CSSPrimitiveValue::CSS_S:
+ case CSSPrimitiveValue::CSS_TURN:
+ case CSSPrimitiveValue::CSS_VW:
+ case CSSPrimitiveValue::CSS_VH:
+ case CSSPrimitiveValue::CSS_VMIN:
return true;
- case CSSPrimitiveValue:: CSS_ATTR:
- case CSSPrimitiveValue:: CSS_COUNTER:
- case CSSPrimitiveValue:: CSS_COUNTER_NAME:
+ case CSSPrimitiveValue::CSS_ATTR:
+ case CSSPrimitiveValue::CSS_COUNTER:
+ case CSSPrimitiveValue::CSS_COUNTER_NAME:
#if ENABLE(DASHBOARD_SUPPORT) || ENABLE(WIDGET_REGION)
- case CSSPrimitiveValue:: CSS_DASHBOARD_REGION:
+ case CSSPrimitiveValue::CSS_DASHBOARD_REGION:
#endif
#if !ENABLE(CSS_IMAGE_RESOLUTION)
- case CSSPrimitiveValue:: CSS_DPPX:
- case CSSPrimitiveValue:: CSS_DPI:
- case CSSPrimitiveValue:: CSS_DPCM:
+ case CSSPrimitiveValue::CSS_DPPX:
+ case CSSPrimitiveValue::CSS_DPI:
+ case CSSPrimitiveValue::CSS_DPCM:
#endif
- case CSSPrimitiveValue:: CSS_IDENT:
- case CSSPrimitiveValue:: CSS_PAIR:
- case CSSPrimitiveValue:: CSS_PARSER_HEXCOLOR:
- case CSSPrimitiveValue:: CSS_PARSER_IDENTIFIER:
- case CSSPrimitiveValue:: CSS_PARSER_INTEGER:
- case CSSPrimitiveValue:: CSS_PARSER_OPERATOR:
- case CSSPrimitiveValue:: CSS_RECT:
- case CSSPrimitiveValue:: CSS_QUAD:
- case CSSPrimitiveValue:: CSS_RGBCOLOR:
- case CSSPrimitiveValue:: CSS_SHAPE:
- case CSSPrimitiveValue:: CSS_STRING:
- case CSSPrimitiveValue:: CSS_UNICODE_RANGE:
- case CSSPrimitiveValue:: CSS_UNKNOWN:
- case CSSPrimitiveValue:: CSS_URI:
+ case CSSPrimitiveValue::CSS_IDENT:
+ case CSSPrimitiveValue::CSS_PAIR:
+ case CSSPrimitiveValue::CSS_PARSER_HEXCOLOR:
+ case CSSPrimitiveValue::CSS_PARSER_IDENTIFIER:
+ case CSSPrimitiveValue::CSS_PARSER_INTEGER:
+ case CSSPrimitiveValue::CSS_PARSER_OPERATOR:
+ case CSSPrimitiveValue::CSS_RECT:
+ case CSSPrimitiveValue::CSS_QUAD:
+ case CSSPrimitiveValue::CSS_RGBCOLOR:
+ case CSSPrimitiveValue::CSS_SHAPE:
+ case CSSPrimitiveValue::CSS_STRING:
+ case CSSPrimitiveValue::CSS_UNICODE_RANGE:
+ case CSSPrimitiveValue::CSS_UNKNOWN:
+ case CSSPrimitiveValue::CSS_URI:
#if ENABLE(CSS_VARIABLES)
- case CSSPrimitiveValue:: CSS_VARIABLE_NAME:
+ case CSSPrimitiveValue::CSS_VARIABLE_NAME:
#endif
return false;
}
@@ -155,9 +155,9 @@ static CSSPrimitiveValue::UnitCategory unitCategory(CSSPrimitiveValue::UnitTypes
case CSSPrimitiveValue::CSS_VMIN:
return CSSPrimitiveValue::UViewportPercentageLength;
#if ENABLE(CSS_IMAGE_RESOLUTION)
- case CSSPrimitiveValue:: CSS_DPPX:
- case CSSPrimitiveValue:: CSS_DPI:
- case CSSPrimitiveValue:: CSS_DPCM:
+ case CSSPrimitiveValue::CSS_DPPX:
+ case CSSPrimitiveValue::CSS_DPI:
+ case CSSPrimitiveValue::CSS_DPCM:
return CSSPrimitiveValue::UResolution;
#endif
default:
diff --git a/Source/WebCore/css/MediaQueryEvaluator.cpp b/Source/WebCore/css/MediaQueryEvaluator.cpp
index 90c9df286..82e754532 100644
--- a/Source/WebCore/css/MediaQueryEvaluator.cpp
+++ b/Source/WebCore/css/MediaQueryEvaluator.cpp
@@ -82,7 +82,7 @@ MediaQueryEvaluator::MediaQueryEvaluator(bool mediaFeatureResult)
{
}
-MediaQueryEvaluator:: MediaQueryEvaluator(const String& acceptedMediaType, bool mediaFeatureResult)
+MediaQueryEvaluator::MediaQueryEvaluator(const String& acceptedMediaType, bool mediaFeatureResult)
: m_mediaType(acceptedMediaType)
, m_frame(0)
, m_style(0)
@@ -90,7 +90,7 @@ MediaQueryEvaluator:: MediaQueryEvaluator(const String& acceptedMediaType, bool
{
}
-MediaQueryEvaluator:: MediaQueryEvaluator(const char* acceptedMediaType, bool mediaFeatureResult)
+MediaQueryEvaluator::MediaQueryEvaluator(const char* acceptedMediaType, bool mediaFeatureResult)
: m_mediaType(acceptedMediaType)
, m_frame(0)
, m_style(0)
@@ -98,7 +98,7 @@ MediaQueryEvaluator:: MediaQueryEvaluator(const char* acceptedMediaType, bool me
{
}
-MediaQueryEvaluator:: MediaQueryEvaluator(const String& acceptedMediaType, Frame* frame, RenderStyle* style)
+MediaQueryEvaluator::MediaQueryEvaluator(const String& acceptedMediaType, Frame* frame, RenderStyle* style)
: m_mediaType(acceptedMediaType)
, m_frame(frame)
, m_style(style)
diff --git a/Source/WebCore/css/StyleResolver.cpp b/Source/WebCore/css/StyleResolver.cpp
index b55161696..dd8773771 100644
--- a/Source/WebCore/css/StyleResolver.cpp
+++ b/Source/WebCore/css/StyleResolver.cpp
@@ -1071,6 +1071,9 @@ void StyleResolver::collectMatchingRulesForList(const Vector<RuleData>* rules, i
{
if (!rules)
return;
+
+ TreeScope* treeScope = m_element->treeScope();
+
// In some cases we may end up looking up style for random elements in the middle of a recursive tree resolve.
// Ancestor identifier filter won't be up-to-date in that case and we can't use the fast path.
bool canUseFastReject = m_checker.parentStackIsConsistent(m_parentNode);
@@ -1093,7 +1096,6 @@ void StyleResolver::collectMatchingRulesForList(const Vector<RuleData>* rules, i
// b) the tree scope allows author rules
// c) the rules comes from a scoped style sheet within the same tree scope
// d) the rule contains shadow-ID pseudo elements
- TreeScope* treeScope = m_element->treeScope();
if (!MatchingUARulesScope::isMatchingUARules()
&& !treeScope->applyAuthorStyles()
#if ENABLE(STYLE_SCOPED)
diff --git a/Source/WebCore/dom/EventNames.h b/Source/WebCore/dom/EventNames.h
index dc9645014..b3cd846ea 100644
--- a/Source/WebCore/dom/EventNames.h
+++ b/Source/WebCore/dom/EventNames.h
@@ -229,6 +229,7 @@ namespace WebCore {
macro(unmute) \
macro(icechange) \
macro(icecandidate) \
+ macro(negotationneeded) \
\
macro(show) \
\
diff --git a/Source/WebCore/dom/WebCoreMemoryInstrumentation.h b/Source/WebCore/dom/WebCoreMemoryInstrumentation.h
index c8684bba7..9d688543e 100644
--- a/Source/WebCore/dom/WebCoreMemoryInstrumentation.h
+++ b/Source/WebCore/dom/WebCoreMemoryInstrumentation.h
@@ -31,9 +31,8 @@
#ifndef WebCoreMemoryInstrumentation_h
#define WebCoreMemoryInstrumentation_h
-#include "MemoryInstrumentation.h"
-
#include <wtf/Forward.h>
+#include <wtf/MemoryInstrumentation.h>
namespace WebCore {
diff --git a/Source/WebCore/html/ButtonInputType.cpp b/Source/WebCore/html/ButtonInputType.cpp
index 3af472029..d8e42af4b 100644
--- a/Source/WebCore/html/ButtonInputType.cpp
+++ b/Source/WebCore/html/ButtonInputType.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "ButtonInputType.h"
+#include "InputTypeNames.h"
#include <wtf/PassOwnPtr.h>
namespace WebCore {
diff --git a/Source/WebCore/html/CheckboxInputType.cpp b/Source/WebCore/html/CheckboxInputType.cpp
index 02967bbf4..2c6f2b51c 100644
--- a/Source/WebCore/html/CheckboxInputType.cpp
+++ b/Source/WebCore/html/CheckboxInputType.cpp
@@ -33,6 +33,7 @@
#include "CheckboxInputType.h"
#include "HTMLInputElement.h"
+#include "InputTypeNames.h"
#include "KeyboardEvent.h"
#include "LocalizedStrings.h"
#include <wtf/PassOwnPtr.h>
diff --git a/Source/WebCore/html/ColorInputType.cpp b/Source/WebCore/html/ColorInputType.cpp
index 42446768f..7f087de95 100644
--- a/Source/WebCore/html/ColorInputType.cpp
+++ b/Source/WebCore/html/ColorInputType.cpp
@@ -39,6 +39,7 @@
#include "HTMLDivElement.h"
#include "HTMLInputElement.h"
#include "HTMLOptionElement.h"
+#include "InputTypeNames.h"
#include "MouseEvent.h"
#include "RenderObject.h"
#include "RenderView.h"
diff --git a/Source/WebCore/html/DateInputType.cpp b/Source/WebCore/html/DateInputType.cpp
index 4c9529c52..4e973da69 100644
--- a/Source/WebCore/html/DateInputType.cpp
+++ b/Source/WebCore/html/DateInputType.cpp
@@ -35,6 +35,7 @@
#include "DateComponents.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
+#include "InputTypeNames.h"
#include "KeyboardEvent.h"
#include "LocalizedDate.h"
#include <wtf/PassOwnPtr.h>
diff --git a/Source/WebCore/html/DateTimeInputType.cpp b/Source/WebCore/html/DateTimeInputType.cpp
index 78a9184f6..09b423172 100644
--- a/Source/WebCore/html/DateTimeInputType.cpp
+++ b/Source/WebCore/html/DateTimeInputType.cpp
@@ -34,6 +34,7 @@
#include "DateComponents.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
+#include "InputTypeNames.h"
#include <wtf/CurrentTime.h>
#include <wtf/PassOwnPtr.h>
diff --git a/Source/WebCore/html/DateTimeLocalInputType.cpp b/Source/WebCore/html/DateTimeLocalInputType.cpp
index 38e449fba..9766b566c 100644
--- a/Source/WebCore/html/DateTimeLocalInputType.cpp
+++ b/Source/WebCore/html/DateTimeLocalInputType.cpp
@@ -34,6 +34,7 @@
#include "DateComponents.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
+#include "InputTypeNames.h"
#include <wtf/PassOwnPtr.h>
#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
diff --git a/Source/WebCore/html/EmailInputType.cpp b/Source/WebCore/html/EmailInputType.cpp
index 07b01a047..2395fc82f 100644
--- a/Source/WebCore/html/EmailInputType.cpp
+++ b/Source/WebCore/html/EmailInputType.cpp
@@ -26,6 +26,7 @@
#include "HTMLInputElement.h"
#include "HTMLParserIdioms.h"
+#include "InputTypeNames.h"
#include "LocalizedStrings.h"
#include "RegularExpression.h"
#include <wtf/PassOwnPtr.h>
diff --git a/Source/WebCore/html/FileInputType.cpp b/Source/WebCore/html/FileInputType.cpp
index f7896bab8..89fcc878e 100644
--- a/Source/WebCore/html/FileInputType.cpp
+++ b/Source/WebCore/html/FileInputType.cpp
@@ -35,6 +35,7 @@
#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "Icon.h"
+#include "InputTypeNames.h"
#include "LocalizedStrings.h"
#include "RenderFileUploadControl.h"
#include "ScriptController.h"
diff --git a/Source/WebCore/html/HiddenInputType.cpp b/Source/WebCore/html/HiddenInputType.cpp
index fb6f36a6e..acb55f642 100644
--- a/Source/WebCore/html/HiddenInputType.cpp
+++ b/Source/WebCore/html/HiddenInputType.cpp
@@ -36,6 +36,7 @@
#include "FormDataList.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
+#include "InputTypeNames.h"
#include <wtf/PassOwnPtr.h>
namespace WebCore {
diff --git a/Source/WebCore/html/ImageInputType.cpp b/Source/WebCore/html/ImageInputType.cpp
index 110154754..fcb344006 100644
--- a/Source/WebCore/html/ImageInputType.cpp
+++ b/Source/WebCore/html/ImageInputType.cpp
@@ -29,6 +29,7 @@
#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "HTMLParserIdioms.h"
+#include "InputTypeNames.h"
#include "MouseEvent.h"
#include "RenderImage.h"
#include <wtf/PassOwnPtr.h>
diff --git a/Source/WebCore/html/InputType.cpp b/Source/WebCore/html/InputType.cpp
index 69db2aefe..38d79eea8 100644
--- a/Source/WebCore/html/InputType.cpp
+++ b/Source/WebCore/html/InputType.cpp
@@ -51,6 +51,7 @@
#include "HTMLShadowElement.h"
#include "HiddenInputType.h"
#include "ImageInputType.h"
+#include "InputTypeNames.h"
#include "KeyboardEvent.h"
#include "LocalizedStrings.h"
#include "MonthInputType.h"
@@ -1113,150 +1114,4 @@ void InputType::stepUpFromRenderer(int n)
}
}
-namespace InputTypeNames {
-
-// The type names must be lowercased because they will be the return values of
-// input.type and input.type must be lowercase according to DOM Level 2.
-
-const AtomicString& button()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("button", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& checkbox()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("checkbox", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-#if ENABLE(INPUT_TYPE_COLOR)
-const AtomicString& color()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("color", AtomicString::ConstructFromLiteral));
- return name;
-}
-#endif
-
-const AtomicString& date()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("date", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& datetime()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("datetime", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& datetimelocal()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("datetime-local", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& email()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("email", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& file()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("file", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& hidden()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("hidden", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& image()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("image", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& month()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("month", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& number()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("number", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& password()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("password", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& radio()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("radio", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& range()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("range", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& reset()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("reset", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& search()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("search", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& submit()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("submit", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& telephone()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("tel", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& text()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("text", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& time()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("time", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& url()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("url", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-const AtomicString& week()
-{
- DEFINE_STATIC_LOCAL(AtomicString, name, ("week", AtomicString::ConstructFromLiteral));
- return name;
-}
-
-} // namespace WebCore::InputTypeNames
} // namespace WebCore
diff --git a/Source/WebCore/html/InputType.h b/Source/WebCore/html/InputType.h
index acc776d1b..87a4c12a8 100644
--- a/Source/WebCore/html/InputType.h
+++ b/Source/WebCore/html/InputType.h
@@ -326,36 +326,6 @@ private:
HTMLInputElement* m_element;
};
-namespace InputTypeNames {
-
-const AtomicString& button();
-const AtomicString& checkbox();
-#if ENABLE(INPUT_TYPE_COLOR)
-const AtomicString& color();
-#endif
-const AtomicString& date();
-const AtomicString& datetime();
-const AtomicString& datetimelocal();
-const AtomicString& email();
-const AtomicString& file();
-const AtomicString& hidden();
-const AtomicString& image();
-const AtomicString& month();
-const AtomicString& number();
-const AtomicString& password();
-const AtomicString& radio();
-const AtomicString& range();
-const AtomicString& reset();
-const AtomicString& search();
-const AtomicString& submit();
-const AtomicString& telephone();
-const AtomicString& text();
-const AtomicString& time();
-const AtomicString& url();
-const AtomicString& week();
-
-} // namespace WebCore::InputTypeNames
-
} // namespace WebCore
#endif
diff --git a/Source/WebCore/html/InputTypeNames.cpp b/Source/WebCore/html/InputTypeNames.cpp
new file mode 100644
index 000000000..8eac7205d
--- /dev/null
+++ b/Source/WebCore/html/InputTypeNames.cpp
@@ -0,0 +1,172 @@
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2012 Google Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+#include "InputTypeNames.h"
+
+namespace WebCore {
+
+namespace InputTypeNames {
+
+// The type names must be lowercased because they will be the return values of
+// input.type and input.type must be lowercase according to DOM Level 2.
+
+const AtomicString& button()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("button", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& checkbox()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("checkbox", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& color()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("color", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& date()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("date", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& datetime()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("datetime", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& datetimelocal()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("datetime-local", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& email()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("email", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& file()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("file", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& hidden()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("hidden", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& image()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("image", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& month()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("month", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& number()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("number", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& password()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("password", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& radio()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("radio", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& range()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("range", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& reset()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("reset", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& search()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("search", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& submit()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("submit", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& telephone()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("tel", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& text()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("text", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& time()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("time", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& url()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("url", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+const AtomicString& week()
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("week", AtomicString::ConstructFromLiteral));
+ return name;
+}
+
+} // namespace WebCore::InputTypeNames
+
+} // namespace WebCore
diff --git a/Source/WebCore/html/InputTypeNames.h b/Source/WebCore/html/InputTypeNames.h
new file mode 100644
index 000000000..0a94c8b03
--- /dev/null
+++ b/Source/WebCore/html/InputTypeNames.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2010, 2012 Google Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+
+#ifndef InputTypeNames_h
+#define InputTypeNames_h
+
+#include <wtf/text/AtomicString.h>
+
+namespace WebCore {
+
+namespace InputTypeNames {
+
+const AtomicString& button();
+const AtomicString& checkbox();
+const AtomicString& color();
+const AtomicString& date();
+const AtomicString& datetime();
+const AtomicString& datetimelocal();
+const AtomicString& email();
+const AtomicString& file();
+const AtomicString& hidden();
+const AtomicString& image();
+const AtomicString& month();
+const AtomicString& number();
+const AtomicString& password();
+const AtomicString& radio();
+const AtomicString& range();
+const AtomicString& reset();
+const AtomicString& search();
+const AtomicString& submit();
+const AtomicString& telephone();
+const AtomicString& text();
+const AtomicString& time();
+const AtomicString& url();
+const AtomicString& week();
+
+}
+
+} // namespace WebCore
+
+#endif // InputTypeNames_h
diff --git a/Source/WebCore/html/MonthInputType.cpp b/Source/WebCore/html/MonthInputType.cpp
index 70afa692e..fc672e3ee 100644
--- a/Source/WebCore/html/MonthInputType.cpp
+++ b/Source/WebCore/html/MonthInputType.cpp
@@ -34,6 +34,7 @@
#include "DateComponents.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
+#include "InputTypeNames.h"
#include <wtf/CurrentTime.h>
#include <wtf/DateMath.h>
#include <wtf/MathExtras.h>
diff --git a/Source/WebCore/html/NumberInputType.cpp b/Source/WebCore/html/NumberInputType.cpp
index 0d66d5676..794545dc9 100644
--- a/Source/WebCore/html/NumberInputType.cpp
+++ b/Source/WebCore/html/NumberInputType.cpp
@@ -37,6 +37,7 @@
#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "HTMLParserIdioms.h"
+#include "InputTypeNames.h"
#include "KeyboardEvent.h"
#include "LocalizedNumber.h"
#include "RenderTextControl.h"
diff --git a/Source/WebCore/html/PasswordInputType.cpp b/Source/WebCore/html/PasswordInputType.cpp
index a64c8e516..5c68c975d 100644
--- a/Source/WebCore/html/PasswordInputType.cpp
+++ b/Source/WebCore/html/PasswordInputType.cpp
@@ -34,6 +34,7 @@
#include "FormController.h"
#include "HTMLInputElement.h"
+#include "InputTypeNames.h"
#include <wtf/Assertions.h>
#include <wtf/PassOwnPtr.h>
diff --git a/Source/WebCore/html/RadioInputType.cpp b/Source/WebCore/html/RadioInputType.cpp
index 2c16b1a16..076e22a5a 100644
--- a/Source/WebCore/html/RadioInputType.cpp
+++ b/Source/WebCore/html/RadioInputType.cpp
@@ -25,6 +25,7 @@
#include "Frame.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
+#include "InputTypeNames.h"
#include "KeyboardEvent.h"
#include "LocalizedStrings.h"
#include "MouseEvent.h"
diff --git a/Source/WebCore/html/RangeInputType.cpp b/Source/WebCore/html/RangeInputType.cpp
index 52ab3273b..71b955d6f 100644
--- a/Source/WebCore/html/RangeInputType.cpp
+++ b/Source/WebCore/html/RangeInputType.cpp
@@ -38,6 +38,7 @@
#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "HTMLParserIdioms.h"
+#include "InputTypeNames.h"
#include "KeyboardEvent.h"
#include "MouseEvent.h"
#include "PlatformMouseEvent.h"
diff --git a/Source/WebCore/html/ResetInputType.cpp b/Source/WebCore/html/ResetInputType.cpp
index 457ea4590..8fec0ff75 100644
--- a/Source/WebCore/html/ResetInputType.cpp
+++ b/Source/WebCore/html/ResetInputType.cpp
@@ -35,6 +35,7 @@
#include "Event.h"
#include "HTMLFormElement.h"
#include "HTMLInputElement.h"
+#include "InputTypeNames.h"
#include "LocalizedStrings.h"
#include <wtf/PassOwnPtr.h>
diff --git a/Source/WebCore/html/SearchInputType.cpp b/Source/WebCore/html/SearchInputType.cpp
index 09f079b79..ada23e633 100644
--- a/Source/WebCore/html/SearchInputType.cpp
+++ b/Source/WebCore/html/SearchInputType.cpp
@@ -33,6 +33,7 @@
#include "HTMLInputElement.h"
#include "HTMLNames.h"
+#include "InputTypeNames.h"
#include "KeyboardEvent.h"
#include "RenderSearchField.h"
#include "ShadowRoot.h"
diff --git a/Source/WebCore/html/SubmitInputType.cpp b/Source/WebCore/html/SubmitInputType.cpp
index 937b20051..489d9a1f8 100644
--- a/Source/WebCore/html/SubmitInputType.cpp
+++ b/Source/WebCore/html/SubmitInputType.cpp
@@ -36,6 +36,7 @@
#include "FormDataList.h"
#include "HTMLFormElement.h"
#include "HTMLInputElement.h"
+#include "InputTypeNames.h"
#include "LocalizedStrings.h"
#include <wtf/PassOwnPtr.h>
diff --git a/Source/WebCore/html/TelephoneInputType.cpp b/Source/WebCore/html/TelephoneInputType.cpp
index c1c77f00d..cca0365f5 100644
--- a/Source/WebCore/html/TelephoneInputType.cpp
+++ b/Source/WebCore/html/TelephoneInputType.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "TelephoneInputType.h"
+#include "InputTypeNames.h"
#include <wtf/PassOwnPtr.h>
namespace WebCore {
diff --git a/Source/WebCore/html/TextInputType.cpp b/Source/WebCore/html/TextInputType.cpp
index a36997693..19bdca7fc 100644
--- a/Source/WebCore/html/TextInputType.cpp
+++ b/Source/WebCore/html/TextInputType.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "TextInputType.h"
+#include "InputTypeNames.h"
#include <wtf/PassOwnPtr.h>
namespace WebCore {
diff --git a/Source/WebCore/html/TimeInputType.cpp b/Source/WebCore/html/TimeInputType.cpp
index bbeec4343..edd12e7a6 100644
--- a/Source/WebCore/html/TimeInputType.cpp
+++ b/Source/WebCore/html/TimeInputType.cpp
@@ -34,6 +34,7 @@
#include "DateComponents.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
+#include "InputTypeNames.h"
#include <wtf/CurrentTime.h>
#include <wtf/DateMath.h>
#include <wtf/MathExtras.h>
diff --git a/Source/WebCore/html/URLInputType.cpp b/Source/WebCore/html/URLInputType.cpp
index 3a913b24b..b4a6d5bbb 100644
--- a/Source/WebCore/html/URLInputType.cpp
+++ b/Source/WebCore/html/URLInputType.cpp
@@ -32,6 +32,7 @@
#include "URLInputType.h"
#include "HTMLInputElement.h"
+#include "InputTypeNames.h"
#include "LocalizedStrings.h"
#include "KURL.h"
#include <wtf/PassOwnPtr.h>
diff --git a/Source/WebCore/html/WeekInputType.cpp b/Source/WebCore/html/WeekInputType.cpp
index c881ae8c1..adbb87591 100644
--- a/Source/WebCore/html/WeekInputType.cpp
+++ b/Source/WebCore/html/WeekInputType.cpp
@@ -34,6 +34,7 @@
#include "DateComponents.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
+#include "InputTypeNames.h"
#include <wtf/PassOwnPtr.h>
#if ENABLE(INPUT_TYPE_WEEK)
diff --git a/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index 5414bad09..ef754f597 100644
--- a/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -508,40 +508,80 @@ void CanvasRenderingContext2D::setShadowColor(const String& color)
applyShadow();
}
-const DashArray* CanvasRenderingContext2D::webkitLineDash() const
+const Vector<float>& CanvasRenderingContext2D::getLineDash() const
{
- return &state().m_lineDash;
+ return state().m_lineDash;
}
-void CanvasRenderingContext2D::setWebkitLineDash(const DashArray& dash)
+static bool lineDashSequenceIsValid(const Vector<float>& dash)
{
- if (state().m_lineDash == dash)
+ for (size_t i = 0; i < dash.size(); i++) {
+ if (!isfinite(dash[i]) || dash[i] < 0)
+ return false;
+ }
+ return true;
+}
+
+void CanvasRenderingContext2D::setLineDash(const Vector<float>& dash)
+{
+ if (!lineDashSequenceIsValid(dash))
return;
+
realizeSaves();
modifiableState().m_lineDash = dash;
- GraphicsContext* c = drawingContext();
- if (!c)
+ // Spec requires the concatenation of two copies the dash list when the
+ // number of elements is odd
+ if (dash.size() % 2)
+ modifiableState().m_lineDash.append(dash);
+
+ applyLineDash();
+}
+
+void CanvasRenderingContext2D::setWebkitLineDash(const Vector<float>& dash)
+{
+ if (!lineDashSequenceIsValid(dash))
return;
- c->setLineDash(state().m_lineDash, state().m_lineDashOffset);
+
+ realizeSaves();
+ modifiableState().m_lineDash = dash;
+
+ applyLineDash();
}
-float CanvasRenderingContext2D::webkitLineDashOffset() const
+float CanvasRenderingContext2D::lineDashOffset() const
{
return state().m_lineDashOffset;
}
-void CanvasRenderingContext2D::setWebkitLineDashOffset(float offset)
+void CanvasRenderingContext2D::setLineDashOffset(float offset)
{
- if (!isfinite(offset))
- return;
- if (state().m_lineDashOffset == offset)
+ if (!isfinite(offset) || state().m_lineDashOffset == offset)
return;
+
realizeSaves();
modifiableState().m_lineDashOffset = offset;
+ applyLineDash();
+}
+
+float CanvasRenderingContext2D::webkitLineDashOffset() const
+{
+ return lineDashOffset();
+}
+
+void CanvasRenderingContext2D::setWebkitLineDashOffset(float offset)
+{
+ setLineDashOffset(offset);
+}
+
+void CanvasRenderingContext2D::applyLineDash() const
+{
GraphicsContext* c = drawingContext();
if (!c)
return;
- c->setLineDash(state().m_lineDash, state().m_lineDashOffset);
+ DashArray convertedLineDash(state().m_lineDash.size());
+ for (size_t i = 0; i < state().m_lineDash.size(); ++i)
+ convertedLineDash[i] = static_cast<DashArrayElement>(state().m_lineDash[i]);
+ c->setLineDash(convertedLineDash, state().m_lineDashOffset);
}
float CanvasRenderingContext2D::globalAlpha() const
@@ -2026,7 +2066,7 @@ String CanvasRenderingContext2D::font() const
void CanvasRenderingContext2D::setFont(const String& newFont)
{
RefPtr<StylePropertySet> parsedStyle = StylePropertySet::create();
- CSSParser(strictToCSSParserMode(!m_usesCSSCompatibilityParseMode)).parseDeclaration(parsedStyle.get(), "font:" + newFont, 0, 0);
+ CSSParser::parseValue(parsedStyle.get(), CSSPropertyFont, newFont, true, strictToCSSParserMode(!m_usesCSSCompatibilityParseMode), 0);
if (parsedStyle->isEmpty())
return;
diff --git a/Source/WebCore/html/canvas/CanvasRenderingContext2D.h b/Source/WebCore/html/canvas/CanvasRenderingContext2D.h
index cc6d5e80e..95d6d0e43 100644
--- a/Source/WebCore/html/canvas/CanvasRenderingContext2D.h
+++ b/Source/WebCore/html/canvas/CanvasRenderingContext2D.h
@@ -84,9 +84,12 @@ public:
float miterLimit() const;
void setMiterLimit(float);
- const DashArray* webkitLineDash() const;
- void setWebkitLineDash(const DashArray&);
+ const Vector<float>& getLineDash() const;
+ void setLineDash(const Vector<float>&);
+ void setWebkitLineDash(const Vector<float>&);
+ float lineDashOffset() const;
+ void setLineDashOffset(float);
float webkitLineDashOffset() const;
void setWebkitLineDashOffset(float);
@@ -250,7 +253,7 @@ private:
CompositeOperator m_globalComposite;
AffineTransform m_transform;
bool m_invertibleCTM;
- DashArray m_lineDash;
+ Vector<float> m_lineDash;
float m_lineDashOffset;
bool m_imageSmoothingEnabled;
@@ -276,6 +279,7 @@ private:
State& modifiableState() { ASSERT(!m_unrealizedSaveCount); return m_stateStack.last(); }
const State& state() const { return m_stateStack.last(); }
+ void applyLineDash() const;
void setShadow(const FloatSize& offset, float blur, RGBA32 color);
void applyShadow();
bool shouldDrawShadows() const;
diff --git a/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl b/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl
index cffa8dab9..a8569487a 100644
--- a/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl
+++ b/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl
@@ -74,6 +74,10 @@ module html {
attribute float shadowBlur;
attribute [TreatNullAs=NullString] DOMString shadowColor;
+ void setLineDash(in sequence<float> dash);
+ sequence<float> getLineDash();
+ attribute float lineDashOffset;
+
// FIXME: These attributes should also be implemented for V8.
#if !(defined(V8_BINDING) && V8_BINDING)
attribute [Custom] Array webkitLineDash;
diff --git a/Source/WebCore/html/parser/HTMLPreloadScanner.cpp b/Source/WebCore/html/parser/HTMLPreloadScanner.cpp
index 38061ff6f..a75b52e35 100644
--- a/Source/WebCore/html/parser/HTMLPreloadScanner.cpp
+++ b/Source/WebCore/html/parser/HTMLPreloadScanner.cpp
@@ -30,11 +30,11 @@
#include "CachedResourceLoader.h"
#include "Document.h"
-#include "InputType.h"
#include "HTMLDocumentParser.h"
#include "HTMLTokenizer.h"
#include "HTMLNames.h"
#include "HTMLParserIdioms.h"
+#include "InputTypeNames.h"
#include "LinkRelAttribute.h"
#include "MediaList.h"
#include "MediaQueryEvaluator.h"
diff --git a/Source/WebCore/html/shadow/DateTimeEditElement.cpp b/Source/WebCore/html/shadow/DateTimeEditElement.cpp
index 7ee8216c7..11c162072 100644
--- a/Source/WebCore/html/shadow/DateTimeEditElement.cpp
+++ b/Source/WebCore/html/shadow/DateTimeEditElement.cpp
@@ -80,7 +80,7 @@ DateTimeEditBuilder::DateTimeEditBuilder(DateTimeEditElement& elemnt, const Step
bool DateTimeEditBuilder::build(const String& formatString)
{
- m_editElement.resetLayout();
+ m_editElement.resetFields();
return DateTimeFormat::parse(formatString, *this);
}
@@ -282,8 +282,9 @@ DateTimeFieldElement* DateTimeEditElement::focusedField() const
size_t DateTimeEditElement::focusedFieldIndex() const
{
+ Node* const focusedFieldNode = document()->focusedNode();
for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex) {
- if (m_fields[fieldIndex]->focused())
+ if (m_fields[fieldIndex] == focusedFieldNode)
return fieldIndex;
}
return invalidFieldIndex;
@@ -343,12 +344,11 @@ void DateTimeEditElement::layout(const StepRange& stepRange, const DateComponent
DateTimeEditBuilder builder(*this, stepRange, dateValue);
const String dateTimeFormat = builder.needSecondField() ? localizedTimeFormatText() : localizedShortTimeFormatText();
- if (!builder.build(dateTimeFormat) || m_fields.isEmpty())
+ Node* lastChildToBeRemoved = lastChild();
+ if (!builder.build(dateTimeFormat) || m_fields.isEmpty()) {
+ lastChildToBeRemoved = lastChild();
builder.build(builder.needSecondField() ? "HH:mm:ss" : "HH:mm");
-
- RefPtr<SpinButtonElement> spinButton = SpinButtonElement::create(document(), *this);
- m_spinButton = spinButton.get();
- appendChild(spinButton);
+ }
if (focusedFieldIndex != invalidFieldIndex) {
for (size_t fieldIndex = 0; fieldIndex < m_fields.size(); ++fieldIndex) {
@@ -360,6 +360,18 @@ void DateTimeEditElement::layout(const StepRange& stepRange, const DateComponent
if (DateTimeFieldElement* field = fieldAt(std::min(focusedFieldIndex, m_fields.size() - 1)))
field->focus();
}
+
+ if (lastChildToBeRemoved) {
+ for (Node* childNode = firstChild(); childNode; childNode = firstChild()) {
+ removeChild(childNode);
+ if (childNode == lastChildToBeRemoved)
+ break;
+ }
+ }
+
+ RefPtr<SpinButtonElement> spinButton = SpinButtonElement::create(document(), *this);
+ m_spinButton = spinButton.get();
+ appendChild(spinButton);
}
void DateTimeEditElement::readOnlyStateChanged()
@@ -367,11 +379,9 @@ void DateTimeEditElement::readOnlyStateChanged()
updateUIState();
}
-void DateTimeEditElement::resetLayout()
+void DateTimeEditElement::resetFields()
{
m_fields.shrink(0);
- m_spinButton = 0;
- removeChildren();
}
void DateTimeEditElement::defaultEventHandler(Event* event)
diff --git a/Source/WebCore/html/shadow/DateTimeEditElement.h b/Source/WebCore/html/shadow/DateTimeEditElement.h
index 10c466487..8e6eb11ce 100644
--- a/Source/WebCore/html/shadow/DateTimeEditElement.h
+++ b/Source/WebCore/html/shadow/DateTimeEditElement.h
@@ -68,7 +68,7 @@ public:
void focusByOwner();
void readOnlyStateChanged();
void removeEditControlOwner() { m_editControlOwner = 0; }
- void resetLayout();
+ void resetFields();
void setEmptyValue(const StepRange&, const DateComponents& dateForReadOnlyField);
void setValueAsDate(const StepRange&, const DateComponents&);
double valueAsDouble() const;
diff --git a/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp b/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp
index 6b3913bb6..c0cf0a0b1 100644
--- a/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp
+++ b/Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp
@@ -29,13 +29,17 @@
#if ENABLE(VIDEO)
#include "MediaControlRootElementChromium.h"
+#include "CSSValueKeywords.h"
#include "HTMLDivElement.h"
#include "HTMLMediaElement.h"
#include "HTMLNames.h"
#include "MediaControlElements.h"
#include "MouseEvent.h"
#include "Page.h"
+#include "RenderMedia.h"
#include "RenderTheme.h"
+#include "RenderView.h"
+#include "StyleResolver.h"
#include "Text.h"
#if ENABLE(VIDEO_TRACK)
@@ -59,6 +63,69 @@ MediaControlElementType MediaControlChromiumEnclosureElement::displayType() cons
return MediaControlsPanel;
}
+
+class RenderMediaControlPanelEnclosureElement : public RenderBlock {
+public:
+ RenderMediaControlPanelEnclosureElement(Node*);
+
+private:
+ virtual void layout() OVERRIDE;
+};
+
+RenderMediaControlPanelEnclosureElement::RenderMediaControlPanelEnclosureElement(Node* node)
+ : RenderBlock(node)
+{
+}
+
+static const int hideTimeDisplayWidth = 350;
+static const int hideVolumeDisplayWidth = 275;
+static const int hideMuteButtonWidth = 210;
+static const int hideFullscreenButtonWidth = 150;
+static const int hideTimelineWidth = 100;
+
+void RenderMediaControlPanelEnclosureElement::layout()
+{
+ HTMLMediaElement* mediaElement = toParentMediaElement(this);
+ if (!mediaElement || !mediaElement->renderer())
+ return;
+
+ float mediaWidthFloat = toRenderMedia(mediaElement->renderer())->contentBoxRect().width().toFloat();
+ int mediaWidth = round(adjustFloatForAbsoluteZoom(mediaWidthFloat, style()));
+
+ MediaControlRootElementChromium* elementShadow = (MediaControlRootElementChromium *) mediaElement->mediaControls();
+
+ if (mediaWidth < hideTimeDisplayWidth)
+ elementShadow->hideTimeDisplay();
+ else
+ elementShadow->showTimeDisplay();
+
+ if (mediaWidth < hideVolumeDisplayWidth)
+ elementShadow->hideVolumeSlider();
+ else
+ elementShadow->showVolumeSlider();
+
+ if (mediaWidth < hideMuteButtonWidth)
+ elementShadow->hideMuteButton();
+ else
+ elementShadow->showMuteButton();
+
+ if (mediaWidth < hideFullscreenButtonWidth)
+ elementShadow->hideFullscreenButton();
+ else
+ elementShadow->showFullscreenButton();
+
+ if (mediaWidth < hideTimelineWidth)
+ elementShadow->hideTimeline();
+ else
+ elementShadow->showTimeline();
+
+ if (mediaElement->renderer()->isVideo())
+ // Update padding according to video width.
+ static_cast<MediaControlPanelEnclosureElement*>(node())->updatePadding(mediaWidth);
+
+ RenderBlock::layout();
+}
+
MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement(Document* document)
: MediaControlChromiumEnclosureElement(document)
{
@@ -69,12 +136,39 @@ PassRefPtr<MediaControlPanelEnclosureElement> MediaControlPanelEnclosureElement:
return adoptRef(new MediaControlPanelEnclosureElement(document));
}
+RenderObject* MediaControlPanelEnclosureElement::createRenderer(RenderArena* arena, RenderStyle*)
+{
+ return new (arena) RenderMediaControlPanelEnclosureElement(this);
+}
+
const AtomicString& MediaControlPanelEnclosureElement::shadowPseudoId() const
{
DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-enclosure"));
return id;
}
+// Make sure to keep these values in sync with the ones in mediaControlsChromium.css.
+static const int videoControlsHeight = 30;
+static const int maxPadding = 5;
+static const int minPadding = 0;
+static const int minPaddingAtWidth = 160;
+static const int decreaseStep = 60;
+
+void MediaControlPanelEnclosureElement::updatePadding(int mediaWidth)
+{
+ // Scale padding linearly between minPadding and maxPadding depending on mediaWidth.
+ float padding = round((mediaWidth - minPaddingAtWidth) / decreaseStep);
+ if (padding < minPadding)
+ padding = minPadding;
+ else if (padding > maxPadding)
+ padding = maxPadding;
+
+ setInlineStyleProperty(CSSPropertyPaddingRight, padding, CSSPrimitiveValue::CSS_PX);
+ setInlineStyleProperty(CSSPropertyPaddingBottom, padding, CSSPrimitiveValue::CSS_PX);
+ setInlineStyleProperty(CSSPropertyPaddingLeft, padding, CSSPrimitiveValue::CSS_PX);
+ setInlineStyleProperty(CSSPropertyHeight, padding + videoControlsHeight, CSSPrimitiveValue::CSS_PX);
+}
+
MediaControlRootElementChromium::MediaControlRootElementChromium(Document* document)
: MediaControls(document)
, m_mediaController(0)
@@ -94,6 +188,7 @@ MediaControlRootElementChromium::MediaControlRootElementChromium(Document* docum
, m_hideFullscreenControlsTimer(this, &MediaControlRootElementChromium::hideFullscreenControlsTimerFired)
, m_isMouseOverControls(false)
, m_isFullscreen(false)
+ , m_hiddenTimeDisplay(false)
{
}
@@ -257,16 +352,12 @@ void MediaControlRootElementChromium::reset()
float duration = m_mediaController->duration();
m_timeline->setDuration(duration);
- m_timeline->show();
m_durationDisplay->setInnerText(page->theme()->formatMediaControlsTime(duration), ASSERT_NO_EXCEPTION);
m_durationDisplay->setCurrentValue(duration);
- m_timeline->setPosition(m_mediaController->currentTime());
updateTimeDisplay();
- m_panelMuteButton->show();
-
if (m_volumeSlider) {
if (!m_mediaController->hasAudio())
m_volumeSlider->hide();
@@ -283,19 +374,14 @@ void MediaControlRootElementChromium::reset()
m_toggleClosedCaptionsButton->hide();
}
- if (m_mediaController->supportsFullscreen() && m_mediaController->hasVideo())
- m_fullscreenButton->show();
- else
- m_fullscreenButton->hide();
+ showFullscreenButton();
+
makeOpaque();
}
void MediaControlRootElementChromium::playbackStarted()
{
m_playButton->updateDisplayType();
- m_timeline->setPosition(m_mediaController->currentTime());
- m_currentTimeDisplay->show();
- m_durationDisplay->hide();
updateTimeDisplay();
if (m_isFullscreen)
@@ -304,7 +390,6 @@ void MediaControlRootElementChromium::playbackStarted()
void MediaControlRootElementChromium::playbackProgressed()
{
- m_timeline->setPosition(m_mediaController->currentTime());
updateTimeDisplay();
if (!m_isMouseOverControls && m_mediaController->hasVideo())
@@ -314,7 +399,6 @@ void MediaControlRootElementChromium::playbackProgressed()
void MediaControlRootElementChromium::playbackStopped()
{
m_playButton->updateDisplayType();
- m_timeline->setPosition(m_mediaController->currentTime());
updateTimeDisplay();
makeOpaque();
@@ -330,8 +414,8 @@ void MediaControlRootElementChromium::updateTimeDisplay()
if (!page)
return;
- // After seek, hide duration display and show current time.
- if (now > 0) {
+ // After seek or playback start, hide duration display and show current time.
+ if (!m_hiddenTimeDisplay && now > 0) {
m_currentTimeDisplay->show();
m_durationDisplay->hide();
}
@@ -340,6 +424,8 @@ void MediaControlRootElementChromium::updateTimeDisplay()
ExceptionCode ec;
m_currentTimeDisplay->setInnerText(page->theme()->formatMediaControlsCurrentTime(now, duration), ec);
m_currentTimeDisplay->setCurrentValue(now);
+
+ m_timeline->setPosition(m_mediaController->currentTime());
}
void MediaControlRootElementChromium::reportedError()
@@ -478,6 +564,61 @@ void MediaControlRootElementChromium::showVolumeSlider()
m_volumeSlider->show();
}
+void MediaControlRootElementChromium::hideVolumeSlider()
+{
+ m_volumeSlider->hide();
+}
+
+void MediaControlRootElementChromium::showTimeDisplay()
+{
+ m_hiddenTimeDisplay = false;
+ m_durationDisplay->show();
+ updateTimeDisplay();
+}
+
+void MediaControlRootElementChromium::hideTimeDisplay()
+{
+ m_hiddenTimeDisplay = true;
+ m_durationDisplay->hide();
+ m_currentTimeDisplay->hide();
+}
+
+void MediaControlRootElementChromium::showMuteButton()
+{
+ if (!m_mediaController->hasAudio())
+ return;
+
+ m_panelMuteButton->show();
+}
+
+void MediaControlRootElementChromium::hideMuteButton()
+{
+ m_panelMuteButton->hide();
+}
+
+void MediaControlRootElementChromium::showFullscreenButton()
+{
+ if (!m_mediaController->supportsFullscreen() || !m_mediaController->hasVideo())
+ return;
+
+ m_fullscreenButton->show();
+}
+
+void MediaControlRootElementChromium::hideFullscreenButton()
+{
+ m_fullscreenButton->hide();
+}
+
+void MediaControlRootElementChromium::showTimeline()
+{
+ m_timeline->show();
+}
+
+void MediaControlRootElementChromium::hideTimeline()
+{
+ m_timeline->hide();
+}
+
#if ENABLE(VIDEO_TRACK)
void MediaControlRootElementChromium::createTextTrackDisplay()
{
diff --git a/Source/WebCore/html/shadow/MediaControlRootElementChromium.h b/Source/WebCore/html/shadow/MediaControlRootElementChromium.h
index 8c2061233..6879dcbf9 100644
--- a/Source/WebCore/html/shadow/MediaControlRootElementChromium.h
+++ b/Source/WebCore/html/shadow/MediaControlRootElementChromium.h
@@ -74,6 +74,8 @@ private:
class MediaControlPanelEnclosureElement : public MediaControlChromiumEnclosureElement {
public:
static PassRefPtr<MediaControlPanelEnclosureElement> create(Document*);
+ virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;
+ void updatePadding(int mediaWidth);
private:
explicit MediaControlPanelEnclosureElement(Document*);
@@ -109,6 +111,16 @@ public:
void changedClosedCaptionsVisibility();
void showVolumeSlider();
+ void hideVolumeSlider();
+ void showTimeDisplay();
+ void hideTimeDisplay();
+ void showMuteButton();
+ void hideMuteButton();
+ void showFullscreenButton();
+ void hideFullscreenButton();
+ void showTimeline();
+ void hideTimeline();
+
void updateTimeDisplay();
void updateStatusDisplay();
@@ -159,6 +171,7 @@ private:
Timer<MediaControlRootElementChromium> m_hideFullscreenControlsTimer;
bool m_isMouseOverControls;
bool m_isFullscreen;
+ bool m_hiddenTimeDisplay;
};
}
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp
index 41b7bc81a..f50bdd35e 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp
+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp
@@ -451,13 +451,13 @@ InspectorInstrumentationCookie InspectorInstrumentation::willLayoutImpl(Instrume
return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
}
-void InspectorInstrumentation::didLayoutImpl(const InspectorInstrumentationCookie& cookie)
+void InspectorInstrumentation::didLayoutImpl(const InspectorInstrumentationCookie& cookie, RenderObject* root)
{
if (!cookie.first)
return;
if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
- timelineAgent->didLayout();
+ timelineAgent->didLayout(root);
if (InspectorPageAgent* pageAgent = cookie.first->inspectorPageAgent())
pageAgent->didLayout();
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.h b/Source/WebCore/inspector/InspectorInstrumentation.h
index c25d3722b..2a8cefc3c 100644
--- a/Source/WebCore/inspector/InspectorInstrumentation.h
+++ b/Source/WebCore/inspector/InspectorInstrumentation.h
@@ -65,6 +65,7 @@ class InspectorTimelineAgent;
class InstrumentingAgents;
class KURL;
class Node;
+class RenderObject;
class ResourceRequest;
class ResourceResponse;
class ScriptArguments;
@@ -144,7 +145,7 @@ public:
static void didCancelFrame(Page*);
static void didInvalidateLayout(Frame*);
static InspectorInstrumentationCookie willLayout(Frame*);
- static void didLayout(const InspectorInstrumentationCookie&);
+ static void didLayout(const InspectorInstrumentationCookie&, RenderObject*);
static void didScroll(Page*);
static InspectorInstrumentationCookie willLoadXHR(ScriptExecutionContext*, XMLHttpRequest*);
static void didLoadXHR(const InspectorInstrumentationCookie&);
@@ -321,7 +322,7 @@ private:
static void didCancelFrameImpl(InstrumentingAgents*);
static void didInvalidateLayoutImpl(InstrumentingAgents*, Frame*);
static InspectorInstrumentationCookie willLayoutImpl(InstrumentingAgents*, Frame*);
- static void didLayoutImpl(const InspectorInstrumentationCookie&);
+ static void didLayoutImpl(const InspectorInstrumentationCookie&, RenderObject*);
static void didScrollImpl(InstrumentingAgents*);
static InspectorInstrumentationCookie willLoadXHRImpl(InstrumentingAgents*, XMLHttpRequest*, ScriptExecutionContext*);
static void didLoadXHRImpl(const InspectorInstrumentationCookie&);
@@ -833,12 +834,12 @@ inline InspectorInstrumentationCookie InspectorInstrumentation::willLayout(Frame
return InspectorInstrumentationCookie();
}
-inline void InspectorInstrumentation::didLayout(const InspectorInstrumentationCookie& cookie)
+inline void InspectorInstrumentation::didLayout(const InspectorInstrumentationCookie& cookie, RenderObject* root)
{
#if ENABLE(INSPECTOR)
FAST_RETURN_IF_NO_FRONTENDS(void());
if (cookie.first)
- didLayoutImpl(cookie);
+ didLayoutImpl(cookie, root);
#endif
}
diff --git a/Source/WebCore/inspector/InspectorOverlay.cpp b/Source/WebCore/inspector/InspectorOverlay.cpp
index 4fd42da99..5241545e1 100644
--- a/Source/WebCore/inspector/InspectorOverlay.cpp
+++ b/Source/WebCore/inspector/InspectorOverlay.cpp
@@ -385,7 +385,7 @@ void InspectorOverlay::drawRectHighlight()
Highlight highlight;
buildRectHighlight(m_page, m_highlightRect.get(), m_rectHighlightConfig, &highlight);
- evaluateInOverlay("highlightRect", buildObjectForHighlight(m_page->mainFrame()->view(), highlight));
+ evaluateInOverlay("drawRectHighlight", buildObjectForHighlight(m_page->mainFrame()->view(), highlight));
}
void InspectorOverlay::drawPausedInDebuggerMessage()
diff --git a/Source/WebCore/inspector/InspectorTimelineAgent.cpp b/Source/WebCore/inspector/InspectorTimelineAgent.cpp
index ebd7a3551..38410ca6d 100644
--- a/Source/WebCore/inspector/InspectorTimelineAgent.cpp
+++ b/Source/WebCore/inspector/InspectorTimelineAgent.cpp
@@ -46,6 +46,8 @@
#include "InspectorState.h"
#include "InstrumentingAgents.h"
#include "IntRect.h"
+#include "RenderObject.h"
+#include "RenderView.h"
#include "ResourceRequest.h"
#include "ResourceResponse.h"
#include "TimelineRecordFactory.h"
@@ -242,8 +244,14 @@ void InspectorTimelineAgent::willLayout(Frame* frame)
pushCurrentRecord(InspectorObject::create(), TimelineRecordType::Layout, true, frame);
}
-void InspectorTimelineAgent::didLayout()
+void InspectorTimelineAgent::didLayout(RenderObject* root)
{
+ if (m_recordStack.isEmpty())
+ return;
+ LayoutRect rect = root->frame()->view()->contentsToRootView(root->absoluteBoundingBoxRect());
+ TimelineRecordEntry entry = m_recordStack.last();
+ ASSERT(entry.type == TimelineRecordType::Layout);
+ TimelineRecordFactory::addRectData(entry.data.get(), rect);
didCompleteCurrentRecord(TimelineRecordType::Layout);
}
diff --git a/Source/WebCore/inspector/InspectorTimelineAgent.h b/Source/WebCore/inspector/InspectorTimelineAgent.h
index 0ea54e28f..e5b0dc9c2 100644
--- a/Source/WebCore/inspector/InspectorTimelineAgent.h
+++ b/Source/WebCore/inspector/InspectorTimelineAgent.h
@@ -52,6 +52,7 @@ class InspectorPageAgent;
class InspectorState;
class InstrumentingAgents;
class IntRect;
+class RenderObject;
class ResourceRequest;
class ResourceResponse;
@@ -98,7 +99,7 @@ public:
void didInvalidateLayout(Frame*);
void willLayout(Frame*);
- void didLayout();
+ void didLayout(RenderObject*);
void didScheduleStyleRecalculation(Frame*);
void willRecalculateStyle(Frame*);
diff --git a/Source/WebCore/inspector/MemoryInstrumentationImpl.h b/Source/WebCore/inspector/MemoryInstrumentationImpl.h
index 85cbc5e45..9ef0fec14 100644
--- a/Source/WebCore/inspector/MemoryInstrumentationImpl.h
+++ b/Source/WebCore/inspector/MemoryInstrumentationImpl.h
@@ -31,10 +31,10 @@
#ifndef MemoryInstrumentationImpl_h
#define MemoryInstrumentationImpl_h
-#include "MemoryInstrumentation.h"
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
+#include <wtf/MemoryInstrumentation.h>
#include <wtf/Vector.h>
namespace WebCore {
diff --git a/Source/WebCore/inspector/TimelineRecordFactory.cpp b/Source/WebCore/inspector/TimelineRecordFactory.cpp
index 4af5f0257..1af580a57 100644
--- a/Source/WebCore/inspector/TimelineRecordFactory.cpp
+++ b/Source/WebCore/inspector/TimelineRecordFactory.cpp
@@ -173,10 +173,7 @@ PassRefPtr<InspectorObject> TimelineRecordFactory::createReceiveResourceData(con
PassRefPtr<InspectorObject> TimelineRecordFactory::createPaintData(const LayoutRect& rect)
{
RefPtr<InspectorObject> data = InspectorObject::create();
- data->setNumber("x", rect.x());
- data->setNumber("y", rect.y());
- data->setNumber("width", rect.width());
- data->setNumber("height", rect.height());
+ addRectData(data.get(), rect);
return data.release();
}
@@ -209,6 +206,14 @@ PassRefPtr<InspectorObject> TimelineRecordFactory::createAnimationFrameData(int
return data.release();
}
+void TimelineRecordFactory::addRectData(InspectorObject* data, const LayoutRect& rect)
+{
+ data->setNumber("x", rect.x());
+ data->setNumber("y", rect.y());
+ data->setNumber("width", rect.width());
+ data->setNumber("height", rect.height());
+}
+
} // namespace WebCore
#endif // ENABLE(INSPECTOR)
diff --git a/Source/WebCore/inspector/TimelineRecordFactory.h b/Source/WebCore/inspector/TimelineRecordFactory.h
index ea4064a20..f24436abc 100644
--- a/Source/WebCore/inspector/TimelineRecordFactory.h
+++ b/Source/WebCore/inspector/TimelineRecordFactory.h
@@ -77,6 +77,8 @@ namespace WebCore {
static PassRefPtr<InspectorObject> createPaintData(const LayoutRect&);
+ static void addRectData(InspectorObject*, const LayoutRect&);
+
static PassRefPtr<InspectorObject> createDecodeImageData(const String& imageType);
static PassRefPtr<InspectorObject> createResizeImageData(bool shouldCache);
diff --git a/Source/WebCore/inspector/front-end/TimelinePanel.js b/Source/WebCore/inspector/front-end/TimelinePanel.js
index d4c0ce6fe..472ace2dd 100644
--- a/Source/WebCore/inspector/front-end/TimelinePanel.js
+++ b/Source/WebCore/inspector/front-end/TimelinePanel.js
@@ -947,7 +947,8 @@ WebInspector.TimelinePanel.prototype = {
{
var anchor = this._getPopoverAnchor(e.target);
- if (anchor && anchor.row && anchor.row._record.type === "Paint")
+ const recordType = WebInspector.TimelineModel.RecordType;
+ if (anchor && anchor.row && (anchor.row._record.type === recordType.Paint || anchor.row._record.type === recordType.Layout))
this._highlightRect(anchor.row._record);
else
this._hideRectHighlight();
diff --git a/Source/WebCore/inspector/front-end/TimelinePresentationModel.js b/Source/WebCore/inspector/front-end/TimelinePresentationModel.js
index a15ce36f3..d00c7cb5e 100644
--- a/Source/WebCore/inspector/front-end/TimelinePresentationModel.js
+++ b/Source/WebCore/inspector/front-end/TimelinePresentationModel.js
@@ -218,6 +218,12 @@ WebInspector.TimelinePresentationModel.createEventDivider = function(recordType,
return eventDivider;
}
+WebInspector.TimelinePresentationModel._hiddenRecords = { }
+WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel.RecordType.MarkDOMContent] = 1;
+WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel.RecordType.MarkLoad] = 1;
+WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel.RecordType.ScheduleStyleRecalculation] = 1;
+WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel.RecordType.InvalidateLayout] = 1;
+
WebInspector.TimelinePresentationModel.prototype = {
/**
* @param {WebInspector.TimelinePresentationModel.Filter} filter
@@ -278,13 +284,7 @@ WebInspector.TimelinePresentationModel.prototype = {
_innerAddRecord: function(record, parentRecord)
{
const recordTypes = WebInspector.TimelineModel.RecordType;
- const hiddenRecords = [
- recordTypes.MarkDOMContent,
- recordTypes.MarkLoad,
- recordTypes.ScheduleStyleRecalculation,
- recordTypes.InvalidateLayout
- ];
- var isHiddenRecord = hiddenRecords.indexOf(record.type) >= 0;
+ var isHiddenRecord = record.type in WebInspector.TimelinePresentationModel._hiddenRecords;
var connectedToOldRecord = false;
if (record.type === recordTypes.Time)
parentRecord = this._rootRecord;
@@ -788,7 +788,7 @@ WebInspector.TimelinePresentationModel.Record.prototype = {
callSiteStackTraceLabel = WebInspector.UIString("Layout invalidated");
if (this.stackTrace) {
callStackLabel = WebInspector.UIString("Layout forced");
- contentHelper._appendTextRow(WebInspector.UIString("Note"), WebInspector.UIString("Forced synchronous layout is a possible performance bottlenck."));
+ contentHelper._appendTextRow(WebInspector.UIString("Note"), WebInspector.UIString("Forced synchronous layout is a possible performance bottleneck."));
}
break;
case recordTypes.Time:
diff --git a/Source/WebCore/inspector/front-end/treeoutline.js b/Source/WebCore/inspector/front-end/treeoutline.js
index fd02f4e02..814d33160 100644
--- a/Source/WebCore/inspector/front-end/treeoutline.js
+++ b/Source/WebCore/inspector/front-end/treeoutline.js
@@ -623,7 +623,6 @@ TreeElement.prototype = {
set title(x) {
this._title = x;
this._setListItemNodeContent();
- this.didChange();
},
get tooltip() {
@@ -634,7 +633,6 @@ TreeElement.prototype = {
this._tooltip = x;
if (this._listItemNode)
this._listItemNode.title = x ? x : "";
- this.didChange();
},
get hasChildren() {
@@ -656,8 +654,6 @@ TreeElement.prototype = {
this._listItemNode.classList.remove("parent");
this.collapse();
}
-
- this.didChange();
},
get hidden() {
@@ -693,21 +689,6 @@ TreeElement.prototype = {
this.expand();
},
- _fireDidChange: function()
- {
- delete this._didChangeTimeoutIdentifier;
- },
-
- didChange: function()
- {
- if (!this.treeOutline)
- return;
-
- // Prevent telling the TreeOutline multiple times in a row by delaying it with a timeout.
- if (!this._didChangeTimeoutIdentifier)
- this._didChangeTimeoutIdentifier = setTimeout(this._fireDidChange.bind(this), 0);
- },
-
_setListItemNodeContent: function()
{
if (!this._listItemNode)
diff --git a/Source/WebCore/page/FocusController.cpp b/Source/WebCore/page/FocusController.cpp
index 0705c0bfa..a6a91cda6 100644
--- a/Source/WebCore/page/FocusController.cpp
+++ b/Source/WebCore/page/FocusController.cpp
@@ -708,7 +708,7 @@ void FocusController::setContainingWindowIsVisible(bool containingWindowIsVisibl
for (HashSet<ScrollableArea*>::const_iterator it = scrollableAreas->begin(), end = scrollableAreas->end(); it != end; ++it) {
ScrollableArea* scrollableArea = *it;
- ASSERT(scrollableArea->isOnActivePage());
+ ASSERT(scrollableArea->scrollbarsCanBeActive() || m_page->shouldSuppressScrollbarAnimations());
contentAreaDidShowOrHide(scrollableArea, containingWindowIsVisible);
}
diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp
index f4924f121..d6d6c567e 100644
--- a/Source/WebCore/page/FrameView.cpp
+++ b/Source/WebCore/page/FrameView.cpp
@@ -1252,7 +1252,7 @@ void FrameView::layout(bool allowSubtree)
m_actionScheduler->resume();
}
- InspectorInstrumentation::didLayout(cookie);
+ InspectorInstrumentation::didLayout(cookie, root);
m_nestedLayoutCount--;
if (m_nestedLayoutCount)
@@ -2745,14 +2745,22 @@ void FrameView::setVisibleScrollerThumbRect(const IntRect& scrollerThumb)
page->chrome()->client()->notifyScrollerThumbIsVisibleInRect(scrollerThumb);
}
-bool FrameView::isOnActivePage() const
+bool FrameView::scrollbarsCanBeActive() const
{
if (!m_frame)
return false;
+
if (m_frame->view() != this)
return false;
+
+ if (Page* page = m_frame->page()) {
+ if (page->shouldSuppressScrollbarAnimations())
+ return false;
+ }
+
if (Document* document = m_frame->document())
return !document->inPageCache();
+
return false;
}
@@ -2838,7 +2846,7 @@ void FrameView::setAnimatorsAreActive()
for (HashSet<ScrollableArea*>::const_iterator it = m_scrollableAreas->begin(), end = m_scrollableAreas->end(); it != end; ++it) {
ScrollableArea* scrollableArea = *it;
- ASSERT(scrollableArea->isOnActivePage());
+ ASSERT(scrollableArea->scrollbarsCanBeActive());
scrollableArea->scrollAnimator()->setIsActive();
}
}
@@ -2857,7 +2865,7 @@ void FrameView::notifyPageThatContentAreaWillPaint() const
for (HashSet<ScrollableArea*>::const_iterator it = m_scrollableAreas->begin(), end = m_scrollableAreas->end(); it != end; ++it) {
ScrollableArea* scrollableArea = *it;
- if (!scrollableArea->isOnActivePage())
+ if (!scrollableArea->scrollbarsCanBeActive())
continue;
scrollableArea->contentAreaWillPaint();
diff --git a/Source/WebCore/page/FrameView.h b/Source/WebCore/page/FrameView.h
index 0756c4978..ceea73ff5 100644
--- a/Source/WebCore/page/FrameView.h
+++ b/Source/WebCore/page/FrameView.h
@@ -320,6 +320,8 @@ public:
virtual IntPoint currentMousePosition() const;
+ virtual bool scrollbarsCanBeActive() const OVERRIDE;
+
// FIXME: Remove this method once plugin loading is decoupled from layout.
void flushAnyPendingPostLayoutTasks();
@@ -410,7 +412,6 @@ private:
virtual void getTickmarks(Vector<IntRect>&) const OVERRIDE;
virtual void scrollTo(const IntSize&) OVERRIDE;
virtual void setVisibleScrollerThumbRect(const IntRect&) OVERRIDE;
- virtual bool isOnActivePage() const OVERRIDE;
virtual ScrollableArea* enclosingScrollableArea() const OVERRIDE;
virtual IntRect scrollableAreaBoundingBox() const OVERRIDE;
virtual bool scrollAnimatorEnabled() const OVERRIDE;
diff --git a/Source/WebCore/page/Location.idl b/Source/WebCore/page/Location.idl
index 1f1703af6..1bc32a038 100644
--- a/Source/WebCore/page/Location.idl
+++ b/Source/WebCore/page/Location.idl
@@ -40,8 +40,7 @@ module window {
JSCustomDefineOwnProperty,
JSCustomNamedGetterOnPrototype,
JSCustomDefineOwnPropertyOnPrototype,
- OmitConstructor,
- V8CustomToJSObject
+ OmitConstructor
] Location {
#if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
attribute [DoNotCheckSecurityOnSetter, CustomSetter, V8Unforgeable] DOMString href;
diff --git a/Source/WebCore/page/Page.cpp b/Source/WebCore/page/Page.cpp
index 2983808ea..8578d33d2 100644
--- a/Source/WebCore/page/Page.cpp
+++ b/Source/WebCore/page/Page.cpp
@@ -144,6 +144,7 @@ Page::Page(PageClients& pageClients)
, m_mediaVolume(1)
, m_pageScaleFactor(1)
, m_deviceScaleFactor(1)
+ , m_suppressScrollbarAnimations(false)
, m_javaScriptURLsAreAllowed(true)
, m_didLoadUserStyleSheet(false)
, m_userStyleSheetModificationTime(0)
@@ -693,6 +694,46 @@ void Page::setDeviceScaleFactor(float scaleFactor)
pageCache()->markPagesForFullStyleRecalc(this);
}
+void Page::setShouldSuppressScrollbarAnimations(bool suppressAnimations)
+{
+ if (suppressAnimations == m_suppressScrollbarAnimations)
+ return;
+
+ if (!suppressAnimations) {
+ // If animations are not going to be suppressed anymore, then there is nothing to do here but
+ // change the cached value.
+ m_suppressScrollbarAnimations = suppressAnimations;
+ return;
+ }
+
+ // On the other hand, if we are going to start suppressing animations, then we need to make sure we
+ // finish any current scroll animations first.
+ FrameView* view = mainFrame()->view();
+ if (!view)
+ return;
+
+ view->finishCurrentScrollAnimations();
+
+ for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext()) {
+ FrameView* frameView = frame->view();
+ if (!frameView)
+ continue;
+
+ const HashSet<ScrollableArea*>* scrollableAreas = frameView->scrollableAreas();
+ if (!scrollableAreas)
+ continue;
+
+ for (HashSet<ScrollableArea*>::const_iterator it = scrollableAreas->begin(), end = scrollableAreas->end(); it != end; ++it) {
+ ScrollableArea* scrollableArea = *it;
+ ASSERT(scrollableArea->scrollbarsCanBeActive());
+
+ scrollableArea->finishCurrentScrollAnimations();
+ }
+ }
+
+ m_suppressScrollbarAnimations = suppressAnimations;
+}
+
void Page::setPagination(const Pagination& pagination)
{
if (m_pagination == pagination)
diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h
index a218d5d4c..e44b9121d 100644
--- a/Source/WebCore/page/Page.h
+++ b/Source/WebCore/page/Page.h
@@ -247,6 +247,9 @@ namespace WebCore {
float deviceScaleFactor() const { return m_deviceScaleFactor; }
void setDeviceScaleFactor(float);
+ bool shouldSuppressScrollbarAnimations() const { return m_suppressScrollbarAnimations; }
+ void setShouldSuppressScrollbarAnimations(bool suppressAnimations);
+
// Page and FrameView both store a Pagination value. Page::pagination() is set only by API,
// and FrameView::pagination() is set only by CSS. Page::pagination() will affect all
// FrameViews in the page cache, but FrameView::pagination() only affects the current
@@ -396,6 +399,8 @@ namespace WebCore {
float m_pageScaleFactor;
float m_deviceScaleFactor;
+ bool m_suppressScrollbarAnimations;
+
Pagination m_pagination;
bool m_javaScriptURLsAreAllowed;
diff --git a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp b/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
index 1f60151fd..6d584a866 100644
--- a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
@@ -36,6 +36,7 @@
#include "Region.h"
#include "RenderView.h"
#include "ScrollAnimator.h"
+#include "ScrollingTreeState.h"
#include <wtf/MainThread.h>
#if USE(ACCELERATED_COMPOSITING)
@@ -45,7 +46,6 @@
#if ENABLE(THREADED_SCROLLING)
#include "ScrollingThread.h"
#include "ScrollingTree.h"
-#include "ScrollingTreeState.h"
#include <wtf/Functional.h>
#include <wtf/PassRefPtr.h>
#endif
@@ -192,7 +192,7 @@ void ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange(FrameView* fr
if (!coordinatesScrollingForFrameView(frameView))
return;
- updateShouldUpdateScrollLayerPositionOnMainThreadReason();
+ updateShouldUpdateScrollLayerPositionOnMainThread();
}
void ScrollingCoordinator::frameViewFixedObjectsDidChange(FrameView* frameView)
@@ -203,7 +203,7 @@ void ScrollingCoordinator::frameViewFixedObjectsDidChange(FrameView* frameView)
if (!coordinatesScrollingForFrameView(frameView))
return;
- updateShouldUpdateScrollLayerPositionOnMainThreadReason();
+ updateShouldUpdateScrollLayerPositionOnMainThread();
}
static GraphicsLayer* scrollLayerForFrameView(FrameView* frameView)
@@ -232,7 +232,7 @@ void ScrollingCoordinator::frameViewRootLayerDidChange(FrameView* frameView)
frameViewLayoutUpdated(frameView);
recomputeWheelEventHandlerCount();
- updateShouldUpdateScrollLayerPositionOnMainThreadReason();
+ updateShouldUpdateScrollLayerPositionOnMainThread();
setScrollLayer(scrollLayerForFrameView(frameView));
}
@@ -359,7 +359,7 @@ void ScrollingCoordinator::recomputeWheelEventHandlerCount()
setWheelEventHandlerCount(wheelEventHandlerCount);
}
-bool ScrollingCoordinator::hasNonLayerViewportConstrainedObjects(FrameView* frameView)
+bool ScrollingCoordinator::hasNonLayerFixedObjects(FrameView* frameView)
{
const FrameView::ViewportConstrainedObjectSet* viewportConstrainedObjects = frameView->viewportConstrainedObjects();
if (!viewportConstrainedObjects)
@@ -380,26 +380,15 @@ bool ScrollingCoordinator::hasNonLayerViewportConstrainedObjects(FrameView* fram
#endif
}
-void ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThreadReason()
+void ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread()
{
-#if ENABLE(THREADED_SCROLLING)
FrameView* frameView = m_page->mainFrame()->view();
- ReasonForUpdatingScrollLayerPositionOnMainThreadFlags reasonsForUpdatingScrollLayerPositionOnMainThread = (ReasonForUpdatingScrollLayerPositionOnMainThreadFlags)0;
-
- if (m_forceMainThreadScrollLayerPositionUpdates)
- reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::ForcedOnMainThread;
- if (frameView->hasSlowRepaintObjects())
- reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::HasSlowRepaintObjects;
- if (!supportsFixedPositionLayers() && frameView->hasViewportConstrainedObjects())
- reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::HasNonCompositedViewportConstrainedObjects;
- if (supportsFixedPositionLayers() && hasNonLayerViewportConstrainedObjects(frameView))
- reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::HasNonLayerViewportConstrainedObjects;
- if (m_page->mainFrame()->document()->isImageDocument())
- reasonsForUpdatingScrollLayerPositionOnMainThread |= ScrollingTreeState::IsImageDocument;
-
- setShouldUpdateScrollLayerPositionOnMainThreadReason(reasonsForUpdatingScrollLayerPositionOnMainThread);
-#endif
+ setShouldUpdateScrollLayerPositionOnMainThread(m_forceMainThreadScrollLayerPositionUpdates
+ || frameView->hasSlowRepaintObjects()
+ || (!supportsFixedPositionLayers() && frameView->hasViewportConstrainedObjects())
+ || (supportsFixedPositionLayers() && hasNonLayerFixedObjects(frameView))
+ || m_page->mainFrame()->document()->isImageDocument());
}
void ScrollingCoordinator::setForceMainThreadScrollLayerPositionUpdates(bool forceMainThreadScrollLayerPositionUpdates)
@@ -408,7 +397,7 @@ void ScrollingCoordinator::setForceMainThreadScrollLayerPositionUpdates(bool for
return;
m_forceMainThreadScrollLayerPositionUpdates = forceMainThreadScrollLayerPositionUpdates;
- updateShouldUpdateScrollLayerPositionOnMainThreadReason();
+ updateShouldUpdateScrollLayerPositionOnMainThread();
}
#if ENABLE(THREADED_SCROLLING)
@@ -446,18 +435,16 @@ void ScrollingCoordinator::setWheelEventHandlerCount(unsigned wheelEventHandlerC
scheduleTreeStateCommit();
}
-#if ENABLE(THREADED_SCROLLING)
-void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags reasons)
+void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(bool shouldUpdateScrollLayerPositionOnMainThread)
{
// The FrameView's GraphicsLayer is likely to be out-of-synch with the PlatformLayer
// at this point. So we'll update it before we switch back to main thread scrolling
// in order to avoid layer positioning bugs.
- if (reasons)
+ if (shouldUpdateScrollLayerPositionOnMainThread)
updateMainFrameScrollLayerPosition();
- m_scrollingTreeState->setShouldUpdateScrollLayerPositionOnMainThreadReason(reasons);
+ m_scrollingTreeState->setShouldUpdateScrollLayerPositionOnMainThread(shouldUpdateScrollLayerPositionOnMainThread);
scheduleTreeStateCommit();
}
-#endif
void ScrollingCoordinator::scheduleTreeStateCommit()
{
diff --git a/Source/WebCore/page/scrolling/ScrollingCoordinator.h b/Source/WebCore/page/scrolling/ScrollingCoordinator.h
index 8bc4b6a75..2ab34b2d2 100644
--- a/Source/WebCore/page/scrolling/ScrollingCoordinator.h
+++ b/Source/WebCore/page/scrolling/ScrollingCoordinator.h
@@ -34,7 +34,6 @@
#include <wtf/Forward.h>
#if ENABLE(THREADED_SCROLLING)
-#include "ScrollingTreeState.h"
#include <wtf/ThreadSafeRefCounted.h>
#include <wtf/Threading.h>
#endif
@@ -132,8 +131,8 @@ private:
explicit ScrollingCoordinator(Page*);
void recomputeWheelEventHandlerCount();
- bool hasNonLayerViewportConstrainedObjects(FrameView*);
- void updateShouldUpdateScrollLayerPositionOnMainThreadReason();
+ bool hasNonLayerFixedObjects(FrameView*);
+ void updateShouldUpdateScrollLayerPositionOnMainThread();
void setScrollLayer(GraphicsLayer*);
void setNonFastScrollableRegion(const Region&);
@@ -156,9 +155,7 @@ private:
void setScrollParameters(const ScrollParameters&);
void setWheelEventHandlerCount(unsigned);
-#if ENABLE(THREADED_SCROLLING)
- void setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags);
-#endif
+ void setShouldUpdateScrollLayerPositionOnMainThread(bool);
void updateMainFrameScrollLayerPosition();
diff --git a/Source/WebCore/page/scrolling/ScrollingCoordinatorNone.cpp b/Source/WebCore/page/scrolling/ScrollingCoordinatorNone.cpp
index 26c6e530e..b09552d86 100644
--- a/Source/WebCore/page/scrolling/ScrollingCoordinatorNone.cpp
+++ b/Source/WebCore/page/scrolling/ScrollingCoordinatorNone.cpp
@@ -67,11 +67,9 @@ void ScrollingCoordinator::setWheelEventHandlerCount(unsigned)
{
}
-#if ENABLE(THREADED_SCROLLING)
-void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags)
+void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(bool)
{
}
-#endif
bool ScrollingCoordinator::supportsFixedPositionLayers() const
{
diff --git a/Source/WebCore/page/scrolling/ScrollingTree.cpp b/Source/WebCore/page/scrolling/ScrollingTree.cpp
index 690ec9225..ba6a52ac7 100644
--- a/Source/WebCore/page/scrolling/ScrollingTree.cpp
+++ b/Source/WebCore/page/scrolling/ScrollingTree.cpp
@@ -224,7 +224,7 @@ void ScrollingTree::setScrollingPerformanceLoggingEnabled(bool flag)
m_scrollingPerformanceLoggingEnabled = flag;
}
-bool ScrollingTree::scrollingPerformanceLoggingEnabled()
+bool ScrollingTree::scrollingPeformanceLoggingEnabled()
{
return m_scrollingPerformanceLoggingEnabled;
}
diff --git a/Source/WebCore/page/scrolling/ScrollingTree.h b/Source/WebCore/page/scrolling/ScrollingTree.h
index 40705a0fc..4120e9eac 100644
--- a/Source/WebCore/page/scrolling/ScrollingTree.h
+++ b/Source/WebCore/page/scrolling/ScrollingTree.h
@@ -98,7 +98,7 @@ public:
#endif
void setScrollingPerformanceLoggingEnabled(bool flag);
- bool scrollingPerformanceLoggingEnabled();
+ bool scrollingPeformanceLoggingEnabled();
private:
explicit ScrollingTree(ScrollingCoordinator*);
diff --git a/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp b/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp
index 150ba7213..28402ce16 100644
--- a/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp
+++ b/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp
@@ -34,7 +34,7 @@ namespace WebCore {
ScrollingTreeNode::ScrollingTreeNode(ScrollingTree* scrollingTree)
: m_scrollingTree(scrollingTree)
- , m_shouldUpdateScrollLayerPositionOnMainThreadReason(0)
+ , m_shouldUpdateScrollLayerPositionOnMainThread(false)
, m_horizontalScrollElasticity(ScrollElasticityNone)
, m_verticalScrollElasticity(ScrollElasticityNone)
, m_hasEnabledHorizontalScrollbar(false)
@@ -56,8 +56,8 @@ void ScrollingTreeNode::update(ScrollingTreeState* state)
if (state->changedProperties() & ScrollingTreeState::ContentsSize)
m_contentsSize = state->contentsSize();
- if (state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThreadReason)
- m_shouldUpdateScrollLayerPositionOnMainThreadReason = state->shouldUpdateScrollLayerPositionOnMainThreadReason();
+ if (state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThread)
+ m_shouldUpdateScrollLayerPositionOnMainThread = state->shouldUpdateScrollLayerPositionOnMainThread();
if (state->changedProperties() & ScrollingTreeState::HorizontalScrollElasticity)
m_horizontalScrollElasticity = state->horizontalScrollElasticity();
diff --git a/Source/WebCore/page/scrolling/ScrollingTreeNode.h b/Source/WebCore/page/scrolling/ScrollingTreeNode.h
index 3cad506cd..f69ae9f41 100644
--- a/Source/WebCore/page/scrolling/ScrollingTreeNode.h
+++ b/Source/WebCore/page/scrolling/ScrollingTreeNode.h
@@ -30,7 +30,6 @@
#include "IntRect.h"
#include "ScrollTypes.h"
-#include "ScrollingTreeState.h"
#include <wtf/PassOwnPtr.h>
namespace WebCore {
@@ -48,7 +47,7 @@ public:
virtual void handleWheelEvent(const PlatformWheelEvent&) = 0;
virtual void setScrollPosition(const IntPoint&) = 0;
- ReasonForUpdatingScrollLayerPositionOnMainThreadFlags shouldUpdateScrollLayerPositionOnMainThreadReason() const { return m_shouldUpdateScrollLayerPositionOnMainThreadReason; }
+ bool shouldUpdateScrollLayerPositionOnMainThread() const { return m_shouldUpdateScrollLayerPositionOnMainThread; }
protected:
explicit ScrollingTreeNode(ScrollingTree*);
@@ -75,7 +74,7 @@ private:
IntSize m_contentsSize;
IntPoint m_scrollOrigin;
- ReasonForUpdatingScrollLayerPositionOnMainThreadFlags m_shouldUpdateScrollLayerPositionOnMainThreadReason;
+ bool m_shouldUpdateScrollLayerPositionOnMainThread;
ScrollElasticity m_horizontalScrollElasticity;
ScrollElasticity m_verticalScrollElasticity;
diff --git a/Source/WebCore/page/scrolling/ScrollingTreeState.cpp b/Source/WebCore/page/scrolling/ScrollingTreeState.cpp
index 2334b5958..5eb53abe6 100644
--- a/Source/WebCore/page/scrolling/ScrollingTreeState.cpp
+++ b/Source/WebCore/page/scrolling/ScrollingTreeState.cpp
@@ -38,7 +38,7 @@ PassOwnPtr<ScrollingTreeState> ScrollingTreeState::create()
ScrollingTreeState::ScrollingTreeState()
: m_changedProperties(0)
, m_wheelEventHandlerCount(0)
- , m_shouldUpdateScrollLayerPositionOnMainThreadReason(0)
+ , m_shouldUpdateScrollLayerPositionOnMainThread(false)
, m_horizontalScrollElasticity(ScrollElasticityNone)
, m_verticalScrollElasticity(ScrollElasticityNone)
, m_hasEnabledHorizontalScrollbar(false)
@@ -88,13 +88,13 @@ void ScrollingTreeState::setWheelEventHandlerCount(unsigned wheelEventHandlerCou
m_changedProperties |= WheelEventHandlerCount;
}
-void ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags reasons)
+void ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThread(bool shouldUpdateScrollLayerPositionOnMainThread)
{
- if ((bool)m_shouldUpdateScrollLayerPositionOnMainThreadReason == (bool)reasons)
+ if (m_shouldUpdateScrollLayerPositionOnMainThread == shouldUpdateScrollLayerPositionOnMainThread)
return;
- m_shouldUpdateScrollLayerPositionOnMainThreadReason = reasons;
- m_changedProperties |= ShouldUpdateScrollLayerPositionOnMainThreadReason;
+ m_shouldUpdateScrollLayerPositionOnMainThread = shouldUpdateScrollLayerPositionOnMainThread;
+ m_changedProperties |= ShouldUpdateScrollLayerPositionOnMainThread;
}
void ScrollingTreeState::setHorizontalScrollElasticity(ScrollElasticity horizontalScrollElasticity)
diff --git a/Source/WebCore/page/scrolling/ScrollingTreeState.h b/Source/WebCore/page/scrolling/ScrollingTreeState.h
index 0f662fd23..3b4a8d68b 100644
--- a/Source/WebCore/page/scrolling/ScrollingTreeState.h
+++ b/Source/WebCore/page/scrolling/ScrollingTreeState.h
@@ -40,8 +40,6 @@
namespace WebCore {
-typedef unsigned ReasonForUpdatingScrollLayerPositionOnMainThreadFlags;
-
// The ScrollingTreeState object keeps track of the current state of scrolling related properties.
// Whenever any properties change, the scrolling coordinator will be informed and will update the state
// and schedule a timer that will clone the new state and send it over to the scrolling thread, avoiding locking.
@@ -56,7 +54,7 @@ public:
ContentsSize = 1 << 1,
NonFastScrollableRegion = 1 << 2,
WheelEventHandlerCount = 1 << 3,
- ShouldUpdateScrollLayerPositionOnMainThreadReason = 1 << 4,
+ ShouldUpdateScrollLayerPositionOnMainThread = 1 << 4,
HorizontalScrollElasticity = 1 << 5,
VerticalScrollElasticity = 1 << 6,
HasEnabledHorizontalScrollbar = 1 << 7,
@@ -68,14 +66,6 @@ public:
RequestedScrollPosition = 1 << 13,
};
- enum ReasonForUpdatingScrollLayerPositionOnMainThread {
- ForcedOnMainThread = 1 << 0,
- HasSlowRepaintObjects = 1 << 1,
- HasNonCompositedViewportConstrainedObjects = 1 << 2,
- HasNonLayerViewportConstrainedObjects = 1 << 3,
- IsImageDocument = 1 << 4
- };
-
bool hasChangedProperties() const { return m_changedProperties; }
unsigned changedProperties() const { return m_changedProperties; }
@@ -91,8 +81,8 @@ public:
unsigned wheelEventHandlerCount() const { return m_wheelEventHandlerCount; }
void setWheelEventHandlerCount(unsigned);
- ReasonForUpdatingScrollLayerPositionOnMainThreadFlags shouldUpdateScrollLayerPositionOnMainThreadReason() const { return m_shouldUpdateScrollLayerPositionOnMainThreadReason; }
- void setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags);
+ bool shouldUpdateScrollLayerPositionOnMainThread() const { return m_shouldUpdateScrollLayerPositionOnMainThread; }
+ void setShouldUpdateScrollLayerPositionOnMainThread(bool);
ScrollElasticity horizontalScrollElasticity() const { return m_horizontalScrollElasticity; }
void setHorizontalScrollElasticity(ScrollElasticity);
@@ -136,7 +126,7 @@ private:
unsigned m_wheelEventHandlerCount;
- ReasonForUpdatingScrollLayerPositionOnMainThreadFlags m_shouldUpdateScrollLayerPositionOnMainThreadReason;
+ bool m_shouldUpdateScrollLayerPositionOnMainThread;
ScrollElasticity m_horizontalScrollElasticity;
ScrollElasticity m_verticalScrollElasticity;
diff --git a/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp b/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp
index 807decb5f..ef03b989c 100644
--- a/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp
+++ b/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp
@@ -223,15 +223,13 @@ void ScrollingCoordinator::setWheelEventHandlerCount(unsigned wheelEventHandlerC
m_private->scrollLayer()->setHaveWheelEventHandlers(wheelEventHandlerCount > 0);
}
-#if ENABLE(THREADED_SCROLLING)
-void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThreadReason(ReasonForUpdatingScrollLayerPositionOnMainThreadFlags reasons)
+void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(bool should)
{
// We won't necessarily get a setScrollLayer() call before this one, so grab the root ourselves.
setScrollLayer(scrollLayerForFrameView(m_page->mainFrame()->view()));
if (m_private->scrollLayer())
- m_private->scrollLayer()->setShouldScrollOnMainThread(reasons);
+ m_private->scrollLayer()->setShouldScrollOnMainThread(should);
}
-#endif
bool ScrollingCoordinator::supportsFixedPositionLayers() const
{
diff --git a/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm b/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm
index 101bbd002..4a6401ca5 100644
--- a/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm
+++ b/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm
@@ -62,7 +62,7 @@ void ScrollingTree::updateDebugRootLayer()
RetainPtr<CGColorRef> backgroundColor;
- if (m_rootNode->shouldUpdateScrollLayerPositionOnMainThreadReason())
+ if (m_rootNode->shouldUpdateScrollLayerPositionOnMainThread())
backgroundColor = adoptCF(CGColorCreateGenericRGB(1, 0, 0, .7));
{
diff --git a/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm b/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm
index 1194f8981..2e170cc78 100644
--- a/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm
+++ b/Source/WebCore/page/scrolling/mac/ScrollingTreeNodeMac.mm
@@ -37,13 +37,9 @@
#include <wtf/CurrentTime.h>
#include <wtf/Deque.h>
-#include <wtf/text/StringBuilder.h>
-#include <wtf/text/CString.h>
namespace WebCore {
-static void logThreadedScrollingMode(unsigned reasonsForUpdatingScrollLayerPositionOnMainThread);
-
PassOwnPtr<ScrollingTreeNode> ScrollingTreeNode::create(ScrollingTree* scrollingTree)
{
return adoptPtr(new ScrollingTreeNodeMac(scrollingTree));
@@ -74,22 +70,15 @@ void ScrollingTreeNodeMac::update(ScrollingTreeState* state)
if (state->changedProperties() & (ScrollingTreeState::ScrollLayer | ScrollingTreeState::ContentsSize | ScrollingTreeState::ViewportRect))
updateMainFramePinState(scrollPosition());
- if ((state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThreadReason)) {
- unsigned reasonsForUpdatingScrollLayerPositionOnMainThread = this->shouldUpdateScrollLayerPositionOnMainThreadReason();
-
- if (reasonsForUpdatingScrollLayerPositionOnMainThread) {
- // We're transitioning to the slow "update scroll layer position on the main thread" mode.
- // Initialize the probable main thread scroll position with the current scroll layer position.
- if (state->changedProperties() & ScrollingTreeState::RequestedScrollPosition)
- m_probableMainThreadScrollPosition = state->requestedScrollPosition();
- else {
- CGPoint scrollLayerPosition = m_scrollLayer.get().position;
- m_probableMainThreadScrollPosition = IntPoint(-scrollLayerPosition.x, -scrollLayerPosition.y);
- }
+ if ((state->changedProperties() & ScrollingTreeState::ShouldUpdateScrollLayerPositionOnMainThread) && shouldUpdateScrollLayerPositionOnMainThread()) {
+ // We're transitioning to the slow "update scroll layer position on the main thread" mode.
+ // Initialize the probable main thread scroll position with the current scroll layer position.
+ if (state->changedProperties() & ScrollingTreeState::RequestedScrollPosition)
+ m_probableMainThreadScrollPosition = state->requestedScrollPosition();
+ else {
+ CGPoint scrollLayerPosition = m_scrollLayer.get().position;
+ m_probableMainThreadScrollPosition = IntPoint(-scrollLayerPosition.x, -scrollLayerPosition.y);
}
-
- if (scrollingTree()->scrollingPerformanceLoggingEnabled())
- logThreadedScrollingMode(reasonsForUpdatingScrollLayerPositionOnMainThread);
}
}
@@ -236,7 +225,7 @@ void ScrollingTreeNodeMac::stopSnapRubberbandTimer()
IntPoint ScrollingTreeNodeMac::scrollPosition() const
{
- if (shouldUpdateScrollLayerPositionOnMainThreadReason())
+ if (shouldUpdateScrollLayerPositionOnMainThread())
return m_probableMainThreadScrollPosition;
CGPoint scrollLayerPosition = m_scrollLayer.get().position;
@@ -251,7 +240,7 @@ void ScrollingTreeNodeMac::setScrollPosition(const IntPoint& scrollPosition)
setScrollPositionWithoutContentEdgeConstraints(newScrollPosition);
- if (scrollingTree()->scrollingPerformanceLoggingEnabled())
+ if (scrollingTree()->scrollingPeformanceLoggingEnabled())
logExposedUnfilledArea();
}
@@ -259,7 +248,7 @@ void ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints(const
{
updateMainFramePinState(scrollPosition);
- if (shouldUpdateScrollLayerPositionOnMainThreadReason()) {
+ if (shouldUpdateScrollLayerPositionOnMainThread()) {
m_probableMainThreadScrollPosition = scrollPosition;
scrollingTree()->updateMainFrameScrollPositionAndScrollLayerPosition(scrollPosition);
return;
@@ -271,7 +260,7 @@ void ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints(const
void ScrollingTreeNodeMac::setScrollLayerPosition(const IntPoint& position)
{
- ASSERT(!shouldUpdateScrollLayerPositionOnMainThreadReason());
+ ASSERT(!shouldUpdateScrollLayerPositionOnMainThread());
m_scrollLayer.get().position = CGPointMake(-position.x() + scrollOrigin().x(), -position.y() + scrollOrigin().y());
}
@@ -341,30 +330,6 @@ void ScrollingTreeNodeMac::logExposedUnfilledArea()
WTFLogAlways("SCROLLING: Exposed tileless area. Time: %f Unfilled Pixels: %u\n", WTF::monotonicallyIncreasingTime(), unfilledArea);
}
-static void logThreadedScrollingMode(unsigned reasonsForUpdatingScrollLayerPositionOnMainThread)
-{
- if (reasonsForUpdatingScrollLayerPositionOnMainThread) {
- StringBuilder reasonsDescription;
-
- if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::ForcedOnMainThread)
- reasonsDescription.append("forced,");
- if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::HasSlowRepaintObjects)
- reasonsDescription.append("slow-repaint objects,");
- if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::HasNonCompositedViewportConstrainedObjects)
- reasonsDescription.append("viewport-constrained objects,");
- if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::HasNonLayerViewportConstrainedObjects)
- reasonsDescription.append("non-layer viewport-constrained objects,");
- if (reasonsForUpdatingScrollLayerPositionOnMainThread & ScrollingTreeState::IsImageDocument)
- reasonsDescription.append("image document,");
-
- // Strip the trailing comma.
- String reasonsDescriptionTrimmed = reasonsDescription.toString().left(reasonsDescription.length() - 1);
-
- WTFLogAlways("SCROLLING: Switching to main-thread scrolling mode. Time: %f Reason(s): %s\n", WTF::monotonicallyIncreasingTime(), reasonsDescriptionTrimmed.ascii().data());
- } else
- WTFLogAlways("SCROLLING: Switching to threaded scrolling mode. Time: %f\n", WTF::monotonicallyIncreasingTime());
-}
-
} // namespace WebCore
#endif // ENABLE(THREADED_SCROLLING)
diff --git a/Source/WebCore/platform/LocalizedStrings.cpp b/Source/WebCore/platform/LocalizedStrings.cpp
index 01734e1ff..5a7ddf8ba 100644
--- a/Source/WebCore/platform/LocalizedStrings.cpp
+++ b/Source/WebCore/platform/LocalizedStrings.cpp
@@ -676,12 +676,12 @@ String crashedPluginText()
String blockedPluginByContentSecurityPolicyText()
{
- return WEB_UI_STRING("Blocked Plug-in", "Label text to be used if plugin is blocked by a page's Content Security Policy");
+ return WEB_UI_STRING_KEY("Blocked Plug-in", "Blocked Plug-In (Blocked by page's Content Security Policy)", "Label text to be used if plugin is blocked by a page's Content Security Policy");
}
String insecurePluginVersionText()
{
- return WEB_UI_STRING("Blocked Plug-in", "Label text to be used when an insecure plug-in version was blocked from loading");
+ return WEB_UI_STRING_KEY("Blocked Plug-in", "Blocked Plug-In (Insecure plug-in)", "Label text to be used when an insecure plug-in version was blocked from loading");
}
String multipleFileUploadText(unsigned numberOfFiles)
diff --git a/Source/WebCore/platform/ScrollAnimator.h b/Source/WebCore/platform/ScrollAnimator.h
index 0c5f32c05..ebef189f3 100644
--- a/Source/WebCore/platform/ScrollAnimator.h
+++ b/Source/WebCore/platform/ScrollAnimator.h
@@ -83,6 +83,8 @@ public:
virtual void contentAreaDidShow() const { }
virtual void contentAreaDidHide() const { }
+ virtual void finishCurrentScrollAnimations() { }
+
virtual void didAddVerticalScrollbar(Scrollbar*) { }
virtual void willRemoveVerticalScrollbar(Scrollbar*) { }
virtual void didAddHorizontalScrollbar(Scrollbar*) { }
diff --git a/Source/WebCore/platform/ScrollableArea.cpp b/Source/WebCore/platform/ScrollableArea.cpp
index b4e7e5591..69bd4f1ea 100644
--- a/Source/WebCore/platform/ScrollableArea.cpp
+++ b/Source/WebCore/platform/ScrollableArea.cpp
@@ -256,6 +256,12 @@ void ScrollableArea::contentAreaDidHide() const
scrollAnimator->contentAreaDidHide();
}
+void ScrollableArea::finishCurrentScrollAnimations() const
+{
+ if (ScrollAnimator* scrollAnimator = existingScrollAnimator())
+ scrollAnimator->finishCurrentScrollAnimations();
+}
+
void ScrollableArea::didAddVerticalScrollbar(Scrollbar* scrollbar)
{
scrollAnimator()->didAddVerticalScrollbar(scrollbar);
diff --git a/Source/WebCore/platform/ScrollableArea.h b/Source/WebCore/platform/ScrollableArea.h
index ce255b1b6..c744af6f0 100644
--- a/Source/WebCore/platform/ScrollableArea.h
+++ b/Source/WebCore/platform/ScrollableArea.h
@@ -81,6 +81,8 @@ public:
void contentAreaDidShow() const;
void contentAreaDidHide() const;
+ void finishCurrentScrollAnimations() const;
+
void didAddVerticalScrollbar(Scrollbar*);
void willRemoveVerticalScrollbar(Scrollbar*);
virtual void didAddHorizontalScrollbar(Scrollbar*);
@@ -147,7 +149,7 @@ public:
virtual void scrollbarStyleChanged(int /*newStyle*/, bool /*forceUpdate*/) { }
virtual void setVisibleScrollerThumbRect(const IntRect&) { }
- virtual bool isOnActivePage() const = 0;
+ virtual bool scrollbarsCanBeActive() const = 0;
// Note that this only returns scrollable areas that can actually be scrolled.
virtual ScrollableArea* enclosingScrollableArea() const = 0;
diff --git a/Source/WebCore/platform/chromium/FramelessScrollView.cpp b/Source/WebCore/platform/chromium/FramelessScrollView.cpp
index c410677cb..b9f8b3ae9 100644
--- a/Source/WebCore/platform/chromium/FramelessScrollView.cpp
+++ b/Source/WebCore/platform/chromium/FramelessScrollView.cpp
@@ -63,7 +63,7 @@ ScrollableArea* FramelessScrollView::enclosingScrollableArea() const
return 0;
}
-bool FramelessScrollView::isOnActivePage() const
+bool FramelessScrollView::scrollbarsCanBeActive() const
{
return isActive();
}
diff --git a/Source/WebCore/platform/chromium/FramelessScrollView.h b/Source/WebCore/platform/chromium/FramelessScrollView.h
index ac1eecd1c..d64d2cdfd 100644
--- a/Source/WebCore/platform/chromium/FramelessScrollView.h
+++ b/Source/WebCore/platform/chromium/FramelessScrollView.h
@@ -77,7 +77,7 @@ namespace WebCore {
virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE;
virtual bool isActive() const OVERRIDE;
virtual ScrollableArea* enclosingScrollableArea() const OVERRIDE;
- virtual bool isOnActivePage() const OVERRIDE;
+ virtual bool scrollbarsCanBeActive() const OVERRIDE;
virtual IntRect scrollableAreaBoundingBox() const OVERRIDE;
// Widget public methods:
diff --git a/Source/WebCore/platform/chromium/PlatformSupport.h b/Source/WebCore/platform/chromium/PlatformSupport.h
index 6e7949e8a..5b02dbf2c 100644
--- a/Source/WebCore/platform/chromium/PlatformSupport.h
+++ b/Source/WebCore/platform/chromium/PlatformSupport.h
@@ -51,7 +51,6 @@ typedef NPP_t* NPP;
#if OS(DARWIN)
typedef struct CGFont* CGFontRef;
-typedef uintptr_t ATSFontContainerRef;
#ifdef __OBJC__
@class NSFont;
#else
diff --git a/Source/WebCore/platform/chromium/TraceEvent.h b/Source/WebCore/platform/chromium/TraceEvent.h
index 89ef85ecd..454f9e9c8 100644
--- a/Source/WebCore/platform/chromium/TraceEvent.h
+++ b/Source/WebCore/platform/chromium/TraceEvent.h
@@ -403,18 +403,18 @@
// ASYNC_BEGIN event above. The |step| param identifies this step within the
// async event. This should be called at the beginning of the next phase of an
// asynchronous operation.
-#define TRACE_EVENT_ASYNC_BEGIN_STEP0(category, name, id, step) \
+#define TRACE_EVENT_ASYNC_STEP0(category, name, id, step) \
INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP, \
category, name, id, TRACE_EVENT_FLAG_NONE, "step", step)
-#define TRACE_EVENT_ASYNC_BEGIN_STEP1(category, name, id, step, \
+#define TRACE_EVENT_ASYNC_STEP1(category, name, id, step, \
arg1_name, arg1_val) \
INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP, \
category, name, id, TRACE_EVENT_FLAG_NONE, "step", step, \
arg1_name, arg1_val)
-#define TRACE_EVENT_COPY_ASYNC_BEGIN_STEP0(category, name, id, step) \
+#define TRACE_EVENT_COPY_ASYNC_STEP0(category, name, id, step) \
INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP, \
category, name, id, TRACE_EVENT_FLAG_COPY, "step", step)
-#define TRACE_EVENT_COPY_ASYNC_BEGIN_STEP1(category, name, id, step, \
+#define TRACE_EVENT_COPY_ASYNC_STEP1(category, name, id, step, \
arg1_name, arg1_val) \
INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_ASYNC_STEP, \
category, name, id, TRACE_EVENT_FLAG_COPY, "step", step, \
diff --git a/Source/WebCore/platform/efl/RenderThemeEfl.cpp b/Source/WebCore/platform/efl/RenderThemeEfl.cpp
index f3dc54c98..4fa1274da 100644
--- a/Source/WebCore/platform/efl/RenderThemeEfl.cpp
+++ b/Source/WebCore/platform/efl/RenderThemeEfl.cpp
@@ -31,7 +31,7 @@
#include "FontDescription.h"
#include "GraphicsContext.h"
#include "HTMLInputElement.h"
-#include "InputType.h"
+#include "InputTypeNames.h"
#include "NotImplemented.h"
#include "Page.h"
#include "PaintInfo.h"
diff --git a/Source/WebCore/platform/graphics/DashArray.h b/Source/WebCore/platform/graphics/DashArray.h
index 0516584ae..39596d423 100644
--- a/Source/WebCore/platform/graphics/DashArray.h
+++ b/Source/WebCore/platform/graphics/DashArray.h
@@ -29,11 +29,13 @@
#include <wtf/Vector.h>
#if USE(CG)
-typedef Vector<CGFloat> DashArray;
+typedef CGFloat DashArrayElement;
#elif USE(CAIRO)
-typedef Vector<double> DashArray;
+typedef double DashArrayElement;
#else
-typedef Vector<float> DashArray;
+typedef float DashArrayElement;
#endif
+typedef Vector<DashArrayElement> DashArray;
+
#endif // DashArray_h
diff --git a/Source/WebCore/platform/graphics/FloatPoint.h b/Source/WebCore/platform/graphics/FloatPoint.h
index 90e6c4b6d..58db6bab9 100644
--- a/Source/WebCore/platform/graphics/FloatPoint.h
+++ b/Source/WebCore/platform/graphics/FloatPoint.h
@@ -154,8 +154,8 @@ public:
operator CGPoint() const;
#endif
-#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && OS(DARWIN))
+#if (PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))) \
+ && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)
FloatPoint(const NSPoint&);
operator NSPoint() const;
#endif
diff --git a/Source/WebCore/platform/graphics/FloatRect.h b/Source/WebCore/platform/graphics/FloatRect.h
index 725012fd7..161e2780f 100644
--- a/Source/WebCore/platform/graphics/FloatRect.h
+++ b/Source/WebCore/platform/graphics/FloatRect.h
@@ -199,8 +199,8 @@ public:
operator CGRect() const;
#endif
-#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && OS(DARWIN))
+#if (PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))) \
+ && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)
FloatRect(const NSRect&);
operator NSRect() const;
#endif
diff --git a/Source/WebCore/platform/graphics/FloatSize.h b/Source/WebCore/platform/graphics/FloatSize.h
index b1d72a58d..c029c5a95 100644
--- a/Source/WebCore/platform/graphics/FloatSize.h
+++ b/Source/WebCore/platform/graphics/FloatSize.h
@@ -135,8 +135,9 @@ public:
operator CGSize() const;
#endif
-#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && OS(DARWIN)) || (PLATFORM(QT) && USE(QTKIT))
+#if (PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))) \
+ && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) \
+ || (PLATFORM(QT) && USE(QTKIT))
explicit FloatSize(const NSSize &); // don't do this implicitly since it's lossy
operator NSSize() const;
#endif
diff --git a/Source/WebCore/platform/graphics/IntRect.h b/Source/WebCore/platform/graphics/IntRect.h
index 9a9a7f7e5..eda582d21 100644
--- a/Source/WebCore/platform/graphics/IntRect.h
+++ b/Source/WebCore/platform/graphics/IntRect.h
@@ -231,8 +231,9 @@ public:
operator SkIRect() const;
#endif
-#if (PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)) \
- || (PLATFORM(CHROMIUM) && OS(DARWIN)) || (PLATFORM(QT) && USE(QTKIT))
+#if (PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))) \
+ && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) \
+ || (PLATFORM(QT) && USE(QTKIT))
operator NSRect() const;
#endif
diff --git a/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp b/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp
index f0b265971..b8692633b 100644
--- a/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp
+++ b/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp
@@ -441,6 +441,7 @@ SkBitmap CCRenderSurfaceFilters::apply(const WebKit::WebFilterOperations& filter
paint.setImageFilter(zoomFilter.get());
canvas->saveLayer(0, &paint);
canvas->drawBitmap(state.source(), 0, 0);
+ canvas->restore();
break;
}
case WebKit::WebFilterOperation::FilterTypeBrightness:
diff --git a/Source/WebCore/platform/graphics/gpu/LoopBlinnPathProcessor.cpp b/Source/WebCore/platform/graphics/gpu/LoopBlinnPathProcessor.cpp
index cb4336b6e..a1d667975 100644
--- a/Source/WebCore/platform/graphics/gpu/LoopBlinnPathProcessor.cpp
+++ b/Source/WebCore/platform/graphics/gpu/LoopBlinnPathProcessor.cpp
@@ -69,15 +69,15 @@ namespace {
String valueToString(const FloatRect& arg)
{
StringBuilder builder;
- builder.append("[FloatRect x=");
+ builder.appendLiteral("[FloatRect x=");
builder.append(String::number(arg.x()));
- builder.append(" y=");
+ builder.appendLiteral(" y=");
builder.append(String::number(arg.y()));
- builder.append(" maxX=");
+ builder.appendLiteral(" maxX=");
builder.append(String::number(arg.maxX()));
- builder.append(" maxY=");
+ builder.appendLiteral(" maxY=");
builder.append(String::number(arg.maxY()));
- builder.append("]");
+ builder.append(']');
return builder.toString();
}
#endif
diff --git a/Source/WebCore/platform/graphics/mac/ImageMac.mm b/Source/WebCore/platform/graphics/mac/ImageMac.mm
index bc0bcc522..091f2da23 100644
--- a/Source/WebCore/platform/graphics/mac/ImageMac.mm
+++ b/Source/WebCore/platform/graphics/mac/ImageMac.mm
@@ -89,8 +89,7 @@ CFDataRef BitmapImage::getTIFFRepresentation()
unsigned numValidFrames = images.size();
RetainPtr<CFMutableDataRef> data(AdoptCF, CFDataCreateMutable(0, 0));
- // FIXME: Use type kCGImageTypeIdentifierTIFF constant once is becomes available in the API
- RetainPtr<CGImageDestinationRef> destination(AdoptCF, CGImageDestinationCreateWithData(data.get(), CFSTR("public.tiff"), numValidFrames, 0));
+ RetainPtr<CGImageDestinationRef> destination(AdoptCF, CGImageDestinationCreateWithData(data.get(), kUTTypeTIFF, numValidFrames, 0));
if (!destination)
return 0;
diff --git a/Source/WebCore/platform/leveldb/LevelDBTransaction.cpp b/Source/WebCore/platform/leveldb/LevelDBTransaction.cpp
index 862a5fbfb..26580c210 100644
--- a/Source/WebCore/platform/leveldb/LevelDBTransaction.cpp
+++ b/Source/WebCore/platform/leveldb/LevelDBTransaction.cpp
@@ -485,6 +485,41 @@ void LevelDBTransaction::notifyIteratorsOfTreeChange()
}
}
+PassOwnPtr<LevelDBWriteOnlyTransaction> LevelDBWriteOnlyTransaction::create(LevelDBDatabase* db)
+{
+ return adoptPtr(new LevelDBWriteOnlyTransaction(db));
+}
+
+LevelDBWriteOnlyTransaction::LevelDBWriteOnlyTransaction(LevelDBDatabase* db)
+ : m_db(db)
+ , m_writeBatch(LevelDBWriteBatch::create())
+ , m_finished(false)
+{
+}
+
+LevelDBWriteOnlyTransaction::~LevelDBWriteOnlyTransaction()
+{
+ m_writeBatch->clear();
+}
+
+void LevelDBWriteOnlyTransaction::remove(const LevelDBSlice& key)
+{
+ ASSERT(!m_finished);
+ m_writeBatch->remove(key);
+}
+
+bool LevelDBWriteOnlyTransaction::commit()
+{
+ ASSERT(!m_finished);
+
+ if (!m_db->write(*m_writeBatch))
+ return false;
+
+ m_finished = true;
+ m_writeBatch->clear();
+ return true;
+}
+
} // namespace WebCore
#endif // USE(LEVELDB)
diff --git a/Source/WebCore/platform/leveldb/LevelDBTransaction.h b/Source/WebCore/platform/leveldb/LevelDBTransaction.h
index 6d22850c2..80a335d47 100644
--- a/Source/WebCore/platform/leveldb/LevelDBTransaction.h
+++ b/Source/WebCore/platform/leveldb/LevelDBTransaction.h
@@ -43,6 +43,7 @@
namespace WebCore {
class LevelDBDatabase;
+class LevelDBWriteBatch;
using WTF::AVLTree;
@@ -169,6 +170,22 @@ private:
HashSet<TransactionIterator*> m_iterators;
};
+class LevelDBWriteOnlyTransaction {
+public:
+ static PassOwnPtr<LevelDBWriteOnlyTransaction> create(LevelDBDatabase*);
+
+ ~LevelDBWriteOnlyTransaction();
+ void remove(const LevelDBSlice& key);
+ bool commit();
+
+private:
+ LevelDBWriteOnlyTransaction(LevelDBDatabase*);
+
+ LevelDBDatabase* m_db;
+ OwnPtr<LevelDBWriteBatch> m_writeBatch;
+ bool m_finished;
+};
+
}
#endif // USE(LEVELDB)
diff --git a/Source/WebCore/platform/mac/ScrollAnimatorMac.h b/Source/WebCore/platform/mac/ScrollAnimatorMac.h
index 6d00f259d..75f11d14f 100644
--- a/Source/WebCore/platform/mac/ScrollAnimatorMac.h
+++ b/Source/WebCore/platform/mac/ScrollAnimatorMac.h
@@ -112,6 +112,8 @@ private:
void didEndScrollGesture() const;
void mayBeginScrollGesture() const;
+ virtual void finishCurrentScrollAnimations();
+
virtual void didAddVerticalScrollbar(Scrollbar*);
virtual void willRemoveVerticalScrollbar(Scrollbar*);
virtual void didAddHorizontalScrollbar(Scrollbar*);
diff --git a/Source/WebCore/platform/mac/ScrollAnimatorMac.mm b/Source/WebCore/platform/mac/ScrollAnimatorMac.mm
index a5b512e84..a0fe1b51c 100644
--- a/Source/WebCore/platform/mac/ScrollAnimatorMac.mm
+++ b/Source/WebCore/platform/mac/ScrollAnimatorMac.mm
@@ -263,7 +263,7 @@ static NSSize abs(NSSize size)
if (!_scrollableArea)
return;
- if (!_scrollableArea->isOnActivePage())
+ if (!_scrollableArea->scrollbarsCanBeActive())
return;
_scrollableArea->scrollAnimator()->contentAreaWillPaint();
@@ -739,7 +739,7 @@ void ScrollAnimatorMac::notifyPositionChanged()
void ScrollAnimatorMac::contentAreaWillPaint() const
{
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (isScrollbarOverlayAPIAvailable())
[m_scrollbarPainterController.get() contentAreaWillDraw];
@@ -747,7 +747,7 @@ void ScrollAnimatorMac::contentAreaWillPaint() const
void ScrollAnimatorMac::mouseEnteredContentArea() const
{
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (isScrollbarOverlayAPIAvailable())
[m_scrollbarPainterController.get() mouseEnteredContentArea];
@@ -755,7 +755,7 @@ void ScrollAnimatorMac::mouseEnteredContentArea() const
void ScrollAnimatorMac::mouseExitedContentArea() const
{
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (isScrollbarOverlayAPIAvailable())
[m_scrollbarPainterController.get() mouseExitedContentArea];
@@ -763,7 +763,7 @@ void ScrollAnimatorMac::mouseExitedContentArea() const
void ScrollAnimatorMac::mouseMovedInContentArea() const
{
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (isScrollbarOverlayAPIAvailable())
[m_scrollbarPainterController.get() mouseMovedInContentArea];
@@ -775,7 +775,7 @@ void ScrollAnimatorMac::mouseEnteredScrollbar(Scrollbar* scrollbar) const
if (recommendedScrollerStyle() != NSScrollerStyleLegacy)
return;
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (isScrollbarOverlayAPIAvailable()) {
@@ -792,7 +792,7 @@ void ScrollAnimatorMac::mouseExitedScrollbar(Scrollbar* scrollbar) const
if (recommendedScrollerStyle() != NSScrollerStyleLegacy)
return;
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (isScrollbarOverlayAPIAvailable()) {
@@ -805,7 +805,7 @@ void ScrollAnimatorMac::mouseExitedScrollbar(Scrollbar* scrollbar) const
void ScrollAnimatorMac::willStartLiveResize()
{
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (isScrollbarOverlayAPIAvailable())
[m_scrollbarPainterController.get() startLiveResize];
@@ -813,7 +813,7 @@ void ScrollAnimatorMac::willStartLiveResize()
void ScrollAnimatorMac::contentsResized() const
{
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (isScrollbarOverlayAPIAvailable())
[m_scrollbarPainterController.get() contentAreaDidResize];
@@ -821,7 +821,7 @@ void ScrollAnimatorMac::contentsResized() const
void ScrollAnimatorMac::willEndLiveResize()
{
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (isScrollbarOverlayAPIAvailable())
[m_scrollbarPainterController.get() endLiveResize];
@@ -829,7 +829,7 @@ void ScrollAnimatorMac::willEndLiveResize()
void ScrollAnimatorMac::contentAreaDidShow() const
{
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (isScrollbarOverlayAPIAvailable())
[m_scrollbarPainterController.get() windowOrderedIn];
@@ -837,7 +837,7 @@ void ScrollAnimatorMac::contentAreaDidShow() const
void ScrollAnimatorMac::contentAreaDidHide() const
{
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (isScrollbarOverlayAPIAvailable())
[m_scrollbarPainterController.get() windowOrderedOut];
@@ -845,7 +845,7 @@ void ScrollAnimatorMac::contentAreaDidHide() const
void ScrollAnimatorMac::didBeginScrollGesture() const
{
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (isScrollbarOverlayAPIAvailable())
[m_scrollbarPainterController.get() beginScrollGesture];
@@ -853,7 +853,7 @@ void ScrollAnimatorMac::didBeginScrollGesture() const
void ScrollAnimatorMac::didEndScrollGesture() const
{
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (isScrollbarOverlayAPIAvailable())
[m_scrollbarPainterController.get() endScrollGesture];
@@ -861,7 +861,7 @@ void ScrollAnimatorMac::didEndScrollGesture() const
void ScrollAnimatorMac::mayBeginScrollGesture() const
{
- if (!scrollableArea()->isOnActivePage())
+ if (!scrollableArea()->scrollbarsCanBeActive())
return;
if (!isScrollbarOverlayAPIAvailable())
return;
@@ -870,6 +870,13 @@ void ScrollAnimatorMac::mayBeginScrollGesture() const
[m_scrollbarPainterController.get() contentAreaScrolled];
}
+void ScrollAnimatorMac::finishCurrentScrollAnimations()
+{
+ if (isScrollbarOverlayAPIAvailable()) {
+ [m_scrollbarPainterController.get() hideOverlayScrollers];
+ }
+}
+
void ScrollAnimatorMac::didAddVerticalScrollbar(Scrollbar* scrollbar)
{
if (!isScrollbarOverlayAPIAvailable())
@@ -964,7 +971,7 @@ void ScrollAnimatorMac::notifyContentAreaScrolled()
// This function is called when a page is going into the page cache, but the page
// isn't really scrolling in that case. We should only pass the message on to the
// ScrollbarPainterController when we're really scrolling on an active page.
- if (scrollableArea()->isOnActivePage())
+ if (scrollableArea()->scrollbarsCanBeActive())
sendContentAreaScrolledSoon();
}
@@ -1170,7 +1177,7 @@ void ScrollAnimatorMac::updateScrollerStyle()
if (!isScrollbarOverlayAPIAvailable())
return;
- if (!scrollableArea()->isOnActivePage()) {
+ if (!scrollableArea()->scrollbarsCanBeActive()) {
m_needsScrollerStyleUpdate = true;
return;
}
diff --git a/Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h b/Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h
index 708f64ed2..33b904260 100644
--- a/Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h
+++ b/Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h
@@ -63,6 +63,7 @@ public:
virtual ~RTCPeerConnectionHandlerClient() { }
+ virtual void negotiationNeeded() = 0;
virtual void didGenerateIceCandidate(PassRefPtr<RTCIceCandidateDescriptor>) = 0;
virtual void didChangeReadyState(ReadyState) = 0;
virtual void didChangeIceState(IceState) = 0;
diff --git a/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp b/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp
index 4ac4afc44..08a0373e0 100644
--- a/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp
+++ b/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp
@@ -164,6 +164,11 @@ void RTCPeerConnectionHandlerChromium::stop()
m_webHandler->stop();
}
+void RTCPeerConnectionHandlerChromium::negotiationNeeded()
+{
+ m_client->negotiationNeeded();
+}
+
void RTCPeerConnectionHandlerChromium::didGenerateICECandidate(const WebKit::WebRTCICECandidate& iceCandidate)
{
m_client->didGenerateIceCandidate(iceCandidate);
diff --git a/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h b/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h
index 848fe3dc9..5f6947174 100644
--- a/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h
+++ b/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h
@@ -67,6 +67,7 @@ public:
virtual void stop() OVERRIDE;
// WebKit::WebRTCPeerConnectionHandlerClient implementation.
+ virtual void negotiationNeeded() OVERRIDE;
virtual void didGenerateICECandidate(const WebKit::WebRTCICECandidate&) OVERRIDE;
virtual void didChangeReadyState(WebKit::WebRTCPeerConnectionHandlerClient::ReadyState) OVERRIDE;
virtual void didChangeICEState(WebKit::WebRTCPeerConnectionHandlerClient::ICEState) OVERRIDE;
diff --git a/Source/WebCore/platform/network/blackberry/NetworkManager.cpp b/Source/WebCore/platform/network/blackberry/NetworkManager.cpp
index 152ea4b29..531af3155 100644
--- a/Source/WebCore/platform/network/blackberry/NetworkManager.cpp
+++ b/Source/WebCore/platform/network/blackberry/NetworkManager.cpp
@@ -25,6 +25,7 @@
#include "FrameLoaderClientBlackBerry.h"
#include "NetworkJob.h"
#include "Page.h"
+#include "ReadOnlyLatin1String.h"
#include "ResourceHandleInternal.h"
#include "ResourceRequest.h"
#include "SecurityOrigin.h"
@@ -77,8 +78,15 @@ bool NetworkManager::startJob(int playerId, const String& pageGroupName, PassRef
BlackBerry::Platform::NetworkRequest platformRequest;
request.initializePlatformRequest(platformRequest, frame.loader() && frame.loader()->client() && static_cast<FrameLoaderClientBlackBerry*>(frame.loader()->client())->cookiesEnabled(), isInitial, redirectCount);
- platformRequest.setReferrer(frame.document()->url().string().utf8().data());
- platformRequest.setSecurityOrigin(frame.document()->securityOrigin()->toRawString().utf8().data());
+
+ const String& documentUrl = frame.document()->url().string();
+ if (!documentUrl.isEmpty()) {
+ ReadOnlyLatin1String referrer(documentUrl);
+ platformRequest.setReferrer(referrer.data(), referrer.length());
+ }
+
+ ReadOnlyLatin1String securityOrigin(frame.document()->securityOrigin()->toRawString());
+ platformRequest.setSecurityOrigin(securityOrigin.data(), securityOrigin.length());
// Attach any applicable auth credentials to the NetworkRequest.
AuthenticationChallenge& challenge = guardJob->getInternal()->m_currentWebChallenge;
diff --git a/Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp b/Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp
index 452108b6a..b7c048fa1 100644
--- a/Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp
+++ b/Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp
@@ -69,7 +69,7 @@ void ResourceResponse::updateFromSoupMessage(SoupMessage* soupMessage)
soup_message_headers_iter_init(&headersIter, soupMessage->response_headers);
while (soup_message_headers_iter_next(&headersIter, &headerName, &headerValue))
- m_httpHeaderFields.set(String::fromUTF8(headerName),
+ m_httpHeaderFields.set(String::fromUTF8WithLatin1Fallback(headerName, strlen(headerName)),
String::fromUTF8WithLatin1Fallback(headerValue, strlen(headerValue)));
m_soupFlags = soup_message_get_flags(soupMessage);
diff --git a/Source/WebCore/platform/text/LocaleICU.cpp b/Source/WebCore/platform/text/LocaleICU.cpp
index 0abe12ce3..290b528ca 100644
--- a/Source/WebCore/platform/text/LocaleICU.cpp
+++ b/Source/WebCore/platform/text/LocaleICU.cpp
@@ -112,7 +112,7 @@ String LocaleICU::decimalTextAttribute(UNumberFormatTextAttribute tag)
return String::adopt(buffer);
}
-void LocaleICU::initializeNumberLocalizerData()
+void LocaleICU::initializeLocalizerData()
{
if (m_didCreateDecimalFormat)
return;
@@ -136,7 +136,7 @@ void LocaleICU::initializeNumberLocalizerData()
symbols.append(decimalSymbol(UNUM_DECIMAL_SEPARATOR_SYMBOL));
symbols.append(decimalSymbol(UNUM_GROUPING_SEPARATOR_SYMBOL));
ASSERT(symbols.size() == DecimalSymbolsSize);
- setNumberLocalizerData(symbols, decimalTextAttribute(UNUM_POSITIVE_PREFIX), decimalTextAttribute(UNUM_POSITIVE_SUFFIX), decimalTextAttribute(UNUM_NEGATIVE_PREFIX), decimalTextAttribute(UNUM_NEGATIVE_SUFFIX));
+ setLocalizerData(symbols, decimalTextAttribute(UNUM_POSITIVE_PREFIX), decimalTextAttribute(UNUM_POSITIVE_SUFFIX), decimalTextAttribute(UNUM_NEGATIVE_PREFIX), decimalTextAttribute(UNUM_NEGATIVE_SUFFIX));
}
bool LocaleICU::initializeShortDateFormat()
diff --git a/Source/WebCore/platform/text/LocaleICU.h b/Source/WebCore/platform/text/LocaleICU.h
index 70a99c357..0f4022ad7 100644
--- a/Source/WebCore/platform/text/LocaleICU.h
+++ b/Source/WebCore/platform/text/LocaleICU.h
@@ -32,7 +32,7 @@
#define LocaleICU_h
#include "DateComponents.h"
-#include "NumberLocalizer.h"
+#include "Localizer.h"
#include <unicode/udat.h>
#include <unicode/unum.h>
#include <wtf/Forward.h>
@@ -44,7 +44,7 @@ namespace WebCore {
// We should use this class only for LocalizedNumberICU.cpp, LocalizedDateICU.cpp,
// and LocalizedNumberICUTest.cpp.
-class LocaleICU : public NumberLocalizer {
+class LocaleICU : public Localizer {
public:
static PassOwnPtr<LocaleICU> create(const char* localeString);
static LocaleICU* currentLocale();
@@ -72,7 +72,7 @@ private:
explicit LocaleICU(const char*);
String decimalSymbol(UNumberFormatSymbol);
String decimalTextAttribute(UNumberFormatTextAttribute);
- virtual void initializeNumberLocalizerData() OVERRIDE;
+ virtual void initializeLocalizerData() OVERRIDE;
bool detectSignAndGetDigitRange(const String& input, bool& isNegative, unsigned& startIndex, unsigned& endIndex);
unsigned matchedDecimalSymbolIndex(const String& input, unsigned& position);
diff --git a/Source/WebCore/platform/text/LocaleWin.cpp b/Source/WebCore/platform/text/LocaleWin.cpp
index 67eeddb75..03331c09e 100644
--- a/Source/WebCore/platform/text/LocaleWin.cpp
+++ b/Source/WebCore/platform/text/LocaleWin.cpp
@@ -723,7 +723,7 @@ const Vector<String>& LocaleWin::timeAMPMLabels()
}
#endif
-void LocaleWin::initializeNumberLocalizerData()
+void LocaleWin::initializeLocalizerData()
{
if (m_didInitializeNumberData)
return;
@@ -791,7 +791,7 @@ void LocaleWin::initializeNumberLocalizerData()
break;
}
m_didInitializeNumberData = true;
- setNumberLocalizerData(symbols, emptyString(), emptyString(), negativePrefix, negativeSuffix);
+ setLocalizerData(symbols, emptyString(), emptyString(), negativePrefix, negativeSuffix);
}
}
diff --git a/Source/WebCore/platform/text/LocaleWin.h b/Source/WebCore/platform/text/LocaleWin.h
index 33666b301..da0a75dad 100644
--- a/Source/WebCore/platform/text/LocaleWin.h
+++ b/Source/WebCore/platform/text/LocaleWin.h
@@ -31,7 +31,7 @@
#ifndef LocaleWin_h
#define LocaleWin_h
-#include "NumberLocalizer.h"
+#include "Localizer.h"
#include <windows.h>
#include <wtf/Forward.h>
#include <wtf/Vector.h>
@@ -42,7 +42,7 @@ namespace WebCore {
class DateComponents;
struct DateFormatToken;
-class LocaleWin : public NumberLocalizer {
+class LocaleWin : public Localizer {
public:
static PassOwnPtr<LocaleWin> create(LCID);
static LocaleWin* currentLocale();
@@ -85,8 +85,8 @@ private:
#if ENABLE(CALENDAR_PICKER)
void ensureWeekDayShortLabels();
#endif
- // NumberLocalizer function:
- virtual void initializeNumberLocalizerData() OVERRIDE;
+ // Localizer function:
+ virtual void initializeLocalizerData() OVERRIDE;
LCID m_lcid;
int m_baseYear;
diff --git a/Source/WebCore/platform/text/NumberLocalizer.cpp b/Source/WebCore/platform/text/Localizer.cpp
index 661d9b414..e4a45b727 100644
--- a/Source/WebCore/platform/text/NumberLocalizer.cpp
+++ b/Source/WebCore/platform/text/Localizer.cpp
@@ -29,17 +29,17 @@
*/
#include "config.h"
-#include "NumberLocalizer.h"
+#include "Localizer.h"
#include <wtf/text/StringBuilder.h>
namespace WebCore {
-NumberLocalizer::~NumberLocalizer()
+Localizer::~Localizer()
{
}
-void NumberLocalizer::setNumberLocalizerData(const Vector<String, DecimalSymbolsSize>& symbols, const String& positivePrefix, const String& positiveSuffix, const String& negativePrefix, const String& negativeSuffix)
+void Localizer::setLocalizerData(const Vector<String, DecimalSymbolsSize>& symbols, const String& positivePrefix, const String& positiveSuffix, const String& negativePrefix, const String& negativeSuffix)
{
for (size_t i = 0; i < symbols.size(); ++i) {
ASSERT(!symbols[i].isEmpty());
@@ -50,13 +50,13 @@ void NumberLocalizer::setNumberLocalizerData(const Vector<String, DecimalSymbols
m_negativePrefix = negativePrefix;
m_negativeSuffix = negativeSuffix;
ASSERT(!m_positivePrefix.isEmpty() || !m_positiveSuffix.isEmpty() || !m_negativePrefix.isEmpty() || !m_negativeSuffix.isEmpty());
- m_hasNumberLocalizerData = true;
+ m_hasLocalizerData = true;
}
-String NumberLocalizer::convertToLocalizedNumber(const String& input)
+String Localizer::convertToLocalizedNumber(const String& input)
{
- initializeNumberLocalizerData();
- if (!m_hasNumberLocalizerData || input.isEmpty())
+ initializeLocalizerData();
+ if (!m_hasLocalizerData || input.isEmpty())
return input;
unsigned i = 0;
@@ -111,7 +111,7 @@ static bool matches(const String& text, unsigned position, const String& part)
return true;
}
-bool NumberLocalizer::detectSignAndGetDigitRange(const String& input, bool& isNegative, unsigned& startIndex, unsigned& endIndex)
+bool Localizer::detectSignAndGetDigitRange(const String& input, bool& isNegative, unsigned& startIndex, unsigned& endIndex)
{
startIndex = 0;
endIndex = input.length();
@@ -139,7 +139,7 @@ bool NumberLocalizer::detectSignAndGetDigitRange(const String& input, bool& isNe
return true;
}
-unsigned NumberLocalizer::matchedDecimalSymbolIndex(const String& input, unsigned& position)
+unsigned Localizer::matchedDecimalSymbolIndex(const String& input, unsigned& position)
{
for (unsigned symbolIndex = 0; symbolIndex < DecimalSymbolsSize; ++symbolIndex) {
if (m_decimalSymbols[symbolIndex].length() && matches(input, position, m_decimalSymbols[symbolIndex])) {
@@ -150,11 +150,11 @@ unsigned NumberLocalizer::matchedDecimalSymbolIndex(const String& input, unsigne
return DecimalSymbolsSize;
}
-String NumberLocalizer::convertFromLocalizedNumber(const String& localized)
+String Localizer::convertFromLocalizedNumber(const String& localized)
{
- initializeNumberLocalizerData();
+ initializeLocalizerData();
String input = localized.stripWhiteSpace();
- if (!m_hasNumberLocalizerData || input.isEmpty())
+ if (!m_hasLocalizerData || input.isEmpty())
return input;
bool isNegative;
@@ -185,9 +185,9 @@ String NumberLocalizer::convertFromLocalizedNumber(const String& localized)
}
#if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS)
-String NumberLocalizer::localizedDecimalSeparator()
+String Localizer::localizedDecimalSeparator()
{
- initializeNumberLocalizerData();
+ initializeLocalizerData();
return m_decimalSymbols[DecimalSeparatorIndex];
}
#endif
diff --git a/Source/WebCore/platform/text/NumberLocalizer.h b/Source/WebCore/platform/text/Localizer.h
index 21831b2ae..17f4fd524 100644
--- a/Source/WebCore/platform/text/NumberLocalizer.h
+++ b/Source/WebCore/platform/text/Localizer.h
@@ -23,21 +23,22 @@
* DAMAGE.
*/
-#ifndef NumberLocalizer_h
-#define NumberLocalizer_h
+#ifndef Localizer_h
+#define Localizer_h
#include <wtf/text/WTFString.h>
namespace WebCore {
-class NumberLocalizer {
+class Localizer {
public:
+ static PassOwnPtr<Localizer> create(const AtomicString&);
String convertToLocalizedNumber(const String&);
String convertFromLocalizedNumber(const String&);
#if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS)
String localizedDecimalSeparator();
#endif
- virtual ~NumberLocalizer();
+ virtual ~Localizer();
protected:
enum {
@@ -47,9 +48,9 @@ protected:
DecimalSymbolsSize
};
- NumberLocalizer() : m_hasNumberLocalizerData(false) { }
- virtual void initializeNumberLocalizerData() = 0;
- void setNumberLocalizerData(const Vector<String, DecimalSymbolsSize>&, const String& positivePrefix, const String& positiveSuffix, const String& negativePrefix, const String& negativeSuffix);
+ Localizer() : m_hasLocalizerData(false) { }
+ virtual void initializeLocalizerData() = 0;
+ void setLocalizerData(const Vector<String, DecimalSymbolsSize>&, const String& positivePrefix, const String& positiveSuffix, const String& negativePrefix, const String& negativeSuffix);
private:
bool detectSignAndGetDigitRange(const String& input, bool& isNegative, unsigned& startIndex, unsigned& endIndex);
@@ -60,7 +61,7 @@ private:
String m_positiveSuffix;
String m_negativePrefix;
String m_negativeSuffix;
- bool m_hasNumberLocalizerData;
+ bool m_hasLocalizerData;
};
}
diff --git a/Source/WebCore/platform/text/mac/LocaleMac.h b/Source/WebCore/platform/text/mac/LocaleMac.h
index 1d81c637a..69c02035c 100644
--- a/Source/WebCore/platform/text/mac/LocaleMac.h
+++ b/Source/WebCore/platform/text/mac/LocaleMac.h
@@ -31,7 +31,7 @@
#ifndef LocaleMac_h
#define LocaleMac_h
-#include "NumberLocalizer.h"
+#include "Localizer.h"
#include <wtf/Forward.h>
#include <wtf/RetainPtr.h>
#include <wtf/Vector.h>
@@ -44,7 +44,7 @@ namespace WebCore {
class DateComponents;
-class LocaleMac : public NumberLocalizer {
+class LocaleMac : public Localizer {
public:
static PassOwnPtr<LocaleMac> create(const String&);
static LocaleMac* currentLocale();
@@ -69,7 +69,7 @@ private:
explicit LocaleMac(NSLocale*);
explicit LocaleMac(const String&);
NSDateFormatter *createShortDateFormatter();
- virtual void initializeNumberLocalizerData() OVERRIDE;
+ virtual void initializeLocalizerData() OVERRIDE;
RetainPtr<NSLocale> m_locale;
#if ENABLE(CALENDAR_PICKER)
diff --git a/Source/WebCore/platform/text/mac/LocaleMac.mm b/Source/WebCore/platform/text/mac/LocaleMac.mm
index 2e7f94c7f..eb9091958 100644
--- a/Source/WebCore/platform/text/mac/LocaleMac.mm
+++ b/Source/WebCore/platform/text/mac/LocaleMac.mm
@@ -45,6 +45,11 @@ using namespace std;
namespace WebCore {
+PassOwnPtr<Localizer> Localizer::create(const AtomicString& locale)
+{
+ return LocaleMac::create(locale.string());
+}
+
static NSDateFormatter* createDateTimeFormatter(NSLocale* locale, NSDateFormatterStyle dateStyle, NSDateFormatterStyle timeStyle)
{
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
@@ -270,7 +275,7 @@ const Vector<String>& LocaleMac::timeAMPMLabels()
}
#endif
-void LocaleMac::initializeNumberLocalizerData()
+void LocaleMac::initializeLocalizerData()
{
if (m_didInitializeNumberData)
return;
@@ -298,7 +303,7 @@ void LocaleMac::initializeNumberLocalizerData()
String positiveSuffix([formatter.get() positiveSuffix]);
String negativePrefix([formatter.get() negativePrefix]);
String negativeSuffix([formatter.get() negativeSuffix]);
- setNumberLocalizerData(symbols, positivePrefix, positiveSuffix, negativePrefix, negativeSuffix);
+ setLocalizerData(symbols, positivePrefix, positiveSuffix, negativePrefix, negativeSuffix);
}
}
diff --git a/Source/WebCore/platform/win/PopupMenuWin.cpp b/Source/WebCore/platform/win/PopupMenuWin.cpp
index a86847ddf..b8d7f19fd 100644
--- a/Source/WebCore/platform/win/PopupMenuWin.cpp
+++ b/Source/WebCore/platform/win/PopupMenuWin.cpp
@@ -741,7 +741,7 @@ IntSize PopupMenuWin::contentsSize() const
return m_windowRect.size();
}
-bool PopupMenuWin::isOnActivePage() const
+bool PopupMenuWin::scrollbarsCanBeActive() const
{
return m_showPopup;
}
diff --git a/Source/WebCore/platform/win/PopupMenuWin.h b/Source/WebCore/platform/win/PopupMenuWin.h
index 9b6ffa7d3..85cab7639 100644
--- a/Source/WebCore/platform/win/PopupMenuWin.h
+++ b/Source/WebCore/platform/win/PopupMenuWin.h
@@ -104,7 +104,7 @@ private:
virtual int visibleHeight() const OVERRIDE;
virtual int visibleWidth() const OVERRIDE;
virtual IntSize contentsSize() const OVERRIDE;
- virtual bool isOnActivePage() const OVERRIDE;
+ virtual bool scrollbarsCanBeActive() const OVERRIDE;
virtual IntRect scrollableAreaBoundingBox() const OVERRIDE;
// NOTE: This should only be called by the overriden setScrollOffset from ScrollableArea.
diff --git a/Source/WebCore/rendering/AutoTableLayout.cpp b/Source/WebCore/rendering/AutoTableLayout.cpp
index 3a5cb0dda..66ac28f1a 100644
--- a/Source/WebCore/rendering/AutoTableLayout.cpp
+++ b/Source/WebCore/rendering/AutoTableLayout.cpp
@@ -93,7 +93,7 @@ void AutoTableLayout::recalcColumn(unsigned effCol)
case Fixed:
// ignore width=0
if (cellLogicalWidth.isPositive() && !columnLayout.logicalWidth.isPercent()) {
- LayoutUnit logicalWidth = cell->computeBorderBoxLogicalWidth(cellLogicalWidth.value());
+ LayoutUnit logicalWidth = cell->adjustBorderBoxLogicalWidthForBoxSizing(cellLogicalWidth.value());
if (columnLayout.logicalWidth.isFixed()) {
// Nav/IE weirdness
if ((logicalWidth > columnLayout.logicalWidth.value())
diff --git a/Source/WebCore/rendering/ExclusionInterval.cpp b/Source/WebCore/rendering/ExclusionInterval.cpp
new file mode 100644
index 000000000..4e0ef7a98
--- /dev/null
+++ b/Source/WebCore/rendering/ExclusionInterval.cpp
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ExclusionInterval.h"
+
+#include <wtf/MathExtras.h>
+
+namespace WebCore {
+
+struct IntervalX1Comparator {
+ bool operator() (const ExclusionInterval& i1, const ExclusionInterval& i2) const
+ {
+ return i1.x1 < i2.x1;
+ }
+};
+
+bool ExclusionInterval::intersect(const ExclusionInterval& i, ExclusionInterval& rv) const
+{
+ if (x2 < i.x1 || x1 > i.x2)
+ return false;
+ rv.x1 = std::max(x1, i.x1);
+ rv.x2 = std::min(x2, i.x2);
+ return true;
+}
+
+void sortExclusionIntervals(Vector<ExclusionInterval>& v)
+{
+ std::sort(v.begin(), v.end(), IntervalX1Comparator());
+}
+
+void mergeExclusionIntervals(const Vector<ExclusionInterval>& v1, const Vector<ExclusionInterval>& v2, Vector<ExclusionInterval>& rv)
+{
+ if (!v1.size())
+ rv.appendRange(v2.begin(), v2.end());
+ else if (!v2.size())
+ rv.appendRange(v1.begin(), v1.end());
+ else {
+ Vector<ExclusionInterval> v(v1.size() + v2.size());
+ ExclusionInterval* interval = 0;
+
+ std::merge(v1.begin(), v1.end(), v2.begin(), v2.end(), v.begin(), IntervalX1Comparator());
+
+ for (size_t i = 0; i < v.size(); i++) {
+ if (!interval)
+ interval = &v[i];
+ else if (v[i].x1 >= interval->x1 && v[i].x1 <= interval->x2) // FIXME: 1st <= test not needed?
+ interval->x2 = std::max(interval->x2, v[i].x2);
+ else {
+ rv.append(*interval);
+ interval = &v[i];
+ }
+ }
+
+ if (interval)
+ rv.append(*interval);
+ }
+}
+
+void intersectExclusionIntervals(const Vector<ExclusionInterval>& v1, const Vector<ExclusionInterval>& v2, Vector<ExclusionInterval>& rv)
+{
+ size_t v1Size = v1.size();
+ size_t v2Size = v2.size();
+
+ if (!v1Size || !v2Size)
+ return;
+
+ ExclusionInterval interval;
+ bool overlap = false;
+ size_t i1 = 0;
+ size_t i2 = 0;
+
+ while (i1 < v1Size && i2 < v2Size) {
+ ExclusionInterval v12;
+ if (v1[i1].intersect(v2[i2], v12)) {
+ if (!overlap || !v12.intersect(interval, interval)) {
+ if (overlap)
+ rv.append(interval);
+ interval = v12;
+ overlap = true;
+ }
+ if (v1[i1].x2 < v2[i2].x2)
+ i1++;
+ else
+ i2++;
+ } else {
+ if (overlap)
+ rv.append(interval);
+ overlap = false;
+ if (v1[i1].x1 < v2[i2].x1)
+ i1++;
+ else
+ i2++;
+ }
+ }
+
+ if (overlap)
+ rv.append(interval);
+}
+
+void subtractExclusionIntervals(const Vector<ExclusionInterval>& v1, const Vector<ExclusionInterval>& v2, Vector<ExclusionInterval>& rv)
+{
+ size_t v1Size = v1.size();
+ size_t v2Size = v2.size();
+
+ if (!v1Size)
+ return;
+
+ if (!v2Size)
+ rv.appendRange(v1.begin(), v1.end());
+ else {
+ size_t i1 = 0, i2 = 0;
+ rv.appendRange(v1.begin(), v1.end());
+
+ while (i1 < rv.size() && i2 < v2Size) {
+ ExclusionInterval& interval1 = rv[i1];
+ const ExclusionInterval& interval2 = v2[i2];
+
+ if (interval2.x1 <= interval1.x1 && interval2.x2 >= interval1.x2)
+ rv.remove(i1);
+ else if (interval2.x2 < interval1.x1)
+ i2 += 1;
+ else if (interval2.x1 > interval1.x2)
+ i1 += 1;
+ else if (interval2.x1 > interval1.x1 && interval2.x2 < interval1.x2) {
+ rv.insert(i1, ExclusionInterval(interval1.x1, interval2.x1));
+ interval1.x1 = interval2.x2;
+ i2 += 1;
+ } else if (interval2.x1 <= interval1.x1) {
+ interval1.x1 = interval2.x2;
+ i2 += 1;
+ } else { // (interval2.x2 >= interval1.x2)
+ interval1.x2 = interval2.x1;
+ i1 += 1;
+ }
+ }
+ }
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/rendering/ExclusionInterval.h b/Source/WebCore/rendering/ExclusionInterval.h
new file mode 100644
index 000000000..5d31feb18
--- /dev/null
+++ b/Source/WebCore/rendering/ExclusionInterval.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ExclusionInterval_h
+#define ExclusionInterval_h
+
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+struct ExclusionInterval {
+public:
+ float x1;
+ float x2;
+
+ ExclusionInterval(float x1 = 0, float x2 = 0)
+ : x1(x1)
+ , x2(x2)
+ {
+ }
+
+ bool intersect(const ExclusionInterval&, ExclusionInterval&) const;
+};
+
+void sortExclusionIntervals(Vector<ExclusionInterval>&);
+void mergeExclusionIntervals(const Vector<ExclusionInterval>&, const Vector<ExclusionInterval>&, Vector<ExclusionInterval>&);
+void intersectExclusionIntervals(const Vector<ExclusionInterval>&, const Vector<ExclusionInterval>&, Vector<ExclusionInterval>&);
+void subtractExclusionIntervals(const Vector<ExclusionInterval>&, const Vector<ExclusionInterval>&, Vector<ExclusionInterval>&);
+
+} // namespace WebCore
+
+#endif // ExclusionInterval_h
diff --git a/Source/WebCore/rendering/ExclusionRectangle.cpp b/Source/WebCore/rendering/ExclusionRectangle.cpp
new file mode 100644
index 000000000..78f83b055
--- /dev/null
+++ b/Source/WebCore/rendering/ExclusionRectangle.cpp
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ExclusionRectangle.h"
+
+#include <wtf/MathExtras.h>
+
+namespace WebCore {
+
+static inline float ellipseXIntercept(float y, float rx, float ry)
+{
+ ASSERT(ry > 0);
+ return rx * sqrt(1 - (y*y) / (ry*ry));
+}
+
+void ExclusionRectangle::getOutsideIntervals(float y1, float y2, Vector<ExclusionInterval>& rv) const
+{
+ if (y1 > y2)
+ std::swap(y1, y2);
+
+ if (y2 < m_y || y1 >= m_y + m_height)
+ return;
+
+ float x1 = m_x;
+ float x2 = m_x + m_width;
+
+ if (m_ry > 0) {
+ if (y2 < m_y + m_ry) {
+ float yi = y2 - m_y - m_ry;
+ float xi = ellipseXIntercept(yi, m_rx, m_ry);
+ x1 = m_x + m_rx - xi;
+ x2 = m_x + m_width - m_rx + xi;
+ } else if (y1 > m_y + m_height - m_ry) {
+ float yi = y1 - (m_y + m_height - m_ry);
+ float xi = ellipseXIntercept(yi, m_rx, m_ry);
+ x1 = m_x + m_rx - xi;
+ x2 = m_x + m_width - m_rx + xi;
+ }
+ }
+
+ rv.append(ExclusionInterval(x1, x2));
+}
+
+void ExclusionRectangle::getInsideIntervals(float y1, float y2, Vector<ExclusionInterval>& rv) const
+{
+ if (y1 > y2)
+ std::swap(y1, y2);
+
+ if (y1 < m_y || y2 >= m_y + m_height)
+ return;
+
+ float x1 = m_x;
+ float x2 = m_x + m_width;
+
+ if (m_ry > 0) {
+ bool y1InterceptsCorner = y1 < m_y + m_ry;
+ bool y2InterceptsCorner = y2 > m_y + m_height - m_ry;
+ float xi = 0;
+
+ if (y1InterceptsCorner && y2InterceptsCorner) {
+ if (y1 < m_height + 2*m_y - y2) {
+ float yi = y1 - m_y - m_ry;
+ xi = ellipseXIntercept(yi, m_rx, m_ry);
+ } else {
+ float yi = y2 - (m_y + m_height - m_ry);
+ xi = ellipseXIntercept(yi, m_rx, m_ry);
+ }
+ } else if (y1InterceptsCorner) {
+ float yi = y1 - m_y - m_ry;
+ xi = ellipseXIntercept(yi, m_rx, m_ry);
+ } else if (y2InterceptsCorner) {
+ float yi = y2 - (m_y + m_height - m_ry);
+ xi = ellipseXIntercept(yi, m_rx, m_ry);
+ }
+
+ if (y1InterceptsCorner || y2InterceptsCorner) {
+ x1 = m_x + m_rx - xi;
+ x2 = m_x + m_width - m_rx + xi;
+ }
+ }
+
+ rv.append(ExclusionInterval(x1, x2));
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/rendering/ExclusionRectangle.h b/Source/WebCore/rendering/ExclusionRectangle.h
new file mode 100644
index 000000000..6af021772
--- /dev/null
+++ b/Source/WebCore/rendering/ExclusionRectangle.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ExclusionRectangle_h
+#define ExclusionRectangle_h
+
+#include "ExclusionShape.h"
+#include <wtf/Assertions.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class ExclusionRectangle : public ExclusionShape {
+public:
+ ExclusionRectangle(float x, float y, float width, float height, float rx = 0, float ry = 0)
+ : ExclusionShape()
+ , m_x(x)
+ , m_y(y)
+ , m_width(width)
+ , m_height(height)
+ , m_rx(rx)
+ , m_ry(ry)
+ {
+ }
+
+ virtual FloatRect shapeLogicalBoundingBox() const OVERRIDE { return FloatRect(m_x, m_y, m_width, m_height); }
+ virtual void getOutsideIntervals(float y1, float y2, Vector<ExclusionInterval>&) const OVERRIDE;
+ virtual void getInsideIntervals(float y1, float y2, Vector<ExclusionInterval>&) const OVERRIDE;
+
+private:
+ float m_x;
+ float m_y;
+ float m_width;
+ float m_height;
+ float m_rx; // corner X radius
+ float m_ry; // corner Y radius
+};
+
+} // namespace WebCore
+
+#endif // ExclusionRectangle_h
diff --git a/Source/WebCore/rendering/ExclusionShape.cpp b/Source/WebCore/rendering/ExclusionShape.cpp
new file mode 100644
index 000000000..48c88b653
--- /dev/null
+++ b/Source/WebCore/rendering/ExclusionShape.cpp
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ExclusionShape.h"
+
+#include "BasicShapeFunctions.h"
+#include "ExclusionRectangle.h"
+#include "LengthFunctions.h"
+#include "NotImplemented.h"
+#include "WindRule.h"
+#include <wtf/MathExtras.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+static PassOwnPtr<ExclusionShape> createExclusionRectangle(float x, float y, float width, float height, float rx, float ry)
+{
+ ASSERT(width >= 0 && height >= 0 && rx >= 0 && ry >= 0);
+ return adoptPtr(new ExclusionRectangle(x, y, width, height, rx, ry));
+}
+
+static PassOwnPtr<ExclusionShape> createExclusionCircle(float cx, float cy, float radius)
+{
+ ASSERT(radius >= 0);
+ return adoptPtr(new ExclusionRectangle(cx - radius, cy - radius, cx + radius, cy + radius, radius, radius));
+}
+
+static PassOwnPtr<ExclusionShape> createExclusionEllipse(float cx, float cy, float rx, float ry)
+{
+ ASSERT(rx >= 0 && ry >= 0);
+ return adoptPtr(new ExclusionRectangle(cx - rx, cy - ry, cx + rx, cy + ry, rx, ry));
+}
+
+PassOwnPtr<ExclusionShape> ExclusionShape::createExclusionShape(const BasicShape* wrapShape, float borderBoxLogicalWidth, float borderBoxLogicalHeight)
+{
+ if (!wrapShape)
+ return nullptr;
+
+ switch (wrapShape->type()) {
+ case BasicShape::BASIC_SHAPE_RECTANGLE: {
+ const BasicShapeRectangle* rectangle = static_cast<const BasicShapeRectangle*>(wrapShape);
+ Length rx = rectangle->cornerRadiusX();
+ Length ry = rectangle->cornerRadiusY();
+ return createExclusionRectangle(
+ floatValueForLength(rectangle->x(), borderBoxLogicalWidth),
+ floatValueForLength(rectangle->y(), borderBoxLogicalHeight),
+ floatValueForLength(rectangle->width(), borderBoxLogicalWidth),
+ floatValueForLength(rectangle->height(), borderBoxLogicalHeight),
+ rx.isUndefined() ? 0 : floatValueForLength(rx, borderBoxLogicalWidth),
+ ry.isUndefined() ? 0 : floatValueForLength(ry, borderBoxLogicalHeight) );
+ }
+
+ case BasicShape::BASIC_SHAPE_CIRCLE: {
+ const BasicShapeCircle* circle = static_cast<const BasicShapeCircle*>(wrapShape);
+ return createExclusionCircle(
+ floatValueForLength(circle->centerX(), borderBoxLogicalWidth),
+ floatValueForLength(circle->centerY(), borderBoxLogicalHeight),
+ floatValueForLength(circle->radius(), std::max(borderBoxLogicalHeight, borderBoxLogicalWidth)) );
+ }
+
+ case BasicShape::BASIC_SHAPE_ELLIPSE: {
+ const BasicShapeEllipse* ellipse = static_cast<const BasicShapeEllipse*>(wrapShape);
+ return createExclusionEllipse(
+ floatValueForLength(ellipse->centerX(), borderBoxLogicalWidth),
+ floatValueForLength(ellipse->centerY(), borderBoxLogicalHeight),
+ floatValueForLength(ellipse->radiusX(), borderBoxLogicalWidth),
+ floatValueForLength(ellipse->radiusY(), borderBoxLogicalHeight) );
+ }
+
+ case BasicShape::BASIC_SHAPE_POLYGON:
+ notImplemented();
+ }
+
+ ASSERT_NOT_REACHED();
+ return nullptr;
+}
+
+} // namespace WebCore
diff --git a/Source/WebCore/rendering/ExclusionShape.h b/Source/WebCore/rendering/ExclusionShape.h
new file mode 100644
index 000000000..c5de4d705
--- /dev/null
+++ b/Source/WebCore/rendering/ExclusionShape.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ExclusionShape_h
+#define ExclusionShape_h
+
+#include "BasicShapes.h"
+#include "ExclusionInterval.h"
+#include "FloatRect.h"
+#include <wtf/PassOwnPtr.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class ExclusionShape {
+public:
+ static PassOwnPtr<ExclusionShape> createExclusionShape(const BasicShape*, float borderBoxLogicalWidth, float borderBoxLogicalHeight);
+
+ virtual ~ExclusionShape() { }
+
+ virtual FloatRect shapeLogicalBoundingBox() const = 0;
+ virtual void getInsideIntervals(float logicalTop, float logicalBottom, Vector<ExclusionInterval>&) const = 0;
+ virtual void getOutsideIntervals(float logicalTop, float logicalBottom, Vector<ExclusionInterval>&) const = 0;
+};
+
+} // namespace WebCore
+
+#endif // ExclusionShape_h
diff --git a/Source/WebCore/rendering/FixedTableLayout.cpp b/Source/WebCore/rendering/FixedTableLayout.cpp
index 8649a08d3..33ebcea57 100644
--- a/Source/WebCore/rendering/FixedTableLayout.cpp
+++ b/Source/WebCore/rendering/FixedTableLayout.cpp
@@ -145,7 +145,7 @@ int FixedTableLayout::calcWidthArray(int)
unsigned span = cell->colSpan();
int fixedBorderBoxLogicalWidth = 0;
if (logicalWidth.isFixed() && logicalWidth.isPositive()) {
- fixedBorderBoxLogicalWidth = cell->computeBorderBoxLogicalWidth(logicalWidth.value());
+ fixedBorderBoxLogicalWidth = cell->adjustBorderBoxLogicalWidthForBoxSizing(logicalWidth.value());
logicalWidth.setValue(fixedBorderBoxLogicalWidth);
}
diff --git a/Source/WebCore/rendering/RenderBlock.cpp b/Source/WebCore/rendering/RenderBlock.cpp
index 10216bc00..c2a406156 100755
--- a/Source/WebCore/rendering/RenderBlock.cpp
+++ b/Source/WebCore/rendering/RenderBlock.cpp
@@ -1402,7 +1402,7 @@ void RenderBlock::computeInitialRegionRangeForBlock()
LayoutUnit oldHeight = logicalHeight();
LayoutUnit oldLogicalTop = logicalTop();
setLogicalHeight(MAX_LAYOUT_UNIT / 2);
- computeLogicalHeight();
+ updateLogicalHeight();
enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage());
setLogicalHeight(oldHeight);
setLogicalTop(oldLogicalTop);
@@ -1415,12 +1415,12 @@ void RenderBlock::computeRegionRangeForBlock()
enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage());
}
-bool RenderBlock::recomputeLogicalWidth()
+bool RenderBlock::updateLogicalWidthAndColumnWidth()
{
LayoutUnit oldWidth = logicalWidth();
LayoutUnit oldColumnWidth = desiredColumnWidth();
- computeLogicalWidth();
+ updateLogicalWidth();
calcColumnWidth();
return oldWidth != logicalWidth() || oldColumnWidth != desiredColumnWidth();
@@ -1433,7 +1433,7 @@ void RenderBlock::checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalH
if (!pageLogicalHeight) {
// We need to go ahead and set our explicit page height if one exists, so that we can
// avoid doing two layout passes.
- computeLogicalHeight();
+ updateLogicalHeight();
LayoutUnit columnHeight = contentLogicalHeight();
if (columnHeight > ZERO_LAYOUT_UNIT) {
pageLogicalHeight = columnHeight;
@@ -1468,7 +1468,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeigh
LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
- if (recomputeLogicalWidth())
+ if (updateLogicalWidthAndColumnWidth())
relayoutChildren = true;
m_overflow.clear();
@@ -1546,7 +1546,7 @@ void RenderBlock::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeigh
// Calculate our new height.
LayoutUnit oldHeight = logicalHeight();
LayoutUnit oldClientAfterEdge = clientLogicalBottom();
- computeLogicalHeight();
+ updateLogicalHeight();
LayoutUnit newHeight = logicalHeight();
if (oldHeight != newHeight) {
if (oldHeight > newHeight && maxFloatLogicalBottom > newHeight && !childrenInline()) {
@@ -2652,9 +2652,9 @@ void RenderBlock::layoutPositionedObjects(bool relayoutChildren)
bool needsBlockDirectionLocationSetBeforeLayout = r->needsLayout() && view()->layoutState()->needsBlockDirectionLocationSetBeforeLayout();
if (needsBlockDirectionLocationSetBeforeLayout) {
if (isHorizontalWritingMode() == r->isHorizontalWritingMode())
- r->computeLogicalHeight();
+ r->updateLogicalHeight();
else
- r->computeLogicalWidth();
+ r->updateLogicalWidth();
oldLogicalTop = logicalTopForChild(r);
}
@@ -3760,7 +3760,7 @@ RenderBlock::FloatingObject* RenderBlock::insertFloatingObject(RenderBox* o)
if (!needsBlockDirectionLocationSetBeforeLayout || isWritingModeRoot()) // We are unsplittable if we're a block flow root.
o->layoutIfNeeded();
else {
- o->computeLogicalWidth();
+ o->updateLogicalWidth();
o->computeAndSetBlockDirectionMargins(this);
}
setLogicalWidthForFloat(newObj, logicalWidthForChild(o) + marginStartForChild(o) + marginEndForChild(o));
@@ -4652,7 +4652,7 @@ LayoutUnit RenderBlock::getClearDelta(RenderBox* child, LayoutUnit logicalTop)
LayoutUnit childOldLogicalTop = child->logicalTop();
child->setLogicalTop(newLogicalTop);
- child->computeLogicalWidth();
+ child->updateLogicalWidth();
region = regionAtBlockOffset(logicalTopForChild(child));
borderBox = child->borderBoxRectInRegion(region, offsetFromLogicalTopOfFirstPage() + logicalTopForChild(child), DoNotCacheRenderBoxRegionInfo);
LayoutUnit childLogicalWidthAtNewLogicalTopOffset = isHorizontalWritingMode() ? borderBox.width() : borderBox.height();
@@ -5552,7 +5552,7 @@ void RenderBlock::computePreferredLogicalWidths()
RenderStyle* styleToUse = style();
if (!isTableCell() && styleToUse->logicalWidth().isFixed() && styleToUse->logicalWidth().value() >= 0
&& style()->marqueeBehavior() != MALTERNATE && !(isDeprecatedFlexItem() && !styleToUse->logicalWidth().intValue()))
- m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(styleToUse->logicalWidth().value());
+ m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalWidth().value());
else {
m_minPreferredLogicalWidth = 0;
m_maxPreferredLogicalWidth = 0;
@@ -5584,7 +5584,7 @@ void RenderBlock::computePreferredLogicalWidths()
if (isTableCell()) {
Length w = toRenderTableCell(this)->styleOrColLogicalWidth();
if (w.isFixed() && w.value() > 0) {
- m_maxPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(w.value()));
+ m_maxPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(w.value()));
scrollbarWidth = 0;
}
}
@@ -5593,13 +5593,13 @@ void RenderBlock::computePreferredLogicalWidths()
}
if (styleToUse->logicalMinWidth().isFixed() && styleToUse->logicalMinWidth().value() > 0) {
- m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMinWidth().value()));
- m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMinWidth().value()));
+ m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
+ m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
}
if (styleToUse->logicalMaxWidth().isFixed()) {
- m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMaxWidth().value()));
- m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMaxWidth().value()));
+ m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
+ m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
}
LayoutUnit borderAndPadding = borderAndPaddingLogicalWidth();
@@ -6057,7 +6057,7 @@ void RenderBlock::computeBlockPreferredLogicalWidths()
RenderBox* childBox = toRenderBox(child);
LayoutUnit oldHeight = childBox->logicalHeight();
childBox->setLogicalHeight(childBox->borderAndPaddingLogicalHeight());
- childBox->computeLogicalHeight();
+ childBox->updateLogicalHeight();
childMinPreferredLogicalWidth = childMaxPreferredLogicalWidth = childBox->logicalHeight();
childBox->setLogicalHeight(oldHeight);
} else {
diff --git a/Source/WebCore/rendering/RenderBlock.h b/Source/WebCore/rendering/RenderBlock.h
index a33eeaf5b..a54a4b8e1 100644
--- a/Source/WebCore/rendering/RenderBlock.h
+++ b/Source/WebCore/rendering/RenderBlock.h
@@ -1009,7 +1009,7 @@ protected:
virtual bool requiresColumns(int desiredColumnCount) const;
- virtual bool recomputeLogicalWidth();
+ virtual bool updateLogicalWidthAndColumnWidth();
virtual bool canCollapseAnonymousBlockChild() const { return true; }
diff --git a/Source/WebCore/rendering/RenderBlockLineLayout.cpp b/Source/WebCore/rendering/RenderBlockLineLayout.cpp
index c0c3404ad..fe6694437 100755
--- a/Source/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/Source/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -1297,8 +1297,8 @@ void RenderBlock::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, Inlin
#if ENABLE(CSS_EXCLUSIONS)
WrapShapeInfo* wrapShapeInfo = this->wrapShapeInfo();
// Move to the top of the shape inside to begin layout
- if (wrapShapeInfo && logicalHeight() < wrapShapeInfo->shapeTop())
- setLogicalHeight(wrapShapeInfo->shapeTop());
+ if (wrapShapeInfo && logicalHeight() < wrapShapeInfo->shapeLogicalTop())
+ setLogicalHeight(wrapShapeInfo->shapeLogicalTop());
#endif
while (!end.atEnd()) {
diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp
index 792b9c28b..446a7f8f1 100644
--- a/Source/WebCore/rendering/RenderBox.cpp
+++ b/Source/WebCore/rendering/RenderBox.cpp
@@ -707,7 +707,7 @@ LayoutUnit RenderBox::overrideLogicalContentHeight() const
return hasOverrideHeight() ? gOverrideHeightMap->get(this) : contentHeight();
}
-LayoutUnit RenderBox::computeBorderBoxLogicalWidth(LayoutUnit width) const
+LayoutUnit RenderBox::adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const
{
LayoutUnit bordersPlusPadding = borderAndPaddingLogicalWidth();
if (style()->boxSizing() == CONTENT_BOX)
@@ -715,7 +715,7 @@ LayoutUnit RenderBox::computeBorderBoxLogicalWidth(LayoutUnit width) const
return max(width, bordersPlusPadding);
}
-LayoutUnit RenderBox::computeBorderBoxLogicalHeight(LayoutUnit height) const
+LayoutUnit RenderBox::adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const
{
LayoutUnit bordersPlusPadding = borderAndPaddingLogicalHeight();
if (style()->boxSizing() == CONTENT_BOX)
@@ -723,14 +723,14 @@ LayoutUnit RenderBox::computeBorderBoxLogicalHeight(LayoutUnit height) const
return max(height, bordersPlusPadding);
}
-LayoutUnit RenderBox::computeContentBoxLogicalWidth(LayoutUnit width) const
+LayoutUnit RenderBox::adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const
{
if (style()->boxSizing() == BORDER_BOX)
width -= borderAndPaddingLogicalWidth();
return max<LayoutUnit>(0, width);
}
-LayoutUnit RenderBox::computeContentBoxLogicalHeight(LayoutUnit height) const
+LayoutUnit RenderBox::adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) const
{
if (style()->boxSizing() == BORDER_BOX)
height -= borderAndPaddingLogicalHeight();
@@ -1244,7 +1244,7 @@ LayoutUnit RenderBox::perpendicularContainingBlockLogicalHeight() const
}
// Use the content box logical height as specified by the style.
- return cb->computeContentBoxLogicalHeight(logicalHeightLength.value());
+ return cb->adjustContentBoxLogicalHeightForBoxSizing(logicalHeightLength.value());
}
void RenderBox::mapLocalToContainer(RenderBoxModelObject* repaintContainer, TransformState& transformState, MapLocalToContainerFlags mode, bool* wasFixed) const
@@ -1615,7 +1615,7 @@ void RenderBox::repaintDuringLayoutIfMoved(const LayoutRect& oldRect)
}
}
-void RenderBox::computeLogicalWidth()
+void RenderBox::updateLogicalWidth()
{
LogicalExtentComputedValues computedValues;
computeLogicalWidthInRegion(computedValues);
@@ -1732,11 +1732,11 @@ LayoutUnit RenderBox::computeLogicalWidthInRegionUsing(SizeType widthType, Layou
ASSERT(!logicalWidth.isUndefined());
if (widthType == MinSize && logicalWidth.isAuto())
- return computeBorderBoxLogicalWidth(0);
+ return adjustBorderBoxLogicalWidthForBoxSizing(0);
if (!logicalWidth.isIntrinsicOrAuto()) {
// FIXME: If the containing block flow is perpendicular to our direction we need to use the available logical height instead.
- return computeBorderBoxLogicalWidth(valueForLength(logicalWidth, availableLogicalWidth, view()));
+ return adjustBorderBoxLogicalWidthForBoxSizing(valueForLength(logicalWidth, availableLogicalWidth, view()));
}
if (logicalWidth.type() == MinContent)
@@ -1961,7 +1961,7 @@ static bool shouldFlipBeforeAfterMargins(const RenderStyle* containingBlockStyle
return shouldFlip;
}
-void RenderBox::computeLogicalHeight()
+void RenderBox::updateLogicalHeight()
{
LogicalExtentComputedValues computedValues;
computeLogicalHeight(computedValues);
@@ -2091,7 +2091,7 @@ LayoutUnit RenderBox::computeLogicalHeightUsing(SizeType heightType, const Lengt
{
LayoutUnit logicalHeight = computeContentLogicalHeightUsing(heightType, height);
if (logicalHeight != -1)
- logicalHeight = computeBorderBoxLogicalHeight(logicalHeight);
+ logicalHeight = adjustBorderBoxLogicalHeightForBoxSizing(logicalHeight);
return logicalHeight;
}
@@ -2100,7 +2100,7 @@ LayoutUnit RenderBox::computeLogicalClientHeight(SizeType heightType, const Leng
LayoutUnit heightIncludingScrollbar = computeContentLogicalHeightUsing(heightType, height);
if (heightIncludingScrollbar == -1)
return -1;
- return std::max<LayoutUnit>(0, computeContentBoxLogicalHeight(heightIncludingScrollbar) - scrollbarLogicalHeight());
+ return std::max<LayoutUnit>(0, adjustContentBoxLogicalHeightForBoxSizing(heightIncludingScrollbar) - scrollbarLogicalHeight());
}
LayoutUnit RenderBox::computeContentLogicalHeightUsing(SizeType heightType, const Length& height) const
@@ -2168,20 +2168,20 @@ LayoutUnit RenderBox::computePercentageLogicalHeight(const Length& height) const
}
} else if (cbstyle->logicalHeight().isFixed()) {
// Otherwise we only use our percentage height if our containing block had a specified height.
- LayoutUnit contentBoxHeightWithScrollbar = cb->computeContentBoxLogicalHeight(cbstyle->logicalHeight().value());
+ LayoutUnit contentBoxHeightWithScrollbar = cb->adjustContentBoxLogicalHeightForBoxSizing(cbstyle->logicalHeight().value());
result = max<LayoutUnit>(0, contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight());
} else if (cbstyle->logicalHeight().isPercent() && !isOutOfFlowPositionedWithSpecifiedHeight) {
// We need to recur and compute the percentage height for our containing block.
LayoutUnit heightWithScrollbar = cb->computePercentageLogicalHeight(cbstyle->logicalHeight());
if (heightWithScrollbar != -1) {
- LayoutUnit contentBoxHeightWithScrollbar = cb->computeContentBoxLogicalHeight(heightWithScrollbar);
+ LayoutUnit contentBoxHeightWithScrollbar = cb->adjustContentBoxLogicalHeightForBoxSizing(heightWithScrollbar);
result = max<LayoutUnit>(0, contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight());
}
} else if (cb->isRenderView() || (cb->isBody() && document()->inQuirksMode()) || isOutOfFlowPositionedWithSpecifiedHeight) {
// Don't allow this to affect the block' height() member variable, since this
// can get called while the block is still laying out its kids.
LayoutUnit oldHeight = cb->logicalHeight();
- cb->computeLogicalHeight();
+ cb->updateLogicalHeight();
result = cb->contentLogicalHeight();
cb->setLogicalHeight(oldHeight);
}
@@ -2214,15 +2214,15 @@ LayoutUnit RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUni
LayoutUnit RenderBox::computeReplacedLogicalWidthUsing(SizeType sizeType, Length logicalWidth) const
{
if (sizeType == MinSize && logicalWidth.isAuto())
- return computeContentBoxLogicalWidth(0);
+ return adjustContentBoxLogicalWidthForBoxSizing(0);
switch (logicalWidth.type()) {
case Fixed:
- return computeContentBoxLogicalWidth(logicalWidth.value());
+ return adjustContentBoxLogicalWidthForBoxSizing(logicalWidth.value());
case ViewportPercentageWidth:
case ViewportPercentageHeight:
case ViewportPercentageMin:
- return computeContentBoxLogicalWidth(valueForLength(logicalWidth, 0, view()));
+ return adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logicalWidth, 0, view()));
case Percent:
case Calculated: {
// FIXME: containingBlockLogicalWidthForContent() is wrong if the replaced element's block-flow is perpendicular to the
@@ -2233,7 +2233,7 @@ LayoutUnit RenderBox::computeReplacedLogicalWidthUsing(SizeType sizeType, Length
// FIXME: Handle cases when containing block width is calculated or viewport percent.
// https://bugs.webkit.org/show_bug.cgi?id=91071
if (cw > 0 || (!cw && (containerLogicalWidth.isFixed() || containerLogicalWidth.isPercent())))
- return computeContentBoxLogicalWidth(minimumValueForLength(logicalWidth, cw));
+ return adjustContentBoxLogicalWidthForBoxSizing(minimumValueForLength(logicalWidth, cw));
}
// fall through
default:
@@ -2256,11 +2256,11 @@ LayoutUnit RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutU
LayoutUnit RenderBox::computeReplacedLogicalHeightUsing(SizeType sizeType, Length logicalHeight) const
{
if (sizeType == MinSize && logicalHeight.isAuto())
- return computeContentBoxLogicalHeight(0);
+ return adjustContentBoxLogicalHeightForBoxSizing(0);
switch (logicalHeight.type()) {
case Fixed:
- return computeContentBoxLogicalHeight(logicalHeight.value());
+ return adjustContentBoxLogicalHeightForBoxSizing(logicalHeight.value());
case Percent:
case Calculated:
{
@@ -2276,10 +2276,10 @@ LayoutUnit RenderBox::computeReplacedLogicalHeightUsing(SizeType sizeType, Lengt
ASSERT(cb->isRenderBlock());
RenderBlock* block = toRenderBlock(cb);
LayoutUnit oldHeight = block->height();
- block->computeLogicalHeight();
- LayoutUnit newHeight = block->computeContentBoxLogicalHeight(block->contentHeight());
+ block->updateLogicalHeight();
+ LayoutUnit newHeight = block->adjustContentBoxLogicalHeightForBoxSizing(block->contentHeight());
block->setHeight(oldHeight);
- return computeContentBoxLogicalHeight(valueForLength(logicalHeight, newHeight));
+ return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeight, newHeight));
}
// FIXME: availableLogicalHeight() is wrong if the replaced element's block-flow is perpendicular to the
@@ -2306,12 +2306,12 @@ LayoutUnit RenderBox::computeReplacedLogicalHeightUsing(SizeType sizeType, Lengt
cb = cb->containingBlock();
}
}
- return computeContentBoxLogicalHeight(valueForLength(logicalHeight, availableHeight));
+ return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeight, availableHeight));
}
case ViewportPercentageWidth:
case ViewportPercentageHeight:
case ViewportPercentageMin:
- return computeContentBoxLogicalHeight(valueForLength(logicalHeight, 0, view()));
+ return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeight, 0, view()));
default:
return intrinsicLogicalHeight();
}
@@ -2335,22 +2335,22 @@ LayoutUnit RenderBox::availableLogicalHeightUsing(const Length& h) const
if (h.isPercent() && isOutOfFlowPositioned()) {
LayoutUnit availableHeight = containingBlockLogicalHeightForPositioned(containingBlock());
- return computeContentBoxLogicalHeight(valueForLength(h, availableHeight));
+ return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(h, availableHeight));
}
LayoutUnit heightIncludingScrollbar = computeContentLogicalHeightUsing(MainOrPreferredSize, h);
if (heightIncludingScrollbar != -1)
- return std::max<LayoutUnit>(0, computeContentBoxLogicalHeight(heightIncludingScrollbar) - scrollbarLogicalHeight());
+ return std::max<LayoutUnit>(0, adjustContentBoxLogicalHeightForBoxSizing(heightIncludingScrollbar) - scrollbarLogicalHeight());
// FIXME: Check logicalTop/logicalBottom here to correctly handle vertical writing-mode.
// https://bugs.webkit.org/show_bug.cgi?id=46500
if (isRenderBlock() && isOutOfFlowPositioned() && style()->height().isAuto() && !(style()->top().isAuto() || style()->bottom().isAuto())) {
RenderBlock* block = const_cast<RenderBlock*>(toRenderBlock(this));
LayoutUnit oldHeight = block->logicalHeight();
- block->computeLogicalHeight();
- LayoutUnit newHeight = block->computeContentBoxLogicalHeight(block->contentLogicalHeight());
+ block->updateLogicalHeight();
+ LayoutUnit newHeight = block->adjustContentBoxLogicalHeightForBoxSizing(block->contentLogicalHeight());
block->setLogicalHeight(oldHeight);
- return computeContentBoxLogicalHeight(newHeight);
+ return adjustContentBoxLogicalHeightForBoxSizing(newHeight);
}
return containingBlock()->availableLogicalHeight();
@@ -2535,8 +2535,14 @@ static void computeInlineStaticDistance(Length& logicalLeft, Length& logicalRigh
void RenderBox::computePositionedLogicalWidth(LogicalExtentComputedValues& computedValues, RenderRegion* region, LayoutUnit offsetFromLogicalTopOfFirstPage) const
{
if (isReplaced()) {
- computePositionedLogicalWidthReplaced(computedValues); // FIXME: Patch for regions when we add replaced element support.
- return;
+ // FIXME: For regions with width auto, we want to compute width using the normal block sizing code.
+ // For now, regions are replaced elements and this code can be removed once the RenderRegion
+ // will inherit from RenderBlock instead of RenderReplaced.
+ // (see https://bugs.webkit.org/show_bug.cgi?id=74132 )
+ if (!isRenderRegion() || (isRenderRegion() && shouldComputeSizeAsReplaced())) {
+ computePositionedLogicalWidthReplaced(computedValues); // FIXME: Patch for regions when we add replaced element support.
+ return;
+ }
}
// QUESTIONS
@@ -2717,7 +2723,7 @@ void RenderBox::computePositionedLogicalWidthUsing(SizeType widthSizeType, Lengt
// case because the value is not used for any further calculations.
logicalLeftValue = valueForLength(logicalLeft, containerLogicalWidth, renderView);
- computedValues.m_extent = computeContentBoxLogicalWidth(valueForLength(logicalWidth, containerLogicalWidth, renderView));
+ computedValues.m_extent = adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logicalWidth, containerLogicalWidth, renderView));
const LayoutUnit availableSpace = containerLogicalWidth - (logicalLeftValue + computedValues.m_extent + valueForLength(logicalRight, containerLogicalWidth, renderView) + bordersPlusPadding);
@@ -2827,7 +2833,7 @@ void RenderBox::computePositionedLogicalWidthUsing(SizeType widthSizeType, Lengt
computedValues.m_extent = min(max(preferredMinWidth, availableWidth), preferredWidth);
} else if (logicalLeftIsAuto && !logicalWidthIsAuto && !logicalRightIsAuto) {
// RULE 4: (solve for left)
- computedValues.m_extent = computeContentBoxLogicalWidth(valueForLength(logicalWidth, containerLogicalWidth, renderView));
+ computedValues.m_extent = adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logicalWidth, containerLogicalWidth, renderView));
logicalLeftValue = availableSpace - (computedValues.m_extent + valueForLength(logicalRight, containerLogicalWidth, renderView));
} else if (!logicalLeftIsAuto && logicalWidthIsAuto && !logicalRightIsAuto) {
// RULE 5: (solve for width)
@@ -2836,7 +2842,7 @@ void RenderBox::computePositionedLogicalWidthUsing(SizeType widthSizeType, Lengt
} else if (!logicalLeftIsAuto && !logicalWidthIsAuto && logicalRightIsAuto) {
// RULE 6: (no need solve for right)
logicalLeftValue = valueForLength(logicalLeft, containerLogicalWidth, renderView);
- computedValues.m_extent = computeContentBoxLogicalWidth(valueForLength(logicalWidth, containerLogicalWidth, renderView));
+ computedValues.m_extent = adjustContentBoxLogicalWidthForBoxSizing(valueForLength(logicalWidth, containerLogicalWidth, renderView));
}
}
@@ -3043,7 +3049,7 @@ void RenderBox::computePositionedLogicalHeightUsing(SizeType heightSizeType, Len
// NOTE: It is not necessary to solve for 'bottom' in the over constrained
// case because the value is not used for any further calculations.
- logicalHeightValue = computeContentBoxLogicalHeight(valueForLength(logicalHeightLength, containerLogicalHeight, renderView));
+ logicalHeightValue = adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeightLength, containerLogicalHeight, renderView));
logicalTopValue = valueForLength(logicalTop, containerLogicalHeight, renderView);
const LayoutUnit availableSpace = containerLogicalHeight - (logicalTopValue + logicalHeightValue + valueForLength(logicalBottom, containerLogicalHeight, renderView) + bordersPlusPadding);
@@ -3110,7 +3116,7 @@ void RenderBox::computePositionedLogicalHeightUsing(SizeType heightSizeType, Len
logicalHeightValue = contentLogicalHeight;
} else if (logicalTopIsAuto && !logicalHeightIsAuto && !logicalBottomIsAuto) {
// RULE 4: (solve of top)
- logicalHeightValue = computeContentBoxLogicalHeight(valueForLength(logicalHeightLength, containerLogicalHeight, renderView));
+ logicalHeightValue = adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeightLength, containerLogicalHeight, renderView));
logicalTopValue = availableSpace - (logicalHeightValue + valueForLength(logicalBottom, containerLogicalHeight, renderView));
} else if (!logicalTopIsAuto && logicalHeightIsAuto && !logicalBottomIsAuto) {
// RULE 5: (solve of height)
@@ -3118,7 +3124,7 @@ void RenderBox::computePositionedLogicalHeightUsing(SizeType heightSizeType, Len
logicalHeightValue = max<LayoutUnit>(0, availableSpace - (logicalTopValue + valueForLength(logicalBottom, containerLogicalHeight, renderView)));
} else if (!logicalTopIsAuto && !logicalHeightIsAuto && logicalBottomIsAuto) {
// RULE 6: (no need solve of bottom)
- logicalHeightValue = computeContentBoxLogicalHeight(valueForLength(logicalHeightLength, containerLogicalHeight, renderView));
+ logicalHeightValue = adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeightLength, containerLogicalHeight, renderView));
logicalTopValue = valueForLength(logicalTop, containerLogicalHeight, renderView);
}
}
diff --git a/Source/WebCore/rendering/RenderBox.h b/Source/WebCore/rendering/RenderBox.h
index ed70a94b8..af3c4624a 100644
--- a/Source/WebCore/rendering/RenderBox.h
+++ b/Source/WebCore/rendering/RenderBox.h
@@ -299,10 +299,10 @@ public:
virtual LayoutSize offsetFromContainer(RenderObject*, const LayoutPoint&, bool* offsetDependsOnPoint = 0) const;
- LayoutUnit computeBorderBoxLogicalWidth(LayoutUnit width) const;
- LayoutUnit computeBorderBoxLogicalHeight(LayoutUnit height) const;
- LayoutUnit computeContentBoxLogicalWidth(LayoutUnit width) const;
- LayoutUnit computeContentBoxLogicalHeight(LayoutUnit height) const;
+ LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const;
+ LayoutUnit adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const;
+ LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const;
+ LayoutUnit adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) const;
virtual void borderFitAdjust(LayoutRect&) const { } // Shrink the box in which the border paints if border-fit is set.
@@ -364,8 +364,8 @@ public:
LayoutUnit containingBlockAvailableLineWidthInRegion(RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const;
LayoutUnit perpendicularContainingBlockLogicalHeight() const;
- virtual void computeLogicalWidth();
- virtual void computeLogicalHeight();
+ virtual void updateLogicalWidth();
+ virtual void updateLogicalHeight();
void computeLogicalHeight(LogicalExtentComputedValues&) const;
RenderBoxRegionInfo* renderBoxRegionInfo(RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage, RenderBoxRegionInfoFlags = CacheRenderBoxRegionInfo) const;
@@ -449,11 +449,11 @@ public:
bool tryLayoutDoingPositionedMovementOnly()
{
LayoutUnit oldWidth = width();
- computeLogicalWidth();
+ updateLogicalWidth();
// If we shrink to fit our width may have changed, so we still need full layout.
if (oldWidth != width())
return false;
- computeLogicalHeight();
+ updateLogicalHeight();
return true;
}
diff --git a/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp b/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
index e2fe1cf5c..d6191b2e2 100644
--- a/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
+++ b/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
@@ -192,7 +192,7 @@ void RenderDeprecatedFlexibleBox::computePreferredLogicalWidths()
ASSERT(preferredLogicalWidthsDirty());
if (style()->width().isFixed() && style()->width().value() > 0)
- m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
+ m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value());
else {
m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0;
@@ -212,13 +212,13 @@ void RenderDeprecatedFlexibleBox::computePreferredLogicalWidths()
}
if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
- m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
- m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+ m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
+ m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
}
if (style()->maxWidth().isFixed()) {
- m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
- m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+ m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
+ m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
}
LayoutUnit borderAndPadding = borderAndPaddingLogicalWidth();
@@ -247,8 +247,8 @@ void RenderDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren, LayoutUnit)
LayoutSize previousSize = size();
- computeLogicalWidth();
- computeLogicalHeight();
+ updateLogicalWidth();
+ updateLogicalHeight();
m_overflow.clear();
@@ -269,7 +269,7 @@ void RenderDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren, LayoutUnit)
layoutVerticalBox(relayoutChildren);
LayoutUnit oldClientAfterEdge = clientLogicalBottom();
- computeLogicalHeight();
+ updateLogicalHeight();
if (previousSize.height() != height())
relayoutChildren = true;
@@ -414,7 +414,7 @@ void RenderDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
setHeight(height() + toAdd);
oldHeight = height();
- computeLogicalHeight();
+ updateLogicalHeight();
relayoutChildren = false;
if (oldHeight != height())
@@ -447,7 +447,7 @@ void RenderDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
// fill the height of a containing box by default.
// Now do a layout.
LayoutUnit oldChildHeight = child->height();
- child->computeLogicalHeight();
+ child->updateLogicalHeight();
if (oldChildHeight != child->height())
child->setChildNeedsLayout(true, MarkOnlyThis);
@@ -735,7 +735,7 @@ void RenderDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren)
// Now we have to calc our height, so we know how much space we have remaining.
oldHeight = height();
- computeLogicalHeight();
+ updateLogicalHeight();
if (oldHeight != height())
heightSpecified = true;
diff --git a/Source/WebCore/rendering/RenderEmbeddedObject.cpp b/Source/WebCore/rendering/RenderEmbeddedObject.cpp
index dcb3cc3b0..1111e299e 100644
--- a/Source/WebCore/rendering/RenderEmbeddedObject.cpp
+++ b/Source/WebCore/rendering/RenderEmbeddedObject.cpp
@@ -230,8 +230,8 @@ void RenderEmbeddedObject::layout()
{
ASSERT(needsLayout());
- computeLogicalWidth();
- computeLogicalHeight();
+ updateLogicalWidth();
+ updateLogicalHeight();
RenderPart::layout();
diff --git a/Source/WebCore/rendering/RenderFileUploadControl.cpp b/Source/WebCore/rendering/RenderFileUploadControl.cpp
index de9564456..ce6f278b5 100644
--- a/Source/WebCore/rendering/RenderFileUploadControl.cpp
+++ b/Source/WebCore/rendering/RenderFileUploadControl.cpp
@@ -184,7 +184,7 @@ void RenderFileUploadControl::computePreferredLogicalWidths()
const Font& font = style->font();
if (style->width().isFixed() && style->width().value() > 0)
- m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style->width().value());
+ m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style->width().value());
else {
// Figure out how big the filename space needs to be for a given number of characters
// (using "0" as the nominal character).
@@ -201,16 +201,16 @@ void RenderFileUploadControl::computePreferredLogicalWidths()
}
if (style->minWidth().isFixed() && style->minWidth().value() > 0) {
- m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style->minWidth().value()));
- m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style->minWidth().value()));
+ m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style->minWidth().value()));
+ m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style->minWidth().value()));
} else if (style->width().isPercent() || (style->width().isAuto() && style->height().isPercent()))
m_minPreferredLogicalWidth = 0;
else
m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
if (style->maxWidth().isFixed()) {
- m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style->maxWidth().value()));
- m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style->maxWidth().value()));
+ m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style->maxWidth().value()));
+ m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style->maxWidth().value()));
}
int toAdd = borderAndPaddingWidth();
diff --git a/Source/WebCore/rendering/RenderFlexibleBox.cpp b/Source/WebCore/rendering/RenderFlexibleBox.cpp
index 9f87cf835..c3a2a5c9a 100644
--- a/Source/WebCore/rendering/RenderFlexibleBox.cpp
+++ b/Source/WebCore/rendering/RenderFlexibleBox.cpp
@@ -167,7 +167,7 @@ void RenderFlexibleBox::computePreferredLogicalWidths()
RenderStyle* styleToUse = style();
// FIXME: This should probably be checking for isSpecified since you should be able to use percentage, calc or viewport relative values for width.
if (styleToUse->logicalWidth().isFixed() && styleToUse->logicalWidth().value() > 0)
- m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(styleToUse->logicalWidth().value());
+ m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalWidth().value());
else {
m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0;
@@ -217,14 +217,14 @@ void RenderFlexibleBox::computePreferredLogicalWidths()
// FIXME: This should probably be checking for isSpecified since you should be able to use percentage, calc or viewport relative values for min-width.
if (styleToUse->logicalMinWidth().isFixed() && styleToUse->logicalMinWidth().value() > 0) {
- m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMinWidth().value()));
- m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMinWidth().value()));
+ m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
+ m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
}
// FIXME: This should probably be checking for isSpecified since you should be able to use percentage, calc or viewport relative values for maxWidth.
if (styleToUse->logicalMaxWidth().isFixed()) {
- m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMaxWidth().value()));
- m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(styleToUse->logicalMaxWidth().value()));
+ m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
+ m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
}
LayoutUnit borderAndPadding = borderAndPaddingLogicalWidth();
@@ -254,7 +254,7 @@ void RenderFlexibleBox::layoutBlock(bool relayoutChildren, LayoutUnit)
LayoutSize previousSize = size();
setLogicalHeight(0);
- computeLogicalWidth();
+ updateLogicalWidth();
m_overflow.clear();
@@ -265,7 +265,7 @@ void RenderFlexibleBox::layoutBlock(bool relayoutChildren, LayoutUnit)
layoutFlexItems(*m_orderIterator, lineContexts);
LayoutUnit oldClientAfterEdge = clientLogicalBottom();
- computeLogicalHeight();
+ updateLogicalHeight();
repositionLogicalHeightDependentFlexItems(*m_orderIterator, lineContexts, oldClientAfterEdge);
if (size() != previousSize)
@@ -406,7 +406,7 @@ LayoutUnit RenderFlexibleBox::computeMainAxisExtentForChild(RenderBox* child, Si
// to figure out the logical height/width.
if (isColumnFlow())
return child->computeLogicalClientHeight(sizeType, size);
- return child->computeContentBoxLogicalWidth(valueForLength(size, maximumValue, view()));
+ return child->adjustContentBoxLogicalWidthForBoxSizing(valueForLength(size, maximumValue, view()));
}
WritingMode RenderFlexibleBox::transformedWritingMode() const
@@ -1058,7 +1058,7 @@ void RenderFlexibleBox::layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, cons
if (style()->flexDirection() == FlowColumnReverse) {
// We have to do an extra pass for column-reverse to reposition the flex items since the start depends
// on the height of the flexbox, which we only know after we've positioned all the flex items.
- computeLogicalHeight();
+ updateLogicalHeight();
layoutColumnReverse(children, childSizes, crossAxisOffset, availableFreeSpace);
}
diff --git a/Source/WebCore/rendering/RenderFlowThread.cpp b/Source/WebCore/rendering/RenderFlowThread.cpp
index 059ff4818..82686117a 100644
--- a/Source/WebCore/rendering/RenderFlowThread.cpp
+++ b/Source/WebCore/rendering/RenderFlowThread.cpp
@@ -166,7 +166,7 @@ void RenderFlowThread::layout()
previousRegionLogicalWidth = regionLogicalWidth;
}
- computeLogicalWidth(); // Called to get the maximum logical width for the region.
+ updateLogicalWidth(); // Called to get the maximum logical width for the region.
LayoutUnit logicalHeight = 0;
for (RenderRegionList::iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
@@ -196,7 +196,7 @@ void RenderFlowThread::layout()
dispatchRegionLayoutUpdateEvent();
}
-void RenderFlowThread::computeLogicalWidth()
+void RenderFlowThread::updateLogicalWidth()
{
LayoutUnit logicalWidth = 0;
for (RenderRegionList::iterator iter = m_regionList.begin(); iter != m_regionList.end(); ++iter) {
@@ -222,7 +222,7 @@ void RenderFlowThread::computeLogicalWidth()
}
}
-void RenderFlowThread::computeLogicalHeight()
+void RenderFlowThread::updateLogicalHeight()
{
LayoutUnit logicalHeight = 0;
diff --git a/Source/WebCore/rendering/RenderFlowThread.h b/Source/WebCore/rendering/RenderFlowThread.h
index 32803adde..f2a2046d2 100644
--- a/Source/WebCore/rendering/RenderFlowThread.h
+++ b/Source/WebCore/rendering/RenderFlowThread.h
@@ -73,8 +73,8 @@ public:
virtual void removeRegionFromThread(RenderRegion*);
const RenderRegionList& renderRegionList() const { return m_regionList; }
- virtual void computeLogicalWidth() OVERRIDE;
- virtual void computeLogicalHeight() OVERRIDE;
+ virtual void updateLogicalWidth() OVERRIDE;
+ virtual void updateLogicalHeight() OVERRIDE;
void paintFlowThreadPortionInRegion(PaintInfo&, RenderRegion*, LayoutRect flowThreadPortionRect, LayoutRect flowThreadPortionOverflowRect, const LayoutPoint&) const;
bool hitTestFlowThreadPortionInRegion(RenderRegion*, LayoutRect flowThreadPortionRect, LayoutRect flowThreadPortionOverflowRect, const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset) const;
diff --git a/Source/WebCore/rendering/RenderGrid.cpp b/Source/WebCore/rendering/RenderGrid.cpp
index 6a4519d1f..e282f7f41 100644
--- a/Source/WebCore/rendering/RenderGrid.cpp
+++ b/Source/WebCore/rendering/RenderGrid.cpp
@@ -76,14 +76,14 @@ void RenderGrid::layoutBlock(bool relayoutChildren, LayoutUnit)
LayoutSize previousSize = size();
setLogicalHeight(0);
- computeLogicalWidth();
+ updateLogicalWidth();
m_overflow.clear();
layoutGridItems();
LayoutUnit oldClientAfterEdge = clientLogicalBottom();
- computeLogicalHeight();
+ updateLogicalHeight();
if (size() != previousSize)
relayoutChildren = true;
diff --git a/Source/WebCore/rendering/RenderHTMLCanvas.cpp b/Source/WebCore/rendering/RenderHTMLCanvas.cpp
index 33116989e..5810da230 100644
--- a/Source/WebCore/rendering/RenderHTMLCanvas.cpp
+++ b/Source/WebCore/rendering/RenderHTMLCanvas.cpp
@@ -89,8 +89,8 @@ void RenderHTMLCanvas::canvasSizeChanged()
setPreferredLogicalWidthsDirty(true);
LayoutSize oldSize = size();
- computeLogicalWidth();
- computeLogicalHeight();
+ updateLogicalWidth();
+ updateLogicalHeight();
if (oldSize == size())
return;
diff --git a/Source/WebCore/rendering/RenderIFrame.cpp b/Source/WebCore/rendering/RenderIFrame.cpp
index 42480a085..c45e8059a 100644
--- a/Source/WebCore/rendering/RenderIFrame.cpp
+++ b/Source/WebCore/rendering/RenderIFrame.cpp
@@ -43,9 +43,9 @@ RenderIFrame::RenderIFrame(Element* element)
{
}
-void RenderIFrame::computeLogicalHeight()
+void RenderIFrame::updateLogicalHeight()
{
- RenderPart::computeLogicalHeight();
+ RenderPart::updateLogicalHeight();
if (!flattenFrame())
return;
@@ -61,13 +61,13 @@ void RenderIFrame::computeLogicalHeight()
}
}
-void RenderIFrame::computeLogicalWidth()
+void RenderIFrame::updateLogicalWidth()
{
// When we're seamless, we behave like a block. Thankfully RenderBox has all the right logic for this.
if (isSeamless())
- return RenderBox::computeLogicalWidth();
+ return RenderBox::updateLogicalWidth();
- RenderPart::computeLogicalWidth();
+ RenderPart::updateLogicalWidth();
if (!flattenFrame())
return;
@@ -162,7 +162,7 @@ bool RenderIFrame::flattenFrame() const
void RenderIFrame::layoutSeamlessly()
{
- computeLogicalWidth();
+ updateLogicalWidth();
// FIXME: Containers set their height to 0 before laying out their kids (as we're doing here)
// however, this causes FrameView::layout() to add vertical scrollbars, incorrectly inflating
// the resulting contentHeight(). We'll need to make FrameView::layout() smarter.
@@ -175,7 +175,7 @@ void RenderIFrame::layoutSeamlessly()
FrameView* childFrameView = static_cast<FrameView*>(widget());
if (childFrameView) // Widget should never be null during layout(), but just in case.
setLogicalHeight(childFrameView->contentsHeight() + borderTop() + borderBottom());
- computeLogicalHeight();
+ updateLogicalHeight();
updateWidgetPosition(); // Notify the Widget of our final height.
@@ -190,8 +190,8 @@ void RenderIFrame::layout()
ASSERT(needsLayout());
if (flattenFrame()) {
- RenderPart::computeLogicalWidth();
- RenderPart::computeLogicalHeight();
+ RenderPart::updateLogicalWidth();
+ RenderPart::updateLogicalHeight();
layoutWithFlattening(style()->width().isFixed(), style()->height().isFixed());
// FIXME: Is early return really OK here? What about transform/overflow code below?
return;
@@ -199,9 +199,9 @@ void RenderIFrame::layout()
layoutSeamlessly();
// Do not return so as to share the layer and overflow updates below.
} else {
- computeLogicalWidth();
+ updateLogicalWidth();
// No kids to layout as a replaced element.
- computeLogicalHeight();
+ updateLogicalHeight();
}
m_overflow.clear();
diff --git a/Source/WebCore/rendering/RenderIFrame.h b/Source/WebCore/rendering/RenderIFrame.h
index 8b93407e3..69e438213 100644
--- a/Source/WebCore/rendering/RenderIFrame.h
+++ b/Source/WebCore/rendering/RenderIFrame.h
@@ -40,8 +40,8 @@ public:
bool isSeamless() const;
private:
- virtual void computeLogicalHeight() OVERRIDE;
- virtual void computeLogicalWidth() OVERRIDE;
+ virtual void updateLogicalWidth() OVERRIDE;
+ virtual void updateLogicalHeight() OVERRIDE;
virtual LayoutUnit minPreferredLogicalWidth() const OVERRIDE;
virtual LayoutUnit maxPreferredLogicalWidth() const OVERRIDE;
diff --git a/Source/WebCore/rendering/RenderImage.cpp b/Source/WebCore/rendering/RenderImage.cpp
index 1953f5331..404025f6e 100644
--- a/Source/WebCore/rendering/RenderImage.cpp
+++ b/Source/WebCore/rendering/RenderImage.cpp
@@ -224,8 +224,8 @@ void RenderImage::imageDimensionsChanged(bool imageSizeChanged, const IntRect* r
LayoutUnit oldheight = height();
if (!preferredLogicalWidthsDirty())
setPreferredLogicalWidthsDirty(true);
- computeLogicalWidth();
- computeLogicalHeight();
+ updateLogicalWidth();
+ updateLogicalHeight();
if (imageSizeChanged || width() != oldwidth || height() != oldheight) {
shouldRepaint = false;
diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp
index 271999385..30f759c5d 100644
--- a/Source/WebCore/rendering/RenderLayer.cpp
+++ b/Source/WebCore/rendering/RenderLayer.cpp
@@ -2210,9 +2210,12 @@ bool RenderLayer::shouldSuspendScrollAnimations() const
return view->frameView()->shouldSuspendScrollAnimations();
}
-bool RenderLayer::isOnActivePage() const
+bool RenderLayer::scrollbarsCanBeActive() const
{
- return !m_renderer->document()->inPageCache();
+ RenderView* view = renderer()->view();
+ if (!view)
+ return false;
+ return view->frameView()->scrollbarsCanBeActive();
}
IntPoint RenderLayer::currentMousePosition() const
diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h
index 32d41e3ba..7c0953af4 100644
--- a/Source/WebCore/rendering/RenderLayer.h
+++ b/Source/WebCore/rendering/RenderLayer.h
@@ -805,7 +805,7 @@ private:
virtual IntSize overhangAmount() const;
virtual IntPoint currentMousePosition() const;
virtual bool shouldSuspendScrollAnimations() const;
- virtual bool isOnActivePage() const;
+ virtual bool scrollbarsCanBeActive() const;
virtual IntRect scrollableAreaBoundingBox() const OVERRIDE;
// Rectangle encompassing the scroll corner and resizer rect.
diff --git a/Source/WebCore/rendering/RenderListBox.cpp b/Source/WebCore/rendering/RenderListBox.cpp
index db70b08a5..7a2439779 100644
--- a/Source/WebCore/rendering/RenderListBox.cpp
+++ b/Source/WebCore/rendering/RenderListBox.cpp
@@ -198,7 +198,7 @@ void RenderListBox::computePreferredLogicalWidths()
m_maxPreferredLogicalWidth = 0;
if (style()->width().isFixed() && style()->width().value() > 0)
- m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
+ m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value());
else {
m_maxPreferredLogicalWidth = m_optionsWidth + 2 * optionsSpacingHorizontal;
if (m_vBar)
@@ -206,16 +206,16 @@ void RenderListBox::computePreferredLogicalWidths()
}
if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
- m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
- m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+ m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
+ m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
} else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
m_minPreferredLogicalWidth = 0;
else
m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
if (style()->maxWidth().isFixed()) {
- m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
- m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+ m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
+ m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
}
LayoutUnit toAdd = borderAndPaddingWidth();
@@ -250,14 +250,14 @@ LayoutUnit RenderListBox::listHeight() const
return itemHeight() * numItems() - rowSpacing;
}
-void RenderListBox::computeLogicalHeight()
+void RenderListBox::updateLogicalHeight()
{
int toAdd = borderAndPaddingHeight();
int itemHeight = RenderListBox::itemHeight();
setHeight(itemHeight * size() - rowSpacing + toAdd);
- RenderBlock::computeLogicalHeight();
+ RenderBlock::updateLogicalHeight();
if (m_vBar) {
bool enabled = numVisibleItems() < numItems();
@@ -821,9 +821,12 @@ bool RenderListBox::shouldSuspendScrollAnimations() const
return view->frameView()->shouldSuspendScrollAnimations();
}
-bool RenderListBox::isOnActivePage() const
+bool RenderListBox::scrollbarsCanBeActive() const
{
- return !document()->inPageCache();
+ RenderView* view = this->view();
+ if (!view)
+ return false;
+ return view->frameView()->scrollbarsCanBeActive();
}
ScrollableArea* RenderListBox::enclosingScrollableArea() const
diff --git a/Source/WebCore/rendering/RenderListBox.h b/Source/WebCore/rendering/RenderListBox.h
index 9a0110efc..d259e767c 100644
--- a/Source/WebCore/rendering/RenderListBox.h
+++ b/Source/WebCore/rendering/RenderListBox.h
@@ -77,7 +77,7 @@ private:
virtual void computePreferredLogicalWidths();
virtual LayoutUnit baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;
- virtual void computeLogicalHeight() OVERRIDE;
+ virtual void updateLogicalHeight() OVERRIDE;
virtual void layout();
@@ -119,7 +119,7 @@ private:
virtual int visibleWidth() const OVERRIDE;
virtual IntPoint currentMousePosition() const OVERRIDE;
virtual bool shouldSuspendScrollAnimations() const OVERRIDE;
- virtual bool isOnActivePage() const OVERRIDE;
+ virtual bool scrollbarsCanBeActive() const OVERRIDE;
virtual ScrollableArea* enclosingScrollableArea() const OVERRIDE;
virtual IntRect scrollableAreaBoundingBox() const OVERRIDE;
diff --git a/Source/WebCore/rendering/RenderListMarker.cpp b/Source/WebCore/rendering/RenderListMarker.cpp
index 04d8632a8..b4bc59e9f 100644
--- a/Source/WebCore/rendering/RenderListMarker.cpp
+++ b/Source/WebCore/rendering/RenderListMarker.cpp
@@ -222,7 +222,6 @@ static int toArmenianUnder10000(int number, bool upper, bool addCircumflex, UCha
if (int thousands = number / 1000) {
if (thousands == 7) {
- letters[length++] = 0x0548 + lowerOffset;
letters[length++] = 0x0552 + lowerOffset;
if (addCircumflex)
letters[length++] = 0x0302;
diff --git a/Source/WebCore/rendering/RenderMenuList.cpp b/Source/WebCore/rendering/RenderMenuList.cpp
index 06367c726..1ab55a602 100644
--- a/Source/WebCore/rendering/RenderMenuList.cpp
+++ b/Source/WebCore/rendering/RenderMenuList.cpp
@@ -278,21 +278,21 @@ void RenderMenuList::computePreferredLogicalWidths()
m_maxPreferredLogicalWidth = 0;
if (style()->width().isFixed() && style()->width().value() > 0)
- m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
+ m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value());
else
m_maxPreferredLogicalWidth = max(m_optionsWidth, theme()->minimumMenuListSize(style())) + m_innerBlock->paddingLeft() + m_innerBlock->paddingRight();
if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
- m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
- m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+ m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
+ m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
} else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
m_minPreferredLogicalWidth = 0;
else
m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
if (style()->maxWidth().isFixed()) {
- m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
- m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+ m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
+ m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
}
LayoutUnit toAdd = borderAndPaddingWidth();
diff --git a/Source/WebCore/rendering/RenderMeter.cpp b/Source/WebCore/rendering/RenderMeter.cpp
index 497bef91e..b539c0a3a 100644
--- a/Source/WebCore/rendering/RenderMeter.cpp
+++ b/Source/WebCore/rendering/RenderMeter.cpp
@@ -52,15 +52,15 @@ HTMLMeterElement* RenderMeter::meterElement() const
return toHTMLMeterElement(node()->shadowHost());
}
-void RenderMeter::computeLogicalWidth()
+void RenderMeter::updateLogicalWidth()
{
- RenderBox::computeLogicalWidth();
+ RenderBox::updateLogicalWidth();
setWidth(theme()->meterSizeForBounds(this, pixelSnappedIntRect(frameRect())).width());
}
-void RenderMeter::computeLogicalHeight()
+void RenderMeter::updateLogicalHeight()
{
- RenderBox::computeLogicalHeight();
+ RenderBox::updateLogicalHeight();
setHeight(theme()->meterSizeForBounds(this, pixelSnappedIntRect(frameRect())).height());
}
diff --git a/Source/WebCore/rendering/RenderMeter.h b/Source/WebCore/rendering/RenderMeter.h
index b73218598..9051951d1 100644
--- a/Source/WebCore/rendering/RenderMeter.h
+++ b/Source/WebCore/rendering/RenderMeter.h
@@ -39,8 +39,8 @@ public:
virtual void updateFromElement();
private:
- virtual void computeLogicalWidth() OVERRIDE;
- virtual void computeLogicalHeight() OVERRIDE;
+ virtual void updateLogicalWidth() OVERRIDE;
+ virtual void updateLogicalHeight() OVERRIDE;
virtual const char* renderName() const { return "RenderMeter"; }
virtual bool isMeter() const { return true; }
diff --git a/Source/WebCore/rendering/RenderMultiColumnBlock.cpp b/Source/WebCore/rendering/RenderMultiColumnBlock.cpp
index 64271a329..221cb4d30 100644
--- a/Source/WebCore/rendering/RenderMultiColumnBlock.cpp
+++ b/Source/WebCore/rendering/RenderMultiColumnBlock.cpp
@@ -68,9 +68,9 @@ void RenderMultiColumnBlock::computeColumnCountAndWidth()
}
}
-bool RenderMultiColumnBlock::recomputeLogicalWidth()
+bool RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth()
{
- bool relayoutChildren = RenderBlock::recomputeLogicalWidth();
+ bool relayoutChildren = RenderBlock::updateLogicalWidthAndColumnWidth();
LayoutUnit oldColumnWidth = m_columnWidth;
computeColumnCountAndWidth();
if (m_columnWidth != oldColumnWidth)
@@ -81,7 +81,7 @@ bool RenderMultiColumnBlock::recomputeLogicalWidth()
void RenderMultiColumnBlock::checkForPaginationLogicalHeightChange(LayoutUnit& /*pageLogicalHeight*/, bool& /*pageLogicalHeightChanged*/, bool& /*hasSpecifiedPageLogicalHeight*/)
{
// We don't actually update any of the variables. We just subclassed to adjust our column height.
- computeLogicalHeight();
+ updateLogicalHeight();
LayoutUnit newContentLogicalHeight = contentLogicalHeight();
if (newContentLogicalHeight > ZERO_LAYOUT_UNIT) {
// The regions will be invalidated when we lay them out and they change size to
diff --git a/Source/WebCore/rendering/RenderMultiColumnBlock.h b/Source/WebCore/rendering/RenderMultiColumnBlock.h
index bd9f12afe..58850c334 100644
--- a/Source/WebCore/rendering/RenderMultiColumnBlock.h
+++ b/Source/WebCore/rendering/RenderMultiColumnBlock.h
@@ -50,7 +50,7 @@ private:
virtual const char* renderName() const;
- virtual bool recomputeLogicalWidth() OVERRIDE;
+ virtual bool updateLogicalWidthAndColumnWidth() OVERRIDE;
virtual void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight) OVERRIDE;
virtual bool relayoutForPagination(bool hasSpecifiedPageLogicalHeight, LayoutUnit pageLogicalHeight, LayoutStateMaintainer&) OVERRIDE;
diff --git a/Source/WebCore/rendering/RenderMultiColumnFlowThread.h b/Source/WebCore/rendering/RenderMultiColumnFlowThread.h
index c69e65016..363cd0771 100644
--- a/Source/WebCore/rendering/RenderMultiColumnFlowThread.h
+++ b/Source/WebCore/rendering/RenderMultiColumnFlowThread.h
@@ -39,7 +39,7 @@ public:
private:
virtual const char* renderName() const OVERRIDE;
- virtual void computeLogicalHeight() OVERRIDE {}; // We simply remain at our intrinsic height.
+ virtual void updateLogicalHeight() OVERRIDE { } // We simply remain at our intrinsic height.
};
} // namespace WebCore
diff --git a/Source/WebCore/rendering/RenderMultiColumnSet.cpp b/Source/WebCore/rendering/RenderMultiColumnSet.cpp
index 369011980..83d1dea50 100644
--- a/Source/WebCore/rendering/RenderMultiColumnSet.cpp
+++ b/Source/WebCore/rendering/RenderMultiColumnSet.cpp
@@ -51,7 +51,7 @@ LayoutUnit RenderMultiColumnSet::pageLogicalTopForOffset(LayoutUnit offset) cons
return portionLogicalTop + columnIndex * computedColumnHeight();
}
-void RenderMultiColumnSet::computeLogicalWidth()
+void RenderMultiColumnSet::updateLogicalWidth()
{
// Our logical width starts off matching the column block itself.
// This width will be fixed up after the flow thread lays out once it is determined exactly how many
@@ -64,7 +64,7 @@ void RenderMultiColumnSet::computeLogicalWidth()
setComputedColumnWidthAndCount(parentBlock->columnWidth(), parentBlock->columnCount()); // FIXME: This will eventually vary if we are contained inside regions.
}
-void RenderMultiColumnSet::computeLogicalHeight()
+void RenderMultiColumnSet::updateLogicalHeight()
{
// Make sure our column height is up to date.
RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent());
diff --git a/Source/WebCore/rendering/RenderMultiColumnSet.h b/Source/WebCore/rendering/RenderMultiColumnSet.h
index a0d1c4536..f8fa37795 100644
--- a/Source/WebCore/rendering/RenderMultiColumnSet.h
+++ b/Source/WebCore/rendering/RenderMultiColumnSet.h
@@ -62,8 +62,8 @@ public:
}
private:
- virtual void computeLogicalWidth() OVERRIDE;
- virtual void computeLogicalHeight() OVERRIDE;
+ virtual void updateLogicalWidth() OVERRIDE;
+ virtual void updateLogicalHeight() OVERRIDE;
virtual void paintReplaced(PaintInfo&, const LayoutPoint& paintOffset) OVERRIDE;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation&, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
diff --git a/Source/WebCore/rendering/RenderRegion.cpp b/Source/WebCore/rendering/RenderRegion.cpp
index 80c848bf4..d895cd039 100644
--- a/Source/WebCore/rendering/RenderRegion.cpp
+++ b/Source/WebCore/rendering/RenderRegion.cpp
@@ -496,4 +496,44 @@ void RenderRegion::clearObjectStyleInRegion(const RenderObject* object)
clearObjectStyleInRegion(child);
}
+// FIXME: when RenderRegion will inherit from RenderBlock instead of RenderReplaced,
+// we should overwrite computePreferredLogicalWidths ( see https://bugs.webkit.org/show_bug.cgi?id=74132 )
+LayoutUnit RenderRegion::minPreferredLogicalWidth() const
+{
+ if (!m_flowThread || !m_isValid)
+ return RenderReplaced::minPreferredLogicalWidth();
+
+ // FIXME: Currently, the code handles only the <length> case for min-width. It should also support other values, like percentage, calc
+ // or viewport relative.
+ RenderStyle* styleToUse = style();
+ LayoutUnit minPreferredLogicalWidth = m_flowThread->minPreferredLogicalWidth();
+
+ if (styleToUse->logicalMinWidth().isFixed() && styleToUse->logicalMinWidth().value() > 0)
+ minPreferredLogicalWidth = std::max(minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
+
+ if (styleToUse->logicalMaxWidth().isFixed())
+ minPreferredLogicalWidth = std::min(minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
+
+ return minPreferredLogicalWidth + borderAndPaddingLogicalWidth();
+}
+
+LayoutUnit RenderRegion::maxPreferredLogicalWidth() const
+{
+ if (!m_flowThread || !m_isValid)
+ return RenderReplaced::maxPreferredLogicalWidth();
+
+ // FIXME: Currently, the code handles only the <length> case for max-width. It should also support other values, like percentage, calc
+ // or viewport relative.
+ RenderStyle* styleToUse = style();
+ LayoutUnit maxPreferredLogicalWidth = m_flowThread->maxPreferredLogicalWidth();
+
+ if (styleToUse->logicalMinWidth().isFixed() && styleToUse->logicalMinWidth().value() > 0)
+ maxPreferredLogicalWidth = std::max(maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
+
+ if (styleToUse->logicalMaxWidth().isFixed())
+ maxPreferredLogicalWidth = std::min(maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
+
+ return maxPreferredLogicalWidth + borderAndPaddingLogicalWidth();
+}
+
} // namespace WebCore
diff --git a/Source/WebCore/rendering/RenderRegion.h b/Source/WebCore/rendering/RenderRegion.h
index 7c9b87fc0..ee04ecc6d 100644
--- a/Source/WebCore/rendering/RenderRegion.h
+++ b/Source/WebCore/rendering/RenderRegion.h
@@ -100,6 +100,9 @@ public:
// height of a single column or page in the set.
virtual LayoutUnit pageLogicalWidth() const;
virtual LayoutUnit pageLogicalHeight() const;
+
+ virtual LayoutUnit minPreferredLogicalWidth() const OVERRIDE;
+ virtual LayoutUnit maxPreferredLogicalWidth() const OVERRIDE;
// This method represents the logical height of the entire flow thread portion used by the region or set.
// For RenderRegions it matches logicalPaginationHeight(), but for sets it is the height of all the pages
@@ -111,7 +114,7 @@ public:
// page.
virtual LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const;
- virtual void expandToEncompassFlowThreadContentsIfNeeded() {};
+ virtual void expandToEncompassFlowThreadContentsIfNeeded() { };
// Whether or not this region is a set.
virtual bool isRenderRegionSet() const { return false; }
@@ -129,6 +132,12 @@ protected:
private:
virtual const char* renderName() const { return "RenderRegion"; }
+ // FIXME: these functions should be revisited once RenderRegion inherits from RenderBlock
+ // instead of RenderReplaced (see https://bugs.webkit.org/show_bug.cgi?id=74132 )
+ // When width is auto, use normal block/box sizing code except when inline.
+ virtual bool isInlineBlockOrInlineTable() const OVERRIDE { return isInline() && style()->logicalWidth().isAuto(); }
+ virtual bool shouldComputeSizeAsReplaced() const OVERRIDE { return !style()->logicalWidth().isAuto(); }
+
virtual void insertedIntoTree() OVERRIDE;
virtual void willBeRemovedFromTree() OVERRIDE;
diff --git a/Source/WebCore/rendering/RenderReplaced.cpp b/Source/WebCore/rendering/RenderReplaced.cpp
index bcd967e6a..f765c38c4 100644
--- a/Source/WebCore/rendering/RenderReplaced.cpp
+++ b/Source/WebCore/rendering/RenderReplaced.cpp
@@ -85,8 +85,8 @@ void RenderReplaced::layout()
setHeight(minimumReplacedHeight());
- computeLogicalWidth();
- computeLogicalHeight();
+ updateLogicalWidth();
+ updateLogicalHeight();
m_overflow.clear();
addVisualEffectOverflow();
diff --git a/Source/WebCore/rendering/RenderSearchField.cpp b/Source/WebCore/rendering/RenderSearchField.cpp
index 2704cdc03..4ad458ab7 100644
--- a/Source/WebCore/rendering/RenderSearchField.cpp
+++ b/Source/WebCore/rendering/RenderSearchField.cpp
@@ -151,13 +151,13 @@ LayoutUnit RenderSearchField::computeControlHeight(LayoutUnit lineHeight, Layout
{
HTMLElement* resultsButton = resultsButtonElement();
if (RenderBox* resultsRenderer = resultsButton ? resultsButton->renderBox() : 0) {
- resultsRenderer->computeLogicalHeight();
+ resultsRenderer->updateLogicalHeight();
nonContentHeight = max(nonContentHeight, resultsRenderer->borderAndPaddingHeight() + resultsRenderer->marginHeight());
lineHeight = max(lineHeight, resultsRenderer->height());
}
HTMLElement* cancelButton = cancelButtonElement();
if (RenderBox* cancelRenderer = cancelButton ? cancelButton->renderBox() : 0) {
- cancelRenderer->computeLogicalHeight();
+ cancelRenderer->updateLogicalHeight();
nonContentHeight = max(nonContentHeight, cancelRenderer->borderAndPaddingHeight() + cancelRenderer->marginHeight());
lineHeight = max(lineHeight, cancelRenderer->height());
}
diff --git a/Source/WebCore/rendering/RenderSlider.cpp b/Source/WebCore/rendering/RenderSlider.cpp
index 1abca2fdb..1214abc09 100644
--- a/Source/WebCore/rendering/RenderSlider.cpp
+++ b/Source/WebCore/rendering/RenderSlider.cpp
@@ -76,21 +76,21 @@ void RenderSlider::computePreferredLogicalWidths()
m_maxPreferredLogicalWidth = 0;
if (style()->width().isFixed() && style()->width().value() > 0)
- m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
+ m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value());
else
m_maxPreferredLogicalWidth = defaultTrackLength * style()->effectiveZoom();
if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
- m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
- m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+ m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
+ m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
} else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
m_minPreferredLogicalWidth = 0;
else
m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
if (style()->maxWidth().isFixed()) {
- m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
- m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+ m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
+ m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
}
LayoutUnit toAdd = borderAndPaddingWidth();
diff --git a/Source/WebCore/rendering/RenderTable.cpp b/Source/WebCore/rendering/RenderTable.cpp
index 4f25944a6..9b247306a 100644
--- a/Source/WebCore/rendering/RenderTable.cpp
+++ b/Source/WebCore/rendering/RenderTable.cpp
@@ -212,7 +212,7 @@ void RenderTable::removeCaption(const RenderTableCaption* oldCaption)
m_captions.remove(index);
}
-void RenderTable::computeLogicalWidth()
+void RenderTable::updateLogicalWidth()
{
recalcSectionsIfNeeded();
@@ -346,7 +346,7 @@ void RenderTable::layout()
initMaxMarginValues();
LayoutUnit oldLogicalWidth = logicalWidth();
- computeLogicalWidth();
+ updateLogicalWidth();
if (logicalWidth() != oldLogicalWidth) {
for (unsigned i = 0; i < m_captions.size(); i++)
@@ -407,7 +407,7 @@ void RenderTable::layout()
setLogicalHeight(logicalHeight() + borderAndPaddingBefore);
if (!isOutOfFlowPositioned())
- computeLogicalHeight();
+ updateLogicalHeight();
Length logicalHeightLength = style()->logicalHeight();
LayoutUnit computedLogicalHeight = 0;
@@ -459,7 +459,7 @@ void RenderTable::layout()
}
if (isOutOfFlowPositioned())
- computeLogicalHeight();
+ updateLogicalHeight();
// table can be containing block of positioned elements.
// FIXME: Only pass true if width or height changed.
diff --git a/Source/WebCore/rendering/RenderTable.h b/Source/WebCore/rendering/RenderTable.h
index 46073c539..2e9ce21fa 100644
--- a/Source/WebCore/rendering/RenderTable.h
+++ b/Source/WebCore/rendering/RenderTable.h
@@ -261,7 +261,7 @@ private:
virtual void setCellLogicalWidths();
- virtual void computeLogicalWidth() OVERRIDE;
+ virtual void updateLogicalWidth() OVERRIDE;
LayoutUnit convertStyleLogicalWidthToComputedWidth(const Length& styleLogicalWidth, LayoutUnit availableWidth);
diff --git a/Source/WebCore/rendering/RenderTableCell.cpp b/Source/WebCore/rendering/RenderTableCell.cpp
index 05d0ad19a..e49ac10af 100644
--- a/Source/WebCore/rendering/RenderTableCell.cpp
+++ b/Source/WebCore/rendering/RenderTableCell.cpp
@@ -168,11 +168,11 @@ void RenderTableCell::computePreferredLogicalWidths()
}
}
-void RenderTableCell::computeLogicalWidth()
+void RenderTableCell::updateLogicalWidth()
{
}
-void RenderTableCell::updateLogicalWidth(LayoutUnit w)
+void RenderTableCell::setCellLogicalWidth(LayoutUnit w)
{
if (w == logicalWidth())
return;
diff --git a/Source/WebCore/rendering/RenderTableCell.h b/Source/WebCore/rendering/RenderTableCell.h
index 31ea56f59..f0cb33e51 100644
--- a/Source/WebCore/rendering/RenderTableCell.h
+++ b/Source/WebCore/rendering/RenderTableCell.h
@@ -76,7 +76,7 @@ public:
virtual void computePreferredLogicalWidths();
- void updateLogicalWidth(LayoutUnit);
+ void setCellLogicalWidth(LayoutUnit);
virtual int borderLeft() const;
virtual int borderRight() const;
@@ -175,7 +175,7 @@ private:
virtual void willBeRemovedFromTree() OVERRIDE;
- virtual void computeLogicalWidth() OVERRIDE;
+ virtual void updateLogicalWidth() OVERRIDE;
virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&);
virtual void paintMask(PaintInfo&, const LayoutPoint&);
diff --git a/Source/WebCore/rendering/RenderTableSection.cpp b/Source/WebCore/rendering/RenderTableSection.cpp
index 62379085d..8f084779a 100644
--- a/Source/WebCore/rendering/RenderTableSection.cpp
+++ b/Source/WebCore/rendering/RenderTableSection.cpp
@@ -294,7 +294,7 @@ void RenderTableSection::setCellLogicalWidths()
}
cell->repaint();
}
- cell->updateLogicalWidth(w);
+ cell->setCellLogicalWidth(w);
}
}
}
diff --git a/Source/WebCore/rendering/RenderTextControl.cpp b/Source/WebCore/rendering/RenderTextControl.cpp
index cb7637db3..c0d72cda9 100644
--- a/Source/WebCore/rendering/RenderTextControl.cpp
+++ b/Source/WebCore/rendering/RenderTextControl.cpp
@@ -144,7 +144,7 @@ int RenderTextControl::scrollbarThickness() const
return ScrollbarTheme::theme()->scrollbarThickness();
}
-void RenderTextControl::computeLogicalHeight()
+void RenderTextControl::updateLogicalHeight()
{
HTMLElement* innerText = innerTextElement();
ASSERT(innerText);
@@ -157,7 +157,7 @@ void RenderTextControl::computeLogicalHeight()
setHeight(height() + scrollbarThickness());
}
- RenderBlock::computeLogicalHeight();
+ RenderBlock::updateLogicalHeight();
}
void RenderTextControl::hitInnerTextElement(HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset)
@@ -262,7 +262,7 @@ void RenderTextControl::computePreferredLogicalWidths()
m_maxPreferredLogicalWidth = 0;
if (style()->width().isFixed() && style()->width().value() >= 0)
- m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = computeContentBoxLogicalWidth(style()->width().value());
+ m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(style()->width().value());
else {
// Use average character width. Matches IE.
AtomicString family = style()->font().family().family();
@@ -272,16 +272,16 @@ void RenderTextControl::computePreferredLogicalWidths()
}
if (style()->minWidth().isFixed() && style()->minWidth().value() > 0) {
- m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
- m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->minWidth().value()));
+ m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
+ m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->minWidth().value()));
} else if (style()->width().isPercent() || (style()->width().isAuto() && style()->height().isPercent()))
m_minPreferredLogicalWidth = 0;
else
m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth;
if (style()->maxWidth().isFixed()) {
- m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
- m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, computeContentBoxLogicalWidth(style()->maxWidth().value()));
+ m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
+ m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(style()->maxWidth().value()));
}
LayoutUnit toAdd = borderAndPaddingWidth();
diff --git a/Source/WebCore/rendering/RenderTextControl.h b/Source/WebCore/rendering/RenderTextControl.h
index 6d0e43af1..4fe4da571 100644
--- a/Source/WebCore/rendering/RenderTextControl.h
+++ b/Source/WebCore/rendering/RenderTextControl.h
@@ -62,7 +62,7 @@ protected:
virtual RenderStyle* textBaseStyle() const = 0;
virtual void updateFromElement();
- virtual void computeLogicalHeight() OVERRIDE;
+ virtual void updateLogicalHeight() OVERRIDE;
virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren);
private:
diff --git a/Source/WebCore/rendering/RenderThemeChromiumCommon.cpp b/Source/WebCore/rendering/RenderThemeChromiumCommon.cpp
index 68de37b12..9dbf0bd44 100644
--- a/Source/WebCore/rendering/RenderThemeChromiumCommon.cpp
+++ b/Source/WebCore/rendering/RenderThemeChromiumCommon.cpp
@@ -26,7 +26,8 @@
#include "config.h"
#include "RenderThemeChromiumCommon.h"
-#include "InputType.h"
+#include "FractionalLayoutUnit.h"
+#include "InputTypeNames.h"
namespace WebCore {
diff --git a/Source/WebCore/rendering/RenderView.cpp b/Source/WebCore/rendering/RenderView.cpp
index c79c66426..141ea52b6 100644
--- a/Source/WebCore/rendering/RenderView.cpp
+++ b/Source/WebCore/rendering/RenderView.cpp
@@ -90,13 +90,13 @@ bool RenderView::hitTest(const HitTestRequest& request, HitTestResult& result)
return layer()->hitTest(request, result);
}
-void RenderView::computeLogicalHeight()
+void RenderView::updateLogicalHeight()
{
if (!shouldUsePrintingLayout() && m_frameView)
setLogicalHeight(viewLogicalHeight());
}
-void RenderView::computeLogicalWidth()
+void RenderView::updateLogicalWidth()
{
if (!shouldUsePrintingLayout() && m_frameView)
setLogicalWidth(viewLogicalWidth());
diff --git a/Source/WebCore/rendering/RenderView.h b/Source/WebCore/rendering/RenderView.h
index 4848ca9bb..e6d832b97 100644
--- a/Source/WebCore/rendering/RenderView.h
+++ b/Source/WebCore/rendering/RenderView.h
@@ -58,8 +58,8 @@ public:
virtual bool isChildAllowed(RenderObject*, RenderStyle*) const OVERRIDE;
virtual void layout() OVERRIDE;
- virtual void computeLogicalWidth() OVERRIDE;
- virtual void computeLogicalHeight() OVERRIDE;
+ virtual void updateLogicalWidth() OVERRIDE;
+ virtual void updateLogicalHeight() OVERRIDE;
// FIXME: This override is not needed and should be removed
// it only exists to make computePreferredLogicalWidths public.
virtual void computePreferredLogicalWidths() OVERRIDE;
diff --git a/Source/WebCore/rendering/WrapShapeInfo.cpp b/Source/WebCore/rendering/WrapShapeInfo.cpp
index 8ef73c7fc..0a16cc51f 100644
--- a/Source/WebCore/rendering/WrapShapeInfo.cpp
+++ b/Source/WebCore/rendering/WrapShapeInfo.cpp
@@ -105,37 +105,28 @@ void WrapShapeInfo::computeShapeSize(LayoutUnit logicalWidth, LayoutUnit logical
// FIXME: Bug 89993: The wrap shape may come from the parent object
BasicShape* shape = m_block->style()->wrapShapeInside();
-
ASSERT(shape);
- switch (shape->type()) {
- case BasicShape::BASIC_SHAPE_RECTANGLE: {
- BasicShapeRectangle* rect = static_cast<BasicShapeRectangle *>(shape);
- m_shapeLeft = valueForLength(rect->x(), m_logicalWidth);
- m_shapeWidth = valueForLength(rect->width(), m_logicalWidth);
- m_shapeTop = valueForLength(rect->y(), m_logicalHeight);
- m_shapeHeight = valueForLength(rect->height(), m_logicalHeight);
- break;
- }
- // FIXME: Bug 89707: Enable shape inside for non-rectangular shapes
- case BasicShape::BASIC_SHAPE_CIRCLE:
- case BasicShape::BASIC_SHAPE_ELLIPSE:
- case BasicShape::BASIC_SHAPE_POLYGON: {
- notImplemented();
- break;
- }
- }
+ m_shape = ExclusionShape::createExclusionShape(shape, logicalWidth, logicalHeight);
+ ASSERT(m_shape);
}
bool WrapShapeInfo::computeSegmentsForLine(LayoutUnit lineTop)
{
m_lineTop = lineTop;
m_segments.clear();
+
if (lineState() == LINE_INSIDE_SHAPE) {
- LineSegment segment;
- segment.logicalLeft = m_shapeLeft;
- segment.logicalRight = m_shapeLeft + m_shapeWidth;
- m_segments.append(segment);
+ ASSERT(m_shape);
+
+ Vector<ExclusionInterval> intervals;
+ m_shape->getInsideIntervals(lineTop, lineTop, intervals); // FIXME: Bug 95479, workaround for now
+ for (size_t i = 0; i < intervals.size(); i++) {
+ LineSegment segment;
+ segment.logicalLeft = intervals[i].x1;
+ segment.logicalRight = intervals[i].x2;
+ m_segments.append(segment);
+ }
}
return m_segments.size();
}
diff --git a/Source/WebCore/rendering/WrapShapeInfo.h b/Source/WebCore/rendering/WrapShapeInfo.h
index a8036d0bb..f996b6419 100644
--- a/Source/WebCore/rendering/WrapShapeInfo.h
+++ b/Source/WebCore/rendering/WrapShapeInfo.h
@@ -32,7 +32,10 @@
#if ENABLE(CSS_EXCLUSIONS)
+#include "ExclusionShape.h"
+#include "FloatRect.h"
#include "LayoutTypesInlineMethods.h"
+#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
@@ -64,14 +67,18 @@ public:
static void removeWrapShapeInfoForRenderBlock(const RenderBlock*);
static bool isWrapShapeInfoEnabledForRenderBlock(const RenderBlock*);
- LayoutUnit shapeTop() const { return m_shapeTop; }
+ LayoutUnit shapeLogicalTop() const
+ {
+ ASSERT(m_shape);
+ return m_shape->shapeLogicalBoundingBox().y();
+ }
bool hasSegments() const;
const SegmentList& segments() const
{
ASSERT(hasSegments());
return m_segments;
}
- bool computeSegmentsForLine(LayoutUnit);
+ bool computeSegmentsForLine(LayoutUnit lineTop);
LineState lineState() const;
void computeShapeSize(LayoutUnit logicalWidth, LayoutUnit logicalHeight);
void dirtyWrapShapeSize() { m_wrapShapeSizeDirty = true; }
@@ -80,10 +87,7 @@ private:
WrapShapeInfo(RenderBlock*);
RenderBlock* m_block;
- LayoutUnit m_shapeLeft;
- LayoutUnit m_shapeTop;
- LayoutUnit m_shapeWidth;
- LayoutUnit m_shapeHeight;
+ OwnPtr<ExclusionShape> m_shape;
LayoutUnit m_lineTop;
LayoutUnit m_logicalWidth;
@@ -95,10 +99,15 @@ private:
inline WrapShapeInfo::LineState WrapShapeInfo::lineState() const
{
- if (m_lineTop < m_shapeTop)
+ ASSERT(m_shape);
+ FloatRect shapeBounds = m_shape->shapeLogicalBoundingBox();
+
+ if (m_lineTop < shapeBounds.y())
return LINE_BEFORE_SHAPE;
- if (m_lineTop < m_shapeTop + m_shapeHeight)
+
+ if (m_lineTop < shapeBounds.maxY())
return LINE_INSIDE_SHAPE;
+
return LINE_AFTER_SHAPE;
}
diff --git a/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp b/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
index acc0c6d36..fe0d9a12b 100644
--- a/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
+++ b/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
@@ -105,14 +105,14 @@ const AffineTransform& RenderSVGForeignObject::localToParentTransform() const
return m_localToParentTransform;
}
-void RenderSVGForeignObject::computeLogicalWidth()
+void RenderSVGForeignObject::updateLogicalWidth()
{
// FIXME: Investigate in size rounding issues
// FIXME: Remove unnecessary rounding when layout is off ints: webkit.org/b/63656
setWidth(static_cast<int>(roundf(m_viewport.width())));
}
-void RenderSVGForeignObject::computeLogicalHeight()
+void RenderSVGForeignObject::updateLogicalHeight()
{
// FIXME: Investigate in size rounding issues
// FIXME: Remove unnecessary rounding when layout is off ints: webkit.org/b/63656
diff --git a/Source/WebCore/rendering/svg/RenderSVGForeignObject.h b/Source/WebCore/rendering/svg/RenderSVGForeignObject.h
index 0d65d5741..1f37a3fcf 100644
--- a/Source/WebCore/rendering/svg/RenderSVGForeignObject.h
+++ b/Source/WebCore/rendering/svg/RenderSVGForeignObject.h
@@ -59,8 +59,8 @@ public:
virtual void setNeedsTransformUpdate() { m_needsTransformUpdate = true; }
private:
- virtual void computeLogicalWidth() OVERRIDE;
- virtual void computeLogicalHeight() OVERRIDE;
+ virtual void updateLogicalWidth() OVERRIDE;
+ virtual void updateLogicalHeight() OVERRIDE;
virtual const AffineTransform& localToParentTransform() const;
virtual AffineTransform localTransform() const { return m_localTransform; }
diff --git a/Source/WebCore/rendering/svg/RenderSVGRoot.cpp b/Source/WebCore/rendering/svg/RenderSVGRoot.cpp
index f7115d926..747679266 100644
--- a/Source/WebCore/rendering/svg/RenderSVGRoot.cpp
+++ b/Source/WebCore/rendering/svg/RenderSVGRoot.cpp
@@ -229,8 +229,8 @@ void RenderSVGRoot::layout()
LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && needsLayout);
LayoutSize oldSize = size();
- computeLogicalWidth();
- computeLogicalHeight();
+ updateLogicalWidth();
+ updateLogicalHeight();
buildLocalToBorderBoxTransform();
SVGSVGElement* svg = static_cast<SVGSVGElement*>(node());
diff --git a/Source/WebCore/svg/SVGPointList.cpp b/Source/WebCore/svg/SVGPointList.cpp
index be4009a70..2e05960d7 100644
--- a/Source/WebCore/svg/SVGPointList.cpp
+++ b/Source/WebCore/svg/SVGPointList.cpp
@@ -36,7 +36,7 @@ String SVGPointList::valueAsString() const
unsigned size = this->size();
for (unsigned i = 0; i < size; ++i) {
if (i > 0)
- builder.append(" "); // FIXME: Shouldn't we use commas to seperate?
+ builder.append(' '); // FIXME: Shouldn't we use commas to seperate?
const FloatPoint& point = at(i);
builder.append(String::number(point.x()) + ' ' + String::number(point.y()));
diff --git a/Source/WebCore/svg/animation/SMILTimeContainer.cpp b/Source/WebCore/svg/animation/SMILTimeContainer.cpp
index bdf004f2c..1e4627bc2 100644
--- a/Source/WebCore/svg/animation/SMILTimeContainer.cpp
+++ b/Source/WebCore/svg/animation/SMILTimeContainer.cpp
@@ -204,18 +204,6 @@ void SMILTimeContainer::sortByPriority(Vector<SVGSMILElement*>& smilElements, SM
updateDocumentOrderIndexes();
std::sort(smilElements.begin(), smilElements.end(), PriorityCompare(elapsed));
}
-
-static bool applyOrderSortFunction(SVGSMILElement* a, SVGSMILElement* b)
-{
- if (!a->hasTagName(SVGNames::animateTransformTag) && b->hasTagName(SVGNames::animateTransformTag))
- return true;
- return false;
-}
-
-static void sortByApplyOrder(Vector<SVGSMILElement*>& smilElements)
-{
- std::sort(smilElements.begin(), smilElements.end(), applyOrderSortFunction);
-}
void SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
{
@@ -229,12 +217,11 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
// FIXME: This should also consider timing relationships between the elements. Dependents
// have higher priority.
sortByPriority(toAnimate, elapsed);
-
+
// Calculate animation contributions.
typedef pair<SVGElement*, QualifiedName> ElementAttributePair;
- typedef HashMap<ElementAttributePair, RefPtr<SVGSMILElement> > ResultElementMap;
+ typedef HashMap<ElementAttributePair, SVGSMILElement*> ResultElementMap;
ResultElementMap resultsElements;
- HashSet<SVGSMILElement*> contributingElements;
for (unsigned n = 0; n < toAnimate.size(); ++n) {
SVGSMILElement* animation = toAnimate[n];
ASSERT(animation->timeContainer() == this);
@@ -242,7 +229,7 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
SVGElement* targetElement = animation->targetElement();
if (!targetElement)
continue;
-
+
QualifiedName attributeName = animation->attributeName();
if (attributeName == anyQName()) {
if (animation->hasTagName(SVGNames::animateMotionTag))
@@ -250,51 +237,36 @@ void SMILTimeContainer::updateAnimations(SMILTime elapsed, bool seekToTime)
else
continue;
}
-
+
// Results are accumulated to the first animation that animates and contributes to a particular element/attribute pair.
ElementAttributePair key(targetElement, attributeName);
- SVGSMILElement* resultElement = resultsElements.get(key).get();
- bool accumulatedResultElement = false;
+ SVGSMILElement* resultElement = resultsElements.get(key);
if (!resultElement) {
if (!animation->hasValidAttributeType())
continue;
resultElement = animation;
- resultsElements.add(key, resultElement);
- accumulatedResultElement = true;
- }
+ } else
+ ASSERT(resultElement != animation);
// This will calculate the contribution from the animation and add it to the resultsElement.
- if (animation->progress(elapsed, resultElement, seekToTime))
- contributingElements.add(resultElement);
- else if (accumulatedResultElement)
- resultsElements.remove(key);
+ if (animation->progress(elapsed, resultElement, seekToTime) && resultElement == animation)
+ resultsElements.add(key, resultElement);
SMILTime nextFireTime = animation->nextProgressTime();
if (nextFireTime.isFinite())
earliersFireTime = min(nextFireTime, earliersFireTime);
}
-
- Vector<SVGSMILElement*> animationsToApply;
- ResultElementMap::iterator end = resultsElements.end();
- for (ResultElementMap::iterator it = resultsElements.begin(); it != end; ++it) {
- SVGSMILElement* animation = it->second.get();
- if (contributingElements.contains(animation))
- animationsToApply.append(animation);
- }
- unsigned animationsToApplySize = animationsToApply.size();
- if (!animationsToApplySize) {
+ unsigned resultsToApplySize = resultsElements.size();
+ if (!resultsToApplySize) {
startTimer(earliersFireTime, animationFrameDelay);
return;
}
- // Sort <animateTranform> to be the last one to be applied. <animate> may change transform attribute as
- // well (directly or indirectly by modifying <use> x/y) and this way transforms combine properly.
- sortByApplyOrder(animationsToApply);
-
// Apply results to target elements.
- for (unsigned i = 0; i < animationsToApplySize; ++i)
- animationsToApply[i]->applyResultsToTarget();
+ ResultElementMap::iterator end = resultsElements.end();
+ for (ResultElementMap::iterator it = resultsElements.begin(); it != end; ++it)
+ it->second->applyResultsToTarget();
startTimer(earliersFireTime, animationFrameDelay);
Document::updateStyleForAllDocuments();
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index 9e13907e8..4084fc269 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,3 +1,36 @@
+2012-09-11 Raphael Kubo da Costa <rakuco@webkit.org>
+
+ [EFL] Rewrite the EFL-related Find modules
+ https://bugs.webkit.org/show_bug.cgi?id=95237
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * PlatformEfl.cmake: Stop setting the LINK_FLAGS property and add
+ libraries and include directories for each Enlightenment
+ Foundation Library used by the port.
+
+2012-09-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Add a configure step to the Qt build system
+
+ This allows building the Qt port using just 'qmake WebKit.pro'. Using
+ the build-webkit script is still supported, and will add slightly more
+ logic to the build, such as detecting the need for clean or incremental
+ builds.
+
+ Internally, the build system now uses a new variable, WEBKIT_CONFIG, for
+ all things related to configuring the build, such as use/have/enable flags,
+ and these are translated to defines in default_post. Project files should
+ no longer check contains(DEFINES,...) to detect features, but use the new
+ enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2
+ options have been translated into WEBKIT_CONFIG options as well, and can
+ be checked using build?().
+
+ Reviewed by Simon Hausmann.
+
+ * WebKit1.pri:
+ * WebKit1.pro:
+
2012-09-06 Crystal Zhang <haizhang@rim.com>
[BlackBerry] Implement a color picker
diff --git a/Source/WebKit/PlatformEfl.cmake b/Source/WebKit/PlatformEfl.cmake
index 84f0240a3..80d1c0736 100644
--- a/Source/WebKit/PlatformEfl.cmake
+++ b/Source/WebKit/PlatformEfl.cmake
@@ -1,11 +1,3 @@
-LIST(APPEND WebKit_LINK_FLAGS
- ${ECORE_X_LDFLAGS}
- ${EDJE_LDFLAGS}
- ${EFLDEPS_LDFLAGS}
- ${EFREET_LDFLAGS}
- ${EVAS_LDFLAGS}
-)
-
LIST(APPEND WebKit_INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/Source"
"${WEBKIT_DIR}/efl/ewk"
@@ -16,13 +8,14 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/platform/graphics/efl"
"${WEBCORE_DIR}/platform/network/soup"
${CAIRO_INCLUDE_DIRS}
- ${ECORE_X_INCLUDE_DIRS}
+ ${ECORE_INCLUDE_DIRS}
+ ${ECORE_EVAS_INCLUDE_DIRS}
+ ${ECORE_INPUT_INCLUDE_DIRS}
${EDJE_INCLUDE_DIRS}
- ${EFLDEPS_INCLUDE_DIRS}
${EFREET_INCLUDE_DIRS}
+ ${EINA_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
- ${EUKIT_INCLUDE_DIRS}
- ${EDBUS_INCLUDE_DIRS}
+ ${HARFBUZZ_INCLUDE_DIRS}
${LIBXML2_INCLUDE_DIR}
${LIBXSLT_INCLUDE_DIR}
${SQLITE_INCLUDE_DIR}
@@ -141,12 +134,13 @@ LIST(APPEND WebKit_SOURCES
LIST(APPEND WebKit_LIBRARIES
${CAIRO_LIBRARIES}
- ${ECORE_X_LIBRARIES}
- ${EFLDEPS_LIBRARIES}
+ ${ECORE_LIBRARIES}
+ ${ECORE_EVAS_LIBRARIES}
+ ${ECORE_INPUT_LIBRARIES}
${EFREET_LIBRARIES}
- ${EUKIT_LIBRARIES}
- ${EDBUS_LIBRARIES}
+ ${EVAS_LIBRARIES}
${FREETYPE_LIBRARIES}
+ ${HARFBUZZ_LIBRARIES}
${LIBXML2_LIBRARIES}
${SQLITE_LIBRARIES}
${FONTCONFIG_LIBRARIES}
@@ -309,13 +303,6 @@ SET(EWKUnitTests_INCLUDE_DIRECTORIES
${EDJE_INCLUDE_DIRS}
)
-SET(EWKUnitTests_LINK_FLAGS
- ${ECORE_LDFLAGS}
- ${ECORE_EVAS_LDFLAGS}
- ${EVAS_LDFLAGS}
- ${EDJE_LDFLAGS}
-)
-
IF (ENABLE_GLIB_SUPPORT)
LIST(APPEND EWKUnitTests_INCLUDE_DIRECTORIES "${WTF_DIR}/wtf/gobject")
LIST(APPEND EWKUnitTests_LIBRARIES
@@ -349,7 +336,6 @@ IF (ENABLE_API_TESTS)
ADD_TEST(${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${testName})
SET_TESTS_PROPERTIES(${testName} PROPERTIES TIMEOUT 60)
TARGET_LINK_LIBRARIES(${testName} ${EWKUnitTests_LIBRARIES} ewkTestUtils)
- ADD_TARGET_PROPERTIES(${testName} LINK_FLAGS "${EWKUnitTests_LINK_FLAGS}")
SET_TARGET_PROPERTIES(${testName} PROPERTIES FOLDER "WebKit")
ENDFOREACH ()
ENDIF ()
diff --git a/Source/WebKit/WebKit1.pri b/Source/WebKit/WebKit1.pri
index cadb77e14..fa2f6fa34 100644
--- a/Source/WebKit/WebKit1.pri
+++ b/Source/WebKit/WebKit1.pri
@@ -12,7 +12,7 @@ INCLUDEPATH += \
$$SOURCE_DIR/qt/WebCoreSupport \
$$ROOT_WEBKIT_DIR/Source/WTF/wtf/qt
-contains(DEFINES, ENABLE_VIDEO=1):contains(DEFINES, WTF_USE_QTKIT=1) {
+enable?(VIDEO):use?(QTKIT) {
LIBS += -framework Security -framework IOKit
# We can know the Mac OS version by using the Darwin major version
@@ -29,21 +29,21 @@ contains(DEFINES, ENABLE_VIDEO=1):contains(DEFINES, WTF_USE_QTKIT=1) {
}
}
-contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1)|contains(DEFINES, ENABLE_ORIENTATION_EVENTS=1) {
+enable?(DEVICE_ORIENTATION)|enable?(ORIENTATION_EVENTS) {
QT += sensors
}
-contains(DEFINES, ENABLE_GEOLOCATION=1): QT += location
+enable?(GEOLOCATION): QT += location
contains(CONFIG, texmap): DEFINES += WTF_USE_TEXTURE_MAPPER=1
-plugin_backend_xlib: PKGCONFIG += x11
+use?(PLUGIN_BACKEND_XLIB): PKGCONFIG += x11
QT += network widgets
-contains(DEFINES, HAVE_QTQUICK=1): QT += quick
-contains(DEFINES, HAVE_QTPRINTSUPPORT=1): QT += printsupport
+have?(QTQUICK): QT += quick
+have?(QTPRINTSUPPORT): QT += printsupport
-contains(DEFINES, WTF_USE_TEXTURE_MAPPER_GL=1)|contains(DEFINES, ENABLE_WEBGL=1) {
+use?(TEXTURE_MAPPER_GL)|enable?(WEBGL) {
QT *= opengl
# Make sure OpenGL libs are after the webcore lib so MinGW can resolve symbols
win32*:!win32-msvc*: LIBS += $$QMAKE_LIBS_OPENGL
diff --git a/Source/WebKit/WebKit1.pro b/Source/WebKit/WebKit1.pro
index b29b7bd27..ae23c4eca 100644
--- a/Source/WebKit/WebKit1.pro
+++ b/Source/WebKit/WebKit1.pro
@@ -103,18 +103,18 @@ INCLUDEPATH += \
$$PWD/qt/Api \
$$PWD/qt/WebCoreSupport
-contains(DEFINES, ENABLE_VIDEO=1) {
- !contains(DEFINES, WTF_USE_QTKIT=1):!contains(DEFINES, WTF_USE_GSTREAMER=1):contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
+enable?(VIDEO) {
+ !use?(QTKIT):!use?(GSTREAMER):use?(QT_MULTIMEDIA) {
HEADERS += $$PWD/qt/WebCoreSupport/FullScreenVideoWidget.h
SOURCES += $$PWD/qt/WebCoreSupport/FullScreenVideoWidget.cpp
}
- contains(DEFINES, WTF_USE_QTKIT=1) | contains(DEFINES, WTF_USE_GSTREAMER=1) | contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
+ use?(QTKIT) | use?(GSTREAMER) | use?(QT_MULTIMEDIA) {
HEADERS += $$PWD/qt/WebCoreSupport/FullScreenVideoQt.h
SOURCES += $$PWD/qt/WebCoreSupport/FullScreenVideoQt.cpp
}
- contains(DEFINES, WTF_USE_QTKIT=1) {
+ use?(QTKIT) {
INCLUDEPATH += \
$$PWD/../WebCore/platform/qt/ \
$$PWD/../WebCore/platform/mac/ \
@@ -136,7 +136,7 @@ contains(DEFINES, ENABLE_VIDEO=1) {
}
}
-contains(DEFINES, ENABLE_ICONDATABASE=1) {
+enable?(ICONDATABASE) {
HEADERS += \
$$PWD/../WebCore/loader/icon/IconDatabaseClient.h \
$$PWD/qt/WebCoreSupport/IconDatabaseClientQt.h
@@ -145,12 +145,12 @@ contains(DEFINES, ENABLE_ICONDATABASE=1) {
$$PWD/qt/WebCoreSupport/IconDatabaseClientQt.cpp
}
-contains(DEFINES, ENABLE_GEOLOCATION=1) {
+enable?(GEOLOCATION) {
HEADERS += \
$$PWD/qt/WebCoreSupport/GeolocationClientQt.h
SOURCES += \
$$PWD/qt/WebCoreSupport/GeolocationClientQt.cpp
}
-contains(DEFINES, WTF_USE_3D_GRAPHICS=1): WEBKIT += angle
+use?(3D_GRAPHICS): WEBKIT += angle
diff --git a/Source/WebKit/blackberry/Api/InRegionScroller.cpp b/Source/WebKit/blackberry/Api/InRegionScroller.cpp
index 6b367b10f..1c1508f7f 100644
--- a/Source/WebKit/blackberry/Api/InRegionScroller.cpp
+++ b/Source/WebKit/blackberry/Api/InRegionScroller.cpp
@@ -362,7 +362,21 @@ static bool canScrollInnerFrame(Frame* frame)
// FIXME: Fix RenderBox::canBeScrolledAndHasScrollableArea method instead.
static bool canScrollRenderBox(RenderBox* box)
{
- if (!box || !box->hasOverflowClip())
+ if (!box)
+ return false;
+
+ // We use this to make non-overflown contents layers to actually
+ // be overscrollable.
+ if (box->layer() && box->layer()->usesCompositedScrolling()
+ && box->layer()->enclosingElement() && box->layer()->enclosingElement()->isElementNode()) {
+ DEFINE_STATIC_LOCAL(QualifiedName, forceOverscrollAttr, (nullAtom, "data-blackberry-force-overscroll", nullAtom));
+
+ Element* element = static_cast<Element*>(box->layer()->enclosingElement());
+ if (element->fastHasAttribute(forceOverscrollAttr))
+ return true;
+ }
+
+ if (!box->hasOverflowClip())
return false;
if (box->scrollsOverflowX() && (box->scrollWidth() != box->clientWidth())
diff --git a/Source/WebKit/blackberry/Api/WebPage.cpp b/Source/WebKit/blackberry/Api/WebPage.cpp
index 2052b0e82..8ec9dd7f5 100644
--- a/Source/WebKit/blackberry/Api/WebPage.cpp
+++ b/Source/WebKit/blackberry/Api/WebPage.cpp
@@ -1486,6 +1486,9 @@ void WebPagePrivate::notifyInRegionScrollStopped()
{
if (m_inRegionScroller->d->isActive()) {
enqueueRenderingOfClippedContentOfScrollableAreaAfterInRegionScrolling();
+ // Notify the client side to clear InRegion scrollable areas before we destroy them here.
+ std::vector<Platform::ScrollViewBase*> emptyInRegionScrollableAreas;
+ m_client->notifyInRegionScrollableAreasChanged(emptyInRegionScrollableAreas);
m_inRegionScroller->d->reset();
}
}
@@ -4156,7 +4159,7 @@ void WebPagePrivate::setScrollOriginPoint(const Platform::IntPoint& point)
m_inRegionScroller->d->calculateInRegionScrollableAreasForPoint(point);
if (!m_inRegionScroller->d->activeInRegionScrollableAreas().empty())
- m_client->notifyInRegionScrollingStartingPointChanged(m_inRegionScroller->d->activeInRegionScrollableAreas());
+ m_client->notifyInRegionScrollableAreasChanged(m_inRegionScroller->d->activeInRegionScrollableAreas());
}
void WebPage::setScrollOriginPoint(const Platform::IntPoint& point)
diff --git a/Source/WebKit/blackberry/Api/WebPageClient.h b/Source/WebKit/blackberry/Api/WebPageClient.h
index 137c81e87..bd8c73ba4 100644
--- a/Source/WebKit/blackberry/Api/WebPageClient.h
+++ b/Source/WebKit/blackberry/Api/WebPageClient.h
@@ -101,7 +101,7 @@ public:
virtual void notifyRunLayoutTestsFinished() = 0;
- virtual void notifyInRegionScrollingStartingPointChanged(const std::vector<Platform::ScrollViewBase*>&) = 0;
+ virtual void notifyInRegionScrollableAreasChanged(const std::vector<Platform::ScrollViewBase*>&) = 0;
virtual void notifyNoMouseMoveOrTouchMoveHandlers() = 0;
virtual void notifyDocumentOnLoad(bool) = 0;
diff --git a/Source/WebKit/blackberry/ChangeLog b/Source/WebKit/blackberry/ChangeLog
index 823f9b8b0..f7418cb77 100644
--- a/Source/WebKit/blackberry/ChangeLog
+++ b/Source/WebKit/blackberry/ChangeLog
@@ -1,3 +1,158 @@
+2012-09-11 Jinwoo Song <jinwoo7.song@samsung.com>
+
+ Deploy StringBuilder::appendNumber() and StringBuilder::appendLiteral() in more places
+ https://bugs.webkit.org/show_bug.cgi?id=96344
+
+ Reviewed by Benjamin Poulain.
+
+ Use StringBuilder::appendNumber() instead of String::number(). Also deploy
+ StringBuilder::appendLiteral() instead of String::append() in the surrounding code.
+
+ * WebCoreSupport/DatePickerClient.cpp:
+ (WebCore::DatePickerClient::generateHTML):
+ * WebCoreSupport/SelectPopupClient.cpp:
+ (WebCore::SelectPopupClient::generateHTML):
+
+2012-09-11 Jacky Jiang <zhajiang@rim.com>
+
+ [BlackBerry] InRegion scrollable area dangling pointers were accessed in UI thread
+ https://bugs.webkit.org/show_bug.cgi?id=96318
+
+ Reviewed by Antonio Gomes.
+
+ PR: 204066
+ Dangling pointers were accessed in UI thread, as the actual InRegion
+ scrollable areas of WebKit side had been destroyed before that in
+ WebKit thread after UI thread set scrolling to false.
+ Notify the client side to clear InRegion scrollable areas before we
+ destroy them in WebKit side.
+
+ Internally reviewed by Gen Mak and George Staikos.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::notifyInRegionScrollStopped):
+ (BlackBerry::WebKit::WebPagePrivate::setScrollOriginPoint):
+ * Api/WebPageClient.h:
+
+2012-09-11 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Suppress keyboard requests while processing spell checking suggestions.
+ https://bugs.webkit.org/show_bug.cgi?id=96394
+
+ Reviewed by Rob Buis.
+
+ Suppress the VKB notification when the touch event
+ is a spell checking request.
+
+ PR 192925.
+
+ Reviewed Internally by Gen Mak.
+
+ * WebKitSupport/TouchEventHandler.cpp:
+ (BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
+
+2012-09-11 Mike Fenton <mifenton@rim.com>
+
+ [BlackBerry] Colour Dialog popup request should return proper state.
+ https://bugs.webkit.org/show_bug.cgi?id=96392
+
+ Reviewed by Rob Buis.
+
+ Return proper state from openColorPopup dependent on
+ whether the popup actually opened.
+
+ Reviewed Internally by Chris Hutten-Czapski
+
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::openColorPopup):
+
+2012-09-11 Nima Ghanavatian <nghanavatian@rim.com>
+
+ [BlackBerry] Take account for single words that exceed our client character limit
+ https://bugs.webkit.org/show_bug.cgi?id=96389
+
+ Fix to the processing of long single-line text using getRangeForSpellCheckWithFineGranularity.
+ This was failing if a single word was longer than our maximum allowed limit.
+
+ Internally reviewed by Mike Fenton.
+
+ Reviewed by Rob Buis.
+
+ * WebKitSupport/InputHandler.cpp:
+ (WebKit):
+ (BlackBerry::WebKit::InputHandler::getRangeForSpellCheckWithFineGranularity):
+
+2012-09-11 Arvid Nilsson <anilsson@rim.com>
+
+ [BlackBerry] SelectionHandler drops caret change notifications
+ https://bugs.webkit.org/show_bug.cgi?id=96378
+
+ Reviewed by Antonio Gomes.
+
+ The selection handler deliberately drops caret change notifications
+ while the input handler is processing changes, to avoid displaying
+ intermediate state during a complex change.
+
+ However, this meant that the client was never informed of the final
+ caret position.
+
+ Fixed by notifying client about caret change after processing ends, if
+ one or more caret change notifications were dropped during processing.
+
+ PR #205073
+
+ Reviewed internally by Mike Fenton.
+
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::setProcessingChange):
+ (WebKit):
+ * WebKitSupport/InputHandler.h:
+ (InputHandler):
+ * WebKitSupport/SelectionHandler.cpp:
+ (BlackBerry::WebKit::SelectionHandler::SelectionHandler):
+ (BlackBerry::WebKit::SelectionHandler::inputHandlerDidFinishProcessingChange):
+ (WebKit):
+ (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
+ (BlackBerry::WebKit::SelectionHandler::notifyCaretPositionChangedIfNeeded):
+ * WebKitSupport/SelectionHandler.h:
+ (SelectionHandler):
+
+2012-09-10 Antonio Gomes <agomes@rim.com>
+
+ [BlackBerry] add a way to overscroll non-overflown content
+ https://bugs.webkit.org/show_bug.cgi?id=96331
+ [UxD] Vertical lists should always be scrollable
+ PR #195305
+
+ Reviewed by Yong Li.
+ Internally reviewed by Gen Mak.
+
+ Check if the RenderLayer is composited / hardware acceleratable prior to
+ check if its contents overflows. If that is the case, check if
+ our custom data-blackberry-force-overscroll is present.
+
+ That makes it possible for us to align to UX requirements: settings
+ and CCM panels should be always scrollable.
+
+ * Api/InRegionScroller.cpp:
+ (BlackBerry::WebKit::canScrollRenderBox):
+ * WebKitSupport/InRegionScrollableArea.cpp:
+ (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
+
+2012-09-10 Genevieve Mak <gmak@rim.com>
+
+ Change -data-blackberry-webworks-context to -data-webworks-context
+ because not all webworks apps are blackberry apps.
+ https://bugs.webkit.org/show_bug.cgi?id=96297
+
+ Reviewed by Antonio Gomes.
+
+ PR #193726
+ Rubber Stamped interally by Mike Fenton.
+
+ * WebKitSupport/DOMSupport.cpp:
+ (BlackBerry::WebKit::DOMSupport::webWorksContext):
+
2012-09-09 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Fix flicker due to introduction of the fence extension.
diff --git a/Source/WebKit/blackberry/WebCoreSupport/DatePickerClient.cpp b/Source/WebKit/blackberry/WebCoreSupport/DatePickerClient.cpp
index 93f7fda26..b652bdf89 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/DatePickerClient.cpp
+++ b/Source/WebKit/blackberry/WebCoreSupport/DatePickerClient.cpp
@@ -50,28 +50,28 @@ DatePickerClient::~DatePickerClient()
void DatePickerClient::generateHTML(BlackBerry::Platform::BlackBerryInputType type, const BlackBerry::WebKit::WebString& value, const BlackBerry::WebKit::WebString& min, const BlackBerry::WebKit::WebString& max, double step)
{
StringBuilder source;
- source.append("<style>\n");
+ source.appendLiteral("<style>\n");
// Include CSS file.
source.append(popupControlBlackBerryCss,
sizeof(popupControlBlackBerryCss));
- source.append("</style>\n<style>");
+ source.appendLiteral("</style>\n<style>");
source.append(timeControlBlackBerryCss,
sizeof(timeControlBlackBerryCss));
- source.append("</style></head><body>\n");
- source.append("<script>\n");
- source.append("window.addEventListener('load', function () {");
+ source.appendLiteral("</style></head><body>\n"
+ "<script>\n"
+ "window.addEventListener('load', function () {");
switch (type) {
case BlackBerry::Platform::InputTypeDate:
- source.append("window.popupcontrol.show(\"Date\", ");
+ source.appendLiteral("window.popupcontrol.show(\"Date\", ");
break;
case BlackBerry::Platform::InputTypeTime:
- source.append("window.popupcontrol.show(\"Time\", ");
+ source.appendLiteral("window.popupcontrol.show(\"Time\", ");
break;
case BlackBerry::Platform::InputTypeDateTime:
- source.append("window.popupcontrol.show(\"DateTime\", ");
+ source.appendLiteral("window.popupcontrol.show(\"DateTime\", ");
break;
case BlackBerry::Platform::InputTypeDateTimeLocal:
- source.append("window.popupcontrol.show(\"DateTimeLocal\", ");
+ source.appendLiteral("window.popupcontrol.show(\"DateTimeLocal\", ");
break;
case BlackBerry::Platform::InputTypeMonth:
case BlackBerry::Platform::InputTypeWeek:
@@ -81,21 +81,21 @@ void DatePickerClient::generateHTML(BlackBerry::Platform::BlackBerryInputType ty
if (!value.isEmpty())
source.append("\"" + String(value.impl()) + "\", ");
else
- source.append("0, ");
+ source.appendLiteral("0, ");
if (!min.isEmpty())
source.append(String(min.impl()) + ", ");
else
- source.append("0, ");
+ source.appendLiteral("0, ");
if (!max.isEmpty())
source.append(String(max.impl()) + ", ");
else
- source.append("0, ");
+ source.appendLiteral("0, ");
source.append(String::number(step));
- source.append("); \n }); \n");
+ source.appendLiteral("); \n }); \n");
source.append(timeControlBlackBerryJs, sizeof(timeControlBlackBerryJs));
- source.append("</script>\n");
- source.append("</body> </html>\n");
+ source.appendLiteral("</script>\n"
+ "</body> </html>\n");
m_source = source.toString();
}
diff --git a/Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.cpp b/Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.cpp
index 138a6718f..8e71686d1 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.cpp
+++ b/Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.cpp
@@ -66,64 +66,70 @@ void SelectPopupClient::generateHTML(bool multiple, int size, const ScopeArray<B
const int* itemType, bool* selecteds)
{
StringBuilder source;
- source.append("<style>\n");
+ source.appendLiteral("<style>\n");
// Include CSS file.
source.append(popupControlBlackBerryCss,
sizeof(popupControlBlackBerryCss));
- source.append("</style>\n<style>");
+ source.appendLiteral("</style>\n<style>");
source.append(selectControlBlackBerryCss,
sizeof(selectControlBlackBerryCss));
- source.append("</style></head><body>\n");
- source.append("<script>\n");
- source.append("window.addEventListener('load', function () {");
+ source.appendLiteral("</style></head><body>\n"
+ "<script>\n"
+ "window.addEventListener('load', function () {");
if (m_multiple)
- source.append("window.select.show(true, ");
+ source.appendLiteral("window.select.show(true, ");
else
- source.append("window.select.show(false, ");
+ source.appendLiteral("window.select.show(false, ");
// Add labels.
- source.append("[");
+ source.append('[');
for (int i = 0; i < size; i++) {
source.append("'" + String(labels[i].impl()).replace('\\', "\\\\").replace('\'', "\\'") + "'");
// Don't append ',' to last element.
if (i != size - 1)
- source.append(", ");
+ source.appendLiteral(", ");
}
- source.append("], ");
+ source.appendLiteral("], ");
// Add enables.
- source.append("[");
+ source.append('[');
for (int i = 0; i < size; i++) {
- source.append(enableds[i]? "true" : "false");
+ if (enableds[i])
+ source.appendLiteral("true");
+ else
+ source.appendLiteral("false");
// Don't append ',' to last element.
if (i != size - 1)
- source.append(", ");
+ source.appendLiteral(", ");
}
- source.append("], ");
+ source.appendLiteral("], ");
// Add itemType.
- source.append("[");
+ source.append('[');
for (int i = 0; i < size; i++) {
- source.append(String::number(itemType[i]));
+ source.appendNumber(itemType[i]);
// Don't append ',' to last element.
if (i != size - 1)
- source.append(", ");
+ source.appendLiteral(", ");
}
- source.append("], ");
+ source.appendLiteral("], ");
// Add selecteds
- source.append("[");
+ source.append('[');
for (int i = 0; i < size; i++) {
- source.append(selecteds[i]? "true" : "false");
+ if (selecteds[i])
+ source.appendLiteral("true");
+ else
+ source.appendLiteral("false");
// Don't append ',' to last element.
if (i != size - 1)
- source.append(", ");
+ source.appendLiteral(", ");
}
- source.append("] ");
- source.append(", 'Cancel'");
+ source.appendLiteral("] "
+ ", 'Cancel'");
// If multi-select, add OK button for confirm.
if (m_multiple)
- source.append(", 'OK'");
- source.append("); \n }); \n");
+ source.appendLiteral(", 'OK'");
+ source.appendLiteral("); \n }); \n");
source.append(selectControlBlackBerryJs, sizeof(selectControlBlackBerryJs));
- source.append("</script>\n");
- source.append("</body> </html>\n");
+ source.appendLiteral("</script>\n"
+ "</body> </html>\n");
m_source = source.toString();
}
diff --git a/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp b/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
index 433b8cdc9..bb0a02851 100644
--- a/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/DOMSupport.cpp
@@ -121,7 +121,7 @@ WTF::String webWorksContext(const WebCore::Element* element)
if (!element)
return WTF::String();
- DEFINE_STATIC_LOCAL(QualifiedName, webworksContextAttr, (nullAtom, "data-blackberry-webworks-context", nullAtom));
+ DEFINE_STATIC_LOCAL(QualifiedName, webworksContextAttr, (nullAtom, "data-webworks-context", nullAtom));
if (element->fastHasAttribute(webworksContextAttr))
return element->fastGetAttribute(webworksContextAttr);
diff --git a/Source/WebKit/blackberry/WebKitSupport/InRegionScrollableArea.cpp b/Source/WebKit/blackberry/WebKitSupport/InRegionScrollableArea.cpp
index 0e6c95432..f19a9712a 100644
--- a/Source/WebKit/blackberry/WebKitSupport/InRegionScrollableArea.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/InRegionScrollableArea.cpp
@@ -94,6 +94,7 @@ InRegionScrollableArea::InRegionScrollableArea(WebPagePrivate* webPage, RenderLa
// Both caches below are self-exclusive.
if (m_layer->usesCompositedScrolling()) {
+ m_forceContentToBeVerticallyScrollable = true;
m_supportsCompositedScrolling = true;
ASSERT(m_layer->backing()->hasScrollingLayer());
m_camouflagedCompositedScrollableLayer = reinterpret_cast<unsigned>(m_layer->backing()->scrollingContentsLayer()->platformLayer());
diff --git a/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp b/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
index 7e5d46262..6e8715a5e 100644
--- a/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
@@ -338,6 +338,17 @@ static VirtualKeyboardEnterKeyType keyboardEnterKeyTypeAttribute(const WebCore::
return VKBEnterKeyNotSet;
}
+void InputHandler::setProcessingChange(bool processingChange)
+{
+ if (processingChange == m_processingChange)
+ return;
+
+ m_processingChange = processingChange;
+
+ if (!m_processingChange)
+ m_webPage->m_selectionHandler->inputHandlerDidFinishProcessingChange();
+}
+
WTF::String InputHandler::elementText()
{
if (!isActiveTextEdit())
@@ -927,14 +938,24 @@ void InputHandler::spellCheckBlock(VisibleSelection& visibleSelection, TextCheck
PassRefPtr<Range> InputHandler::getRangeForSpellCheckWithFineGranularity(VisiblePosition startPosition, VisiblePosition endPosition)
{
VisiblePosition endOfCurrentWord = endOfWord(startPosition);
- RefPtr<Range> rangeForSpellChecking;
- while (endOfCurrentWord != endPosition) {
- rangeForSpellChecking = VisibleSelection(startPosition, endOfCurrentWord).toNormalizedRange();
- // If we exceed the MaxSpellCheckingStringLength limit, then go back one word and return this range.
- if (rangeForSpellChecking->text().length() >= MaxSpellCheckingStringLength)
- return VisibleSelection(startPosition, endOfWord(previousWordPosition(endOfCurrentWord))).toNormalizedRange();
- endOfCurrentWord = endOfWord(nextWordPosition(endOfCurrentWord));
+ // Keep iterating until one of our cases is hit, or we've incremented the starting position right to the end.
+ while (startPosition != endPosition) {
+ // Check the text length within this range.
+ if (VisibleSelection(startPosition, endOfCurrentWord).toNormalizedRange()->text().length() >= MaxSpellCheckingStringLength) {
+ // If this is not the first word, return a Range with end boundary set to the previous word.
+ if (startOfWord(endOfCurrentWord, LeftWordIfOnBoundary) != startPosition)
+ return VisibleSelection(startPosition, endOfWord(previousWordPosition(endOfCurrentWord), LeftWordIfOnBoundary)).toNormalizedRange();
+
+ // Our first word has gone over the character limit. Increment the starting position past an uncheckable word.
+ startPosition = endOfCurrentWord;
+ } else if (endOfCurrentWord == endPosition) {
+ // Return the last segment if the end of our word lies at the end of the range.
+ return VisibleSelection(startPosition, endPosition).toNormalizedRange();
+ } else {
+ // Increment the current word.
+ endOfCurrentWord = endOfWord(nextWordPosition(endOfCurrentWord));
+ }
}
return 0;
}
@@ -980,9 +1001,9 @@ bool InputHandler::openColorPopup(HTMLInputElement* element)
// Check if popup already exists, close it if does.
m_webPage->m_page->chrome()->client()->closePagePopup(0);
+
ColorPickerClient* client = new ColorPickerClient(element->value(), m_webPage, element);
- m_webPage->m_page->chrome()->client()->openPagePopup(client, WebCore::IntRect());
- return true;
+ return m_webPage->m_page->chrome()->client()->openPagePopup(client, WebCore::IntRect());
}
void InputHandler::setInputValue(const WTF::String& value)
diff --git a/Source/WebKit/blackberry/WebKitSupport/InputHandler.h b/Source/WebKit/blackberry/WebKitSupport/InputHandler.h
index f0ecb7dfe..e6d3297f7 100644
--- a/Source/WebKit/blackberry/WebKitSupport/InputHandler.h
+++ b/Source/WebKit/blackberry/WebKitSupport/InputHandler.h
@@ -110,7 +110,7 @@ public:
void setPopupListIndexes(int size, const bool* selecteds);
bool processingChange() const { return m_processingChange; }
- void setProcessingChange(bool processingChange) { m_processingChange = processingChange; }
+ void setProcessingChange(bool);
WTF::String elementText();
diff --git a/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp b/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
index 1e150c33e..f289cf5dc 100644
--- a/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp
@@ -70,6 +70,7 @@ SelectionHandler::SelectionHandler(WebPagePrivate* page)
, m_selectionActive(false)
, m_caretActive(false)
, m_lastUpdatedEndPointIsValid(false)
+ , m_didSuppressCaretPositionChangedNotification(false)
{
}
@@ -270,6 +271,12 @@ void SelectionHandler::setCaretPosition(const WebCore::IntPoint &position)
SelectionLog(LogLevelInfo, "SelectionHandler::setCaretPosition point valid, cursor updated");
}
+void SelectionHandler::inputHandlerDidFinishProcessingChange()
+{
+ if (m_didSuppressCaretPositionChangedNotification)
+ notifyCaretPositionChangedIfNeeded();
+}
+
// This function makes sure we are not reducing the selection to a caret selection.
static bool shouldExtendSelectionInDirection(const VisibleSelection& selection, unsigned short character)
{
@@ -853,13 +860,14 @@ void SelectionHandler::selectionPositionChanged(bool forceUpdateWithoutChange)
if (m_webPage->m_inputHandler->isInputMode() && m_webPage->m_inputHandler->processingChange()) {
m_webPage->m_client->cancelSelectionVisuals();
+
+ // Since we're not calling notifyCaretPositionChangedIfNeeded now, we have to do so at the end of processing
+ // to avoid dropping a notification.
+ m_didSuppressCaretPositionChangedNotification = true;
return;
}
- if (m_caretActive || (m_webPage->m_inputHandler->isInputMode() && m_webPage->focusedOrMainFrame()->selection()->isCaret())) {
- // This may update the caret to no longer be active.
- caretPositionChanged();
- }
+ notifyCaretPositionChangedIfNeeded();
// Enter selection mode if selection type is RangeSelection, and disable selection if
// selection is active and becomes caret selection.
@@ -948,6 +956,17 @@ void SelectionHandler::selectionPositionChanged(bool forceUpdateWithoutChange)
SelectionTimingLog(LogLevelInfo, "SelectionHandler::selectionPositionChanged completed at %f", m_timer.elapsed());
}
+
+void SelectionHandler::notifyCaretPositionChangedIfNeeded()
+{
+ m_didSuppressCaretPositionChangedNotification = false;
+
+ if (m_caretActive || (m_webPage->m_inputHandler->isInputMode() && m_webPage->focusedOrMainFrame()->selection()->isCaret())) {
+ // This may update the caret to no longer be active.
+ caretPositionChanged();
+ }
+}
+
// NOTE: This function is not in WebKit coordinates.
void SelectionHandler::caretPositionChanged()
{
diff --git a/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h b/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h
index 36895e3a5..74f17467d 100644
--- a/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h
+++ b/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.h
@@ -71,7 +71,10 @@ public:
bool lastUpdatedEndPointIsValid() const { return m_lastUpdatedEndPointIsValid; }
+ void inputHandlerDidFinishProcessingChange();
+
private:
+ void notifyCaretPositionChangedIfNeeded();
void caretPositionChanged();
void regionForTextQuads(WTF::Vector<WebCore::FloatQuad>&, BlackBerry::Platform::IntRectRegion&, bool shouldClipToVisibleContent = true) const;
WebCore::IntRect clippingRectForVisibleContent() const;
@@ -89,6 +92,7 @@ private:
bool m_selectionActive;
bool m_caretActive;
bool m_lastUpdatedEndPointIsValid;
+ bool m_didSuppressCaretPositionChangedNotification;
BlackBerry::Platform::IntRectRegion m_lastSelectionRegion;
BlackBerry::Platform::StopWatch m_timer;
diff --git a/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp b/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp
index e64a4c5cc..9cb28d8c5 100644
--- a/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp
+++ b/Source/WebKit/blackberry/WebKitSupport/TouchEventHandler.cpp
@@ -235,8 +235,10 @@ bool TouchEventHandler::handleTouchPoint(Platform::TouchPoint& point, bool useFa
// Apply any suppressed changes. This does not eliminate the need
// for the show after the handling of fat finger pressed as it may
- // have triggered a state change.
- m_webPage->m_inputHandler->processPendingKeyboardVisibilityChange();
+ // have triggered a state change. Leave the change suppressed if
+ // we are triggering spell check options.
+ if (!shouldRequestSpellCheckOptions)
+ m_webPage->m_inputHandler->processPendingKeyboardVisibilityChange();
if (shouldSuppressMouseDownOnTouchDown())
handleFatFingerPressed();
diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog
index 2a621451b..35eb61279 100644
--- a/Source/WebKit/chromium/ChangeLog
+++ b/Source/WebKit/chromium/ChangeLog
@@ -1,3 +1,229 @@
+2012-09-11 Iain Merrick <husky@chromium.org>
+
+ [chromium] Fix double call to scrollBegin() when handling scroll gesture
+ https://bugs.webkit.org/show_bug.cgi?id=95322
+
+ Reviewed by James Robinson.
+
+ WebCompositorInputHandlerImpl::handleGestureFling() calls scrollBegin() on its
+ client, then if the result is ScrollStarted, it creates a PlatformGestureCurve
+ object to handle the fling animation. This patch adds a matching scrollEnd()
+ before the animation starts.
+
+ Now using strict mocks in WebCompositorInputHandlerImplTest, which turns all
+ unexpected calls into test failures. This ensures that scrollBegin / scrollEnd
+ happen exactly when we want and at no other times.
+
+ * src/WebCompositorInputHandlerImpl.cpp:
+ (WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
+ * tests/WebCompositorInputHandlerImplTest.cpp:
+ (WebCompositorInputHandlerImplTest):
+ (WebKit::TEST_F):
+
+2012-09-11 Peter Beverloo <peter@chromium.org>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-09-11 Keishi Hattori <keishi@webkit.org>
+
+ Create Localizer factory method for LocaleMac
+ https://bugs.webkit.org/show_bug.cgi?id=96355
+
+ Reviewed by Kent Tamura.
+
+ * tests/LocaleMacTest.cpp:
+ (testNumberIsReversible): Use Localizer::create.
+ (testNumbers):
+
+2012-09-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r128150.
+ http://trac.webkit.org/changeset/128150
+ https://bugs.webkit.org/show_bug.cgi?id=96357
+
+ it broke chromium compilation (Requested by loislo on
+ #webkit).
+
+ * DEPS:
+
+2012-09-10 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed. Rolled DEPS.
+
+ * DEPS:
+
+2012-09-10 Joanmarie Diggs <jdiggs@igalia.com>
+
+ Properly expose <legend> elements to ATs
+ https://bugs.webkit.org/show_bug.cgi?id=84137
+
+ Reviewed by Chris Fleizach.
+
+ Created a new WebCore Accessibility Role, LegendRole. Used it to map to
+ the expected platform role, ATK_ROLE_LABEL. Also established the needed
+ AtkRelation pair, label-for/labelled-by between the legend and fieldset.
+
+ * public/WebAccessibilityRole.h: added WebAccessibilityRoleLegend
+ * src/AssertMatchingEnums.cpp: added the assert matching rule for
+ WebAccessibilityRoleLegend and LegendRole
+
+2012-09-10 Beth Dakin <bdakin@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=96158
+ Need API to suppress scrollbar animations
+ -and corresponding-
+ <rdar://problem/12210972>
+
+ Reviewed by Sam Weinig.
+
+ ScrollableArea::isOnActivePage() has been re-named to
+ ScrollableArea:: scrollbarsCanBeActive().
+ * src/ScrollbarGroup.cpp:
+ (WebKit::ScrollbarGroup::scrollbarsCanBeActive):
+ * src/ScrollbarGroup.h:
+ * tests/GraphicsLayerChromiumTest.cpp:
+ * tests/ScrollAnimatorNoneTest.cpp:
+ (MockScrollableArea):
+
+2012-09-10 Dan Alcantara <dfalcantara@chromium.org>
+
+ [chromium, android] Reloading a page with a different user agent can cause the page to be zoomed in
+ https://bugs.webkit.org/show_bug.cgi?id=90222
+
+ Reviewed by Adam Barth.
+
+ When reloading a page with an overridden URL, the page's scroll and zoom
+ state will be restored once the reload is complete. This is problematic
+ in situations when switching between mobile and desktop versions of the
+ same site because it will zoom back in on a random part of alternate page.
+ This CL just avoids that situation by resetting the zoom and scale whenever
+ this type of reload occurs.
+
+ Chromium half: https://chromiumcodereview.appspot.com/10889019
+
+ * public/WebView.h:
+ (WebView):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::resetScrollAndScaleState):
+ (WebKit):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+
+2012-09-10 Adam Barth <abarth@chromium.org>
+
+ [V8] V8AuxiliaryContext used by IDB leaks memory
+ https://bugs.webkit.org/show_bug.cgi?id=96317
+
+ Reviewed by Tony Chang.
+
+ Call the V8 APIs directly instead of using a helper class.
+
+ * tests/IDBBindingUtilitiesTest.cpp:
+ (WebCore::TEST):
+
+2012-09-10 Adam Barth <abarth@chromium.org>
+
+ [V8] Inline firstFrame and currentFrame into their unique callers
+ https://bugs.webkit.org/show_bug.cgi?id=96309
+
+ Reviewed by Eric Seidel.
+
+ This patch just lines these WebCore functions because we only call them
+ from here.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrame::frameForEnteredContext):
+ (WebKit::WebFrame::frameForCurrentContext):
+
+2012-09-10 Rick Byers <rbyers@chromium.org>
+
+ [chromium] Add unused GestureTapCancel
+ https://bugs.webkit.org/show_bug.cgi?id=96183
+
+ Reviewed by Adam Barth.
+
+ This adds a new 'tap cancel' gesture type. This is temporarily unused,
+ so that we can change chromium to start sending the gesture type
+ without breaking anything.
+
+ * public/WebInputEvent.h:
+ * src/PageWidgetDelegate.cpp:
+ (WebKit::PageWidgetDelegate::handleInputEvent):
+ * src/WebInputEventConversion.cpp:
+ (WebKit::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
+ * src/WebPopupMenuImpl.cpp:
+ (WebKit::WebPopupMenuImpl::handleInputEvent):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::handleGestureEvent):
+
+2012-09-10 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Define new setSharedWorkerRepository function in preparation for removing WebKitPlatformSupport::sharedWorkerRepository()
+ https://bugs.webkit.org/show_bug.cgi?id=95861
+
+ Reviewed by Adam Barth.
+
+ Followup patch to Chromium will call this new function, then we can remove all references to the legacy function on WebKitPlatformSupport.
+
+ * public/WebSharedWorkerRepository.h:
+ (WebKit):
+ * src/SharedWorkerRepository.cpp:
+ (WebKit):
+ (WebKit::setSharedWorkerRepository):
+ (WebKit::sharedWorkerRepository):
+ (WebCore::SharedWorkerRepository::isAvailable):
+ (WebCore::SharedWorkerRepository::connect):
+ (WebCore::SharedWorkerRepository::documentDetached):
+ (WebCore::SharedWorkerRepository::hasSharedWorkers):
+
+2012-09-10 Catalin Badea <badea@adobe.com>
+
+ webkit build for 64-bit Mac chromium
+ https://bugs.webkit.org/show_bug.cgi?id=95977
+
+ Reviewed by Eric Seidel.
+
+ Ensure header completeness and use the correct include order. This fixes a compilation issues noticeable when building chromium for 64-bit Mac.
+
+ * public/mac/WebSubstringUtil.h:
+ * src/mac/WebSubstringUtil.mm:
+
+2012-09-10 Adrienne Walker <enne@google.com>
+
+ [chromium] Fix deadlock between WebMediaPlayerClientImpl dtor and PutCurrentFrame
+ https://bugs.webkit.org/show_bug.cgi?id=96010
+
+ Reviewed by James Robinson.
+
+ The key fix here is that the destructor no longer has a mutex.
+ The m_compositingMutex was supposedly protecting races between
+ ~WebMediaPlayerClientImpl and setVideoFrameProviderClient. The
+ former is only called from the main thread and the latter is called
+ from the compositor thread only when the main thread is blocked (and
+ it already asserts that this is the case).
+
+ In addition, the m_providerMutex in CCVideoLayerImpl prevents the
+ destruction of WebMediaPlayerClientImpl, thus keeping the frame
+ acquired via getCurrentFrame alive until putCurrentFrame is called.
+ These functions are only called by the client, and comments are added
+ to the interface to better document this.
+
+ To prevent a race between load() and getCurrentFrame/putCurrentFrame
+ (which are called from different threads) a new m_webMediaPlayerMutex
+ to replace part of what the old m_compositingMutex was doing.
+
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl):
+ (WebKit::WebMediaPlayerClientImpl::load):
+ (WebKit::WebMediaPlayerClientImpl::loadInternal):
+ (WebKit::WebMediaPlayerClientImpl::setVideoFrameProviderClient):
+ (WebKit::WebMediaPlayerClientImpl::getCurrentFrame):
+ (WebKit::WebMediaPlayerClientImpl::putCurrentFrame):
+ * src/WebMediaPlayerClientImpl.h:
+ (WebMediaPlayerClientImpl):
+
2012-09-10 Rick Byers <rbyers@chromium.org>
[chromium] Don't use WebGestureEvent.boundingBox for touch adjustment
diff --git a/Source/WebKit/chromium/DEPS b/Source/WebKit/chromium/DEPS
index d16efe14c..f732b797a 100644
--- a/Source/WebKit/chromium/DEPS
+++ b/Source/WebKit/chromium/DEPS
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '155215'
+ 'chromium_rev': '155883'
}
deps = {
diff --git a/Source/WebKit/chromium/public/WebAccessibilityRole.h b/Source/WebKit/chromium/public/WebAccessibilityRole.h
index db8fbcbd4..d4a4c715a 100644
--- a/Source/WebKit/chromium/public/WebAccessibilityRole.h
+++ b/Source/WebKit/chromium/public/WebAccessibilityRole.h
@@ -89,6 +89,7 @@ enum WebAccessibilityRole {
WebAccessibilityRoleLandmarkMain,
WebAccessibilityRoleLandmarkNavigation,
WebAccessibilityRoleLandmarkSearch,
+ WebAccessibilityRoleLegend,
WebAccessibilityRoleLink,
WebAccessibilityRoleList,
WebAccessibilityRoleListBox,
diff --git a/Source/WebKit/chromium/public/WebInputEvent.h b/Source/WebKit/chromium/public/WebInputEvent.h
index 63ce7131c..916622194 100644
--- a/Source/WebKit/chromium/public/WebInputEvent.h
+++ b/Source/WebKit/chromium/public/WebInputEvent.h
@@ -116,6 +116,7 @@ public:
GestureFlingCancel,
GestureTap,
GestureTapDown,
+ GestureTapCancel,
GestureDoubleTap,
GestureTwoFingerTap,
GestureLongPress,
@@ -216,6 +217,7 @@ public:
|| type == GesturePinchUpdate
|| type == GestureTap
|| type == GestureTapDown
+ || type == GestureTapCancel
|| type == GestureDoubleTap
|| type == GestureTwoFingerTap
|| type == GestureLongPress
diff --git a/Source/WebKit/chromium/public/WebSharedWorkerRepository.h b/Source/WebKit/chromium/public/WebSharedWorkerRepository.h
index 0611b0773..7cce3ad84 100644
--- a/Source/WebKit/chromium/public/WebSharedWorkerRepository.h
+++ b/Source/WebKit/chromium/public/WebSharedWorkerRepository.h
@@ -54,6 +54,9 @@ public:
virtual bool hasSharedWorkers(DocumentID) = 0;
};
+// Initializes shared worker support.
+WEBKIT_EXPORT void setSharedWorkerRepository(WebSharedWorkerRepository*);
+
} // namespace WebKit
#endif // WebSharedWorkerRepository_h
diff --git a/Source/WebKit/chromium/public/WebView.h b/Source/WebKit/chromium/public/WebView.h
index 5bb5712fa..b778f296a 100644
--- a/Source/WebKit/chromium/public/WebView.h
+++ b/Source/WebKit/chromium/public/WebView.h
@@ -257,10 +257,14 @@ public:
// overwrites the previously saved scroll and scale state.
virtual void saveScrollAndScaleState() = 0;
- // Restore the previously saved scroll and scale state. After restroing the
+ // Restore the previously saved scroll and scale state. After restoring the
// state, this function deletes any saved scroll and scale state.
virtual void restoreScrollAndScaleState() = 0;
+ // Reset the scroll and scale state and clobber any previously saved values for
+ // these parameters.
+ virtual void resetScrollAndScaleState() = 0;
+
// Prevent the web page from setting a maximum scale via the viewport meta
// tag. This is an accessibility feature that lets folks zoom in to web
// pages even if the web page tries to block scaling.
diff --git a/Source/WebKit/chromium/public/mac/WebSubstringUtil.h b/Source/WebKit/chromium/public/mac/WebSubstringUtil.h
index b21fe21e6..71427639a 100644
--- a/Source/WebKit/chromium/public/mac/WebSubstringUtil.h
+++ b/Source/WebKit/chromium/public/mac/WebSubstringUtil.h
@@ -31,6 +31,8 @@
#ifndef WebSubstringUtil_h
#define WebSubstringUtil_h
+#include "../platform/WebCommon.h"
+
namespace WebKit {
class WebFrame;
}
diff --git a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
index cfaa26bab..c6bf971f1 100644
--- a/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/Source/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -262,6 +262,7 @@ COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleDocumentRegion, DocumentRegionR
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleUserInterfaceTooltip, UserInterfaceTooltipRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleToggleButton, ToggleButtonRole);
COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleCanvas, CanvasRole);
+COMPILE_ASSERT_MATCHING_ENUM(WebAccessibilityRoleLegend, LegendRole);
COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Uncached, ApplicationCacheHost::UNCACHED);
COMPILE_ASSERT_MATCHING_ENUM(WebApplicationCacheHost::Idle, ApplicationCacheHost::IDLE);
diff --git a/Source/WebKit/chromium/src/PageWidgetDelegate.cpp b/Source/WebKit/chromium/src/PageWidgetDelegate.cpp
index 340e6f1a9..6ad25d953 100644
--- a/Source/WebKit/chromium/src/PageWidgetDelegate.cpp
+++ b/Source/WebKit/chromium/src/PageWidgetDelegate.cpp
@@ -154,6 +154,7 @@ bool PageWidgetDelegate::handleInputEvent(Page* page, PageWidgetEventHandler& ha
case WebInputEvent::GestureFlingCancel:
case WebInputEvent::GestureTap:
case WebInputEvent::GestureTapDown:
+ case WebInputEvent::GestureTapCancel:
case WebInputEvent::GestureDoubleTap:
case WebInputEvent::GestureTwoFingerTap:
case WebInputEvent::GestureLongPress:
diff --git a/Source/WebKit/chromium/src/ScrollbarGroup.cpp b/Source/WebKit/chromium/src/ScrollbarGroup.cpp
index 0e676cb5f..0923e8738 100644
--- a/Source/WebKit/chromium/src/ScrollbarGroup.cpp
+++ b/Source/WebKit/chromium/src/ScrollbarGroup.cpp
@@ -263,7 +263,7 @@ void ScrollbarGroup::scrollbarStyleChanged(int, bool forceUpdate)
m_verticalScrollbar->scrollbarStyleChanged();
}
-bool ScrollbarGroup::isOnActivePage() const
+bool ScrollbarGroup::scrollbarsCanBeActive() const
{
return true;
}
diff --git a/Source/WebKit/chromium/src/ScrollbarGroup.h b/Source/WebKit/chromium/src/ScrollbarGroup.h
index b2df772f4..78433f6b9 100644
--- a/Source/WebKit/chromium/src/ScrollbarGroup.h
+++ b/Source/WebKit/chromium/src/ScrollbarGroup.h
@@ -72,7 +72,7 @@ public:
virtual WebCore::IntPoint currentMousePosition() const OVERRIDE;
virtual bool shouldSuspendScrollAnimations() const OVERRIDE;
virtual void scrollbarStyleChanged(int newStyle, bool forceUpdate) OVERRIDE;
- virtual bool isOnActivePage() const OVERRIDE;
+ virtual bool scrollbarsCanBeActive() const OVERRIDE;
virtual WebCore::IntRect scrollableAreaBoundingBox() const OVERRIDE;
private:
diff --git a/Source/WebKit/chromium/src/SharedWorkerRepository.cpp b/Source/WebKit/chromium/src/SharedWorkerRepository.cpp
index d9188ddee..da019b42e 100644
--- a/Source/WebKit/chromium/src/SharedWorkerRepository.cpp
+++ b/Source/WebKit/chromium/src/SharedWorkerRepository.cpp
@@ -58,6 +58,30 @@
#include <public/WebString.h>
#include <public/WebURL.h>
+namespace WebKit {
+
+WebSharedWorkerRepository* s_sharedWorkerRepository = 0;
+
+void setSharedWorkerRepository(WebSharedWorkerRepository* repository)
+{
+ s_sharedWorkerRepository = repository;
+}
+
+static WebSharedWorkerRepository* sharedWorkerRepository()
+{
+ WebSharedWorkerRepository* repository;
+
+ repository = s_sharedWorkerRepository;
+ if (!repository) {
+ repository = webKitPlatformSupport()->sharedWorkerRepository();
+ setSharedWorkerRepository(repository);
+ }
+
+ return repository;
+}
+
+}
+
namespace WebCore {
class Document;
@@ -194,8 +218,9 @@ void SharedWorkerScriptLoader::connected()
bool SharedWorkerRepository::isAvailable()
{
- // Allow the WebKitPlatformSupport to determine if SharedWorkers are available.
- return WebKit::webKitPlatformSupport()->sharedWorkerRepository();
+ // Allow the WebKitPlatformSupport to determine if SharedWorkers
+ // are available.
+ return WebKit::sharedWorkerRepository();
}
static WebSharedWorkerRepository::DocumentID getId(void* document)
@@ -206,9 +231,11 @@ static WebSharedWorkerRepository::DocumentID getId(void* document)
void SharedWorkerRepository::connect(PassRefPtr<SharedWorker> worker, PassOwnPtr<MessagePortChannel> port, const KURL& url, const String& name, ExceptionCode& ec)
{
+ WebKit::WebSharedWorkerRepository* repository = WebKit::sharedWorkerRepository();
+
// This should not be callable unless there's a SharedWorkerRepository for
// this context (since isAvailable() should have returned null).
- ASSERT(WebKit::webKitPlatformSupport()->sharedWorkerRepository());
+ ASSERT(repository);
// No nested workers (for now) - connect() should only be called from document context.
ASSERT(worker->scriptExecutionContext()->isDocument());
@@ -223,8 +250,7 @@ void SharedWorkerRepository::connect(PassRefPtr<SharedWorker> worker, PassOwnPtr
return;
}
- WebKit::webKitPlatformSupport()->sharedWorkerRepository()->addSharedWorker(
- webWorker.get(), getId(document));
+ repository->addSharedWorker(webWorker.get(), getId(document));
// The loader object manages its own lifecycle (and the lifecycles of the two worker objects).
// It will free itself once loading is completed.
@@ -234,9 +260,10 @@ void SharedWorkerRepository::connect(PassRefPtr<SharedWorker> worker, PassOwnPtr
void SharedWorkerRepository::documentDetached(Document* document)
{
- WebSharedWorkerRepository* repo = WebKit::webKitPlatformSupport()->sharedWorkerRepository();
- if (repo)
- repo->documentDetached(getId(document));
+ WebKit::WebSharedWorkerRepository* repository = WebKit::sharedWorkerRepository();
+
+ if (repository)
+ repository->documentDetached(getId(document));
// Stop the creation of any pending SharedWorkers for this context.
// FIXME: Need a way to invoke this for WorkerContexts as well when we support for nested workers.
@@ -245,11 +272,10 @@ void SharedWorkerRepository::documentDetached(Document* document)
bool SharedWorkerRepository::hasSharedWorkers(Document* document)
{
- WebSharedWorkerRepository* repo = WebKit::webKitPlatformSupport()->sharedWorkerRepository();
- return repo && repo->hasSharedWorkers(getId(document));
-}
-
+ WebKit::WebSharedWorkerRepository* repository = WebKit::sharedWorkerRepository();
+ return repository && repository->hasSharedWorkers(getId(document));
+}
} // namespace WebCore
diff --git a/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp b/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
index 16222ac4f..87d7b2522 100644
--- a/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
@@ -205,6 +205,7 @@ WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h
WebInputHandlerClient::ScrollStatus scrollStatus = m_inputHandlerClient->scrollBegin(WebPoint(gestureEvent.x, gestureEvent.y), WebInputHandlerClient::ScrollInputTypeGesture);
switch (scrollStatus) {
case WebInputHandlerClient::ScrollStatusStarted: {
+ m_inputHandlerClient->scrollEnd();
m_wheelFlingCurve = PlatformGestureCurveFactory::get()->createCurve(gestureEvent.data.flingStart.sourceDevice, FloatPoint(gestureEvent.data.flingStart.velocityX, gestureEvent.data.flingStart.velocityY));
TRACE_EVENT_ASYNC_BEGIN1("cc", "WebCompositorInputHandlerImpl::handleGestureFling::started", this, "curve", m_wheelFlingCurve->debugName());
m_wheelFlingParameters.delta = WebFloatPoint(gestureEvent.data.flingStart.velocityX, gestureEvent.data.flingStart.velocityY);
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp
index 4395c6d70..1d187f09e 100644
--- a/Source/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp
@@ -571,16 +571,18 @@ int WebFrame::instanceCount()
WebFrame* WebFrame::frameForEnteredContext()
{
- Frame* frame =
- ScriptController::retrieveFrameForEnteredContext();
- return WebFrameImpl::fromFrame(frame);
+ v8::Handle<v8::Context> context = v8::Context::GetEntered();
+ if (context.IsEmpty())
+ return 0;
+ return frameForContext(context);
}
WebFrame* WebFrame::frameForCurrentContext()
{
- Frame* frame =
- ScriptController::retrieveFrameForCurrentContext();
- return WebFrameImpl::fromFrame(frame);
+ v8::Handle<v8::Context> context = v8::Context::GetCurrent();
+ if (context.IsEmpty())
+ return 0;
+ return frameForContext(context);
}
#if WEBKIT_USING_V8
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
index e570dca5a..e75c73947 100644
--- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
+++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
@@ -92,9 +92,11 @@ WebMediaPlayer* WebMediaPlayerClientImpl::mediaPlayer() const
WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl()
{
#if USE(ACCELERATED_COMPOSITING)
- MutexLocker locker(m_compositingMutex);
if (m_videoFrameProviderClient)
m_videoFrameProviderClient->stopUsingProvider();
+ // No need for a lock here, as getCurrentFrame/putCurrentFrame can't be
+ // called now that the client is no longer using this provider. Also, load()
+ // and this destructor are called from the same thread.
if (m_webMediaPlayer)
m_webMediaPlayer->setStreamTextureClient(0);
#endif
@@ -312,8 +314,8 @@ void WebMediaPlayerClientImpl::load(const String& url)
{
m_url = url;
+ MutexLocker locker(m_webMediaPlayerMutex);
if (m_preload == MediaPlayer::None) {
- MutexLocker locker(m_compositingMutex);
#if ENABLE(WEB_AUDIO)
m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider.
#endif
@@ -325,7 +327,6 @@ void WebMediaPlayerClientImpl::load(const String& url)
void WebMediaPlayerClientImpl::loadInternal()
{
- MutexLocker locker(m_compositingMutex);
#if ENABLE(WEB_AUDIO)
m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider.
#endif
@@ -766,7 +767,7 @@ bool WebMediaPlayerClientImpl::acceleratedRenderingInUse()
void WebMediaPlayerClientImpl::setVideoFrameProviderClient(WebVideoFrameProvider::Client* client)
{
- MutexLocker locker(m_compositingMutex);
+ MutexLocker locker(m_webMediaPlayerMutex);
if (m_videoFrameProviderClient)
m_videoFrameProviderClient->stopUsingProvider();
m_videoFrameProviderClient = client;
@@ -776,8 +777,10 @@ void WebMediaPlayerClientImpl::setVideoFrameProviderClient(WebVideoFrameProvider
WebVideoFrame* WebMediaPlayerClientImpl::getCurrentFrame()
{
- MutexLocker locker(m_compositingMutex);
+ // This function is called only by the client.
+ MutexLocker locker(m_webMediaPlayerMutex);
ASSERT(!m_currentVideoFrame);
+ ASSERT(m_videoFrameProviderClient);
if (m_webMediaPlayer)
m_currentVideoFrame = m_webMediaPlayer->getCurrentFrame();
return m_currentVideoFrame;
@@ -785,8 +788,10 @@ WebVideoFrame* WebMediaPlayerClientImpl::getCurrentFrame()
void WebMediaPlayerClientImpl::putCurrentFrame(WebVideoFrame* videoFrame)
{
- MutexLocker locker(m_compositingMutex);
+ // This function is called only by the client.
+ MutexLocker locker(m_webMediaPlayerMutex);
ASSERT(videoFrame == m_currentVideoFrame);
+ ASSERT(m_videoFrameProviderClient);
if (!videoFrame)
return;
if (m_webMediaPlayer)
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h
index dd170e57c..73eb78fa8 100644
--- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h
+++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h
@@ -197,7 +197,7 @@ private:
bool acceleratedRenderingInUse();
#endif
- Mutex m_compositingMutex; // Guards m_currentVideoFrame and m_videoFrameProviderClient.
+ Mutex m_webMediaPlayerMutex; // Guards the m_webMediaPlayer
WebCore::MediaPlayer* m_mediaPlayer;
OwnPtr<WebMediaPlayer> m_webMediaPlayer;
WebVideoFrame* m_currentVideoFrame;
diff --git a/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp b/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
index 194dee550..58a2855cd 100644
--- a/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
@@ -288,6 +288,7 @@ bool WebPopupMenuImpl::handleInputEvent(const WebInputEvent& inputEvent)
case WebInputEvent::Undefined:
case WebInputEvent::MouseEnter:
case WebInputEvent::ContextMenu:
+ case WebInputEvent::GestureTapCancel:
return false;
}
return false;
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index be474d8fa..238b2f920 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -771,6 +771,10 @@ bool WebViewImpl::handleGestureEvent(const WebGestureEvent& event)
PlatformGestureEventBuilder platformEvent(mainFrameImpl()->frameView(), event);
return mainFrameImpl()->frame()->eventHandler()->handleGestureEvent(platformEvent);
}
+ case WebInputEvent::GestureTapCancel:
+ // FIXME: Update WebCore to handle this event after chromium has been updated to send it
+ // http://wkb.ug/96060
+ return false;
default:
ASSERT_NOT_REACHED();
}
@@ -2924,6 +2928,18 @@ void WebViewImpl::resetSavedScrollAndScaleState()
m_savedScrollOffset = IntSize();
}
+void WebViewImpl::resetScrollAndScaleState()
+{
+ page()->setPageScaleFactor(0, IntPoint());
+ m_pageScaleFactorIsSet = false;
+
+ // Clobber saved scales and scroll offsets.
+ if (FrameView* view = page()->mainFrame()->document()->view())
+ view->cacheCurrentScrollPosition();
+ resetSavedScrollAndScaleState();
+ page()->mainFrame()->loader()->history()->saveDocumentAndScrollState();
+}
+
WebSize WebViewImpl::fixedLayoutSize() const
{
if (!page())
diff --git a/Source/WebKit/chromium/src/WebViewImpl.h b/Source/WebKit/chromium/src/WebViewImpl.h
index ce5657a2b..11a05d0de 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.h
+++ b/Source/WebKit/chromium/src/WebViewImpl.h
@@ -227,6 +227,7 @@ public:
virtual float maximumPageScaleFactor() const;
virtual void saveScrollAndScaleState();
virtual void restoreScrollAndScaleState();
+ virtual void resetScrollAndScaleState();
virtual void setIgnoreViewportTagMaximumScale(bool);
virtual float deviceScaleFactor() const;
diff --git a/Source/WebKit/chromium/src/mac/WebSubstringUtil.mm b/Source/WebKit/chromium/src/mac/WebSubstringUtil.mm
index dd9951f83..682da0ef3 100644
--- a/Source/WebKit/chromium/src/mac/WebSubstringUtil.mm
+++ b/Source/WebKit/chromium/src/mac/WebSubstringUtil.mm
@@ -30,9 +30,10 @@
*/
#include "config.h"
-#include "WebFrameImpl.h"
#include "WebSubstringUtil.h"
+#import <Cocoa/Cocoa.h>
+
#include "ColorMac.h"
#include "Document.h"
#include "Element.h"
@@ -45,10 +46,9 @@
#include "RenderObject.h"
#include "RenderStyle.h"
#include "TextIterator.h"
+#include "WebFrameImpl.h"
#include "platform/WebRect.h"
-#import <Cocoa/Cocoa.h>
-
using namespace WebCore;
namespace WebKit {
diff --git a/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp b/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp
index cff826eed..e14571c6c 100644
--- a/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp
+++ b/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp
@@ -133,7 +133,7 @@ public:
virtual int visibleWidth() const OVERRIDE { return 10; }
virtual int visibleHeight() const OVERRIDE { return 10; }
virtual IntSize contentsSize() const OVERRIDE { return IntSize(100, 100); }
- virtual bool isOnActivePage() const OVERRIDE { return false; }
+ virtual bool scrollbarsCanBeActive() const OVERRIDE { return false; }
virtual ScrollableArea* enclosingScrollableArea() const OVERRIDE { return 0; }
virtual IntRect scrollableAreaBoundingBox() const OVERRIDE { return IntRect(); }
virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE { }
diff --git a/Source/WebKit/chromium/tests/IDBBindingUtilitiesTest.cpp b/Source/WebKit/chromium/tests/IDBBindingUtilitiesTest.cpp
index c1351850d..c2d5e7541 100644
--- a/Source/WebKit/chromium/tests/IDBBindingUtilitiesTest.cpp
+++ b/Source/WebKit/chromium/tests/IDBBindingUtilitiesTest.cpp
@@ -28,6 +28,7 @@
#include "IDBKey.h"
#include "IDBKeyPath.h"
#include "SerializedScriptValue.h"
+#include "V8PerIsolateData.h"
#include "V8Utilities.h"
#include <gtest/gtest.h>
@@ -91,7 +92,9 @@ void checkKeyPathNumberValue(SerializedScriptValue* value, const String& keyPath
TEST(IDBKeyFromValueAndKeyPathTest, TopLevelPropertyStringValue)
{
- V8AuxiliaryContext v8context;
+ v8::HandleScope handleScope;
+ v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext());
+
v8::Local<v8::Object> object = v8::Object::New();
object->Set(v8::String::New("foo"), v8::String::New("zoo"));
@@ -103,7 +106,9 @@ TEST(IDBKeyFromValueAndKeyPathTest, TopLevelPropertyStringValue)
TEST(IDBKeyFromValueAndKeyPathTest, TopLevelPropertyNumberValue)
{
- V8AuxiliaryContext v8context;
+ v8::HandleScope handleScope;
+ v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext());
+
v8::Local<v8::Object> object = v8::Object::New();
object->Set(v8::String::New("foo"), v8::Number::New(456));
@@ -115,7 +120,9 @@ TEST(IDBKeyFromValueAndKeyPathTest, TopLevelPropertyNumberValue)
TEST(IDBKeyFromValueAndKeyPathTest, SubProperty)
{
- V8AuxiliaryContext v8context;
+ v8::HandleScope handleScope;
+ v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext());
+
v8::Local<v8::Object> object = v8::Object::New();
v8::Local<v8::Object> subProperty = v8::Object::New();
subProperty->Set(v8::String::New("bar"), v8::String::New("zee"));
@@ -129,7 +136,9 @@ TEST(IDBKeyFromValueAndKeyPathTest, SubProperty)
TEST(InjectIDBKeyTest, TopLevelPropertyStringValue)
{
- V8AuxiliaryContext v8context;
+ v8::HandleScope handleScope;
+ v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext());
+
v8::Local<v8::Object> object = v8::Object::New();
object->Set(v8::String::New("foo"), v8::String::New("zoo"));
@@ -141,7 +150,9 @@ TEST(InjectIDBKeyTest, TopLevelPropertyStringValue)
TEST(InjectIDBKeyTest, SubProperty)
{
- V8AuxiliaryContext v8context;
+ v8::HandleScope handleScope;
+ v8::Context::Scope scope(V8PerIsolateData::current()->ensureAuxiliaryContext());
+
v8::Local<v8::Object> object = v8::Object::New();
v8::Local<v8::Object> subProperty = v8::Object::New();
subProperty->Set(v8::String::New("bar"), v8::String::New("zee"));
diff --git a/Source/WebKit/chromium/tests/LocaleMacTest.cpp b/Source/WebKit/chromium/tests/LocaleMacTest.cpp
index f6b0f6292..eb86a2f68 100644
--- a/Source/WebKit/chromium/tests/LocaleMacTest.cpp
+++ b/Source/WebKit/chromium/tests/LocaleMacTest.cpp
@@ -221,9 +221,9 @@ TEST_F(LocaleMacTest, decimalSeparator)
}
#endif
-static void testNumberIsReversible(const String& localeString, const char* original, const char* shouldHave = 0)
+static void testNumberIsReversible(const AtomicString& localeString, const char* original, const char* shouldHave = 0)
{
- OwnPtr<LocaleMac> locale = LocaleMac::create(localeString);
+ OwnPtr<Localizer> locale = Localizer::create(localeString);
String localized = locale->convertToLocalizedNumber(original);
if (shouldHave)
EXPECT_TRUE(localized.contains(shouldHave));
@@ -231,7 +231,7 @@ static void testNumberIsReversible(const String& localeString, const char* origi
EXPECT_STREQ(original, converted.utf8().data());
}
-void testNumbers(const String& localeString, const char* decimalSeparatorShouldBe = 0)
+void testNumbers(const AtomicString& localeString, const char* decimalSeparatorShouldBe = 0)
{
testNumberIsReversible(localeString, "123456789012345678901234567890");
testNumberIsReversible(localeString, "-123.456", decimalSeparatorShouldBe);
diff --git a/Source/WebKit/chromium/tests/ScrollAnimatorNoneTest.cpp b/Source/WebKit/chromium/tests/ScrollAnimatorNoneTest.cpp
index e71846adb..83088a312 100644
--- a/Source/WebKit/chromium/tests/ScrollAnimatorNoneTest.cpp
+++ b/Source/WebKit/chromium/tests/ScrollAnimatorNoneTest.cpp
@@ -68,7 +68,7 @@ public:
MOCK_CONST_METHOD1(visibleContentRect, IntRect(bool));
MOCK_CONST_METHOD0(contentsSize, IntSize());
MOCK_CONST_METHOD0(overhangAmount, IntSize());
- MOCK_CONST_METHOD0(isOnActivePage, bool());
+ MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool());
MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect());
virtual IntPoint scrollPosition() const OVERRIDE { return IntPoint(); }
diff --git a/Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp b/Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp
index 88927a988..49fdbff7d 100644
--- a/Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp
+++ b/Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp
@@ -133,9 +133,9 @@ public:
} while (0)
protected:
- MockWebInputHandlerClient m_mockInputHandlerClient;
+ testing::StrictMock<MockWebInputHandlerClient> m_mockInputHandlerClient;
OwnPtr<WebCompositorInputHandlerImpl> m_inputHandler;
- MockWebCompositorInputHandlerClient m_mockClient;
+ testing::StrictMock<MockWebCompositorInputHandlerClient> m_mockClient;
WebGestureEvent gesture;
WebKitTests::WebCompositorInitializer m_initializer;
@@ -255,10 +255,11 @@ TEST_F(WebCompositorInputHandlerImplTest, gestureFlingStarted)
EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testing::_))
.WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusStarted));
+ EXPECT_CALL(m_mockInputHandlerClient, scrollEnd());
+ EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation());
gesture.type = WebInputEvent::GestureFlingStart;
gesture.data.flingStart.velocityX = 10;
- EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation());
m_inputHandler->handleInputEvent(gesture);
VERIFY_AND_RESET_MOCKS();
@@ -328,6 +329,7 @@ TEST_F(WebCompositorInputHandlerImplTest, gestureFlingAnimates)
EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation());
EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testing::_))
.WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusStarted));
+ EXPECT_CALL(m_mockInputHandlerClient, scrollEnd());
m_inputHandler->handleInputEvent(gesture);
testing::Mock::VerifyAndClearExpectations(&m_mockInputHandlerClient);
@@ -412,6 +414,7 @@ TEST_F(WebCompositorInputHandlerImplTest, gestureFlingTransferResets)
EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation());
EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testing::_))
.WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusStarted));
+ EXPECT_CALL(m_mockInputHandlerClient, scrollEnd());
m_inputHandler->handleInputEvent(gesture);
testing::Mock::VerifyAndClearExpectations(&m_mockInputHandlerClient);
@@ -491,6 +494,7 @@ TEST_F(WebCompositorInputHandlerImplTest, gestureFlingTransferResets)
EXPECT_CALL(m_mockInputHandlerClient, scheduleAnimation());
EXPECT_CALL(m_mockInputHandlerClient, scrollBegin(testing::_, testing::_))
.WillOnce(testing::Return(WebInputHandlerClient::ScrollStatusStarted));
+ EXPECT_CALL(m_mockInputHandlerClient, scrollEnd());
m_inputHandler->handleInputEvent(gesture);
testing::Mock::VerifyAndClearExpectations(&m_mockInputHandlerClient);
diff --git a/Source/WebKit/chromium/tests/WebViewTest.cpp b/Source/WebKit/chromium/tests/WebViewTest.cpp
index 4e2553a36..b7ab658de 100644
--- a/Source/WebKit/chromium/tests/WebViewTest.cpp
+++ b/Source/WebKit/chromium/tests/WebViewTest.cpp
@@ -422,6 +422,45 @@ TEST_F(WebViewTest, SetCompositionFromExistingText)
webView->close();
}
+TEST_F(WebViewTest, ResetScrollAndScaleState)
+{
+ URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8("hello_world.html"));
+ WebViewImpl* webViewImpl = static_cast<WebViewImpl*>(FrameTestHelpers::createWebViewAndLoad(m_baseURL + "hello_world.html"));
+ webViewImpl->resize(WebSize(640, 480));
+ EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().width);
+ EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().height);
+
+ // Make the page scale and scroll with the given paremeters.
+ webViewImpl->setPageScaleFactor(2.0f, WebPoint(116, 84));
+ EXPECT_EQ(2.0f, webViewImpl->pageScaleFactor());
+ EXPECT_EQ(116, webViewImpl->mainFrame()->scrollOffset().width);
+ EXPECT_EQ(84, webViewImpl->mainFrame()->scrollOffset().height);
+ webViewImpl->page()->mainFrame()->loader()->history()->saveDocumentAndScrollState();
+
+ // Confirm that restoring the page state restores the parameters.
+ webViewImpl->setPageScaleFactor(1.5f, WebPoint(16, 24));
+ EXPECT_EQ(1.5f, webViewImpl->pageScaleFactor());
+ EXPECT_EQ(16, webViewImpl->mainFrame()->scrollOffset().width);
+ EXPECT_EQ(24, webViewImpl->mainFrame()->scrollOffset().height);
+ webViewImpl->page()->mainFrame()->loader()->history()->restoreScrollPositionAndViewState();
+ EXPECT_EQ(2.0f, webViewImpl->pageScaleFactor());
+ EXPECT_EQ(116, webViewImpl->mainFrame()->scrollOffset().width);
+ EXPECT_EQ(84, webViewImpl->mainFrame()->scrollOffset().height);
+ webViewImpl->page()->mainFrame()->loader()->history()->saveDocumentAndScrollState();
+
+ // Confirm that resetting the page state resets both the scale and scroll position, as well
+ // as overwrites the original parameters that were saved to the HistoryController.
+ webViewImpl->resetScrollAndScaleState();
+ EXPECT_EQ(0.0f, webViewImpl->pageScaleFactor());
+ EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().width);
+ EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().height);
+ webViewImpl->page()->mainFrame()->loader()->history()->restoreScrollPositionAndViewState();
+ EXPECT_EQ(0.0f, webViewImpl->pageScaleFactor());
+ EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().width);
+ EXPECT_EQ(0, webViewImpl->mainFrame()->scrollOffset().height);
+ webViewImpl->close();
+}
+
class ContentDetectorClient : public WebViewClient {
public:
ContentDetectorClient() { reset(); }
diff --git a/Source/WebKit/mac/ChangeLog b/Source/WebKit/mac/ChangeLog
index ab6273273..91b7ffa14 100644
--- a/Source/WebKit/mac/ChangeLog
+++ b/Source/WebKit/mac/ChangeLog
@@ -1,3 +1,72 @@
+2012-09-10 Jer Noble <jer.noble@apple.com>
+
+ Unreviewed; rolling out r128081.
+ http://trac.webkit.org/changeset/128081
+ https://bugs.webkit.org/show_bug.cgi?id=96134
+
+ New test http/tests/media/video-donottrack.html fails to run on Apple test bots.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ * WebView/WebDelegateImplementationCaching.h:
+ (WebFrameLoadDelegateImplementationCache):
+ * WebView/WebDelegateImplementationCaching.mm:
+ * WebView/WebView.mm:
+ (-[WebView _cacheFrameLoadDelegateImplementations]):
+
+2012-09-07 Jon Lee <jonlee@apple.com>
+
+ Update notifications to latest spec
+ https://bugs.webkit.org/show_bug.cgi?id=91726
+ <rdar://problem/11910451>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Expose lang and dir.
+
+ * WebView/WebNotification.h:
+ * WebView/WebNotification.mm:
+ (-[WebNotification lang]):
+ (-[WebNotification dir]):
+
+2012-09-10 Jer Noble <jer.noble@apple.com>
+
+ NSInvalidArgumentException in WebFrameLoaderClient::shouldSendDoNotTrackHTTPHeader()
+ https://bugs.webkit.org/show_bug.cgi?id=96320
+
+ Reviewed by Geoffrey Garen.
+
+ Client was being cached as the FrameLoaderClient, but requests were sent to the ResourceLoadClient.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::shouldSendDoNotTrackHTTPHeader): Send the request to the FrameLoadDelegate.
+ * WebView/WebDelegateImplementationCaching.h:
+ * WebView/WebDelegateImplementationCaching.mm:
+ (CallFrameLoadDelegateReturningBoolean): Added.
+
+2012-09-07 Jer Noble <jer.noble@apple.com>
+
+ <audio> and <video> should send Do Not Track when appropriate
+ https://bugs.webkit.org/show_bug.cgi?id=96134
+
+ Reviewed by Eric Carlson.
+
+ Add support for the shouldSendDoNotTrackHTTPHeader by passing the request
+ on to the WebFrameLoadDelegate.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::shouldSendDoNotTrackHeader):
+ Pass the question on to the WebFrameLoadDelegate.
+ * WebView/WebDelegateImplementationCaching.h:
+ (WebFrameLoadDelegateImplementationCache):
+ Add an entry for the delegate's webViewShouldSendDoNotTrackHeader method.
+ * WebView/WebDelegateImplementationCaching.mm:
+ (CallResourceLoadDelegateReturningBoolean): Added a 0-parameter overloaded function.
+ * WebView/WebView.mm:
+ (-[WebView _cacheFrameLoadDelegateImplementations]): initialize the
+ cached value for shouldSendDoNotTrackHeaderFunc.
+
2012-09-07 Benjamin Poulain <bpoulain@apple.com>
Rename the ustring() accessor to string()
diff --git a/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h b/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h
index 6568cc96b..29a43880a 100644
--- a/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h
+++ b/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.h
@@ -129,6 +129,8 @@ id CallFrameLoadDelegate(IMP, WebView *, SEL, id, id, id);
id CallFrameLoadDelegate(IMP, WebView *, SEL, id, id, id, id);
id CallFrameLoadDelegate(IMP, WebView *, SEL, id, NSTimeInterval, id, id);
+BOOL CallFrameLoadDelegateReturningBoolean(BOOL, IMP, WebView *, SEL);
+
id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id);
id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id, id);
id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id, id, id);
diff --git a/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm b/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
index 8470f5f2b..3c3e3c9b3 100644
--- a/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
+++ b/Source/WebKit/mac/WebView/WebDelegateImplementationCaching.mm
@@ -475,6 +475,16 @@ id CallFrameLoadDelegate(IMP implementation, WebView *self, SEL selector, id obj
return CallDelegate(implementation, self, self->_private->frameLoadDelegate, selector, object1, interval, object2, object3);
}
+BOOL CallFrameLoadDelegateReturningBoolean(BOOL result, IMP implementation, WebView *self, SEL selector)
+{
+ @try {
+ return reinterpret_cast<BOOL (*)(id, SEL, WebView *)>(objc_msgSend)(self->_private->frameLoadDelegate, selector, self);
+ } @catch(id exception) {
+ ReportDiscardedDelegateException(selector, exception);
+ }
+ return result;
+}
+
id CallResourceLoadDelegate(IMP implementation, WebView *self, SEL selector, id object1, id object2)
{
return CallDelegate(implementation, self, self->_private->resourceProgressDelegate, selector, object1, object2);
diff --git a/Source/WebKit/mac/WebView/WebNotification.h b/Source/WebKit/mac/WebView/WebNotification.h
index 49255690b..83ddad6a8 100644
--- a/Source/WebKit/mac/WebView/WebNotification.h
+++ b/Source/WebKit/mac/WebView/WebNotification.h
@@ -38,6 +38,8 @@
- (NSString *)body;
- (NSString *)tag;
- (NSString *)iconURL;
+- (NSString *)lang;
+- (NSString *)dir;
- (WebSecurityOrigin *)origin;
- (uint64_t)notificationID;
diff --git a/Source/WebKit/mac/WebView/WebNotification.mm b/Source/WebKit/mac/WebView/WebNotification.mm
index 2b60bfe69..f36c2672f 100644
--- a/Source/WebKit/mac/WebView/WebNotification.mm
+++ b/Source/WebKit/mac/WebView/WebNotification.mm
@@ -117,6 +117,24 @@ Notification* core(WebNotification *notification)
#endif
}
+- (NSString *)lang
+{
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ return core(self)->lang();
+#else
+ return nil;
+#endif
+}
+
+- (NSString *)dir
+{
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ return core(self)->dir();
+#else
+ return nil;
+#endif
+}
+
- (WebSecurityOrigin *)origin
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog
index 1ae43c77a..2f159f65b 100644
--- a/Source/WebKit/qt/ChangeLog
+++ b/Source/WebKit/qt/ChangeLog
@@ -1,3 +1,56 @@
+2012-09-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Add a configure step to the Qt build system
+
+ This allows building the Qt port using just 'qmake WebKit.pro'. Using
+ the build-webkit script is still supported, and will add slightly more
+ logic to the build, such as detecting the need for clean or incremental
+ builds.
+
+ Internally, the build system now uses a new variable, WEBKIT_CONFIG, for
+ all things related to configuring the build, such as use/have/enable flags,
+ and these are translated to defines in default_post. Project files should
+ no longer check contains(DEFINES,...) to detect features, but use the new
+ enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2
+ options have been translated into WEBKIT_CONFIG options as well, and can
+ be checked using build?().
+
+ Reviewed by Simon Hausmann.
+
+ * declarative/declarative.pro:
+ * declarative/public.pri:
+ * tests/qgraphicswebview/qgraphicswebview.pro:
+
+2012-09-11 Andras Becsi <andras.becsi@nokia.com>
+
+ [Qt][WK2] Fix the build with recent Qt5
+ https://bugs.webkit.org/show_bug.cgi?id=96283
+
+ Reviewed by Simon Hausmann.
+
+ We should not use deprecated Qt API because doing that results
+ in build failure since all the deprecated API was disabled
+ in qtbase (https://codereview.qt-project.org/#change,24890).
+
+ * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
+ (tst_QGraphicsWebView::widgetsRenderingThroughCache):
+ (tst_QGraphicsWebView::setPalette):
+ (tst_QGraphicsWebView::compareCanvasToImage):
+ * tests/qobjectbridge/tst_qobjectbridge.cpp:
+ (tst_QObjectBridge::ownership):
+ * tests/qwebframe/tst_qwebframe.cpp:
+ (tst_QWebFrame::popupFocus):
+ (tst_QWebFrame::inputFieldFocus):
+ (tst_QWebFrame::evaluateWillCauseRepaint):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (Navigation):
+ (PluginCounterPage):
+ * tests/qwebview/tst_qwebview.cpp:
+ (tst_QWebView::reusePage):
+ (tst_QWebView::focusInputTypes):
+ (tst_QWebView::setPalette):
+ (tst_QWebView::renderingAfterMaxAndBack):
+
2012-09-09 Emil A Eklund <eae@chromium.org>
Rename Node::getRect/getPixelSnappedRect and remove ContainerNode::getRect
diff --git a/Source/WebKit/qt/declarative/declarative.pro b/Source/WebKit/qt/declarative/declarative.pro
index 04f2298d0..71ed4f14d 100644
--- a/Source/WebKit/qt/declarative/declarative.pro
+++ b/Source/WebKit/qt/declarative/declarative.pro
@@ -11,7 +11,7 @@ public_api.file = public.pri
public_api.makefile = Makefile.declarative.public
SUBDIRS += public_api
-!no_webkit2 {
+build?(webkit2): {
experimental_api.file = experimental/experimental.pri
experimental_api.makefile = Makefile.declarative.experimental
SUBDIRS += experimental_api
diff --git a/Source/WebKit/qt/declarative/public.pri b/Source/WebKit/qt/declarative/public.pri
index e5c43db06..754284b6c 100644
--- a/Source/WebKit/qt/declarative/public.pri
+++ b/Source/WebKit/qt/declarative/public.pri
@@ -26,7 +26,7 @@ wince*:LIBS += $$QMAKE_LIBS_GUI
QT += webkit webkit-private widgets quick quick-private
-contains(DEFINES, HAVE_QQUICK1=1) {
+have?(QQUICK1) {
SOURCES += qdeclarativewebview.cpp
HEADERS += qdeclarativewebview_p.h
}
@@ -40,7 +40,7 @@ RPATHDIR_RELATIVE_TO_DESTDIR = ../../lib
SOURCES += plugin.cpp
-!no_webkit2: {
+build?(webkit2): {
DEFINES += HAVE_WEBKIT2
QT += network
}
diff --git a/Source/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro b/Source/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
index 3e9fb1528..78e17a06d 100644
--- a/Source/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
+++ b/Source/WebKit/qt/tests/qgraphicswebview/qgraphicswebview.pro
@@ -1,6 +1,6 @@
include(../tests.pri)
exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc
-contains(DEFINES, ENABLE_WEBGL=1) {
+enable?(WEBGL) {
QT += opengl
}
diff --git a/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp b/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
index 992eb904b..9ae960b9c 100644
--- a/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
+++ b/Source/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
@@ -184,7 +184,7 @@ void tst_QGraphicsWebView::widgetsRenderingThroughCache()
scene->addItem(webView);
view.setGeometry(QRect(0, 0, 500, 500));
QWidget *const widget = &view;
- QTest::qWaitForWindowShown(widget);
+ QTest::qWaitForWindowExposed(widget);
// 1. Reference without tiling.
webView->settings()->setAttribute(QWebSettings::TiledBackingStoreEnabled, false);
@@ -409,11 +409,11 @@ void tst_QGraphicsWebView::setPalette()
QVERIFY(webView1.palette() == palette1);
QVERIFY(webView1.page()->palette() == palette1);
- QTest::qWaitForWindowShown(&view1);
+ QTest::qWaitForWindowExposed(&view1);
if (!active) {
controlView.show();
- QTest::qWaitForWindowShown(&controlView);
+ QTest::qWaitForWindowExposed(&controlView);
QApplication::setActiveWindow(&controlView);
activeView = &controlView;
controlView.activateWindow();
@@ -464,11 +464,11 @@ void tst_QGraphicsWebView::setPalette()
webView2.setPalette(palette2);
view2.show();
- QTest::qWaitForWindowShown(&view2);
+ QTest::qWaitForWindowExposed(&view2);
if (!active) {
controlView.show();
- QTest::qWaitForWindowShown(&controlView);
+ QTest::qWaitForWindowExposed(&controlView);
QApplication::setActiveWindow(&controlView);
activeView = &controlView;
controlView.activateWindow();
@@ -610,7 +610,7 @@ void tst_QGraphicsWebView::compareCanvasToImage(const QUrl& url, const QImage& r
{
GraphicsView view;
view.show();
- QTest::qWaitForWindowShown(&view);
+ QTest::qWaitForWindowExposed(&view);
QGraphicsWebView* const graphicsWebView = view.m_webView;
graphicsWebView->load(url);
@@ -620,7 +620,6 @@ void tst_QGraphicsWebView::compareCanvasToImage(const QUrl& url, const QImage& r
QPainter painter(&pixmap);
view.render(&painter);
}
- QApplication::syncX();
const QSize imageSize = reference.size();
diff --git a/Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp b/Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp
index 13d98af93..ec9c71286 100644
--- a/Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp
+++ b/Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp
@@ -2039,7 +2039,7 @@ void tst_QObjectBridge::ownership()
{
// test ownership
{
- QWeakPointer<QObject> ptr = new QObject();
+ QPointer<QObject> ptr = new QObject();
QVERIFY(ptr);
{
QWebPage page;
@@ -2049,7 +2049,7 @@ void tst_QObjectBridge::ownership()
QVERIFY(!ptr);
}
{
- QWeakPointer<QObject> ptr = new QObject();
+ QPointer<QObject> ptr = new QObject();
QVERIFY(ptr);
QObject* before = ptr.data();
{
@@ -2073,7 +2073,7 @@ void tst_QObjectBridge::ownership()
QCOMPARE(qvariant_cast<QObject*>(v), (QObject *)0);
}
{
- QWeakPointer<QObject> ptr = new QObject();
+ QPointer<QObject> ptr = new QObject();
QVERIFY(ptr);
{
QWebPage page;
@@ -2085,7 +2085,7 @@ void tst_QObjectBridge::ownership()
}
{
QObject* parent = new QObject();
- QWeakPointer<QObject> child = new QObject(parent);
+ QPointer<QObject> child = new QObject(parent);
QVERIFY(child);
{
QWebPage page;
diff --git a/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 4c2d042f8..426893ff9 100644
--- a/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -601,7 +601,7 @@ void tst_QWebFrame::popupFocus()
// Call setFocus before show to work around http://bugreports.qt.nokia.com/browse/QTBUG-14762
view.setFocus();
view.show();
- QTest::qWaitForWindowShown(&view);
+ QTest::qWaitForWindowExposed(&view);
view.activateWindow();
QTRY_VERIFY(view.hasFocus());
@@ -625,7 +625,7 @@ void tst_QWebFrame::inputFieldFocus()
view.setHtml("<html><body><input type=\"text\"></input></body></html>");
view.resize(400, 100);
view.show();
- QTest::qWaitForWindowShown(&view);
+ QTest::qWaitForWindowExposed(&view);
view.activateWindow();
view.setFocus();
QTRY_VERIFY(view.hasFocus());
@@ -1027,7 +1027,7 @@ void tst_QWebFrame::evaluateWillCauseRepaint()
view.setHtml(html);
view.show();
- QTest::qWaitForWindowShown(&view);
+ QTest::qWaitForWindowExposed(&view);
view.page()->mainFrame()->evaluateJavaScript(
"document.getElementById('junk').style.display = 'none';");
diff --git a/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 67b45b18e..0099d410a 100644
--- a/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -395,7 +395,7 @@ public:
TestPage(QObject* parent = 0) : QWebPage(parent) {}
struct Navigation {
- QWeakPointer<QWebFrame> frame;
+ QPointer<QWebFrame> frame;
QNetworkRequest request;
NavigationType type;
};
@@ -893,7 +893,7 @@ void tst_QWebPage::createPluginWithPluginsDisabled()
class PluginCounterPage : public QWebPage {
public:
int m_count;
- QWeakPointer<QObject> m_widget;
+ QPointer<QObject> m_widget;
QObject* m_pluginParent;
PluginCounterPage(QObject* parent = 0)
: QWebPage(parent)
diff --git a/Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp b/Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp
index c1f8ac6a2..8e646e196 100644
--- a/Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp
+++ b/Source/WebKit/qt/tests/qwebview/tst_qwebview.cpp
@@ -139,7 +139,7 @@ void tst_QWebView::reusePage()
QFETCH(QString, html);
QWebView* view1 = new QWebView;
- QWeakPointer<QWebPage> page = new QWebPage;
+ QPointer<QWebPage> page = new QWebPage;
view1->setPage(page.data());
page.data()->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
QWebFrame* mainFrame = page.data()->mainFrame();
@@ -150,14 +150,14 @@ void tst_QWebView::reusePage()
}
view1->show();
- QTest::qWaitForWindowShown(view1);
+ QTest::qWaitForWindowExposed(view1);
delete view1;
QVERIFY(page != 0); // deleting view must not have deleted the page, since it's not a child of view
QWebView *view2 = new QWebView;
view2->setPage(page.data());
view2->show(); // in Windowless mode, you should still be able to see the plugin here
- QTest::qWaitForWindowShown(view2);
+ QTest::qWaitForWindowExposed(view2);
delete view2;
delete page.data(); // must not crash
@@ -234,7 +234,7 @@ void tst_QWebView::focusInputTypes()
{
QWebView webView;
webView.show();
- QTest::qWaitForWindowShown(&webView);
+ QTest::qWaitForWindowExposed(&webView);
QUrl url("qrc:///resources/input_types.html");
QWebFrame* const mainFrame = webView.page()->mainFrame();
@@ -360,11 +360,11 @@ void tst_QWebView::setPalette()
view1.page()->setViewportSize(view1.page()->currentFrame()->contentsSize());
view1.show();
- QTest::qWaitForWindowShown(&view1);
+ QTest::qWaitForWindowExposed(&view1);
if (!active) {
controlView.show();
- QTest::qWaitForWindowShown(&controlView);
+ QTest::qWaitForWindowExposed(&controlView);
activeView = &controlView;
controlView.activateWindow();
} else {
@@ -407,11 +407,11 @@ void tst_QWebView::setPalette()
view2.page()->setViewportSize(view2.page()->currentFrame()->contentsSize());
view2.show();
- QTest::qWaitForWindowShown(&view2);
+ QTest::qWaitForWindowExposed(&view2);
if (!active) {
controlView.show();
- QTest::qWaitForWindowShown(&controlView);
+ QTest::qWaitForWindowExposed(&controlView);
activeView = &controlView;
controlView.activateWindow();
} else {
@@ -449,7 +449,7 @@ void tst_QWebView::renderingAfterMaxAndBack()
view.page()->settings()->setMaximumPagesInCache(3);
- QTest::qWaitForWindowShown(&view);
+ QTest::qWaitForWindowExposed(&view);
QPixmap reference(view.page()->viewportSize());
reference.fill(Qt::red);
@@ -470,7 +470,7 @@ void tst_QWebView::renderingAfterMaxAndBack()
view.showMaximized();
- QTest::qWaitForWindowShown(&view);
+ QTest::qWaitForWindowExposed(&view);
QPixmap reference2(view.page()->viewportSize());
reference2.fill(Qt::blue);
diff --git a/Source/WebKit/win/ChangeLog b/Source/WebKit/win/ChangeLog
index c01990047..8a111a006 100644
--- a/Source/WebKit/win/ChangeLog
+++ b/Source/WebKit/win/ChangeLog
@@ -1,3 +1,19 @@
+2012-09-10 Beth Dakin <bdakin@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=96158
+ Need API to suppress scrollbar animations
+ -and corresponding-
+ <rdar://problem/12210972>
+
+ Reviewed by Sam Weinig.
+
+ ScrollableArea::isOnActivePage() has been re-named to
+ ScrollableArea:: scrollbarsCanBeActive().
+ * WebScrollBar.cpp:
+ (WebScrollBar::scrollbarsCanBeActive):
+ * WebScrollBar.h:
+ (WebScrollBar):
+
2012-09-10 Dominic Mazzoni <dmazzoni@google.com>
AX: Update Windows port accessible role mappings to fix some tests
diff --git a/Source/WebKit/win/WebScrollBar.cpp b/Source/WebKit/win/WebScrollBar.cpp
index f172196b3..a7e9662eb 100644
--- a/Source/WebKit/win/WebScrollBar.cpp
+++ b/Source/WebKit/win/WebScrollBar.cpp
@@ -300,7 +300,7 @@ WebCore::IntSize WebScrollBar::contentsSize() const
return m_scrollBar->frameRect().size();
}
-bool WebScrollBar::isOnActivePage() const
+bool WebScrollBar::scrollbarsCanBeActive() const
{
return true;
}
diff --git a/Source/WebKit/win/WebScrollBar.h b/Source/WebKit/win/WebScrollBar.h
index dfd1ef040..b7f599b93 100644
--- a/Source/WebKit/win/WebScrollBar.h
+++ b/Source/WebKit/win/WebScrollBar.h
@@ -120,7 +120,7 @@ protected:
virtual int visibleHeight() const OVERRIDE;
virtual int visibleWidth() const OVERRIDE;
virtual WebCore::IntSize contentsSize() const OVERRIDE;
- virtual bool isOnActivePage() const OVERRIDE;
+ virtual bool scrollbarsCanBeActive() const OVERRIDE;
virtual WebCore::IntRect scrollableAreaBoundingBox() const OVERRIDE;
// FIXME: We should provide a way to set this value.
diff --git a/Source/WebKit2/CMakeLists.txt b/Source/WebKit2/CMakeLists.txt
index f2ba7471b..16e6eab5c 100644
--- a/Source/WebKit2/CMakeLists.txt
+++ b/Source/WebKit2/CMakeLists.txt
@@ -604,10 +604,6 @@ TARGET_LINK_LIBRARIES(${WebProcess_EXECUTABLE_NAME} ${WebProcess_LIBRARIES})
SET_TARGET_PROPERTIES(${WebProcess_EXECUTABLE_NAME} PROPERTIES FOLDER "WebKit")
SET_TARGET_PROPERTIES(${WebKit2_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
-IF (WebKit2_LINK_FLAGS)
- ADD_TARGET_PROPERTIES(${WebKit2_LIBRARY_NAME} LINK_FLAGS "${WebKit2_LINK_FLAGS}")
- ADD_TARGET_PROPERTIES(${WebProcess_EXECUTABLE_NAME} LINK_FLAGS "${WebKit2_LINK_FLAGS}")
-ENDIF ()
INSTALL(TARGETS ${WebKit2_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
INSTALL(TARGETS ${WebProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index 83ca1d8d9..ceaaf2831 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,518 @@
+2012-09-11 Brady Eidson <beidson@apple.com>
+
+ We should wait longer before killing the PluginProcess.
+ <rdar://problem/12067728> and https://bugs.webkit.org/show_bug.cgi?id=96407
+
+ Reviewed by Anders Carlsson.
+
+ Currently we kill the PluginProcess 15 seconds after the last plug-in is destroyed.
+ This is short enough that most users will have the process killed many times during browsing sessions,
+ which is painful because relaunching the process is I/O and kernel intensive.
+
+ In an ideal world we could keep it around forever until the system tells us resources are running low.
+
+ In reality we do want to kill it occasionally to get a clean slate from any plug-in leaks.
+
+ A reasonable balance for now is to set a minimum lifetime of 30 minutes on the plug-in process and to
+ extend the termination timer from 15 seconds to 10 minutes.
+
+ * PluginProcess/PluginProcess.cpp:
+ (WebKit::PluginProcess::PluginProcess):
+ (WebKit::PluginProcess::initializePluginProcess):
+ (WebKit::PluginProcess::setMinimumLifetime):
+ (WebKit):
+ (WebKit::PluginProcess::minimumLifetimeTimerFired):
+ * PluginProcess/PluginProcess.h:
+ (PluginProcess):
+
+ * Shared/Plugins/PluginProcessCreationParameters.cpp:
+ (WebKit::PluginProcessCreationParameters::encode):
+ (WebKit::PluginProcessCreationParameters::decode):
+ * Shared/Plugins/PluginProcessCreationParameters.h:
+ (PluginProcessCreationParameters):
+
+ * UIProcess/Plugins/PluginProcessProxy.cpp:
+ (WebKit):
+ (WebKit::PluginProcessProxy::didFinishLaunching):
+
+2012-09-11 Jinwoo Song <jinwoo7.song@samsung.com>
+
+ Deploy StringBuilder::appendNumber() and StringBuilder::appendLiteral() in more places
+ https://bugs.webkit.org/show_bug.cgi?id=96344
+
+ Reviewed by Benjamin Poulain.
+
+ Use StringBuilder::appendNumber() instead of String::number(). Also deploy
+ StringBuilder::appendLiteral() instead of String::append() in the surrounding code.
+
+ * Shared/WebMemorySampler.cpp:
+ (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile):
+ * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
+ (WebKit::WebSocketServerConnection::sendHTTPResponseHeader):
+ * UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp:
+ (WebKit::WebInspectorServer::inspectorUrlForPageID):
+ (WebKit::WebInspectorServer::buildPageList):
+
+2012-09-11 Anders Carlsson <andersca@apple.com>
+
+ Fix speling error in comment.
+
+ * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+ (WebKit::isTransparentSilverlightBackgroundValue):
+
+2012-09-11 Raphael Kubo da Costa <rakuco@webkit.org>
+
+ [EFL] Rewrite the EFL-related Find modules
+ https://bugs.webkit.org/show_bug.cgi?id=95237
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * CMakeLists.txt: Stop setting the LINK_FLAGS property.
+ * PlatformEfl.cmake: Add libraries and include directories for
+ each Enlightenment Foundation Library used by the port.
+
+2012-09-11 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2][WKTR] TestRunner needs to implement setApplicationCacheOriginQuota
+ https://bugs.webkit.org/show_bug.cgi?id=96379
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add Bundle C API to set the application cache quota for a
+ given security origin. This is needed by WebKitTestRunner
+ to implement setApplicationCacheOriginQuota().
+
+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+ (WKBundleSetApplicationCacheOriginQuota):
+ * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::setApplicationCacheOriginQuota):
+ (WebKit):
+ * WebProcess/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+
+2012-09-11 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [WK2][WTR] WebKitTestRunner needs testRunner.setSpatialNavigationEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=96269
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added a new setter for spacial navigation enabling to Injected Bundle private API.
+
+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+ (WKBundleSetSpatialNavigationEnabled):
+ * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::setSpatialNavigationEnabled):
+ (WebKit):
+ * WebProcess/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+
+2012-09-11 Marcelo Lira <marcelo.lira@openbossa.org>
+
+ [Qt][WK2] Page loading status API lacks a status for intentionally stopped loading
+ https://bugs.webkit.org/show_bug.cgi?id=83062
+
+ Reviewed by Tor Arne Vestbø.
+
+ When the loading of a page is intentionally interrupted, the loading
+ status is set to the new state LoadStoppedStatus. This reflects
+ reality more accurately because the page was not fully loaded
+ (a LoadSucceededStatus), and it wasn't an unexpected error
+ (a LoadFailedStatus).
+
+ * UIProcess/API/qt/qquickwebview.cpp:
+ (QQuickWebViewPrivate::loadDidStop):
+ * UIProcess/API/qt/qquickwebview_p.h:
+ * UIProcess/API/qt/qquickwebview_p_p.h:
+ (QQuickWebViewPrivate):
+ * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
+ * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
+ * UIProcess/API/qt/tests/qmltests/common/TestWebView.qml:
+ * UIProcess/qt/QtWebPageLoadClient.cpp:
+ (WebKit::QtWebPageLoadClient::dispatchLoadStopped):
+ (WebKit):
+ (WebKit::QtWebPageLoadClient::dispatchLoadFailed):
+ * UIProcess/qt/QtWebPageLoadClient.h:
+ (QtWebPageLoadClient):
+
+2012-09-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Add a configure step to the Qt build system
+
+ This allows building the Qt port using just 'qmake WebKit.pro'. Using
+ the build-webkit script is still supported, and will add slightly more
+ logic to the build, such as detecting the need for clean or incremental
+ builds.
+
+ Internally, the build system now uses a new variable, WEBKIT_CONFIG, for
+ all things related to configuring the build, such as use/have/enable flags,
+ and these are translated to defines in default_post. Project files should
+ no longer check contains(DEFINES,...) to detect features, but use the new
+ enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2
+ options have been translated into WEBKIT_CONFIG options as well, and can
+ be checked using build?().
+
+ Reviewed by Simon Hausmann.
+
+ * Target.pri:
+ * UIProcess/API/qt/tests/tests.pri:
+ * WebKit2.pri:
+ * config.h:
+
+2012-09-11 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2][WKTR] TestRunner needs to implement clearApplicationCacheForOrigin
+ https://bugs.webkit.org/show_bug.cgi?id=96372
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add Bundle C API to clear the application cache for a
+ given origin. This is needed by WebKitTestRunner to
+ implement clearApplicationCacheForOrigin().
+
+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+ (WKBundleClearApplicationCacheForOrigin):
+ * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::clearApplicationCacheForOrigin):
+ (WebKit):
+ * WebProcess/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+
+2012-09-11 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [WK2][WTR] WebKitTestRunner needs layoutTestController.setMinimumTimerInterval
+ https://bugs.webkit.org/show_bug.cgi?id=96256
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added new setter for minimum DOM timer interval to InjectedBundle private API.
+
+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+ (WKBundleSetMinimumTimerInterval):
+ * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::setMinimumTimerInterval):
+ (WebKit):
+ * WebProcess/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+
+2012-09-11 Kangil Han <kangil.han@samsung.com>
+
+ [WK2][EFL] Fix compile warnings when enable tiled backing store
+ https://bugs.webkit.org/show_bug.cgi?id=95342
+
+ Reviewed by Gyuyoung Kim.
+
+ Fixed compile time warning messages when enable tiled backing store.
+
+ * UIProcess/API/efl/ewk_view.cpp:
+ (ewk_view_accelerated_compositing_mode_enter): Fixed invalid use of 'EINA_SAFETY_ON_NULL_RETURN_VAL' since it used '!' ahead of evasGl value so it is always null.
+ * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
+ (WebCore::CoordinatedGraphicsLayer::setChildren): Replaced 'int' i with 'unsigned' because its comparing value is 'size_t'.
+ * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
+ (WebKit::LayerTreeCoordinator::renderNextFrame): Replaced 'int' i with 'unsigned' because its comparing value is 'size_t'.
+ (WebKit::LayerTreeCoordinator::beginContentUpdate): Replaced 'int' i with 'unsigned' because its comparing value is 'size_t'.
+
+2012-09-11 Byungwoo Lee <bw80.lee@samsung.com>
+
+ [EFL][WK2] WKEinaSharedString needs a function to adopt eina stringshare.
+ https://bugs.webkit.org/show_bug.cgi?id=96201
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ WKEinaSharedString needs a to adopt eina stringshare directly.
+
+ With this adopt function, an instance that is directly created with
+ eina_stringshare_add() can be easily handled by WKEinaSharedString
+ without calling eina_stringshare_del() for preventing memory leak.
+
+ * UIProcess/API/cpp/efl/WKEinaSharedString.cpp:
+ (WKEinaSharedString::adopt):
+ * UIProcess/API/cpp/efl/WKEinaSharedString.h:
+ * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp:
+ (TEST_F):
+
+2012-09-11 Andras Becsi <andras.becsi@nokia.com>
+
+ [Qt][WK2] Fix the build with recent Qt5
+ https://bugs.webkit.org/show_bug.cgi?id=96283
+
+ Reviewed by Simon Hausmann.
+
+ We should not use deprecated Qt API because doing that results
+ in build failure since all the deprecated API was disabled
+ in qtbase (https://codereview.qt-project.org/#change,24890).
+
+ * UIProcess/API/qt/qwebnavigationhistory.cpp:
+ (QWebNavigationListModel::roleNames):
+ (QWebNavigationListModel::reset):
+ * UIProcess/API/qt/qwebnavigationhistory_p.h:
+ * UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp:
+ (WebView::load):
+ * UIProcess/qt/WebPopupMenuProxyQt.cpp:
+ (PopupMenuItemModel):
+ (WebKit::PopupMenuItemModel::PopupMenuItemModel):
+ (WebKit::PopupMenuItemModel::roleNames):
+ (WebKit):
+
+2012-09-11 Christophe Dumez <christophe.dumez@intel.com>
+
+ WTR needs an implementation of applicationCacheDiskUsageForOrigin
+ https://bugs.webkit.org/show_bug.cgi?id=87188
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add Bundle private C API to retrieve the application cache
+ usage for a specific security origin. This is needed by
+ WebKitTestRunner.
+
+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+ (WKBundleGetAppCacheUsageForOrigin):
+ * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::appCacheUsageForOrigin):
+ (WebKit):
+ * WebProcess/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+
+2012-09-11 Zhigang Gong <zhigang.gong@linux.intel.com>
+
+ [EFL][WK2] Add necessary include directory in WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=95173
+
+ Unreviewed build fix.
+
+ revision r126694: Move TextureMapperGL to use
+ GraphicsContext3D. modify the TextureMapperGL.h to include
+ GraphicsContext3D.h. And when enable TEXTURE_MAPPER,
+ file WebKit2/Shared/ShareableSurface.cpp will include
+ TextureMapperGL.h then depends on GraphicsContext3D.h
+ thus it need to add ANGLE director. As currently, this
+ problem only affect EFL platform, according to Gyuyoung Kim's
+ suggestion, we add this include dir into EFL private file
+ PlatformEfl.cmake. Otherwise, the build will fail.
+
+ To trigger this problem by using the following command:
+ ./Tools/Scripts/build-webkit --efl --3d-rendering --tiled-backing-store
+
+ * CMakeLists.txt:
+
+2012-09-10 Byungwoo Lee <bw80.lee@samsung.com>
+
+ [EFL][WK2] Build warning : fix warning about extended initializer lists on EWK2UnitTestBase.cpp.
+ https://bugs.webkit.org/show_bug.cgi?id=95990
+
+ Reviewed by Gyuyoung Kim.
+
+ Fix build warning about extended initializer lists only available with
+ -std=c++0x or -std=gnu++0x.
+
+ * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
+ (EWK2UnitTest::ewk2UnitTestBrowserViewSmartClass):
+ (EWK2UnitTest):
+ (EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
+
+2012-09-10 Beth Dakin <bdakin@apple.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=96158
+ Need API to suppress scrollbar animations
+ -and corresponding-
+ <rdar://problem/12210972>
+
+ Reviewed by Sam Weinig.
+
+ Add suppressScrollbarAnimations as a WebCreationParameter.
+ * Shared/WebPageCreationParameters.h:
+ (WebPageCreationParameters):
+
+ New API. Calls into the web process for the setter but not the
+ getter.
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageSetSuppressScrollbarAnimations):
+ (WKPageAreScrollbarAnimationsSuppressed):
+ * UIProcess/API/C/WKPage.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::WebPageProxy):
+ (WebKit::WebPageProxy::setSuppressScrollbarAnimations):
+ (WebKit):
+ (WebKit::WebPageProxy::creationParameters):
+ * UIProcess/WebPageProxy.h:
+ (WebPageProxy):
+ (WebKit::WebPageProxy::areScrollbarAnimationsSuppressed):
+ * WebProcess/WebPage/WebPage.messages.in:
+
+ Call into WebCore.
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::setSuppressScrollbarAnimations):
+ (WebKit):
+ * WebProcess/WebPage/WebPage.h:
+ (WebPage):
+
+ This ScrollableArea area function is re-named by this patch in
+ WebCore.
+ * WebProcess/Plugins/PDF/BuiltInPDFView.h:
+ * WebProcess/Plugins/PDF/BuiltInPDFView.mm:
+ (WebKit::BuiltInPDFView::scrollbarsCanBeActive):
+
+2012-09-10 James Robinson <jamesr@chromium.org>
+
+ Unreviewed, rolling out r127837.
+ http://trac.webkit.org/changeset/127837
+ https://bugs.webkit.org/show_bug.cgi?id=93898
+
+ Broke ScrollingCoordinator on chromium
+
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
+
+2012-09-10 Jer Noble <jer.noble@apple.com>
+
+ Unreviewed; rolling out r128081.
+ http://trac.webkit.org/changeset/128081
+ https://bugs.webkit.org/show_bug.cgi?id=96134
+
+ New test http/tests/media/video-donottrack.html fails to run on Apple test bots.
+
+ * Shared/APIClientTraits.h:
+ * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
+ * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
+ * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
+ (InjectedBundlePageLoaderClient):
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+ (WebFrameLoaderClient):
+ * WebProcess/qt/QtBuiltinBundlePage.cpp:
+ (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
+
+2012-09-07 Jon Lee <jonlee@apple.com>
+
+ Update notifications to latest spec
+ https://bugs.webkit.org/show_bug.cgi?id=91726
+ <rdar://problem/11910451>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Expose lang and dir.
+
+ * UIProcess/API/C/WKNotification.cpp:
+ (WKNotificationCopyLang):
+ (WKNotificationCopyDir):
+ * UIProcess/API/C/WKNotification.h:
+ * UIProcess/Notifications/WebNotification.cpp:
+ (WebKit::WebNotification::WebNotification):
+ * UIProcess/Notifications/WebNotification.h:
+ (WebKit::WebNotification::create):
+ (WebKit::WebNotification::lang):
+ (WebKit::WebNotification::dir):
+ (WebNotification):
+ * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
+ (WebKit::WebNotificationManagerProxy::show):
+ * UIProcess/Notifications/WebNotificationManagerProxy.h:
+ (WebNotificationManagerProxy):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::showNotification):
+ * UIProcess/WebPageProxy.h:
+ (WebPageProxy):
+ * UIProcess/WebPageProxy.messages.in:
+ * WebProcess/Notifications/WebNotificationManager.cpp:
+ (WebKit::WebNotificationManager::show):
+
+2012-09-10 Alexey Proskuryakov <ap@apple.com>
+
+ Build fix.
+
+ * UIProcess/WebContext.h: Added a default value for relatedPage argment - if
+ you don't have one, null is fine.
+
+2012-09-10 Alexey Proskuryakov <ap@apple.com>
+
+ [WK2] Add an API to open a page in same process
+ https://bugs.webkit.org/show_bug.cgi?id=96306
+
+ Reviewed by Anders Carlsson.
+
+ The name "related" inspired by <http://wiki.whatwg.org/wiki/Links_to_Unrelated_Browsing_Contexts>.
+
+ * UIProcess/API/mac/WKView.h: Added an API. It's unwieldy, but I blame
+ WKBrowsingContextGroup, not the related view.
+
+ * UIProcess/API/mac/WKViewPrivate.h: Matching SPI for clients that mostly use
+ C APIs.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView initWithFrame:processGroup:browsingContextGroup:]): Use new back-end
+ signature.
+ (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
+ Get page from WKView, and call back-end.
+ (-[WKView initWithFrame:contextRef:pageGroupRef:]): Reimplement existing method
+ by calling new, more powerful one.
+ (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Just one change,
+ pass relatedPage to the context.
+
+ * UIProcess/WebContext.cpp: (WebKit::WebContext::createWebPage): If related page
+ is not null, use its process.
+
+ * UIProcess/WebContext.h: (WebContext): Updated createWebPage signature.
+
+2012-09-10 Brady Eidson <beidson@apple.com>
+
+ Javascript in foreground tabs should not wait synchronously for plug-ins to load
+ <rdar://problem/12067415> and https://bugs.webkit.org/show_bug.cgi?id=96167
+
+ Reviewed by Geoff Garen.
+
+ Synchronously waiting for initialization to complete when javascript accesses the plug-in script object severely
+ reduces the effectiveness of having an asynchronous NPP_New.
+
+ Such as with background tabs that have never been viewed, we already have cases where JS calls into the plug-in
+ element fail because we haven't bothered to initialize the plug-in.
+
+ We get a huge win by expanding that to foreground tabs that simply haven't finished initializing their plug-ins.
+
+ * WebProcess/Plugins/PluginView.cpp:
+ (WebKit::PluginView::scriptObject): If initialization is not complete just return 0 - They can get at the script object later.
+
+ Remove the notion of "wait for asynchronous initialization" altogether:
+ * WebProcess/Plugins/Netscape/NetscapePlugin.h:
+ (NetscapePlugin):
+ * WebProcess/Plugins/PDF/BuiltInPDFView.h:
+ (BuiltInPDFView):
+ * WebProcess/Plugins/Plugin.h:
+ (Plugin):
+ * WebProcess/Plugins/PluginProxy.cpp:
+ * WebProcess/Plugins/PluginProxy.h:
+ (PluginProxy):
+
+2012-09-07 Jer Noble <jer.noble@apple.com>
+
+ <audio> and <video> should send Do Not Track when appropriate
+ https://bugs.webkit.org/show_bug.cgi?id=96134
+
+ Reviewed by Eric Carlson.
+
+ Add support for the shouldSendDoNotTrackHTTPHeader by passing the request
+ on to the WebFrameLoadDelegate.
+
+ * Shared/APIClientTraits.cpp: Increment the interfaceSizes for
+ WKBundlePageLoaderClient by the value of the new functions.
+ * Shared/APIClientTraits.h: Ditto.
+ * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add a new API to
+ WKBundlePageLoaderClient and bump the version number.
+ * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
+ (WebKit::InjectedBundlePageLoaderClient::shouldSendDoNotTrackHTTPHeader):
+ Pass the question on to the client.
+ * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::shouldSendDoNotTrackHTTPHeader):
+ Pass the question on to the bundle.
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+ * WebProcess/qt/QtBuiltinBundlePage.cpp:
+ (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
+ Add an entry for the new function in the Qt loader client.
+
2012-09-10 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Don't convert to UTF-8 the suggestedFilename passed to Download::decideDestinationWithSuggestedFilename()
diff --git a/Source/WebKit2/PlatformEfl.cmake b/Source/WebKit2/PlatformEfl.cmake
index b49247fd8..9abc6ec34 100644
--- a/Source/WebKit2/PlatformEfl.cmake
+++ b/Source/WebKit2/PlatformEfl.cmake
@@ -1,12 +1,3 @@
-LIST(APPEND WebKit2_LINK_FLAGS
- ${CAIRO_LDFLAGS}
- ${ECORE_X_LDFLAGS}
- ${EDJE_LDFLAGS}
- ${EFLDEPS_LDFLAGS}
- ${EFREET_LDFLAGS}
- ${EVAS_LDFLAGS}
-)
-
LIST(APPEND WebKit2_SOURCES
Platform/efl/ModuleEfl.cpp
Platform/efl/WorkQueueEfl.cpp
@@ -142,11 +133,13 @@ LIST(APPEND WebKit2_INCLUDE_DIRECTORIES
"${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
"${WTF_DIR}/wtf/gobject"
${CAIRO_INCLUDE_DIRS}
- ${ECORE_X_INCLUDE_DIRS}
+ ${ECORE_INCLUDE_DIRS}
+ ${ECORE_EVAS_INCLUDE_DIRS}
${EDJE_INCLUDE_DIRS}
- ${EFLDEPS_INCLUDE_DIRS}
${EFREET_INCLUDE_DIRS}
+ ${EINA_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
+ ${HARFBUZZ_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
${LIBXML2_INCLUDE_DIR}
${LIBXSLT_INCLUDE_DIRS}
@@ -156,12 +149,22 @@ LIST(APPEND WebKit2_INCLUDE_DIRECTORIES
${WTF_DIR}
)
+IF (WTF_USE_3D_GRAPHICS)
+ LIST(APPEND WebKit2_INCLUDE_DIRECTORIES
+ "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
+ )
+ENDIF ()
+
LIST(APPEND WebKit2_LIBRARIES
${CAIRO_LIBRARIES}
- ${ECORE_X_LIBRARIES}
- ${EFLDEPS_LIBRARIES}
+ ${ECORE_LIBRARIES}
+ ${ECORE_EVAS_LIBRARIES}
+ ${EDJE_LIBRARIES}
${EFREET_LIBRARIES}
+ ${EINA_LIBRARIES}
+ ${EVAS_LIBRARIES}
${Freetype_LIBRARIES}
+ ${HARFBUZZ_LIBRARIES}
${LIBXML2_LIBRARIES}
${OPENGL_LIBRARIES}
${SQLITE_LIBRARIES}
diff --git a/Source/WebKit2/PluginProcess/PluginProcess.cpp b/Source/WebKit2/PluginProcess/PluginProcess.cpp
index 6f868bbf8..1bffafe74 100644
--- a/Source/WebKit2/PluginProcess/PluginProcess.cpp
+++ b/Source/WebKit2/PluginProcess/PluginProcess.cpp
@@ -73,6 +73,7 @@ PluginProcess& PluginProcess::shared()
PluginProcess::PluginProcess()
: m_supportsAsynchronousPluginInitialization(false)
+ , m_minimumLifetimeTimer(RunLoop::main(), this, &PluginProcess::minimumLifetimeTimerFired)
#if PLATFORM(MAC)
, m_compositingRenderServerPort(MACH_PORT_NULL)
#endif
@@ -159,6 +160,7 @@ void PluginProcess::initializePluginProcess(const PluginProcessCreationParameter
m_pluginPath = parameters.pluginPath;
m_supportsAsynchronousPluginInitialization = parameters.supportsAsynchronousPluginInitialization;
+ setMinimumLifetime(parameters.minimumLifetime);
setTerminationTimeout(parameters.terminationTimeout);
platformInitialize(parameters);
@@ -254,6 +256,21 @@ void PluginProcess::clearSiteData(const Vector<String>& sites, uint64_t flags, u
m_connection->send(Messages::PluginProcessProxy::DidClearSiteData(callbackID), 0);
}
+void PluginProcess::setMinimumLifetime(double lifetime)
+{
+ if (lifetime <= 0.0)
+ return;
+
+ disableTermination();
+
+ m_minimumLifetimeTimer.startOneShot(lifetime);
+}
+
+void PluginProcess::minimumLifetimeTimerFired()
+{
+ enableTermination();
+}
+
} // namespace WebKit
#endif // ENABLE(PLUGIN_PROCESS)
diff --git a/Source/WebKit2/PluginProcess/PluginProcess.h b/Source/WebKit2/PluginProcess/PluginProcess.h
index bcbd2003e..5ae4d359e 100644
--- a/Source/WebKit2/PluginProcess/PluginProcess.h
+++ b/Source/WebKit2/PluginProcess/PluginProcess.h
@@ -86,6 +86,9 @@ private:
void clearSiteData(const Vector<String>& sites, uint64_t flags, uint64_t maxAgeInSeconds, uint64_t callbackID);
void platformInitialize(const PluginProcessCreationParameters&);
+
+ void setMinimumLifetime(double);
+ void minimumLifetimeTimerFired();
// The connection to the UI process.
RefPtr<CoreIPC::Connection> m_connection;
@@ -100,12 +103,14 @@ private:
RefPtr<NetscapePluginModule> m_pluginModule;
bool m_supportsAsynchronousPluginInitialization;
+
+ WebCore::RunLoop::Timer<PluginProcess> m_minimumLifetimeTimer;
#if USE(ACCELERATED_COMPOSITING) && PLATFORM(MAC)
// The Mach port used for accelerated compositing.
mach_port_t m_compositingRenderServerPort;
#endif
-
+
};
} // namespace WebKit
diff --git a/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp b/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp
index f325eb6ac..8d3950a4c 100644
--- a/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp
+++ b/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp
@@ -41,6 +41,7 @@ void PluginProcessCreationParameters::encode(CoreIPC::ArgumentEncoder* encoder)
{
encoder->encode(pluginPath);
encoder->encode(supportsAsynchronousPluginInitialization);
+ encoder->encode(minimumLifetime);
encoder->encode(terminationTimeout);
#if PLATFORM(MAC)
@@ -55,6 +56,8 @@ bool PluginProcessCreationParameters::decode(CoreIPC::ArgumentDecoder* decoder,
return false;
if (!decoder->decode(result.supportsAsynchronousPluginInitialization))
return false;
+ if (!decoder->decode(result.minimumLifetime))
+ return false;
if (!decoder->decode(result.terminationTimeout))
return false;
#if PLATFORM(MAC)
diff --git a/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h b/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h
index eaadf1957..1d6d2e09c 100644
--- a/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h
+++ b/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h
@@ -50,6 +50,7 @@ struct PluginProcessCreationParameters {
String pluginPath;
bool supportsAsynchronousPluginInitialization;
+ double minimumLifetime;
double terminationTimeout;
#if PLATFORM(MAC)
diff --git a/Source/WebKit2/Shared/WebMemorySampler.cpp b/Source/WebKit2/Shared/WebMemorySampler.cpp
index 6f77843ce..868e84823 100644
--- a/Source/WebKit2/Shared/WebMemorySampler.cpp
+++ b/Source/WebKit2/Shared/WebMemorySampler.cpp
@@ -177,7 +177,7 @@ void WebMemorySampler::appendCurrentMemoryUsageToFile(PlatformFileHandle& file)
statString.append(separator);
for (size_t i = 0; i < memoryStats.values.size(); ++i) {
statString.append(separator);
- statString.append(String::number(memoryStats.values[i]));
+ statString.appendNumber(memoryStats.values[i]);
}
}
statString.append('\n');
diff --git a/Source/WebKit2/Shared/WebPageCreationParameters.h b/Source/WebKit2/Shared/WebPageCreationParameters.h
index 97e88b607..08c3bcd21 100644
--- a/Source/WebKit2/Shared/WebPageCreationParameters.h
+++ b/Source/WebKit2/Shared/WebPageCreationParameters.h
@@ -67,6 +67,8 @@ struct WebPageCreationParameters {
bool useFixedLayout;
WebCore::IntSize fixedLayoutSize;
+ bool suppressScrollbarAnimations;
+
WebCore::Pagination::Mode paginationMode;
bool paginationBehavesLikeColumns;
double pageLength;
diff --git a/Source/WebKit2/Target.pri b/Source/WebKit2/Target.pri
index 8d703671f..629852edc 100644
--- a/Source/WebKit2/Target.pri
+++ b/Source/WebKit2/Target.pri
@@ -745,7 +745,7 @@ SOURCES += \
WebProcess/qt/WebProcessMainQt.cpp \
WebProcess/qt/WebProcessQt.cpp
-contains(DEFINES, HAVE_QTQUICK=1) {
+have?(QTQUICK) {
QT += qml quick quick-private
HEADERS += \
@@ -822,7 +822,7 @@ contains(DEFINES, HAVE_QTQUICK=1) {
UIProcess/qt/QtWebIconDatabaseClient.cpp \
UIProcess/qt/QtWebPageUIClient.cpp
- contains(DEFINES, ENABLE_INPUT_TYPE_COLOR=1) {
+ enable?(INPUT_TYPE_COLOR) {
HEADERS += \
UIProcess/qt/WebColorChooserProxyQt.h
SOURCES += \
@@ -831,7 +831,7 @@ contains(DEFINES, HAVE_QTQUICK=1) {
}
mac: {
- contains(DEFINES, WTF_USE_QTKIT=1) {
+ use?(QTKIT) {
DEFINES += NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
INCLUDEPATH += \
$$PWD/../../WebKitLibraries/
@@ -876,7 +876,7 @@ win32 {
}
-contains(DEFINES, ENABLE_INSPECTOR_SERVER=1) {
+enable?(INSPECTOR_SERVER) {
HEADERS += \
UIProcess/InspectorServer/WebInspectorServer.h \
UIProcess/InspectorServer/WebSocketServer.h \
@@ -892,7 +892,7 @@ contains(DEFINES, ENABLE_INSPECTOR_SERVER=1) {
UIProcess/InspectorServer/qt/WebSocketServerQt.cpp
}
-contains(DEFINES, ENABLE_TOUCH_EVENTS=1) {
+enable?(TOUCH_EVENTS) {
HEADERS += \
Shared/NativeWebTouchEvent.h
SOURCES += \
@@ -900,11 +900,11 @@ contains(DEFINES, ENABLE_TOUCH_EVENTS=1) {
}
-contains(DEFINES, ENABLE_GEOLOCATION=1): QT += location
+enable?(GEOLOCATION): QT += location
-contains(DEFINES, WTF_USE_3D_GRAPHICS=1): WEBKIT += angle
+use?(3D_GRAPHICS): WEBKIT += angle
-plugin_backend_xlib {
+use?(PLUGIN_BACKEND_XLIB) {
DEFINES += XP_UNIX
PKGCONFIG += x11
DEFINES += MOZ_X11
diff --git a/Source/WebKit2/UIProcess/API/C/WKNotification.cpp b/Source/WebKit2/UIProcess/API/C/WKNotification.cpp
index 26700e1aa..78b09e09e 100644
--- a/Source/WebKit2/UIProcess/API/C/WKNotification.cpp
+++ b/Source/WebKit2/UIProcess/API/C/WKNotification.cpp
@@ -57,6 +57,16 @@ WKStringRef WKNotificationCopyTag(WKNotificationRef notification)
return toCopiedAPI(toImpl(notification)->tag());
}
+WKStringRef WKNotificationCopyLang(WKNotificationRef notification)
+{
+ return toCopiedAPI(toImpl(notification)->lang());
+}
+
+WKStringRef WKNotificationCopyDir(WKNotificationRef notification)
+{
+ return toCopiedAPI(toImpl(notification)->dir());
+}
+
WKSecurityOriginRef WKNotificationGetSecurityOrigin(WKNotificationRef notification)
{
return toAPI(toImpl(notification)->origin());
diff --git a/Source/WebKit2/UIProcess/API/C/WKNotification.h b/Source/WebKit2/UIProcess/API/C/WKNotification.h
index 3f4b1a900..7035ef3f8 100644
--- a/Source/WebKit2/UIProcess/API/C/WKNotification.h
+++ b/Source/WebKit2/UIProcess/API/C/WKNotification.h
@@ -38,6 +38,8 @@ WK_EXPORT WKStringRef WKNotificationCopyTitle(WKNotificationRef notification);
WK_EXPORT WKStringRef WKNotificationCopyBody(WKNotificationRef notification);
WK_EXPORT WKStringRef WKNotificationCopyIconURL(WKNotificationRef notification);
WK_EXPORT WKStringRef WKNotificationCopyTag(WKNotificationRef notification);
+WK_EXPORT WKStringRef WKNotificationCopyLang(WKNotificationRef notification);
+WK_EXPORT WKStringRef WKNotificationCopyDir(WKNotificationRef notification);
WK_EXPORT WKSecurityOriginRef WKNotificationGetSecurityOrigin(WKNotificationRef notification);
WK_EXPORT uint64_t WKNotificationGetID(WKNotificationRef notification);
diff --git a/Source/WebKit2/UIProcess/API/C/WKPage.cpp b/Source/WebKit2/UIProcess/API/C/WKPage.cpp
index 437179bfb..e24c2d6ef 100644
--- a/Source/WebKit2/UIProcess/API/C/WKPage.cpp
+++ b/Source/WebKit2/UIProcess/API/C/WKPage.cpp
@@ -340,6 +340,16 @@ bool WKPageHasVerticalScrollbar(WKPageRef pageRef)
return toImpl(pageRef)->hasVerticalScrollbar();
}
+void WKPageSetSuppressScrollbarAnimations(WKPageRef pageRef, bool suppressAnimations)
+{
+ toImpl(pageRef)->setSuppressScrollbarAnimations(suppressAnimations);
+}
+
+bool WKPageAreScrollbarAnimationsSuppressed(WKPageRef pageRef)
+{
+ return toImpl(pageRef)->areScrollbarAnimationsSuppressed();
+}
+
bool WKPageIsPinnedToLeftSide(WKPageRef pageRef)
{
return toImpl(pageRef)->isPinnedToLeftSide();
diff --git a/Source/WebKit2/UIProcess/API/C/WKPage.h b/Source/WebKit2/UIProcess/API/C/WKPage.h
index f7946080b..5566826d3 100644
--- a/Source/WebKit2/UIProcess/API/C/WKPage.h
+++ b/Source/WebKit2/UIProcess/API/C/WKPage.h
@@ -422,6 +422,9 @@ WK_EXPORT WKSize WKPageFixedLayoutSize(WKPageRef page);
WK_EXPORT bool WKPageHasHorizontalScrollbar(WKPageRef page);
WK_EXPORT bool WKPageHasVerticalScrollbar(WKPageRef page);
+WK_EXPORT void WKPageSetSuppressScrollbarAnimations(WKPageRef page, bool suppressAnimations);
+WK_EXPORT bool WKPageAreScrollbarAnimationsSuppressed(WKPageRef page);
+
WK_EXPORT bool WKPageIsPinnedToLeftSide(WKPageRef page);
WK_EXPORT bool WKPageIsPinnedToRightSide(WKPageRef page);
diff --git a/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp b/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp
index ea43df167..d31bfd40e 100644
--- a/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp
+++ b/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.cpp
@@ -105,3 +105,10 @@ bool WKEinaSharedString::operator==(const char* str) const
{
return (!str || !m_string) ? (str == m_string) : !strcmp(m_string, str);
}
+
+WKEinaSharedString WKEinaSharedString::adopt(Eina_Stringshare* string)
+{
+ WKEinaSharedString sharedString;
+ sharedString.m_string = static_cast<const char*>(string);
+ return sharedString;
+}
diff --git a/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h b/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h
index 68d76f4ea..52cfffa0e 100644
--- a/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h
+++ b/Source/WebKit2/UIProcess/API/cpp/efl/WKEinaSharedString.h
@@ -61,6 +61,8 @@ public:
ALWAYS_INLINE size_t length() const { return m_string ? static_cast<size_t>(eina_stringshare_strlen(m_string)) : 0; }
+ static WKEinaSharedString adopt(Eina_Stringshare*);
+
private:
const char* m_string;
};
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
index 9971b1634..3196d0b27 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
@@ -498,7 +498,7 @@ bool ewk_view_accelerated_compositing_mode_enter(const Evas_Object* ewkView)
EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
- EINA_SAFETY_ON_NULL_RETURN_VAL(!priv->evasGl, false);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(priv->evasGl, false);
Evas* evas = evas_object_evas_get(ewkView);
priv->evasGl = evas_gl_new(evas);
diff --git a/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp b/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp
index 8033e2498..54523f046 100644
--- a/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp
@@ -38,10 +38,16 @@ static void onLoadFinished(void* userData, Evas_Object* webView, void* eventInfo
*loadFinished = true;
}
+static Ewk_View_Smart_Class ewk2UnitTestBrowserViewSmartClass()
+{
+ static Ewk_View_Smart_Class ewkViewClass = EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION("Browser_View");
+ return ewkViewClass;
+}
+
EWK2UnitTestBase::EWK2UnitTestBase()
: m_ecoreEvas(0)
, m_webView(0)
- , m_ewkViewClass(EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION("Browser_View"))
+ , m_ewkViewClass(ewk2UnitTestBrowserViewSmartClass())
{
ewk_view_smart_class_set(&m_ewkViewClass);
}
diff --git a/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp b/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp
index 7f62e0b1e..c820239a5 100644
--- a/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp
@@ -75,6 +75,18 @@ TEST_F(EWK2UnitTestBase, constructFromWKURL)
checkString(string, testUrl);
}
+TEST_F(EWK2UnitTestBase, constructFromEinaStringShare)
+{
+ WKEinaSharedString string(WKEinaSharedString::adopt(eina_stringshare_add(testString)));
+ checkString(string, testString);
+
+ string = WKEinaSharedString::adopt(eina_stringshare_add(anotherTestString));
+ checkString(string, anotherTestString);
+
+ string = string;
+ checkString(string, anotherTestString);
+}
+
TEST_F(EWK2UnitTestBase, costructCopy)
{
WKEinaSharedString string(testString);
diff --git a/Source/WebKit2/UIProcess/API/mac/WKView.h b/Source/WebKit2/UIProcess/API/mac/WKView.h
index 07105c40b..fec8d6380 100644
--- a/Source/WebKit2/UIProcess/API/mac/WKView.h
+++ b/Source/WebKit2/UIProcess/API/mac/WKView.h
@@ -39,6 +39,7 @@ WK_EXPORT
}
- (id)initWithFrame:(NSRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup;
+- (id)initWithFrame:(NSRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup relatedToView:(WKView *)relatedView;
@property(readonly) WKBrowsingContextController *browsingContextController;
diff --git a/Source/WebKit2/UIProcess/API/mac/WKView.mm b/Source/WebKit2/UIProcess/API/mac/WKView.mm
index 98e32662a..9d69399d4 100644
--- a/Source/WebKit2/UIProcess/API/mac/WKView.mm
+++ b/Source/WebKit2/UIProcess/API/mac/WKView.mm
@@ -247,7 +247,12 @@ struct WKViewInterpretKeyEventsParameters {
- (id)initWithFrame:(NSRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup
{
- return [self initWithFrame:frame contextRef:processGroup._contextRef pageGroupRef:browsingContextGroup._pageGroupRef];
+ return [self initWithFrame:frame contextRef:processGroup._contextRef pageGroupRef:browsingContextGroup._pageGroupRef relatedToPage:nil];
+}
+
+- (id)initWithFrame:(NSRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup relatedToView:(WKView *)relatedView
+{
+ return [self initWithFrame:frame contextRef:processGroup._contextRef pageGroupRef:browsingContextGroup._pageGroupRef relatedToPage:relatedView ? toAPI(relatedView->_data->_page.get()) : nil];
}
- (void)dealloc
@@ -2986,6 +2991,11 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef
{
+ return [self initWithFrame:frame contextRef:contextRef pageGroupRef:pageGroupRef relatedToPage:nil];
+}
+
+- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef relatedToPage:(WKPageRef)relatedPage
+{
self = [super initWithFrame:frame];
if (!self)
return nil;
@@ -3016,7 +3026,7 @@ static NSString *pathWithUniqueFilenameForPath(NSString *path)
_data = [[WKViewData alloc] init];
_data->_pageClient = PageClientImpl::create(self);
- _data->_page = toImpl(contextRef)->createWebPage(_data->_pageClient.get(), toImpl(pageGroupRef));
+ _data->_page = toImpl(contextRef)->createWebPage(_data->_pageClient.get(), toImpl(pageGroupRef), toImpl(relatedPage));
_data->_page->setIntrinsicDeviceScaleFactor([self _intrinsicDeviceScaleFactor]);
_data->_page->initializeWebPage();
#if ENABLE(FULLSCREEN_API)
diff --git a/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h b/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h
index be3c6303e..51578764f 100644
--- a/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h
+++ b/Source/WebKit2/UIProcess/API/mac/WKViewPrivate.h
@@ -32,6 +32,7 @@
@property(readonly) WKPageRef pageRef;
- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef;
+- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef relatedToPage:(WKPageRef)relatedPage;
- (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo forFrame:(WKFrameRef)frameRef;
- (BOOL)canChangeFrameLayout:(WKFrameRef)frameRef;
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
index 490b9ba7c..bacae91ec 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
@@ -323,6 +323,14 @@ void QQuickWebViewPrivate::initialize(WKContextRef contextRef, WKPageGroupRef pa
webPageProxy->initializeWebPage();
}
+void QQuickWebViewPrivate::loadDidStop()
+{
+ Q_Q(QQuickWebView);
+ ASSERT(!q->loading());
+ QWebLoadRequest loadRequest(q->url(), QQuickWebView::LoadStoppedStatus);
+ emit q->loadingChanged(&loadRequest);
+}
+
void QQuickWebViewPrivate::onComponentComplete()
{
Q_Q(QQuickWebView);
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
index 68e5fca30..5feb4b45a 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p.h
@@ -96,6 +96,7 @@ public:
};
enum LoadStatus {
LoadStartedStatus,
+ LoadStoppedStatus,
LoadSucceededStatus,
LoadFailedStatus
};
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
index d1d3d9e88..6cc5e8d39 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
@@ -79,6 +79,7 @@ public:
virtual void loadProgressDidChange(int loadProgress);
virtual void backForwardListDidChange();
virtual void loadDidSucceed();
+ virtual void loadDidStop();
virtual void loadDidFail(const WebKit::QtWebError& error);
virtual void handleMouseEvent(QMouseEvent*);
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory.cpp b/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory.cpp
index b057526e1..0c9f7b856 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory.cpp
@@ -96,13 +96,12 @@ void QWebNavigationHistoryPrivate::goForwardTo(int index)
WKPageGoToBackForwardListItem(m_page.get(), itemRef.get());
}
-QWebNavigationListModel::QWebNavigationListModel()
- : QAbstractListModel()
+QHash<int, QByteArray> QWebNavigationListModel::roleNames() const
{
QHash<int, QByteArray> roles;
roles[QWebNavigationHistory::UrlRole] = "url";
roles[QWebNavigationHistory::TitleRole] = "title";
- setRoleNames(roles);
+ return roles;
}
QWebNavigationListModel::~QWebNavigationListModel()
@@ -137,6 +136,12 @@ QVariant QWebNavigationListModel::data(const QModelIndex& index, int role) const
return QVariant();
}
+void QWebNavigationListModel::reset()
+{
+ beginResetModel();
+ endResetModel();
+}
+
QWebNavigationHistory::QWebNavigationHistory()
: QObject()
{
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p.h b/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p.h
index f1a3e572c..84ef867be 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwebnavigationhistory_p.h
@@ -48,9 +48,14 @@ public:
int rowCount(const QModelIndex& parent = QModelIndex()) const;
QVariant data(const QModelIndex& index, int role) const;
+ QHash<int, QByteArray> roleNames() const;
+ void reset();
private:
- QWebNavigationListModel();
+ QWebNavigationListModel()
+ : QAbstractListModel()
+ { }
+
QWebNavigationListModelPrivate* d;
friend class QWebNavigationListModelPrivate;
friend class QWebNavigationHistory;
diff --git a/Source/WebKit2/UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp b/Source/WebKit2/UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp
index d0ea1beb8..192e1bb1a 100644
--- a/Source/WebKit2/UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp
@@ -44,6 +44,7 @@ static QStringList expectedAPI = QStringList()
<< "QQuickWebView.AcceptRequest --> NavigationRequestAction"
<< "QQuickWebView.IgnoreRequest --> NavigationRequestAction"
<< "QQuickWebView.LoadStartedStatus --> LoadStatus"
+ << "QQuickWebView.LoadStoppedStatus --> LoadStatus"
<< "QQuickWebView.LoadSucceededStatus --> LoadStatus"
<< "QQuickWebView.LoadFailedStatus --> LoadStatus"
<< "QQuickWebView.NoErrorDomain --> ErrorDomain"
diff --git a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml
index f77c7f87a..0f8f6a1ff 100644
--- a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml
+++ b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml
@@ -120,5 +120,22 @@ TestWebView {
verify(webView.waitForLoadSucceeded())
compare(webView.url, url)
}
+
+ function test_stopStatus() {
+ var url = Qt.resolvedUrl("../common/test1.html")
+
+ webView.loadingChanged.connect(function(loadRequest) {
+ if (loadRequest.status == WebView.LoadStopStatus) {
+ compare(webView.url, url)
+ compare(loadRequest.url, url)
+ }
+ })
+
+ webView.url = url
+ compare(webView.url, url)
+ webView.stop()
+ verify(webView.waitForLoadStopped())
+ compare(webView.url, url)
+ }
}
}
diff --git a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/common/TestWebView.qml b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/common/TestWebView.qml
index aa0baae4f..0dd7bccee 100644
--- a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/common/TestWebView.qml
+++ b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/common/TestWebView.qml
@@ -28,6 +28,17 @@ WebView {
loadStatus = null
return failure
}
+ function waitForLoadStopped() {
+ var timeout = 5000
+ var i = 0
+ while (i < timeout && loadStatus != WebView.LoadStoppedStatus) {
+ testResult.wait(50)
+ i += 50
+ }
+ var stop = loadStatus == WebView.LoadStoppedStatus
+ loadStatus = null
+ return stop
+ }
TestResult { id: testResult }
diff --git a/Source/WebKit2/UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp b/Source/WebKit2/UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp
index 0338ecff6..31102b876 100644
--- a/Source/WebKit2/UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp
@@ -82,7 +82,7 @@ public:
void load(const QString& html)
{
m_frameLoaded = false;
- WKPageLoadURL(m_webView->pageRef(), WKURLCreateWithUTF8CString(html.toAscii().data()));
+ WKPageLoadURL(m_webView->pageRef(), WKURLCreateWithUTF8CString(html.toLocal8Bit().data()));
QVERIFY(::waitForSignal(this, SIGNAL(loaded()), 5000));
}
diff --git a/Source/WebKit2/UIProcess/API/qt/tests/tests.pri b/Source/WebKit2/UIProcess/API/qt/tests/tests.pri
index b87659bf3..a1133530d 100644
--- a/Source/WebKit2/UIProcess/API/qt/tests/tests.pri
+++ b/Source/WebKit2/UIProcess/API/qt/tests/tests.pri
@@ -7,7 +7,7 @@ INCLUDEPATH += $$PWD
SOURCES += ../util.cpp
QT += testlib webkit
-contains(DEFINES, HAVE_QTQUICK=1) {
+have?(QTQUICK) {
QT += qml quick quick-private
HEADERS += ../bytearraytestdata.h \
../util.h
diff --git a/Source/WebKit2/UIProcess/InspectorServer/WebSocketServerConnection.cpp b/Source/WebKit2/UIProcess/InspectorServer/WebSocketServerConnection.cpp
index 57206eb7b..abc805fd7 100644
--- a/Source/WebKit2/UIProcess/InspectorServer/WebSocketServerConnection.cpp
+++ b/Source/WebKit2/UIProcess/InspectorServer/WebSocketServerConnection.cpp
@@ -99,18 +99,19 @@ void WebSocketServerConnection::sendWebSocketMessage(const String& message)
void WebSocketServerConnection::sendHTTPResponseHeader(int statusCode, const String& statusText, const HTTPHeaderMap& headerFields)
{
StringBuilder builder;
- builder.append("HTTP/1.1 ");
- builder.append(String::number(statusCode));
- builder.append(" ");
+ builder.appendLiteral("HTTP/1.1 ");
+ builder.appendNumber(statusCode);
+ builder.append(' ');
builder.append(statusText);
- builder.append("\r\n");
+ builder.appendLiteral("\r\n");
HTTPHeaderMap::const_iterator end = headerFields.end();
for (HTTPHeaderMap::const_iterator it = headerFields.begin(); it != end; ++it) {
builder.append(it->first);
- builder.append(": ");
- builder.append(it->second + "\r\n");
+ builder.appendLiteral(": ");
+ builder.append(it->second);
+ builder.appendLiteral("\r\n");
}
- builder.append("\r\n");
+ builder.appendLiteral("\r\n");
CString header = builder.toString().latin1();
m_socket->send(header.data(), header.length());
diff --git a/Source/WebKit2/UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp b/Source/WebKit2/UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp
index c13fa4cfc..1882586af 100644
--- a/Source/WebKit2/UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp
+++ b/Source/WebKit2/UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp
@@ -68,34 +68,36 @@ String WebInspectorServer::inspectorUrlForPageID(int pageId)
if (pageId <= 0 || serverState() == Closed)
return String();
StringBuilder builder;
- builder.append("http://");
+ builder.appendLiteral("http://");
builder.append(bindAddress());
- builder.append(":");
- builder.append(String::number(port()));
+ builder.append(':');
+ builder.appendNumber(port());
builder.append(remoteInspectorPagePath());
- builder.append(String::number(pageId));
+ builder.appendNumber(pageId);
return builder.toString();
}
void WebInspectorServer::buildPageList(Vector<char>& data, String& contentType)
{
StringBuilder builder;
- builder.append("[ ");
+ builder.appendLiteral("[ ");
ClientMap::iterator end = m_clientMap.end();
for (ClientMap::iterator it = m_clientMap.begin(); it != end; ++it) {
WebPageProxy* webPage = it->second->page();
if (it != m_clientMap.begin())
- builder.append(", ");
- builder.append("{ \"id\": " + String::number(it->first));
- builder.append(", \"title\": \"");
+ builder.appendLiteral(", ");
+ builder.appendLiteral("{ \"id\": ");
+ builder.appendNumber(it->first);
+ builder.appendLiteral(", \"title\": \"");
builder.append(webPage->pageTitle());
- builder.append("\", \"url\": \"");
+ builder.appendLiteral("\", \"url\": \"");
builder.append(webPage->activeURL());
- builder.append("\", \"inspectorUrl\": \"");
- builder.append(remoteInspectorPagePath() + String::number(it->first));
- builder.append("\" }");
+ builder.appendLiteral("\", \"inspectorUrl\": \"");
+ builder.append(remoteInspectorPagePath());
+ builder.appendNumber(it->first);
+ builder.appendLiteral("\" }");
}
- builder.append(" ]");
+ builder.appendLiteral(" ]");
CString cstr = builder.toString().utf8();
data.append(cstr.data(), cstr.length());
contentType = "application/json; charset=utf-8";
diff --git a/Source/WebKit2/UIProcess/Notifications/WebNotification.cpp b/Source/WebKit2/UIProcess/Notifications/WebNotification.cpp
index fb8ddb0a6..3705fb064 100644
--- a/Source/WebKit2/UIProcess/Notifications/WebNotification.cpp
+++ b/Source/WebKit2/UIProcess/Notifications/WebNotification.cpp
@@ -33,11 +33,13 @@
namespace WebKit {
-WebNotification::WebNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID)
+WebNotification::WebNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID)
: m_title(title)
, m_body(body)
, m_iconURL(iconURL)
, m_tag(tag)
+ , m_lang(lang)
+ , m_dir(dir)
, m_origin(WebSecurityOrigin::createFromString(originString))
, m_notificationID(notificationID)
{
diff --git a/Source/WebKit2/UIProcess/Notifications/WebNotification.h b/Source/WebKit2/UIProcess/Notifications/WebNotification.h
index 3355aab7e..8edccedff 100644
--- a/Source/WebKit2/UIProcess/Notifications/WebNotification.h
+++ b/Source/WebKit2/UIProcess/Notifications/WebNotification.h
@@ -45,21 +45,23 @@ class WebNotification : public APIObject {
public:
static const Type APIType = TypeNotification;
- static PassRefPtr<WebNotification> create(const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID)
+ static PassRefPtr<WebNotification> create(const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID)
{
- return adoptRef(new WebNotification(title, body, iconURL, tag, originString, notificationID));
+ return adoptRef(new WebNotification(title, body, iconURL, tag, lang, dir, originString, notificationID));
}
const String& title() const { return m_title; }
const String& body() const { return m_body; }
const String& iconURL() const { return m_iconURL; }
const String& tag() const { return m_tag; }
+ const String& lang() const { return m_lang; }
+ const String& dir() const { return m_dir; }
WebSecurityOrigin* origin() const { return m_origin.get(); }
uint64_t notificationID() const { return m_notificationID; }
private:
- WebNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID);
+ WebNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID);
virtual Type type() const { return APIType; }
@@ -67,6 +69,8 @@ private:
String m_body;
String m_iconURL;
String m_tag;
+ String m_lang;
+ String m_dir;
RefPtr<WebSecurityOrigin> m_origin;
uint64_t m_notificationID;
};
diff --git a/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp b/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp
index c1246068a..88e2cf1aa 100644
--- a/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp
+++ b/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp
@@ -76,12 +76,12 @@ void WebNotificationManagerProxy::didReceiveMessage(CoreIPC::Connection* connect
didReceiveWebNotificationManagerProxyMessage(connection, messageID, arguments);
}
-void WebNotificationManagerProxy::show(WebPageProxy* page, const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID)
+void WebNotificationManagerProxy::show(WebPageProxy* page, const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID)
{
if (!isNotificationIDValid(notificationID))
return;
- RefPtr<WebNotification> notification = WebNotification::create(title, body, iconURL, tag, originString, notificationID);
+ RefPtr<WebNotification> notification = WebNotification::create(title, body, iconURL, tag, lang, dir, originString, notificationID);
m_notifications.set(notificationID, notification);
m_provider.show(page, notification.get());
}
diff --git a/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h b/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h
index e028d6b93..d61b6f661 100644
--- a/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h
+++ b/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h
@@ -60,7 +60,7 @@ public:
void initializeProvider(const WKNotificationProvider*);
void populateCopyOfNotificationPermissions(HashMap<String, bool>&);
- void show(WebPageProxy*, const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID);
+ void show(WebPageProxy*, const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID);
void providerDidShowNotification(uint64_t notificationID);
void providerDidClickNotification(uint64_t notificationID);
diff --git a/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp b/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp
index 7c53b695e..cfdff9efb 100644
--- a/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp
+++ b/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp
@@ -47,7 +47,8 @@ using namespace WebCore;
namespace WebKit {
-static const double shutdownTimeout = 15;
+static const double minimumLifetime = 30 * 60;
+static const double shutdownTimeout = 10 * 60;
PassRefPtr<PluginProcessProxy> PluginProcessProxy::create(PluginProcessManager* PluginProcessManager, const PluginModuleInfo& pluginInfo)
{
@@ -213,6 +214,7 @@ void PluginProcessProxy::didFinishLaunching(ProcessLauncher*, CoreIPC::Connectio
parameters.pluginPath = m_pluginInfo.path;
+ parameters.minimumLifetime = minimumLifetime;
parameters.terminationTimeout = shutdownTimeout;
platformInitializePluginProcess(parameters);
diff --git a/Source/WebKit2/UIProcess/WebContext.cpp b/Source/WebKit2/UIProcess/WebContext.cpp
index 0003387d0..fdd363ac6 100644
--- a/Source/WebKit2/UIProcess/WebContext.cpp
+++ b/Source/WebKit2/UIProcess/WebContext.cpp
@@ -501,20 +501,21 @@ void WebContext::disconnectProcess(WebProcessProxy* process)
m_processes.remove(m_processes.find(process));
}
-PassRefPtr<WebPageProxy> WebContext::createWebPage(PageClient* pageClient, WebPageGroup* pageGroup)
+PassRefPtr<WebPageProxy> WebContext::createWebPage(PageClient* pageClient, WebPageGroup* pageGroup, WebPageProxy* relatedPage)
{
RefPtr<WebProcessProxy> process;
if (m_processModel == ProcessModelSharedSecondaryProcess) {
ensureSharedWebProcess();
process = m_processes[0];
} else {
- // FIXME (Multi-WebProcess): Add logic for sharing a process.
- // <rdar://problem/12218164> window.open() should create pages in the same process.
- // <rdar://problem/12239661> Consider limiting the number of web processes in per-tab process model
if (m_haveInitialEmptyProcess) {
process = m_processes.last();
m_haveInitialEmptyProcess = false;
+ } else if (relatedPage) {
+ // Sharing processes, e.g. when creating the page via window.open().
+ process = relatedPage->process();
} else {
+ // FIXME (Multi-WebProcess): <rdar://problem/12239661> Consider limiting the number of web processes in per-tab process model.
process = createNewWebProcess();
m_processes.append(process);
}
diff --git a/Source/WebKit2/UIProcess/WebContext.h b/Source/WebKit2/UIProcess/WebContext.h
index a8ddc5f63..dfeff1fa6 100644
--- a/Source/WebKit2/UIProcess/WebContext.h
+++ b/Source/WebKit2/UIProcess/WebContext.h
@@ -103,7 +103,7 @@ public:
// Disconnect the process from the context.
void disconnectProcess(WebProcessProxy*);
- PassRefPtr<WebPageProxy> createWebPage(PageClient*, WebPageGroup*);
+ PassRefPtr<WebPageProxy> createWebPage(PageClient*, WebPageGroup*, WebPageProxy* relatedPage = 0);
WebProcessProxy* relaunchProcessIfNecessary();
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.cpp b/Source/WebKit2/UIProcess/WebPageProxy.cpp
index cd0c6c9a6..4ac6d2243 100644
--- a/Source/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit2/UIProcess/WebPageProxy.cpp
@@ -183,6 +183,7 @@ WebPageProxy::WebPageProxy(PageClient* pageClient, PassRefPtr<WebProcessProxy> p
, m_drawsTransparentBackground(false)
, m_areMemoryCacheClientCallsEnabled(true)
, m_useFixedLayout(false)
+ , m_suppressScrollbarAnimations(false)
, m_paginationMode(Pagination::Unpaginated)
, m_paginationBehavesLikeColumns(false)
, m_pageLength(0)
@@ -1502,6 +1503,18 @@ void WebPageProxy::setFixedLayoutSize(const IntSize& size)
m_process->send(Messages::WebPage::SetFixedLayoutSize(size), m_pageID);
}
+void WebPageProxy::setSuppressScrollbarAnimations(bool suppressAnimations)
+{
+ if (!isValid())
+ return;
+
+ if (suppressAnimations == m_suppressScrollbarAnimations)
+ return;
+
+ m_suppressScrollbarAnimations = suppressAnimations;
+ m_process->send(Messages::WebPage::SetSuppressScrollbarAnimations(suppressAnimations), m_pageID);
+}
+
void WebPageProxy::setPaginationMode(WebCore::Pagination::Mode mode)
{
if (mode == m_paginationMode)
@@ -3615,6 +3628,7 @@ WebPageCreationParameters WebPageProxy::creationParameters() const
parameters.areMemoryCacheClientCallsEnabled = m_areMemoryCacheClientCallsEnabled;
parameters.useFixedLayout = m_useFixedLayout;
parameters.fixedLayoutSize = m_fixedLayoutSize;
+ parameters.suppressScrollbarAnimations = m_suppressScrollbarAnimations;
parameters.paginationMode = m_paginationMode;
parameters.paginationBehavesLikeColumns = m_paginationBehavesLikeColumns;
parameters.pageLength = m_pageLength;
@@ -3716,9 +3730,9 @@ void WebPageProxy::requestNotificationPermission(uint64_t requestID, const Strin
request->deny();
}
-void WebPageProxy::showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID)
+void WebPageProxy::showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID)
{
- m_process->context()->notificationManagerProxy()->show(this, title, body, iconURL, tag, originString, notificationID);
+ m_process->context()->notificationManagerProxy()->show(this, title, body, iconURL, tag, lang, dir, originString, notificationID);
}
float WebPageProxy::headerHeight(WebFrameProxy* frame)
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.h b/Source/WebKit2/UIProcess/WebPageProxy.h
index a4026816d..fd07c6f05 100644
--- a/Source/WebKit2/UIProcess/WebPageProxy.h
+++ b/Source/WebKit2/UIProcess/WebPageProxy.h
@@ -486,6 +486,9 @@ public:
bool hasHorizontalScrollbar() const { return m_mainFrameHasHorizontalScrollbar; }
bool hasVerticalScrollbar() const { return m_mainFrameHasVerticalScrollbar; }
+ void setSuppressScrollbarAnimations(bool);
+ bool areScrollbarAnimationsSuppressed() const { return m_suppressScrollbarAnimations; }
+
bool isPinnedToLeftSide() const { return m_mainFrameIsPinnedToLeftSide; }
bool isPinnedToRightSide() const { return m_mainFrameIsPinnedToRightSide; }
@@ -830,7 +833,7 @@ private:
void reattachToWebProcessWithItem(WebBackForwardListItem*);
void requestNotificationPermission(uint64_t notificationID, const String& originString);
- void showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& originString, uint64_t notificationID);
+ void showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID);
#if USE(TILED_BACKING_STORE)
void pageDidRequestScroll(const WebCore::IntPoint&);
@@ -1096,6 +1099,8 @@ private:
bool m_useFixedLayout;
WebCore::IntSize m_fixedLayoutSize;
+ bool m_suppressScrollbarAnimations;
+
WebCore::Pagination::Mode m_paginationMode;
bool m_paginationBehavesLikeColumns;
double m_pageLength;
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.messages.in b/Source/WebKit2/UIProcess/WebPageProxy.messages.in
index 2ac9d267f..c541d2c14 100644
--- a/Source/WebKit2/UIProcess/WebPageProxy.messages.in
+++ b/Source/WebKit2/UIProcess/WebPageProxy.messages.in
@@ -232,7 +232,7 @@ messages -> WebPageProxy {
# Notification messages
RequestNotificationPermission(uint64_t requestID, WTF::String originIdentifier)
- ShowNotification(WTF::String title, WTF::String body, WTF::String iconURL, WTF::String tag, WTF::String originIdentifier, uint64_t notificationID)
+ ShowNotification(WTF::String title, WTF::String body, WTF::String iconURL, WTF::String tag, WTF::String lang, WTF::String dir, WTF::String originIdentifier, uint64_t notificationID)
# Spelling and grammar messages
#if USE(UNIFIED_TEXT_CHECKING)
diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageLoadClient.cpp b/Source/WebKit2/UIProcess/qt/QtWebPageLoadClient.cpp
index 578faa2c9..0e9c5cfb4 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebPageLoadClient.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtWebPageLoadClient.cpp
@@ -90,11 +90,21 @@ void QtWebPageLoadClient::dispatchLoadSucceeded()
m_webView->d_func()->loadDidSucceed();
}
+void QtWebPageLoadClient::dispatchLoadStopped()
+{
+ m_webView->d_func()->loadDidStop();
+}
+
void QtWebPageLoadClient::dispatchLoadFailed(WebFrameProxy* frame, const QtWebError& error)
{
+ if (error.isCancellation()) {
+ dispatchLoadStopped();
+ return;
+ }
+
int errorCode = error.errorCode();
- if (error.isCancellation() || errorCode == kWKErrorCodeFrameLoadInterruptedByPolicyChange || errorCode == kWKErrorCodePlugInWillHandleLoad) {
+ if (errorCode == kWKErrorCodeFrameLoadInterruptedByPolicyChange || errorCode == kWKErrorCodePlugInWillHandleLoad) {
// The active url might have changed
m_webView->emitUrlChangeIfNeeded();
diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageLoadClient.h b/Source/WebKit2/UIProcess/qt/QtWebPageLoadClient.h
index 68eac0f98..668bac168 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebPageLoadClient.h
+++ b/Source/WebKit2/UIProcess/qt/QtWebPageLoadClient.h
@@ -50,6 +50,7 @@ private:
void didChangeBackForwardList();
void dispatchLoadSucceeded();
+ void dispatchLoadStopped();
void dispatchLoadFailed(WebFrameProxy*, const QtWebError&);
diff --git a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
index 32ec1857b..128379f26 100644
--- a/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/WebPopupMenuProxyQt.cpp
@@ -55,6 +55,7 @@ public:
PopupMenuItemModel(const Vector<WebPopupItem>&, bool multiple);
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const { return m_items.size(); }
virtual QVariant data(const QModelIndex&, int role = Qt::DisplayRole) const;
+ virtual QHash<int, QByteArray> roleNames() const;
Q_INVOKABLE void select(int);
@@ -167,11 +168,15 @@ PopupMenuItemModel::PopupMenuItemModel(const Vector<WebPopupItem>& webPopupItems
: m_selectedModelIndex(-1)
, m_allowMultiples(multiple)
{
- static QHash<int, QByteArray> roles = createRoleNamesHash();
- setRoleNames(roles);
buildItems(webPopupItems);
}
+QHash<int, QByteArray> PopupMenuItemModel::roleNames() const
+{
+ static QHash<int, QByteArray> roles = createRoleNamesHash();
+ return roles;
+}
+
QVariant PopupMenuItemModel::data(const QModelIndex& index, int role) const
{
if (!index.isValid() || index.row() < 0 || index.row() >= m_items.size())
diff --git a/Source/WebKit2/UIProcess/win/WebPopupMenuProxyWin.h b/Source/WebKit2/UIProcess/win/WebPopupMenuProxyWin.h
index 1d25373f1..f4104f75f 100644
--- a/Source/WebKit2/UIProcess/win/WebPopupMenuProxyWin.h
+++ b/Source/WebKit2/UIProcess/win/WebPopupMenuProxyWin.h
@@ -75,7 +75,7 @@ private:
virtual int visibleWidth() const OVERRIDE;
virtual WebCore::IntSize contentsSize() const OVERRIDE;
virtual WebCore::IntRect scrollableAreaBoundingBox() const OVERRIDE;
- virtual bool isOnActivePage() const OVERRIDE { return true; }
+ virtual bool scrollbarsCanBeActive() const OVERRIDE { return true; }
// NOTE: This should only be called by the overriden setScrollOffset from ScrollableArea.
void scrollTo(int offset);
diff --git a/Source/WebKit2/WebKit2.pri b/Source/WebKit2/WebKit2.pri
index 916687449..536b779ba 100644
--- a/Source/WebKit2/WebKit2.pri
+++ b/Source/WebKit2/WebKit2.pri
@@ -75,6 +75,6 @@ linux-*: {
LIBS += -lrt
}
-contains(DEFINES, HAVE_QTQUICK=1): QT += qml quick
+have?(QTQUICK): QT += qml quick
-contains(DEFINES, ENABLE_GEOLOCATION=1): QT += location
+enable?(GEOLOCATION): QT += location
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
index bd3d0b6ac..14fccdc64 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
@@ -191,6 +191,11 @@ void WKBundleSetAuthorAndUserStylesEnabled(WKBundleRef bundleRef, WKBundlePageGr
toImpl(bundleRef)->setAuthorAndUserStylesEnabled(toImpl(pageGroupRef), enabled);
}
+void WKBundleSetSpatialNavigationEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
+{
+ toImpl(bundleRef)->setSpatialNavigationEnabled(toImpl(pageGroupRef), enabled);
+}
+
void WKBundleAddOriginAccessWhitelistEntry(WKBundleRef bundleRef, WKStringRef sourceOrigin, WKStringRef destinationProtocol, WKStringRef destinationHost, bool allowDestinationSubdomains)
{
toImpl(bundleRef)->addOriginAccessWhitelistEntry(toImpl(sourceOrigin)->string(), toImpl(destinationProtocol)->string(), toImpl(destinationHost)->string(), allowDestinationSubdomains);
@@ -226,11 +231,31 @@ void WKBundleClearApplicationCache(WKBundleRef bundleRef)
toImpl(bundleRef)->clearApplicationCache();
}
+void WKBundleClearApplicationCacheForOrigin(WKBundleRef bundleRef, WKStringRef origin)
+{
+ toImpl(bundleRef)->clearApplicationCacheForOrigin(toImpl(origin)->string());
+}
+
void WKBundleSetAppCacheMaximumSize(WKBundleRef bundleRef, uint64_t size)
{
toImpl(bundleRef)->setAppCacheMaximumSize(size);
}
+uint64_t WKBundleGetAppCacheUsageForOrigin(WKBundleRef bundleRef, WKStringRef origin)
+{
+ return toImpl(bundleRef)->appCacheUsageForOrigin(toImpl(origin)->string());
+}
+
+void WKBundleSetApplicationCacheOriginQuota(WKBundleRef bundleRef, WKStringRef origin, uint64_t bytes)
+{
+ return toImpl(bundleRef)->setApplicationCacheOriginQuota(toImpl(origin)->string(), bytes);
+}
+
+void WKBundleSetMinimumTimerInterval(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, double seconds)
+{
+ toImpl(bundleRef)->setMinimumTimerInterval(toImpl(pageGroupRef), seconds);
+}
+
int WKBundleNumberOfPages(WKBundleRef bundleRef, WKBundleFrameRef frameRef, double pageWidthInPixels, double pageHeightInPixels)
{
return toImpl(bundleRef)->numberOfPages(toImpl(frameRef), pageWidthInPixels, pageHeightInPixels);
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
index ec8c30700..e979791c9 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
@@ -66,6 +66,7 @@ WK_EXPORT void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundle, WKBundlePag
WK_EXPORT void WKBundleSetPopupBlockingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
WK_EXPORT void WKBundleSwitchNetworkLoaderToNewTestingSession(WKBundleRef bundle);
WK_EXPORT void WKBundleSetAuthorAndUserStylesEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
+WK_EXPORT void WKBundleSetSpatialNavigationEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
WK_EXPORT void WKBundleAddOriginAccessWhitelistEntry(WKBundleRef bundle, WKStringRef, WKStringRef, WKStringRef, bool);
WK_EXPORT void WKBundleRemoveOriginAccessWhitelistEntry(WKBundleRef bundle, WKStringRef, WKStringRef, WKStringRef, bool);
WK_EXPORT void WKBundleResetOriginAccessWhitelists(WKBundleRef bundle);
@@ -77,6 +78,7 @@ WK_EXPORT void WKBundleSetUserStyleSheetLocation(WKBundleRef bundle, WKBundlePag
WK_EXPORT void WKBundleSetWebNotificationPermission(WKBundleRef bundle, WKBundlePageRef page, WKStringRef originStringRef, bool allowed);
WK_EXPORT void WKBundleRemoveAllWebNotificationPermissions(WKBundleRef bundle, WKBundlePageRef page);
WK_EXPORT uint64_t WKBundleGetWebNotificationID(WKBundleRef bundle, JSContextRef context, JSValueRef notification);
+WK_EXPORT void WKBundleSetMinimumTimerInterval(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, double interval);
// UserContent API
WK_EXPORT void WKBundleAddUserScript(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld, WKStringRef source, WKURLRef url, WKArrayRef whitelist, WKArrayRef blacklist, WKUserScriptInjectionTime injectionTime, WKUserContentInjectedFrames injectedFrames);
@@ -93,7 +95,10 @@ WK_EXPORT void WKBundleSetDatabaseQuota(WKBundleRef bundle, uint64_t);
// Application Cache API
WK_EXPORT void WKBundleClearApplicationCache(WKBundleRef bundle);
+WK_EXPORT void WKBundleClearApplicationCacheForOrigin(WKBundleRef bundle, WKStringRef origin);
WK_EXPORT void WKBundleSetAppCacheMaximumSize(WKBundleRef bundle, uint64_t size);
+WK_EXPORT uint64_t WKBundleGetAppCacheUsageForOrigin(WKBundleRef bundle, WKStringRef origin);
+WK_EXPORT void WKBundleSetApplicationCacheOriginQuota(WKBundleRef bundle, WKStringRef origin, uint64_t bytes);
// Garbage collection API
WK_EXPORT void WKBundleGarbageCollectJavaScriptObjects(WKBundleRef bundle);
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
index 2e7c83c1b..cd0634906 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
+++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
@@ -46,6 +46,8 @@
#include "WebProcess.h"
#include <JavaScriptCore/APICast.h>
#include <JavaScriptCore/JSLock.h>
+#include <WebCore/ApplicationCache.h>
+#include <WebCore/ApplicationCacheStorage.h>
#include <WebCore/Frame.h>
#include <WebCore/FrameView.h>
#include <WebCore/GCController.h>
@@ -292,6 +294,13 @@ void InjectedBundle::setAuthorAndUserStylesEnabled(WebPageGroupProxy* pageGroup,
(*iter)->settings()->setAuthorAndUserStylesEnabled(enabled);
}
+void InjectedBundle::setSpatialNavigationEnabled(WebPageGroupProxy* pageGroup, bool enabled)
+{
+ const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
+ for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
+ (*iter)->settings()->setSpatialNavigationEnabled(enabled);
+}
+
void InjectedBundle::addOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains)
{
SecurityPolicy::addOriginAccessWhitelistEntry(*SecurityOrigin::createFromString(sourceOrigin), destinationProtocol, destinationHost, allowDestinationSubdomains);
@@ -326,11 +335,29 @@ void InjectedBundle::clearApplicationCache()
WebApplicationCacheManager::shared().deleteAllEntries();
}
+void InjectedBundle::clearApplicationCacheForOrigin(const String& originString)
+{
+ RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(originString);
+ ApplicationCache::deleteCacheForOrigin(origin.get());
+}
+
void InjectedBundle::setAppCacheMaximumSize(uint64_t size)
{
WebApplicationCacheManager::shared().setAppCacheMaximumSize(size);
}
+uint64_t InjectedBundle::appCacheUsageForOrigin(const String& originString)
+{
+ RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(originString);
+ return ApplicationCache::diskUsageForOrigin(origin.get());
+}
+
+void InjectedBundle::setApplicationCacheOriginQuota(const String& originString, uint64_t bytes)
+{
+ RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(originString);
+ cacheStorage().storeUpdatedQuotaForOrigin(origin.get(), bytes);
+}
+
int InjectedBundle::numberOfPages(WebFrame* frame, double pageWidthInPixels, double pageHeightInPixels)
{
Frame* coreFrame = frame ? frame->coreFrame() : 0;
@@ -550,6 +577,13 @@ void InjectedBundle::setUserStyleSheetLocation(WebPageGroupProxy* pageGroup, con
(*iter)->settings()->setUserStyleSheetLocation(KURL(KURL(), location));
}
+void InjectedBundle::setMinimumTimerInterval(WebPageGroupProxy* pageGroup, double seconds)
+{
+ const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
+ for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
+ (*iter)->settings()->setMinDOMTimerInterval(seconds);
+}
+
void InjectedBundle::setWebNotificationPermission(WebPage* page, const String& originString, bool allowed)
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
index 57292695d..6e40013df 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
+++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
@@ -117,6 +117,7 @@ public:
void setPopupBlockingEnabled(WebPageGroupProxy*, bool);
void switchNetworkLoaderToNewTestingSession();
void setAuthorAndUserStylesEnabled(WebPageGroupProxy*, bool);
+ void setSpatialNavigationEnabled(WebPageGroupProxy*, bool);
void addOriginAccessWhitelistEntry(const String&, const String&, const String&, bool);
void removeOriginAccessWhitelistEntry(const String&, const String&, const String&, bool);
void resetOriginAccessWhitelists();
@@ -125,6 +126,7 @@ public:
String pageSizeAndMarginsInPixels(WebFrame*, int, int, int, int, int, int, int);
bool isPageBoxVisible(WebFrame*, int);
void setUserStyleSheetLocation(WebPageGroupProxy*, const String&);
+ void setMinimumTimerInterval(WebPageGroupProxy*, double seconds);
void setWebNotificationPermission(WebPage*, const String& originString, bool allowed);
void removeAllWebNotificationPermissions(WebPage*);
uint64_t webNotificationID(JSContextRef, JSValueRef);
@@ -144,7 +146,10 @@ public:
// Application Cache API
void clearApplicationCache();
+ void clearApplicationCacheForOrigin(const String& origin);
void setAppCacheMaximumSize(uint64_t);
+ uint64_t appCacheUsageForOrigin(const String& origin);
+ void setApplicationCacheOriginQuota(const String& origin, uint64_t);
// Garbage collection API
void garbageCollectJavaScriptObjects();
diff --git a/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp b/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp
index 2823da7b4..e6e2cd4e3 100644
--- a/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp
+++ b/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp
@@ -137,9 +137,9 @@ bool WebNotificationManager::show(Notification* notification, WebPage* page)
it->second.append(notificationID);
#if ENABLE(NOTIFICATIONS)
- m_process->connection()->send(Messages::WebPageProxy::ShowNotification(notification->title(), notification->body(), notification->iconURL().string(), notification->tag(), notification->scriptExecutionContext()->securityOrigin()->toString(), notificationID), page->pageID());
+ m_process->connection()->send(Messages::WebPageProxy::ShowNotification(notification->title(), notification->body(), notification->iconURL().string(), notification->tag(), notification->lang(), notification->dir(), notification->scriptExecutionContext()->securityOrigin()->toString(), notificationID), page->pageID());
#else
- m_process->connection()->send(Messages::WebPageProxy::ShowNotification(notification->title(), notification->body(), notification->iconURL().string(), notification->replaceId(), notification->scriptExecutionContext()->securityOrigin()->toString(), notificationID), page->pageID());
+ m_process->connection()->send(Messages::WebPageProxy::ShowNotification(notification->title(), notification->body(), notification->iconURL().string(), notification->replaceId(), notification->lang(), notification->dir(), notification->scriptExecutionContext()->securityOrigin()->toString(), notificationID), page->pageID());
#endif
return true;
#else
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
index 15e7648da..e37d75269 100644
--- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
+++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
@@ -565,7 +565,7 @@ bool NetscapePlugin::allowPopups() const
static bool isTransparentSilverlightBackgroundValue(const String& lowercaseBackgroundValue)
{
// This checks if the background color value is transparent, according to
- // the forumat documented at http://msdn.microsoft.com/en-us/library/cc838148(VS.95).aspx
+ // the format documented at http://msdn.microsoft.com/en-us/library/cc838148(VS.95).aspx
if (lowercaseBackgroundValue.startsWith('#')) {
if (lowercaseBackgroundValue.length() == 5 && lowercaseBackgroundValue[1] != 'f') {
// An 8-bit RGB value with alpha transparency, in the form #ARGB.
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
index 5f93c5747..f0d948b0e 100644
--- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
+++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
@@ -55,7 +55,6 @@ public:
static PassRefPtr<NetscapePlugin> fromNPP(NPP);
// In-process NetscapePlugins don't support asynchronous initialization.
- virtual void waitForAsynchronousInitialization() { }
virtual bool isBeingAsynchronouslyInitialized() const { return false; }
#if PLATFORM(MAC)
diff --git a/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h b/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h
index 9ccd80400..d99d9436d 100644
--- a/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h
+++ b/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.h
@@ -51,7 +51,6 @@ public:
static WebCore::PluginInfo pluginInfo();
// In-process PDFViews don't support asynchronous initialization.
- virtual void waitForAsynchronousInitialization() { }
virtual bool isBeingAsynchronouslyInitialized() const { return false; }
private:
@@ -140,7 +139,7 @@ private:
virtual WebCore::IntSize contentsSize() const OVERRIDE;
virtual WebCore::Scrollbar* horizontalScrollbar() const OVERRIDE { return m_horizontalScrollbar.get(); }
virtual WebCore::Scrollbar* verticalScrollbar() const OVERRIDE { return m_verticalScrollbar.get(); }
- virtual bool isOnActivePage() const OVERRIDE;
+ virtual bool scrollbarsCanBeActive() const OVERRIDE;
virtual bool shouldSuspendScrollAnimations() const OVERRIDE { return false; } // If we return true, ScrollAnimatorMac will keep cycling a timer forever, waiting for a good time to animate.
virtual void scrollbarStyleChanged(int newStyle, bool forceUpdate) OVERRIDE;
// FIXME: Implement the other conversion functions; this one is enough to get scrollbar hit testing working.
diff --git a/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.mm b/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.mm
index fe7f258b0..9cf8c887b 100644
--- a/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.mm
+++ b/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.mm
@@ -792,7 +792,7 @@ IntSize BuiltInPDFView::contentsSize() const
return m_pdfDocumentSize;
}
-bool BuiltInPDFView::isOnActivePage() const
+bool BuiltInPDFView::scrollbarsCanBeActive() const
{
return !pluginView()->frame()->document()->inPageCache();
}
diff --git a/Source/WebKit2/WebProcess/Plugins/Plugin.h b/Source/WebKit2/WebProcess/Plugins/Plugin.h
index b91174f9e..91d234fe6 100644
--- a/Source/WebKit2/WebProcess/Plugins/Plugin.h
+++ b/Source/WebKit2/WebProcess/Plugins/Plugin.h
@@ -83,8 +83,6 @@ public:
// Sets the active plug-in controller and initializes the plug-in.
bool initialize(PluginController*, const Parameters&);
- // Forces synchronous initialization of a plugin previously initialized asynchronously.
- virtual void waitForAsynchronousInitialization() = 0;
virtual bool isBeingAsynchronouslyInitialized() const = 0;
// Destroys the plug-in.
diff --git a/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp b/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp
index e380eef94..d3eb28a3b 100644
--- a/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp
+++ b/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp
@@ -123,14 +123,6 @@ bool PluginProxy::canInitializeAsynchronously() const
return controller()->asynchronousPluginInitializationEnabled() && (m_connection->supportsAsynchronousPluginInitialization() || controller()->asynchronousPluginInitializationEnabledForAllPlugins());
}
-void PluginProxy::waitForAsynchronousInitialization()
-{
- ASSERT(!m_isStarted);
- ASSERT(m_waitingOnAsynchronousInitialization);
-
- initializeSynchronously();
-}
-
bool PluginProxy::initializeSynchronously()
{
ASSERT(m_pendingPluginCreationParameters);
diff --git a/Source/WebKit2/WebProcess/Plugins/PluginProxy.h b/Source/WebKit2/WebProcess/Plugins/PluginProxy.h
index c0ca116b0..c3183bb2b 100644
--- a/Source/WebKit2/WebProcess/Plugins/PluginProxy.h
+++ b/Source/WebKit2/WebProcess/Plugins/PluginProxy.h
@@ -71,7 +71,6 @@ private:
virtual bool initialize(const Parameters&);
bool initializeSynchronously();
- virtual void waitForAsynchronousInitialization();
virtual void destroy();
virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect& dirtyRect);
virtual PassRefPtr<ShareableBitmap> snapshot();
diff --git a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp b/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
index 0a0c6b63d..8f50d8706 100644
--- a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
+++ b/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
@@ -550,19 +550,8 @@ JSObject* PluginView::scriptObject(JSGlobalObject* globalObject)
if (m_isWaitingForSynchronousInitialization)
return 0;
- // The plug-in can be null here if it failed to initialize previously.
- if (!m_plugin)
- return 0;
-
- // If the plug-in exists but is not initialized then we're still initializing asynchronously.
- // We need to wait here until initialization has either succeeded or failed.
- if (m_plugin->isBeingAsynchronouslyInitialized()) {
- m_isWaitingForSynchronousInitialization = true;
- m_plugin->waitForAsynchronousInitialization();
- m_isWaitingForSynchronousInitialization = false;
- }
-
- // The plug-in can be null here if it still failed to initialize.
+ // We might not have started initialization of the plug-in yet, the plug-in might be in the middle
+ // of being initializing asynchronously, or initialization might have previously failed.
if (!m_isInitialized || !m_plugin)
return 0;
diff --git a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp
index 4f176dd86..f2afdb5fb 100644
--- a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp
@@ -151,7 +151,7 @@ bool CoordinatedGraphicsLayer::setChildren(const Vector<GraphicsLayer*>& childre
bool ok = GraphicsLayer::setChildren(children);
if (!ok)
return false;
- for (int i = 0; i < children.size(); ++i) {
+ for (unsigned i = 0; i < children.size(); ++i) {
CoordinatedGraphicsLayer* child = toCoordinatedGraphicsLayer(children[i]);
child->setCoordinatedGraphicsLayerClient(m_CoordinatedGraphicsLayerClient);
child->didChangeLayerState();
diff --git a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
index d02c9abb0..2411051f6 100644
--- a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
@@ -600,7 +600,7 @@ void LayerTreeCoordinator::renderNextFrame()
{
m_waitingForUIProcess = false;
scheduleLayerFlush();
- for (int i = 0; i < m_updateAtlases.size(); ++i)
+ for (unsigned i = 0; i < m_updateAtlases.size(); ++i)
m_updateAtlases[i]->didSwapBuffers();
}
@@ -622,7 +622,7 @@ void LayerTreeCoordinator::purgeBackingStores()
PassOwnPtr<WebCore::GraphicsContext> LayerTreeCoordinator::beginContentUpdate(const WebCore::IntSize& size, ShareableBitmap::Flags flags, ShareableSurface::Handle& handle, WebCore::IntPoint& offset)
{
OwnPtr<WebCore::GraphicsContext> graphicsContext;
- for (int i = 0; i < m_updateAtlases.size(); ++i) {
+ for (unsigned i = 0; i < m_updateAtlases.size(); ++i) {
UpdateAtlas* atlas = m_updateAtlases[i].get();
if (atlas->flags() == flags) {
// This will return null if there is no available buffer space.
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
index 8e151818a..eb8067079 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -1124,6 +1124,11 @@ void WebPage::setFixedLayoutSize(const IntSize& size)
view->forceLayout();
}
+void WebPage::setSuppressScrollbarAnimations(bool suppressAnimations)
+{
+ m_page->setShouldSuppressScrollbarAnimations(suppressAnimations);
+}
+
void WebPage::setPaginationMode(uint32_t mode)
{
Pagination pagination = m_page->pagination();
@@ -3248,7 +3253,7 @@ static bool pageContainsAnyHorizontalScrollbars(Frame* mainFrame)
for (HashSet<ScrollableArea*>::const_iterator it = scrollableAreas->begin(), end = scrollableAreas->end(); it != end; ++it) {
ScrollableArea* scrollableArea = *it;
- if (!scrollableArea->isOnActivePage())
+ if (!scrollableArea->scrollbarsCanBeActive())
continue;
if (hasEnabledHorizontalScrollbar(scrollableArea))
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.h b/Source/WebKit2/WebProcess/WebPage/WebPage.h
index a81e4003a..96cb6e1a1 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.h
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.h
@@ -309,6 +309,8 @@ public:
bool useFixedLayout() const { return m_useFixedLayout; }
void setFixedLayoutSize(const WebCore::IntSize&);
+ void setSuppressScrollbarAnimations(bool);
+
void setPaginationMode(uint32_t /* WebCore::Pagination::Mode */);
void setPaginationBehavesLikeColumns(bool);
void setPageLength(double);
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
index e3ff23cad..b6bcace51 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
@@ -140,6 +140,8 @@ messages -> WebPage {
SetUseFixedLayout(bool fixed)
SetFixedLayoutSize(WebCore::IntSize size)
+ SetSuppressScrollbarAnimations(bool suppressAnimations)
+
SetPaginationMode(uint32_t mode);
SetPaginationBehavesLikeColumns(bool behavesLikeColumns);
SetPageLength(double pageLength);
diff --git a/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm b/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
index 6c0033493..65660b319 100644
--- a/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
+++ b/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
@@ -208,9 +208,6 @@ void TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay(const IntRect& re
void TiledCoreAnimationDrawingArea::updatePreferences()
{
- bool scrollingPerformanceLoggingEnabled = m_webPage->scrollingPerformanceLoggingEnabled();
- ScrollingThread::dispatch(bind(&ScrollingTree::setScrollingPerformanceLoggingEnabled, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), scrollingPerformanceLoggingEnabled));
-
bool showDebugBorders = m_webPage->corePage()->settings()->showDebugBorders();
if (showDebugBorders == !!m_debugInfoLayer)
@@ -224,7 +221,10 @@ void TiledCoreAnimationDrawingArea::updatePreferences()
m_debugInfoLayer = nullptr;
}
+ bool scrollingPerformanceLoggingEnabled = m_webPage->scrollingPerformanceLoggingEnabled();
+
ScrollingThread::dispatch(bind(&ScrollingTree::setDebugRootLayer, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), m_debugInfoLayer));
+ ScrollingThread::dispatch(bind(&ScrollingTree::setScrollingPerformanceLoggingEnabled, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), scrollingPerformanceLoggingEnabled));
}
void TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition(const Function<void ()>& functionRef)
diff --git a/Source/WebKit2/config.h b/Source/WebKit2/config.h
index 4bb1f8dec..8072046d3 100644
--- a/Source/WebKit2/config.h
+++ b/Source/WebKit2/config.h
@@ -108,6 +108,8 @@ static const type& name() \
#define PLUGIN_ARCHITECTURE_WIN 1
#elif PLATFORM(GTK) && (OS(UNIX) && !OS(MAC_OS_X))
#define PLUGIN_ARCHITECTURE_X11 1
+#elif PLATFORM(QT)
+// Qt handles this features.prf
#else
#define PLUGIN_ARCHITECTURE_UNSUPPORTED 1
#endif
diff --git a/Source/api.pri b/Source/api.pri
index e6b4aec69..da3a08df2 100644
--- a/Source/api.pri
+++ b/Source/api.pri
@@ -68,13 +68,11 @@ macx {
}
}
-WEBKIT += wtf
+WEBKIT += wtf javascriptcore webcore
-WEBKIT += javascriptcore
+build?(webkit1): WEBKIT += webkit1
-WEBKIT += webcore
-
-!no_webkit2 {
+build?(webkit2) {
WEBKIT += webkit2
# Ensure that changes to the WebKit1 and WebKit2 API will trigger a qmake of this
@@ -83,9 +81,7 @@ WEBKIT += webcore
QMAKE_INTERNAL_INCLUDED_FILES *= WebKit/WebKit1.pro
}
-!no_webkit1: WEBKIT += webkit1
-
-contains(DEFINES, WTF_USE_3D_GRAPHICS=1): WEBKIT += angle
+use?(3D_GRAPHICS): WEBKIT += angle
qnx {
# see: https://bugs.webkit.org/show_bug.cgi?id=93460
diff --git a/Source/cmake/EFLHelpers.cmake b/Source/cmake/EFLHelpers.cmake
new file mode 100644
index 000000000..bf8fbf416
--- /dev/null
+++ b/Source/cmake/EFLHelpers.cmake
@@ -0,0 +1,72 @@
+# - Set of macros and functions that are useful for building the EFL port.
+#
+# The following functions are currently defined:
+# FIND_EFL_LIBRARY(<name> HEADERS <header1> ... HEADER_PREFIXES <prefix1> ... LIBRARY <libname>)
+# Looks for the header files inside the given prefix directories, and for the library
+# passed to the LIBRARY parameter.
+# Two #defines in the form <UPPERCASED_NAME>_VERSION_MAJOR and <UPPERCASED_NAME>_VERSION_MINOR
+# are looked for in all the given headers, and the first occurrence is used to build the library's
+# version number.
+# This function defines the following variables:
+# - <UPPERCASED_NAME>_INCLUDE_DIRS: All the directories required by this library's headers.
+# - <UPPERCASED_NAME>_LIBRARIES: All the libraries required to link against this library.
+# - <UPPERCASED_NAME>_VERSION: The library's version in the format "major.minor".
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(CMakeParseArguments)
+
+FUNCTION(FIND_EFL_LIBRARY _name)
+ CMAKE_PARSE_ARGUMENTS(PARAM "" "LIBRARY" "HEADERS;HEADER_PREFIXES" ${ARGN})
+
+ STRING(TOUPPER ${_name} _name_upper)
+ SET(_version_found FALSE)
+
+ FOREACH (_current_header ${PARAM_HEADERS})
+ FIND_PATH(${_current_header}_INCLUDE_DIR NAMES ${_current_header} PATH_SUFFIXES ${PARAM_HEADER_PREFIXES})
+ LIST(APPEND ${_name}_INCLUDE_DIRS "${${_current_header}_INCLUDE_DIR}")
+
+ IF (NOT _version_found)
+ SET (_header_path "${${_current_header}_INCLUDE_DIR}/${_current_header}")
+ IF (EXISTS ${_header_path})
+ FILE(READ "${_header_path}" _header_contents)
+
+ STRING(REGEX MATCH "#define +${_name_upper}_VERSION_MAJOR +([0-9]+)" _dummy "${_header_contents}")
+ SET(_version_major "${CMAKE_MATCH_1}")
+ STRING(REGEX MATCH "#define +${_name_upper}_VERSION_MINOR +([0-9]+)" _dummy "${_header_contents}")
+ SET(_version_minor "${CMAKE_MATCH_1}")
+
+ IF (_version_major AND _version_minor)
+ SET(_version_found TRUE)
+ ENDIF ()
+ ENDIF ()
+ ENDIF ()
+ ENDFOREACH ()
+
+ FIND_LIBRARY(${_name}_LIBRARIES NAMES ${PARAM_LIBRARY})
+
+ SET(${_name}_INCLUDE_DIRS ${${_name}_INCLUDE_DIRS} PARENT_SCOPE)
+ SET(${_name}_LIBRARIES ${${_name}_LIBRARIES} PARENT_SCOPE)
+ SET(${_name}_VERSION "${_version_major}.${_version_minor}" PARENT_SCOPE)
+ENDFUNCTION()
diff --git a/Source/cmake/FindEFL.cmake b/Source/cmake/FindEFL.cmake
deleted file mode 100644
index 5755e16da..000000000
--- a/Source/cmake/FindEFL.cmake
+++ /dev/null
@@ -1,28 +0,0 @@
-INCLUDE(FindPkgConfig)
-
-PKG_CHECK_MODULES (EDJE REQUIRED edje>=1.0.0)
-PKG_CHECK_MODULES (ECORE REQUIRED ecore>=1.2.0)
-PKG_CHECK_MODULES (ECORE_EVAS REQUIRED ecore-evas>=1.0.0)
-PKG_CHECK_MODULES (EFLDEPS REQUIRED
- eina>=1.2.0
- evas>=1.0.0
- ecore>=1.2.0
- ecore-file>=1.0.0
- ecore-evas>=1.0.999.59763
- edje>=1.0.0
- eukit>=1.1.0
- edbus>=1.1.0
- ecore-input>=1.0.0
- eeze>=1.2.99
- efreet>=1.0.0)
-PKG_CHECK_MODULES (EINA REQUIRED eina>=1.2.0)
-PKG_CHECK_MODULES (ECORE_X ecore-x>=1.0.0)
-PKG_CHECK_MODULES (EVAS REQUIRED evas>=1.0.0)
-PKG_CHECK_MODULES (EUKIT REQUIRED eukit>=1.1.0)
-PKG_CHECK_MODULES (EDBUS REQUIRED edbus>=1.1.0)
-PKG_CHECK_MODULES (EFREET REQUIRED efreet>=1.0.0)
-
-FIND_PROGRAM (EDJE_CC_EXECUTABLE edje_cc)
-IF (NOT EDJE_CC_EXECUTABLE)
- MESSAGE (FATAL_ERROR "edje_cc could not be found")
-ENDIF ()
diff --git a/Source/cmake/FindE_DBus.cmake b/Source/cmake/FindE_DBus.cmake
new file mode 100644
index 000000000..5a819987d
--- /dev/null
+++ b/Source/cmake/FindE_DBus.cmake
@@ -0,0 +1,62 @@
+# - Try to find E_DBus
+# Once done, this will define
+#
+# E_DBUS_FOUND - system has E_DBus installed.
+# E_DBUS_INCLUDE_DIRS - directories which contain the E_DBus headers.
+# E_DBUS_LIBRARIES - libraries required to link against E_DBus.
+#
+# Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
+# and additional E_DBus libraries can be looked for. Currently, the
+# following libraries can be searched, and they define the following
+# variables if found:
+#
+# EUKIT - E_DBUS_EUKIT_INCLUDE_DIRS and E_DBUS_EUKIT_LIBRARIES
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(E_DBUS
+ HEADERS E_DBus.h
+ HEADER_PREFIXES e_dbus-1
+ LIBRARY edbus
+)
+
+# Components.
+FIND_EFL_LIBRARY(E_DBUS_EUKIT
+ HEADERS E_Ukit.h
+ HEADER_PREFIXES e_dbus-1
+ LIBRARY eukit
+)
+
+FOREACH(_component ${E_DBus_FIND_COMPONENTS})
+ SET(_e_dbus_component "E_DBUS_${_component}")
+ STRING(TOUPPER ${_e_dbus_component} _UPPER_NAME)
+
+ LIST(APPEND _E_DBUS_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
+ENDFOREACH()
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(E_DBus REQUIRED_VARS E_DBUS_INCLUDE_DIRS E_DBUS_LIBRARIES ${_E_DBUS_REQUIRED_COMPONENT_VARS}
+ VERSION_VAR E_DBUS_VERSION)
diff --git a/Source/cmake/FindEcore.cmake b/Source/cmake/FindEcore.cmake
new file mode 100644
index 000000000..ec76b6585
--- /dev/null
+++ b/Source/cmake/FindEcore.cmake
@@ -0,0 +1,80 @@
+# - Try to find Ecore
+# Once done, this will define
+#
+# ECORE_FOUND - system has Ecore installed.
+# ECORE_INCLUDE_DIRS - directories which contain the Ecore headers.
+# ECORE_LIBRARIES - libraries required to link against Ecore.
+#
+# Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
+# and additional Ecore libraries can be looked for. Currently, the
+# following libraries can be searched, and they define the following
+# variables if found:
+#
+# EVAS - ECORE_EVAS_INCLUDE_DIRS and ECORE_EVAS_LIBRARIES
+# FILE - ECORE_FILE_INCLUDE_DIRS and ECORE_FILE_LIBRARIES
+# INPUT - ECORE_INPUT_INCLUDE_DIRS and ECORE_INPUT_LIBRARIES
+# X - ECORE_X_INCLUDE_DIRS and ECORE_X_LIBRARIES
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(ECORE
+ HEADERS Ecore.h
+ HEADER_PREFIXES ecore-1
+ LIBRARY ecore
+)
+
+# Components.
+FIND_EFL_LIBRARY(ECORE_EVAS
+ HEADERS Ecore_Evas.h
+ HEADER_PREFIXES ecore-1
+ LIBRARY ecore_evas
+)
+FIND_EFL_LIBRARY(ECORE_FILE
+ HEADERS Ecore_File.h
+ HEADER_PREFIXES ecore-1
+ LIBRARY ecore_file
+)
+FIND_EFL_LIBRARY(ECORE_INPUT
+ HEADERS Ecore_Input.h
+ HEADER_PREFIXES ecore-1
+ LIBRARY ecore_input
+)
+FIND_EFL_LIBRARY(ECORE_X
+ HEADERS Ecore_X.h
+ HEADER_PREFIXES ecore-1
+ LIBRARY ecore_x
+)
+
+FOREACH(_component ${Ecore_FIND_COMPONENTS})
+ SET(_ecore_component "ECORE_${_component}")
+ STRING(TOUPPER ${_ecore_component} _UPPER_NAME)
+
+ LIST(APPEND _ECORE_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
+ENDFOREACH()
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ecore REQUIRED_VARS ECORE_INCLUDE_DIRS ECORE_LIBRARIES ${_ECORE_REQUIRED_COMPONENT_VARS}
+ VERSION_VAR ECORE_VERSION)
diff --git a/Source/cmake/FindEdje.cmake b/Source/cmake/FindEdje.cmake
new file mode 100644
index 000000000..01ff8d819
--- /dev/null
+++ b/Source/cmake/FindEdje.cmake
@@ -0,0 +1,46 @@
+# - Try to find Edje
+# Once done, this will define
+#
+# EDJE_FOUND - system has Edje installed.
+# EDJE_INCLUDE_DIRS - directories which contain the Edje headers.
+# EDJE_LIBRARIES - libraries required to link against Edje.
+# EDJE_CC_EXECUTABLE - full path to the `edje_cc' program.
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(EDJE
+ HEADERS Edje.h
+ HEADER_PREFIXES edje-1
+ LIBRARY edje
+)
+
+FIND_PROGRAM(EDJE_CC_EXECUTABLE
+ NAMES edje_cc
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Edje REQUIRED_VARS EDJE_INCLUDE_DIRS EDJE_LIBRARIES EDJE_CC_EXECUTABLE
+ VERSION_VAR EDJE_VERSION)
diff --git a/Source/cmake/FindEeze.cmake b/Source/cmake/FindEeze.cmake
new file mode 100644
index 000000000..93edc4862
--- /dev/null
+++ b/Source/cmake/FindEeze.cmake
@@ -0,0 +1,41 @@
+# - Try to find Eeze
+# Once done, this will define
+#
+# EEZE_FOUND - system has Eeze installed.
+# EEZE_INCLUDE_DIRS - directories which contain the Eeze headers.
+# EEZE_LIBRARIES - libraries required to link against Eeze.
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(EEZE
+ HEADERS Eeze.h
+ HEADER_PREFIXES eeze-1
+ LIBRARY eeze
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eeze REQUIRED_VARS EEZE_INCLUDE_DIRS EEZE_LIBRARIES
+ VERSION_VAR EEZE_VERSION)
diff --git a/Source/cmake/FindEfreet.cmake b/Source/cmake/FindEfreet.cmake
new file mode 100644
index 000000000..22d704b29
--- /dev/null
+++ b/Source/cmake/FindEfreet.cmake
@@ -0,0 +1,41 @@
+# - Try to find Efreet
+# Once done, this will define
+#
+# EFREET_FOUND - system has Efreet installed.
+# EFREET_INCLUDE_DIRS - directories which contain the Efreet headers.
+# EFREET_LIBRARIES - libraries required to link against Efreet.
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(EFREET
+ HEADERS Efreet.h
+ HEADER_PREFIXES efreet-1
+ LIBRARY efreet
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Efreet REQUIRED_VARS EFREET_INCLUDE_DIRS EFREET_LIBRARIES
+ VERSION_VAR EFREET_VERSION)
diff --git a/Source/cmake/FindEina.cmake b/Source/cmake/FindEina.cmake
new file mode 100644
index 000000000..5ac94800c
--- /dev/null
+++ b/Source/cmake/FindEina.cmake
@@ -0,0 +1,41 @@
+# - Try to find Eina
+# Once done, this will define
+#
+# EINA_FOUND - system has Eina installed.
+# EINA_INCLUDE_DIRS - directories which contain the Eina headers.
+# EINA_LIBRARIES - libraries required to link against Eina.
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(EINA
+ HEADERS Eina.h eina_main.h
+ HEADER_PREFIXES eina-1 eina-1/eina
+ LIBRARY eina
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eina REQUIRED_VARS EINA_INCLUDE_DIRS EINA_LIBRARIES
+ VERSION_VAR EINA_VERSION)
diff --git a/Source/cmake/FindEvas.cmake b/Source/cmake/FindEvas.cmake
new file mode 100644
index 000000000..ce75eae0a
--- /dev/null
+++ b/Source/cmake/FindEvas.cmake
@@ -0,0 +1,41 @@
+# - Try to find Evas
+# Once done, this will define
+#
+# EVAS_FOUND - system has Evas installed.
+# EVAS_INCLUDE_DIRS - directories which contain the Evas headers.
+# EVAS_LIBRARIES - libraries required to link against Evas.
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(EVAS
+ HEADERS Evas.h
+ HEADER_PREFIXES evas-1
+ LIBRARY evas
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Evas REQUIRED_VARS EVAS_INCLUDE_DIRS EVAS_LIBRARIES
+ VERSION_VAR EVAS_VERSION)
diff --git a/Source/cmake/OptionsEfl.cmake b/Source/cmake/OptionsEfl.cmake
index 525bf0ffe..e0b026ec1 100644
--- a/Source/cmake/OptionsEfl.cmake
+++ b/Source/cmake/OptionsEfl.cmake
@@ -8,7 +8,6 @@ ADD_DEFINITIONS(-DWTF_PLATFORM_EFL=1)
SET(WTF_PLATFORM_EFL 1)
FIND_PACKAGE(Cairo 1.10 REQUIRED)
-FIND_PACKAGE(EFL REQUIRED)
FIND_PACKAGE(Fontconfig 2.8.0 REQUIRED)
FIND_PACKAGE(Sqlite REQUIRED)
FIND_PACKAGE(LibXml2 2.6 REQUIRED)
@@ -99,14 +98,18 @@ WEBKIT_OPTION_END()
OPTION(ENABLE_ECORE_X "Enable Ecore_X specific usage (cursor, bell)" ON)
IF (ENABLE_ECORE_X)
- IF (ECORE_X_FOUND)
- MESSAGE(STATUS "Using Ecore-X to provide extended support.")
- ADD_DEFINITIONS(-DHAVE_ECORE_X)
- ELSE ()
- MESSAGE(ERROR "Requested Ecore-X but it was not found!")
- ENDIF ()
+ LIST(APPEND ECORE_ADDITIONAL_COMPONENTS X)
+ ADD_DEFINITIONS(-DHAVE_ECORE_X)
ENDIF ()
+FIND_PACKAGE(Eina 1.2 REQUIRED)
+FIND_PACKAGE(Evas 1.0 REQUIRED)
+FIND_PACKAGE(Ecore 1.2 COMPONENTS Evas File Input ${ECORE_ADDITIONAL_COMPONENTS})
+FIND_PACKAGE(Edje 1.0 REQUIRED)
+FIND_PACKAGE(Eeze 1.2 REQUIRED)
+FIND_PACKAGE(Efreet 1.0 REQUIRED)
+FIND_PACKAGE(E_DBus 1.1 COMPONENTS EUKit)
+
FIND_PACKAGE(Freetype REQUIRED)
FIND_PACKAGE(HarfBuzz REQUIRED)
SET(WTF_USE_FREETYPE 1)
diff --git a/Source/tests.pri b/Source/tests.pri
index 3c09864b1..c7cacaa24 100644
--- a/Source/tests.pri
+++ b/Source/tests.pri
@@ -27,7 +27,7 @@ linux-* {
SUBDIRS += $$WEBKIT_TESTS_DIR/MIMESniffing
}
-contains(DEFINES, HAVE_QQUICK1=1): SUBDIRS += $$WEBKIT_TESTS_DIR/qdeclarativewebview
+have?(QQUICK1): SUBDIRS += $$WEBKIT_TESTS_DIR/qdeclarativewebview
# Benchmarks
SUBDIRS += \
@@ -37,14 +37,14 @@ SUBDIRS += \
# WebGL performance tests are disabled temporarily.
# https://bugs.webkit.org/show_bug.cgi?id=80503
#
-#contains(DEFINES, ENABLE_WEBGL=1) {
+#enable?(WEBGL) {
# SUBDIRS += $$WEBKIT_TESTS_DIR/benchmarks/webgl
#}
-!no_webkit2 {
+build?(webkit2): {
WEBKIT2_TESTS_DIR = $$PWD/WebKit2/UIProcess/API/qt/tests
- contains(DEFINES, HAVE_QTQUICK=1):SUBDIRS += \
+ have?(QTQUICK):SUBDIRS += \
$$WEBKIT2_TESTS_DIR/inspectorserver \
$$WEBKIT2_TESTS_DIR/publicapi \
$$WEBKIT2_TESTS_DIR/qquickwebview \
diff --git a/Tools/BuildSlaveSupport/built-product-archive b/Tools/BuildSlaveSupport/built-product-archive
index 6c4c8eede..89cb4e049 100644
--- a/Tools/BuildSlaveSupport/built-product-archive
+++ b/Tools/BuildSlaveSupport/built-product-archive
@@ -169,7 +169,7 @@ def archiveBuiltProduct(configuration, platform, fullPlatform):
'BuildLog.htm', '*.obj', '*.pdb', '*.pch', '*.tlog', '*.lastbuildstate']
if fullPlatform and fullPlatform == 'chromium-android':
- ignorePatterns.extend(['*.so', '*.pak', '*-unaligned.apk'])
+ ignorePatterns.extend(['*.so', '*-unaligned.apk'])
removeDirectoryIfExists(thinDirectory)
copyBuildFiles(configurationBuildDirectory, thinDirectory, ignorePatterns)
diff --git a/Tools/BuildSlaveSupport/kill-old-processes b/Tools/BuildSlaveSupport/kill-old-processes
index bc0d8787f..682a5e533 100755
--- a/Tools/BuildSlaveSupport/kill-old-processes
+++ b/Tools/BuildSlaveSupport/kill-old-processes
@@ -59,7 +59,7 @@ def main():
"cc1plus",
"cc1objplus",
"clang",
- "clang++",
+ "clang\+\+",
"gcc-4.2",
"httpd",
"i686-apple-darwin10-gcc-4.2.1",
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 5a66041b3..15fc38484 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,501 @@
+2012-09-11 Dan Bernstein <mitz@apple.com>
+
+ Fixed a bug where kill-old-processes failed to kill clang++.
+
+ Rubber-stamped by Alexey Proskuryakov.
+
+ * BuildSlaveSupport/kill-old-processes: Escape the + signs in "clang++"
+ where it is passed as a regular expression to killall.
+
+2012-09-11 Philippe Liard <pliard@google.com>
+
+ Make sure that md5sum is not setup on non-Chromium Android platforms.
+ https://bugs.webkit.org/show_bug.cgi?id=96393
+
+ Reviewed by Adam Barth.
+
+ Previously md5sum was setup in ChromiumAndroidDriver's constructor
+ which is also invoked on non-Chromium Android platforms. The following patch
+ moves this logic to _startup_test() which is guaranteed to be invoked
+ only on Android.
+
+ This also updates the prompt unit test in chromium_android_unittest.py.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidDriver.__init__):
+ (ChromiumAndroidDriver._setup_md5sum_and_push_data_if_needed):
+ (ChromiumAndroidDriver._setup_test):
+
+2012-09-11 Raphael Kubo da Costa <rakuco@webkit.org>
+
+ [EFL] Rewrite the EFL-related Find modules
+ https://bugs.webkit.org/show_bug.cgi?id=95237
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * DumpRenderTree/efl/CMakeLists.txt: Stop setting the LINK_FLAGS
+ property and include all the Enlightenment Foundation Libraries
+ required by the target.
+ * EWebLauncher/CMakeLists.txt: Ditto.
+ * MiniBrowser/efl/CMakeLists.txt: Ditto.
+ * TestWebKitAPI/PlatformEfl.cmake: Add missing include directories
+ now that they are not added implicitly.
+ * WebKitTestRunner/CMakeLists.txt: Stop setting the LINK_FLAGS
+ property.
+ * WebKitTestRunner/PlatformEfl.cmake: Stop setting the LINK_FLAGS
+ property and include all the Enlightenment Foundation Libraries
+ required by the target.
+
+2012-09-11 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2][WKTR] TestRunner needs to implement setApplicationCacheOriginQuota
+ https://bugs.webkit.org/show_bug.cgi?id=96379
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add implementation for setApplicationCacheOriginQuota
+ to WebKitTestRunner.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setApplicationCacheOriginQuota):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2012-09-11 Luciano Wolf <luciano.wolf@openbossa.org>
+
+ [Qt] [WK2] editing/inserting/typing-tab-designmode tests are failing
+ https://bugs.webkit.org/show_bug.cgi?id=91988
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Regular key events generated by Qt for the tab key fill both
+ keyCode and keyText, so we should do the same for our fake events.
+
+ * WebKitTestRunner/qt/EventSenderProxyQt.cpp:
+ (WTR::EventSenderProxy::keyDown):
+
+2012-09-11 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [WK2][WTR] WebKitTestRunner needs testRunner.setSpatialNavigationEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=96269
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Exported missing testRunner.setSpatialNavigationEnabled() method.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::beginTesting):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setSpatialNavigationEnabled):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2012-09-11 Philippe Liard <pliard@chromium.org>
+
+ Support LayoutTests on non-rooted devices for Chromium Android.
+ https://bugs.webkit.org/show_bug.cgi?id=95346
+
+ Reviewed by Dirk Pranke.
+
+ We were requiring root permissions to sync resource files with the
+ device by comparing host and device files' timestamp after we
+ synchronized the device and host clocks.
+ We now rely on md5sum provided by Chromium to handle data files
+ synchronization.
+
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort._check_driver_build_up_to_date):
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidDriver.__init__):
+ (ChromiumAndroidDriver._setup_test):
+ (ChromiumAndroidDriver._push_executable):
+ (ChromiumAndroidDriver._push_test_resources):
+ (ChromiumAndroidDriver._read_prompt):
+
+2012-09-11 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] Fix output paths on Windows
+
+ Reviewed by Tor Arne Vestbø.
+
+ BUILD_ROOT_RELATIVE_TO_OUT_PWD was calculated incorrectly Windows, resulting in an incorrect
+ DESTDIR transformation at the end of default_post.prf. The calculation should be baased no qmake
+ paths, which can use drive letters but always use forward slashes. So the use of QMAKE_DIR_SEP is
+ incorrect here and instead for the calculation we should use forward slashes.
+
+ * qmake/mkspecs/features/default_pre.prf:
+
+2012-09-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Fix passing of defines from the build system
+
+ We explicitly have to pass -DENABLE_FOO=0 for every single feature
+ that's not explicitly enabled in WEBKIT_CONFIG, since Platform.h
+ will add it's own defaults if the features are not defined.
+
+ At some point we might want to run a configure-test to inspect what
+ Platform.h will do, so we can sync up the build system's view of
+ the feature-defines with the compile-time situation.
+
+ Reviewed by Simon Hausmann.
+
+ * qmake/mkspecs/features/functions.prf:
+
+2012-09-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Fix --qt option to build-webkit
+
+ Reviewed by Ossy.
+
+ * Scripts/webkitdirs.pm:
+ (buildQMakeProjects):
+
+2012-09-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Add a configure step to the Qt build system
+
+ This allows building the Qt port using just 'qmake WebKit.pro'. Using
+ the build-webkit script is still supported, and will add slightly more
+ logic to the build, such as detecting the need for clean or incremental
+ builds.
+
+ Internally, the build system now uses a new variable, WEBKIT_CONFIG, for
+ all things related to configuring the build, such as use/have/enable flags,
+ and these are translated to defines in default_post. Project files should
+ no longer check contains(DEFINES,...) to detect features, but use the new
+ enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2
+ options have been translated into WEBKIT_CONFIG options as well, and can
+ be checked using build?().
+
+ Reviewed by Simon Hausmann.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * MiniBrowser/qt/MiniBrowser.pro:
+ * QtTestBrowser/QtTestBrowser.pro:
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+ (qtFeatureDefaults):
+ (buildQMakeProjects):
+ * Tools.pro:
+ * WebKitTestRunner/InjectedBundle/DerivedSources.pri:
+ * WebKitTestRunner/InjectedBundle/Target.pri:
+ * WebKitTestRunner/Target.pri:
+ * qmake/.qmake.cache: Added.
+ * qmake/configure.pri: Removed.
+ * qmake/configure.pro: Removed.
+ * qmake/dump-features: Added.
+ * qmake/mkspecs/features/configure.prf: Added.
+ * qmake/mkspecs/features/default_post.prf:
+ * qmake/mkspecs/features/default_pre.prf:
+ * qmake/mkspecs/features/features.prf:
+ * qmake/mkspecs/features/features.pri:
+ * qmake/mkspecs/features/functions.prf:
+ * qmake/mkspecs/features/gprof.prf:
+ * qmake/mkspecs/features/mac/default_pre.prf:
+ * qmake/mkspecs/features/win32/default_pre.prf:
+
+2012-09-11 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2][WKTR] TestRunner needs to implement clearApplicationCacheForOrigin
+ https://bugs.webkit.org/show_bug.cgi?id=96372
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Implement clearApplicationCacheForOrigin() in WebKitTestRunner.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::clearApplicationCacheForOrigin):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2012-09-11 Peter Beverloo <peter@chromium.org>
+
+ Don't ignore .pak files when making an archive for Android
+ https://bugs.webkit.org/show_bug.cgi?id=96375
+
+ Reviewed by Jochen Eisinger.
+
+ The .pak files do need to be pushed to the device, which is currently
+ preventing the layout test runner from correctly pushing all files.
+
+ * BuildSlaveSupport/built-product-archive:
+ (archiveBuiltProduct):
+
+2012-09-11 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [WK2][WTR] WebKitTestRunner needs layoutTestController.setMinimumTimerInterval
+ https://bugs.webkit.org/show_bug.cgi?id=96256
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Exported TestRunner::setMinimumTimerInterval() method.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::beginTesting):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setMinimumTimerInterval):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2012-09-11 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: add RTCPeerConnection::onnegotiationneeded
+ https://bugs.webkit.org/show_bug.cgi?id=96097
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::addStream):
+ (MockWebRTCPeerConnectionHandler::removeStream):
+
+2012-09-11 Peter Beverloo <peter@chromium.org>
+
+ Recognize the "--chromium-android" argument in run-webkit-tests
+ https://bugs.webkit.org/show_bug.cgi?id=96369
+
+ Reviewed by Jochen Eisinger.
+
+ Chromium for the Android platform cannot determine the platform based on
+ the host itself, so we'll use the --chromium-android argument as the build
+ master passes to run-webkit-tests. Make sure the layout test runner
+ can pick the right port when doing so.
+
+ * Scripts/run-webkit-tests:
+ * Scripts/webkitpy/layout_tests/port/factory.py:
+ (port_options):
+
+2012-09-11 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [QT] Fix build with newer qmake from Qt 5
+
+ Rubber-stamped by Tor Arne Vestbø.
+
+ Support for "qmake -query QMAKE_MKSPECS" was removed from qmake. Replace
+ it with the use of QT_HOST_DATA/mkspecs.
+ Based on patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com>.
+
+ * Scripts/webkitdirs.pm:
+ (builtDylibPathForName):
+ (qtMakeCommand):
+
+2012-09-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Remove Qt 4 syncqt, no longer needed
+
+ Reviewed by Simon Hausmann.
+
+ * qmake/syncqt-4.8: Removed.
+
+2012-09-11 Andras Becsi <andras.becsi@nokia.com>
+
+ [Qt][WK2] Fix the build with recent Qt5
+ https://bugs.webkit.org/show_bug.cgi?id=96283
+
+ Reviewed by Simon Hausmann.
+
+ We should not use deprecated Qt API because doing that results
+ in build failure since all the deprecated API was disabled
+ in qtbase (https://codereview.qt-project.org/#change,24890).
+
+ * DumpRenderTree/qt/main.cpp:
+ (main):
+ * MiniBrowser/qt/MiniBrowserApplication.cpp:
+ (MiniBrowserApplication::notify):
+ * MiniBrowser/qt/raw/View.cpp:
+ (View::exposeEvent):
+ (main):
+
+2012-09-11 Christophe Dumez <christophe.dumez@intel.com>
+
+ WTR needs an implementation of applicationCacheDiskUsageForOrigin
+ https://bugs.webkit.org/show_bug.cgi?id=87188
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add implementation for applicationCacheDiskUsageForOrigin()
+ in WebKitTestRunner.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::applicationCacheDiskUsageForOrigin):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2012-09-10 Joanmarie Diggs <jdiggs@igalia.com>
+
+ Properly expose <legend> elements to ATs
+ https://bugs.webkit.org/show_bug.cgi?id=84137
+
+ Reviewed by Chris Fleizach.
+
+ Created a new WebCore Accessibility Role, LegendRole. Used it to map to
+ the expected platform role, ATK_ROLE_LABEL. Also established the needed
+ AtkRelation pair, label-for/labelled-by between the legend and fieldset.
+
+ * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
+ (roleToString): added "Legend" string for WebAccessibilityRoleLegend
+
+2012-09-10 Jer Noble <jer.noble@apple.com>
+
+ Unreviewed; rolling out r128081.
+ http://trac.webkit.org/changeset/128081
+ https://bugs.webkit.org/show_bug.cgi?id=96134
+
+ New test http/tests/media/video-donottrack.html fails to run on Apple test bots.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::TestRunner):
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/mac/FrameLoadDelegate.mm:
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
+ (InjectedBundlePage):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::TestRunner):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2012-09-10 Christophe Dumez <christophe.dumez@intel.com>
+
+ TestExpectationsChecker._determine_port_from_expectations_path() does not support cascaded TestExpectations
+ https://bugs.webkit.org/show_bug.cgi?id=96205
+
+ Reviewed by Tony Chang.
+
+ _determine_port_from_expectations_path() was calling port.path_to_test_expectations_file()
+ internally, which means that it would support only 1 TestExpectations file per port. This
+ is an issue for ports such as EFL that support cascased TestExpectations (efl-wk2 -> efl
+ and efl-wk1 -> efl).
+
+ This patch makes _determine_port_from_expectations_path() call port.expectations_files()
+ instead so that all the ports TestExpectations are recognized. The ports are also
+ constructed twice, with "webkit_test_runner" option set to True and False so that we
+ retrieve the TestExpectations paths for both WebKit1 and WebKit2.
+
+ * Scripts/webkitpy/style/checkers/test_expectations.py:
+ (TestExpectationsChecker._determine_port_from_expectations_path):
+ * Scripts/webkitpy/style/checkers/test_expectations_unittest.py: Add corresponding unit test.
+ (TestExpectationsTestCase.test_determine_port_from_expectations_path):
+
+2012-09-10 Ryuan Choi <ryuan.choi@samsung.com>
+
+ [WTR] Generated source files should include config.h
+ https://bugs.webkit.org/show_bug.cgi?id=96254
+
+ Reviewed by Benjamin Poulain.
+
+ Current coding style has encouraged to include config.h at the first position,
+ But derived sources, generated by CodeGeneratorTestRunner.pm, don't follow
+ this rule.
+ Therefore, this patch added it.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
+ (_generateImplementationFile):
+
+2012-09-10 Rick Byers <rbyers@chromium.org>
+
+ Add handling of new GestureTapCancel in DRT
+
+ https://bugs.webkit.org/show_bug.cgi?id=96183
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestWebPlugin.cpp:
+ (TestWebPlugin::handleInputEvent):
+
+2012-09-10 Brady Eidson <beidson@apple.com>
+
+ Javascript in foreground tabs should not wait synchronously for plug-ins to load
+ <rdar://problem/12067415> and https://bugs.webkit.org/show_bug.cgi?id=96167
+
+ Reviewed by Geoff Garen.
+
+ Enhance the "Slow NPP_New" plug-in to also be able to return properties to javascript.
+
+ * DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp:
+ (PluginObject):
+ (SlowNPPNew::PluginObject::PluginObject):
+ (SlowNPPNew::PluginObject::~PluginObject):
+ (SlowNPPNew::PluginObject::hasProperty):
+ (SlowNPPNew::PluginObject::getProperty):
+ (SlowNPPNew::NPP_GetValue):
+ (SlowNPPNew):
+
+2012-09-10 Tim Horton <timothy_horton@apple.com>
+
+ WKTR often reports an unresponsive WebProcess on Mac bots
+ https://bugs.webkit.org/show_bug.cgi?id=95906
+
+ Reviewed by Dan Bernstein.
+
+ Attempt to work around resource contention issues by increasing the NRWT
+ timeout when running against WKTR, as well as WKTR's own WebProcess timeout.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.default_timeout_ms): Default timeout when using WKTR -> 80 seconds.
+ * WebKitTestRunner/TestController.cpp:
+ (WTR): LongTimeout (used when waiting for WebProcess to finish) -> 60 seconds.
+
+2012-09-07 Jer Noble <jer.noble@apple.com>
+
+ <audio> and <video> should send Do Not Track when appropriate
+ https://bugs.webkit.org/show_bug.cgi?id=96134
+
+ Reviewed by Eric Carlson.
+
+ Add a testRunner JS API for calling setShouldSendDoNotTrackHTTPHeader to DRT and
+ WTR. Add FrameLoaderClient client methods for retrieving that value.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (setShouldSendDoNotTrackHTTPHeaderCallback): Pass through to the TestRunner.
+ (TestRunner::staticFunctions): Add the setShouldSendDoNotTrackHTTPHeader function.
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner::setShouldSendDoNotTrackHTTPHeader): Simple setter.
+ (TestRunner::shouldSendDoNotTrackHTTPHeader): Simple getter.
+ * DumpRenderTree/mac/FrameLoadDelegate.mm:
+ (-[FrameLoadDelegate webViewShouldSendDoNotTrackHTTPHeader:]):
+ Pass the question on to the TestRunner.
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+ Add the setShouldSendDoNotTrackHTTPHeader client function.
+ (WTR::InjectedBundlePage::shouldSendDoNotTrackHTTPHeader):
+ Pass the question on to the TestRunner.
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (WTR::TestRunner::shouldSendDoNotTrackHTTPHeader): Simple getter.
+ (WTR::TestRunner::setShouldSendDoNotTrackHTTPHeader): Simple Setter.
+
+2012-09-10 Ojan Vafai <ojan@chromium.org>
+
+ Make EFL bots work on the flakiness dashboard
+ https://bugs.webkit.org/show_bug.cgi?id=96164
+
+ Reviewed by Tony Chang.
+
+ Also, update outdated unittests that had started failing.
+
+ * TestResultServer/static-dashboards/builders.js:
+ (isWebkitTestRunner):
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (nonChromiumPlatform):
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+ (test):
+
2012-09-10 Tommy Widenflycht <tommyw@google.com>
[chromium] MediaStream API: Remove the Descriptor postfix
diff --git a/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp b/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
index ae86b57ff..df68ced94 100644
--- a/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
+++ b/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
@@ -121,11 +121,11 @@
'<(source_dir)/WebKit/chromium/WebKit.gyp:inspector_resources',
'<(source_dir)/WebKit/chromium/WebKit.gyp:webkit',
'<(source_dir)/WTF/WTF.gyp/WTF.gyp:wtf',
+ '<(chromium_src_dir)/base/base.gyp:test_support_base',
'<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
'<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
'<(chromium_src_dir)/third_party/mesa/mesa.gyp:osmesa',
'<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
- '<(chromium_src_dir)/base/base.gyp:test_support_base',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:blob',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
],
@@ -282,8 +282,9 @@
'type': 'shared_library',
'dependencies': [
'<(chromium_src_dir)/base/base.gyp:test_support_base',
- '<(chromium_src_dir)/tools/android/forwarder/forwarder.gyp:forwarder',
'<(chromium_src_dir)/testing/android/native_test.gyp:native_test_native_code',
+ '<(chromium_src_dir)/tools/android/forwarder/forwarder.gyp:forwarder',
+ '<(chromium_src_dir)/tools/android/md5sum/md5sum.gyp:md5sum',
],
'dependencies!': [
'ImageDiff',
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp b/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp
index bd2a76a19..8c80d55a5 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp
@@ -37,7 +37,46 @@ public:
}
private:
+ class PluginObject : public Object<PluginObject> {
+ public:
+ PluginObject()
+ {
+ }
+
+ ~PluginObject()
+ {
+ }
+
+ bool hasProperty(NPIdentifier propertyName)
+ {
+ return true;
+ }
+
+ bool getProperty(NPIdentifier propertyName, NPVariant* result)
+ {
+ static const char* message = "My name is ";
+ char* propertyString = pluginTest()->NPN_UTF8FromIdentifier(propertyName);
+
+ int bufferLength = strlen(propertyString) + strlen(message) + 1;
+ char* resultBuffer = static_cast<char*>(pluginTest()->NPN_MemAlloc(bufferLength));
+ snprintf(resultBuffer, bufferLength, "%s%s", message, propertyString);
+
+ STRINGZ_TO_NPVARIANT(resultBuffer, *result);
+
+ return true;
+ }
+ };
+ virtual NPError NPP_GetValue(NPPVariable variable, void *value)
+ {
+ if (variable != NPPVpluginScriptableNPObject)
+ return NPERR_GENERIC_ERROR;
+
+ *(NPObject**)value = PluginObject::create(this);
+
+ return NPERR_NO_ERROR;
+ }
+
virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData *saved)
{
usleep(550000);
diff --git a/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp b/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp
index f31120209..b2d50feb3 100644
--- a/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp
+++ b/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp
@@ -213,12 +213,14 @@ bool MockWebRTCPeerConnectionHandler::addICECandidate(const WebRTCICECandidate&
bool MockWebRTCPeerConnectionHandler::addStream(const WebMediaStreamDescriptor& stream, const WebMediaConstraints&)
{
m_client->didAddRemoteStream(stream);
+ m_client->negotiationNeeded();
return true;
}
void MockWebRTCPeerConnectionHandler::removeStream(const WebMediaStreamDescriptor& stream)
{
m_client->didRemoveRemoteStream(stream);
+ m_client->negotiationNeeded();
}
void MockWebRTCPeerConnectionHandler::stop()
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp b/Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp
index f5ae9258c..08002094c 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp
+++ b/Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp
@@ -218,6 +218,8 @@ static string roleToString(WebAccessibilityRole role)
return result.append("Form");
case WebAccessibilityRoleHorizontalRule:
return result.append("HorizontalRule");
+ case WebAccessibilityRoleLegend:
+ return result.append("Legend");
default:
// Also matches WebAccessibilityRoleUnknown.
return result.append("Unknown");
diff --git a/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp b/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp
index bbeba6f9b..c78c9ed12 100644
--- a/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp
+++ b/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp
@@ -392,6 +392,7 @@ bool TestWebPlugin::handleInputEvent(const WebKit::WebInputEvent& event, WebKit:
case WebKit::WebInputEvent::GestureFlingCancel: eventName = "GestureFlingCancel"; break;
case WebKit::WebInputEvent::GestureTap: eventName = "GestureTap"; break;
case WebKit::WebInputEvent::GestureTapDown: eventName = "GestureTapDown"; break;
+ case WebKit::WebInputEvent::GestureTapCancel: eventName = "GestureTapCancel"; break;
case WebKit::WebInputEvent::GestureDoubleTap: eventName = "GestureDoubleTap"; break;
case WebKit::WebInputEvent::GestureTwoFingerTap: eventName = "GestureTwoFingerTap"; break;
case WebKit::WebInputEvent::GestureLongPress: eventName = "GestureLongPress"; break;
diff --git a/Tools/DumpRenderTree/efl/CMakeLists.txt b/Tools/DumpRenderTree/efl/CMakeLists.txt
index 7d99f073f..7f3563d90 100644
--- a/Tools/DumpRenderTree/efl/CMakeLists.txt
+++ b/Tools/DumpRenderTree/efl/CMakeLists.txt
@@ -32,9 +32,12 @@ SET(DumpRenderTree_LIBRARIES
${WebKit_LIBRARY_NAME}
${WTF_LIBRARY_NAME}
${CAIRO_LIBRARIES}
- ${ECORE_X_LIBRARIES}
+ ${ECORE_LIBRARIES}
+ ${ECORE_EVAS_LIBRARIES}
+ ${ECORE_FILE_LIBRARIES}
+ ${ECORE_INPUT_LIBRARIES}
${EDJE_LIBRARIES}
- ${EFLDEPS_LIBRARIES}
+ ${EINA_LIBRARIES}
${EVAS_LIBRARIES}
${FONTCONFIG_LIBRARIES}
${LIBXML2_LIBRARIES}
@@ -96,21 +99,19 @@ SET(DumpRenderTree_INCLUDE_DIRECTORIES
${WEBCORE_DIR}/bindings/js
${WEBCORE_DIR}/testing/js
${CAIRO_INCLUDE_DIRS}
+ ${ECORE_INCLUDE_DIRS}
+ ${ECORE_INCLUDE_DIRS}
+ ${ECORE_EVAS_INCLUDE_DIRS}
+ ${ECORE_FILE_INCLUDE_DIRS}
+ ${ECORE_INPUT_INCLUDE_DIRS}
${EDJE_INCLUDE_DIRS}
- ${EFLDEPS_INCLUDE_DIRS}
+ ${EINA_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${FONTCONFIG_INCLUDE_DIR}
${GLIB_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
)
-SET(DumpRenderTree_LINK_FLAGS
- ${ECORE_X_LDFLAGS}
- ${EDJE_LDFLAGS}
- ${EFLDEPS_LDFLAGS}
- ${EVAS_LDFLAGS}
-)
-
# FIXME: DOWNLOADED_FONTS_DIR should not hardcode the directory
# structure. See <https://bugs.webkit.org/show_bug.cgi?id=81475>.
ADD_DEFINITIONS(-DFONTS_CONF_DIR="${TOOLS_DIR}/DumpRenderTree/gtk/fonts"
@@ -121,10 +122,8 @@ INCLUDE_DIRECTORIES(${DumpRenderTree_INCLUDE_DIRECTORIES})
ADD_EXECUTABLE(DumpRenderTree ${DumpRenderTree_SOURCES})
TARGET_LINK_LIBRARIES(DumpRenderTree ${DumpRenderTree_LIBRARIES})
-ADD_TARGET_PROPERTIES(DumpRenderTree LINK_FLAGS "${DumpRenderTree_LINK_FLAGS}")
SET_TARGET_PROPERTIES(DumpRenderTree PROPERTIES FOLDER "Tools")
ADD_EXECUTABLE(ImageDiff ${ImageDiff_SOURCES})
TARGET_LINK_LIBRARIES(ImageDiff ${DumpRenderTree_LIBRARIES})
-ADD_TARGET_PROPERTIES(ImageDiff LINK_FLAGS "${DumpRenderTree_LINK_FLAGS}")
SET_TARGET_PROPERTIES(ImageDiff PROPERTIES FOLDER "Tools")
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTree.pro b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
index 1936f644a..03954b104 100644
--- a/Tools/DumpRenderTree/qt/DumpRenderTree.pro
+++ b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
@@ -19,10 +19,10 @@ INCLUDEPATH += \
$${ROOT_WEBKIT_DIR}/Source/WTF
QT = core gui network testlib webkit widgets
-contains(DEFINES, HAVE_QTPRINTSUPPORT=1): QT += printsupport
+have?(QTPRINTSUPPORT): QT += printsupport
macx: QT += xml
-contains(DEFINES, HAVE_FONTCONFIG=1): PKGCONFIG += fontconfig
+have?(FONTCONFIG): PKGCONFIG += fontconfig
HEADERS += \
$$PWD/../WorkQueue.h \
diff --git a/Tools/DumpRenderTree/qt/main.cpp b/Tools/DumpRenderTree/qt/main.cpp
index 0d37ee819..f2469d213 100644
--- a/Tools/DumpRenderTree/qt/main.cpp
+++ b/Tools/DumpRenderTree/qt/main.cpp
@@ -117,7 +117,6 @@ int main(int argc, char* argv[])
WebKit::initializeTestFonts();
- QApplication::setGraphicsSystem("raster");
QApplication::setStyle(new QWindowsStyle);
QApplication::setDesktopSettingsAware(false);
diff --git a/Tools/EWebLauncher/CMakeLists.txt b/Tools/EWebLauncher/CMakeLists.txt
index 65f983dc3..817231df2 100644
--- a/Tools/EWebLauncher/CMakeLists.txt
+++ b/Tools/EWebLauncher/CMakeLists.txt
@@ -9,9 +9,12 @@ SET(EWebLauncher_LIBRARIES
${WebCore_LIBRARY_NAME}
${WebKit_LIBRARY_NAME}
${CAIRO_LIBRARIES}
+ ${ECORE_LIBRARIES}
+ ${ECORE_EVAS_LIBRARIES}
+ ${ECORE_FILE_LIBRARIES}
${ECORE_X_LIBRARIES}
${EDJE_LIBRARIES}
- ${EFLDEPS_LIBRARIES}
+ ${EINA_LIBRARIES}
${EVAS_LIBRARIES}
${LIBXML2_LIBRARIES}
${LIBXSLT_LIBRARIES}
@@ -23,26 +26,22 @@ SET(EWebLauncher_LIBRARIES
SET(EWebLauncher_INCLUDE_DIRECTORIES
"${WEBKIT_DIR}/efl/ewk"
${CAIRO_INCLUDE_DIRS}
+ ${ECORE_INCLUDE_DIRS}
+ ${ECORE_EVAS_INCLUDE_DIRS}
+ ${ECORE_FILE_INCLUDE_DIRS}
+ ${ECORE_X_INCLUDE_DIRS}
${EDJE_INCLUDE_DIRS}
- ${EFLDEPS_INCLUDE_DIRS}
+ ${EINA_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
)
-SET(EWebLauncher_LINK_FLAGS
- ${ECORE_X_LDFLAGS}
- ${EDJE_LDFLAGS}
- ${EFLDEPS_LDFLAGS}
- ${EVAS_LDFLAGS}
-)
-
ADD_DEFINITIONS(-DTHEME_DIR=\"${THEME_BINARY_DIR}\")
INCLUDE_DIRECTORIES(${EWebLauncher_INCLUDE_DIRECTORIES})
ADD_EXECUTABLE(EWebLauncher ${EWebLauncher_SOURCES})
TARGET_LINK_LIBRARIES(EWebLauncher ${EWebLauncher_LIBRARIES})
-ADD_TARGET_PROPERTIES(EWebLauncher LINK_FLAGS "${EWebLauncher_LINK_FLAGS}")
SET_TARGET_PROPERTIES(EWebLauncher PROPERTIES FOLDER "Tools")
ADD_DEPENDENCIES(EWebLauncher ControlTheme)
diff --git a/Tools/MiniBrowser/efl/CMakeLists.txt b/Tools/MiniBrowser/efl/CMakeLists.txt
index 8e42ff3a2..22295a548 100644
--- a/Tools/MiniBrowser/efl/CMakeLists.txt
+++ b/Tools/MiniBrowser/efl/CMakeLists.txt
@@ -8,9 +8,11 @@ SET(MiniBrowser_SOURCES
SET(MiniBrowser_INCLUDE_DIRECTORIES
${CAIRO_INCLUDE_DIRS}
- ${ECORE_X_INCLUDE_DIRS}
+ ${ECORE_INCLUDE_DIRS}
+ ${ECORE_EVAS_INCLUDE_DIRS}
+ ${ECORE_FILE_INCLUDE_DIRS}
${EDJE_INCLUDE_DIRS}
- ${EFLDEPS_INCLUDE_DIRS}
+ ${EINA_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${TOOLS_DIR}/EWebLauncher
${WEBKIT2_DIR}/UIProcess/API/efl
@@ -23,9 +25,11 @@ SET(MiniBrowser_LIBRARIES
${WebCore_LIBRARY_NAME}
${WebKit2_LIBRARY_NAME}
${CAIRO_LIBRARIES}
- ${ECORE_X_LIBRARIES}
+ ${ECORE_LIBRARIES}
+ ${ECORE_EVAS_LIBRARIES}
+ ${ECORE_FILE_LIBRARIES}
${EDJE_LIBRARIES}
- ${EFLDEPS_LIBRARIES}
+ ${EINA_LIBRARIES}
${EVAS_LIBRARIES}
${FONTCONFIG_LIBRARIES}
${LIBSOUP_LIBRARIES}
@@ -35,13 +39,6 @@ SET(MiniBrowser_LIBRARIES
${SQLITE_LIBRARIES}
)
-SET(MiniBrowser_LINK_FLAGS
- ${ECORE_X_LDFLAGS}
- ${EDJE_LDFLAGS}
- ${EFLDEPS_LDFLAGS}
- ${EVAS_LDFLAGS}
-)
-
IF (ENABLE_GLIB_SUPPORT)
LIST(APPEND MiniBrowser_LIBRARIES
${GLIB_LIBRARIES}
@@ -55,7 +52,6 @@ INCLUDE_DIRECTORIES(${MiniBrowser_INCLUDE_DIRECTORIES})
ADD_EXECUTABLE(MiniBrowser ${MiniBrowser_SOURCES})
TARGET_LINK_LIBRARIES(MiniBrowser ${MiniBrowser_LIBRARIES})
-ADD_TARGET_PROPERTIES(MiniBrowser LINK_FLAGS "${MiniBrowser_LINK_FLAGS}")
SET_TARGET_PROPERTIES(MiniBrowser PROPERTIES FOLDER "Tools")
ADD_DEPENDENCIES(MiniBrowser ThemeControl)
diff --git a/Tools/MiniBrowser/qt/MiniBrowser.pro b/Tools/MiniBrowser/qt/MiniBrowser.pro
index e4530512c..31a39eb6b 100644
--- a/Tools/MiniBrowser/qt/MiniBrowser.pro
+++ b/Tools/MiniBrowser/qt/MiniBrowser.pro
@@ -29,7 +29,7 @@ HEADERS += \
TARGET = MiniBrowser
DESTDIR = $${ROOT_BUILD_DIR}/bin
-contains(DEFINES, HAVE_FONTCONFIG=1): PKGCONFIG += fontconfig
+have?(FONTCONFIG): PKGCONFIG += fontconfig
QT += network gui-private quick quick-private webkit webkit-private
macx: QT += xml
diff --git a/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp b/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp
index 1277a13b2..68307c351 100644
--- a/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp
+++ b/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp
@@ -94,7 +94,7 @@ bool MiniBrowserApplication::notify(QObject* target, QEvent* event)
if (!event->spontaneous() || m_realTouchEventReceived || !m_windowOptions.touchMockingEnabled())
return QGuiApplication::notify(target, event);
- if (isTouchEvent(event) && static_cast<QTouchEvent*>(event)->deviceType() == QTouchEvent::TouchScreen) {
+ if (isTouchEvent(event)) {
if (m_pendingFakeTouchEventCount)
--m_pendingFakeTouchEventCount;
else
diff --git a/Tools/MiniBrowser/qt/raw/View.cpp b/Tools/MiniBrowser/qt/raw/View.cpp
index a7b0aa8f9..8e04fd00b 100644
--- a/Tools/MiniBrowser/qt/raw/View.cpp
+++ b/Tools/MiniBrowser/qt/raw/View.cpp
@@ -78,7 +78,7 @@ void View::exposeEvent(QExposeEvent* event)
{
if (!m_active) {
m_active = true;
- WKPageLoadURL(m_webView->pageRef(), WKURLCreateWithUTF8CString(m_url.toAscii().data()));
+ WKPageLoadURL(m_webView->pageRef(), WKURLCreateWithUTF8CString(m_url.toLocal8Bit().data()));
m_webView->setFocused(true);
m_webView->setVisible(true);
@@ -131,7 +131,7 @@ int main(int argc, char** argv)
{
QGuiApplication app(argc, argv);
- View view(app.arguments().size() > 1 ? app.arguments().at(1) : QString::fromAscii("http://www.google.com"));
+ View view(app.arguments().size() > 1 ? app.arguments().at(1) : QStringLiteral("http://www.google.com"));
view.show();
return app.exec();
}
diff --git a/Tools/QtTestBrowser/QtTestBrowser.pro b/Tools/QtTestBrowser/QtTestBrowser.pro
index 4d64af9e8..60d1b4f3f 100644
--- a/Tools/QtTestBrowser/QtTestBrowser.pro
+++ b/Tools/QtTestBrowser/QtTestBrowser.pro
@@ -43,11 +43,11 @@ WEBKIT += wtf webcore
DESTDIR = $$ROOT_BUILD_DIR/bin
QT += network webkit widgets
-contains(DEFINES, HAVE_QTPRINTSUPPORT=1): QT += printsupport
+have?(QTPRINTSUPPORT): QT += printsupport
macx:QT += xml
-contains(DEFINES, HAVE_FONTCONFIG=1): PKGCONFIG += fontconfig
+have?(FONTCONFIG): PKGCONFIG += fontconfig
contains(QT_CONFIG, opengl) {
QT += opengl
diff --git a/Tools/Scripts/build-webkit b/Tools/Scripts/build-webkit
index a81922a11..4b161a5ad 100755
--- a/Tools/Scripts/build-webkit
+++ b/Tools/Scripts/build-webkit
@@ -256,7 +256,7 @@ if (isGtk()) {
push @options, "--install-headers=" . $installHeaders if defined($installHeaders);
push @options, "--install-libs=" . $installLibs if defined($installLibs);
push @options, "--makeargs=" . $makeArgs if $makeArgs;
- push @options, "--qmakearg=CONFIG+=no_webkit2" if $noWebKit2;
+ push @options, "WEBKIT_CONFIG-=build_webkit2" if $noWebKit2;
if (checkForArgumentAndRemoveFromARGV("-2")) {
print "Note: WebKit2 is now built by default, you don't need to pass -2. Disable using --no-webkit2\n";
@@ -265,7 +265,11 @@ if (isGtk()) {
@options = (@ARGV, @options);
foreach (@features) {
- push @options, "DEFINES+=$_->{define}=${$_->{value}}" if $_->{define} && ${$_->{value}} != $_->{default};
+ if ($_->{define} && ${$_->{value}} != $_->{default}) {
+ my $define = lc($_->{define});
+ $define =~ s/^enable_//;
+ push @options, "WEBKIT_CONFIG" . (${$_->{value}} == 1 ? "+" : "-") . "=" . $define;
+ }
}
}
diff --git a/Tools/Scripts/run-webkit-tests b/Tools/Scripts/run-webkit-tests
index aca8d5dc9..4bb8f3944 100755
--- a/Tools/Scripts/run-webkit-tests
+++ b/Tools/Scripts/run-webkit-tests
@@ -112,10 +112,12 @@ if (isQt()) {
push(@ARGV, "--gtk");
} elsif (isEfl()) {
push(@ARGV, "--efl");
+} elsif (isChromiumAndroid()) {
+ push(@ARGV, "--chromium-android");
} elsif (isChromium()) {
- push(@ARGV, "--chromium")
+ push(@ARGV, "--chromium");
} elsif (isWinCairo()) {
- push(@ARGV, "--wincairo")
+ push(@ARGV, "--wincairo");
}
my $harnessPath = File::Spec->catfile(relativeScriptsDir(), $harnessName);
diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm
index 4bbe2d85d..5c0e8d3b8 100755
--- a/Tools/Scripts/webkitdirs.pm
+++ b/Tools/Scripts/webkitdirs.pm
@@ -735,8 +735,8 @@ sub builtDylibPathForName
$libraryName .= "d";
}
- my $mkspec = `$qmakebin -query QMAKE_MKSPECS`;
- $mkspec =~ s/[\n|\r]$//g;
+ chomp(my $mkspec = `$qmakebin -query QT_HOST_DATA`);
+ $mkspec .= "/mkspecs";
my $qtMajorVersion = retrieveQMakespecVar("$mkspec/qconfig.pri", "QT_MAJOR_VERSION");
if (not $qtMajorVersion) {
$qtMajorVersion = "";
@@ -834,45 +834,27 @@ sub qtFeatureDefaults
{
die "ERROR: qmake missing but required to build WebKit.\n" if not commandExists($qmakebin);
- my $qmakepath = File::Spec->catfile(sourceDir(), "Tools", "qmake");
- my $qmakecommand;
- if (isWindows()) {
- $qmakecommand = "(set QMAKEPATH=$qmakepath) && $qmakebin";
- } else {
- $qmakecommand = "QMAKEPATH=$qmakepath $qmakebin";
- }
+ my $oldQmakeEval = $ENV{QMAKE_CACHE_EVAL};
+ $ENV{QMAKE_CACHE_EVAL} = "CONFIG+=print_defaults";
my $originalCwd = getcwd();
+ my $qmakepath = File::Spec->catfile(sourceDir(), "Tools", "qmake");
+ chdir $qmakepath or die "Failed to cd into " . $qmakepath . "\n";
+
+ my $file = File::Spec->catfile(sourceDir(), "WebKit.pro");
- my $file = File::Spec->catfile($qmakepath, "configure.pro");
my @buildArgs;
- my $qconfigs;
-
- if (@_) {
- @buildArgs = (@buildArgs, @{$_[0]});
- $qconfigs = $_[1];
- my $dir = File::Spec->catfile(productDir(), "Tools", "qmake");
- File::Path::mkpath($dir);
- chdir $dir or die "Failed to cd into " . $dir . "\n";
- } else {
- # Do a quick check of the features without running the config tests
- push @buildArgs, "CONFIG+=quick_check";
- }
+ @buildArgs = (@buildArgs, @{$_[0]}) if (@_);
- my @defaults = `$qmakecommand @buildArgs -nocache $file 2>&1`;
+ my @defaults = `$qmakebin @buildArgs $file 2>&1`;
my %qtFeatureDefaults;
for (@defaults) {
- if (/ DEFINES: /) {
+ if (/DEFINES: /) {
while (/(\S+?)=(\S+?)/gi) {
$qtFeatureDefaults{$1}=$2;
}
- } elsif (/ CONFIG:(.*)$/) {
- if (@_) {
- $$qconfigs = $1;
- }
} elsif (/Done computing defaults/) {
- print "\n";
last;
} elsif (@_) {
print $_;
@@ -880,6 +862,7 @@ sub qtFeatureDefaults
}
chdir $originalCwd;
+ $ENV{QMAKE_CACHE_EVAL} = $oldQmakeEval;
return %qtFeatureDefaults;
}
@@ -1872,8 +1855,8 @@ sub retrieveQMakespecVar
sub qtMakeCommand($)
{
my ($qmakebin) = @_;
- chomp(my $mkspec = `$qmakebin -query QMAKE_MKSPECS`);
- $mkspec .= "/default";
+ chomp(my $mkspec = `$qmakebin -query QT_HOST_DATA`);
+ $mkspec .= "/mkspecs/default";
my $compiler = retrieveQMakespecVar("$mkspec/qmake.conf", "QMAKE_CC");
#print "default spec: " . $mkspec . "\n";
@@ -2212,6 +2195,7 @@ sub buildQMakeProjects
my $make = qtMakeCommand($qmakebin);
my $makeargs = "";
+ my $command;
my $installHeaders;
my $installLibs;
for my $i (0 .. $#buildParams) {
@@ -2236,14 +2220,23 @@ sub buildQMakeProjects
$makeargs .= " -j" . numberOfCPUs();
}
- my $qmakepath = File::Spec->catfile(sourceDir(), "Tools", "qmake");
- my $qmakecommand;
- if (isWindows()) {
- $qmakecommand = "(set QMAKEPATH=$qmakepath) && $qmakebin";
- } else {
- $qmakecommand = "QMAKEPATH=$qmakepath $qmakebin";
+ $make = "$make $makeargs";
+ $make =~ s/\s+$//;
+
+ my $originalCwd = getcwd();
+ my $dir = File::Spec->canonpath(productDir());
+ File::Path::mkpath($dir);
+ chdir $dir or die "Failed to cd into " . $dir . "\n";
+
+ if ($clean) {
+ $command = "$make distclean";
+ print "\nCalling '$command' in " . $dir . "\n\n";
+ return system $command;
}
+ my $qmakepath = File::Spec->catfile(sourceDir(), "Tools", "qmake");
+ my $qmakecommand = $qmakebin;
+
my $config = configuration();
push @buildArgs, "INSTALL_HEADERS=" . $installHeaders if defined($installHeaders);
push @buildArgs, "INSTALL_LIBS=" . $installLibs if defined($installLibs);
@@ -2252,153 +2245,81 @@ sub buildQMakeProjects
if ($passedConfig =~ m/debug/i) {
push @buildArgs, "CONFIG-=release";
push @buildArgs, "CONFIG+=debug";
- } elsif (!$passedConfig or $passedConfig =~ m/release/i) {
+ } elsif ($passedConfig =~ m/release/i) {
push @buildArgs, "CONFIG+=release";
push @buildArgs, "CONFIG-=debug";
- } else {
+ } elsif ($passedConfig) {
die "Build type $passedConfig is not supported with --qt.\n";
}
push @buildArgs, "CONFIG-=debug_and_release" if ($passedConfig && isDarwin());
- my $originalCwd = getcwd();
- my $dir = File::Spec->canonpath(productDir());
- File::Path::mkpath($dir);
- chdir $dir or die "Failed to cd into " . $dir . "\n";
-
- my %defines = qtFeatureDefaults(\@buildArgs, \$qconfigs);
+ # Using build-webkit to build assumes you want a developer-build
+ push @buildArgs, "CONFIG-=production_build";
my $svnRevision = currentSVNRevision();
+ my $previousSvnRevision = "unknown";
my $buildHint = "";
- my $pathToDefinesCache = File::Spec->catfile($dir, ".webkit.config");
- my $pathToOldDefinesFile = File::Spec->catfile($dir, "defaults.txt");
-
- # FIXME: Get rid of .webkit.config and defaults.txt and move all the logic to .qmake.cache
-
- # Ease transition to new build layout
- if (-e $pathToOldDefinesFile) {
- print "Old build layout detected";
- $buildHint = "clean";
- } elsif (-e $pathToDefinesCache && open(DEFAULTS, $pathToDefinesCache)) {
- my %previousDefines;
- while (<DEFAULTS>) {
- if ($_ =~ m/(\S+)=(\S+)/gi) {
- $previousDefines{$1} = $2;
- }
- }
- close (DEFAULTS);
-
- $previousDefines{"SVN_REVISION"} = "unknown" if not exists $previousDefines{"SVN_REVISION"};
-
- if ($svnRevision ne $previousDefines{"SVN_REVISION"}) {
- print "Last built revision was " . $previousDefines{"SVN_REVISION"} .
- ", now at revision $svnRevision. Full incremental build needed.\n";
-
- $buildHint = "incremental";
- }
-
- # Don't confuse the should-we-clean heuristics below
- delete($previousDefines{"SVN_REVISION"});
-
- my @uniqueDefineNames = keys %{ +{ map { $_, 1 } (keys %defines, keys %previousDefines) } };
- foreach my $define (@uniqueDefineNames) {
- if (! exists $previousDefines{$define}) {
- print "Feature $define added";
- $buildHint = "clean";
- last;
- }
-
- if (! exists $defines{$define}) {
- print "Feature $define removed";
- $buildHint = "clean";
- last;
- }
-
- if ($defines{$define} != $previousDefines{$define}) {
- print "Feature $define changed ($previousDefines{$define} -> $defines{$define})";
- $buildHint = "clean";
- last;
+ my $pathToQmakeCache = File::Spec->catfile($dir, ".qmake.cache");
+ if (-e $pathToQmakeCache && open(QMAKECACHE, $pathToQmakeCache)) {
+ while (<QMAKECACHE>) {
+ if ($_ =~ m/^SVN_REVISION\s=\s(\d+)$/) {
+ $previousSvnRevision = $1;
}
}
- } else {
- # Missing build cache suggests we had a broken build after a clean,
- # so we assume we have to do an incremental build just in case.
- $buildHint = "incremental";
}
- if ($buildHint eq "clean") {
- print ", clean build needed!\n";
- # FIXME: This STDIN/STDOUT check does not work on the bots. Disable until it does.
- # if (! -t STDIN || ( &promptUser("Would you like to clean the build directory?", "yes") eq "yes")) {
- chdir $originalCwd;
- File::Path::rmtree($dir);
- File::Path::mkpath($dir);
- chdir $dir or die "Failed to cd into " . $dir . "\n";
- #}
+ my $result = 0;
- # Still trigger an incremental build
- $buildHint = "incremental";
- }
+ # Run qmake, regadless of having a makefile or not, so that qmake can
+ # detect changes to the configuration.
- if ($buildHint eq "incremental") {
- my $qmakeDefines = "DEFINES +=";
- foreach my $key (sort keys %defines) {
- $qmakeDefines .= " \\\n $key=$defines{$key}";
- }
- open(QMAKE_CACHE, ">.qmake.cache") or die "Cannot create .qmake.cache!\n";
- print QMAKE_CACHE "CONFIG += webkit_configured $qconfigs\n";
- print QMAKE_CACHE $qmakeDefines."\n";
- close(QMAKE_CACHE);
- }
+ push @buildArgs, "-after OVERRIDE_SUBDIRS=\"@{$projects}\"" if @{$projects};
+ unshift @buildArgs, File::Spec->catfile(sourceDir(), "WebKit.pro");
+ $command = "$qmakecommand @buildArgs";
+ print "Calling '$command' in " . $dir . "\n\n";
+ print "Installation headers directory: $installHeaders\n" if(defined($installHeaders));
+ print "Installation libraries directory: $installLibs\n" if(defined($installLibs));
- # Save config up-front so we can detect changes to the build config even
- # when the user re-configures after aborting the build.
- open(DEFAULTS, ">$pathToDefinesCache");
- print DEFAULTS "# These defines were set when building WebKit last time\n";
- foreach my $key (sort keys %defines) {
- print DEFAULTS "$key=$defines{$key}\n";
+ my $configChanged = 0;
+ open(QMAKE, "$command 2>&1 |") || die "Could not execute qmake";
+ while (<QMAKE>) {
+ $configChanged = 1 if $_ =~ m/The configuration was changed since the last build/;
+ print $_;
}
- close(DEFAULTS);
- my $result = 0;
-
- my $makefile = File::Spec->catfile($dir, "Makefile");
- if (! -e $makefile) {
- push @buildArgs, "-after OVERRIDE_SUBDIRS=\"@{$projects}\"" if @{$projects};
+ close(QMAKE);
+ $result = $?;
- push @buildArgs, File::Spec->catfile(sourceDir(), "WebKit.pro");
- my $command = "$qmakecommand @buildArgs";
- print "Calling '$command' in " . $dir . "\n\n";
- print "Installation headers directory: $installHeaders\n" if(defined($installHeaders));
- print "Installation libraries directory: $installLibs\n" if(defined($installLibs));
+ $command = "$make";
- $result = system "$command";
- if ($result ne 0) {
- die "Failed to setup build environment using $qmakebin!\n";
- }
+ if ($result ne 0) {
+ die "\nFailed to set up build environment using $qmakebin!\n";
}
- my $command = "$make $makeargs";
- $command =~ s/\s+$//;
+ if ($configChanged) {
+ print "Calling '$command wipeclean' in " . $dir . "\n\n";
+ $result = system "$command wipeclean";
+ }
- if ($clean) {
- $command = "$command distclean";
- } elsif ($buildHint eq "incremental") {
- $command = "$command incremental";
+ if ($svnRevision ne $previousSvnRevision) {
+ print "Last built revision was " . $previousSvnRevision .
+ ", now at revision $svnRevision. Full incremental build needed.\n";
+ $command .= " incremental";
}
- print "Calling '$command' in " . $dir . "\n\n";
+ print "\nCalling '$command' in " . $dir . "\n\n";
$result = system $command;
chdir ".." or die;
if ($result eq 0) {
# Now that the build completed successfully we can save the SVN revision
- open(DEFAULTS, ">>$pathToDefinesCache");
- print DEFAULTS "SVN_REVISION=$svnRevision\n";
- close(DEFAULTS);
- } elsif ($buildHint eq "" && exitStatus($result)) {
+ open(QMAKECACHE, ">>$pathToQmakeCache");
+ print QMAKECACHE "SVN_REVISION = $svnRevision\n";
+ close(QMAKECACHE);
+ } elsif (!$command =~ /incremental/ && exitStatus($result)) {
my $exitCode = exitStatus($result);
my $failMessage = <<EOF;
@@ -2411,11 +2332,11 @@ The build failed with exit code $exitCode. This may have been because you
- added a new resource to a qrc file
as dependencies are not automatically re-computed for local developer builds.
-You may try computing dependencies manually by running 'make qmake' in:
+You may try computing dependencies manually by running 'make qmake_all' in:
$dir
-or passing --makeargs="qmake" to build-webkit.
+or passing --makeargs="qmake_all" to build-webkit.
=========================
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/base.py b/Tools/Scripts/webkitpy/layout_tests/port/base.py
index 868643711..8997a5fe8 100755
--- a/Tools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/base.py
@@ -156,7 +156,7 @@ class Port(object):
if self.get_option('webkit_test_runner'):
# Add some more time to WebKitTestRunner because it needs to syncronise the state
# with the web process and we want to detect if there is a problem with that in the driver.
- return 50 * 1000
+ return 80 * 1000
return 35 * 1000
def driver_stop_timeout(self):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
index e66b0a204..206219c4c 100755
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
@@ -405,10 +405,9 @@ class ChromiumPort(Port):
if (debug_mtime > release_mtime and configuration == 'Release' or
release_mtime > debug_mtime and configuration == 'Debug'):
- _log.warning('You are not running the most '
- 'recent DumpRenderTree binary. You need to '
- 'pass --debug or not to select between '
- 'Debug and Release.')
+ most_recent_binary = 'Release' if configuration == 'Debug' else 'Debug'
+ _log.warning('You are running the %s binary. However the %s binary appears to be more recent. '
+ 'Please pass --%s.', configuration, most_recent_binary, most_recent_binary.lower())
_log.warning('')
# This will fail if we don't have both a debug and release binary.
# That's fine because, in this case, we must already be running the
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
index d2b26870e..600d9a058 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
@@ -31,6 +31,8 @@ import copy
import logging
import os
import re
+import sets
+import subprocess
import threading
import time
@@ -54,7 +56,6 @@ COMMAND_LINE_FILE = DEVICE_SOURCE_ROOT_DIR + 'chrome-native-tests-command-line'
# and Chromium's webkit/support/platform_support_android.cc.
DEVICE_DRT_DIR = DEVICE_SOURCE_ROOT_DIR + 'drt/'
DEVICE_FORWARDER_PATH = DEVICE_DRT_DIR + 'forwarder'
-DEVICE_DRT_STAMP_PATH = DEVICE_DRT_DIR + 'DumpRenderTree.stamp'
DRT_APP_PACKAGE = 'org.chromium.native_test'
DRT_ACTIVITY_FULL_NAME = DRT_APP_PACKAGE + '/.ChromeNativeTestActivity'
@@ -137,6 +138,8 @@ TEST_RESOURCES_TO_PUSH = [
'compositing/resources/video.mp4',
]
+MD5SUM_DEVICE_FILE_NAME = 'md5sum_bin'
+MD5SUM_DEVICE_PATH = '/data/local/tmp/' + MD5SUM_DEVICE_FILE_NAME
class ChromiumAndroidPort(chromium.ChromiumPort):
port_name = 'chromium-android'
@@ -324,10 +327,23 @@ class ChromiumAndroidDriver(driver.Driver):
self._teardown_performance()
super(ChromiumAndroidDriver, self).__del__()
+ def _setup_md5sum_and_push_data_if_needed(self):
+ self._md5sum_path = self._port._build_path_with_configuration(self._port.get_option('configuration'), MD5SUM_DEVICE_FILE_NAME)
+ assert os.path.exists(self._md5sum_path)
+
+ if not self._file_exists_on_device(MD5SUM_DEVICE_PATH):
+ if not self._push_to_device(self._md5sum_path, MD5SUM_DEVICE_PATH):
+ _log.error('Could not push md5sum to device')
+
+ self._push_executable()
+ self._push_fonts()
+ self._push_test_resources()
+
def _setup_test(self):
if self._has_setup:
return
+ self._setup_md5sum_and_push_data_if_needed()
self._has_setup = True
self._run_adb_command(['root'])
self._setup_performance()
@@ -340,10 +356,6 @@ class ChromiumAndroidDriver(driver.Driver):
self._run_adb_command(['shell', 'mkdir', '-p', DEVICE_DRT_DIR])
self._run_adb_command(['shell', 'chmod', '777', DEVICE_DRT_DIR])
- self._push_executable()
- self._push_fonts()
- self._synchronize_datetime()
-
# Delete the disk cache if any to ensure a clean test run.
# This is like what's done in ChromiumPort.setup_test_run but on the device.
self._run_adb_command(['shell', 'rm', '-r', DRT_APP_CACHE_DIR])
@@ -357,29 +369,34 @@ class ChromiumAndroidDriver(driver.Driver):
def _abort(self, message):
raise AssertionError('[%s] %s' % (self._device_serial, message))
+ @staticmethod
+ def _extract_hashes_from_md5sum_output(md5sum_output):
+ assert md5sum_output
+ return [line.split(' ')[0] for line in md5sum_output]
+
+ def _push_file_if_needed(self, host_file, device_file):
+ assert os.path.exists(host_file)
+ device_hashes = self._extract_hashes_from_md5sum_output(
+ self._port.host.executive.popen(self._adb_command + ['shell', MD5SUM_DEVICE_PATH, device_file],
+ stdout=subprocess.PIPE).stdout)
+ host_hashes = self._extract_hashes_from_md5sum_output(
+ self._port.host.executive.popen(args=['%s_host' % self._md5sum_path, host_file],
+ stdout=subprocess.PIPE).stdout)
+ if host_hashes and device_hashes == host_hashes:
+ return
+ self._push_to_device(host_file, device_file)
+
def _push_executable(self):
+ self._push_file_if_needed(self._port._path_to_forwarder(), DEVICE_FORWARDER_PATH)
+ self._push_file_if_needed(self._port._build_path('DumpRenderTree.pak'), DEVICE_DRT_DIR + 'DumpRenderTree.pak')
+ self._push_file_if_needed(self._port._build_path('DumpRenderTree_resources'), DEVICE_DRT_DIR + 'DumpRenderTree_resources')
+ self._push_file_if_needed(self._port._build_path('android_main_fonts.xml'), DEVICE_DRT_DIR + 'android_main_fonts.xml')
+ self._push_file_if_needed(self._port._build_path('android_fallback_fonts.xml'), DEVICE_DRT_DIR + 'android_fallback_fonts.xml')
+ self._run_adb_command(['uninstall', DRT_APP_PACKAGE])
drt_host_path = self._port._path_to_driver()
- forwarder_host_path = self._port._path_to_forwarder()
- host_stamp = int(float(max(os.stat(drt_host_path).st_mtime,
- os.stat(forwarder_host_path).st_mtime)))
- device_stamp = int(float(self._run_adb_command([
- 'shell', 'cat %s 2>/dev/null || echo 0' % DEVICE_DRT_STAMP_PATH])))
- if device_stamp != host_stamp:
- self._log_debug('Pushing executable')
- self._push_to_device(forwarder_host_path, DEVICE_FORWARDER_PATH)
- self._run_adb_command(['uninstall', DRT_APP_PACKAGE])
- install_result = self._run_adb_command(['install', drt_host_path])
- if install_result.find('Success') == -1:
- self._abort('Failed to install %s onto device: %s' % (drt_host_path, install_result))
- self._push_to_device(self._port._build_path('DumpRenderTree.pak'), DEVICE_DRT_DIR + 'DumpRenderTree.pak')
- self._push_to_device(self._port._build_path('DumpRenderTree_resources'), DEVICE_DRT_DIR + 'DumpRenderTree_resources')
- self._push_to_device(self._port._build_path('android_main_fonts.xml'), DEVICE_DRT_DIR + 'android_main_fonts.xml')
- self._push_to_device(self._port._build_path('android_fallback_fonts.xml'), DEVICE_DRT_DIR + 'android_fallback_fonts.xml')
- # Version control of test resources is dependent on executables,
- # because we will always rebuild executables when resources are
- # updated.
- self._push_test_resources()
- self._run_adb_command(['shell', 'echo %d >%s' % (host_stamp, DEVICE_DRT_STAMP_PATH)])
+ install_result = self._run_adb_command(['install', drt_host_path])
+ if install_result.find('Success') == -1:
+ self._abort('Failed to install %s onto device: %s' % (drt_host_path, install_result))
def _push_fonts(self):
if not self._check_version(DEVICE_FONTS_DIR, FONT_FILES_VERSION):
@@ -394,18 +411,7 @@ class ChromiumAndroidDriver(driver.Driver):
def _push_test_resources(self):
self._log_debug('Pushing test resources')
for resource in TEST_RESOURCES_TO_PUSH:
- self._push_to_device(self._port.layout_tests_dir() + '/' + resource, DEVICE_LAYOUT_TESTS_DIR + resource)
-
- def _synchronize_datetime(self):
- # The date/time between host and device may not be synchronized.
- # We need to make them synchronized, otherwise tests might fail.
- try:
- # Get seconds since 1970-01-01 00:00:00 UTC.
- host_datetime = self._port._executive.run_command(['date', '-u', '+%s'])
- except:
- # Reset to 1970-01-01 00:00:00 UTC.
- host_datetime = 0
- self._run_adb_command(['shell', 'date -u %s' % (host_datetime)])
+ self._push_file_if_needed(self._port.layout_tests_dir() + '/' + resource, DEVICE_LAYOUT_TESTS_DIR + resource)
def _check_version(self, dir, version):
assert(dir.endswith('/'))
@@ -664,8 +670,6 @@ class ChromiumAndroidDriver(driver.Driver):
while True:
current_char = self._server_process.read_stdout(deadline, 1)
if current_char == ' ':
- if last_char == '#':
+ if last_char in ('#', '$'):
return
- if last_char == '$':
- raise AssertionError('Adbd is not running as root')
last_char = current_char
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py
index d200acc5b..f6cc51301 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py
@@ -240,7 +240,7 @@ class ChromiumAndroidDriverTest(unittest.TestCase):
self.driver._server_process = driver_unittest.MockServerProcess(lines=['root@android:/ # '])
self.assertEquals(self.driver._read_prompt(time.time() + 1), None)
self.driver._server_process = driver_unittest.MockServerProcess(lines=['$ '])
- self.assertRaises(AssertionError, self.driver._read_prompt, time.time() + 1)
+ self.assertEquals(self.driver._read_prompt(time.time() + 1), None)
def test_command_from_driver_input(self):
driver_input = driver.DriverInput('foo/bar/test.html', 10, 'checksum', True)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/factory.py b/Tools/Scripts/webkitpy/layout_tests/port/factory.py
index 9b5cf27b0..7e4750219 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/factory.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/factory.py
@@ -46,8 +46,10 @@ def port_options(**help_strings):
help='Set the configuration to Release'),
optparse.make_option('--platform', action='store',
help=help_strings.get('platform', 'Platform/Port being tested (e.g., "mac-lion")')),
- optparse.make_option("--chromium", action="store_const", const='chromium', dest='platform',
+ optparse.make_option('--chromium', action='store_const', const='chromium', dest='platform',
help='Alias for --platform=chromium'),
+ optparse.make_option('--chromium-android', action='store_const', const='chromium-android', dest='platform',
+ help='Alias for --platform=chromium-android'),
optparse.make_option('--efl', action='store_const', const='efl', dest="platform",
help='Alias for --platform=efl'),
optparse.make_option('--gtk', action='store_const', const='gtk', dest="platform",
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
index cba5d2b39..bb077c40a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
@@ -31,6 +31,7 @@ import unittest
from webkitpy.tool.mocktool import MockOptions
from webkitpy.common.system.systemhost_mock import MockSystemHost
+from webkitpy.layout_tests.port import chromium_android
from webkitpy.layout_tests.port import chromium_linux
from webkitpy.layout_tests.port import chromium_mac
from webkitpy.layout_tests.port import chromium_win
@@ -85,6 +86,11 @@ class FactoryTest(unittest.TestCase):
self.assert_port(port_name='chromium', os_name='linux', os_version='lucid',
cls=chromium_linux.ChromiumLinuxPort)
+ def test_chromium_android(self):
+ self.assert_port(port_name='chromium-android', cls=chromium_android.ChromiumAndroidPort)
+ # NOTE: We can't check for port_name=chromium here, as this will append the host's
+ # operating system, whereas host!=target for Android.
+
def test_chromium_win(self):
self.assert_port(port_name='chromium-win-xp', cls=chromium_win.ChromiumWinPort)
self.assert_port(port_name='chromium-win', os_name='win', os_version='xp',
diff --git a/Tools/Scripts/webkitpy/style/checkers/test_expectations.py b/Tools/Scripts/webkitpy/style/checkers/test_expectations.py
index 3b81132c3..46403b7db 100644
--- a/Tools/Scripts/webkitpy/style/checkers/test_expectations.py
+++ b/Tools/Scripts/webkitpy/style/checkers/test_expectations.py
@@ -49,11 +49,14 @@ class TestExpectationsChecker(object):
def _determine_port_from_expectations_path(self, host, expectations_path):
# Pass a configuration to avoid calling default_configuration() when initializing the port (takes 0.5 seconds on a Mac Pro!).
- options = optparse.Values({'configuration': 'Release'})
+ options_wk1 = optparse.Values({'configuration': 'Release', 'webkit_test_runner': False})
+ options_wk2 = optparse.Values({'configuration': 'Release', 'webkit_test_runner': True})
for port_name in host.port_factory.all_port_names():
- port = host.port_factory.get(port_name, options=options)
- if port.path_to_test_expectations_file().replace(port.path_from_webkit_base() + host.filesystem.sep, '') == expectations_path:
- return port
+ ports = [host.port_factory.get(port_name, options=options_wk1), host.port_factory.get(port_name, options=options_wk2)]
+ for port in ports:
+ for test_expectation_file in port.expectations_files():
+ if test_expectation_file.replace(port.path_from_webkit_base() + host.filesystem.sep, '') == expectations_path:
+ return port
return None
def __init__(self, file_path, handle_style_error, host=None):
diff --git a/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py b/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
index 8b53e6dfa..ab70ba202 100644
--- a/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
@@ -79,6 +79,9 @@ class TestExpectationsTestCase(unittest.TestCase):
self._expect_port_for_expectations_path('chromium', 'LayoutTests/platform/chromium/TestExpectations')
self._expect_port_for_expectations_path(None, '/mock-checkout/LayoutTests/platform/win/TestExpectations')
self._expect_port_for_expectations_path('win', 'LayoutTests/platform/win/TestExpectations')
+ self._expect_port_for_expectations_path('efl', 'LayoutTests/platform/efl/TestExpectations')
+ self._expect_port_for_expectations_path('efl', 'LayoutTests/platform/efl-wk1/TestExpectations')
+ self._expect_port_for_expectations_path('efl', 'LayoutTests/platform/efl-wk2/TestExpectations')
def assert_lines_lint(self, lines, should_pass, expected_output=None):
self._error_collector.reset_errors()
diff --git a/Tools/TestResultServer/static-dashboards/builders.js b/Tools/TestResultServer/static-dashboards/builders.js
index c63ee9cd4..698ca2b85 100644
--- a/Tools/TestResultServer/static-dashboards/builders.js
+++ b/Tools/TestResultServer/static-dashboards/builders.js
@@ -163,6 +163,8 @@ function isChromiumTipOfTreeGpuTestRunner(builder)
function isWebkitTestRunner(builder)
{
+ if (builder.indexOf('EFL') != -1)
+ return builder.indexOf('Build') == -1;
if (builder.indexOf('Tests') != -1) {
// Apple Windows bots still run old-run-webkit-tests, so they don't upload data.
return builder.indexOf('Win') == -1 || (builder.indexOf('Qt') != -1 && builder.indexOf('Chromium') != -1);
diff --git a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
index 40b8839fa..119f05dad 100644
--- a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
+++ b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
@@ -40,7 +40,7 @@ var GPU_RESULTS_BASE_PATH = 'http://chromium-browser-gpu-tests.commondatastorage
// FIXME: These platform names should probably be changed to match the directories in LayoutTests/platform
// instead of matching the values we use in the TestExpectations file.
-var PLATFORMS = ['LION', 'SNOWLEOPARD', 'XP', 'VISTA', 'WIN7', 'LUCID', 'APPLE_LION', 'APPLE_SNOWLEOPARD', 'APPLE_XP', 'APPLE_WIN7', 'GTK_LINUX', 'QT_LINUX'];
+var PLATFORMS = ['LION', 'SNOWLEOPARD', 'XP', 'VISTA', 'WIN7', 'LUCID', 'APPLE_LION', 'APPLE_SNOWLEOPARD', 'APPLE_XP', 'APPLE_WIN7', 'GTK_LINUX', 'QT_LINUX', 'EFL'];
var PLATFORM_UNIONS = {
'MAC': ['SNOWLEOPARD', 'LION'],
'WIN': ['XP', 'WIN7'],
@@ -265,6 +265,8 @@ function nonChromiumPlatform(builderNameUpperCase)
return 'GTK_LINUX';
if (stringContains(builderNameUpperCase, 'QT LINUX'))
return 'QT_LINUX';
+ if (stringContains(builderNameUpperCase, 'EFL'))
+ return 'EFL';
}
function chromiumPlatform(builderNameUpperCase)
diff --git a/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js b/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js
index 32d2af225..81089aa4d 100644
--- a/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js
+++ b/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js
@@ -190,7 +190,7 @@ test('realModifiers', 3, function() {
equal(realModifiers('BUGFOO'), '');
});
-test('allTestsWithSamePlatformAndBuildType', 12, function() {
+test('allTestsWithSamePlatformAndBuildType', 13, function() {
// FIXME: test that allTestsWithSamePlatformAndBuildType actually returns the right set of tests.
for (var i = 0; i < PLATFORMS.length; i++)
ok(g_allTestsByPlatformAndBuildType[PLATFORMS[i]]);
@@ -310,20 +310,20 @@ test('headerForTestTableHtml', 1, function() {
test('htmlForTestTypeSwitcherGroup', 6, function() {
var container = document.createElement('div');
g_crossDashboardState.testType = 'ui_tests';
- container.innerHTML = htmlForTestTypeSwitcher();
+ container.innerHTML = htmlForTestTypeSwitcher(true);
var selects = container.querySelectorAll('select');
- equal(selects.length, 3);
- var group = selects[2];
+ equal(selects.length, 2);
+ var group = selects[1];
equal(group.parentNode.textContent.indexOf('Group:'), 0);
equal(group.children.length, 3);
g_crossDashboardState.testType = 'layout-tests';
- container.innerHTML = htmlForTestTypeSwitcher();
+ container.innerHTML = htmlForTestTypeSwitcher(true);
var selects = container.querySelectorAll('select');
- equal(selects.length, 3);
- var group = selects[2];
+ equal(selects.length, 2);
+ var group = selects[1];
equal(group.parentNode.textContent.indexOf('Group:'), 0);
- equal(group.children.length, 3);
+ equal(group.children.length, 4);
});
test('htmlForIndividualTestOnAllBuilders', 1, function() {
@@ -348,6 +348,7 @@ test('htmlForIndividualTestOnAllBuildersWithResultsLinks', 1, function() {
resetGlobals();
var test = 'dummytest.html';
var builderName = 'dummyBuilder';
+ BUILDER_TO_MASTER[builderName] = CHROMIUM_BUILDER_MASTER;
g_testToResultsMap[test] = [createResultsObjectForTest(test, builderName)];
equal(htmlForIndividualTestOnAllBuildersWithResultsLinks(test),
@@ -361,13 +362,6 @@ test('htmlForIndividualTestOnAllBuildersWithResultsLinks', 1, function() {
'</tr></thead>' +
'<tbody></tbody>' +
'</table>' +
- '<div>The following builders either don\'t run this test (e.g. it\'s skipped) or all runs passed:</div>' +
- '<div class=skipped-builder-list>' +
- '<div class=skipped-builder>Webkit Linux</div>' +
- '<div class=skipped-builder>Webkit Linux (dbg)</div>' +
- '<div class=skipped-builder>Webkit Mac10.7</div>' +
- '<div class=skipped-builder>Webkit Win</div>' +
- '</div>' +
'<div class=expectations test=dummytest.html>' +
'<div><span class=link onclick="setQueryParameter(\'showExpectations\', true)">Show results</span> | ' +
'<span class=link onclick="setQueryParameter(\'showLargeExpectations\', true)">Show large thumbnails</span> | ' +
@@ -393,13 +387,6 @@ test('htmlForIndividualTestOnAllBuildersWithResultsLinksWebkitMaster', 1, functi
'</tr></thead>' +
'<tbody></tbody>' +
'</table>' +
- '<div>The following builders either don\'t run this test (e.g. it\'s skipped) or all runs passed:</div>' +
- '<div class=skipped-builder-list>' +
- '<div class=skipped-builder>Webkit Linux</div>' +
- '<div class=skipped-builder>Webkit Linux (dbg)</div>' +
- '<div class=skipped-builder>Webkit Mac10.7</div>' +
- '<div class=skipped-builder>Webkit Win</div>' +
- '</div>' +
'<div class=expectations test=dummytest.html>' +
'<div><span class=link onclick="setQueryParameter(\'showExpectations\', true)">Show results</span> | ' +
'<span class=link onclick="setQueryParameter(\'showLargeExpectations\', true)">Show large thumbnails</span>' +
@@ -511,10 +498,11 @@ test('generateWebkitBuildersFromBuilderList', 1, function() {
"Qt Linux 64-bit Release (WebKit2 Perf)", "Qt Linux ARMv7 Release", "Qt Linux MIPS Release", "Qt Linux Release", "Qt Linux Release minimal", "Qt Linux SH4 Release",
"Qt SnowLeopard Release", "Qt Windows 32-bit Debug", "Qt Windows 32-bit Release", "SnowLeopard Intel Debug (Build)", "SnowLeopard Intel Debug (Tests)",
"SnowLeopard Intel Debug (WebKit2 Tests)", "SnowLeopard Intel Release (Build)", "SnowLeopard Intel Release (Tests)", "SnowLeopard Intel Release (WebKit2 Tests)",
- "WinCE Release (Build)", "WinCairo Release", "Windows 7 Release (Tests)", "Windows 7 Release (WebKit2 Tests)", "Windows Debug (Build)", "Windows Release (Build)", "Windows XP Debug (Tests)"];
- var expectedBuilders = [["Chromium Linux Release (Tests)", 2], ["Chromium Mac Release (Tests)"], ["Chromium Win Release (Tests)"], ["GTK Linux 32-bit Release"], ["GTK Linux 64-bit Debug"],
+ "WinCE Release (Build)", "WinCairo Release", "Windows 7 Release (Tests)", "Windows 7 Release (WebKit2 Tests)", "Windows Debug (Build)", "Windows Release (Build)", "Windows XP Debug (Tests)",
+ "EFL Linux 32-bit Release (Build)", "EFL Linux 64-bit Debug"];
+ var expectedBuilders = [["Chromium Linux Release (Tests)", 2], ["Chromium Mac Release (Tests)"], ["EFL Linux Release"], ["GTK Linux 32-bit Release"], ["GTK Linux 64-bit Debug"],
["GTK Linux 64-bit Release"], ["Lion Debug (Tests)"], ["Lion Debug (WebKit2 Tests)"], ["Lion Release (Tests)"], ["Lion Release (WebKit2 Tests)"], ["Qt Linux Release"],
- ["SnowLeopard Intel Debug (Tests)"], ["SnowLeopard Intel Debug (WebKit2 Tests)"], ["SnowLeopard Intel Release (Tests)"], ["SnowLeopard Intel Release (WebKit2 Tests)"]];
+ ["SnowLeopard Intel Debug (Tests)"], ["SnowLeopard Intel Debug (WebKit2 Tests)"], ["SnowLeopard Intel Release (Tests)"], ["SnowLeopard Intel Release (WebKit2 Tests)"], ["EFL Linux 64-bit Debug"]];
deepEqual(generateBuildersFromBuilderList(builderList, isWebkitTestRunner), expectedBuilders);
});
@@ -526,7 +514,7 @@ test('generateChromiumWebkitTipOfTreeBuildersFromBuilderList', 1, function() {
"Webkit Win Builder (deps)", "Webkit Win7", "Win (dbg)", "Win Builder",
"Linux (Content Shell)"];
var expectedBuilders = [["Webkit Linux", 2], ["Webkit Linux (dbg)"], ["Webkit Linux 32"], ["Webkit Mac10.6"],
- ["Webkit Mac10.6 (dbg)"], ["Webkit Mac10.7"], ["Webkit Win"], ["Webkit Win (dbg)(1)"], ["Webkit Win (dbg)(2)"], ["Webkit Win7"], ["Linux (Content Shell)"]];
+ ["Webkit Mac10.6 (dbg)"], ["Webkit Mac10.7"], ["Webkit Win"], ["Webkit Win (dbg)(1)"], ["Webkit Win (dbg)(2)"], ["Webkit Win7"]];
deepEqual(generateBuildersFromBuilderList(builderList, isChromiumWebkitTipOfTreeTestRunner), expectedBuilders);
});
@@ -629,9 +617,9 @@ test('builderGroupIsToTWebKitAttribute', 2, function() {
testBuilderGroups['@DEPS - dummy.org'].expectedGroups = 1;
var testJSONData = "{ \"Dummy Builder 1\": null, \"Dummy Builder 2\": null }";
- onBuilderListLoad(testBuilderGroups, function() { return true; }, dummyMaster, '@ToT - dummy.org', BuilderGroup.TOT_WEBKIT, JSON.parse(testJSONData));
+ onBuilderListLoad(testBuilderGroups, function() { return true; }, dummyMaster, '@ToT - dummy.org', JSON.parse(testJSONData));
equal(testBuilderGroups['@ToT - dummy.org'].isToTWebKit, true);
- onBuilderListLoad(testBuilderGroups, function() { return true; }, dummyMaster, '@DEPS - dummy.org', BuilderGroup.DEPS_WEBKIT, JSON.parse(testJSONData));
+ onBuilderListLoad(testBuilderGroups, function() { return true; }, dummyMaster, '@DEPS - dummy.org', JSON.parse(testJSONData));
equal(testBuilderGroups['@DEPS - dummy.org'].isToTWebKit, false);
});
@@ -644,10 +632,10 @@ test('builderGroupExpectedGroups', 4, function() {
var testJSONData = "{ \"Dummy Builder 1\": null }";
equal(testBuilderGroups['@ToT - dummy.org'].expectedGroups, 3);
- onBuilderListLoad(testBuilderGroups, function() { return true; }, dummyMaster, '@ToT - dummy.org', BuilderGroup.TOT_WEBKIT, JSON.parse(testJSONData));
+ onBuilderListLoad(testBuilderGroups, function() { return true; }, dummyMaster, '@ToT - dummy.org', JSON.parse(testJSONData));
equal(testBuilderGroups['@ToT - dummy.org'].groups, 1);
var testJSONData = "{ \"Dummy Builder 2\": null }";
- onBuilderListLoad(testBuilderGroups, function() { return true; }, dummyMaster, '@ToT - dummy.org', BuilderGroup.TOT_WEBKIT, JSON.parse(testJSONData));
+ onBuilderListLoad(testBuilderGroups, function() { return true; }, dummyMaster, '@ToT - dummy.org', JSON.parse(testJSONData));
equal(testBuilderGroups['@ToT - dummy.org'].groups, 2);
onErrorLoadingBuilderList('http://build.dummy.org', testBuilderGroups, '@ToT - dummy.org');
equal(testBuilderGroups['@ToT - dummy.org'].groups, 3);
@@ -662,9 +650,8 @@ test('requestBuilderListAddsBuilderGroupEntry', 2, function() {
var builderFilter = null;
var master = { builderJsonPath: function() {} };
var groupName = '@ToT - dummy.org';
- var groupEnum = null;
var builderGroup = { expectedGroups: 0 };
- requestBuilderList(testBuilderGroups, builderFilter, master, groupName, groupEnum, builderGroup);
+ requestBuilderList(testBuilderGroups, builderFilter, master, groupName, builderGroup);
equal(testBuilderGroups['@ToT - dummy.org'], builderGroup);
equal(testBuilderGroups['@ToT - dummy.org'].expectedGroups, 1);
diff --git a/Tools/TestWebKitAPI/PlatformEfl.cmake b/Tools/TestWebKitAPI/PlatformEfl.cmake
index 7f19c6704..968a61983 100644
--- a/Tools/TestWebKitAPI/PlatformEfl.cmake
+++ b/Tools/TestWebKitAPI/PlatformEfl.cmake
@@ -8,13 +8,15 @@ ADD_CUSTOM_TARGET(forwarding-headersSoupForTestWebKitAPI
)
SET(ForwardingNetworkHeadersForTestWebKitAPI_NAME forwarding-headersSoupForTestWebKitAPI)
-INCLUDE_DIRECTORIES(${LIBSOUP_INCLUDE_DIRS}
+INCLUDE_DIRECTORIES(
${WEBKIT2_DIR}/UIProcess/API/C/soup
${WEBKIT2_DIR}/UIProcess/API/C/efl
${WEBKIT2_DIR}/UIProcess/API/efl
${ECORE_INCLUDE_DIRS}
${EINA_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
+ ${GLIB_INCLUDE_DIRS}
+ ${LIBSOUP_INCLUDE_DIRS}
)
SET(test_main_SOURCES
diff --git a/Tools/Tools.pro b/Tools/Tools.pro
index 749013c34..1448c0105 100644
--- a/Tools/Tools.pro
+++ b/Tools/Tools.pro
@@ -7,21 +7,21 @@
TEMPLATE = subdirs
CONFIG += ordered
-!no_webkit1 {
+build?(webkit1) {
SUBDIRS += QtTestBrowser/QtTestBrowser.pro
- contains(DEFINES, HAVE_QTTESTLIB=1): SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro
+ build?(drt): SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro
SUBDIRS += DumpRenderTree/qt/ImageDiff.pro
}
-!no_webkit2 {
+build?(webkit2) {
# WTR's InjectedBundle depends currently on WK1's DumpRenderTreeSupport
- !no_webkit1:contains(DEFINES, HAVE_QTQUICK=1):contains(DEFINES, HAVE_QTTESTLIB=1): SUBDIRS += WebKitTestRunner/WebKitTestRunner.pro
+ build?(webkit1):build?(wtr):have?(QTQUICK): SUBDIRS += WebKitTestRunner/WebKitTestRunner.pro
- contains(DEFINES, HAVE_QTQUICK=1): SUBDIRS += MiniBrowser/qt/MiniBrowser.pro
+ have?(QTQUICK): SUBDIRS += MiniBrowser/qt/MiniBrowser.pro
SUBDIRS += MiniBrowser/qt/raw/MiniBrowserRaw.pro
}
-!win32:contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
+!win32:enable?(NETSCAPE_PLUGIN_API) {
SUBDIRS += DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
}
@@ -30,7 +30,7 @@ OTHER_FILES = \
$$files(Scripts/webkitpy/*.py, true) \
$$files(Scripts/webkitperl/*.p[l|m], true) \
qmake/README \
- qmake/configure.* \
+ qmake/dump-features.pl \
qmake/qt_webkit.pri \
qmake/config.tests/README \
qmake/config.tests/fontconfig/* \
diff --git a/Tools/WebKitTestRunner/CMakeLists.txt b/Tools/WebKitTestRunner/CMakeLists.txt
index 3b96b414d..e4f4f729f 100644
--- a/Tools/WebKitTestRunner/CMakeLists.txt
+++ b/Tools/WebKitTestRunner/CMakeLists.txt
@@ -82,9 +82,5 @@ TARGET_LINK_LIBRARIES(TestRunnerInjectedBundle ${WebKitTestRunner_LIBRARIES})
ADD_EXECUTABLE(WebKitTestRunner ${WebKitTestRunner_SOURCES})
TARGET_LINK_LIBRARIES(WebKitTestRunner ${WebKitTestRunner_LIBRARIES})
-IF (WebKitTestRunner_LINK_FLAGS)
- ADD_TARGET_PROPERTIES(WebKitTestRunner LINK_FLAGS ${WebKitTestRunner_LINK_FLAGS})
-ENDIF ()
-
ADD_DEPENDENCIES(${WebKit2_LIBRARY_NAME} ${ForwardingHeadersForWebKitTestRunner_NAME})
ADD_DEPENDENCIES(${WebKit2_LIBRARY_NAME} ${ForwardingNetworkHeadersForWebKitTestRunner_NAME})
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm b/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm
index 2f5c66f10..40d92ead7 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm
@@ -328,6 +328,7 @@ EOF
EOF
unshift(@contents, map { "#include \"$_\"\n" } sort keys(%contentsIncludes));
+ unshift(@contents, "#include \"config.h\"\n");
unshift(@contents, @contentsPrefix);
return { name => $filename, contents => \@contents };
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
index f2a8b81ce..a49471850 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
@@ -67,6 +67,8 @@ module WTR {
void removeOriginAccessWhitelistEntry(in DOMString sourceOrigin, in DOMString destinationProtocol, in DOMString destinationHost, in boolean allowDestinationSubdomains);
void setUserStyleSheetEnabled(in boolean value);
void setUserStyleSheetLocation(in DOMString location);
+ void setMinimumTimerInterval(in double interval); // Interval specified in seconds.
+ void setSpatialNavigationEnabled(in boolean value);
// Special DOM functions.
void clearBackForwardList();
@@ -107,6 +109,9 @@ module WTR {
// Application Cache API
void clearAllApplicationCaches();
void setAppCacheMaximumSize(in unsigned long long size);
+ long long applicationCacheDiskUsageForOrigin(in DOMString origin);
+ void clearApplicationCacheForOrigin(in DOMString name);
+ void setApplicationCacheOriginQuota(in unsigned long long bytes);
// Compositing testing.
DOMString layerTreeAsText();
diff --git a/Tools/WebKitTestRunner/InjectedBundle/DerivedSources.pri b/Tools/WebKitTestRunner/InjectedBundle/DerivedSources.pri
index 15211830c..8a2fa4dce 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/DerivedSources.pri
+++ b/Tools/WebKitTestRunner/InjectedBundle/DerivedSources.pri
@@ -25,7 +25,7 @@ IDL_BINDINGS += \
idl.output = JS${QMAKE_FILE_BASE}.cpp
idl.input = IDL_BINDINGS
idl.script = $${ROOT_WEBKIT_DIR}/Source/WebCore/bindings/scripts/generate-bindings.pl
-idl.commands = perl -I$${ROOT_WEBKIT_DIR}/Source/WebCore/bindings/scripts -I$$PWD/Bindings $$idl.script --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" --generator TestRunner --include $$PWD/Bindings --outputDir ${QMAKE_FUNC_FILE_OUT_PATH} --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME}
+idl.commands = perl -I$${ROOT_WEBKIT_DIR}/Source/WebCore/bindings/scripts -I$$PWD/Bindings $$idl.script --defines \"$$javascriptFeatureDefines()\" --generator TestRunner --include $$PWD/Bindings --outputDir ${QMAKE_FUNC_FILE_OUT_PATH} --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME}
idl.depends = $${ROOT_WEBKIT_DIR}/Source/WebCore/bindings/scripts/CodeGenerator.pm \
$$PWD/Bindings/CodeGeneratorTestRunner.pm \
$${ROOT_WEBKIT_DIR}/Source/WebCore/bindings/scripts/IDLParser.pm \
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
index 83c9fab8b..e4e41235b 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
@@ -240,6 +240,8 @@ void InjectedBundle::beginTesting(WKDictionaryRef settings)
WKBundleSetAuthorAndUserStylesEnabled(m_bundle, m_pageGroup, true);
WKBundleSetFrameFlatteningEnabled(m_bundle, m_pageGroup, false);
WKBundleSetMinimumLogicalFontSize(m_bundle, m_pageGroup, 9);
+ WKBundleSetMinimumTimerInterval(m_bundle, m_pageGroup, 0.010); // 10 milliseconds (DOMTimer::s_minDefaultTimerInterval)
+ WKBundleSetSpatialNavigationEnabled(m_bundle, m_pageGroup, false);
WKBundleRemoveAllUserContent(m_bundle, m_pageGroup);
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Target.pri b/Tools/WebKitTestRunner/InjectedBundle/Target.pri
index f46e44caa..32769ac5d 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Target.pri
+++ b/Tools/WebKitTestRunner/InjectedBundle/Target.pri
@@ -56,7 +56,7 @@ WEBKIT += wtf javascriptcore webcore
CONFIG += plugin rpath
-contains(DEFINES, HAVE_FONTCONFIG=1): PKGCONFIG += fontconfig
+have?(FONTCONFIG): PKGCONFIG += fontconfig
INCLUDEPATH += \
$$PWD/.. \
diff --git a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
index 2d478ab68..373439d62 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
@@ -302,11 +302,27 @@ void TestRunner::clearAllApplicationCaches()
WKBundleClearApplicationCache(InjectedBundle::shared().bundle());
}
+void TestRunner::clearApplicationCacheForOrigin(JSStringRef origin)
+{
+ WKBundleClearApplicationCacheForOrigin(InjectedBundle::shared().bundle(), toWK(origin).get());
+}
+
void TestRunner::setAppCacheMaximumSize(uint64_t size)
{
WKBundleSetAppCacheMaximumSize(InjectedBundle::shared().bundle(), size);
}
+long long TestRunner::applicationCacheDiskUsageForOrigin(JSStringRef origin)
+{
+ return WKBundleGetAppCacheUsageForOrigin(InjectedBundle::shared().bundle(), toWK(origin).get());
+}
+
+void TestRunner::setApplicationCacheOriginQuota(unsigned long long bytes)
+{
+ WKRetainPtr<WKStringRef> origin(AdoptWK, WKStringCreateWithUTF8CString("http://127.0.0.1:8000"));
+ WKBundleSetApplicationCacheOriginQuota(InjectedBundle::shared().bundle(), origin.get(), bytes);
+}
+
bool TestRunner::isCommandEnabled(JSStringRef name)
{
return WKBundlePageIsEditingCommandEnabled(InjectedBundle::shared().page()->page(), toWK(name).get());
@@ -673,6 +689,16 @@ void TestRunner::setUserStyleSheetLocation(JSStringRef location)
setUserStyleSheetEnabled(true);
}
+void TestRunner::setMinimumTimerInterval(double seconds)
+{
+ WKBundleSetMinimumTimerInterval(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), seconds);
+}
+
+void TestRunner::setSpatialNavigationEnabled(bool enabled)
+{
+ WKBundleSetSpatialNavigationEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
+}
+
void TestRunner::grantWebNotificationPermission(JSStringRef origin)
{
WKRetainPtr<WKStringRef> originWK = toWK(origin);
diff --git a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
index 080e519ea..54fb84708 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
@@ -106,6 +106,8 @@ public:
void removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
void setUserStyleSheetEnabled(bool);
void setUserStyleSheetLocation(JSStringRef);
+ void setMinimumTimerInterval(double seconds); // Interval specified in seconds.
+ void setSpatialNavigationEnabled(bool);
// Special DOM functions.
JSValueRef computedStyleIncludingVisitedInfo(JSValueRef element);
@@ -143,7 +145,10 @@ public:
// Application Cache
void clearAllApplicationCaches();
+ void clearApplicationCacheForOrigin(JSStringRef origin);
void setAppCacheMaximumSize(uint64_t);
+ long long applicationCacheDiskUsageForOrigin(JSStringRef origin);
+ void setApplicationCacheOriginQuota(unsigned long long);
// Printing
bool isPageBoxVisible(int pageIndex);
diff --git a/Tools/WebKitTestRunner/PlatformEfl.cmake b/Tools/WebKitTestRunner/PlatformEfl.cmake
index 084cb5045..4ab8966d2 100644
--- a/Tools/WebKitTestRunner/PlatformEfl.cmake
+++ b/Tools/WebKitTestRunner/PlatformEfl.cmake
@@ -1,10 +1,3 @@
-LIST(APPEND WebKitTestRunner_LINK_FLAGS
- ${ECORE_X_LDFLAGS}
- ${EDJE_LDFLAGS}
- ${EFLDEPS_LDFLAGS}
- ${EVAS_LDFLAGS}
-)
-
ADD_CUSTOM_TARGET(forwarding-headersEflForWebKitTestRunner
COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
)
@@ -30,17 +23,21 @@ LIST(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
"${WTF_DIR}/wtf/gobject"
${CAIRO_INCLUDE_DIRS}
+ ${ECORE_INCLUDE_DIRS}
+ ${ECORE_EVAS_INCLUDE_DIRS}
${ECORE_X_INCLUDE_DIRS}
- ${EFLDEPS_INCLUDE_DIRS}
+ ${EINA_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
)
LIST(APPEND WebKitTestRunner_LIBRARIES
${CAIRO_LIBRARIES}
+ ${ECORE_LIBRARIES}
+ ${ECORE_EVAS_LIBRARIES}
${ECORE_X_LIBRARIES}
- ${EDJE_LIBRARIES}
- ${EFLDEPS_LIBRARIES}
+ ${EINA_LIBRARIES}
+ ${EVAS_LIBRARIES}
${GLIB_LIBRARIES}
${OPENGL_LIBRARIES}
${WTF_LIBRARY_NAME}
diff --git a/Tools/WebKitTestRunner/Target.pri b/Tools/WebKitTestRunner/Target.pri
index 27b65c617..7165c1b66 100644
--- a/Tools/WebKitTestRunner/Target.pri
+++ b/Tools/WebKitTestRunner/Target.pri
@@ -35,7 +35,7 @@ WEBKIT += wtf javascriptcore webkit2
DEFINES += USE_SYSTEM_MALLOC=1
-contains(DEFINES, HAVE_FONTCONFIG=1): PKGCONFIG += fontconfig
+have?(FONTCONFIG): PKGCONFIG += fontconfig
INCLUDEPATH += \
$${ROOT_WEBKIT_DIR}/Tools/DumpRenderTree/qt
diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
index af8f702e9..0179522cc 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -55,10 +55,10 @@
namespace WTR {
-// defaultLongTimeout + defaultShortTimeout should be less than 50,
+// defaultLongTimeout + defaultShortTimeout should be less than 80,
// the default timeout value of the test harness so we can detect an
// unresponsive web process.
-static const double defaultLongTimeout = 30;
+static const double defaultLongTimeout = 60;
static const double defaultShortTimeout = 15;
static const double defaultNoTimeout = -1;
diff --git a/Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp b/Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp
index f8869d84d..27bcca4df 100644
--- a/Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp
+++ b/Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp
@@ -131,7 +131,7 @@ void EventSenderProxy::keyDown(WKStringRef keyRef, WKEventModifiers modifiersRef
code = Qt::Key_Tab;
if (modifiers == Qt::ShiftModifier)
code = Qt::Key_Backtab;
- keyText = QString();
+ keyText = QStringLiteral("\t");
} else if (code == KEYCODE_DEL || code == KEYCODE_BACKSPACE) {
code = Qt::Key_Backspace;
if (modifiers == Qt::AltModifier)
diff --git a/Tools/qmake/.qmake.cache b/Tools/qmake/.qmake.cache
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tools/qmake/.qmake.cache
diff --git a/Tools/qmake/configure.pri b/Tools/qmake/configure.pri
deleted file mode 100644
index 5057f5740..000000000
--- a/Tools/qmake/configure.pri
+++ /dev/null
@@ -1,28 +0,0 @@
-# -------------------------------------------------------------------
-# This file is used by build-webkit to compute the various feature
-# defines, which are then cached in .qmake.cache.
-#
-# See 'Tools/qmake/README' for an overview of the build system
-# -------------------------------------------------------------------
-
-!quick_check {
- load(configure)
- QMAKE_CONFIG_TESTS_DIR = $$PWD/config.tests
-
- CONFIG_TESTS = \
- fontconfig \
- gccdepends \
- glx \
- libpng \
- libjpeg \
- libwebp \
- libXcomposite \
- libXrender \
- libxml2 \
- libxslt \
- libzlib
-
- for(test, CONFIG_TESTS): qtCompileTest($$test)
-}
-
-load(features)
diff --git a/Tools/qmake/configure.pro b/Tools/qmake/configure.pro
deleted file mode 100644
index bb200d355..000000000
--- a/Tools/qmake/configure.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-# -------------------------------------------------------------------
-# This file is used by build-webkit to compute the various feature
-# defines, which are then cached in .qmake.cache.
-#
-# See 'Tools/qmake/README' for an overview of the build system
-# -------------------------------------------------------------------
-
-# Will compute features based on command line arguments, config tests,
-# dependency availability, and defaults.
-include(configure.pri)
-
-# Compute delta
-CONFIG -= $$BASE_CONFIG
-DEFINES -= $$BASE_DEFINES
-
-message(CONFIG: $$CONFIG)
-message(DEFINES: $$DEFINES)
-error("Done computing defaults")
diff --git a/Tools/qmake/dump-features.pl b/Tools/qmake/dump-features.pl
new file mode 100644
index 000000000..f026430f0
--- /dev/null
+++ b/Tools/qmake/dump-features.pl
@@ -0,0 +1,27 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+use FeatureList;
+
+foreach my $feature (getFeatureOptionList())
+{
+ next if $feature->{'option'} eq 'system-malloc';
+
+ my $desc = $feature->{'desc'};
+ $desc =~ s/^Toggle\s//;
+ $desc =~ s/\ssupport$//;
+ $desc = ucfirst($desc);
+
+ $desc .= ' ' . '.' x (30 - length($desc));
+ $desc =~ s/\s/_/g;
+
+ my $define = $feature->{'define'};
+ $define =~ s/^ENABLE_//;
+ $define = lc($define);
+
+ $desc .= "=$define";
+
+ print "$desc "
+}
diff --git a/Tools/qmake/mkspecs/features/configure.prf b/Tools/qmake/mkspecs/features/configure.prf
new file mode 100644
index 000000000..849eeefe5
--- /dev/null
+++ b/Tools/qmake/mkspecs/features/configure.prf
@@ -0,0 +1,239 @@
+# -------------------------------------------------------------------
+# This file does basic 'configure' style checks to determine the
+# set of enable/use/have defines and their values.
+#
+# See 'Tools/qmake/README' for an overview of the build system
+# -------------------------------------------------------------------
+
+# This file is read after .qmake.cache, but before command line options,
+# which means we might have a config from a previous build.
+
+load(features)
+load(configure)
+
+defineTest(runConfigure) {
+ !webkit_configured:!print_defaults {
+ log($${EOL}Running configure tests...$${EOL}$${EOL})
+ QMAKE_CONFIG_TESTS_DIR = $$ROOT_WEBKIT_DIR/Tools/qmake/config.tests
+ CONFIG_TESTS = $$files($$QMAKE_CONFIG_TESTS_DIR/*.pro, true)
+ for(test, CONFIG_TESTS) {
+ test = $$basename(test)
+ test ~= s/\\.pro$//
+ qtCompileTest($$test)
+ }
+ } else {
+ CONFIG += skipped_config_tests
+
+ # Save and reset configuration from .qmake.cache, so that we can
+ # detect changes to the configuration and abort the build.
+ PREVIOUS_WEBKIT_CONFIG = $$WEBKIT_CONFIG
+ unset(WEBKIT_CONFIG)
+ export(PREVIOUS_WEBKIT_CONFIG)
+ }
+
+ # Running feature detection inside a function ensures that we only
+ # export WEBKIT_CONFIG, and don not mess up any other variables.
+ detectFeatures()
+
+ # Set up a base list of optional things to build, which we later on
+ # sanitize based on constraints of the platform.
+
+ WEBKIT_CONFIG += \
+ build_webkit1 \
+ build_webkit2 \
+ build_drt \
+ build_wtr \
+ build_tests
+
+ # Sanatize WebKit1/WebKit2, as WebKit.pro uses these two options
+ # to determine which pro-files to include. The remaining sanitazion
+ # is done when finalizing configure.
+
+ !haveQtModule(widgets) {
+ CONFIGURE_WARNINGS += "Missing QtWidgets module, disabling WebKit1"
+ WEBKIT_CONFIG -= build_webkit1
+ }
+
+ # WebKit2 not supported on Windows yet
+ win32*: WEBKIT_CONFIG -= build_webkit2
+
+ export(CONFIG)
+ export(WEBKIT_CONFIG)
+ export(CONFIGURE_WARNINGS)
+}
+
+defineReplace(configEnabled) {
+ trueValue = $$2
+ isEmpty(trueValue): trueValue = yes
+
+ falseValue = $$3
+ isEmpty(falseValue): falseValue = no
+
+ $$1: return($$trueValue)
+ return($$falseValue)
+}
+
+# This is called from default_post, at which point we've also parsed
+# command line options
+defineTest(finalizeConfigure) {
+
+ # Sanitize clashing options
+ santizeFeatures()
+
+ # Sanitize build options
+ !haveQtModule(testlib) {
+ CONFIGURE_WARNINGS += "Missing QtTest module, disabling DumpRenderTree, WebKitTestRunner and tests"
+ WEBKIT_CONFIG -= build_drt build_wtr build_tests
+ }
+
+ production_build {
+ WEBKIT_CONFIG -= build_drt build_wtr build_tests
+ }
+
+ print_defaults {
+ log(DEFINES: $$configDefines()$${EOL})
+ error(Done computing defaults)
+ }
+
+ # Detect changes to the configuration. Changes need a clean build.
+ webkit_configured {
+ added_features = $$WEBKIT_CONFIG
+ added_features -= $$PREVIOUS_WEBKIT_CONFIG
+
+ removed_features = $$PREVIOUS_WEBKIT_CONFIG
+ removed_features -= $$WEBKIT_CONFIG
+
+ !isEmpty(added_features)|!isEmpty(removed_features) {
+ CONFIG += configuration_changed
+ }
+ }
+
+ reconfigureMsg = \
+ "Reconfiguration likely requires a clean build. You$${QUOTE}ve been warned!" \
+ "You may execute $${QUOTE}make wipeclean$${QUOTE} to wipe the build directory."
+
+ # Add target for reconfiguring the build
+ reconfigure.target = reconfigure
+ double_quote = $$escape_expand(\")
+ reconfigure.commands = echo > .qmake.cache && $(MAKE) -f $(MAKEFILE) qmake $$EOC
+ reconfigure.commands += @echo $${double_quote}WARNING: $$join(reconfigureMsg,\\n,,)\\n$${double_quote}
+ QMAKE_EXTRA_TARGETS += reconfigure
+ export(reconfigure.target)
+ export(reconfigure.commands)
+ export(QMAKE_EXTRA_TARGETS)
+
+ # Add target for wiping clean the build
+ wipeclean.target = wipeclean
+ win_cmd_shell: wipeclean.commands = FOR /D %%p IN (.) DO rmdir "%%p" /s /q
+ else: wipeclean.commands = $(COPY_FILE) $(MAKEFILE) .$(MAKEFILE) && rm -Rf * && $(MOVE) .$(MAKEFILE) $(MAKEFILE)
+ QMAKE_EXTRA_TARGETS += wipeclean
+ export(wipeclean.target)
+ export(wipeclean.commands)
+ export(QMAKE_EXTRA_TARGETS)
+
+ # Print a prettified dump of the configuration, for easier debugging
+ !webkit_configured|configuration_changed|buildbot {
+
+ skipped_config_tests {
+ log($${EOL}Skipping configure tests. Execute $${QUOTE}make reconfigure$${QUOTE} to re-run.$${EOL})
+ }
+
+ leftoverConfig = $$WEBKIT_CONFIG
+
+ for(config, WEBKIT_CONFIG) {
+ match = $$find(config, "^build_")
+ !isEmpty(match) {
+ build += $$replace(match, ^build_,)
+ leftoverConfig -= $$config
+ next()
+ }
+ match = $$find(config, "^have_")
+ !isEmpty(match) {
+ have += $$replace(match, ^have_,)
+ leftoverConfig -= $$config
+ next()
+ }
+ match = $$find(config, "^use_")
+ !isEmpty(match) {
+ use += $$replace(match, ^use_,)
+ leftoverConfig -= $$config
+ }
+ }
+
+ scripts_dir = $$toSystemPath($$ROOT_WEBKIT_DIR/Tools/Scripts)
+ features = $$system(perl -I $${scripts_dir} -I $${scripts_dir}$${QMAKE_DIR_SEP}webkitperl $$toSystemPath($$ROOT_WEBKIT_DIR/Tools/qmake/dump-features.pl))
+ for(feature, features) {
+ parts = $$split(feature, =)
+ desc = $$member(parts, 0, 0)
+ desc ~= s/_/ /
+ value = $$member(parts, 1, 1)
+
+ contains(WEBKIT_CONFIG, $$value) {
+ leftoverConfig -= $$value
+ value = yes
+ } else {
+ value = no
+ }
+
+ featureConfiguration += "$$desc $$value$${EOL}"
+ }
+
+ log($${EOL}Final configuration:$${EOL}$${EOL})
+
+ debug: buildConfig += debug
+ release: buildConfig += release
+ buildConfig = $$join(buildConfig,/,,)
+ debug:release:debug_and_release:buildConfig += (combined)
+
+ log(Build ......................... $$build$${EOL})
+ log(Configuration ................. $$buildConfig$${EOL})
+ log(All-in-one files .............. $$configEnabled(use_all_in_one_files)$$EOL)
+ log(GNUmake ....................... $$configEnabled(GNUmake)$$EOL)
+ log(Static libs as shared ......... $$configEnabled(force_static_libs_as_shared)$$EOL)
+ log(Production build .............. $$configEnabled(production_build)$$EOL)
+ log($$EOL)
+
+ log(Have .......................... $$have$${EOL})
+ log(Use ........................... $$use$${EOL})
+ log(Features ...................... $${leftoverConfig}$${EOL})
+ log($$EOL)
+
+ for(feature, featureConfiguration) {
+ log($$feature)
+ }
+
+ !isEmpty(CONFIGURE_WARNINGS) {
+ log("$${EOL}Encountered $$size(CONFIGURE_WARNINGS) configuration warning(s):$${EOL}$${EOL}")
+ for(warn, CONFIGURE_WARNINGS) {
+ log(" ! $$warn$${EOL}")
+ }
+ }
+
+ log("$${EOL}WebKit is now configured for building. Just run 'make'.$${EOL}$${EOL}")
+
+ configuration_changed {
+ log(WARNING: The configuration was changed since the last build:$${EOL}$${EOL})
+
+ !isEmpty(added_features): log($${TAB}Added feature(s): $${added_features}$${EOL})
+ !isEmpty(removed_features): log($${TAB}Removed feature(s): $${removed_features}$${EOL})
+
+ log($$join(reconfigureMsg,$${EOL},$${EOL},$${EOL}$${EOL}))
+ }
+ }
+
+ # Cache the result for all the other project files, and for
+ # the next build, so we can detect changes to the config.
+ !webkit_configured|configuration_changed {
+ !configuration_changed: cache(CONFIG, add, $$list(webkit_configured))
+
+ msg = "$${EOL}$${LITERAL_HASH} Configuration changed $$_DATE_"
+ write_file($$_QMAKE_CACHE_, msg, append)
+
+ !configuration_changed {
+ cache(WEBKIT_CONFIG, set, WEBKIT_CONFIG)
+ } else {
+ !isEmpty(added_features): cache(WEBKIT_CONFIG, add, added_features)
+ !isEmpty(removed_features): cache(WEBKIT_CONFIG, sub, removed_features)
+ }
+ }
+}
diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf
index 5f513fa08..f3e604c8e 100644
--- a/Tools/qmake/mkspecs/features/default_post.prf
+++ b/Tools/qmake/mkspecs/features/default_post.prf
@@ -10,6 +10,8 @@
# or include() and a CONFIG += feature.
CONFIG += config_step
+root_project_file: finalizeConfigure()
+
# Help keep the build tree clean
MOC_DIR = moc
RCC_DIR = rcc
@@ -21,6 +23,8 @@ DEFINES += \
CONFIG(release, debug|release): DEFINES *= NDEBUG
+DEFINES += $$configDefines()
+
CONFIG += depend_includepath
DEPENDPATH += $$OUT_PWD
@@ -152,7 +156,7 @@ contains(QT, webkit) {
force_static_libs_as_shared {
WEBKIT += wtf webcore
!v8: WEBKIT += javascriptcore
- !no_webkit2: WEBKIT += webkit2
+ build?(webkit2): WEBKIT += webkit2
}
}
diff --git a/Tools/qmake/mkspecs/features/default_pre.prf b/Tools/qmake/mkspecs/features/default_pre.prf
index 7cdeb1259..8f696bad4 100644
--- a/Tools/qmake/mkspecs/features/default_pre.prf
+++ b/Tools/qmake/mkspecs/features/default_pre.prf
@@ -5,6 +5,10 @@
# See 'Tools/qmake/README' for an overview of the build system
# -------------------------------------------------------------------
+# Allow environment tweaks to pre-loaded .qmake.cache content
+env_cache = $$(QMAKE_CACHE_EVAL)
+eval($$env_cache)
+
load(functions)
# Derived sources often need QMAKE_MOC
@@ -19,7 +23,7 @@ isEmpty(pro_file): CONFIG += recursive_include
# Resolve root directories for source and build
ROOT_WEBKIT_DIR = $$replace(PWD, /Tools/qmake/mkspecs/features$,)
WEBKIT_SUBDIR = $$replace(_PRO_FILE_PWD_, $${ROOT_WEBKIT_DIR},)
-ROOT_BUILD_DIR = $$toSystemPath($$replace(OUT_PWD, $${WEBKIT_SUBDIR}$,))
+ROOT_BUILD_DIR = $$replace(OUT_PWD, $${WEBKIT_SUBDIR}$,)
# We want the QtWebKit API forwarding includes to live in the root build dir.
MODULE_BASE_DIR = $$ROOT_WEBKIT_DIR
@@ -31,22 +35,16 @@ MODULE_QMAKE_OUTDIR = $$ROOT_BUILD_DIR/Tools/qmake
# Now we're ready to load default_pre from Qt
load(default_pre)
-unix:config_gccdepends {
- # We have a compiler that supports the -MD option (and neither
- # teambuilder nor icecream is messing up the .d file output).
- CONFIG += GNUmake gcc_MD_depends
-}
-
equals(OUT_PWD, $${ROOT_BUILD_DIR}) {
!recursive_include:CONFIG += root_project_file
BUILD_ROOT_RELATIVE_TO_OUT_PWD = .
} else {
- subdir_parts = $$replace(OUT_PWD, ^$${ROOT_BUILD_DIR}$${QMAKE_DIR_SEP},)
- subdir_parts = $$split(subdir_parts, $${QMAKE_DIR_SEP})
+ subdir_parts = $$replace(OUT_PWD, ^$${ROOT_BUILD_DIR}/,)
+ subdir_parts = $$split(subdir_parts, /)
for(subdir, subdir_parts) {
BUILD_ROOT_RELATIVE_TO_OUT_PWD += ..
}
- BUILD_ROOT_RELATIVE_TO_OUT_PWD = $$join(BUILD_ROOT_RELATIVE_TO_OUT_PWD, $${QMAKE_DIR_SEP})
+ BUILD_ROOT_RELATIVE_TO_OUT_PWD = $$join(BUILD_ROOT_RELATIVE_TO_OUT_PWD, /)
}
# Try to detect if we're running under Windows cmd.exe or not
@@ -68,6 +66,9 @@ win_cmd_shell {
QUOTE = "\'"
DOUBLE_ESCAPED_QUOTE = "\\\'"
}
+EOL = $$escape_expand(\\n)
+EOC = $$escape_expand(\\n\\t)
+TAB = $$escape_expand(\\t)
MAKEFILE_NOOP_COMMAND = @echo -n
win32-msvc*: MAKEFILE_NOOP_COMMAND = @echo >NUL
@@ -76,13 +77,20 @@ win32-msvc*: MAKEFILE_NOOP_COMMAND = @echo >NUL
scratchbox: PYTHON = python2.6
else: PYTHON = python
-!haveQt(5):!recursive_include: error("Building WebKit with Qt versions older than 5.0 is not supported.")
+# Run configure before making decisions that depend on the result
+root_project_file {
+ load(configure)
+ runConfigure()
+}
-!haveQtModule(widgets) {
- root_project_file: message("WebKit1 requires the QtWidgets module. Disabling WebKit1.")
- CONFIG += no_webkit1
+unix:config_gccdepends {
+ # We have a compiler that supports the -MD option (and neither
+ # teambuilder nor icecream is messing up the .d file output).
+ CONFIG += GNUmake gcc_MD_depends
}
+!haveQt(5):!recursive_include: error("Building WebKit with Qt versions older than 5.0 is not supported.")
+
# We use private_tests to detect developer build, since the destdir will
# always be our webkit build dir. This might change as configure changes.
contains(QT_CONFIG, private_tests): CONFIG += qt_developer_build
@@ -90,26 +98,13 @@ contains(QT_CONFIG, private_tests): CONFIG += qt_developer_build
# Set some defaults for specific platforms
CONFIG += include_webinspector
+# By default we enable "production build", and build-webkit, which is
+# used by bots and developers, will disable it, to enable warnings etc.
+CONFIG += production_build
+
# Try to locate sqlite3 source (for WebCore)
SQLITE3SRCDIR = $$(SQLITE3SRCDIR)
isEmpty(SQLITE3SRCDIR) {
SQLITE3SRCDIR = $$QT.core.sources/../3rdparty/sqlite/
}
-# --------- Make features available to JSC ------------
-
-## Forward enabled feature macros to JavaScript enabled features macros
-FEATURE_DEFINES_JAVASCRIPT = LANGUAGE_JAVASCRIPT=1
-v8: FEATURE_DEFINES_JAVASCRIPT += V8_BINDING=1
-
-for(define, DEFINES) {
- enabled_feature_define = $$find(define, ^ENABLE_.+=1$)
- isEmpty(enabled_feature_define): next()
-
- FEATURE_DEFINES_JAVASCRIPT += $$enabled_feature_define
-}
-
-# Save the base config and defines so we can compute the delta between
-# what features.prf introduced and what was already there.
-BASE_CONFIG = $$CONFIG
-BASE_DEFINES = $$DEFINES
diff --git a/Tools/qmake/mkspecs/features/features.prf b/Tools/qmake/mkspecs/features/features.prf
index f267014dc..9c9fde123 100644
--- a/Tools/qmake/mkspecs/features/features.prf
+++ b/Tools/qmake/mkspecs/features/features.prf
@@ -1,250 +1,153 @@
# -------------------------------------------------------------------
# This file does basic 'configure' style checks to determine the
-# set of ENABLE_FOO defines and their values.
+# set of enable/use/have defines and their values.
#
# See 'Tools/qmake/README' for an overview of the build system
# -------------------------------------------------------------------
-# Since features.prf is currently loaded from .pro/.pri files, not
-# defaults_pre.prf, we have at this point parsed any optional command
-# line arguments to qmake (eg qmake DEFINES+=ENABLE_VIDEO=0), that are
-# intended to override default values (static or dynamic) of the
-# feature defines.
-#
-# This is why the checks below look for !contains(DEFINES, ENABLE_FOO=.)
-# so that the static or dynamic defaults will only be set if the user did
-# not make an explicit choice by passing an argument to qmake/build-webkit.
+defineTest(detectFeatures) {
-# ------------- Prepare for feature detection -------------
+ # -------------- Fill in static defaults --------------
-## load mobilityconfig if mobility is available
-load(mobilityconfig, true)
+ include(features.pri)
-# ---------- Dynamically detect optional features -------------
-#
-# Please note, static feature defaults go in features.pri
-#
-# Do not add new CONFIG options, but use the existing patterns
-# of WTF_USE, ENABLE_, etc, and detect the precense of those
-# defines in the relevant target files. You do not need to have
-# a fallback in your logic for the disabling feature, that's handled
-# by having the feature disabled in features.pri. Nor do you have to
-# unset the opposite value, that's handled automatically for you.
-
-DEFINES += WTF_USE_ICU_UNICODE=1
-DEFINES -= WTF_USE_QT4_UNICODE=1
-
-# We need fontconfig to set up the test fonts for DumpRenderTree and WebKitTestRunner.
-config_fontconfig:!mac {
- DEFINES += HAVE_FONTCONFIG=1
-}
+ for(feature, FEATURE_DEFAULTS) {
+ enabledFeature = $$find(feature, =1$)
+ !isEmpty(enabledFeature) {
+ line ~= s/^.+include \"(.*)\"/\\1/
+ enabledFeature ~= s/=1$//
+ enabledFeature ~= s/^ENABLE_//
+ WEBKIT_CONFIG += $$lower($$enabledFeature)
+ }
+ }
-!contains(DEFINES, HAVE_QTQUICK=.) {
- haveQtModule(quick): DEFINES += HAVE_QTQUICK=1
-}
+ WEBKIT_CONFIG += use_tiled_backing_store
-!contains(DEFINES, HAVE_QTPRINTSUPPORT=.) {
- haveQtModule(printsupport): DEFINES += HAVE_QTPRINTSUPPORT=1
-}
+ # ------------- Prepare for feature detection -------------
-!contains(DEFINES, HAVE_QTTESTLIB=.) {
- haveQtModule(testlib) {
- DEFINES += HAVE_QTTESTLIB=1
- } else {
- message("Missing QtTest module, disabling DumpRenderTree, WebKitTestRunner and tests")
- }
-}
+ # Load mobilityconfig if mobility is available
+ load(mobilityconfig, true)
-# We need libxml2 config test to determine to use libxml2 or not
-!contains(DEFINES, WTF_USE_LIBXML2=.) {
- config_libxml2: DEFINES += WTF_USE_LIBXML2=1
-}
+ # ---------- Dynamically detect optional features -------------
+ #
+ # Please note: static feature defaults go in features.pri
+ #
-# We need libxslt config test to determine to use libxslt or not
-!contains(DEFINES, ENABLE_XSLT=.) {
- config_libxslt: DEFINES += ENABLE_XSLT=1
-}
+ haveQtModule(quick): WEBKIT_CONFIG += have_qtquick
+ haveQtModule(printsupport): WEBKIT_CONFIG += have_qtprintsupport
+ haveQtModule(widgets): WEBKIT_CONFIG += have_qstyle
+ haveQtModule(testlib): WEBKIT_CONFIG += have_qttestlib
-# We need libzlib config test to determine to use enable websocket extension or not
-!contains(DEFINES, WTF_USE_ZLIB=.) {
- config_libzlib: DEFINES += WTF_USE_ZLIB=1
-}
+ config_libxml2: WEBKIT_CONFIG += use_libxml2
+ config_libxslt: WEBKIT_CONFIG += xslt
+ config_libzlib: WEBKIT_CONFIG += use_zlib
+ config_libwebp: WEBKIT_CONFIG += use_webp
-# Tiled Backing Store support
-!contains(DEFINES, WTF_USE_TILED_BACKING_STORE=.): DEFINES += WTF_USE_TILED_BACKING_STORE=1
+ config_libjpeg: WEBKIT_CONFIG += use_libjpeg
+ else: CONFIGURE_WARNINGS += "JPEG library not found, QImageDecoder will decode JPEG images"
-# Turn on legacy viewport adaption
-!contains(DEFINES, ENABLE_LEGACY_VIEWPORT_ADAPTION=.): DEFINES += ENABLE_LEGACY_VIEWPORT_ADAPTION=1
+ config_libpng: WEBKIT_CONFIG += use_libpng
+ else: CONFIGURE_WARNINGS += "PNG library not found, QImageDecoder will decode PNG images"
-# Nescape plugins support (NPAPI)
-!contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=.) {
- xlibAvailable() {
- DEFINES += ENABLE_NETSCAPE_PLUGIN_API=1
- CONFIG += plugin_backend_xlib
- } else: unix|win32-*:!embedded:!wince* {
- DEFINES += ENABLE_NETSCAPE_PLUGIN_API=1
- }
-}
+ linux-* {
+ config_libXcomposite: WEBKIT_CONFIG += have_xcomposite
+ config_libXrender: WEBKIT_CONFIG += have_xrender
-# Netscape plugins support for WebKit2
-!contains(DEFINES, PLUGIN_ARCHITECTURE_UNSUPPORTED=.) {
- no_webkit2 {
- DEFINES += PLUGIN_ARCHITECTURE_UNSUPPORTED=1
- } else {
- contains(QT_CONFIG, xcb-xlib) {
- CONFIG += plugin_backend_xlib
- DEFINES += PLUGIN_ARCHITECTURE_X11=1 \
- PLUGIN_ARCHITECTURE_UNSUPPORTED=0 \
- ENABLE_PLUGIN_PROCESS=1
- } else {
- DEFINES += PLUGIN_ARCHITECTURE_UNSUPPORTED=1
- }
+ config_glx:!contains(QT_CONFIG, opengles2): WEBKIT_CONFIG += have_glx
+
+ # We need fontconfig to set up the test fonts for DumpRenderTree and WebKitTestRunner.
+ config_fontconfig: WEBKIT_CONFIG += have_fontconfig
}
-}
-# QStyle detection
-haveQtModule(widgets): DEFINES += HAVE_QSTYLE=1
+ # Nescape plugins support (NPAPI)
+ xlibAvailable() {
+ WEBKIT_CONFIG += \
+ netscape_plugin_api \
+ use_plugin_backend_xlib
-# Enable the USE(3D_GRAPHICS) flag when QtOpenGL is enabled.
-!contains(DEFINES, WTF_USE_3D_GRAPHICS=.):contains(QT_CONFIG, opengl) {
- # Disable USE(3D_GRAPHICS) on Windows temporarily, see https://bugs.webkit.org/show_bug.cgi?id=90850 for details.
- # Also disable on QNX, see https://bugs.webkit.org/show_bug.cgi?id=93278
- !win32-*:!qnx {
- DEFINES += WTF_USE_3D_GRAPHICS=1
- }
-}
+ # WebKit2
+ WEBKIT_CONFIG += \
+ plugin_architecture_x11 \
+ plugin_process
-# WebGL support - only enabled if we can use 3D graphics
-!contains(DEFINES, ENABLE_WEBGL=.):contains(DEFINES, WTF_USE_3D_GRAPHICS=1) {
- DEFINES += ENABLE_WEBGL=1
-}
+ } else: unix|win32-*:!embedded:!wince* {
+ WEBKIT_CONFIG += netscape_plugin_api
+ # WebKit2
+ WEBKIT_CONFIG += plugin_architecture_unsupported
+ } else {
+ WEBKIT_CONFIG += plugin_architecture_unsupported
+ }
-# CSS Shaders support
-!contains(DEFINES, ENABLE_CSS_SHADERS=.) {
- # Enable CSS shaders when CSS filters and WebGL are enabled.
- contains(DEFINES, ENABLE_CSS_FILTERS=1):contains(DEFINES, ENABLE_WEBGL=1): DEFINES += ENABLE_CSS_SHADERS=1
-}
+ # Enable the USE(3D_GRAPHICS) flag when QtOpenGL is enabled.
+ contains(QT_CONFIG, opengl) {
+ # Disable USE(3D_GRAPHICS) on Windows temporarily, see https://bugs.webkit.org/show_bug.cgi?id=90850 for details.
+ # Also disable on QNX, see https://bugs.webkit.org/show_bug.cgi?id=93278
+ !win32-*:!qnx {
+ WEBKIT_CONFIG += use_3d_graphics
+ }
+ }
-!contains(DEFINES, ENABLE_XSLT=.) {
- # Using QtXmlPatterns
- contains(QT_CONFIG, xmlpatterns): DEFINES += ENABLE_XSLT=1
+ # WebGL support - only enabled if we can use 3D graphics
+ use?(3d_graphics): WEBKIT_CONFIG += webgl
- # Or libxml2 -- experimental and only works on Linux so far
- contains(DEFINES, WTF_USE_LIBXML2=1): DEFINES += ENABLE_XSLT=1
-}
+ # Enable CSS shaders when CSS filters and WebGL are enabled
+ enable?(css_filters):enable?(webgl): WEBKIT_CONFIG += css_shaders
-# Geolocation support if QtMobility exists
-!contains(DEFINES, ENABLE_GEOLOCATION=.) {
+ # Geolocation support if QtMobility exists
contains(MOBILITY_CONFIG, location)|contains(QT_CONFIG, location) {
- DEFINES += ENABLE_GEOLOCATION=1
+ WEBKIT_CONFIG += geolocation
}
-}
-# orientation support
-haveQtModule(sensors) {
- !contains(DEFINES, ENABLE_ORIENTATION_EVENTS=.): DEFINES += ENABLE_ORIENTATION_EVENTS=1
- !contains(DEFINES, ENABLE_DEVICE_ORIENTATION=.): DEFINES += ENABLE_DEVICE_ORIENTATION=1
-}
+ # Orientation support
+ haveQtModule(sensors): WEBKIT_CONFIG += orientation_events device_orientation
-# HTML5 Media Support
-!contains(DEFINES, ENABLE_VIDEO=.) {
- mac:!contains(DEFINES, USE_QTMULTIMEDIA=1) {
+ # HTML5 Media Support
+ mac {
DARWIN_VERSION = $$split(QMAKE_HOST.version, ".")
DARWIN_MAJOR_VERSION = $$first(DARWIN_VERSION)
# QTKIT support requires 10.7 or newer
greaterThan(DARWIN_MAJOR_VERSION, 10) {
- DEFINES += ENABLE_VIDEO=1
- DEFINES += WTF_USE_QTKIT=1
+ WEBKIT_CONFIG += video use_qtkit
}
- } else: linux-*:!contains(DEFINES, USE_QTMULTIMEDIA=1) {
+
+ } else: linux-* {
!contains(QT_CONFIG, no-pkg-config):system(pkg-config --exists glib-2.0 gio-2.0 \'gstreamer-0.10 >= 0.10.30\' \'gstreamer-plugins-base-0.10 >= 0.10.30\'): {
- DEFINES += ENABLE_VIDEO=1
- DEFINES += WTF_USE_GSTREAMER=1
+ WEBKIT_CONFIG += video use_gstreamer
} else {
- root_project_file: message("Missing GLib/Gio/GStreamer, disabling media element support")
+ CONFIGURE_WARNINGS += "Missing GLib/Gio/GStreamer, disabling media element support"
}
} else: contains(MOBILITY_CONFIG, multimedia) {
- DEFINES += ENABLE_VIDEO=1
- DEFINES += WTF_USE_QT_MULTIMEDIA=1
+ WEBKIT_CONFIG += video use_qt_multimedia
}
-}
-!contains(DEFINES, ENABLE_FULLSCREEN_API=.) {
- !no_webkit2: DEFINES += ENABLE_FULLSCREEN_API=1
-}
+ # Gamepad API Support
+ packagesExist(libudev): WEBKIT_CONFIG += gamepad
-# Gamepad API Support
-linux-*:!contains(DEFINES, ENABLE_GAMEPAD=.) {
- packagesExist(libudev): DEFINES += ENABLE_GAMEPAD=1
-}
-
-# Xcomposite Support
-linux-*:config_libXcomposite: DEFINES += HAVE_XCOMPOSITE=1
+ # Support for Graphics Surface
+ mac: WEBKIT_CONFIG += use_graphics_surface
+ linux-*:contains(WEBKIT_CONFIG, have_glx):contains(WEBKIT_CONFIG, have_xcomposite):contains(WEBKIT_CONFIG, have_xrender): WEBKIT_CONFIG += use_graphics_surface
-# Xrender Support
-haveQt(5):linux-*:config_libXrender: DEFINES += HAVE_XRENDER=1
+ # Slider Touch is sensible to use when compiling WebKit2
+ enable?(touch_events): WEBKIT_CONFIG += touch_slider
-# GLX Support
-haveQt(5):linux-*:config_glx:!contains(QT_CONFIG, opengles2): DEFINES += HAVE_GLX=1
+ # ---------------- Sanitize features -------------------
-# Support for Graphics Surface
-!contains(DEFINES, WTF_USE_GRAPHICS_SURFACE=.) {
- mac: DEFINES += WTF_USE_GRAPHICS_SURFACE=1
- # On linux we require GLX, libXcomposite and libXrender to enable graphics surface.
- linux-*:contains(DEFINES, HAVE_GLX=1):contains(DEFINES, HAVE_XCOMPOSITE=1):contains(DEFINES, HAVE_XRENDER=1): DEFINES += WTF_USE_GRAPHICS_SURFACE=1
+ export(WEBKIT_CONFIG)
+ export(CONFIGURE_WARNINGS)
}
-# -------------- Fill in static defaults --------------
-#
-# Only applies to features that don't have a dynamic default
-# or have been overriden on the command line.
+defineTest(santizeFeatures) {
+ # Disable SVG fonts if SVG is disabled
+ !enable?(svg): WEBKIT_CONFIG -= svg_fonts
-include(features.pri)
+ # JavaScript debugger requires the inspector
+ !enable?(inspector): WEBKIT_CONFIG -= javascript_debugger inspector_server
-for(feature, FEATURE_DEFAULTS) {
- anyFeatureDefine = $$replace(feature, =.$, =.)
- !contains(DEFINES, $$anyFeatureDefine) {
- DEFINES += $$feature
- }
-}
-
-# ---------------- Sanitize defines -------------------
-
-# Disable SVG fonts if SVG is disabled
-contains(DEFINES, ENABLE_SVG=0): DEFINES += ENABLE_SVG_FONTS=0
-
-# JavaScript debugger requires the inspector
-contains(DEFINES, ENABLE_INSPECTOR=0) {
- DEFINES += ENABLE_JAVASCRIPT_DEBUGGER=0
- DEFINES += ENABLE_INSPECTOR_SERVER=0
-}
-
-# Disable animated smooth scrolling if request-animation-frame is disabled
-contains(DEFINES, ENABLE_REQUEST_ANIMATION_FRAME=0): DEFINES += ENABLE_SMOOTH_SCROLLING=0
+ # Disable animated smooth scrolling if request-animation-frame is disabled
+ !enable?(request_animation_frame): WEBKIT_CONFIG -= smooth_scrolling
-# Remove conflicting defines. The preprocessor would take care of this
-# anyways, but doing it here makes for nicer command lines when building.
-for(define, DEFINES) {
- parts = $$split(define, =)
- value = $$member(parts, 1, 1)
- isEmpty(value): next()
-
- equals(value, 1): opposite = $$replace(define, =1$, =0)
- equals(value, 0): opposite = $$replace(define, =0$, =1)
-
- # Is there a later define that overrides this one?
- contains(DEFINES, $$opposite): DEFINES -= $$define
-}
-
-contains(DEFINES, ENABLE_GAMEPAD=1) {
- !packagesExist(libudev) {
- error("Gamepad API requires libudev to build. Please install libudev development files, or build WebKit without gamepad.")
- } else:!linux-* {
- error("Currently the Gamepad API is supported only on Linux, build WebKit without gamepad.")
- }
-}
+ # Fullscreen API relies on WebKit2
+ !build?(webkit2): WEBKIT_CONFIG -= fullscreen_api
-# Slider Touch is sensible to use when compiling WebKit2
-haveQt(5):contains(DEFINES, ENABLE_TOUCH_EVENTS=1) {
- DEFINES += ENABLE_TOUCH_SLIDER=1
+ export(WEBKIT_CONFIG)
}
diff --git a/Tools/qmake/mkspecs/features/features.pri b/Tools/qmake/mkspecs/features/features.pri
index 1748ee177..9526bf6c1 100644
--- a/Tools/qmake/mkspecs/features/features.pri
+++ b/Tools/qmake/mkspecs/features/features.pri
@@ -45,7 +45,7 @@ FEATURE_DEFAULTS = \
ENABLE_FILE_SYSTEM=0 \
ENABLE_FILTERS=1 \
ENABLE_FTPDIR=1 \
- ENABLE_FULLSCREEN_API=0 \
+ ENABLE_FULLSCREEN_API=1 \
ENABLE_GAMEPAD=0 \
ENABLE_GEOLOCATION=0 \
ENABLE_GESTURE_EVENTS=1 \
@@ -66,6 +66,7 @@ FEATURE_DEFAULTS = \
ENABLE_JAVASCRIPT_DEBUGGER=1 \
ENABLE_LEGACY_CSS_VENDOR_PREFIXES=0 \
ENABLE_LEGACY_NOTIFICATIONS=1 \
+ ENABLE_LEGACY_VIEWPORT_ADAPTION=1 \
ENABLE_LEGACY_WEBKIT_BLOB_BUILDER=1 \
ENABLE_LINK_PREFETCH=0 \
ENABLE_LINK_PRERENDER=0 \
diff --git a/Tools/qmake/mkspecs/features/functions.prf b/Tools/qmake/mkspecs/features/functions.prf
index 44996e5f8..6a16cb73d 100644
--- a/Tools/qmake/mkspecs/features/functions.prf
+++ b/Tools/qmake/mkspecs/features/functions.prf
@@ -295,3 +295,86 @@ defineTest(xlibAvailable) {
return(false)
}
}
+
+defineTest(build?) {
+ contains(WEBKIT_CONFIG, build_$$lower($$1)): return(true)
+ return(false)
+}
+
+defineTest(have?) {
+ contains(WEBKIT_CONFIG, have_$$lower($$1)): return(true)
+ return(false)
+}
+
+defineTest(use?) {
+ contains(WEBKIT_CONFIG, use_$$lower($$1)): return(true)
+ return(false)
+}
+
+defineTest(enable?) {
+ contains(WEBKIT_CONFIG, $$lower($$1)): return(true)
+ return(false)
+}
+
+# Used by configDefines below
+include(features.pri)
+
+# Turn Webkit config into defines
+defineReplace(configDefines) {
+ unset(defines)
+
+ args = $$split(1, |)
+
+ possible_args = enable have use plugin_architecture
+ !isEmpty(args) {
+ for(arg, possible_args): contains(args, $$arg): CONFIG += $$arg
+ } else {
+ CONFIG += $$possible_args
+ }
+
+ for(config, WEBKIT_CONFIG) {
+ match = $$find(config, "^build_")
+ !isEmpty(match) {
+ # We don't translate build_ to defines
+ next()
+ }
+ match = $$find(config, "^have_")
+ !isEmpty(match) {
+ have: defines += $$upper($$config)=1
+ next()
+ }
+ match = $$find(config, "^plugin_architecture_")
+ !isEmpty(match) {
+ plugin_architecture: defines += $$upper($$config)=1
+ next()
+ }
+ match = $$find(config, "^use_")
+ !isEmpty(match) {
+ use: defines += WTF_$$upper($$config)=1
+ next()
+ }
+
+ enable: defines += ENABLE_$$upper($$config)=1
+ }
+
+ # To prevent clashes with Platform.h, we have to explicitly
+ # disable features that are not enabled.
+ for(define, FEATURE_DEFAULTS) {
+ anyFeatureDefine = $$find(define, =.$)
+ isEmpty(anyFeatureDefine): next()
+
+ enabledFeature = $$replace(anyFeatureDefine, =.$, =1)
+ disabledFeature = $$replace(anyFeatureDefine, =.$, =0)
+
+ !contains(defines, $$enabledFeature) {
+ defines += $$disabledFeature
+ }
+ }
+
+ return($$defines)
+}
+
+defineReplace(javascriptFeatureDefines) {
+ defines = LANGUAGE_JAVASCRIPT=1 $$configDefines(enable)
+ return($$defines)
+}
diff --git a/Tools/qmake/mkspecs/features/gprof.prf b/Tools/qmake/mkspecs/features/gprof.prf
index 38a77555b..51b78c3b0 100644
--- a/Tools/qmake/mkspecs/features/gprof.prf
+++ b/Tools/qmake/mkspecs/features/gprof.prf
@@ -5,7 +5,7 @@
# See 'Tools/qmake/README' for an overview of the build system
# -------------------------------------------------------------------
-!contains(CONFIG,no_webkit2): error("WebKit2 is not supported with gprof")
+build?(webkit2): error("WebKit2 is not supported with gprof")
QMAKE_CXXFLAGS += -pg
QMAKE_LFLAGS += -pg
diff --git a/Tools/qmake/mkspecs/features/mac/default_pre.prf b/Tools/qmake/mkspecs/features/mac/default_pre.prf
index b7f88ed0e..581b98c89 100644
--- a/Tools/qmake/mkspecs/features/mac/default_pre.prf
+++ b/Tools/qmake/mkspecs/features/mac/default_pre.prf
@@ -9,8 +9,5 @@ CONFIG += debug_and_release
load(default_pre)
-debug {
- root_project_file:message("Building WebKit Debug on mac. Switching to use_all_in_one_files configuration.")
- CONFIG += use_all_in_one_files
-}
+debug: CONFIG += use_all_in_one_files
diff --git a/Tools/qmake/mkspecs/features/win32/default_pre.prf b/Tools/qmake/mkspecs/features/win32/default_pre.prf
index fe8799ad1..b306c3b82 100644
--- a/Tools/qmake/mkspecs/features/win32/default_pre.prf
+++ b/Tools/qmake/mkspecs/features/win32/default_pre.prf
@@ -8,5 +8,3 @@ load(default_pre)
debug: CONFIG += use_all_in_one_files
-# WebKit2 not supported on Windows yet
-CONFIG += no_webkit2
diff --git a/Tools/qmake/syncqt-4.8 b/Tools/qmake/syncqt-4.8
deleted file mode 100644
index fba323be4..000000000
--- a/Tools/qmake/syncqt-4.8
+++ /dev/null
@@ -1,1139 +0,0 @@
-#!/usr/bin/perl -w
-######################################################################
-#
-# Synchronizes Qt header files - internal development tool.
-#
-# Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-# Contact: Nokia Corporation (qt-info@nokia.com)
-#
-######################################################################
-
-# use packages -------------------------------------------------------
-use File::Basename;
-use File::Path;
-use Cwd;
-use Config;
-use strict;
-
-for (my $i = 0; $i < $#ARGV; $i++) {
- if ($ARGV[$i] eq "-base-dir" && $i < $#ARGV - 1) {
- $ENV{"QTDIR"} = $ARGV[$i + 1];
- last;
- }
-}
-
-die "syncqt: QTDIR not defined" if ! $ENV{"QTDIR"}; # sanity check
-
-# global variables
-my $isunix = 0;
-my $basedir = $ENV{"QTDIR"};
-$basedir =~ s=\\=/=g;
-my %modules = ( # path to module name map
- "QtGui" => "$basedir/src/gui",
- "QtOpenGL" => "$basedir/src/opengl",
- "QtOpenVG" => "$basedir/src/openvg",
- "QtCore" => "$basedir/src/corelib",
- "QtXml" => "$basedir/src/xml",
- "QtXmlPatterns" => "$basedir/src/xmlpatterns",
- "QtSql" => "$basedir/src/sql",
- "QtNetwork" => "$basedir/src/network",
- "QtSvg" => "$basedir/src/svg",
- "QtDeclarative" => "$basedir/src/declarative",
- "QtScript" => "$basedir/src/script",
- "QtScriptTools" => "$basedir/src/scripttools",
- "Qt3Support" => "$basedir/src/qt3support",
- "ActiveQt" => "$basedir/src/activeqt",
- "QtTest" => "$basedir/src/testlib",
- "QtHelp" => "$basedir/tools/assistant/lib",
- "QtDesigner" => "$basedir/tools/designer/src/lib",
- "QtUiTools" => "$basedir/tools/designer/src/uitools",
- "QtDBus" => "$basedir/src/dbus",
- "QtWebKit" => "$basedir/src/3rdparty/webkit/Source/WebKit/qt",
- "phonon" => "$basedir/src/phonon",
- "QtMultimedia" => "$basedir/src/multimedia",
- "QtMeeGoGraphicsSystemHelper" => "$basedir/tools/qmeegographicssystemhelper",
-);
-my %moduleheaders = ( # restrict the module headers to those found in relative path
- "QtWebKit" => "Api",
- "phonon" => "../3rdparty/phonon/phonon",
-);
-
-#$modules{"QtCore"} .= ";$basedir/mkspecs/" . $ENV{"MKSPEC"} if defined $ENV{"MKSPEC"};
-
-# global variables (modified by options)
-my $module = 0;
-my $showonly = 0;
-my $quiet = 0;
-my $remove_stale = 1;
-my $force_win = 0;
-my $force_relative = 0;
-my $check_includes = 0;
-my $copy_headers = 0;
-my $create_uic_class_map = 1;
-my $create_private_headers = 1;
-my @modules_to_sync ;
-$force_relative = 1 if ( -d "/System/Library/Frameworks" );
-my $out_basedir = $basedir;
-$out_basedir =~ s=\\=/=g;
-my $quoted_basedir = "\Q$basedir";
-
-# functions ----------------------------------------------------------
-
-######################################################################
-# Syntax: showUsage()
-# Params: -none-
-#
-# Purpose: Show the usage of the script.
-# Returns: -none-
-######################################################################
-sub showUsage
-{
- print "$0 usage:\n";
- print " -copy Copy headers instead of include-fwd(default: " . ($copy_headers ? "yes" : "no") . ")\n";
- print " -remove-stale Removes stale headers (default: " . ($remove_stale ? "yes" : "no") . ")\n";
- print " -relative Force relative symlinks (default: " . ($force_relative ? "yes" : "no") . ")\n";
- print " -windows Force platform to Windows (default: " . ($force_win ? "yes" : "no") . ")\n";
- print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n";
- print " -outdir <PATH> Specify output directory for sync (default: $out_basedir)\n";
- print " -quiet Only report problems, not activity (default: " . ($quiet ? "yes" : "no") . ")\n";
- print " -separate-module <NAME>:<PROFILEDIR>:<HEADERDIR> Create headers for <NAME> with original headers in <HEADERDIR> relative to <PROFILEDIR> \n";
- print " -help This help\n";
- exit 0;
-}
-
-######################################################################
-# Syntax: checkUnix()
-# Params: -none-
-#
-# Purpose: Check if script runs on a Unix system or not. Cygwin
-# systems are _not_ detected as Unix systems.
-# Returns: 1 if a unix system, else 0.
-######################################################################
-sub checkUnix {
- my ($r) = 0;
- if ( $force_win != 0) {
- return 0;
- } elsif ( -f "/bin/uname" ) {
- $r = 1;
- (-f "\\bin\\uname") && ($r = 0);
- } elsif ( -f "/usr/bin/uname" ) {
- $r = 1;
- (-f "\\usr\\bin\\uname") && ($r = 0);
- }
- if($r) {
- $_ = $Config{'osname'};
- $r = 0 if( /(ms)|(cyg)win/i );
- }
- return $r;
-}
-
-sub checkRelative {
- my ($dir) = @_;
- return 0 if($dir =~ /^\//);
- return 0 if(!checkUnix() && $dir =~ /[a-zA-Z]:[\/\\]/);
- return 1;
-}
-
-######################################################################
-# Syntax: shouldMasterInclude(iheader)
-# Params: iheader, string, filename to verify inclusion
-#
-# Purpose: Determines if header should be in the master include file.
-# Returns: 0 if file contains "#pragma qt_no_master_include" or not
-# able to open, else 1.
-######################################################################
-sub shouldMasterInclude {
- my ($iheader) = @_;
- return 0 if(basename($iheader) =~ /_/);
- return 0 if(basename($iheader) =~ /qconfig/);
- if(open(F, "<$iheader")) {
- while(<F>) {
- chomp;
- return 0 if(/^\#pragma qt_no_master_include$/);
- }
- close(F);
- } else {
- return 0;
- }
- return 1;
-}
-
-######################################################################
-# Syntax: classNames(iheader)
-# Params: iheader, string, filename to parse for classname "symlinks"
-#
-# Purpose: Scans through iheader to find all classnames that should be
-# synced into library's include structure.
-# Returns: List of all class names in a file.
-######################################################################
-sub classNames {
- my @ret;
- my ($iheader) = @_;
- if(basename($iheader) eq "qglobal.h") {
- push @ret, "QtGlobal";
- } elsif(basename($iheader) eq "qendian.h") {
- push @ret, "QtEndian";
- } elsif(basename($iheader) eq "qconfig.h") {
- push @ret, "QtConfig";
- } elsif(basename($iheader) eq "qplugin.h") {
- push @ret, "QtPlugin";
- } elsif(basename($iheader) eq "qalgorithms.h") {
- push @ret, "QtAlgorithms";
- } elsif(basename($iheader) eq "qcontainerfwd.h") {
- push @ret, "QtContainerFwd";
- } elsif(basename($iheader) eq "qdebug.h") {
- push @ret, "QtDebug";
- } elsif(basename($iheader) eq "qevent.h") {
- push @ret, "QtEvents";
- } elsif(basename($iheader) eq "qnamespace.h") {
- push @ret, "Qt"
- } elsif(basename($iheader) eq "qssl.h") {
- push @ret, "QSsl";
- } elsif(basename($iheader) eq "qtest.h") {
- push @ret, "QTest"
- } elsif(basename($iheader) eq "qtconcurrentmap.h") {
- push @ret, "QtConcurrentMap"
- } elsif(basename($iheader) eq "qtconcurrentfilter.h") {
- push @ret, "QtConcurrentFilter"
- } elsif(basename($iheader) eq "qtconcurrentrun.h") {
- push @ret, "QtConcurrentRun"
- } elsif(basename($iheader) eq "qaudio.h") {
- push @ret, "QAudio"
- }
-
- my $parsable = "";
- if(open(F, "<$iheader")) {
- while(<F>) {
- my $line = $_;
- chomp $line;
- chop $line if ($line =~ /\r$/);
- if($line =~ /^\#/) {
- if($line =~ /\\$/) {
- while($line = <F>) {
- chomp $line;
- last unless($line =~ /\\$/);
- }
- }
- return @ret if($line =~ m/^#pragma qt_sync_stop_processing/);
- push(@ret, $1) if($line =~ m/^#pragma qt_class\(([^)]*)\)[\r\n]*$/);
- $line = 0;
- }
- if($line) {
- $line =~ s,//.*$,,; #remove c++ comments
- $line .= ";" if($line =~ m/^Q_[A-Z_]*\(.*\)[\r\n]*$/); #qt macro
- $line .= ";" if($line =~ m/^QT_(BEGIN|END)_HEADER[\r\n]*$/); #qt macro
- $line .= ";" if($line =~ m/^QT_(BEGIN|END)_NAMESPACE[\r\n]*$/); #qt macro
- $line .= ";" if($line =~ m/^QT_MODULE\(.*\)[\r\n]*$/); # QT_MODULE macro
- $parsable .= " " . $line;
- }
- }
- close(F);
- }
-
- my $last_definition = 0;
- my @namespaces;
- for(my $i = 0; $i < length($parsable); $i++) {
- my $definition = 0;
- my $character = substr($parsable, $i, 1);
- if($character eq "/" && substr($parsable, $i+1, 1) eq "*") { #I parse like this for greedy reasons
- for($i+=2; $i < length($parsable); $i++) {
- my $end = substr($parsable, $i, 2);
- if($end eq "*/") {
- $last_definition = $i+2;
- $i++;
- last;
- }
- }
- } elsif($character eq "{") {
- my $brace_depth = 1;
- my $block_start = $i + 1;
- BLOCK: for($i+=1; $i < length($parsable); $i++) {
- my $ignore = substr($parsable, $i, 1);
- if($ignore eq "{") {
- $brace_depth++;
- } elsif($ignore eq "}") {
- $brace_depth--;
- unless($brace_depth) {
- for(my $i2 = $i+1; $i2 < length($parsable); $i2++) {
- my $end = substr($parsable, $i2, 1);
- if($end eq ";" || $end ne " ") {
- $definition = substr($parsable, $last_definition, $block_start - $last_definition) . "}";
- $i = $i2 if($end eq ";");
- $last_definition = $i + 1;
- last BLOCK;
- }
- }
- }
- }
- }
- } elsif($character eq ";") {
- $definition = substr($parsable, $last_definition, $i - $last_definition + 1);
- $last_definition = $i + 1;
- } elsif($character eq "}") {
- # a naked } must be a namespace ending
- # if it's not a namespace, it's eaten by the loop above
- pop @namespaces;
- $last_definition = $i + 1;
- }
-
- if (substr($parsable, $last_definition, $i - $last_definition + 1) =~ m/ namespace ([^ ]*) /
- && substr($parsable, $i+1, 1) eq "{") {
- push @namespaces, $1;
-
- # Eat the opening { so that the condensing loop above doesn't see it
- $i++;
- $last_definition = $i + 1;
- }
-
- if($definition) {
- $definition =~ s=[\n\r]==g;
- my @symbols;
- if($definition =~ m/^ *typedef *.*\(\*([^\)]*)\)\(.*\);$/) {
- push @symbols, $1;
- } elsif($definition =~ m/^ *typedef +(.*) +([^ ]*);$/) {
- push @symbols, $2;
- } elsif($definition =~ m/^ *(template *<.*> *)?(class|struct) +([^ ]* +)?([^<\s]+) ?(<[^>]*> ?)?\s*((,|:)\s*(public|protected|private) *.*)? *\{\}$/) {
- push @symbols, $4;
- } elsif($definition =~ m/^ *Q_DECLARE_.*ITERATOR\((.*)\);$/) {
- push @symbols, "Q" . $1 . "Iterator";
- push @symbols, "QMutable" . $1 . "Iterator";
- }
-
- foreach my $symbol (@symbols) {
- $symbol = (join("::", @namespaces) . "::" . $symbol) if (scalar @namespaces);
- push @ret, $symbol
- if ($symbol =~ /^Q[^:]*$/ # no-namespace, starting with Q
- || $symbol =~ /^Phonon::/); # or in the Phonon namespace
- }
- }
- }
- return @ret;
-}
-
-######################################################################
-# Syntax: syncHeader(header, iheader, copy, timestamp)
-# Params: header, string, filename to create "symlink" for
-# iheader, string, destination name of symlink
-# copy, forces header to be a copy of iheader
-# timestamp, the requested modification time if copying
-#
-# Purpose: Syncronizes header to iheader
-# Returns: 1 if successful, else 0.
-######################################################################
-sub syncHeader {
- my ($header, $iheader, $copy, $ts) = @_;
- $iheader =~ s=\\=/=g;
- $header =~ s=\\=/=g;
- return copyFile($iheader, $header) if($copy);
-
- unless(-e $header) {
- my $header_dir = dirname($header);
- mkpath $header_dir, !$quiet;
-
- #write it
- my $iheader_out = fixPaths($iheader, $header_dir);
- open HEADER, ">$header" || die "Could not open $header for writing!\n";
- print HEADER "#include \"$iheader_out\"\n";
- close HEADER;
- if(defined($ts)) {
- utime(time, $ts, $header) or die "$iheader, $header";
- }
- return 1;
- }
- return 0;
-}
-
-######################################################################
-# Syntax: fixPaths(file, dir)
-# Params: file, string, filepath to be made relative to dir
-# dir, string, dirpath for point of origin
-#
-# Purpose: file is made relative (if possible) of dir.
-# Returns: String with the above applied conversion.
-######################################################################
-sub fixPaths {
- my ($file, $dir) = @_;
- $dir =~ s=^$quoted_basedir/=$out_basedir/= if(!($basedir eq $out_basedir));
- $file =~ s=\\=/=g;
- $dir =~ s=\\=/=g;
-
- #setup
- my $ret = $file;
- $ret =~ s,/cygdrive/([a-zA-Z])/,$1:/,g;
- my $file_dir = dirname($file);
- if($file_dir eq ".") {
- $file_dir = getcwd();
- $file_dir =~ s=\\=/=g;
- }
- $file_dir =~ s,/cygdrive/([a-zA-Z])/,$1:/,g;
- if($dir eq ".") {
- $dir = getcwd();
- $dir =~ s=\\=/=g;
- }
- $dir =~ s,/cygdrive/([a-zA-Z])/,$1:/,g;
- return basename($file) if($file_dir eq $dir);
-
- #guts
- my $match_dir = 0;
- for(my $i = 1; $i < length($file_dir); $i++) {
- my $slash = index($file_dir, "/", $i);
- last if($slash == -1);
- my $tmp = substr($file_dir, 0, $slash);
- last unless($dir =~ m,^\Q$tmp\E/,);
- $match_dir = $tmp;
- $i = $slash;
- }
- if($match_dir) {
- my $after = substr($dir, length($match_dir));
- my $count = ($after =~ tr,/,,);
- my $dots = "";
- for(my $i = 0; $i < $count; $i++) {
- $dots .= "../";
- }
- $ret =~ s,^\Q$match_dir\E,$dots,;
- }
- $ret =~ s,/+,/,g;
- return $ret;
-}
-
-######################################################################
-# Syntax: fileContents(filename)
-# Params: filename, string, filename of file to return contents
-#
-# Purpose: Get the contents of a file.
-# Returns: String with contents of the file, or empty string if file
-# doens't exist.
-# Warning: Dies if it does exist but script cannot get read access.
-######################################################################
-sub fileContents {
- my ($filename) = @_;
- my $filecontents = "";
- if (-e $filename) {
- open(I, "< $filename") || die "Could not open $filename for reading, read block?";
- local $/;
- binmode I;
- $filecontents = <I>;
- close I;
- }
- return $filecontents;
-}
-
-######################################################################
-# Syntax: fileCompare(file1, file2)
-# Params: file1, string, filename of first file
-# file2, string, filename of second file
-#
-# Purpose: Determines if files are equal, and which one is newer.
-# Returns: 0 if files are equal no matter the timestamp, -1 if file1
-# is newer, 1 if file2 is newer.
-######################################################################
-sub fileCompare {
- my ($file1, $file2) = @_;
- my $file1contents = fileContents($file1);
- my $file2contents = fileContents($file2);
- if (! -e $file1) { return 1; }
- if (! -e $file2) { return -1; }
- return $file1contents ne $file2contents ? (stat($file2))[9] <=> (stat($file1))[9] : 0;
-}
-
-######################################################################
-# Syntax: copyFile(file, ifile)
-# Params: file, string, filename to create duplicate for
-# ifile, string, destination name of duplicate
-#
-# Purpose: Keeps files in sync so changes in the newer file will be
-# written to the other.
-# Returns: 1 if files were synced, else 0.
-# Warning: Dies if script cannot get write access.
-######################################################################
-sub copyFile
-{
- my ($file,$ifile, $copy,$knowdiff,$filecontents,$ifilecontents) = @_;
- # Bi-directional synchronization
- open( I, "< " . $file ) || die "Could not open $file for reading";
- local $/;
- binmode I;
- $filecontents = <I>;
- close I;
- if ( open(I, "< " . $ifile) ) {
- local $/;
- binmode I;
- $ifilecontents = <I>;
- close I;
- $copy = fileCompare($file, $ifile);
- $knowdiff = 0,
- } else {
- $copy = -1;
- $knowdiff = 1;
- }
-
- if ( $knowdiff || ($filecontents ne $ifilecontents) ) {
- if ( $copy > 0 ) {
- my $file_dir = dirname($file);
- mkpath $file_dir, !$quiet unless(-e $file_dir);
- open(O, "> " . $file) || die "Could not open $file for writing (no write permission?)";
- local $/;
- binmode O;
- print O $ifilecontents;
- close O;
- utime time, (stat($ifile))[9], $file;
- return 1;
- } elsif ( $copy < 0 ) {
- my $ifile_dir = dirname($ifile);
- mkpath $ifile_dir, !$quiet unless(-e $ifile_dir);
- open(O, "> " . $ifile) || die "Could not open $ifile for writing (no write permission?)";
- local $/;
- binmode O;
- print O $filecontents;
- close O;
- utime time, (stat($file))[9], $ifile;
- return 1;
- }
- }
- return 0;
-}
-
-######################################################################
-# Syntax: symlinkFile(file, ifile)
-# Params: file, string, filename to create "symlink" for
-# ifile, string, destination name of symlink
-#
-# Purpose: File is symlinked to ifile (or copied if filesystem doesn't
-# support symlink).
-# Returns: 1 on success, else 0.
-######################################################################
-sub symlinkFile
-{
- my ($file,$ifile) = @_;
-
- if ($isunix) {
- print "symlink created for $file " unless $quiet;
- if ( $force_relative && ($ifile =~ /^$quoted_basedir/)) {
- my $t = getcwd();
- my $c = -1;
- my $p = "../";
- $t =~ s-^$quoted_basedir/--;
- $p .= "../" while( ($c = index( $t, "/", $c + 1)) != -1 );
- $file =~ s-^$quoted_basedir/-$p-;
- print " ($file)\n" unless $quiet;
- }
- print "\n" unless $quiet;
- return symlink($file, $ifile);
- }
- return copyFile($file, $ifile);
-}
-
-######################################################################
-# Syntax: findFiles(dir, match, descend)
-# Params: dir, string, directory to search for name
-# match, string, regular expression to match in dir
-# descend, integer, 0 = non-recursive search
-# 1 = recurse search into subdirectories
-#
-# Purpose: Finds files matching a regular expression.
-# Returns: List of matching files.
-#
-# Examples:
-# findFiles("/usr","\.cpp$",1) - finds .cpp files in /usr and below
-# findFiles("/tmp","^#",0) - finds #* files in /tmp
-######################################################################
-sub findFiles {
- my ($dir,$match,$descend) = @_;
- my ($file,$p,@files);
- local(*D);
- $dir =~ s=\\=/=g;
- ($dir eq "") && ($dir = ".");
- if ( opendir(D,$dir) ) {
- if ( $dir eq "." ) {
- $dir = "";
- } else {
- ($dir =~ /\/$/) || ($dir .= "/");
- }
- foreach $file ( sort readdir(D) ) {
- next if ( $file =~ /^\.\.?$/ );
- $p = $file;
- ($file =~ /$match/) && (push @files, $p);
- if ( $descend && -d $p && ! -l $p ) {
- push @files, &findFiles($p,$match,$descend);
- }
- }
- closedir(D);
- }
- return @files;
-}
-
-# --------------------------------------------------------------------
-# "main" function
-# --------------------------------------------------------------------
-
-while ( @ARGV ) {
- my $var = 0;
- my $val = 0;
-
- #parse
- my $arg = shift @ARGV;
- if ($arg eq "-h" || $arg eq "-help" || $arg eq "?") {
- $var = "show_help";
- $val = "yes";
- } elsif($arg eq "-copy") {
- $var = "copy";
- $val = "yes";
- } elsif($arg eq "-o" || $arg eq "-outdir") {
- $var = "output";
- $val = shift @ARGV;
- } elsif($arg eq "-showonly" || $arg eq "-remove-stale" || $arg eq "-windows" ||
- $arg eq "-relative" || $arg eq "-check-includes") {
- $var = substr($arg, 1);
- $val = "yes";
- } elsif($arg =~ /^-no-(.*)$/) {
- $var = $1;
- $val = "no";
- #these are for commandline compat
- } elsif($arg eq "-inc") {
- $var = "output";
- $val = shift @ARGV;
- } elsif($arg eq "-module") {
- $var = "module";
- $val = shift @ARGV;
- } elsif($arg eq "-separate-module") {
- $var = "separate-module";
- $val = shift @ARGV;
- } elsif($arg eq "-show") {
- $var = "showonly";
- $val = "yes";
- } elsif($arg eq "-quiet") {
- $var = "quiet";
- $val = "yes";
- } elsif($arg eq "-base-dir") {
- # skip, it's been dealt with at the top of the file
- shift @ARGV;
- next;
- }
-
- #do something
- if(!$var || $var eq "show_help") {
- print "Unknown option: $arg\n\n" if(!$var);
- showUsage();
- } elsif ($var eq "copy") {
- if($val eq "yes") {
- $copy_headers++;
- } elsif($showonly) {
- $copy_headers--;
- }
- } elsif ($var eq "showonly") {
- if($val eq "yes") {
- $showonly++;
- } elsif($showonly) {
- $showonly--;
- }
- } elsif ($var eq "quiet") {
- if($val eq "yes") {
- $quiet++;
- } elsif($quiet) {
- $quiet--;
- }
- } elsif ($var eq "check-includes") {
- if($val eq "yes") {
- $check_includes++;
- } elsif($check_includes) {
- $check_includes--;
- }
- } elsif ($var eq "remove-stale") {
- if($val eq "yes") {
- $remove_stale++;
- } elsif($remove_stale) {
- $remove_stale--;
- }
- } elsif ($var eq "windows") {
- if($val eq "yes") {
- $force_win++;
- } elsif($force_win) {
- $force_win--;
- }
- } elsif ($var eq "relative") {
- if($val eq "yes") {
- $force_relative++;
- } elsif($force_relative) {
- $force_relative--;
- }
- } elsif ($var eq "module") {
- print "module :$val:\n" unless $quiet;
- die "No such module: $val" unless(defined $modules{$val});
- push @modules_to_sync, $val;
- } elsif ($var eq "separate-module") {
- my $dirsep = ($force_win ? ";" : ":");
- my ($module, $prodir, $headerdir) = split($dirsep, $val);
- $modules{$module} = $prodir;
- push @modules_to_sync, $module;
- $moduleheaders{$module} = $headerdir;
- $create_uic_class_map = 0;
- $create_private_headers = 0;
- } elsif ($var eq "output") {
- my $outdir = $val;
- if(checkRelative($outdir)) {
- $out_basedir = getcwd();
- chomp $out_basedir;
- $out_basedir .= "/" . $outdir;
- } else {
- $out_basedir = $outdir;
- }
- # \ -> /
- $out_basedir =~ s=\\=/=g;
- }
-}
-@modules_to_sync = keys(%modules) if($#modules_to_sync == -1);
-
-$isunix = checkUnix; #cache checkUnix
-
-# create path
-mkpath "$out_basedir/include", !$quiet;
-mkpath "$out_basedir/include/Qt", !$quiet;
-
-my @ignore_headers = ();
-my $class_lib_map_contents = "";
-my @ignore_for_master_contents = ( "qt.h", "qpaintdevicedefs.h" );
-my @ignore_for_include_check = ( "qatomic.h" );
-my @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h" );
-my @ignore_for_qt_begin_namespace_check = ( "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qatomic_arch.h", "qatomic_windowsce.h", "qt_windows.h", "qatomic_macosx.h", "qatomic_arm.h", "qatomic_armv7.h" );
-my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" );
-my %colliding_headers = ();
-my %inject_headers = ( "$basedir/src/corelib/global" => ( "qconfig.h" ) ); # all from build dir
-
-foreach my $lib (@modules_to_sync) {
- #iteration info
- my $dir = $modules{$lib};
- my $pathtoheaders = "";
- $pathtoheaders = $moduleheaders{$lib} if ($moduleheaders{$lib});
-
- #information used after the syncing
- my $pri_install_classes = "";
- my $pri_install_files = "";
- my $pri_install_pfiles = "";
-
- my $libcapitals = $lib;
- $libcapitals =~ y/a-z/A-Z/;
- my $master_contents = "#ifndef QT_".$libcapitals."_MODULE_H\n#define QT_".$libcapitals."_MODULE_H\n";
-
- #get dependencies
- my $pro_file = "$dir/" . basename($dir) . ".pro";
- if(!open(F, "<$pro_file")) {
- #the pro file doesn't exist let's try to find one
- opendir(DIR, $dir);
- $pro_file = "";
- foreach my $file (readdir(DIR))
- {
- if ( $file =~ /\.pro$/i) {
- die "There are multiple pro files for $lib module, which one should I use? \n" if ($pro_file ne "");
- $pro_file = "$dir/" . $file;
- }
- }
- closedir(DIR);
- if ($pro_file eq "") {
- die "I couldn't find a pro file for $lib module \n";
- }
- }
- if(-e "$pro_file") {
- if(open(F, "<$pro_file")) {
- while(my $line = <F>) {
- chomp $line;
- if($line =~ /^ *QT *\+?= *([^\r\n]*)/) {
- foreach(split(/ /, $1)) {
- $master_contents .= "#include <QtCore/QtCore>\n" if($_ eq "core");
- $master_contents .= "#include <QtGui/QtGui>\n" if($_ eq "gui");
- $master_contents .= "#include <QtNetwork/QtNetwork>\n" if($_ eq "network");
- $master_contents .= "#include <QtSvg/QtSvg>\n" if($_ eq "svg");
- $master_contents .= "#include <QtDeclarative/QtDeclarative>\n" if($_ eq "declarative");
- $master_contents .= "#include <QtScript/QtScript>\n" if($_ eq "script");
- $master_contents .= "#include <QtScriptTools/QtScriptTools>\n" if($_ eq "scripttools");
- $master_contents .= "#include <Qt3Support/Qt3Support>\n" if($_ eq "qt3support");
- $master_contents .= "#include <QtSql/QtSql>\n" if($_ eq "sql");
- $master_contents .= "#include <QtXml/QtXml>\n" if($_ eq "xml");
- $master_contents .= "#include <QtXmlPatterns/QtXmlPatterns>\n" if($_ eq "xmlpatterns");
- $master_contents .= "#include <QtOpenGL/QtOpenGL>\n" if($_ eq "opengl");
- $master_contents .= "#include <QtOpenVG/QtOpenVG>\n" if($_ eq "openvg");
- }
- }
- }
- close(F);
- }
- }
-
- #remove the old files
- if($remove_stale) {
- my @subdirs = ("$out_basedir/include/$lib");
- foreach my $subdir (@subdirs) {
- if (opendir DIR, $subdir) {
- while(my $t = readdir(DIR)) {
- my $file = "$subdir/$t";
- if(-d $file) {
- push @subdirs, $file unless($t eq "." || $t eq "..");
- } else {
- my @files = ($file);
- #push @files, "$out_basedir/include/Qt/$t" if(-e "$out_basedir/include/Qt/$t");
- foreach my $file (@files) {
- my $remove_file = 0;
- if(open(F, "<$file")) {
- while(my $line = <F>) {
- chomp $line;
- if($line =~ /^\#include \"([^\"]*)\"$/) {
- my $include = $1;
- $include = $subdir . "/" . $include unless(substr($include, 0, 1) eq "/");
- $remove_file = 1 unless(-e $include);
- } else {
- $remove_file = 0;
- last;
- }
- }
- close(F);
- unlink $file if($remove_file);
- }
- }
- }
- }
- closedir DIR;
- }
-
- }
- }
-
- #create the new ones
- foreach my $current_dir (split(/;/, $dir)) {
- my $headers_dir = $current_dir;
- $headers_dir .= "/$pathtoheaders" if ($pathtoheaders);
- #calc subdirs
- my @subdirs = ($headers_dir);
- foreach my $subdir (@subdirs) {
- opendir DIR, $subdir or next;
- while(my $t = readdir(DIR)) {
- push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
- !($t eq "..") && !($t eq ".obj") &&
- !($t eq ".moc") && !($t eq ".rcc") &&
- !($t eq ".uic") && !($t eq "build"));
- }
- closedir DIR;
- }
-
- #calc files and "copy" them
- foreach my $subdir (@subdirs) {
- my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
- if (defined $inject_headers{$subdir}) {
- foreach my $if ($inject_headers{$subdir}) {
- @headers = grep(!/^\Q$if\E$/, @headers); #in case we configure'd previously
- push @headers, "*".$if;
- }
- }
- foreach my $header (@headers) {
- my $shadow = ($header =~ s/^\*//);
- $header = 0 if($header =~ /^ui_.*.h/);
- foreach (@ignore_headers) {
- $header = 0 if($header eq $_);
- }
- if($header) {
- my $header_copies = 0;
- #figure out if it is a public header
- my $public_header = $header;
- if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
- $public_header = 0;
- } else {
- foreach (@ignore_for_master_contents) {
- $public_header = 0 if($header eq $_);
- }
- }
-
- my $iheader = $subdir . "/" . $header;
- $iheader =~ s/^\Q$basedir\E/$out_basedir/ if ($shadow);
- my @classes = $public_header ? classNames($iheader) : ();
- if($showonly) {
- print "$header [$lib]\n";
- foreach(@classes) {
- print "SYMBOL: $_\n";
- }
- } else {
- my $ts = (stat($iheader))[9];
- #find out all the places it goes..
- my @headers;
- if ($public_header) {
- @headers = ( "$out_basedir/include/$lib/$header" );
-
- # write forwarding headers to include/Qt
- if ($lib ne "phonon" && $subdir =~ /^$quoted_basedir\/src/) {
- my $file_name = "$out_basedir/include/Qt/$header";
- my $file_op = '>';
- my $header_content = '';
- if (exists $colliding_headers{$file_name}) {
- $file_op = '>>';
- } else {
- $colliding_headers{$file_name} = 1;
- my $warning_msg = 'Inclusion of header files from include/Qt is deprecated.';
- $header_content = "#ifndef QT_NO_QT_INCLUDE_WARN\n" .
- " #if defined(__GNUC__)\n" .
- " #warning \"$warning_msg\"\n" .
- " #elif defined(_MSC_VER)\n" .
- " #pragma message(\"WARNING: $warning_msg\")\n" .
- " #endif\n".
- "#endif\n\n";
- }
- $header_content .= '#include "' . "../$lib/$header" . "\"\n";
- open HEADERFILE, $file_op, $file_name or die "unable to open '$file_name' : $!\n";
- print HEADERFILE $header_content;
- close HEADERFILE;
- }
-
- foreach my $full_class (@classes) {
- my $header_base = basename($header);
- # Strip namespaces:
- my $class = $full_class;
- $class =~ s/^.*:://;
-# if ($class =~ m/::/) {
-# class =~ s,::,/,g;
-# }
- $class_lib_map_contents .= "QT_CLASS_LIB($full_class, $lib, $header_base)\n";
- $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0, $ts));
-
- # KDE-Compat headers for Phonon
- if ($lib eq "phonon") {
- $header_copies++ if (syncHeader("$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0, $ts));
- }
- }
- } elsif ($create_private_headers) {
- @headers = ( "$out_basedir/include/$lib/private/$header" );
- }
- foreach(@headers) { #sync them
- $header_copies++ if(syncHeader($_, $iheader, $copy_headers && !$shadow, $ts));
- }
-
- if($public_header) {
- #put it into the master file
- $master_contents .= "#include \"$public_header\"\n" if(shouldMasterInclude($iheader));
-
- #deal with the install directives
- if($public_header) {
- my $pri_install_iheader = fixPaths($iheader, $current_dir);
- foreach my $class (@classes) {
- # Strip namespaces:
- $class =~ s/^.*:://;
-# if ($class =~ m/::/) {
-# $class =~ s,::,/,g;
-# }
- my $class_header = fixPaths("$out_basedir/include/$lib/$class",
- $current_dir) . " ";
- $pri_install_classes .= $class_header
- unless($pri_install_classes =~ $class_header);
- }
- $pri_install_files.= "$pri_install_iheader ";;
- }
- }
- else {
- my $pri_install_iheader = fixPaths($iheader, $current_dir);
- $pri_install_pfiles.= "$pri_install_iheader ";;
- }
- }
- print "header created for $iheader ($header_copies)\n" if($header_copies > 0 && !$quiet);
- }
- }
- }
- }
-
- # close the master include:
- $master_contents .= "#endif\n";
-
- unless($showonly) {
- my @master_includes;
- push @master_includes, "$out_basedir/include/$lib/$lib";
- push @master_includes, "$out_basedir/include/phonon_compat/Phonon/Phonon" if ($lib eq "phonon");
- foreach my $master_include (@master_includes) {
- #generate the "master" include file
- my @tmp = split(/;/,$modules{$lib});
- $pri_install_files .= fixPaths($master_include, $tmp[0]) . " "; #get the master file installed too
- if($master_include && -e $master_include) {
- open MASTERINCLUDE, "<$master_include";
- local $/;
- binmode MASTERINCLUDE;
- my $oldmaster = <MASTERINCLUDE>;
- close MASTERINCLUDE;
- $oldmaster =~ s/\r//g; # remove \r's , so comparison is ok on all platforms
- $master_include = 0 if($oldmaster eq $master_contents);
- }
- if($master_include && $master_contents) {
- my $master_dir = dirname($master_include);
- mkpath $master_dir, !$quiet;
- print "header (master) created for $lib\n" unless $quiet;
- open MASTERINCLUDE, ">$master_include";
- print MASTERINCLUDE $master_contents;
- close MASTERINCLUDE;
- }
- }
-
- #handle the headers.pri for each module
- my $headers_pri_contents = "";
- $headers_pri_contents .= "SYNCQT.HEADER_FILES = $pri_install_files\n";
- $headers_pri_contents .= "SYNCQT.HEADER_CLASSES = $pri_install_classes\n";
- $headers_pri_contents .= "SYNCQT.PRIVATE_HEADER_FILES = $pri_install_pfiles\n";
- my $headers_pri_file = "$out_basedir/include/$lib/headers.pri";
- if(-e $headers_pri_file) {
- open HEADERS_PRI_FILE, "<$headers_pri_file";
- local $/;
- binmode HEADERS_PRI_FILE;
- my $old_headers_pri_contents = <HEADERS_PRI_FILE>;
- close HEADERS_PRI_FILE;
- $old_headers_pri_contents =~ s/\r//g; # remove \r's , so comparison is ok on all platforms
- $headers_pri_file = 0 if($old_headers_pri_contents eq $headers_pri_contents);
- }
- if($headers_pri_file && $master_contents) {
- my $headers_pri_dir = dirname($headers_pri_file);
- mkpath $headers_pri_dir, !$quiet;
- print "headers.pri file created for $lib\n" unless $quiet;
- open HEADERS_PRI_FILE, ">$headers_pri_file";
- print HEADERS_PRI_FILE $headers_pri_contents;
- close HEADERS_PRI_FILE;
- }
- }
-}
-unless($showonly || !$create_uic_class_map) {
- my $class_lib_map = "$out_basedir/src/tools/uic/qclass_lib_map.h";
- if(-e $class_lib_map) {
- open CLASS_LIB_MAP, "<$class_lib_map";
- local $/;
- binmode CLASS_LIB_MAP;
- my $old_class_lib_map_contents = <CLASS_LIB_MAP>;
- close CLASS_LIB_MAP;
- $old_class_lib_map_contents =~ s/\r//g; # remove \r's , so comparison is ok on all platforms
- $class_lib_map = 0 if($old_class_lib_map_contents eq $class_lib_map_contents);
- }
- if($class_lib_map) {
- my $class_lib_map_dir = dirname($class_lib_map);
- mkpath $class_lib_map_dir, !$quiet;
- open CLASS_LIB_MAP, ">$class_lib_map";
- print CLASS_LIB_MAP $class_lib_map_contents;
- close CLASS_LIB_MAP;
- }
-}
-
-if($check_includes) {
- for my $lib (keys(%modules)) {
- #calc subdirs
- my @subdirs = ($modules{$lib});
- foreach my $subdir (@subdirs) {
- opendir DIR, $subdir or die "Huh, directory ".$subdir." cannot be opened.";
- while(my $t = readdir(DIR)) {
- push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
- !($t eq "..") && !($t eq ".obj") &&
- !($t eq ".moc") && !($t eq ".rcc") &&
- !($t eq ".uic") && !($t eq "build"));
- }
- closedir DIR;
- }
-
- foreach my $subdir (@subdirs) {
- my $header_skip_qt_module_test = 0;
- foreach(@ignore_for_qt_module_check) {
- foreach (split(/;/, $_)) {
- $header_skip_qt_module_test = 1 if ($subdir =~ /^$_/);
- }
- }
- my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
- foreach my $header (@headers) {
- my $header_skip_qt_begin_header_test = 0;
- my $header_skip_qt_begin_namespace_test = 0;
- $header = 0 if($header =~ /^ui_.*.h/);
- foreach (@ignore_headers) {
- $header = 0 if($header eq $_);
- }
- if($header) {
- my $public_header = $header;
- if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
- $public_header = 0;
- } else {
- foreach (@ignore_for_master_contents) {
- $public_header = 0 if($header eq $_);
- }
- if($public_header) {
- foreach (@ignore_for_include_check) {
- $public_header = 0 if($header eq $_);
- }
- foreach(@ignore_for_qt_begin_header_check) {
- $header_skip_qt_begin_header_test = 1 if ($header eq $_);
- }
- foreach(@ignore_for_qt_begin_namespace_check) {
- $header_skip_qt_begin_namespace_test = 1 if ($header eq $_);
- }
- }
- }
-
- my $iheader = $subdir . "/" . $header;
- if($public_header) {
- if(open(F, "<$iheader")) {
- my $qt_module_found = 0;
- my $qt_begin_header_found = 0;
- my $qt_end_header_found = 0;
- my $qt_begin_namespace_found = 0;
- my $qt_end_namespace_found = 0;
- my $line;
- while($line = <F>) {
- chomp $line;
- my $output_line = 1;
- if($line =~ /^ *\# *pragma (qt_no_included_check|qt_sync_stop_processing)/) {
- last;
- } elsif($line =~ /^ *\# *include/) {
- my $include = $line;
- if($line =~ /<.*>/) {
- $include =~ s,.*<(.*)>.*,$1,;
- } elsif($line =~ /".*"/) {
- $include =~ s,.*"(.*)".*,$1,;
- } else {
- $include = 0;
- }
- if($include) {
- for my $trylib (keys(%modules)) {
- if(-e "$out_basedir/include/$trylib/$include") {
- print "WARNING: $iheader includes $include when it should include $trylib/$include\n";
- }
- }
- }
- } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_BEGIN_HEADER\s*$/) {
- $qt_begin_header_found = 1;
- } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_END_HEADER\s*$/) {
- $qt_end_header_found = 1;
- } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_BEGIN_NAMESPACE\s*$/) {
- $qt_begin_namespace_found = 1;
- } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_END_NAMESPACE\s*$/) {
- $qt_end_namespace_found = 1;
- } elsif ($header_skip_qt_module_test == 0 and $line =~ /^QT_MODULE\(.*\)\s*$/) {
- $qt_module_found = 1;
- }
- }
- if ($header_skip_qt_begin_header_test == 0) {
- if ($qt_begin_header_found == 0) {
- print "WARNING: $iheader does not include QT_BEGIN_HEADER\n";
- }
-
- if ($qt_begin_header_found && $qt_end_header_found == 0) {
- print "WARNING: $iheader has QT_BEGIN_HEADER but no QT_END_HEADER\n";
- }
- }
-
- if ($header_skip_qt_begin_namespace_test == 0) {
- if ($qt_begin_namespace_found == 0) {
- print "WARNING: $iheader does not include QT_BEGIN_NAMESPACE\n";
- }
-
- if ($qt_begin_namespace_found && $qt_end_namespace_found == 0) {
- print "WARNING: $iheader has QT_BEGIN_NAMESPACE but no QT_END_NAMESPACE\n";
- }
- }
-
- if ($header_skip_qt_module_test == 0) {
- if ($qt_module_found == 0) {
- print "WARNING: $iheader does not include QT_MODULE\n";
- }
- }
- close(F);
- }
- }
- }
- }
- }
- }
-}
-
-exit 0;
diff --git a/WebKit.pro b/WebKit.pro
index a0a1e5f1b..cc18ce2eb 100644
--- a/WebKit.pro
+++ b/WebKit.pro
@@ -5,39 +5,6 @@
# See 'Tools/qmake/README' for an overview of the build system
# -------------------------------------------------------------------
-!webkit_configured {
- CONFIG += production_build
- include(Tools/qmake/configure.pri)
- the_config = $$CONFIG
- the_config -= $$BASE_CONFIG $$find(CONFIG, "^(done_)?config_")
- cache(CONFIG, add, the_config)
- the_defines = $$DEFINES
- the_defines -= $$BASE_DEFINES
- cache(DEFINES, add, the_defines)
-
- # We inherit the build type from Qt, unless it was specified on the qmake command
- # line. Note that the perl build script defaults to forcing a release build.
- contains(the_config, debug|release) {
- contains(the_config, debug) {
- contains(the_config, release) {
- !debug_and_release:cache(CONFIG, add, $$list(debug_and_release))
- } else {
- release:cache(CONFIG, del, $$list(release))
- debug_and_release:cache(CONFIG, del, $$list(debug_and_release))
- }
- } else { # release
- debug:cache(CONFIG, del, $$list(debug))
- debug_and_release:cache(CONFIG, del, $$list(debug_and_release))
- }
- } else {
- contains(QT_CONFIG, release, debug|release): \
- cache(CONFIG, add, $$list(release))
- else: \
- cache(CONFIG, add, $$list(debug))
- macx:!debug_and_release:cache(CONFIG, add, $$list(debug_and_release))
- }
-}
-
TEMPLATE = subdirs
CONFIG += ordered
@@ -49,7 +16,7 @@ JavaScriptCore.file = Source/JavaScriptCore/JavaScriptCore.pro
JavaScriptCore.makefile = Makefile.JavaScriptCore
SUBDIRS += JavaScriptCore
-contains(DEFINES, WTF_USE_3D_GRAPHICS=1) {
+use?(3D_GRAPHICS) {
ANGLE.file = Source/ThirdParty/ANGLE/ANGLE.pro
ANGLE.makefile = Makefile.ANGLE
SUBDIRS += ANGLE
@@ -59,13 +26,13 @@ WebCore.file = Source/WebCore/WebCore.pro
WebCore.makefile = Makefile.WebCore
SUBDIRS += WebCore
-!no_webkit1 {
+build?(webkit1) {
webkit1.file = Source/WebKit/WebKit1.pro
webkit1.makefile = Makefile.WebKit1
SUBDIRS += webkit1
}
-!no_webkit2 {
+build?(webkit2) {
webkit2.file = Source/WebKit2/WebKit2.pro
webkit2.makefile = Makefile.WebKit2
SUBDIRS += webkit2
@@ -75,4 +42,6 @@ QtWebKit.file = Source/QtWebKit.pro
QtWebKit.makefile = Makefile.QtWebKit
SUBDIRS += QtWebKit
+Tools.file = Tools/Tools.pro
+Tools.makefile = Makefile.Tools
SUBDIRS += Tools