Crash in WebCore::translateIntersectionPointsToSkipInkBoundaries
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-01-02  Myles C. Maxfield  <mmaxfield@apple.com>
2
3         Crash in WebCore::translateIntersectionPointsToSkipInkBoundaries
4         https://bugs.webkit.org/show_bug.cgi?id=126252
5
6         Reviewed by Alexey Proskuryakov.
7
8         lastIntermediate was a iterator pointing into a Vector, which was being re-used
9         even while appending to the Vector. If any of the append operators triggered
10         a realloc, the iterator would point to the old free'ed memory.
11
12         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-crash-many-gaps.html
13
14         * rendering/InlineTextBox.cpp:
15         (WebCore::translateIntersectionPointsToSkipInkBoundaries):
16
17 2014-01-02  Brent Fulgham  <bfulgham@apple.com>
18
19         [WebGL] Correct symbol lookup logic to handle 1-element arrays
20         https://bugs.webkit.org/show_bug.cgi?id=126411
21         <rdar://problem/15394564>
22
23         Reviewed by Dean Jackson.
24
25         * html/canvas/WebGLRenderingContext.cpp:
26         (WebCore::WebGLRenderingContext::getUniformLocation): Revise code to handle the case of single-element
27         arrays.
28
29 2014-01-02  Sam Weinig  <sam@webkit.org>
30
31         Update Promises to the https://github.com/domenic/promises-unwrapping spec
32         https://bugs.webkit.org/show_bug.cgi?id=120954
33
34         Reviewed by Filip Pizlo.
35
36         * ForwardingHeaders/runtime/JSPromiseDeferred.h: Added.
37         * ForwardingHeaders/runtime/JSPromiseResolver.h: Removed.
38         * bindings/js/JSDOMGlobalObjectTask.cpp:
39         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
40         * bindings/js/JSDOMGlobalObjectTask.h:
41         * bindings/js/JSDOMPromise.cpp:
42         (WebCore::DeferredWrapper::DeferredWrapper):
43         (WebCore::DeferredWrapper::promise):
44         (WebCore::DeferredWrapper::resolve):
45         (WebCore::DeferredWrapper::reject):
46         * bindings/js/JSDOMPromise.h:
47         (WebCore::DeferredWrapper::resolve):
48         (WebCore::DeferredWrapper::reject):
49         (WebCore::DeferredWrapper::resolve<String>):
50         (WebCore::DeferredWrapper::resolve<bool>):
51         (WebCore::char>>):
52         (WebCore::DeferredWrapper::reject<String>):
53         * bindings/js/JSDOMWindowBase.cpp:
54         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
55         * bindings/js/JSDOMWindowBase.h:
56         * bindings/js/JSSubtleCryptoCustom.cpp:
57         (WebCore::JSSubtleCrypto::encrypt):
58         (WebCore::JSSubtleCrypto::decrypt):
59         (WebCore::JSSubtleCrypto::sign):
60         (WebCore::JSSubtleCrypto::verify):
61         (WebCore::JSSubtleCrypto::digest):
62         (WebCore::JSSubtleCrypto::generateKey):
63         (WebCore::JSSubtleCrypto::importKey):
64         (WebCore::JSSubtleCrypto::exportKey):
65         (WebCore::JSSubtleCrypto::wrapKey):
66         (WebCore::JSSubtleCrypto::unwrapKey):
67         * bindings/js/JSWorkerGlobalScopeBase.cpp:
68         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
69         * bindings/js/JSWorkerGlobalScopeBase.h:
70
71 2014-01-02  Tim Horton  <timothy_horton@apple.com>
72
73         ImageBufferBackingStoreCache should use DeferrableOneShotTimer
74         https://bugs.webkit.org/show_bug.cgi?id=126155
75
76         Reviewed by Anders Carlsson.
77
78         Since ImageBufferBackingStoreCache's purge timer is pushed out every time
79         a backing store is deallocated, we can easily waste a lot of time rescheduling
80         the timer. Since it's a cache purge timer and doesn't need that kind of precision,
81         adopt DeferrableOneShotTimer, which is much more performant when deferred frequently.
82
83         * platform/graphics/cg/ImageBufferBackingStoreCache.cpp:
84         (WebCore::ImageBufferBackingStoreCache::ImageBufferBackingStoreCache):
85         (WebCore::ImageBufferBackingStoreCache::timerFired):
86         (WebCore::ImageBufferBackingStoreCache::schedulePurgeTimer):
87         * platform/graphics/cg/ImageBufferBackingStoreCache.h:
88
89 2014-01-02  Myles C. Maxfield  <mmaxfield@apple.com>
90
91         Allow ImageBuffer to re-use IOSurfaces
92         https://bugs.webkit.org/show_bug.cgi?id=125477
93
94         Reviewed by Geoff Garen. Modifications reviewed by Tim Horton.
95
96         This patch is taken from r160945, but the modifications to ImageBufferCG.cpp
97         have been reverted.
98
99         This test adds a static class, ImageBufferBackingStoreCache, that vends 
100         IOSurfaces. It remembers IOSurfaces that have been returned to it until 
101         a configurable timeout. 
102
103         The storage used by this class is in the form of a HashMap from a 
104         bucketed size to the IOSurface. There are many other data structures 
105         that could be used, but this implementation gives a 80% hit rate on 
106         normal browsing of some example sites with Canvas and 
107         text-decoration-skip: ink. Because the buckets are fairly 
108         small (rounding the width and height up to multiples of 8), traversing the 
109         bucket contents takes on average 2 steps.  
110
111         Test: fast/canvas/canvas-backing-store-reuse.html 
112
113         * WebCore.xcodeproj/project.pbxproj: Added new caching class 
114         * platform/graphics/cg/ImageBufferBackingStoreCache.cpp: Added. 
115         (WebCore::createIOSurface): Copied from ImageBufferCG.cpp 
116         (WebCore::ImageBufferBackingStoreCache::timerFired): Forget the cache 
117         contents 
118         (WebCore::ImageBufferBackingStoreCache::schedulePurgeTimer): 
119         (WebCore::ImageBufferBackingStoreCache::get): Static getter 
120         (WebCore::ImageBufferBackingStoreCache::ImageBufferBackingStoreCache): 
121         (WebCore::ImageBufferBackingStoreCache::insertIntoCache): Memory-management 
122         creation function 
123         (WebCore::ImageBufferBackingStoreCache::takeFromCache): Memory-management 
124         deletion function 
125         (WebCore::ImageBufferBackingStoreCache::isAcceptableSurface): Does this cached 
126         IOSurface fit the bill? 
127         (WebCore::ImageBufferBackingStoreCache::tryTakeFromCache): Lookup 
128         a bucket and walk through its contents 
129         (WebCore::ImageBufferBackingStoreCache::getOrAllocate): Public function 
130         for clients who want a IOSurface from the cache 
131         (WebCore::ImageBufferBackingStoreCache::deallocate): Public 
132         function for clients to return an IOSurface to the pool 
133         * platform/graphics/cg/ImageBufferBackingStoreCache.h: Added. 
134         (WebCore::ImageBuffer::ImageBuffer): 
135         (WebCore::ImageBuffer::~ImageBuffer): 
136
137 2014-01-02  Piotr Grad  <p.grad@samsung.com>
138
139         Video-seek-with-negative-playback was flaky.
140         https://bugs.webkit.org/show_bug.cgi?id=126379
141
142         Reviewed by Eric Carlson.
143
144         No new tests. Covered by existing tests.
145
146         m_player->setRate() should be called before updating m_playbackRate, because potentiallyPlaying() depends
147         on endedPlayback(), which checks m_playbackRate.
148
149         * html/HTMLMediaElement.cpp:
150         (WebCore::HTMLMediaElement::setPlaybackRate):
151
152 2014-01-02  Daniel Bates  <dabates@apple.com>
153
154         [iOS] Tapping any link crashes in WebCore::EventHandler::mouseMoved()
155         (also crashes when scrolling certain sites)
156         https://bugs.webkit.org/show_bug.cgi?id=126401
157         <rdar://problem/15739334>
158
159         Reviewed by Tim Horton.
160
161         * page/ios/EventHandlerIOS.mm:
162         (WebCore::currentEventSlot): Make the shared variable have static-storage duration.
163
164 2014-01-02  Gavin Barraclough  <barraclough@apple.com>
165
166         Remove WindowIsVisible
167         https://bugs.webkit.org/show_bug.cgi?id=126270
168
169         Reviewed by Tim Horton.
170
171         We currently track visibility in two ways - ViewState::IsVisible and ViewState::WindowIsVisible.
172         The latter detects that the content is hidden in fewer cases than the former, and as such, the
173         former is always preferable.
174
175         This affects the hidden state provided to FocusController::contentAreaDidShowOrHide and to
176         Plugin::windowVisibilityChanged.
177
178         * WebCore.exp.in:
179         * page/FocusController.cpp:
180         (WebCore::FocusController::FocusController):
181         (WebCore::FocusController::setContentIsVisible):
182         * page/FocusController.h:
183             - rename ContainingWindowIsVisible -> ContentIsVisible.
184
185 2014-01-02  Gavin Barraclough  <barraclough@apple.com>
186
187         Merge didMoveOnscreen / page visibility to isVisible
188         https://bugs.webkit.org/show_bug.cgi?id=126268
189
190         Reviewed by Tim Horton.
191
192         The onscreen state most closely tracks view visibility (though currently
193         also tracks a mix of in-window state). Make more consistent, simplify,
194         and move all animation suspension logic to Page, so it can be controlled
195         by the PageThrottler.
196
197         * WebCore.exp.in:
198         * page/EventHandler.cpp:
199         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
200         * page/FrameView.cpp:
201         (WebCore::FrameView::shouldSetCursor):
202         * page/Page.cpp:
203         (WebCore::Page::Page):
204             - initialize new variables.
205         (WebCore::Page::setIsVisible):
206             - merge setVisibilityState, didMoveOnscreen, willMoveOffscreen.
207         (WebCore::Page::setIsPrerender):
208             - switches visibility state from hidden to prerender.
209         (WebCore::Page::visibilityState):
210             - computed from m_isVisible, m_isPrerender.
211         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
212             - m_visibilityState -> m_isVisible.
213         * page/Page.h:
214             - remove didMoveOnscreen/willMoveOffscreen
215               m_isOnscreen & m_visibilityState -> m_isVisible & m_isPrerender
216               setVisibilityState -> setIsVisible & setIsPrerender.
217         (WebCore::Page::isVisible):
218             - isOnscreen -> isVisible.
219
220 2014-01-02  Oliver Hunt  <oliver@apple.com>
221
222         Update bindings test results
223
224         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
225         (WebCore::jsTestActiveDOMObjectConstructor):
226         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
227         (WebCore::jsTestCustomNamedGetterConstructor):
228         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
229         (WebCore::jsTestEventConstructorConstructor):
230         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
231         (WebCore::jsTestEventTargetConstructor):
232         * bindings/scripts/test/JS/JSTestException.cpp:
233         (WebCore::jsTestExceptionConstructor):
234         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
235         (WebCore::jsTestGenerateIsReachableConstructor):
236         * bindings/scripts/test/JS/JSTestInterface.cpp:
237         (WebCore::jsTestInterfaceConstructor):
238         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
239         (WebCore::jsTestMediaQueryListListenerConstructor):
240         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
241         (WebCore::jsTestNamedConstructorConstructor):
242         * bindings/scripts/test/JS/JSTestNode.cpp:
243         (WebCore::jsTestNodeConstructor):
244         * bindings/scripts/test/JS/JSTestObj.cpp:
245         (WebCore::jsTestObjConstructor):
246         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
247         (WebCore::jsTestOverloadedConstructorsConstructor):
248         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
249         (WebCore::jsTestSerializedScriptValueInterfaceConstructor):
250         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
251         (WebCore::jsTestTypedefsConstructor):
252         * bindings/scripts/test/JS/JSattribute.cpp:
253         (WebCore::jsattributeConstructor):
254         * bindings/scripts/test/JS/JSreadonly.cpp:
255         (WebCore::jsreadonlyConstructor):
256
257 2013-12-23  Oliver Hunt  <oliver@apple.com>
258
259         Refactor PutPropertySlot to be aware of custom properties
260         https://bugs.webkit.org/show_bug.cgi?id=126187
261
262         Reviewed by Antti Koivisto.
263
264         Update the bindings code generation and custom objects
265         to the new function signatures
266
267         * bindings/js/JSDOMWindowCustom.cpp:
268         (WebCore::JSDOMWindow::put):
269         * bindings/objc/WebScriptObject.mm:
270         (-[WebScriptObject setValue:forKey:]):
271         * bindings/scripts/CodeGeneratorJS.pm:
272         (GenerateImplementation):
273         * bindings/scripts/test/JS/JSTestInterface.cpp:
274         (WebCore::JSTestInterface::putByIndex):
275         * bridge/NP_jsobject.cpp:
276         (_NPN_SetProperty):
277
278 2014-01-02  Simon Fraser  <simon.fraser@apple.com>
279
280         Add AsyncScrollingCoordinator, which is a base class for threaded and future remote ScrollingCoordinators
281         https://bugs.webkit.org/show_bug.cgi?id=126389
282
283         Reviewed by Tim Horton.
284
285         Add AsyncScrollingCoordinator, a ScrollingCoordinator that knows about ScrollingStateTrees
286         and ScrollingTrees, but leaves it up to subclasses to decide when and how to commit.
287
288         * WebCore.xcodeproj/project.pbxproj: Added AsyncScrollingCoordinator.*
289         * page/scrolling/AsyncScrollingCoordinator.cpp: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm.
290         (WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator):
291         (WebCore::AsyncScrollingCoordinator::~AsyncScrollingCoordinator):
292         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
293         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
294         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
295         (WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
296         (WebCore::AsyncScrollingCoordinator::attachToStateTree):
297         (WebCore::AsyncScrollingCoordinator::detachFromStateTree):
298         (WebCore::AsyncScrollingCoordinator::clearStateTree):
299         (WebCore::AsyncScrollingCoordinator::syncChildPositions):
300         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
301         (WebCore::AsyncScrollingCoordinator::updateScrollingNode):
302         (WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode):
303         (WebCore::AsyncScrollingCoordinator::setScrollLayerForNode):
304         (WebCore::AsyncScrollingCoordinator::setCounterScrollingLayerForNode):
305         (WebCore::AsyncScrollingCoordinator::setHeaderLayerForNode):
306         (WebCore::AsyncScrollingCoordinator::setFooterLayerForNode):
307         (WebCore::AsyncScrollingCoordinator::setNonFastScrollableRegionForNode):
308         (WebCore::AsyncScrollingCoordinator::setWheelEventHandlerCountForNode):
309         (WebCore::AsyncScrollingCoordinator::setScrollBehaviorForFixedElementsForNode):
310         (WebCore::AsyncScrollingCoordinator::setScrollbarPaintersFromScrollbarsForNode):
311         (WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):
312         (WebCore::AsyncScrollingCoordinator::updateMainFrameScrollLayerPosition):
313         (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
314         (WebCore::AsyncScrollingCoordinator::isRubberBandInProgress):
315         (WebCore::AsyncScrollingCoordinator::setScrollPinningBehavior):
316         (WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText):
317         * page/scrolling/AsyncScrollingCoordinator.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h.
318         (WebCore::AsyncScrollingCoordinator::scrollingTree):
319         (WebCore::AsyncScrollingCoordinator::setScrollingTree):
320         (WebCore::AsyncScrollingCoordinator::scrollingStateTree):
321         (WebCore::AsyncScrollingCoordinator::releaseScrollingTree):
322         * page/scrolling/ScrollingCoordinator.h: Add casting support.
323         (WebCore::ScrollingCoordinator::isAsyncScrollingCoordinator):
324         * page/scrolling/ThreadedScrollingTree.h: commitNewTreeState() needs to be public.
325         * page/scrolling/mac/ScrollingCoordinatorMac.h:
326         * page/scrolling/mac/ScrollingCoordinatorMac.mm: Lots of code moved to AsyncScrollingCoordinator.
327         (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
328         (WebCore::ScrollingCoordinatorMac::~ScrollingCoordinatorMac):
329         (WebCore::ScrollingCoordinatorMac::pageDestroyed):
330         (WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):
331         (WebCore::ScrollingCoordinatorMac::handleWheelEvent):
332         (WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):
333         (WebCore::ScrollingCoordinatorMac::commitTreeState):
334         (WebCore::ScrollingCoordinatorMac::updateTiledScrollingIndicator):
335
336 2014-01-02  Andreas Kling  <akling@apple.com>
337
338         Simplify the insides of DocumentSharedObjectPool and reduce memory usage.
339
340         Merging Blink r164152 by Elliott Sprehn.
341
342         Instead of storing an OwnPtr to an object that has a pointer to the
343         ShareableElementData as well as a pointer into the ShareableElementData
344         and the length we can just store a RefPtr to the SharableElementData.
345
346         This also reduces the memory usage of the pool by 2 pointers per entry.
347
348         * dom/DocumentSharedObjectPool.h:
349         * dom/DocumentSharedObjectPool.cpp:
350         (WebCore::attributeHash):
351         (WebCore::hasSameAttributes):
352         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
353
354 2014-01-02  Dirk Schulze  <krit@webkit.org>
355
356         Support <box> values computed style for 'clip-path' property
357         https://bugs.webkit.org/show_bug.cgi?id=126148
358
359         Reviewed by Simon Fraser.
360
361         Calculate computed style for 'clip-path' property.
362
363         Updated tests to check for computed style.
364
365         * css/BasicShapeFunctions.cpp: Add box value bounding-box.
366         (WebCore::valueForBox):
367         (WebCore::boxForValue):
368         * css/CSSComputedStyleDeclaration.cpp: Return the computed style
369             for 'clip-path'.
370         (WebCore::ComputedStyleExtractor::propertyValue):
371         * css/DeprecatedStyleBuilder.cpp: Create CSSValueLists for 'clip-th'.
372         (WebCore::ApplyPropertyClipPath::applyValue):
373         * rendering/ClipPathOperation.h: Add bounding-box value.
374         (WebCore::ShapeClipPathOperation::pathForReferenceRect):
375         (WebCore::ShapeClipPathOperation::setReferenceBox):
376         (WebCore::ShapeClipPathOperation::referenceBox):
377         (WebCore::BoxClipPathOperation::create):
378         (WebCore::BoxClipPathOperation::pathForReferenceRect):
379         (WebCore::BoxClipPathOperation::referenceBox):
380         (WebCore::BoxClipPathOperation::BoxClipPathOperation):
381         * rendering/shapes/ShapeInfo.h: Add bounding-box value.
382         (WebCore::ShapeInfo::setShapeSize):
383         (WebCore::ShapeInfo::logicalTopOffset):
384         (WebCore::ShapeInfo::logicalLeftOffset):
385         * rendering/style/BasicShapes.cpp: Add bounding-box value.
386         (WebCore::BasicShape::referenceBoxSize):
387         * rendering/style/BasicShapes.h:
388
389 2014-01-02  Antti Koivisto  <antti@apple.com>
390
391         Always resolve style from root
392         https://bugs.webkit.org/show_bug.cgi?id=126380
393
394         Reviewed by Andreas Kling.
395         
396         Forced style resolve that does not start from the root is never really correct. 
397         Remove the few remaining instances.
398
399         * dom/ShadowRoot.cpp:
400         (WebCore::ShadowRoot::setResetStyleInheritance):
401         
402             Update style asynchronously.
403
404         * dom/ShadowRoot.h:
405         * dom/Text.h:
406         * html/HTMLPlugInImageElement.cpp:
407         (WebCore::HTMLPlugInImageElement::createElementRenderer):
408         (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
409         (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
410         
411             Delete the render tree synchronously on suspend and rebuild it asynchronously on resume.
412             No need for m_customStyleForPageCache hack.
413
414         * html/HTMLPlugInImageElement.h:
415         
416             Remove m_customStyleForPageCache.
417
418         * style/StyleResolveTree.cpp:
419         * style/StyleResolveTree.h:
420         
421             Remove Element version of resolveTree from the interface.
422
423         * svg/SVGUseElement.h:
424
425 2014-01-02  Antti Koivisto  <antti@apple.com>
426
427         Remove PlaceholderDocument
428         https://bugs.webkit.org/show_bug.cgi?id=126382
429
430         Reviewed by Andreas Kling.
431
432         Remove PlaceholderDocument class and replace it with a bit in Document.
433
434         * WebCore.xcodeproj/project.pbxproj:
435         * dom/Document.cpp:
436         (WebCore::Document::Document):
437         (WebCore::Document::createRenderTree):
438         * dom/Document.h:
439         
440             Also make Synthesized a construction flag instead of a boolean parameter.
441
442         (WebCore::Document::createNonRenderedPlaceholder):
443         * html/HTMLDocument.cpp:
444         (WebCore::HTMLDocument::HTMLDocument):
445         * html/HTMLDocument.h:
446         (WebCore::HTMLDocument::create):
447         (WebCore::HTMLDocument::createSynthesizedDocument):
448         * loader/DocumentWriter.cpp:
449         (WebCore::DocumentWriter::createDocument):
450         * loader/PlaceholderDocument.cpp: Removed.
451         * loader/PlaceholderDocument.h: Removed.
452         * pdf/ios/PDFDocument.h:
453         (WebCore::PDFDocument::PDFDocument):
454
455 2014-01-01  Antti Koivisto  <antti@apple.com>
456
457         Remove public attachRenderTree
458         https://bugs.webkit.org/show_bug.cgi?id=126368
459
460         Reviewed by Andreas Kling.
461
462         Remove the remaining explicit render tree construction.
463
464         * dom/Document.cpp:
465         (WebCore::Document::createRenderTree):
466         
467            Use recalcStyle() instead of calling attachRenderTree directly.
468
469         * html/HTMLViewSourceDocument.cpp:
470         (WebCore::HTMLViewSourceDocument::addText):
471         
472             Remove forgotten attachTextRenderer.
473
474         * html/shadow/InsertionPoint.cpp:
475         (WebCore::InsertionPoint::InsertionPoint):
476         
477             Remove willAttachRenderers/didAttachRenderers hack.
478
479         * html/shadow/InsertionPoint.h:
480         (WebCore::toInsertionPoint):
481         * loader/PlaceholderDocument.cpp:
482         (WebCore::PlaceholderDocument::createRenderTree):
483         
484             Seriously, nothing to do here.
485
486         * style/StyleResolveTree.cpp:
487         (WebCore::Style::attachDistributedChildren):
488         (WebCore::Style::attachChildren):
489         (WebCore::Style::detachDistributedChildren):
490         (WebCore::Style::detachChildren):
491         
492             Making attaching and detaching distributed insertion point children part of ResolveTree internals.
493
494         * style/StyleResolveTree.h:
495         
496             Remove interfaces with no clients.
497
498 2014-01-01  Seokju Kwon  <seokju@webkit.org>
499
500         Remove stale ScriptProfiler methods
501         https://bugs.webkit.org/show_bug.cgi?id=126373
502
503         Reviewed by Darin Adler.
504
505         No new tests, No change behavior. 
506
507         * bindings/js/ScriptProfiler.h: Remove dead code.
508
509 2014-01-01  Andreas Kling  <akling@apple.com>
510
511         Remove ChromeClient::fullScreenRendererChanged().
512         <https://webkit.org/b/126370>
513
514         This hook was added in r75277 to notify WebFullScreenController when
515         the full screen renderer changed. In r110216 the code was refactored,
516         making this notification unnecessary.
517
518         Reviewed by Antti Koivisto.
519
520 2014-01-01  Simon Fraser  <simon.fraser@apple.com>
521
522         Fix the build by exposing some more scrolling state node headers
523         as Private in WebCore.framework.
524
525         * WebCore.xcodeproj/project.pbxproj:
526
527 2014-01-01  Ryuan Choi  <ryuan.choi@samsung.com>
528
529         [EFL] Unreviewed build fix after r160903 when ACCESSIBILITY is disabled
530
531         * accessibility/AccessibilityObject.h:
532         (WebCore::AccessibilityObject::children):
533
534 2014-01-01  Andreas Kling  <akling@apple.com>
535
536         RenderScrollbar: Map of scrollbar parts should use RenderPtr.
537         <https://webkit.org/b/126367>
538
539         Turn RenderScrollbar::m_parts into HashMap of RenderPtrs. This makes
540         renderer destruction automatic and lets us remove some code.
541
542         Reviewed by Antti Koivisto.
543
544         * rendering/RenderPtr.h:
545
546             Add HashTraits for RenderPtr so we can use them as values in
547             WTF hash tables.
548
549         * rendering/RenderScrollbar.h:
550         * rendering/RenderScrollbar.cpp:
551         (WebCore::RenderScrollbar::~RenderScrollbar):
552         (WebCore::RenderScrollbar::setParent):
553         (WebCore::RenderScrollbar::updateScrollbarParts):
554         (WebCore::RenderScrollbar::updateScrollbarPart):
555
556             Remove now-unneeded kludges of logic to manually delete scrollbar
557             part renderers in various scenarios.
558
559 2014-01-01  Antti Koivisto  <antti@apple.com>
560
561         Remove reattachRenderTree
562         https://bugs.webkit.org/show_bug.cgi?id=126366
563
564         Reviewed by Andreas Kling.
565
566         Remove the last remaining client.
567
568         * html/HTMLSelectElement.cpp:
569         (WebCore::HTMLSelectElement::parseAttribute):
570         
571             Reconstruct render tree asynchronously.
572
573         (WebCore::HTMLSelectElement::scrollToSelection):
574         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
575         (WebCore::HTMLSelectElement::selectOption):
576         
577             It is not safe to cast the renderer based on usesMenuList test. Switch to RenderObject::isMenuList test.
578
579         (WebCore::HTMLSelectElement::parseMultipleAttribute):
580         
581             Reconstruct render tree asynchronously.
582
583         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
584         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
585         (WebCore::HTMLSelectElement::defaultEventHandler):
586         * style/StyleResolveTree.cpp:
587         * style/StyleResolveTree.h:
588         
589             Remove the function.
590
591 2014-01-01  Simon Fraser  <simon.fraser@apple.com>
592
593         Create a ThreadedScrollingTree subclass of ScrollingTree, and push all knowledge of the scrolling thread into it
594         https://bugs.webkit.org/show_bug.cgi?id=126362
595
596         Reviewed by Sam Weinig.
597
598         Eventually we'll have a ScrollingTree in situations where there is no scrolling
599         thread, so make the ScrollingTree base class thread-agnostic (but threadsafe),
600         and subclass it in ThreadedScrollingTree for scrolling-thread-specific functionality.
601         
602         The ScrollingTree base class also no longer needs to know about the
603         ScrollingCoordinator.
604
605         ScrollingCoordinatorMac creates a ThreadedScrollingTree.
606
607         * WebCore.exp.in:
608         * WebCore.xcodeproj/project.pbxproj: Add ThreadedScrollingTree.*
609         Make some headers Private that we'll need in WebKit2 soon.
610         * page/scrolling/ScrollingStateTree.h: Drive-by cleanup: clone() was unimplemented.
611         * page/scrolling/ScrollingTree.cpp:
612         (WebCore::ScrollingTree::ScrollingTree):
613         (WebCore::ScrollingTree::~ScrollingTree):
614         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Wrap up some logic that
615         involves taking the mutex, so ThreadedScrollingTree can conveniently call it.
616         (WebCore::ScrollingTree::handleWheelEvent):
617         (WebCore::ScrollingTree::commitNewTreeState):
618         (WebCore::ScrollingTree::setMainFrameScrollPosition):
619         (WebCore::ScrollingTree::isHandlingProgrammaticScroll):
620         * page/scrolling/ScrollingTree.h:
621         (WebCore::ScrollingTree::isThreadedScrollingTree):
622         (WebCore::ScrollingTree::invalidate):
623         * page/scrolling/ThreadedScrollingTree.cpp: Added.
624         (WebCore::ThreadedScrollingTree::create):
625         (WebCore::ThreadedScrollingTree::ThreadedScrollingTree):
626         (WebCore::ThreadedScrollingTree::~ThreadedScrollingTree):
627         (WebCore::ThreadedScrollingTree::tryToHandleWheelEvent):
628         (WebCore::ThreadedScrollingTree::handleWheelEvent):
629         (WebCore::derefScrollingCoordinator):
630         (WebCore::ThreadedScrollingTree::invalidate):
631         (WebCore::ThreadedScrollingTree::commitNewTreeState):
632         (WebCore::ThreadedScrollingTree::updateMainFrameScrollPosition):
633         (WebCore::ThreadedScrollingTree::handleWheelEventPhase):
634         * page/scrolling/ThreadedScrollingTree.h: Added.
635         (WebCore::ThreadedScrollingTree::isThreadedScrollingTree):
636         * page/scrolling/mac/ScrollingCoordinatorMac.h:
637         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
638         (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
639         (WebCore::ScrollingCoordinatorMac::handleWheelEvent):
640
641 2014-01-01  Andreas Kling  <akling@apple.com>
642
643         FrameView: Store scroll corner renderer in a RenderPtr.
644         <https://webkit.org/b/126364>
645
646         Make FrameView::m_scrollCorner a RenderPtr<RenderScrollbarPart> and
647         remove two manual destroy() calls.
648
649         Reviewed by Antti Koivisto.
650
651 2014-01-01  Antti Koivisto  <antti@apple.com>
652
653         Remove elementChildren/elementDescendants shorthands
654         https://bugs.webkit.org/show_bug.cgi?id=126363
655
656         Reviewed by Anders Carlsson.
657
658         Just use childrenOfType<Element>/descendantsOfType<Element> instead. They are not that much longer
659         and consistency is valuable.
660
661         * accessibility/AccessibilityNodeObject.cpp:
662         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
663         (WebCore::siblingWithAriaRole):
664         * accessibility/AccessibilityTable.cpp:
665         (WebCore::AccessibilityTable::isDataTable):
666         * css/StyleInvalidationAnalysis.cpp:
667         (WebCore::StyleInvalidationAnalysis::invalidateStyle):
668         * dom/ChildNodeList.cpp:
669         (WebCore::ChildNodeList::namedItem):
670         * dom/Document.cpp:
671         (WebCore::Document::buildAccessKeyMap):
672         (WebCore::Document::childrenChanged):
673         * dom/Element.cpp:
674         (WebCore::Element::resetComputedStyle):
675         * dom/ElementChildIterator.h:
676         * dom/ElementDescendantIterator.h:
677         * dom/SelectorQuery.cpp:
678         (WebCore::elementsForLocalName):
679         (WebCore::anyElement):
680         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
681         (WebCore::SelectorDataList::executeSingleClassNameSelectorData):
682         (WebCore::SelectorDataList::executeSingleSelectorData):
683         (WebCore::SelectorDataList::executeSingleMultiSelectorData):
684         * editing/ApplyStyleCommand.cpp:
685         (WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
686         * editing/ReplaceSelectionCommand.cpp:
687         (WebCore::removeHeadContents):
688         * editing/markup.cpp:
689         (WebCore::completeURLs):
690         * html/HTMLFieldSetElement.cpp:
691         (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
692         * html/HTMLObjectElement.cpp:
693         (WebCore::HTMLObjectElement::containsJavaApplet):
694         * loader/PlaceholderDocument.cpp:
695         (WebCore::PlaceholderDocument::createRenderTree):
696         * rendering/RenderChildIterator.h:
697         * svg/SVGSVGElement.cpp:
698         (WebCore::SVGSVGElement::getElementById):
699         * svg/SVGUseElement.cpp:
700         (WebCore::subtreeContainsDisallowedElement):
701         (WebCore::removeDisallowedElementsFromSubtree):
702
703 2014-01-01  Antti Koivisto  <antti@apple.com>
704
705         Do less synchronous render tree construction
706         https://bugs.webkit.org/show_bug.cgi?id=126359
707
708         Reviewed by Anders Carlsson.
709
710         Remove some now-unnecessary attachRenderTree calls.
711
712         * html/HTMLDetailsElement.cpp:
713         (WebCore::HTMLDetailsElement::parseAttribute):
714         * html/HTMLInputElement.cpp:
715         (WebCore::HTMLInputElement::parseAttribute):
716         * html/HTMLObjectElement.cpp:
717         (WebCore::HTMLObjectElement::renderFallbackContent):
718         * html/HTMLPlugInElement.cpp:
719         (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot):
720         * html/HTMLPlugInImageElement.cpp:
721         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
722         (WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree):
723         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
724         * html/HTMLViewSourceDocument.cpp:
725         (WebCore::HTMLViewSourceDocument::createContainingTable):
726         (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
727         (WebCore::HTMLViewSourceDocument::addLine):
728         (WebCore::HTMLViewSourceDocument::finishLine):
729         (WebCore::HTMLViewSourceDocument::addBase):
730         (WebCore::HTMLViewSourceDocument::addLink):
731         * xml/XMLErrors.cpp:
732         (WebCore::XMLErrors::insertErrorMessageBlock):
733
734 2014-01-01  Simon Fraser  <simon.fraser@apple.com>
735
736         Updating the scrolling tree should use references to state nodes
737         https://bugs.webkit.org/show_bug.cgi?id=126360
738
739         Reviewed by Anders Carlsson.
740
741         Change functions related to ScrollingTreeNode updating to take
742         const references to state nodes rather than pointers.
743
744         * page/scrolling/ScrollingStateNode.h:
745         (WebCore::ScrollingStateNode::hasChangedProperty):
746         * page/scrolling/ScrollingTree.cpp:
747         (WebCore::ScrollingTree::commitNewTreeState):
748         (WebCore::ScrollingTree::updateTreeFromStateNode): The node can be nil so
749         this continues to take a pointer.
750         (WebCore::ScrollingTree::removeDestroyedNodes):
751         * page/scrolling/ScrollingTree.h:
752         * page/scrolling/ScrollingTreeNode.h:
753         (WebCore::ScrollingTreeNode::updateAfterChildren):
754         * page/scrolling/ScrollingTreeScrollingNode.cpp:
755         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
756         * page/scrolling/ScrollingTreeScrollingNode.h:
757         * page/scrolling/mac/ScrollingTreeFixedNode.h:
758         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
759         (WebCore::ScrollingTreeFixedNode::updateBeforeChildren):
760         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
761         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
762         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
763         (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren):
764         * page/scrolling/mac/ScrollingTreeStickyNode.h:
765         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
766         (WebCore::ScrollingTreeStickyNode::updateBeforeChildren):
767
768 2014-01-01  Simon Fraser  <simon.fraser@apple.com>
769
770         Add a typedef for PlatformLayerID on GraphicsLayer, and migrate RemoteLayerTreeTransaction to use it
771         https://bugs.webkit.org/show_bug.cgi?id=126346
772
773         Reviewed by Tim Horton.
774
775         Remote scrolling tree code is soon going to use RemoteLayerTreeTransaction::LayerID,
776         so it makes more sense to put this layerID type on GraphicsLayer as
777         GraphicsLayer::PlatformLayerID.
778         
779         Also add some type cast macros for PlatformCALayer and subclasses, and use them
780         where appropriate.
781
782         * platform/graphics/GraphicsLayer.h:
783         * platform/graphics/ca/GraphicsLayerCA.cpp:
784         (WebCore::GraphicsLayerCA::setName):
785         * platform/graphics/ca/PlatformCALayer.h:
786         (WebCore::PlatformCALayer::isPlatformCALayerMac):
787         (WebCore::PlatformCALayer::isPlatformCALayerRemote):
788         (WebCore::PlatformCALayer::PlatformCALayer):
789         * platform/graphics/ca/mac/PlatformCALayerMac.h:
790
791 2013-12-31  Simon Fraser  <simon.fraser@apple.com>
792
793         ScrollingStateNodes should have a reference to the ScrollingStateTree
794         https://bugs.webkit.org/show_bug.cgi?id=126348
795
796         Reviewed by Sam Weinig.
797
798         Make ScrollingStateNodes always belong to a ScrollingStateTree, and thus
799         have a reference to the tree rather than a pointer. When cloning nodes,
800         they are adopted by a new ScrollingStateTree, which adds them to its
801         node map (which didn't happen before).
802         
803         In subclasses access the ScrollingStateTree through a member function.
804
805         * page/scrolling/ScrollingStateFixedNode.cpp:
806         (WebCore::ScrollingStateFixedNode::create):
807         (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode):
808         (WebCore::ScrollingStateFixedNode::clone):
809         (WebCore::ScrollingStateFixedNode::updateConstraints):
810         * page/scrolling/ScrollingStateFixedNode.h:
811         * page/scrolling/ScrollingStateNode.cpp:
812         (WebCore::ScrollingStateNode::ScrollingStateNode):
813         (WebCore::ScrollingStateNode::cloneAndReset):
814         (WebCore::ScrollingStateNode::cloneAndResetChildren):
815         (WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
816         * page/scrolling/ScrollingStateNode.h:
817         (WebCore::ScrollingStateNode::scrollingStateTree):
818         * page/scrolling/ScrollingStateScrollingNode.cpp:
819         (WebCore::ScrollingStateScrollingNode::create):
820         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
821         (WebCore::ScrollingStateScrollingNode::clone):
822         (WebCore::ScrollingStateScrollingNode::setViewportRect):
823         (WebCore::ScrollingStateScrollingNode::setTotalContentsSize):
824         (WebCore::ScrollingStateScrollingNode::setScrollOrigin):
825         (WebCore::ScrollingStateScrollingNode::setScrollableAreaParameters):
826         (WebCore::ScrollingStateScrollingNode::setFrameScaleFactor):
827         (WebCore::ScrollingStateScrollingNode::setNonFastScrollableRegion):
828         (WebCore::ScrollingStateScrollingNode::setWheelEventHandlerCount):
829         (WebCore::ScrollingStateScrollingNode::setSynchronousScrollingReasons):
830         (WebCore::ScrollingStateScrollingNode::setScrollBehaviorForFixedElements):
831         (WebCore::ScrollingStateScrollingNode::setRequestedScrollPosition):
832         (WebCore::ScrollingStateScrollingNode::setHeaderHeight):
833         (WebCore::ScrollingStateScrollingNode::setFooterHeight):
834         * page/scrolling/ScrollingStateScrollingNode.h:
835         * page/scrolling/ScrollingStateStickyNode.cpp:
836         (WebCore::ScrollingStateStickyNode::create):
837         (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
838         (WebCore::ScrollingStateStickyNode::clone):
839         (WebCore::ScrollingStateStickyNode::updateConstraints):
840         * page/scrolling/ScrollingStateStickyNode.h:
841         * page/scrolling/ScrollingStateTree.cpp:
842         (WebCore::ScrollingStateTree::attachNode):
843         (WebCore::ScrollingStateTree::commit):
844         (WebCore::ScrollingStateTree::addNode):
845         * page/scrolling/ScrollingStateTree.h:
846         * page/scrolling/mac/ScrollingStateNodeMac.mm:
847         (WebCore::ScrollingStateNode::setScrollLayer):
848         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
849         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer):
850         (WebCore::ScrollingStateScrollingNode::setHeaderLayer):
851         (WebCore::ScrollingStateScrollingNode::setFooterLayer):
852         (WebCore::ScrollingStateScrollingNode::setScrollbarPaintersFromScrollbars):
853
854 2013-12-31  Simon Fraser  <simon.fraser@apple.com>
855
856         Give ScrollingStateNodes a nodeType()
857         https://bugs.webkit.org/show_bug.cgi?id=126347
858
859         Reviewed by Tim Horton.
860
861         When we start serializing ScrollingStateNodes to send to the UI process,
862         it's more convenient if they have a nodeType member rather than virtual functions,
863         so give them one, and fix the casting macros to use it. This allows us to use
864         a switch() on node creation, so the compiler will tell us if we forgot to create
865         a node type.
866
867         * page/scrolling/ScrollingStateFixedNode.cpp:
868         (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode):
869         * page/scrolling/ScrollingStateFixedNode.h:
870         * page/scrolling/ScrollingStateNode.cpp:
871         (WebCore::ScrollingStateNode::ScrollingStateNode):
872         * page/scrolling/ScrollingStateNode.h: const ScrollingNodeType field
873         (can't be modified after construction), and move the m_scrollingStateTree
874         member after it (the awkward protected:/private: will be cleaned up in a later patch).
875         (WebCore::ScrollingStateNode::nodeType):
876         * page/scrolling/ScrollingStateScrollingNode.cpp:
877         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
878         * page/scrolling/ScrollingStateScrollingNode.h:
879         * page/scrolling/ScrollingStateStickyNode.cpp:
880         (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
881         * page/scrolling/ScrollingStateStickyNode.h:
882         * page/scrolling/ScrollingTree.cpp:
883         (WebCore::ScrollingTree::updateTreeFromStateNode):
884
885 2013-12-31  Andreas Kling  <akling@apple.com>
886
887         Out-of-line RenderStyle substructure copying helpers.
888         <https://webkit.org/b/126340>
889
890         This shrinks the .access() calls by moving memory allocation logic
891         out-of-line, though I'm really doing this to make Instruments.app
892         allocations output more readable.
893
894         Writes to e.g 'font' or 'color' will now be grouped under a single
895         StyleInheritedData::copy() call instead of being spread out over
896         setFontDescription(), setLineHeight(), setColor(), etc.
897
898         Reviewed by Anders Carlsson.
899
900 2013-12-31  Andreas Kling  <akling@apple.com>
901
902         RenderListItem should store its marker in a RenderPtr.
903         <https://webkit.org/b/126298>
904
905         Make RenderListItem::m_marker a RenderPtr<RenderListMarker> and
906         remove two manual destroy() calls. Tweaked code to reduce nesting.
907
908         Reviewed by Anders Carlsson.
909
910 2013-12-31  Andreas Kling  <akling@apple.com>
911
912         Element's renderer factory should return RenderPtrs.
913         <https://webkit.org/b/126318>
914
915         Rename Element::createRenderer() to createElementRenderer() and have
916         it return RenderPtr<RenderElement>. Propagate signature until it
917         builds again.
918
919         We leakPtr() the renderer at two call sites when handing things over
920         to raw pointer API. This'll get tidied up in subsequent patches.
921
922         Reviewed by Sam Weinig.
923
924 2013-12-31  Carlos Garcia Campos  <cgarcia@igalia.com>
925
926         [SOUP] Return early in ResourceHandle::receivedCancellation if the load has already cancelled
927         https://bugs.webkit.org/show_bug.cgi?id=126287
928
929         Reviewed by Martin Robinson.
930
931         This situation can happen when using the network process, because
932         the ReceivedCancellation message can be received when the resource
933         loader has already been removed, but the authentication challenge
934         still has a reference to the ResourceHandleClient.
935
936         * platform/network/soup/ResourceHandleSoup.cpp:
937         (WebCore::ResourceHandle::receivedCancellation):
938
939 2013-12-31  Carlos Garcia Campos  <cgarcia@igalia.com>
940
941         [SOUP] The initiating page is lost after a redirection
942         https://bugs.webkit.org/show_bug.cgi?id=126293
943
944         Reviewed by Martin Robinson.
945
946         The initiating page id is attached to the initial soup request
947         object, but not to the one created after a redirection.
948
949         * platform/network/soup/ResourceHandleSoup.cpp:
950         (WebCore::createSoupRequestAndMessageForHandle): Call
951         setSoupRequestInitiatingPageIDFromNetworkingContext() here if the
952         soup request is created successfully.
953         (WebCore::ResourceHandle::start): Remove the call to
954         setSoupRequestInitiatingPageIDFromNetworkingContext().
955
956 2013-12-31  Carlos Garcia Campos  <cgarcia@igalia.com>
957
958         [SOUP] Implement ResourceHandle::continueWillSendRequest()
959         https://bugs.webkit.org/show_bug.cgi?id=126291
960
961         Reviewed by Martin Robinson.
962
963         * platform/network/soup/ResourceHandleSoup.cpp:
964         (WebCore::continueAfterWillSendRequest): Helper function that
965         continues with the load after willSendRequest has been called.
966         (WebCore::doRedirect): Call continueAfterWillSendRequest() when
967         client doesn't use async callbacks.
968         (WebCore::ResourceHandle::continueWillSendRequest): Call
969         continueAfterWillSendRequest().
970
971 2013-12-30  Carlos Garcia Campos  <cgarcia@igalia.com>
972
973         [SOUP] willSendRequest doesn't work after a redirect
974         https://bugs.webkit.org/show_bug.cgi?id=126290
975
976         Reviewed by Martin Robinson.
977
978         The problem is that we are creating the new soup request for the
979         redirect before calling ResourceHandleClient::willSendRequest() so
980         that any change made to the request by the client is ignored.
981
982         * platform/network/soup/ResourceHandleSoup.cpp:
983         (WebCore::doRedirect): Create the new soup request and soup
984         message for the redirect after calling willSendRequest() on the
985         client.
986
987 2013-12-30  Andreas Kling  <akling@apple.com>
988
989         InputType should return input renderers wrapped in RenderPtr.
990         <https://webkit.org/b/126307>
991
992         Rename InputType::createRenderer() to createInputRenderer() and
993         make it return RenderPtr<RenderElement>. Also made it non-const.
994
995         Reviewed by Anders Carlsson.
996
997 2013-12-30  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
998
999         Cleanup static_cast<HTMLFormElement*> by using toHTMLFormElement()
1000         https://bugs.webkit.org/show_bug.cgi?id=126309
1001
1002         Reviewed by Andreas Kling.
1003
1004         To detect bad type casts, it would be good to use toHTMLFormElement() instead of
1005         using manual type cast. Additionally FORM_ASSOCIATED_ELEMENT_TYPE_CASTS is introduced newly
1006         to do it.
1007
1008         No new tests, no behavior changes.
1009
1010         * html/FormAssociatedElement.h:
1011         * html/HTMLFormControlElement.h:
1012         * html/HTMLFormElement.cpp:
1013         (WebCore::HTMLFormElement::submitImplicitly):
1014         (WebCore::HTMLFormElement::validateInteractively):
1015         (WebCore::HTMLFormElement::submit):
1016         (WebCore::HTMLFormElement::reset):
1017         (WebCore::HTMLFormElement::defaultButton):
1018         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
1019         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
1020         * loader/FormSubmission.cpp:
1021         (WebCore::FormSubmission::create):
1022
1023 2013-12-30  Anders Carlsson  <andersca@apple.com>
1024
1025         Replace yield() and pauseBriefly() with std::this_thread::yield()
1026         https://bugs.webkit.org/show_bug.cgi?id=126105
1027
1028         Reviewed by Sam Weinig.
1029
1030         * platform/sql/SQLiteDatabase.cpp:
1031         (WebCore::SQLiteDatabase::interrupt):
1032
1033 2013-12-30  Andreas Kling  <akling@apple.com>
1034
1035         Rename createRenderObject() to createRenderer().
1036
1037         Somewhat rubber-stamped by Antti Koivisto.
1038
1039 2013-12-30  Andreas Kling  <akling@apple.com>
1040
1041         Document should store its RenderView in a RenderPtr.
1042         <https://webkit.org/b/126299>
1043
1044         Make Document::m_renderView a RenderPtr<RenderView> and remove one
1045         manual destroy() call. Also removed the setRenderView() helper and
1046         inlined it at the two call sites.
1047
1048         Reviewed by Antti Koivisto.
1049
1050 2013-12-30  Martin Robinson  <mrobinson@igalia.com>
1051
1052         [CMake] [GTK] Add support for GObject introspection
1053         https://bugs.webkit.org/show_bug.cgi?id=126162
1054
1055         Reviewed by Daniel Bates.
1056
1057         * PlatformGTK.cmake: Build a list of WebKitDOM headers and expose it to the
1058         parent scope of the build.
1059
1060 2013-12-30  Andreas Kling  <akling@apple.com>
1061
1062         Text::createTextRenderer() should return a RenderPtr.
1063         <https://webkit.org/b/126292>
1064
1065         Make createTextRenderer() return a RenderPtr and remove one manual
1066         destroy() call. Also, since it should always return a valid object,
1067         I turned a null check into an assertion instead.
1068
1069         Reviewed by Antti Koivisto.
1070
1071 2013-12-30  Antti Koivisto  <antti@apple.com>
1072
1073         Remove attachChild
1074         https://bugs.webkit.org/show_bug.cgi?id=126288
1075
1076         Reviewed by Andreas Kling.
1077
1078         * dom/ContainerNode.cpp:
1079         (WebCore::destroyRenderTreeIfNeeded):
1080         
1081             Rename detachChild and move the tests here.
1082
1083         (WebCore::ContainerNode::takeAllChildrenFrom):
1084         
1085             No need to call attachRenderTree explicitly anymore.
1086
1087         (WebCore::ContainerNode::removeBetween):
1088
1089 2013-12-29  Andreas Kling  <akling@apple.com>
1090
1091         RenderLayer: Store corner and resizer renderers in RenderPtrs.
1092         <https://webkit.org/b/126274>
1093
1094         Turn RenderLayer::m_scrollCorner and m_resizer into RenderPtrs.
1095         Removed manual destroy() calls as appropriate. Also tweaked some
1096         code to reduce nesting.
1097
1098         Reviewed by Anders Carlsson.
1099
1100 2013-12-30  Antti Koivisto  <antti@apple.com>
1101
1102         XML document builder should create render tree asynchronously
1103         https://bugs.webkit.org/show_bug.cgi?id=126285
1104
1105         Reviewed by Andreas Kling.
1106         
1107         Stop creating renderers explicitly. 
1108         Fix SVG <use> element to not rely on parse time render tree construction.
1109
1110         * svg/SVGUseElement.cpp:
1111         (WebCore::SVGUseElement::svgAttributeChanged):
1112         
1113             Remove renderer check, we may not have created the render tree yet.
1114
1115         (WebCore::SVGUseElement::willAttachRenderers):
1116         
1117             Switch to willAttachRenderers from willRecalcStyle. The latter is only called as long as style
1118             recalc doesn't start creating new renderers.
1119
1120         (WebCore::SVGUseElement::invalidateShadowTree):
1121         
1122             Remove renderer check, we may not have created the render tree yet. 
1123             Invalidate with ReconstructRenderTree so willAttachRenderers will always get called.
1124
1125         * svg/SVGUseElement.h:
1126         * xml/parser/XMLDocumentParser.cpp:
1127         (WebCore::XMLDocumentParser::exitText):
1128         * xml/parser/XMLDocumentParserLibxml2.cpp:
1129         (WebCore::XMLDocumentParser::startElementNs):
1130         (WebCore::XMLDocumentParser::cdataBlock):
1131         
1132             Remove explicit call to attachRenderTree. The render tree will be created lazily.
1133
1134 2013-12-29  Joone Hur  <joone.hur@intel.com>
1135
1136         Reverted r156742. The same fix was reverted from Blink due to heap-use-after-free on ClusterFuzz.
1137         https://bugs.webkit.org/show_bug.cgi?id=126275
1138
1139         https://codereview.chromium.org/102993011
1140
1141         Reviewed by Darin Adler.
1142
1143         * rendering/RenderBlock.cpp:
1144         (WebCore::RenderBlock::updateFirstLetter):
1145
1146 2013-12-29  ChangSeok Oh  <changseok.oh@collabora.com>
1147
1148         Remove unused functions in GraphicsContext3D.cpp
1149         https://bugs.webkit.org/show_bug.cgi?id=126265
1150
1151         Reviewed by Andreas Kling.
1152
1153         platformGraphicsContext3D, platformTexture and platformLayer in GC3D.cpp
1154         seem not used by any ports.
1155
1156         No new tests, no functionality changed.
1157
1158         * platform/graphics/GraphicsContext3D.cpp:
1159
1160 2013-12-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1161
1162         Fix build error on 64bit debug build.
1163         https://bugs.webkit.org/show_bug.cgi?id=126248
1164
1165         r161076 used ‘%lli’(for long long int) for int64_t(aka long int).
1166         However, in a 64bit compile, int64_t is 'long int', not a 'long long int'.
1167         To support 32bit and 64bit, we use static_cast<long long>.
1168
1169         * Modules/indexeddb/IDBTransactionBackend.cpp:
1170         (WebCore::IDBTransactionBackend::commit):
1171
1172 2013-12-29  Antti Koivisto  <antti@apple.com>
1173
1174         Remove some accidental commented out code.
1175
1176         * testing/Internals.cpp:
1177         (WebCore::Internals::mallocStatistics):
1178
1179 2013-12-29  Antti Koivisto  <antti@apple.com>
1180
1181         Fix build.
1182
1183         * xml/parser/XMLDocumentParser.cpp:
1184
1185 2013-12-29  Antti Koivisto  <antti@apple.com>
1186
1187         Remove Node::attached()
1188         https://bugs.webkit.org/show_bug.cgi?id=126276
1189
1190         Reviewed by Sam Weinig.
1191
1192         Node::attached() is poorly defined. Replace it with renderer() and inRenderedDocument() tests as appropriate.
1193         
1194         Also remove some unnecessary explicit attachRenderTree/detachRenderTree calls from the tree builders.
1195
1196 2013-12-29  Andreas Kling  <akling@apple.com>
1197
1198         RenderLayer: Store reflection renderer in a RenderPtr.
1199         <https://webkit.org/b/126273>
1200
1201         Reviewed by Anders Carlsson.
1202
1203         * rendering/RenderLayer.h:
1204         * rendering/RenderLayer.cpp:
1205         (WebCore::RenderLayer::RenderLayer):
1206         (WebCore::RenderLayer::calculateClipRects):
1207
1208             Turn RenderLayer::m_reflection into a RenderPtr<RenderReplica>
1209             instead of a raw pointer.
1210
1211         * WebCore.xcodeproj/project.pbxproj:
1212
1213             Add RenderPtr.h to private headers.
1214
1215 2013-12-28  Andreas Kling  <akling@apple.com>
1216
1217         Add an owning smart pointer for RenderObjects and start using it.
1218         <https://webkit.org/b/126251>
1219
1220         This patch adds a RenderPtr pointer, essentially an OwnPtr for
1221         RenderObjects. The difference is that RenderPtr destroys the object
1222         by calling destroy() on it.
1223
1224         This is necessary to implement the willBeDestroyed() mechanism in
1225         RenderObject that notifies renderers just before they are about to
1226         be deleted, while they can still do tree traversal, etc.
1227
1228         I also added a make_unique-alike helper so you can write:
1229
1230             auto renderer = createRenderObject<RenderImage>(...);
1231
1232         Put it all to use by making ContentData::createRenderer() return
1233         RenderPtr<RenderObject> instead of raw RenderObject*.
1234
1235         Reviewed by Antti Koivisto.
1236
1237 2013-12-28  Benjamin Poulain  <benjamin@webkit.org>
1238
1239         Add a missing include path for GTK
1240         https://bugs.webkit.org/show_bug.cgi?id=126257
1241
1242         Reviewed by Philippe Normand.
1243
1244         * GNUmakefile.am:
1245
1246 2013-12-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1247
1248         Unreviewed. Update GObject DOM symbols file after r160733.
1249
1250         * bindings/gobject/webkitdom.symbols:
1251
1252 2013-12-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1253
1254         [GTK] Downloads are broken with the network process enabled
1255         https://bugs.webkit.org/show_bug.cgi?id=126131
1256
1257         Reviewed by Martin Robinson.
1258
1259         The problem is that the network process crashes when trying to
1260         convert the handle to a download, because at that point the
1261         download has finished and the handle is NULL. This happens because
1262         we are not implementing ResourceHandle::continueDidReceiveResponse().
1263
1264         * platform/network/soup/ResourceHandleSoup.cpp:
1265         (WebCore::nextMultipartResponsePartCallback): Call
1266         continueAfterDidReceiveResponse() when not using async callbacks.
1267         (WebCore::sendRequestCallback): Ditto.
1268         (WebCore::continueAfterDidReceiveResponse): Helper function that
1269         continues the load after didReceiveResponse.
1270         (WebCore::ResourceHandle::continueDidReceiveResponse): Call
1271         continueAfterDidReceiveResponse().
1272
1273 2013-12-27  Daniel Bates  <dabates@apple.com>
1274
1275         Another attempt to fix the Windows build after <http://trac.webkit.org/changeset/161106>
1276         (https://bugs.webkit.org/show_bug.cgi?id=126180)
1277
1278         * WebCore.vcxproj/WebCore.vcxproj.filters: Add files platform/audio/{AudioSession, AudioSessionListener}.h
1279         * WebCore.vcxproj/WebCoreCommon.props: Add directory WebCore/platform/audio to the list of
1280         include directories.
1281
1282 2013-12-27  Daniel Bates  <dabates@apple.com>
1283
1284         Attempt to fix the Windows build after <http://trac.webkit.org/changeset/161106>
1285         (https://bugs.webkit.org/show_bug.cgi?id=126180)
1286
1287         Add files platform/audio/AudioSession.{cpp, h} and platform/audio/AudioSessionListener.h
1288         to the Visual Studio project. Note, the contents of these files are guarded by USE(AUDIO_SESSION),
1289         which is only enabled on Mac and iOS at the time of writing.
1290
1291         I thought to try this approach to fix the build so as to avoid adding an extraneous
1292         USE(AUDIO_SESSION)-guard around the #include "AudioSession.h" in Settings.cpp since
1293         the contents of the file AudioSession.h is guarded by USE(AUDIO_SESSION).
1294
1295         * WebCore.vcxproj/WebCore.vcxproj:
1296
1297 2013-12-27  Daniel Bates  <dabates@apple.com>
1298
1299         [iOS] Upstream WebCore/page changes
1300         https://bugs.webkit.org/show_bug.cgi?id=126180
1301
1302         Reviewed by Darin Adler.
1303
1304         * WebCore.xcodeproj/project.pbxproj:
1305         * dom/EventNames.h:
1306         (WebCore::EventNames::isGestureEventType): Added.
1307         * page/AlternativeTextClient.h: Do not define WTF_USE_DICTATION_ALTERNATIVES when building for iOS.
1308         * page/Chrome.cpp:
1309         (WebCore::Chrome::Chrome):
1310         (WebCore::Chrome::dispatchViewportPropertiesDidChange): Added; guarded by PLATFORM(IOS).
1311         (WebCore::Chrome::setCursor): Make this an empty function when building for iOS.
1312         (WebCore::Chrome::setCursorHiddenUntilMouseMoves): Ditto.
1313         (WebCore::Chrome::didReceiveDocType): Added; iOS-specific.
1314         * page/Chrome.h:
1315         (WebCore::Chrome::setDispatchViewportDataDidChangeSuppressed): Added; guarded by PLATFORM(IOS).
1316         * page/ChromeClient.h:
1317         (WebCore::ChromeClient::didFlushCompositingLayers): Added; guarded by PLATFORM(IOS).
1318         (WebCore::ChromeClient::fetchCustomFixedPositionLayoutRect): Added; guarded by PLATFORM(IOS).
1319         (WebCore::ChromeClient::updateViewportConstrainedLayers): Added; guarded by PLATFORM(IOS).
1320         * page/DOMTimer.cpp:
1321         (WebCore::DOMTimer::install): Added iOS-specific code.
1322         (WebCore::DOMTimer::fired): Ditto.
1323         * page/DOMWindow.cpp:
1324         (WebCore::DOMWindow::DOMWindow): Ditto.
1325         (WebCore::DOMWindow::innerHeight): Ditto.
1326         (WebCore::DOMWindow::innerWidth): Ditto.
1327         (WebCore::DOMWindow::scrollX): Ditto.
1328         (WebCore::DOMWindow::scrollY): Ditto.
1329         (WebCore::DOMWindow::scrollBy): Ditto.
1330         (WebCore::DOMWindow::scrollTo): Ditto.
1331         (WebCore::DOMWindow::clearTimeout): Ditto.
1332         (WebCore::DOMWindow::addEventListener): Ditto.
1333         (WebCore::DOMWindow::incrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS).
1334         (WebCore::DOMWindow::decrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS).
1335         (WebCore::DOMWindow::resetAllGeolocationPermission): Added; Also added FIXME comment.
1336         (WebCore::DOMWindow::removeEventListener): Added iOS-specific code.
1337         (WebCore::DOMWindow::dispatchEvent): Modified to prevent dispatching duplicate pageshow and pagehide
1338         events per <http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#event-pageshow>.
1339         (WebCore::DOMWindow::removeAllEventListeners): Added iOS-specific code.
1340         * page/DOMWindow.h:
1341         * page/DOMWindow.idl: Added IOS_GESTURE_EVENTS-guarded attributes: ongesture{change, end, start}. Also
1342         added IOS_TOUCH_EVENTS-guarded attributes: {Touch, TouchList}Constructor.
1343         * page/EditorClient.h:
1344         * page/EventHandler.cpp:
1345         (WebCore::EventHandler::EventHandler): Added iOS-specific code.
1346         (WebCore::EventHandler::clear): Ditto.
1347         (WebCore::EventHandler::startPanScrolling): Make this an empty function when building for iOS.
1348         (WebCore::EventHandler::handleMousePressEvent): Modified to invalidate a click when the clicked node is
1349         null. Also, opt out of code for updating the scrollbars as UIKit manages scrollbars on iOS.
1350         (WebCore::EventHandler::handleMouseMoveEvent): Opt of code for updating the scrollbars and cursor when building on iOS.
1351         (WebCore::hitTestResultInFrame): Made this a file-local static function since it's only used in EventHandler.cpp.
1352         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled): Added iOS-specific code.
1353         * page/EventHandler.h:
1354         * page/FocusController.h:
1355         * page/Frame.cpp:
1356         (WebCore::Frame::Frame): Added iOS-specific code.
1357         (WebCore::Frame::scrollOverflowLayer): Added; iOS-specific.
1358         (WebCore::Frame::overflowAutoScrollTimerFired): Added; iOS-specific.
1359         (WebCore::Frame::startOverflowAutoScroll): Added; iOS-specific.
1360         (WebCore::Frame::checkOverflowScroll): Added; iOS-specific.
1361         (WebCore::Frame::willDetachPage): Added iOS-specific code.
1362         (WebCore::Frame::createView): Ditto.
1363         (WebCore::Frame::setSelectionChangeCallbacksDisabled): Added; iOS-specific.
1364         (WebCore::Frame::selectionChangeCallbacksDisabled): Added; iOS-specific.
1365         * page/Frame.h:
1366         (WebCore::Frame::timersPaused): Added; guarded by PLATFORM(IOS).
1367         * page/FrameView.cpp:
1368         (WebCore::FrameView::FrameView): Added iOS-specific code.
1369         (WebCore::FrameView::clear): Ditto.
1370         (WebCore::FrameView::flushCompositingStateForThisFrame): Ditto.
1371         (WebCore::FrameView::graphicsLayerForPlatformWidget): Added.
1372         (WebCore::FrameView::scheduleLayerFlushAllowingThrottling): Added.
1373         (WebCore::FrameView::layout): Added iOS-specific code.
1374         (WebCore::countRenderedCharactersInRenderObjectWithThreshold): Added; helper function used by FrameView::renderedCharactersExceed().
1375         Also added FIXME comment.
1376         (WebCore::FrameView::renderedCharactersExceed): Added.
1377         (WebCore::FrameView::visibleContentsResized): Added iOS-specific code.
1378         (WebCore::FrameView::adjustTiledBackingCoverage): Ditto.
1379         (WebCore::FrameView::performPostLayoutTasks): Ditto.
1380         (WebCore::FrameView::sendResizeEventIfNeeded): Ditto.
1381         (WebCore::FrameView::paintContents): Added iOS-specific code. Also added FIXME comments.
1382         (WebCore::FrameView::setUseCustomFixedPositionLayoutRect): Added; iOS-specific.
1383         (WebCore::FrameView::setCustomFixedPositionLayoutRect): Added; iOS-specific.
1384         (WebCore::FrameView::updateFixedPositionLayoutRect): Added; iOS-specific.
1385         * page/FrameView.h:
1386         * page/Navigator.cpp:
1387         (WebCore::Navigator::standalone): Added; iOS-specific.
1388         * page/Navigator.h:
1389         * page/Navigator.idl: Added WTF_PLATFORM_IOS-guarded attribute: standalone. Also added FIXME comment.
1390         * page/NavigatorBase.cpp:
1391         (WebCore::NavigatorBase::platform): Added iOS-specific code.
1392         * page/Page.h:
1393         (WebCore::Page::hasCustomHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment
1394         to remove this method.
1395         (WebCore::Page::customHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment
1396         to remove this method.
1397         * page/PageGroup.cpp:
1398         (WebCore::PageGroup::removeVisitedLink): Added.
1399         * page/PageGroup.h:
1400         * page/Settings.cpp:
1401         (WebCore::Settings::Settings):
1402         (WebCore::Settings::setScriptEnabled): Added; guarded by PLATFORM(IOS).
1403         (WebCore::Settings::setStandalone): Added; guarded by PLATFORM(IOS).
1404         (WebCore::Settings::setAudioSessionCategoryOverride): Added; guarded by PLATFORM(IOS).
1405         (WebCore::Settings::audioSessionCategoryOverride): Added; guarded by PLATFORM(IOS).
1406         (WebCore::Settings::setNetworkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS).
1407         (WebCore::Settings::networkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS).
1408         (WebCore::sharedNetworkInterfaceNameGlobal): Added; guarded by PLATFORM(IOS).
1409         (WebCore::Settings::setNetworkInterfaceName): Added; guarded by PLATFORM(IOS).
1410         (WebCore::Settings::networkInterfaceName): Added; guarded by PLATFORM(IOS).
1411         * page/Settings.h:
1412         (WebCore::Settings::setMaxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
1413         (WebCore::Settings::maxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
1414         (WebCore::Settings::standalone): Added; guarded by PLATFORM(IOS).
1415         (WebCore::Settings::setTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
1416         (WebCore::Settings::telephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
1417         (WebCore::Settings::setMediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS).
1418         (WebCore::Settings::mediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS).
1419         (WebCore::Settings::setShouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS).
1420         (WebCore::Settings::shouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS).
1421         (WebCore::Settings::setShouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS).
1422         (WebCore::Settings::shouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS).
1423         (WebCore::Settings::setAlwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS).
1424         (WebCore::Settings::alwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS).
1425         (WebCore::Settings::setAlwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS).
1426         (WebCore::Settings::alwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS).
1427         * page/Settings.in: Added IOS_AIRPLAY-guarded setting: mediaPlaybackAllowsAirPlay.
1428         * page/animation/CSSPropertyAnimation.cpp:
1429         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Added iOS-specific code and FIXME comment.
1430         * page/ios/EventHandlerIOS.mm: Added.
1431         * page/ios/FrameIOS.mm: Added.
1432         * page/mac/ChromeMac.mm:
1433         * page/mac/PageMac.cpp:
1434         (WebCore::Page::addSchedulePair): Opt out of code when building for iOS.
1435         (WebCore::Page::removeSchedulePair): Ditto.
1436         * page/mac/SettingsMac.mm:
1437         (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Added iOS-specific code.
1438         * page/mac/WebCoreFrameView.h:
1439
1440 2013-12-27  Gavin Barraclough  <barraclough@apple.com>
1441
1442         Merge PageVisibilityState & ViewState::IsVisible in WebKit2
1443         https://bugs.webkit.org/show_bug.cgi?id=126214
1444
1445         Reviewed by Alexey Proskuryakov.
1446
1447         WebKit2 redundantly tracks the visibility of the view through two mechanisms - the visibility
1448         state, and the view state. Remove visibility state from the WebKit2 layer. The visibility
1449         state also tracks the prerender state - so split this out and handle it separately (a change
1450         we should make in WebCore, too).
1451
1452         WebCore - changes the API tests exposed a bug, a view should only ever come out of the
1453         prerender state when it becomes visible - redundant notifications that the view is still
1454         hidden should be ignored.
1455
1456         * page/Page.cpp:
1457         (WebCore::Page::setVisibilityState):
1458             - ignore visibility state change to hidden, if the current state is prerender.
1459
1460 2013-12-27  Joseph Pecoraro  <pecoraro@apple.com>
1461
1462         Unreviewed Windows build fix for r160946.
1463
1464         Add another file to the Windows InspectorAllInOne.cpp.
1465
1466         * inspector/InspectorAllInOne.cpp:
1467
1468 2013-12-27  Commit Queue  <commit-queue@webkit.org>
1469
1470         Unreviewed, rolling out r161096.
1471         http://trac.webkit.org/changeset/161096
1472         https://bugs.webkit.org/show_bug.cgi?id=126256
1473
1474         Made lots of tests crash (Requested by ap on #webkit).
1475
1476         * dom/ContainerNode.cpp:
1477         (WebCore::ContainerNode::insertBefore):
1478         (WebCore::ContainerNode::replaceChild):
1479         (WebCore::willRemoveChildren):
1480         (WebCore::ContainerNode::appendChild):
1481         * dom/Document.cpp:
1482         (WebCore::Document::visibilityStateChanged):
1483         (WebCore::Document::moveNodeIteratorsToNewDocument):
1484         (WebCore::Document::updateRangesAfterChildrenChanged):
1485         (WebCore::Document::nodeChildrenWillBeRemoved):
1486         (WebCore::Document::nodeWillBeRemoved):
1487         (WebCore::Document::textInserted):
1488         (WebCore::Document::textRemoved):
1489         (WebCore::Document::textNodesMerged):
1490         (WebCore::Document::textNodeSplit):
1491         (WebCore::Document::documentWillSuspendForPageCache):
1492         (WebCore::Document::documentDidResumeFromPageCache):
1493         (WebCore::Document::mediaVolumeDidChange):
1494         (WebCore::Document::privateBrowsingStateDidChange):
1495         (WebCore::Document::captionPreferencesChanged):
1496         (WebCore::Document::validateAutoSizingNodes):
1497         (WebCore::Document::resetAutoSizingNodes):
1498         (WebCore::Document::webkitExitFullscreen):
1499         * dom/MutationObserver.cpp:
1500         (WebCore::MutationObserver::disconnect):
1501         (WebCore::MutationObserver::getObservedNodes):
1502         (WebCore::MutationObserver::deliver):
1503         * dom/MutationObserverInterestGroup.cpp:
1504         (WebCore::MutationObserverInterestGroup::isOldValueRequested):
1505         (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
1506         * dom/MutationObserverRegistration.cpp:
1507         (WebCore::MutationObserverRegistration::clearTransientRegistrations):
1508         (WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
1509         * dom/Node.cpp:
1510         (WebCore::Node::dumpStatistics):
1511         (WebCore::Document::invalidateNodeListAndCollectionCaches):
1512         (WebCore::NodeListsNodeData::invalidateCaches):
1513         (WebCore::Node::didMoveToNewDocument):
1514         (WebCore::collectMatchingObserversForMutation):
1515         (WebCore::Node::notifyMutationObserversNodeWillDetach):
1516         * dom/NodeRareData.h:
1517         (WebCore::NodeListsNodeData::adoptDocument):
1518         * dom/ScriptExecutionContext.cpp:
1519         (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
1520         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
1521         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
1522         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
1523         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
1524         (WebCore::ScriptExecutionContext::closeMessagePorts):
1525         (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
1526         (WebCore::ScriptExecutionContext::didChangeTimerAlignmentInterval):
1527         * dom/WebKitNamedFlow.cpp:
1528         (WebCore::WebKitNamedFlow::getRegionsByContent):
1529         (WebCore::WebKitNamedFlow::getRegions):
1530         (WebCore::WebKitNamedFlow::getContent):
1531
1532 2013-12-26  Sam Weinig  <sam@webkit.org>
1533
1534         Convert some of WebCore/dom over to range-for loops
1535         https://bugs.webkit.org/show_bug.cgi?id=126250
1536
1537         Reviewed by Andreas Kling.
1538
1539         * dom/ContainerNode.cpp:
1540         * dom/Document.cpp:
1541         * dom/MutationObserver.cpp:
1542         * dom/MutationObserverInterestGroup.cpp:
1543         * dom/MutationObserverRegistration.cpp:
1544         * dom/Node.cpp:
1545         * dom/NodeRareData.h:
1546         * dom/ScriptExecutionContext.cpp:
1547         * dom/WebKitNamedFlow.cpp:
1548
1549 2013-12-26  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1550
1551         [Nix] Cleanup Source/WebCore/PlatformNix.cmake
1552         https://bugs.webkit.org/show_bug.cgi?id=126226
1553
1554         Reviewed by Csaba Osztrogonác.
1555
1556         No new tests needed.
1557
1558         * PlatformNix.cmake:
1559
1560 2013-12-26  Joseph Pecoraro  <pecoraro@apple.com>
1561
1562         Unreviewed attempt at Windows build fix.
1563
1564         I think Window's "AllInOne.cpp" is causing a using namespace JSC
1565         to cause naming conflicts between Inspector::TypeBuilder::Debugger::types
1566         and JSC::types. So removing the ambiguity.
1567
1568         * inspector/InjectedScript.cpp:
1569         (WebCore::InjectedScript::getProperties):
1570         (WebCore::InjectedScript::wrapCallFrames):
1571
1572 2013-12-22  Andreas Kling  <akling@apple.com>
1573
1574         Make Text::createTextRenderer() take a const RenderStyle&.
1575         <https://webkit.org/b/126136>
1576
1577         Nuke a FIXME about constifying a RenderStyle& local.
1578
1579         Reviewed by Anders Carlsson.
1580
1581 2013-12-22  Andreas Kling  <akling@apple.com>
1582
1583         Move more inlines from RenderObject to RenderElement.
1584         <https://webkit.org/b/126134>
1585
1586         Lift some inline functions that use style() from RenderObject over
1587         to RenderElement, making them branchless.
1588
1589         Reviewed by Anders Carlsson.
1590
1591 2013-12-26  ChangSeok Oh  <changseok.oh@collabora.com>
1592
1593         Unreviewed build fix after r159526.
1594         isBoxValue is used at out of ENABLE_CSS_SHAPES gaurd. It causes a compile failure.
1595         So I moved isBoxValue to out side of ENABLE_CSS_SHAPES.
1596
1597         * css/CSSParser.cpp:
1598
1599 2013-12-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1600
1601         Set m_pos as private in InlineIterator, and use getter and setter functions.
1602         https://bugs.webkit.org/show_bug.cgi?id=125614
1603
1604         Reviewed by Alexey Proskuryakov.
1605
1606         InlineIterator has been exported m_pos as public directly though it is member variable.
1607         This patch set it as private, and add getter/setter functions for it.
1608
1609         No new tests, no behavior changes.
1610
1611         * rendering/InlineIterator.h:
1612         (WebCore::InlineIterator::setOffset):
1613         (WebCore::operator==):
1614         (WebCore::operator!=):
1615         (WebCore::InlineBidiResolver::appendRun):
1616         * rendering/RenderBlockLineLayout.cpp:
1617         (WebCore::RenderBlockFlow::appendRunsForObject):
1618         (WebCore::constructBidiRunsForLine):
1619         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
1620         (WebCore::RenderBlockFlow::matchedEndLine):
1621         (WebCore::LineBreaker::nextSegmentBreak):
1622         * rendering/line/BreakingContextInlineHeaders.h:
1623         (WebCore::BreakingContext::handleBR):
1624         (WebCore::BreakingContext::handleFloat):
1625         (WebCore::iteratorIsBeyondEndOfRenderCombineText):
1626         (WebCore::ensureCharacterGetsLineBox):
1627         (WebCore::BreakingContext::handleText):
1628         (WebCore::checkMidpoints):
1629         (WebCore::BreakingContext::handleEndOfLine):
1630         * rendering/line/TrailingObjects.cpp:
1631         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes):
1632
1633 2013-12-25  Kim Byung Jun  <bj1987.kim@samsung.com>
1634
1635         [EFL] Delete file.edc and file_*.png.
1636         https://bugs.webkit.org/show_bug.cgi?id=125134
1637
1638         Reviewed by Gyuyoung Kim.
1639
1640         File_theme uses button form.
1641
1642         * platform/efl/DefaultTheme/CMakeLists.txt:
1643         * platform/efl/DefaultTheme/default.edc:
1644         * platform/efl/DefaultTheme/widget/file/file.edc: Removed.
1645         * platform/efl/DefaultTheme/widget/file/file_focus.png: Removed.
1646         * platform/efl/DefaultTheme/widget/file/file_hover.png: Removed.
1647         * platform/efl/DefaultTheme/widget/file/file_normal.png: Removed.
1648         * platform/efl/DefaultTheme/widget/file/file_press.png: Removed.
1649
1650 2013-12-25  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1651
1652         [Nix] Adding createDragImageIconForCachedImageFilename method to DragImageNix
1653         https://bugs.webkit.org/show_bug.cgi?id=126230
1654
1655         Reviewed by Daniel Bates.
1656
1657         Also returning nullptr in other functions that were returning 0 as a pointer.
1658
1659         * platform/nix/DragImageNix.cpp:
1660         (WebCore::createDragImageFromImage):
1661         (WebCore::createDragImageIconForCachedImage):
1662         (WebCore::createDragImageIconForCachedImageFilename):
1663
1664 2013-12-25  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1665
1666         [Nix] Fixing DragData::asFragment signature in DragDataNix.cpp
1667         https://bugs.webkit.org/show_bug.cgi?id=126229
1668
1669         Reviewed by Daniel Bates.
1670
1671         * platform/nix/DragDataNix.cpp:
1672         (WebCore::DragData::asFragment):
1673
1674 2013-12-25  Commit Queue  <commit-queue@webkit.org>
1675
1676         Unreviewed, rolling out r161033 and r161074.
1677         http://trac.webkit.org/changeset/161033
1678         http://trac.webkit.org/changeset/161074
1679         https://bugs.webkit.org/show_bug.cgi?id=126240
1680
1681         Oliver says that a rollout would be better (Requested by ap on
1682         #webkit).
1683
1684         * bindings/js/JSDOMWindowCustom.cpp:
1685         (WebCore::JSDOMWindow::put):
1686         * bindings/objc/WebScriptObject.mm:
1687         (-[WebScriptObject setValue:forKey:]):
1688         * bindings/scripts/CodeGeneratorJS.pm:
1689         (GenerateImplementation):
1690         * bindings/scripts/test/JS/JSTestInterface.cpp:
1691         (WebCore::JSTestInterface::putByIndex):
1692         * bridge/NP_jsobject.cpp:
1693         (_NPN_SetProperty):
1694
1695 2013-12-25  Brady Eidson  <beidson@apple.com>
1696
1697         DatabaseProcess: Implement version changing
1698         https://bugs.webkit.org/show_bug.cgi?id=126099
1699
1700         Reviewed by Sam Weinig.
1701
1702         No new tests (No change in WebCore behavior).
1703
1704         * Modules/indexeddb/IDBTransactionBackend.cpp:
1705         (WebCore::IDBTransactionBackend::commit): Update some logging.
1706
1707         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1708         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform): Move some things that used to be in
1709           IDBServerConnectionLevelDB::changeDatabaseVersion to this cross-platform location.
1710         * Modules/indexeddb/IDBTransactionBackendOperations.h:
1711         (WebCore::IDBDatabaseBackend::VersionChangeOperation::transaction):
1712
1713         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
1714         (WebCore::IDBServerConnectionLevelDB::changeDatabaseVersion): Move the actual updating of the database backend
1715           metadata to the VersionChangeOperation.
1716
1717 2013-12-25  Martin Robinson  <mrobinson@igalia.com>
1718
1719         [GTK] [CMake] Clean up generated sources directories
1720         https://bugs.webkit.org/show_bug.cgi?id=126216
1721
1722         Reviewed by Gustavo Noronha Silva.
1723
1724         * PlatformGTK.cmake: Use the new directory variables.
1725
1726 2013-12-25  Dirk Schulze  <krit@webkit.org>
1727
1728         Support <box> values parsing on 'clip-path' property
1729         https://bugs.webkit.org/show_bug.cgi?id=126147
1730
1731         Reviewed by Ryosuke Niwa.
1732
1733         Support parsing of the background reference boxes, margin-box and bounding-box.
1734         A box will be a reference box and define the origin for a basic shape.
1735         If no basic shape is specified, the box defines the clipping path itself.
1736         The specification text follows the changes to CSS Shapes now.
1737
1738         https://dvcs.w3.org/hg/FXTF/raw-file/3f213145303e/css-masking-1/index.html#the-clip-path
1739
1740         Existing parsing test have been extended to test box values as well.
1741
1742         * css/CSSParser.cpp:
1743         (WebCore::CSSParser::parseValue):
1744         (WebCore::CSSParser::parseClipPath):
1745         * css/CSSParser.h:
1746         * css/CSSValueKeywords.in:
1747         * css/DeprecatedStyleBuilder.cpp:
1748         (WebCore::ApplyPropertyClipPath::applyValue):
1749
1750 2013-12-25  David Kilzer  <ddkilzer@apple.com>
1751
1752         [iOS] Upstream WebCore/pdf changes
1753         http://webkit.org/b/126097
1754
1755         Reviewed by Sam Weinig.
1756
1757         * WebCore.xcodeproj/project.pbxproj: Added files to project.
1758         * pdf/ios/PDFDocument.cpp: Added.
1759         (WebCore::PDFDocumentParser::create):
1760         (WebCore::PDFDocumentParser::document):
1761         (WebCore::PDFDocumentParser::PDFDocumentParser):
1762         (WebCore::PDFDocument::createParser):
1763         * pdf/ios/PDFDocument.h: Added.
1764         (WebCore::PDFDocument::create):
1765         (WebCore::PDFDocument::PDFDocument):
1766
1767 2013-12-24  Commit Queue  <commit-queue@webkit.org>
1768
1769         Unreviewed, rolling out r160959.
1770         http://trac.webkit.org/changeset/160959
1771         https://bugs.webkit.org/show_bug.cgi?id=126222
1772
1773         Caused Windows build to fail (Requested by rfong on #webkit).
1774
1775         * platform/sql/SQLiteDatabase.cpp:
1776         (WebCore::SQLiteDatabase::interrupt):
1777
1778 2013-12-24  Ryosuke Niwa  <rniwa@webkit.org>
1779
1780         Unreviewed, rolling out r161051.
1781         http://trac.webkit.org/changeset/161051
1782         https://bugs.webkit.org/show_bug.cgi?id=45994
1783
1784         Caused two DFG tests to hit assertions due to a separate bug
1785
1786         * xml/XMLHttpRequest.cpp:
1787         (WebCore::XMLHttpRequest::status):
1788         (WebCore::XMLHttpRequest::statusText):
1789         * xml/XMLHttpRequest.h:
1790         * xml/XMLHttpRequest.idl:
1791
1792 2013-12-24  Mihnea Ovidenie  <mihnea@adobe.com>
1793
1794         [CSSRegions] Crash while repainting an invalid region
1795         https://bugs.webkit.org/show_bug.cgi?id=126152
1796
1797         Reviewed by Daniel Bates.
1798
1799         An invalid region, part of a dependency cycle, should not attempt to repaint content from
1800         its associated named flow, otherwise there may be the case of an infinite repaint cycle,
1801         resulting in a crash due to a stack overflow.
1802
1803         Test: fast/regions/repaint/invalid-region-repaint-crash.html
1804
1805         * rendering/RenderLayer.cpp:
1806         (WebCore::RenderLayer::repaintIncludingDescendants):
1807
1808 2013-12-23  Ryosuke Niwa  <rniwa@webkit.org>
1809
1810         XMLHttpRequest: status and statusText throw DOM Exception 11 when the state is UNSENT or OPENED.
1811         https://bugs.webkit.org/show_bug.cgi?id=45994
1812
1813         Reviewed by Alexey Proskuryakov.
1814
1815         Merged https://chromium.googlesource.com/chromium/blink/+/23c90460de16e04c5aba7ed942fba76cb79fdb9b.
1816
1817         Latest XHR spec says that XHR should return 0 and an empty string when it's in UNSENT or OPENED state
1818         or error flag is set: http://www.w3.org/TR/2012/WD-XMLHttpRequest-20121206/#the-status-attribute
1819
1820         * xml/XMLHttpRequest.cpp:
1821         (WebCore::XMLHttpRequest::status):
1822         (WebCore::XMLHttpRequest::statusText):
1823         * xml/XMLHttpRequest.h:
1824         * xml/XMLHttpRequest.idl:
1825
1826 2013-12-23  Ryosuke Niwa  <rniwa@webkit.org>
1827
1828         Crash in ReplaceSelectionCommand
1829         https://bugs.webkit.org/show_bug.cgi?id=126107
1830
1831         Reviewed by Benjamin Poulain.
1832
1833         Merge https://chromium.googlesource.com/chromium/blink/+/c1ebe5c1e808daf9db5e348a8d0ab32570b9f7a5
1834         except the test since it doesn't reproduce the crash in WebKit.
1835
1836         * editing/ReplaceSelectionCommand.cpp:
1837         (WebCore::ReplaceSelectionCommand::doApply):
1838
1839 2013-12-23  Benjamin Poulain  <benjamin@webkit.org>
1840
1841         Add the pseudo classes link and any-link to the Selector Code Generator
1842         https://bugs.webkit.org/show_bug.cgi?id=126196
1843
1844         Reviewed by Ryosuke Niwa.
1845
1846         * cssjit/SelectorCompiler.cpp:
1847         (WebCore::SelectorCompiler::addPseudoType):
1848         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1849         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLink):
1850         * dom/Node.h:
1851         (WebCore::Node::flagIsElement):
1852         (WebCore::Node::flagIsLink):
1853         Fix the type to match TrustedImm32.
1854
1855 2013-12-23  Benjamin Poulain  <benjamin@webkit.org>
1856
1857         Add the experimental CSS code generator files to the remaining build systems
1858         https://bugs.webkit.org/show_bug.cgi?id=126192
1859
1860         Reviewed by Sam Weinig.
1861
1862         * CMakeLists.txt:
1863         * GNUmakefile.list.am:
1864         * WebCore.vcxproj/WebCore.vcxproj:
1865         * WebCore.vcxproj/WebCore.vcxproj.filters:
1866
1867 2013-12-23  Benjamin Poulain  <benjamin@webkit.org>
1868
1869         Add the pseudo class :focus to the Selector Code Generator
1870         https://bugs.webkit.org/show_bug.cgi?id=126189
1871
1872         Reviewed by Ryosuke Niwa.
1873
1874         * cssjit/SelectorCompiler.cpp:
1875         (WebCore::SelectorCompiler::addPseudoType):
1876         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1877         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1878         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFocused):
1879
1880 2013-12-23  Ryosuke Niwa  <rniwa@webkit.org>
1881
1882         Remove boolean argument from Element::setChildrenAffectBy* methods
1883         https://bugs.webkit.org/show_bug.cgi?id=126183
1884
1885         Reviewed by Daniel Bates.
1886
1887         Merge https://chromium.googlesource.com/chromium/blink/+/066ef2fa78336b2b65052cb17cb81b367fe7dbbf
1888
1889         These functions are never called with false.
1890
1891         * css/SelectorChecker.cpp:
1892         (WebCore::SelectorChecker::checkOne):
1893         * dom/Element.cpp:
1894         (WebCore::Element::setChildrenAffectedByActive):
1895         (WebCore::Element::setChildrenAffectedByDrag):
1896         * dom/Element.h:
1897         (WebCore::Element::setChildrenAffectedByHover):
1898
1899 2013-12-23  Tim Horton  <timothy_horton@apple.com>
1900
1901         Fix the iOS build after r161013 and r160672.
1902
1903         * WebCore.exp.in:
1904         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1905         (PlatformCALayerMac::updateCustomAppearance):
1906
1907 2013-12-23  Oliver Hunt  <oliver@apple.com>
1908
1909         Refactor PutPropertySlot to be aware of custom properties
1910         https://bugs.webkit.org/show_bug.cgi?id=126187
1911
1912         Reviewed by msaboff.
1913
1914         Update the bindings code generation and custom objects
1915         to the new function signatures
1916
1917         * bindings/js/JSDOMWindowCustom.cpp:
1918         (WebCore::JSDOMWindow::put):
1919         * bindings/objc/WebScriptObject.mm:
1920         (-[WebScriptObject setValue:forKey:]):
1921         * bindings/scripts/CodeGeneratorJS.pm:
1922         (GenerateImplementation):
1923         * bindings/scripts/test/JS/JSTestInterface.cpp:
1924         (WebCore::JSTestInterface::putByIndex):
1925         * bridge/NP_jsobject.cpp:
1926         (_NPN_SetProperty):
1927
1928 2013-12-23  Benjamin Poulain  <benjamin@webkit.org>
1929
1930         Add class matching to the Selector Code Generator
1931         https://bugs.webkit.org/show_bug.cgi?id=126176
1932
1933         Reviewed by Antti Koivisto.
1934
1935         Add selector matching based on classname to the Selector Compiler.
1936
1937         * cssjit/SelectorCompiler.cpp:
1938         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1939         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching):
1940         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasClasses):
1941         * dom/ElementData.h:
1942         (WebCore::ElementData::classNamesMemoryOffset):
1943         * dom/SpaceSplitString.h:
1944         (WebCore::SpaceSplitStringData::sizeMemoryOffset):
1945         (WebCore::SpaceSplitStringData::tokensMemoryOffset):
1946
1947 2013-12-23  Daniel Bates  <dabates@apple.com>
1948
1949         [iOS] Upstream WebCore/storage changes
1950         https://bugs.webkit.org/show_bug.cgi?id=125913
1951
1952         Reviewed by David Kilzer.
1953
1954         * storage/StorageAreaSync.cpp:
1955         (WebCore::StorageAreaSync::openDatabase): Added iOS-specific code.
1956         (WebCore::StorageAreaSync::sync): Ditto.
1957         * storage/StorageTracker.cpp:
1958         (WebCore::StorageTracker::openTrackerDatabase): Ditto.
1959         (WebCore::StorageTracker::syncImportOriginIdentifiers): Ditto.
1960         (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase): Ditto.
1961         (WebCore::StorageTracker::syncSetOriginDetails): Ditto.
1962         (WebCore::StorageTracker::syncDeleteAllOrigins): Ditto.
1963         (WebCore::StorageTracker::syncDeleteOrigin): Ditto.
1964         (WebCore::StorageTracker::databasePathForOrigin): Ditto.
1965
1966 2013-12-23  Daniel Bates  <dabates@apple.com>
1967
1968         Fix the iOS build following <http://trac.webkit.org/changeset/160236>
1969         (https://bugs.webkit.org/show_bug.cgi?id=125239)
1970
1971         * rendering/RenderBlock.h:
1972         * rendering/RenderBox.cpp:
1973         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): Substitute view() for &view().
1974         * rendering/RenderLayer.cpp:
1975         (WebCore::RenderLayer::scrollTo): Fix indentation of closing brace.
1976         * rendering/RenderLayerCompositor.cpp: Include MainFrame.h.
1977         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles): Check that page->mainFrame().view()
1978         is non-null; also add explicit #else clause.
1979         (WebCore::RenderLayerCompositor::ensureRootLayer): Fix up main frame check.
1980         * rendering/RenderTheme.h:
1981         (WebCore::RenderTheme::paintFileUploadIconDecorations): Substitute rect for r.
1982         * rendering/RenderThemeIOS.mm:
1983         (WebCore::RenderThemeIOS::paintTextFieldDecorations): Use .get() to access underlying NeverDestroyed item.
1984         (WebCore::RenderThemeIOS::systemFont):
1985         * rendering/RenderView.cpp:
1986         (WebCore::fixedPositionOffset): Substitute frameView.scrollOffset() for frameView->scrollOffset().
1987
1988 2013-12-23  Ryosuke Niwa  <rniwa@webkit.org>
1989
1990         Minor optimization in FrameSelection::setNonDirectionalSelectionIfNeeded()
1991         https://bugs.webkit.org/show_bug.cgi?id=126108
1992
1993         Reviewed by Benjamin Poulain.
1994
1995         Merge https://chromium.googlesource.com/chromium/blink/+/237b987c324e2e389a9e0350293bfaf16a5e201d
1996
1997         * editing/FrameSelection.cpp:
1998         (WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded):
1999
2000 2013-12-23  Ryosuke Niwa  <rniwa@webkit.org>
2001
2002         Use isDocumentFragment() instead of comparing nodeType() with Node::DOCUMENT_FRAGMENT_NODE
2003         https://bugs.webkit.org/show_bug.cgi?id=126178
2004
2005         Reviewed by Antti Koivisto.
2006
2007         Inspired by https://chromium.googlesource.com/chromium/blink/+/a622cb80af2bfb0c5d91123cbcfa4fa72a06554c
2008
2009         Use inline Node::isDocumentFragment() instead of virtual nodeType().
2010
2011         * dom/ContainerNode.cpp:
2012         (WebCore::collectChildrenAndRemoveFromOldParent):
2013         * dom/Document.cpp:
2014         (WebCore::Document::canReplaceChild):
2015
2016 2013-12-23  Gwang Yoon Hwang  <ryumiel@company100.net>
2017
2018         Clear ScratchBuffer::m_lastLayerSize when clearing the scratch buffer.
2019         https://bugs.webkit.org/show_bug.cgi?id=126150
2020
2021         Reviewed by Simon Fraser.
2022
2023         Since ScratchBuffer::clearScratchBuffer only clears m_lastRadius,
2024         ShadowBlur doesn't draw shadow into the re-created scratch buffer if it
2025         tries to draw shadow without blurRadius.
2026
2027         Clear m_lastLayerSize to empty is enought to ensure that there is no
2028         drawn contents in the scratch buffer.
2029
2030         No new tests due to the flaky nature of reproducing the issue.
2031
2032         * platform/graphics/ShadowBlur.cpp:
2033         (WebCore::ScratchBuffer::clearScratchBuffer):
2034
2035 2013-12-23  Benjamin Poulain  <benjamin@webkit.org>
2036
2037         Add id matching to the Selector Code Generator
2038         https://bugs.webkit.org/show_bug.cgi?id=126154
2039
2040         Reviewed by Antti Koivisto.
2041
2042         Compile matching for #id selectors. IDs are Atomic String so it is just a matter
2043         of comparing the pointers.
2044
2045         No attempt is made at optimizing for the double #id case because such problem
2046         do not really happen outside tests.
2047
2048         * cssjit/SelectorCompiler.cpp:
2049         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
2050         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2051         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
2052         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2053         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementDataMatching):
2054         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasId):
2055         * dom/Element.h:
2056         (WebCore::Element::elementDataMemoryOffset):
2057         * dom/ElementData.h:
2058         (WebCore::ElementData::idForStyleResolutionMemoryOffset):
2059
2060 2013-12-23  Oliver Hunt  <oliver@apple.com>
2061
2062         Update custom setter implementations to perform type checks
2063         https://bugs.webkit.org/show_bug.cgi?id=126171
2064
2065         Reviewed by Daniel Bates.
2066
2067         Update the bindings code generator for setters so that they perform a real
2068         type check.
2069
2070         * bindings/scripts/CodeGeneratorJS.pm:
2071         (GenerateAttributeEventListenerCall):
2072         (GenerateHeader):
2073         (GenerateImplementation):
2074         * bindings/scripts/test/JS/JSTestInterface.cpp:
2075         (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
2076         (WebCore::setJSTestInterfaceImplementsStr2):
2077         (WebCore::setJSTestInterfaceImplementsStr3):
2078         (WebCore::setJSTestInterfaceImplementsNode):
2079         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
2080         (WebCore::setJSTestInterfaceSupplementalStr2):
2081         (WebCore::setJSTestInterfaceSupplementalStr3):
2082         (WebCore::setJSTestInterfaceSupplementalNode):
2083         * bindings/scripts/test/JS/JSTestInterface.h:
2084         * bindings/scripts/test/JS/JSTestObj.cpp:
2085         (WebCore::setJSTestObjConstructorStaticStringAttr):
2086         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
2087         (WebCore::setJSTestObjEnumAttr):
2088         (WebCore::setJSTestObjByteAttr):
2089         (WebCore::setJSTestObjOctetAttr):
2090         (WebCore::setJSTestObjShortAttr):
2091         (WebCore::setJSTestObjUnsignedShortAttr):
2092         (WebCore::setJSTestObjLongAttr):
2093         (WebCore::setJSTestObjLongLongAttr):
2094         (WebCore::setJSTestObjUnsignedLongLongAttr):
2095         (WebCore::setJSTestObjStringAttr):
2096         (WebCore::setJSTestObjTestObjAttr):
2097         (WebCore::setJSTestObjXMLObjAttr):
2098         (WebCore::setJSTestObjCreate):
2099         (WebCore::setJSTestObjReflectedStringAttr):
2100         (WebCore::setJSTestObjReflectedIntegralAttr):
2101         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
2102         (WebCore::setJSTestObjReflectedBooleanAttr):
2103         (WebCore::setJSTestObjReflectedURLAttr):
2104         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
2105         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
2106         (WebCore::setJSTestObjReflectedCustomURLAttr):
2107         (WebCore::setJSTestObjTypedArrayAttr):
2108         (WebCore::setJSTestObjAttrWithGetterException):
2109         (WebCore::setJSTestObjAttrWithSetterException):
2110         (WebCore::setJSTestObjStringAttrWithGetterException):
2111         (WebCore::setJSTestObjStringAttrWithSetterException):
2112         (WebCore::setJSTestObjCustomAttr):
2113         (WebCore::setJSTestObjWithScriptStateAttribute):
2114         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
2115         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
2116         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
2117         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
2118         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
2119         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
2120         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
2121         (WebCore::setJSTestObjConditionalAttr1):
2122         (WebCore::setJSTestObjConditionalAttr2):
2123         (WebCore::setJSTestObjConditionalAttr3):
2124         (WebCore::setJSTestObjConditionalAttr4Constructor):
2125         (WebCore::setJSTestObjConditionalAttr5Constructor):
2126         (WebCore::setJSTestObjConditionalAttr6Constructor):
2127         (WebCore::setJSTestObjAnyAttribute):
2128         (WebCore::setJSTestObjMutablePoint):
2129         (WebCore::setJSTestObjImmutablePoint):
2130         (WebCore::setJSTestObjStrawberry):
2131         (WebCore::setJSTestObjStrictFloat):
2132         (WebCore::setJSTestObjId):
2133         (WebCore::setJSTestObjReplaceableAttribute):
2134         (WebCore::setJSTestObjNullableLongSettableAttribute):
2135         (WebCore::setJSTestObjNullableStringValue):
2136         (WebCore::setJSTestObjAttributeWithReservedEnumType):
2137         * bindings/scripts/test/JS/JSTestObj.h:
2138         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2139         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
2140         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
2141         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2142         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2143         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
2144         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
2145         (WebCore::setJSTestTypedefsAttrWithGetterException):
2146         (WebCore::setJSTestTypedefsAttrWithSetterException):
2147         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
2148         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
2149         * bindings/scripts/test/JS/JSTestTypedefs.h:
2150
2151 2013-12-23  Lucas Forschler  <lforschler@apple.com>
2152
2153         <rdar://problem/15682948> Update copyright strings
2154
2155         Reviewed by Dan Bernstein
2156
2157         * Info.plist:
2158
2159 2013-12-23  Commit Queue  <commit-queue@webkit.org>
2160
2161         Unreviewed, rolling out r160945.
2162         http://trac.webkit.org/changeset/160945
2163         https://bugs.webkit.org/show_bug.cgi?id=126164
2164
2165         Seems to have broken multiple canvas tests (Requested by ap on
2166         #webkit).
2167
2168         * WebCore.xcodeproj/project.pbxproj:
2169         * platform/graphics/cg/ImageBufferBackingStoreCache.cpp: Removed.
2170         * platform/graphics/cg/ImageBufferBackingStoreCache.h: Removed.
2171         * platform/graphics/cg/ImageBufferCG.cpp:
2172         (WebCore::createIOSurface):
2173         (WebCore::ImageBuffer::ImageBuffer):
2174         (WebCore::ImageBuffer::~ImageBuffer):
2175
2176 2013-12-23  Eric Carlson  <eric.carlson@apple.com>
2177
2178         AudioSessionManager should be MediaSessionManager
2179         https://bugs.webkit.org/show_bug.cgi?id=126087
2180
2181         Reviewed by Jer Noble.
2182
2183         No new tests, no change in functionality.
2184
2185         * WebCore.xcodeproj/project.pbxproj: Change file names.
2186
2187         * html/HTMLMediaElement.cpp:
2188         (WebCore::HTMLMediaElement::HTMLMediaElement): MediaSessionManagerToken::create() takes a client
2189             interface instead of the media type.
2190         * html/HTMLMediaElement.h:
2191
2192         * platform/audio/AudioSessionListener.h: Include <wtf/Noncopyable.h>.
2193         
2194         AudioSessionManager.* -> MediaSessionManager.*
2195         * platform/audio/AudioSessionManager.cpp: Removed.
2196         * platform/audio/AudioSessionManager.h: Removed.
2197         * platform/audio/MediaSessionManager.cpp: Copied from Source/WebCore/platform/audio/AudioSessionManager.cpp.
2198         (MediaSessionManagerToken::create):
2199         (MediaSessionManagerToken::MediaSessionManagerToken):
2200         (MediaSessionManagerToken::~MediaSessionManagerToken):
2201         (MediaSessionManager::sharedManager):
2202         (MediaSessionManager::MediaSessionManager):
2203         (MediaSessionManager::has):
2204         (MediaSessionManager::count):
2205         (MediaSessionManager::addToken):
2206         (MediaSessionManager::removeToken):
2207         (MediaSessionManager::updateSessionState):
2208         * platform/audio/MediaSessionManager.h: Copied from Source/WebCore/platform/audio/AudioSessionManager.h.
2209
2210         * platform/audio/mac/AudioDestinationMac.cpp:
2211         (WebCore::AudioDestinationMac::AudioDestinationMac): MediaSessionManagerToken::create() takes a
2212             client interface instead of the media type.
2213         * platform/audio/mac/AudioDestinationMac.h:
2214
2215         * platform/audio/mac/AudioSessionMac.cpp:
2216         * platform/audio/mac/AudioSessionManagerMac.cpp: Removed.
2217         * platform/audio/mac/MediaSessionManagerMac.cpp: Copied from Source/WebCore/platform/audio/mac/AudioSessionManagerMac.cpp.
2218         (MediaSessionManager::updateSessionState):
2219
2220 2013-12-23  Zan Dobersek  <zdobersek@igalia.com>
2221
2222         webkit gtk 2.2.3 stable tarball compilation error
2223         https://bugs.webkit.org/show_bug.cgi?id=125987
2224
2225         Reviewed by Gustavo Noronha Silva.
2226
2227         Only try including <gdk/gdkwayland.h> and using GDK_IS_WAYLAND_DISPLAY if the Wayland support has been
2228         enabled and when not compiling with GTK+ 2 (which occurs when building for libPlatformGtk2).
2229
2230         * platform/graphics/GLContext.cpp:
2231         (WebCore::GLContext::createContextForWindow):
2232
2233 2013-12-23  Piotr Grad  <p.grad@samsung.com>
2234
2235         [GStreamer] video/audio seeking is not unified.
2236         https://bugs.webkit.org/show_bug.cgi?id=125852
2237
2238         Reviewed by Philippe Normand.
2239
2240         This bug is fixing regression with seeking audio/video elements and unifies seeking
2241         in MediaPlayerPrivateGStreamer.
2242
2243         Test: media/video-seek-with-negative-playback.html
2244
2245         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2246         (WebCore::MediaPlayerPrivateGStreamer::seek):
2247         (WebCore::MediaPlayerPrivateGStreamer::seekIncludingRate):
2248         (WebCore::MediaPlayerPrivateGStreamer::setRate):
2249         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
2250         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2251
2252 2013-12-23  ChangSeok Oh  <changseok.oh@collabora.com>
2253
2254         [GTK][WK2] WebGL is not working with GLES
2255         https://bugs.webkit.org/show_bug.cgi?id=126138
2256
2257         Reviewed by Martin Robinson.
2258
2259         m_texture has been unnecessarily regenerated. It's generated in GraphicsContext3D
2260         constructor for offscreen rendering. And m_compositorTexture is used by only Mac port.
2261         They create it in their GraphicsContext3D constructor so that we don't need to recreate it
2262         in GC3DOpenGLES::reshapeFBOs.
2263
2264         No new tests since no functionality changed.
2265
2266         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2267         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2268         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2269         (WebCore::GraphicsContext3D::reshapeFBOs):
2270         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2271         (WebCore::GraphicsContext3D::reshapeFBOs):
2272
2273 2013-12-22  Benjamin Poulain  <bpoulain@apple.com>
2274
2275         Create a skeleton for CSS Selector code generation
2276         https://bugs.webkit.org/show_bug.cgi?id=126044
2277
2278         Reviewed by Antti Koivisto and Gavin Barraclough.
2279
2280         Add CSSCompiler, which provides the basic infrastructure to compile
2281         CSS Selectors on x86_64.
2282
2283         Compilation happens in two phases.
2284         1) The various matching and relation of each CSSSelector is aggregated into units
2285            matching a single element: SelectorFragment.
2286            SelectorFragment also knows about the relations between different fragments,
2287            and contains all the information to generate the code for a particular element.
2288         2) The compiler then goes over the fragments, and generate code based on the information
2289            of each fragment.
2290
2291         It the current state, SelectorCompiler only compiles the tag matching selectors and
2292         any of the relation between selectors.
2293
2294         Depending on the relation and position of a fragment, failure on traversal or matching
2295         does not necessarily causes the complete selector. A failure can cause matching to
2296         resume from the parent or the sibling of a previously visisted node.
2297         The implementation of this is done through the BacktrackingAction. In case of failure,
2298         the next starting state is setup and the program counter jumps back to the appropriate
2299         starting point.
2300
2301         When backtracking, the method used to save the starting point depends on the type
2302         of backtracking.
2303         The child/parent relation (">") is very common so it uses an additional register to keep
2304         the next starting point (m_descendantBacktrackingStart).
2305         The indirect sibling relation ("~") is much less common and uses the stack to save
2306         the next starting point.
2307
2308         * WebCore.xcodeproj/project.pbxproj:
2309         * cssjit/SelectorCompiler.cpp: Added.
2310         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
2311         (WebCore::SelectorCompiler::compileSelector):
2312         (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
2313         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2314         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
2315         (WebCore::SelectorCompiler::updateChainStates):
2316         (WebCore::SelectorCompiler::isFirstAncestor):
2317         (WebCore::SelectorCompiler::isFirstAdjacent):
2318         (WebCore::SelectorCompiler::isAfterChildRelation):
2319         (WebCore::SelectorCompiler::solveBacktrackingAction):
2320         (WebCore::SelectorCompiler::requiresAdjacentTail):
2321         (WebCore::SelectorCompiler::requiresDescendantTail):
2322         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
2323         (WebCore::SelectorCompiler::testIsElementFlagOnNode):
2324         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElement):
2325         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
2326         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAncestorTreeWalker):
2327         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToPreviousAdjacent):
2328         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
2329         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
2330         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
2331         (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
2332         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
2333         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
2334         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateBacktrackingTailsIfNeeded):
2335         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2336         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName):
2337         * cssjit/SelectorCompiler.h: Added.
2338         (WebCore::SelectorCompilationStatus::SelectorCompilationStatus):
2339         (WebCore::SelectorCompilationStatus::operator Status):
2340         (WebCore::SelectorCompiler::simpleSelectorCheckerFunction):
2341         (WebCore::SelectorCompiler::selectorCheckerFunctionWithCheckingContext):
2342         * dom/Element.cpp:
2343         (WebCore::Element::setChildrenAffectedByDirectAdjacentRules):
2344         (WebCore::Element::setChildrenAffectedByForwardPositionalRules):
2345         * dom/Element.h:
2346         (WebCore::Element::tagQNameMemoryOffset):
2347         (WebCore::Element::setChildrenAffectedByForwardPositionalRules):
2348         * dom/Node.h:
2349         (WebCore::Node::parentNodeMemoryOffset):
2350         (WebCore::Node::previousSiblingMemoryOffset):
2351         (WebCore::Node::nodeFlagsMemoryOffset):
2352         (WebCore::Node::flagIsElement):
2353         * dom/QualifiedName.h:
2354         (WebCore::QualifiedName::QualifiedNameImpl::localNameMemoryOffset):
2355         (WebCore::QualifiedName::QualifiedNameImpl::namespaceMemoryOffset):
2356         (WebCore::QualifiedName::implMemoryOffset):
2357
2358 2013-12-22  Mihnea Ovidenie  <mihnea@adobe.com>
2359
2360         [CSSRegions] Crash when trying to select content from invalid region
2361         https://bugs.webkit.org/show_bug.cgi?id=126113
2362
2363         Reviewed by Antti Koivisto.
2364
2365         After fix for https://bugs.webkit.org/show_bug.cgi?id=120769, positionForPoint for a region attempts to use the associated named flow to perform its task.
2366         However, this should happen only when the region is valid. If the region is invalid, part of a dependency cycle, positionForPoint should behave as usual
2367         for a block instead of a region, otherwise it may run into an infinite loop due to cyclic dependencies and a crash will occur.
2368
2369         This patch ensures that positionForPoint region specifie behaviour is followed only if the region is valid - not part of a dependency cycle.
2370
2371         Test: fast/regions/selection/invalid-region-selection-crash.html
2372
2373         * rendering/RenderRegion.cpp:
2374         (WebCore::RenderRegion::positionForPoint):
2375
2376 2013-12-21  Dirk Schulze  <krit@webkit.org>
2377
2378         Start refactoring Filter code to reuse CachedSVGDocument for clipPath
2379         https://bugs.webkit.org/show_bug.cgi?id=126069
2380
2381         Reviewed by Andreas Kling.
2382
2383         Smaller refactoring of the CSS filter style resolver code. Previously the code
2384         requested the FilterOperations list from RenderStyle and compared the content
2385         in this list with an internal map. Then the resource loading was triggered.
2386         With the refactoring we do not request the list from RenderStyle anymore but
2387         rely on the hash map data entirely.
2388
2389         * css/StyleResolver.cpp:
2390         (WebCore::StyleResolver::loadPendingSVGDocuments):
2391         * platform/graphics/filters/FilterOperation.h:
2392
2393 2013-12-20  Andy Estes  <aestes@apple.com>
2394
2395         [Mac] Soft-link WebContentAnalysis.framework
2396         https://bugs.webkit.org/show_bug.cgi?id=126102
2397
2398         Reviewed by Dan Bernstein.
2399
2400         * Configurations/WebCore.xcconfig: There's no need to modify LDFLAGS
2401         now that we don't hard link against WebContentAnalysis.framework.
2402         * WebCore.xcodeproj/project.pbxproj: Removed
2403         WebContentAnalysis.framework from the 'Link Binary with Libraries'
2404         build phase.
2405         * platform/mac/ContentFilterMac.mm: Soft-linked
2406         WebContentAnalysis.framework and the WebFilterEvaluator @class.
2407         (WebCore::ContentFilter::ContentFilter): Called getWebFilterEvaluatorClass().
2408         (WebCore::ContentFilter::isEnabled): Ditto.
2409         * platform/mac/SoftLinking.h: Added an implementation of
2410         SOFT_LINK_PRIVATE_FRAMEWORK().
2411
2412 2013-12-21  Antti Koivisto  <antti@apple.com>
2413
2414         Unreviewed, rolling out r160916.
2415         http://trac.webkit.org/changeset/160916
2416         https://bugs.webkit.org/show_bug.cgi?id=126073
2417
2418         Roll out a temporary fix. The underlying issue was fixed.
2419
2420         * accessibility/AccessibilityRenderObject.cpp:
2421         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
2422         (WebCore::AccessibilityRenderObject::~AccessibilityRenderObject):
2423         (WebCore::AccessibilityRenderObject::detach):
2424         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2425         * accessibility/AccessibilityRenderObject.h:
2426
2427 2013-12-21  Antti Koivisto  <antti@apple.com>
2428
2429         Figure out if node is focusable without requiring renderer
2430         https://bugs.webkit.org/show_bug.cgi?id=126118
2431
2432         Reviewed by Andreas Kling.
2433
2434         * dom/Element.cpp:
2435         (WebCore::Element::computedStyle):
2436         
2437             Use inDocument() test instead of the attached() test. We can compute style for anything that
2438             is in document.
2439
2440         * dom/Node.cpp:
2441         (WebCore::Node::isContentEditable):
2442         (WebCore::Node::isContentRichlyEditable):
2443         (WebCore::Node::hasEditableStyle):
2444         
2445             Use computedStyle instead of getting the style from renderer. Computed style gets constructed
2446             on demand if renderer does not exist. If it does then the existing style is used.
2447
2448         (WebCore::Node::isEditableToAccessibility):
2449         (WebCore::Node::canStartSelection):
2450         (WebCore::Node::isRootEditableElement):
2451         (WebCore::Node::rootEditableElement):
2452         * dom/Node.h:
2453         (WebCore::Node::hasEditableStyle):
2454         (WebCore::Node::hasRichlyEditableStyle):
2455         
2456             Renamed from rendererIsEditable since these no longer require renderer.
2457
2458         (WebCore::HTMLElement::supportsFocus):
2459         
2460             Stop calling updateStyleIfNeeded() and forcing render tree construction.
2461
2462 2013-12-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2463
2464         [SOUP] ResourceHandleSoup should use async client callbacks when client uses async callbacks
2465         https://bugs.webkit.org/show_bug.cgi?id=126006
2466
2467         Reviewed by Martin Robinson.
2468
2469         This fixes WebKit2 loader client unit tests when using the network
2470         process.
2471
2472         * platform/network/ResourceHandle.cpp:
2473         * platform/network/soup/ResourceHandleSoup.cpp:
2474         (WebCore::doRedirect): Call willSendRequestAsync on the client
2475         when usesAsyncCallbacks returns true.
2476         (WebCore::nextMultipartResponsePartCallback): Call
2477         didReceiveResponseAsync on the client when usesAsyncCallbacks
2478         returns true.
2479         (WebCore::sendRequestCallback): Ditto.
2480         (WebCore::ResourceHandle::continueWillSendRequest): Empty
2481         implementation for now because the default one asserts.
2482         (WebCore::ResourceHandle::continueDidReceiveResponse): Ditto.
2483         (WebCore::ResourceHandle::continueShouldUseCredentialStorage): Ditto.
2484
2485 2013-12-20  Anders Carlsson  <andersca@apple.com>
2486
2487         Replace yield() and pauseBriefly() with std::this_thread::yield()
2488         https://bugs.webkit.org/show_bug.cgi?id=126105
2489
2490         Reviewed by Sam Weinig.
2491
2492         * platform/sql/SQLiteDatabase.cpp:
2493         (WebCore::SQLiteDatabase::interrupt):
2494
2495 2013-12-20  Ryosuke Niwa  <rniwa@webkit.org>
2496
2497         Assert that RootInlineBox::setLineBreakInfo should is never called on a RenderInline without line boxes
2498         https://bugs.webkit.org/show_bug.cgi?id=126101
2499
2500         Reviewed by Simon Fraser.
2501
2502         Merge assertions added in https://chromium.googlesource.com/chromium/blink/+/716ac74fd475b581d69c0aa8ec2d806201c3a420
2503
2504         The code change was not merged since we never hit the added assertion on the attached test case in WebKit.
2505
2506         * rendering/RootInlineBox.cpp:
2507         (WebCore::RootInlineBox::setLineBreakInfo):
2508
2509 2013-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2510
2511         Web Inspector: Remove the references to Node in InjectedScript
2512         https://bugs.webkit.org/show_bug.cgi?id=126091
2513
2514         Reviewed by Timothy Hatcher.
2515
2516         Remove the last DOM references from InjectedScript so that
2517         InjectedScript can move down into JavaScriptCore. The only
2518         remaining references were to Nodes, which are all just thin
2519         wrappers around existing functions. Move Node / JSNode (JSValue)
2520         conversion into InspectorDOMAgent, where it was used.
2521
2522         No new tests, no observable change in functionality.
2523
2524         * bindings/js/JSInjectedScriptHostCustom.cpp:
2525         * inspector/InjectedScript.cpp:
2526         (WebCore::InjectedScript::inspectObject):
2527         (WebCore::InjectedScript::releaseObject):
2528         * inspector/InjectedScript.h:
2529         * inspector/InjectedScriptHost.h:
2530         * inspector/InjectedScriptSource.js:
2531         * inspector/InspectorDOMAgent.cpp:
2532         (WebCore::InspectorDOMAgent::focusNode):
2533         (WebCore::InspectorDOMAgent::highlightNode):
2534         (WebCore::InspectorDOMAgent::requestNode):
2535         (WebCore::InspectorDOMAgent::nodeForObjectId):
2536         (WebCore::InspectorDOMAgent::resolveNode):
2537         (WebCore::InspectorDOMAgent::scriptValueAsNode):
2538         (WebCore::InspectorDOMAgent::nodeAsScriptValue):
2539         * inspector/InspectorDOMAgent.h:
2540         * inspector/PageConsoleAgent.cpp:
2541
2542 2013-12-20  Myles C. Maxfield  <mmaxfield@apple.com>
2543
2544         Faster implementation of text-decoration-skip: ink
2545         https://bugs.webkit.org/show_bug.cgi?id=125718
2546
2547         Reviewed by Simon Fraser.
2548
2549         This new implementation of text-decoration-skip: ink extracts
2550         each glyph into a path, then decomposes each path into a series
2551         of contours. It then intersects each contour with the top and
2552         bottom of the underline (by approximating the contour with a line).
2553         It then draws underlines in between these intersection regions.
2554
2555         Tests for text-decoration-skip: ink already exist in
2556         fast/css3-text/css3-text-decoration/text-decoration-skip
2557
2558         * platform/graphics/Font.h: Signature of new function
2559         * platform/graphics/mac/FontMac.mm:
2560         (WebCore::GlyphIterationState::GlyphIterationState): Persistent
2561         between calls to findPathIntersections
2562         (WebCore::findIntersectionPoint): Calculates an intersection point
2563         between two lines
2564         (WebCore::findPathIntersections): Called by CGPathApply to find
2565         intersections of each contour
2566         (WebCore::Font::intersectionPoints): Function to get the places
2567         where an underline would intersect a TextRun.
2568         * rendering/InlineTextBox.cpp:
2569         (WebCore::compareTuples): Used for sorting intersection ranges
2570         (WebCore::translateIntersectionPointsToSkipInkBoundaries): Converts
2571         a sequence of intersection points to the locations where
2572         text-decoration-skip: ink should draw underlines
2573         (WebCore::drawSkipInkUnderline): Draws a sequence of short underlines
2574         (WebCore::InlineTextBox::paintDecoration):
2575         * rendering/TextPainter.cpp:
2576         (WebCore::TextPainter::intersectionPoints): Calls Font::intersectionPoints
2577         * rendering/TextPainter.h:
2578
2579 2013-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2580
2581         Web Inspector: Give the CommandLineAPIModule its own Host object, making InjectedScriptHost viable for a JS Context
2582         https://bugs.webkit.org/show_bug.cgi?id=126082
2583
2584         Reviewed by Timothy Hatcher.
2585
2586         Extract CommandLineAPIHost from InjectedScriptHost. The command line API contained
2587         a bunch of DOM specific JavaScript that would not be suitable for a pure JavaScript
2588         environment. Now that the DOM related code is in this WebCore only module, give this
2589         module a host object that WebCore will provide.
2590
2591         No new tests, no observable change in functionality.
2592
2593         * CMakeLists.txt:
2594         * DerivedSources.cpp:
2595         * DerivedSources.make:
2596         * GNUmakefile.list.am:
2597         * UseJSC.cmake:
2598         * WebCore.vcxproj/WebCore.vcxproj:
2599         * WebCore.vcxproj/WebCore.vcxproj.filters:
2600         * WebCore.xcodeproj/project.pbxproj:
2601         * bindings/js/JSBindingsAllInOne.cpp:
2602         Add new files.
2603
2604         * bindings/js/JSCommandLineAPIHostCustom.cpp: Added.
2605         (WebCore::JSCommandLineAPIHost::inspectedObject):
2606         (WebCore::getJSListenerFunctions):
2607         (WebCore::JSCommandLineAPIHost::getEventListeners):
2608         (WebCore::JSCommandLineAPIHost::inspect):
2609         (WebCore::JSCommandLineAPIHost::databaseId):
2610         (WebCore::JSCommandLineAPIHost::storageId):
2611         * bindings/js/JSInjectedScriptHostCustom.cpp:
2612         * inspector/CommandLineAPIHost.cpp: Copied from Source/WebCore/inspector/InjectedScriptHost.cpp.
2613         (WebCore::CommandLineAPIHost::create):
2614         (WebCore::CommandLineAPIHost::CommandLineAPIHost):
2615         (WebCore::CommandLineAPIHost::~CommandLineAPIHost):
2616         (WebCore::CommandLineAPIHost::disconnect):
2617         (WebCore::CommandLineAPIHost::inspectImpl):
2618         (WebCore::CommandLineAPIHost::getEventListenersImpl):
2619         (WebCore::CommandLineAPIHost::clearConsoleMessages):
2620         (WebCore::CommandLineAPIHost::copyText):
2621         (WebCore::CommandLineAPIHost::InspectableObject::get):
2622         (WebCore::CommandLineAPIHost::addInspectedObject):
2623         (WebCore::CommandLineAPIHost::clearInspectedObjects):
2624         (WebCore::CommandLineAPIHost::inspectedObject):
2625         (WebCore::CommandLineAPIHost::databaseIdImpl):
2626         (WebCore::CommandLineAPIHost::storageIdImpl):
2627         * inspector/CommandLineAPIHost.h: Copied from Source/WebCore/inspector/InjectedScriptHost.h.
2628         (WebCore::CommandLineAPIHost::init):
2629         * inspector/CommandLineAPIHost.idl: Copied from Source/WebCore/inspector/InjectedScriptHost.idl.
2630         * inspector/CommandLineAPIModule.cpp:
2631         These are almost all pure copies from InjectedScriptHost files. Cleaned up a bit.
2632
2633         * inspector/InjectedScriptModule.h:
2634         * inspector/InjectedScriptModule.cpp:
2635         (WebCore::InjectedScriptModule::ensureInjected):
2636         Modules can now define a host object when they are getting injected.
2637
2638         (WebCore::CommandLineAPIModule::host):
2639         * inspector/CommandLineAPIModule.h:
2640         Provide a CommandLineAPIHost, host object.
2641
2642         * inspector/InjectedScriptCanvasModule.h:
2643         * inspector/InjectedScriptCanvasModule.cpp:
2644         (WebCore::InjectedScriptCanvasModule::host):
2645         No host object is needed for the CanvasModule.
2646
2647         * inspector/InjectedScriptSource.js:
2648         * inspector/CommandLineAPIModuleSource.js:
2649         When injecting a module, pass on an optional host object to
2650         the module's source. Move a little more code between the
2651         two files. The two files are very tightly coupled right now.
2652
2653         * inspector/InjectedScriptHost.cpp:
2654         (WebCore::InjectedScriptHost::create):
2655         * inspector/InjectedScriptHost.h:
2656         (WebCore::InjectedScriptHost::~InjectedScriptHost):
2657         (WebCore::InjectedScriptHost::InjectedScriptHost):
2658         * inspector/InjectedScriptHost.idl:
2659         Move any command line specific logic to CommandLineAPIHost classes.
2660
2661         * inspector/InjectedScriptManager.cpp:
2662         (WebCore::InjectedScriptManager::disconnect):
2663         * inspector/InjectedScriptManager.h:
2664         (WebCore::InjectedScriptManager::commandLineAPIHost):
2665         * inspector/InspectorConsoleAgent.cpp:
2666         (WebCore::InspectorConsoleAgent::addInspectedHeapObject):
2667         * inspector/InspectorController.cpp:
2668         (WebCore::InspectorController::InspectorController):
2669         * inspector/InspectorHeapProfilerAgent.cpp:
2670         (WebCore::InspectorHeapProfilerAgent::resetState):
2671         * inspector/InspectorProfilerAgent.cpp:
2672         (WebCore::InspectorProfilerAgent::resetState):
2673         * inspector/PageConsoleAgent.cpp:
2674         (WebCore::PageConsoleAgent::addInspectedNode):
2675         * inspector/PageInjectedScriptManager.cpp:
2676         (WebCore::PageInjectedScriptManager::PageInjectedScriptManager):
2677         (WebCore::PageInjectedScriptManager::disconnect):
2678         * inspector/PageInjectedScriptManager.h:
2679         * inspector/WorkerInspectorController.cpp:
2680         (WebCore::WorkerInspectorController::WorkerInspectorController):
2681         An InjectedScriptManager may optionally have a commandLineAPIHost object.
2682         If it does, initialize it, and send it messages.
2683
2684 2013-12-09  Myles C. Maxfield  <mmaxfield@apple.com>
2685
2686         Allow ImageBuffer to re-use IOSurfaces
2687         https://bugs.webkit.org/show_bug.cgi?id=125477
2688
2689         Reviewed by Geoff Garen.
2690
2691         This test adds a static class, ImageBufferBackingStoreCache, that vends
2692         IOSurfaces. It remembers IOSurfaces that have been returned to it until
2693         a configurable timeout.
2694
2695         The storage used by this class is in the form of a HashMap from a
2696         bucketed size to the IOSurface. There are many other data structures
2697         that could be used, but this implementation gives a 80% hit rate on
2698         normal browsing of some example sites with Canvas and
2699         text-decoration-skip: ink. Because the buckets are fairly
2700         small (rounding the width and height up to multiples of 8), traversing the
2701         bucket contents takes on average 2 steps. 
2702
2703         Test: fast/canvas/canvas-backing-store-reuse.html
2704
2705         * WebCore.xcodeproj/project.pbxproj: Added new caching class
2706         * platform/graphics/cg/ImageBufferBackingStoreCache.cpp: Added.
2707         (WebCore::createIOSurface): Moved from ImageBufferCG.cpp
2708         (WebCore::ImageBufferBackingStoreCache::timerFired): Forget the cache
2709         contents
2710         (WebCore::ImageBufferBackingStoreCache::schedulePurgeTimer):
2711         (WebCore::ImageBufferBackingStoreCache::get): Static getter
2712         (WebCore::ImageBufferBackingStoreCache::ImageBufferBackingStoreCache):
2713         (WebCore::ImageBufferBackingStoreCache::insertIntoCache): Memory-management
2714         creation function
2715         (WebCore::ImageBufferBackingStoreCache::takeFromCache): Memory-management
2716         deletion function
2717         (WebCore::ImageBufferBackingStoreCache::isAcceptableSurface): Does this cached
2718         IOSurface fit the bill?
2719         (WebCore::ImageBufferBackingStoreCache::tryTakeFromCache): Lookup
2720         a bucket and walk through its contents
2721         (WebCore::ImageBufferBackingStoreCache::getOrAllocate): Public function
2722         for clients who want a IOSurface from the cache
2723         (WebCore::ImageBufferBackingStoreCache::deallocate): Public
2724         function for clients to return an IOSurface to the pool
2725         * platform/graphics/cg/ImageBufferBackingStoreCache.h: Added.
2726         * platform/graphics/cg/ImageBufferCG.cpp: Update to use new cache
2727         (WebCore::ImageBuffer::ImageBuffer):
2728         (WebCore::ImageBuffer::~ImageBuffer):
2729
2730 2013-12-20  Simon Fraser  <simon.fraser@apple.com>
2731
2732         Change "threaded scrolling" terminology to "asynchronous scrolling"
2733         https://bugs.webkit.org/show_bug.cgi?id=126094
2734
2735         Reviewed by Tim Horton.
2736
2737         Rename ENABLE_THREADED_SCROLLING to ENABLE_ASYNC_SCROLLING, and change
2738         references to "main thread scrolling" to "synchronous scrolling".
2739         
2740         In a few places, functions with names like shouldUpdateScrollLayerPositionOnMainThread()
2741         were actually returning SynchronousScrollingReasons, so rename them appropriately.
2742
2743         * WebCore.exp.in:
2744         * page/FrameView.cpp:
2745         (WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling):
2746         (WebCore::FrameView::isRubberBandInProgress):
2747         (WebCore::FrameView::requestScrollPositionUpdate):
2748         (WebCore::FrameView::updatesScrollLayerPositionOnMainThread):
2749         (WebCore::FrameView::wheelEvent):
2750         * page/Page.cpp:
2751         (WebCore::Page::synchronousScrollingReasonsAsText):
2752         * page/Page.h:
2753         * page/scrolling/ScrollingCoordinator.cpp:
2754         (WebCore::ScrollingCoordinator::create):
2755         (WebCore::ScrollingCoordinator::ScrollingCoordinator):
2756         (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
2757         (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
2758         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
2759         (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
2760         (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
2761         (WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates):
2762         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
2763         * page/scrolling/ScrollingCoordinator.h:
2764         (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
2765         (WebCore::ScrollingCoordinator::setSynchronousScrollingReasons):
2766         * page/scrolling/ScrollingStateFixedNode.cpp:
2767         * page/scrolling/ScrollingStateFixedNode.h:
2768         * page/scrolling/ScrollingStateNode.cpp:
2769         * page/scrolling/ScrollingStateNode.h:
2770         * page/scrolling/ScrollingStateScrollingNode.cpp:
2771         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2772         (WebCore::ScrollingStateScrollingNode::setSynchronousScrollingReasons):
2773         (WebCore::ScrollingStateScrollingNode::dumpProperties):
2774         * page/scrolling/ScrollingStateScrollingNode.h: Awkward "ReasonsForSynchronousScrolling" to avoid
2775         conflict with the enum called SynchronousScrollingReasons.
2776         * page/scrolling/ScrollingStateStickyNode.cpp:
2777         * page/scrolling/ScrollingStateStickyNode.h:
2778         * page/scrolling/ScrollingStateTree.cpp:
2779         * page/scrolling/ScrollingStateTree.h:
2780         * page/scrolling/ScrollingThread.cpp:
2781         * page/scrolling/ScrollingThread.h:
2782         * page/scrolling/ScrollingTree.cpp:
2783         * page/scrolling/ScrollingTree.h:
2784         * page/scrolling/ScrollingTreeNode.cpp:
2785         * page/scrolling/ScrollingTreeNode.h:
2786         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2787         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
2788         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
2789         * page/scrolling/ScrollingTreeScrollingNode.h:
2790         (WebCore::ScrollingTreeScrollingNode::synchronousScrollingReasons):
2791         (WebCore::ScrollingTreeScrollingNode::shouldUpdateScrollLayerPositionSynchronously):
2792         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2793         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2794         (WebCore::ScrollingCoordinatorMac::setSynchronousScrollingReasons):
2795         (WebCore::ScrollingCoordinatorMac::commitTreeState):
2796         * page/scrolling/mac/ScrollingStateNodeMac.mm:
2797         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
2798         * page/scrolling/mac/ScrollingThreadMac.mm:
2799         * page/scrolling/mac/ScrollingTreeFixedNode.h:
2800         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
2801         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2802         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2803         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
2804         (WebCore::ScrollingTreeScrollingNodeMac::scrollPosition):
2805         (WebCore::ScrollingTreeScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
2806         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2807         (WebCore::logThreadedScrollingMode):
2808         * page/scrolling/mac/ScrollingTreeStickyNode.h:
2809         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
2810         * platform/Scrollbar.cpp:
2811         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
2812         * platform/graphics/TiledBacking.h:
2813         * platform/graphics/ca/mac/TileController.mm:
2814         (WebCore::TileController::TileController):
2815         (WebCore::TileController::updateTileCoverageMap):
2816         * platform/mac/MemoryPressureHandlerMac.mm:
2817         (WebCore::MemoryPressureHandler::releaseMemory):
2818         * rendering/RenderLayer.cpp:
2819         (WebCore::RenderLayer::setupFontSubpixelQuantization):
2820         * rendering/RenderLayerBacking.cpp:
2821         (WebCore::computeTileCoverage):
2822         * testing/Internals.cpp:
2823         (WebCore::Internals::mainThreadScrollingReasons):
2824         * testing/Internals.idl:
2825
2826 2013-12-20  Tim Horton  <timothy_horton@apple.com>
2827
2828         Revert r160327, r160273, and r160260.
2829
2830         We'll come up with something less aggressive, as this doesn't quite work.
2831
2832         * loader/cache/CachedImage.h:
2833         * loader/cache/CachedResource.h:
2834         * loader/cache/MemoryCache.cpp:
2835         (WebCore::MemoryCache::pruneLiveResourcesToSize):
2836         * platform/graphics/BitmapImage.cpp:
2837         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
2838         * platform/graphics/BitmapImage.h:
2839         * platform/graphics/Image.h:
2840
2841 2013-12-20  Anders Carlsson  <andersca@apple.com>
2842
2843         PostAttachCallbackDisabler should take a Document
2844         https://bugs.webkit.org/show_bug.cgi?id=126090
2845
2846         Reviewed by Andreas Kling.
2847
2848         suspendPostAttachCallbacks and resumePostAttachCallbacks always only get the document from the
2849         container node, so make them static member functions that take a Document&. Also, move PostAttachCallbackDisabler
2850         to Element.h in preparation for moving post attach callback handling to Element.
2851
2852         * dom/ContainerNode.cpp:
2853         (WebCore::ContainerNode::suspendPostAttachCallbacks):
2854         (WebCore::ContainerNode::resumePostAttachCallbacks):
2855         * dom/ContainerNode.h:
2856         * dom/Element.h:
2857         (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
2858         (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
2859         * style/StyleResolveTree.cpp:
2860         (WebCore::Style::attachRenderTree):
2861
2862 2013-12-20  Anders Carlsson  <andersca@apple.com>
2863
2864         Move scheduleSetNeedsStyleRecalc to HTMLFrameOwnerElement
2865         https://bugs.webkit.org/show_bug.cgi?id=126083
2866
2867         Reviewed by Antti Koivisto.
2868
2869         scheduleSetNeedsStyleRecalc is only ever called on HTMLFrameOwnerElement, so
2870         move it there, remove the Node implementation and make it non-virtual.
2871
2872         * dom/ContainerNode.cpp:
2873         * dom/ContainerNode.h:
2874         * dom/Node.h:
2875         * html/HTMLFrameOwnerElement.cpp:
2876         (WebCore::needsStyleRecalcCallback):
2877         (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc):
2878         * html/HTMLFrameOwnerElement.h:
2879
2880 2013-12-20  Andy Estes  <aestes@apple.com>
2881
2882         Remove an unneeded include of WebCoreSystemInterface.h.
2883
2884         Rubber-stamped by Dan Bernstein.
2885
2886         * platform/mac/ContentFilterMac.mm:
2887
2888 2013-12-20  Anders Carlsson  <andersca@apple.com>
2889
2890         Node post attach callbacks should use references
2891         https://bugs.webkit.org/show_bug.cgi?id=126081
2892
2893         Reviewed by Antti Koivisto.
2894
2895         * dom/ContainerNode.cpp:
2896         (WebCore::ContainerNode::queuePostAttachCallback):
2897         (WebCore::ContainerNode::dispatchPostAttachCallbacks):
2898         (WebCore::needsStyleRecalcCallback):
2899         (WebCore::ContainerNode::scheduleSetNeedsStyleRecalc):
2900         * dom/ContainerNode.h:
2901         * html/HTMLFormControlElement.cpp:
2902         (WebCore::focusPostAttach):
2903         (WebCore::HTMLFormControlElement::didAttachRenderers):
2904         (WebCore::updateFromElementCallback):
2905         (WebCore::HTMLFormControlElement::didRecalcStyle):
2906         * html/HTMLPlugInImageElement.cpp:
2907         (WebCore::HTMLPlugInImageElement::didAttachRenderers):
2908         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
2909         (WebCore::HTMLPlugInImageElement::startLoadingImageCallback):
2910         * html/HTMLPlugInImageElement.h:
2911
2912 2013-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2913
2914         Web Inspector: Extract CommandLineAPI into its own InjectedScriptModule
2915         https://bugs.webkit.org/show_bug.cgi?id=126038
2916
2917         Reviewed by Timothy Hatcher.
2918
2919         Only inject the CommandLineAPIModule once, when the InjectedScript
2920         is first created. This avoids running a small snippet of JavaScript
2921         to check if the module is loaded every time we fetch the InjectedScript.
2922
2923         * CMakeLists.txt:
2924         * GNUmakefile.list.am:
2925         * WebCore.vcxproj/WebCore.vcxproj:
2926         * WebCore.vcxproj/WebCore.vcxproj.filters:
2927         * WebCore.xcodeproj/project.pbxproj:
2928         * inspector/InspectorAllInOne.cpp:
2929         Add new files to the build.
2930
2931         * inspector/InjectedScriptManager.h:
2932         * inspector/InjectedScriptManager.cpp:
2933         (WebCore::InjectedScriptManager::createForPage):
2934         (WebCore::InjectedScriptManager::injectedScriptFor):
2935         (WebCore::InjectedScriptManager::didCreateInjectedScript):
2936         Add didCreateInjectedScript hook for a subclass to inject more scripts.
2937
2938         * inspector/PageInjectedScriptManager.h: Added.
2939         * inspector/PageInjectedScriptManager.cpp: Added.
2940         (WebCore::PageInjectedScriptManager::didCreateInjectedScript):
2941         For pages, inject the CommandLineAPIModule.
2942
2943         * inspector/PageRuntimeAgent.cpp:
2944         (WebCore::PageRuntimeAgent::injectedScriptForEval):
2945         This is replaced by PageInjectedScriptManager, we no longer need
2946         to do extra work every time we fetch the injectedScriptForEval.
2947
2948 2013-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2949
2950         Web Inspector: Extract CommandLineAPI into its own InjectedScriptModule
2951         https://bugs.webkit.org/show_bug.cgi?id=126038
2952
2953         Reviewed by Timothy Hatcher.
2954
2955         No tests, no observable change in behavior.
2956
2957         Move the CommandLineAPI source into its own module. Load the module
2958         in InjectedScripts for WebCore::Pages. Not for workers.
2959
2960         Moving CommandLineAPI into it's own module moves it from being inside
2961         the same anonymous function to being evaluated outside the anonymous
2962         function. To connect the two InjectedScript passes itself to the
2963         injected module, and the CommandLineAPI module places its class on the
2964         injectedScript as injectedScript.CommandLineAPI.
2965
2966         This essentially makes the CommandLineAPI module an InjectedScript
2967         extension. InjectedScriptSource checks for the existence of
2968         this.CommandLineAPI to see if the fuller version is available. Otherwise
2969         it falls back to a BasicCommandLineAPI which only exposes "$_",
2970         which is the "last evaluated result". That will be useful for JS Contexts
2971         and Workers.
2972
2973         At the same time, this patch makes InjectedScriptModule more generic,
2974         to support being used in a pure JavaScript environment, meaning one
2975         without "window" as the global object.
2976
2977         * CMakeLists.txt:
2978         * DerivedSources.make:
2979         * GNUmakefile.am:
2980         * GNUmakefile.list.am:
2981         * WebCore.vcxproj/WebCore.vcxproj:
2982         * WebCore.vcxproj/WebCore.vcxproj.filters:
2983         * WebCore.xcodeproj/project.pbxproj:
2984         * inspector/InspectorAllInOne.cpp:
2985         Add files. Minify the CommandLineAPIModuleSource in generation.
2986
2987         * inspector/CommandLineAPIModule.h: Added.
2988         * inspector/CommandLineAPIModule.cpp: Added.
2989         (WebCore::CommandLineAPIModule::CommandLineAPIModule):
2990         (WebCore::CommandLineAPIModule::injectIfNeeded):
2991         (WebCore::CommandLineAPIModule::source):
2992         Inject the module that doesn't return an object, its just evaluated code
2993         extending the original InjectedScript.
2994
2995         * inspector/InjectedScriptModule.h:
2996         * inspector/InjectedScriptModule.cpp:
2997         (WebCore::InjectedScriptModule::ensureInjected):
2998         Only ASSERT the result was an object if the Module claims it returns an object.
2999
3000         * inspector/InjectedScriptCanvasModule.h:
3001         (WebCore::InjectedScriptCanvasModule::returnsObject):
3002         Return an object used later to call into the CanvasModule.
3003
3004         * inspector/PageRuntimeAgent.cpp:
3005         (WebCore::PageRuntimeAgent::injectedScriptForEval):
3006         Ensure the CommandLineAPIModule is loaded in the Page's InjectedScript.
3007
3008         * inspector/CommandLineAPIModuleSource.js: Added.
3009         Create the CommandLineAPI class and place it on injectedScript.
3010
3011         * inspector/InjectedScriptSource.js:
3012         (InjectedScript.prototype._evaluateOn):
3013         Inject either the BasicCommandLineAPI or extended CommandLineAPI.
3014         Derive the globalObject dynamically instead of assuming window.
3015         Inject the commandLineAPI on window.console or the globalObject based on context.
3016         Audit and rename uses of "window" to something like globalObject.
3017
3018 2013-12-20  Tim Horton  <timothy_horton@apple.com>
3019
3020         WebKit2 View Gestures: Implement smartMagnifyWithEvent: and make it work
3021         https://bugs.webkit.org/show_bug.cgi?id=125752
3022         <rdar://problem/15664245>
3023
3024         Reviewed by Anders Carlsson.
3025
3026         * WebCore.exp.in:
3027         Add some exports.
3028
3029 2013-12-20  Antti Koivisto  <antti@apple.com>
3030
3031         http/tests/misc/object-image-error.html asserts
3032         https://bugs.webkit.org/show_bug.cgi?id=126074
3033
3034         Reviewed by Andreas Kling.
3035
3036         * html/HTMLPlugInImageElement.cpp:
3037         (WebCore::HTMLPlugInImageElement::didAttachRenderers):
3038         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
3039         (WebCore::HTMLPlugInImageElement::startLoadingImage):
3040         (WebCore::HTMLPlugInImageElement::startLoadingImageCallback):
3041         * html/HTMLPlugInImageElement.h:
3042         
3043             Start image load from post-attach so we don't re-enter attach when image load fails synchronously.
3044
3045 2013-12-20  Antti Koivisto  <antti@apple.com>
3046
3047         Crashes in AccessibilityRenderObject::computeAccessibilityIsIgnored()
3048         https://bugs.webkit.org/show_bug.cgi?id=126073
3049
3050         Reviewed by Ryosuke Niwa.
3051
3052         Prevent the crash and try to catch in debug why it is happening.
3053
3054         * accessibility/AccessibilityRenderObject.cpp:
3055         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
3056         (WebCore::AccessibilityRenderObject::~AccessibilityRenderObject):
3057         (WebCore::AccessibilityRenderObject::detach):
3058         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3059         * accessibility/AccessibilityRenderObject.h:
3060
3061 2013-12-20  Antti Koivisto  <antti@apple.com>
3062
3063         Fix asserting accesibility tests.
3064
3065         * html/HTMLElement.cpp:
3066         (WebCore::HTMLElement::supportsFocus): Accessibility code checks focus status during painting.
3067
3068 2013-12-20  Zan Dobersek  <zdobersek@igalia.com>
3069
3070         Unreviewed GTK build fix after r160909.
3071         Remove remaining uses of AttachLazily in code specific to the GTK port.
3072
3073         * html/shadow/MediaControlsGtk.cpp:
3074         (WebCore::MediaControlsGtk::initializeControls):
3075         (WebCore::MediaControlsGtk::createTextTrackDisplay):
3076
3077 2013-12-19  Antti Koivisto  <antti@apple.com>
3078
3079         Create render tree lazily
3080         https://bugs.webkit.org/show_bug.cgi?id=120685
3081
3082         Reviewed by Andreas Kling.
3083
3084         We currently recompute style and construct renderer for each DOM node immediately after they are added to 
3085         the tree. This is often inefficient as the style may change immediately afterwards and the work needs to be
3086         redone. 
3087         
3088         With this patch we always compute style and construct render tree lazily, either on style recalc timer or
3089         synchronously when they are needed. It also removes the 'attached' bit. If document has render tree then
3090         all nodes are conceptually "attached" even if this happens lazily.
3091         
3092         The patch slightly changes behavior of implicit CSS transitions. A synchronous style change during parsing
3093         may not trigger the animation anymore as laziness means we don't see anything changing. This matches Firefox
3094         and Chrome in our test cases.
3095         
3096         * WebCore.exp.in:
3097         * bindings/js/JSNodeCustom.cpp:
3098         (WebCore::JSNode::insertBefore):
3099         (WebCore::JSNode::replaceChild):
3100         (WebCore::JSNode::appendChild):
3101         
3102             All attaching is now lazy, remove AttachLazily.
3103
3104         * css/CSSComputedStyleDeclaration.cpp:
3105         (WebCore::ComputedStyleExtractor::propertyValue):
3106         
3107             SVG renderers with !isValid() have empty display property value for some reason. Keep the behavior.
3108
3109         * dom/ContainerNode.cpp:
3110         (WebCore::ContainerNode::insertBefore):
3111         (WebCore::ContainerNode::parserInsertBefore):
3112         (WebCore::ContainerNode::replaceChild):
3113         (WebCore::ContainerNode::appendChild):
3114         (WebCore::ContainerNode::parserAppendChild):
3115         (WebCore::ContainerNode::updateTreeAfterInsertion):
3116         * dom/ContainerNode.h:
3117         * dom/Document.cpp:
3118         (WebCore::Document::~Document):
3119         (WebCore::Document::updateStyleIfNeeded):
3120         (WebCore::Document::createRenderTree):
3121         (WebCore::Document::destroyRenderTree):
3122         
3123             Remove attach bit maintenance.
3124
3125         (WebCore::Document::webkitDidExitFullScreenForElement):
3126         
3127             Do lazy render tree reconstruction after returning from full screen. That is the only reliable way
3128             to get the render tree back to decent shape.
3129
3130         * dom/Element.cpp:
3131         (WebCore::Element::isFocusable):
3132         
3133             Remove pointless !renderer()->needsLayout() assert.
3134
3135         (WebCore::Element::addShadowRoot):
3136         (WebCore::Element::childShouldCreateRenderer):
3137         (WebCore::Element::resetComputedStyle):
3138         
3139             Take care to reset computed style in all descendants. attachRenderTree no longer does this.
3140
3141         * dom/Element.h:
3142         * dom/Node.cpp:
3143         (WebCore::Node::insertBefore):
3144         (WebCore::Node::replaceChild):
3145         (WebCore::Node::appendChild):
3146         (WebCore::Node::setNeedsStyleRecalc):
3147         
3148             Propagate ReconstructRenderTree.
3149
3150         (WebCore::Node::attached):
3151         
3152             Emulate the behavior of old attached bit for now so existing code calling this mostly stays working.
3153
3154         * dom/Node.h:
3155         
3156             Add new ReconstructRenderTree value for StyleChangeType.
3157
3158         * dom/Range.cpp:
3159         (WebCore::Range::isPointInRange):
3160         (WebCore::Range::comparePoint):
3161         (WebCore::Range::compareNode):
3162         (WebCore::Range::intersectsNode):
3163         * editing/AppendNodeCommand.cpp:
3164         (WebCore::AppendNodeCommand::doApply):
3165         * editing/CompositeEditCommand.cpp:
3166         (WebCore::CompositeEditCommand::canRebalance):
3167         * editing/InsertNodeBeforeCommand.cpp:
3168         (WebCore::InsertNodeBeforeCommand::doApply):
3169         * html/HTMLDetailsElement.cpp:
3170         (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
3171         * html/HTMLDocument.cpp:
3172         (WebCore::HTMLDocument::activeElement):
3173         * html/HTMLElement.cpp:
3174         (WebCore::HTMLElement::setInnerText):
3175         
3176             TextControlInnerTextElement always preserves newline even if it doesn't have style yet.
3177
3178         (WebCore::HTMLElement::supportsFocus):
3179         * html/HTMLEmbedElement.cpp:
3180         (WebCore::HTMLEmbedElement::parseAttribute):
3181         * html/HTMLFormControlElement.cpp:
3182         (WebCore::shouldAutofocus):
3183         
3184             Don't autofocus until we have renderer.
3185
3186         * html/HTMLFormControlElementWithState.cpp:
3187         (WebCore::HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState):
3188         * html/HTMLFrameElementBase.cpp:
3189         (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions):
3190         * html/HTMLInputElement.cpp:
3191         (WebCore::HTMLInputElement::updateType):
3192         
3193             Lazy render tree construction.
3194
3195         (WebCore::HTMLInputElement::parseAttribute):
3196         (WebCore::HTMLInputElement::defaultEventHandler):
3197         * html/HTMLMediaElement.cpp:
3198         (WebCore::HTMLMediaElement::parseAttribute):
3199         * html/HTMLObjectElement.cpp:
3200         (WebCore::HTMLObjectElement::parseAttribute):
3201         * html/HTMLSummaryElement.cpp:
3202         (WebCore::HTMLSummaryElement::didAddUserAgentShadowRoot):
3203         * html/parser/HTMLConstructionSite.cpp:
3204         (WebCore::executeTask):
3205         
3206             Don't attach renderer after construction.
3207
3208         * html/parser/HTMLTreeBuilder.cpp:
3209         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
3210         * html/shadow/ContentDistributor.cpp:
3211         (WebCore::ContentDistributor::invalidateDistribution):
3212         * html/shadow/InsertionPoint.cpp:
3213         (WebCore::InsertionPoint::willAttachRenderers):
3214         (WebCore::InsertionPoint::willDetachRenderers):
3215         * html/shadow/MediaControlElements.cpp:
3216         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
3217         * html/shadow/MediaControls.cpp:
3218         (WebCore::MediaControls::createTextTrackDisplay):
3219         * html/shadow/MediaControlsApple.cpp:
3220         (WebCore::MediaControlsApple::createControls):
3221         * html/track/TextTrackCue.cpp:
3222         (WebCore::TextTrackCue::getDisplayTree):
3223         * loader/PlaceholderDocument.cpp:
3224         (WebCore::PlaceholderDocument::createRenderTree):
3225         * loader/cache/CachedResourceLoader.cpp:
3226         (WebCore::CachedResourceLoader::preload):
3227         * style/StyleResolveTree.cpp:
3228         (WebCore::Style::attachTextRenderer):
3229         (WebCore::Style::detachTextRenderer):
3230         
3231             Remove attached bit maintenance.
3232
3233         (WebCore::Style::attachChildren):
3234         (WebCore::Style::attachShadowRoot):
3235         (WebCore::Style::attachRenderTree):
3236         (WebCore::Style::detachShadowRoot):
3237         (WebCore::Style::detachRenderTree):
3238         (WebCore::Style::resolveLocal):
3239         * svg/SVGTests.cpp:
3240         (WebCore::SVGTests::handleAttributeChange):
3241         
3242             Make lazy.
3243
3244         * testing/Internals.cpp:
3245         (WebCore::Internals::attached):
3246         (WebCore::Internals::elementRenderTreeAsText):
3247         (WebCore::Internals::markerAt):
3248         (WebCore::Internals::nodesFromRect):
3249
3250 2013-12-20  Andreas Kling  <akling@apple.com>
3251
3252         Devirtualize RenderElement::setStyle().
3253         <https://webkit.org/b/126065>
3254
3255         setStyle() was only virtual in order to let RenderSVGBlock override
3256         the display type in some cases. Devirtualized it and moved the fixup
3257         logic to StyleResolver::adjustRenderStyle().
3258
3259         This hack had an evil twin in RenderElement::initializeStyle() that
3260         also goes away. FIXME--!
3261
3262         Based on a Blink change by Elliott Sprehn.
3263
3264         Reviewed by Antti Koivisto.
3265
3266 2013-12-20  Radu Stavila  <stavila@adobe.com>
3267
3268         [CSS Regions] When changing flow-from/flow-into on :hover, elements overflowing the region are not correctly repainted
3269         https://bugs.webkit.org/show_bug.cgi?id=117259
3270
3271         Reviewed by Antti Koivisto.
3272
3273         When computing the repaint rect for a region, the existing visual overflow must be taken into consideration.
3274         For this purpose, I overridden the visualOverflowRect method in RenderNamedFlowFragment, which ends up being
3275         called from RenderBox::clippedOverflowRectForRepaint. 
3276
3277         Test: fast/regions/hover-single-flow-from-none-overflow.html
3278               fast/regions/hover-single-flow-from-none-overflow-top.html
3279
3280         * rendering/RenderNamedFlowFragment.cpp:
3281         (WebCore::RenderNamedFlowFragment::visualOverflowRect):
3282         * rendering/RenderNamedFlowFragment.h:
3283
3284 2013-12-20  Mario Sanchez Prada  <mario.prada@samsung.com>
3285
3286         Programmatically-inserted children lack accessibility events
3287         https://bugs.webkit.org/show_bug.cgi?id=100275
3288
3289         Reviewed by Chris Fleizach.
3290
3291         Test: accessibility/children-changed-sends-notification.html
3292
3293         Emit children-changed::add and children-changed::remove whenever
3294         an object has been added/removed to the accessibility hierarchy,
3295         that is, when a new AtkObject is being attached/detached.
3296
3297         * accessibility/AXObjectCache.h:
3298         (WebCore::AXObjectCache::detachWrapper): Added a new parameter and
3299         updated all the prototypes in different ports.
3300         * accessibility/AXObjectCache.cpp:
3301         (WebCore::AXObjectCache::~AXObjectCache): Call detachWrapper()
3302         specifying that we do it because the cache is being destroyed.
3303         (WebCore::AXObjectCache::remove): Call detachWrapper() specifying
3304         that we do it because an accessible element is being destroyed.
3305
3306         * accessibility/atk/AXObjectCacheAtk.cpp:
3307         (WebCore::AXObjectCache::detachWrapper): Emit the children-changed
3308         signal when needed. We rely on the cached reference to the parent
3309         AtkObject (using the implementation of atk_object_get_parent from
3310         the AtkObject class) to find the right object to emit the signal
3311         from here, since the accessibility hierarchy from WebCore will no
3312         longer be accessible at this point.
3313         (WebCore::AXObjectCache::attachWrapper): Emit the children-change
3314         signal from here unless we are in the middle of a layout update,
3315         trying to provide as much information (e.g. the offset) as possible.
3316         (WebCore::AXObjectCache::postPlatformNotification): Make sure we
3317         update (touch) the subtree under an accessibility object whenever
3318         we receive AXChildrenChanded from WebCore, to ensure that those
3319         objects will also be visible rightaway to ATs, and that those get
3320         properly notified of the event at that very same moment.
3321
3322         * accessibility/ios/AXObjectCacheIOS.mm:
3323         (WebCore::AXObjectCache::detachWrapper): Updated function signature.
3324         * accessibility/mac/AXObjectCacheMac.mm:
3325         (WebCore::AXObjectCache::detachWrapper): Ditto.
3326         * accessibility/win/AXObjectCacheWin.cpp:
3327         (WebCore::AXObjectCache::detachWrapper): Ditto.
3328
3329         * accessibility/AccessibilityObject.cpp:
3330         (WebCore::AccessibilityObject::children): Add the option ot
3331         request the AccessibilityChildrenVector without updating it if
3332         needed, to avoid maybe recreating the child subtree when trying to
3333         get the offset of a newly attached element from attachWrapper.
3334         * accessibility/AccessibilityObject.h:
3335
3336 2013-12-20  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
3337
3338         Move function calls outside loop in dom
3339         https://bugs.webkit.org/show_bug.cgi?id=125916
3340
3341         Reviewed by Csaba Osztrogonác.
3342
3343         Do not call length() in each iteration.
3344
3345         * dom/Element.cpp:
3346         (WebCore::Element::cloneAttributesFromElement):
3347         * dom/Node.cpp:
3348         (WebCore::Node::dumpStatistics):
3349
3350 2013-12-19  Beth Dakin  <bdakin@apple.com>
3351
3352         REGRESSION: cnn.com will continue to reveal 1 px of overhang after rubber-banding 
3353         at the top
3354         https://bugs.webkit.org/show_bug.cgi?id=126054
3355
3356         Reviewed by Simon Fraser.
3357
3358         This regression was caused by http://trac.webkit.org/changeset/160791 It turns out 
3359         that the line of code I removed was not always a no-op. In some instances, like on 
3360         cnn.com, it would ensure that our final scroll position after a rubber-band was 
3361         not something within the overhang area. It was still wrong in its assumption that 
3362         rubber-band is always bouncing back the spot it originated from. So this patch 
3363         continues to ignore the rubber-bands origin, and instead finds the nearest point 
3364         that is not in the overhang area, and scrolls to that point instead of the origin.
3365
3366         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
3367         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
3368         (WebCore::ScrollingTreeScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary):
3369         * platform/mac/ScrollAnimatorMac.h:
3370         * platform/mac/ScrollAnimatorMac.mm:
3371         (WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
3372         * platform/mac/ScrollElasticityController.h:
3373         * platform/mac/ScrollElasticityController.mm:
3374         (WebCore::ScrollElasticityController::snapRubberBandTimerFired):
3375
3376 2013-12-19  Simon Fraser  <simon.fraser@apple.com>
3377
3378         Clarify the behavior of composited canvases
3379         https://bugs.webkit.org/show_bug.cgi?id=126042
3380
3381         Reviewed by Tim Horton.
3382
3383         Different platforms composite 2D and 3D canvases in different ways.
3384         
3385         "Accelerated 2D" canvases, and WebGL are always set as GraphicsLayer
3386         contents.
3387         
3388         "IOSurface" canvases (Mac and iOS-only) get a compositing layer, but
3389         paint into it (because this is fast, and a convenient way to get
3390         synchronization).
3391         
3392         So make these behaviors explicit in RenderLayerBacking and RenderLayerCompositor.
3393         No behavior changes on OS X, bug fix on iOS.
3394
3395         * rendering/RenderLayerBacking.cpp:
3396         (WebCore::canvasCompositingStrategy):
3397         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
3398         (WebCore::RenderLayerBacking::containsPaintedContent):
3399         (WebCore::RenderLayerBacking::contentChanged):
3400         * rendering/RenderLayerBacking.h:
3401         * rendering/RenderLayerCompositor.cpp:
3402         (WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
3403
3404 2013-12-19  Joseph Pecoraro  <pecoraro@apple.com>
3405
3406         Web Inspector: Add InspectorFrontendHost.debuggableType to let the frontend know it's backend is JavaScript or Web
3407         https://bugs.webkit.org/show_bug.cgi?id=126016
3408
3409         Reviewed by Timothy Hatcher.
3410
3411         * inspector/InspectorFrontendHost.cpp:
3412         (WebCore::InspectorFrontendHost::debuggableType):
3413         * inspector/InspectorFrontendHost.h:
3414         * inspector/InspectorFrontendHost.idl:
3415         Expose the debuggableType to the frontend. In WebCore it is always a "web" type.
3416
3417 2013-12-19  Benjamin Poulain  <benjamin@webkit.org>
3418
3419         Add an utility class to simplify generating function calls
3420         https://bugs.webkit.org/show_bug.cgi?id=125972
3421
3422         Reviewed by Geoffrey Garen.
3423
3424         FunctionCall is a little helper class to make function calls from the JIT
3425         in 3 or 4 lines.
3426
3427         FunctionCall takes a StackAllocator, a RegisterAllocator and a function pointer.
3428         When the call is generated, the helper saves the registers as necessary, aligns
3429         the stack, does the call, restores the stack, and restore the registers.
3430
3431         * cssjit/FunctionCall.h: Added.
3432         (WebCore::FunctionCall::FunctionCall):
3433         (WebCore::FunctionCall::setFunctionAddress):
3434         (WebCore::FunctionCall::setFirstArgument):
3435         (WebCore::FunctionCall::call):
3436
3437         (WebCore::FunctionCall::callAndBranchOnCondition): Most test functions used
3438         with FunctionCall return a boolean. When the boolean is the sole purpose of the function
3439         call, this provides an easy way to branch on the boolean without worrying about registers.
3440
3441         The return register is tested first, then all the saved registers are restored from the stack
3442         (which can include the return register), finally the flags are used for a jump.
3443
3444         (WebCore::FunctionCall::prepareAndCall):
3445         (WebCore::FunctionCall::cleanupPostCall):
3446         (WebCore::FunctionCall::saveAllocatedRegisters):
3447         (WebCore::FunctionCall::restoreAllocatedRegisters):
3448         * WebCore.xcodeproj/project.pbxproj:
3449         * cssjit/FunctionCall.h: Added.
3450         (WebCore::FunctionCall::FunctionCall):
3451         (WebCore::FunctionCall::setFunctionAddress):
3452         (WebCore::FunctionCall::setFirstArgument):
3453         (WebCore::FunctionCall::call):
3454         (WebCore::FunctionCall::callAndBranchOnCondition):
3455         (WebCore::FunctionCall::prepareAndCall):
3456         (WebCore::FunctionCall::cleanupPostCall):
3457         (WebCore::FunctionCall::saveAllocatedRegisters):
3458         (WebCore::FunctionCall::restoreAllocatedRegisters):
3459
3460 2013-12-19  Anders Carlsson  <andersca@apple.com>
3461
3462         Begin stubbing out the KeyedDecoder class
3463     &