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