Revert a mysterious and inexplicable part of http://trac.webkit.org/changeset/160685
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-12-16  Tim Horton  <timothy_horton@apple.com>
2
3         Revert a mysterious and inexplicable part of http://trac.webkit.org/changeset/160685
4
5         * platform/KeyedCoding.h:
6         (WebCore::KeyedEncoder::encodeEnum):
7         (WebCore::KeyedEncoder::encodeObject):
8         (WebCore::KeyedEncoder::encodeConditionalObject):
9         (WebCore::KeyedEncoder::encodeObjects):
10
11 2013-12-16  Anders Carlsson  <andersca@apple.com>
12
13         Remove EnumClass.h from WTF
14         https://bugs.webkit.org/show_bug.cgi?id=125820
15
16         Reviewed by Darin Adler.
17
18         Replace uses of ENUM_CLASS with real enum class declarations.
19
20         * Modules/webdatabase/DatabaseBasicTypes.h:
21         * Modules/webdatabase/DatabaseError.h:
22         * Modules/webdatabase/SQLTransactionState.h:
23         * bindings/js/JSSubtleCryptoCustom.cpp:
24         * bindings/js/SerializedScriptValue.cpp:
25         * crypto/CryptoAlgorithmIdentifier.h:
26         * crypto/CryptoAlgorithmParameters.h:
27         * crypto/CryptoKey.h:
28         * crypto/CryptoKeyData.h:
29         * crypto/CryptoKeyType.h:
30         * crypto/keys/CryptoKeyDataRSAComponents.h:
31         * inspector/InspectorTimelineAgent.h:
32
33 2013-12-16  Tim Horton  <timothy_horton@apple.com>
34
35         WebKit2 View Gestures: Pinching beyond the extremes doesn't animate back to the min/max
36         https://bugs.webkit.org/show_bug.cgi?id=125750
37
38         Reviewed by Simon Fraser.
39
40         * WebCore.exp.in:
41         Export a few things so WebKit2 can use them.
42
43 2013-12-16  Joseph Pecoraro  <pecoraro@apple.com>
44
45         Fix some whitespace issues in inspector code
46         https://bugs.webkit.org/show_bug.cgi?id=125814
47
48         Reviewed by Darin Adler.
49
50         * inspector/protocol/DOM.json:
51         * inspector/protocol/DOMStorage.json:
52         * inspector/protocol/Timeline.json:
53
54 2013-12-16  Joseph Pecoraro  <pecoraro@apple.com>
55
56         Web Inspector: Use JSC::SourceID and JSC::BreakpointID instead of WebCore dups
57         https://bugs.webkit.org/show_bug.cgi?id=125818
58
59         Reviewed by Mark Lam.
60
61         Remove the WebCore typedefs of JSC types. Prefer JSC namespace
62         prefixed types throughout WebCore's Inspector code.
63
64         * GNUmakefile.list.am:
65         * WebCore.vcxproj/WebCore.vcxproj:
66         * WebCore.vcxproj/WebCore.vcxproj.filters:
67         * WebCore.xcodeproj/project.pbxproj:
68         * bindings/js/BreakpointID.h: Removed.
69         * bindings/js/ScriptDebugServer.cpp:
70         (WebCore::ScriptDebugServer::setBreakpoint):
71         (WebCore::ScriptDebugServer::removeBreakpoint):
72         (WebCore::ScriptDebugServer::dispatchDidParseSource):
73         * bindings/js/ScriptDebugServer.h:
74         * bindings/js/SourceID.h: Removed.
75         * inspector/InspectorDebuggerAgent.cpp:
76         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
77         (WebCore::parseLocation):
78         (WebCore::InspectorDebuggerAgent::setBreakpoint):
79         (WebCore::InspectorDebuggerAgent::continueToLocation):
80         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
81         (WebCore::InspectorDebuggerAgent::searchInContent):
82         (WebCore::InspectorDebuggerAgent::getScriptSource):
83         (WebCore::InspectorDebuggerAgent::didParseSource):
84         (WebCore::InspectorDebuggerAgent::didPause):
85         (WebCore::InspectorDebuggerAgent::clear):
86         * inspector/InspectorDebuggerAgent.h:
87         * inspector/ScriptDebugListener.h:
88
89 2013-12-16  Daniel Bates  <dabates@apple.com>
90
91         [iOS] Upstream WebCore/dom changes
92         https://bugs.webkit.org/show_bug.cgi?id=125646
93
94         Reviewed by David Kilzer.
95
96         * WebCore.exp.in: Added symbol __ZN7WebCore8Settings17setLayoutIntervalEi and removed symbol
97         __ZN7WebCore24cLayoutScheduleThresholdE.
98         * dom/ActiveDOMObject.h: Add suspension reason DocumentWillBePaused.
99         * dom/DOMImplementation.cpp:
100         (WebCore::DOMImplementation::createDocument): Opt-out of ENABLE(VIDEO) logic when
101         building for iOS.
102         * dom/DeviceMotionClient.h: Made class non-copyable.
103         (WebCore::DeviceMotionClient::DeviceMotionClient): Added;
104         * dom/DeviceMotionController.cpp: Added FIXME comment to reconcile iOS and OpenSource differences.
105         (WebCore::DeviceMotionController::suspendUpdates): Added; guarded by PLATFORM(IOS).
106         (WebCore::DeviceMotionController::resumeUpdates): Added; guarded by PLATFORM(IOS).
107         * dom/DeviceMotionController.h: Added FIXME comment to reconcile iOS and OpenSource differences.
108         * dom/DeviceOrientationClient.h: Made class non-copyable.
109         (WebCore::DeviceOrientationClient::DeviceOrientationClient): Added.
110         * dom/DeviceOrientationController.cpp: Added FIXME comment to reconcile iOS and OpenSource differences.
111         (WebCore::DeviceOrientationController::DeviceOrientationController):
112         (WebCore::DeviceOrientationController::suspendUpdates): Added; guarded by PLATFORM(IOS).
113         (WebCore::DeviceOrientationController::resumeUpdates): Added; guarded by PLATFORM(IOS).
114         * dom/DeviceOrientationController.h: Added FIXME comment to reconcile iOS and OpenSource differences.
115         * dom/DeviceOrientationData.cpp:
116         (WebCore::DeviceOrientationData::create): Added; iOS-specific. Added FIXME comment.
117         (WebCore::DeviceOrientationData::DeviceOrientationData): Added iOS-specific code.
118         (WebCore::DeviceOrientationData::compassHeading): Added; guarded by PLATFORM(IOS).
119         (WebCore::DeviceOrientationData::compassAccuracy): Added; guarded by PLATFORM(IOS).
120         (WebCore::DeviceOrientationData::canProvideCompassHeading): Added; guarded by PLATFORM(IOS).
121         (WebCore::DeviceOrientationData::canProvideCompassAccuracy): Added; guarded by PLATFORM(IOS).
122         * dom/DeviceOrientationData.h:
123         * dom/DeviceOrientationEvent.idl: Added iOS-specific code.
124         * dom/Document.cpp: Moved constant cLayoutScheduleThreshold to Settings.cpp and renamed it
125         layoutScheduleThreshold towards allowing a port to configure the layout interval.
126         (WebCore::Document::Document): Added optional argument isSynthesized, defaults false.
127         (WebCore::Document::~Document): Added iOS-specific code to destroy the device motion
128         and device orientation controllers.
129         (WebCore::Document::didBecomeCurrentDocumentInFrame): Added iOS-specific code with FIXME comment.
130         (WebCore::Document::prepareForDestruction): Added iOS-specific touch event code.
131         (WebCore::Document::removeAllEventListeners): Ditto.
132         (WebCore::Document::platformSuspendOrStopActiveDOMObjects): Added; compiles to an empty function on
133         non-iOS port.
134         (WebCore::Document::suspendActiveDOMObjects): Modified to call platformSuspendOrStopActiveDOMObjects().
135         (WebCore::Document::resumeActiveDOMObjects): Ditto.
136         (WebCore::Document::stopActiveDOMObjects): Added.
137         (WebCore::Document::implicitClose): Modified to query Settings::layoutInterval().
138         (WebCore::Document::minimumLayoutDelay): Ditto.
139         (WebCore::Document::processViewport): Added iOS-specific code.
140         (WebCore::Document::updateViewportArguments): Ditto.
141         (WebCore::setParserFeature): Added; guarded by PLATFORM(IOS).
142         (WebCore::Document::processFormatDetection): Added; guarded by PLATFORM(IOS).
143         (WebCore::Document::processWebAppOrientations): Added; guarded by PLATFORM(IOS).
144         (WebCore::Document::isTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
145         (WebCore::Document::setIsTelephoneNumberParsingAllowed): Added; guarded by PLATFORM(IOS).
146         (WebCore::Document::isTelephoneNumberParsingAllowed): Added; guarded by PLATFORM(IOS).
147         (WebCore::Document::initSecurityContext): Added iOS-specific code.
148         (WebCore::Document::suspendScheduledTasks): Added; guarded by PLATFORM(IOS).
149         (WebCore::Document::deviceMotionController): Added; iOS-specific.
150         (WebCore::Document::deviceOrientationController): Added; iOS-specific.
151         (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale): Added iOS-specific code.
152         (WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale): Added iOS-specific code.
153         * dom/Document.h: Register gesture events gesture{change, end, start}; guarded by ENABLE(IOS_GESTURE_EVENTS).
154         (WebCore::Document::isSynthesized): Added.
155         (WebCore::Document::platformSuspendOrStopActiveDOMObjects): Added.
156         * dom/Document.idl:
157         * dom/DocumentMarker.h: Added iOS-specific changes. We should look to reconcile the differences between
158         iOS and OpenSource. See <rdar://problem/11306422>.
159         (WebCore::DocumentMarker::AllMarkers::AllMarkers):
160         (WebCore::DocumentMarker::DocumentMarker): Added; iOS-specific.
161         (WebCore::DocumentMarker::alternatives): Added; iOS-specific.
162         (WebCore::DocumentMarker::setAlternative): Added; iOS-specific.
163         (WebCore::DocumentMarker::metadata): Added; iOS-specific.
164         (WebCore::DocumentMarker::setMetadata): Added; iOS-specific.
165         * dom/DocumentMarkerController.cpp:
166         (WebCore::DocumentMarkerController::addMarker):
167         (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker):
168         (WebCore::DocumentMarkerController::addDictationResultMarker):
169         (WebCore::DocumentMarkerController::shiftMarkers):
170         * dom/DocumentMarkerController.h:
171         * dom/Element.cpp:
172         (WebCore::Element::focus): Add iOS-specific workaround for <rdar://problem/6699741>.
173         * dom/Element.h: Register gesture events gesture{change, end, start}; guarded by ENABLE(IOS_GESTURE_EVENTS).
174         * dom/EventContext.cpp: Opt-out of ENABLE(TOUCH_EVENTS)-guarded code when building the iOS port.
175         * dom/EventContext.h: Ditto.
176         * dom/EventDispatcher.cpp:
177         (WebCore::EventRelatedNodeResolver::EventRelatedNodeResolver): Ditto.
178         (WebCore::EventDispatcher::dispatchEvent): Ditto.
179         (WebCore::EventPath::EventPath): Ditto.
180         * dom/EventNames.h: Added events webkit{currentplaybacktargetiswirelesschanged, playbacktargetavailabilitychanged}
181         and gesture{change, end, start}.
182         * dom/EventNames.in: Added event names GestureEvent and WebKitPlaybackTargetAvailabilityEvent conditioned on
183         the macro defines ENABLE_IOS_GESTURE_EVENTS and ENABLE_IOS_AIRPLAY.
184         * dom/MouseRelatedEvent.cpp:
185         (WebCore::contentsScrollOffset): Added iOS-specific code.
186         (WebCore::MouseRelatedEvent::MouseRelatedEvent): Ditto.
187         * dom/Node.cpp:
188         (WebCore::Node::willBeDeletedFrom): Ditto.
189         (WebCore::Node::isDescendantOf): Fixed style issue in function prototype; moved '*' to the left side.
190         (WebCore::Node::isDescendantOrShadowDescendantOf): Added.
191         (WebCore::tryAddEventListener): Added iOS-specific code; also added FIXME comment.
192         (WebCore::tryRemoveEventListener): Ditto.
193         (WebCore::Node::dispatchEvent): Opt-out of ENABLE(TOUCH_EVENTS)-guarded code when building the iOS port.
194         (WebCore::Node::defaultEventHandler): Added iOS-specific code.
195         (WebCore::Node::willRespondToMouseMoveEvents): Added iOS-specific code; also added FIXME comment.
196         (WebCore::Node::willRespondToMouseClickEvents): Added iOS-specific code; also added FIXME comment.
197         (WebCore::Node::willRespondToMouseWheelEvents): Added.
198         * dom/Node.h:
199         * dom/Position.h:
200         (WebCore::operator<): Added.
201         (WebCore::operator>): Added.
202         (WebCore::operator>=): Added.
203         (WebCore::operator<=): Added.
204         * dom/Range.cpp:
205         (WebCore::Range::create): Added iOS-specific code; also added FIXME comment.
206         (WebCore::intervalsSufficientlyOverlap): Added; guarded by PLATFORM(IOS).
207         (WebCore::printRects): Added; guarded by PLATFORM(IOS).
208         (WebCore::adjustLineHeightOfSelectionRects): Added; guarded by PLATFORM(IOS).
209         (WebCore::coalesceSelectionRects): Added; guarded by PLATFORM(IOS).
210         (WebCore::Range::collectSelectionRects): Added; guarded by PLATFORM(IOS).
211         * dom/Range.h:
212         * dom/ScriptExecutionContext.cpp:
213         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): Added iOS-specific code.
214         (WebCore::ScriptExecutionContext::dispatchErrorEvent): Ditto.
215         * dom/TreeScope.cpp:
216         (WebCore::nodeFromPoint): Ditto.
217         * dom/ViewportArguments.cpp:
218         (WebCore::computeViewportAttributes): Ditto.
219         (WebCore::setViewportFeature): Added iOS-specific code.
220         (WebCore::finalizeViewportArguments): Added; iOS-specific.
221         * dom/ViewportArguments.h:
222         * dom/make_names.pl: Added support to find the path to gcc with respect to the environment
223         variable SDKROOT.
224         * html/HTMLMediaElement.cpp:
225         (HTMLMediaElement::suspend):
226         * page/Settings.cpp:
227         (WebCore::Settings::Settings): Initialize setting m_layoutInterval to layoutScheduleThreshold.
228         (WebCore::Settings::setLayoutInterval): Added.
229         * page/Settings.h:
230         (WebCore::Settings::layoutInterval): Added.
231
232 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
233
234         Attempt to fix the Windows build after r160672.
235         
236         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
237         (PlatformCALayerWin::PlatformCALayerWin):
238         * platform/graphics/ca/win/PlatformCALayerWin.h:
239
240 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
241
242         Apply overhang shadow and linen to UI-side layers
243         https://bugs.webkit.org/show_bug.cgi?id=125807
244
245         Reviewed by Tim Horton.
246         
247         With UI-side compositing, we need to apply the overhang shadow and linen
248         background to layers in the UI process. Achieve this by setting a "custom
249         appearance" flag on layers that need a shadow or linen background, and
250         migrating this flag to the UI process. Static functions on ScrollbarThemeMac
251         are exposed to do the actual setting.
252
253         * WebCore.exp.in: Export ScrollbarThemeMac and GraphicsLayerCA functions.
254         * WebCore.xcodeproj/project.pbxproj: ScrollbarThemeMac.h and ScrollbarThemeComposite.h
255         need to be Private.
256         * platform/graphics/GraphicsLayer.cpp: Initialize m_customAppearance.
257         (WebCore::GraphicsLayer::GraphicsLayer):
258         * platform/graphics/GraphicsLayer.h: Getter/setter for CustomAppearance.
259         (WebCore::GraphicsLayer::setCustomAppearance):
260         (WebCore::GraphicsLayer::customAppearance):
261         * platform/graphics/ca/GraphicsLayerCA.cpp: Update CustomAppearanceChanged as
262         we do other properties.
263         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
264         (WebCore::GraphicsLayerCA::updateCustomAppearance):
265         (WebCore::GraphicsLayerCA::setCustomAppearance):
266         * platform/graphics/ca/GraphicsLayerCA.h:
267         * platform/graphics/ca/PlatformCALayer.h:
268         * platform/graphics/ca/mac/PlatformCALayerMac.h:
269         * platform/graphics/ca/mac/PlatformCALayerMac.mm: When we have a custom
270         appearance, use ScrollbarThemeMac functions to update the layer. Ensure
271         that if the bounds change, we update the shadow (whose path depends on the bounds).
272         (PlatformCALayerMac::PlatformCALayerMac):
273         (PlatformCALayerMac::clone):
274         (PlatformCALayerMac::setBounds):
275         (PlatformCALayerMac::requiresCustomAppearanceUpdateOnBoundsChange):
276         (PlatformCALayerMac::updateCustomAppearance):
277         * platform/mac/ScrollbarThemeMac.h: Export some static functions.
278         * platform/mac/ScrollbarThemeMac.mm: Change code to use static functions.
279         (WebCore::ScrollbarThemeMac::setUpOverhangAreaBackground):
280         (WebCore::ScrollbarThemeMac::removeOverhangAreaBackground):
281         (WebCore::ScrollbarThemeMac::setUpOverhangAreaShadow):
282         (WebCore::ScrollbarThemeMac::removeOverhangAreaShadow):
283         (WebCore::ScrollbarThemeMac::setUpOverhangAreasLayerContents):
284         (WebCore::ScrollbarThemeMac::setUpContentShadowLayer):
285         * rendering/RenderLayerCompositor.cpp:
286         (WebCore::RenderLayerCompositor::updateRootLayerPosition): No need to call
287         setUpContentShadowLayer() now when size changes; PlatformCALayer takes
288         care of that.
289         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): Now set
290         custom appearance via GraphicsLayer.
291
292 2013-12-16  Brent Fulgham  <bfulgham@apple.com>
293
294         [Win] Remove dead code after converstion to VS2013
295         https://bugs.webkit.org/show_bug.cgi?id=125795
296
297         Reviewed by Darin Adler.
298
299         * WebCorePrefix.h: Remove VS2012 include kludge.
300         * loader/FTPDirectoryParser.cpp: Remove gmtime workaround code.
301         * page/DOMWindow.cpp: Remove older pointer-based open implementation.
302         * page/DOMWindow.h: Ditto
303         * platform/text/TextEncodingRegistry.cpp:
304         (WebCore::TextEncodingNameHash::equal): Remove optimization bug workaround
305         * testing/Internals.cpp:
306         (WebCore::Internals::openDummyInspectorFrontend): Remove compiler workaround
307
308 2013-12-16  Daniel Bates  <dabates@apple.com>
309
310         [iOS] Upstream WebCore/history changes
311         https://bugs.webkit.org/show_bug.cgi?id=125769
312
313         Reviewed by Darin Adler.
314
315         * history/BackForwardClient.h:
316         * history/BackForwardList.cpp:
317         (WebCore::BackForwardList::current): Added; guard by PLATFORM(IOS). Also added FIXME comment.
318         (WebCore::BackForwardList::setCurrent): Added; guard by PLATFORM(IOS). Also added FIXME comment.
319         (WebCore::BackForwardList::clearAllPageCaches): Added; guarded by PLATFORM(IOS).
320         * history/BackForwardList.h:
321         * history/CachedFrame.cpp:
322         (WebCore::CachedFrameBase::restore): Added iOS-specific code.
323         (WebCore::CachedFrame::CachedFrame): Ditto.
324         * history/CachedPage.cpp:
325         (WebCore::CachedPage::restore): Ditto.
326         * history/HistoryItem.cpp:
327         (WebCore::HistoryItem::HistoryItem): Ditto.
328         * history/HistoryItem.h:
329         (WebCore::HistoryItem::scale): Added; guarded by PLATFORM(IOS).
330         (WebCore::HistoryItem::scaleIsInitial): Added; guarded by PLATFORM(IOS).
331         (WebCore::HistoryItem::setScale): Added; guarded by PLATFORM(IOS).
332         (WebCore::HistoryItem::viewportArguments): Added; guarded by PLATFORM(IOS).
333         (WebCore::HistoryItem::setViewportArguments): Added; guarded by PLATFORM(IOS).
334         (WebCore::HistoryItem::bookmarkID): Added; guarded by PLATFORM(IOS).
335         (WebCore::HistoryItem::setBookmarkID): Added; guarded by PLATFORM(IOS).
336         (WebCore::HistoryItem::sharedLinkUniqueIdentifier): Added; guarded by PLATFORM(IOS).
337         (WebCore::HistoryItem::setSharedLinkUniqueIdentifier): Added; guarded by PLATFORM(IOS).
338         * history/PageCache.cpp:
339         (WebCore::logCanCacheFrameDecision): Added iOS-specific code.
340         (WebCore::logCanCachePageDecision): Ditto.
341         (WebCore::PageCache::canCachePageContainingThisFrame): Ditto.
342         (WebCore::PageCache::canCache): Ditto.
343         (WebCore::PageCache::pruneToCapacityNow): Added.
344         * history/PageCache.h:
345
346 2013-12-16  Daniel Bates  <dabates@apple.com>
347
348         [iOS] Upstream WebCore/svg changes
349         https://bugs.webkit.org/show_bug.cgi?id=125784
350
351         Reviewed by Darin Adler.
352
353         * svg/SVGAElement.cpp:
354         (WebCore::SVGAElement::willRespondToMouseClickEvents): Added.
355         * svg/SVGAElement.h:
356         * svg/SVGElement.cpp:
357         (WebCore::SVGElement::parseAttribute): Added attribute listeners for touch{cancel, end, move, start},
358         and gesture{change, end, start}.
359
360 2013-12-13  Jeffrey Pfau  <jpfau@apple.com>
361
362         [Mac] Cache partitioning asserts when associated NSURLRequest is nil
363         https://bugs.webkit.org/show_bug.cgi?id=125716
364
365         Reviewed by Darin Adler.
366
367         * platform/network/mac/ResourceRequestMac.mm:
368         (WebCore::ResourceRequest::doUpdateResourceRequest):
369
370 2013-12-16  Brady Eidson  <beidson@apple.com>
371
372         DatabaseProcess: Fix a few bugs with opening an IDB connection
373         https://bugs.webkit.org/show_bug.cgi?id=125798
374
375         Reviewed by Alexey Proskuryakov.
376
377         * Modules/indexeddb/IDBDatabaseBackend.cpp:
378         (WebCore::IDBDatabaseBackend::processPendingCalls): As the comment says, we should only
379           early return when there *are* pending delete calls. The logic here was backwards,
380           preventing the backend from ever getting to processPendingOpenCalls().
381
382 2013-12-16  Alex Christensen  <achristensen@webkit.org>
383
384         Fixed Win64 build on VS2013.
385         https://bugs.webkit.org/show_bug.cgi?id=125753
386
387         Reviewed by Brent Fulgham.
388
389         * WebCore.vcxproj/WebCore.vcxproj:
390         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
391         Added correct PlatformToolset for 64-bit builds.
392
393 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
394
395         Package up some data about scrollability into a struct for use in the scrolling tree
396         https://bugs.webkit.org/show_bug.cgi?id=125792
397
398         Reviewed by Beth Dakin.
399
400         Both scrolling state nodes and scrolling nodes share a set of parameters
401         relating to scrollability and rubberbanding, so package them into a struct
402         for re-use. Send the struct wholesale to the scrolling thread.
403
404         * page/scrolling/ScrollingCoordinator.h:
405         (WebCore::ScrollableAreaParameters::ScrollableAreaParameters): New struct.
406         (WebCore::ScrollableAreaParameters::operator==):
407         * page/scrolling/ScrollingStateScrollingNode.cpp:
408         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): Reordering.
409         (WebCore::ScrollingStateScrollingNode::setScrollOrigin): Moved.
410         (WebCore::ScrollingStateScrollingNode::setScrollableAreaParameters): Set the parameters all at once.
411         (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
412         * page/scrolling/ScrollingStateScrollingNode.h: Getters access the struct. Reorder member variables.
413         * page/scrolling/ScrollingTreeScrollingNode.cpp:
414         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
415         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
416         * page/scrolling/ScrollingTreeScrollingNode.h:
417         (WebCore::ScrollingTreeScrollingNode::scrollOrigin):
418         (WebCore::ScrollingTreeScrollingNode::horizontalScrollElasticity):
419         (WebCore::ScrollingTreeScrollingNode::verticalScrollElasticity):
420         (WebCore::ScrollingTreeScrollingNode::hasEnabledHorizontalScrollbar):
421         (WebCore::ScrollingTreeScrollingNode::hasEnabledVerticalScrollbar):
422         (WebCore::ScrollingTreeScrollingNode::canHaveScrollbars):
423         * page/scrolling/mac/ScrollingCoordinatorMac.h:
424         * page/scrolling/mac/ScrollingCoordinatorMac.mm: Removed setScrollParametersForNode().
425         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated): Set the params in this
426         function. Reordering.
427
428 2013-12-16  Sam Weinig  <sam@webkit.org>
429
430         CTTE: Convert more of SVG to use references
431         https://bugs.webkit.org/show_bug.cgi?id=125762
432
433         Reviewed by Darin Adler.
434
435         * rendering/svg/RenderSVGImage.cpp:
436         (WebCore::RenderSVGImage::imageChanged):
437         * rendering/svg/RenderSVGResource.cpp:
438         (WebCore::removeFromCacheAndInvalidateDependencies):
439         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
440         * rendering/svg/RenderSVGResource.h:
441         * rendering/svg/RenderSVGResourceClipper.cpp:
442         (WebCore::RenderSVGResourceClipper::removeClientFromCache):
443         * rendering/svg/RenderSVGResourceClipper.h:
444         * rendering/svg/RenderSVGResourceContainer.cpp:
445         (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
446         (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):
447         (WebCore::RenderSVGResourceContainer::markClientForInvalidation):
448         (WebCore::RenderSVGResourceContainer::removeClient):
449         * rendering/svg/RenderSVGResourceContainer.h:
450         * rendering/svg/RenderSVGResourceFilter.cpp:
451         (WebCore::RenderSVGResourceFilter::removeClientFromCache):
452         (WebCore::RenderSVGResourceFilter::postApplyResource):
453         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
454         * rendering/svg/RenderSVGResourceFilter.h:
455         * rendering/svg/RenderSVGResourceGradient.cpp:
456         (WebCore::RenderSVGResourceGradient::removeClientFromCache):
457         * rendering/svg/RenderSVGResourceGradient.h:
458         * rendering/svg/RenderSVGResourceMarker.cpp:
459         (WebCore::RenderSVGResourceMarker::removeClientFromCache):
460         * rendering/svg/RenderSVGResourceMarker.h:
461         * rendering/svg/RenderSVGResourceMasker.cpp:
462         (WebCore::RenderSVGResourceMasker::removeClientFromCache):
463         * rendering/svg/RenderSVGResourceMasker.h:
464         * rendering/svg/RenderSVGResourcePattern.cpp:
465         (WebCore::RenderSVGResourcePattern::removeClientFromCache):
466         * rendering/svg/RenderSVGResourcePattern.h:
467         * rendering/svg/RenderSVGResourceSolidColor.h:
468         (WebCore::RenderSVGResourceSolidColor::removeClientFromCache):
469         * rendering/svg/SVGRenderSupport.cpp:
470         (WebCore::invalidateResourcesOfChildren):
471         * rendering/svg/SVGResources.cpp:
472         (WebCore::SVGResources::removeClientFromCache):
473         * rendering/svg/SVGResources.h:
474         * rendering/svg/SVGResourcesCache.cpp:
475         (WebCore::SVGResourcesCache::clientLayoutChanged):
476         (WebCore::SVGResourcesCache::clientStyleChanged):
477         (WebCore::SVGResourcesCache::clientWasAddedToTree):
478         (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
479         (WebCore::SVGResourcesCache::clientDestroyed):
480         * svg/SVGAnimateMotionElement.cpp:
481         (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
482         * svg/SVGCircleElement.cpp:
483         (WebCore::SVGCircleElement::svgAttributeChanged):
484         * svg/SVGEllipseElement.cpp:
485         (WebCore::SVGEllipseElement::svgAttributeChanged):
486         * svg/SVGFEImageElement.cpp:
487         (WebCore::SVGFEImageElement::notifyFinished):
488         * svg/SVGFELightElement.cpp:
489         (WebCore::SVGFELightElement::childrenChanged):
490         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
491         (WebCore::invalidateFilterPrimitiveParent):
492         * svg/SVGFilterPrimitiveStandardAttributes.h:
493         (WebCore::SVGFilterPrimitiveStandardAttributes::invalidate):
494         (WebCore::SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged):
495         * svg/SVGForeignObjectElement.cpp:
496         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
497         * svg/SVGGElement.cpp:
498         (WebCore::SVGGElement::svgAttributeChanged):
499         * svg/SVGGraphicsElement.cpp:
500         (WebCore::SVGGraphicsElement::svgAttributeChanged):
501         * svg/SVGImageElement.cpp:
502         (WebCore::SVGImageElement::svgAttributeChanged):
503         * svg/SVGLineElement.cpp:
504         (WebCore::SVGLineElement::svgAttributeChanged):
505         * svg/SVGPathElement.cpp:
506         (WebCore::SVGPathElement::svgAttributeChanged):
507         (WebCore::SVGPathElement::invalidateMPathDependencies):
508         (WebCore::SVGPathElement::pathSegListChanged):
509         * svg/SVGPolyElement.cpp:
510         (WebCore::SVGPolyElement::svgAttributeChanged):
511         * svg/SVGRectElement.cpp:
512         (WebCore::SVGRectElement::svgAttributeChanged):
513         * svg/SVGSVGElement.cpp:
514         (WebCore::SVGSVGElement::svgAttributeChanged):
515         (WebCore::SVGSVGElement::setupInitialView):
516         * svg/SVGStopElement.cpp:
517         (WebCore::SVGStopElement::svgAttributeChanged):
518         * svg/SVGTRefElement.cpp:
519         (WebCore::SVGTRefElement::svgAttributeChanged):
520         * svg/SVGTextContentElement.cpp:
521         (WebCore::SVGTextContentElement::svgAttributeChanged):
522         * svg/SVGTextPathElement.cpp:
523         (WebCore::SVGTextPathElement::svgAttributeChanged):
524         * svg/SVGTextPositioningElement.cpp:
525         (WebCore::SVGTextPositioningElement::svgAttributeChanged):
526         * svg/SVGUseElement.cpp:
527         (WebCore::SVGUseElement::svgAttributeChanged):
528
529 2013-12-16  Hans Muller  <hmuller@adobe.com>
530
531         [CSS Shapes] Add support for the computing the included intervals for a BoxShape
532         https://bugs.webkit.org/show_bug.cgi?id=124605
533
534         Reviewed by Andreas Kling.
535
536         Setting shape-inside to content-box now works.
537
538         Changed FloatRoundedRect::xInterceptsAtY() to include the bottom edge of
539         the rectangle and to check for the special cases where any or all of the
540         corner radii are empty.
541
542         Test: fast/shapes/shape-inside/shape-inside-content-box.html
543
544         * platform/graphics/FloatRoundedRect.cpp:
545         (WebCore::FloatRoundedRect::xInterceptsAtY):
546         * rendering/shapes/BoxShape.cpp:
547         (WebCore::BoxShape::getIncludedIntervals): Replaced the stub implementation with logic that's similar to getExcludedIntervals().
548         * rendering/shapes/ShapeInfo.cpp:
549         (WebCore::::computedShape): Removed a meaningless assert.
550         * rendering/shapes/ShapeInsideInfo.cpp:
551         (WebCore::ShapeInsideInfo::isEnabledFor):
552
553 2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
554
555         [ATK] Expose accessibility objects for more WAI-ARIA roles
556         https://bugs.webkit.org/show_bug.cgi?id=125596
557
558         Reviewed by Chris Fleizach.
559
560         Exposed accessibility objects with the proper AtkRoles, some of
561         them to be provided by the next stable release of ATK.
562
563         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
564         (atkRole):
565
566 2013-12-16  Eric Carlson  <eric.carlson@apple.com>
567
568         Fix QuickTime plug-in replacement scripting bugs
569         https://bugs.webkit.org/show_bug.cgi?id=125717
570
571         Reviewed by Sam Weinig.
572
573         No new tests, existing test updated.
574
575         * Modules/plugins/QuickTimePluginReplacement.js:
576         (Replacement): Change '' to "" to avoid "Empty character constant" warning when creating
577             Derived Sources.
578         (Replacement.prototype.createVideoElement): Handle qtsrc attribute. Remember base url.
579         (Replacement.prototype.setURL): Resolve urls relative to base.
580
581 2013-12-15  Darin Adler  <darin@apple.com>
582
583         Catch callers who forget to use initializeStyle
584         https://bugs.webkit.org/show_bug.cgi?id=125763
585
586         Reviewed by Andreas Kling.
587
588         A recent fix was because a caller used setStyle first rather than using
589         initializeStyle. This patch adds an assertion to catch cases where we do
590         that so we see the mistake right away instead of indirectly later.
591
592         * rendering/RenderElement.cpp:
593         (WebCore::RenderElement::initializeStyle): Simplified an assertion.
594         (WebCore::RenderElement::setStyle): Added an assertion that m_hasInitializedStyle
595         is true, with an exception for RenderView, which needs to be created before we
596         have the correct style computed for it (at least for now). Also broke out an
597         assertion that was using &&, since we would prefer to know which clause failed,
598         making separate assertions more useful than a combined assertion.
599
600 2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
601
602         [ATK] Expose accessibility objects with ATK_ROLE_CHECK_MENU_ITEM
603         https://bugs.webkit.org/show_bug.cgi?id=125594
604
605         Reviewed by Chris Fleizach.
606
607         Exposed accessibility objects with checkmenuitem role with the
608         proper AtkRole, to be provided by the next stable release of ATK.
609
610         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
611         (atkRole):
612
613 2013-12-16  Mario Sanchez Prada  <mario.prada@samsung.com>
614
615         [ATK] Expose accessibility objects with ATK_ROLE_ARTICLE
616         https://bugs.webkit.org/show_bug.cgi?id=125587
617
618         Reviewed by Chris Fleizach.
619
620         Exposed accessibility objects with article role with the proper
621         AtkRole, to be provided by the next stable release of ATK.
622
623         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
624         (atkRole):
625
626 2013-11-27  Sergio Villar Senin  <svillar@igalia.com>
627
628         [CSS Grid Layout] Fix the preferred logical widths code to work with spanning grid items
629         https://bugs.webkit.org/show_bug.cgi?id=123994
630
631         Reviewed by Andreas Kling.
632
633         From Blink r159189 by <jchaffraix@chromium.org>
634
635         There was no definition in the specs for the intrinsic / preferred
636         logical widths on the grid element. The following was proposed to
637         the WG and later accepted:
638         - The sum of the grid tracks' UsedBreadth is the minimum logical width
639         - The sum of the grid tracks' MaxBreadth is the maximum logical width
640
641         http://lists.w3.org/Archives/Public/www-style/2013Oct/0054.html
642         for more information.
643
644         * rendering/RenderGrid.cpp:
645         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
646         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
647         (WebCore::RenderGrid::minContentForChild):
648         (WebCore::RenderGrid::maxContentForChild):
649         * rendering/RenderGrid.h:
650
651 2013-12-15  Frédéric Wang  <fred.wang@free.fr>
652
653         Add support for maction@toggle
654         https://bugs.webkit.org/show_bug.cgi?id=120059
655
656         Reviewed by Chris Fleizach.
657
658         Test: mathml/presentation/maction-toggle.html
659
660         * mathml/MathMLSelectElement.cpp:
661         (WebCore::MathMLSelectElement::getSelectedChildAndIndex):
662         (WebCore::MathMLSelectElement::updateSelectedChild):
663         (WebCore::MathMLSelectElement::defaultEventHandler):
664         (WebCore::MathMLSelectElement::willRespondToMouseClickEvents):
665         (WebCore::MathMLSelectElement::toggle):
666         * mathml/MathMLSelectElement.h:
667
668 2013-12-15  Darin Adler  <darin@apple.com>
669
670         More nullptr in RenderElement
671         https://bugs.webkit.org/show_bug.cgi?id=125764
672
673         Reviewed by Andreas Kling.
674
675         * rendering/RenderElement.cpp:
676         (WebCore::RenderElement::uncachedFirstLineStyle):
677         (WebCore::RenderElement::updateShapeImage):
678         (WebCore::RenderElement::destroyLeftoverChildren):
679         (WebCore::RenderElement::findNextLayer):
680         Use nullptr in a few more places.
681
682 2013-12-15  Ryosuke Niwa  <rniwa@webkit.org>
683
684         REGRESSION: 2x regression on Dromaeo DOM query tests
685         https://bugs.webkit.org/show_bug.cgi?id=125377
686
687         Reviewed by Filip Pizlo.
688
689         The bug was caused by JSC not JIT'ing property accesses on document because of its having
690         custom named getter (named properties).  This resulted in resolution of methods on document
691         such as getElementById to happen inside the interpreter.
692
693         Fixed the bug by using the new JSC type info flag which tells JSC to JIT property access on
694         document, and then notifying JSC whenever a new named property appeared on document.
695
696         Tests: js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html
697                js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html
698                js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html
699                js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-2.html
700                js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-3.html
701                js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html
702
703         * bindings/js/JSDOMBinding.cpp:
704         (WebCore::addImpureProperty): Wraps VM::addImpureProperty.
705         * bindings/js/JSDOMBinding.h:
706         * bindings/scripts/CodeGeneratorJS.pm:
707         (GenerateHeader): Added the support for NewImpurePropertyFiresWatchpoints.
708         * bindings/scripts/IDLAttributes.txt: Ditto.
709         * html/HTMLDocument.cpp:
710         (WebCore::HTMLDocument::addDocumentNamedItem): Calls addImpureProperty.
711         * html/HTMLDocument.idl: Added NewImpurePropertyFiresWatchpoints.
712
713 2013-12-15  Brent Fulgham  <bfulgham@webkit.org>
714
715         [WIn] Unreviewed build fix after r160599
716
717         * rendering/RenderMediaControls.cpp:
718         (WebCore::determineState): RenderObject::theme now returns
719         a reference.
720
721 2013-12-15  Brent Fulgham  <bfulgham@webkit.org>
722
723         [Win] Unreviewed build fix
724
725         The build system continues to attempt to build QTMovieWin, even
726         though it is excluded from the build solution. I'm actually
727         removing the project files to prevent this.
728
729         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Removed.
730         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj.filters: Removed.
731
732 2013-12-15  Rob Buis  <rob.buis@samsung.com>
733
734         [CSS Shapes] shape-outside animation does not handle 'auto' well
735         https://bugs.webkit.org/show_bug.cgi?id=125700
736
737         Reviewed by Dirk Schulze.
738
739         Handle the case where we are blending/animating with a null ShapeValue due to 'auto'.
740
741         Adapted LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html for testing this.
742
743         * page/animation/CSSPropertyAnimation.cpp:
744         (WebCore::blendFunc):
745
746 2013-12-15  Andy Estes  <aestes@apple.com>
747
748         [iOS] Upstream changes to FeatureDefines.xcconfig
749         https://bugs.webkit.org/show_bug.cgi?id=125742
750
751         Reviewed by Dan Bernstein.
752
753         * Configurations/FeatureDefines.xcconfig:
754
755 2013-12-14  Darin Adler  <darin@apple.com>
756
757         Crash in CSSImageGeneratorValue and RenderScrollbar
758         https://bugs.webkit.org/show_bug.cgi?id=125702
759
760         Reviewed by Alexey Proskuryakov.
761
762         This crash had two causes at two different levels. The crash fixes both.
763
764         At the RenderScrollbar level, we were setting up a new renderer, a
765         RenderScrollbarPart, and never calling initializeStyle. This meant that
766         we did not do proper style setup, which meant we did not end up calling
767         CSSImageGeneratorValue::addClient and so had a removeClient that was not
768         properly balanced by an addClient. This is the primary bug.
769
770         At the CSSImageGeneratorValue level, the addClient and removeClient
771         functions were not properly handling possibly-mismatched calls. It was
772         easy to fix the functions to work even if the calls are not perfectly
773         matched up, which makes the consequences of a missed addClient call
774         much less dire, no longer messing up reference counting. Fixing this
775         mitigates the risk if we made this same mistake elsewhere, although I
776         could not find any other places with some quick searches.
777
778         Test: fast/css/scrollbar-image-crash.html
779
780         * css/CSSImageGeneratorValue.cpp:
781         (WebCore::CSSImageGeneratorValue::addClient): Only call ref if this will
782         add the first client.
783         (WebCore::CSSImageGeneratorValue::removeClient): Only call deref if this
784         removes the last client. Also added an assertion that can fire if we call
785         removeClient without first calling addClient, which is illegal. However,
786         the function handles that case without over-deref'ing itself.
787
788         * rendering/RenderScrollbar.cpp:
789         (WebCore::RenderScrollbar::updateScrollbarPart): Simplify the logic for
790         needRenderer a bit. Use initializeStyle rather than setStyle when first
791         creating the RenderScrollbarPart. Also use add and take properly so we
792         don't do extra hash lookups the old code did with get/set and get/remove.
793
794 2013-12-14  Sam Weinig  <sam@webkit.org>
795
796         CTTE: SVGResourcesCache::cachedResourcesForRenderObject() should take a reference
797         https://bugs.webkit.org/show_bug.cgi?id=125743
798
799         Reviewed by Dan Bernstein.
800
801         * rendering/svg/RenderSVGContainer.cpp:
802         (WebCore::RenderSVGContainer::selfWillPaint):
803         * rendering/svg/RenderSVGImage.cpp:
804         (WebCore::RenderSVGImage::imageChanged):
805         * rendering/svg/RenderSVGResource.cpp:
806         (WebCore::requestPaintingResource):
807         (WebCore::removeFromCacheAndInvalidateDependencies):
808         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
809         * rendering/svg/RenderSVGResourceClipper.cpp:
810         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
811         * rendering/svg/RenderSVGRoot.cpp:
812         (WebCore::RenderSVGRoot::paintReplaced):
813         * rendering/svg/RenderSVGShape.cpp:
814         (WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
815         (WebCore::RenderSVGShape::markerRect):
816         (WebCore::RenderSVGShape::drawMarkers):
817         * rendering/svg/SVGRenderSupport.cpp:
818         (WebCore::invalidateResourcesOfChildren):
819         (WebCore::SVGRenderSupport::layoutChildren):
820         (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
821         (WebCore::SVGRenderSupport::filtersForceContainerLayout):
822         (WebCore::SVGRenderSupport::pointInClippingArea):
823         * rendering/svg/SVGRenderingContext.cpp:
824         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
825         * rendering/svg/SVGResourcesCache.cpp:
826         (WebCore::SVGResourcesCache::cachedResourcesForRenderObject):
827         (WebCore::SVGResourcesCache::clientLayoutChanged):
828         (WebCore::SVGResourcesCache::clientDestroyed):
829         * rendering/svg/SVGResourcesCache.h:
830         * rendering/svg/SVGResourcesCycleSolver.cpp:
831         (WebCore::SVGResourcesCycleSolver::resourceContainsCycles):
832
833 2013-12-14  Dan Bernstein  <mitz@apple.com>
834
835         Clean up the project after r160487
836
837         * WebCore.xcodeproj/project.pbxproj: Moved reference to Security.framework from the top
838         level of the project to the Frameworks group, and made it SDK-relative.
839
840 2013-12-14  Andreas Kling  <akling@apple.com>
841
842         Page::theme() should return a reference.
843         <https://webkit.org/b/125737>
844
845         There's always a RenderTheme, and not a single call site was checking
846         for null pointers anyway. Updated RenderObject::theme() as well.
847
848         Reviewed by Antti Koivisto.
849
850 2013-12-13  Sam Weinig  <sam@webkit.org>
851
852         CTTE: Convert Element and RenderObject iterator usage to use range-based for loops
853         https://bugs.webkit.org/show_bug.cgi?id=125731
854
855         Reviewed by Andreas Kling.
856
857         Perform straight forward conversions. A few stragglers that do odd things remain.
858
859 2013-12-14  Joseph Pecoraro  <pecoraro@apple.com>
860
861         Small string improvements to JSInjectedScriptHost::type and other bindings
862         https://bugs.webkit.org/show_bug.cgi?id=125722
863
864         Reviewed by Timothy Hatcher.
865
866         * bindings/js/JSInjectedScriptHostCustom.cpp:
867         (WebCore::JSInjectedScriptHost::type):
868         Use SmallStrings, jsNontrivialString and ASCIILiteral.
869
870         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
871         (WebCore::JSJavaScriptCallFrame::type):
872         Use jsNontrivialString.
873
874         * bridge/c/c_instance.cpp:
875         (JSC::Bindings::CInstance::stringValue):
876         Use jsNontrivialString and ASCIILiteral.
877
878 2013-12-14  Andreas Kling  <akling@apple.com>
879
880         Move a couple of inlines from RenderObject to RenderElement.
881         <https://webkit.org/b/125734>
882
883         Take most of the inline functions on RenderObject that call style()
884         and move them over to RenderElement where style() is branchless.
885
886         Reviewed by Antti Koivisto.
887
888 2013-12-14  Andreas Kling  <akling@apple.com>
889
890         RenderElement::rendererForRootBackground() should return a reference.
891         <https://webkit.org/b/125735>
892
893         This function always finds a renderer to return.
894
895         Reviewed by Antti Koivisto.
896
897 2013-12-14  Mark Rowe  <mrowe@apple.com>
898
899         Build fix after r160557.
900
901         * Configurations/WebCore.xcconfig: Find JavaScriptCore.framework below SDKROOT so that we'll pick
902         up the built version in production builds rather than the system version.
903
904 2013-12-14  Brendan Long  <b.long@cablelabs.com>
905
906         [GStreamer] Use GMutexLocker instead of g_mutex_lock
907         https://bugs.webkit.org/show_bug.cgi?id=125588
908
909         Reviewed by Philippe Normand.
910
911         No new tests because this is just code simplification.
912
913         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
914         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
915         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
916         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
917         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
918         (webkitVideoSinkTimeoutCallback):
919         (webkitVideoSinkRender):
920         (unlockBufferMutex):
921         (webkitVideoSinkUnlockStop):
922         (webkitVideoSinkStart):
923
924 2013-12-13  Andreas Kling  <akling@apple.com>
925
926         Move RenderObject::repaintAfterLayoutIfNeeded() to RenderElement.
927         <https://webkit.org/b/125712>
928
929         This function is only ever called on RenderElements, so move it there.
930         Removes some RenderObject::style() branchiness.
931
932         Reviewed by Darin Adler.
933
934 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
935
936         Web Inspector: Move Inspector and Debugger protocol domains into JavaScriptCore
937         https://bugs.webkit.org/show_bug.cgi?id=125707
938
939         Reviewed by Timothy Hatcher.
940
941           - Switch TypeBuilder::Page::SearchMatch to TypeBuilder::GenericTypes::SearchMatch
942             which comes from InspectorJSTypeBuilders.
943           - Remove domains that moved to JavaScriptCore.
944
945         No new tests, this only moves code around. There are no functional changes.
946
947         * CMakeLists.txt:
948         * DerivedSources.make:
949         * GNUmakefile.am:
950         Add new files.
951
952         * inspector/ContentSearchUtils.cpp:
953         (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
954         (WebCore::ContentSearchUtils::searchInTextByLines):
955         * inspector/ContentSearchUtils.h:
956         * inspector/InspectorAgent.cpp:
957         * inspector/InspectorAgent.h:
958         * inspector/InspectorDebuggerAgent.h:
959         * inspector/InspectorPageAgent.cpp:
960         (WebCore::InspectorPageAgent::searchInResource):
961         * inspector/InspectorPageAgent.h:
962         * inspector/protocol/Page.json:
963         Update includes and type builder type names.
964
965         * inspector/InspectorDebuggerAgent.cpp:
966         (WebCore::breakpointActionTypeForString):
967         (WebCore::InspectorDebuggerAgent::searchInContent):
968         * inspector/InspectorTimelineAgent.cpp:
969         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
970         Use the new getEnum function names.
971
972 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
973
974         [Win] Remove pre-VS2013 support code.
975         https://bugs.webkit.org/show_bug.cgi?id=125693
976
977         Reviewed by Darin Adler.
978
979         * Modules/webdatabase/DatabaseTracker.cpp:
980         (WebCore::DatabaseTracker::setQuota): Use C99 format arguments
981         * loader/FTPDirectoryParser.cpp:
982         (WebCore::parseOneFTPLine): Ditto
983         * loader/icon/IconDatabase.cpp:
984         (WebCore::IconDatabase::pruneUnretainedIcons): Ditto 
985         * platform/sql/SQLiteDatabase.cpp:
986         (WebCore::SQLiteDatabase::setMaximumSize): Ditto
987
988 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
989
990         SVG bindings are improperly being generated with "fastGetAttribute"
991         https://bugs.webkit.org/show_bug.cgi?id=125670
992
993         Reviewed by Darin Adler.
994
995         A bug was introduced in r152845 that improperly called the
996         IsSVGAnimatedType using the $attribute hash, rather than the
997         expected $attribute->signature->type.
998
999         * bindings/scripts/CodeGenerator.pm:
1000         (GetterExpression): Clean up attribute type confusion.
1001
1002 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
1003
1004         [Win] Unreviewed build fix after r160548
1005
1006         * WebCore.vcxproj/WebCore.vcxproj: Exclude MediaPlayerPrivateQuickTimeVisualContext from
1007         Windows build.
1008         * platform/graphics/MediaPlayer.cpp: Don't use QuickTime as the PlatformMediaEngine.
1009
1010 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
1011
1012         [GTK] Remove Warnings in building about duplicate INSPECTOR variables
1013         https://bugs.webkit.org/show_bug.cgi?id=125710
1014
1015         Reviewed by Tim Horton.
1016
1017         * GNUmakefile.am:
1018
1019 2013-12-13  Roger Fong  <roger_fong@apple.com>
1020
1021         [WebGL] Check for global variable precision mismatch between vertex and fragment shaders.
1022         https://bugs.webkit.org/show_bug.cgi?id=125546.
1023         <rdar://problem/15203364>
1024
1025         Reviewed by Brent Fulgham.
1026
1027         Covered Khronos conformances tests:
1028         webgl/1.0.2/glsl/misc/shader-with-global-variable-precision-mismatch.html
1029
1030         * html/canvas/WebGLRenderingContext.cpp:
1031         (WebCore::WebGLRenderingContext::linkProgram):
1032         * platform/graphics/GraphicsContext3D.h: Rename areProgramSymbolsValid since it currently only serves one purpose.
1033         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1034         (WebCore::GraphicsContext3D::precisionsMatch):
1035
1036 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
1037
1038         [Win] Unreviewed build fix after r160548
1039
1040         * WebCore.vcxproj/WebCoreGenerated.vcxproj: Specify that we are
1041         using the vs120_xp build target for Makefile-based projects.
1042
1043 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
1044
1045         Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain
1046         https://bugs.webkit.org/show_bug.cgi?id=125595
1047
1048         Reviewed by Timothy Hatcher.
1049
1050           - CodeGeneration changed to output Frontend and Backend dispatchers
1051             in namespace Inspector. So update all the agent's appropriately.
1052           - Update Derived Sources code generation to use the Scripts that had
1053             moved to JavaScriptCore. Some ports just use JSC/inspector/scripts
1054             directly, but others have to use the Scripts exported by JSC
1055             in JavaScriptCore's PrivateHeaders.
1056           - Add ForwardingHeaders for the files generated in JavaScriptCore.
1057           - Update the names of Inspector DerivedSources files, since they
1058             were renamed to InspectorWeb*.
1059
1060         No new tests, this only moves code around. There are no functional changes.
1061
1062         * CMakeLists.txt:
1063         * DerivedSources.make:
1064         * ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Added.
1065         * ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Added.
1066         * ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Added.
1067         * GNUmakefile.am:
1068         * GNUmakefile.list.am:
1069         * WebCore.vcxproj/WebCore.vcxproj:
1070         * WebCore.vcxproj/WebCore.vcxproj.filters:
1071         * WebCore.vcxproj/build-generated-files.sh:
1072         * WebCore.xcodeproj/project.pbxproj:
1073         Remove files, rename files, update code generation.
1074
1075         * make-generated-sources.sh:
1076         Update this standalone developer script to fill in the new InspectorScripts variable.
1077
1078         * inspector/ConsoleMessage.h:
1079         * inspector/InjectedScriptHost.cpp:
1080         * inspector/InspectorAgent.cpp:
1081         * inspector/InspectorAgent.h:
1082         * inspector/InspectorApplicationCacheAgent.cpp:
1083         * inspector/InspectorApplicationCacheAgent.h:
1084         * inspector/InspectorCSSAgent.h:
1085         * inspector/InspectorCanvasAgent.cpp:
1086         * inspector/InspectorCanvasAgent.h:
1087         * inspector/InspectorConsoleAgent.cpp:
1088         * inspector/InspectorConsoleAgent.h:
1089         * inspector/InspectorController.cpp:
1090         * inspector/InspectorDOMAgent.cpp:
1091         * inspector/InspectorDOMAgent.h:
1092         * inspector/InspectorDOMDebuggerAgent.cpp:
1093         * inspector/InspectorDOMDebuggerAgent.h:
1094         * inspector/InspectorDOMStorageAgent.cpp:
1095         * inspector/InspectorDOMStorageAgent.h:
1096         * inspector/InspectorDatabaseAgent.cpp:
1097         * inspector/InspectorDatabaseAgent.h:
1098         * inspector/InspectorDatabaseResource.cpp:
1099         * inspector/InspectorDatabaseResource.h:
1100         * inspector/InspectorDebuggerAgent.cpp:
1101         * inspector/InspectorDebuggerAgent.h:
1102         * inspector/InspectorFrontendClientLocal.cpp:
1103         * inspector/InspectorHeapProfilerAgent.h:
1104         * inspector/InspectorIndexedDBAgent.cpp:
1105         * inspector/InspectorIndexedDBAgent.h:
1106         * inspector/InspectorInputAgent.h:
1107         * inspector/InspectorLayerTreeAgent.cpp:
1108         * inspector/InspectorLayerTreeAgent.h:
1109         * inspector/InspectorMemoryAgent.cpp:
1110         * inspector/InspectorMemoryAgent.h:
1111         * inspector/InspectorPageAgent.cpp:
1112         * inspector/InspectorPageAgent.h:
1113         * inspector/InspectorProfilerAgent.cpp:
1114         * inspector/InspectorProfilerAgent.h:
1115         * inspector/InspectorResourceAgent.cpp:
1116         * inspector/InspectorResourceAgent.h:
1117         * inspector/InspectorRuntimeAgent.h:
1118         * inspector/InspectorTimelineAgent.cpp:
1119         * inspector/InspectorTimelineAgent.h:
1120         * inspector/InspectorWorkerAgent.cpp:
1121         * inspector/InspectorWorkerAgent.h:
1122         * inspector/PageRuntimeAgent.h:
1123         * inspector/ScriptCallFrame.cpp:
1124         * inspector/WorkerInspectorController.cpp:
1125         * inspector/WorkerRuntimeAgent.h:
1126         Updates header names and class namespace changes.
1127
1128 2013-12-13  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1129
1130         Adding RTCPeerConnectionErrorCallback
1131         https://bugs.webkit.org/show_bug.cgi?id=125574
1132
1133         Reviewed by Eric Carlson.
1134
1135         According to the spec there should be a RTCPeerConnectionErrorCallback function type for createOffer/Answer,
1136         setLocal/RemoteDescription and updateIce function calls. This callback must handle a DOMError object.
1137
1138         Existing tests were updated.
1139
1140         * CMakeLists.txt:
1141         * GNUmakefile.list.am:
1142         * Modules/mediastream/RTCPeerConnection.cpp:
1143         (WebCore::RTCPeerConnection::createOffer):
1144         (WebCore::RTCPeerConnection::createAnswer):
1145         (WebCore::RTCPeerConnection::setLocalDescription):
1146         (WebCore::RTCPeerConnection::setRemoteDescription):
1147         (WebCore::RTCPeerConnection::addIceCandidate):
1148         * Modules/mediastream/RTCErrorCallback.h: Removed.
1149         * Modules/mediastream/RTCErrorCallback.idl: Removed.
1150         * Modules/mediastream/RTCPeerConnection.h:
1151         * Modules/mediastream/RTCPeerConnection.idl:
1152         * Modules/mediastream/RTCPeerConnectionErrorCallback.h: Added.
1153         * Modules/mediastream/RTCPeerConnectionErrorCallback.idl: Added.
1154         * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
1155         (WebCore::RTCSessionDescriptionRequestImpl::create):
1156         (WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
1157         (WebCore::RTCSessionDescriptionRequestImpl::requestFailed):
1158         * Modules/mediastream/RTCSessionDescriptionRequestImpl.h:
1159         * Modules/mediastream/RTCVoidRequestImpl.cpp:
1160         (WebCore::RTCVoidRequestImpl::create):
1161         (WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl):
1162         (WebCore::RTCVoidRequestImpl::requestFailed):
1163         * Modules/mediastream/RTCVoidRequestImpl.h:
1164         * WebCore.xcodeproj/project.pbxproj:
1165         * platform/mediastream/RTCPeerConnectionHandler.cpp:
1166         (WebCore::RTCPeerConnectionHandler::incompatibleConstraintsErrorName):
1167         (WebCore::RTCPeerConnectionHandler::invalidSessionDescriptionErrorName):
1168         (WebCore::RTCPeerConnectionHandler::incompatibleSessionDescriptionErrorName):
1169         (WebCore::RTCPeerConnectionHandler::internalErrorName):
1170         * platform/mediastream/RTCPeerConnectionHandler.h:
1171         * platform/mock/RTCNotifiersMock.cpp:
1172         (WebCore::SessionRequestNotifier::SessionRequestNotifier):
1173         (WebCore::SessionRequestNotifier::fire):
1174         (WebCore::VoidRequestNotifier::VoidRequestNotifier):
1175         (WebCore::VoidRequestNotifier::fire):
1176         * platform/mock/RTCNotifiersMock.h:
1177         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
1178         (WebCore::RTCPeerConnectionHandlerMock::createOffer):
1179         (WebCore::RTCPeerConnectionHandlerMock::createAnswer):
1180
1181 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
1182
1183         [Win] Switch WebKit solution to Visual Studio 2013
1184         https://bugs.webkit.org/show_bug.cgi?id=125192
1185
1186         Reviewed by Anders Carlsson.
1187
1188         * WebCore.vcxproj/WebCore.vcxproj: Update for VS2013
1189         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
1190         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto
1191
1192 2013-12-13  Alexey Proskuryakov  <ap@apple.com>
1193
1194         WebCrypto Key.usages should be ordered alphabetically
1195         https://bugs.webkit.org/show_bug.cgi?id=125696
1196
1197         Reviewed by Darin Adler.
1198
1199         * crypto/CryptoKey.cpp: (WebCore::CryptoKey::usages): Do it.
1200
1201 2013-12-13  Darin Adler  <darin@apple.com>
1202
1203         Make some optimizations for DOM bindings involving vectors
1204         https://bugs.webkit.org/show_bug.cgi?id=125680
1205
1206         Reviewed by Andreas Kling.
1207
1208         * bindings/js/JSDOMBinding.h:
1209         (WebCore::toJS): Removed unnecessary copying of vectors when converting them
1210         to JavaScript values.
1211         (WebCore::toRefPtrNativeArray): Use reserveInitialCapacity and uncheckedAppend.
1212         (WebCore::toNativeArray): Ditto.
1213         (WebCore::toNativeArguments): Ditto.
1214
1215 2013-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1216
1217         REGRESSION(r155784): [GTK] Some methods incorrectly removed in r155784 and deprecated in r158662
1218         https://bugs.webkit.org/show_bug.cgi?id=125692
1219
1220         Reviewed by Martin Robinson.
1221
1222         In r155784 the build was fixed by skipping Console::profile() and
1223         Console::profileEnd(), but the patch also skipped other methods
1224         containing the profile method name. Those were incorrectly
1225         deprecated in r158662 thinking that the property had been removed
1226         in the idl.
1227
1228         * bindings/gobject/WebKitDOMDeprecated.cpp: Undeprecate
1229         webkit_dom_html_head_element_get_profile and
1230         webkit_dom_html_head_element_set_profile.
1231         * bindings/gobject/WebKitDOMDeprecated.h: Ditto.
1232         * bindings/gobject/WebKitDOMDeprecated.symbols: Ditto.
1233         * bindings/scripts/CodeGeneratorGObject.pm:
1234         (SkipFunction): Skip webkit_dom_console_profile and
1235         webkit_dom_console_profile_end.
1236
1237 2013-12-13  Rob Buis  <rob.buis@samsung.com>
1238
1239         Clean up SVGScriptElement
1240         https://bugs.webkit.org/show_bug.cgi?id=125527
1241
1242         Reviewed by Darin Adler.
1243
1244         From the Blink port of this bug it becomes clear that svg/dom/SVGScriptElement/script-set-href.svg and
1245         svg/dom/svg-element-attribute-js-null.xhtml still hit an assert in Debug because SVGNames::typeAttr can't
1246         be used with fastGetAttribute in all cases, because it can be animatable. However for SVGScriptElement
1247         it is not animatable, so make isAnimatableAttribute virtual (note Debug only method) and allow typeAttr
1248         in the SVGScriptElement case to be useable for fastGetAttribute.
1249
1250         Test: svg/dom/SVGScriptElement/script-type-attribute.svg
1251
1252         * svg/SVGElement.h:
1253         * svg/SVGScriptElement.cpp:
1254         (WebCore::SVGScriptElement::isAnimatableAttribute):
1255         * svg/SVGScriptElement.h:
1256
1257 2013-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1258
1259         [GTK] Expose also webkit_dom_document_get_url
1260         https://bugs.webkit.org/show_bug.cgi?id=125691
1261
1262         Reviewed by Martin Robinson.
1263
1264         For some reason we expose the URL property, so it can be accessed
1265         with g_object_get(), but we have a special case to not provide a
1266         public getter.
1267
1268         * bindings/gobject/webkitdom.symbols: Add new symbol.
1269         * bindings/scripts/CodeGeneratorGObject.pm:
1270         (GenerateFunctions): Remove the special case of URL property.
1271
1272 2013-12-13  Andreas Kling  <akling@apple.com>
1273
1274         CSSFilterImageValue constructor should require both image and filter.
1275         <https://webkit.org/b/125056>
1276
1277         Make the CSSFilterImageValue::create() helper take both the image and
1278         filter CSSValues by PassRef since they should never be null.
1279
1280         Tweaked ComputedStyleExtractor::valueForFilter() to return a PassRef
1281         for this to work.
1282
1283         Reviewed by Anders Carlsson.
1284
1285 2013-12-12  Andreas Kling  <akling@apple.com>
1286
1287         StyleResolver::adjustRenderStyle() should take RenderStyle references.
1288         <https://webkit.org/b/125623>
1289
1290         This function doesn't handle null styles being passed, so prevent
1291         it at compile time.
1292
1293         Reviewed by Anders Carlsson.
1294
1295 2013-12-13  Darin Adler  <darin@apple.com>
1296
1297         Eliminate awkward virtualComputedStyle construction
1298         https://bugs.webkit.org/show_bug.cgi?id=125681
1299
1300         Reviewed by Andreas Kling.
1301
1302         * dom/Element.cpp:
1303         (WebCore::Element::computedStyle): Tweak coding style a bit.
1304
1305         * dom/Element.h: Marked computedStyle virtual and got rid of virtualComputedStyle.
1306         This fixes a bug that we would not call SVGElement::computedStyle if we called
1307         it through an Element pointer or reference. Not sure how to get test coverage for this.
1308
1309         * dom/Node.cpp:
1310         (WebCore::Node::computedStyle): Use a loop instead of recursive virtual calls.
1311
1312         * dom/Node.h: Made computedStyle virtual and got rid of virtualComputedStyle.
1313
1314         * svg/SVGElement.cpp:
1315         (WebCore::SVGElement::computedStyle): Tweak coding style a bit.
1316
1317         * svg/SVGElement.h: Made computedStyle virtual (and FINAL) and got rid fo
1318         virtualComputedStyle.
1319
1320 2013-12-13  Darin Adler  <darin@apple.com>
1321
1322         Fix a couple stray uses of RefPtr that should release
1323         https://bugs.webkit.org/show_bug.cgi?id=125679
1324
1325         Reviewed by Andreas Kling.
1326
1327         * css/CSSParser.cpp:
1328         (WebCore::CSSParser::parseFilter): Add calls to release, in
1329         one case rearranging the order of operations slightly so we
1330         don't release the pointer before using it.
1331
1332 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
1333
1334         WebCrypto wrapKey operation doesn't check key usage
1335         https://bugs.webkit.org/show_bug.cgi?id=125675
1336
1337         Reviewed by Darin Adler.
1338
1339         Tests: crypto/subtle/unwrapKey-check-usage.html
1340                crypto/subtle/wrapKey-check-usage.html
1341
1342         * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::wrapKey):
1343         Added accidentally omitted code. Other operations are fine.
1344
1345 2013-12-12  Darin Adler  <darin@apple.com>
1346
1347         Make some improvements in CSSImageGeneratorValue code
1348         https://bugs.webkit.org/show_bug.cgi?id=125676
1349
1350         Reviewed by Simon Fraser.
1351
1352         * css/CSSCrossfadeValue.cpp:
1353         (WebCore::subimageKnownToBeOpaque): Take a reference to the CSSValue, since
1354         it's known not to be null. Used checked cast.
1355         (WebCore::CSSCrossfadeValue::knownToBeOpaque): Updated to pass a reference.
1356
1357         * css/CSSImageGeneratorValue.cpp:
1358         (WebCore::CSSImageGeneratorValue::saveCachedImageForSize): Use
1359         make_unique instead of adoptPtr.
1360         (WebCore::CSSImageGeneratorValue::subimageIsPending): Use checked cast.
1361         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto, also
1362         use nullptr.
1363
1364         * css/CSSImageGeneratorValue.h: Removed unneeded includes, added some forward
1365         declarations, used unique_ptr instead of OwnPtr, and used CSS_VALUE_TYPE_CASTS
1366         macro to create cast functions.
1367
1368         * css/CSSValue.cpp: Removed unneeded include of CSSImageGeneratorValue.h.
1369
1370         * css/StyleResolver.cpp:
1371         (WebCore::StyleResolver::State::clear): Use nullptr instead of 0.
1372         (WebCore::StyleResolver::applyProperty): Use checked cast and pass references
1373         instead of pointers to StyleGeneratedImage::create.
1374         (WebCore::StyleResolver::styleImage): Use checked cast and pass references
1375         instead of pointers to generatedOrPendingFromValue.
1376         (WebCore::StyleResolver::generatedOrPendingFromValue): Take the value as a
1377         reference instead of a pointer.
1378         (WebCore::StyleResolver::loadPendingImage): Pass a refernece instead of a
1379         pointer to StyleGeneratedImage::create.
1380         (WebCore::StyleResolver::loadPendingImages): Use auto for iteration instead of
1381         a lot type name.
1382
1383         * css/StyleResolver.h: Changed generatedOrPendingFromValue to take the value
1384         as a reference instead of a pointer.
1385
1386         * page/animation/CSSPropertyAnimation.cpp:
1387         (WebCore::blendFilter): Pass a reference insted of a pointer to
1388         StyleGeneratedImage::create.
1389         (WebCore::crossfadeBlend): Ditto.
1390         (WebCore::blendFunc): Ditto. Also use references for local variables.
1391
1392         * rendering/style/StyleGeneratedImage.cpp:
1393         (WebCore::StyleGeneratedImage::StyleGeneratedImage): Use PassRef instead of
1394         PassRefPtr for the argument type.
1395         (WebCore::StyleGeneratedImage::cssValue): Updated since m_imageGeneratorValue
1396         is now a Ref instead of a RefPtr. Sadly this requires a const_cast that we can
1397         come back and get rid of later.
1398         (WebCore::StyleGeneratedImage::imageSize): Ditto.
1399         (WebCore::StyleGeneratedImage::image): Ditto.
1400
1401         * rendering/style/StyleGeneratedImage.h: Changed create function and constructor
1402         to take a PassRef. Made imageValue non-const since it returns a non-const value,
1403         to be consistent with "conceptual const". Changed m_imageGeneratorValue to be a
1404         Ref instead of a RefPtr.
1405
1406         * rendering/style/StyleImage.h: Made WrappedImagePtr be const void*, since it's
1407         a pointer used only for equality checks. Not a great idiom, but fine to use a
1408         const pointer instead of non-const, and avoids the const_cast we'd otherwise
1409         need in StyleGeneratedImage::data.
1410
1411 2013-12-12  KyungTae Kim  <ktf.kim@samsung.com>
1412
1413         Improve the find word boundary performance
1414         https://bugs.webkit.org/show_bug.cgi?id=125619
1415
1416         In endWordBoundary case, the textBreakPrevious call in findWordBoundary is unnecessary.
1417         So use separate function for endWordBoundary can improve the performance.
1418
1419         Reviewed by Darin Adler.
1420
1421         No tests because no operation changes.
1422
1423         * editing/VisibleUnits.cpp: Use findEndWordBoundary in endWordBoundary
1424         (WebCore::endWordBoundary):
1425         * platform/text/TextBoundaries.cpp: Add findEndWordBoundary function
1426         (WebCore::findEndWordBoundary):
1427         * platform/text/TextBoundaries.h:
1428         * platform/text/mac/TextBoundaries.mm: Add findEndWordBoundary function
1429         (WebCore::findEndWordBoundary):
1430
1431 2013-12-12  Benjamin Poulain  <bpoulain@apple.com>
1432
1433         Fix a silly mistake of r160467
1434         https://bugs.webkit.org/show_bug.cgi?id=125657
1435
1436         Reviewed by Alexey Proskuryakov.
1437
1438         Fix a typo. The validity check was missing the logical not.
1439
1440         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1441         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
1442         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
1443         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
1444         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
1445         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
1446         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
1447         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
1448         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
1449         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage):
1450         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
1451         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
1452
1453 2013-12-12  Tim Horton  <timothy_horton@apple.com>
1454
1455         [wk2] Handle pinch-to-zoom gesture
1456         https://bugs.webkit.org/show_bug.cgi?id=125604
1457
1458         Reviewed by Simon Fraser.
1459
1460         * WebCore.exp.in:
1461         Export some TransformationMatrix functions.
1462
1463         * WebCore.xcodeproj/project.pbxproj:
1464         Make some headers private so that RenderLayerCompositor/Backing can be used from WebKit2.
1465
1466         * rendering/RenderLayerCompositor.h:
1467         (WebCore::RenderLayerCompositor::layerForContentShadow):
1468         Add a getter for the content shadow layer.
1469
1470 2013-12-12  Brady Eidson  <beidson@apple.com>
1471
1472         DatabaseProcess IndexedDB: Establish a metadata backing store on disk
1473         https://bugs.webkit.org/show_bug.cgi?id=125258
1474
1475         Reviewed by Alexey Proskuryakov, Anders Carlsson, and Tim Horton.
1476
1477         Teach CrossThreadCopier how to handle IDBDatabaseMetadata.
1478
1479         * CMakeLists.txt:
1480         * GNUmakefile.list.am:
1481         * WebCore.exp.in:
1482         * WebCore.xcodeproj/project.pbxproj:
1483
1484         * Modules/indexeddb/IDBDatabaseMetadata.cpp: Added.
1485         (WebCore::IDBDatabaseMetadata::isolatedCopy):
1486         (WebCore::IDBObjectStoreMetadata::isolatedCopy):
1487         (WebCore::IDBIndexMetadata::isolatedCopy):
1488         * Modules/indexeddb/IDBDatabaseMetadata.h:
1489
1490         * Modules/indexeddb/IDBKeyPath.cpp:
1491         (WebCore::IDBKeyPath::isolatedCopy):
1492         * Modules/indexeddb/IDBKeyPath.h:
1493
1494         * platform/CrossThreadCopier.cpp:
1495         (WebCore::::copy): Add an IDBDatabaseMetadata specialization.
1496         * platform/CrossThreadCopier.h:
1497
1498 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
1499
1500         Add support for RSAES-PKCS1-v1_5
1501         https://bugs.webkit.org/show_bug.cgi?id=125647
1502
1503         Build fix.
1504
1505         * crypto/CommonCryptoUtilities.h: Declare a newly used private constant.
1506
1507 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
1508
1509         Add support for RSAES-PKCS1-v1_5
1510         https://bugs.webkit.org/show_bug.cgi?id=125647
1511
1512         Reviewed by Anders Carlsson.
1513
1514         Tests: crypto/subtle/rsaes-pkcs1-v1_5-decrypt.html
1515                crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html
1516
1517         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
1518         * crypto/algorithms/CryptoAlgorithmAES_KW.h:
1519         Removed meaningless parameters arguments from private functions. The base arguments
1520         class is always empty.
1521
1522         * WebCore.xcodeproj/project.pbxproj:
1523         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
1524         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
1525         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
1526         * bindings/js/JSCryptoKeySerializationJWK.cpp:
1527         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
1528         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid):
1529         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
1530         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: Added.
1531         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::CryptoAlgorithmRSAES_PKCS1_v1_5):
1532         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::~CryptoAlgorithmRSAES_PKCS1_v1_5):
1533         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::create):
1534         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::identifier):
1535         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::keyAlgorithmMatches):
1536         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
1537         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
1538         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
1539         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
1540         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h: Added.
1541         * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp: Added.
1542         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
1543         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
1544         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
1545         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
1546         Added support for this algorithm.
1547
1548 2013-12-12  Andreas Kling  <akling@apple.com>
1549
1550         [Mac] Stop not caching HTTP resources with "Vary" header in response.
1551         <https://webkit.org/b/125483>
1552         <rdar://problem/11781097>
1553
1554         Remove the workaround preventing resources with the "Vary" header
1555         from going into cache, as the CFNetwork cache has supported this
1556         for quite a while now.
1557
1558         31.5 MB progression on Membuster3, because we can now mmap those
1559         resources from disk once they are in the cache.
1560
1561         We keep the workaround on PLATFORM(WIN) for now.
1562
1563         Reviewed by Antti Koivisto.
1564
1565 2013-12-12  Sam Weinig  <sam@webkit.org>
1566
1567         Replace uses of WTF::BitArray with std::bitset
1568         https://bugs.webkit.org/show_bug.cgi?id=125642
1569
1570         Reviewed by Anders Carlsson.
1571
1572         * css/CSSParser.cpp:
1573         (WebCore::filterProperties):
1574         (WebCore::CSSParser::createStyleProperties):
1575         * css/StyleProperties.cpp:
1576         (WebCore::StyleProperties::asText):
1577
1578 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
1579
1580         Public key in a generated KeyPair should always be extractable
1581         https://bugs.webkit.org/show_bug.cgi?id=125643
1582
1583         Reviewed by Sam Weinig.
1584
1585         The spec doesn't explain how generateKey works with key pairs (there are open bugs
1586         about that). Making public keys non-extractable makes no sense one way or another.
1587
1588         Test: crypto/subtle/rsa-oaep-generate-non-extractable-key.html
1589
1590         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::generatePair):
1591
1592 2013-12-12  Alexey Proskuryakov  <ap@apple.com>
1593
1594         Make algorithm.name return registered name, not normalized one
1595         https://bugs.webkit.org/show_bug.cgi?id=125641
1596
1597         Reviewed by Anders Carlsson.
1598
1599         Currently, WebCrypto editor's draft stipulates that algorithm name is lowercased
1600         as part of normalization.
1601
1602         But it makes little sense to register algorithms as mixed (mostly upper) case, yet
1603         return the name lowercased. Other implementations don't bother respecting this,
1604         and signs are that the spec will change.
1605
1606         I'd like to match other implementations here, because sticking to the spec only
1607         makes us fail 3rd party test suites for no good reason.
1608
1609         Updated many existing tests.
1610
1611         * crypto/CryptoAlgorithmRegistry.cpp:
1612         (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
1613         (WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
1614         * crypto/CryptoAlgorithmRegistry.h:
1615         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
1616         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
1617         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
1618         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
1619         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
1620         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
1621         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
1622         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
1623         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
1624         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
1625
1626 2013-12-12  Csaba Osztrogonác  <ossy@webkit.org>
1627
1628         Move CertificateInfo to WebCore
1629         https://bugs.webkit.org/show_bug.cgi?id=124720
1630
1631         Reviewed by Darin Adler.
1632
1633         Based on the patch by Kwang Yul Seo <skyul@company100.net>
1634
1635         * GNUmakefile.list.am:
1636         * PlatformEfl.cmake:
1637         * PlatformGTK.cmake:
1638         * WebCore.exp.in:
1639         * WebCore.xcodeproj/project.pbxproj:
1640         * platform/network/mac/CertificateInfo.h: Renamed from Source/WebKit2/Shared/mac/CertificateInfo.h.
1641         (WebCore::CertificateInfo::setCertificateChain): Added, because WebCoreArgumentCoders needs it.
1642         * platform/network/mac/CertificateInfoMac.mm: Renamed from Source/WebKit2/Shared/mac/CertificateInfo.mm.
1643         (WebCore::CertificateInfo::CertificateInfo): Moved encode() and decode() to WebCoreArgumentCodersMac.mm.
1644         * platform/network/soup/CertificateInfo.cpp: Copied from Source/WebKit2/Shared/WebCertificateInfo.h.
1645         (WebCore::CertificateInfo::CertificateInfo): Moved encode() and decode() to WebCoreArgumentCodersSoup.cpp.
1646         * platform/network/soup/CertificateInfo.h: Renamed from Source/WebKit2/Shared/soup/CertificateInfo.h.
1647         (WebCore::CertificateInfo::setCertificate): Added, because WebCoreArgumentCoders needs it.
1648         (WebCore::CertificateInfo::setTLSErrors): Added, because WebCoreArgumentCoders needs it.
1649
1650 2013-12-12  Commit Queue  <commit-queue@webkit.org>
1651
1652         Unreviewed, rolling out r160417.
1653         http://trac.webkit.org/changeset/160417
1654         https://bugs.webkit.org/show_bug.cgi?id=125629
1655
1656         The patch is causing crashes (Requested by zdobersek1 on
1657         #webkit).
1658
1659         * accessibility/AXObjectCache.cpp:
1660         (WebCore::AXObjectCache::~AXObjectCache):
1661         (WebCore::AXObjectCache::remove):
1662         * accessibility/AXObjectCache.h:
1663         (WebCore::AXObjectCache::detachWrapper):
1664         * accessibility/atk/AXObjectCacheAtk.cpp:
1665         (WebCore::AXObjectCache::detachWrapper):
1666         (WebCore::AXObjectCache::attachWrapper):
1667         (WebCore::AXObjectCache::postPlatformNotification):
1668         * accessibility/ios/AXObjectCacheIOS.mm:
1669         (WebCore::AXObjectCache::detachWrapper):
1670         * accessibility/mac/AXObjectCacheMac.mm:
1671         (WebCore::AXObjectCache::detachWrapper):
1672         * accessibility/win/AXObjectCacheWin.cpp:
1673         (WebCore::AXObjectCache::detachWrapper):
1674
1675 2013-12-12  Martin Robinson  <mrobinson@igalia.com>
1676
1677         Remove a few more guards mistakenly added in r160367
1678
1679         Reviewed by Carlos Garcia Campos
1680
1681         r160367 was too liberal in hiding APIs from the GObject DOM bindings.
1682         We should expose the BatteryManager and the text and audio tracks.
1683
1684         * Modules/battery/BatteryManager.idl:
1685         * html/HTMLMediaElement.idl:
1686
1687 2013-12-11  Darin Adler  <darin@apple.com>
1688
1689         StylePendingImage needs to correctly manage the CSSValue pointer lifetime
1690         https://bugs.webkit.org/show_bug.cgi?id=125468
1691
1692         Reviewed by Andreas Kling.
1693
1694         Test: fast/css/pending-image-crash.xhtml
1695
1696         Disconnect the reference counted StylePendingImage from the CSSValue that owns
1697         it when it's not needed any more, otherwise we could end up using a pointer
1698         that might no longer be valid.
1699
1700         * css/CSSCursorImageValue.cpp:
1701         (WebCore::CSSCursorImageValue::detachPendingImage): Added. Calls detachFromCSSValue
1702         on the current image if it is a StylePendingImage.
1703         (WebCore::CSSCursorImageValue::~CSSCursorImageValue): Call detachPendingImage.
1704         (WebCore::CSSCursorImageValue::cachedImage): Call detachPendingImage before changing
1705         m_image to a new value.
1706         (WebCore::CSSCursorImageValue::clearCachedImage): Ditto.
1707         * css/CSSCursorImageValue.h: Added detachPendingImage.
1708
1709         * css/CSSImageSetValue.cpp:
1710         (WebCore::CSSImageSetValue::detachPendingImage): Added. Calls detachFromCSSValue
1711         on the current image set if it is a StylePendingImage.
1712         (WebCore::CSSImageSetValue::~CSSImageSetValue): Call detachPendingImage.
1713         (WebCore::CSSImageSetValue::cachedImageSet): Call detachPendingImage before changing
1714         m_imageSet to a new value.
1715         * css/CSSImageSetValue.h: Added detachPendingImage.
1716
1717         * css/CSSImageValue.cpp:
1718         (WebCore::CSSImageValue::detachPendingImage): Added. Calls detachFromCSSValue on the
1719         current image if it is a StylePendingImage.
1720         (WebCore::CSSImageValue::~CSSImageValue): Call detachPendingImage.
1721         (WebCore::CSSImageValue::cachedImage): Call detachPendingImage before changing m_image
1722         to a new value.
1723         * css/CSSImageValue.h: Added detachPendingImage.
1724
1725         * rendering/style/StylePendingImage.h:
1726         (WebCore::StylePendingImage::cssImageValue): Added a null check.
1727         (WebCore::StylePendingImage::cssImageGeneratorValue): Added a null check.
1728         (WebCore::StylePendingImage::cssCursorImageValue): Added a null check.
1729         (WebCore::StylePendingImage::cssImageSetValue): Added a null check.
1730         (WebCore::StylePendingImage::detachFromCSSValue): Added. Sets m_value to null since
1731         the style is no longer using this StylePendingImage.
1732         (WebCore::StylePendingImage::data): Changed to use the "this" pointer since all we
1733         need is some arbitrary pointer uniquely identifying the image. Before loading the image,
1734         we have no suitable weak identifier, so it suffices to use the unique pointer to each
1735         StylePendingImage object. This function is used only in a limited way; it would be nice
1736         to find a way to make the code less strange long term.
1737
1738 2013-12-11  Darin Adler  <darin@apple.com>
1739
1740         Remove some unneeded code noticed while looking at StylePendingImage
1741         https://bugs.webkit.org/show_bug.cgi?id=125618
1742
1743         Reviewed by Andreas Kling.
1744
1745         * css/StyleResolver.cpp:
1746         (WebCore::StyleResolver::loadPendingImage): Removed redundant function calls.
1747
1748         * rendering/RenderImageResource.cpp: Removed unneeded nullImage and
1749         usesImageContainerSize member functions.
1750         (WebCore::RenderImageResource::image): Use Image::nullImage directly instead of
1751         through RenderImageResourceImage::nullImage.
1752
1753         * rendering/RenderImageResource.h: Removed unneeded usesImageContainerSize
1754         and nullImage functions. Also removed unneeded includes.
1755
1756         * rendering/RenderImageResourceStyleImage.h: Removed unneeded
1757         usesImageContainerSize override. Nobody was calling it.
1758
1759 2013-12-11  Benjamin Poulain  <bpoulain@apple.com>
1760
1761         Add the CFNetwork implementation of the asynchronous ResourceHandle
1762         https://bugs.webkit.org/show_bug.cgi?id=124440
1763
1764         Reviewed by Alexey Proskuryakov.
1765
1766         Add a second subclass of ResourceHandleCFURLConnectionDelegate: ResourceHandleCFURLConnectionDelegateWithOperationQueue.
1767         The difference is those objects handle the network callback on a different queue.
1768
1769         Some common code has been refactored in ResourceHandleCFURLConnectionDelegate to reduce duplicated code.
1770
1771         The initialization of the request and connection is moved to the subclass to clean up initialization.
1772
1773         * WebCore.xcodeproj/project.pbxproj:
1774         * platform/network/ResourceHandle.h:
1775         * platform/network/ResourceHandleClient.cpp:
1776         (WebCore::ResourceHandleClient::willCacheResponseAsync):
1777         * platform/network/ResourceHandleClient.h:
1778         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: Added.
1779         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::ResourceHandleCFURLConnectionDelegateWithOperationQueue):
1780         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::~ResourceHandleCFURLConnectionDelegateWithOperationQueue):
1781         (WebCore::connectionWasCancelled):
1782         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
1783         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupConnectionScheduling):
1784         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
1785         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
1786         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
1787         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
1788         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
1789         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
1790         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
1791         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
1792         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage):
1793         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
1794         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
1795         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueWillSendRequest):
1796         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueDidReceiveResponse):
1797         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueShouldUseCredentialStorage):
1798         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueWillCacheResponse):
1799         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueCanAuthenticateAgainstProtectionSpace):
1800         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h: Copied from Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h.
1801         * platform/network/cf/ResourceHandleCFNet.cpp:
1802         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1803         (WebCore::ResourceHandle::createCFURLConnection):
1804         (WebCore::ResourceHandle::start):
1805         (WebCore::ResourceHandle::shouldUseCredentialStorage):
1806         (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace):
1807         (WebCore::ResourceHandle::continueWillSendRequest):
1808         (WebCore::ResourceHandle::continueDidReceiveResponse):
1809         (WebCore::ResourceHandle::continueShouldUseCredentialStorage):
1810         (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace):
1811         (WebCore::ResourceHandle::continueWillCacheResponse):
1812         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
1813         (WebCore::ResourceHandleCFURLConnectionDelegate::releaseHandle):
1814         (WebCore::ResourceHandleCFURLConnectionDelegate::synthesizeRedirectResponseIfNecessary):
1815         (WebCore::ResourceHandleCFURLConnectionDelegate::createResourceRequest):
1816         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
1817         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
1818         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
1819         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
1820         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest):
1821         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueWillSendRequest):
1822         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueDidReceiveResponse):
1823         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueShouldUseCredentialStorage):
1824         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueWillCacheResponse):
1825         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::continueCanAuthenticateAgainstProtectionSpace):
1826         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
1827
1828 2013-12-11  David Kilzer  <ddkilzer@apple.com>
1829
1830         Define m_hasBadParent in InlineBox if defined(ADDRESS_SANITIZER)
1831         <http://webkit.org/b/125329>
1832
1833         Reviewed by Darin Adler.
1834
1835         No tests since this is a build fix for:
1836
1837             $ ./Tools/Scripts/build-webkit --release OTHER_CFLAGS="$inherited -DADDRESS_SANITIZER=1"
1838
1839         * rendering/InlineBox.cpp:
1840         * rendering/InlineBox.h:
1841         - Replace ASSERT_DISABLED use with
1842           ASSERT_WITH_SECURITY_IMPLICATION_DISABLED for m_hasBadParent.
1843
1844         * rendering/InlineFlowBox.cpp:
1845         (WebCore::InlineFlowBox::~InlineFlowBox):
1846         - Use !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED instead of
1847           #ifndef NDEBUG since this calls setHasBadParent().
1848         (WebCore::InlineFlowBox::checkConsistency):
1849         - Move ASSERT(!m_hasBadChildList) outside of
1850           #if CHECK_CONSISTENCY and change to
1851           ASSERT_WITH_SECURITY_IMPLICATION(!m_hasBadChildList).
1852
1853         * rendering/InlineFlowBox.h:
1854         (WebCore::InlineFlowBox::InlineFlowBox):
1855         (WebCore::InlineFlowBox::setHasBadChildList):
1856         - Change #ifndef NDEBUG to
1857           #if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED for code using
1858           m_hasBadChildList.
1859
1860 2013-12-11  Ralph Thomas  <ralpht@gmail.com>
1861
1862         [WebGL] Fix build on GL ES 2.0 targets after r160119
1863         https://bugs.webkit.org/show_bug.cgi?id=125541
1864
1865         Reviewed by Brent Fulgham.
1866
1867         GL ES 2.0 doesn't define GL_HALF_FLOAT_ARB, so pass through HALF_FLOAT_OES (which is defined for GL ES 2.0).
1868         This change also reverts r160324 which incorrectly defined GL_HALF_FLOAT_ARB for the Windows ANGLE target.
1869
1870         No new tests, no change in functionality.
1871
1872         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1873         (WebCore::GraphicsContext3D::texSubImage2D):
1874
1875 2013-12-11  Joseph Pecoraro  <pecoraro@apple.com>
1876
1877         Web Inspector: Push More Inspector Required Classes Down into JavaScriptCore
1878         https://bugs.webkit.org/show_bug.cgi?id=125324
1879
1880         Reviewed by Timothy Hatcher.
1881
1882         Part 1: Push down core inspector classes.
1883
1884           - Move InspectAgentBase, InspectorAgentRegistry, InspectorBackendDispatcher, InspectorValues
1885             down to JavaScriptCore and into the Inspector namespace.
1886           - Add forwarding headers for JavaScriptCore/inspector files.
1887           - Use the Inspector namespace where appropriate.
1888           - Rename InspectorBaseAgent to InspectorAgentBase for clarity.
1889
1890         Part 2: Push Script wrapper classes down into JavaScriptCore/bindings.
1891
1892           - Move ScriptObject and ScriptValue into JavaScriptCore but namespace Deprecated
1893           - Add forwarding headers
1894           - Use Deprecated::ScriptObject and Deprecated::ScriptValue everywhere.
1895
1896         Part 3: Push Down ScriptFunctionCall
1897
1898           - Move ScriptFunctionCall to JavaScriptCore/bindings into namespace Deprecated.
1899           - Give constructor a function to all for a different JSC::call, because
1900             WebCore ScriptFunctionCall's use JSMainThreadExecState when isMainThread.
1901           - Prefer Deprecated::ScriptFunctionCall everywhere it is used in WebCore.
1902
1903         Part 4: Extract InspectorTypeBuilder helper functions
1904
1905           - There is a chunk of InspectorTypeBuilder that never changes. Extract it into
1906             its own file, InspectorTypeBuilder.h in JSC/inspector, Inspector namespace.
1907           - This moves TypeBuilder from namespace WebCore to namespace Inspector
1908           - Rename the WebCore generated InspectorTypeBuilder to InspectorWebTypeBuilders,
1909             eventually the CodeGenerator script will do this for more then TypeBuilders
1910             and there will be "JS" TypeBuilders and "Web" TypeBuilders files.
1911
1912         No new tests. No change in functionality, just moving things around.
1913
1914         * CMakeLists.txt:
1915         * ForwardingHeaders/bindings/ScriptFunctionCall.h: Added.
1916         * ForwardingHeaders/bindings/ScriptObject.h: Added.
1917         * ForwardingHeaders/bindings/ScriptValue.h: Added.
1918         * ForwardingHeaders/inspector/InspectorAgentBase.h: Added.
1919         * ForwardingHeaders/inspector/InspectorAgentRegistry.h: Added.
1920         * ForwardingHeaders/inspector/InspectorBackendDispatcher.h: Added.
1921         * ForwardingHeaders/inspector/InspectorTypeBuilder.h: Added.
1922         * ForwardingHeaders/inspector/InspectorValues.h: Added.
1923         * GNUmakefile.am:
1924         * GNUmakefile.list.am:
1925         * Modules/indexeddb/IDBAny.cpp:
1926         (WebCore::IDBAny::scriptValue):
1927         (WebCore::IDBAny::IDBAny):
1928         * Modules/indexeddb/IDBAny.h:
1929         * Modules/indexeddb/IDBCursor.cpp:
1930         (WebCore::IDBCursor::key):
1931         (WebCore::IDBCursor::primaryKey):
1932         (WebCore::IDBCursor::value):
1933         (WebCore::IDBCursor::update):
1934         (WebCore::IDBCursor::continueFunction):
1935         (WebCore::IDBCursor::setValueReady):
1936         * Modules/indexeddb/IDBCursor.h:
1937         * Modules/indexeddb/IDBFactory.cpp:
1938         (WebCore::IDBFactory::cmp):
1939         * Modules/indexeddb/IDBFactory.h:
1940         * Modules/indexeddb/IDBIndex.cpp:
1941         (WebCore::IDBIndex::openCursor):
1942         (WebCore::IDBIndex::count):
1943         (WebCore::IDBIndex::openKeyCursor):
1944         (WebCore::IDBIndex::get):
1945         (WebCore::IDBIndex::getKey):
1946         * Modules/indexeddb/IDBIndex.h:
1947         (WebCore::IDBIndex::openCursor):
1948         (WebCore::IDBIndex::openKeyCursor):
1949         * Modules/indexeddb/IDBKeyRange.cpp:
1950         (WebCore::IDBKeyRange::lowerValue):
1951         (WebCore::IDBKeyRange::upperValue):
1952         (WebCore::IDBKeyRange::only):
1953         (WebCore::IDBKeyRange::lowerBound):
1954         (WebCore::IDBKeyRange::upperBound):
1955         (WebCore::IDBKeyRange::bound):
1956         * Modules/indexeddb/IDBKeyRange.h:
1957         (WebCore::IDBKeyRange::lowerBound):
1958         (WebCore::IDBKeyRange::upperBound):
1959         (WebCore::IDBKeyRange::bound):
1960         * Modules/indexeddb/IDBObjectStore.cpp:
1961         (WebCore::IDBObjectStore::get):
1962         (WebCore::generateIndexKeysForValue):
1963         (WebCore::IDBObjectStore::add):
1964         (WebCore::IDBObjectStore::put):
1965         (WebCore::IDBObjectStore::deleteFunction):
1966         (WebCore::IDBObjectStore::openCursor):
1967         (WebCore::IDBObjectStore::count):
1968         * Modules/indexeddb/IDBObjectStore.h:
1969         * Modules/indexeddb/IDBRequest.cpp:
1970         (WebCore::IDBRequest::setResultCursor):
1971         (WebCore::IDBRequest::onSuccess):
1972         (WebCore::IDBRequest::onSuccessInternal):
1973         * Modules/indexeddb/IDBRequest.h:
1974         * Modules/mediastream/CapabilityRange.cpp:
1975         (WebCore::scriptValue):
1976         (WebCore::CapabilityRange::min):
1977         (WebCore::CapabilityRange::max):
1978         * Modules/mediastream/CapabilityRange.h:
1979         * Modules/mediastream/MediaTrackConstraint.h:
1980         * Modules/mediastream/RTCIceCandidate.cpp:
1981         * Modules/plugins/QuickTimePluginReplacement.cpp:
1982         * Modules/plugins/QuickTimePluginReplacement.h:
1983         * UseJSC.cmake:
1984         * WebCore.exp.in:
1985         * WebCore.vcxproj/WebCore.vcxproj:
1986         * WebCore.vcxproj/WebCore.vcxproj.filters:
1987         * WebCore.xcodeproj/project.pbxproj:
1988         * bindings/js/Dictionary.h:
1989         (WebCore::Dictionary::getEventListener):
1990         * bindings/js/IDBBindingUtilities.cpp:
1991         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
1992         (WebCore::injectIDBKeyIntoScriptValue):
1993         (WebCore::canInjectIDBKeyIntoScriptValue):
1994         (WebCore::deserializeIDBValue):
1995         (WebCore::deserializeIDBValueBuffer):
1996         (WebCore::idbKeyToScriptValue):
1997         (WebCore::scriptValueToIDBKey):
1998         * bindings/js/IDBBindingUtilities.h:
1999         * bindings/js/JSBindingsAllInOne.cpp:
2000         * bindings/js/JSDictionary.cpp:
2001         (WebCore::JSDictionary::convertValue):
2002         * bindings/js/JSDictionary.h:
2003         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2004         (WebCore::JSHTMLCanvasElement::getContext):
2005         * bindings/js/JSInjectedScriptHostCustom.cpp:
2006         (WebCore::InjectedScriptHost::scriptValueAsNode):
2007         (WebCore::InjectedScriptHost::nodeAsScriptValue):
2008         (WebCore::JSInjectedScriptHost::inspectedObject):
2009         (WebCore::JSInjectedScriptHost::inspect):
2010         * bindings/js/JSInjectedScriptManager.cpp:
2011         (WebCore::InjectedScriptManager::createInjectedScript):
2012         * bindings/js/JSMainThreadExecState.cpp:
2013         (WebCore::functionCallHandlerFromAnyThread):
2014         * bindings/js/JSMainThreadExecState.h:
2015         (WebCore::JSMainThreadExecState::currentState):
2016         * bindings/js/JSMessageEventCustom.cpp:
2017         (WebCore::JSMessageEvent::data):
2018         (WebCore::handleInitMessageEvent):
2019         * bindings/js/ScheduledAction.cpp:
2020         * bindings/js/ScriptCallStackFactory.cpp:
2021         (WebCore::createScriptArguments):
2022         * bindings/js/ScriptController.cpp:
2023         (WebCore::ScriptController::evaluateInWorld):
2024         (WebCore::ScriptController::evaluate):
2025         (WebCore::ScriptController::executeScriptInWorld):
2026         (WebCore::ScriptController::executeScript):
2027         (WebCore::ScriptController::executeIfJavaScriptURL):
2028         * bindings/js/ScriptController.h:
2029         * bindings/js/ScriptDebugServer.cpp:
2030         (WebCore::ScriptDebugServer::setScriptSource):
2031         (WebCore::ScriptDebugServer::updateCallStack):
2032         (WebCore::ScriptDebugServer::dispatchDidPause):
2033         (WebCore::ScriptDebugServer::runScript):
2034         * bindings/js/ScriptDebugServer.h:
2035         * bindings/js/ScriptGlobalObject.cpp: Renamed from Source/WebCore/bindings/js/ScriptObject.cpp.
2036         (WebCore::handleException):
2037         (WebCore::ScriptGlobalObject::set):
2038         (WebCore::ScriptGlobalObject::get):
2039         (WebCore::ScriptGlobalObject::remove):
2040         * bindings/js/ScriptGlobalObject.h: Copied from Source/WebCore/inspector/ScriptCallStack.h.
2041         (WebCore::ScriptGlobalObject::ScriptGlobalObject):
2042         * bindings/js/ScriptObject.h: Removed.
2043         * bindings/js/ScriptProfile.cpp:
2044         (WebCore::buildInspectorObjectFor):
2045         (WebCore::ScriptProfile::buildInspectorObjectForHead):
2046         (WebCore::ScriptProfile::buildInspectorObjectForBottomUpHead):
2047         * bindings/js/ScriptProfile.h:
2048         * bindings/js/ScriptProfiler.cpp:
2049         (WebCore::ScriptProfiler::objectByHeapObjectId):
2050         (WebCore::ScriptProfiler::getHeapObjectId):
2051         * bindings/js/ScriptProfiler.h:
2052         * bindings/js/ScriptState.h:
2053         * bindings/js/SerializedScriptValue.cpp:
2054         (WebCore::SerializedScriptValue::deserializeForInspector):
2055         (WebCore::SerializedScriptValue::serialize):
2056         (WebCore::SerializedScriptValue::deserialize):
2057         * bindings/js/SerializedScriptValue.h:
2058         * bindings/js/WorkerScriptController.cpp:
2059         (WebCore::WorkerScriptController::evaluate):
2060         (WebCore::WorkerScriptController::setException):
2061         * bindings/js/WorkerScriptController.h:
2062         * bindings/scripts/CodeGeneratorJS.pm:
2063         * bindings/scripts/test/JS/JSTestObj.cpp:
2064         (WebCore::setJSTestObjAnyAttribute):
2065         * dom/CustomEvent.cpp:
2066         (WebCore::CustomEvent::initCustomEvent):
2067         * dom/CustomEvent.h:
2068         (WebCore::CustomEvent::detail):
2069         * dom/MessageEvent.cpp:
2070         (WebCore::MessageEvent::MessageEvent):
2071         (WebCore::MessageEvent::initMessageEvent):
2072         * dom/MessageEvent.h:
2073         (WebCore::MessageEvent::create):
2074         (WebCore::MessageEvent::dataAsScriptValue):
2075         * dom/PopStateEvent.h:
2076         (WebCore::PopStateEvent::state):
2077         * dom/ScriptElement.cpp:
2078         * html/HTMLMediaElement.cpp:
2079         * html/parser/XSSAuditor.cpp:
2080         * html/parser/XSSAuditorDelegate.cpp:
2081         * inspector/CodeGeneratorInspector.py:
2082         (RawTypes.BaseType.get_raw_validator_call_text):
2083         (RawTypes.Object.get_array_item_raw_c_type_text):
2084         (RawTypes.Any.get_array_item_raw_c_type_text):
2085         (RawTypes.Array.get_array_item_raw_c_type_text):
2086         (CommandReturnPassModel.OptOutput.get_return_var_type):
2087         (CommandReturnPassModel.OptOutput.get_output_parameter_type):
2088         (TypeModel.ExactlyInt.get_input_param_type_text):
2089         (TypeModel.ExactlyInt.get_opt_output_type_):
2090         (TypeModel.init_class):
2091         (TypeBindings.create_named_type_declaration.Helper):
2092         (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder):
2093         (TypeBindings.create_type_declaration_.EnumBinding.get_setter_value_expression_pattern):
2094         (TypeBindings.create_type_declaration_.ClassBinding.get_code_generator.CodeGenerator.generate_type_builder):
2095         (Inspector):
2096         (ArrayBinding.get_array_item_c_type_text):
2097         (Generator.go):
2098         (Generator.process_command):
2099         * inspector/CodeGeneratorInspectorStrings.py:
2100         (void):
2101         (InspectorFrontend_h):
2102         (InspectorBackendDispatchers_h):
2103         * inspector/ConsoleMessage.cpp:
2104         (WebCore::messageSourceValue):
2105         (WebCore::messageTypeValue):
2106         (WebCore::messageLevelValue):
2107         (WebCore::ConsoleMessage::addToFrontend):
2108         * inspector/ConsoleMessage.h:
2109         * inspector/ContentSearchUtils.cpp:
2110         (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
2111         (WebCore::ContentSearchUtils::searchInTextByLines):
2112         * inspector/ContentSearchUtils.h:
2113         * inspector/InjectedScript.cpp:
2114         (WebCore::InjectedScript::InjectedScript):
2115         (WebCore::InjectedScript::evaluate):
2116         (WebCore::InjectedScript::callFunctionOn):
2117         (WebCore::InjectedScript::evaluateOnCallFrame):
2118         (WebCore::InjectedScript::getFunctionDetails):
2119         (WebCore::InjectedScript::getProperties):
2120         (WebCore::InjectedScript::getInternalProperties):
2121         (WebCore::InjectedScript::nodeForObjectId):
2122         (WebCore::InjectedScript::releaseObject):
2123         (WebCore::InjectedScript::wrapCallFrames):
2124         (WebCore::InjectedScript::wrapObject):
2125         (WebCore::InjectedScript::wrapTable):
2126         (WebCore::InjectedScript::wrapNode):
2127         (WebCore::InjectedScript::findObjectById):
2128         (WebCore::InjectedScript::inspectNode):
2129         (WebCore::InjectedScript::releaseObjectGroup):
2130         (WebCore::InjectedScript::nodeAsScriptValue):
2131         * inspector/InjectedScript.h:
2132         * inspector/InjectedScriptBase.cpp:
2133         (WebCore::InjectedScriptBase::InjectedScriptBase):
2134         (WebCore::InjectedScriptBase::initialize):
2135         (WebCore::InjectedScriptBase::injectedScriptObject):
2136         (WebCore::InjectedScriptBase::callFunctionWithEvalEnabled):
2137         (WebCore::InjectedScriptBase::makeCall):
2138         (WebCore::InjectedScriptBase::makeEvalCall):
2139         * inspector/InjectedScriptBase.h:
2140         * inspector/InjectedScriptCanvasModule.cpp:
2141         (WebCore::InjectedScriptCanvasModule::wrapCanvas2DContext):
2142         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
2143         (WebCore::InjectedScriptCanvasModule::callWrapContextFunction):
2144         (WebCore::InjectedScriptCanvasModule::markFrameEnd):
2145         (WebCore::InjectedScriptCanvasModule::callStartCapturingFunction):
2146         (WebCore::InjectedScriptCanvasModule::callVoidFunctionWithTraceLogIdArgument):
2147         (WebCore::InjectedScriptCanvasModule::traceLog):
2148         (WebCore::InjectedScriptCanvasModule::replayTraceLog):
2149         (WebCore::InjectedScriptCanvasModule::resourceInfo):
2150         (WebCore::InjectedScriptCanvasModule::resourceState):
2151         * inspector/InjectedScriptCanvasModule.h:
2152         * inspector/InjectedScriptHost.cpp:
2153         (WebCore::InjectedScriptHost::inspectImpl):
2154         (WebCore::InjectedScriptHost::InspectableObject::get):
2155         * inspector/InjectedScriptHost.h:
2156         * inspector/InjectedScriptManager.cpp:
2157         (WebCore::InjectedScriptManager::injectedScriptFor):
2158         * inspector/InjectedScriptManager.h:
2159         * inspector/InjectedScriptModule.cpp:
2160         (WebCore::InjectedScriptModule::ensureInjected):
2161         * inspector/InspectorAgent.cpp:
2162         (WebCore::InspectorAgent::InspectorAgent):
2163         (WebCore::InspectorAgent::didCreateFrontendAndBackend):
2164         (WebCore::InspectorAgent::inspect):
2165         * inspector/InspectorAgent.h:
2166         * inspector/InspectorAllInOne.cpp:
2167         * inspector/InspectorApplicationCacheAgent.cpp:
2168         (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
2169         (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
2170         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
2171         (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
2172         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
2173         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
2174         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
2175         * inspector/InspectorApplicationCacheAgent.h:
2176         * inspector/InspectorCSSAgent.cpp:
2177         (WebCore::SelectorProfile::toInspectorObject):
2178         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
2179         (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
2180         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
2181         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
2182         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
2183         (WebCore::InspectorCSSAgent::getAllStyleSheets):
2184         (WebCore::InspectorCSSAgent::getStyleSheet):
2185         (WebCore::InspectorCSSAgent::setStyleText):
2186         (WebCore::InspectorCSSAgent::setPropertyText):
2187         (WebCore::InspectorCSSAgent::toggleProperty):
2188         (WebCore::InspectorCSSAgent::setRuleSelector):
2189         (WebCore::InspectorCSSAgent::addRule):
2190         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
2191         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
2192         (WebCore::InspectorCSSAgent::stopSelectorProfiler):
2193         (WebCore::InspectorCSSAgent::stopSelectorProfilerImpl):
2194         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
2195         (WebCore::InspectorCSSAgent::collectStyleSheets):
2196         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
2197         (WebCore::InspectorCSSAgent::detectOrigin):
2198         (WebCore::InspectorCSSAgent::buildObjectForRule):
2199         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
2200         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2201         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
2202         (WebCore::InspectorCSSAgent::buildArrayForRegions):
2203         (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
2204         * inspector/InspectorCSSAgent.h:
2205         * inspector/InspectorCanvasAgent.cpp:
2206         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
2207         (WebCore::InspectorCanvasAgent::didCreateFrontendAndBackend):
2208         (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
2209         (WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
2210         (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
2211         (WebCore::InspectorCanvasAgent::injectedScriptCanvasModule):
2212         * inspector/InspectorCanvasAgent.h:
2213         * inspector/InspectorCanvasInstrumentation.h:
2214         (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
2215         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
2216         * inspector/InspectorClient.cpp:
2217         * inspector/InspectorClient.h:
2218         * inspector/InspectorConsoleAgent.cpp:
2219         (WebCore::InspectorConsoleAgent::InspectorConsoleAgent):
2220         (WebCore::InspectorConsoleAgent::didCreateFrontendAndBackend):
2221         (WebCore::InspectableHeapObject::get):
2222         * inspector/InspectorConsoleAgent.h:
2223         * inspector/InspectorController.cpp:
2224         * inspector/InspectorController.h:
2225         * inspector/InspectorDOMAgent.cpp:
2226         (WebCore::InspectorDOMAgent::InspectorDOMAgent):
2227         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
2228         (WebCore::InspectorDOMAgent::getDocument):
2229         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
2230         (WebCore::InspectorDOMAgent::querySelectorAll):
2231         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
2232         (WebCore::InspectorDOMAgent::getEventListenersForNode):
2233         (WebCore::InspectorDOMAgent::getSearchResults):
2234         (WebCore::InspectorDOMAgent::resolveNode):
2235         (WebCore::InspectorDOMAgent::getAttributes):
2236         (WebCore::InspectorDOMAgent::buildObjectForNode):
2237         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
2238         (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
2239         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2240         (WebCore::InspectorDOMAgent::didCommitLoad):
2241         (WebCore::InspectorDOMAgent::didInsertDOMNode):
2242         (WebCore::InspectorDOMAgent::styleAttributeInvalidated):
2243         * inspector/InspectorDOMAgent.h:
2244         * inspector/InspectorDOMDebuggerAgent.cpp:
2245         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
2246         (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
2247         (WebCore::InspectorDOMDebuggerAgent::descriptionForDOMEvent):
2248         * inspector/InspectorDOMDebuggerAgent.h:
2249         * inspector/InspectorDOMStorageAgent.cpp:
2250         (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent):
2251         (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
2252         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
2253         (WebCore::InspectorDOMStorageAgent::storageId):
2254         (WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):
2255         * inspector/InspectorDOMStorageAgent.h:
2256         * inspector/InspectorDatabaseAgent.cpp:
2257         (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent):
2258         (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
2259         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
2260         * inspector/InspectorDatabaseAgent.h:
2261         * inspector/InspectorDatabaseResource.cpp:
2262         (WebCore::InspectorDatabaseResource::bind):
2263         * inspector/InspectorDebuggerAgent.cpp:
2264         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
2265         (WebCore::InspectorDebuggerAgent::didCreateFrontendAndBackend):
2266         (WebCore::breakpointActionTypeForString):
2267         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2268         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2269         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2270         (WebCore::scriptToInspectorObject):
2271         (WebCore::InspectorDebuggerAgent::searchInContent):
2272         (WebCore::InspectorDebuggerAgent::setScriptSource):
2273         (WebCore::InspectorDebuggerAgent::getFunctionDetails):
2274         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
2275         (WebCore::InspectorDebuggerAgent::compileScript):
2276         (WebCore::InspectorDebuggerAgent::runScript):
2277         (WebCore::InspectorDebuggerAgent::currentCallFrames):
2278         (WebCore::InspectorDebuggerAgent::didParseSource):
2279         (WebCore::InspectorDebuggerAgent::didPause):
2280         (WebCore::InspectorDebuggerAgent::didContinue):
2281         (WebCore::InspectorDebuggerAgent::clear):
2282         * inspector/InspectorDebuggerAgent.h:
2283         * inspector/InspectorForwarding.h:
2284         * inspector/InspectorFrontendClientLocal.cpp:
2285         (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
2286         * inspector/InspectorFrontendHost.cpp:
2287         (WebCore::FrontendMenuProvider::create):
2288         (WebCore::FrontendMenuProvider::disconnect):
2289         (WebCore::FrontendMenuProvider::FrontendMenuProvider):
2290         (WebCore::FrontendMenuProvider::contextMenuItemSelected):
2291         (WebCore::FrontendMenuProvider::contextMenuCleared):
2292         (WebCore::InspectorFrontendHost::showContextMenu):
2293         * inspector/InspectorHeapProfilerAgent.cpp:
2294         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
2295         (WebCore::InspectorHeapProfilerAgent::didCreateFrontendAndBackend):
2296         (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
2297         (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
2298         (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
2299         (WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
2300         * inspector/InspectorHeapProfilerAgent.h:
2301         * inspector/InspectorIndexedDBAgent.cpp:
2302         (WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent):
2303         (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
2304         * inspector/InspectorIndexedDBAgent.h:
2305         * inspector/InspectorInputAgent.cpp:
2306         (WebCore::InspectorInputAgent::InspectorInputAgent):
2307         (WebCore::InspectorInputAgent::didCreateFrontendAndBackend):
2308         * inspector/InspectorInputAgent.h:
2309         * inspector/InspectorInstrumentation.cpp:
2310         * inspector/InspectorInstrumentation.h:
2311         * inspector/InspectorLayerTreeAgent.cpp:
2312         (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
2313         (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
2314         (WebCore::InspectorLayerTreeAgent::layersForNode):
2315         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
2316         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
2317         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
2318         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
2319         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
2320         * inspector/InspectorLayerTreeAgent.h:
2321         * inspector/InspectorMemoryAgent.cpp:
2322         (WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend):
2323         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
2324         * inspector/InspectorMemoryAgent.h:
2325         * inspector/InspectorOverlay.cpp:
2326         * inspector/InspectorOverlay.h:
2327         * inspector/InspectorPageAgent.cpp:
2328         (WebCore::InspectorPageAgent::resourceTypeJson):
2329         (WebCore::InspectorPageAgent::cachedResourceTypeJson):
2330         (WebCore::InspectorPageAgent::InspectorPageAgent):
2331         (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
2332         (WebCore::buildObjectForCookie):
2333         (WebCore::buildArrayForCookies):
2334         (WebCore::InspectorPageAgent::getCookies):
2335         (WebCore::InspectorPageAgent::getResourceTree):
2336         (WebCore::InspectorPageAgent::searchInResource):
2337         (WebCore::buildObjectForSearchResult):
2338         (WebCore::InspectorPageAgent::searchInResources):
2339         (WebCore::InspectorPageAgent::buildObjectForFrame):
2340         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
2341         * inspector/InspectorPageAgent.h:
2342         * inspector/InspectorProfilerAgent.cpp:
2343         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
2344         (WebCore::InspectorProfilerAgent::createProfileHeader):
2345         (WebCore::InspectorProfilerAgent::createSnapshotHeader):
2346         (WebCore::InspectorProfilerAgent::getProfileHeaders):
2347         (WebCore::InspectorProfilerAgent::getCPUProfile):
2348         (WebCore::InspectorProfilerAgent::didCreateFrontendAndBackend):
2349         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
2350         (WebCore::InspectorProfilerAgent::getHeapObjectId):
2351         * inspector/InspectorProfilerAgent.h:
2352         * inspector/InspectorResourceAgent.cpp:
2353         (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
2354         (WebCore::buildObjectForTiming):
2355         (WebCore::buildObjectForResourceRequest):
2356         (WebCore::buildObjectForResourceResponse):
2357         (WebCore::buildObjectForCachedResource):
2358         (WebCore::InspectorResourceAgent::willSendRequest):
2359         (WebCore::InspectorResourceAgent::didReceiveResponse):
2360         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
2361         (WebCore::InspectorResourceAgent::buildInitiatorObject):
2362         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
2363         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
2364         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
2365         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
2366         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
2367         * inspector/InspectorResourceAgent.h:
2368         * inspector/InspectorRuntimeAgent.cpp:
2369         (WebCore::InspectorRuntimeAgent::InspectorRuntimeAgent):
2370         (WebCore::buildErrorRangeObject):
2371         (WebCore::InspectorRuntimeAgent::parse):
2372         (WebCore::InspectorRuntimeAgent::evaluate):
2373         (WebCore::InspectorRuntimeAgent::callFunctionOn):
2374         (WebCore::InspectorRuntimeAgent::getProperties):
2375         * inspector/InspectorRuntimeAgent.h:
2376         * inspector/InspectorStyleSheet.cpp:
2377         (WebCore::buildSourceRangeObject):
2378         (WebCore::buildMediaObject):
2379         (WebCore::fillMediaListChain):
2380         (WebCore::InspectorStyle::buildObjectForStyle):
2381         (WebCore::InspectorStyle::buildArrayForComputedStyle):
2382         (WebCore::InspectorStyle::styleWithProperties):
2383         (WebCore::InspectorStyleSheet::create):
2384         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
2385         (WebCore::InspectorStyleSheet::buildObjectForStyleSheet):
2386         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo):
2387         (WebCore::selectorsFromSource):
2388         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
2389         (WebCore::InspectorStyleSheet::buildObjectForRule):
2390         (WebCore::InspectorStyleSheet::buildObjectForStyle):
2391         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
2392         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
2393         (WebCore::InspectorStyleSheetForInlineStyle::create):
2394         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
2395         * inspector/InspectorStyleSheet.h:
2396         (WebCore::InspectorCSSId::InspectorCSSId):
2397         (WebCore::InspectorStyleSheet::canBind):
2398         * inspector/InspectorStyleTextEditor.cpp:
2399         * inspector/InspectorTimelineAgent.cpp:
2400         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
2401         (WebCore::toProtocol):
2402         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
2403         (WebCore::InspectorTimelineAgent::setDOMCounters):
2404         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2405         (WebCore::InspectorTimelineAgent::sendEvent):
2406         * inspector/InspectorTimelineAgent.h:
2407         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
2408         * inspector/InspectorWebAgentBase.h: Renamed from Source/WebCore/inspector/InspectorAgentRegistry.h.
2409         (WebCore::InspectorAgentBase::InspectorAgentBase):
2410         * inspector/InspectorWorkerAgent.cpp:
2411         (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
2412         (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
2413         * inspector/InspectorWorkerAgent.h:
2414         * inspector/InstrumentingAgents.cpp:
2415         * inspector/NetworkResourcesData.cpp:
2416         * inspector/PageConsoleAgent.cpp:
2417         (WebCore::InspectableNode::get):
2418         * inspector/PageDebuggerAgent.cpp:
2419         * inspector/PageDebuggerAgent.h:
2420         * inspector/PageRuntimeAgent.cpp:
2421         (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
2422         * inspector/PageRuntimeAgent.h:
2423         * inspector/ScriptArguments.cpp:
2424         (WebCore::ScriptArguments::create):
2425         (WebCore::ScriptArguments::ScriptArguments):
2426         (WebCore::ScriptArguments::argumentAt):
2427         (WebCore::ScriptArguments::getFirstArgumentAsString):
2428         * inspector/ScriptArguments.h:
2429         * inspector/ScriptCallFrame.cpp:
2430         (WebCore::ScriptCallFrame::buildInspectorObject):
2431         * inspector/ScriptCallFrame.h:
2432         * inspector/ScriptCallStack.cpp:
2433         (WebCore::ScriptCallStack::buildInspectorArray):
2434         * inspector/ScriptCallStack.h:
2435         * inspector/ScriptDebugListener.h:
2436         * inspector/TimelineRecordFactory.cpp:
2437         * inspector/TimelineRecordFactory.h:
2438         (WebCore::TimelineRecordFactory::createWebSocketCreateData):
2439         (WebCore::TimelineRecordFactory::createGenericWebSocketData):
2440         * inspector/WorkerConsoleAgent.cpp:
2441         * inspector/WorkerDebuggerAgent.cpp:
2442         * inspector/WorkerInspectorController.cpp:
2443         * inspector/WorkerInspectorController.h:
2444         * inspector/WorkerRuntimeAgent.cpp:
2445         (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
2446         * inspector/WorkerRuntimeAgent.h:
2447         * page/Console.cpp:
2448         * page/ContentSecurityPolicy.cpp:
2449         * page/Frame.cpp:
2450         * page/PageConsole.cpp:
2451         * plugins/PluginView.cpp:
2452         (WebCore::PluginView::performRequest):
2453         * testing/Internals.cpp:
2454         (WebCore::Internals::parserMetaData):
2455         * testing/Internals.h:
2456         * workers/SharedWorkerGlobalScope.cpp:
2457         (WebCore::createConnectEvent):
2458         * workers/WorkerGlobalScope.cpp:
2459         (WebCore::WorkerGlobalScope::importScripts):
2460         * workers/WorkerThread.cpp:
2461         * xml/XMLTreeViewer.cpp:
2462         * xml/parser/XMLDocumentParser.cpp:
2463         * xml/parser/XMLDocumentParserLibxml2.cpp:
2464
2465 2013-12-11  Laszlo Vidacs  <lac@inf.u-szeged.hu>
2466
2467         Store SHA1 hash in std::array
2468         https://bugs.webkit.org/show_bug.cgi?id=125446
2469
2470         Reviewed by Darin Adler.
2471
2472         Change Vector to std::array and use typedef.
2473
2474         * Modules/websockets/WebSocketHandshake.cpp:
2475         (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
2476         * inspector/DOMPatchSupport.cpp:
2477         (WebCore::DOMPatchSupport::createDigest):
2478         * platform/network/soup/ResourceHandleSoup.cpp:
2479         (WebCore::HostTLSCertificateSet::computeCertificateHash):
2480
2481 2013-12-11  Alexey Proskuryakov  <ap@apple.com>
2482
2483         WebCrypto keys should support structured clone
2484         https://bugs.webkit.org/show_bug.cgi?id=125590
2485
2486         Reviewed by Oliver Hunt.
2487
2488         Tests: crypto/subtle/aes-postMessage.html
2489                crypto/subtle/hmac-postMessage.html
2490                crypto/subtle/postMessage-worker.html
2491                crypto/subtle/rsa-postMessage.html
2492
2493         * crypto/CryptoAlgorithmIdentifier.h:
2494         (WebCore::CryptoAlgorithmIdentifier):
2495         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
2496         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
2497         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
2498         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
2499         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
2500         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
2501         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
2502         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
2503         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
2504         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
2505         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
2506         AES_KW was added to WebCrypto spec editor's draft yesterday night. Now that we're
2507         adding a matching enum for structired clone serialization, it's as good a time as
2508         any to update the order of values to match.
2509
2510         * bindings/js/SerializedScriptValue.cpp:
2511         (WebCore::countUsages):
2512         (WebCore::CloneSerializer::dumpIfTerminal):
2513         (WebCore::CloneSerializer::write):
2514         (WebCore::CloneDeserializer::read):
2515         (WebCore::CloneDeserializer::readHMACKey):
2516         (WebCore::CloneDeserializer::readAESKey):
2517         (WebCore::CloneDeserializer::readRSAKey):
2518         (WebCore::CloneDeserializer::readCryptoKey):
2519         (WebCore::CloneDeserializer::readTerminal):
2520         Added serialization/deserialization for CryptoKey. This doesn't update version
2521         number, because we don't currently store structured clones in persistent storage -
2522         and even if we did, we wouldn't want to invalidate everything users already stored.
2523
2524         * crypto/CryptoAlgorithmRegistry.cpp:
2525         (WebCore::CryptoAlgorithmRegistry::shared):
2526         (WebCore::registryMutex):
2527         (WebCore::CryptoAlgorithmRegistry::getIdentifierForName):
2528         (WebCore::CryptoAlgorithmRegistry::nameForIdentifier):
2529         (WebCore::CryptoAlgorithmRegistry::create):
2530         (WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
2531         * crypto/CryptoKey.idl:
2532         With structured clone, it is now possible to send a Key to a web worker. That's
2533         of no practical use because the crypto API is not exposed in workers, but we
2534         shouldn't crash anyway.
2535
2536         * crypto/keys/CryptoKeyAES.cpp:
2537         (WebCore::CryptoKeyAES::CryptoKeyAES):
2538         (WebCore::CryptoKeyAES::isValidAESAlgorithm):
2539         * crypto/keys/CryptoKeyAES.h:
2540         Exposed isValidAESAlgorithm, so that a caller could know whether the constructor
2541         will assert.
2542
2543         * CMakeLists.txt:
2544         * GNUmakefile.am:
2545         * WebCore.vcxproj/WebCore.vcxproj.filters:
2546         * WebCore.vcxproj/WebCoreCommon.props:
2547         Added crypto/keys to search paths to avoid build breakage.
2548
2549 2013-12-11  Bear Travis  <betravis@adobe.com>
2550
2551         Web Inspector: [CSS Shapes] Highlight margin-shape for shape-outside
2552         https://bugs.webkit.org/show_bug.cgi?id=125175
2553
2554         Reviewed by Darin Adler.
2555
2556         In addition to highlighting the shape, also highlight the shape created
2557         by shape-margin with a slightly more transparent color. This patch modifies
2558         the shape info passed to the Inspector Overlay to include a path for both
2559         the raw shape and the shape with margin.
2560
2561         Test: inspector-protocol/model/highlight-shape-outside-margin.html
2562
2563         * inspector/InspectorOverlay.cpp:
2564         (WebCore::buildObjectForShapeOutside): Call Shape::buildDisplayPaths rather than
2565         Shape::buildPath, and pass along any relevant paths to the Inspector overlay.
2566         * inspector/InspectorOverlayPage.js:
2567         (_drawShapeHighlight): Draw the margin shape in addition to the raw shape.
2568         * rendering/shapes/BoxShape.cpp:
2569         (WebCore::addRoundedRect): Add a rounded rect to the path.
2570         (WebCore::BoxShape::buildDisplayPaths): Create the applicable [margin/padding/raw] shapes.
2571         * rendering/shapes/BoxShape.h:
2572         * rendering/shapes/PolygonShape.cpp:
2573         (WebCore::addPolygon): Add a set of vertices as a polygon to the path.
2574         (WebCore::PolygonShape::buildDisplayPaths): Create the applicable [margin/padding/raw] shapes.
2575         * rendering/shapes/PolygonShape.h:
2576         * rendering/shapes/RasterShape.h:
2577         (WebCore::RasterShape::buildDisplayPaths): Ditto.
2578         * rendering/shapes/RectangleShape.cpp:
2579         (WebCore::RectangleShape::buildDisplayPaths): Ditto.
2580         * rendering/shapes/RectangleShape.h:
2581         * rendering/shapes/Shape.h:
2582
2583 2013-12-11  Mario Sanchez Prada  <mario.prada@samsung.com>
2584
2585         [ATK] Expose accessibility objects WAI-ARIA landmark roles
2586         https://bugs.webkit.org/show_bug.cgi?id=125584
2587
2588         Reviewed by Chris Fleizach.
2589
2590         Exposed accessibility objects with landmark roles with the proper
2591         AtkRole, to be provided by the next stable release of ATK.
2592
2593         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2594         (webkitAccessibleGetAttributes):
2595         (atkRole):
2596
2597 2013-12-11  José Dapena Paz  <jdapena@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
2598
2599         [GTK] Add a UPower-based BatteryProvider
2600         https://bugs.webkit.org/show_bug.cgi?id=115719
2601
2602         Reviewed by Martin Robinson.
2603
2604         Introduce the BatteryProviderUPower, a provider of the system's battery status that produces the information
2605         using the upower-glib library.
2606
2607         The BatteryProviderUPower creates a new UPower client when the provider should start emitting updates and hooks
2608         up to device alteration signals. These only fire recalculation of the battery status when a battery device is altered.
2609
2610         When recalculating, every battery device is taken into account, accumulating the energy capacities when both empty
2611         and full, the current rate of energy charging/discharging, and the battery status (whether the device is charging or
2612         discharging). This gives a set of data that covers the overall battery status of the system.
2613
2614         This data is then used to calculate the battery status as perceived by the WebCore implementation. Charging is determined
2615         by examining the integral sign of the current combined energy rate. Charging and discharging times are calculated, when
2616         appropriate, by dividing the chargable/dischargable capacity with the current combined energy rate. The battery level is
2617         calculated by dividing the current energy capacity with the full energy capacity (i.e. the combined capacity of all
2618         the batteries that the system possesses). The status is (indirectly) passed onto BatteryManager by invoking the
2619         updateBatteryStatus method on the client, with the first parameter representing the battery charging/discharging state,
2620         the second parameter representing the time left until the battery is fully charged (when charging) or fully
2621         depleted (when discharging), and the third parameter representing the current battery level.
2622
2623         Whenever the implementation cannot provide any information about the battery status of the system, the client's
2624         updateBatteryStatus method is invoked with the first parameter reporting the unavailability of any information
2625         about the battery status. The other two parameters can be omitted as they default to 0 when not given and are neither
2626         available nor useful in such circumstances. The client should handle such an update by reporting the 'default' battery
2627         status - charging, the battery level being at 1.0 and both the charging and discharging time having the value of
2628         the positive infinity (as per the Battery Status API specification).
2629
2630         The implementation is heavily inspired by a similar approach to calculating battery status in GNOME Settings Daemon.
2631
2632         No new tests - no new functionality. The feature is not yet enabled. When enabled, the relevant tests pass.
2633
2634         * GNUmakefile.list.am: Add the BatteryProviderUPower(Client) build targets.
2635         * platform/glib/BatteryProviderUPower.cpp: Added.
2636         (powerDeviceAlterationCallback):
2637         (BatteryProviderUPower::BatteryProviderUPower):
2638         (BatteryProviderUPower::startUpdating):
2639         (BatteryProviderUPower::stopUpdating):
2640         (BatteryProviderUPower::updateBatteryStatus):
2641         * platform/glib/BatteryProviderUPower.h: Added.
2642         (WebCore):
2643         (BatteryProviderUPower):
2644         * platform/glib/BatteryProviderUPowerClient.h: Added.
2645         (WebCore):
2646         (BatteryProviderUPowerClient):
2647
2648 2013-12-11  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2649
2650         Improving createOffer and createAnswer LayoutTests
2651         https://bugs.webkit.org/show_bug.cgi?id=125568
2652
2653         Reviewed by Philippe Normand.
2654
2655         The constraints parameter should be optional in both. Also adding tests to check if we already have a local SDP
2656         when creating an answer.
2657
2658         Existing tests were updated.
2659
2660         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
2661         (WebCore::RTCPeerConnectionHandlerMock::createOffer):
2662
2663 2013-12-11  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2664
2665         [EFL] Fix build with CONTEXT_MENUS flag set OFF
2666         https://bugs.webkit.org/show_bug.cgi?id=125572
2667
2668         Reviewed by Gyuyoung Kim.
2669
2670         dispatchEventAsContextMenuEvent is called regardless of CONTEXT_MENUS flag setting,
2671         thus its definition in InspectorFrontendHost should not be guarded by this flag.
2672
2673         No new tests, no behaviour change.
2674
2675         * inspector/InspectorFrontendHost.cpp:
2676         (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
2677
2678 2013-12-11  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
2679
2680         [CURL] Build fails after r160386.
2681         https://bugs.webkit.org/show_bug.cgi?id=125571
2682
2683         Reviewed by Zoltan Herczeg.
2684
2685         Need no new tests.
2686
2687         Fix a typo in commit r160386 that prevents building with curl.
2688
2689         * platform/network/curl/CurlCacheEntry.cpp:
2690         (WebCore::CurlCacheEntry::generateBaseFilename):
2691
2692 2013-12-11  Rob Buis  <rob.buis@samsung.com>
2693
2694         [CSS Shapes] Take into account fill-rule for polygon interpolation
2695         https://bugs.webkit.org/show_bug.cgi?id=125508
2696
2697         Reviewed by Dirk Schulze.
2698
2699         Implement the polygon fill-rule part of http://dev.w3.org/csswg/css-shapes/#basic-shape-interpolation.
2700
2701         Adapt fast/shapes/shape-outside-floats/shape-outside-animation.html.
2702
2703         * rendering/style/BasicShapes.cpp:
2704         (WebCore::BasicShape::canBlend):
2705
2706 2013-12-11  Mario Sanchez Prada  <mario.prada@samsung.com>
2707
2708         Programmatically-inserted children lack accessibility events
2709         https://bugs.webkit.org/show_bug.cgi?id=100275
2710
2711         Reviewed by Chris Fleizach.
2712
2713         Test: accessibility/children-changed-sends-notification.html
2714
2715         Emit children-changed::add and children-changed::remove whenever
2716         an object has been added/removed to the accessibility hierarchy,
2717         that is, when a new AtkObject is being attached/detached.
2718
2719         * accessibility/AXObjectCache.h: Added new enumeration to know
2720         when we are detaching a wrapper because of the cache or the
2721         element is being destroyed, so we can use that information.
2722         (WebCore::AXObjectCache::detachWrapper): Added a new parameter and
2723         updated all the prototypes in different ports.
2724         * accessibility/AXObjectCache.cpp:
2725         (WebCore::AXObjectCache::~AXObjectCache): Call detachWrapper()
2726         specifying that we do it because the cache is being destroyed.
2727         (WebCore::AXObjectCache::remove): Call detachWrapper() specifying
2728         that we do it because an accessible element is being destroyed.
2729
2730         * accessibility/atk/AXObjectCacheAtk.cpp:
2731         (WebCore::AXObjectCache::detachWrapper): Emit the children-changed
2732         signal when needed. We rely on the cached reference to the parent
2733         AtkObject (using the implementation of atk_object_get_parent from
2734         the AtkObject class) to find the right object to emit the signal
2735         from here, since the accessibility hierarchy from WebCore will no
2736         longer be accessible at this point.
2737         (WebCore::AXObjectCache::attachWrapper): Emit the children-change
2738         signal from here unless we are in the middle of a layout update,
2739         trying to provide as much information (e.g. the offset) as possible.
2740         (WebCore::AXObjectCache::postPlatformNotification): Make sure we
2741         update (touch) the subtree under an accessibility object whenever
2742         we receive AXChildrenChanded from WebCore, to ensure that those
2743         objects will also be visible rightaway to ATs, and that those get
2744         properly notified of the event at that very same moment.
2745
2746         * accessibility/ios/AXObjectCacheIOS.mm:
2747         (WebCore::AXObjectCache::detachWrapper): Updated function signature.
2748         * accessibility/mac/AXObjectCacheMac.mm:
2749         (WebCore::AXObjectCache::detachWrapper): Ditto.
2750         * accessibility/win/AXObjectCacheWin.cpp:
2751         (WebCore::AXObjectCache::detachWrapper): Ditto.
2752
2753 2013-12-11  Andreas Kling  <akling@apple.com>
2754
2755         REGRESSION(r160389): SVG test assertion extravaganza.
2756
2757         Unreviewed. Use getAttribute() instead of fastGetAttribute() for
2758         the "type" attribute since it's animatable on SVG elements.
2759
2760 2013-12-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2761
2762         Set m_nextBreakablePosition as private in InlineIterator, and use it.
2763         https://bugs.webkit.org/show_bug.cgi?id=125482
2764
2765         Reviewed by Andreas Kling.
2766
2767         InlineIterator has been exported m_nextBreakablePosition as public though it is member variable.
2768         This patch set it as private, and add getter/setter functions for it.
2769
2770         No new tests, no behavior changes.
2771
2772         * rendering/InlineIterator.h:
2773         (WebCore::InlineIterator::InlineIterator):
2774         (WebCore::InlineIterator::nextBreakablePosition):
2775         (WebCore::InlineIterator::setNextBreakablePosition):
2776         * rendering/line/BreakingContextInlineHeaders.h:
2777         (WebCore::BreakingContext::handleText):
2778
2779 2013-12-10  Gurpreet Kaur  <k.gurpreet@samsung.com>
2780
2781         top and bottom black background line not getting displayed
2782         https://bugs.webkit.org/show_bug.cgi?id=21664
2783
2784         Reviewed by Simon Fraser.
2785
2786         The table cell's background was not being displayed. Since the table
2787         cell had no child correct offsetWidth was not being set even if table
2788         width is being defined.
2789
2790         Test: fast/dom/HTMLTableElement/empy-table-cell-with-background-color.html
2791
2792         * rendering/AutoTableLayout.cpp:
2793         (WebCore::AutoTableLayout::recalcColumn):
2794         cellHasContent should also be set to true incase background color is
2795         present.
2796
2797 2013-12-10  Beth Dakin  <bdakin@apple.com>
2798
2799         Horizontal rubber-banding without a horizontal scrollbar is distracting
2800         https://bugs.webkit.org/show_bug.cgi?id=125550
2801
2802         Reviewed by Simon Fraser.
2803
2804         Setting the ScrollElasticity to ScrollElasticityAutomatic will make sure we only 
2805         rubber-band horizontally when there is a horizontal scrollbar.
2806
2807         * page/FrameView.cpp:
2808         (WebCore::FrameView::FrameView):
2809
2810 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
2811
2812         Correct a preprocessor guard from a mis-merged patch
2813
2814         In r160367, I mismerged a patch from Gustavo Noronha. This commit
2815         fixes the merge and thus fixes the CMake build.
2816
2817         * html/HTMLMediaElement.idl: Move the preprocessor guard to the correct property.
2818
2819 2013-12-10  Rob Buis  <rob.buis@samsung.com>
2820
2821         Clean up SVGScriptElement
2822         https://bugs.webkit.org/show_bug.cgi?id=125527
2823
2824         Reviewed by Sam Weinig.
2825
2826         Rewrite to not store type in m_type and also remove type getter/setter.
2827
2828         * svg/SVGScriptElement.cpp:
2829         (WebCore::SVGScriptElement::parseAttribute):
2830         (WebCore::SVGScriptElement::typeAttributeValue):
2831         * svg/SVGScriptElement.h:
2832         * svg/SVGScriptElement.idl:
2833
2834 2013-12-10  Laszlo Vidacs  <lac@inf.u-szeged.hu>
2835
2836         Use std::array when computing MD5 checksum
2837         https://bugs.webkit.org/show_bug.cgi?id=125509
2838
2839         Reviewed by Anders Carlsson.
2840
2841         Use MD5::Digest type and MD5::hashSize when computing MD5 checksum.
2842
2843         * platform/network/curl/CurlCacheEntry.cpp:
2844         (WebCore::CurlCacheEntry::generateBaseFilename):
2845
2846 2013-12-10  Mario Sanchez Prada  <mario.prada@samsung.com>
2847
2848         [ATK] Expose splitter elements with ATK_ROLE_SEPARATOR
2849         https://bugs.webkit.org/show_bug.cgi?id=125522
2850
2851         Reviewed by Chris Fleizach.
2852
2853         Expose objects with SplitterRole role as ATK_ROLE_SEPARATOR.
2854
2855         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2856         (atkRole):
2857
2858 2013-12-10  Mario Sanchez Prada  <mario.prada@samsung.com>
2859
2860         [ATK] Elements with role 'alertdialog' should be ATK_ROLE_ALERT
2861         https://bugs.webkit.org/show_bug.cgi?id=125521
2862
2863         Reviewed by Chris Fleizach.
2864
2865         Stop exposing alert dialogs as ATK_ROLE_DIALOG and do it as
2866         ATK_ROLE_ALERT instead.
2867
2868         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2869         (atkRole):
2870
2871 2013-12-10  Brendan Long  <b.long@cablelabs.com>
2872
2873         [GTK][GStreamer] media/video-preload.html is flakily crashing on WK2
2874         https://bugs.webkit.org/show_bug.cgi?id=125411
2875
2876         Reviewed by Philippe Normand.
2877
2878         No new tests because this fixes flakeyness in existing tests (media/video-preload.html, and various tests in media/track/{audio,in-band,video}).
2879
2880         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
2881         (webkitTextCombinerPadGetProperty): Copy tag list to prevent concurrent modification problems.
2882         (webkitTextCombinerPadEvent): Add locking.
2883         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2884         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Call tagsChanged() because we need it to setup m_tags.
2885         (WebCore::TrackPrivateBaseGStreamer::disconnect): Clear m_tags.
2886         (WebCore::TrackPrivateBaseGStreamer::tagsChanged): Lookup the tags while we're in this callback, because it's the only time we can guarantee that the input-selector won't unref them.
2887         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Use m_tags.
2888         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Add m_tags and a mutex.
2889
2890 2013-12-10  László Langó  <lango@inf.u-szeged.hu>
2891
2892         PageConsole::addMessage should automatically determine column number alongside line number
2893         https://bugs.webkit.org/show_bug.cgi?id=114319
2894
2895         Reviewed by Joseph Pecoraro.
2896
2897         * dom/InlineStyleSheetOwner.cpp:
2898         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
2899         * dom/ScriptElement.cpp:
2900         (WebCore::ScriptElement::ScriptElement):
2901         * dom/ScriptableDocumentParser.h:
2902         * dom/StyledElement.cpp:
2903         (WebCore::StyledElement::styleAttributeChanged):
2904         * html/parser/HTMLDocumentParser.cpp:
2905         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
2906         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
2907         * html/parser/HTMLDocumentParser.h:
2908         * inspector/InspectorResourceAgent.cpp:
2909         (WebCore::InspectorResourceAgent::buildInitiatorObject):
2910         * page/Console.cpp:
2911         (WebCore::internalAddMessage):
2912         * page/PageConsole.cpp:
2913         (WebCore::PageConsole::printSourceURLAndPosition):
2914         (WebCore::PageConsole::addMessage):
2915         * page/PageConsole.h:
2916         * xml/parser/XMLDocumentParser.h:
2917         * xml/parser/XMLDocumentParserLibxml2.cpp:
2918         (WebCore::XMLDocumentParser::error):
2919
2920 2013-12-10  Andreas Kling  <akling@apple.com>
2921
2922         Jettison all StyleResolver data on memory pressure.
2923         <https://webkit.org/b/125498>
2924
2925         The StyleResolver can be rebuilt relatively quickly; we already
2926         have an optimization that discards it some time after last use.
2927
2928         If we find ourseles under serious memory pressure, don't wait for
2929         the timer to kick in, throw everything overboard right away.
2930
2931         ~5MB progression post-pressure on Membuster3.
2932
2933         Reviewed by Anders Carlsson.
2934
2935 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
2936
2937         [GTK] [CMake] Add support for building the DOM bindings
2938         https://bugs.webkit.org/show_bug.cgi?id=116375
2939
2940         Reviewed by Gustavo Noronha Silva.
2941
2942         The CMake build is more complete than the autotools counterpart, so autotools doesn't consider
2943         some supplemental IDL attributes when building the DOM bindings. To prevent API breaks we should
2944         protect these attributes from DOM binding generation.
2945
2946         * Modules/battery/BatteryManager.idl: Protect non-GObject DOM bound methods by C preprocessor checks.
2947         * Modules/battery/NavigatorBattery.idl: Ditto.
2948         * Modules/mediastream/HTMLMediaElementMediaStream.idl: Ditto.
2949         * Modules/networkinfo/NavigatorNetworkInfoConnection.idl: Ditto.
2950         * Modules/networkinfo/NetworkInfoConnection.idl: Ditto.
2951         * PlatformGTK.cmake: Add build steps for building the bindings.
2952         * dom/Document.idl: Protect non-GObject DOM bound methods by C preprocessor checks.
2953         * html/HTMLMediaElement.idl: Ditto.
2954
2955 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
2956
2957         Various fixes for the CMake GTK+ build
2958
2959         Reviewed by Gustavo Noronha.
2960
2961         * PlatformGTK.cmake: Update source list.
2962
2963 2013-12-10  Robert Sipka  <sipka@inf.u-szeged.hu>
2964
2965         [nix][curl] Buildfix after r160310
2966         https://bugs.webkit.org/show_bug.cgi?id=125489
2967
2968         Reviewed by Gustavo Noronha Silva.
2969
2970         Curl doesn't include soup files.
2971
2972         * PlatformNix.cmake:
2973
2974 2013-12-10  Gustavo Noronha Silva  <gns@gnome.org>
2975
2976         [GTK] REGRESSION: www.yahoo.com redirects to the mobile version after UA change
2977         https://bugs.webkit.org/show_bug.cgi?id=125444
2978
2979         Reviewed by Martin Robinson.
2980
2981         * platform/gtk/UserAgentGtk.cpp:
2982         (WebCore::platformVersionForUAString): more correctly pretend we're Mac OS X.
2983         (WebCore::standardUserAgent): ditto.
2984
2985 2013-12-09  Gustavo Noronha Silva  <gns@gnome.org>
2986
2987         [Soup] Send original encoded data size to didReceiveBuffer
2988         https://bugs.webkit.org/show_bug.cgi?id=125410
2989
2990         Reviewed by Martin Robinson.
2991
2992         No tests, the only way to test this seems to be through the inspector UI.
2993
2994         * platform/network/ResourceHandle.h:
2995         * platform/network/ResourceHandleInternal.h:
2996         (WebCore::ResourceHandleInternal::ResourceHandleInternal): data member to track stream
2997         position.
2998         * platform/network/soup/ResourceHandleSoup.cpp:
2999         (WebCore::ResourceHandle::currentStreamPosition): obtains the current stream position by querying
3000         the first seekable input stream we find.
3001         (WebCore::nextMultipartResponsePartCallback): store the position before we start reading a new part.
3002         (WebCore::sendRequestCallback): store the position before we start reading the response body.
3003         (WebCore::readCallback): pass the position delta to didReceiveData.
3004
3005 2013-12-09  Andreas Kling  <akling@apple.com>
3006
3007         Clear out font width measurement caches on memory pressure.
3008         <https://webkit.org/b/125481>
3009
3010         The data kept in WidthCaches can be regenerated on demand. Throwing
3011         it away when we're under memory pressure buys us ~4MB on Membuster3.
3012
3013         Reviewed by Antti Koivisto.
3014
3015 2013-12-09  Seokju Kwon  <seokju@webkit.org>
3016
3017         Web Inspector: Remove enabled() in InspectorRuntimeAgent.
3018         https://bugs.webkit.org/show_bug.cgi?id=125476
3019
3020         Reviewed by Joseph Pecoraro.
3021
3022         Dead code. It's never called anywhere.
3023
3024         No new tests, no behavior change.
3025
3026         * inspector/InspectorRuntimeAgent.h:
3027
3028 2013-12-09  Sam Weinig  <sam@webkit.org>
3029
3030         Replace use of WTF::FixedArray with std::array
3031         https://bugs.webkit.org/show_bug.cgi?id=125475
3032
3033         Reviewed by Anders Carlsson.
3034
3035         * crypto/parameters/CryptoAlgorithmAesCbcParams.h:
3036         * platform/graphics/GlyphMetricsMap.h:
3037
3038 2013-12-09  Benjamin Poulain  <bpoulain@apple.com>
3039
3040         Refactor the CFURLConnectionClient to be the synchronous implementation of an abstract network delegate
3041         https://bugs.webkit.org/show_bug.cgi?id=125379
3042
3043         Reviewed by Alexey Proskuryakov.
3044
3045         * WebCore.vcxproj/WebCore.vcxproj:
3046         * WebCore.vcxproj/WebCore.vcxproj.filters:
3047         * WebCore.xcodeproj/project.pbxproj:
3048         * platform/network/ResourceHandle.h:
3049         * platform/network/ResourceHandleInternal.h:
3050         * platform/network/cf/ResourceHandleCFNet.cpp:
3051         (WebCore::ResourceHandle::createCFURLConnection):
3052         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp: Added.
3053         (WebCore::ResourceHandleCFURLConnectionDelegate::ResourceHandleCFURLConnectionDelegate):
3054         (WebCore::ResourceHandleCFURLConnectionDelegate::~ResourceHandleCFURLConnectionDelegate):
3055         (WebCore::ResourceHandleCFURLConnectionDelegate::willSendRequestCallback):
3056         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveResponseCallback):
3057         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataCallback):
3058         (WebCore::ResourceHandleCFURLConnectionDelegate::didFinishLoadingCallback):
3059         (WebCore::ResourceHandleCFURLConnectionDelegate::didFailCallback):
3060         (WebCore::ResourceHandleCFURLConnectionDelegate::willCacheResponseCallback):
3061         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveChallengeCallback):
3062         (WebCore::ResourceHandleCFURLConnectionDelegate::didSendBodyDataCallback):
3063         (WebCore::ResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback):
3064         (WebCore::ResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpaceCallback):
3065         (WebCore::ResourceHandleCFURLConnectionDelegate::didReceiveDataArrayCallback):
3066         (WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
3067         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h: Added.
3068         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: Added.
3069         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::SynchronousResourceHandleCFURLConnectionDelegate):
3070         (WebCore::synthesizeRedirectResponseIfNecessary):
3071         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willSendRequest):
3072         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
3073         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData):
3074         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading):
3075         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFail):
3076         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
3077         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveChallenge):
3078         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didSendBodyData):
3079         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::shouldUseCredentialStorageCallback):
3080         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
3081         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray):
3082         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h: Added.
3083
3084 2013-12-09  Ryosuke Niwa  <rniwa@webkit.org>
3085
3086         REGRESSION(r136280): input[type=image] should assume coords of 0,0 when activated without physically clicking
3087         https://bugs.webkit.org/show_bug.cgi?id=125392
3088
3089         Reviewed by Darin Adler.
3090
3091         Merge https://chromium.googlesource.com/chromium/blink/+/3c33d42207cd209bb171083ba66c225f694f2101
3092
3093         Activating an image button with the keyboard or element.click() should result in selected coords of (0,0) per
3094         http://www.w3.org/TR/2013/CR-html5-20130806/forms.html#image-button-state-(type=image)
3095         "If the user activates the control without explicitly selecting a coordinate, then the coordinate (0,0) must be assumed."
3096
3097         New behavior also matches that of Internet Explorer and Firefox.
3098
3099         Tests: fast/forms/input-image-submit.html
3100
3101         * html/ImageInputType.cpp:
3102         (WebCore::ImageInputType::handleDOMActivateEvent): Set m_clickLocation to (0, 0) for simulated events.
3103
3104 2013-12-09  Jer Noble  <jer.noble@apple.com>
3105
3106         [MSE] Add support for VideoPlaybackMetrics.
3107         https://bugs.webkit.org/show_bug.cgi?id=125380
3108
3109         Reviewed by Eric Carlson.
3110
3111         Test: media/media-source/media-source-video-playback-quality.html
3112
3113         Add a new object type VideoPlaybackQuality to be returned by
3114         HTMLMediaElement.getVideoPlaybackQuality().
3115
3116         HTMLMediaElements must separately track a droppedVideoFrame count, as
3117         certain operations on SourceBuffer will drop incoming frames, which must
3118         be accounted for. Reset this count when the media engine changes, which is
3119         indicitive of a new media load requset starting.
3120
3121         Add the new VideoPlaybackQuality class:
3122         * Modules/mediasource/VideoPlaybackQuality.cpp: Added.
3123         (WebCore::VideoPlaybackQuality::create):
3124         (WebCore::VideoPlaybackQuality::VideoPlaybackQuality):
3125         * Modules/mediasource/VideoPlaybackQuality.h: Added.
3126         (WebCore::VideoPlaybackQuality::creationTime):
3127         (WebCore::VideoPlaybackQuality::totalVideoFrames):
3128         (WebCore::VideoPlaybackQuality::droppedVideoFrames):
3129         (WebCore::VideoPlaybackQuality::corruptedVideoFrames):
3130         (WebCore::VideoPlaybackQuality::totalFrameDelay):
3131         * Modules/mediasource/VideoPlaybackQuality.idl: Added.
3132
3133         Add support for the new class to HTMLMediaElement:
3134         * html/HTMLMediaElement.cpp:
3135         (HTMLMediaElement::shouldUseVideoPluginProxy):
3136         (HTMLMediaElement::getVideoPlaybackQuality):
3137         * html/HTMLMediaElement.h:
3138         * html/HTMLMediaElement.idl:
3139
3140         Report the video quality metrics from the MediaPlayer:
3141         * platform/graphics/MediaPlayer.cpp:
3142         (WebCore::MediaPlayer::totalVideoFrames):
3143         (WebCore::MediaPlayer::droppedVideoFrames):
3144         (WebCore::MediaPlayer::corruptedVideoFrames):
3145         (WebCore::MediaPlayer::totalFrameDelay):
3146         * platform/graphics/MediaPlayer.h:
3147         * platform/graphics/MediaPlayerPrivate.h:
3148         (WebCore::MediaPlayerPrivateInterface::totalVideoFrames):
3149         (WebCore::MediaPlayerPrivateInterface::droppedVideoFrames):
3150         (WebCore::MediaPlayerPrivateInterface::corruptedVideoFrames):
3151         (WebCore::MediaPlayerPrivateInterface::totalFrameDelay):
3152
3153         Correctly report the dropped frame count:
3154         * Modules/mediasource/SourceBuffer.cpp:
3155         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer): needsRandomAccessFlag defaults to true.
3156         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Check the sync status of the incoming sample.
3157         (WebCore::SourceBuffer::didDropSample): Notify the media element of a dropped frame.
3158         * Modules/mediasource/SourceBuffer.h:
3159         * html/HTMLMediaElement.cpp:
3160         (WebCore::HTMLMediaElement::HTMLMediaElement):
3161         (HTMLMediaElement::mediaPlayerEngineUpdated): Reset m_droppedFrameCount.
3162         (HTMLMediaElement::getVideoPlaybackQuality): Return a new VideoPlaybackQuality object.
3163         * html/HTMLMediaElement.h:
3164         (WebCore::HTMLMediaElement::incrementDroppedFrameCount): Simple incrementer.
3165         * platform/MediaSample.h:
3166         (WebCore::MediaSample::isSync): Convenience function.
3167         (WebCore::MediaSample::isNonDisplaying): Ditto.
3168
3169         Add support in the AVFoundation MediaSource Engine:
3170         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3171         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3172         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalVideoFrames):
3173         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::droppedVideoFrames):
3174         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::corruptedVideoFrames):
3175         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalFrameDelay):
3176
3177         Add support in the Mock MediaSource Engine:
3178         * platform/mock/mediasource/MockBox.h:
3179         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3180         (WebCore::MockMediaPlayerMediaSource::totalVideoFrames): Simple accessor.
3181         (WebCore::MockMediaPlayerMediaSource::droppedVideoFrames): Ditto.
3182         (WebCore::MockMediaPlayerMediaSource::corruptedVideoFrames): Ditto.
3183         (WebCore::MockMediaPlayerMediaSource::totalFrameDelay): Ditto.
3184         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
3185         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
3186         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
3187         * platform/mock/mediasource/MockMediaSourcePrivate.h:
3188         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
3189         (WebCore::MockSourceBufferPrivate::enqueueSample): Increment the frame counts based on
3190             the incoming sample.
3191         * platform/mock/mediasource/MockSourceBufferPrivate.h:
3192
3193         Add the new files to the project:
3194         * bindings/gobject/GNUmakefile.am:
3195         * DerivedSources.make:
3196         * WebCore.xcodeproj/project.pbxproj:
3197         * GNUMakefile.list.am:
3198         * CMakeLists.txt:
3199
3200 2013-12-09  Simon Fraser  <simon.fraser@apple.com>
3201
3202         Avoid divide by zero in scrollbar code, and protect against Obj-C exceptions
3203         https://bugs.webkit.org/show_bug.cgi?id=125469
3204         <rdar://problem/15535772>
3205
3206         Reviewed by Beth Dakin.
3207         
3208         In ScrollbarThemeMac::setPaintCharacteristicsForScrollbar(), proportion could
3209         end up as NaN if scrollbar->totalSize() were zero. Protect against that.
3210         
3211         Also wrap functions that call into Objective-C with BEGIN_BLOCK_OBJC_EXCEPTIONS/
3212         END_BLOCK_OBJC_EXCEPTIONS.
3213
3214         * platform/mac/ScrollbarThemeMac.mm:
3215         (WebCore::ScrollbarThemeMac::scrollbarThickness):
3216         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
3217         (WebCore::ScrollbarThemeMac::minimumThumbLength):
3218         (WebCore::ScrollbarThemeMac::updateEnabledState):
3219         (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
3220         (WebCore::scrollbarPainterPaint):
3221
3222 2013-12-09  Ryosuke Niwa  <rniwa@webkit.org>
3223
3224         Implement Document.cloneNode()
3225         https://bugs.webkit.org/show_bug.cgi?id=11646
3226
3227         Reviewed by Darin Adler.
3228
3229         Merge https://chromium.googlesource.com/chromium/blink/+/dc7879025e01d63be9fcf6a84ca6c9b8b5768a80
3230
3231         Implement the behavior specified in the current DOM4 working draft:
3232         http://www.w3.org/TR/2013/WD-dom-20131107/#dom-node-clonenode
3233
3234         Tests: fast/dom/Document/clone-node.html
3235                fast/dom/HTMLDocument/clone-node-quirks-mode.html
3236                svg/custom/clone-node.html
3237
3238         * dom/Document.cpp:
3239         (WebCore::Document::cloneNode):
3240         (WebCore::Document::cloneDocumentWithoutChildren):
3241         (WebCore::Document::cloneDataFromDocument):
3242         * dom/Document.h:
3243         * html/HTMLDocument.cpp:
3244         (WebCore::HTMLDocument::cloneDocumentWithoutChildren):
3245         * html/HTMLDocument.h:
3246         * svg/SVGDocument.cpp:
3247         (WebCore::SVGDocument::cloneDocumentWithoutChildren):
3248         * svg/SVGDocument.h:
3249
3250 2013-12-09  Andreas Kling  <akling@apple.com>
3251
3252         REGRESSION(r160260): Memory pressure signal causes web process to hang.
3253         <https://webkit.org/b/125465>
3254
3255         Reviewed by Tim Horton.
3256
3257         This command caused all of my web processes to hang:
3258
3259             notifyutil -p org.WebKit.lowMemory
3260
3261         This only happens when the cache pruning code encounters a resource
3262         using purgeable memory.
3263
3264         * loader/cache/MemoryCache.cpp:
3265         (WebCore::MemoryCache::pruneLiveResourcesToSize):
3266
3267             Grab the next CachedResource pointer before continuing the loop.
3268
3269 2013-12-09  peavo@outlook.com  <peavo@outlook.com>
3270
3271         [WinCairo] OpenGL compile error.
3272         https://bugs.webkit.org/show_bug.cgi?id=125383
3273
3274         Reviewed by Darin Adler.
3275
3276         * platform/graphics/opengl/Extensions3DOpenGLES.h: Define GL_HALF_FLOAT_ARB on Windows when OPENGL_ES_2 is used.
3277
3278 2013-12-09  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
3279
3280         Fix handling of 'inherit' and 'initial' for grid lines.
3281         https://bugs.webkit.org/show_bug.cgi?id=125223
3282
3283         Reviewed by Darin Adler.
3284
3285         'initial' and 'inherit' are always allowed values for CSS properties.
3286         As the CSSParser handles them automatically, those 2 values were never
3287         taken care of in StyleResolver, leading to crashes.
3288
3289         Added tests cases for 'inherit' and 'initial' to the following tests:
3290
3291         fast/css-grid-layout/grid-item-column-row-get-set.html
3292         fast/css-grid-layout/grid-item-end-after-get-set.html
3293         fast/css-grid-layout/grid-item-start-before-get-set.html
3294
3295         Patch backported from Blink: https://src.chromium.org/viewvc/blink?revision=149257&view=revision
3296
3297         * css/StyleResolver.cpp:
3298         (WebCore::StyleResolver::applyProperty):
3299         * rendering/style/RenderStyle.h:
3300         * rendering/style/StyleGridItemData.cpp:
3301         (WebCore::StyleGridItemData::StyleGridItemData):
3302
3303 2013-12-09  Joseph Pecoraro  <pecoraro@apple.com>
3304
3305         Web Inspector: Inspector.json and CodeGenerator tweaks
3306         https://bugs.webkit.org/show_bug.cgi?id=125321
3307
3308         Reviewed by Timothy Hatcher.
3309
3310         * inspector/protocol/Runtime.json:
3311         Runtime.js was depending on Network.FrameId. This is a layering
3312         violation, so ideally we can fix this later. For now, just copy
3313         the FrameId type into Runtime. They are strings so all is good.
3314
3315         * inspector/CodeGeneratorInspector.py:
3316         (Generator.EventMethodStructTemplate.append_epilog):
3317         * inspector/CodeGeneratorInspectorStrings.py:
3318         Improve --help usage information.
3319         Make the script work with a single domain json file.
3320         Add ASCIILiteral's where appropriate.
3321
3322 2013-12-09  Nick Diego Yamane  <nick.yamane@openbossa.org>
3323
3324         [Nix] Fix file name typo in PlatformNix.cmake
3325         https://bugs.webkit.org/show_bug.cgi?id=125457
3326
3327         Reviewed by Gustavo Noronha Silva.
3328
3329         Wrong file name introduced in http://trac.webkit.org/changeset/160310.
3330         * PlatformNix.cmake:
3331
3332 2013-12-09  Brendan Long  <b.long@cablelabs.com>
3333
3334         [GStreamer] Memory leak due to incorrect use of gst_tag_list_merge in TextCombinerGStreamer
3335         https://bugs.webkit.org/show_bug.cgi?id=125452
3336
3337         Reviewed by Philippe Normand.
3338
3339         No new tests because this fixes a memory leak.
3340
3341         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
3342         (webkitTextCombinerPadEvent): Use gst_tag_list_insert instead of gst_tag_list_merge, since we don't want to create a new list.
3343
3344 2013-12-09  Chris Fleizach  <cfleizach@apple.com>
3345
3346         AX: WebKit ignores @alt on IMG elements with role="text"
3347         https://bugs.webkit.org/show_bug.cgi?id=125363
3348
3349         Reviewed by Mario Sanchez Prada.
3350
3351         If an <img> element has a different role, the alt attribute should still be used in the 
3352         name calculation if present.
3353
3354         Test: accessibility/alt-tag-on-image-with-nonimage-role.html
3355
3356         * accessibility/AccessibilityNodeObject.cpp:
3357         (WebCore::AccessibilityNodeObject::usesAltTagForTextComputation):
3358         (WebCore::AccessibilityNodeObject::alternativeText):
3359         (WebCore::AccessibilityNodeObject::accessibilityDescription):
3360         (WebCore::AccessibilityNodeObject::text):
3361         * accessibility/AccessibilityNodeObject.h:
3362
3363 2013-12-08  Martin Robinson  <mrobinson@igalia.com>
3364
3365         [WK2][Soup] Use didReceiveBuffer instead of didReceiveData
3366         https://bugs.webkit.org/show_bug.cgi?id=118598
3367
3368         Reviewed by Gustavo Noronha Silva.
3369
3370         Original patch by Kwang Yul Seo  <skyul@company100.net> and Csaba Osztrogonác  <ossy@webkit.org>.
3371
3372         Switch from using didReceiveData to didReceiveBuffer for the Soup backend and
3373         let SharedBuffer wrap a SoupBuffer. This is necessary because the NetworkProcess
3374         only supports getting data via SharedBuffer.
3375
3376         * GNUmakefile.list.am: Add the new SharedBufferSoup.cpp file to the list.
3377         * PlatformEfl.cmake:
3378         * PlatformGTK.cmake:
3379         * PlatformNix.cmake:
3380         * platform/SharedBuffer.cpp: We no longer used the no-op version of the platformFoo methods.
3381         * platform/SharedBuffer.h: Ditto.
3382         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:  Use didReceiveBuffer instead of didReceiveData.
3383         * platform/network/ResourceHandleInternal.h: Have only a m_soupBuffer member instead of three to manage the buffer.
3384         * platform/network/soup/GOwnPtrSoup.cpp: Add support for SoupBuffer.
3385         * platform/network/soup/GOwnPtrSoup.h: Ditto.
3386         * platform/network/soup/ResourceHandleSoup.cpp:
3387         (WebCore::WebCoreSynchronousLoader::didReceiveData): ASSERT_NOT_REACHED here, since it should never be
3388         called now.
3389         (WebCore::WebCoreSynchronousLoader::didReceiveBuffer): Handle this call properly.
3390         (WebCore::ResourceHandle::ensureReadBuffer): Now we package up our buffer into a SoupBuffer.
3391         (WebCore::redirectSkipCallback): Use the new m_soupBuffer member.
3392         (WebCore::cleanupSoupRequestOperation): Ditto.
3393         (WebCore::nextMultipartResponsePartCallback): Ditto.
3394         (WebCore::sendRequestCallback): Ditto.
3395         (WebCore::readCallback):
3396         * platform/soup/SharedBufferSoup.cpp: Added.
3397
3398 2013-12-09  Michal Poteralski  <m.poteralski@samsung.com>
3399
3400         DataCloneError exception is not thrown when postMessage's second parameter is the source
3401         port or the target port.
3402
3403         https://bugs.webkit.org/show_bug.cgi?id=124708
3404
3405         Reviewed by Alexey Proskuryakov.
3406
3407         According to specification:
3408         http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#dom-window-postmessage
3409
3410         If the method was invoked with a second argument transfer then if any of the objects in the
3411         transfer are either the source port or the target port (if any), then a DataCloneError
3412         exception should be thrown. Currently an InvalidStateError exception is thrown what is an
3413         incorrect behaviour.
3414
3415         The proposed solution is change to the correct the exception value.
3416
3417         Tests: fast/dom/Window/postMessage-clone-port-error.html
3418
3419         * dom/MessagePort.cpp: