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