9084de407b1f4a27146d5b1cc60d00640e4a7c92
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-03-05  Krzysztof Czech  <k.czech@samsung.com>
2
3         [ATK] Expose missing functionalities of AtkTableCell to AT.
4         https://bugs.webkit.org/show_bug.cgi?id=129492
5
6         Reviewed by Mario Sanchez Prada.
7
8         Implemented missing API of AtkTableCell.
9
10         No new tests. Covered by existing ones.
11
12         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
13         (webkitAccessibleTableCellGetColumnSpan):
14         (webkitAccessibleTableCellGetRowSpan):
15         (webkitAccessibleTableCellGetPosition):
16         (webkitAccessibleTableCellGetTable):
17         (webkitAccessibleTableCellInterfaceInit):
18
19 2014-03-05  Andres Gomez  <agomez@igalia.com>
20
21         [GStreamer] WebSource doesn't need the "iradio-mode" property
22         https://bugs.webkit.org/show_bug.cgi?id=129685
23
24         Reviewed by Philippe Normand.
25
26         Removed the "iradio-mode" property from the WK source element
27         since this was only available for its modification from
28         playbin/uridecodebin and, as discussed in GStreamer bug #725383,
29         it was not being set and now is going to be removed.
30
31         It is safe just to send always the "icy-metadata" header set and
32         deal with returning "icy" headers as we were already doing.
33
34         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
35         (webKitWebSrcSetProperty):
36         (webKitWebSrcGetProperty):
37         (webKitWebSrcStart):
38
39 2014-03-05  Chang Shu  <cshu@webkit.org>
40
41         Copying wrapping text results in multiple spaces between wrapped lines stripped.
42         https://bugs.webkit.org/show_bug.cgi?id=129609.
43
44         Reviewed by Ryosuke Niwa.
45
46         While checking the condition of restoring the missing space, the collapsed spaces
47         may not be exactly one.
48
49         editing/pasteboard/copy-text-with-wrapped-tag.html is enhanced to test this case.
50
51         * editing/TextIterator.cpp:
52         (WebCore::TextIterator::handleTextBox):
53
54 2014-03-05  Ryosuke Niwa  <rniwa@webkit.org>
55
56         appendChild shouldn't invalidate LiveNodeLists and HTMLCollections if they don't have valid caches
57         https://bugs.webkit.org/show_bug.cgi?id=129727
58
59         Reviewed by Andreas Kling.
60
61         Before this patch, invalidateNodeListAndCollectionCachesInAncestors invalidated node lists and HTML
62         collections on ancestors of a node whenever we're inserting or removing a child node. This patch
63         makes HTMLCollections and LiveNodeLists register themselves with Document only when they have valid
64         caches.
65
66         Each user of CollectionIndexCache now implements willValidateIndexCache member function that gets
67         called when CollectionIndexCache caches any state and necessitates the registration with document.
68
69         * dom/ChildNodeList.h: Added an empty willValidateIndexCache since child node lists are never
70         registered with document.
71
72         * dom/CollectionIndexCache.h:
73         (WebCore::CollectionIndexCache::hasValidCache): Added.
74         (WebCore::CollectionIndexCache::nodeCount): Calls willValidateIndexCache when caching node count.
75         (WebCore::CollectionIndexCache::nodeAfterCached): Ditto. Also assert that hasValidCache() true in
76         the cases where we're simply updating our caches or adding more caches.
77         (WebCore::CollectionIndexCache::nodeAt): Ditto. Also added a code to set the length cache when
78         we've reached the end of the list. This should be a slight speed up on some cases.
79
80         * dom/Document.cpp:
81         (WebCore::Document::Document): Initializes a variable used by assertions.
82         (WebCore::Document::unregisterNodeList): Added an early exit for when m_listsInvalidatedAtDocument
83         is empty since invalidateNodeListAndCollectionCaches swaps out the list.
84         (WebCore::Document::registerCollection): Removed the boolean hasIdNameMap since we now explicitly
85         call collectionCachedIdNameMap in HTMLCollection.
86         (WebCore::Document::unregisterCollection): Ditto. Exit early if m_collectionsInvalidatedAtDocument
87         is empty since invalidateNodeListAndCollectionCaches swaps out the list.
88         * dom/Document.h:
89
90         * dom/LiveNodeList.cpp:
91         (WebCore::LiveNodeList::invalidateCache): Unregister the node list with document if we had caches.
92         * dom/LiveNodeList.h:
93         (WebCore::LiveNodeList::LiveNodeList):
94         (WebCore::LiveNodeList::~LiveNodeList): Ditto.
95         (WebCore::LiveNodeList::invalidateCache): Pass around document. This is necessary since document()
96         had already moved to the new document inside NodeListsNodeData::invalidateCaches.
97         (WebCore::LiveNodeList::willValidateIndexCache): Added. Registers itself with document.
98
99         * dom/Node.cpp:
100         (WebCore::Document::invalidateNodeListAndCollectionCaches): Swap the lists since invalidateCache
101         tries to unregister node lists and HTML collections with document. Since this is the only case in
102         which node lists and HTML collections being removed may not be in the lists in unregisterNodeList
103         and unregisterCollection, assert this condition via m_inInvalidateNodeListAndCollectionCaches.
104         (WebCore::NodeListsNodeData::invalidateCaches):
105
106         * dom/NodeRareData.h:
107         (WebCore::NodeListsNodeData::adoptDocument): Unregister node lists and HTML collections from old
108         document via invalidateCache. We need to explicitly pass in oldDocument here since owner node's
109         document had already been changed to newDocument at this point. Since we're invalidating caches,
110         there is no need to register node lists and HTML collections with newDocument.
111
112         * html/HTMLCollection.cpp:
113         (WebCore::HTMLCollection::HTMLCollection):
114         (WebCore::HTMLCollection::~HTMLCollection): Unregister the node list with document if we had caches.
115         (WebCore::HTMLCollection::invalidateCache): Ditto.
116         (WebCore::HTMLCollection::invalidateNamedElementCache):
117         * html/HTMLCollection.h:
118         (WebCore::HTMLCollection::invalidateCache): Pass around document as done in LiveNodeList.
119         (WebCore::HTMLCollection::willValidateIndexCache): Ditto.
120
121         * html/HTMLFormControlsCollection.cpp:
122         (WebCore::HTMLFormControlsCollection::invalidateCache): Ditto.
123         * html/HTMLFormControlsCollection.h:
124
125         * html/HTMLSelectElement.cpp:
126         (WebCore::HTMLSelectElement::invalidateSelectedItems): Ditto.
127         (WebCore::HTMLSelectElement::setRecalcListItems): Ditto.
128
129 2014-03-05  Jon Lee  <jonlee@apple.com>
130
131         Fix linker error after r165087
132         https://bugs.webkit.org/show_bug.cgi?id=129730
133
134         Reviewed by Csaba Osztrogonác.
135
136         * WebCore.exp.in: Remove undefined symbol __ZN7WebCore32WebVideoFullscreenChangeObserverD2Ev.
137
138 2014-03-04  Zalan Bujtas  <zalan@apple.com>
139
140         Enable device pixel repaint rect tracking.
141         https://bugs.webkit.org/show_bug.cgi?id=129712
142
143         Reviewed by Simon Fraser.
144
145         Tracked repaint rects are device pixel snapped now to support hiDPI test cases.
146
147         Test: fast/repaint/hidpi-device-pixel-based-repaint-rect-tracking.html
148
149         * WebCore.exp.in:
150         * page/FrameView.cpp:
151         (WebCore::FrameView::addTrackedRepaintRect):
152         (WebCore::FrameView::trackedRepaintRectsAsText): Print them as LayoutUnits to get
153         trailing zeros cut off.
154         * page/FrameView.h:
155         * rendering/RenderLayer.cpp:
156         (WebCore::RenderLayer::calculateClipRects):
157         * rendering/RenderLayer.h:
158         * rendering/RenderLayerBacking.cpp:
159         (WebCore::RenderLayerBacking::setContentsNeedDisplay):
160         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
161         * rendering/RenderView.cpp:
162         (WebCore::RenderView::repaintViewRectangle):
163
164 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
165
166         Don't clamp scrolling node offsets when the offset is changed by delegated scrolling
167         https://bugs.webkit.org/show_bug.cgi?id=129724
168
169         Reviewed by Sam Weinig.
170         
171         Call setScrollPositionWithoutContentEdgeConstraints() from
172         ScrollingTree::scrollPositionChangedViaDelegatedScrolling() so that
173         layers are not clamped during rubber-banding.
174         
175         This requires making setScrollPositionWithoutContentEdgeConstraints()
176         a pure virtual function on the base class.
177
178         * page/scrolling/ScrollingTree.cpp:
179         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
180         * page/scrolling/ScrollingTreeScrollingNode.h:
181         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
182         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
183
184 2014-03-04  Jeremy Jones  <jeremyj@apple.com>
185
186         WebVideoFullscreen, should make the hand off of the video layer explicit.
187         https://bugs.webkit.org/show_bug.cgi?id=128844
188
189         Reviewed by Simon Fraser.
190
191         This change introduces a more explicit hand-off of the video layer.
192         This describes the interactions between WebVideoFullscreenInterface and WebVideoFullscreenModel
193         WebVideoFullscreenModel <-> WebVideoFullscreenInterface
194               enterFullScreen(*) ->
195                                 <- borrowVideoLayer
196               willLendVideoLayer ->
197                didLendVideoLayer ->
198                                 <- didEnterFullscreen
199                                 ...
200                                 <- requestExitFullscreen
201                   exitFullscreen ->
202                                 <- returnVideoLayer
203                                 <- didExitFullscreen
204         (*) enterFullScreen actually comes from WebVideoFullscreenControllerAVKit.
205
206         * WebCore.exp.in:
207         Export new functions in WebVideoFullscreenInterfaceAVKit, WebVideoFullscreenModelMediaElement, etc.
208
209         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
210         Add WebVideoFullscreenControllerChangeObserver to forward fullscreen callbacks to WebVideoFullscreenController
211
212         (WebVideoFullscreenControllerChangeObserver::setTarget):
213         Sets obj-c target of fullscreen change callbacks.
214
215         (-[WebVideoFullscreenController init]):
216         Point _changeObserver's target at self.
217
218         (-[WebVideoFullscreenController dealloc]):
219         Clear _changeObserver's target.
220
221         (-[WebVideoFullscreenController enterFullscreen:]):
222         Retain self to prevent dealloc during animation or while fullscreen.
223         Connect _interface to _changeObserver.
224
225         (-[WebVideoFullscreenController exitFullscreen]):
226         Remove use of completion move cleanup to -didExitFullscreen.
227
228         (-[WebVideoFullscreenController didEnterFullscreen]):
229         Nothing to see here.
230
231         (-[WebVideoFullscreenController didExitFullscreen]):
232         Move clean up code that was in a completion to here.
233
234         * platform/ios/WebVideoFullscreenInterface.h:
235         Add delarations for more explicit hand-off of video layer.
236
237         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
238         Add WebVideoFullscreenChangeObserver to notify when fullscreen animations complete.
239         Add declarations for more explicit hand-off of video layer.
240         Add WebAVPlayerLayer now always wraps the m_videoLayer to prevent default behavior
241         of AVPlayerLayer.
242
243         (WebCore::WebVideoFullscreenChangeObserver::~WebVideoFullscreenChangeObserver):
244         Add empty virtual destructor.
245
246         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
247         Include AVKit headers instead of declaring everything locally.
248         AVPlayerLayer protocol renamed to AVVideoLayer per AVKit.
249
250         (-[WebAVPlayerController dealloc]):
251         Don't refer to self.
252
253         (-[WebAVPlayerController playerViewController:shouldDismissWithReason:]):
254         Pause before requesting exit fullscreen.
255
256         (-[WebAVPlayerLayer setPlayerController:]):
257         This is required by AVVideoLayer, but we don't need it.
258
259         (WebVideoFullscreenInterfaceAVKit::playerController):
260         White space.
261
262         (WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenChangeObserver):
263         Set observer to forward fullscreen changes to.
264
265         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
266         Use more explicit video layer hand-off.
267
268         (WebVideoFullscreenInterfaceAVKit::doEnterFullscreen):
269         Move enterFullscreen logic here.
270         AVPlayerViewController now takes the video layer at init time.
271         Always provide a video layer wrapped in a WebAVPlayerLayer.
272
273         (WebVideoFullscreenInterfaceAVKit::willLendVideoLayer):
274         Use more explicit video layer hand-off.
275
276         (WebVideoFullscreenInterfaceAVKit::didLendVideoLayer):
277         Use more explicit video layer hand-off.
278
279         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
280         Use more explicit video layer hand-off.
281
282         * platform/ios/WebVideoFullscreenModel.h:
283         Add functions for more explicit video layer hand-off.
284
285         * platform/ios/WebVideoFullscreenModelMediaElement.h:
286         Mark virtual functions as virtual.
287         Add changes for WebVideoFullscreenModel.
288
289         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
290         Use more explicit video layer hand-off.
291
292         (WebVideoFullscreenModelMediaElement::setMediaElement):
293         Don't push the video layer. Wait for a request for it.
294
295         (WebVideoFullscreenModelMediaElement::handleEvent):
296         Make sure m_videoFullscreenInterface is valid.
297
298         (WebVideoFullscreenModelMediaElement::borrowVideoLayer):
299         Use more explicit video layer hand-off.
300         Lend videoLayer in request to a request to borrow the videoLayer.
301         Make sure to retain the video layer before it is removed from the layer tree.
302
303         (WebVideoFullscreenModelMediaElement::returnVideoLayer):
304         Use more explicit video layer hand-off.
305
306         (WebVideoFullscreenModelMediaElement::requestExitFullscreen):
307         Don't clear the mediaElement reference until completely exited from fullscreen.
308
309 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
310
311         Get position:fixed working slightly better on iOS
312         https://bugs.webkit.org/show_bug.cgi?id=129714
313
314         Reviewed by Benjamin Poulain.
315
316         Send the scroll position as a FloatPoint, rather than an IntPoint.
317
318         * WebCore.exp.in:
319         * page/scrolling/ScrollingTree.cpp:
320         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
321         * page/scrolling/ScrollingTree.h:
322
323 2014-03-04  Alex Christensen  <achristensen@webkit.org>
324
325         Fixed Windows build without MEDIA_CONTROLS_SCRIPT enabled.
326         https://bugs.webkit.org/show_bug.cgi?id=129701
327
328         Reviewed by Jer Noble.
329
330         * WebCore.vcxproj/WebCore.vcxproj:
331         * DerivedSources.cpp:
332         Moved UserAgentScriptsData.cpp to DerivedSources.cpp to only be built if MEDIA_CONTROLS_SCRIPT is enabled.
333         * DerivedSources.make:
334         Only generate UserAgentScripts.cpp/h when USER_AGENT_SCRIPTS is non-empty.
335         * rendering/RenderThemeWin.cpp:
336         Only include UserAgentScripts.h when MEDIA_CONTROLS_SCRIPT is enabled.
337
338 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
339
340         Allow iOS DumpRenderTree crashes to show application-specific information
341         https://bugs.webkit.org/show_bug.cgi?id=129705
342
343         Reviewed by David Kilzer.
344
345         Make the WKSI function SetCrashReportApplicationSpecificInformation available
346         in iOS simulator builds.
347
348         * WebCore.exp.in:
349         * platform/ios/WebCoreSystemInterfaceIOS.mm:
350         * platform/mac/WebCoreSystemInterface.h:
351
352 2014-03-04  Andreas Kling  <akling@apple.com>
353
354         Spam static branch prediction hints on JS bindings.
355         <https://webkit.org/b/129703>
356
357         Add UNLIKELY hints to all !castedThis and exec->hadException() paths
358         in the JS bindings since they are almost always going to get skipped.
359
360         Reviewed by Geoff Garen.
361
362         * bindings/scripts/CodeGeneratorJS.pm:
363         (GenerateImplementation):
364         (GenerateParametersCheck):
365         (GenerateImplementationFunctionCall):
366         (GenerateConstructorDefinition):
367
368 2014-03-04  Adenilson Cavalcanti  <cavalcantii@gmail.com>
369
370         Remove unused StdDeviation from Gaussian Blur effect
371         https://bugs.webkit.org/show_bug.cgi?id=129693
372
373         Reviewed by Simon Fraser.
374
375         No new tests, no change on behavior.
376
377         * platform/graphics/filters/FEGaussianBlur.cpp:
378         * platform/graphics/filters/FEGaussianBlur.h:
379
380 2014-03-04  Andreas Kling  <akling@apple.com>
381
382         Add a Document::updateStyleIfNeededForNode(Node&).
383         <https://webkit.org/b/129689>
384
385         Generalize the mechanism that computed style uses to avoid doing full
386         style updates when the node we're interested in isn't actually dirty.
387
388         Reviewed by Antti Koivisto.
389
390         * css/CSSComputedStyleDeclaration.cpp:
391         (WebCore::ComputedStyleExtractor::propertyValue):
392         * dom/Document.cpp:
393         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
394         (WebCore::Document::updateStyleIfNeededForNode):
395         * dom/Document.h:
396         * editing/htmlediting.cpp:
397         (WebCore::isEditablePosition):
398         * html/HTMLInputElement.cpp:
399         (WebCore::HTMLInputElement::defaultEventHandler):
400
401 2014-03-04  Mark Hahnenberg  <mhahnenberg@apple.com>
402
403         Merge API shims and JSLock
404         https://bugs.webkit.org/show_bug.cgi?id=129650
405
406         Reviewed by Mark Lam.
407
408         No new tests.
409
410         JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason 
411         to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.
412
413         * bindings/js/DOMRequestState.h:
414         (WebCore::DOMRequestState::Scope::Scope):
415         * bindings/js/JSDOMPromise.h:
416         (WebCore::DeferredWrapper::resolve):
417         (WebCore::DeferredWrapper::reject):
418         (WebCore::DeferredWrapper::resolve<String>):
419         (WebCore::DeferredWrapper::resolve<bool>):
420         (WebCore::char>>):
421         (WebCore::DeferredWrapper::reject<String>):
422         * bindings/js/ScriptController.cpp:
423         (WebCore::ScriptController::evaluateInWorld):
424         * bindings/js/SerializedScriptValue.cpp:
425         (WebCore::SerializedScriptValue::create):
426         (WebCore::SerializedScriptValue::deserialize):
427
428 2014-03-04  Beth Dakin  <bdakin@apple.com>
429
430         REGRESSION: Overlay scrollbars that have grown are sometimes askew in the track
431         https://bugs.webkit.org/show_bug.cgi?id=129691
432         -and corresponding-
433         <rdar://problem/15666846>
434
435         Reviewed by Simon Fraser.
436
437         This regression started happening after we adopted the setPresentationValue 
438         ScrollbarPainter API which allows us to update the position of the scrollbar knob 
439         from our secondary scrolling thread. The bug occurs when the scrollbar grows while 
440         it still thinks it is in presentation-value mode. Whenever the scrollbar grows, it 
441         should be in non-presentation value mode.
442
443         If the wheel event has ended or been cancelled, we can switch out of presentation 
444         value mode.
445         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
446         (WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
447
448         Sometimes we will grow the scrollbar before we have received a wheel event with 
449         the end or cancelled phase, and so automatically switch out of presentation-value 
450         mode whenever we start one of these animations.
451         * platform/mac/ScrollAnimatorMac.mm:
452         (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
453
454 2014-03-04  Zan Dobersek  <zdobersek@igalia.com>
455
456         Move Source/WebCore/html/track/ code to std::unique_ptr
457         https://bugs.webkit.org/show_bug.cgi?id=129666
458
459         Reviewed by Eric Carlson.
460
461         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/html/track/ with std::unique_ptr.
462
463         * html/track/AudioTrack.h:
464         * html/track/InbandWebVTTTextTrack.cpp:
465         (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData):
466         * html/track/InbandWebVTTTextTrack.h:
467         * html/track/LoadableTextTrack.cpp:
468         (WebCore::LoadableTextTrack::loadTimerFired):
469         (WebCore::LoadableTextTrack::newCuesAvailable):
470         (WebCore::LoadableTextTrack::cueLoadingCompleted):
471         (WebCore::LoadableTextTrack::newRegionsAvailable):
472         * html/track/LoadableTextTrack.h:
473         * html/track/TextTrack.h:
474         * html/track/TextTrackCue.h:
475         * html/track/TextTrackRegion.h:
476         * html/track/VTTCue.cpp:
477         (WebCore::VTTCue::createWebVTTNodeTree):
478         (WebCore::VTTCue::markFutureAndPastNodes):
479         * html/track/VTTCue.h:
480         * html/track/VideoTrack.h:
481         * html/track/WebVTTParser.cpp:
482         (WebCore::WebVTTParser::WebVTTParser):
483         * html/track/WebVTTParser.h:
484         * html/track/WebVTTTokenizer.h:
485         * loader/TextTrackLoader.cpp:
486         (WebCore::TextTrackLoader::processNewCueData):
487         * loader/TextTrackLoader.h:
488
489 2014-03-04  Zalan Bujtas  <zalan@apple.com>
490
491         Subpixel rendering: Make border-radius painting device pixel aware.
492         https://bugs.webkit.org/show_bug.cgi?id=129558
493
494         Reviewed by Simon Fraser.
495
496         Snap rounded rects to device pixels right before passing them to GraphicsContext.
497
498         * rendering/RenderBoxModelObject.cpp:
499         (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
500         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
501         (WebCore::RenderBoxModelObject::paintBorder):
502         * rendering/RenderBoxModelObject.h:
503         * rendering/RenderReplaced.cpp:
504         (WebCore::RenderReplaced::paint):
505         * rendering/RenderWidget.cpp:
506         (WebCore::RenderWidget::paint):
507
508 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
509
510         Crashes and assertions running iOS compositing tests
511         https://bugs.webkit.org/show_bug.cgi?id=129688
512
513         Reviewed by Dean Jackson.
514         
515         When a layer is no longer composited, we need to unregister it
516         from the scrolling coordinator, and remove it from m_scrollCoordinatedLayers.
517
518         Tested by compositing tests on iOS.
519
520         * rendering/RenderLayerCompositor.cpp:
521         (WebCore::RenderLayerCompositor::updateBacking):
522
523 2014-03-04  Antti Koivisto  <antti@apple.com>
524
525         Update bindings test results after r165046.
526
527         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
528         (webkit_dom_test_obj_set_property):
529         (webkit_dom_test_obj_set_reflected_string_attr):
530         (webkit_dom_test_obj_set_reflected_url_attr):
531         (webkit_dom_test_obj_set_reflected_custom_url_attr):
532         * bindings/scripts/test/JS/JSTestObj.cpp:
533         (WebCore::setJSTestObjReflectedStringAttr):
534         (WebCore::setJSTestObjReflectedURLAttr):
535         (WebCore::setJSTestObjReflectedCustomURLAttr):
536         * bindings/scripts/test/ObjC/DOMTestObj.mm:
537         (-[DOMTestObj setReflectedStringAttr:]):
538         (-[DOMTestObj setReflectedURLAttr:]):
539         (-[DOMTestObj setReflectedCustomURLAttr:]):
540
541 2014-03-04  Martin Robinson  <mrobinson@igalia.com>
542
543         [GTK] Simplify the GObject DOM bindings API break check into one step
544         https://bugs.webkit.org/show_bug.cgi?id=129571
545
546         Reviewed by Carlos Garcia Campos.
547
548         * bindings/gobject/GNUmakefile.am: We no longer generate the webkitdom.symbols file in the
549         DerivedSources directory. All the logic is handled internally in the script now.
550         * bindings/scripts/gobject-run-api-break-test: Removed.
551
552 2014-03-04  Zalan Bujtas  <zalan@apple.com>
553
554         Build fix for iOS.
555
556         * rendering/RenderThemeIOS.mm:
557         (WebCore::RenderThemeIOS::addRoundedBorderClip):
558         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
559
560 2014-03-04  Zalan Bujtas  <zalan@apple.com>
561
562         Subpixel rendering: Make GraphicsLayer::fillRect FloatRoundedRect based and cleanup dependencies.
563         https://bugs.webkit.org/show_bug.cgi?id=129557
564
565         Reviewed by Simon Fraser.
566
567         This is the preparation for snapping rounded rects to device pixel position. It enables
568         device pixel aware border-radius painting.
569
570         No change in functionality.
571
572         * platform/efl/RenderThemeEfl.cpp:
573         (WebCore::RenderThemeEfl::paintMediaSliderThumb):
574         * platform/graphics/FloatRoundedRect.cpp:
575         (WebCore::FloatRoundedRect::FloatRoundedRect):
576         (WebCore::FloatRoundedRect::isRenderable):
577         * platform/graphics/FloatRoundedRect.h:
578         * platform/graphics/GraphicsContext.cpp:
579         (WebCore::GraphicsContext::clipRoundedRect):
580         (WebCore::GraphicsContext::clipOutRoundedRect):
581         (WebCore::GraphicsContext::fillRoundedRect):
582         (WebCore::GraphicsContext::fillRectWithRoundedHole):
583         * platform/graphics/GraphicsContext.h:
584         * platform/graphics/Path.cpp:
585         (WebCore::Path::addRoundedRect):
586         * platform/graphics/Path.h:
587         * platform/graphics/RoundedRect.cpp:
588         (WebCore::RoundedRect::pixelSnappedRoundedRectForPainting):
589         * platform/graphics/RoundedRect.h:
590         * platform/graphics/ShadowBlur.cpp:
591         (WebCore::ShadowBlur::drawRectShadow):
592         (WebCore::ShadowBlur::drawInsetShadow):
593         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
594         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
595         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
596         (WebCore::ShadowBlur::drawRectShadowWithTiling):
597         * platform/graphics/ShadowBlur.h:
598         * platform/graphics/cairo/GraphicsContextCairo.cpp:
599         (WebCore::GraphicsContext::fillRect):
600         (WebCore::GraphicsContext::platformFillRoundedRect):
601         (WebCore::GraphicsContext::fillRectWithRoundedHole):
602         * platform/graphics/cg/GraphicsContextCG.cpp:
603         (WebCore::GraphicsContext::fillRect):
604         (WebCore::GraphicsContext::platformFillRoundedRect):
605         (WebCore::GraphicsContext::fillRectWithRoundedHole):
606         * platform/graphics/wince/GraphicsContextWinCE.cpp:
607         (WebCore::GraphicsContext::fillRoundedRect):
608         * platform/gtk/RenderThemeGtk.cpp:
609         (WebCore::borderRadiiFromStyle):
610         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
611         (WebCore::RenderThemeGtk::paintMediaSliderThumb):
612         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
613         * platform/win/DragImageWin.cpp:
614         (WebCore::createDragImageForLink):
615         * rendering/RenderBox.cpp:
616         (WebCore::RenderBox::paintBoxDecorations):
617         (WebCore::RenderBox::pushContentsClip):
618         * rendering/RenderBoxModelObject.cpp:
619         (WebCore::RenderBoxModelObject::clipRoundedInnerRect):
620         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
621         (WebCore::RenderBoxModelObject::paintBorder):
622         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
623         (WebCore::RenderBoxModelObject::clipBorderSideForComplexInnerPath):
624         (WebCore::RenderBoxModelObject::paintBoxShadow):
625         * rendering/RenderLayer.cpp:
626         (WebCore::RenderLayer::clipToRect):
627         * rendering/RenderThemeIOS.mm:
628         (WebCore::RenderThemeIOS::paintRadioDecorations):
629         (WebCore::RenderThemeIOS::paintTextFieldDecorations):
630         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
631         (WebCore::RenderThemeIOS::paintSliderTrack):
632         (WebCore::RenderThemeIOS::paintProgressBar):
633         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
634         * rendering/RenderThemeMac.mm:
635         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
636         (WebCore::RenderThemeMac::paintSliderTrack):
637         * rendering/RenderThemeSafari.cpp:
638         (WebCore::RenderThemeSafari::paintMenuListButtonGradients):
639         (WebCore::RenderThemeSafari::paintSliderTrack):
640         * rendering/shapes/BoxShape.cpp:
641         (WebCore::BoxShape::buildDisplayPaths):
642         * rendering/style/BasicShapes.cpp:
643         (WebCore::BasicShapeInset::path):
644
645 2014-03-04  Andreas Kling  <akling@apple.com>
646
647         Micro-optimize Strings in JS bindings.
648         <https://webkit.org/b/129673>
649
650         Tweaked for new jsStringWithWeakOwner signature. This patch removes
651         36 bytes of code from every wrapper getter that returns a DOMString.
652
653         Reviewed by Ryosuke Niwa.
654
655         * bindings/js/JSDOMBinding.h:
656         (WebCore::jsStringWithCache):
657
658 2014-03-03  David Kilzer  <ddkilzer@apple.com>
659
660         SVGPropertyTearOffs should detachChildren before deleting its value.
661         <http://webkit.org/b/129618>
662         <rdar://problem/15661617>
663
664         Reviewed by Maciej Stachowiak.
665
666         Merged from Blink (patch by kouhei@chromium.org):
667         https://src.chromium.org/viewvc/blink?revision=158563&view=revision
668         http://crbug.com/296276
669
670         Test: svg/transforms/svg-matrix-tearoff-crash.html
671
672         NOTE: The test does not reproduce a crash on WebKit using
673         JavaScriptCore.
674
675         * svg/properties/SVGPropertyTearOff.h:
676         (WebCore::SVGPropertyTearOff::setValue):
677         (WebCore::SVGPropertyTearOff::~SVGPropertyTearOff):
678         - Call detachChildren() if m_value is a copy.  The original
679           Blink patch did not modify the destructor code path, although
680           that seems obvious via code inspection.
681
682 2014-03-04  Zalan Bujtas  <zalan@apple.com>
683
684         Subpixel rendering: Incorrect repaint rect cuts off content's right edge after move.
685         https://bugs.webkit.org/show_bug.cgi?id=129652
686
687         Reviewed by Simon Fraser.
688
689         When repaint rect is adjusted in order to take the distance from renderer into account,
690         the accumulated fraction value need to be added too. This is always a positive value.
691
692         Test: fast/borders/hidpi-border-clipping-right-after-move.html
693
694         * rendering/RenderLayerBacking.cpp:
695         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
696
697 2014-03-04  Ryuan Choi  <ryuan.choi@samsung.com>
698
699         Remove unused member variable of NetworkInfoController
700         https://bugs.webkit.org/show_bug.cgi?id=129674
701
702         Reviewed by Gyuyoung Kim.
703
704         * Modules/networkinfo/NetworkInfoController.cpp:
705         (WebCore::NetworkInfoController::NetworkInfoController):
706         (WebCore::NetworkInfoController::create):
707         (WebCore::provideNetworkInfoTo):
708         * Modules/networkinfo/NetworkInfoController.h: Removed m_page which is not really used.
709
710 2014-02-07  Sergio Villar Senin  <svillar@igalia.com>
711
712         [CSS Grid Layout] Percentages of indefinite sizes should compute to auto
713         https://bugs.webkit.org/show_bug.cgi?id=128173
714
715         Reviewed by Darin Adler.
716
717         We should treat percentages of indefinite sizes as auto as
718         mandated by the spec. Otherwise we would end up calculating a
719         percentage of -1, the value we use to represent infinite.
720
721         Added some test cases to the current tests.
722
723         * rendering/RenderGrid.cpp:
724         (WebCore::RenderGrid::gridTrackSize):
725         * rendering/style/GridTrackSize.h:
726         (WebCore::GridTrackSize::isPercentage):
727
728 2014-03-04  Ryosuke Niwa  <rniwa@webkit.org>
729
730         Don't synchronize attributes in reflect setters when we don't need to
731         https://bugs.webkit.org/show_bug.cgi?id=129662
732
733         Reviewed by Andreas Kling.
734
735         The vast majority of attributes don't need synchronization. Avoid calling synchronizeAttribute in setters
736         for those content attributes generated by "Reflect" keyword in IDL.
737
738         * bindings/scripts/CodeGenerator.pm:
739         (SetterExpression):
740         * dom/Element.cpp:
741         (WebCore::Element::setAttributeWithoutSynchronization): Added.
742         * dom/Element.h:
743
744 2014-03-04  Andreas Kling  <akling@apple.com>
745
746         Remove Document::idAttributeName().
747         <https://webkit.org/b/129663>
748
749         Reviewed by Ryosuke "DYEB" Niwa.
750
751         This abstraction is not actually used and causes unnecessary indirection
752         in some pretty hot code paths.
753
754         Replace it with hard-coded HTMLNames::idAttr instead which is a compile
755         time constant pointer. We can revisit this in the future if we wish to
756         implement support for custom id attributes.
757
758         * dom/Attr.cpp:
759         (WebCore::Attr::isId):
760         * dom/Document.cpp:
761         (WebCore::Document::Document):
762         * dom/Document.h:
763         * dom/Element.cpp:
764         (WebCore::Element::attributeChanged):
765         (WebCore::Element::willModifyAttribute):
766         * dom/Element.h:
767         (WebCore::Element::getIdAttribute):
768         (WebCore::Element::getNameAttribute):
769         (WebCore::Element::setIdAttribute):
770         * html/HTMLElement.cpp:
771         (WebCore::HTMLElement::parseAttribute):
772         * html/HTMLFrameElementBase.cpp:
773         (WebCore::HTMLFrameElementBase::parseAttribute):
774         * html/HTMLMapElement.cpp:
775         (WebCore::HTMLMapElement::parseAttribute):
776         * svg/SVGElement.cpp:
777         (WebCore::SVGElement::attributeChanged):
778         (WebCore::SVGElement::isKnownAttribute):
779         (WebCore::SVGElement::svgAttributeChanged):
780
781 2014-03-04  Ryosuke Niwa  <rniwa@webkit.org>
782
783         REGRESSION(r164856): Use after free in WebCore::QualifiedName::operator== / WebCore::StyledElement::attributeChanged
784         https://bugs.webkit.org/show_bug.cgi?id=129550
785
786         Reviewed by Andreas Kling.
787
788         We can't store a reference to QualifiedName here because ensureUniqueElementData could delete QualifiedName inside Attribute.
789
790         Test: fast/dom/uniquing-attributes-via-setAttribute.html
791
792         * dom/Element.cpp:
793         (WebCore::Element::setAttributeInternal):
794
795 2014-03-04  Hyowon Kim  <hw1008.kim@samsung.com>
796
797         Move EvasGLContext and EvasGLSurface files into the efl common directory.
798         https://bugs.webkit.org/show_bug.cgi?id=129603
799
800         Reviewed by Gyuyoung Kim.
801
802         EFL port will use EvasGLContext and EvasGLSurface files in both WK1 and WK2.
803
804         No new tests, just refactorings.
805
806         * PlatformEfl.cmake:
807         * platform/graphics/efl/EvasGLContext.cpp: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLContext.cpp.
808         (WebKit::EvasGLContext::EvasGLContext):
809         (WebKit::EvasGLContext::~EvasGLContext):
810         * platform/graphics/efl/EvasGLContext.h: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLContext.h.
811         (WebKit::EvasGLContext::create):
812         (WebKit::EvasGLContext::context):
813         * platform/graphics/efl/EvasGLSurface.cpp: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLSurface.cpp.
814         (WebKit::EvasGLSurface::EvasGLSurface):
815         (WebKit::EvasGLSurface::~EvasGLSurface):
816         * platform/graphics/efl/EvasGLSurface.h: Renamed from Source/WebKit2/UIProcess/API/efl/EvasGLSurface.h.
817         (WebKit::EvasGLSurface::create):
818         (WebKit::EvasGLSurface::surface):
819
820 2014-03-03  Martin Robinson  <mrobinson@igalia.com>
821
822         Fix the GTK+ CMake build
823
824         * PlatformGTK.cmake: Add a missing file to the source list.
825
826 2014-03-03  Sanghyup Lee  <sh53.lee@samsung.com>
827
828         :active style is not cleared when its display property is set to none before mouse released.
829         https://bugs.webkit.org/show_bug.cgi?id=129465
830
831         Reviewed by Antonio Gomes.
832
833         Source/WebCore:
834
835         We currently clearing the :active style when element has a renderer.
836         This patch makes elements clear its active style regardless of renderer. 
837
838         * dom/Document.cpp:
839         (WebCore::Document::updateHoverActiveState):
840
841         LayoutTests:
842
843         * fast/css/active-display-none-expected.txt: Added.
844         * fast/css/active-display-none.html: Added.
845
846
847 2014-03-03  Andreas Kling  <akling@apple.com>
848
849         Remove 2 unnecessary includes from JSDOMBinding.h
850         <https://webkit.org/b/129619>
851
852         Reviewed by Antti Koivisto.
853
854         * bindings/js/JSDOMBinding.h:
855
856 2014-03-03  Myles C. Maxfield  <mmaxfield@apple.com>
857
858         GraphicsContext::drawLineForText needs to be exported from WebCore.dylib for iOS builds
859         https://bugs.webkit.org/show_bug.cgi?id=129647
860
861         Reviewed by NOBODY (This is a build fix).
862
863         Fixing after r165025 and r165016.
864
865         No new tests as this is a build fix.
866
867         * WebCore.exp.in:
868
869 2014-03-03  Jer Noble  <jer.noble@apple.com>
870
871         [iOS] Start playback button misplaced
872         https://bugs.webkit.org/show_bug.cgi?id=129628
873
874         Reviewed by Simon Fraser.
875
876         On YouTube embeds, while the video is loading it is placed into the DOM with a 0x0 size.
877         This causes the start playback button to be visible in the upper-left corner of the embed
878         area. The button wasn't visible previously (in plugin mode) because the plugin clipped its
879         drawing to its bounds, and so the <video> shadow should do the same.
880
881         * Modules/mediacontrols/mediaControlsiOS.css:
882         (::-webkit-media-controls):
883
884 2014-03-03  Enrica Casucci  <enrica@apple.com>
885
886         Build fix for iOS simulator.
887
888         * WebCore.exp.in:
889
890 2014-03-03  Jeremy Jones  <jeremyj@apple.com>
891
892         Forward application suspend resume notifications to the web process.
893         https://bugs.webkit.org/show_bug.cgi?id=129356
894
895         Reviewed by Eric Carlson.
896
897         * platform/audio/ios/MediaSessionManagerIOS.mm:
898         (-[WebMediaSessionHelper initWithCallback:]):
899         Observe UIApplicationDidBecomeActiveNotification,
900         WebUIApplicationDidBecomeActiveNotification,
901         WebUIApplicationWillEnterForegroundNotification, and
902         WebUIApplicationWillResignActiveNotification
903         
904         (-[WebMediaSessionHelper applicationDidBecomeActive:]):
905         Resume session.
906
907 2014-03-03  Commit Queue  <commit-queue@webkit.org>
908
909         Unreviewed, rolling out r165013.
910         http://trac.webkit.org/changeset/165013
911         https://bugs.webkit.org/show_bug.cgi?id=129646
912
913         New code is not thread safe, asserting on a worker test
914         (Requested by ap on #webkit).
915
916         * WebCore.exp.in:
917         * editing/DeleteButtonController.cpp:
918         (WebCore::DeleteButtonController::createDeletionUI):
919         * html/DOMURL.cpp:
920         (WebCore::DOMURL::revokeObjectURL):
921         * inspector/InspectorPageAgent.cpp:
922         (WebCore::InspectorPageAgent::cachedResource):
923         * inspector/InspectorResourceAgent.cpp:
924         (WebCore::InspectorResourceAgent::replayXHR):
925         * loader/DocumentLoader.cpp:
926         (WebCore::areAllLoadersPageCacheAcceptable):
927         * loader/FrameLoader.cpp:
928         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
929         * loader/ImageLoader.cpp:
930         (WebCore::ImageLoader::updateFromElement):
931         * loader/archive/cf/LegacyWebArchive.cpp:
932         (WebCore::LegacyWebArchive::create):
933         * loader/cache/CachedCSSStyleSheet.cpp:
934         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
935         * loader/cache/CachedCSSStyleSheet.h:
936         * loader/cache/CachedFont.cpp:
937         (WebCore::CachedFont::CachedFont):
938         * loader/cache/CachedFont.h:
939         * loader/cache/CachedImage.cpp:
940         (WebCore::CachedImage::CachedImage):
941         * loader/cache/CachedImage.h:
942         * loader/cache/CachedRawResource.cpp:
943         (WebCore::CachedRawResource::CachedRawResource):
944         * loader/cache/CachedRawResource.h:
945         * loader/cache/CachedResource.cpp:
946         (WebCore::CachedResource::CachedResource):
947         (WebCore::CachedResource::~CachedResource):
948         * loader/cache/CachedResource.h:
949         * loader/cache/CachedResourceLoader.cpp:
950         (WebCore::createResource):
951         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
952         (WebCore::CachedResourceLoader::requestResource):
953         (WebCore::CachedResourceLoader::revalidateResource):
954         (WebCore::CachedResourceLoader::loadResource):
955         * loader/cache/CachedResourceLoader.h:
956         * loader/cache/CachedSVGDocument.cpp:
957         (WebCore::CachedSVGDocument::CachedSVGDocument):
958         * loader/cache/CachedSVGDocument.h:
959         * loader/cache/CachedScript.cpp:
960         (WebCore::CachedScript::CachedScript):
961         * loader/cache/CachedScript.h:
962         * loader/cache/CachedTextTrack.cpp:
963         (WebCore::CachedTextTrack::CachedTextTrack):
964         * loader/cache/CachedTextTrack.h:
965         * loader/cache/CachedXSLStyleSheet.cpp:
966         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
967         * loader/cache/CachedXSLStyleSheet.h:
968         * loader/cache/MemoryCache.cpp:
969         (WebCore::MemoryCache::add):
970         (WebCore::MemoryCache::revalidationSucceeded):
971         (WebCore::MemoryCache::resourceForURL):
972         (WebCore::MemoryCache::resourceForRequest):
973         (WebCore::MemoryCache::addImageToCache):
974         (WebCore::MemoryCache::removeImageFromCache):
975         (WebCore::MemoryCache::evict):
976         (WebCore::MemoryCache::removeResourcesWithOrigin):
977         (WebCore::MemoryCache::getOriginsWithCache):
978         (WebCore::MemoryCache::removeUrlFromCache):
979         (WebCore::MemoryCache::removeRequestFromCache):
980         (WebCore::MemoryCache::removeRequestFromCacheImpl):
981         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache):
982         (WebCore::MemoryCache::getStatistics):
983         (WebCore::MemoryCache::setDisabled):
984         * loader/cache/MemoryCache.h:
985         * platform/CrossThreadCopier.cpp:
986         * platform/CrossThreadCopier.h:
987         * platform/network/cf/ResourceRequest.h:
988         (WebCore::ResourceRequest::ResourceRequest):
989         * rendering/RenderSnapshottedPlugIn.cpp:
990         (WebCore::RenderSnapshottedPlugIn::updateSnapshot):
991         * testing/Internals.cpp:
992         (WebCore::Internals::isLoadingFromMemoryCache):
993
994 2014-03-03  Sam Weinig  <sam@webkit.org>
995
996         Fix the iOS Simulator build.
997
998         * WebCore.exp.in:
999
1000 2014-03-03  Myles C. Maxfield  <mmaxfield@apple.com>
1001
1002         Space between double underlines does not scale with font size
1003         https://bugs.webkit.org/show_bug.cgi?id=129521
1004
1005         Reviewed by Simon Fraser.
1006
1007         This patch moves the logic about how far to draw the second underline (when text-decoration-style: double
1008         is specified) from InlineTextBox to GraphicsContext, because GraphicsContext is the authoritative source
1009         about how thick underlines should be. The space between the two underlines is set to the thickness of
1010         each of the underlines.
1011
1012         This patch also deletes some unused code in InlineTextBox that was never getting triggered, in addition
1013         to unifying drawLineForText with drawLinesForText. This didn't have any performance impact in my testing.
1014
1015         Test: fast/css3-text/css3-text-decoration/text-decoration-style-double-space-scales.html
1016
1017         * platform/graphics/GraphicsContext.h: drawLineForText takes a boolean for if we should draw double
1018         underlines.
1019         * platform/graphics/cg/GraphicsContextCG.cpp:
1020         (WebCore::GraphicsContext::drawLineForText):
1021         (WebCore::GraphicsContext::drawLinesForText):
1022         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1023         (WebCore::GraphicsContext::drawLineForText):
1024         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1025         (WebCore::GraphicsContext::drawLineForText):
1026         * rendering/InlineTextBox.cpp: Use new boolean argument
1027         (WebCore::drawSkipInkUnderline):
1028         (WebCore::InlineTextBox::paintDecoration):
1029
1030 2014-02-28  Chris Fleizach  <cfleizach@apple.com>
1031
1032         AX: Support IOS Accessibility in WK2
1033         https://bugs.webkit.org/show_bug.cgi?id=129527
1034
1035         Reviewed by Sam Weinig.
1036
1037         Update the iOS wrapper so that it can convert points to screen space in WebKit2.
1038
1039         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1040         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
1041         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
1042
1043 2014-03-03  Martin Hock  <mhock@apple.com>
1044
1045         Add support for sessions to MemoryCache.
1046         https://bugs.webkit.org/show_bug.cgi?id=127794
1047
1048         Reviewed by Sam Weinig.
1049
1050         * WebCore.exp.in:
1051         * editing/DeleteButtonController.cpp:
1052         (WebCore::DeleteButtonController::createDeletionUI): Initialize CachedImage with sessionID.
1053         * html/DOMURL.cpp:
1054         (WebCore::DOMURL::revokeObjectURL): Remove URL from MemoryCache for all sessions.
1055         * inspector/InspectorPageAgent.cpp:
1056         (WebCore::InspectorPageAgent::cachedResource): Pass sessionID to MemoryCache.
1057         * inspector/InspectorResourceAgent.cpp:
1058         (WebCore::InspectorResourceAgent::replayXHR): Ditto.
1059         * loader/DocumentLoader.cpp:
1060         (WebCore::areAllLoadersPageCacheAcceptable): Ditto.
1061         * loader/FrameLoader.cpp:
1062         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): Ditto.
1063         * loader/ImageLoader.cpp:
1064         (WebCore::ImageLoader::updateFromElement): Initialize CachedImage with sessionID.
1065         * loader/archive/cf/LegacyWebArchive.cpp:
1066         (WebCore::LegacyWebArchive::create): Pass sessionID to MemoryCache.
1067         * loader/cache/CachedCSSStyleSheet.cpp:
1068         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): Constructor takes sessionID.
1069         * loader/cache/CachedCSSStyleSheet.h:
1070         * loader/cache/CachedFont.cpp: Ditto.
1071         (WebCore::CachedFont::CachedFont):
1072         * loader/cache/CachedFont.h:
1073         * loader/cache/CachedImage.cpp: Ditto.
1074         (WebCore::CachedImage::CachedImage):
1075         * loader/cache/CachedImage.h:
1076         * loader/cache/CachedRawResource.cpp: Ditto.
1077         (WebCore::CachedRawResource::CachedRawResource):
1078         * loader/cache/CachedRawResource.h:
1079         * loader/cache/CachedResource.cpp: Ditto.
1080         (WebCore::CachedResource::CachedResource):
1081         (WebCore::CachedResource::~CachedResource): Pass sessionID to MemoryCache.
1082         * loader/cache/CachedResource.h:
1083         (WebCore::CachedResource::sessionID):
1084         * loader/cache/CachedResourceLoader.cpp:
1085         (WebCore::createResource): Constructors take sessionID.
1086         (WebCore::CachedResourceLoader::sessionID): Retrieve sessionID from page.
1087         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Pass sessionID to MemoryCache.
1088         (WebCore::CachedResourceLoader::requestResource): Initialize CachedCSSStyleSheet with sessionID.
1089         (WebCore::CachedResourceLoader::revalidateResource): Initialize cached resource with sessionID.
1090         (WebCore::CachedResourceLoader::loadResource): Pass sessionID to MemoryCache and initialize cached resource with sessionID.
1091         * loader/cache/CachedResourceLoader.h:
1092         * loader/cache/CachedSVGDocument.cpp: Constructor takes sessionID.
1093         (WebCore::CachedSVGDocument::CachedSVGDocument):
1094         * loader/cache/CachedSVGDocument.h:
1095         * loader/cache/CachedScript.cpp: Ditto.
1096         (WebCore::CachedScript::CachedScript):
1097         * loader/cache/CachedScript.h:
1098         * loader/cache/CachedTextTrack.cpp: Ditto.
1099         (WebCore::CachedTextTrack::CachedTextTrack):
1100         * loader/cache/CachedTextTrack.h:
1101         * loader/cache/CachedXSLStyleSheet.cpp: Ditto.
1102         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
1103         * loader/cache/CachedXSLStyleSheet.h:
1104         * loader/cache/MemoryCache.cpp:
1105         (WebCore::MemoryCache::getSessionMap): Retrieve CachedResourceMap based on sessionID.
1106         (WebCore::MemoryCache::add): Use sessionID from CachedResource parameter.
1107         (WebCore::MemoryCache::revalidationSucceeded): Add sessionID parameter.
1108         (WebCore::MemoryCache::resourceForURL): Ditto.
1109         (WebCore::MemoryCache::resourceForRequest): Ditto, also move impl into impl method.
1110         (WebCore::MemoryCache::resourceForRequestImpl): Add CachedResourceMap parameter.
1111         (WebCore::MemoryCache::addImageToCache): Use default sessionID.
1112         (WebCore::MemoryCache::removeImageFromCache): Ditto.
1113         (WebCore::MemoryCache::evict): Use sessionID from CachedResource parameter.
1114         (WebCore::MemoryCache::removeResourcesWithOrigin): Iterate through all CachedResourceMaps.
1115         (WebCore::MemoryCache::getOriginsWithCache): Ditto.
1116         (WebCore::MemoryCache::removeUrlFromCache): Add sessionID parameter.
1117         (WebCore::MemoryCache::removeRequestFromCache): Ditto.
1118         (WebCore::MemoryCache::removeRequestFromCacheImpl): Ditto.
1119         (WebCore::MemoryCache::removeRequestFromSessionCaches): Iterate through all CachedResourceMaps.
1120         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Add sessionID parameter.
1121         (WebCore::MemoryCache::getStatistics): Iterate through all CachedResourceMaps.
1122         (WebCore::MemoryCache::setDisabled): Ditto.
1123         * loader/cache/MemoryCache.h: Create another level for cache.
1124         * platform/CrossThreadCopier.cpp: Allow copying SessionIDs across threads.
1125         (WebCore::SessionID>::copy):
1126         * platform/CrossThreadCopier.h:
1127         * platform/network/cf/ResourceRequest.h:
1128         (WebCore::ResourceRequest::ResourceRequest): Remove trailing whitespace.
1129         * rendering/RenderSnapshottedPlugIn.cpp:
1130         (WebCore::RenderSnapshottedPlugIn::updateSnapshot): Initialize CachedImage with sessionID.
1131         * testing/Internals.cpp:
1132         (WebCore::Internals::isLoadingFromMemoryCache): Pass sessionID to MemoryCache.
1133
1134 2014-03-03  Andreas Kling  <akling@apple.com>
1135
1136         Remove unused DataView code from JSDOMBinding.h
1137         <https://webkit.org/b/129616>
1138
1139         Reviewed by Antti Koivisto.
1140
1141         * bindings/js/JSDOMBinding.h:
1142
1143 2014-03-03  Simon Fraser  <simon.fraser@apple.com>
1144
1145         Allow overflow-scroll to be one-finger scrolled until we hook up UIScrollViews
1146         https://bugs.webkit.org/show_bug.cgi?id=129621
1147
1148         Reviewed by Benjamin Poulain.
1149
1150         Temporary change to allow overflow:scroll to be scrolled in iOS WK2.
1151
1152         * rendering/RenderLayer.cpp:
1153         (WebCore::RenderLayer::hasAcceleratedTouchScrolling):
1154
1155 2014-03-03  Antti Koivisto  <antti@apple.com>
1156
1157         Find results on simple lines are not marked correctly
1158         https://bugs.webkit.org/show_bug.cgi?id=129586
1159
1160         Reviewed by Andreas Kling.
1161
1162         Tests: editing/text-iterator/count-mark-lineboxes.html
1163                editing/text-iterator/count-mark-simple-lines.html
1164                
1165         TextIterator operating on simple lines failed to take the end of the range into account.
1166         This also causes performance issues on long documents as range traversals would miss the end
1167         node and end up going through the entire document.
1168
1169         * editing/TextIterator.cpp:
1170         (WebCore::TextIterator::handleTextNode):
1171         
1172             Stop when hitting the range end on simple text nodes.
1173
1174         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
1175         
1176             Use hasRenderedText test instead of linebox-only firstTextBox.
1177
1178         * testing/Internals.cpp:
1179         (WebCore::Internals::countMatchesForText):
1180         * testing/Internals.h:
1181         * testing/Internals.idl:
1182         
1183             Add testing interface for counting and marking matches.
1184
1185 2014-03-03  Benjamin Poulain  <benjamin@webkit.org>
1186
1187         SelectorQuery failing RightMostWithIdMatch are compiling their selectors for each execution
1188         https://bugs.webkit.org/show_bug.cgi?id=129601
1189
1190         Reviewed by Andreas Kling.
1191
1192         This caused a regression after r164924 for documents in quirks mode. Since those always fail
1193         selectorForIdLookup(), they ended up compiling the selector every time they were called.
1194
1195         * dom/SelectorQuery.cpp:
1196         (WebCore::SelectorDataList::execute):
1197
1198 2014-03-01  Jer Noble  <jer.noble@apple.com>
1199
1200         [Mac] Crash in MediaPlayer::rateChanged()
1201         https://bugs.webkit.org/show_bug.cgi?id=129548
1202
1203         Reviewed by Darin Adler.
1204
1205         WTF::bind will automatically ref the parameters added to it. But MediaPlayerPrivate-
1206         AVFoundation and -MediaSOurceAVFObjC are not RefCounted, so by the time the bound
1207         function is called, the underlying objects may have been freed.
1208
1209         Replace or augment callOnMainThread arguments with lambdas and weakPtrs so that
1210         if the argument has been destroyed, its methods will not be called.
1211
1212         Make the MediaPlayerPrivateAVFoundation::Notification function type a std::function:
1213         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1214         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
1215         (WebCore::MediaPlayerPrivateAVFoundation::Notification::function):
1216
1217         Make createWeakPtr() public so that it can be called from non-class methods:
1218         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1219         (WebCore::MediaPlayerPrivateAVFoundationObjC::createWeakPtr): 
1220         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1221         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr): 
1222
1223         Use a weakPtr to abort callOnMainThread() if the object has been destroyed:
1224         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1225         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1226         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1227         (WebCore::CMTimebaseEffectiveRateChangedCallback):
1228         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
1229         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
1230         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
1231
1232 2014-02-28  Jer Noble  <jer.noble@apple.com>
1233
1234         [MSE] YouTube videos fail to play
1235         https://bugs.webkit.org/show_bug.cgi?id=129525
1236
1237         Reviewed by Darin Adler.
1238
1239         Test: media/media-source/media-source-fudge-factor.html
1240
1241         Add a very simple playability metric to SourceBuffer. Track the number of seconds buffered
1242         and use that metric to determine whether the MediaSource has buffered enough data to play
1243         through.
1244
1245         * Modules/mediasource/MediaSource.cpp:
1246         (WebCore::MediaSource::currentTime): Added simple accessor.
1247         (WebCore::MediaSource::monitorSourceBuffers): Replace the functor-based iterators with lambdas.
1248         (WebCore::MediaSource::addSourceBuffer): Drive-by fix; only add new source buffers to the
1249             activeSourceBuffers list if those buffers are actually active.
1250         * Modules/mediasource/MediaSource.h:
1251         * Modules/mediasource/SourceBuffer.cpp:
1252         (WebCore::SourceBuffer::SourceBuffer): Initialize new ivars.
1253         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Measure the number of seconds buffered.
1254         (WebCore::SourceBuffer::monitorBufferingRate): Use a simple Exponential moving average to
1255             track the buffering rate.
1256         (WebCore::SourceBuffer::hasCurrentTime): Return true if the current time is within 1/24 s
1257             of a buffered range.
1258         (WebCore::SourceBuffer::hasFutureTime): Moved from MediaSource.
1259         (WebCore::SourceBuffer::canPlayThrough): Return true if the buffering rate is > 1s per
1260             second, or if the rate is sufficient to keep up over the remaining time.
1261         * Modules/mediasource/SourceBuffer.h:
1262
1263 2014-03-03  Bear Travis  <betravis@adobe.com>
1264
1265         [CSS Shapes] Serialize circle positions
1266         https://bugs.webkit.org/show_bug.cgi?id=129404
1267
1268         Reviewed by Dirk Schulze.
1269
1270         Circle positions should always be present when serialized, and should
1271         only have the 2 or 4-valued form. Keywords are converted to percentages
1272         and simplified where possible. This patch adds some additional processing
1273         that converts the parsed position into the serialized format, before
1274         converting it to text. See http://dev.w3.org/csswg/css-shapes/#basic-shape-serialization.
1275
1276         Updated existing parsing tests.
1277
1278         * css/CSSBasicShapes.cpp:
1279         (WebCore::serializePositionOffset): Convert a position offset to a serialized string.
1280         The offset must be a pair, as generated by buildSerializablePositionOffset.
1281         (WebCore::buildSerializablePositionOffset): Generates a keyword + offset pair for each
1282         position offset. The keywords may later be dropped during serialization.
1283         (WebCore::CSSBasicShapeCircle::cssText): Use the new serialization methods.
1284
1285 2014-03-03  Lorenzo Tilve  <ltilve@igalia.com>
1286
1287         Optimize StylePropertiesSet::findPropertyIndex() to improve CSS properties performance
1288         https://bugs.webkit.org/show_bug.cgi?id=129605
1289
1290         Reviewed by Andreas Kling.
1291
1292         Merged from Blink (patch by Mikhail Pozdnyakov):
1293         https://src.chromium.org/viewvc/blink?view=revision&revision=167325
1294
1295         Avoid checking whether 'StylePropertiesSet' is mutable and accesing directly to its
1296         data members to achieve performance improvements
1297
1298         Before the optimization applied:
1299             mean: 3064.8337171934063 runs/s
1300             median: 3097.5899379343855 runs/s
1301             stdev: 66.89274074044187 runs/s
1302             min: 2891.7479324362585 runs/s
1303             max: 3113.288683440125 runs/s
1304
1305         After the optimization applied:
1306             mean: 3343.8356114138105 runs/s
1307             median: 3356.25682957446 runs/s
1308             stdev: 36.297533087489036 runs/s
1309             min: 3238.5468032264243 runs/s
1310             max: 3368.664837531425 runs/s
1311
1312         Performance gain for the average value is approx. 9.1%, in the
1313         range of the 10% - 8.2% for the min and max measured
1314         values (Linux desktop x64).
1315
1316         * css/StyleProperties.cpp:
1317         (WebCore::ImmutableStyleProperties::findPropertyIndex):
1318         (WebCore::MutableStyleProperties::findPropertyIndex):
1319         * css/StyleProperties.h:
1320         (WebCore::toMutableStyleProperties):
1321         (WebCore::toImmutableStyleProperties):
1322         (WebCore::StyleProperties::findPropertyIndex):
1323
1324 2014-03-03  Brian Burg  <bburg@apple.com>
1325
1326         Unreviewed build fix for Windows after r164986.
1327
1328         * WebCore.vcxproj/build-generated-files.sh: Export WebReplayScripts
1329         so that the build system knows how to find CodeGeneratorReplayInputs.py.
1330
1331 2014-03-03  Andrei Bucur  <abucur@adobe.com>
1332
1333         [CSS Regions] Overset computation is incorrect in some cases
1334         https://bugs.webkit.org/show_bug.cgi?id=129032
1335
1336         Reviewed by Mihnea Ovidenie.
1337
1338         This patch reworks the way overset is computed for regions and named flows.
1339
1340         1. Regions overflow no longer trigger an overset changed event. This is because
1341         the overflow of a box is contained within the region range of the box. The content
1342         edge should be considered the logical bottom position of the content inside the
1343         flow thread.
1344
1345         2. The regions events logic was moved from RenderFlowThread to RenderNamedFlowThread
1346         and from RenderRegion to RenderNamedFlowFragment (including the regionOverset property).
1347
1348         3. The overset value of the named flow is no longer stored in the named flow. It is
1349         extracted from the overset of the last region in the chain.
1350
1351         4. The regions overset is not computed every time the flow thread is laid out which
1352         should improve performance for flows with many regions. With the patch, each region
1353         computes the overset value during its layout when the flow thread is in the overflow
1354         or the final layout phase.
1355
1356         5. The overset changed event is dispatched only at the end of the layout of the named flows,
1357         after all the region overset changes have been considered. This means that the overset
1358         event can't be dispatched in the middle of the auto-height processing algorithm that
1359         requires multiple layout passes for the flow threads.
1360
1361         However, the region layout update event dispatch timing was not changed, it is dispatched
1362         every time the flow thread has a layout. This preserves the current behavior of the event.
1363
1364         Tests: The old tests were modified to take into account the change.
1365
1366         * dom/Element.cpp:
1367         (WebCore::Element::webkitRegionOverset):
1368         * dom/WebKitNamedFlow.cpp:
1369         (WebCore::WebKitNamedFlow::overset):
1370         * inspector/InspectorCSSAgent.cpp:
1371         (WebCore::InspectorCSSAgent::buildArrayForRegions):
1372         * rendering/FlowThreadController.cpp:
1373         (WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
1374         * rendering/RenderBlock.cpp:
1375         (WebCore::RenderBlock::computeOverflow):
1376         * rendering/RenderFlowThread.cpp:
1377         (WebCore::RenderFlowThread::RenderFlowThread):
1378         (WebCore::RenderFlowThread::layout):
1379         * rendering/RenderFlowThread.h:
1380         * rendering/RenderNamedFlowFragment.cpp:
1381         (WebCore::RenderNamedFlowFragment::layoutBlock):
1382         (WebCore::RenderNamedFlowFragment::setRegionOversetState):
1383         (WebCore::RenderNamedFlowFragment::regionOversetState):
1384         (WebCore::RenderNamedFlowFragment::updateOversetState):
1385         * rendering/RenderNamedFlowFragment.h:
1386         * rendering/RenderNamedFlowThread.cpp:
1387         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
1388         (WebCore::RenderNamedFlowThread::computeOverflow):
1389         (WebCore::RenderNamedFlowThread::layout):
1390         (WebCore::RenderNamedFlowThread::dispatchNamedFlowEvents):
1391         (WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEventIfNeeded):
1392         (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEventIfNeeded):
1393         * rendering/RenderNamedFlowThread.h:
1394         There's a new field called m_flowContentBottom that tracks the content bottom of the flow thread
1395         after layout. This value is used to compute the overset value of the regions because it's not
1396         affected by relative positioning or visual overflow such as shadows.
1397         * rendering/RenderRegion.cpp:
1398         * rendering/RenderRegion.h:
1399
1400 2014-03-03  Tomas Popela  <tpopela@redhat.com>
1401
1402         [GTK] CodeGeneratorGObject.pm remove usage of undefined variable
1403         https://bugs.webkit.org/show_bug.cgi?id=129602
1404
1405         Reviewed by Martin Robinson.
1406
1407         Remove usage of undefined variable hdrPropIncludes in CodeGeneratorGObject.pm
1408
1409         * bindings/scripts/CodeGeneratorGObject.pm:
1410         (WriteData):
1411
1412 2014-03-03  Brian Burg  <bburg@apple.com>
1413
1414         Web Replay: upstream input storage, capture/replay machinery, and inspector domain
1415         https://bugs.webkit.org/show_bug.cgi?id=128782
1416
1417         Reviewed by Timothy Hatcher, Joseph Pecoraro, and Andreas Kling.
1418
1419         No new tests yet, as they rely on infrastructure tracked in https://webkit.org/b/129190.
1420
1421         Replayable executions are organized into ReplaySessions, which can
1422         contain several ReplaySessionSegments that divide overall execution
1423         at main frame navigation boundaries. NondeterministicInput subclasses
1424         are stored in SegmentedInputStorage according to the input's InputQueue.
1425
1426         Capture and playback are controlled at the page granularity by the Page's
1427         ReplayController. The controller knows how to create new segments, replay to
1428         arbitrary positions in the ReplaySession, and track the active InputCursor.
1429
1430         The capturing and replaying input cursor subclasses encapsulate state for
1431         storing new inputs and loading/dispatching saved inputs, respectively.
1432
1433         The ReplayAgent and associated inspector protocol domain is the friendly
1434         public API for programmatically capturing and replaying sessions.
1435
1436         * DerivedSources.make: Add replay inputs code generation target. Add the
1437         replay domain specification to the list of inspector domains.
1438
1439         * ForwardingHeaders/replay/EncodedValue.h: Added.
1440         * WebCore.xcodeproj/project.pbxproj: Add many files, and export
1441         `WebReplayScripts` environment variable to DerivedSources.make.
1442
1443         * inspector/InspectorController.cpp: Add the replay agent.
1444         (WebCore::InspectorController::InspectorController):
1445
1446         * inspector/InspectorInstrumentation.cpp:
1447         Add events for segment lifecycle events, and loading/unloading of sessions
1448         and segments, and capture/replay progress events. The replay controller
1449         also needs to know about detached and committed frames.
1450
1451         (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
1452         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1453         (WebCore::InspectorInstrumentation::sessionCreatedImpl):
1454         (WebCore::InspectorInstrumentation::sessionLoadedImpl):
1455         (WebCore::InspectorInstrumentation::sessionModifiedImpl):
1456         (WebCore::InspectorInstrumentation::segmentCreatedImpl):
1457         (WebCore::InspectorInstrumentation::segmentCompletedImpl):
1458         (WebCore::InspectorInstrumentation::segmentLoadedImpl):
1459         (WebCore::InspectorInstrumentation::segmentUnloadedImpl):
1460         (WebCore::InspectorInstrumentation::captureStartedImpl):
1461         (WebCore::InspectorInstrumentation::captureStoppedImpl):
1462         (WebCore::InspectorInstrumentation::playbackStartedImpl):
1463         (WebCore::InspectorInstrumentation::playbackPausedImpl):
1464         (WebCore::InspectorInstrumentation::playbackHitPositionImpl):
1465         (WebCore::InspectorInstrumentation::replayAgentEnabled):
1466         * inspector/InspectorInstrumentation.h:
1467         (WebCore::InspectorInstrumentation::replayAgentEnabled):
1468         (WebCore::InspectorInstrumentation::sessionCreated):
1469         (WebCore::InspectorInstrumentation::sessionLoaded):
1470         (WebCore::InspectorInstrumentation::sessionModified):
1471         (WebCore::InspectorInstrumentation::segmentCreated):
1472         (WebCore::InspectorInstrumentation::segmentCompleted):
1473         (WebCore::InspectorInstrumentation::segmentLoaded):
1474         (WebCore::InspectorInstrumentation::segmentUnloaded):
1475         (WebCore::InspectorInstrumentation::captureStarted):
1476         (WebCore::InspectorInstrumentation::captureStopped):
1477         (WebCore::InspectorInstrumentation::playbackStarted):
1478         (WebCore::InspectorInstrumentation::playbackPaused):
1479         (WebCore::InspectorInstrumentation::playbackHitPosition):
1480
1481         * inspector/InspectorReplayAgent.cpp: Added.
1482         (WebCore::buildInspectorObjectForPosition):
1483         (WebCore::buildInspectorObjectForInput):
1484         (WebCore::buildInspectorObjectForSession):
1485         (WebCore::SerializeInputToJSONFunctor::SerializeInputToJSONFunctor):
1486         (WebCore::SerializeInputToJSONFunctor::~SerializeInputToJSONFunctor):
1487         (WebCore::SerializeInputToJSONFunctor::operator()):
1488         (WebCore::SerializeInputToJSONFunctor::returnValue):
1489         (WebCore::buildInspectorObjectForSegment):
1490         (WebCore::InspectorReplayAgent::InspectorReplayAgent):
1491         (WebCore::InspectorReplayAgent::~InspectorReplayAgent):
1492         (WebCore::InspectorReplayAgent::sessionState):
1493         (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend):
1494         (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
1495         (WebCore::InspectorReplayAgent::frameNavigated):
1496         (WebCore::InspectorReplayAgent::frameDetached):
1497         (WebCore::InspectorReplayAgent::sessionCreated):
1498         (WebCore::InspectorReplayAgent::sessionModified):
1499         (WebCore::InspectorReplayAgent::sessionLoaded):
1500         (WebCore::InspectorReplayAgent::segmentCreated):
1501         (WebCore::InspectorReplayAgent::segmentCompleted):
1502         (WebCore::InspectorReplayAgent::segmentLoaded):
1503         (WebCore::InspectorReplayAgent::segmentUnloaded):
1504         (WebCore::InspectorReplayAgent::captureStarted):
1505         (WebCore::InspectorReplayAgent::captureStopped):
1506         (WebCore::InspectorReplayAgent::playbackStarted):
1507         (WebCore::InspectorReplayAgent::playbackPaused):
1508         (WebCore::InspectorReplayAgent::playbackHitPosition):
1509         (WebCore::InspectorReplayAgent::startCapturing):
1510         (WebCore::InspectorReplayAgent::stopCapturing):
1511         (WebCore::InspectorReplayAgent::replayToPosition):
1512         (WebCore::InspectorReplayAgent::replayToCompletion):
1513         (WebCore::InspectorReplayAgent::pausePlayback):
1514         (WebCore::InspectorReplayAgent::cancelPlayback):
1515         (WebCore::InspectorReplayAgent::switchSession):
1516         (WebCore::InspectorReplayAgent::insertSessionSegment):
1517         (WebCore::InspectorReplayAgent::removeSessionSegment):
1518         Provide a public API for modifying sessions. This is the backend support
1519         for user editing of replay sessions to add/remove specific segments.
1520
1521         (WebCore::InspectorReplayAgent::findSession):
1522         (WebCore::InspectorReplayAgent::findSegment):
1523         (WebCore::InspectorReplayAgent::getAvailableSessions):
1524         (WebCore::InspectorReplayAgent::getSerializedSession):
1525         (WebCore::InspectorReplayAgent::getSerializedSegment):
1526         Most of the replay protocol domain speaks in terms of sesssion and
1527         segment identifiers. These functions return the actual data associated
1528         with these identifiers.
1529
1530         * inspector/InspectorReplayAgent.h: Added.
1531         * inspector/InstrumentingAgents.cpp:
1532         (WebCore::InstrumentingAgents::InstrumentingAgents):
1533         (WebCore::InstrumentingAgents::reset):
1534         * inspector/InstrumentingAgents.h:
1535         (WebCore::InstrumentingAgents::inspectorReplayAgent): Added.
1536         (WebCore::InstrumentingAgents::setInspectorReplayAgent): Added.
1537         * inspector/protocol/Replay.json: Added.
1538
1539         * page/Page.cpp:
1540         (WebCore::Page::Page):
1541         * page/Page.h:
1542         (WebCore::Page::replayController): Added.
1543         * platform/Logging.h: Add WebReplay logging channel.
1544         * replay/AllReplayInputs.h: Added. Simplifies importing all input definitions.
1545
1546         * replay/CapturingInputCursor.cpp: Added.
1547         (WebCore::CapturingInputCursor::CapturingInputCursor):
1548         (WebCore::CapturingInputCursor::~CapturingInputCursor):
1549         (WebCore::CapturingInputCursor::create):
1550         (WebCore::CapturingInputCursor::storeInput):
1551         (WebCore::CapturingInputCursor::loadInput):
1552         (WebCore::CapturingInputCursor::uncheckedLoadInput):
1553         * replay/CapturingInputCursor.h: Added.
1554
1555         * replay/EventLoopInput.h:
1556         (WebCore::EventLoopInputBase::EventLoopInputBase):
1557         (WebCore::EventLoopInputBase::timestamp):
1558         (WebCore::EventLoopInputBase::setTimestamp): Support deserialization.
1559
1560         * replay/EventLoopInputDispatcher.cpp: Added. This class encapsulates the timers
1561         and measurements used to dispatch event loop inputs during replay.
1562
1563         (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
1564         (WebCore::EventLoopInputDispatcher::run):
1565         (WebCore::EventLoopInputDispatcher::pause):
1566         (WebCore::EventLoopInputDispatcher::timerFired):
1567         (WebCore::EventLoopInputDispatcher::dispatchInputSoon):
1568         (WebCore::EventLoopInputDispatcher::dispatchInput):
1569         * replay/EventLoopInputDispatcher.h: Added.
1570         (WebCore::EventLoopInputDispatcherClient::EventLoopInputDispatcherClient):
1571         (WebCore::EventLoopInputDispatcherClient::~EventLoopInputDispatcherClient):
1572
1573         * replay/FunctorInputCursor.h: Added.
1574         (WebCore::FunctorInputCursor::~FunctorInputCursor):
1575         (WebCore::FunctorInputCursor::forEachInputInQueue):
1576         (WebCore::FunctorInputCursor::FunctorInputCursor):
1577         (WebCore::FunctorInputCursor::storeInput):
1578         (WebCore::FunctorInputCursor::loadInput):
1579         (WebCore::FunctorInputCursor::uncheckedLoadInput):
1580
1581         * replay/ReplayController.cpp: Added.
1582         (WebCore::ReplayController::ReplayController):
1583         (WebCore::ReplayController::switchSession):
1584         (WebCore::ReplayController::createSegment):
1585         (WebCore::ReplayController::completeSegment):
1586         (WebCore::ReplayController::loadSegment):
1587         (WebCore::ReplayController::unloadSegment):
1588         (WebCore::ReplayController::startCapturing):
1589         (WebCore::ReplayController::stopCapturing):
1590         (WebCore::ReplayController::startPlayback):
1591         (WebCore::ReplayController::pausePlayback):
1592         (WebCore::ReplayController::cancelPlayback):
1593         (WebCore::ReplayController::replayToPosition):
1594         (WebCore::ReplayController::frameDetached):
1595         (WebCore::ReplayController::frameNavigated):
1596         (WebCore::ReplayController::loadedSession):
1597         (WebCore::ReplayController::loadedSegment):
1598         (WebCore::ReplayController::activeInputCursor):
1599         (WebCore::ReplayController::dispatcher):
1600         (WebCore::ReplayController::willDispatchInput):
1601         (WebCore::ReplayController::didDispatchInput):
1602         (WebCore::ReplayController::didDispatchFinalInput):
1603         * replay/ReplayController.h: Added.
1604         (WebCore::ReplayPosition::ReplayPosition):
1605         (WebCore::ReplayPosition::operator<):
1606         (WebCore::ReplayPosition::operator==):
1607
1608         * replay/ReplayInputCreationMethods.cpp: Added.
1609         Static factory implementations for inputs belong here.
1610         (WebCore::InitialNavigation::createFromPage):
1611
1612         * replay/ReplayInputDispatchMethods.cpp: Added.
1613         All dispatch() implementations for generated replay inputs belong here.
1614         (WebCore::BeginSegmentSentinel::dispatch):
1615         (WebCore::EndSegmentSentinel::dispatch):
1616         (WebCore::InitialNavigation::dispatch):
1617
1618         * replay/ReplayInputTypes.cpp:
1619         (WebCore::ReplayInputTypes::ReplayInputTypes):
1620         * replay/ReplayInputTypes.h: Define strings for WebCore inputs.
1621
1622         * replay/ReplaySession.cpp: Added.
1623         (WebCore::ReplaySession::create):
1624         (WebCore::ReplaySession::ReplaySession):
1625         (WebCore::ReplaySession::~ReplaySession):
1626         (WebCore::ReplaySession::appendSegment):
1627         (WebCore::ReplaySession::insertSegment):
1628         (WebCore::ReplaySession::removeSegment):
1629         * replay/ReplaySession.h: Added.
1630         (WebCore::ReplaySession::identifier):
1631         (WebCore::ReplaySession::timestamp):
1632         (WebCore::ReplaySession::size):
1633         (WebCore::ReplaySession::at):
1634         (WebCore::ReplaySession::begin):
1635         (WebCore::ReplaySession::end):
1636
1637         * replay/ReplaySessionSegment.cpp: Added.
1638         (WebCore::ReplaySessionSegment::create):
1639         (WebCore::ReplaySessionSegment::ReplaySessionSegment):
1640         (WebCore::ReplaySessionSegment::~ReplaySessionSegment):
1641         (WebCore::ReplaySessionSegment::createCapturingCursor):
1642         (WebCore::ReplaySessionSegment::createReplayingCursor):
1643         (WebCore::ReplaySessionSegment::createFunctorCursor):
1644         * replay/ReplaySessionSegment.h: Added.
1645         (WebCore::ReplaySessionSegment::identifier):
1646         (WebCore::ReplaySessionSegment::timestamp):
1647
1648         * replay/ReplayingInputCursor.cpp: Added.
1649         (WebCore::ReplayingInputCursor::ReplayingInputCursor):
1650         (WebCore::ReplayingInputCursor::~ReplayingInputCursor):
1651         (WebCore::ReplayingInputCursor::create):
1652         (WebCore::ReplayingInputCursor::storeInput):
1653         (WebCore::ReplayingInputCursor::loadInput):
1654         (WebCore::ReplayingInputCursor::uncheckedLoadInput):
1655         * replay/ReplayingInputCursor.h: Added.
1656
1657         * replay/SegmentedInputStorage.cpp: Added.
1658         (WebCore::queueTypeToLogPrefix):
1659         (WebCore::jsonStringForInput):
1660         (WebCore::offsetForInputQueue):
1661         (WebCore::SegmentedInputStorage::SegmentedInputStorage):
1662         (WebCore::SegmentedInputStorage::~SegmentedInputStorage):
1663         (WebCore::SegmentedInputStorage::load):
1664         (WebCore::SegmentedInputStorage::store):
1665         (WebCore::SegmentedInputStorage::queueSize):
1666         * replay/SegmentedInputStorage.h: Added.
1667
1668         * replay/SerializationMethods.cpp: Added.
1669         Specializations of EncodingTraits for WebCore types belong here.
1670
1671         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
1672         (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):
1673         (JSC::EncodingTraits<SecurityOrigin>::encodeValue):
1674         (JSC::EncodingTraits<SecurityOrigin>::decodeValue):
1675         (JSC::EncodingTraits<URL>::encodeValue):
1676         (JSC::EncodingTraits<URL>::decodeValue):
1677         * replay/SerializationMethods.h: Added.
1678         * replay/WebInputs.json: Added.
1679         In this inital patch, we define BeginSegmentSentinel,
1680         EndSegmentSentinel, and InitialNavigation inputs.
1681
1682 2014-03-03  Antoine Quint  <graouts@webkit.org>
1683
1684         Respect SVG fragment identifiers in <img> src attribute
1685         https://bugs.webkit.org/show_bug.cgi?id=129387
1686
1687         Reviewed by Dirk Schulze.
1688
1689         Following Dirk Schulze's suggestion, we set the URL on the SVGImage itself and handle the URL's
1690         fragment identifier at draw time in the SVGImage itself, which will provide a sounder base for
1691         handling of fragment identifier in SVG resource URLs in CSS properties, and should also deal
1692         with the crasher reported in http://webkit.org/b/129498 since there is a guaranteed Frame at the
1693         time we call SVGImage::draw().
1694
1695         * svg/graphics/SVGImage.cpp:
1696         (WebCore::SVGImage::draw):
1697         * svg/graphics/SVGImage.h:
1698         * svg/graphics/SVGImageForContainer.cpp:
1699         * svg/graphics/SVGImageForContainer.h:
1700
1701 2014-03-03  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
1702
1703         Move function calls outside loop in dom
1704         https://bugs.webkit.org/show_bug.cgi?id=126525
1705
1706         Reviewed by Csaba Osztrogonác.
1707
1708         Store the result of length() in a local variable and use it in each iteration.
1709
1710         * dom/DOMImplementation.cpp:
1711         (WebCore::DOMImplementation::isXMLMIMEType):
1712         * dom/ElementData.cpp:
1713         (WebCore::UniqueElementData::UniqueElementData):
1714         * dom/EventContext.cpp:
1715         (WebCore::TouchEventContext::checkReachability):
1716
1717 2014-03-03  Tomas Popela  <tpopela@redhat.com>
1718
1719         [GTK] webkit_dom_range_compare_boundary_points fails when 0 is passed as how parameter
1720         https://bugs.webkit.org/show_bug.cgi?id=129145
1721
1722         Reviewed by Carlos Garcia Campos.
1723
1724         While generating GObject DOM API the generator should skip non pointer
1725         types while generating the g_return_val_if_fail macro.
1726         This will avoid the situation when Range.START_TO_START is defined as 0,
1727         thus the webkit_dom_range_compare_boundary_points function will fail
1728         everytime it is called with 0 as how value.
1729
1730         * bindings/scripts/CodeGeneratorGObject.pm:
1731         (GenerateFunction):
1732
1733 2014-03-03  Jozsef Berta  <jberta.u-szeged@partner.samsung.com>
1734
1735         [cmake] *Names.cpp file should be regenerated after touching StaticString.pm
1736         https://bugs.webkit.org/show_bug.cgi?id=129031
1737
1738         Reviewed by Csaba Osztrogonác.
1739
1740         * CMakeLists.txt: Added make_names.pl dependencies: bindings/scripts/Hasher.pm and bindings/scripts/StaticString.pm
1741
1742 2014-03-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1743
1744         [GTK] Multimedia controls captions icon needs its own metaphor
1745         https://bugs.webkit.org/show_bug.cgi?id=129091
1746
1747         Reviewed by Martin Robinson.
1748
1749         As we got the new icon created, we used it with a fallback to the
1750         old icon to keep run-time compatibility.
1751
1752         No new tests, current ones suffice.
1753
1754         * platform/gtk/RenderThemeGtk.cpp:
1755         (WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
1756         Replicated RenderThemeGtk::paintMediaButton to check for the
1757         necessary icon first and do the fallback to the old and stock
1758         icons.
1759         * platform/gtk/RenderThemeGtk2.cpp:
1760         (WebCore::getStockIconForWidgetType): Added ASSERT for non-empty
1761         icon name.
1762         (WebCore::getStockSymbolicIconForWidgetType): Check for non empty
1763         icon name before calling getStockIconForWidgetType. Fixed coding
1764         style.
1765         * platform/gtk/RenderThemeGtk3.cpp:
1766         (WebCore::getStockIconForWidgetType): Added ASSERT for non-empty
1767         icon name.
1768         (WebCore::getStockSymbolicIconForWidgetType): Check for non empty
1769         icon name before calling getStockIconForWidgetType. Fixed coding
1770         style.
1771
1772 2014-03-02  Benjamin Poulain  <benjamin@webkit.org>
1773
1774         Add a fallback path for compiling the remaining attribute checkers
1775         https://bugs.webkit.org/show_bug.cgi?id=129580
1776
1777         Reviewed by Darin Adler.
1778
1779         The remaining attribute checkers appear to be less common than the simple value match.
1780         This patch adds them to SelectorCompiler for completeness but no attempt is made at optimizing them,
1781         they all default to function calls.
1782
1783         If the assumption that those selectors are not common turn out to be incorrect, we should see
1784         the function calls in profiles and optimize them as needed.
1785
1786         * css/SelectorChecker.cpp:
1787         (WebCore::attributeValueMatches):
1788         If we get anything but attribute match here, something has gone horribly wrong. Update the code
1789         to fail if that were to happen.
1790
1791         * cssjit/SelectorCompiler.cpp:
1792         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1793         Add the missing match type to the selector fragment.
1794
1795         Begin, End, Contain cannot match an empty value per specification. We can test that at compile time
1796         and fail immediately. See http://www.w3.org/TR/css3-selectors/#attribute-substrings
1797
1798         List has the extra requirement that a value containing a space does not match anything. It also cannot
1799         match with an empty string. See http://www.w3.org/TR/css3-selectors/#attribute-representation
1800
1801         (WebCore::SelectorCompiler::attributeValueBeginsWith):
1802         (WebCore::SelectorCompiler::attributeValueContains):
1803         (WebCore::SelectorCompiler::attributeValueEndsWith):
1804         (WebCore::SelectorCompiler::attributeValueMatchHyphenRule):
1805         (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
1806         The slow fallbacks.
1807
1808         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
1809         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
1810         A generic code generator making function call to match an attribute value.
1811
1812 2014-02-25  Andreas Kling  <akling@apple.com>
1813
1814         JSDOMWindow::commonVM() should return a reference.
1815         <https://webkit.org/b/129293>
1816
1817         Since this function always returns a VM and never null, make it
1818         return a reference instead. There are more VM getters that never
1819         return null, but I tried to keep the patch from snowballing.
1820
1821         Reviewed by Geoff Garen.
1822
1823 2014-03-02  Timothy Hatcher  <timothy@apple.com>
1824
1825         Remove ASSERT in ~IDBRequest since it is firing during legitimate uses in Web Inspector.
1826
1827         Adding the ASSERT back is tracked by https://webkit.org/b/129593.
1828
1829         https://bugs.webkit.org/show_bug.cgi?id=129328
1830
1831         Reviewed by Sam Weinig.
1832
1833         * Modules/indexeddb/IDBRequest.cpp:
1834         (WebCore::IDBRequest::~IDBRequest):
1835
1836 2014-03-02  Commit Queue  <commit-queue@webkit.org>
1837
1838         Unreviewed, rolling out r164961.
1839         http://trac.webkit.org/changeset/164961
1840         https://bugs.webkit.org/show_bug.cgi?id=129596
1841
1842         Caused many assertion failures (Requested by ap on #webkit).
1843
1844         * css/SelectorChecker.cpp:
1845         (WebCore::attributeValueMatches):
1846         * cssjit/SelectorCompiler.cpp:
1847         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1848         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
1849
1850 2014-03-02  Darin Adler  <darin@apple.com>
1851
1852         Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
1853         https://bugs.webkit.org/show_bug.cgi?id=129592
1854
1855         Reviewed by Sam Weinig.
1856
1857         * WebCore.exp.in: Re-sorted this file. Not sure how it got unsorted.
1858
1859         * accessibility/AccessibilityObject.cpp:
1860         (WebCore::AccessibilityObject::stringForVisiblePositionRange): Call TextIterator::text
1861         instead of TextIterator::length. Also removed unneeded special case for empty string
1862         and exception code.
1863         (WebCore::AccessibilityObject::lengthForVisiblePositionRange): Ditto.
1864
1865         * accessibility/AccessibilityObject.h: Include TextIteratorBehavior.h instead of
1866         TextIterator.h.
1867
1868         * accessibility/AccessibilityRenderObject.cpp: Include TextIterator.h.
1869
1870         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: Removed unneeded
1871         TextIterator.h include.
1872
1873         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1874         (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]): Call
1875         TextIterator::text instead of TextIterator::length.
1876
1877         * dom/Element.cpp: Include TextIterator.h.
1878
1879         * dom/Node.cpp: Include Range.h.
1880
1881         * dom/Position.cpp:
1882         (WebCore::Position::isCandidate): Cast to RenderBlockFlow since that's what the
1883         type check above does. Use a return statement instead of an else for better flow.
1884         (WebCore::Position::leadingWhitespacePosition): Call
1885         deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
1886         (WebCore::Position::trailingWhitespacePosition): Ditto.
1887
1888         * dom/Range.cpp:
1889         (WebCore::Range::firstNode): Added a FIXME about code that clearly does not
1890         belong. This is something we really need to fix.
1891
1892         * editing/AlternativeTextController.cpp: Include TextIterator.h.
1893         * editing/ApplyStyleCommand.cpp: Ditto.
1894
1895         * editing/CompositeEditCommand.cpp:
1896         (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit): Call
1897         deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
1898
1899         * editing/Editor.h: Include TextIteratorBehavior.h instead of TextIterator.h.
1900
1901         * editing/HTMLInterchange.cpp:
1902         (WebCore::convertHTMLTextToInterchangeFormat): Call
1903         deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
1904
1905         * editing/SpellingCorrectionCommand.cpp: Include TextIterator.h.
1906
1907         * editing/TextIterator.h: Moved isCollapsibleWhitespace from here into
1908         htmlediting.h and renamed it deprecatedIsCollapsibleWhitespace.
1909
1910         * editing/TextIterator.cpp: Call
1911         deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
1912
1913         * editing/TypingCommand.cpp: Include TextIterator.h.
1914
1915         * editing/VisibleUnits.cpp:
1916         (WebCore::previousBoundary): Call TextIterator::text instead of
1917         TextIterator::length.
1918         (WebCore::nextBoundary): Ditto.
1919
1920         * editing/htmlediting.cpp: Include TextIterator.h.
1921
1922         * editing/htmlediting.h: Removed non-helpful section comments.
1923         Added FIXME about isWhitespace. Added deprecatedIsCollapsibleWhitespace,
1924         formerly not deprecated and in TextIterator.h.
1925
1926         * editing/markup.cpp: Include TextIterator.h.
1927
1928         * html/HTMLTextAreaElement.cpp: Include TextIterator.h.
1929
1930         * page/ContextMenuController.cpp:
1931         (WebCore::selectionContainsPossibleWord): Call TextIterator::text
1932         instead of TextIterator::length and TextIterator::characterAt.
1933
1934         * page/EventHandler.cpp: Sorted conditional includes alphabetically by condition.
1935
1936         * platform/mac/HTMLConverter.mm:
1937         (+[WebHTMLConverter editingAttributedStringFromRange:]): Call TextIterator::text
1938         instead of TextIterator::length.
1939
1940 2014-03-02  Benjamin Poulain  <benjamin@webkit.org>
1941
1942         Add a fallback path for compiling the remaining attribute checkers
1943         https://bugs.webkit.org/show_bug.cgi?id=129580
1944
1945         Reviewed by Darin Adler.
1946
1947         The remaining attribute checkers appear to be less common than the simple value match.
1948         This patch adds them to SelectorCompiler for completeness but no attempt is made at optimizing them,
1949         they all default to function calls.
1950
1951         If the assumption that those selectors are not common turn out to be incorrect, we should see
1952         the function calls in profiles and optimize them as needed.
1953
1954         * css/SelectorChecker.cpp:
1955         (WebCore::attributeValueMatches):
1956         If we get anything but attribute match here, something has gone horribly wrong. Update the code
1957         to fail if that were to happen.
1958
1959         * cssjit/SelectorCompiler.cpp:
1960         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1961         Add the missing match type to the selector fragment.
1962
1963         Begin, End, Contain cannot match an empty value per specification. We can test that at compile time
1964         and fail immediately. See http://www.w3.org/TR/css3-selectors/#attribute-substrings
1965
1966         List has the extra requirement that a value containing a space does not match anything. It also cannot
1967         match with an empty string. See http://www.w3.org/TR/css3-selectors/#attribute-representation
1968
1969         (WebCore::SelectorCompiler::attributeValueBeginsWith):
1970         (WebCore::SelectorCompiler::attributeValueContains):
1971         (WebCore::SelectorCompiler::attributeValueEndsWith):
1972         (WebCore::SelectorCompiler::attributeValueMatchHyphenRule):
1973         (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
1974         The slow fallbacks.
1975
1976         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
1977         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
1978         A generic code generator making function call to match an attribute value.
1979
1980 2014-03-02  Darin Adler  <darin@apple.com>
1981
1982         Fix build for case-sensitive file systems.
1983
1984         * platform/UserActivity.h: Runloop -> RunLoop.
1985
1986 2014-03-02  Gavin Barraclough  <barraclough@apple.com>
1987
1988         HysteresisTimer should use WebCore::Timer
1989         https://bugs.webkit.org/show_bug.cgi?id=129587
1990
1991         Reviewed by Sam Weinig.
1992
1993         * platform/HysteresisActivity.h:
1994         (WebCore::HysteresisActivity::HysteresisActivity):
1995         (WebCore::HysteresisActivity::hysteresisTimerFired):
1996             - RunLoop::Timer -> WebCore::Timer.
1997         * platform/UserActivity.h:
1998
1999 2014-03-02  Darin Adler  <darin@apple.com>
2000
2001         Split TextIteratorBehavior into a separate header
2002         https://bugs.webkit.org/show_bug.cgi?id=129578
2003
2004         Reviewed by Sam Weinig.
2005
2006         This is in preparation to greatly cut down on includes of TextIterator.h.
2007
2008         * GNUmakefile.list.am: Added new header.
2009         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2010         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2011         * WebCore.xcodeproj/project.pbxproj: Ditto.
2012
2013          * editing/FindOptions.h: Changed typedef to unsigned char;
2014         there is no reason to store these in a 32-bit integer.
2015
2016          * editing/TextIterator.h: Added include of TextIteratorBehavior.h
2017         and moved comments about the meanings of flag bits to their definition.
2018
2019         * editing/TextIteratorBehavior.h: Added.
2020
2021         * WebCore.exp.in: Updated for type changes.
2022
2023 2014-03-02  Enrica Casucci  <enrica@apple.com>
2024
2025         [iOS WebKit2] Form controls handling
2026         https://bugs.webkit.org/show_bug.cgi?id=129344
2027         <rdar://problem/16053643>
2028
2029         Reviewed by Simon Fraser.
2030
2031         Updates localizable strings and adds some exports.
2032
2033         * English.lproj/Localizable.strings:
2034         * WebCore.exp.in:
2035         * WebCore.xcodeproj/project.pbxproj:
2036
2037 2014-03-02  Benjamin Poulain  <bpoulain@apple.com>
2038
2039         [iOS][WK2] Pages using tiled compositing layers allocate too many tiles on zoom
2040         https://bugs.webkit.org/show_bug.cgi?id=129471
2041
2042         Reviewed by Simon Fraser.
2043
2044         A few issues with TileController were causing sublayers of the root layers
2045         to tile incorrect surfaces on zoom.
2046
2047         First, the exposedRect API was not updating the sublayers. The layers go correctly
2048         into tiling mode, but the tiles cover the full document instead of the visible area.
2049
2050         The other major issue was the margins being applied to the coverage size in document
2051         coordinates. Since each margin is 512px, the total coverage size after zoom was
2052         gigantic.
2053
2054         To solve this, this patch switch from the exposedRect API to the generic concept
2055         of VisibleExtentContentRect introduced for iOS WebKit1.
2056
2057         * WebCore.exp.in:
2058         * platform/ScrollView.h:
2059         Define a VisibleExtentContentRect on the scrollview itself when there is no
2060         platformWidget().
2061         The case with inside frame is untested due to stability issues :(.
2062         (see <rdar://problem/16199219>)
2063
2064         * platform/graphics/ca/mac/TileController.mm:
2065         (WebCore::TileController::computeTileCoverageRect):
2066         Remove the margin from the tile coverage.
2067
2068         On iOS, m_tileCoverage is always zero at the moment. Previously, the tile coverage
2069         was artificially extended by the margins. With the margins removed, I temporarily added
2070         a factor of 1.5.
2071         ViewUpdateDispatcher has all the information to compute a great tile coverage, I will need
2072         a follow up patch to fix that.
2073
2074         * platform/ios/ScrollViewIOS.mm:
2075         (WebCore::ScrollView::visibleExtentContentRect):
2076         (WebCore::ScrollView::setVisibleExtentContentRect):
2077
2078 2014-03-02  Darin Adler  <darin@apple.com>
2079
2080         Sort Mac platform export files so they merge better
2081         https://bugs.webkit.org/show_bug.cgi?id=129581
2082
2083         Reviewed by Sam Weinig.
2084
2085         * WebCore.exp.in: Ran the new sort-export-file on this.
2086
2087 2014-03-02  Dean Jackson  <dino@apple.com>
2088
2089         Add protected casting to FilterOperation classes.
2090         https://bugs.webkit.org/show_bug.cgi?id=124062
2091
2092         Reviewed by Sam Weinig.
2093
2094         Use the type cast macro generators to produce some toFilterOperation-style
2095         functions, and then use them in our PlatformCA filter code.
2096
2097         Test: css3/filters/animation-from-initial-values-with-color-matrix.html
2098
2099         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Use the toFilterOperation methods, in
2100         some cases removing the unnecessary double cast.
2101         (PlatformCAFilters::filterValueForOperation):
2102         (PlatformCAFilters::colorMatrixValueForFilter):
2103         * platform/graphics/filters/FilterOperation.cpp:
2104         (WebCore::BasicColorMatrixFilterOperation::blend):
2105         (WebCore::BasicColorMatrixFilterOperation::operator==): Move this to the .cpp file so it can use the casting methods.
2106         (WebCore::BasicComponentTransferFilterOperation::blend):
2107         (WebCore::BasicComponentTransferFilterOperation::operator==): Ditto.
2108         * platform/graphics/filters/FilterOperation.h: Add the casting macros.
2109
2110 2014-03-02  Yoav Weiss  <yoav@yoav.ws>
2111
2112         Fix srcset related bugs
2113         https://bugs.webkit.org/show_bug.cgi?id=129539
2114
2115         Fixed a bug reported against Blink's srcset implementation at https://code.google.com/p/chromium/issues/detail?id=347998
2116         When both src and srcset had only 1x descriptors and the DPR was higher than 1, the src's resource was picked.
2117
2118         Also fixed the invalid descriptor handling, which wasn't aligned with the spec, and therefore was not as forward compatible as it should be.
2119         Invalid descriptors caused the entire resource to be ignored, rather than just the descriptors themselves.
2120
2121         Reviewed by Andreas Kling.
2122
2123         Tests: fast/hidpi/image-srcset-invalid-descriptor.html
2124                fast/hidpi/image-srcset-src-selection-1x-both.html
2125
2126         * html/parser/HTMLParserIdioms.cpp:
2127         (WebCore::parseDescriptors):
2128         (WebCore::parseImagesWithScaleFromSrcsetAttribute):
2129         (WebCore::bestFitSourceForImageAttributes):
2130
2131 2014-03-01  Gavin Barraclough  <barraclough@apple.com>
2132
2133         Split UserActivity, simplify PageThrottler
2134         https://bugs.webkit.org/show_bug.cgi?id=129551
2135
2136         Reviewed by Darin Adler.
2137
2138         The class UserActivity currently implements two things – a hysteresis mechanism, and
2139         an abstraction of NSActivity controlled by that mechanism. PageThrottler implements
2140         its own hysteresis mechanism, which directly controls DOM timer throttling and also
2141         controls a couple of UserActivities, giving a total of 3 separate hysteresis mechanisms,
2142         layered two deep.
2143
2144         Split UserActivity into three, with HysteresisActivity implementing an abstract hysteresis
2145         mechanism, UserActivity::Impl controlling the NSActivity, and then UserActivity combining
2146         these two back together. The interface to UserActivity is unchanged.
2147
2148         Remove PageThrottler's bespoke hysteresis, replacing it with a use of HysteresisActivity.
2149         Replace the two UserActivities with a single UserActivity::Impl, so there are no longer
2150         layered hysteresis mechanisms.
2151
2152         * WebCore.exp.in:
2153             - exports changed.
2154         * WebCore.xcodeproj/project.pbxproj:
2155             - added HysteresisActivity.h.
2156         * page/PageThrottler.cpp:
2157         (WebCore::PageThrottler::PageThrottler):
2158             - if the page starts visible, begin activity. If it starts hidden throttle DOM timers.
2159         (WebCore::PageThrottler::hiddenPageDOMTimerThrottlingStateChanged):
2160             - when the DOM timer throttling setting changes, make sure we update.
2161         (WebCore::PageThrottler::incrementActivityCount):
2162         (WebCore::PageThrottler::decrementActivityCount):
2163             - when m_activityCount changes update the hysteresis state.
2164         (WebCore::PageThrottler::updateHysteresis):
2165         (WebCore::PageThrottler::setViewState):
2166             - when IsVisuallyIdle changes update the hysteresis state.
2167         (WebCore::PageThrottler::started):
2168         (WebCore::PageThrottler::stopped):
2169             - callbacks from HysteresisActivity, these control m_activity and DOM timer throttling.
2170         * page/PageThrottler.h:
2171         (WebCore::PageThrottler::didReceiveUserInput):
2172         (WebCore::PageThrottler::pluginDidEvaluate):
2173             - call impulse to temporarily enable the activity.
2174         * platform/HysteresisActivity.h: Copied from Source/WebCore/platform/UserActivity.h.
2175         (WebCore::HysteresisActivity::HysteresisActivity):
2176             - constructor takes a delegate optionally a timeout.
2177         (WebCore::HysteresisActivity::start):
2178             - start activity immediately. If stopped, call started method on delegate. If in timeout period, cancel the timer.
2179         (WebCore::HysteresisActivity::stop):
2180             - stop activity after hysteresis. If started, initiate timeout period.
2181         (WebCore::HysteresisActivity::impulse):
2182             - ensure activity for at least the timeout period.
2183         (WebCore::HysteresisActivity::hysteresisTimerFired):
2184             - delayed stop - when the timer fires call stopped on the delegate.
2185         * platform/UserActivity.cpp:
2186         (WebCore::UserActivity::Impl::Impl):
2187         (WebCore::UserActivity::Impl::beginActivity):
2188         (WebCore::UserActivity::Impl::endActivity):
2189             - nop implementation.
2190         (WebCore::UserActivity::UserActivity):
2191             - UserActivity maintains existing interface with hysteresis.
2192         (WebCore::UserActivity::started):
2193         (WebCore::UserActivity::stopped):
2194             - callbacks from HysteresisTimer; forward to Impl.
2195         * platform/UserActivity.h:
2196         * platform/mac/UserActivityMac.mm:
2197         (WebCore::UserActivity::Impl::Impl):
2198             - UserActivity::Impl, abstraction for NSActivity without added hysteresis.
2199         (WebCore::UserActivity::Impl::beginActivity):
2200             - allocate NSActivity.
2201         (WebCore::UserActivity::Impl::endActivity):
2202             - release NSActivity.
2203
2204 2014-03-02  Brian Burg  <bburg@apple.com>
2205
2206         DocumentLoader should keep maps of ResourceLoaders instead of sets
2207         https://bugs.webkit.org/show_bug.cgi?id=129388
2208
2209         Reviewed by Darin Adler.
2210
2211         For web replay, we need to be able to pull a ResourceLoader instance by
2212         identifier from the DocumentLoader. This is easy to do if we convert
2213         ResourceLoaderSet to ResourceLoaderMap, keyed by the loader's identifier.
2214
2215         Added assertions whenever adding or removing from the map to ensure
2216         that we don't try to add duplicates or resources with zero identifiers.
2217
2218         No new tests required. No functionality was added.
2219
2220         * loader/DocumentLoader.cpp:
2221         (WebCore::cancelAll):
2222         (WebCore::setAllDefersLoading):
2223         (WebCore::areAllLoadersPageCacheAcceptable):
2224         (WebCore::DocumentLoader::addSubresourceLoader):
2225         (WebCore::DocumentLoader::removeSubresourceLoader):
2226         (WebCore::DocumentLoader::addPlugInStreamLoader):
2227         (WebCore::DocumentLoader::removePlugInStreamLoader):
2228         (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
2229         * loader/DocumentLoader.h:
2230         * loader/NetscapePlugInStreamLoader.cpp:
2231         (WebCore::NetscapePlugInStreamLoader::create): Only add the loader
2232         to the document loader's map if it initialized successfully.
2233         The old code was probably leaking resource loaders that failed to
2234         initialize.
2235
2236         * loader/mac/DocumentLoaderMac.cpp:
2237         (WebCore::scheduleAll):
2238         (WebCore::unscheduleAll):
2239
2240 2014-03-02  Dirkjan Ochtman  <d.ochtman@activevideo.com>
2241
2242         Support ENABLE_ENCRYPTED_MEDIA in cmake builds
2243         https://bugs.webkit.org/show_bug.cgi?id=129575
2244
2245         Reviewed by Philippe Normand.
2246
2247         No new tests, only fixes the build.
2248
2249         * CMakeLists.txt:
2250         Add support for ENABLE_ENCRYPTED_MEDIA.
2251         * Modules/encryptedmedia/MediaKeySession.cpp:
2252         (WebCore::MediaKeySession::close):
2253         Assign nullptr instead of 0 to OwnPtr to appease gcc-4.7.
2254
2255 2014-03-01  Tim Horton  <timothy_horton@apple.com>
2256
2257         WebKit2 View Gestures (Smart Magnification): Support for iOS
2258         https://bugs.webkit.org/show_bug.cgi?id=129146
2259         <rdar://problem/16032668>
2260
2261         Reviewed by Benjamin Poulain.
2262
2263         * WebCore.exp.in:
2264         Add an export.
2265
2266 2014-03-01  Commit Queue  <commit-queue@webkit.org>
2267
2268         Unreviewed, rolling out r164929 and r164934.
2269         http://trac.webkit.org/changeset/164929
2270         http://trac.webkit.org/changeset/164934
2271         https://bugs.webkit.org/show_bug.cgi?id=129570
2272
2273         Caused assertions on two srcset tests (Requested by ap on
2274         #webkit).
2275
2276         * html/parser/HTMLParserIdioms.cpp:
2277         (WebCore::isHTMLSpaceOrComma):
2278         (WebCore::parseImagesWithScaleFromSrcsetAttribute):
2279         (WebCore::bestFitSourceForImageAttributes):
2280
2281 2014-03-01  Dan Bernstein  <mitz@apple.com>
2282
2283         Build fix.
2284
2285         * html/parser/HTMLParserIdioms.cpp: Removed an unused function.
2286
2287 2014-03-01  David Kilzer  <ddkilzer@apple.com>
2288
2289         Ensure keySplines is valid in SMIL animations
2290         <http://webkit.org/b/129547>
2291         <rdar://problem/15676128>
2292
2293         Reviewed by Darin Adler.
2294
2295         Merged from Blink (patch by Philip Rogers):
2296         https://src.chromium.org/viewvc/blink?revision=156452&view=revision
2297         http://crbug.com/276111
2298
2299             This patch fixes a crash in SMIL animations when keySplines are not
2300             specified. The SMIL spec is clear on this:
2301             http://www.w3.org/TR/2001/REC-smil-animation-20010904/#AnimFuncCalcMode
2302             "If there are any errors in the keyTimes specification (bad values,
2303             too many or too few values), the animation will have no effect."
2304
2305             This patch simply checks that keyTimes is not empty. Previously,
2306             splinesCount was set to be m_keySplines.size() + 1 in
2307             SVGAnimationElement.cpp; this patch changes splinesCount to be equal
2308             to m_keySplines.size() to make the logic easier to follow and to
2309             match other checks in SVGAnimationElement::startedActiveInterval.
2310
2311         Test: svg/animations/animate-keysplines-crash.html
2312
2313         * svg/SVGAnimationElement.cpp:
2314         (WebCore::SVGAnimationElement::startedActiveInterval):
2315
2316 2014-03-01  Benjamin Poulain  <benjamin@webkit.org>
2317
2318         Tighten minimumRegisterRequirements()
2319         https://bugs.webkit.org/show_bug.cgi?id=129538
2320
2321         Reviewed by Andreas Kling.
2322
2323         Fix small things that made minimumRegisterRequirements() a little optimistic
2324         when dealing with attributes.
2325
2326         Test: fast/selectors/adjacent-descendant-tail-register-requirement.html
2327
2328         * cssjit/SelectorCompiler.cpp:
2329         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2330         Attribute Set does not do value matching, the case sensitive value matching is irrelevant
2331         The problem is that flag is also used by minimumRegisterRequirements()
2332         to find if one more register is needed.
2333
2334         Set the flag to case sensitive to avoid reserving one extra register.
2335
2336         (WebCore::SelectorCompiler::minimumRegisterRequirements):
2337         Use a new backtrackingFlag to know if there is a descendant tail, thus a backtracking register
2338         reserved.
2339         This is better than using the backtracking action because the backtracking chain could be
2340         an adjacent chain inside a descendant chain.
2341
2342         The flags are designed for that, just set one for minimumRegisterRequirements().
2343
2344         The 2 extra registers for the attribute count and address become limited to all attributes
2345         except the last one. We don't keep a copy for the last matching, those registers were not needed.
2346
2347         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
2348
2349 2014-03-01  Pratik Solanki  <psolanki@apple.com>
2350
2351         [iOS] selectionImageForcingBlackText should return autoreleased object
2352         https://bugs.webkit.org/show_bug.cgi?id=129437
2353         <rdar://problem/15810384>
2354
2355         Reviewed by Darin Adler.
2356
2357         * bindings/objc/DOM.mm:
2358         (-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
2359
2360 2014-03-01  Yoav Weiss  <yoav@yoav.ws>
2361
2362         Fix srcset related bugs
2363         https://bugs.webkit.org/show_bug.cgi?id=129539
2364
2365         Fixed a bug reported against Blink's srcset implementation at https://code.google.com/p/chromium/issues/detail?id=347998
2366         When both src and srcset had only 1x descriptors and the DPR was higher than 1, the src's resource was picked.
2367
2368         Also fixed the invalid descriptor handling, which wasn't aligned with the spec, and therefore was not as forward compatible as it should be.
2369         Invalid descriptors caused the entire resource to be ignored, rather than just the descriptors themselves.
2370
2371         Reviewed by Andreas Kling.
2372
2373         Tests: fast/hidpi/image-srcset-invalid-descriptor.html
2374                fast/hidpi/image-srcset-src-selection-1x-both.html
2375
2376         * html/parser/HTMLParserIdioms.cpp:
2377         (WebCore::parseDescriptors):
2378         (WebCore::parseImagesWithScaleFromSrcsetAttribute):
2379         (WebCore::bestFitSourceForImageAttributes):
2380
2381 2014-03-01  Darin Adler  <darin@apple.com>
2382
2383         Improve "bad parent" and "bad child list" assertions in line boxes
2384         https://bugs.webkit.org/show_bug.cgi?id=125656
2385
2386         Reviewed by Sam Weinig.
2387
2388         My previous fix for this problem was incomplete. This continuation of that fix addresses
2389         the flaw in the original and adds additional lifetime checking so problems can be seen in
2390         debug builds without a memory debugger.
2391
2392         * rendering/InlineBox.cpp:
2393         (WebCore::InlineBox::assertNotDeleted): Added. Poor man's memory debugging helper.
2394         (WebCore::InlineBox::~InlineBox): Refactored body into a new function named
2395         invalidateParentChildList. Added code to update the deletion sentinel to record
2396         that this object is deleted.
2397         (WebCore::InlineBox::setHasBadParent): Moved here from header since this debug-only
2398         feature does not need to be inlined. Added a call to assertNotDeleted.
2399         (WebCore::InlineBox::invalidateParentChildList): Added. Refactored from the destructor,
2400         this is used by RenderTextLineBoxes.
2401
2402         * rendering/InlineBox.h: Added the deletion sentinel, and called it in the parent
2403         function. Also changed the expansion/setExpansion functions to use the type name "int",
2404         since we don't use the type name "signed" in the WebKit coding style.
2405
2406         * rendering/InlineFlowBox.cpp:
2407         (WebCore::InlineFlowBox::~InlineFlowBox): Call setHasBadChildList rather than doing the
2408         setHasBadParent work on children directly, to avoid code duplication.
2409         (WebCore::InlineFlowBox::setHasBadChildList): Moved here from header. Added code to set
2410         "has bad parent" on all children, something we previously did only on destruction. Also
2411         added assertNotDeleted.
2412         (WebCore::InlineFlowBox::checkConsistency): Added call to assertNotDeleted. Also tweaked
2413         code style and variable names a little bit.
2414
2415         * rendering/InlineFlowBox.h: Moved setHasBadChildList out of the header when it's on.
2416         The empty version for ASSERT_WITH_SECURITY_IMPLICATION_DISABLED is still in the header.
2417
2418         * rendering/RenderTextLineBoxes.cpp:
2419         (WebCore::RenderTextLineBoxes::invalidateParentChildLists): Call the new
2420         InlineBox::invalidateParentChildList function instead of calling setHasBadChildList directly.
2421         The new function checks m_hasBadParent, something we couldn't do here.
2422
2423 2014-03-01  Benjamin Poulain  <benjamin@webkit.org>
2424
2425         Optimized querySelector(All) when selector contains #id
2426         https://bugs.webkit.org/show_bug.cgi?id=116502
2427
2428         Reviewed by Andreas Kling.
2429
2430         Test: fast/selectors/querySelector-id-filtering.html
2431
2432         The idea of this patch is to perform querySelector on a subtree
2433         rooted at the last element with #id matching. For example, if we have the selector
2434         "#foobar div a", we start by looking for the element with ID foobar in the TreeScope
2435         cache, and start matching the children from there.
2436
2437         The idea comes from Rune for
2438         https://chromium.googlesource.com/chromium/blink/+/1cd83d3588973a02ab15d94b1b05a28620853624
2439         but the code as diverged too much so it had to be reimplemented specifically for WebKit.
2440
2441         * css/CSSSelectorList.cpp:
2442         (WebCore::CSSSelectorList::CSSSelectorList):
2443         (WebCore::CSSSelectorList::operator=):
2444         * css/CSSSelectorList.h:
2445         (WebCore::CSSSelectorList::~CSSSelectorList):
2446         * css/StyleRule.h:
2447         (WebCore::StyleRule::wrapperAdoptSelectorList):
2448         (WebCore::StyleRulePage::wrapperAdoptSelectorList):
2449         * dom/SelectorQuery.cpp:
2450         (WebCore::isSingleTagNameSelector):
2451         (WebCore::isSingleClassNameSelector):
2452         (WebCore::findIdMatchingType):
2453         (WebCore::SelectorDataList::SelectorDataList):
2454         (WebCore::filterRootById):
2455         (WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker):
2456         (WebCore::SelectorDataList::execute):
2457         (WebCore::SelectorQuery::SelectorQuery):
2458         (WebCore::SelectorQueryCache::add):
2459         * dom/SelectorQuery.h:
2460         (WebCore::SelectorDataList::SelectorData::SelectorData):
2461
2462 2014-02-28  Alexey Proskuryakov  <ap@apple.com>
2463
2464         Node::compareDocumentPosition leaks memory structure
2465         https://bugs.webkit.org/show_bug.cgi?id=120244
2466
2467         Reviewed by Ryosuke Niwa.
2468
2469         * dom/Node.cpp: (WebCore::Node::compareDocumentPosition): Don't do it.
2470
2471 2014-03-01  David Kilzer  <ddkilzer@apple.com>
2472
2473         Fix lifetime handling of SVGPropertyTearOffs
2474         <http://webkit.org/b/129211>
2475         <rdar://problem/15696025>
2476
2477         Reviewed by Maciej Stachowiak.
2478
2479         Merged from Blink (patch by Ojan Vafai):
2480         https://src.chromium.org/viewvc/blink?revision=157801&view=revision
2481         http://crbug.com/288771
2482
2483             -Replace SVGStaticPropertyWithParentTearOff with SVGMatrixTearOff
2484             since it's only used in that one place. This means we can get rid
2485             of the templatizing and the method pointer.
2486             -Change SVGPropertyTearOff to keep track of it's child tearoffs
2487             and call detachWrapper on its child tearoffs when it's destroyed
2488             or when it's wrapper is detached.
2489             -Have SVGPropertyTearOff hold WeakPtrs to the child tearoffs
2490             to avoid having a cycle.
2491
2492         Test: svg/transforms/svg-matrix-tearoff-crash.html
2493
2494         * GNUmakefile.list.am:
2495         * WebCore.vcxproj/WebCore.vcxproj:
2496         * WebCore.vcxproj/WebCore.vcxproj.filters:
2497         * WebCore.xcodeproj/project.pbxproj:
2498         * bindings/scripts/CodeGeneratorJS.pm:
2499         (NativeToJSValue):
2500         * svg/properties/SVGMatrixTearOff.h: Renamed from Source/WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h.
2501         (WebCore::SVGMatrixTearOff::create):
2502         (WebCore::SVGMatrixTearOff::commitChange):
2503         (WebCore::SVGMatrixTearOff::SVGMatrixTearOff):
2504         * svg/properties/SVGPropertyTearOff.h:
2505         (WebCore::SVGPropertyTearOff::addChild):
2506         (WebCore::SVGPropertyTearOff::detachChildren):
2507
2508 2014-03-01  Zan Dobersek  <zdobersek@igalia.com>
2509
2510         Unreviewed build fix after r164913.
2511
2512         * platform/CountedUserActivity.h: Some ports don't (yet) support forwarding headers for WebCore,
2513         so UserActivity.h should be included as non-forwarding.
2514
2515 2014-03-01  Gavin Barraclough  <barraclough@apple.com>
2516
2517         Change PageActivityAssertionToken to use a WeakPtr
2518         https://bugs.webkit.org/show_bug.cgi?id=129526
2519
2520         Reviewed by Sam Weinig.
2521
2522         PageThrottler effectively implements a bespoke weak pointer mechanism; remove this & just use WeakPtr.
2523
2524         * page/PageActivityAssertionToken.cpp:
2525         (WebCore::PageActivityAssertionToken::PageActivityAssertionToken):
2526         (WebCore::PageActivityAssertionToken::~PageActivityAssertionToken):
2527             - addActivityToken->incrementActivityCount, removeActivityToken->decrementActivityCount
2528         * page/PageActivityAssertionToken.h:
2529             - removed invalidate, made m_throttler a WeakPtr
2530         * page/PageThrottler.cpp:
2531         (WebCore::PageThrottler::PageThrottler):
2532             - initialize m_weakPtrFactory, m_activityCount.
2533         (WebCore::PageThrottler::~PageThrottler):
2534             - removed called to invalidate.
2535         (WebCore::PageThrottler::startThrottleHysteresisTimer):
2536             - m_activityTokens.size()->m_activityCount
2537         (WebCore::PageThrottler::throttleHysteresisTimerFired):
2538             - m_activityTokens.size()->m_activityCount
2539         (WebCore::PageThrottler::incrementActivityCount):
2540             - m_activityTokens.add->++
2541         (WebCore::PageThrottler::decrementActivityCount):
2542             - m_activityTokens.remove->--
2543         * page/PageThrottler.h:
2544         (WebCore::PageThrottler::weakPtr):
2545             - replaced HashSet with WeakPtrFactory & count.
2546
2547 2014-03-01  Gavin Barraclough  <barraclough@apple.com>
2548
2549         Split UserActivity/CountedUserActivity
2550         https://bugs.webkit.org/show_bug.cgi?id=129520
2551
2552         Reviewed by Sam Weinig.
2553
2554         UserActivity currently provides an interface allowing counted, nested calls to enable/disable.
2555         In some cases it would be easier to use if it were a simpler boolean enabled/disabled interface.
2556
2557         * WebCore.exp.in:
2558             - beginActivity->start, endActivity->stop.
2559         * WebCore.xcodeproj/project.pbxproj:
2560         * page/PageThrottler.cpp:
2561         (WebCore::PageThrottler::PageThrottler):
2562         (WebCore::PageThrottler::~PageThrottler):
2563         (WebCore::PageThrottler::throttlePage):
2564         (WebCore::PageThrottler::unthrottlePage):
2565         (WebCore::PageThrottler::setIsVisuallyIdle):
2566             - beginActivity->increment, endActivity->decrement.
2567         * page/PageThrottler.h:
2568             - UserActivity->CountedUserActivity for m_pageActivity
2569         * platform/CountedUserActivity.h: Copied from Source/WebCore/platform/UserActivity.h.
2570         (WebCore::CountedUserActivity::CountedUserActivity):
2571         (WebCore::CountedUserActivity::increment):
2572         (WebCore::CountedUserActivity::decrement):
2573             - Added, provides counted interface to UserActivity.
2574         * platform/UserActivity.cpp:
2575         (WebCore::UserActivity::UserActivity):
2576             - m_count removed
2577         (WebCore::UserActivity::start):
2578         (WebCore::UserActivity::stop):
2579             - beginActivity->start, endActivity->stop, implentation now empty.
2580         * platform/UserActivity.h:
2581             - beginActivity->start, endActivity->stop, m_count moved to HAVE(NS_ACTIVITY)
2582         * platform/mac/UserActivityMac.mm:
2583         (WebCore::UserActivity::UserActivity):
2584             - m_count->m_started
2585         (WebCore::UserActivity::isValid):
2586             - m_count->m_started
2587         (WebCore::UserActivity::start):
2588         (WebCore::UserActivity::stop):
2589             - beginActivity->start, endActivity->stop, no longer nest
2590
2591
2592 2014-02-28  Benjamin Poulain  <benjamin@webkit.org>
2593
2594         Caller saved registers can be accidentally discarded when clearing the local stack
2595         https://bugs.webkit.org/show_bug.cgi?id=129532
2596
2597         Reviewed by Andreas Kling.
2598
2599         Tests: fast/selectors/tree-modifying-case-insensitive-selectors.html
2600                fast/selectors/tree-modifying-selectors.html
2601
2602         StackAllocator::discard() no longer make sense now that we can use caller saved regsiter.
2603         We should instead discard everything up to the beginning of the local stack.
2604
2605         * cssjit/SelectorCompiler.cpp:
2606         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2607         * cssjit/StackAllocator.h:
2608         (WebCore::StackAllocator::popAndDiscardUpTo):
2609
2610 2014-02-28  Andy Estes  <aestes@apple.com>
2611
2612         [iOS] FrameLoader has a NULL m_progressTracker when initialized with initForSynthesizedDocument()
2613         https://bugs.webkit.org/show_bug.cgi?id=129534
2614
2615         Reviewed by Simon Fraser.
2616
2617         No new tests because TestWebKitAPI does not yet support iOS. See <http://webkit.org/b/129535>.
2618
2619         * loader/FrameLoader.cpp:
2620         (WebCore::FrameLoader::initForSynthesizedDocument): Create a FrameProgressTracker.
2621
2622 2014-02-28  Sam Weinig  <sam@webkit.org>
2623
2624         ASSERT(isMainThread()) hit under platformUserPreferredLanguages() with WebKit1 and WebKit2 in the same process
2625         https://bugs.webkit.org/show_bug.cgi?id=129528
2626
2627         Reviewed by Andreas Kling.
2628
2629         * platform/mac/Language.mm:
2630         (WebCore::preferredLanguagesMutex):
2631         (WebCore::preferredLanguages):
2632         (+[WebLanguageChangeObserver languagePreferencesDidChange:]):
2633         (WebCore::httpStyleLanguageCode):
2634         (WebCore::platformUserPreferredLanguages):
2635         Add a mutex and do an isolated copy of the strings to allow this function to be called from multiple threads.
2636
2637 2014-02-28  Dean Jackson  <dino@apple.com>
2638
2639         Crash at ebay.com when viewing auction items at com.apple.WebCore: WebCore::GraphicsContext3D::getExtensions + 10
2640         https://bugs.webkit.org/show_bug.cgi?id=129523
2641
2642         Reviewed by Simon Fraser.
2643
2644         * html/canvas/WebGLRenderingContext.cpp:
2645         (WebCore::WebGLRenderingContext::getSupportedExtensions): Early return if the
2646         context is pending policy resolution.
2647
2648 2014-02-28  Andreas Kling  <akling@apple.com>
2649
2650         Micro-optimize JSNodeOwner::isReachableFromOpaqueRoots().
2651         <https://webkit.org/b/129518>
2652
2653         Only do image and audio element specific checks for element nodes.
2654         Time spent in here goes from 0.8% to 0.5% on DYEB.
2655
2656         Reviewed by Benjamin Poulain.
2657
2658         * bindings/js/JSNodeCustom.cpp:
2659         (WebCore::isReachableFromDOM):
2660
2661 2014-02-28  Geoffrey Garen  <ggaren@apple.com>
2662
2663         JSC Assertion failure every time I start Safari (r164846)
2664         https://bugs.webkit.org/show_bug.cgi?id=129510
2665
2666         Reviewed by Mark Hahnenberg.
2667
2668         Take the lock before allocating objects because afterward is too late.
2669
2670         * bindings/js/ScriptController.cpp:
2671         (WebCore::ScriptController::evaluateInWorld):
2672         (WebCore::ScriptController::windowScriptNPObject):
2673         (WebCore::ScriptController::jsObjectForPluginElement):
2674
2675 2014-02-28  Joseph Pecoraro  <pecoraro@apple.com>
2676
2677         Web Inspector: ASSERT in WebCore::JSDOMWindowBase::supportsRichSourceInfo inspecting iOS
2678         https://bugs.webkit.org/show_bug.cgi?id=129512
2679
2680         Reviewed by Simon Fraser.
2681
2682         * page/PageDebuggable.cpp:
2683         (WebCore::PageDebuggable::connect):
2684         (WebCore::PageDebuggable::disconnect):
2685
2686 2014-02-28  Anders Carlsson  <andersca@apple.com>
2687
2688         VisitedLinkStore should be able to invalidate link styles for associated pages
2689         https://bugs.webkit.org/show_bug.cgi?id=129515
2690
2691         Reviewed by Dan Bernstein.
2692
2693         * page/Page.cpp:
2694         (WebCore::Page::Page):
2695         Add the VisitedLinkStore if we have one.
2696
2697         (WebCore::Page::~Page):
2698         Remove the VisitedLinkStore if we have one.
2699
2700         * page/VisitedLinkStore.cpp:
2701         (WebCore::VisitedLinkStore::~VisitedLinkStore):
2702         Assert that we don't have any pages.
2703
2704         (WebCore::VisitedLinkStore::addPage):
2705         Add the page to the set.
2706
2707         (WebCore::VisitedLinkStore::removePage):
2708         Remove the page from the set.
2709
2710         (WebCore::VisitedLinkStore::invalidateStylesForAllLinks):
2711         Traverse all the pages and invalidate the style for all links.
2712
2713         (WebCore::VisitedLinkStore::invalidateStylesForLink):
2714         Traverse all the pages and invalidate the style for a given link.
2715
2716         * page/VisitedLinkStore.h:
2717         Add new members.
2718
2719 2014-02-28  Benjamin Poulain  <bpoulain@apple.com>
2720
2721         [iOS][WK2] highlight rects should never big bigger than the view
2722         https://bugs.webkit.org/show_bug.cgi?id=129472
2723
2724         Reviewed by Enrica Casucci.
2725
2726         * WebCore.exp.in:
2727
2728 2014-02-28  Beth Dakin  <bdakin@apple.com>
2729
2730         Turn off margin tiles on iOS
2731         https://bugs.webkit.org/show_bug.cgi?id=129509
2732         -and corresponding-
2733         <rdar://problem/16200383>
2734
2735         Reviewed by Simon Fraser.
2736
2737         * page/FrameView.cpp:
2738         (WebCore::FrameView::needsExtendedBackgroundRectForPainting):
2739
2740 2014-02-28  Zalan Bujtas  <zalan@apple.com>
2741
2742         Subpixel rendering: Add subpixel support to border type of double, groove, ridge, inset and outset.
2743         https://bugs.webkit.org/show_bug.cgi?id=129226
2744
2745         Reviewed by Simon Fraser.
2746
2747         This is the conversion of double, inset, outset, groove and ridge border type
2748         painting to support device pixel precision width/height.
2749
2750         Regression is covered by existing tests.
2751
2752         * rendering/RenderObject.cpp:
2753         (WebCore::RenderObject::drawLineForBoxSide):
2754         * rendering/RenderObject.h:
2755
2756 2014-02-28  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2757
2758         Filters should test for area instead of single dimension
2759         https://bugs.webkit.org/show_bug.cgi?id=123716
2760
2761         Reviewed by Dirk Schulze.
2762
2763         A filtered SVG element with a sigle dimension bigger than 5000
2764         (counting the margin/border) will fail to render. So an element
2765         with 4000x4000 will render fine, while another with 5000x10
2766         won't. This patch instead tests against the total element area,
2767         which fixes such cases.
2768
2769         It also fixes some layer violations where FilterEffectRenderer and
2770         RenderSVGResourceFilter were directly accessing the maximum filter
2771         size in FilterEffect. Since before a somewhat bigger filter would
2772         be aborted, it required to change the maximum kernel size
2773         for blur filter (some filters are slower to run than others for
2774         bigger SVGs).
2775
2776         Tests: svg/filters/big-height-filter-expected.svg
2777                svg/filters/big-height-filter.svg
2778                svg/filters/big-width-filter-expected.svg
2779                svg/filters/big-width-filter.svg
2780
2781         * platform/graphics/filters/FEGaussianBlur.cpp:
2782         * platform/graphics/filters/FilterEffect.cpp:
2783         (WebCore::FilterEffect::maxFilterArea): New function, returns the
2784         maximum allowed element area (currently is 4096 x 4096).
2785         (WebCore::FilterEffect::isFilterSizeValid): Now it tests for
2786         element area instead of a single dimension. This code is reused by
2787         FilterEffectRenderer.
2788         * platform/graphics/filters/FilterEffect.h:
2789         * rendering/FilterEffectRenderer.cpp:
2790         (WebCore::FilterEffectRenderer::updateBackingStoreRect): Uses the
2791         new function in FilterEffect to test for valid sizes.
2792         (WebCore::FilterEffectRendererHelper::beginFilterEffect): Same case.
2793         * rendering/svg/RenderSVGResourceFilter.cpp:
2794         (WebCore::RenderSVGResourceFilter::fitsInMaximumImageSize): Test
2795         for maximum area and properly changes the scale of transformed
2796         element to fit.
2797
2798 2014-02-28  Brent Fulgham  <bfulgham@apple.com>
2799
2800         [Mac, iOS] Incorrect ordering of construction arguments for out-of-band text elements
2801         https://bugs.webkit.org/show_bug.cgi?id=129501
2802         <rdar://problem/16198587>
2803
2804         Reviewed by Eric Carlson.
2805
2806         * html/HTMLMediaElement.cpp:
2807         (WebCore::HTMLMediaElement::parseAttribute): Correct order of arguments
2808         to PlatformTextTrack.
2809
2810 2014-02-28  Bem Jones-Bey  <bjonesbe@adobe.com>
2811
2812         Properly clear m_logicallyLastRun to remove use-after-free possibility
2813         https://bugs.webkit.org/show_bug.cgi?id=129489
2814
2815         Reviewed by David Hyatt.
2816
2817         A use-after-free issue was caught in Blink because m_logicallyLastRun
2818         is not cleared when the item it points to is deleted. Clearing it
2819         turns the use-after-free into a segfault, and prevents any future
2820         use-after-frees from happening.
2821
2822         * platform/text/BidiRunList.h:
2823         (WebCore::BidiRunList<Run>::deleteRuns):
2824
2825 2014-02-28  Jer Noble  <jer.noble@apple.com>
2826
2827         [Mac] Disambiguate calls to [[window contentView] layer] and [... setLayer:]
2828         https://bugs.webkit.org/show_bug.cgi?id=129491
2829
2830         Reviewed by Alexey Proskuryakov.
2831
2832         -[NSWindow contentView] returns a bare id, leading to ambiguity when calling
2833         certain methods, including -layer and -setLayer:. Resolve the ambiguity by
2834         explicitly casting the -contentView call to a NSView*.
2835
2836         * platform/mac/WebVideoFullscreenController.mm:
2837         (-[WebVideoFullscreenController setupVideoOverlay:]):
2838         (-[WebVideoFullscreenController windowDidLoad]):
2839         (-[WebVideoFullscreenController windowDidExitFullscreen]):
2840
2841 2014-02-28  Andreas Kling  <akling@apple.com>
2842
2843         MouseEvent.offsetX/Y should just return 0,0 for simulated clicks.
2844         <https://webkit.org/b/129477>
2845
2846         There's no need to compute the exact target-relative coordinates for
2847         simulated mouse events, e.g those fired by HTMLElement.click().
2848
2849         The offsetX/Y properties are not supported by Firefox.
2850
2851         Test: fast/events/relative-offset-of-simulated-click.html
2852
2853         Reviewed by Alexey Proskuryakov.
2854
2855         * dom/MouseRelatedEvent.cpp:
2856         (WebCore::MouseRelatedEvent::offsetX):
2857         (WebCore::MouseRelatedEvent::offsetY):
2858
2859 2014-02-27  Sergio Villar Senin  <svillar@igalia.com>
2860
2861         [CSS Grid Layout] Fix positioning grid items using named grid lines/areas
2862         https://bugs.webkit.org/show_bug.cgi?id=129372
2863
2864         Reviewed by Darin Adler.
2865
2866         Our code was assuming that a <custom-ident> in
2867         -webkit-grid-{column|row}-{start|end} and
2868         -webkit-grid-{column|row} was always a grid area name. That's
2869         wrong because the <custom-ident> could be also a explicitly named
2870         grid line or the an implicitly named grid line created by a grid
2871         area definition.
2872
2873         The style resolution code was not correct either. This patch fixes
2874         it so it now matches the spec, which means that:
2875         - first we try to match any existing grid area.
2876         - then if there is a named grid line with the name
2877         <custom-ident>-{start|end} for -webkit-grid-{column|row}-{start|end}
2878         defined before the grid area then we use it instead of the grid
2879         area.
2880         - otherwise if there is a named grid line we resolve to the first such line.
2881         - otherwise we treat it as 'auto'.
2882
2883         Fixing this uncovered a bug in GridPosition, we were not using the
2884         name of the stored grid area to check if two GridPositions were
2885         the same.
2886
2887         Tests: fast/css-grid-layout/grid-item-position-changed-dynamic.html
2888                fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html
2889
2890         * css/StyleResolver.cpp:
2891         (WebCore::gridLineDefinedBeforeGridArea): New function to check if
2892         a given named grid line was defined before an implicit named grid
2893         line created by a grid area definition.
2894         (WebCore::StyleResolver::adjustNamedGridItemPosition): New
2895         function that adjusts the position of a GridPosition parsed as a
2896         grid area.
2897         (WebCore::StyleResolver::adjustGridItemPosition): Use the new
2898         function adjustNamedGridItemPosition to adjust the positions of
2899         named grid lines.
2900         * css/StyleResolver.h:
2901         * rendering/RenderGrid.cpp:
2902         (WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle): Use GridPosition:: namespace.
2903         (WebCore::RenderGrid::resolveGridPositionFromStyle): Ditto.
2904         (WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Ditto.
2905         * rendering/RenderGrid.h:
2906         * rendering/style/GridPosition.h:
2907         (WebCore::GridPosition::adjustGridPositionForRowEndColumnEndSide): Moved from RenderGrid.cpp.
2908         (WebCore::GridPosition::adjustGridPositionForSide): Ditto.
2909         (WebCore::GridPosition::operator==): Use the named grid line to check equality.
2910
2911 2014-02-28  Zoltan Horvath  <zoltan@webkit.org>
2912
2913         [CSS Shapes] Update line segments for ShapeInside only if the new line is wide enough
2914         https://bugs.webkit.org/show_bug.cgi?id=129461
2915
2916         Reviewed by David Hyatt.
2917
2918         Shape-inside can make a line only narrower than the original line width, thus we don't need
2919         to update the line/shape segments in fitBelowFloats for every single line inside shape-inside.
2920         This patch adds a helper function, which updates the line segments, furthermore it updates the
2921         line segments only when the content would fit without the shape.
2922
2923         No new tests, no behavior change.
2924
2925         * rendering/line/BreakingContextInlineHeaders.h: Use new helper.
2926         (WebCore::updateSegmentsForShapes):
2927         * rendering/line/LineWidth.cpp: Use new helper.
2928         (WebCore::LineWidth::updateLineSegment): Add new helper.
2929         (WebCore::LineWidth::fitBelowFloats):
2930
2931 2014-02-28  Mario Sanchez Prada  <mario.prada@samsung.com>
2932
2933         paragraphs with different directionality in textarea with unicode-bidi: plaintext are aligned the same
2934         https://bugs.webkit.org/show_bug.cgi?id=71194
2935
2936         Reviewed by David Hyatt.
2937
2938         Merged from Blink r157263 by <igor.o@sisa.samsung.com>
2939         <https://src.chromium.org/viewvc/blink?revision=157263&view=revision>
2940
2941         In the css3-text spec (http://www.w3.org/TR/css3-text/#bidi-linebox):
2942
2943         The start and end edges of a line box are determined by the inline
2944         base direction of the line box. In most cases, this is given by
2945         its containing block's computed ‘direction’. However if its
2946         containing block has ‘unicode-bidi: plaintext’, the inline base
2947         direction the line box must be determined by the base direction of
2948         the bidi paragraph to which it belongs: that is, the bidi
2949         paragraph for which the line box holds content.
2950
2951         This patch just implements the behavior described above modifying
2952         updateLogicalWidthForAlignment and setting the bidi level of the
2953         RootInlineBox.
2954
2955         * rendering/RenderBlockFlow.h:
2956         * rendering/RenderBlockLineLayout.cpp:
2957         (WebCore::RenderBlockFlow::updateLogicalWidthForAlignment):
2958         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
2959         (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
2960         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
2961         (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
2962         (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
2963         (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
2964
2965 2014-02-28  Jochen Eisinger  <jochen@chromium.org>
2966
2967         Update meta-referrer behavior for invalid policies
2968         https://bugs.webkit.org/show_bug.cgi?id=129475
2969
2970         This patch aligns the behavior with the CSP 1.1 referrer directive,
2971         where the fallback for an invalid value is the "never" policy.
2972
2973         Original patch from Mike West: https://src.chromium.org/viewvc/blink?view=rev&revision=165627
2974
2975         Reviewed by Alexey Proskuryakov.
2976
2977         Test: http/tests/security/referrer-policy-invalid.html
2978
2979         * dom/Document.cpp:
2980         (WebCore::Document::processReferrerPolicy):
2981
2982 2014-02-28  Daniel Bates  <dabates@apple.com>
2983
2984         SubresourceLoader::didFinishLoading() should not assert when a decode error occurs
2985         https://bugs.webkit.org/show_bug.cgi?id=127029
2986
2987         Reviewed by Darin Adler.
2988
2989         SubresourceLoader::didFinishLoading() can be called for a resource (e.g. an image) that
2990         failed to be decoded or, in the case of an image, whose estimated decoded size exceeds
2991         the maximum decoded size (Settings::maximumDecodedImageSize()).
2992
2993         Test: fast/images/decoded-size-exceeds-max-decoded-size.html
2994
2995         * loader/SubresourceLoader.cpp:
2996         (WebCore::SubresourceLoader::didFinishLoading):
2997
2998 2014-02-28  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
2999
3000         ASSERTION FAILED: roundedIntPoint(rendererMappedResult) == roundedIntPoint(result) in WebCore::RenderGeometryMap::mapToContainer
3001         https://bugs.webkit.org/show_bug.cgi?id=119626
3002
3003         SVGRenderSupport::mapLocalToContainer() was trying to apply transforms
3004         in the incorrect order. Specifically, it would attempt to apply its
3005         localToParentTransform before its localToBorderBoxTransform. This
3006         was causing an ASSERT to fail when the computed transforms didn't
3007         match up to those computed by RenderGeometryMap.
3008
3009         Backported from Blink: https://codereview.chromium.org/143363004
3010
3011         Reviewed by Simon Fraser.
3012
3013         Test: svg/transforms/svg-geometry-crash.html
3014
3015         * rendering/svg/SVGRenderSupport.cpp:
3016         (WebCore::SVGRenderSupport::mapLocalToContainer):
3017
3018 2014-02-28  Mihnea Ovidenie  <mihnea@adobe.com>
3019
3020         [CSSRegions] ASSERTION FAILED: !m_regionsInvalidated in RenderFlowThread::regionAtBlockOffset
3021         https://bugs.webkit.org/show_bug.cgi?id=129371
3022
3023         Reviewed by Andrei Bucur.
3024
3025         regionAtBlockOffset method is meant to be used after the flow thread validated
3026         its region chain, otherwise we cannot rely on regionAtBlockOffset to determine correctly
3027         the target region based on the offset in flow thread coordinates.
3028
3029         When the video element is collected in a named flow and displayed in a region, we ensure
3030         that the region's decorations are taken into account to properly position the video.
3031         However, we have to do that only if the named flow regions are validated.
3032
3033         I changed the method cachedRegionForCompositedLayer to check only the "cached" region
3034         for a layer and not update the layer to region mappings before returning the region.
3035         Because method cachedRegionForCompositedLayer does not update the region - layer mappings,
3036         the code does not call regionAtBlockOffset in situations where the region chain is not validated yet.
3037
3038         Test: compositing/regions/video-in-overflow-region.html
3039
3040         * rendering/RenderFlowThread.cpp:
3041         (WebCore::RenderFlowThread::getLayerListForRegion): Make it a getter that relies on
3042         cached information and refrain from updating the mappings. Make it const too.
3043         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
3044         * rendering/RenderFlowThread.h:
3045
3046 2014-02-28  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3047
3048         [GTK] Finetune captions menu as per design team
3049         https://bugs.webkit.org/show_bug.cgi?id=129432
3050
3051         Reviewed by Eric Carlson.
3052
3053         Some design fine tuning of the captions dialog was required.
3054         
3055         No new tests, current suffice.
3056
3057         * Modules/mediacontrols/mediaControlsApple.js:
3058         Added out class.
3059         * Modules/mediacontrols/mediaControlsGtk.js:
3060         (ControllerGtk.prototype.buildCaptionMenu): Setting out class when
3061         menu is going to show overlap the panel right border.
3062         * css/mediaControlsGtk.css:
3063         (video::-webkit-media-controls-closed-captions-container.out):
3064         Setting all borders to 5px;
3065         (video::-webkit-media-controls-closed-captions-container h3):
3066         Reduced font size and increasing top padding.
3067         (video::-webkit-media-controls-closed-captions-container ul):
3068         Increased top padding.
3069
3070 2014-02-27  Ryosuke Niwa  <rniwa@webkit.org>
3071
3072         Element::attributeChanged shouldn't do any work when attribute value didn't change
3073         https://bugs.webkit.org/show_bug.cgi?id=129467
3074
3075         Reviewed by Geoffrey Garen.
3076
3077         Exit early in childrenChanged when the attribute value didn't change.
3078
3079         * dom/Attr.cpp:
3080         (WebCore::Attr::setValue):
3081         (WebCore::Attr::childrenChanged):
3082         * dom/Element.cpp:
3083         (WebCore::Element::setAttributeInternal):
3084         (WebCore::Element::attributeChanged):
3085         (WebCore::Element::parserSetAttributes):
3086         (WebCore::Element::removeAttributeInternal):
3087         (WebCore::Element::didAddAttribute):
3088         (WebCore::Element::didModifyAttribute):
3089         (WebCore::Element::didRemoveAttribute):
3090         (WebCore::Element::cloneAttributesFromElement):
3091         * dom/Element.h:
3092         * dom/StyledElement.cpp:
3093         (WebCore::StyledElement::attributeChanged):
3094         * dom/StyledElement.h:
3095         * html/HTMLInputElement.cpp:
3096         (WebCore::HTMLInputElement::updateType):
3097         * mathml/MathMLElement.cpp:
3098         (WebCore::MathMLElement::attributeChanged):
3099         * mathml/MathMLElement.h:
3100         * mathml/MathMLSelectElement.cpp:
3101         (WebCore::MathMLSelectElement::attributeChanged):
3102         * mathml/MathMLSelectElement.h:
3103         * svg/SVGElement.cpp:
3104         (WebCore::SVGElement::attributeChanged):
3105         * svg/SVGElement.h:
3106
3107 2014-02-27  Jinwoo Song  <jinwoo7.song@samsung.com>
3108
3109         [EFL] Remove duplicated keyboard string key from keyMap
3110         https://bugs.webkit.org/show_bug.cgi?id=129469
3111
3112         Reviewed by Gyuyoung Kim.
3113
3114         "Down" key is duplicated in keyMap().
3115
3116         * platform/efl/EflKeyboardUtilities.cpp:
3117         (WebCore::createKeyMap):
3118
3119 2014-02-27  Benjamin Poulain  <benjamin@webkit.org>
3120
3121         Unify the three call sites of SelectorQueryCache
3122         https://bugs.webkit.org/show_bug.cgi?id=129249
3123
3124         Reviewed by Andreas Kling.
3125
3126         The three call sites of SelectorQueryCache were doing the exact same thing.
3127         That code is mvoed to a new function Document::selectorQueryForString().
3128
3129         Also use String instead of AtomicString for querySelector() and querySelectorAll().
3130         This prevent the call sites from creating AtomicString just for the time of the call.
3131         This causes a tiny slow down on microbenchmarks that continuously query the same string
3132         but has no negative impact on realistic/good test cases (and the bindings are simplified).
3133
3134         * dom/ContainerNode.cpp:
3135         (WebCore::ContainerNode::querySelector):
3136         (WebCore::ContainerNode::querySelectorAll):
3137         * dom/ContainerNode.h:
3138         * dom/Document.cpp:
3139         (WebCore::Document::selectorQueryForString):
3140         * dom/Document.h:
3141         * dom/Element.cpp:
3142         (WebCore::Element::webkitMatchesSelector):
3143         * dom/SelectorQuery.cpp:
3144         (WebCore::SelectorQueryCache::add):
3145         * dom/SelectorQuery.h:
3146
3147 2014-02-27  Ryosuke Niwa  <rniwa@webkit.org>
3148
3149         JSC ignores the extra memory cost of HTMLCollection after a major GC
3150         https://bugs.webkit.org/show_bug.cgi?id=129450
3151
3152         Reviewed by Andreas Kling.
3153
3154         Report the extra memory cost of HTMLCollection to JSC.
3155
3156         Unfortunately, the existing mechanism to report the extra memory cost in toJS is insufficient for
3157         HTMLCollection since collection caches are populated later when HTMLCollection is accessed. Also,
3158         the extra memory cost reported by Heap::reportExtraMemoryCost will be thrown away after a major GC.
3159
3160         To work around this limitation, added a visitor.reportExtraMemoryUsage call inside visitChildren
3161         for interfaces with a newly added ReportExtraMemoryCost IDL extension flag to report the extra cost.
3162
3163         Since we may need to generate visitChildren when this flag is set, we can't automatically detect
3164         and generate calls using C++ template as done in r148648.
3165
3166         * CMakeLists.txt:
3167         * GNUmakefile.list.am:
3168         * Modules/webaudio/AudioBuffer.idl:
3169         * WebCore.vcxproj/WebCore.vcxproj:
3170         * WebCore.xcodeproj/project.pbxproj:
3171         * bindings/js/JSDOMBinding.h:
3172         * bindings/scripts/CodeGeneratorJS.pm:
3173         (InstanceNeedsVisitChildren):
3174         (GenerateHeader):
3175         (GenerateImplementation):
3176         * bindings/scripts/IDLAttributes.txt:
3177         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3178         (WebCore::toJS):
3179         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3180         (WebCore::toJS):
3181         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3182         (WebCore::toJS):
3183         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3184         (WebCore::toJS):
3185         * bindings/scripts/test/JS/JSTestException.cpp:
3186         (WebCore::toJS):
3187         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3188         (WebCore::toJS):
3189         * bindings/scripts/test/JS/JSTestInterface.cpp:
3190         (WebCore::toJS):
3191         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3192         (WebCore::toJS):
3193         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3194         (WebCore::toJS):
3195         * bindings/scripts/test/JS/JSTestObj.cpp:
3196         (WebCore::toJS):
3197         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3198         (WebCore::toJS):
3199         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3200         (WebCore::toJS):
3201         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3202         (WebCore::toJS):
3203         * bindings/scripts/test/JS/JSattribute.cpp:
3204         (WebCore::toJS):
3205         * bindings/scripts/test/JS/JSreadonly.cpp:
3206         (WebCore::toJS):
3207         * dom/ChildNodeList.h:
3208         * dom/CollectionIndexCache.cpp: Added.
3209         (WebCore::reportExtraMemoryCostForCollectionIndexCache):
3210         * dom/CollectionIndexCache.h:
3211         (WebCore::CollectionIndexCache::memoryCost):
3212         (WebCore::NodeType>::CollectionIndexCache):
3213         (WebCore::NodeType>::nodeCount):
3214         (WebCore::NodeType>::computeNodeCountUpdatingListCache):
3215         (WebCore::NodeType>::nodeAt):
3216         (WebCore::NodeType>::invalidate):
3217         * dom/DOMAllInOne.cpp:
3218         * dom/LiveNodeList.cpp:
3219         (WebCore::LiveNodeList::memoryCost):
3220         * dom/LiveNodeList.h:
3221         * dom/NodeList.h:
3222         (WebCore::NodeList::memoryCost):
3223         * dom/NodeList.idl:
3224         * html/HTMLCollection.cpp:
3225         (WebCore::HTMLCollection::updateNamedElementCache):
3226         * html/HTMLCollection.h:
3227         (WebCore::CollectionNamedElementCache::didPopulate):
3228         (WebCore::CollectionNamedElementCache::memoryCost):
3229         (WebCore::CollectionNamedElementCache::find):
3230         (WebCore::HTMLCollection::memoryCost):
3231         * html/HTMLCollection.idl:
3232         * html/HTMLFormControlsCollection.cpp:
3233         (WebCore::HTMLFormControlsCollection::updateNamedElementCache):
3234
3235 2014-02-27  Benjamin Poulain  <benjamin@webkit.org>
3236
3237         Compile attribute value matching
3238         https://bugs.webkit.org/show_bug.cgi?id=129228
3239
3240         Reviewed by Geoffrey Garen.
3241
3242         Add support for compiling value matching when matching attributes in Selector.
3243         This patch only adds exact matching, the other cases will follow.
3244
3245         There is a little infrastructure changes since FunctionCall now needs to support
3246         calls taking 2 arguments. The fun begins when the arguments are not in the right
3247         registers and need to be moved to the right place. Otherwise the code is straightforward.
3248
3249         In SelectorCompiler, it is necessary to handle two different cases of matching: case sensitive
3250         and case insensitive. The choice is done in part at compilation time by asking HTMLDocument
3251         if the name filter can include case insensitive attribute. The other part is done at runtime
3252         by querying the element for its type and document.
3253
3254         Test: fast/selectors/case-insensitive-value-matching.html
3255
3256         * css/SelectorChecker.cpp:
3257         (WebCore::attributeValueMatches): Null values matching should never happen, when an attribute
3258         has no value, its value is empty.
3259
3260         * cssjit/FunctionCall.h:
3261         (WebCore::FunctionCall::FunctionCall):
3262         Add support for calls with two arguments.
3263         (WebCore::FunctionCall::setOneArgument):
3264         (WebCore::FunctionCall::setTwoArguments):
3265         (WebCore::FunctionCall::swapArguments):
3266         Here we need to swap two registers, but we cannot allocate a new register (because the context
3267         of the function call may have taken all the available registers already).
3268
3269         On x86, the solution is simple, we can swap the two registers without side effects.
3270
3271         On other platforms, it is a little more complex. If there is any available register, we can just
3272         use it as a temporary to make the swap.
3273         If there are no available registers, we know that all the registers are taken. Since swapArguments()
3274         was called after pushing all the arguments on the stack, we can safely trash the value of any of those.
3275         We take the first available register that is not a function argument and use it as a temporary.
3276
3277         (WebCore::FunctionCall::prepareAndCall):
3278         This is the fun part, we have two registers where the values must go before the function call. The values
3279         can be in any combination of the allocated registers. The code here needs to move the two values to
3280         their target register while avoiding conflicts.
3281
3282         * cssjit/SelectorCompiler.cpp:
3283         (WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
3284         (WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch):
3285         (WebCore::SelectorCompiler::AttributeMatchingInfo::selector):
3286         The value of HTMLDocument::isCaseSensitiveAttribute is needed at compilation time to compute the number
3287         of required registers. As a result, we need to keep it along in the selector fragment.
3288
3289         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
3290         (WebCore::SelectorCompiler::attributeNameTestingRequiresNamespaceRegister):
3291         (WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
3292         (WebCore::SelectorCompiler::minimumRegisterRequirements):
3293         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
3294         (WebCore::SelectorCompiler::canMatchStyleAttribute):
3295         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeStyleAttribute):
3296         (WebCore::SelectorCompiler::canMatchAnimatableSVGAttribute):
3297         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeAllAnimatedSVGAttribute):
3298         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
3299         The matching code is moved in a local scope. This is done to recover the register of qualifiedNameImpl
3300         before doing any value matching. That register can then be used to store the expected value when matching
3301         an attribute value.
3302         It is unfortunate there is so much register pressure in this part.
3303
3304         Value matching is done outside the loop. The idea is to keep the loop really small since in the vast majority
3305         of cases, name matching fails.
3306         If the value matching fails, we jump back into the tight loop.
3307
3308         This is not ideal in all situation. For example trivial name matching with trivial value matching should
3309         be done in loop. There is a FIXME to improve those cases later.
3310
3311         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
3312         (WebCore::SelectorCompiler::testIsHTMLClassOnDocument):
3313         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
3314         In the case sensitive branch, things are really simple. We have to AtomicStringImpl pointers, if they
3315         don't match, it is a failure.
3316
3317         The case sensitive branch start by comparing the pointers in case the values are equal. This is a common
3318         case and it simplifies the cases for SVG, XHTML, etc.
3319         If the two values are not equal, we must first find if the context requires case insensitive comparison
3320         (HTMLElement in HTMLDocument). If the conditions require case insensitive matching, we then fall back
3321         to a function call.
3322
3323         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementFunctionCallTest):
3324         * dom/Attribute.h:
3325         (WebCore::Attribute::valueMemoryOffset):
3326         * dom/Document.h:
3327         (WebCore::Document::documentClassesMemoryOffset):
3328         (WebCore::Document::isHTMLDocumentClassFlag):
3329         * dom/Node.h:
3330         (WebCore::Node::treeScopeMemoryOffset):
3331         * dom/TreeScope.h:
3332         (WebCore::TreeScope::documentScopeMemoryOffset):
3333
3334 2014-02-27  Ryuan Choi  <ryuan.choi@samsung.com>
3335
3336         Build break when disabled CSS_GRID_LAYOUT
3337         https://bugs.webkit.org/show_bug.cgi?id=129459
3338
3339         Reviewed by Gyuyoung Kim.
3340
3341         * css/CSSValue.h: Added guards of CSS_GRID_LAYOUT for GridTemplateAreasClass.
3342
3343 2014-02-17  Myles C. Maxfield  <mmaxfield@apple.com>
3344
3345         text-decoration-skip: ink does not skip over SVG fonts
3346         https://bugs.webkit.org/show_bug.cgi?id=128936
3347
3348         Reviewed by Darin Adler.
3349
3350         When drawing glyphs in an SVG font, the glyphs are converted to paths and then filled. This patch moves
3351         the glyph -> path conversion into a helper class, GlyphToPathTranslator, and creates an implementation
3352         for the SVG drawing code. Once this helper class is created, it can be used to trace paths in order
3353         to make underlines skip over SVG glyphs. This helper class also has an implementation for non-SVG glyphs,
3354         which allows for the glyph tracing code to be paramaterized over the implementation of the helper class
3355         rather than if the FontData itself is SVG or not.
3356
3357         Tests: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-svg.html
3358
3359         * platform/graphics/Font.h:
3360         (WebCore::GlyphToPathTranslator::~GlyphToPathTranslator): Virtual implementation of helper class
3361         * platform/graphics/cg/PathCG.cpp:
3362         (WebCore::Path::Path): Created constructor that takes a RefPtr<CGMutablePathRef>
3363         * platform/graphics/Path.h:
3364         * platform/graphics/TextRun.h: Give RenderingContext a factory function to create the helper class
3365         instance
3366         * platform/graphics/mac/FontMac.mm: Implementation of helper class used for skipping underlines on
3367         regular (CoreText) glyphs
3368         (WebCore::MacGlyphToPathTranslator::MacGlyphToPathTranslator):
3369         (WebCore::MacGlyphToPathTranslator::moveToNextValidGlyph):
3370         (WebCore::MacGlyphToPathTranslator::incrementIndex):
3371         (WebCore::Font::dashesForIntersectionsWithRect): Call the relevant factory function, and use it
3372         to successively generate Paths
3373         * rendering/svg/SVGTextRunRenderingContext.cpp: Implementation of helper class used for SVG fonts
3374         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
3375         (WebCore::SVGGlyphToPathTranslator::moveToNextValidGlyph):
3376         (WebCore::SVGGlyphToPathTranslator::incrementIndex):
3377         (WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
3378         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): Use the above implementation
3379         * rendering/svg/SVGTextRunRenderingContext.h: Factory function declaration
3380
3381 2014-02-27  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3382
3383         [WebRTC] Removing MediaConstraints argument from RTCPeerConnection addStream, updateIce methods and constructor
3384         https://bugs.webkit.org/show_bug.cgi?id=129449
3385
3386         Reviewed by Eric Carlson.
3387
3388         According to WebRTC editor's draft, MediaConstraints will no longer be an argument of those methods and
3389         constructor.
3390
3391         Existing tests were updated.
3392
3393         * Modules/mediastream/RTCPeerConnection.cpp:
3394         (WebCore::RTCPeerConnection::create):
3395         (WebCore::RTCPeerConnection::RTCPeerConnection):
3396         (WebCore::RTCPeerConnection::updateIce):
3397         (WebCore::RTCPeerConnection::addStream):
3398         * Modules/mediastream/RTCPeerConnection.h:
3399         * Modules/mediastream/RTCPeerConnection.idl:
3400         * bindings/js/JSRTCPeerConnectionCustom.cpp:
3401         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
3402         * platform/mediastream/RTCPeerConnectionHandler.h:
3403         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
3404         (WebCore::RTCPeerConnectionHandlerMock::initialize):
3405         (WebCore::RTCPeerConnectionHandlerMock::updateIce):
3406         (WebCore::RTCPeerConnectionHandlerMock::addStream):
3407         * platform/mock/RTCPeerConnectionHandlerMock.h:
3408
3409 2014-02-27  Radu Stavila  <stavila@adobe.com>
3410
3411         [CSS Regions] Move named-flow specific method decorationsClipRectForBoxInRegion to RenderNamedFlowThread
3412         https://bugs.webkit.org/show_bug.cgi?id=129428
3413
3414         Reviewed by Andreas Kling.
3415
3416         Since the decorationsClipRectForBoxInRegion method is a named flow specific method, it makes
3417         sense to be in the named flow specific class, RenderNamedFlowThread, instead of the more
3418         generic RenderFlowThread.
3419
3420         No new tests required. No new functionality.
3421
3422         * rendering/RenderBlock.cpp:
3423         (WebCore::RenderBlock::paintObject):
3424         * rendering/RenderFlowThread.cpp:
3425         * rendering/RenderFlowThread.h:
3426         * rendering/RenderNamedFlowThread.cpp:
3427         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
3428         * rendering/RenderNamedFlowThread.h:
3429
3430 2014-02-27  Zoltan Horvath  <zoltan@webkit.org>
3431
3432         Avoid calling logicalLeftOffsetForLine 2 times in LineWidth::fitBelowFloats
3433         https://bugs.webkit.org/show_bug.cgi?id=129433
3434
3435         Reviewed by Darin Adler.
3436
3437         This change updates fitBelowFloats and its helpers to call RenderBlock::logicalLeftOffsetForLine only once.
3438
3439         No new tests, no behavior change.
3440
3441         * rendering/line/LineWidth.cpp:
3442         (WebCore::availableWidthAtOffset):
3443         (WebCore::LineWidth::updateLineDimension):
3444         (WebCore::LineWidth::wrapNextToShapeOutside):
3445         (WebCore::LineWidth::fitBelowFloats):
3446         * rendering/line/LineWidth.h:
3447
3448 2014-02-27  Andreas Kling  <akling@apple.com>
3449
3450         Micro-optimize elementAffectsDirectionality().
3451         <https://webkit.org/b/129444>
3452
3453         Tweak this function to skip an unnecessary bit check and use
3454         fastHasAttribute() instead of hasAttribute() for looking up dirAttr.
3455
3456         ~1% speedup on DYEB/AngularJS.
3457
3458         Reviewed by Ryosuke Niwa.
3459
3460         * html/HTMLElement.cpp:
3461         (WebCore::elementAffectsDirectionality):
3462
3463 2014-02-27  Brian Burg  <bburg@apple.com>
3464
3465         Web Inspector: model tests should use a special Test.html inspector page
3466         https://bugs.webkit.org/show_bug.cgi?id=129190
3467
3468         Reviewed by Timothy Hatcher.
3469
3470         Convert InspectorController::isUnderTest() into a flag, and expose an
3471         Internals method so it can be set by the test before opening the inspector.
3472
3473         Test: inspector/test-harness-trivially-works.html
3474
3475         * inspector/InspectorController.cpp:
3476         (WebCore::InspectorController::evaluateForTestInFrontend):
3477         * inspector/InspectorController.h:
3478         * testing/Internals.cpp:
3479         (WebCore::Internals::setInspectorIsUnderTest): Added.
3480         * testing/Internals.h:
3481         * testing/Internals.idl:
3482
3483 2014-02-27  Joseph Pecoraro  <pecoraro@apple.com>
3484
3485         Unreviewed build fix after r164824.
3486
3487         Accidentally re-added some code that was removed.
3488
3489         * page/ContentSecurityPolicy.cpp:
3490
3491 2014-02-26  Alex Christensen  <achristensen@webkit.org>
3492
3493         Compile fix when not using TEXTURE_MAPPER_GL.
3494         https://bugs.webkit.org/show_bug.cgi?id=129417
3495
3496         Reviewed by Darin Adler.
3497
3498         * platform/graphics/texmap/TextureMapperGL.cpp:
3499         Protect platformCreateAccelerated with USE(TEXTURE_MAPPER_GL).
3500
3501 2014-02-27  Joseph Pecoraro  <pecoraro@apple.com>
3502
3503         Web Inspector: JSContext inspection should report exceptions in the console
3504         https://bugs.webkit.org/show_bug.cgi?id=128776
3505
3506         Reviewed by Timothy Hatcher.
3507
3508         Include some clean up of ConsoleMessage and ScriptCallStack construction.
3509
3510         Covered by existing tests.
3511
3512         * bindings/js/JSDOMBinding.cpp:
3513         (WebCore::reportException):
3514         Simplify code now that createStackTraceFromException handles it.
3515
3516         * page/ContentSecurityPolicy.cpp:
3517         (WebCore::gatherSecurityPolicyViolationEventData):
3518         (WebCore::ContentSecurityPolicy::reportViolation):
3519         ScriptCallStack can give us the first non-native callframe.
3520
3521         * inspector/InspectorResourceAgent.cpp:
3522         (WebCore::InspectorResourceAgent::buildInitiatorObject):
3523         * inspector/PageDebuggerAgent.cpp:
3524         (WebCore::PageDebuggerAgent::breakpointActionLog):
3525         * inspector/TimelineRecordFactory.cpp:
3526         (WebCore::TimelineRecordFactory::createGenericRecord):
3527         * page/Console.cpp:
3528         (WebCore::internalAddMessage):
3529         (WebCore::Console::profile):
3530         (WebCore::Console::profileEnd):
3531         (WebCore::Console::timeEnd):
3532         * page/ContentSecurityPolicy.cpp:
3533         (WebCore::gatherSecurityPolicyViolationEventData):
3534         (WebCore::ContentSecurityPolicy::reportViolation):
3535         * page/DOMWindow.cpp:
3536         (WebCore::DOMWindow::postMessage):
3537
3538 2014-02-27  Andreas Kling  <akling@apple.com>
3539
3540         Remove FeatureObserver.
3541         <https://webkit.org/b/129439>
3542
3543         This code was only used by the Chromium port and nobody else is
3544         making use of it.
3545
3546         Reviewed by Anders Carlsson.
3547
3548         * CMakeLists.txt:
3549         * GNUmakefile.list.am:
3550         * WebCore.vcxproj/WebCore.vcxproj:
3551         * WebCore.vcxproj/WebCore.vcxproj.filters:
3552         * WebCore.xcodeproj/project.pbxproj:
3553         * dom/EventTarget.cpp:
3554         (WebCore::EventTarget::fireEventListeners):
3555         * dom/EventTarget.h:
3556         * html/ColorInputType.cpp:
3557         * html/ColorInputType.h:
3558         * html/DateInputType.cpp:
3559         * html/DateInputType.h:
3560         * html/DateTimeInputType.cpp:
3561         * html/DateTimeInputType.h:
3562         * html/DateTimeLocalInputType.cpp:
3563         * html/DateTimeLocalInputType.h:
3564         * html/EmailInputType.cpp:
3565         * html/EmailInputType.h:
3566         * html/HTMLDataListElement.cpp:
3567         (WebCore::HTMLDataListElement::create):
3568         * html/HTMLFormControlElement.cpp:
3569         (WebCore::HTMLFormControlElement::parseAttribute):
3570         * html/HTMLInputElement.cpp:
3571         (WebCore::HTMLInputElement::parseAttribute):
3572         * html/HTMLTextFormControlElement.cpp:
3573         (WebCore::HTMLTextFormControlElement::parseAttribute):
3574         * html/InputType.cpp:
3575         * html/InputType.h:
3576         * html/MonthInputType.cpp:
3577         * html/MonthInputType.h:
3578         * html/NumberInputType.cpp:
3579         * html/NumberInputType.h:
3580         * html/RangeInputType.cpp:
3581         * html/RangeInputType.h:
3582         * html/SearchInputType.cpp:
3583         * html/SearchInputType.h:
3584         * html/TelephoneInputType.cpp:
3585         * html/TelephoneInputType.h:
3586         * html/TextInputType.cpp:
3587         * html/TextInputType.h:
3588         * html/TimeInputType.cpp:
3589         * html/TimeInputType.h:
3590         * html/URLInputType.cpp:
3591         * html/URLInputType.h:
3592         * html/WeekInputType.cpp:
3593         * html/WeekInputType.h:
3594         * loader/DocumentLoader.cpp:
3595         (WebCore::DocumentLoader::responseReceived):
3596         * loader/FrameLoader.cpp:
3597         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
3598         (WebCore::FrameLoader::dispatchDidCommitLoad):
3599         * page/ContentSecurityPolicy.cpp:
3600         (WebCore::ContentSecurityPolicy::didReceiveHeader):
3601         * page/EventHandler.cpp:
3602         (WebCore::EventHandler::selectCursor):
3603         * page/FeatureObserver.cpp: Removed.
3604         * page/FeatureObserver.h: Removed.
3605         * page/Page.h:
3606         * rendering/RenderDeprecatedFlexibleBox.cpp:
3607         (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
3608         * rendering/RenderLayer.cpp:
3609         (WebCore::RenderLayer::calculateClipRects):
3610         * workers/SharedWorker.cpp:
3611         (WebCore::SharedWorker::create):
3612         * workers/Worker.cpp:
3613         (WebCore::Worker::create):
3614
3615 2014-02-27  Chris Fleizach  <cfleizach@apple.com>
3616
3617         speechSynthesis.speak of a zero length utterance kills future speech
3618         https://bugs.webkit.org/show_bug.cgi?id=129403
3619
3620         Reviewed by Mario Sanchez Prada.
3621
3622         Empty length strings may choke a synthesizer and result in didFinishSpeaking not being called. 
3623         The WebKit code should be proactive about screening out empty length strings.
3624
3625         Test: platform/mac/fast/speechsynthesis/speech-synthesis-speak-empty-string.html
3626
3627         * Modules/speech/SpeechSynthesis.cpp:
3628         (WebCore::SpeechSynthesis::startSpeakingImmediately):
3629
3630 2014-02-27  Commit Queue  <commit-queue@webkit.org>
3631
3632         Unreviewed, rolling out r164783.
3633         http://trac.webkit.org/changeset/164783
3634         https://bugs.webkit.org/show_bug.cgi?id=129425
3635
3636         Broke number of multicol tests (Requested by anttik on
3637         #webkit).
3638
3639         * rendering/RenderBlock.cpp:
3640         (WebCore::RenderBlock::containingColumnsBlock):
3641
3642 2014-02-27  Antoine Quint  <graouts@webkit.org>
3643
3644         Respect SVG fragment identifiers in <img> src attribute
3645         https://bugs.webkit.org/show_bug.cgi?id=129387
3646
3647         Reviewed by Antti Koivisto.
3648
3649         Test: svg/css/svg-resource-fragment-identifier-img-src.html
3650
3651         When providing an SVG image for a given renderer, check that the URL used to load
3652         that image is taken into account in case it featured a fragment identifier, ensuring
3653         that the CSS :target pseudo-class is correctly handled for SVG resources. This patch
3654         is specific to <img> elements, specific support will also need to be added for various
3655         CSS properties that support SVG images.
3656
3657         * svg/graphics/SVGImageCache.cpp:
3658         (WebCore::SVGImageCache::imageForRenderer):
3659         Check if the provided renderer is attached to an <img> element and, if so, pass the
3660         resolved <img> source URL, taking into account srcset, to the SVGImageForContainer.
3661
3662         * svg/graphics/SVGImageForContainer.cpp:
3663         (WebCore::SVGImageForContainer::setURL):
3664         Trigger the FrameView machinery to ensure that the :target pseudo-class is respected
3665         should the provided URL feature a fragment identifier.
3666
3667         * svg/graphics/SVGImageForContainer.h:
3668         Declare the new setURL() method.
3669
3670 2014-02-27  Krzysztof Czech  <k.czech@samsung.com>
3671
3672         [ATK] Fix style errors in enum members
3673         https://bugs.webkit.org/show_bug.cgi?id=129421
3674
3675         Reviewed by Mario Sanchez Prada.
3676
3677         No new tests. No new functionality.
3678
3679         Enum members should use InterCaps with an initial capital letter.
3680
3681         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3682         (getInterfaceMaskFromObject):
3683
3684 2014-02-27  Mihai Tica  <mitica@adobe.com>
3685
3686         [CSS Blending] Parse and implement the -webkit-isolation CSS property.
3687
3688         https://bugs.webkit.org/show_bug.cgi?id=128958
3689
3690         Reviewed by Dirk Schulze.
3691
3692         Parse and implement -webkit-isolation, part of the CSS Blending and Compositing spec.
3693         This patch adds functionality for HTML and SVG.
3694         -webkit-isolation: isolate restricts any child elements from blending with any of the content outside the isolated parent element.
3695
3696         Tests: css3/compositing/isolation-isolate-blended-child.html
3697                css3/compositing/isolation-parsing.html
3698                css3/compositing/svg-isolation-default.html
3699                css3/compositing/svg-isolation-isolated-group.html
3700                css3/compositing/svg-isolation-simple.html
3701
3702         * css/CSSComputedStyleDeclaration.cpp:
3703         (WebCore::ComputedStyleExtractor::propertyValue):
3704         * css/CSSParser.cpp:
3705         (WebCore::isValidKeywordPropertyAndValue):
3706         (WebCore::isKeywordPropertyID):
3707         (WebCore::CSSParser::parseValue):
3708         * css/CSSPrimitiveValueMappings.h:
3709         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3710         (WebCore::CSSPrimitiveValue::operator Isolation):
3711         * css/CSSPropertyNames.in: Add -webkit-isolation.
3712         * css/CSSValueKeywords.in: Add the isolate value.
3713         * css/DeprecatedStyleBuilder.cpp:
3714         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3715         * css/StyleResolver.cpp:
3716         (WebCore::StyleResolver::adjustRenderStyle): Explicitly set isolation:isolate to create a stacking context.
3717         * rendering/style/RenderStyle.cpp:
3718         (WebCore::RenderStyle::changeRequiresLayerRepaint): Changing isolation should trigger a repaint.
3719         * rendering/style/RenderStyle.h: Setters and getters for isolation.
3720         * rendering/style/RenderStyleConstants.h: Add Isolation enum.
3721         * rendering/style/StyleRareNonInheritedData.cpp: Add m_isolation.
3722         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3723         (WebCore::StyleRareNonInheritedData::operator==):
3724         * rendering/style/StyleRareNonInheritedData.h:
3725         * rendering/svg/SVGRenderingContext.cpp:
3726         (WebCore::SVGRenderingContext::prepareToRenderSVGContent): If isolated, paint in a transparency layer.
3727
3728 2014-02-27  Krzysztof Czech  <k.czech@samsung.com>
3729
3730         [ATK] Utilize AtkTableCell to expose directly AccessibilityTableCell to AT
3731         https://bugs.webkit.org/show_bug.cgi?id=129250
3732
3733         Reviewed by Mario Sanchez Prada.
3734
3735         Test: accessibility/table-scope.html
3736
3737         Exposing AtkTableCell to AT. Implementing possibility to get column headers and row headers
3738         as an array of cells.
3739
3740         * GNUmakefile.list.am:
3741         * PlatformEfl.cmake:
3742         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp: Added.
3743         (convertToGPtrArray):
3744         (core):
3745         (webkitAccessibleTableCellGetColumnHeaderCells):
3746         (webkitAccessibleTableCellGetRowHeaderCells):
3747         (webkitAccessibleTableCellInterfaceInit):
3748         * accessibility/atk/WebKitAccessibleInterfaceTableCell.h: Added.
3749         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3750         (getInterfaceMaskFromObject):
3751
3752 2014-02-27  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
3753
3754         Improving containing column block determination
3755         https://bugs.webkit.org/show_bug.cgi?id=125449
3756
3757         Reviewed by Darin Adler.
3758
3759         Making sure that the containing column block of any elements
3760         can not be oneself.
3761
3762         Test: fast/css/crash-on-column-splitting.html
3763
3764         * rendering/RenderBlock.cpp:
3765         (WebCore::RenderBlock::containingColumnsBlock):
3766         (WebCore::RenderBlock::splitFlow):
3767
3768 2014-02-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3769
3770         [GTK] Improve JavaScript multimedia controls
3771         https://bugs.webkit.org/show_bug.cgi?id=129044
3772
3773         Reviewed by Jer Noble.
3774
3775         After webkit.org/b/123097 a follow up was needed to improve
3776         accessibily and some other cosmetic problems, like cleaner CSS and
3777         new missing baselines.
3778
3779         No new tests because of no new functionality.
3780
3781         * Modules/mediacontrols/mediaControlsApple.js:
3782         Added hiding class name.
3783         * Modules/mediacontrols/mediaControlsGtk.js:
3784         (ControllerGtk.prototype.createControls): Set remaining time as
3785         hidden by default and turned volumebox hidden into hiding.
3786         (ControllerGtk.prototype.updateTime): Simplified the hiding and
3787         showing by removing the show class and using hidden only.
3788         (ControllerGtk.prototype.handleMuteButtonMouseOver):
3789         (ControllerGtk.prototype.handleVolumeBoxMouseOut): Turned hidden
3790         into hiding.
3791         (ControllerGtk.prototype.updateReadyState): Changed coding style
3792         and added down class for the panel too.
3793         (ControllerGtk.prototype.updatePlaying): Change for coding style
3794         coherence.
3795         (ControllerGtk.prototype.handleCaptionButtonClicked): Call
3796         handleCaptionButtonShowMenu.
3797         (ControllerGtk.prototype.handleCaptionButtonMouseOver): Call
3798         handleCaptionButtonShowMenu.
3799         (ControllerGtk.prototype.handleCaptionButtonShowMenu): Created
3800         with the former behavior of handleCaptionButtonMouseOver.
3801         * css/mediaControlsGtk.css:
3802         (.hidden): Set display none for all objects with hidden class.
3803         (audio::-webkit-media-controls-panel *:focus):
3804         (audio::-webkit-media-controls-panel.down *:focus): Added gradient
3805         for the active and focus status.
3806         (audio::-webkit-media-controls-time-remaining-display)
3807         (video::-webkit-media-controls-time-remaining-display): Set
3808         display block.
3809         (audio::-webkit-media-controls-volume-slider-container)
3810         (video::-webkit-media-controls-volume-slider-container): Set
3811         display flex.
3812         (video::-webkit-media-controls-volume-slider-container.hiding):
3813         Changed from hidden.
3814         (video::-webkit-media-controls-panel .hiding.down): Changed from
3815         hidden.
3816         * platform/gtk/RenderThemeGtk.cpp:
3817         (WebCore::RenderThemeGtk::paintMediaButton): Returning true to
3818         allow CSS painting the gradient.
3819
3820 2014-02-27  Zan Dobersek  <zdobersek@igalia.com>
3821
3822         Unreviewed. Fixing the GTK build fix after r164757.
3823
3824         * platform/network/NetworkStateNotifier.cpp: r164757 introduced a layering violation by including
3825         the Settings.h header. The use of that class is guarded by PLATFORM(IOS), so the header inclusion
3826         should be guarded as well.
3827
3828 2014-02-26  Ryosuke Niwa  <rniwa@webkit.org>
3829
3830         Extract named items caches in HTMLCollection as a class
3831         https://bugs.webkit.org/show_bug.cgi?id=129365
3832
3833         Reviewed by Antti Koivisto.
3834
3835         Extracted CollectionNamedElementCache, like CollectionIndexCache, out of HTMLCollection.
3836         We can move more named item related functions into this class in the future.
3837
3838         HTMLCollection's member variables m_isNameCacheValid, m_idCache, and m_nameCache were replaced by
3839         a single unique_ptr that holds an instance of CollectionNamedElementCache since this object rarely
3840         exists in most HTMLCollections.
3841
3842         Also removed m_isItemRefElementsCacheValid since it was only used by Microdata API removed in r153772
3843         and renamed a whole bunch of member functions and variables for consistency.
3844
3845         * dom/Document.cpp:
3846         (WebCore::Document::collectionCachedIdNameMap):
3847         (WebCore::Document::collectionWillClearIdNameMap):
3848         * dom/Document.h:
3849         * dom/NodeRareData.h:
3850         (WebCore::NodeListsNodeData::adoptDocument):
3851         * html/HTMLAllCollection.cpp:
3852         (WebCore::HTMLAllCollection::namedItemWithIndex):
3853         * html/HTMLCollection.cpp:
3854         (WebCore::HTMLCollection::HTMLCollection):
3855         (WebCore::HTMLCollection::~HTMLCollection):
3856         (WebCore::HTMLCollection::invalidateCache):
3857         (WebCore::HTMLCollection::invalidateNamedElementCache): Renamed from invalidateIdNameCacheMaps.
3858         (WebCore::HTMLCollection::namedItem):
3859         (WebCore::HTMLCollection::updateNamedElementCache): Renamed from updateNameCache.
3860         (WebCore::HTMLCollection::namedItems):
3861
3862         * html/HTMLCollection.h:
3863         (WebCore::CollectionNamedElementCache::findElementsWithId): Renamed from HTMLCollection::idCache.
3864         (WebCore::CollectionNamedElementCache::findElementsWithName): Renamed from HTMLCollection::nameCache.
3865         (WebCore::CollectionNamedElementCache::appendIdCache): Moved from HTMLCollection.
3866         (WebCore::CollectionNamedElementCache::appendNameCache): Ditto.
3867         (WebCore::CollectionNamedElementCache::find): Ditto.
3868         (WebCore::CollectionNamedElementCache::append): Ditto.
3869
3870         (WebCore::HTMLCollection::invalidateCache):
3871         (WebCore::HTMLCollection::hasNamedElementCache): Renamed from hasIdNameCache.
3872         (WebCore::HTMLCollection::createNameItemCache): Added.
3873         (WebCore::HTMLCollection::namedItemCaches): Added.
3874
3875         * html/HTMLFormControlsCollection.cpp:
3876         (WebCore::HTMLFormControlsCollection::updateNamedElementCache):
3877         * html/HTMLFormControlsCollection.h:
3878
3879 2014-02-26  Ryosuke Niwa  <rniwa@webkit.org>
3880
3881         Indenting an indented image element resulted in an extra indentation
3882         https://bugs.webkit.org/show_bug.cgi?id=129201
3883
3884         Reviewed by Enrica Casucci.
3885
3886         The bug was caused by endOfParagraph returning a position at the beginning of a block when the position
3887         passed into the function was at the beginning of the block. Consider the following DOM:
3888         <blockquote><img></blockquote>
3889
3890         When endOfParagraph is called on (blockquote, 0), the condition r->isBR() || isBlock(n) in endOfParagraph
3891         matches immediately on startNode and it returns (blockquote, 0) again.
3892
3893         This resulted in moveParagraphWithClones invoked by indentIntoBlockquote to erroneously clone the inner
3894         blockquote. Worked around this bug in ApplyBlockElementCommand::formatSelection by checking this specific
3895         condition and moving the position to the end of the block. Unfortunately, a lot of existing code depends
3896         on the current behavior of endOfParagraph so fixing the function itself was not possible.
3897
3898         There was another bug in indentIntoBlockquote to incorrectly insert a new blockquote into the existing
3899         blockquote due to the code introduced in r99594 to avoid inserting before the root editable element.
3900         Since this happens only if outerBlock is the root editable element, which is nodeToSplitTo or an ancestor
3901         of nodeToSplitTo, explicitly look for this condition.
3902
3903         Test: editing/execCommand/indent-img-twice.html
3904
3905         * editing/ApplyBlockElementCommand.cpp:
3906         (WebCore::ApplyBlockElementCommand::formatSelection):
3907         (WebCore::isNewLineAtPosition):
3908         * editing/IndentOutdentCommand.cpp:
3909         (WebCore::IndentOutdentCommand::indentIntoBlockquote):
3910         * editing/VisibleUnits.cpp:
3911         (WebCore::endOfParagraph): Added a FIXME.
3912
3913 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
3914
3915         Fix two assertions/crashes in compositing code
3916         https://bugs.webkit.org/show_bug.cgi?id=129414
3917
3918         Reviewed by Dean Jackson.
3919
3920         Fix two issues introduced in r164759.
3921
3922         * rendering/RenderLayerCompositor.cpp:
3923         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers): Don't call
3924         ourselves recursively!
3925         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): We call this
3926         function unconditionally on layer teardown, so this assertion is bogus.
3927
3928 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
3929
3930         Fix the build with some compiler configurations.
3931
3932         * platform/mac/ScrollAnimatorMac.mm:
3933         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3934         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
3935         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
3936
3937 2014-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
3938
3939         Ranges given to createMarkupInternal might not be canonicalized
3940         https://bugs.webkit.org/show_bug.cgi?id=129408
3941
3942         Reviewed by Ryosuke Niwa.
3943
3944         When WebKit clients (such as Mail) call WKWebArchiveCreateFromRange() with a range,
3945         that range is not necessarily canonicalized. Therefore, comparing it for equality
3946         with a canonicalized range might return a false negative. Instead, we should compare
3947         canonicalized ranges.
3948
3949         No new tests because this codepath will only be reached via SPI.
3950
3951         * editing/markup.cpp:
3952         (WebCore::createMarkupInternal):
3953
3954 2014-02-26  Enrica Casucci  <enrica@apple.com>
3955
3956         [iOS WebKit2] Form controls handling: implement date and time controls.
3957         https://bugs.webkit.org/show_bug.cgi?id=129344
3958
3959         Reviewed by Simon Fraser and Joseph Pecoraro.
3960
3961         Adding one localizable string.
3962
3963         * English.lproj/Localizable.strings:
3964
3965 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
3966
3967         Prepare for overflow scrolling nodes in the scrolling tree
3968         https://bugs.webkit.org/show_bug.cgi?id=129398
3969
3970         Reviewed by Tim Horton.
3971
3972         Lay some groundwork for overflow:scrolling nodes in the scrolling tree.
3973         Change terminology to refer to "scroll-coordinatored" layers now, not just viewport-constrained
3974         layers.
3975         
3976         A given layer can be both viewport-constrained and overflow-scrolling (e.g. position:fixed,
3977         overflow:scroll), so handle that in RenderLayerBacking, and use some "reason" flags
3978         in RenderLayerCompositor.
3979
3980         * page/FrameView.cpp:
3981         (WebCore::FrameView::scrollLayerID): Rename
3982         * page/scrolling/ScrollingStateTree.cpp:
3983         (WebCore::ScrollingStateTree::attachNode): Remove invalid assertion.
3984         * rendering/RenderLayerBacking.cpp:
3985         (WebCore::RenderLayerBacking::RenderLayerBacking):
3986         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3987         (WebCore::RenderLayerBacking::updateScrollingLayers): Simplify the logic with
3988         an early return.
3989         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
3990         Allow a layer to play both viewport-constrained and scrolling roles
3991         in the scrolling tree.
3992         * rendering/RenderLayerBacking.h:
3993         (WebCore::RenderLayerBacking::viewportConstrainedNodeID):
3994         (WebCore::RenderLayerBacking::setViewportConstrainedNodeID):
3995         (WebCore::RenderLayerBacking::scrollingNodeID):
3996         (WebCore::RenderLayerBacking::setScrollingNodeID):
3997         (WebCore::RenderLayerBacking::scrollingNodeIDForChildren):
3998         * rendering/RenderLayerCompositor.cpp:
3999         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
4000         (WebCore::RenderLayerCompositor::didFlushChangesForLayer):
4001         (WebCore::RenderLayerCompositor::updateBacking):
4002         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
4003         (WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged):
4004         (WebCore::RenderLayerCompositor::clearBackingForLayerIncludingDescendants):
4005         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
4006         (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
4007         (WebCore::RenderLayerCompositor::reasonsForCompositing):
4008         (WebCore::RenderLayerCompositor::requiresCompositingForScrolling):
4009         (WebCore::isViewportConstrainedFixedOrStickyLayer):
4010         (WebCore::isMainFrameScrollingOrOverflowScrolling):
4011         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
4012         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
4013         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
4014         (WebCore::nearestScrollCoordinatedAncestor):
4015         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
4016         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
4017         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
4018         (WebCore::RenderLayerCompositor::willRemoveScrollingLayer):
4019         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
4020         * rendering/RenderLayerCompositor.h:
4021
4022 2014-02-26  Andy Estes  <aestes@apple.com>
4023
4024         [iOS] Support network state notification using CPNetworkObserver
4025         https://bugs.webkit.org/show_bug.cgi?id=129358
4026
4027         Reviewed by Dan Bernstein.
4028
4029         Add iOS support for navigator.onLine and online/offline events. Since
4030         it can be expensive to query CPNetworkObserver, wait t