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