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