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