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