Replace 0 timeouts g_timeout_add() by g_idle_add()
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-10-28  Bastien Nocera <hadess@hadess.net>
2
3         Replace 0 timeouts g_timeout_add() by g_idle_add()
4         https://bugs.webkit.org/show_bug.cgi?id=123260
5
6         Reviewed by Carlos Garcia Campos.
7
8         A zero timeout should be equivalent to using g_idle_add_full(G_PRIORITY_DEFAULT, ...)
9         without the nagging feeling that the wrong API was used.
10
11         No new tests, no change in functionality.
12
13         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Use g_idle_add() instead
14         of 0-timer.
15         (WebCore::MediaPlayerPrivateGStreamer::videoChanged):
16         (WebCore::MediaPlayerPrivateGStreamer::audioChanged):
17         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: Ditto.
18         (WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
19         (WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
20         * platform/gtk/GtkDragAndDropHelper.cpp: Ditto.
21         (WebCore::GtkDragAndDropHelper::handleDragLeave):
22
23 2013-10-28  Zan Dobersek  <zdobersek@igalia.com>
24
25         Re-enable simple line layout for GTK
26         https://bugs.webkit.org/show_bug.cgi?id=123388
27
28         Reviewed by Andreas Kling.
29
30         * rendering/SimpleLineLayout.cpp:
31         (WebCore::SimpleLineLayout::canUseFor): 8-bit TextRun support is now enabled for the GTK port, so the port
32         can use the simple line layout.
33
34 2013-10-27  Andreas Kling  <akling@apple.com>
35
36         Fix 4 asserting SVG tests after r158097.
37
38         RenderElement::setStyle() is, quite surprisingly, a virtual function
39         with a single override in RenderSVGBlock.
40         To match the old behavior, we have to rewrite the display type from
41         any inline type to block instead.
42
43         * rendering/RenderElement.cpp:
44         (WebCore::RenderElement::initializeStyle):
45
46 2013-10-27  Andreas Kling  <akling@apple.com>
47
48         Tone down overzealous assertion from r158097.
49
50         RenderElement::initializeStyle() really only cares that there are no
51         text renderers that we should be calling styleDidChange() on.
52
53         Tweak the code to only check that there are no text children.
54
55         * rendering/RenderElement.cpp:
56         (WebCore::RenderElement::initializeStyle):
57
58 2013-10-27  Antti Koivisto  <antti@apple.com>
59
60         Enable center and right text alignment for simple lines
61         https://bugs.webkit.org/show_bug.cgi?id=123398
62
63         Reviewed by Andreas Kling.
64
65         Support text-align:center and text-align:right on simple line layout path.
66
67         * rendering/SimpleLineLayout.cpp:
68         (WebCore::SimpleLineLayout::canUseFor):
69         
70             text-align:justify is still not supported.
71
72         (WebCore::SimpleLineLayout::computeLineLeft):
73         (WebCore::SimpleLineLayout::createLines):
74         
75             Do a rounding dance that matches the line boxes.
76
77         * rendering/SimpleLineLayout.h:
78         
79             Add left position to lines.
80
81         * rendering/SimpleLineLayoutResolver.h:
82         (WebCore::SimpleLineLayout::Resolver::Line::rect):
83         
84             We now do rounding during layout.
85
86         (WebCore::SimpleLineLayout::Resolver::Line::baseline):
87
88 2013-10-27  Andreas Kling  <akling@apple.com>
89
90         Renderers should receive their style at construction.
91         <https://webkit.org/b/123396>
92
93         Pass the RenderStyle to all non-text renderer constructors.
94         After construction, initializeStyle() must be called (as a stopgap
95         measure) until we are able to do style-derived initialization
96         without virtual function calls.
97
98         With this change, RenderElement::m_style is never null. Subsequent
99         patches will add enforcement for this and also make style() return
100         a RenderStyle&.
101
102         I'm adding three FIXME's in this patch:
103
104             - createRendererIfNeeded() calls AnimationController to set up
105               the initial style manually instead of asking RenderElement's
106               setAnimatedStyle() to do it. This can probably be done in a
107               nicer way, but it's not clear yet how.
108
109             - ImageContentData::createRenderer() does a bit of unnecessary
110               work. This should be easy to clean up but got too distracting
111               to be part of this patch.
112
113             - Document::createRenderTree() creates the RenderView with an
114               initial dummy RenderStyle. I've done this because resolving
115               the document style assumes we already have a RenderView.
116
117         For styleWillChange() implementations to detect that they are
118         reacting to the initial style, I've added a hasInitializedStyle()
119         function on RenderElement. This will return false until you've
120         called initializeStyle() on the renderer. This should go away
121         along with initializeStyle() eventually.
122
123         Reviewed by Antti Koivisto.
124
125 2013-10-26  Tim Horton  <timothy_horton@apple.com>
126
127         [mac] Remove WebTiledLayer
128         https://bugs.webkit.org/show_bug.cgi?id=123395
129
130         Reviewed by Anders Carlsson.
131
132         Mac doesn't use CATiledLayer at all anymore. We have to keep
133         LayerTypeTiledLayer around for Windows, for now, but we can
134         get rid of WebTiledLayer and some related Mac-specific code.
135
136         No new tests, just removing dead code.
137
138         * WebCore.xcodeproj/project.pbxproj:
139         Remove WebTiledLayer.*
140
141         * platform/graphics/ca/PlatformCALayer.h:
142         * platform/graphics/ca/mac/PlatformCALayerMac.h:
143         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
144         (PlatformCALayerMac::PlatformCALayerMac):
145         Remove synchronouslyDisplayTilesInRect, which was only used for WebTiledLayer on Mac.
146         Remove WebTiledLayer instantiation and setup code.
147
148         * platform/graphics/mac/WebTiledLayer.h: Removed.
149         * platform/graphics/mac/WebTiledLayer.mm: Removed.
150
151 2013-10-26  Andreas Kling  <akling@apple.com>
152
153         CTTE: RenderImageResourceStyleImage always has a StyleImage.
154         <https://webkit.org/b/123390>
155
156         Codify the fact that RenderImageResourceStyleImage always wraps an
157         existing StyleImage object.
158
159         Reviewed by Antti Koivisto.
160
161 2013-10-26  Antti Koivisto  <antti@apple.com>
162
163         Revert some accidental changes.
164
165         * css/CSSFontFaceSource.cpp:
166         (WebCore::CSSFontFaceSource::getFontData):
167         * css/CSSFontSelector.cpp:
168         * css/CSSFontSelector.h:
169
170 2013-10-26  Mark Lam  <mark.lam@apple.com>
171
172         Gardening: fixed broken build.
173         https://bugs.webkit.org/show_bug.cgi?id=123354.
174
175         * css/CSSFontSelector.h:
176
177 2013-10-26  Antti Koivisto  <antti@apple.com>
178
179         fast/frames/seamless/seamless-nested-crash.html asserts on wk2 only
180         https://bugs.webkit.org/show_bug.cgi?id=123354
181
182         Reviewed by Andreas Kling.
183
184         * rendering/SimpleLineLayout.cpp:
185         (WebCore::SimpleLineLayout::canUseFor):
186         
187             Don't enable simple line layout if the primary font is loading. The code expects
188             to use the primary font metrics for all lines but those won't match the fallbacks
189             when font is not loaded.
190
191 2013-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
192
193         [GTK] Deprecate public dispatch_event method in objects implementing EventTarget interface
194         https://bugs.webkit.org/show_bug.cgi?id=123261
195
196         Reviewed by Gustavo Noronha Silva.
197
198         The interface function should be used instead.
199
200         * bindings/scripts/CodeGeneratorGObject.pm:
201         (GetFunctionDeprecationInformation): Helper function to return the
202         version when the function was deprecated and the function
203         replacing the deprecated one.
204         (GenerateFunction): Check if the function is deprecated to mark it
205         as such in the header and API docs.
206         * bindings/scripts/gobject-generate-headers.pl: Replace the unused
207         WEBKIT_OBSOLETE_API macro with new macros to mark function as
208         deprecated, using the glib macros so that we don't need checks for
209         the platform.
210         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
211         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
212         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
213         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
214         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
215         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
216         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
217         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
218         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
219         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
220         * bindings/scripts/test/GObject/WebKitDOMattribute.h:
221
222 2013-10-25  Mark Lam  <mark.lam@apple.com>
223
224         DatabaseManager's ProposedDatabases need to be thread-safe.
225         https://bugs.webkit.org/show_bug.cgi?id=123313.
226
227         Reviewed by Geoffrey Garen.
228
229         No new tests.
230
231         * Modules/webdatabase/DatabaseManager.cpp:
232         (WebCore::DatabaseManager::DatabaseManager):
233         (WebCore::DatabaseManager::existingDatabaseContextFor):
234         (WebCore::DatabaseManager::registerDatabaseContext):
235         (WebCore::DatabaseManager::unregisterDatabaseContext):
236         (WebCore::DatabaseManager::didConstructDatabaseContext):
237         (WebCore::DatabaseManager::didDestructDatabaseContext):
238         (WebCore::DatabaseManager::openDatabaseBackend):
239         (WebCore::DatabaseManager::addProposedDatabase):
240         (WebCore::DatabaseManager::removeProposedDatabase):
241         (WebCore::DatabaseManager::fullPathForDatabase):
242         (WebCore::DatabaseManager::detailsForNameAndOrigin):
243         * Modules/webdatabase/DatabaseManager.h:
244
245 2013-10-25  Joseph Pecoraro  <pecoraro@apple.com>
246
247         Upstream ENABLE(REMOTE_INSPECTOR) and enable on iOS and Mac
248         https://bugs.webkit.org/show_bug.cgi?id=123111
249
250         Reviewed by Timothy Hatcher.
251
252         * Configurations/FeatureDefines.xcconfig:
253         * WebCore.exp.in:
254
255 2013-10-25  Hans Muller  <hmuller@adobe.com>
256
257         [CSS Shapes] CORS-enabled fetch for shape image values
258         https://bugs.webkit.org/show_bug.cgi?id=123114
259
260         Reviewed by Andreas Kling.
261
262         Access to shape images is now controlled by CORS CSS shape per
263         http://dev.w3.org/csswg/css-shapes/#shape-outside-property.
264         Previously shape images had to be same-origin.
265
266         Shape image URL access is defined by the same logic that defines
267         canvas tainting: same-origin and data URLs are allowed and images
268         with a "Access-Control-Allow-Origin:" header that's either "*" or
269         that matches the document's origin.
270
271         A PotentiallyCrossOriginEnabled RequestOriginPolicy was added to
272         ResourceLoaderOptions, to indicate that a "potentially CORS-enabled fetch"
273         was to be undertaken. The CSSImageValue::cachedImage() method handles this
274         option by effectively setting the "Origin:" request header (see
275         updateRequestForAccessControl() in CrossOriginAccessControl.cpp).
276         StyleResolver::loadPendingShapeImage() uses the new ResourceLoaderOption.
277
278         The static ShapeInsideInfo and ShapeOutsideInfo isEnabledFor() method
279         now performs the CORS check for image valued shapes. The private
280         isOriginClean() method from CanvasRenderingContext2D has been moved to
281         the CachedImage class so that it can be shared by the Canvas and Shape
282         implementations. It checks the response headers per the CORS spec.
283
284         Test: http/tests/security/shape-image-cors.html
285
286         * css/CSSImageValue.cpp:
287         (WebCore::CSSImageValue::cachedImage): Handle the new ResourceLoaderOption.
288         * css/StyleResolver.cpp:
289         (WebCore::StyleResolver::loadPendingShapeImage): Set the new ResourceLoaderOption.
290         * html/canvas/CanvasRenderingContext2D.cpp:
291         (WebCore::CanvasRenderingContext2D::createPattern): Use the CachedImage::isOriginClean().
292         * loader/ResourceLoaderOptions.h: Added PotentiallyCrossOriginEnabled to RequestOriginPolicy.
293         * loader/cache/CachedImage.cpp:
294         (WebCore::CachedImage::isOriginClean): Migrated from CanvasRenderingContext2D.
295         * loader/cache/CachedImage.h:
296         * rendering/shapes/ShapeInfo.cpp:
297         (WebCore::::checkImageOrigin): Do the CORS check and log an error message if neccessary.
298         * rendering/shapes/ShapeInfo.h:
299         * rendering/shapes/ShapeInsideInfo.cpp:
300         (WebCore::ShapeInsideInfo::isEnabledFor): Call checkImageOrigin() for images.
301         * rendering/shapes/ShapeOutsideInfo.cpp:
302         (WebCore::ShapeOutsideInfo::isEnabledFor): Ditto.
303
304 2013-10-25  Jer Noble  <jer.noble@apple.com>
305
306         [MSE] Fix runtime errors caused by mediasource IDL attributes.
307         https://bugs.webkit.org/show_bug.cgi?id=123352
308
309         Reviewed by Eric Carlson.
310
311         Due to http://webkit.org/b/123178, MediaSource classes must add a GenerateIsReachable
312         (and also a JSGenerateToJSObject) attribute to avoid runtime asserts and crashes.
313
314         * Modules/mediasource/MediaSource.idl:
315         * Modules/mediasource/SourceBuffer.idl:
316         * Modules/mediasource/SourceBufferList.idl:
317         * Modules/mediasource/WebKitMediaSource.idl:
318         * Modules/mediasource/WebKitSourceBufferList.idl:
319
320 2013-10-25  Jacky Jiang  <zhajiang@blackberry.com>
321
322         [BlackBerry] Browser crashed at PlatformGraphicsContext::addDrawLineForText() when trying to upload a video to youtube
323         https://bugs.webkit.org/show_bug.cgi?id=123349
324
325         Reviewed by George Staikos.
326         Internally reviewed by George Staikos, Konrad Piascik, Eli Fidler and Arvid Nilsson.
327
328         Browser crashed when dereferencing null PlatformGraphicsContext*.
329         In FrameView::paintControlTints(), we intentionally constructed GraphicsContext
330         with null PlatformGraphicsContext* and disabled painting by doing
331         context.setUpdatingControlTints(true). So we should not go further in
332         GraphicsContext::drawLineForText() if painting is disabled.
333         Check paintingDisabled() for the other functions in PathBlackBerry.cpp
334         as well; otherwise, it is likely we will crash at those places.
335
336         * platform/graphics/blackberry/PathBlackBerry.cpp:
337         (WebCore::GraphicsContext::fillPath):
338         (WebCore::GraphicsContext::strokePath):
339         (WebCore::GraphicsContext::drawLine):
340         (WebCore::GraphicsContext::drawLineForDocumentMarker):
341         (WebCore::GraphicsContext::drawLineForText):
342         (WebCore::GraphicsContext::clip):
343         (WebCore::GraphicsContext::clipPath):
344         (WebCore::GraphicsContext::canvasClip):
345         (WebCore::GraphicsContext::clipOut):
346
347 2013-10-25  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
348
349         Adding platform implementation of MediaStreamTrack
350         https://bugs.webkit.org/show_bug.cgi?id=123301
351
352         Reviewed by Eric Carlson.
353
354         No new tests needed.
355
356         * CMakeLists.txt:
357         * Modules/mediastream/AudioStreamTrack.cpp:
358         (WebCore::AudioStreamTrack::create): Create method now receives a MediaStreamTrackPrivate as parameter.
359
360         (WebCore::AudioStreamTrack::AudioStreamTrack):
361         * Modules/mediastream/AudioStreamTrack.h:
362         * Modules/mediastream/MediaStream.cpp:
363         (WebCore::MediaStream::MediaStream): Constructor now iterates through a set of MediaStreamTrackPrivate
364         instances to create each MediaStreamTrack of MediaStream.
365
366         (WebCore::MediaStream::addRemoteSource): Calling AudioStreamTrack and VideoStreamTrack with
367         MediaStreamTrackPrivate as parameter.
368
369         * Modules/mediastream/MediaStreamTrack.cpp:
370         (WebCore::MediaStreamTrack::MediaStreamTrack): Constructor now receives a MediaStreamTrackPrivate, instead of a
371         MediaStreamSource.
372
373         (WebCore::MediaStreamTrack::~MediaStreamTrack):
374         (WebCore::MediaStreamTrack::kind): Calling method from MediaStreamTrackPrivate.
375
376         (WebCore::MediaStreamTrack::setSource): Ditto.
377
378         (WebCore::MediaStreamTrack::id): Ditto.
379
380         (WebCore::MediaStreamTrack::label): Ditto.
381
382         (WebCore::MediaStreamTrack::enabled): Ditto.
383
384         (WebCore::MediaStreamTrack::setEnabled): Ditto.
385
386         (WebCore::MediaStreamTrack::muted): Ditto.
387
388         (WebCore::MediaStreamTrack::readonly): Ditto.
389
390         (WebCore::MediaStreamTrack::remote): Ditto.
391
392         (WebCore::MediaStreamTrack::readyState): Ditto.
393
394         (WebCore::MediaStreamTrack::states):
395         (WebCore::MediaStreamTrack::capabilities):
396         (WebCore::MediaStreamTrack::clone):
397         (WebCore::MediaStreamTrack::stopProducingData):
398         (WebCore::MediaStreamTrack::ended): Ditto.
399
400         (WebCore::MediaStreamTrack::sourceStateChanged): Ditto.
401
402         (WebCore::MediaStreamTrack::sourceMutedChanged): Ditto.
403
404         (WebCore::MediaStreamTrack::sourceEnabledChanged): Ditto.
405         (WebCore::MediaStreamTrack::configureTrackRendering):
406         (WebCore::MediaStreamTrack::stopped): Ditto.
407
408         (WebCore::MediaStreamTrack::trackDidEnd): Setting Ended ready state in MediaStreamTrackPrivate.
409
410         (WebCore::MediaStreamTrack::trackReadyStateChanged): Dispatches Live or Ended event.
411
412         (WebCore::MediaStreamTrack::trackMutedChanged): Dispatches Muted event.
413
414         * Modules/mediastream/MediaStreamTrack.h: Now inheriting from MediaStreamTrackPrivateClient.
415
416         (WebCore::MediaStreamTrack::source): Calling method from MediaStreamTrackPrivate.
417         (WebCore::MediaStreamTrack::privateTrack):
418         * Modules/mediastream/VideoStreamTrack.cpp:
419         (WebCore::VideoStreamTrack::create):
420         (WebCore::VideoStreamTrack::VideoStreamTrack): Create method now receives a MediaStreamTrackPrivate as parameter.
421         * Modules/mediastream/VideoStreamTrack.h:
422         * platform/mediastream/MediaStreamDescriptor.cpp:
423         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Stores the private tracks in a Vector (property of
424         MediaStreamDescriptor class).
425
426         (WebCore::MediaStreamDescriptor::addTrack): Adds a private track to the tracks' Vector
427
428         (WebCore::MediaStreamDescriptor::removeTrack): Removes a private track from the tracks' Vector
429
430         * platform/mediastream/MediaStreamDescriptor.h:
431         (WebCore::MediaStreamDescriptor::numberOfAudioSources): Renamed from numberOfAudioStreams.
432
433         (WebCore::MediaStreamDescriptor::audioSources): Renamed from audioStreams.
434
435         (WebCore::MediaStreamDescriptor::numberOfVideoSources): Renamed from numberOfVideoStreams.
436
437         (WebCore::MediaStreamDescriptor::videoSources): Renamed from videoStreams.
438
439         (WebCore::MediaStreamDescriptor::numberOfAudioTracks): Returns the number of audio tracks this MediaStreamDescriptor
440         has.
441
442         (WebCore::MediaStreamDescriptor::audioTracks): Returns a audio track, given an index
443
444         (WebCore::MediaStreamDescriptor::numberOfVideoTracks): Returns the number of video tracks this MediaStreamDescriptor
445         has.
446         (WebCore::MediaStreamDescriptor::videoTracks): Returns a video track, given an index
447         * platform/mediastream/MediaStreamTrackPrivate.cpp: Added.
448         * platform/mediastream/MediaStreamTrackPrivate.h: Added.
449
450 2013-10-25  Zoltan Horvath  <zoltan@webkit.org>
451
452         [CSS Regions][CSS Shapes] Update updateShapeAndSegmentsForCurrentLineInFlowThread to deal better with multiple regions
453         <https://webkit.org/b/123210>
454
455         Reviewed by David Hyatt.
456
457         I simplified the determination of the next region part of updateShapeAndSegmentsForCurrentLineInFlowThread's implementation
458         in order to make the code more straightforward. I also tried to avoid using regionAtBlockOffset(...) function where it's possible,
459         since it's not always that reliable, what I'll will report in a separate bug.
460
461         No new tests, covered by existing tests.
462
463         * rendering/RenderBlockLineLayout.cpp:
464         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
465
466 2013-10-25  Zoltan Horvath  <zoltan@webkit.org>
467
468         [CSS Regions][CSS Shapes] Update updateShapeAndSegmentsForCurrentLineInFlowThread to deal better with the first lines
469         <https://bugs.webkit.org/show_bug.cgi?id=123275>
470
471         Reviewed by David Hyatt.
472
473         We have a complex condition in updateShapeAndSegmentsForCurrentLineInFlowThread, which is
474         adjusting the first line to the shape's top. This patch adds two boolean to make that clear.
475
476         No new tests, no behavior change.
477
478         * rendering/RenderBlockLineLayout.cpp:
479         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
480
481 2013-10-25  Antti Koivisto  <antti@apple.com>
482
483         Faster way for simple line layout to check if text has fallback fonts
484         https://bugs.webkit.org/show_bug.cgi?id=123342
485
486         Reviewed by Andreas Kling.
487         
488         Don't use RenderText::knownToHaveNoOverflowAndNoFallbackFonts as it is slow.
489
490         Simple text code path test already guarantees there is no overflow. Test for fallback
491         fonts explicitly.
492
493         * platform/graphics/SimpleFontData.h:
494         
495             Make FINAL.
496
497         * rendering/RenderText.cpp:
498         * rendering/RenderText.h:
499         
500             Remove knownToHaveNoOverflowAndNoFallbackFonts() as it has no clients.
501
502         * rendering/SimpleLineLayout.cpp:
503         (WebCore::SimpleLineLayout::canUseFor):
504         
505             Check if all characters can be found from the primary font.
506
507 2013-10-25  Andreas Kling  <akling@apple.com>
508
509         SVGResourcesCache::clientDestroyed() should take a RenderElement&.
510         <https://webkit.org/b/123339>
511
512         This function is always called with an object, and that object
513         is guaranteed to never be a text renderer.
514
515         Reviewed by Antti Koivisto.
516
517 2013-10-25  Andreas Kling  <akling@apple.com>
518
519         SVGResourcesCache::clientLayoutChanged() should take a RenderElement&.
520         <https://webkit.org/b/123336>
521
522         This function is always called with an object, and that object
523         is guaranteed to never be a text renderer.
524
525         Reviewed by Antti Koivisto.
526
527 2013-10-25  Andreas Kling  <akling@apple.com>
528
529         SVGResourcesCache::clientStyleChanged() should take a RenderElement&.
530         <https://webkit.org/b/123335>
531
532         This function is always called with an object, and that object
533         is guaranteed to never be a text renderer.
534
535         Reviewed by Antti Koivisto.
536
537 2013-10-25  Andreas Kling  <akling@apple.com>
538
539         SVG: postApplyResource() should take a RenderElement&.
540         <https://webkit.org/b/123334>
541
542         This function is always called with an object, and that object
543         is guaranteed to never be a text renderer.
544
545         Reviewed by Antti Koivisto.
546
547 2013-10-25  Antti Koivisto  <antti@apple.com>
548
549         REGRESSION(r157950): It made many tests assert on Windows, EFL, GTK
550         https://bugs.webkit.org/show_bug.cgi?id=123309
551
552         Reviewed by Andreas Kling.
553
554         Disable simple line layout on non-Mac plaforms for now.
555
556         * rendering/SimpleLineLayout.cpp:
557         (WebCore::SimpleLineLayout::canUseFor):
558
559 2013-10-24  Andreas Kling  <akling@apple.com>
560
561         SVG: applyResource() should take a RenderElement&.
562         <https://webkit.org/b/123286>
563
564         This function is always called with an object, and that object
565         is guaranteed to never be a text renderer.
566
567         Reviewed by Antti Koivisto.
568
569 2013-10-25  Andreas Kling  <akling@apple.com>
570
571         RenderElement::styleWillChange() should pass newStyle as reference.
572         <https://webkit.org/b/123332>
573
574         When styleWillChange() is called, there is always a new style getting
575         set so there's no need to handle the null style case.
576         This flushed out a couple of unnecessary checks.
577
578         Reviewed by Antti Koivisto.
579
580 2013-10-25  peavo@outlook.com  <peavo@outlook.com>
581
582         [WinCairo] Compile fixes.
583         https://bugs.webkit.org/show_bug.cgi?id=123269
584
585         Reviewed by Csaba Osztrogonác.
586
587         * platform/graphics/win/ImageCairoWin.cpp: Added new parameter to BitmapImage::draw() calls.
588         (WebCore::BitmapImage::getHBITMAPOfSize):
589         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
590
591 2013-10-25  Sergio Villar Senin  <svillar@igalia.com>
592
593         Use a Vector instead of HashSet to computed the orderValues in RenderFlexibleBox
594         https://bugs.webkit.org/show_bug.cgi?id=118620
595
596         Reviewed by Antti Koivisto.
597
598         Turns out that order is extremelly uncommon so using a Vector is
599         much less expensive. This also special-cases the much common case
600         of only having order of value 0 by using Vectors with just one
601         preallocated member.
602
603         Also added the performance test that shows a ~1% win when using a
604         vector instead of the HashSet.
605
606         * rendering/RenderFlexibleBox.cpp:
607         (WebCore::RenderFlexibleBox::OrderIterator::setOrderValues):
608         (WebCore::RenderFlexibleBox::layoutBlock):
609         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
610         * rendering/RenderFlexibleBox.h:
611
612 2013-10-25  Sergio Villar Senin  <svillar@igalia.com>
613
614         Non-SVG build broken after r157950
615         https://bugs.webkit.org/show_bug.cgi?id=123328
616
617         Reviewed by Xan Lopez.
618
619         The isSVGInlineTest() check should be done only if SVG is enabled.
620
621         * rendering/SimpleLineLayout.cpp:
622         (WebCore::SimpleLineLayout::canUseFor):
623
624 2013-10-24  Jer Noble  <jer.noble@apple.com>
625
626         [Mac] Add helper methods to convert CMTime <--> MediaTime
627         https://bugs.webkit.org/show_bug.cgi?id=123285
628
629         Reviewed by Eric Carlson.
630
631         Add utility methods to convert between CMTime (a rational time class) and MediaTime.
632         Once there, PlatformClockCM can now vend and accept MediaTimes for currentTime.
633
634         * platform/mac/MediaTimeMac.h:
635         * platform/mac/MediaTimeMac.cpp:
636         (WebCore::toMediaTime): Added conversion utility method.
637         (WebCore::toCMTime): Ditto.
638
639         * platform/mac/PlatformClockCM.h:
640         * platform/mac/PlatformClockCM.mm:
641         (PlatformClockCM::setCurrentMediaTime): Added.
642         (PlatformClockCM::currentMediaTime): Added.
643
644         * WebCore.xcodeproj/project.pbxproj: Add new files to project.
645
646 2013-10-24  Mark Rowe  <mrowe@apple.com>
647
648         Remove references to OS X 10.7 from Xcode configuration settings.
649
650         Now that we're not building for OS X 10.7 they're no longer needed.
651
652         Reviewed by Anders Carlsson.
653
654
655         * Configurations/Base.xcconfig:
656         * Configurations/DebugRelease.xcconfig:
657         * Configurations/FeatureDefines.xcconfig:
658         * Configurations/Version.xcconfig:
659
660 2013-10-24  Antti Koivisto  <antti@apple.com>
661
662         Cache line layout path
663         https://bugs.webkit.org/show_bug.cgi?id=123298
664
665         Reviewed by Sam Weinig.
666         
667         Determining the path can be non-trivial. Avoid computing it repeatedly on relayouts.
668
669         * rendering/RenderBlock.cpp:
670         (WebCore::RenderBlock::RenderBlock):
671         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
672         (WebCore::RenderBlock::invalidateLineLayoutPath):
673         (WebCore::RenderBlock::removeChild):
674         
675             Invalidate the path when children change.
676
677         * rendering/RenderBlock.h:
678         * rendering/RenderBlockFlow.cpp:
679         (WebCore::RenderBlockFlow::layoutInlineChildren):
680         (WebCore::RenderBlockFlow::styleDidChange):
681         
682             Invalidate the path when style changes.
683
684         (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
685         (WebCore::RenderBlockFlow::ensureLineBoxes):
686         * rendering/RenderText.cpp:
687         (WebCore::RenderText::setText):
688         
689             Invalidate the path when text changes.
690
691 2013-10-24  Mark Rowe  <mrowe@apple.com>
692
693         <rdar://problem/15312643> Prepare for the mysterious future.
694
695         Reviewed by David Kilzer.
696
697
698         * Configurations/Base.xcconfig:
699         * Configurations/DebugRelease.xcconfig:
700         * Configurations/FeatureDefines.xcconfig:
701         * Configurations/Version.xcconfig:
702
703 2013-10-24  Andreas Kling  <akling@apple.com>
704
705         DocumentLoader::cachedResourceLoader() should return a reference.
706         <https://webkit.org/b/123303>
707
708         ..and while we're at it, make DocumentLoader::m_cachedResourceLoader
709         a Ref, and have CachedResourceLoader::create return a PassRef.
710
711         Reviewed by Sam Weinig.
712
713 2013-10-24  Anders Carlsson  <andersca@apple.com>
714
715         Stop bringing in the std namespace
716         https://bugs.webkit.org/show_bug.cgi?id=123273
717
718         Reviewed by Andreas Kling.
719
720         * Modules/webaudio/AudioBufferSourceNode.cpp:
721         (WebCore::AudioBufferSourceNode::renderFromBuffer):
722         (WebCore::AudioBufferSourceNode::startGrain):
723         (WebCore::AudioBufferSourceNode::totalPitchRate):
724         * Modules/webaudio/AudioNodeInput.cpp:
725         (WebCore::AudioNodeInput::numberOfChannels):
726         * Modules/webaudio/AudioParamTimeline.cpp:
727         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
728         * Modules/webaudio/AudioScheduledSourceNode.cpp:
729         (WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
730         (WebCore::AudioScheduledSourceNode::stop):
731         * Modules/webaudio/AudioSummingJunction.cpp:
732         * Modules/webaudio/DelayDSPKernel.cpp:
733         (WebCore::DelayDSPKernel::process):
734         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
735         (WebCore::OfflineAudioDestinationNode::offlineRender):
736         * Modules/webaudio/OscillatorNode.cpp:
737         * Modules/webaudio/PannerNode.cpp:
738         (WebCore::PannerNode::dopplerRate):
739         * Modules/webaudio/WaveShaperDSPKernel.cpp:
740         (WebCore::WaveShaperDSPKernel::processCurve):
741         * Modules/webdatabase/DatabaseTracker.cpp:
742         (WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
743         * Modules/websockets/WebSocket.cpp:
744         (WebCore::saturateAdd):
745         * Modules/websockets/WebSocketChannel.cpp:
746         * Modules/websockets/WebSocketFrame.cpp:
747         (WebCore::WebSocketFrame::parseFrame):
748         * accessibility/AccessibilityARIAGrid.cpp:
749         * accessibility/AccessibilityARIAGridCell.cpp:
750         * accessibility/AccessibilityARIAGridRow.cpp:
751         * accessibility/AccessibilityList.cpp:
752         * accessibility/AccessibilityListBox.cpp:
753         * accessibility/AccessibilityListBoxOption.cpp:
754         * accessibility/AccessibilityNodeObject.cpp:
755         * accessibility/AccessibilityObject.cpp:
756         * accessibility/AccessibilityRenderObject.cpp:
757         * accessibility/AccessibilityTable.cpp:
758         (WebCore::AccessibilityTable::addChildren):
759         * accessibility/AccessibilityTableCell.cpp:
760         * accessibility/AccessibilityTableColumn.cpp:
761         * accessibility/AccessibilityTableHeaderContainer.cpp:
762         * accessibility/AccessibilityTableRow.cpp:
763         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
764         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
765         (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
766         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
767         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
768         * bindings/js/JSGeolocationCustom.cpp:
769         (WebCore::setTimeout):
770         (WebCore::setMaximumAge):
771         * bindings/js/ScriptController.cpp:
772         * bindings/js/SerializedScriptValue.cpp:
773         (WebCore::writeLittleEndian):
774         (WebCore::CloneSerializer::write):
775         (WebCore::CloneDeserializer::deserialize):
776         (WebCore::CloneDeserializer::readString):
777         * css/CSSComputedStyleDeclaration.cpp:
778         (WebCore::ComputedStyleExtractor::propertyValue):
779         * css/CSSFontSelector.cpp:
780         (WebCore::CSSFontSelector::getFontFace):
781         * css/CSSGradientValue.cpp:
782         (WebCore::CSSRadialGradientValue::createGradient):
783         * css/CSSParser.cpp:
784         (WebCore::CSSParser::parseValue):
785         (WebCore::CSSParser::parseColorParameters):
786         (WebCore::CSSParser::parseHSLParameters):
787         * css/CSSReflectValue.cpp:
788         * css/DeprecatedStyleBuilder.cpp:
789         (WebCore::ApplyPropertyFontSize::applyValue):
790         * css/PropertySetCSSStyleDeclaration.cpp:
791         * css/SVGCSSParser.cpp:
792         * css/StylePropertySet.cpp:
793         (WebCore::StylePropertySet::getLayeredShorthandValue):
794         * css/StyleResolver.cpp:
795         (WebCore::StyleResolver::viewportPercentageValue):
796         * dom/CharacterData.cpp:
797         (WebCore::CharacterData::parserAppendData):
798         * dom/ContainerNode.cpp:
799         * dom/Document.cpp:
800         (WebCore::Document::minimumLayoutDelay):
801         * dom/Node.cpp:
802         (WebCore::Node::compareDocumentPosition):
803         * dom/Range.cpp:
804         (WebCore::Range::toString):
805         (WebCore::Range::textRects):
806         (WebCore::Range::textQuads):
807         * dom/ScriptedAnimationController.cpp:
808         (WebCore::ScriptedAnimationController::scheduleAnimation):
809         * dom/StyledElement.cpp:
810         (WebCore::StyledElement::makePresentationAttributeCacheKey):
811         * dom/Text.cpp:
812         * dom/ViewportArguments.cpp:
813         (WebCore::clampLengthValue):
814         (WebCore::clampScaleValue):
815         (WebCore::ViewportArguments::resolve):
816         (WebCore::computeMinimumScaleFactorForContentContained):
817         (WebCore::restrictMinimumScaleFactorToViewportSize):
818         * editing/AlternativeTextController.cpp:
819         * editing/ApplyStyleCommand.cpp:
820         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
821         * editing/CompositeEditCommand.cpp:
822         (WebCore::CompositeEditCommand::deleteInsignificantText):
823         * editing/Editor.cpp:
824         (WebCore::Editor::setComposition):
825         (WebCore::Editor::compositionRange):
826         * editing/EditorCommand.cpp:
827         (WebCore::verticalScrollDistance):
828         * editing/TextIterator.cpp:
829         (WebCore::TextIterator::handleTextNode):
830         (WebCore::TextIterator::handleTextBox):
831         (WebCore::CharacterIterator::string):
832         (WebCore::SearchBuffer::SearchBuffer):
833         (WebCore::SearchBuffer::append):
834         (WebCore::SearchBuffer::prependContext):
835         (WebCore::SearchBuffer::search):
836         * editing/VisibleUnits.cpp:
837         (WebCore::startOfParagraph):
838         * editing/htmlediting.cpp:
839         * editing/markup.cpp:
840         * fileapi/FileReaderLoader.cpp:
841         (WebCore::FileReaderLoader::didReceiveResponse):
842         (WebCore::FileReaderLoader::didReceiveData):
843         * history/BackForwardList.cpp:
844         (WebCore::BackForwardList::backListWithLimit):
845         (WebCore::BackForwardList::forwardListWithLimit):
846         * history/PageCache.cpp:
847         (WebCore::PageCache::setCapacity):
848         * html/BaseDateAndTimeInputType.cpp:
849         * html/FTPDirectoryDocument.cpp:
850         * html/HTMLAreaElement.cpp:
851         (WebCore::HTMLAreaElement::getRegion):
852         * html/HTMLElement.cpp:
853         (WebCore::HTMLElement::parseAttribute):
854         (WebCore::parseColorStringWithCrazyLegacyRules):
855         * html/HTMLFormControlElement.cpp:
856         * html/HTMLFormElement.cpp:
857         (WebCore::HTMLFormElement::getTextFieldValues):
858         * html/HTMLImageElement.cpp:
859         * html/HTMLInputElement.cpp:
860         * html/HTMLMapElement.cpp:
861         * html/HTMLMediaElement.cpp:
862         (WebCore::HTMLMediaElement::HTMLMediaElement):
863         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
864         (WebCore::HTMLMediaElement::textTrackAddCue):
865         (WebCore::HTMLMediaElement::textTrackRemoveCue):
866         (WebCore::HTMLMediaElement::rewind):
867         (WebCore::HTMLMediaElement::seek):
868         (WebCore::HTMLMediaElement::duration):
869         * html/HTMLSelectElement.cpp:
870         (WebCore::HTMLSelectElement::parseAttribute):
871         (WebCore::HTMLSelectElement::updateListBoxSelection):
872         * html/HTMLSourceElement.cpp:
873         * html/HTMLTableCellElement.cpp:
874         (WebCore::HTMLTableCellElement::colSpan):
875         (WebCore::HTMLTableCellElement::rowSpan):
876         * html/HTMLTableElement.cpp:
877         (WebCore::HTMLTableElement::parseAttribute):
878         * html/HTMLTextFormControlElement.cpp:
879         (WebCore::HTMLTextFormControlElement::setSelectionStart):
880         (WebCore::HTMLTextFormControlElement::setSelectionEnd):
881         (WebCore::HTMLTextFormControlElement::select):
882         (WebCore::HTMLTextFormControlElement::setSelectionRange):
883         * html/HTMLTrackElement.cpp:
884         * html/ImageDocument.cpp:
885         (WebCore::ImageDocument::scale):
886         * html/InputType.cpp:
887         (WebCore::InputType::valueAsDouble):
888         * html/MediaController.cpp:
889         (MediaController::duration):
890         (MediaController::currentTime):
891         (MediaController::setCurrentTime):
892         (MediaController::updateReadyState):
893         * html/NumberInputType.cpp:
894         (WebCore::NumberInputType::setValueAsDouble):
895         (WebCore::NumberInputType::setValueAsDecimal):
896         (WebCore::NumberInputType::createStepRange):
897         * html/RangeInputType.cpp:
898         (WebCore::RangeInputType::handleKeydownEvent):
899         * html/SearchInputType.cpp:
900         (WebCore::SearchInputType::startSearchEventTimer):
901         * html/StepRange.cpp:
902         (WebCore::StepRange::clampValue):
903         (WebCore::StepRange::parseStep):
904         * html/TimeRanges.cpp:
905         * html/ValidationMessage.cpp:
906         (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
907         (WebCore::adjustBubblePosition):
908         * html/canvas/CanvasRenderingContext2D.cpp:
909         (WebCore::normalizeRect):
910         * html/canvas/WebGLRenderingContext.cpp:
911         (WebCore::WebGLRenderingContext::validateIndexArrayConservative):
912         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
913         * html/shadow/MediaControlElements.cpp:
914         (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
915         * html/shadow/MediaControlsApple.cpp:
916         * html/shadow/SliderThumbElement.cpp:
917         (WebCore::SliderThumbElement::setPositionFromPoint):
918         * inspector/ContentSearchUtils.cpp:
919         * inspector/DOMEditor.cpp:
920         * inspector/DOMPatchSupport.cpp:
921         (WebCore::DOMPatchSupport::diff):
922         * inspector/InjectedScriptHost.cpp:
923         * loader/ProgressTracker.cpp:
924         (WebCore::ProgressTracker::incrementProgress):
925         * loader/cache/CachedImage.cpp:
926         * page/DOMWindow.cpp:
927         (WebCore::DOMWindow::adjustWindowRect):
928         * page/EventHandler.cpp:
929         (WebCore::MaximumDurationTracker::~MaximumDurationTracker):
930         * page/FrameTree.cpp:
931         * page/FrameView.cpp:
932         (WebCore::FrameView::adjustedDeferredRepaintDelay):
933         (WebCore::FrameView::autoSizeIfEnabled):
934         * page/PrintContext.cpp:
935         (WebCore::PrintContext::computeAutomaticScaleFactor):
936         * page/SpatialNavigation.cpp:
937         (WebCore::entryAndExitPointsForDirection):
938         * page/animation/CSSPropertyAnimation.cpp:
939         (WebCore::blendFilterOperations):
940         (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
941         * platform/graphics/FloatRect.cpp:
942         (WebCore::FloatRect::FloatRect):
943         (WebCore::FloatRect::intersect):
944         (WebCore::FloatRect::uniteEvenIfEmpty):
945         (WebCore::FloatRect::extend):
946         (WebCore::FloatRect::fitToPoints):
947         * platform/graphics/GlyphPageTreeNode.cpp:
948         (WebCore::GlyphPageTreeNode::initializePage):
949         (WebCore::GlyphPageTreeNode::getChild):
950         * platform/graphics/IntRect.cpp:
951         (WebCore::IntRect::intersect):
952         (WebCore::IntRect::unite):
953         (WebCore::IntRect::uniteIfNonZero):
954         * platform/graphics/LayoutRect.cpp:
955         (WebCore::LayoutRect::intersect):
956         (WebCore::LayoutRect::unite):
957         (WebCore::LayoutRect::uniteIfNonZero):
958         * platform/graphics/filters/FEMorphology.cpp:
959         (WebCore::FEMorphology::platformApplyGeneric):
960         (WebCore::FEMorphology::platformApplySoftware):
961         * platform/mac/MemoryPressureHandlerMac.mm:
962         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
963         * platform/text/TextCodecICU.cpp:
964         * rendering/LineWidth.cpp:
965         (WebCore::LineWidth::fitBelowFloats):
966         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
967         * rendering/RenderBlock.h:
968         (WebCore::RenderBlock::availableLogicalWidthForLine):
969         (WebCore::RenderBlock::availableLogicalWidthForContent):
970         * rendering/RenderFieldset.cpp:
971         (WebCore::RenderFieldset::computePreferredLogicalWidths):
972         (WebCore::RenderFieldset::layoutSpecialExcludedChild):
973         (WebCore::RenderFieldset::paintBoxDecorations):
974         * rendering/RenderFlowThread.cpp:
975         (WebCore::RenderFlowThread::updateLogicalWidth):
976         (WebCore::RenderFlowThread::addForcedRegionBreak):
977         * rendering/RenderFrameBase.cpp:
978         (WebCore::RenderFrameBase::layoutWithFlattening):
979         * rendering/RenderFrameSet.cpp:
980         (WebCore::RenderFrameSet::layOutAxis):
981         * rendering/RenderSlider.cpp:
982         (WebCore::RenderSlider::computePreferredLogicalWidths):
983         * rendering/RenderTableCell.h:
984         * rendering/RenderTreeAsText.cpp:
985         (WebCore::writeLayers):
986         * rendering/RootInlineBox.h:
987         (WebCore::RootInlineBox::selectionHeight):
988         (WebCore::RootInlineBox::selectionHeightAdjustedForPrecedingBlock):
989         * rendering/mathml/RenderMathMLRow.cpp:
990         (WebCore::RenderMathMLRow::layout):
991         * rendering/mathml/RenderMathMLScripts.cpp:
992         (WebCore::RenderMathMLScripts::layout):
993         * rendering/style/RenderStyle.h:
994         * rendering/style/StyleGeneratedImage.cpp:
995         (WebCore::StyleGeneratedImage::imageSize):
996         * style/StyleFontSizeFunctions.cpp:
997         (WebCore::Style::fontSizeForKeyword):
998         * svg/SVGSVGElement.cpp:
999         (WebCore::SVGSVGElement::setCurrentTime):
1000
1001 2013-10-24  Andreas Kling  <akling@apple.com>
1002
1003         Uncomplicate some of SVGTextRunRenderingContext.
1004         <https://webkit.org/b/123294>
1005
1006         This class was weird about a few things, so I've taken these steps
1007         to clear things up:
1008
1009         - FINAL and OVERRIDE all the things.
1010         - Constructor now takes a RenderObject&.
1011         - renderer() now returns a RenderObject&.
1012         - drawSVGGlyphs() no longer takes a TextRun.
1013         - glyphDataForCharacter() no longer takes a TextRun.
1014
1015         To expand on the last two, there was also some awkward hoop-jumping
1016         where we'd go through the TextRun passed by argument to find its
1017         rendering context, which was really just |this| all along.
1018
1019         Reviewed by Antti Koivisto.
1020
1021 2013-10-24  Roger Fong  <roger_fong@apple.com>
1022
1023         Add texture level dependent size checks to textureImage2D calls.
1024         https://bugs.webkit.org/show_bug.cgi?id=123290
1025         <rdar://problem/15201382>
1026
1027         Reviewed by Dean Jackson
1028
1029         Test covered by WebGL Conformance suite 1.0.2 test, textures/texture-size-limit.html.
1030
1031         There are different size limits when calling textureImage2D on different texture levels.
1032         We should be throwing an error if our texture size exceeds these limits.
1033
1034         * html/canvas/WebGLRenderingContext.cpp:
1035         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
1036
1037 2013-10-24  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1038
1039         [MediaStream API] allow a stream source to be shared
1040         https://bugs.webkit.org/show_bug.cgi?id=121954
1041
1042         Reviewed by Eric Carlson.
1043
1044         Now, the MediaStreamSource don't know about the MediaStream that owns it,
1045         since there can be more than one MediaStream that has it as source for some track.
1046         MediaStreamTrack classes now have observers registered, in case there are more than
1047         one MediaStream owning that track
1048
1049         No new tests, no change in functionality.
1050
1051         * Modules/mediastream/MediaStream.cpp:
1052         (WebCore::MediaStream::MediaStream): Adding the MediaStream as an observer for each track it owns.
1053
1054         (WebCore::MediaStream::addTrack): Now adding the MediaStream as an observer the new added track
1055         and adding the source to the MediaStreamDescriptor.
1056
1057         (WebCore::MediaStream::removeTrack): Instead of removing the source right away, we first check if
1058         there isn't any other track using that source, if not we remove the source.
1059
1060         (WebCore::MediaStream::haveTrackWithSource):
1061         (WebCore::MediaStream::addRemoteSource): MediaStreamSource has no information about the MediaStream
1062         that uses it, so now we don't set the stream in the source anymore.
1063
1064         (WebCore::MediaStream::removeRemoteSource): There can be more than on track using the source. So we
1065         get each track that is using the source and then remove it and fire the ended event.
1066
1067         * Modules/mediastream/MediaStream.h:
1068         * Modules/mediastream/MediaStreamTrack.cpp:
1069         (WebCore::MediaStreamTrack::addObserver):
1070         (WebCore::MediaStreamTrack::removeObserver):
1071         (WebCore::MediaStreamTrack::trackDidEnd): Does not get the client from the MediaStreamDescriptor, it now
1072         notify each of its observers that the track ended.
1073
1074         * Modules/mediastream/MediaStreamTrack.h: Adding Observer class.
1075
1076         * platform/mediastream/MediaStreamDescriptor.cpp: Destructor now does nothing. Previously it was setting
1077         each MediaStreamSource's descriptor to null.
1078
1079         (WebCore::MediaStreamDescriptor::removeSource): Not setting the stream in source anymore.
1080
1081         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor): Ditto.
1082
1083         (WebCore::MediaStreamDescriptor::setEnded): Not setting the state of the source to Ended
1084
1085         * platform/mediastream/MediaStreamDescriptor.h:
1086         (WebCore::MediaStreamDescriptor::~MediaStreamDescriptor):
1087         * platform/mediastream/MediaStreamSource.cpp: Removing references to MediaStream object
1088         (WebCore::MediaStreamSource::MediaStreamSource):
1089         (WebCore::MediaStreamSource::reset):
1090         * platform/mediastream/MediaStreamSource.h:
1091
1092 2013-10-24  Daniel Bates  <dabates@apple.com>
1093
1094         Crash in WebCore::NavigationScheduler::startTimer()
1095         https://bugs.webkit.org/show_bug.cgi?id=123288
1096         <rdar://problem/14055644>
1097
1098         Reviewed by Alexey Proskuryakov.
1099
1100         Currently NavigationScheduler::startTimer() synchronously notifies the client
1101         before the Web Inspector of a scheduled redirect. If a client cancels this
1102         redirect then NavigationScheduler::m_redirect will become null and we'll
1103         subsequently crash when informing the Web Inspector of this formerly scheduled
1104         redirect. Instead, NavigationScheduler::startTimer() should notify the Web
1105         Inspector before it notifies the client of a scheduled redirect.
1106
1107         As a side benefit of this change, the Web Inspector is notified of a scheduled
1108         redirect before being notified of it being canceled when a client chooses to cancel
1109         a scheduled redirect.
1110
1111         * loader/NavigationScheduler.cpp:
1112         (WebCore::NavigationScheduler::startTimer):
1113
1114 2013-10-24  Antti Koivisto  <antti@apple.com>
1115
1116         Try to fix build without CSS_SHAPES.
1117
1118         * rendering/SimpleLineLayout.cpp:
1119         (WebCore::SimpleLineLayout::canUseFor):
1120
1121 2013-10-24  Antti Koivisto  <antti@apple.com>
1122
1123         Simple line layout
1124         https://bugs.webkit.org/show_bug.cgi?id=122458
1125
1126         Reviewed by Darin Adler.
1127
1128         Line box based inline layout is powerful but also rather slow and memory intensive. Simple line layout
1129         is a compact alternative data structure and fast code path to cover common cases without requiring line
1130         boxes.
1131         
1132         This patch handles a case single left-aligned text renderer inside flow with no floats. Even this very basic
1133         case is sufficiently common to handle up to 25% of all text lines on some popular new sites. The decision
1134         which path to use is made per block flow (paragraph).
1135         
1136         Simple line layout aims to produce pixel-exact rendering result when compared to the line box layout.
1137         
1138         The goal is to handle everything that requires line level access in cases that allow use of simple lines.
1139         This is not quite the case yet. For example selections and outline painting are not supported. In these
1140         cases we seamlessly switch to the line boxes.
1141
1142         The simple line data structure currently uses 12 bytes per line. Lineboxes take ~160 bytes minimum per line.
1143         Laying out the lines is also several times faster as is iterating over them.
1144
1145         * CMakeLists.txt:
1146         * GNUmakefile.list.am:
1147         * WebCore.vcxproj/WebCore.vcxproj:
1148         * WebCore.xcodeproj/project.pbxproj:
1149         * dom/Position.cpp:
1150         (WebCore::Position::upstream):
1151         (WebCore::Position::downstream):
1152         (WebCore::Position::getInlineBoxAndOffset):
1153         
1154             Creating positions within a simple line flow causes switch to line boxes.
1155
1156         * editing/TextIterator.cpp:
1157         (WebCore::TextIterator::handleTextNode):
1158         
1159             TextIterator traverses line boxes if available. In case simple line case we need to replicate the
1160             same results (for compatibility but especially to avoid changing test results). This is done here
1161             by just traversing the string without actually using the layout.
1162
1163         * rendering/RenderBlock.cpp:
1164         (WebCore::RenderBlock::RenderBlock):
1165         (WebCore::RenderBlock::layoutShapeInsideInfo):
1166         * rendering/RenderBlock.h:
1167         * rendering/RenderBlockFlow.cpp:
1168         (WebCore::RenderBlockFlow::layoutInlineChildren):
1169         
1170             Select the layout path to use.
1171
1172         (WebCore::RenderBlockFlow::deleteLines):
1173         (WebCore::RenderBlockFlow::hitTestInlineChildren):
1174         (WebCore::RenderBlockFlow::adjustForBorderFit):
1175         (WebCore::RenderBlockFlow::firstLineBaseline):
1176         (WebCore::RenderBlockFlow::inlineBlockBaseline):
1177         (WebCore::RenderBlockFlow::inlineSelectionGaps):
1178         (WebCore::RenderBlockFlow::clearTruncation):
1179         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
1180         (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
1181         (WebCore::RenderBlockFlow::paintInlineChildren):
1182         (WebCore::RenderBlockFlow::hasLines):
1183         (WebCore::RenderBlockFlow::layoutSimpleLines):
1184         
1185             Do simple layout.
1186
1187         (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
1188         (WebCore::RenderBlockFlow::ensureLineBoxes):
1189         
1190             This function switches from simple lines to line boxes. The switching can be done outside normal layout.
1191             This is used to cover some cases that are not yet supported by simple lines (like selections).
1192
1193         * rendering/RenderBlockFlow.h:
1194         (WebCore::RenderBlockFlow::simpleLines):
1195         * rendering/RenderBlockLineLayout.cpp:
1196         (WebCore::RenderBlockFlow::layoutLineBoxes):
1197         
1198             Rename the line box layout function.
1199
1200         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
1201         * rendering/RenderText.cpp:
1202         (WebCore::RenderText::deleteLineBoxesBeforeSimpleLineLayout):
1203         (WebCore::RenderText::absoluteRects):
1204         (WebCore::RenderText::absoluteRectsForRange):
1205         (WebCore::RenderText::absoluteQuadsClippedToEllipsis):
1206         (WebCore::RenderText::absoluteQuads):
1207         (WebCore::RenderText::absoluteQuadsForRange):
1208         (WebCore::RenderText::positionForPoint):
1209         (WebCore::RenderText::knownToHaveNoOverflowAndNoFallbackFonts):
1210         (WebCore::RenderText::setSelectionState):
1211         (WebCore::RenderText::setTextWithOffset):
1212         (WebCore::RenderText::ensureLineBoxes):
1213         (WebCore::RenderText::simpleLines):
1214         (WebCore::RenderText::linesBoundingBox):
1215         (WebCore::RenderText::linesVisualOverflowBoundingBox):
1216         (WebCore::RenderText::selectionRectForRepaint):
1217         (WebCore::RenderText::caretMinOffset):
1218         (WebCore::RenderText::caretMaxOffset):
1219         (WebCore::RenderText::countRenderedCharacterOffsetsUntil):
1220         (WebCore::RenderText::containsRenderedCharacterOffset):
1221         (WebCore::RenderText::containsCaretOffset):
1222         (WebCore::RenderText::hasRenderedText):
1223         * rendering/RenderText.h:
1224         * rendering/RenderTreeAsText.cpp:
1225         (WebCore::RenderTreeAsText::writeRenderObject):
1226         (WebCore::writeSimpleLine):
1227         (WebCore::write):
1228         * rendering/SimpleLineLayout.cpp: Added.
1229         (WebCore::SimpleLineLayout::canUseFor):
1230         
1231             This check for the cases supported by the simple line layout path.
1232
1233         (WebCore::SimpleLineLayout::isWhitespace):
1234         (WebCore::SimpleLineLayout::skipWhitespaces):
1235         (WebCore::SimpleLineLayout::textWidth):
1236         (WebCore::SimpleLineLayout::createLines):
1237         
1238             The main layout functions that breaks text to lines. It only handles the cases allowed by 
1239             SimpleLineLayout::canUseFor. What it handles it aims to break exactly as line box layout does.
1240
1241         * rendering/SimpleLineLayout.h: Added.
1242         * rendering/SimpleLineLayoutFunctions.cpp: Added.
1243         (WebCore::SimpleLineLayout::paintFlow):
1244         (WebCore::SimpleLineLayout::hitTestFlow):
1245         (WebCore::SimpleLineLayout::collectFlowOverflow):
1246         (WebCore::SimpleLineLayout::computeTextBoundingBox):
1247         * rendering/SimpleLineLayoutFunctions.h: Added.
1248         (WebCore::SimpleLineLayout::computeFlowHeight):
1249         (WebCore::SimpleLineLayout::computeFlowFirstLineBaseline):
1250         (WebCore::SimpleLineLayout::computeFlowLastLineBaseline):
1251         (WebCore::SimpleLineLayout::findTextCaretMinimumOffset):
1252         (WebCore::SimpleLineLayout::findTextCaretMaximumOffset):
1253         (WebCore::SimpleLineLayout::containsTextCaretOffset):
1254         (WebCore::SimpleLineLayout::isTextRendered):
1255         (WebCore::SimpleLineLayout::lineHeightFromFlow):
1256         
1257             Support functions called from RenderBlockFlow and RenderText. They are equivalent to
1258             similar line box functions.
1259
1260         (WebCore::SimpleLineLayout::baselineFromFlow):
1261         * rendering/SimpleLineLayoutResolver.h: Added.
1262         (WebCore::SimpleLineLayout::Resolver::Line::Line):
1263         (WebCore::SimpleLineLayout::Resolver::Line::rect):
1264         (WebCore::SimpleLineLayout::Resolver::Line::baseline):
1265         (WebCore::SimpleLineLayout::Resolver::Line::text):
1266         (WebCore::SimpleLineLayout::Resolver::Iterator::Iterator):
1267         (WebCore::SimpleLineLayout::Resolver::Iterator::operator++):
1268         (WebCore::SimpleLineLayout::Resolver::Iterator::operator--):
1269         (WebCore::SimpleLineLayout::Resolver::Iterator::operator==):
1270         (WebCore::SimpleLineLayout::Resolver::Iterator::operator!=):
1271         (WebCore::SimpleLineLayout::Resolver::Iterator::operator*):
1272         
1273             Lazy iterator for deriving line metrics. This keeps the line data structure small as
1274             we don't need to keep easily derived values around.
1275
1276         (WebCore::SimpleLineLayout::Resolver::Resolver):
1277         (WebCore::SimpleLineLayout::Resolver::size):
1278         (WebCore::SimpleLineLayout::Resolver::begin):
1279         (WebCore::SimpleLineLayout::Resolver::end):
1280         (WebCore::SimpleLineLayout::Resolver::last):
1281         (WebCore::SimpleLineLayout::Resolver::operator[]):
1282
1283 2013-10-24  Myles C. Maxfield  <mmaxfield@apple.com>
1284
1285         Gaps between underlines in adjacent underlined text runs
1286         https://bugs.webkit.org/show_bug.cgi?id=123236
1287
1288         Reviewed by Simon Fraser and Darin Adler.
1289
1290         There are two pieces to this change. The first piece is in
1291         InlineTextBox::paint(). We were putting floating-point
1292         extents into a LayoutSize, which simply uses ints (for now),
1293         and then immediately converting this back to a FloatSize.
1294         Instead, we should be using floats throughout all of
1295         this code.
1296
1297         In addition, inside GraphicsContext::drawLineForText(), we are
1298         rounding the underline to pixel boundaries so that it appears
1299         very crisp on the screen. However, we should round once after
1300         performing computations, rather than rounding twice and then
1301         performing computations on the rounded numbers.
1302
1303         Test: fast/css3-text/css3-text-decoration/no-gap-between-two-rounded-textboxes.html
1304
1305         * platform/graphics/cg/GraphicsContextCG.cpp:
1306         (WebCore::GraphicsContext::drawLineForText): Change rounding mode
1307             to perform computations before rounding
1308         * rendering/InlineTextBox.cpp:
1309         (WebCore::InlineTextBox::paint): Don't convert to a LayoutSize
1310             just to convert to a FloatSize
1311
1312 2013-10-24  Andreas Kling  <akling@apple.com>
1313
1314         SVGRenderingContext should wrap a RenderElement.
1315         <https://webkit.org/b/123283>
1316
1317         The SVG rendering context class is never used with text renderers
1318         so we can have it wrap a RenderElement for tighter code.
1319
1320         Also renamed SVGRenderingContext::m_object to m_renderer.
1321
1322         Reviewed by Antti Koivisto.
1323
1324 2013-10-24  Santosh Mahto  <santosh.ma@samsung.com>
1325
1326         [contenteditable] Content after non-editable element disappears when merging lines using backspace
1327         https://bugs.webkit.org/show_bug.cgi?id=122748
1328
1329         Reviewed by Ryosuke Niwa.
1330
1331         In case of paragraph merging after deletion if second paragraph
1332         contains non-editable element, then content after the non-editable
1333         element(including non-editable element) will be removed while the
1334         content before the element will be merged with the first paragraph.
1335         This happens becasue endOfParagraphToMove calculation in merging function
1336         stop at editing boundary so endOfParagraphToMove becomes position just
1337         before non-editable content.
1338         With this patch now endOfParagraphToMove is calculated by skipping
1339         over the non-editable element.
1340
1341         Test: editing/deleting/merge-paragraph-contatining-noneditable.html
1342
1343         * editing/DeleteSelectionCommand.cpp:
1344         (WebCore::DeleteSelectionCommand::mergeParagraphs): use CanSkipOverEditingBoundary
1345         condition while calculating endOfParagraphToMove.
1346
1347 2013-10-24  Antoine Quint  <graouts@apple.com>
1348
1349         Web Inspector: Inspector doesn't show webkitTransitionEnd events in the timeline
1350         https://bugs.webkit.org/show_bug.cgi?id=123263
1351
1352         Reviewed by Timothy Hatcher.
1353
1354         A legacy event type is only set on an event in EventTarget::fireEventListeners(Event*)
1355         which is called after we used to call InspectorInstrumentation::willDispatchEvent(), the method
1356         that would ultimately yield the creation of a TimelineRecord for the event in the Web Inspector
1357         frontend, and as a result we would try to dispatch an event with an unprefixed event type to
1358         the frontend, which wouldn't even happen because most likely it wouldn't have listeners for this
1359         unprefixed type.
1360
1361         We now move the call to InspectorInstrumentation::willDispatchEvent() in
1362         EventTarget::fireEventListeners(Event*, EventTargetData*, EventListenerVector&) such that the
1363         correct event type and list of listeners is used to determine what event to dispatch to the frontend.
1364
1365         * dom/EventDispatcher.cpp:
1366         (WebCore::EventDispatcher::dispatchEvent):
1367         Remove calls to InspectorInstrumentation::willDispatchEvent() and InspectorInstrumentation::didDispatchEvent().
1368
1369         * dom/EventTarget.cpp:
1370         (WebCore::EventTarget::fireEventListeners):
1371         Add call to InspectorInstrumentation::willDispatchEvent() before we go through each listener and
1372         call InspectorInstrumentation::willHandleEvent(). Additionally, we refactor some code since we're
1373         getting references to the ScriptExecutionContext and Document upfront now.
1374
1375 2013-10-24  Andreas Kling  <akling@apple.com>
1376
1377         SVG: RenderElement-ize intersectRepaintRectWithResources().
1378         <https://webkit.org/b/123278>
1379
1380         SVGRenderSupport::intersectRepaintRectWithResources() is only ever
1381         called with non-text renderers so make it take RenderElement&.
1382
1383         Had to tweak RenderSVGResource::resourceBoundingBox() to take the
1384         renderer by reference.
1385
1386         Reviewed by Antti Koivisto.
1387
1388 2013-10-24  Joseph Pecoraro  <pecoraro@apple.com>
1389
1390         Web Inspector: Breakpoints in sourceURL named scripts do not work
1391         https://bugs.webkit.org/show_bug.cgi?id=123231
1392
1393         Reviewed by Timothy Hatcher.
1394
1395         Remember a Script's sourceURL and sourceMappingURL. When setting a
1396         breakpoint by URL, check it against the sourceURL or original URL.
1397         If a script had a sourceURL that would have been the only URL sent
1398         to the frontend, so that receives priority.
1399
1400         Test: inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html
1401
1402         * inspector/InspectorDebuggerAgent.cpp:
1403         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
1404         (WebCore::InspectorDebuggerAgent::didParseSource):
1405         * inspector/InspectorDebuggerAgent.h:
1406         * inspector/ScriptDebugListener.h:
1407
1408 2013-10-23  Alexey Proskuryakov  <ap@apple.com>
1409
1410         Add CryptoKey base class and bindings
1411         https://bugs.webkit.org/show_bug.cgi?id=123216
1412
1413         Reviewed by Sam Weinig.
1414
1415         * crypto/CryptoKey.idl: Added.
1416
1417         * CMakeLists.txt:
1418         * DerivedSources.make:
1419         * GNUmakefile.list.am:
1420         Process the IDL.
1421
1422         * WebCore.xcodeproj/project.pbxproj: Added files.
1423
1424         * bindings/js/JSCryptoKeyCustom.cpp: Added.
1425         (WebCore::JSCryptoKey::algorithm): Use a visitor to build algorithm dictionary
1426         for the key.
1427
1428         * crypto/CryptoAlgorithmDescriptionBuilder.cpp: Added.
1429         * crypto/CryptoAlgorithmDescriptionBuilder.h: Added.
1430         An interface for a visitor we'll use to expose CrytoKey.algorithm in bindings,
1431         and possibly also for storage serialization. Not complete yet, we'll need support
1432         for a few more simple types, and less trivially, for nested algorithms.
1433
1434         * bindings/js/JSCryptoAlgorithmBuilder.cpp: Added.
1435         * bindings/js/JSCryptoAlgorithmBuilder.h: Added.
1436         An implementation that builds an algorithm description dictionary for JS bindings.
1437
1438         * crypto/CryptoKey.cpp: Added.
1439         (WebCore::CryptoKey::~CryptoKey):
1440         (WebCore::CryptoKey::buildAlgorithmDescription):
1441         * crypto/CryptoKey.h: Added.
1442         Added an almost empty implementation. Some of the functions that are currently
1443         marked as pure virtual will likely be implemented in this base class.
1444
1445 2013-10-24  Commit Queue  <commit-queue@webkit.org>
1446
1447         Unreviewed, rolling out r157916.
1448         http://trac.webkit.org/changeset/157916
1449         https://bugs.webkit.org/show_bug.cgi?id=123274
1450
1451         Broke Layout/flexbox-lots-of-data.html on perfbot (Requested
1452         by ap on #webkit).
1453
1454         * rendering/RenderFlexibleBox.cpp:
1455         (WebCore::RenderFlexibleBox::OrderHashTraits::emptyValue):
1456         (WebCore::RenderFlexibleBox::OrderHashTraits::constructDeletedValue):
1457         (WebCore::RenderFlexibleBox::OrderHashTraits::isDeletedValue):
1458         (WebCore::RenderFlexibleBox::OrderIterator::setOrderValues):
1459         (WebCore::RenderFlexibleBox::layoutBlock):
1460         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
1461         * rendering/RenderFlexibleBox.h:
1462
1463 2013-10-24  Zan Dobersek  <zdobersek@igalia.com>
1464
1465         Comment in ScopedEventQueue::dispatchEvent is unnecessarily verbose
1466         https://bugs.webkit.org/show_bug.cgi?id=123252
1467
1468         Reviewed by Darin Adler.
1469
1470         Shorten the comment about the crash avoidance in ScopedEventQueue::dispatchEvent due to
1471         the calling convention in C++ is left unspecified. The problem was already fixed in r157219
1472         and later adjusted in r157401, but the comment could have been shorter and simpler in both cases.
1473
1474         * dom/ScopedEventQueue.cpp:
1475         (WebCore::ScopedEventQueue::dispatchEvent):
1476
1477 2013-10-24  Alex Christensen  <achristensen@webkit.org>
1478
1479         Removed unused ThreadSafeCoordinatedSurface and CertificateInfoCurl files.
1480         https://bugs.webkit.org/show_bug.cgi?id=123246
1481
1482         Reviewed by Noam Rosenthal.
1483
1484         * WebCore.vcxproj/WebCore.vcxproj:
1485         * WebCore.vcxproj/WebCore.vcxproj.filters:
1486         Removed references to ThreadSafeCoordinatedSurface and CertificateInfoCurl.
1487         * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp: Removed.
1488         * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h: Removed.
1489         * platform/network/curl/CertificateInfoCurl.cpp: Removed.
1490
1491 2013-10-24  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
1492
1493         Removed Qt workaround.
1494         https://bugs.webkit.org/show_bug.cgi?id=123258
1495
1496         Reviewed by Csaba Osztrogonác.
1497
1498         No change of functionality, no new tests needed.
1499
1500         !$defines case can be removed, because Qt and Android aren't in WebKit trunk,
1501         all ports (Mac,EFL,GTK,Windows) call this script with --defines option now
1502
1503         * css/make-css-file-arrays.pl:
1504
1505 2013-10-24  Antti Koivisto  <antti@apple.com>
1506
1507         Remove a stray space.
1508         
1509         Not reviewed.
1510
1511         * accessibility/AccessibilityRenderObject.cpp:
1512         (WebCore::AccessibilityRenderObject::addImageMapChildren):
1513
1514 2013-10-24  Antti Koivisto  <antti@apple.com>
1515
1516         Element iterator functions should take reference
1517         https://bugs.webkit.org/show_bug.cgi?id=123267
1518
1519         Reviewed by Andreas Kling.
1520
1521         The argument has to be non-null.
1522
1523 2013-10-24  Ryuan Choi  <ryuan.choi@samsung.com>
1524
1525         [EFL] Build break with latest EFL 1.8 libraries.
1526         https://bugs.webkit.org/show_bug.cgi?id=123245
1527
1528         Reviewed by Gyuyoung Kim.
1529
1530         After fixed build break on EFL 1.8 at r138326, EFL libraries are changed
1531         Eo typedef and splitted header files which contain version macro.
1532
1533         * platform/Widget.h: Changed Eo typedef.
1534         * platform/efl/EflScreenUtilities.h: Ditto.
1535         * platform/graphics/Image.h: Ditto.
1536
1537 2013-10-24  Andreas Kling  <akling@apple.com>
1538
1539         RenderSVGResource: Pass RenderElement to fill/strokePaintingResource.
1540         <https://webkit.org/b/123242>
1541
1542         We never pass text renderers to these functions, so make them take
1543         RenderElement instead.
1544
1545         Reviewed by Anders Carlsson.
1546
1547 2013-10-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1548
1549         [GObject bindings] Make EventTarget interface introspectable
1550         https://bugs.webkit.org/show_bug.cgi?id=77835
1551
1552         Reviewed by Gustavo Noronha Silva.
1553
1554         Add webkit_dom_event_target_add_event_listener_with_closure and
1555         webkit_dom_event_target_remove_event_listener_with_closure to be
1556         used by GObject instrospection bindings. Instead of receving a
1557         GCallback, which makes the function not introspectable, they
1558         receive a GClosure.
1559
1560         * bindings/gobject/GObjectEventListener.cpp:
1561         (WebCore::GObjectEventListener::GObjectEventListener):
1562         (WebCore::GObjectEventListener::~GObjectEventListener):
1563         (WebCore::GObjectEventListener::gobjectDestroyed):
1564         (WebCore::GObjectEventListener::handleEvent):
1565         (WebCore::GObjectEventListener::operator==):
1566         * bindings/gobject/GObjectEventListener.h:
1567         (WebCore::GObjectEventListener::addEventListener):
1568         (WebCore::GObjectEventListener::removeEventListener):
1569         * bindings/gobject/WebKitDOMEventTarget.cpp:
1570         (webkit_dom_event_target_dispatch_event):
1571         (webkit_dom_event_target_add_event_listener):
1572         (webkit_dom_event_target_remove_event_listener):
1573         (webkit_dom_event_target_add_event_listener_with_closure):
1574         (webkit_dom_event_target_remove_event_listener_with_closure):
1575         * bindings/gobject/WebKitDOMEventTarget.h:
1576         * bindings/scripts/CodeGeneratorGObject.pm:
1577         (GenerateEventTargetIface):
1578         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1579         (webkit_dom_test_event_target_dispatch_event):
1580         (webkit_dom_test_event_target_add_event_listener):
1581         (webkit_dom_test_event_target_remove_event_listener):
1582         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
1583         (webkit_dom_test_node_dispatch_event):
1584         (webkit_dom_test_node_add_event_listener):
1585         (webkit_dom_test_node_remove_event_listener):
1586
1587 2013-10-14  Sergio Villar Senin  <svillar@igalia.com>
1588
1589         Use a Vector instead of HashSet to computed the orderValues in RenderFlexibleBox
1590         https://bugs.webkit.org/show_bug.cgi?id=118620
1591
1592         Reviewed by Antti Koivisto.
1593
1594         Turns out that order is extremelly uncommon so using a Vector is
1595         much less expensive. This also special-cases the much common case
1596         of only having order of value 0 by using Vectors with just one
1597         preallocated member.
1598
1599         Also added the performance test that shows a ~1% win when using a
1600         vector instead of the HashSet.
1601
1602         * rendering/RenderFlexibleBox.cpp:
1603         (WebCore::RenderFlexibleBox::OrderIterator::setOrderValues):
1604         (WebCore::RenderFlexibleBox::layoutBlock):
1605         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
1606         * rendering/RenderFlexibleBox.h:
1607
1608 2013-10-23  ChangSeok Oh  <changseok.oh@collabora.com>
1609
1610         Unreviewed build fix since r157823.
1611         FilterOperation::getOperationType() is renamed FilterOperation::type().
1612
1613         * platform/graphics/texmap/TextureMapperGL.cpp:
1614         (WebCore::prepareFilterProgram):
1615         (WebCore::TextureMapperGL::drawTexture):
1616         (WebCore::TextureMapperGL::drawUsingCustomFilter):
1617         (WebCore::TextureMapperGL::drawFiltered):
1618         (WebCore::BitmapTextureGL::applyFilters):
1619         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1620         (WebCore::CoordinatedGraphicsScene::injectCachedCustomFilterPrograms):
1621
1622 2013-10-23  Ryuan Choi  <ryuan.choi@samsung.com>
1623
1624         Unreviewed build fix on CMake based ports when CMAKE_BUILD_TYPE is not given.
1625
1626         When CMAKE_BUILD_TYPE is empty, FIND command will be failed.
1627
1628         * CMakeLists.txt:
1629
1630 2013-10-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1631
1632         Integrate css3-images image-orientation with existing EXIF support
1633         https://bugs.webkit.org/show_bug.cgi?id=91566
1634
1635         Reviewed by Beth Dakin.
1636
1637         Original patch by David Barr(davidbarr@chromium.org).
1638
1639         This patch passes an information of image orientation into existing EXIF support functions
1640         (draw() functions of image classes mainly). We need to let the functions to know the information
1641         in order to meet the image-orientation requirement.
1642
1643         Spec: http://dev.w3.org/csswg/css-images-3/#the-image-orientation
1644         The css3-images module specification is at last call.
1645
1646         Test: fast/css/image-orientation/image-orientation.html
1647         Image orientation test is to check if incorrect rotation value can be fixed with correct orientation.
1648
1649         * loader/cache/CachedImage.cpp:
1650         (WebCore::CachedImage::imageSizeForRenderer):
1651         * page/DragController.cpp:
1652         (WebCore::DragController::doImageDrag):
1653         * page/Frame.cpp:
1654         (WebCore::Frame::nodeImage):
1655         * platform/graphics/BitmapImage.cpp:
1656         (WebCore::BitmapImage::updateSize):
1657         (WebCore::BitmapImage::sizeRespectingOrientation):
1658         (WebCore::BitmapImage::drawPattern):
1659         * platform/graphics/BitmapImage.h:
1660         * platform/graphics/CrossfadeGeneratedImage.cpp:
1661         (WebCore::CrossfadeGeneratedImage::draw):
1662         * platform/graphics/CrossfadeGeneratedImage.h:
1663         * platform/graphics/GeneratedImage.h:
1664         * platform/graphics/GradientImage.cpp:
1665         (WebCore::GradientImage::draw):
1666         * platform/graphics/GradientImage.h:
1667         * platform/graphics/Image.cpp:
1668         (WebCore::Image::draw):
1669         (WebCore::Image::drawTiled):
1670         * platform/graphics/Image.h:
1671         * platform/graphics/blackberry/ImageBlackBerry.cpp:
1672         * platform/graphics/cairo/BitmapImageCairo.cpp:
1673         (WebCore::BitmapImage::draw):
1674         * platform/graphics/cg/BitmapImageCG.cpp:
1675         * platform/graphics/cg/PDFDocumentImage.cpp:
1676         (WebCore::PDFDocumentImage::draw):
1677         * platform/graphics/cg/PDFDocumentImage.h:
1678         * platform/graphics/win/ImageCGWin.cpp:
1679         (WebCore::BitmapImage::getHBITMAPOfSize):
1680         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1681         * platform/graphics/wince/ImageBufferWinCE.cpp:
1682         (WebCore::BufferedImage::draw):
1683         * platform/graphics/wince/ImageWinCE.cpp:
1684         (WebCore::BitmapImage::draw):
1685         * platform/mac/DragImageMac.mm:
1686         (WebCore::createDragImageFromImage):
1687         * rendering/RenderEmbeddedObject.cpp:
1688         (WebCore::RenderEmbeddedObject::paintSnapshotImage):
1689         * rendering/RenderImage.cpp:
1690         (WebCore::RenderImage::styleDidChange):
1691         * rendering/RenderSnapshottedPlugIn.cpp:
1692         (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
1693         * rendering/style/RenderStyle.cpp:
1694         (WebCore::RenderStyle::changeRequiresLayout):
1695         * svg/graphics/SVGImage.cpp:
1696         (WebCore::SVGImage::drawForContainer):
1697         (WebCore::SVGImage::nativeImageForCurrentFrame):
1698         (WebCore::SVGImage::draw):
1699         * svg/graphics/SVGImage.h:
1700         * svg/graphics/SVGImageForContainer.cpp:
1701         (WebCore::SVGImageForContainer::draw):
1702         * svg/graphics/SVGImageForContainer.h:
1703
1704 2013-10-23  Andreas Kling  <akling@apple.com>
1705
1706         Tighten typing in SVGInlineTextBox a bit.
1707         <https://webkit.org/b/123238>
1708
1709         Use RenderBoxModelObject& instead of generic RenderObject* in some
1710         places where it happens as a natural consequence of keeping the
1711         original return type from InlineBox::parent()->renderer().
1712
1713         Reviewed by Anders Carlsson.
1714
1715 2013-10-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1716
1717         Introduce RENDER_OBJECT_TYPE_CASTS to replace manual toFoo() in child render object
1718         https://bugs.webkit.org/show_bug.cgi?id=123150
1719
1720         Reviewed by Andreas Kling.
1721
1722         As a step to let toFoo use TYPE_CASTS_BASE, toRenderFoo() can use it for child render object.
1723         So, this patch introduces RENDER_OBJECT_TYPE_CASTS based on the TYPE_CASTS_BASE. This will
1724         generate plenty more helper functions for render object type cast.
1725
1726         Some unnecessary type casts are fixed by this change.
1727
1728         No new tests, no behavior changes.
1729
1730         * rendering/RenderBlock.h:
1731         * rendering/RenderBlockFlow.h:
1732         * rendering/RenderBox.h:
1733         * rendering/RenderBoxModelObject.h:
1734         * rendering/RenderButton.h:
1735         * rendering/RenderCounter.h:
1736         * rendering/RenderElement.h:
1737         (WebCore::RenderElement::generatingElement):
1738         * rendering/RenderEmbeddedObject.h:
1739         * rendering/RenderFieldset.h:
1740         * rendering/RenderFileUploadControl.h:
1741         * rendering/RenderFlexibleBox.h:
1742         * rendering/RenderFlowThread.h:
1743         * rendering/RenderFrame.h:
1744         * rendering/RenderFrameSet.h:
1745         * rendering/RenderFullScreen.h:
1746         * rendering/RenderHTMLCanvas.h:
1747         * rendering/RenderIFrame.h:
1748         * rendering/RenderImage.h:
1749         * rendering/RenderInline.h:
1750         * rendering/RenderLayerModelObject.h:
1751         * rendering/RenderLineBreak.h:
1752         * rendering/RenderListBox.h:
1753         * rendering/RenderListItem.h:
1754         * rendering/RenderMedia.h:
1755         * rendering/RenderMenuList.h:
1756         * rendering/RenderMeter.h:
1757         * rendering/RenderMultiColumnBlock.h:
1758         * rendering/RenderMultiColumnSet.h:
1759         * rendering/RenderNamedFlowFragment.h:
1760         * rendering/RenderNamedFlowThread.h:
1761         * rendering/RenderObject.h:
1762         * rendering/RenderProgress.h:
1763         * rendering/RenderQuote.h:
1764         * rendering/RenderRegion.h:
1765         * rendering/RenderReplaced.h:
1766         * rendering/RenderRubyRun.h:
1767         * rendering/RenderScrollbarPart.h:
1768         * rendering/RenderSearchField.h:
1769         * rendering/RenderSlider.h:
1770         * rendering/RenderSnapshottedPlugIn.h:
1771         * rendering/RenderTable.h:
1772         * rendering/RenderTableCaption.h:
1773         * rendering/RenderTableCell.h:
1774         * rendering/RenderTableCol.h:
1775         * rendering/RenderTableRow.h:
1776         * rendering/RenderTableSection.h:
1777         * rendering/RenderText.h:
1778         * rendering/RenderTextControl.h:
1779         * rendering/RenderTextControlMultiLine.h:
1780         * rendering/RenderTextControlSingleLine.h:
1781         * rendering/RenderWidget.h:
1782         * rendering/mathml/RenderMathMLBlock.h:
1783         * rendering/svg/RenderSVGContainer.h:
1784         * rendering/svg/RenderSVGGradientStop.h:
1785         * rendering/svg/RenderSVGImage.h:
1786         * rendering/svg/RenderSVGInlineText.h:
1787         * rendering/svg/RenderSVGPath.h:
1788         * rendering/svg/RenderSVGResourceFilter.h:
1789         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
1790         (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
1791         * rendering/svg/RenderSVGRoot.h:
1792         * rendering/svg/RenderSVGShape.h:
1793         * rendering/svg/RenderSVGText.h:
1794         * rendering/svg/RenderSVGTextPath.h:
1795         * rendering/svg/RenderSVGViewportContainer.h:
1796         * rendering/svg/SVGInlineFlowBox.cpp:
1797         (WebCore::SVGInlineFlowBox::paint):
1798
1799 2013-10-23  Myles C. Maxfield  <mmaxfield@apple.com>
1800
1801         Include misspelling dot gap width when centering misspelling dots
1802         https://bugs.webkit.org/show_bug.cgi?id=122365
1803
1804         Reviewed by Simon Fraser.
1805
1806         When calculating where to place the misspelling dots, we find the
1807         maximum number of full dots that can fit under the misspelled word,
1808         and then center a run of that many dots. However, when we're
1809         centering the run, we are only considering the size of the extra
1810         fractional dot that we cut off. However, the dot image has a "gap"
1811         of transparent pixels (which visually provide tracking for the dots)
1812         which visually appears to be empty space. We should take this gap
1813         space into consideration when centering the run of dots. We also
1814         should make sure that our dots start on integral pixel boundaries
1815         because otherwise we can't set the phase of the dot run properly.
1816
1817         Test: editing/spelling/centering-misspelling-dots.html
1818
1819         * platform/graphics/mac/GraphicsContextMac.mm:
1820         (WebCore::GraphicsContext::drawLineForDocumentMarker):
1821
1822 2013-10-23  Andreas Kling  <akling@apple.com>
1823
1824         SVGFilterBuilder should not be ref-counted.
1825         <https://webkit.org/b/123222>
1826
1827         These objects are singly-owned and do not need ref counting.
1828
1829         Reviewed by Anders Carlsson.
1830
1831 2013-10-23  Brady Eidson  <beidson@apple.com>
1832
1833         Remove unused IDBBackingStoreLevelDB default constructor.
1834
1835         Rubberstamped by Anders Carlsson.
1836
1837         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1838         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1839
1840 2013-10-23  Alex Christensen  <achristensen@webkit.org>
1841
1842         Added Texture Mapper and Coordinated Graphics to Windows build for WinCairo.
1843         https://bugs.webkit.org/show_bug.cgi?id=123215
1844
1845         Reviewed by Brent Fulgham.
1846
1847         * WebCore.vcxproj/WebCore.vcxproj:
1848         * WebCore.vcxproj/WebCore.vcxproj.filters:
1849         Added source files for Texture Mapper to Windows build.
1850         * WebCore.vcxproj/WebCoreCairo.props:
1851         Added Texture Mapper include directories for WinCairo.
1852
1853 2013-10-23  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1854
1855         Adding mock class to test RTCDataChannelHandler
1856         https://bugs.webkit.org/show_bug.cgi?id=123205
1857
1858         Reviewed by Eric Carlson.
1859
1860         Now RTCPeerConnectionHandler-datachannel LayouTest can run properly.
1861         Also updated the expected file, removing the reliable property check (which was removed in the spec)
1862
1863         Existing tests updated.
1864
1865         * CMakeLists.txt:
1866         * platform/mediastream/RTCDataChannelHandlerClient.h:
1867         * platform/mock/RTCDataChannelHandlerMock.cpp: Added.
1868         * platform/mock/RTCDataChannelHandlerMock.h: Added.
1869         * platform/mock/RTCNotifiersMock.cpp:
1870         (WebCore::RemoteDataChannelNotifier::RemoteDataChannelNotifier):
1871         (WebCore::RemoteDataChannelNotifier::fire):
1872         (WebCore::DataChannelStateNotifier::DataChannelStateNotifier):
1873         (WebCore::DataChannelStateNotifier::fire):
1874         * platform/mock/RTCNotifiersMock.h:
1875         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
1876         (WebCore::RTCPeerConnectionHandlerMock::createDataChannel):
1877
1878 2013-10-23  Andreas Kling  <akling@apple.com>
1879
1880         Clock should not be ref-counted.
1881         <https://webkit.org/b/123217>
1882
1883         The Clock object is only ever owned by the MediaController,
1884         so remove the ref counting and store it in a std::unique_ptr.
1885
1886         Also slapped the Clock subclasses with FINAL and OVERRIDE.
1887
1888         Reviewed by Anders Carlsson.
1889
1890 2013-10-23  Mark Lam  <mark.lam@apple.com>
1891
1892         Fix assertion in DatabaseManager::detailsForNameAndOrigin() to be iOS friendly.
1893         https://bugs.webkit.org/show_bug.cgi?id=123218.
1894
1895         Reviewed by Joseph Pecoraro.
1896
1897         No new tests.
1898
1899         * Modules/webdatabase/DatabaseManager.cpp:
1900         (WebCore::DatabaseManager::detailsForNameAndOrigin):
1901
1902 2013-10-23  Alex Christensen  <achristensen@webkit.org>
1903
1904         Separated USE(CA) from USE(ACCELERATED_COMPOSITING) to prepare WinCairo for accelerated compositing.
1905         https://bugs.webkit.org/show_bug.cgi?id=123214
1906
1907         Reviewed by Brent Fulgham.
1908
1909         * platform/graphics/PlatformLayer.h:
1910         Added TextureMapperPlatformLayer PlatformLayer declaration for WinCairo.
1911         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
1912         (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow):
1913         (WebCore::MediaPlayerPrivateFullscreenWindow::wndProc):
1914         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
1915         Added USE(CA) where necessary to compile WinCairo with accelerated compositing.
1916
1917 2013-10-23  Myles C. Maxfield  <mmaxfield@apple.com>
1918
1919         Antialias underlines if they're not axis-aligned
1920         https://bugs.webkit.org/show_bug.cgi?id=123004
1921
1922         Reviewed by Simon Fraser.
1923
1924         In order to make underlines crisp, GraphicsContext:drawLineForText
1925         modifies the bounds of the underline rect in order to make the rect
1926         device-pixel-aligned, and then turns off antialiasing when drawing
1927         the line. This makes sense when the underline is axis-aligned, but
1928         doesn't when the rect is rotated or skewed. Therefore, we should
1929         only opt-in to this behavior if the underline we're about to draw
1930         is axis-aligned. This requires figuring out whether or not the
1931         current transformation is axis-aligned every time
1932         GraphicsContext::drawLineForText is called, which will incur a small
1933         performance hit. However, this is justified by underlines looking
1934         much better (antialiased) when the context is rotated or skewed.
1935
1936         Tests: svg/custom/foreign-object-skew.html
1937                svg/zoom/page/zoom-foreignObject.html
1938                svg/zoom/text/zoom-foreignObject.html:
1939
1940         * platform/graphics/cg/GraphicsContextCG.cpp:
1941         (WebCore::GraphicsContext::drawLineForText):
1942
1943 2013-10-23  Mark Lam  <mark.lam@apple.com>
1944
1945         Re-instate ProposedDatabases needed by detailsForNameAndOrigin().
1946         https://bugs.webkit.org/show_bug.cgi?id=123131.
1947
1948         Reviewed by Geoffrey Garen.
1949
1950         Test: storage/websql/open-database-expand-quota.html
1951
1952         If a webpage tries to create a database that exceeds the database size
1953         quota for that security origin, the WebKit1 quota request mechanism
1954         uses detailsForNameAndOrigin() to get the requested size of the database
1955         (that the webpage is attempting to open) in order to determine whether
1956         to increase the quota or not.
1957
1958         Previously, detailsForNameAndOrigin() relies on the ProposedDatabase
1959         mechanism to provide this size information. This change re-instates the
1960         ProposedDatabase mechanism so that WebKit1 client code that relies on
1961         this behavior will continue to work.
1962
1963         * Modules/webdatabase/DatabaseManager.cpp:
1964         (WebCore::DatabaseManager::ProposedDatabase::ProposedDatabase):
1965         (WebCore::DatabaseManager::ProposedDatabase::~ProposedDatabase):
1966         (WebCore::DatabaseManager::DatabaseManager):
1967         (WebCore::DatabaseManager::openDatabaseBackend):
1968         (WebCore::DatabaseManager::fullPathForDatabase):
1969         (WebCore::DatabaseManager::detailsForNameAndOrigin):
1970         * Modules/webdatabase/DatabaseManager.h:
1971         (WebCore::DatabaseManager::ProposedDatabase::origin):
1972         (WebCore::DatabaseManager::ProposedDatabase::details):
1973
1974 2013-10-23  Tim Horton  <timothy_horton@apple.com>
1975
1976         [cg] Fix the capitalization of kCGImageSourceSkipMetaData (-> Metadata)
1977         https://bugs.webkit.org/show_bug.cgi?id=122918
1978
1979         Reviewed by Anders Carlsson.
1980
1981         * platform/graphics/cg/ImageSourceCG.cpp:
1982         (WebCore::imageSourceOptions):
1983         The capitalization of kCGImageSourceSkipMetaData changed to
1984         kCGImageSourceSkipMetadata in Mountain Lion.
1985
1986 2013-10-23  Brady Eidson  <beidson@apple.com>
1987
1988         Make IDBDatabaseBackendLevelDB.cpp be cross platform
1989         https://bugs.webkit.org/show_bug.cgi?id=123027
1990
1991         Attentively reviewed by Dean Jackson.
1992
1993         Move it out of the indexeddb/leveldb directory, and rename it to IDBDatabaseBackendImpl.
1994
1995         Project files:
1996         * CMakeLists.txt:
1997         * GNUmakefile.list.am:
1998         * WebCore.vcxproj/WebCore.vcxproj:
1999         * WebCore.vcxproj/WebCore.vcxproj.filters:
2000         * WebCore.xcodeproj/project.pbxproj:
2001
2002         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp.
2003         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h.
2004
2005         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
2006         (WebCore::IDBDatabaseBackendInterface::isIDBDatabaseBackendImpl): Add to support a required cast in LevelDB code.
2007
2008         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2009
2010         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
2011         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
2012
2013         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2014         (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
2015         (WebCore::IDBFactoryBackendLevelDB::open):
2016         (WebCore::IDBFactoryBackendLevelDB::maybeCreateTransactionBackend):
2017         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2018
2019         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
2020         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
2021
2022         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
2023         (WebCore::IDBTransactionBackendLevelDB::create):
2024         (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
2025         (WebCore::IDBTransactionBackendLevelDB::scheduleVersionChangeOperation):
2026         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
2027
2028         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
2029         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
2030         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
2031         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
2032
2033 2013-10-23  Daniel Bates  <dabates@apple.com>
2034
2035         [iOS] Upstream more ARMv7s bits
2036         https://bugs.webkit.org/show_bug.cgi?id=123052
2037
2038         Reviewed by Joseph Pecoraro.
2039
2040         Define exported symbol file for armv7s and arm64.
2041
2042         * Configurations/WebCore.xcconfig:
2043
2044 2013-10-23  Krzysztof Wolanski  <k.wolanski@samsung.com>
2045
2046         [GTK] accessibility/self-referencing-aria-labelledby.html is failing
2047         https://bugs.webkit.org/show_bug.cgi?id=121594
2048
2049         Reviewed by Mario Sanchez Prada.
2050
2051         According to http://www.w3.org/TR/REC-html40/struct/objects.html#edef-IMG
2052         description of image element should be determined by alt attribute, then
2053         if it is empty by title attributte.
2054
2055         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2056         (webkitAccessibleGetDescription):
2057
2058 2013-10-15  Andreas Kling  <akling@apple.com>
2059
2060         Tighten animation-driven restyle to operate on Element only.
2061         <https://webkit.org/b/122820>
2062
2063         Text nodes are never directly animated, so we can tighten this code
2064         to work on Element only. This happens naturally since the code was
2065         already working with RenderElement everywhere.
2066
2067         Reviewed by Antti Koivisto.
2068
2069 2013-10-22  Andreas Kling  <akling@apple.com>
2070
2071         Even more PassRef<RenderStyle>!
2072         <https://webkit.org/b/123147>
2073
2074         Convert more of the WebCore code to use PassRef for RenderStyle
2075         in places where they are known to be non-null.
2076
2077         Re-landing this without region styling since that caused some
2078         assertions last time.
2079
2080         Reviewed by Antti Koivisto.
2081
2082 2013-10-22  Zoltan Horvath  <zoltan@webkit.org>
2083
2084         Refactor LineBreaker::nextSegmentBreak, add BreakingContext that holds all its state
2085         https://bugs.webkit.org/show_bug.cgi?id=123038
2086
2087         Reviewed by David Hyatt.
2088
2089         I followed Levi's logic on Blink's nextSegmentBreak refactoring (https://chromiumcodereview.appspot.com/25054004). 
2090         I mostly did the same changes, but the code is too diverged at this point to just apply that patch on our trunk. The patch
2091         introduces BreakingContext as a separate class. I added new methods for each condition, which were originally located in
2092         nextSegmentBreak. I also removed the goto-s from the code. All the new methods are inline in order to avoid introducing any
2093         performance regression. The change makes the code so much cleaner and understandable.
2094
2095         This change would be the first step of the nextSegmentBreak refactoring, I wanted to keep things in place in RenderBlockLineLayout.cpp
2096         for now, but I'm planning to separate BreakingContext into a new file and do additional changes to make things nicer. I'm tracking
2097         the entire progress under http://webkit.org/b/121261 meta bug.
2098
2099         No new tests, covered by existing tests.
2100         - I updated 1 expected result, because there was a 1 pixel difference on the result, which I believe comes from a rounding situation.
2101
2102         * rendering/RenderBlockFlow.h:
2103         * rendering/RenderBlockLineLayout.cpp:
2104         (WebCore::BreakingContext::BreakingContext):
2105         (WebCore::BreakingContext::currentObject):
2106         (WebCore::BreakingContext::lineBreak):
2107         (WebCore::BreakingContext::lineBreakRef):
2108         (WebCore::BreakingContext::lineWidth):
2109         (WebCore::BreakingContext::atEnd):
2110         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
2111         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
2112         (WebCore::BreakingContext::initializeForCurrentObject):
2113         (WebCore::BreakingContext::increment):
2114         (WebCore::BreakingContext::handleBR):
2115         (WebCore::BreakingContext::handleOutOfFlowPositioned):
2116         (WebCore::BreakingContext::handleFloat):
2117         (WebCore::BreakingContext::handleEmptyInline):
2118         (WebCore::BreakingContext::handleReplaced):
2119         (WebCore::nextCharacter):
2120         (WebCore::BreakingContext::handleText):
2121         (WebCore::textBeginsWithBreakablePosition):
2122         (WebCore::BreakingContext::canBreakAtThisPosition):
2123         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
2124         (WebCore::BreakingContext::handleEndOfLine):
2125         (WebCore::LineBreaker::nextSegmentBreak):
2126
2127 2013-10-22  Commit Queue  <commit-queue@webkit.org>
2128
2129         Unreviewed, rolling out r157826.
2130         http://trac.webkit.org/changeset/157826
2131         https://bugs.webkit.org/show_bug.cgi?id=123197
2132
2133         Caused some regions tests to assert (Requested by smfr on
2134         #webkit).
2135
2136         * dom/Document.cpp:
2137         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
2138         * dom/Document.h:
2139         * dom/Element.cpp:
2140         (WebCore::Element::styleForRenderer):
2141         * dom/Element.h:
2142         * dom/ElementRareData.h:
2143         (WebCore::ElementRareData::setComputedStyle):
2144         (WebCore::ElementRareData::resetComputedStyle):
2145         * html/HTMLTitleElement.cpp:
2146         (WebCore::HTMLTitleElement::textWithDirection):
2147         * page/animation/AnimationController.cpp:
2148         (WebCore::AnimationController::updateAnimations):
2149         * page/animation/CompositeAnimation.cpp:
2150         (WebCore::CompositeAnimation::animate):
2151         * page/animation/CompositeAnimation.h:
2152         * rendering/RenderElement.cpp:
2153         (WebCore::RenderElement::createFor):
2154         * rendering/RenderElement.h:
2155         (WebCore::RenderElement::setStyleInternal):
2156         * rendering/RenderRegion.cpp:
2157         (WebCore::RenderRegion::setRegionObjectsRegionStyle):
2158         (WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
2159         (WebCore::RenderRegion::computeStyleInRegion):
2160         (WebCore::RenderRegion::computeChildrenStyleInRegion):
2161         (WebCore::RenderRegion::setObjectStyleInRegion):
2162         * rendering/RenderRegion.h:
2163         * style/StyleResolveTree.cpp:
2164         (WebCore::Style::resolveLocal):
2165
2166 2013-10-22  Ryuan Choi  <ryuan.choi@samsung.com>
2167
2168         [EFL] Remove HAVE_GLX macro
2169         https://bugs.webkit.org/show_bug.cgi?id=123191
2170
2171         Reviewed by Gyuyoung Kim.
2172
2173         Since r138313, HAVE(GLX) was replaced to USE(GLX) except in GraphicsSurfaceToken.h.
2174
2175         * platform/graphics/surfaces/GraphicsSurfaceToken.h:
2176         Replace HAVE(GLX) to USE(GLX)
2177
2178 2013-10-22  Mark Lam  <mark.lam@apple.com>
2179
2180         Gardening: fix broken build on Windows.
2181         https://bugs.webkit.org/show_bug.cgi?id=123174.
2182
2183         Not reviewed.
2184
2185         No new tests.
2186
2187         * WebCore.vcxproj/WebCore.vcxproj:
2188         * WebCore.vcxproj/WebCore.vcxproj.filters:
2189
2190 2013-10-22  Brady Eidson  <beidson@apple.com>
2191
2192         Get rid of IDBObjectStoreBackendLevelDB
2193         https://bugs.webkit.org/show_bug.cgi?id=123174
2194
2195         Reviewed by Tim Horton.
2196
2197         This file was kind of a dumping ground.
2198         Its contents can be merged into IDBBackingStoreInterface and a new IDBIndexWriter class.
2199
2200         Also took the opportunity to do a little bit of RefPtr<> and pointer-vs-reference cleanup.
2201
2202         * CMakeLists.txt:
2203         * GNUmakefile.list.am:
2204         * WebCore.xcodeproj/project.pbxproj:
2205
2206         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp: Removed.
2207         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h: Removed.
2208
2209         * Modules/indexeddb/IDBIndexWriter.cpp: Added.
2210         (WebCore::IDBIndexWriter::IDBIndexWriter):
2211         (WebCore::IDBIndexWriter::writeIndexKeys):
2212         (WebCore::IDBIndexWriter::verifyIndexKeys):
2213         (WebCore::IDBIndexWriter::addingKeyAllowed):
2214         * Modules/indexeddb/IDBIndexWriter.h: Added.
2215         (WebCore::IDBIndexWriter::create):
2216
2217         * Modules/indexeddb/IDBBackingStoreInterface.h:
2218         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
2219
2220         * Modules/indexeddb/IDBMetadata.h:
2221         * Modules/indexeddb/IDBTransactionBackendInterface.h:
2222
2223         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2224         (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
2225         (WebCore::IDBBackingStoreLevelDB::generateKey):
2226         (WebCore::IDBBackingStoreLevelDB::updateKeyGenerator):
2227         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2228
2229         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
2230         (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
2231         (WebCore::IDBDatabaseBackendLevelDB::setIndexesReady):
2232         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
2233
2234         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
2235         (WebCore::IDBTransactionBackendLevelDB::schedulePutOperation):
2236         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
2237
2238         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
2239         (WebCore::PutOperation::perform):
2240         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
2241         (WebCore::PutOperation::create):
2242         (WebCore::PutOperation::PutOperation):
2243
2244 2013-10-22  Dean Jackson  <dino@apple.com>
2245
2246         [WebGL] Implement a software rendering option on Mac
2247         https://bugs.webkit.org/show_bug.cgi?id=123177
2248
2249         Reviewed by Tim Horton.
2250
2251         Implement a way to force software OpenGL rendering
2252         for WebGL, via a Setting/Preference.
2253
2254         No new tests. We intentionally hide the capabilities of
2255         the renderer from the content, so you can't test for
2256         this setting. However, manual inspection is pretty
2257         obvious. Just go to a page with a complex shader
2258         such as https://www.shadertoy.com/view/lss3WS.
2259
2260         * html/canvas/WebGLRenderingContext.cpp:
2261         (WebCore::WebGLRenderingContext::create): If we're forcing software
2262         rendering, mark the context attributes as such.
2263         * page/Settings.in: New setting key.
2264         * platform/graphics/GraphicsContext3D.h: New flag in Attributes.
2265         (WebCore::GraphicsContext3D::Attributes::Attributes):
2266         * platform/graphics/mac/GraphicsContext3DMac.mm:
2267         (WebCore::GraphicsContext3D::GraphicsContext3D): Slight update to the
2268         algorithm that sets a pixel format. If we're forcing software rendering,
2269         obviously we never want to create an accelerated pixel format.
2270         * platform/graphics/filters/CustomFilterGlobalContext.cpp:
2271         (WebCore::CustomFilterGlobalContext::prepareContextIfNeeded): Set the attribute
2272         here before trying to create the context.
2273         * platform/graphics/filters/CustomFilterGlobalContext.h: Add a forceSoftwareRendering
2274         flag to prepareContextIfNeeded.
2275         * rendering/FilterEffectRenderer.cpp:
2276         (WebCore::createCustomFilterEffect): Check the Setting before creating a custom
2277         filter context.
2278
2279 2013-10-22  Anders Carlsson  <andersca@apple.com>
2280
2281         Revert r157445 since it broke certificates on Mac.
2282         <rdar://problem/15246926&15254017&15269117>
2283
2284         * GNUmakefile.list.am:
2285         * PlatformEfl.cmake:
2286         * WebCore.exp.in:
2287         * WebCore.vcxproj/WebCore.vcxproj:
2288         * WebCore.vcxproj/WebCore.vcxproj.filters:
2289         * WebCore.xcodeproj/project.pbxproj:
2290         * platform/network/ResourceErrorBase.h:
2291         * platform/network/ResourceResponseBase.h:
2292         * platform/network/cf/CertificateInfoCFNet.cpp: Removed.
2293         * platform/network/cf/ResourceResponse.h:
2294         * platform/network/mac/ResourceResponseMac.mm:
2295         (WebCore::ResourceResponse::setCertificateChain):
2296         (WebCore::ResourceResponse::certificateChain):
2297         * platform/network/soup/ResourceError.h:
2298         (WebCore::ResourceError::ResourceError):
2299         (WebCore::ResourceError::tlsErrors):
2300         (WebCore::ResourceError::setTLSErrors):
2301         (WebCore::ResourceError::certificate):
2302         (WebCore::ResourceError::setCertificate):
2303         * platform/network/soup/ResourceErrorSoup.cpp:
2304         (WebCore::ResourceError::tlsError):
2305         (WebCore::ResourceError::platformCopy):
2306         (WebCore::ResourceError::platformCompare):
2307         * platform/network/soup/ResourceResponse.h:
2308         (WebCore::ResourceResponse::ResourceResponse):
2309         (WebCore::ResourceResponse::soupMessageCertificate):
2310         (WebCore::ResourceResponse::setSoupMessageCertificate):
2311         (WebCore::ResourceResponse::soupMessageTLSErrors):
2312         (WebCore::ResourceResponse::setSoupMessageTLSErrors):
2313         * platform/network/soup/ResourceResponseSoup.cpp:
2314         (WebCore::ResourceResponse::toSoupMessage):
2315         (WebCore::ResourceResponse::updateFromSoupMessage):
2316
2317 2013-10-22  Jer Noble  <jer.noble@apple.com>
2318
2319         [Media] Refactor supportsType() factory method to take a parameters object.
2320         https://bugs.webkit.org/show_bug.cgi?id=122489
2321
2322         Reviewed by Eric Carlson.
2323
2324         In order to support adding new conditional properties with which to decide
2325         what MediaPlayerPrivate subclass to create, replace the two versions of the
2326         supportsType() factory method with a single one taking a parameters object.
2327
2328         At the same time, add a 'isMediaSource' parameter to that object, allowing
2329         MediaPlayerPrivate subclasses which support the same type and codecs but
2330         which do not both support MediaSource to be distinguised.
2331
2332         * platform/graphics/MediaPlayer.cpp:
2333         (WebCore::bestMediaEngineForSupportParameters): Renamed from
2334             bestMediaEngineForTypeAndCodecs.
2335         (WebCore::MediaPlayer::nextBestMediaEngine): Added convenience function.
2336         (WebCore::MediaPlayer::loadWithNextMediaEngine): Call nextBestMediaEngine()
2337         (WebCore::MediaPlayer::supportsType): Pass parameter object.
2338         (WebCore::MediaPlayer::networkStateChanged): Call nextBestMediaEngine().
2339         * platform/graphics/MediaPlayer.h:
2340         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2341         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): Handle parameter object.
2342         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2343         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2344         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2345         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): Remove extraneous
2346             extendedSupportsType method.
2347         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Handle parameter object.
2348         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2349         (WebCore::MediaPlayerPrivate::supportsType): Ditto.
2350         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
2351         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2352         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2353         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2354         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2355         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Remove extraneous
2356             extendedSupportsType method.
2357         (WebCore::MediaPlayerPrivateQTKit::supportsType): Handle parameter object.
2358         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2359         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsType): Ditto.
2360         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
2361         * platform/graphics/wince/MediaPlayerPrivateWinCE.h:
2362
2363 2013-10-22  Andreas Kling  <akling@apple.com>
2364
2365         Merge SVGRenderBlock::styleWillChange() into styleDidChange().
2366         <https://webkit.org/b/123181>
2367
2368         I meant to do this one in r157787, but better late than never.
2369
2370         Reviewed by Geoffrey Garen.
2371
2372 2013-10-22  Sam Weinig  <sam@webkit.org>
2373
2374         CTTE: Modernize RenderBlock a bit
2375         https://bugs.webkit.org/show_bug.cgi?id=123162
2376
2377         Reviewed by Andreas Kling.
2378
2379         Start threading references through RenderBlock. While we 
2380         are here, do some selective modernization as well.
2381
2382 2013-10-22  Andreas Kling  <akling@apple.com>
2383
2384         Even more PassRef<RenderStyle>!
2385         <https://webkit.org/b/123147>
2386
2387         Convert the remaining WebCore code to use PassRef for RenderStyle
2388         wherever they are known to be non-null.
2389
2390         Reviewed by Antti Koivisto.
2391
2392 2013-10-22  Commit Queue  <commit-queue@webkit.org>
2393
2394         Unreviewed, rolling out r157819.
2395         http://trac.webkit.org/changeset/157819
2396         https://bugs.webkit.org/show_bug.cgi?id=123180
2397
2398         Broke 32-bit builds (Requested by smfr on #webkit).
2399
2400         * Configurations/WebCore.xcconfig:
2401
2402 2013-10-22  Antti Koivisto  <antti@apple.com>
2403
2404         Rename deleteLineBoxTree to deleteLines
2405         https://bugs.webkit.org/show_bug.cgi?id=123176
2406
2407         Reviewed by Andreas Kling.
2408
2409         RenderBlock::deleteLineBoxTree -> RenderBlock::deleteLines
2410         RenderInline::deleteLineBoxTree -> RenderInline::deleteLines
2411
2412 2013-10-22  Tim Horton  <timothy_horton@apple.com>
2413
2414         {ClipPathOperation, FilterOperation}::getOperationType() should not include 'get'
2415         https://bugs.webkit.org/show_bug.cgi?id=123172
2416
2417         Reviewed by Simon Fraser.
2418
2419         No new tests, just a rename.
2420
2421         "get" in WebCore tends to mean that the function has out arguments; these have no arguments.
2422         Rename FilterOperation::getOperationType() to FilterOperation::type().
2423         I noticed that ClipPathOperation had the same mistake, so I fixed it there too.
2424
2425         Removed long and useless list of files.
2426
2427 2013-10-22  Samuel White  <samuel_white@apple.com>
2428
2429         AX: Add paramAttrs to fetch start and end text markers in a given rect.
2430         https://bugs.webkit.org/show_bug.cgi?id=122164
2431
2432         Reviewed by Chris Fleizach.
2433
2434         Added ability to fetch end and start text markers inside a given bounds. This gives ScreenReaders
2435         like VoiceOver a way to retrieve the text markers for a specified column of page text.
2436
2437         Test: platform/mac/accessibility/text-marker-for-bounds.html
2438
2439         * accessibility/AccessibilityObject.cpp:
2440         (WebCore::AccessibilityObject::mainFrame):
2441         (WebCore::AccessibilityObject::topDocument):
2442         (WebCore::AccessibilityObject::visiblePositionForBounds):
2443         * accessibility/AccessibilityObject.h:
2444         * accessibility/AccessibilityRenderObject.cpp:
2445         * accessibility/AccessibilityRenderObject.h:
2446         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2447         (-[WebAccessibilityObjectWrapper screenToContents:]):
2448         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
2449         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2450
2451 2013-10-22  Zoltan Horvath  <zoltan@webkit.org>
2452
2453         [CSS Shapes] Match adjustLogicalLineTopAndLogicalHeightIfNeeded's implementation with Blink's
2454         https://bugs.webkit.org/show_bug.cgi?id=123033
2455
2456         Reviewed by David Hyatt.
2457
2458         In Blink I made this function in a bit different way. This change modifies it
2459         to be identical, which helps a lot in the future cross-merging patches.
2460
2461         No new tests, covered by existing texts.
2462
2463         * rendering/RenderBlockLineLayout.cpp:
2464         (WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded):
2465
2466 2013-10-22  Daniel Bates  <dabates@apple.com>
2467
2468         [iOS] Upstream more ARMv7s bits
2469         https://bugs.webkit.org/show_bug.cgi?id=123052
2470
2471         Reviewed by Joseph Pecoraro.
2472
2473         * Configurations/WebCore.xcconfig:
2474
2475 2013-10-22  Simon Fraser  <simon.fraser@apple.com>
2476
2477         Try to fix Mavericks build; use <> for framework include.
2478
2479         * page/CaptionUserPreferencesMediaAF.cpp:
2480
2481 2013-10-22  Tim Horton  <timothy_horton@apple.com>
2482
2483         GammaFilterOperation seems to be dead code
2484         https://bugs.webkit.org/show_bug.cgi?id=123173
2485
2486         Reviewed by Simon Fraser.
2487
2488         * platform/graphics/filters/FilterOperation.cpp:
2489         * platform/graphics/filters/FilterOperation.h:
2490         Remove dead code.
2491
2492 2013-10-22  Antti Koivisto  <antti@apple.com>
2493
2494         Rename some line box functions to be just about lines
2495         https://bugs.webkit.org/show_bug.cgi?id=123168
2496
2497         Reviewed by Dave Hyatt.
2498
2499         firstLineBoxBaseline -> firstLineBaseline
2500         hasInlineBoxChildren -> hasLines
2501         
2502         Also use hasLines in a bunch of places where firstLineBox() was used.
2503
2504         * accessibility/AccessibilityRenderObject.cpp:
2505         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2506         
2507             Also use hasRenderedText() instead of firstTextBox()
2508
2509         * rendering/RenderFullScreen.cpp:
2510         
2511             Fix namespace.
2512
2513 2013-10-22  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2514
2515         Adding Mock class to test RTCPeerConnection
2516         https://bugs.webkit.org/show_bug.cgi?id=122848
2517
2518         Reviewed by Eric Carlson.
2519
2520         The following tests can be run:
2521
2522             RTCPeerConnection-createAnswer.html
2523             RTCPeerConnection-createOffer.html
2524             RTCPeerConnection-ice.html
2525             RTCPeerConnection-localDescription.html
2526             RTCPeerConnection-remoteDescription.html
2527             RTCPeerConnection-state.html
2528
2529         Tests that require a MediaStream object, by invoking getUserMedia,
2530         are not ready to run yet.
2531
2532         No new tests needed.
2533
2534         * CMakeLists.txt:
2535         * platform/mediastream/RTCPeerConnectionHandler.cpp:
2536         (WebCore::createHandler):
2537         * platform/mediastream/RTCPeerConnectionHandler.h:
2538         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
2539         * platform/mock/RTCNotifiersMock.cpp: Added.
2540         * platform/mock/RTCNotifiersMock.h: Added.
2541         * platform/mock/RTCPeerConnectionHandlerMock.cpp: Added.
2542         * platform/mock/RTCPeerConnectionHandlerMock.h: Copied from Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h.
2543         * platform/mock/TimerEventBasedMock.h: Added.
2544         * testing/Internals.cpp:
2545         (WebCore::Internals::Internals):
2546         (WebCore::Internals::enableMockRTCPeerConnectionHandler):
2547         * testing/Internals.h:
2548
2549 2013-10-22  Zan Dobersek  <zdobersek@igalia.com>
2550
2551         WebCore::fillWithEmptyClients adopts new empty clients before leaking their pointers
2552         https://bugs.webkit.org/show_bug.cgi?id=122945
2553
2554         Reviewed by Anders Carlsson.
2555
2556         * loader/EmptyClients.cpp:
2557         (WebCore::fillWithEmptyClients): Store the static empty clients as NeverDestroyed, rather than
2558         adopting the pointer of each heap-allocated object and then immediately leaking that pointer.
2559
2560 2013-10-22  Zan Dobersek  <zdobersek@igalia.com>
2561
2562         Simplify HRTFDatabaseLoader's load map
2563         https://bugs.webkit.org/show_bug.cgi?id=122944
2564
2565         Reviewed by Eric Carlson.
2566
2567         * platform/audio/HRTFDatabaseLoader.cpp:
2568         (WebCore::loaderMap): Return a reference to a NeverDestroyed HashMap that maps sample rates to loaders.
2569         (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
2570         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
2571         * platform/audio/HRTFDatabaseLoader.h: Remove the LoaderMap type definition, the private singleton of that type
2572         and the singleton's unused getter.
2573
2574 2013-10-22  Tim Horton  <timothy_horton@apple.com>
2575
2576         Remote Layer Tree: Support hardware accelerated filters
2577         https://bugs.webkit.org/show_bug.cgi?id=123139
2578
2579         Reviewed by Anders Carlsson.
2580
2581         * WebCore.exp.in:
2582         Export a variety of filter-related things.
2583
2584         * platform/graphics/ca/PlatformCAFilters.h:
2585         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
2586         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2587         (PlatformCALayerMac::setFilters):
2588         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
2589         (PlatformCAFilters::setFiltersOnLayer):
2590         setFiltersOnLayer should take a PlatformLayer instead of a PlatformCALayer
2591         as its argument, because it doesn't need a PlatformCALayer, and this way
2592         we can share code with the RemoteLayerTreeHost, which only has PlatformLayers
2593         and not PlatformCALayers.
2594
2595 2013-10-22  Brendan Long  <b.long@cablelabs.com>
2596
2597         cue.text fails for some track element cues
2598         https://bugs.webkit.org/show_bug.cgi?id=81123
2599
2600         Reviewed by Eric Carlson.
2601
2602         Test: media/track/track-long-captions-file.html
2603
2604         * html/track/WebVTTParser.cpp:
2605         (WebCore::WebVTTParser::parseBytes): Use buffer when we don't have full lines.
2606         (WebCore::WebVTTParser::fileFinished): Force file to finish parsing.
2607         (WebCore::WebVTTParser::hasRequiredFileIdentifier): Simplify due to using String.
2608         (WebCore::WebVTTParser::collectCueText): Don't automatically create cues when we run out of data.
2609         (WebCore::WebVTTParser::collectNextLine): Use buffer.
2610         * html/track/WebVTTParser.h: Add m_buffer and Finished state.
2611         * loader/TextTrackLoader.cpp:
2612         (WebCore::TextTrackLoader::notifyFinished): Call m_parser->fileFinished() when done.
2613
2614 2013-10-22  peavo@outlook.com  <peavo@outlook.com>
2615
2616         [WinCairo] Compile error.
2617         https://bugs.webkit.org/show_bug.cgi?id=123161
2618
2619         Reviewed by Brent Fulgham.
2620
2621         * rendering/RenderFlowThread.h: Move USE(ACCELERATED_COMPOSITING) guard to expose needed type.
2622
2623 2013-10-21  Brady Eidson  <beidson@apple.com>
2624
2625         Add a cross-platform IDBRecordIdentifier
2626         https://bugs.webkit.org/show_bug.cgi?id=123138
2627
2628         Reviewed by Andreas Kling.
2629
2630         Add the cross-platform header:
2631         * Modules/indexeddb/IDBRecordIdentifier.h: Added.
2632         (WebCore::IDBRecordIdentifier::create):
2633         (WebCore::IDBRecordIdentifier::encodedPrimaryKey):
2634         (WebCore::IDBRecordIdentifier::version):
2635         (WebCore::IDBRecordIdentifier::reset):
2636         (WebCore::IDBRecordIdentifier::IDBRecordIdentifier):
2637         * WebCore.xcodeproj/project.pbxproj:
2638         * GNUmakefile.list.am:
2639
2640         Remove the old abstract and LevelDB classes:
2641         * Modules/indexeddb/IDBBackingStoreInterface.h:
2642         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2643
2644         Use the cross-platform one everywhere:
2645         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2646         (WebCore::IDBBackingStoreLevelDB::putRecord):
2647         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
2648         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
2649         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
2650         (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
2651         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
2652
2653         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
2654         (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
2655
2656         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
2657         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys):
2658
2659         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
2660         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
2661         (WebCore::PutOperation::perform):
2662
2663 2013-10-22  Andrei Bucur  <abucur@adobe.com>
2664
2665         [CSS Regions] Possible performance regression after r157567
2666         https://bugs.webkit.org/show_bug.cgi?id=123016
2667
2668         Reviewed by Andreas Kling.
2669
2670         The revision 157567 http://trac.webkit.org/changeset/157567 may have regressed
2671         Parser/html5-full-render by ~1.1% and Parser/html-parser by ~2%. These changes
2672         try to optimize the initial patch, based on Andreas Kling's review.
2673
2674         The patch also adds a couple of refactorings that should make the code easier to read:
2675         - the CSS Shapes functions are now wrapped in a single #if clause
2676         - the CSS Shapes and CSS Regions pre-layout preparations are wrapped in a helper function
2677
2678         The RenderFlowThread::logicalWidthChangedInRegionsForBlock function is optimized by passing
2679         it information about the state of the relayout children flag. If the flag is true already,
2680         some of the steps are skipped.
2681
2682         Tests: no new tests.
2683
2684         * dom/Element.cpp:
2685         (WebCore::Element::webkitGetRegionFlowRanges):
2686         * inspector/InspectorOverlay.cpp:
2687         (WebCore::buildObjectForElementInfo):
2688         * rendering/RenderBlock.cpp:
2689         (WebCore::shapeInfoRequiresRelayout):
2690         (WebCore::RenderBlock::updateShapesBeforeBlockLayout):
2691         (WebCore::RenderBlock::computeShapeSize):
2692         (WebCore::RenderBlock::prepareShapesAndPaginationBeforeBlockLayout):
2693         * rendering/RenderBlock.h:
2694         * rendering/RenderBlockFlow.cpp:
2695         (WebCore::RenderBlockFlow::layoutBlock):
2696         (WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
2697         (WebCore::RenderBlockFlow::setRenderNamedFlowFragment):
2698         (WebCore::RenderBlockFlow::ensureRareData):
2699         * rendering/RenderBlockFlow.h:
2700         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
2701         (WebCore::RenderElement::isRenderNamedFlowFragmentContainer):
2702         * rendering/RenderDeprecatedFlexibleBox.cpp:
2703         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2704         * rendering/RenderElement.h:
2705         (WebCore::RenderElement::generatingElement):
2706         * rendering/RenderFlexibleBox.cpp:
2707         (WebCore::RenderFlexibleBox::layoutBlock):
2708         * rendering/RenderFlowThread.cpp:
2709         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
2710         * rendering/RenderFlowThread.h:
2711         * rendering/RenderGrid.cpp:
2712         (WebCore::RenderGrid::layoutBlock):
2713         * rendering/RenderNamedFlowFragment.h:
2714         * rendering/RenderObject.cpp:
2715         * rendering/RenderObject.h:
2716         * rendering/RenderTreeAsText.cpp:
2717         (WebCore::write):
2718         * style/StyleResolveTree.cpp:
2719         (WebCore::Style::elementInsideRegionNeedsRenderer):
2720
2721 2013-10-22  Andreas Kling  <akling@apple.com>
2722
2723         CSSStyleSheet constructor functions should return PassRef.
2724         <https://webkit.org/b/123156>
2725
2726         Make CSSStyleSheet::create*() return PassRef and tighten some call
2727         sites that were using them. Most callers didn't need any tweaks to
2728         take advantage of PassRef.
2729
2730         Reviewed by Antti Koivisto.
2731
2732 2013-10-22  Andreas Kling  <akling@apple.com>
2733
2734         CTTE: RenderMathMLFraction always has a MathMLInlineContainerElement.
2735         <https://webkit.org/b/123154>
2736
2737         This renderer is never anonymous and always has a corresponding
2738         MathMLInlineContainerElement. Overload element() with a tighter
2739         return type.
2740
2741         Also marked the class FINAL and made most member functions private.
2742
2743         Reviewed by Antti Koivisto.
2744
2745 2013-10-22  Andreas Kling  <akling@apple.com>
2746
2747         FontGlyphs constructor functions should return PassRef.
2748         <https://webkit.org/b/123159>
2749
2750         Made the two FontGlyphs creator functions return PassRef and tweaked
2751         the FontGlyphsCache in Font.cpp to make more efficient use of it.
2752
2753         Reviewed by Antti Koivisto.
2754
2755 2013-10-22  Andreas Kling  <akling@apple.com>
2756
2757         Fix some more code to use RenderElement instead of RenderObject.
2758         <https://webkit.org/b/123149>
2759
2760         Using RenderElement where possible lets us skip the isRenderElement()
2761         branch in RenderObject::style() and generates much tighter code.
2762
2763         Reviewed by Antti Koivisto.
2764
2765 2013-10-22  Andreas Kling  <akling@apple.com>
2766
2767         Merge SVG renderers' styleWillChange() into styleDidChange().
2768         <https://webkit.org/b/123108>
2769
2770         This work can just as well be done after setting the style.
2771         Three more styleWillChange() overloads gone.
2772
2773         Reviewed by Antti Koivisto.
2774
2775 2013-10-22  Andreas Kling  <akling@apple.com>
2776
2777         CSSValueList constructor functions should return PassRef.
2778         <https://webkit.org/b/123151>
2779
2780         These functions always return objects, and thus can return PassRef.
2781         Also made CSSValueList::createFromParserValueList() take a reference
2782         since that function is only ever called with a non-null value.
2783
2784         Reviewed by Antti Koivisto.
2785
2786 2013-10-22  Andreas Kling  <akling@apple.com>
2787
2788         Avoid parent style ref churn in createTextRendererIfNeeded().
2789         <https://webkit.org/b/123148>
2790
2791         There's no need to take a temporary ref on the parent's RenderStyle
2792         while creating a text renderer. It's not going away, and the text
2793         renderer is not going to participate in ownership afterwards.
2794
2795         Reviewed by Antti Koivisto.
2796
2797 2013-10-22  Andreas Kling  <akling@apple.com>
2798
2799         Remove some unnecessary null checks in RenderElement::setStyle().
2800         <https://webkit.org/b/123146>
2801
2802         After assigning the new style to RenderElement::m_style, we know that
2803         it'll be non-null, so remove all the checking for this.
2804
2805         Reviewed by Antti Koivisto.
2806
2807 2013-10-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2808
2809         Introduce ACCESSIBILITY_OBJECT_TYPE_CASTS to replace manual toFoo() in accessibility child class
2810         https://bugs.webkit.org/show_bug.cgi?id=123140
2811
2812         Reviewed by Andreas Kling.
2813
2814         As a step to let toFoo use TYPE_CASTS_BASE, DEFINE_TYPE_CASTS can be used for toFoo() in accessibility
2815         child class. The DEFINE_TYPE_CASTS will generate plenty more helper functions for accessibility type cast.
2816
2817         No new tests, no behavior changes.
2818
2819         * accessibility/AccessibilityList.h:
2820         * accessibility/AccessibilityMenuList.h:
2821         * accessibility/AccessibilityMockObject.h:
2822         * accessibility/AccessibilityNodeObject.h:
2823         * accessibility/AccessibilityObject.h:
2824         * accessibility/AccessibilityRenderObject.h:
2825         * accessibility/AccessibilitySVGRoot.h:
2826         * accessibility/AccessibilityScrollView.h:
2827         * accessibility/AccessibilitySpinButton.h:
2828         * accessibility/AccessibilityTable.h:
2829
2830 2013-10-22  Brian Holt  <brian.holt@samsung.com>
2831
2832         [GTK] Add WebKit2 API for TLS errors
2833         https://bugs.webkit.org/show_bug.cgi?id=120160
2834
2835         Reviewed by Carlos Garcia Campos.
2836
2837         Added a new constructor for CertificateInfo under Soup.
2838
2839         * platform/network/CertificateInfo.h:
2840         * platform/network/soup/CertificateInfoSoup.cpp:
2841         (WebCore::CertificateInfo::CertificateInfo): New constructor using
2842         GTlsCertificateFlags and GTlsCertificate.
2843
2844 2013-10-22  Mihnea Ovidenie  <mihnea@adobe.com>
2845
2846         [CSSRegions] Use RenderStyle::hasFlowFrom when needed
2847         https://bugs.webkit.org/show_bug.cgi?id=122543
2848
2849         Reviewed by David Hyatt.
2850
2851         Rename RenderStyle::hasStyleRegion -> RenderStyle::hasFlowFrom.
2852         Use RenderStyle::hasFlowFrom() helper function instead of directly
2853         checking the value of RenderStyle::regionThread().
2854
2855         No change of functionality, covered by existing tests.
2856
2857         * css/CSSComputedStyleDeclaration.cpp:
2858         (WebCore::contentToCSSValue):
2859         (WebCore::ComputedStyleExtractor::propertyValue):
2860         * css/StyleResolver.cpp:
2861         (WebCore::StyleResolver::adjustRenderStyle):
2862         * dom/PseudoElement.cpp:
2863         (WebCore::PseudoElement::didAttachRenderers):
2864         * dom/PseudoElement.h:
2865         (WebCore::pseudoElementRendererIsNeeded):
2866         * rendering/RenderBlockFlow.cpp:
2867         (WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
2868         * rendering/RenderLayer.cpp:
2869         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
2870         * rendering/style/RenderStyle.h:
2871
2872 2013-10-21  Brent Fulgham  <bfulgham@apple.com>
2873
2874         [WIN] Properly support reverse animations without needing software fallback.
2875         https://bugs.webkit.org/show_bug.cgi?id=85121
2876
2877         Reviewed by Dean Jackson.
2878
2879         Testing is provided by existing animation tests.
2880
2881         * platform/animation/TimingFunction.h:
2882         (WebCore::CubicBezierTimingFunction::createReversed): Added.
2883         * platform/graphics/ca/GraphicsLayerCA.cpp:
2884         (WebCore::GraphicsLayerCA::addAnimation): The early return when performing a reverse or
2885         autoreverse animation is no longer needed.
2886         * platform/graphics/ca/PlatformCAAnimation.h:
2887         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2888         (toCAMediaTimingFunction): Use new reversed function.
2889         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
2890         (toCACFTimingFunction): Ditto.
2891         (PlatformCAAnimation::setTimingFunction): Pass 'reverse' flag.
2892         (PlatformCAAnimation::setTimingFunctions): Ditto.
2893
2894 2013-10-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2895
2896         Use TYPE_CASTS_BASE for CSS_VALUE_TYPE_CASTS
2897         https://bugs.webkit.org/show_bug.cgi?id=123126
2898
2899         Reviewed by Andreas Kling.
2900
2901         TYPE_CASTS_BASE was moved to common place to be used by all toFoo().
2902         CSS_VALUE_TYPE_CASTS starts to use it for CSS child value. This change
2903         generates plenty more helper functions for toCSSFooValue().
2904
2905         Additionally, this use support that toWebKitCSSFooValue, which couldn't
2906         use CSS_VALUE_TYPE_CASTS macro.
2907
2908         No new tests, no behavior change.
2909
2910         * css/CSSAspectRatioValue.h:
2911         * css/CSSBorderImageSliceValue.h:
2912         * css/CSSCalculationValue.h:
2913         * css/CSSCanvasValue.h:
2914         * css/CSSCrossfadeValue.h:
2915         * css/CSSCursorImageValue.h:
2916         * css/CSSFilterImageValue.h:
2917         * css/CSSFontFaceSrcValue.h:
2918         * css/CSSFontFeatureValue.h:
2919         * css/CSSFontValue.h:
2920         * css/CSSFunctionValue.h:
2921         * css/CSSGradientValue.h:
2922         * css/CSSGridTemplateValue.h:
2923         * css/CSSImageSetValue.h:
2924         * css/CSSImageValue.h:
2925         * css/CSSInheritedValue.h:
2926         * css/CSSInitialValue.h:
2927         * css/CSSLineBoxContainValue.h:
2928         * css/CSSPrimitiveValue.h:
2929         * css/CSSReflectValue.h:
2930         * css/CSSShadowValue.h:
2931         * css/CSSTimingFunctionValue.h:
2932         * css/CSSUnicodeRangeValue.h:
2933         * css/CSSValue.h:
2934         * css/CSSValueList.h:
2935         * css/CSSVariableValue.h:
2936         * css/WebKitCSSArrayFunctionValue.h:
2937         * css/WebKitCSSFilterValue.h:
2938         * css/WebKitCSSMatFunctionValue.h:
2939         * css/WebKitCSSMixFunctionValue.h:
2940         * css/WebKitCSSSVGDocumentValue.h:
2941         * css/WebKitCSSShaderValue.h:
2942
2943 2013-10-21  Joone Hur  <joone.hur@intel.com>
2944
2945         Bad cast with toRenderBoxModelObject in RenderBlock::updateFirstLetter()
2946         https://bugs.webkit.org/show_bug.cgi?id=123013
2947
2948         Reviewed by Andreas Kling.
2949
2950         No new tests because this was reported by Google ClusterFuzz.
2951         https://codereview.chromium.org/25713009/
2952
2953         There is a case that toRenderBoxModelObject causes a crash in RenderBlock::updateFirstLetter() 
2954         due to bad cast, so we need to check whether the RenderObject is a RenderBoxModelObject 
2955         by running isBoxModelObject() before calling toRenderBoxModelObject.  
2956
2957         * rendering/RenderBlock.cpp:
2958         (WebCore::RenderBlock::updateFirstLetter):
2959
2960 2013-10-21  Brady Eidson  <beidson@apple.com>
2961
2962         Make IDBTransactionCoordinatorLevelDB cross platform
2963         https://bugs.webkit.org/show_bug.cgi?id=123124
2964
2965         Enthusiastically reviewed by Tim Horton.
2966
2967         * CMakeLists.txt:
2968         * GNUmakefile.list.am:
2969         * WebCore.xcodeproj/project.pbxproj:
2970
2971         Make more methods pure virtual in the interface:
2972         * Modules/indexeddb/IDBTransactionBackendInterface.h:
2973         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
2974         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
2975
2976         Update the name of the class, and use IDBTransactionBackendInterface instead of IDBTransactionBackendLeveDB:
2977         * Modules/indexeddb/IDBTransactionCoordinator.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.cpp.
2978         (WebCore::IDBTransactionCoordinator::create):
2979         (WebCore::IDBTransactionCoordinator::IDBTransactionCoordinator):
2980         (WebCore::IDBTransactionCoordinator::~IDBTransactionCoordinator):
2981         (WebCore::IDBTransactionCoordinator::didCreateTransaction):
2982         (WebCore::IDBTransactionCoordinator::didStartTransaction):
2983         (WebCore::IDBTransactionCoordinator::didFinishTransaction):
2984         (WebCore::IDBTransactionCoordinator::isActive):
2985         (WebCore::IDBTransactionCoordinator::processStartedTransactions):
2986         (WebCore::doScopesOverlap):
2987         (WebCore::IDBTransactionCoordinator::canRunTransaction):
2988         * Modules/indexeddb/IDBTransactionCoordinator.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.h.
2989
2990         Update the name of the class elsewhere:
2991         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
2992         (WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
2993         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
2994         (WebCore::IDBDatabaseBackendLevelDB::transactionCoordinator):
2995         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2996
2997 2013-10-21  Daniel Bates  <dabates@apple.com>
2998
2999         [iOS] Upstream JSGlobalObject::shouldInterruptScriptBeforeTimeout()
3000         https://bugs.webkit.org/show_bug.cgi?id=123045
3001
3002         Reviewed by Joseph Pecoraro.
3003
3004         * bindings/js/JSDOMWindowBase.cpp:
3005         (WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage): Added.
3006         (WebCore::JSDOMWindowBase::shouldInterruptScript): Extracted comment and assertion
3007         about null Page object into WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage()
3008         so that it can be shared by both this function and JSDOMWindowBase::shouldInterruptScriptBeforeTimeout().
3009         (WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout):
3010         * bindings/js/JSDOMWindowBase.h:
3011         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3012         (WebCore::JSWorkerGlobalScopeBase::shouldInterruptScriptBeforeTimeout): Added.
3013         * bindings/js/JSWorkerGlobalScopeBase.h:
3014         * loader/EmptyClients.h: Added isStopping(). We'll land the iOS chrome client implementation
3015         in a subsequent patch.
3016         * page/ChromeClient.h: Added isStopping().
3017
3018 2013-10-21  Anders Carlsson  <andersca@apple.com>
3019
3020         Navigation policy callback not called when performing the same fragment navigation twice
3021         https://bugs.webkit.org/show_bug.cgi?id=123121
3022         <rdar://problem/15230466>
3023
3024         Reviewed by Beth Dakin.
3025
3026         There's code in PolicyChecker::checkNavigationPolicy that will call the decision function right away 
3027         if the requests are equal, without consulting any policy client. Because of this, make sure to empty out
3028         the last checked request of the document loader when doing a fragment navigation.
3029
3030         * loader/FrameLoader.cpp:
3031         (WebCore::FrameLoader::loadURL):
3032         (WebCore::FrameLoader::loadWithDocumentLoader):
3033
3034 2013-10-21  Jer Noble  <jer.noble@apple.com>
3035
3036         Unreviewed build fix; unprotect the declaration of updateSleepDisabling();
3037
3038         * html/HTMLMediaElement.h:
3039
3040 2013-10-20  Mark Lam  <mark.lam@apple.com>
3041
3042         Avoid JSC debugger overhead unless needed.
3043         https://bugs.webkit.org/show_bug.cgi?id=123084.
3044
3045         Reviewed by Geoffrey Garen.
3046
3047         No new tests.
3048
3049         - If no breakpoints are set, we now avoid calling the debug hook callbacks.
3050         - If no break on exception is set, we also avoid exception event debug callbacks.
3051         - When we return from the ScriptDebugServer to the JSC::Debugger, we may no
3052           longer call the debug hook callbacks if not needed. Hence, the m_currentCallFrame
3053           pointer in the ScriptDebugServer may become stale. To avoid this issue, before
3054           returning, the ScriptDebugServer will clear its m_currentCallFrame if
3055           needsOpDebugCallbacks() is false.
3056
3057         * bindings/js/ScriptDebugServer.cpp:
3058         (WebCore::ScriptDebugServer::setBreakpoint):
3059         (WebCore::ScriptDebugServer::removeBreakpoint):
3060         (WebCore::ScriptDebugServer::clearBreakpoints):
3061         (WebCore::ScriptDebugServer::setPauseOnExceptionsState):
3062         (WebCore::ScriptDebugServer::setPauseOnNextStatement):
3063         (WebCore::ScriptDebugServer::breakProgram):
3064         (WebCore::ScriptDebugServer::stepIntoStatement):
3065         (WebCore::ScriptDebugServer::dispatchDidContinue):
3066         (WebCore::ScriptDebugServer::exception):
3067         (WebCore::ScriptDebugServer::didReachBreakpoint):
3068         * inspector/InspectorDebuggerAgent.cpp:
3069         (WebCore::InspectorDebuggerAgent::reset):
3070
3071 2013-10-21  Myles C. Maxfield  <mmaxfield@apple.com>
3072
3073         Grammar markers are not updated when switching between 1x and 2x
3074         https://bugs.webkit.org/show_bug.cgi?id=122146
3075
3076         Reviewed by Dean Jackson.
3077
3078         When running editing/spelling/grammar-markers-hidpi.html, the 2x
3079         grammar/spelling dot resources are cached. If you then run
3080         editing/spelling/grammar-markers.html without tearing down WebKit,
3081         it re-uses the 2x dots. The difference between the two tests is a call
3082         to testRunner.setBackingScaleFactor().
3083
3084         We create a NSColor from an NSImage, and remember it in a static
3085         variable. However, NSColor inspects the current graphics context to
3086         determine which resolution to use, and then remembers that decision.
3087         Therefore, we want to recreate the NSColor whenever the device pixel
3088         ratio changes. This patch adds a new static function to GraphicsContext
3089         which recreates this NSColor every time the ratio changes.
3090
3091         Tests: editing/spelling/grammar-markers.html
3092                editing/spelling/inline_spelling_markers.html
3093
3094         * platform/graphics/mac/GraphicsContextMac.mm:
3095         (WebCore::makePattern):
3096         (WebCore::GraphicsContext::drawLineForDocumentMarker):
3097
3098 2013-10-21  Simon Fraser  <simon.fraser@apple.com>
3099
3100         Use pink layer borders for compositing layers with a contents layer
3101         https://bugs.webkit.org/show_bug.cgi?id=123118
3102
3103         Reviewed by Dean Jackson.
3104
3105         With the existing layer border colors, it's not possible to distinguish an empty
3106         layer from one with solid color, image or video contents. So use a pink color
3107         for those. This makes it easier to diagnose bugs like 122784.
3108
3109         * platform/graphics/GraphicsLayer.cpp:
3110         (WebCore::GraphicsLayer::getDebugBorderInfo):
3111
3112 2013-10-21  Jer Noble  <jer.noble@apple.com>
3113
3114         Limit use of display sleep assertion when <video> element is off-screen.
3115         https://bugs.webkit.org/show_bug.cgi?id=123041
3116
3117         Reviewed by Darin Adler.
3118
3119         Use page visibility changes to suspend and resume the use of sleep assertions in
3120         HTMLMediaElement.
3121
3122         Page will propogate the page visibility change notifications to its Documents, which
3123         will further propogate those notifications to registered elements.  Upon receiving
3124         these notifications, HTMLMediaElement will release or take a DisplaySleepDisabler
3125         token if necessary.
3126
3127         Also, rename HTMLMediaElement's updateDisableSleep() to updateSleepDisabling() and wrap
3128         the implementation in a PLATFORM(MAC) guard rather than at each call site.
3129
3130         * dom/Document.cpp:
3131         (WebCore::Document::registerForVisibilityStateCallbacks): Added registration method.
3132         (WebCore::Document::unregisterForVisibilityStateCallbacks): Added unregistration method.
3133         (WebCore::Document::visibilityStateChanged): Call all registered clients.
3134         * dom/Document.h:
3135         * dom/Element.h:
3136         (WebCore::Element::visibilityStateChanged): Added default virtual method to be overridden
3137             by subclasses.
3138         * html/HTMLMediaElement.cpp:
3139         (WebCore::HTMLMediaElement::HTMLMediaElement): Register for the notification, and check the
3140             current status of Document::hidden().
3141         (WebCore::HTMLMediaElement::~HTMLMediaElement): Unregister for the notification.
3142         (WebCore::HTMLMediaElement::visibilityStateChanged): Set m_displaySleepDisablingSuspended
3143             and call updateSleepDisabling().
3144         (WebCore::HTMLMediaElement::shouldDisableSleep): Add a check for m_displaySleepDisablingSuspended.
3145         * html/HTMLMediaElement.h:
3146         * page/Page.cpp:
3147         (WebCore::Page::setVisibilityState): Pass to every child document.
3148
3149         Rename updateDisableSleep() -> updateSleepDisabling():
3150         * html/HTMLMediaElement.cpp:
3151         (WebCore::HTMLMediaElement::HTMLMediaElement):
3152         (WebCore::HTMLMediaElement::~HTMLMediaElement):
3153         (WebCore::HTMLMediaElement::parseAttribute):
3154         (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
3155         (WebCore::HTMLMediaElement::clearMediaPlayer):
3156         (WebCore::HTMLMediaElement::stop):
3157
3158 2013-10-21  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3159
3160         MediaStreamTrack now tracks its own state
3161         https://bugs.webkit.org/show_bug.cgi?id=123025
3162
3163         Reviewed by Jer Noble.
3164
3165         The spec says that a MediaStreamSource can be shared by different tracks,
3166         so a track must have its own state tracking, synchronizing with its MediaStreamSource when
3167         the underlying MediaStreamSource changes the readyState.
3168         In the old implementation if a user invoked the stop method, its readyState method was still
3169         returning the MediaStreamSource state, which was wrong.
3170         This also adds a setEnabled method, which can be used to set the state of a track when a
3171         remote peer ends it, for instance.
3172
3173         No new tests needed.
3174
3175         * Modules/mediastream/MediaStreamTrack.cpp:
3176         (WebCore::MediaStreamTrack::readyState):
3177         (WebCore::MediaStreamTrack::setState):
3178         (WebCore::MediaStreamTrack::stopProducingData):
3179         (WebCore::MediaStreamTrack::ended):
3180         (WebCore::MediaStreamTrack::sourceStateChanged):
3181         (WebCore::MediaStreamTrack::trackDidEnd):
3182         * Modules/mediastream/MediaStreamTrack.h:
3183
3184 2013-10-21  Tim Horton  <timothy_horton@apple.com>
3185
3186         Remote Layer Tree: Clean up transaction logging
3187         https://bugs.webkit.org/show_bug.cgi?id=123116
3188
3189         Reviewed by Anders Carlsson.
3190
3191         * WebCore.exp.in:
3192         Export some TextStream functions.
3193
3194 2013-10-21  Brady Eidson  <beidson@apple.com>
3195
3196         Transition most use of IDBBackingStoreLevelDB to IDBBackingStoreInterface
3197         https://bugs.webkit.org/show_bug.cgi?id=123105
3198
3199         Reviewed by Anders Carlsson.
3200
3201         Export more required headers:
3202         * WebCore.xcodeproj/project.pbxproj:
3203
3204         Flesh out many of the pure virtual methods on IDBBackingStoreInterface, as well as
3205         the RecordIdentifier and Cursor classes:
3206
3207         * Modules/indexeddb/IDBBackingStoreInterface.h:
3208         (WebCore::IDBBackingStoreInterface::RecordIdentifier::~RecordIdentifier):
3209         (WebCore::IDBBackingStoreInterface::Cursor::~Cursor):
3210
3211         Use IDBBackingStoreInterface, IDBBackingStoreInterface::RecordIdentifier, and
3212         IDBBackingStoreInterface::Cursor wherever possible:
3213
3214         * Modules/indexeddb/IDBFactoryBackendInterface.cpp:
3215         * Modules/indexeddb/IDBFactoryBackendInterface.h:
3216
3217         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3218         (WebCore::IDBBackingStoreLevelDB::putRecord):
3219         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
3220         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
3221         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
3222         (WebCore::ObjectStoreKeyCursorImpl::clone):
3223         (WebCore::ObjectStoreCursorImpl::clone):
3224         (WebCore::IndexKeyCursorImpl::clone):
3225         (WebCore::IndexCursorImpl::clone):
3226         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
3227         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
3228         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
3229         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
3230         (WebCore::IDBBackingStoreLevelDB::Transaction::Transaction):
3231         (WebCore::IDBBackingStoreLevelDB::Transaction::begin):
3232         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3233         (WebCore::IDBBackingStoreLevelDB::RecordIdentifier::RecordIdentifier):
3234
3235         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
3236         (WebCore::IDBCursorBackendLevelDB::IDBCursorBackendLevelDB):
3237         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
3238
3239         (WebCore::IDBCursorBackendLevelDB::create):
3240         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
3241         (WebCore::IDBDatabaseBackendLevelDB::create):
3242         (WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
3243         (WebCore::IDBDatabaseBackendLevelDB::backingStore):
3244         (WebCore::IDBDatabaseBackendLevelDB::setIndexKeys):
3245         (WebCore::IDBDatabaseBackendLevelDB::createTransaction):
3246         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
3247
3248         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
3249         (WebCore::IDBFactoryBackendLevelDB::createTransactionBackend):
3250         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
3251
3252         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
3253         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::verifyIndexKeys):
3254         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys):
3255         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::addingKeyAllowed):
3256         (WebCore::IDBObjectStoreBackendLevelDB::makeIndexWriters):
3257         (WebCore::IDBObjectStoreBackendLevelDB::generateKey):
3258         (WebCore::IDBObjectStoreBackendLevelDB::updateKeyGenerator):
3259         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
3260
3261         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
3262         (WebCore::IDBTransactionBackendLevelDB::create):
3263         (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
3264         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
3265
3266         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
3267         (WebCore::GetOperation::perform):
3268         (WebCore::OpenCursorOperation::perform):
3269         (WebCore::CountOperation::perform):
3270         (WebCore::DeleteRangeOperation::perform):
3271         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
3272         (WebCore::CreateObjectStoreOperation::create):
3273         (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
3274         (WebCore::DeleteObjectStoreOperation::create):
3275         (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
3276         (WebCore::CreateIndexOperation::create):
3277         (WebCore::CreateIndexOperation::CreateIndexOperation):
3278         (WebCore::DeleteIndexOperation::create):
3279         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
3280         (WebCore::GetOperation::create):
3281         (WebCore::GetOperation::GetOperation):
3282         (WebCore::PutOperation::create):
3283         (WebCore::PutOperation::PutOperation):
3284         (WebCore::OpenCursorOperation::create):
3285         (WebCore::OpenCursorOperation::OpenCursorOperation):
3286         (WebCore::CountOperation::create):
3287         (WebCore::CountOperation::CountOperation):
3288         (WebCore::DeleteRangeOperation::create):
3289         (WebCore::DeleteRangeOperation::DeleteRangeOperation):
3290         (WebCore::ClearOperation::create):
3291         (WebCore::ClearOperation::ClearOperation):
3292
3293 2013-10-21  Zoltan Horvath  <zoltan@webkit.org>
3294
3295         [CSS Shapes][CSS Regions] Don't apply shape-inside when we have multiple auto-height regions and the height is not resolved
3296         https://bugs.webkit.org/show_bug.cgi?id=123103
3297
3298         Reviewed by David Hyatt.
3299
3300         When we have multiple regions with auto-height, the region's height is not resolved from other elements we can't apply the
3301         the shape on the region. This patch prevents to apply the shape and fixes the behavior for these cases.
3302
3303         Test: fast/regions/shape-inside/shape-inside-on-multiple-autoheight-regions.html
3304
3305         * rendering/RenderBlock.cpp:
3306         (WebCore::RenderBlock::layoutShapeInsideInfo):
3307         * rendering/RenderBlockLineLayout.cpp:
3308         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
3309
3310 2013-10-21  Tim Horton  <timothy_horton@apple.com>
3311
3312         Remote Layer Tree: Backing store should take contentsScale into account
3313         https://bugs.webkit.org/show_bug.cgi?id=123106
3314
3315         Reviewed by Simon Fraser.
3316
3317         * WebCore.exp.in:
3318         Export FloatRect::scale.
3319
3320 2013-10-21  Andreas Kling  <akling@apple.com>
3321
3322         RenderScrollbarPart doesn't need styleWillChange().
3323         <https://webkit.org/b/123113>
3324
3325         We will call setInline(false) in styleDidChange(), there's no need
3326         to override styleWillChange() just to do it twice.
3327
3328         Reviewed by Darin Adler.
3329
3330 2013-10-21  Mihai Maerean  <mmaerean@adobe.com>
3331
3332         [CSS Regions] The layers from the flow thread should be collected under the regions' layers.
3333         https://bugs.webkit.org/show_bug.cgi?id=120457
3334
3335         Reviewed by David Hyatt.
3336
3337         This patch is based on the work of Alexandru Chiculita at https://bugs.webkit.org/attachment.cgi?id=203872&action=review
3338
3339         The composited layers inside the named flow threads are collected as part of the regions (as children of the
3340         GraphicsLayer of the layer that corresponds to the region (which is attached to the parent renderer of
3341         RenderNameFlowFragment)).
3342         When a region displays a layer that needs accelerated compositing we activate the accelerated compositing for
3343         that region too (inside RenderLayerCompositor::computeRegionCompositingRequirements).
3344
3345         This patch has landed before (as http://trac.webkit.org/changeset/156451), but was reverted because
3346         fast/multicol/mixed-positioning-stacking-order.html failed. The fix is inside RenderLayerCompositor::canBeComposited
3347         that only enables compositing for layers inside flow threads that collect the graphics layers under the regions.
3348
3349         Another change from changeset #156451 is that now the region renderers are created as anonymous renderers under
3350         the element that has the flow-from property. When a composited layer is needed for the region, it sits in it's
3351         parent renderer, not in the region renderer (RenderNamedFlowFragment).
3352
3353         Tests: compositing/regions/crash-transform-inside-region.html
3354                compositing/regions/floated-region-with-transformed-child.html
3355                compositing/regions/move-layer-from-one-region-to-another.html
3356                compositing/regions/propagate-region-box-shadow-border-padding-for-video.html
3357                compositing/regions/propagate-region-box-shadow-border-padding.html
3358                compositing/regions/region-as-layer-in-another-flowthread.html
3359                compositing/regions/transform-transparent-positioned-video-inside-region.html
3360                compositing/regions/transformed-layer-inside-transformed-layer.html
3361                compositing/regions/z-index-update.html
3362                compositing/regions/z-index.html
3363
3364         * rendering/FlowThreadController.cpp:
3365         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
3366         * rendering/RenderElement.cpp:
3367         (WebCore::RenderElement::propagateStyleToAnonymousChildren): Not for RenderFlowThreads, as they are updated
3368         through the RenderView::styleDidChange function.
3369         * rendering/RenderFlowThread.cpp:
3370         (WebCore::RenderFlowThread::layout): When the layout of the flow thread is over (including the 2 phase layout),
3371         we update all the mappings between the layers inside the flow thread and the regions where those layers will be
3372         painted.
3373         (WebCore::RenderFlowThread::hasCompositingRegionDescendant): Whether any of the regions has a compositing descendant.
3374         (WebCore::RenderFlowThread::getLayerListForRegion):
3375         (WebCore::RenderFlowThread::regionForCompositedLayer):
3376         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
3377         (WebCore::RenderFlowThread::collectsGraphicsLayersUnderRegions):
3378         (WebCore::RenderFlowThread::updateLayerToRegionMappings): Triggers an update of the layers if a layer has moved
3379         from a region to another since the last update.
3380         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
3381         * rendering/RenderFlowThread.h:
3382         * rendering/RenderGeometryMap.cpp:
3383         (WebCore::RenderGeometryMap::pushRenderFlowThread):
3384         * rendering/RenderGeometryMap.h:
3385         * rendering/RenderLayer.cpp:
3386         (WebCore::RenderLayer::paintList):
3387         (WebCore::RenderLayer::enclosingFlowThreadAncestor):
3388         (WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions):
3389         (WebCore::RenderLayer::hitTestList):
3390         (WebCore::RenderLayer::calculateLayerBounds): When we calculate the bounds of the RenderView, we ignore those
3391         flow threads that collect the graphics layers under the regions.
3392         (WebCore::RenderLayer::dirtyZOrderLists):
3393         (WebCore::RenderLayer::dirtyNormalFlowList):
3394         * rendering/RenderLayer.h:
3395         * rendering/RenderLayerBacking.cpp:
3396         (WebCore::RenderLayerBacking::shouldClipCompositedBounds): Not if it's a flow thread that collects the graphics
3397         layers under the regions
3398         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Now adjusts the ancestorCompositingBounds for the FlowThread.
3399         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): Make sure that the region propagates
3400         its borders, paddings, outlines or box-shadows to layers inside it.
3401         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
3402         * rendering/RenderLayerBacking.h:
3403         * rendering/RenderLayerCompositor.cpp:
3404         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Now calls computeRegionCompositingRequirements.
3405         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
3406         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Do not iterate the RenderFlowThread directly if
3407         we are going to collect the composited layers as part of regions.
3408         (WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
3409         (WebCore::RenderLayerCompositor::canBeComposited): CSS Regions flow threads do not need to be composited as we
3410         use composited RenderRegions to render the background of the RenderFlowThread.
3411         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): If it's a container of a css region.
3412         * rendering/RenderLayerCompositor.h:
3413         * rendering/RenderMultiColumnSet.cpp:
3414         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
3415         * rendering/RenderMultiColumnSet.h:
3416         * rendering/RenderNamedFlowFragment.h:
3417         (WebCore::RenderNamedFlowFragment::layerOwner): When the content inside the region requires the region to have a
3418         layer, the layer will be created on the region's parent renderer instead. This method returns that renderer
3419         holding the layer. The return value may be null.
3420         * rendering/RenderNamedFlowThread.cpp:
3421         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
3422         (WebCore::RenderNamedFlowThread::nextRendererForNode):
3423         (WebCore::RenderNamedFlowThread::previousRendererForNode):
3424         (WebCore::RenderNamedFlowThread::addFlowChild):
3425         (WebCore::RenderNamedFlowThread::removeFlowChild):
3426         (WebCore::RenderNamedFlowThread::collectsGraphicsLayersUnderRegions):
3427         * rendering/RenderNamedFlowThread.h: m_flowThreadChildList is now allocated through an OwnPtr to keep the render
3428         arena under the size limit.
3429         * rendering/RenderRegion.cpp:
3430         (WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect):
3431         * rendering/RenderRegion.h:
3432         (WebCore::toRenderRegion):
3433         * rendering/RenderTreeAsText.cpp:
3434         (WebCore::writeLayers):
3435         * WebCore.exp.in: WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions
3436
3437 2013-10-21  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3438
3439         Fixing mediastream debug build
3440         https://bugs.webkit.org/show_bug.cgi?id=123104
3441
3442         Reviewed by Andreas Kling.
3443
3444         No new tests needed.
3445
3446         * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
3447         (WebCore::RTCDTMFToneChangeEvent::create):
3448
3449 2013-10-21  Andreas Kling  <akling@apple.com>
3450
3451         Merge RenderListMarker::styleWillChange() into styleDidChange().
3452         <https://webkit.org/b/123098>
3453
3454         If the marker's list-style-type or list-style-position changed, we
3455         need to dirty the layout. Move this logic to styleDidChange() so we
3456         can get rid of one styleWillChange() overload.
3457
3458         Reviewed by Antti Koivisto.
3459
3460 2013-10-21  Mihai Maerean  <mmaerean@adobe.com>
3461
3462         [CSS Regions] Fix WHITESPACE issues in the CSS grammar.
3463         https://bugs.webkit.org/show_bug.cgi?id=123082
3464
3465         Reviewed by Andreas Kling.
3466
3467         This is a port of Rune Lillesveen's patch from https://codereview.chromium.org/25607005
3468
3469         Fix WHITESPACE issues in the CSS grammar.
3470
3471         A single WHITESPACE token consumes consecutive spaces, but does not consume
3472         spaces separated by comments. That means S* and S+ in CSS grammars need to
3473         accept multiple WHITESPACE tokens. Additionally, white spaces are not
3474         mandatory to separate an @-symbol and the rest of the prelude.
3475
3476         Use space non-terminal instead of WHITESPACE for S+ in calc expressions.
3477
3478         Use maybe_space non-terminal instead of WHITESPACE for S* after @-webkit-filter
3479         and @-webkit-region.
3480
3481         Tests: fast/css/calc-comments-allowed.html
3482                fast/regions/webkit-region-syntax-space.html
3483
3484         * css/CSSGrammar.y.in:
3485
3486 2013-10-21  Anton Obzhirov  <a.obzhirov@samsung.com>
3487
3488         [ATK] Use atk_object_notify_state_change instead of manually emitting signals
3489         https://bugs.webkit.org/show_bug.cgi?id=122968
3490
3491         Reviewed by Mario Sanchez Prada.
3492
3493         Refactor emitting "state-change" event to use atk_object_notify_state_change
3494         instead of using g_signal_emit_by_name.
3495
3496         * accessibility/atk/AXObjectCacheAtk.cpp:
3497         (WebCore::notifyChildrenSelectionChange):
3498         (WebCore::AXObjectCache::postPlatformNotification):
3499         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
3500         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
3501         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3502         (webkitAccessibleDetach):
3503         * editing/atk/FrameSelectionAtk.cpp:
3504         (WebCore::maybeEmitTextFocusChange):
3505
3506 2013-10-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3507
3508         Make TYPE_CASTS_BASE more flexible
3509         https://bugs.webkit.org/show_bug.cgi?id=122951
3510
3511         Reviewed by Andreas Kling.
3512
3513         TYPE_CASTS_BASE is being used by node|element type casts. However, it is difficult
3514         to be used by other type casts. For instance, CSSValue, Accessibility and so on.
3515         This patch modifies TYPE_CASTS_BASE which can support other type casts.
3516
3517         Besides TYPE_CASTS_BASE body is moved from node.h to Assertions.h.
3518
3519         No new tests, no behavior changes.
3520
3521         * dom/Document.h:
3522         * dom/Node.h:
3523
3524 2013-10-21  Santosh Mahto  <santosh.ma@samsung.com>
3525
3526         ASSERTION FAILED: !style->propertyIsImportant(propertyID) in WebCore::setTextDecorationProperty
3527         https://bugs.webkit.org/show_bug.cgi?id=122097
3528
3529         Reviewed by Ryosuke Niwa.
3530
3531         When remove format command is called we pushdown the ancestor style
3532         down to its children. Currently applying inline style to iframe
3533         while pushing down style which causes iframe to be reinserted in tree and
3534         triggres again subframe loading which repeats everytime and finally
3535         crash happens. So we should avoid applying inline style to iframe
3536         element as it doesnot reflect in its content while pushing down style
3537         on it.
3538
3539         And ASSERT call has been removed from setTextDecoration property as
3540         the scenario is perfectly valid case.
3541
3542         Test: editing/execCommand/remove-format-textdecoration-in-iframe.html
3543
3544         * editing/ApplyStyleCommand.cpp:
3545         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Return if
3546         element is iframe.
3547         * editing/EditingStyle.cpp:
3548         (WebCore::StyleChange::setTextDecorationProperty): Remove ASSERT.
3549
3550 2013-10-20  Sam Weinig  <sam@webkit.org>
3551
3552         Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 5)
3553         https://bugs.webkit.org/show_bug.cgi?id=122969
3554
3555         Reviewed by Antti Koivisto.
3556
3557         - Move m_lineBoxes to RenderBlockFlow.
3558
3559         * accessibility/AccessibilityRenderObject.cpp:
3560         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3561         * rendering/HitTestResult.cpp:
3562         (WebCore::HitTestResult::innerTextIfTruncated):
3563         * rendering/RenderBlock.cpp:
3564         (WebCore::RenderBlock::RenderBlock):
3565         (WebCore::RenderBlock::willBeDestroyed):
3566         (WebCore::RenderBlock::deleteLineBoxTree):
3567         (WebCore::RenderBlock::isSelfCollapsingBlock):
3568         (WebCore::RenderBlock::removeFromDelayedUpdateScrollInfoSet):
3569         (WebCore::RenderBlock::paintContents):
3570         (WebCore::blockDirectionOffset):
3571         (WebCore::inlineDirectionOffset):
3572         (WebCore::RenderBlock::inlineSelectionGaps):
3573         (WebCore::RenderBlock::hitTestContents):
3574         (WebCore::positionForPointRespectingEditingBoundaries):
3575         (WebCore::RenderBlock::positionForPointWithInlineChildren):
3576         (WebCore::RenderBlock::firstLineBoxBaseline):
3577         (WebCore::RenderBlock::inlineBlockBaseline):
3578         (WebCore::RenderBlock::addFocusRingRectsForInlineChildren):
3579         (WebCore::RenderBlock::addFocusRingRects):
3580         (WebCore::RenderBlock::showLineTreeAndMark):
3581         * rendering/RenderBlock.h:
3582         (WebCore::RenderBlock::addOverflowFromInlineChildren):
3583         (WebCore::RenderBlock::hasInlineBoxChildren):
3584         (WebCore::RenderBlock::paintInlineChildren):
3585         (WebCore::RenderBlock::hitTestInlineChildren):
3586         * rendering/RenderBlockFlow.cpp:
3587         (WebCore::RenderBlockFlow::RenderBlockFlow):
3588         (WebCore::RenderBlockFlow::willBeDestroyed):
3589         (WebCore::RenderBlockFlow::deleteLineBoxTree):
3590         (WebCore::RenderBlockFlow::hitTestInlineChildren):
3591         (WebCore::RenderBlockFlow::adjustForBorderFit):
3592         (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
3593         (WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):
3594         (WebCore::RenderBlockFlow::firstLineBoxBaseline):
3595         (WebCore::RenderBlockFlow::inlineBlockBaseline):
3596         (WebCore::RenderBlockFlow::inlineSelectionGaps):
3597         (WebCore::RenderBlockFlow::positionForBox):
3598         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
3599         (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
3600         (WebCore::RenderBlockFlow::paintInlineChildren):
3601         (WebCore::RenderBlockFlow::relayoutForPagination):
3602         (WebCore::RenderBlockFlow::showLineTreeAndMark):
3603         * rendering/RenderBlockFlow.h:
3604         (WebCore::RenderBlockFlow::lineBoxes):
3605         (WebCore::RenderBlockFlow::firstLineBox):
3606         (WebCore::RenderBlockFlow::lastLineBox):
3607         (WebCore::RenderBlockFlow::firstRootBox):
3608         (WebCore::RenderBlockFlow::lastRootBox):
3609         * rendering/RenderBlockLineLayout.cpp:
3610         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
3611         * rendering/RootInlineBox.cpp:
3612         (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
3613
3614 2013-10-20  Andreas Kling  <akling@apple.com>
3615
3616         Avoid unnecessary vector copy in AnimationController event dispatch.
3617         <https://webkit.org/b/122994>
3618
3619         Use Vector's move constructor instead of making a copy of the pending
3620         events queue and then clearing it.
3621
3622         Reviewed by Simon Fraser.
3623
3624 2013-10-19  Brady Eidson  <beidson@apple.com>
3625
3626         Add abstract IDBBackingStoreInterface, use it to get IDBDatabaseBackendLevelDB closer to going cross-platform
3627         https://bugs.webkit.org/show_bug.cgi?id=123074
3628
3629         Reviewed by Andreas Kling.
3630
3631         * Modules/indexeddb/IDBBackingStoreInterface.h: Added.
3632         (WebCore::IDBBackingStoreInterface::~IDBBackingStoreInterface):
3633         (WebCore::IDBBackingStoreInterface::Transaction::~Transaction):
3634
3635         * Modules/indexeddb/IDBTransactionBackendInterface.h:
3636
3637         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3638         (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseIntVersion):
3639         (WebCore::IDBBackingStoreLevelDB::createObjectStore):
3640         (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
3641         (WebCore::IDBBackingStoreLevelDB::getRecord):
3642         (WebCore::IDBBackingStoreLevelDB::putRecord):
3643         (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
3644         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
3645         (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
3646         (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
3647         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
3648         (WebCore::IDBBackingStoreLevelDB::createIndex):
3649         (WebCore::IDBBackingStoreLevelDB::deleteIndex):
3650         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
3651         (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
3652         (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
3653         (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
3654         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
3655         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
3656         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
3657         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
3658         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3659         (WebCore::IDBBackingStoreLevelDB::Transaction::reset):
3660         (WebCore::IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom):
3661
3662         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
3663         (WebCore::IDBCursorBackendLevelDB::deleteFunction):
3664         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
3665
3666         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
3667         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::verifyIndexKeys):
3668         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys):
3669         (WebCore::IDBObjectStoreBackendLevelDB::IndexWriter::addingKeyAllowed):
3670         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
3671
3672         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
3673         (WebCore::IDBTransactionBackendLevelDB::backingStoreTransaction):
3674
3675         * WebCore.xcodeproj/project.pbxproj:
3676         * GNUmakefile.list.am:
3677
3678 2013-10-20  Andreas Kling  <akling@apple.com>
3679
3680         Use PassRef for StyleSheetContents.
3681         <https://webkit.org/b/123083>
3682
3683         Let functions that return newly-constructed StyleSheetContents
3684         objects vend PassRef<StyleSheetContents> instead of PassRefPtr.
3685
3686         Updated functions that take StyleSheetContents in arguments
3687         accordingly. And CSSStyleSheet now has a Ref internally. Woo!
3688
3689         Reviewed by Antti Koivisto.
3690
3691 2013-10-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3692
3693         Removing "unused parameter" compiling warnings from WebKit2 and WebCore
3694         https://bugs.webkit.org/show_bug.cgi?id=123075
3695
3696         Reviewed by Andreas Kling.
3697
3698         No new tests needed.
3699
3700         * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
3701         (WebCore::RTCDTMFToneChangeEvent::create):
3702         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3703         (lineAtPositionForAtkBoundary):
3704         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3705         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
3706
3707 2013-10-19  Andreas Kling  <akling@apple.com>
3708
3709         Use PassRef for constructing StyleRules.
3710         <https://webkit.org/b/123072>
3711
3712         Let functions that return newly-constructed StyleRuleFoo objects
3713         vend PassRef<StyleRuleFoo> instead of PassRefPtr.
3714
3715         Since StyleRuleBase::copy() has to return something, we can't rely
3716         on ASSERT_NOT_REACHED() + return nullptr anymore, so I've replaced
3717         those with CRASH(). No call sites actually handled null anyway.
3718
3719         Reviewed by Sam Weinig.
3720
3721 2013-10-19  Jer Noble  <jer.noble@apple.com>
3722
3723         Unreviewed roll out of r157695; broke Mac builds.
3724
3725         * Configurations/FeatureDefines.xcconfig:
3726
3727 2013-10-07  Jer Noble  <jer.noble@apple.com>
3728
3729         [MSE] [Mac] Enable MediaSource on the Mac
3730         https://bugs.webkit.org/show_bug.cgi?id=122484
3731
3732         Reviewed by Darin Adler.
3733
3734         Enable ENABLE_MEDIA_SOURCE.
3735
3736         * Configurations/FeatureDefines.xcconfig:
3737
3738 2013-10-19  Sam Weinig  <sam@webkit.org>
3739
3740         CTTE: Tighten up type usage around InputType::innerTextElement()
3741         https://bugs.webkit.org/show_bug.cgi?id=123078
3742
3743         Reviewed by Anders Carlsson.
3744
3745         * editing/TextIterator.cpp:
3746         (WebCore::TextIterator::handleReplacedElement):
3747         * html/HTMLElement.h:
3748         (WebCore::HTMLElement::isTextControlInnerTextElement):
3749         * html/HTMLInputElement.cpp:
3750         (WebCore::HTMLInputElement::innerTextElement):
3751         * html/HTMLInputElement.h:
3752         * html/HTMLTextAreaElement.cpp:
3753         (WebCore::HTMLTextAreaElement::innerTextElement):
3754         * html/HTMLTextAreaElement.h:
3755         * html/HTMLTextFormControlElement.cpp:
3756         (WebCore::hasVisibleTextArea):
3757         (WebCore::HTMLTextFormControlElement::selection):
3758         (WebCore::HTMLTextFormControlElement::innerTextValue):
3759         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
3760         * html/HTMLTextFormControlElement.h:
3761         * html/InputType.h:
3762         (WebCore::InputType::innerTextElement):
3763         * html/TextFieldInputType.cpp:
3764         (WebCore::TextFieldInputType::forwardEvent):
3765         (WebCore::TextFieldInputType::innerTextElement):
3766         * html/TextFieldInputType.h:
3767         * html/shadow/TextControlInnerElements.cpp:
3768         (WebCore::TextControlInnerTextElement::renderer):
3769         * html/shadow/TextControlInnerElements.h:
3770         (WebCore::isTextControlInnerTextElement):
3771         * rendering/RenderObject.h:
3772         (WebCore::RenderObject::isTextControlInnerBlock):
3773         * rendering/RenderTextControl.cpp:
3774         (WebCore::RenderTextControl::innerTextElement):
3775         (WebCore::RenderTextControl::styleDidChange):
3776         (WebCore::RenderTextControl::textBlockLogicalWidth):
3777         (WebCore::RenderTextControl::updateFromElement):
3778         (WebCore::RenderTextControl::computeLogicalHeight):
3779         (WebCore::RenderTextControl::hitInnerTextElement):
3780         * rendering/RenderTextControl.h:
3781         * rendering/RenderTextControlSingleLine.cpp:
3782         (WebCore::RenderTextControlSingleLine::layout):
3783         (WebCore::RenderTextControlSingleLine::styleDidChange):
3784         (WebCore::RenderTextControlSingleLine::autoscroll):
3785         (WebCore::RenderTextControlSingleLine::scroll):
3786         (WebCore::RenderTextControlSingleLine::logicalScroll):
3787         * rendering/RenderTextControlSingleLine.h:
3788         (WebCore::toRenderTextControlInnerBlock):
3789
3790 2013-10-19  Sam Weinig  <sam@webkit.org>
3791
3792         Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 4)
3793         https://bugs.webkit.org/show_bug.cgi?id=122969
3794
3795         Reviewed by Andreas Kling.
3796
3797         - Fix classes derived from RenderBlockFlow that were still calling
3798           up to RenderBlock rather than RenderBlockFlow.
3799
3800         * rendering/RenderDetailsMarker.cpp:
3801         (WebCore::RenderDetailsMarker::paint):
3802         * rendering/RenderFieldset.cpp:
3803         (WebCore::RenderFieldset::computePreferredLogicalWidths):
3804         (WebCore::RenderFieldset::paintBoxDecorations):
3805         (WebCore::RenderFieldset::paintMask):
3806         * rendering/RenderFileUploadControl.cpp:
3807         (WebCore::RenderFileUploadControl::paintObject):
3808         * rendering/RenderFlowThread.cpp:
3809         (WebCore::RenderFlowThread::styleDidChange):
3810         (WebCore::RenderFlowThread::layout):
3811         (WebCore::RenderFlowThread::nodeAtPoint):
3812         * rendering/RenderFullScreen.cpp:
3813         (RenderFullScreenPlaceholder::willBeDestroyed):
3814         * rendering/RenderListItem.cpp:
3815         (WebCore::RenderListItem::styleDidChange):
3816         * rendering/RenderMultiColumnBlock.cpp:
3817         (WebCore::RenderMultiColumnBlock::styleDidChange):
3818         (WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth):
3819         (WebCore::RenderMultiColumnBlock::addChild):
3820         * rendering/RenderProgress.cpp:
3821         (WebCore::RenderProgress::updateFromElement):
3822         * rendering/RenderRuby.cpp:
3823         (WebCore::RenderRubyAsBlock::styleDidChange):
3824         (WebCore::RenderRubyAsBlock::addChild):
3825         (WebCore::RenderRubyAsBlock::removeChild):
3826         * rendering/RenderRubyRun.cpp:
3827         (WebCore::RenderRubyRun::rubyBaseSafe):
3828         (WebCore::RenderRubyRun::addChild):
3829         (WebCore::RenderRubyRun::removeChild):
3830         (WebCore::RenderRubyRun::layout):
3831         * rendering/RenderRubyText.cpp:
3832         (WebCore::RenderRubyText::textAlignmentForLine):
3833         (WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
3834         * rendering/RenderTableCaption.cpp:
3835         (WebCore::RenderTableCaption::willBeRemovedFromTree):
3836         * rendering/RenderTableCell.cpp:
3837         (WebCore::RenderTableCell::willBeRemovedFromTree):
3838         (WebCore::RenderTableCell::computePreferredLogicalWidths):
3839         (WebCore::RenderTableCell::offsetFromContainer):
3840         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
3841         (WebCore::RenderTableCell::computeRectForRepaint):
3842         (WebCore::RenderTableCell::styleDidChange):
3843         (WebCore::RenderTableCell::borderLeft):
3844         (WebCore::RenderTableCell::borderRight):
3845         (WebCore::RenderTableCell::borderTop):
3846         (WebCore::RenderTableCell::borderBottom):
3847         (WebCore::RenderTableCell::borderStart):
3848         (WebCore::RenderTableCell::borderEnd):
3849         (WebCore::RenderTableCell::borderBefore):
3850         (WebCore::RenderTableCell::borderAfter):
3851         (WebCore::RenderTableCell::paint):
3852         * rendering/RenderTextControl.cpp:
3853         (WebCore::RenderTextControl::styleDidChange):
3854         * rendering/RenderTextControlSingleLine.cpp:
3855         (WebCore::RenderTextControlSingleLine::scrollWidth):
3856         (WebCore::RenderTextControlSingleLine::scrollHeight):
3857         (WebCore::RenderTextControlSingleLine::scrollLeft):
3858         (WebCore::RenderTextControlSingleLine::scrollTop):
3859         (WebCore::RenderTextControlSingleLine::scroll):
3860         (WebCore::RenderTextControlSingleLine::logicalScroll):
3861         * rendering/RenderTextTrackCue.cpp:
3862         (WebCore::RenderTextTrackCue::layout):
3863         * rendering/RenderView.cpp:
3864         (WebCore::RenderView::layoutContent):
3865         (WebCore::RenderView::addChild):
3866         (WebCore::RenderView::visualOverflowRect):
3867         (WebCore::RenderView::styleDidChange):
3868         * rendering/svg/RenderSVGBlock.cpp:
3869         (WebCore::RenderSVGBlock::setStyle):
3870         (WebCore::RenderSVGBlock::updateFromStyle):
3871         (WebCore::RenderSVGBlock::willBeDestroyed):
3872         (WebCore::RenderSVGBlock::styleWillChange):
3873         (WebCore::RenderSVGBlock::styleDidChange):
3874         * rendering/svg/SVGTextQuery.cpp:
3875         (WebCore::flowBoxForRenderer):
3876
3877 2013-10-19  Sam Weinig  <sam@webkit.org>
3878
3879         Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 3)
3880         https://bugs.webkit.org/show_bug.cgi?id=122969
3881
3882         Reviewed by Andreas Kling.
3883
3884         - Move containsNonZeroBidiLevel to RenderBlockFlow.
3885
3886         * editing/Editor.cpp:
3887         (WebCore::Editor::hasBidiSelection):
3888         * rendering/RenderBlock.cpp:
3889         * rendering/RenderBlock.h:
3890         * rendering/RenderBlockFlow.cpp:
3891         (WebCore::RenderBlockFlow::containsNonZeroBidiLevel):
3892         * rendering/RenderBlockFlow.h:
3893
3894 2013-10-18  Sam Weinig  <sam@webkit.org>
3895
3896         Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 2)
3897         https://bugs.webkit.org/show_bug.cgi?id=122969
3898
3899         Reviewed by Antti Koivisto.
3900
3901         - Move truncation (e.g. line clamp and ellipse) support to RenderBlockFlow.
3902
3903         * rendering/EllipsisBox.cpp:
3904         (WebCore::EllipsisBox::EllipsisBox):
3905         (WebCore::EllipsisBox::paint):
3906         (WebCore::EllipsisBox::markupBox):
3907         (WebCore::EllipsisBox::selectionRect):
3908         (WebCore::EllipsisBox::paintSelection):
3909         (WebCore::EllipsisBox::nodeAtPoint):
3910         * rendering/EllipsisBox.h:
3911         * rendering/RenderBlock.cpp:
3912         * rendering/RenderBlock.h:
3913         * rendering/RenderBlockFlow.cpp:
3914         (WebCore::shouldCheckLines):
3915         (WebCore::RenderBlockFlow::lineAtIndex):
3916         (WebCore::RenderBlockFlow::lineCount):
3917         (WebCore::getHeightForLineCount):
3918         (WebCore::RenderBlockFlow::heightForLineCount):
3919         (WebCore::RenderBlockFlow::clearTruncation):
3920         * rendering/RenderBlockFlow.h:
3921         * rendering/RenderDeprecatedFlexibleBox.cpp:
3922         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
3923         (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
3924         * rendering/RootInlineBox.cpp:
3925         (WebCore::RootInlineBox::placeEllipsis):
3926
3927 2013-10-19  Andreas Kling  <akling@apple.com>
3928
3929         StyleResolver should deal in PassRef<RenderStyle> where possible.
3930         <https://webkit.org/b/123061>
3931
3932         Make StyleResolver functions that returned or took RenderStyles
3933         by PassRefPtr use PassRef instead where possible.
3934
3935         Reviewed by Anders Carlsson.
3936
3937 2013-10-19  Brady Eidson  <beidson@apple.com>
3938
3939         Global rename of the class "IDBBackingStore" to "IDBBackingStoreLevelDB"
3940
3941         Rubberstamped by Anders Carlsson (And Andreas Kling wanted to, but he wasn’t around)
3942
3943         * Modules/indexeddb/IDBTransactionBackendInterface.h:
3944         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3945         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3946         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
3947         * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
3948         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
3949         * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
3950         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
3951         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
3952         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
3953         * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
3954         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
3955         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
3956         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
3957         * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
3958
3959 2013-10-19  peavo@outlook.com  <peavo@outlook.com>
3960
3961         [WinCairo] Link fails.
3962         https://bugs.webkit.org/show_bug.cgi?id=123019
3963
3964         Reviewed by Darin Adler.
3965
3966         Added empty CertificateInfo implementation for Curl.
3967
3968         * WebCore.vcxproj/WebCore.vcxproj:
3969         * WebCore.vcxproj/WebCore.vcxproj.filters:
3970         * platform/network/curl/CertificateInfoCurl.cpp: Added.
3971         (WebCore::CertificateInfo::CertificateInfo):
3972         (WebCore::CertificateInfo::~CertificateInfo):
3973
3974 2013-10-19  Filip Pizlo  <fpizlo@apple.com>
3975
3976         libWebCoreTestSupport should have explicit exports
3977         https://bugs.webkit.org/show_bug.cgi?id=123053
3978
3979         Reviewed by Oliver Hunt.
3980
3981         No new tests because there is no change in behavior.
3982
3983         * Configurations/WebCoreTestSupport.xcconfig:
3984         * testing/js/WebCoreTestSupport.h:
3985
3986 2013-10-18  Andreas Kling  <akling@apple.com>
3987
3988         Start passing RenderStyle around with PassRef.
3989         <https://webkit.org/b/123051>
3990
3991         Made the RenderStyle::create methods return PassRef<RenderStyle>
3992         and RenderElement::setStyle take a PassRef<RenderStyle>.
3993
3994         Reviewed by Darin Adler.
3995
3996 2013-10-18  Sam Weinig  <sam@webkit.org>
3997
3998         Move m_lineBoxes from RenderBlock to RenderBlockFlow (Part 1)
3999         https://bugs.webkit.org/show_bug.cgi?id=122969
4000
4001         Reviewed by Dan Bernstein.
4002
4003         - Make the RootInlineBox constructor take a RenderBlockFlow.
4004         - Move createRootInlineBox, and createAndAppendRootInlineBox to RenderBlockFlow.
4005
4006         * editing/VisibleUnits.cpp:
4007         (WebCore::absoluteLineDirectionPointToLocalPointInBlock):
4008         * rendering/InlineBox.cpp:
4009         (WebCore::InlineBox::locationIncludingFlipping):
4010         (WebCore::InlineBox::flipForWritingMode):
4011         * rendering/InlineFlowBox.cpp:
4012         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
4013         * rendering/RenderBlock.cpp:
4014         * rendering/RenderBlock.h:
4015         * rendering/RenderBlockFlow.h:
4016         * rendering/RenderBlockLineLayout.cpp:
4017         (WebCore::RenderBlockFlow::createRootInlineBox):
4018         (WebCore::RenderBlockFlow::createAndAppendRootInlineBox):
4019         (WebCore::createInlineBoxForRenderer):
4020         (WebCore::RenderBlockFlow::createLineBoxes):
4021         * rendering/RenderBox.cpp:
4022         (WebCore::RenderBox::positionLineBox):
4023         * rendering/RenderListMarker.cpp:
4024         (WebCore::RenderListMarker::localSelectionRect):
4025         * rendering/RenderReplaced.cpp:
4026         (WebCore::RenderReplaced::localSelectionRect):
4027         * rendering/RootInlineBox.cpp:
4028         (WebCore::RootInlineBox::RootInlineBox):
4029         (WebCore::RootInlineBox::rendererLineBoxes):
4030         (WebCore::RootInlineBox::placeEllipsis):
4031         (WebCore::RootInlineBox::containingRegion):
4032         (WebCore::RootInlineBox::setContainingRegion):
4033         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
4034         (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
4035         (WebCore::RootInlineBox::lineSnapAdjustment):
4036         (WebCore::RootInlineBox::lineSelectionGap):
4037         (WebCore::RootInlineBox::computeCaretRect):
4038         (WebCore::RootInlineBox::selectionTop):
4039         (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
4040         (WebCore::RootInlineBox::selectionBottom):
4041         (WebCore::RootInlineBox::blockDirectionPointInLine):
4042         (WebCore::RootInlineBox::blockFlow):
4043         (WebCore::RootInlineBox::closestLeafChildForPoint):
4044         (WebCore::RootInlineBox::removeLineBoxFromRenderObject):
4045         (WebCore::RootInlineBox::extractLineBoxFromRenderObject):
4046         (WebCore::RootInlineBox::attachLineBoxToRenderObject):
4047         * rendering/RootInlineBox.h:
4048         * rendering/TrailingFloatsRootInlineBox.h:
4049         * rendering/svg/RenderSVGText.h:
4050         (WebCore::toRenderSVGText):
4051         * rendering/svg/SVGRootInlineBox.cpp:
4052         (WebCore::SVGRootInlineBox::SVGRootInlineBox):
4053         (WebCore::SVGRootInlineBox::renderSVGText):
4054         (WebCore::SVGRootInlineBox::paint):
4055         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
4056         (WebCore::SVGRootInlineBox::layoutRootBox):