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