98d594204df7d2b03559b1a7293accade68b3801
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-11-26  Tim Horton  <timothy_horton@apple.com>
2
3         Don't parent the TileController root layer in two places
4         https://bugs.webkit.org/show_bug.cgi?id=124873
5
6         Reviewed by Brent Fulgham.
7
8         * platform/graphics/ca/mac/TileController.mm:
9         (WebCore::TileController::TileController):
10         The TileController's layer is already parented by callers of
11         TileController::create, and in a special way. TileController
12         shouldn't parent itself, anyway...
13
14 2013-11-26  Nick Diego Yamane  <nick.yamane@openbossa.org>
15
16         [MediaStream API] HTMLMediaElement should be able to use MediaStream as source
17         https://bugs.webkit.org/show_bug.cgi?id=121943
18
19         Reviewed by Eric Carlson.
20
21         Implement MediaStream direct assignment to Media Elements using the new 'srcObject'
22         attribute: http://www.w3.org/TR/mediacapture-streams/#direct-assignment-to-media-elements
23
24         Test: fast/mediastream/MediaStream-MediaElement-srcObject.html
25
26         * CMakeLists.txt: Added new HTMLMediaElementMediaStream.h and .cpp to cmake build.
27         * DerivedSources.make: Added HTMLMediaElementMediaStream.idl.
28         * GNUmakefile.list.am: Added new HTMLMediaElementMediaStream* to autotools build.
29         * WebCore.xcodeproj/project.pbxproj: Added new files.
30         * Modules/mediastream/HTMLMediaElementMediaStream.cpp: Added.
31         (WebCore::HTMLMediaElementMediaStream::srcObject): implements srcObject getter.
32         (WebCore::HTMLMediaElementMediaStream::setSrcObject): implements srcObject setter.
33         * Modules/mediastream/HTMLMediaElementMediaStream.h: Added.
34         * Modules/mediastream/HTMLMediaElementMediaStream.idl: Added.
35         * html/HTMLMediaElement.cpp:
36         (WebCore::HTMLMediaElement::setSrcObject): This is an initial implementation, and
37         is still incomplete, that will be addressed in a separate bug: https://webkit.org/b/124896
38         * html/HTMLMediaElement.h: Added m_mediaStreamSrcObject class variable
39         and its corresponding getter.
40
41 2013-11-26  Andreas Kling  <akling@apple.com>
42
43         Use child iterator to find operators in RenderMathMLRow::layout().
44         <https://webkit.org/b/124108>
45
46         Replace manual children walk with childrenOfType<RenderMathMLBlock>.
47         Minor update to fix build.
48
49         Reviewed by Martin Robinson.
50
51 2013-11-26  Andreas Kling  <akling@apple.com>
52
53         RenderObject: Inline isBody() and isHR().
54         <https://webkit.org/b/124901>
55
56         Together these account for ~0.3% of samples on HTML5-8266.
57         Almost all of it is call overhead.
58
59         Reviewed by Anders Carlsson.
60
61 2013-11-26  Bear Travis  <betravis@adobe.com>
62
63         [CSS Shapes] Layout using [<box> || <shape>] value
64         https://bugs.webkit.org/show_bug.cgi?id=124428
65
66         Reviewed by David Hyatt.
67
68         When a box value is supplied, use it to size and position the shape. Otherwise,
69         use a default value (content-box for shape-inside, margin-box for shape-outside).
70         This patch extends the sizing and positioning code used for the box patch (Bug 124227)
71         to also apply to shapes. With this patch, we also no longer use the box-sizing
72         property to size and position shapes.
73
74         Tests: fast/shapes/shape-outside-floats/shape-outside-shape-boxes-001.html
75                fast/shapes/shape-outside-floats/shape-outside-shape-boxes-002.html
76                fast/shapes/shape-outside-floats/shape-outside-shape-boxes-003.html
77
78         * css/CSSComputedStyleDeclaration.cpp:
79         (WebCore::ComputedStyleExtractor::propertyValue): Adjust for ShapeValues storing
80         BasicShape::ReferenceBox as their box value, rather than a CSSValueID.
81         * css/DeprecatedStyleBuilder.cpp:
82         (WebCore::ApplyPropertyShape::applyValue): Ditto.
83         * rendering/shapes/ShapeInfo.h:
84         (WebCore::ShapeInfo::setShapeSize): Adjust for BasicShapes with reference boxes
85         as well as plain box values. Also, remove old box-sizing code.
86         (WebCore::ShapeInfo::logicalTopOffset): Ditto.
87         (WebCore::ShapeInfo::logicalLeftOffset): Ditto.
88         * rendering/shapes/ShapeInsideInfo.h:
89         * rendering/shapes/ShapeOutsideInfo.h:
90         * rendering/style/ShapeValue.h:
91         (WebCore::ShapeValue::createBoxValue): Adjust for boxes being stored as
92         BasicShape::ReferenceBoxes.
93         (WebCore::ShapeValue::box): Ditto.
94         (WebCore::ShapeValue::ShapeValue): Ditto.
95
96 2013-11-26  Brian J. Burg  <burg@cs.washington.edu>
97
98         ImageBuffer::create should return a std::unique_ptr instead of OwnPtr.
99         https://bugs.webkit.org/show_bug.cgi?id=124822
100
101         Reviewed by Andreas Kling.
102
103         Replace all uses of OwnPtr<ImageBuffer> and PassOwnPtr<ImageBuffer> with
104         std::unique_ptr<ImageBuffer>. Replace calls to OwnPtr::clear() and
105         OwnPtr::release() with reset() and std::move(). Remove unnecessary includes.
106
107         No new tests. This is a mechanical refactoring.
108
109         * css/CSSFilterImageValue.cpp:
110         (WebCore::CSSFilterImageValue::image):
111         * html/HTMLCanvasElement.cpp:
112         (WebCore::HTMLCanvasElement::setSurfaceSize):
113         * html/HTMLCanvasElement.h:
114         * html/canvas/CanvasRenderingContext2D.cpp:
115         (WebCore::CanvasRenderingContext2D::createCompositingBuffer):
116         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
117         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedFill):
118         (WebCore::CanvasRenderingContext2D::drawTextInternal):
119         * html/canvas/CanvasRenderingContext2D.h:
120         * html/canvas/WebGLRenderingContext.cpp:
121         (WebCore::WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache):
122         (WebCore::WebGLRenderingContext::LRUImageBufferCache::imageBuffer):
123         * html/canvas/WebGLRenderingContext.h:
124         * html/shadow/MediaControlElements.cpp:
125         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
126         * page/Frame.cpp:
127         (WebCore::Frame::nodeImage):
128         (WebCore::Frame::dragImageForSelection):
129         * platform/graphics/BitmapImage.cpp:
130         (WebCore::BitmapImage::drawPattern):
131         * platform/graphics/CrossfadeGeneratedImage.cpp:
132         (WebCore::CrossfadeGeneratedImage::drawPattern):
133         * platform/graphics/GradientImage.h:
134         * platform/graphics/GraphicsContext.cpp:
135         (WebCore::GraphicsContext::createCompatibleBuffer):
136         * platform/graphics/GraphicsContext.h:
137         * platform/graphics/ImageBuffer.cpp:
138         (WebCore::ImageBuffer::createCompatibleBuffer):
139         * platform/graphics/ImageBuffer.h:
140         (WebCore::ImageBuffer::create):
141         * platform/graphics/ShadowBlur.cpp:
142         * platform/graphics/cg/ImageBufferCG.cpp:
143         (WebCore::ImageBuffer::putByteArray):
144         * platform/graphics/cg/PDFDocumentImage.h:
145         * platform/graphics/filters/FETile.cpp:
146         (WebCore::FETile::platformApplySoftware):
147         * platform/graphics/filters/Filter.h:
148         (WebCore::Filter::setSourceImage):
149         * platform/graphics/filters/FilterEffect.cpp:
150         (WebCore::FilterEffect::clearResult):
151         * platform/graphics/filters/FilterEffect.h:
152         * platform/graphics/texmap/TextureMapper.cpp:
153         (WebCore::BitmapTexture::updateContents):
154         * platform/graphics/texmap/TextureMapperImageBuffer.h:
155         * rendering/InlineTextBox.cpp:
156         (WebCore::InlineTextBox::paintDecoration):
157         * rendering/RenderBoxModelObject.cpp:
158         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
159         * rendering/RenderThemeMac.mm:
160         (WebCore::RenderThemeMac::paintProgressBar):
161         * rendering/shapes/Shape.cpp:
162         (WebCore::Shape::createShape):
163         * rendering/svg/RenderSVGImage.cpp:
164         (WebCore::RenderSVGImage::invalidateBufferedForeground):
165         * rendering/svg/RenderSVGImage.h:
166         * rendering/svg/RenderSVGResourceClipper.cpp:
167         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
168         * rendering/svg/RenderSVGResourceClipper.h:
169         * rendering/svg/RenderSVGResourceFilter.cpp:
170         (WebCore::RenderSVGResourceFilter::applyResource):
171         (WebCore::RenderSVGResourceFilter::postApplyResource):
172         * rendering/svg/RenderSVGResourceFilter.h:
173         * rendering/svg/RenderSVGResourceGradient.cpp: Remove method parameter wrapping/indentation.
174         (WebCore::createMaskAndSwapContextForTextGradient):
175         (WebCore::clipToTextMask):
176         (WebCore::RenderSVGResourceGradient::applyResource):
177         * rendering/svg/RenderSVGResourceGradient.h:
178         * rendering/svg/RenderSVGResourceMasker.cpp:
179         (WebCore::RenderSVGResourceMasker::applyResource):
180         * rendering/svg/RenderSVGResourceMasker.h:
181         * rendering/svg/RenderSVGResourcePattern.cpp: Remove method parameter wrapping/indentation.
182         (WebCore::RenderSVGResourcePattern::buildPattern):
183         (WebCore::RenderSVGResourcePattern::createTileImage):
184         * rendering/svg/RenderSVGResourcePattern.h: Remove method parameter wrapping/indentation.
185         * rendering/svg/SVGRenderingContext.cpp:
186         (WebCore::SVGRenderingContext::createImageBuffer):
187         (WebCore::SVGRenderingContext::createImageBufferForPattern):
188         (WebCore::SVGRenderingContext::clipToImageBuffer):
189         (WebCore::SVGRenderingContext::bufferForeground):
190         * rendering/svg/SVGRenderingContext.h:
191         * svg/graphics/SVGImage.cpp:
192         (WebCore::SVGImage::nativeImageForCurrentFrame):
193         (WebCore::SVGImage::drawPatternForContainer):
194
195 2013-11-26  Eric Carlson  <eric.carlson@apple.com>
196
197         video.currentSrc should return empty when no resource is loaded
198         https://bugs.webkit.org/show_bug.cgi?id=124898
199
200         Reviewed by Dan Bernstein.
201
202         Test: media/video-currentsrc-cleared.html
203
204         * html/HTMLMediaElement.cpp:
205         (WebCore::HTMLMediaElement::prepareForLoad): Set m_currentSrc to empty in 
206             preparation for attempting to load a new url.
207
208 2013-11-26  Hans Muller  <hmuller@adobe.com>
209
210         [CSS Shapes] Support for shape-margin in BoxShape
211         https://bugs.webkit.org/show_bug.cgi?id=124788
212
213         Reviewed by Andreas Kling.
214
215         Corrected BoxShape's internal shape-margin/padding bounds FloatRoundedRect
216         initialization. Tests for the padding bounds will be added when the rest of
217         shape-padding for box shapes implementation is ready.
218
219         Tests: fast/shapes/shape-outside-floats/shape-outside-margin-boxes-001.html
220                fast/shapes/shape-outside-floats/shape-outside-margin-boxes-002.html
221
222         * rendering/shapes/BoxShape.cpp: Use constructor shape-margin,shape-padding parameters.
223         (WebCore::BoxShape::BoxShape):
224         * rendering/shapes/BoxShape.h:
225         * rendering/shapes/Shape.cpp:
226         (WebCore::createBoxShape): Pass the shape-margin and shape-padding values along to the BoxShape constructor.
227         (WebCore::Shape::createShape): Ditto.
228
229 2013-11-26  Nick Diego Yamane  <nick.yamane@openbossa.org>
230
231         Remove unnecessary webaudio include from MediaStreamSource header
232         https://bugs.webkit.org/show_bug.cgi?id=124897
233
234         Reviewed by Eric Carlson.
235
236         AudioDestinationConsumer.h is included but not used anywhere in
237         MediaStreamSource implementation.
238
239         * platform/mediastream/MediaStreamSource.h:
240
241 2013-11-26  Andreas Kling  <akling@apple.com>
242
243         Avoid unnecessary copy-on-write in FillLayer style application.
244         <https://webkit.org/b/124878>
245
246         We ended up with a lot of cloned StyleBackgroundData objects on
247         HTML5-8266. This happened because we always forced a copy-on-write
248         when applying background-image:inherit / background-image:initial.
249
250         This patch adds early returns to both functions. In the "inherit"
251         case, we bail early if the target style already has the same fill
252         layer data as its parent style.
253
254         In the "initial" case, we optimize for the single-FillLayer case
255         and add an early return if the relevant value is either unset or
256         equal to the templatized initial value.
257
258         2.46 MB progression on HTML5-8266 locally.
259
260         Reviewed by Antti Koivisto.
261
262 2013-11-26  Antoine Quint  <graouts@apple.com>
263
264         Web Inspector: Allow showing a context menu on all mouse events.
265         https://bugs.webkit.org/show_bug.cgi?id=124747
266
267         Reviewed by Joseph Pecoraro.
268
269         Add a new InspectorFrontendHost::dispatchEventAsContextMenuEvent(Event*) method
270         to let the inspector front-end dispatch a native contextmenu event that will allow
271         for a context menu to be shown from within a non-contextmenu event handler.
272
273         * inspector/InspectorFrontendHost.cpp:
274         (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
275         Check that we're dealing with a mouse event, get the frame for the event target
276         and the event's location to call ContextMenuController::showContextMenuAt()
277         which will handle the new contextmenu event dispatch to the original event target.
278
279         * inspector/InspectorFrontendHost.h:
280         * inspector/InspectorFrontendHost.idl:
281
282 2013-11-25  Sam Weinig  <sam@webkit.org>
283
284         Convert some Shape code to use references
285         https://bugs.webkit.org/show_bug.cgi?id=124876
286
287         Reviewed by Andreas Kling.
288
289         * inspector/InspectorOverlay.cpp:
290         * rendering/FloatingObjects.cpp:
291         * rendering/LayoutState.cpp:
292         * rendering/RenderBlock.cpp:
293         * rendering/RenderBlock.h:
294         * rendering/RenderBlockLineLayout.cpp:
295         * rendering/RenderBox.cpp:
296         * rendering/RenderBox.h:
297         * rendering/line/BreakingContextInlineHeaders.h:
298         * rendering/line/LineWidth.cpp:
299         * rendering/shapes/ShapeInfo.cpp:
300         * rendering/shapes/ShapeInfo.h:
301         * rendering/shapes/ShapeInsideInfo.cpp:
302         * rendering/shapes/ShapeInsideInfo.h:
303         * rendering/shapes/ShapeOutsideInfo.cpp:
304         * rendering/shapes/ShapeOutsideInfo.h:
305         Replace yet more pointers with references.
306
307 2013-11-25  Simon Pena  <simon.pena@samsung.com>
308
309         [EFL] X11Helper::createPixmap doesn't initialise out value handleId
310         https://bugs.webkit.org/show_bug.cgi?id=124722
311
312         Reviewed by Gyuyoung Kim.
313
314         The overloaded functions X11Helper::createPixmap don't initialise out
315         value handleId, and they do early returns on error situations. Since
316         the functions are void and they don't communicate their failure in any
317         way, returning an out value without initialising it could make the
318         error go farther unnoticed. With the variable being initialised, it can
319         be reliably checked for errors when the function returns.
320
321         * platform/graphics/surfaces/glx/X11Helper.cpp:
322         (WebCore::X11Helper::createPixmap): Initialise handleId to 0.
323
324 2013-11-25  Nick Diego Yamane  <nick.yamane@openbossa.org>
325
326         Mark URLRegistry's lookup() as const and its child classes as final
327         https://bugs.webkit.org/show_bug.cgi?id=124865
328
329         Reviewed by Eric Carlson.
330
331         No new tests needed. No behavior changes.
332
333         * Modules/mediasource/MediaSourceRegistry.cpp:
334         (WebCore::MediaSourceRegistry::lookup): marked as const.
335         * Modules/mediasource/MediaSourceRegistry.h: MediaSourceRegistry
336         marked as final.
337         * Modules/mediastream/MediaStreamRegistry.cpp:
338         (WebCore::MediaStreamRegistry::lookup): marked as const.
339         * Modules/mediastream/MediaStreamRegistry.h: MediaStreamRegistry
340         marked as final.
341         * fileapi/Blob.cpp:
342         * html/URLRegistry.h: lookup() marked as const.
343         (WebCore::URLRegistry::lookup): marked as const.
344
345 2013-11-25  Sergio Correia  <sergio.correia@openbossa.org>
346
347         [MediaStream] Use std::unique_ptr instead of OwnPtr/PassOwnPtr
348         https://bugs.webkit.org/show_bug.cgi?id=124858
349
350         Reviewed by Eric Carlson.
351
352         Another step of the OwnPtr/PassOwnPtr => std::unique_ptr conversion,
353         now targeting mediastream-related code.
354
355         No new tests, covered by existing ones.
356
357         * Modules/mediastream/RTCDTMFSender.cpp:
358         * Modules/mediastream/RTCDTMFSender.h:
359         * Modules/mediastream/RTCDataChannel.cpp:
360         * Modules/mediastream/RTCDataChannel.h:
361         * Modules/mediastream/RTCPeerConnection.cpp:
362         * Modules/mediastream/RTCPeerConnection.h:
363         * platform/mediastream/MediaStreamSource.cpp:
364         * platform/mediastream/RTCPeerConnectionHandler.cpp:
365         * platform/mediastream/RTCPeerConnectionHandler.h:
366         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
367         * platform/mock/RTCNotifiersMock.cpp:
368         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
369         * platform/mock/RTCPeerConnectionHandlerMock.h:
370
371 2013-11-25  Nick Diego Yamane  <nick.yamane@openbossa.org>
372
373         MediaStreamRegistry should store MediaStreams instead of MediaStreamPrivates
374         https://bugs.webkit.org/show_bug.cgi?id=124860
375
376         Reviewed by Eric Carlson.
377
378         MediaStreamRegistry::lookup() should return a MediaStream instead of MediaStreamPrivate.
379
380         No new tests needed. No behavior changes.
381
382         * Modules/mediastream/MediaStreamRegistry.cpp:
383         (WebCore::MediaStreamRegistry::registerURL): m_privateStreams -> m_mediaStreams
384         (WebCore::MediaStreamRegistry::unregisterURL): Ditto.
385         (WebCore::MediaStreamRegistry::lookup): Override URLRegistry::lookup() instead of add a
386         new method MediaStream::lookupMediaStreamPrivate().
387         * Modules/mediastream/MediaStreamRegistry.h:
388         * html/HTMLMediaElement.cpp:
389         (HTMLMediaElement::loadResource): call lookup() instead of lookupMediaStreamPrivate()
390
391 2013-11-25  peavo@outlook.com  <peavo@outlook.com>
392
393         [WinCairo] Compile fails when GSTREAMER is not used.
394         https://bugs.webkit.org/show_bug.cgi?id=124853
395
396         Reviewed by Philippe Normand.
397
398         * platform/graphics/gstreamer/GStreamerUtilities.cpp: Don't include GStreamerUtilities.h when GSTREAMER is not used.
399
400 2013-11-25  Andreas Kling  <akling@apple.com>
401
402         Deduplicate shortish Text node strings during tree construction.
403         <https://webkit.org/b/124855>
404
405         Let HTMLConstructionSite keep a hash set of already seen strings over
406         its lifetime. Use this to deduplicate the strings inside Text nodes
407         for any string up to 64 characters of length.
408
409         This optimization already sort-of existed for whitespace-only Texts,
410         but those are laundered in the AtomicString table which we definitely
411         don't want to pollute with every single Text. It might be a good idea
412         to stop using the AtomicString table for all-whitespace Text too.
413
414         3.82 MB progression on HTML5-8266 locally.
415
416         Reviewed by Anders Carlsson.
417
418 2013-11-25  Nick Diego Yamane  <nick.yamane@openbossa.org>
419
420         Remove unnecessary MediaStreamTrackDescriptor forward declaration
421         https://bugs.webkit.org/show_bug.cgi?id=124854
422
423         Reviewed by Eric Carlson.
424
425         No new tests needed. No behavior changed.
426
427         * Modules/mediastream/VideoStreamTrack.h:
428
429 2013-11-25  Robert Hogan  <robert@webkit.org>
430
431         Remove code now unnecessary after r159575
432         https://bugs.webkit.org/show_bug.cgi?id=124809
433
434         Reviewed by Antti Koivisto.
435
436         Covered by existing tests fast/block/margin-collapse/self-collapsing-block-with-float*
437
438         * rendering/line/LineBreaker.cpp:
439         (WebCore::LineBreaker::skipLeadingWhitespace):
440
441 2013-11-25  Laszlo Vidacs  <lac@inf.u-szeged.hu>
442
443         Vertical border spacing is doubled between table row groups
444         https://bugs.webkit.org/show_bug.cgi?id=20040
445
446         Reviewed by Csaba Osztrogonác.
447
448         Based on Chromium fix https://chromium.googlesource.com/chromium/blink/+/eb615069267f895c59bc576f9d65b3fa5add41e9
449
450         Rebaseline needed for table related tests (100+).
451
452         * rendering/RenderTableSection.cpp:
453         (WebCore::RenderTableSection::calcRowLogicalHeight):
454
455 2013-11-25  Andres Gomez  <agomez@igalia.com>
456
457         [GStreamer] Seeking fails on media content provided by servers not supporting Range requests
458         https://bugs.webkit.org/show_bug.cgi?id=85994
459
460         Reviewed by Philippe Normand.
461
462         Based on the patch written by Andre Moreira Magalhaes.
463
464         When the GStreamer web source was doing a "Range" request we were
465         expecting to receive a 206 status reply with the "Content-Range"
466         header and just the requested data. Supporting "Range" requests is
467         not mandatory so, for the servers not supporting it they will be
468         replying with a 200 status and the whole content of the media
469         element. Now, we are properly handling these replies too.
470
471         Test: http/tests/media/media-seeking-no-ranges-server.html
472
473         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
474         (StreamingClient::handleResponseReceived): Do not fail when
475         receiving 200 as response for HTTP range requests.
476         (StreamingClient::handleDataReceived): Manually seek on stream
477         when receiving the full data after a seek.
478
479 2013-11-25  Radu Stavila  <stavila@adobe.com>
480
481         Removed obsolete FIXME after the landing of visual overflow patch (https://bugs.webkit.org/show_bug.cgi?id=118665).
482         https://bugs.webkit.org/show_bug.cgi?id=124833
483
484         Reviewed by Mihnea Ovidenie.
485
486         * rendering/RenderRegion.cpp:
487         (WebCore::RenderRegion::layoutBlock):
488
489 2013-11-18  Sergio Villar Senin  <svillar@igalia.com>
490
491         [CSS Grid Layout] Cache several vectors to avoid malloc/free churn
492         https://bugs.webkit.org/show_bug.cgi?id=123995
493
494         Reviewed by Dean Jackson.
495
496         From Blink r158228 by <jchaffraix@chromium.org>
497
498         Laying-out the grid items means a lot of calls to
499         distributeSpaceToTracks() and
500         resolveContentBasedTrackSizingFunctionsForItems() as they're
501         called in a loop. This means that there is a lot of malloc/free
502         going on there. By moving the vectors used by these methods to a
503         new class which is kept during the whole layout process we save a
504         lot of those calls.
505
506         This obviously mean that the price we pay for a significant
507         perfomance improvement is that we keep the maximum allocation till
508         the end of each layout, but it's an amount of memory that we have
509         to allocate anyway. The improvement in the
510         auto-grid-lots-of-data.html perf test is ~24% (165 runs/s vs 207
511         runs/s).
512
513         No new tests required as we're just refactoring code to a new
514         helper class. Nevertheless the performance improvement is backed
515         by the perf test mentioned above.
516
517         * rendering/RenderGrid.cpp:
518         (WebCore::RenderGrid::GridSizingData::GridSizingData):
519         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
520         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
521         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
522         (WebCore::RenderGrid::distributeSpaceToTracks):
523         (WebCore::RenderGrid::layoutGridItems):
524         (WebCore::RenderGrid::findChildLogicalPosition):
525         * rendering/RenderGrid.h:
526
527 2013-11-24  Brady Eidson  <beidson@apple.com>
528
529         DatabaseProcess: Add "UniqueIDBDatabase" that multiple WebProcesses can connect to
530         https://bugs.webkit.org/show_bug.cgi?id=124819
531
532         Reviewed by Dan Bernstein.
533
534         * Modules/indexeddb/IDBDatabaseBackend.cpp:
535         (WebCore::IDBDatabaseBackend::~IDBDatabaseBackend): Unregister from the IDBFactory.
536
537 2013-11-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
538
539         Generate toHTMLMarquee|OListElement() to cleanup static_cast<>
540         https://bugs.webkit.org/show_bug.cgi?id=124707
541
542         Reviewed by Darin Adler.
543
544         As a step to use toFoo(), we need to generate toHTMLMarquee|OListElement().
545         Besides this patch cleans up remaining static_cast<> usage.
546
547         No new tests, no behavior changes.
548
549         * css/StyleResolver.cpp:
550         (WebCore::StyleResolver::State::initElement):
551         (WebCore::StyleResolver::locateCousinList):
552         (WebCore::StyleResolver::findSiblingForStyleSharing):
553         * dom/Attr.cpp:
554         (WebCore::Attr::style):
555         * dom/Element.cpp:
556         (WebCore::Element::removeAttribute):
557         * editing/ApplyStyleCommand.cpp:
558         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
559         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
560         * editing/EditingStyle.cpp:
561         (WebCore::EditingStyle::wrappingStyleForSerialization):
562         * editing/Editor.cpp:
563         (WebCore::Editor::applyEditingStyleToElement):
564         * editing/ReplaceSelectionCommand.cpp:
565         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
566         * html/HTMLMarqueeElement.h:
567         * html/HTMLOListElement.h:
568         * html/HTMLTagNames.in:
569         * inspector/InspectorCSSAgent.cpp:
570         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
571         * inspector/InspectorOverlay.cpp:
572         (WebCore::buildObjectForElementInfo):
573         * page/PageSerializer.cpp:
574         (WebCore::PageSerializer::serializeFrame):
575         * rendering/RenderCounter.cpp:
576         (WebCore::planCounter):
577         * rendering/RenderLayer.cpp:
578         (WebCore::RenderLayer::resize):
579         * rendering/RenderListItem.cpp:
580         (WebCore::RenderListItem::calcValue):
581         (WebCore::RenderListItem::updateListMarkerNumbers):
582         * rendering/RenderMarquee.cpp:
583         (WebCore::RenderMarquee::marqueeSpeed):
584
585 2013-11-24  Tim Horton  <timothy_horton@apple.com>
586
587         REGRESSION (r156291): TileController tiles don't always repaint when they resize
588         https://bugs.webkit.org/show_bug.cgi?id=124796
589
590         Reviewed by Simon Fraser.
591
592         In removing platformCALayerDidCreateTiles, r156291 also removed
593         the call to setNeedsDisplay when tiles are resized, without
594         putting it somewhere else.
595
596         * platform/graphics/ca/mac/TileController.mm:
597         (WebCore::TileController::setNeedsDisplay):
598         Use hasStaleContent when invalidating a whole tile, just
599         like we do for partial tile repaints.
600
601         (WebCore::TileController::setTileNeedsDisplayInRect):
602         Mark hasStaleContent for any unparented layers, so they'll be painted
603         when they are reparented.
604
605         (WebCore::TileController::ensureTilesForRect):
606         Invalidate the whole tile when it changes size.
607
608 2013-11-23  Xabier Rodriguez Calvar  <calvaris@igalia.com>
609
610         [GStreamer] Remove 0.10 codepath
611         https://bugs.webkit.org/show_bug.cgi?id=124534
612
613         Reviewed by Philippe Normand.
614
615         All GStreamer ports are using 1.0 now so we remove the 0.10
616         codepath.
617
618         * GNUmakefile.list.am:
619         * PlatformEfl.cmake:
620         * PlatformGTK.cmake:
621         * WebCore.vcxproj/WebCore.vcxproj:
622         * WebCore.vcxproj/WebCore.vcxproj.filters: Removed
623         GStreamerVersioning.
624         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
625         (onGStreamerWavparsePadAddedCallback): Removed.
626         (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
627         Replaced webkitGstPipelineGetBus and removed 0.10 codepath.
628         (WebCore::AudioDestinationGStreamer::~AudioDestinationGStreamer):
629         Replaced webkitGstPipelineGetBus.
630         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
631         (WebCore::copyGstreamerBuffersToAudioChannel):
632         (WebCore::onAppsinkPullRequiredCallback): Removed 0.10 codepath.
633         (WebCore::AudioFileReader::~AudioFileReader): Replaced
634         webkitGstPipelineGetBus and removed 0.10 codepath.
635         (WebCore::AudioFileReader::handleSample): Left as only codepath.
636         (WebCore::AudioFileReader::handleBuffer): Removed.
637         (WebCore::AudioFileReader::handleNewDeinterleavePad): Removed 0.10
638         codepath.
639         (WebCore::AudioFileReader::plugDeinterleave): Replaced
640         getGstAudioCaps.
641         (WebCore::AudioFileReader::decodeAudioForBusCreation): Replaced
642         webkitGstPipelineGetBus.
643         (WebCore::AudioFileReader::createBus): Removed 0.10 codepath.
644         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
645         (getGStreamerMonoAudioCaps):
646         (webKitWebAudioGStreamerChannelPosition): Removed 0.10 codepath.
647         (webkit_web_audio_src_class_init): Replaced
648         setGstElementClassMetadata.
649         (webkit_web_audio_src_init):
650         (webKitWebAudioSrcConstructed):
651         (webKitWebAudioSrcFinalize):
652         (webKitWebAudioSrcLoop): Removed 0.10 codepath.
653         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
654         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h:
655         Removed checks for 1.0 as it is the only codepath now.
656         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
657         (WTF::GstElement):
658         (WTF::GstPad):
659         (WTF::GstPadTemplate):
660         (WTF::GstTask):
661         (WTF::GstBus):
662         (WTF::GstElementFactory):
663         (WTF::adoptGRef): Replaced gstObjectIsFloating.
664         (WTF::refGRef): Replaced webkitGstObjectRefSink.
665         (WTF::GstTagList):
666         (WTF::GstSample): Removed checks for 1.0 as it is the only
667         codepath now.
668         * platform/graphics/gstreamer/GRefPtrGStreamer.h: Removed checks
669         for 1.0 as it is the only codepath now.
670         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
671         (WebCore::webkitGstGhostPadFromStaticTemplate):
672         (WebCore::getVideoSizeAndFormatFromCaps):
673         (WebCore::createGstBuffer):
674         (WebCore::createGstBufferForData):
675         (WebCore::getGstBufferDataPointer):
676         (WebCore::mapGstBuffer):
677         (WebCore::unmapGstBuffer): Moved here from GstVersioning and added
678         to WebCore namespace.
679         * platform/graphics/gstreamer/GStreamerUtilities.h:
680         (WebCore::webkitGstCheckVersion): Moved here from GstVersioning
681         and added to WebCore namespace.
682         * platform/graphics/gstreamer/GStreamerVersioning.cpp: Removed.
683         * platform/graphics/gstreamer/GStreamerVersioning.h: Removed.
684         * platform/graphics/gstreamer/ImageGStreamer.h: Removed checks for
685         1.0 as it is the only codepath now.
686         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
687         (ImageGStreamer::ImageGStreamer): Removed 0.10 codepath.
688         (ImageGStreamer::~ImageGStreamer): Removed checks for 1.0 as it is
689         the only codepath now.
690         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
691         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
692         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
693         Removed checks for 1.0 as it is the only codepath now.
694         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
695         (WebCore::setAudioStreamPropertiesCallback): Removed 0.10 codepath.
696         (WebCore::mediaPlayerPrivateTextChangedCallback): Removed checks
697         for 1.0 as it is the only codepath now.
698         (WebCore::MediaPlayerPrivateGStreamer::isAvailable): Replaced
699         gPlaybinName.
700         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
701         Removed checks for 1.0 and replaced webkitGstPipelineGetBus.
702         (WebCore::MediaPlayerPrivateGStreamer::duration): Removed 0.10
703         codepath.
704         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
705         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
706         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
707         Removed checks for 1.0 as it is the only codepath now.
708         (WebCore::MediaPlayerPrivateGStreamer::buffered): Replaced
709         gPercentMax.
710         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Removed
711         0.10 codepath.
712         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents):
713         Removed checks for 1.0 as it is the only codepath now.
714         (WebCore::MediaPlayerPrivateGStreamer::totalBytes): Removed 0.10
715         codepath.
716         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Replaced
717         gPlaybinName and webkitGstPipelineGetBus and removed checks for
718         1.0.
719         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
720         Removed checks for 1.0 as it is the only codepath now.
721         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
722         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
723         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
724         (WebCore::MediaPlayerPrivateGStreamerBase::paint): Removed 0.10
725         codepath.
726         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
727         * platform/graphics/gstreamer/TextCombinerGStreamer.h:
728         * platform/graphics/gstreamer/TextSinkGStreamer.cpp:
729         * platform/graphics/gstreamer/TextSinkGStreamer.h:
730         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
731         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Removed
732         checks for 1.0 as it is the only codepath now.
733         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
734         (webkitVideoSinkRender): Removed 0.10 codepath and added WebCore
735         as createGstBuffer namespace.
736         (webkitVideoSinkSetCaps): Removed 0.10 codepath.
737         (webkitVideoSinkProposeAllocation): Removed checks for 1.0 as it
738         is the only codepath now.
739         (webkitVideoSinkMarshalVoidAndMiniObject): Removed as it was 0.10.
740         (webkit_video_sink_class_init): Removed 0.10 codepath and replaced
741         setGstElementClassMetadata.
742         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
743         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h:
744         Removed checks for 1.0 as it is the only codepath now.
745         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
746         (webkit_media_src_class_init): Replaced
747         setGstElementClassMetadata.
748         (webKitMediaSrcAddSrc): Added WebCore namespace to
749         webkitGstGhostPadFromStaticTemplate.
750         (MediaSourceClientGstreamer::didReceiveData): Added WebCore
751         namespace to createGstBufferForData.
752         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
753         Removed 0.10 codepath.
754         (webKitWebSrcQuery): Removed as it was 0.10 only.
755         (void webkit_web_src_class_init): Replaced setGstElementClassMetadata.
756         (webkit_web_src_init): Removed haveAppSrc27 private attribute and
757         0.10 codepath.
758         (webKitWebSrcStop): Removed checks for 1.0 as it is the only
759         codepath now.
760         (webKitWebSrcSetProperty):
761         (webKitWebSrcUriGetType):
762         (webKitWebSrcGetProtocols):
763         (webKitWebSrcGetUri):
764         (webKitWebSrcSetUri): Removed 0.10 codepath.
765         (StreamingClient::createReadBuffer): Removed checks for 1.0 and
766         replaced getGstBufferSize.
767         (StreamingClient::handleResponseReceived): Removed 0.10 codepath
768         and replaced notifyGstTagsOnPad.
769         (StreamingClient::handleDataReceived): Removed 0.10 codepath and
770         replaced setGstBufferSize and gst_buffer_get_size.
771
772 2013-11-22  Jer Noble  <jer.noble@apple.com>
773
774         [Mac] Can't drag full-screen video to another monitor
775         https://bugs.webkit.org/show_bug.cgi?id=124798
776
777         Reviewed by Geoffrey Garen.
778
779         Make full screen windows movable by default. Previously, we wanted non-movable full screen
780         windows since they were in the same space and were just placed atop non-full screen windows.
781         Now that all our supported Mac platforms have explicit full screen support, we can remove this
782         non-movable restriction.
783
784         * platform/mac/WebCoreFullScreenWindow.mm:
785         (-[WebCoreFullScreenWindow initWithContentRect:styleMask:backing:defer:]):
786
787 2013-11-22  Brent Fulgham  <bfulgham@apple.com>
788
789         [Win] Clean up ColorSpace handling in Windows code
790         https://bugs.webkit.org/show_bug.cgi?id=124795
791
792         Reviewed by Tim Horton.
793
794         Functionality covered by existing fast/css/color test suite.
795
796         * platform/graphics/cg/GraphicsContextCG.cpp:
797         (WebCore::safeRGBColorSpaceRef): Handle case of Windows CG implementation not
798         handling sRGB correctly.
799         (WebCore::sRGBColorSpaceRef): Use new helper function.
800         * platform/graphics/win/FontCGWin.cpp:
801         (WebCore::Font::drawGlyphs): Pass correct color space to fill functions.
802         * platform/graphics/win/GraphicsContextCGWin.cpp:
803         (WebCore::GraphicsContext::platformInit): Initialize color space to value passed
804         via the style to the constructor.
805
806 2013-11-22  Alexey Proskuryakov  <ap@apple.com>
807
808         WebCrypto algorithms should check that key algorithm matches
809         https://bugs.webkit.org/show_bug.cgi?id=123628
810
811         Reviewed by Anders Carlsson.
812
813         No change in behavior yet, because we have one algorithm per key class.
814         Will be tested once more algorithms are added.
815
816         * WebCore.xcodeproj/project.pbxproj: Updated for file renames.
817
818         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
819         (WebCore::createRsaKeyParamsWithHash):
820         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
821         * bindings/js/JSCryptoKeySerializationJWK.cpp:
822         (WebCore::createRSAKeyParametersWithHash):
823         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
824         * crypto/CryptoAlgorithmParameters.h:
825         (WebCore::CryptoAlgorithmParameters::ENUM_CLASS):
826         * crypto/parameters/CryptoAlgorithmRsaKeyParamsWithHash.h: Copied from Source/WebCore/crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h.
827         * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Removed.
828         Renamed RsaSsaKeyParams to RsaKeyParamsWithHash, because other algorithms (like RSA-OAEP)
829         are in the same boat. Depending on where the spec goes, we might need to introduce
830         algorithm specific RSA parameter classes later, but let's reduce copy/pasted code at
831         least for now.
832
833         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Moved to the correct directory.
834         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Copied from Source/WebCore/crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp.
835         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign): Factored out Mac specific
836         code, leaving type casting to cross-platform files.
837         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify): Ditto.
838
839         * crypto/CryptoAlgorithmRegistry.h:
840         (WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
841         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
842         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
843         Reduce copy/pasting in registration code.
844
845         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
846         (WebCore::CryptoAlgorithmAES_CBC::keyAlgorithmMatches): Check key type and algorithm.
847         (WebCore::CryptoAlgorithmAES_CBC::encrypt): Cross platform type casting code.
848         Maybe we'll find a way to autogenerate or eliminate it one day.
849         (WebCore::CryptoAlgorithmAES_CBC::decrypt): Ditto.
850
851         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
852         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
853         (WebCore::CryptoAlgorithmHMAC::keyAlgorithmMatches):
854         (WebCore::CryptoAlgorithmHMAC::sign):
855         (WebCore::CryptoAlgorithmHMAC::verify):
856         * crypto/algorithms/CryptoAlgorithmHMAC.h:
857         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
858         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::keyAlgorithmMatches):
859         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
860         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
861         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
862         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
863         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
864         (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
865         (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
866         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
867         (WebCore::CryptoAlgorithmHMAC::platformSign):
868         (WebCore::CryptoAlgorithmHMAC::platformVerify):
869         Same changes for all algorithms that have keys.
870
871 2013-11-22  Brendan Long  <b.long@cablelabs.com>
872
873         Fire "change" event on TextTrackList when a TextTrack's mode changes
874         https://bugs.webkit.org/show_bug.cgi?id=124789
875
876         Reviewed by Eric Carlson.
877
878         Since AudioTrackList and VideoTrackList already have this event, the
879         interesting bits are in TrackListBase::scheduleChangeEvent(), and we
880         just need to call it for TextTrackList changes.
881
882         Test: media/track/track-change-event.html
883
884         * html/HTMLMediaElement.cpp:
885         (HTMLMediaElement::textTrackModeChanged): Call TrackListBase::scheduleChangeEvent().
886         * html/track/TextTrackList.idl: Add onchange event listener.
887
888 2013-11-22  Brendan Long  <b.long@cablelabs.com>
889
890         Add TextTrackList::getTrackById().
891         https://bugs.webkit.org/show_bug.cgi?id=124785
892
893         Reviewed by Eric Carlson.
894
895         Test: media/track/track-id.html
896
897         * html/track/TextTrackList.cpp: Add getTrackById()
898         (TextTrackList::getTrackById):
899         * html/track/TextTrackList.h: Same.
900         * html/track/TextTrackList.idl: Same.
901
902 2013-11-22  Hans Muller  <hmuller@adobe.com>
903
904         [CSS Shapes] When the <box> value is set, derive radii from border-radius
905         https://bugs.webkit.org/show_bug.cgi?id=124228
906
907         Reviewed by Dean Jackson.
908
909         Add support for BoxShape elliptical corners.
910
911         Tests: fast/shapes/shape-outside-floats/shape-outside-rounded-boxes-001.html
912                fast/shapes/shape-outside-floats/shape-outside-rounded-boxes-002.html
913
914         * platform/graphics/FloatRoundedRect.h:
915         (WebCore::FloatRoundedRect::bottomLeftCorner): Corrected a copy-and-pasteO.
916         * rendering/shapes/BoxShape.cpp:
917         (WebCore::BoxShape::getExcludedIntervals): Returned interval now depends on the top and bottom of the line.
918         * rendering/shapes/Shape.cpp:
919         (WebCore::Shape::createShape): Rounded rect parameters are now specified with a RoundedRect parameter.
920         * rendering/shapes/Shape.h:
921         * rendering/shapes/ShapeInfo.cpp:
922         (WebCore::::computedShape): Pass style's rounded border to createShape().
923
924 2013-11-22  Andres Gomez  <agomez@igalia.com>
925
926         Several missing/incorrect guards for LOG_DISABLED=0 against Release build (Mac)
927         https://bugs.webkit.org/show_bug.cgi?id=78735
928
929         Reviewed by Mario Sanchez Prada.
930
931         In a "Debug" build the CString.h header comes from another
932         indirect dependency. Now, we explicitly add this missing include.
933
934         * page/CaptionUserPreferencesMediaAF.cpp: Explicitly adding
935         missing include.
936
937 2013-11-22  Robert Sipka  <sipka@inf.u-szeged.hu>
938
939         [curl] Fix of SSL certificate chain storage
940         https://bugs.webkit.org/show_bug.cgi?id=124768
941
942         Reviewed by Brent Fulgham.
943
944         Change the certificates storage type into ListHashSet
945         from HashSet to keep the chain order in each case.
946         This ensures that there is no difference between the stored
947         and the recieved certificate chain.
948
949         * platform/network/curl/SSLHandle.cpp:
950         (WebCore::allowsAnyHTTPSCertificateHosts):
951         (WebCore::sslIgnoreHTTPSCertificate):
952         (WebCore::pemData):
953         (WebCore::certVerifyCallback):
954
955 2013-11-22  Brent Fulgham  <bfulgham@apple.com>
956
957         [Win] Avoid deadlock when interacting with some AVFoundationCF content
958         <rdar://problem/15482977> and https://bugs.webkit.org/show_bug.cgi?id=124752
959
960         Prevent deadlock caused by conflict over the "mapLock" mutex. Notification handling in the file,
961         which modify assets and make other changes, are required to happen on the main thread. This
962         patch enforces this requirement.
963
964         Reviewed by Eric Carlson.
965
966         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
967         (WebCore::NotificationCallbackData::NotificationCallbackData): Added
968         (WebCore::AVFWrapper::processNotification): Moved logic from 'notificationCallback', which was
969         sometimes happening on a background thread.
970         (WebCore::AVFWrapper::notificationCallback): Dispatch calls to main thread.
971
972 2013-11-22  peavo@outlook.com  <peavo@outlook.com>
973
974         [WinCairo] Compile error when ACCELERATED_COMPOSITING is not used.
975         https://bugs.webkit.org/show_bug.cgi?id=124773
976
977         Reviewed by Brent Fulgham.
978
979         * rendering/RenderView.cpp:
980         (WebCore::RenderView::paintBoxDecorations): Added USE(ACCELERATED_COMPOSITING) guard.
981
982 2013-11-18  Sergio Villar Senin  <svillar@igalia.com>
983
984         [CSS Grid Layout] Improve content-sized track layout
985         https://bugs.webkit.org/show_bug.cgi?id=124408
986
987         Reviewed by Dean Jackson.
988
989         Test: fast/css-grid-layout/grid-item-with-percent-min-max-height-dynamic.html
990
991         From Blink r156122 & r157633 by <jchaffraix@chromium.org>
992
993         Added a couple of optimizations to speed up the layout of content
994         based tracks. The idea is to narrow down the conditions for
995         relayouting when the height of a grid area changes. We basically
996         just need to layout tracks with percentage heights as they're the
997         only ones that change.
998
999         A new performance test is attached to demonstrate the effect of
1000         these optimizations. We get a ~1000% improvement on a i7 M620
1001         going from 14.5 runs/s to 165 runs/s.
1002
1003         * rendering/RenderGrid.cpp:
1004         (WebCore::RenderGrid::logicalContentHeightForChild):
1005         (WebCore::RenderGrid::layoutGridItems):
1006
1007 2013-11-08  Sergio Villar Senin  <svillar@igalia.com>
1008
1009         [CSS Grid Layout] Run the content-sized tracks sizing algorithm only when required
1010         https://bugs.webkit.org/show_bug.cgi?id=124039
1011
1012         Reviewed by Dean Jackson.
1013
1014         The current code runs the content sized track sizing algorithm all
1015         the time, which forces a layout even when the track is not
1016         content-sized. This change improves the situation by applying two
1017         optimizations. In the first one, we bail out the algorithm if we
1018         detect that we don't need to run it. And by the second one we
1019         reduce the amount of recomputations by only iterating over the
1020         content sized tracks instead of all of them. Both changes follow
1021         the ideas introduced in Blink r156028 and r156168 by
1022         <jchaffraix@chromium.org>.
1023
1024         As we changed the way we iterate over children (we use the
1025         GridIterator now) the way they're stored in the RenderGrid changes
1026         too. If a item spans through several "cells" inside the grid, we
1027         will have a reference to it on each of them.
1028
1029         These two changes account for a ~3200% improvement on a i7 M620 in
1030         the test that accompanies this change (15.5 vs 520 run/s).
1031
1032         New perf test: PerformanceTests/Layout/fixed-grid-lots-of-data.html
1033
1034         * rendering/RenderGrid.cpp:
1035         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Keep track
1036         of content sized tracks and only iterate over them.
1037         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1038         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
1039         Early return if there are no tracks to pass to the algorithm.
1040         * rendering/RenderGrid.h:
1041         * rendering/style/GridLength.h:
1042         (WebCore::GridLength::isContentSized):
1043         * rendering/style/GridTrackSize.h:
1044         (WebCore::GridTrackSize::isContentSized):
1045
1046 2013-11-22  Manuel Rego Casasnovas  <rego@igalia.com>
1047
1048         [CSS Regions] Move code after early break in RenderRegion::repaintFlowThreadContentRectangle
1049         https://bugs.webkit.org/show_bug.cgi?id=124743
1050
1051         Reviewed by Mihnea Ovidenie.
1052
1053         No new tests, covered by existing tests.
1054
1055         * rendering/RenderRegion.cpp:
1056         (WebCore::RenderRegion::repaintFlowThreadContentRectangle): Variable
1057         flippedFlowThreadPortionRect is not used before the early break, so we
1058         can move it after and save some unneeded operations.
1059
1060 2013-11-22  Manuel Rego Casasnovas  <rego@igalia.com>
1061
1062         [CSS Regions] Use hasOverflowClip() in RenderRegion
1063         https://bugs.webkit.org/show_bug.cgi?id=124746
1064
1065         Reviewed by Mihnea Ovidenie.
1066
1067         Implement the suggested FIXME in RenderRegion using hasOverflowClip().
1068
1069         No new tests, covered by existing tests.
1070
1071         * rendering/RenderRegion.cpp:
1072         (WebCore::RenderRegion::overflowRectForFlowThreadPortion): Use
1073         hasOverflowClip().
1074         (WebCore::RenderRegion::rectFlowPortionForBox): Ditto.
1075
1076 2013-11-21  Frédéric Wang  <fred.wang@free.fr>
1077
1078         Map the dir attribute to the CSS direction property.
1079         https://bugs.webkit.org/show_bug.cgi?id=124572.
1080
1081         Reviewed by Darin Adler.
1082
1083         Test: mathml/presentation/mstyle-css-attributes.html
1084
1085         * mathml/MathMLElement.cpp:
1086         (WebCore::MathMLElement::isPresentationAttribute): reorder attributes
1087         (WebCore::MathMLElement::collectStyleForPresentationAttribute): reorder tags that accept dir
1088         (WebCore::MathMLElement::isMathMLToken): add an inline function to test that a tag corresponds to a MathML Token Element.
1089         * mathml/MathMLElement.h:
1090
1091         Follow-up work to address Darin's comments.
1092
1093 2013-11-21  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
1094
1095         Remove ENABLE_WORKERS
1096         https://bugs.webkit.org/show_bug.cgi?id=105784
1097
1098         Reviewed by Darin Adler.
1099
1100 2013-11-21  Alex Christensen  <achristensen@webkit.org>
1101
1102         [Win] Unreviewed build fix after r159632.
1103
1104         * platform/network/curl/SSLHandle.cpp:
1105         (WebCore::certVerifyCallback):
1106         Fixed template syntax.
1107
1108 2013-11-21  Bear Travis  <betravis@adobe.com>
1109
1110         Web Inspector: [CSS Shapes] Refactor highlighting code to decrease Shapes API surface
1111         https://bugs.webkit.org/show_bug.cgi?id=124737
1112
1113         Reviewed by Timothy Hatcher.
1114
1115         Add a virtual method to Shapes, buildPath, that can be used to build the
1116         path (in the Shape coordinate system) for display in the Inspector. This allows us
1117         to remove methods such as type(), polygon(), and logicalRx/Ry() which exposed the
1118         inner workings of the Shapes classes. Also covers the addition of the BoxShape type.
1119
1120         Refactoring, existing test is inspector-protocol/model/highlight-shape-outside.html.
1121
1122         * inspector/InspectorOverlay.cpp:
1123         (WebCore::appendPathCommandAndPoints): Points need to be translated from shape space
1124         to renderer space using ShapeInfo.
1125         (WebCore::buildObjectForShapeOutside): Add the ShapeOutsideInfo to the path info struct.
1126         * rendering/shapes/BoxShape.cpp:
1127         (WebCore::BoxShape::buildPath): Build the path for a BoxShape.
1128         * rendering/shapes/BoxShape.h:
1129         * rendering/shapes/PolygonShape.cpp:
1130         (WebCore::PolygonShape::buildPath): Build the path for a PolygonShape.
1131         * rendering/shapes/PolygonShape.h:
1132         * rendering/shapes/RasterShape.h:
1133         * rendering/shapes/RectangleShape.cpp:
1134         (WebCore::RectangleShape::buildPath): Build the path for a RectangleShape.
1135         * rendering/shapes/RectangleShape.h:
1136         * rendering/shapes/Shape.h:
1137
1138 2013-11-21  Mark Rowe  <mrowe@apple.com>
1139
1140         <https://webkit.org/b/124702> Stop overriding VALID_ARCHS.
1141
1142         All modern versions of Xcode set it appropriately for our needs.
1143
1144         Reviewed by Alexey Proskuryakov.
1145
1146         * Configurations/Base.xcconfig:
1147
1148 2013-11-21  Gwang Yoon Hwang  <ryumiel@company100.net>
1149
1150         [GTK] Unreviewed buildfix after r159614 and r159656.
1151
1152         * bindings/gobject/WebKitDOMCustom.cpp: Add missing header
1153
1154 2013-11-21  Laszlo Vidacs  <lac@inf.u-szeged.hu>
1155
1156         Fix WinCairo unreachable code warnings in SimpleLineLayout.cpp
1157         https://bugs.webkit.org/show_bug.cgi?id=124704
1158
1159         Reviewed by Antti Koivisto.
1160
1161         Fix unreachable code warnings using conditional directives.
1162
1163         * rendering/SimpleLineLayout.cpp:
1164         (WebCore::SimpleLineLayout::canUseFor):
1165
1166 2013-11-21  Mark Rowe  <mrowe@apple.com>
1167
1168         <https://webkit.org/b/124701> Fix an error in a few Xcode configuration setting files.
1169
1170         Reviewed by Alexey Proskuryakov.
1171
1172         * Configurations/Base.xcconfig:
1173
1174 2013-11-21  Mark Rowe  <mrowe@apple.com>
1175
1176         <https://webkit.org/b/124700> Fix some deprecation warnings.
1177
1178         Reviewed by Anders Carlsson.
1179
1180         * platform/mac/HTMLConverter.mm:
1181         (fileWrapperForURL): Move off a deprecated NSFileWrapper method.
1182
1183 2013-11-21  Daniel Bates  <dabates@apple.com>
1184
1185         [iOS] Build fix; export symbol for WebCore::provideDeviceOrientationTo()
1186
1187         Add the symbol __ZN7WebCore26provideDeviceOrientationToEPNS_4PageEPNS_23DeviceOrientationClientE.
1188
1189         * WebCore.exp.in:
1190
1191 2013-11-21  Daniel Bates  <dabates@apple.com>
1192
1193         Add !USE(NETWORK_CFDATA_ARRAY_CALLBACK)-guard
1194         https://bugs.webkit.org/show_bug.cgi?id=124741
1195
1196         Reviewed by Alexey Proskuryakov.
1197
1198         Add !USE(NETWORK_CFDATA_ARRAY_CALLBACK)-guard around code that is unused
1199         when building with feature NETWORK_CFDATA_ARRAY_CALLBACK.
1200
1201         Additionally, add a declaration for allocateSegment() with attribute WARN_UNUSED_RETURN
1202         to have the compiler warn when the return value of this function is unused. Together with
1203         warnings treated as errors this change will prevent a memory leak.
1204
1205         * platform/SharedBuffer.cpp:
1206
1207 2013-11-21  Daniel Bates  <dabates@apple.com>
1208
1209         Remove unused functions from WebCore and WebKit2
1210         https://bugs.webkit.org/show_bug.cgi?id=124739
1211
1212         Reviewed by Alexey Proskuryakov.
1213
1214         * editing/markup.cpp: Remove unused functions isHTMLBlockElement and
1215         ancestorToRetainStructureAndAppearanceWithNoRenderer.
1216         * rendering/InlineElementBox.cpp: Append newline to the end of the file.
1217
1218 2013-11-21  Daniel Bates  <dabates@apple.com>
1219
1220         Only generate isObservable() when IDL specifies GenerateIsReachable
1221         https://bugs.webkit.org/show_bug.cgi?id=124729
1222
1223         Reviewed by Geoffrey Garen.
1224
1225         We should only generate the static inline function isObservable() when the IDL
1226         specifies GenerateIsReachable. Otherwise, this function is unused.
1227
1228         Added a new test IDL TestGenerateIsReachable.idl and expected results to test that
1229         we generate isObservable() when an IDL specifies GenerateIsReachable. Additionally,
1230         rebased existing test results.
1231
1232         * bindings/scripts/CodeGeneratorJS.pm:
1233         (GenerateImplementation):
1234         * bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.cpp: Added.
1235         * bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.h: Added.
1236         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp: Added.
1237         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h: Added.
1238         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachablePrivate.h: Added.
1239         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Removed unused function isObservable().
1240         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
1241         * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
1242         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
1243         * bindings/scripts/test/JS/JSTestException.cpp: Ditto.
1244         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added.
1245         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added.
1246         * bindings/scripts/test/JS/JSTestInterface.cpp: Removed unused function isObservable().
1247         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
1248         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
1249         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
1250         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
1251         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
1252         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
1253         * bindings/scripts/test/JS/JSattribute.cpp: Ditto.
1254         * bindings/scripts/test/JS/JSreadonly.cpp: Ditto.
1255         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h: Added.
1256         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm: Added.
1257         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h: Added.
1258         * bindings/scripts/test/TestGenerateIsReachable.idl: Added.
1259
1260 2013-11-21  Beth Dakin  <bdakin@apple.com>
1261
1262         Add a new mode to extend the tile cache beyond the page
1263         https://bugs.webkit.org/show_bug.cgi?id=124216
1264
1265         Reviewed by Simon Fraser.
1266
1267         This patch makes it possible to give the tile cache a margin of tiles. If there is 
1268         a margin of tiles, this patch paints those tiles with the background color. Note 
1269         that this patch does not actually give the tile cache a margin at this time.
1270
1271         You opt into a margined tiled cache by called setTileMargins() with number of 
1272         pixels that the margin on that side should be. 
1273         * platform/graphics/TiledBacking.h:
1274         * platform/graphics/ca/mac/TileController.h:
1275         * platform/graphics/ca/mac/TileController.mm:
1276         (WebCore::TileController::TileController):
1277         (WebCore::TileController::tilesWouldChangeForVisibleRect):
1278
1279         TileController::bounds() now computes the bounds INCLUDING the margin.
1280         (WebCore::TileController::bounds):
1281
1282         adjustRectAtTileIndexForMargin() is a new function that is required to get the 
1283         rect size for tiles in the margin right. rectForTileIndex() assumes all tiles 
1284         strive to be the size of m_tileSize, but now margin tiles will be whatever the 
1285         margin sizes were set to.
1286         (WebCore::TileController::adjustRectAtTileIndexForMargin):
1287         (WebCore::TileController::rectForTileIndex):
1288
1289         This is another instance where m_tileSize is not always the right size to use.
1290         (WebCore::TileController::getTileIndexRangeForRect):
1291
1292         The tile coverage rect now might include the margin tiles. Only include them in 
1293         slow-scrolling mode if the current position is within one tile of the edge.
1294         (WebCore::TileController::computeTileCoverageRect):
1295
1296         tileSizeForCoverageRect() does not make sense in a world where the coverage rect 
1297         will include margin. Instead, this patch implements the current strategy more 
1298         explicitly by returning the visibleRect in the slow scrolling case, and in the 
1299         process this patch also re-names tileSizeForCoverageRect() to computeTileSize() 
1300         since it no longer takes a coverageRect.
1301         (WebCore::TileController::computeTileSize):
1302         (WebCore::TileController::revalidateTiles):
1303
1304         New setters and getters for the tile margins on each side.
1305         (WebCore::TileController::setTileMargins):
1306         (WebCore::TileController::hasMargins):
1307         (WebCore::TileController::topMarginHeight):
1308         (WebCore::TileController::bottomMarginHeight):
1309         (WebCore::TileController::leftMarginWidth):
1310         (WebCore::TileController::rightMarginWidth):
1311
1312         New function to add margin onto the composited bounds if there is one.
1313         * rendering/RenderLayerBacking.cpp:
1314         (WebCore::RenderLayerBacking::tiledBackingHasMargin):
1315         (WebCore::RenderLayerBacking::paintContents):
1316         (WebCore::RenderLayerBacking::compositedBoundsIncludingMargin):
1317         * rendering/RenderLayerBacking.h:
1318
1319         Do not set masks to bounds if there is a margin on the root layer.
1320         * rendering/RenderLayerCompositor.cpp:
1321         (WebCore::RenderLayerCompositor::updateBacking):
1322         (WebCore::RenderLayerCompositor::mainFrameBackingIsTiledWithMargin):
1323         * rendering/RenderLayerCompositor.h:
1324
1325         Allow background color to paint into the margin tiles.
1326         * rendering/RenderView.cpp:
1327         (WebCore::RenderView::paintBoxDecorations):
1328
1329 2013-11-21  Alexey Proskuryakov  <ap@apple.com>
1330
1331         Implement WebCrypto wrapKey
1332         https://bugs.webkit.org/show_bug.cgi?id=124738
1333
1334         Reviewed by Anders Carlsson.
1335
1336         Tests: crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html
1337                crypto/subtle/aes-cbc-wrap-rsa.html
1338
1339         * bindings/js/JSSubtleCryptoCustom.cpp:
1340         (WebCore::exportKey): Factored out the actual operation that can be chained with
1341         encryption for wrapKey.
1342         (WebCore::JSSubtleCrypto::exportKey):
1343         (WebCore::JSSubtleCrypto::wrapKey):
1344         (WebCore::JSSubtleCrypto::unwrapKey): Fixed a memory leak in failure code path.
1345
1346         * crypto/SubtleCrypto.idl: Added wrapKey.
1347
1348 2013-11-21  Alexey Proskuryakov  <ap@apple.com>
1349
1350         Implement WebCrypto unwrapKey
1351         https://bugs.webkit.org/show_bug.cgi?id=124725
1352
1353         Reviewed by Anders Carlsson.
1354
1355         Tests: crypto/subtle/aes-cbc-unwrap-failure.html
1356                crypto/subtle/aes-cbc-unwrap-rsa.html
1357
1358         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
1359         * bindings/js/JSCryptoAlgorithmDictionary.h:
1360         Removed calls for wrap/unwrap parameter parsing, these are just the same as encrypt/decrypt.
1361
1362         * bindings/js/JSCryptoOperationData.cpp:
1363         (WebCore::cryptoOperationDataFromJSValue):
1364         * bindings/js/JSCryptoOperationData.h:
1365         * crypto/CryptoKeySerialization.h:
1366         More Vector<char> elimination.
1367
1368         * bindings/js/JSDOMPromise.cpp:
1369         * bindings/js/JSDOMPromise.h:
1370         Removed unneccessary copy constructor and assignment operator, they are no diffdrent
1371         than compiler generated ones.
1372
1373         * bindings/js/JSSubtleCryptoCustom.cpp:
1374         (WebCore::cryptoKeyUsagesFromJSValue): Minor style fixes.
1375         (WebCore::JSSubtleCrypto::encrypt): Ditto.
1376         (WebCore::JSSubtleCrypto::decrypt): Ditto.
1377         (WebCore::JSSubtleCrypto::sign): Ditto.
1378         (WebCore::JSSubtleCrypto::verify): Ditto.
1379         (WebCore::JSSubtleCrypto::generateKey): Ditto.
1380         (WebCore::importKey): Separated actual import operation and the parts that read
1381         arguments from ExecState, and call the promise. Logically, this should be outside
1382         of bindings code even, but JWK makes that quite challenging.
1383         (WebCore::JSSubtleCrypto::importKey): This only does the more mundane arguments
1384         and return parts now.
1385         (WebCore::JSSubtleCrypto::exportKey): Minor style fixes.
1386         (WebCore::JSSubtleCrypto::unwrapKey): Chain decrypt and import.
1387
1388         * crypto/CryptoAlgorithm.cpp:
1389         (WebCore::CryptoAlgorithm::encryptForWrapKey):
1390         (WebCore::CryptoAlgorithm::decryptForUnwrapKey):
1391         * crypto/CryptoAlgorithm.h:
1392         There are algorithms that expose wrap/unwrap, but not encrypt/decrypt. These will
1393         override these new functions, and leave encrypt/decrypt to raise NOT_SUPPORTED_ERR.
1394
1395         * crypto/SubtleCrypto.idl: Added unwrapKey.
1396
1397 2013-11-21  Robert Sipka  <sipka@inf.u-szeged.hu>
1398
1399         [curl]Improve ssl certificate storage and check
1400         https://bugs.webkit.org/show_bug.cgi?id=124569
1401
1402         Reviewed by Brent Fulgham.
1403
1404         Storage and check the whole certificate chain, not just the root certificate.
1405
1406         * platform/network/curl/SSLHandle.cpp:
1407         (WebCore::allowsAnyHTTPSCertificateHosts):
1408         (WebCore::sslIgnoreHTTPSCertificate):
1409         (WebCore::pemData):
1410         (WebCore::certVerifyCallback):
1411
1412 2013-11-21  Mihai Maerean  <mmaerean@adobe.com>
1413
1414         Fix hover area for divs with css transforms
1415         https://bugs.webkit.org/show_bug.cgi?id=124647
1416
1417         Reviewed by Allan Sandfeld Jensen.
1418
1419         Non transformed layers are now being hit last, not through or in-between transformed layers.
1420         The paint order says that the divs creating stacking contexts (including transforms) are painted after the
1421         other siblings so they should be hit tested in the reverse order. Also, a rotated div in a non-rotated parent
1422         should be hit in its entire area, not hit its parent's background, even if the z-coordinate is negative where
1423         the mouse is located.
1424
1425         Test: transforms/3d/hit-testing/hover-rotated-negative-z.html
1426
1427         * rendering/RenderLayer.cpp:
1428         (WebCore::computeZOffset):
1429
1430 2013-11-21  Andres Gomez  <agomez@igalia.com>
1431
1432         [GTK] Release compilation fails when defining "LOG_DISABLED=0"
1433         https://bugs.webkit.org/show_bug.cgi?id=124661
1434
1435         Reviewed by Mario Sanchez Prada.
1436
1437         In a "Debug" build the CString.h header comes from another
1438         indirect dependency. Now, we explicitly add this missing include.
1439
1440         * html/HTMLTrackElement.cpp: Explicitly adding missing include.
1441
1442 2013-11-21  Ryosuke Niwa  <rniwa@webkit.org>
1443
1444         Fix Range.insertNode when the inserted node is in the same container as the Range
1445         https://bugs.webkit.org/show_bug.cgi?id=123957
1446
1447         Reviewed by Antti Koivisto.
1448
1449         Inspired by https://chromium.googlesource.com/chromium/blink/+/fb6ca1f488703e8d4f20ce6449cc8ea210be6edb
1450
1451         When a node from the same container is inserted, we can't simply adjust m_end with the offset.
1452         Compute m_start and m_end from the inserted nodes instead.
1453
1454         Also, don't adjust m_start and m_end to nodes outside of the document if the inserted nodes had been
1455         removed by mutation events.
1456
1457         Test: fast/dom/Range/range-insertNode-same-container.html
1458
1459         * dom/Range.cpp:
1460         (WebCore::Range::insertNode):
1461
1462 2013-11-21  Ryosuke Niwa  <rniwa@webkit.org>
1463
1464         nextBoundary and previousBoundary are very slow when there is a password field
1465         https://bugs.webkit.org/show_bug.cgi?id=123973
1466
1467         Reviewed by Antti Koivisto.
1468
1469         Merge https://chromium.googlesource.com/chromium/blink/+/57366eec5e3edea54062d4e74c0e047f8681dbad
1470
1471         When iterating through DOM nodes nextBoundary and previousBoundary convert the contents of nodes using
1472         text security to a sequence of 'x' characters. The SimplifiedBackwardsTextIterator and TextIterator
1473         may iterate past node boundaries. Before this patch, the transformation was done looking at the starting
1474         node rather than the current node. In some situations, this replaced all boundaries with 'x' and caused
1475         the text iterator to continue iterating and transforming until the extent of the document.
1476
1477         Test: editing/deleting/password-delete-performance.html
1478
1479         * editing/TextIterator.h:
1480         (WebCore::SimplifiedBackwardsTextIterator::node):
1481         * editing/VisibleUnits.cpp:
1482         (WebCore::previousBoundary):
1483         (WebCore::nextBoundary):
1484
1485 2013-11-21  Ryosuke Niwa  <rniwa@webkit.org>
1486
1487         HTML parser should not associate elements inside templates with forms
1488         https://bugs.webkit.org/show_bug.cgi?id=117779
1489
1490         Reviewed by Antti Koivisto.
1491
1492         Merge https://chromium.googlesource.com/chromium/blink/+/45aadf7ee7ee010327eb692066cf013315ef3ed7
1493
1494         When parsing <form><template><input>, the previous behavior was to associate the <input> with the <form>,
1495         even though they're not in the same tree (or even the same document).
1496
1497         This patch changes that by checking, prior to creating a form control element, whether the element to be
1498         created lives in a document with a browsing context.
1499
1500         We don't update m_form as needed to faithfully match the HTML5 specification's form element pointer
1501         http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#form-element-pointer
1502         and its algorithm for creating and inserting nodes:
1503         http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#creating-and-inserting-nodes
1504
1505         While this leaves isindex's reference to form element pointer stale:
1506         http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#isindex
1507         The HTML5 specification matches the behaviors of Chrome and Firefox so we leave it as is.
1508
1509         Test: fast/dom/HTMLTemplateElement/no-form-association.html
1510
1511         * html/parser/HTMLConstructionSite.cpp:
1512         (WebCore::HTMLConstructionSite::createHTMLElement):
1513
1514 2013-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1515
1516         [GTK] Cannot scroll in option menu when it larger than the screen
1517         https://bugs.webkit.org/show_bug.cgi?id=124671
1518
1519         Reviewed by Martin Robinson.
1520
1521         The problem is that the popup menu is not resized to fit in the
1522         screen, so it doesn't scroll and some of the items are offscreen
1523         so they can't be selected either. GTK+ automatically resizes the
1524         popup menus to fit in the work area, but only when the menu is
1525         already positioned.
1526
1527         * platform/gtk/GtkPopupMenu.cpp:
1528         (WebCore::GtkPopupMenu::popUp): Schedule a resize of the popup
1529         menu right after showing it once it has a position.
1530
1531 2013-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1532
1533         [GTK] Mark all deprecated symbols in GObject DOM bindings
1534         https://bugs.webkit.org/show_bug.cgi?id=124406
1535
1536         Reviewed by Gustavo Noronha Silva.
1537
1538         Move deprecated API from WebKitDOMCustom to a new file
1539         WebKitDOMDeprecated leaving in WebKitDOMCustom only the
1540         non-deprecated API that is not autogenerated. Also added the
1541         deprecation decorations and tags in the documentation.
1542
1543         * bindings/gobject/GNUmakefile.am:
1544         * bindings/gobject/WebKitDOMCustom.cpp:
1545         * bindings/gobject/WebKitDOMCustom.h:
1546         * bindings/gobject/WebKitDOMCustom.symbols:
1547         * bindings/gobject/WebKitDOMDeprecated.cpp: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp.
1548         (webkit_dom_blob_webkit_slice):
1549         (webkit_dom_html_element_get_id):
1550         (webkit_dom_html_element_set_id):
1551         (webkit_dom_html_element_get_class_name):
1552         (webkit_dom_html_element_set_class_name):
1553         (webkit_dom_html_element_get_class_list):
1554         (webkit_dom_html_form_element_dispatch_form_change):
1555         (webkit_dom_html_form_element_dispatch_form_input):
1556         (webkit_dom_webkit_named_flow_get_overflow):
1557         (webkit_dom_element_get_webkit_region_overflow):
1558         (webkit_dom_webkit_named_flow_get_content_nodes):
1559         (webkit_dom_webkit_named_flow_get_regions_by_content_node):
1560         (webkit_dom_bar_info_get_property):
1561         (webkit_dom_bar_info_class_init):
1562         (webkit_dom_bar_info_init):
1563         (webkit_dom_bar_info_get_visible):
1564         (webkit_dom_console_get_memory):
1565         (webkit_dom_css_style_declaration_get_property_css_value):
1566         (webkit_dom_document_get_webkit_hidden):
1567         (webkit_dom_document_get_webkit_visibility_state):
1568         (webkit_dom_html_document_open):
1569         (webkit_dom_html_element_set_item_id):
1570         (webkit_dom_html_element_get_item_id):
1571         (webkit_dom_html_element_get_item_ref):
1572         (webkit_dom_html_element_get_item_prop):
1573         (webkit_dom_html_element_set_item_scope):
1574         (webkit_dom_html_element_get_item_scope):
1575         (webkit_dom_html_element_get_item_type):
1576         (webkit_dom_html_style_element_set_scoped):
1577         (webkit_dom_html_style_element_get_scoped):
1578         (webkit_dom_html_properties_collection_get_property):
1579         (webkit_dom_html_properties_collection_class_init):
1580         (webkit_dom_html_properties_collection_init):
1581         (webkit_dom_html_properties_collection_item):
1582         (webkit_dom_html_properties_collection_named_item):
1583         (webkit_dom_html_properties_collection_get_length):
1584         (webkit_dom_html_properties_collection_get_names):
1585         (webkit_dom_node_get_attributes):
1586         (webkit_dom_node_has_attributes):
1587         (webkit_dom_memory_info_get_property):
1588         (webkit_dom_memory_info_class_init):
1589         (webkit_dom_memory_info_init):
1590         (webkit_dom_memory_info_get_total_js_heap_size):
1591         (webkit_dom_memory_info_get_used_js_heap_size):
1592         (webkit_dom_memory_info_get_js_heap_size_limit):
1593         (webkit_dom_micro_data_item_value_class_init):
1594         (webkit_dom_micro_data_item_value_init):
1595         (webkit_dom_performance_get_memory):
1596         (webkit_dom_property_node_list_get_property):
1597         (webkit_dom_property_node_list_class_init):
1598         (webkit_dom_property_node_list_init):
1599         (webkit_dom_property_node_list_item):
1600         (webkit_dom_property_node_list_get_length):
1601         (webkit_dom_html_media_element_get_start_time):
1602         (webkit_dom_html_media_element_get_initial_time):
1603         (webkit_dom_html_head_element_get_profile):
1604         (webkit_dom_html_head_element_set_profile):
1605         (webkit_dom_processing_instruction_get_data):
1606         (webkit_dom_processing_instruction_set_data):
1607         * bindings/gobject/WebKitDOMDeprecated.h: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.h.
1608         * bindings/gobject/WebKitDOMDeprecated.symbols: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.symbols.
1609         * bindings/scripts/CodeGeneratorGObject.pm:
1610         (GenerateFunction): Do not include deprecation guards in the cpp file.
1611         * bindings/scripts/gobject-generate-headers.pl: Do not create
1612         fordward declarations for non-existent classes like Custom and
1613         Deprecated.
1614         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1615         (webkit_dom_test_event_target_dispatch_event):
1616
1617 2013-11-20  Jae Hyun Park  <jae.park@company100.net>
1618
1619         [CoordinatedGraphics] Use std::unique_ptrs rather than OwnPtrs
1620         https://bugs.webkit.org/show_bug.cgi?id=124692
1621
1622         Reviewed by Noam Rosenthal.
1623
1624         No new tests, covered by existing ones.
1625
1626         * platform/graphics/TiledBackingStore.cpp:
1627         (WebCore::TiledBackingStore::TiledBackingStore):
1628         * platform/graphics/TiledBackingStore.h:
1629         * platform/graphics/TiledBackingStoreBackend.h:
1630         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1631         (WebCore::CoordinatedGraphicsLayer::createBackingStore):
1632         * platform/graphics/texmap/coordinated/CoordinatedTile.h:
1633
1634 2013-11-20  Brady Eidson  <beidson@apple.com>
1635
1636         Add more infrastructure for ServerConnection communication between Web and Database processes
1637         https://bugs.webkit.org/show_bug.cgi?id=124693
1638
1639         Reviewed by Anders Carlsson.
1640
1641         * WebCore.exp.in:
1642
1643 2013-11-20  Ryosuke Niwa  <rniwa@webkit.org>
1644
1645         Hoist <template> to head when found between </head> and <body> for consistency with <script>
1646         https://bugs.webkit.org/show_bug.cgi?id=123949
1647
1648         Reviewed by Antti Koivisto.
1649
1650         Merge https://chromium.googlesource.com/chromium/blink/+/835fb468fd211054a920fb7612a6dc5043662495
1651
1652         Move template elements between head and body elements into the head to be consistent with script elements.
1653         The HTML5 specification was changed in http://html5.org/tools/web-apps-tracker?from=8217&to=8218.
1654
1655         Inline comments below are cited from https://www.w3.org/Bugs/Public/show_bug.cgi?id=23002
1656         and https://codereview.chromium.org/25900003 for clarity.
1657
1658         * html/parser/HTMLTreeBuilder.cpp:
1659         (WebCore::HTMLTreeBuilder::processStartTag): Add the template element to the list of elements to be hoisted into
1660         the head element.
1661         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
1662
1663         Replace the assertion that isParsingFragment is true when item->node() == m_tree.openElements()->rootNode() since,
1664         with this change, we can now invoke resetInsertionMode when parsing a normal document (not fragment) and there is
1665         only the html element on the stack of open elements.
1666
1667         For the second change, consider: <head></head><template>
1668
1669         This example breaks in the old HTML parser because the template element is handled by "after head" state which
1670         pushes the head element back on, processes the template element for "in head", then pops the head element off.
1671         EOF is reached, which processes a fake close tag for the template element, which pops the template element off
1672         and resets the insertion mode appropriately
1673
1674         The problem here is that "reset the insertion mode" is going to inspect the bottom-most element on the stack which
1675         is now the html element and it will set the mode to "before head". Nothing good happens after this.
1676
1677         We fix this problem by having the reset algorithm check if the head element pointer is set, and if so, go to after
1678         head instead of before head.
1679
1680 2013-11-20  Radu Stavila  <stavila@adobe.com>
1681
1682         [CSS Regions] Implement visual overflow for first & last regions
1683         https://bugs.webkit.org/show_bug.cgi?id=118665
1684
1685         In order to properly propagate the visual overflow of elements flowed inside regions, 
1686         the responsiblity of painting and hit-testing content inside flow threads has been
1687         moved to the flow thread layer's level.
1688         Each region keeps the associated overflow with each box in the RenderBoxRegionInfo
1689         structure, including one for the flow thread itself. This data is used during
1690         painting and hit-testing.
1691
1692         Reviewed by David Hyatt.
1693
1694         Tests: fast/regions/overflow-first-and-last-regions-in-container-hidden.html
1695                fast/regions/overflow-first-and-last-regions.html
1696                fast/regions/overflow-nested-regions.html
1697                fast/regions/overflow-region-float.html
1698                fast/regions/overflow-region-inline.html
1699                fast/regions/overflow-region-transform.html
1700
1701         * rendering/InlineFlowBox.cpp:
1702         (WebCore::InlineFlowBox::setLayoutOverflow):
1703         (WebCore::InlineFlowBox::setVisualOverflow):
1704         * rendering/InlineFlowBox.h:
1705         * rendering/RenderBlock.cpp:
1706         (WebCore::RenderBlock::addOverflowFromChildren):
1707         (WebCore::RenderBlock::paint):
1708         (WebCore::RenderBlock::paintObject):
1709         (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
1710         (WebCore::RenderBlock::updateRegionRangeForBoxChild):
1711         * rendering/RenderBlockFlow.cpp:
1712         (WebCore::RenderBlockFlow::hasNextPage):
1713         (WebCore::RenderBlockFlow::relayoutForPagination):
1714         * rendering/RenderBlockLineLayout.cpp:
1715         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
1716         * rendering/RenderBox.cpp:
1717         (WebCore::RenderBox::borderBoxRectInRegion):
1718         (WebCore::RenderBox::computeRectForRepaint):
1719         (WebCore::RenderBox::addLayoutOverflow):
1720         (WebCore::RenderBox::addVisualOverflow):
1721         (WebCore::RenderBox::isUnsplittableForPagination):
1722         (WebCore::RenderBox::overflowRectForPaintRejection):
1723         * rendering/RenderBox.h:
1724         (WebCore::RenderBox::canHaveOutsideRegionRange):
1725         * rendering/RenderBoxModelObject.cpp:
1726         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
1727         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1728         * rendering/RenderBoxModelObject.h:
1729         * rendering/RenderBoxRegionInfo.h:
1730         (WebCore::RenderBoxRegionInfo::createOverflow):
1731         * rendering/RenderFlowThread.cpp:
1732         (WebCore::RenderFlowThread::objectShouldPaintInFlowRegion):
1733         (WebCore::RenderFlowThread::mapFromLocalToFlowThread):
1734         (WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
1735         (WebCore::RenderFlowThread::decorationsClipRectForBoxInRegion):
1736         (WebCore::RenderFlowThread::flipForWritingModeLocalCoordinates):
1737         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
1738         (WebCore::RenderFlowThread::addRegionsVisualOverflow):
1739         (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer):
1740         * rendering/RenderFlowThread.h:
1741         * rendering/RenderLayer.cpp:
1742         (WebCore::RenderLayer::updateLayerPositions):
1743         (WebCore::expandClipRectForRegionAndReflection):
1744         (WebCore::expandClipRectForDescendantsAndReflection):
1745         (WebCore::RenderLayer::paintLayer):
1746         (WebCore::RenderLayer::paintLayerContents):
1747         (WebCore::RenderLayer::updatePaintingInfoForFragments):
1748         (WebCore::RenderLayer::paintForegroundForFragments):
1749         (WebCore::RenderLayer::hitTest):
1750         (WebCore::RenderLayer::hitTestLayer):
1751         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
1752         (WebCore::RenderLayer::calculateClipRects):
1753         (WebCore::RenderLayer::parentClipRects):
1754         (WebCore::RenderLayer::calculateRects):
1755         (WebCore::RenderLayer::intersectsDamageRect):
1756         (WebCore::RenderLayer::updateDescendantsLayerListsIfNeeded):
1757         (WebCore::RenderLayer::repaintIncludingDescendants):
1758         (WebCore::RenderLayer::paintNamedFlowThreadInsideRegion):
1759         (WebCore::RenderLayer::paintFlowThreadIfRegion):
1760         (WebCore::RenderLayer::hitTestFlowThreadIfRegion):
1761         * rendering/RenderLayer.h:
1762         (WebCore::ClipRect::inflateX):
1763         (WebCore::ClipRect::inflateY):
1764         (WebCore::ClipRect::inflate):
1765         * rendering/RenderLayerCompositor.cpp:
1766         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1767         * rendering/RenderListItem.cpp:
1768         (WebCore::RenderListItem::addOverflowFromChildren):
1769         * rendering/RenderMultiColumnSet.cpp:
1770         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
1771         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
1772         * rendering/RenderMultiColumnSet.h:
1773         * rendering/RenderNamedFlowFragment.cpp:
1774         (WebCore::RenderNamedFlowFragment::createStyle):
1775         (WebCore::RenderNamedFlowFragment::namedFlowThread):
1776         * rendering/RenderNamedFlowFragment.h:
1777         * rendering/RenderOverflow.h:
1778         * rendering/RenderRegion.cpp:
1779         (WebCore::RenderRegion::flowThreadPortionOverflowRect):
1780         (WebCore::RenderRegion::flowThreadPortionLocation):
1781         (WebCore::RenderRegion::regionContainerLayer):
1782         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
1783         (WebCore::RenderRegion::computeOverflowFromFlowThread):
1784         (WebCore::RenderRegion::repaintFlowThreadContent):
1785         (WebCore::RenderRegion::repaintFlowThreadContentRectangle):
1786         (WebCore::RenderRegion::insertedIntoTree):
1787         (WebCore::RenderRegion::ensureOverflowForBox):
1788         (WebCore::RenderRegion::rectFlowPortionForBox):
1789         (WebCore::RenderRegion::addLayoutOverflowForBox):
1790         (WebCore::RenderRegion::addVisualOverflowForBox):
1791         (WebCore::RenderRegion::layoutOverflowRectForBox):
1792         (WebCore::RenderRegion::visualOverflowRectForBox):
1793         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
1794         * rendering/RenderRegion.h:
1795         * rendering/RenderReplaced.cpp:
1796         (WebCore::RenderReplaced::shouldPaint):
1797         * rendering/RootInlineBox.cpp:
1798         (WebCore::RootInlineBox::paint):
1799
1800 2013-11-20  Ryosuke Niwa  <rniwa@webkit.org>
1801
1802         [HTML parser] reset insertion mode appropriate must check for "in select in table" mode
1803         https://bugs.webkit.org/show_bug.cgi?id=123850
1804
1805         Reviewed by Antti Koivisto.
1806
1807         Merge https://chromium.googlesource.com/chromium/blink/+/2cb7523df57dfb48111f6aa16b7138cd54024ba7
1808
1809         The HTML specification has been updated to detect encountering a template element inside of a select element,
1810         which in turn is inside of a table element. In this case, the select element will cause the parser to be in
1811         "InSelectInTable" mode. Thus when the template element closes, it should return to that mode.
1812
1813         The fix here is that resetInsertionModeAppropriately must continue looking up the stack if the first node is
1814         select element to see whether the select element is inside of a table element.
1815
1816         See also: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#reset-the-insertion-mode-appropriately
1817
1818         Test: html5lib/resources/template.dat
1819
1820         * html/parser/HTMLTreeBuilder.cpp:
1821         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
1822
1823 2013-11-20  Mark Lam  <mark.lam@apple.com>
1824
1825         Build fix for last commit.
1826         https://bugs.webkit.org/show_bug.cgi?id=124634.
1827
1828         Not reviewed.
1829
1830         No new tests.
1831
1832         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
1833
1834 2013-11-20  Mark Lam  <mark.lam@apple.com>
1835
1836         Introducing VMEntryScope to update the VM stack limit.
1837         https://bugs.webkit.org/show_bug.cgi?id=124634.
1838
1839         Reviewed by Geoffrey Garen.
1840
1841         No new tests.
1842
1843         Renamed dynamicGlobalObject() to vmEntryGlobalObject().
1844         Replaced uses of DynamicGlobalObjectScope with VMEntryScope.
1845
1846         * ForwardingHeaders/runtime/VMEntryScope.h: Added.
1847         * WebCore.vcxproj/WebCore.vcxproj:
1848         * WebCore.vcxproj/WebCore.vcxproj.filters:
1849         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
1850         (WebCore::JSCryptoAlgorithmBuilder::add):
1851         * bindings/js/JSCustomXPathNSResolver.cpp:
1852         (WebCore::JSCustomXPathNSResolver::create):
1853         * bindings/js/JSDOMBinding.cpp:
1854         (WebCore::firstDOMWindow):
1855         * bindings/js/JSErrorHandler.cpp:
1856         (WebCore::JSErrorHandler::handleEvent):
1857         * bindings/js/JSEventListener.cpp:
1858         (WebCore::JSEventListener::handleEvent):
1859         * bindings/js/JavaScriptCallFrame.h:
1860         (WebCore::JavaScriptCallFrame::vmEntryGlobalObject):
1861         * bindings/js/PageScriptDebugServer.cpp:
1862         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
1863         * bindings/js/ScriptDebugServer.cpp:
1864         (WebCore::ScriptDebugServer::evaluateBreakpointAction):
1865         (WebCore::ScriptDebugServer::handlePause):
1866         * bindings/js/WorkerScriptDebugServer.cpp:
1867         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
1868         * bindings/objc/WebScriptObject.mm:
1869         (WebCore::addExceptionToConsole):
1870         * bridge/c/c_utility.cpp:
1871         (JSC::Bindings::convertValueToNPVariant):
1872         * bridge/objc/objc_instance.mm:
1873         (ObjcInstance::moveGlobalExceptionToExecState):
1874         * bridge/objc/objc_runtime.mm:
1875         (JSC::Bindings::convertValueToObjcObject):
1876         * bridge/objc/objc_utility.mm:
1877         (JSC::Bindings::convertValueToObjcValue):
1878
1879 2013-11-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1880
1881         Generate toHTMLFooElement() to clean up static_cast<>
1882         https://bugs.webkit.org/show_bug.cgi?id=124571
1883
1884         Reviewed by Ryosuke Niwa.
1885
1886         Though there are a lot of clean up commits before, there are still
1887         use of static_cast<HTMLFooElement*>. To clean up them, we need to generate
1888         toHTMLDetails|Meta|Summary|TableCaptionElement().
1889
1890         Additionally, other static_cast<> are removed as well.
1891
1892         No new tests, no behavior changes.
1893
1894         * html/HTMLDetailsElement.h:
1895         * html/HTMLMediaElement.cpp:
1896         (HTMLMediaElement::selectNextSourceChild):
1897         * html/HTMLMetaElement.h:
1898         * html/HTMLObjectElement.cpp:
1899         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
1900         * html/HTMLOptionElement.cpp:
1901         (WebCore::HTMLOptionElement::isDisabledFormControl):
1902         * html/HTMLPlugInImageElement.cpp:
1903         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
1904         * html/HTMLSummaryElement.cpp:
1905         (WebCore::HTMLSummaryElement::detailsElement):
1906         * html/HTMLSummaryElement.h:
1907         * html/HTMLTableCaptionElement.h:
1908         * html/HTMLTableElement.cpp:
1909         (WebCore::HTMLTableElement::caption):
1910         * html/HTMLTagNames.in:
1911         * html/MediaDocument.cpp:
1912         (WebCore::MediaDocumentParser::createDocumentStructure):
1913         * html/shadow/DetailsMarkerControl.cpp:
1914         (WebCore::DetailsMarkerControl::summaryElement):
1915         * loader/FrameLoader.cpp:
1916         (WebCore::FrameLoader::handleFallbackContent):
1917         * loader/ImageLoader.cpp:
1918         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
1919         * page/DragController.cpp:
1920         (WebCore::DragController::canProcessDrag):
1921         * page/Frame.cpp:
1922         (WebCore::Frame::searchForLabelsBeforeElement):
1923         * page/SpatialNavigation.cpp:
1924         (WebCore::frameOwnerElement):
1925
1926 2013-11-20  Ryosuke Niwa  <rniwa@webkit.org>
1927
1928         Clear TemplateContentDocumentFragment::m_host when HTMLTemplateElement is destroyed
1929         https://bugs.webkit.org/show_bug.cgi?id=122806
1930
1931         Reviewed by Antti Koivisto.
1932
1933         Merge https://chromium.googlesource.com/chromium/blink/+/858ed5f6341de9d900768c1f4668fcfce870c52e
1934
1935         The document fragment of a template element outlives the element itself.
1936         Clear the host property on the document fragment when that happens.
1937
1938         Test: fast/dom/HTMLTemplateElement/content-outlives-template-crash.html
1939
1940         * dom/TemplateContentDocumentFragment.h:
1941         * html/HTMLTemplateElement.cpp:
1942         (WebCore::HTMLTemplateElement::~HTMLTemplateElement):
1943         * html/HTMLTemplateElement.h:
1944
1945 2013-11-20  Chris Fleizach  <cfleizach@apple.com>
1946
1947         AX: Implement CSS -webkit-alt property (text alternative for generated content pseudo-elements ::before and ::after)
1948         https://bugs.webkit.org/show_bug.cgi?id=120188
1949
1950         Reviewed by Dean Jackson.
1951
1952         Add a -webkit-alt CSS property that can be used to label Image content or Text content for accessibility clients.
1953
1954         To accomplish this, it sets the string in the RenderStyle. Then when the ContentData creates an anonymous renderer,
1955         it sets that string on the TextFragment or RenderImage, which can be queried by accessibility code.
1956
1957         Test: platform/mac/accessibility/webkit-alt-for-css-content.html
1958
1959         * accessibility/AccessibilityNodeObject.cpp:
1960         (WebCore::AccessibilityNodeObject::alternativeText):
1961         * accessibility/AccessibilityRenderObject.cpp:
1962         (WebCore::AccessibilityRenderObject::textUnderElement):
1963         (WebCore::objectInclusionFromAltText):
1964         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1965         * css/CSSComputedStyleDeclaration.cpp:
1966         (WebCore::altTextToCSSValue):
1967         (WebCore::ComputedStyleExtractor::propertyValue):
1968         * css/CSSParser.cpp:
1969         (WebCore::CSSParser::parseValue):
1970         (WebCore::CSSParser::parseAlt):
1971         * css/CSSParser.h:
1972         * css/CSSPropertyNames.in:
1973         * css/StyleResolver.cpp:
1974         (WebCore::StyleResolver::applyProperty):
1975         * rendering/RenderImage.h:
1976         (WebCore::RenderImage::altText):
1977         (WebCore::RenderImage::setAltText):
1978         * rendering/RenderTextFragment.h:
1979         * rendering/style/ContentData.cpp:
1980         (WebCore::ImageContentData::createRenderer):
1981         (WebCore::TextContentData::createRenderer):
1982         * rendering/style/ContentData.h:
1983         (WebCore::ContentData::setAltText):
1984         (WebCore::ContentData::altText):
1985         * rendering/style/RenderStyle.cpp:
1986         (WebCore::RenderStyle::setContent):
1987         (WebCore::RenderStyle::setContentAltText):
1988         (WebCore::RenderStyle::contentAltText):
1989         * rendering/style/RenderStyle.h:
1990         * rendering/style/StyleRareNonInheritedData.h:
1991
1992 2013-11-20  Roger Fong  <roger_fong@apple.com>
1993
1994         Use compile flag SH_UNFOLD_SHORT_CIRCUIT when compiling shaders.
1995         https://bugs.webkit.org/show_bug.cgi?id=124684.
1996
1997         Reviewed by Brent Fulgham.
1998
1999         Existing test webgl/1.0.2/conformance/glsl/misc/shader-with-short-circuiting-operators.html
2000
2001         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2002         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
2003
2004 2013-11-20  Robert Sipka  <sipka@inf.u-szeged.hu>
2005
2006         [curl] Improve detecting and handling of SSL related errors
2007         https://bugs.webkit.org/show_bug.cgi?id=119436
2008
2009         Reviewed by Brent Fulgham.
2010
2011         Set the exact SSL verification error on CURL
2012         and store the enabled domain with certificate.
2013
2014         * WebCore.vcxproj/WebCore.vcxproj:
2015         * WebCore.vcxproj/WebCore.vcxproj.filters:
2016         * platform/network/ResourceHandle.h:
2017         * platform/network/ResourceHandleInternal.h:
2018         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2019         * platform/network/curl/ResourceError.h:
2020         (WebCore::ResourceError::ResourceError):
2021         (WebCore::ResourceError::sslErrors):
2022         (WebCore::ResourceError::setSSLErrors):
2023         * platform/network/curl/ResourceHandleCurl.cpp:
2024         (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate):
2025         * platform/network/curl/ResourceHandleManager.cpp:
2026         (WebCore::ResourceHandleManager::downloadTimerCallback):
2027         (WebCore::ResourceHandleManager::initializeHandle):
2028         * platform/network/curl/SSLHandle.cpp: Added.
2029         (WebCore::allowsAnyHTTPSCertificateHosts):
2030         (WebCore::sslIgnoreHTTPSCertificate):
2031         (WebCore::sslCertificateFlag):
2032         (WebCore::pemData):
2033         (WebCore::certVerifyCallback):
2034         (WebCore::sslctxfun):
2035         (WebCore::setSSLVerifyOptions):
2036         * platform/network/curl/SSLHandle.h: Added.
2037
2038 2013-11-20  Bem Jones-Bey  <bjonesbe@adobe.com>
2039
2040         [css shapes] Parse new circle shape syntax
2041         https://bugs.webkit.org/show_bug.cgi?id=124618
2042
2043         Reviewed by Antti Koivisto.
2044
2045         Implement parsing of the new cicle shape syntax. The implementation of
2046         the old syntax has been move aside as deprecated, and will be removed
2047         once the new syntax is stable.
2048
2049         Updated existing parsing tests to cover this.
2050
2051         * css/BasicShapeFunctions.cpp:
2052         (WebCore::valueForCenterCoordinate): Create a CSSPrimitiveValue from a
2053             BasicShapeCenterCoordinate.
2054         (WebCore::valueForBasicShape): Convert new basic shape and rename old
2055             one.
2056         (WebCore::convertToCenterCoordinate): Create a
2057             BasicShapeCenterCoordinate from a CSSPrimitiveValue.
2058         (WebCore::basicShapeForValue): Convert new shape value and rename old
2059             one.
2060         * css/CSSBasicShapes.cpp:
2061         (WebCore::buildCircleString): Build a new circle string.
2062         (WebCore::CSSBasicShapeCircle::cssText): Serialize the new circle
2063             shape.
2064         (WebCore::CSSBasicShapeCircle::equals): Compare new circle shapes.
2065         (WebCore::CSSBasicShapeCircle::serializeResolvingVariables):
2066         * css/CSSBasicShapes.h:
2067         (WebCore::CSSBasicShapeCircle::CSSBasicShapeCircle): Add class for new
2068             circle shape.
2069         (WebCore::CSSDeprecatedBasicShapeCircle::create): Renamed to move out
2070             of the way of the new circle implementation.
2071         (WebCore::CSSDeprecatedBasicShapeCircle::centerX): Ditto.
2072         (WebCore::CSSDeprecatedBasicShapeCircle::centerY): Ditto.
2073         (WebCore::CSSDeprecatedBasicShapeCircle::radius): Ditto.
2074         (WebCore::CSSDeprecatedBasicShapeCircle::setCenterX): Ditto.
2075         (WebCore::CSSDeprecatedBasicShapeCircle::setCenterY): Ditto.
2076         (WebCore::CSSDeprecatedBasicShapeCircle::setRadius): Ditto.
2077         (WebCore::CSSDeprecatedBasicShapeCircle::CSSDeprecatedBasicShapeCircle): Ditto.
2078         * css/CSSParser.cpp:
2079         (WebCore::CSSParser::parseShapeRadius): Parse the radius for the new
2080             circle syntax. Will also be used by the new ellipse syntax.
2081         (WebCore::CSSParser::parseBasicShapeCircle): Parse the new circle
2082             syntax.
2083         (WebCore::CSSParser::parseDeprecatedBasicShapeCircle): Rename to make
2084             way for the new implementation.
2085         (WebCore::isDeprecatedBasicShape): Check if we have a new circle or an
2086             old circle.
2087         (WebCore::CSSParser::parseBasicShape): Update to parse the new circle
2088             syntax.
2089         * css/CSSParser.h:
2090         * css/CSSValueKeywords.in: Add support for the new circle keywords.
2091         * rendering/shapes/Shape.cpp:
2092         (WebCore::Shape::createShape): 
2093         * rendering/style/BasicShapes.cpp: Deprecate old circle and add stub
2094             for layout code.
2095         (WebCore::DeprecatedBasicShapeCircle::path): Rename to make way for
2096             the new implementation.
2097         (WebCore::DeprecatedBasicShapeCircle::blend): Rename to make way for
2098             the new implementation.
2099         (WebCore::BasicShapeCircle::path): Create path for new circle shape.
2100         (WebCore::BasicShapeCircle::blend): Interpolate the new circle shape.
2101         * rendering/style/BasicShapes.h:
2102         (WebCore::BasicShapeCenterCoordinate::BasicShapeCenterCoordinate):
2103             Represent an x or y coordinate for the center of a new circle,
2104             since it can be either a keyword along with an offset that cannot
2105             be resolved until layout time or an ordinary Length. This will
2106             also be used by the new ellipse implementation.
2107         (WebCore::BasicShapeCenterCoordinate::keyword):
2108         (WebCore::BasicShapeCenterCoordinate::length):
2109         (WebCore::BasicShapeCenterCoordinate::blend): Interpolate.
2110         (WebCore::BasicShapeRadius::BasicShapeRadius): Represent the radius of
2111             a new circle shape since it can either be a straightforward Length or
2112             a keyword that cannot be resolved until layout time.
2113         (WebCore::BasicShapeRadius::value):
2114         (WebCore::BasicShapeRadius::type):
2115         (WebCore::BasicShapeRadius::blend): Interpolate.
2116         (WebCore::BasicShapeCircle::centerX):
2117         (WebCore::BasicShapeCircle::centerY):
2118         (WebCore::BasicShapeCircle::radius):
2119         (WebCore::BasicShapeCircle::setCenterX):
2120         (WebCore::BasicShapeCircle::setCenterY):
2121         (WebCore::BasicShapeCircle::setRadius):
2122         (WebCore::BasicShapeCircle::BasicShapeCircle): New circle class.
2123         (WebCore::DeprecatedBasicShapeCircle::create): Rename to make room for
2124             new circle implementation.
2125         (WebCore::DeprecatedBasicShapeCircle::DeprecatedBasicShapeCircle): Ditto.
2126
2127 2013-11-20  Hans Muller  <hmuller@adobe.com>
2128
2129         [CSS Shapes] Add BoxShape and FloatRoundingRect classes
2130         https://bugs.webkit.org/show_bug.cgi?id=124368
2131
2132         Reviewed by Dean Jackson.
2133
2134         Added the BoxShape class. It's now used to represent shape-outside box
2135         values: [margin/border/padding/content]-box. BoxShape depends on a new
2136         FloatRoundedRect class, which is a float analog of the existing (int)
2137         RoundedRect class. The FloatRoundedRect class contains the same basic
2138         methods and accessors as BorderRect and adds a set of four methods,
2139         for example topLeftCorner(), that return a FloatRect that represents the
2140         bounds of one elliptical corner. I also added a method, xInterceptsAtY()
2141         that returns two X coordinates of the intersection between a horizontal
2142         line and the rounded rectangle.
2143
2144         No new tests, this is just an internal refactoring.
2145
2146         * CMakeLists.txt:
2147         * GNUmakefile.list.am:
2148         * WebCore.vcxproj/WebCore.vcxproj:
2149         * WebCore.vcxproj/WebCore.vcxproj.filters:
2150         * WebCore.xcodeproj/project.pbxproj:
2151         * platform/graphics/FloatRoundedRect.cpp: Added.
2152         (WebCore::FloatRoundedRect::FloatRoundedRect):
2153         (WebCore::FloatRoundedRect::Radii::isZero):
2154         (WebCore::FloatRoundedRect::Radii::scale):
2155         (WebCore::FloatRoundedRect::Radii::expand):
2156         (WebCore::cornerRectIntercept):
2157         (WebCore::FloatRoundedRect::xInterceptsAtY):
2158         * platform/graphics/FloatRoundedRect.h: Added.
2159         (WebCore::FloatRoundedRect::Radii::Radii):
2160         (WebCore::FloatRoundedRect::Radii::setTopLeft):
2161         (WebCore::FloatRoundedRect::Radii::setTopRight):
2162         (WebCore::FloatRoundedRect::Radii::setBottomLeft):
2163         (WebCore::FloatRoundedRect::Radii::setBottomRight):
2164         (WebCore::FloatRoundedRect::Radii::topLeft):
2165         (WebCore::FloatRoundedRect::Radii::topRight):
2166         (WebCore::FloatRoundedRect::Radii::bottomLeft):
2167         (WebCore::FloatRoundedRect::Radii::bottomRight):
2168         (WebCore::FloatRoundedRect::Radii::expand):
2169         (WebCore::FloatRoundedRect::Radii::shrink):
2170         (WebCore::FloatRoundedRect::rect):
2171         (WebCore::FloatRoundedRect::radii):
2172         (WebCore::FloatRoundedRect::isRounded):
2173         (WebCore::FloatRoundedRect::isEmpty):
2174         (WebCore::FloatRoundedRect::setRect):
2175         (WebCore::FloatRoundedRect::setRadii):
2176         (WebCore::FloatRoundedRect::move):
2177         (WebCore::FloatRoundedRect::inflate):
2178         (WebCore::FloatRoundedRect::expandRadii):
2179         (WebCore::FloatRoundedRect::shrinkRadii):
2180         (WebCore::FloatRoundedRect::topLeftCorner):
2181         (WebCore::FloatRoundedRect::topRightCorner):
2182         (WebCore::FloatRoundedRect::bottomLeftCorner):
2183         (WebCore::FloatRoundedRect::bottomRightCorner):
2184         (WebCore::operator==):
2185         * rendering/shapes/BoxShape.cpp: Added.
2186         (WebCore::BoxShape::BoxShape):
2187         (WebCore::BoxShape::getExcludedIntervals):
2188         (WebCore::BoxShape::getIncludedIntervals):
2189         (WebCore::BoxShape::firstIncludedIntervalLogicalTop):
2190         * rendering/shapes/BoxShape.h: Added.
2191         * rendering/shapes/Shape.cpp:
2192         (WebCore::createBoxShape):
2193         (WebCore::Shape::createShape):
2194
2195 2013-11-20  Antti Koivisto  <antti@apple.com>
2196
2197         Simple line layout should support floats
2198         https://bugs.webkit.org/show_bug.cgi?id=124666
2199
2200         Reviewed by Dave Hyatt.
2201
2202         Tests: fast/text/simple-lines-float-compare.html
2203                fast/text/simple-lines-float.html
2204
2205         * rendering/line/LineWidth.h:
2206         (WebCore::LineWidth::logicalLeftOffset):
2207         
2208             Expose the left offset so we don't need to recompute it.
2209
2210         * rendering/SimpleLineLayout.cpp:
2211         (WebCore::SimpleLineLayout::canUseFor):
2212         (WebCore::SimpleLineLayout::computeLineLeft):
2213         
2214             Include the left offset from floats.
2215
2216         (WebCore::SimpleLineLayout::createTextRuns):
2217         
2218             Keep the flow height updated during the loop as LineWidth reads the current position from there.
2219
2220         * rendering/SimpleLineLayoutResolver.h:
2221         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
2222         (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
2223         (WebCore::SimpleLineLayout::RunResolver::RunResolver):
2224         (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
2225         
2226             We now bake the border and the padding to the line left offset. No need to add it during resolve.
2227
2228 2013-11-20  Alexey Proskuryakov  <ap@apple.com>
2229
2230         Use std::function callbacks in CryptoAlgorithm instead of JS promises
2231         https://bugs.webkit.org/show_bug.cgi?id=124673
2232
2233         Reviewed by Anders Carlsson.
2234
2235         To implement key wrapping/unwrapping, we'll need to chain existing operations.
2236         It's much easier to do with C++ callbacks than with functions fulfilling JS
2237         promises directly.
2238
2239         Also, this will decouple CryptoAlgorithm from JS, which is nice.
2240
2241         SubtleCrypto IDL says that all functions return Promise<any>, but in reality,
2242         there is very little polymorphism, the only function whose return type depends
2243         on algorithm is generateKey (it can create a Key or a KeyPair).
2244
2245         * bindings/js/JSDOMPromise.cpp:
2246         (WebCore::PromiseWrapper::PromiseWrapper):
2247         (WebCore::PromiseWrapper::operator=):
2248         * bindings/js/JSDOMPromise.h:
2249         Made it copyable, as each crypto function wraps the promise in success and failure
2250         functional objects now.
2251
2252         * bindings/js/JSSubtleCryptoCustom.cpp:
2253         (WebCore::JSSubtleCrypto::encrypt):
2254         (WebCore::JSSubtleCrypto::decrypt):
2255         (WebCore::JSSubtleCrypto::sign):
2256         (WebCore::JSSubtleCrypto::verify):
2257         (WebCore::JSSubtleCrypto::digest):
2258         (WebCore::JSSubtleCrypto::generateKey):
2259         (WebCore::JSSubtleCrypto::importKey):
2260         (WebCore::JSSubtleCrypto::exportKey):
2261         * crypto/CryptoAlgorithm.cpp:
2262         (WebCore::CryptoAlgorithm::encrypt):
2263         (WebCore::CryptoAlgorithm::decrypt):
2264         (WebCore::CryptoAlgorithm::sign):
2265         (WebCore::CryptoAlgorithm::verify):
2266         (WebCore::CryptoAlgorithm::digest):
2267         (WebCore::CryptoAlgorithm::generateKey):
2268         (WebCore::CryptoAlgorithm::deriveKey):
2269         (WebCore::CryptoAlgorithm::deriveBits):
2270         (WebCore::CryptoAlgorithm::importKey):
2271         * crypto/CryptoAlgorithm.h:
2272         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
2273         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
2274         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
2275         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2276         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
2277         (WebCore::CryptoAlgorithmAES_CBC::importKey):
2278         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
2279         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2280         (WebCore::CryptoAlgorithmHMAC::generateKey):
2281         (WebCore::CryptoAlgorithmHMAC::importKey):
2282         * crypto/algorithms/CryptoAlgorithmHMAC.h:
2283         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
2284         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
2285         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
2286         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
2287         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
2288         (WebCore::CryptoAlgorithmSHA1::digest):
2289         * crypto/algorithms/CryptoAlgorithmSHA1.h:
2290         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
2291         (WebCore::CryptoAlgorithmSHA224::digest):
2292         * crypto/algorithms/CryptoAlgorithmSHA224.h:
2293         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
2294         (WebCore::CryptoAlgorithmSHA256::digest):
2295         * crypto/algorithms/CryptoAlgorithmSHA256.h:
2296         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
2297         (WebCore::CryptoAlgorithmSHA384::digest):
2298         * crypto/algorithms/CryptoAlgorithmSHA384.h:
2299         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
2300         (WebCore::CryptoAlgorithmSHA512::digest):
2301         * crypto/algorithms/CryptoAlgorithmSHA512.h:
2302         * crypto/keys/CryptoKeyRSA.h:
2303         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
2304         (WebCore::transformAES_CBC):
2305         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
2306         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
2307         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
2308         (WebCore::CryptoAlgorithmHMAC::sign):
2309         (WebCore::CryptoAlgorithmHMAC::verify):
2310         * crypto/mac/CryptoKeyRSAMac.cpp:
2311         (WebCore::CryptoKeyRSA::generatePair):
2312
2313 2013-11-20  Robert Hogan  <robert@webkit.org>
2314
2315         REGRESSION(r127163): Respect clearance set on ancestors when placing floats
2316         https://bugs.webkit.org/show_bug.cgi?id=119979
2317
2318         Reviewed by David Hyatt.
2319
2320         Refactor the way self-collapsing blocks with clearance are positioned so that they
2321         get the correct logical-top position during margin-collapsing.
2322
2323         Test: fast/block/margin-collapse/self-collapsing-block-with-float-descendants.html
2324
2325         * rendering/RenderBlockFlow.cpp:
2326         (WebCore::RenderBlockFlow::clearFloats):
2327         (WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock):
2328         (WebCore::RenderBlockFlow::collapseMargins):
2329         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
2330         (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
2331         * rendering/RenderBlockFlow.h:
2332
2333 2013-11-20  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2334
2335         [GTK] Remove Chromium as user agent and claim to be Safari in OS X
2336         https://bugs.webkit.org/show_bug.cgi?id=124229
2337
2338         Reviewed by Martin Robinson.
2339
2340         http://www.duolingo.com/ doesn't get render correctly because it uses
2341         Chrome/Chromium specific variables, added after it was forked. Because
2342         of this, it is necessary to remove the Chrome/Chromium identification
2343         in the user agent. Also, from now on, by default, The GTK+ port will
2344         claim to be Safari in OS X to avoid loading wrong resources.
2345
2346         * platform/gtk/UserAgentGtk.cpp:
2347         (WebCore::standardUserAgent):
2348
2349 2013-11-20  Commit Queue  <commit-queue@webkit.org>
2350
2351         Unreviewed, rolling out r159551.
2352         http://trac.webkit.org/changeset/159551
2353         https://bugs.webkit.org/show_bug.cgi?id=124669
2354
2355         made many tests asserts (Requested by anttik on #webkit).
2356
2357         * html/HTMLDetailsElement.h:
2358         * html/HTMLMediaElement.cpp:
2359         (HTMLMediaElement::selectNextSourceChild):
2360         * html/HTMLMetaElement.h:
2361         * html/HTMLObjectElement.cpp:
2362         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
2363         * html/HTMLOptionElement.cpp:
2364         (WebCore::HTMLOptionElement::isDisabledFormControl):
2365         * html/HTMLPlugInImageElement.cpp:
2366         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
2367         * html/HTMLSummaryElement.cpp:
2368         (WebCore::HTMLSummaryElement::detailsElement):
2369         * html/HTMLSummaryElement.h:
2370         * html/HTMLTableCaptionElement.h:
2371         * html/HTMLTableElement.cpp:
2372         (WebCore::HTMLTableElement::caption):
2373         (WebCore::HTMLTableElement::tHead):
2374         (WebCore::HTMLTableElement::tFoot):
2375         (WebCore::HTMLTableElement::lastBody):
2376         * html/HTMLTableRowElement.cpp:
2377         (WebCore::HTMLTableRowElement::rowIndex):
2378         * html/HTMLTableSectionElement.h:
2379         * html/HTMLTagNames.in:
2380         * html/MediaDocument.cpp:
2381         (WebCore::MediaDocumentParser::createDocumentStructure):
2382         * html/shadow/DetailsMarkerControl.cpp:
2383         (WebCore::DetailsMarkerControl::summaryElement):
2384         * loader/FrameLoader.cpp:
2385         (WebCore::FrameLoader::handleFallbackContent):
2386         * loader/ImageLoader.cpp:
2387         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
2388         * page/DragController.cpp:
2389         (WebCore::DragController::canProcessDrag):
2390         * page/Frame.cpp:
2391         (WebCore::Frame::searchForLabelsBeforeElement):
2392         * page/SpatialNavigation.cpp:
2393         (WebCore::frameOwnerElement):
2394
2395 2013-11-20  Zoltan Horvath  <zoltan@webkit.org>
2396
2397         Move LineWidth.{h,cpp} into rendering/line
2398         <https://webkit.org/b/124448>
2399
2400         Reviewed by David Hyatt.
2401
2402         In r159354 I introduced line directory. Now it's time to move the helper classes of RenderBlockLineLayout into 'line' subdirectory.
2403
2404         No new tests, no behavior change.
2405
2406         * CMakeLists.txt:
2407         * GNUmakefile.list.am:
2408         * WebCore.vcxproj/WebCore.vcxproj:
2409         * WebCore.vcxproj/WebCore.vcxproj.filters:
2410         * WebCore.xcodeproj/project.pbxproj:
2411         * rendering/line/LineWidth.cpp: Renamed from Source/WebCore/rendering/LineWidth.cpp.
2412         (WebCore::LineWidth::LineWidth):
2413         (WebCore::LineWidth::fitsOnLine):
2414         (WebCore::LineWidth::fitsOnLineIncludingExtraWidth):
2415         (WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
2416         (WebCore::LineWidth::updateAvailableWidth):
2417         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2418         (WebCore::LineWidth::commit):
2419         (WebCore::LineWidth::applyOverhang):
2420         (WebCore::LineWidth::fitBelowFloats):
2421         (WebCore::LineWidth::setTrailingWhitespaceWidth):
2422         (WebCore::LineWidth::updateCurrentShapeSegment):
2423         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
2424         (WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
2425         * rendering/line/LineWidth.h: Renamed from Source/WebCore/rendering/LineWidth.h.
2426         (WebCore::LineWidth::currentWidth):
2427         (WebCore::LineWidth::uncommittedWidth):
2428         (WebCore::LineWidth::committedWidth):
2429         (WebCore::LineWidth::availableWidth):
2430         (WebCore::LineWidth::addUncommittedWidth):
2431         (WebCore::LineWidth::shouldIndentText):
2432
2433 2013-11-20  Brady Eidson  <beidson@apple.com>
2434
2435         Alphabetization followup to r159567
2436
2437         Reviewed by style-bot  :(
2438
2439         * Modules/indexeddb/IDBDatabaseBackend.h:
2440         * Modules/indexeddb/IDBIndex.h:
2441         * Modules/indexeddb/IDBObjectStore.h:
2442         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2443         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2444         * inspector/InspectorIndexedDBAgent.cpp:
2445
2446 2013-11-20  Brady Eidson  <beidson@apple.com>
2447
2448         Rename IDBMetadata.h to IDBDatabaseMetadata.h
2449         https://bugs.webkit.org/show_bug.cgi?id=124668
2450
2451         Reviewed by Dean Jackson.
2452
2453         * GNUmakefile.list.am:
2454         * WebCore.xcodeproj/project.pbxproj:
2455
2456         * Modules/indexeddb/IDBDatabase.h:
2457         * Modules/indexeddb/IDBDatabaseBackend.h:
2458
2459         * Modules/indexeddb/IDBDatabaseMetadata.h: Renamed from Source/WebCore/Modules/indexeddb/IDBMetadata.h.
2460         (WebCore::IDBIndexMetadata::IDBIndexMetadata):
2461         (WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata):
2462         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
2463
2464         * Modules/indexeddb/IDBIndex.h:
2465         * Modules/indexeddb/IDBObjectStore.h:
2466         * Modules/indexeddb/IDBServerConnection.h:
2467         * Modules/indexeddb/IDBTransaction.h:
2468         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2469         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2470         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h:
2471         * inspector/InspectorIndexedDBAgent.cpp:
2472
2473 2013-11-20  Ryosuke Niwa  <rniwa@webkit.org>
2474
2475         Remove bogus assertions in updateNameForTreeScope and updateNameForDocument
2476         https://bugs.webkit.org/show_bug.cgi?id=124639
2477
2478         Reviewed by Darin Adler.
2479
2480         Removed assertions. We can't assert that the element in a tree scope or a document
2481         since these two functions are called from removedFrom.
2482
2483         * dom/Element.cpp:
2484         (WebCore::Element::updateNameForTreeScope):
2485         (WebCore::Element::updateNameForDocument):
2486
2487 2013-11-20  Brady Eidson  <beidson@apple.com>
2488
2489         Cleanup getOrEstablishIDBDatabaseMetadata and stub it out in WK2
2490         https://bugs.webkit.org/show_bug.cgi?id=124635
2491
2492         Reviewed by Tim Horton.
2493
2494         getOrEstablishIDBDatabaseMetadata() should not have to take a database name parameter because the 
2495         server connection should already know what database name it represents.
2496
2497         * Modules/indexeddb/IDBDatabaseBackend.cpp:
2498         (WebCore::IDBDatabaseBackend::openInternalAsync):
2499
2500         * Modules/indexeddb/IDBServerConnection.h:
2501         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
2502         (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
2503         (WebCore::IDBServerConnectionLevelDB::getOrEstablishIDBDatabaseMetadata):
2504         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
2505
2506         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2507         (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
2508         (WebCore::IDBFactoryBackendLevelDB::open):
2509
2510 2013-11-20  Andrzej Badowski  <a.badowski@samsung.com>
2511
2512         [EFL] <video> and <audio> should be accessible.
2513         https://bugs.webkit.org/show_bug.cgi?id=124494
2514
2515         Reviewed by Gyuyoung Kim.
2516
2517         Adding descriptions of media-element controls.
2518
2519         * platform/efl/LocalizedStringsEfl.cpp:
2520         (WebCore::localizedMediaControlElementString):
2521
2522 2013-11-20  Antti Koivisto  <antti@apple.com>
2523
2524         Don't paint simple text runs outside the paint rect
2525         https://bugs.webkit.org/show_bug.cgi?id=124651
2526
2527         Reviewed by Anders Carlsson.
2528         
2529         This speeds up partial paints for long text paragraphs. 
2530         Also add the same optimization for hit testing.
2531
2532         * rendering/SimpleLineLayoutFunctions.cpp:
2533         (WebCore::SimpleLineLayout::paintFlow):
2534         
2535             Iterate over the run range that needs painting.
2536
2537         (WebCore::SimpleLineLayout::hitTestFlow):
2538         
2539             Iterate over the line range that needs painting.
2540
2541         * rendering/SimpleLineLayoutResolver.h:
2542         (WebCore::SimpleLineLayout::Range::Range):
2543         (WebCore::SimpleLineLayout::Range::begin):
2544         (WebCore::SimpleLineLayout::Range::end):
2545         
2546             Add Range type.
2547
2548         (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
2549         (WebCore::SimpleLineLayout::RunResolver::Iterator::operator++):
2550         (WebCore::SimpleLineLayout::RunResolver::Iterator::advance):
2551         (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
2552         
2553             Optimize case where runCount==lineCount. In this case we can just directly jump
2554             to the right run/line.
2555
2556         (WebCore::SimpleLineLayout::RunResolver::begin):
2557         (WebCore::SimpleLineLayout::RunResolver::end):
2558         (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
2559         (WebCore::SimpleLineLayout::RunResolver::rangeForRect):
2560         
2561             Get the range corresponding to a rect. This currently cares about y coordinates only.
2562
2563         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator++):
2564         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
2565         (WebCore::SimpleLineLayout::LineResolver::rangeForRect):
2566
2567 2013-11-20  Antoine Quint  <graouts@apple.com>
2568
2569         Cannot animate "points" attribute for <svg:polygon>
2570         https://bugs.webkit.org/show_bug.cgi?id=21371
2571
2572         Reviewed by Antti Koivisto.
2573
2574         Ensure we use animated list of points for SVG <polygon> and <polyline> elements
2575         when we build the path used to draw them, otherwise the animated changes won't
2576         be rendered and the base value will be used.
2577
2578         Tests: svg/animations/polygon-set.svg
2579                svg/animations/polyline-set.svg
2580
2581         * rendering/svg/SVGPathData.cpp:
2582         (WebCore::updatePathFromPolygonElement):
2583         (WebCore::updatePathFromPolylineElement):
2584
2585 2013-11-20  Andrei Bucur  <abucur@adobe.com>
2586
2587         [CSSRegions] Move region styling code into RenderNamedFlowFragment
2588         https://bugs.webkit.org/show_bug.cgi?id=122957
2589
2590         Reviewed by Mihnea Ovidenie.
2591
2592         The patch moves all the region styling functionality outside of RenderRegion
2593         to RenderNamedFlowFragment and outside of RenderFlowThread to RenderNamedFlowThread.
2594         This generates a couple of undesired casts that will be removed in later patches
2595         when everything CSS Regions specific will be located inside RenderNamedFlowThread
2596         and RenderNamedFlowFragment (e.g. the move of the isValid flag, the auto-height
2597         code etc.).
2598
2599         The painting function was also moved from RenderRegion to RenderNamedFlowFragment. It
2600         was only used by the CSS Regions code. The new multi-column implementation has its own
2601         painting mechanism.
2602
2603         Tests: No changed functionality, just refactorings.
2604
2605         * rendering/RenderFlowThread.cpp:
2606         (WebCore::RenderFlowThread::RenderFlowThread):
2607         (WebCore::RenderFlowThread::removeFlowChildInfo):
2608         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
2609         * rendering/RenderFlowThread.h:
2610         * rendering/RenderInline.cpp:
2611         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
2612         * rendering/RenderNamedFlowFragment.cpp:
2613         (WebCore::RenderNamedFlowFragment::RenderNamedFlowFragment):
2614         (WebCore::RenderNamedFlowFragment::styleDidChange):
2615         (WebCore::RenderNamedFlowFragment::checkRegionStyle):
2616         (WebCore::RenderNamedFlowFragment::computeStyleInRegion):
2617         (WebCore::RenderNamedFlowFragment::computeChildrenStyleInRegion):
2618         (WebCore::RenderNamedFlowFragment::setObjectStyleInRegion):
2619         (WebCore::RenderNamedFlowFragment::clearObjectStyleInRegion):
2620         (WebCore::RenderNamedFlowFragment::setRegionObjectsRegionStyle):
2621         (WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
2622         (WebCore::shouldPaintRegionContentsInPhase):
2623         (WebCore::RenderNamedFlowFragment::paintObject):
2624         * rendering/RenderNamedFlowFragment.h:
2625         * rendering/RenderNamedFlowThread.cpp:
2626         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
2627         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
2628         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
2629         (WebCore::RenderNamedFlowThread::removeFlowChildInfo):
2630         * rendering/RenderNamedFlowThread.h:
2631         * rendering/RenderRegion.cpp:
2632         (WebCore::RenderRegion::RenderRegion):
2633         (WebCore::RenderRegion::styleDidChange):
2634         (WebCore::RenderRegion::attachRegion):
2635         * rendering/RenderRegion.h:
2636         * rendering/RenderTreeAsText.cpp:
2637         (WebCore::writeRenderRegionList):
2638
2639 2013-11-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2640
2641         Generate toHTMLFooElement() to clean up static_cast<>
2642         https://bugs.webkit.org/show_bug.cgi?id=124571
2643
2644         Reviewed by Darin Adler.
2645
2646         Though there are a lot of clean up commits before, there are still
2647         use of static_cast<HTMLFooElement*>. To clean up them, we need to generate
2648         toHTMLDetails|Meta|Summary|TableSection|TableCaptionElement().
2649
2650         Additionally, other static_cast<> are removed as well.
2651
2652         No new tests, no behavior changes.
2653
2654         * html/HTMLDetailsElement.h:
2655         * html/HTMLMediaElement.cpp:
2656         (HTMLMediaElement::selectNextSourceChild):
2657         * html/HTMLMetaElement.h:
2658         * html/HTMLObjectElement.cpp:
2659         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
2660         * html/HTMLOptionElement.cpp:
2661         (WebCore::HTMLOptionElement::isDisabledFormControl):
2662         * html/HTMLPlugInImageElement.cpp:
2663         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
2664         * html/HTMLSummaryElement.cpp:
2665         (WebCore::HTMLSummaryElement::detailsElement):
2666         * html/HTMLSummaryElement.h:
2667         * html/HTMLTableCaptionElement.h:
2668         * html/HTMLTableElement.cpp:
2669         (WebCore::HTMLTableElement::caption):
2670         (WebCore::HTMLTableElement::tHead):
2671         (WebCore::HTMLTableElement::tFoot):
2672         (WebCore::HTMLTableElement::lastBody):
2673         * html/HTMLTableRowElement.cpp:
2674         (WebCore::HTMLTableRowElement::rowIndex):
2675         * html/HTMLTableSectionElement.h:
2676         * html/HTMLTagNames.in:
2677         * html/MediaDocument.cpp:
2678         (WebCore::MediaDocumentParser::createDocumentStructure):
2679         * html/shadow/DetailsMarkerControl.cpp:
2680         (WebCore::DetailsMarkerControl::summaryElement):
2681         * loader/FrameLoader.cpp:
2682         (WebCore::FrameLoader::handleFallbackContent):
2683         * loader/ImageLoader.cpp:
2684         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
2685         * page/DragController.cpp:
2686         (WebCore::DragController::canProcessDrag):
2687         * page/Frame.cpp:
2688         (WebCore::Frame::searchForLabelsBeforeElement):
2689         * page/SpatialNavigation.cpp:
2690         (WebCore::frameOwnerElement):
2691
2692 2013-11-19  Ryosuke Niwa  <rniwa@webkit.org>
2693
2694         Enable HTMLTemplateElement on Mac port
2695         https://bugs.webkit.org/show_bug.cgi?id=124637
2696
2697         Reviewed by Tim Horton.
2698
2699         Enabled the feature.
2700
2701         * Configurations/FeatureDefines.xcconfig:
2702
2703 2013-11-19  Jinwoo Song  <jinwoo7.song@samsung.com>
2704
2705         Remove unused member function declaration in DocumentOrderedMap.h
2706         https://bugs.webkit.org/show_bug.cgi?id=124629
2707
2708         Reviewed by Ryosuke Niwa.
2709
2710         checkConsistency() is not used anywhere.
2711
2712         * dom/DocumentOrderedMap.h:
2713
2714 2013-11-19  Seokju Kwon  <seokju@webkit.org>
2715
2716         Removal of redundant function call in Editor::insertTextWithoutSendingTextEvent
2717         https://bugs.webkit.org/show_bug.cgi?id=124563
2718
2719         Reviewed by Brent Fulgham.
2720
2721         No new tests needed, no behavior change.
2722
2723         * editing/Editor.cpp:
2724         (WebCore::Editor::insertTextWithoutSendingTextEvent):
2725
2726 2013-11-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2727
2728         Fix build break after r159533.
2729
2730         * CMakeLists.txt: Update ANGLE files.
2731
2732 2013-11-19  Zhuang Zhigang  <zhuangzg@cn.fujitsu.com>
2733
2734         Implement spin control on WinCE port.
2735         https://bugs.webkit.org/show_bug.cgi?id=123254
2736
2737         Reviewed by Brent Fulgham.
2738
2739         * rendering/RenderThemeWinCE.cpp:
2740         (WebCore::RenderThemeWinCE::adjustInnerSpinButtonStyle):
2741         (WebCore::RenderThemeWinCE::paintInnerSpinButton):
2742         * rendering/RenderThemeWinCE.h:
2743
2744 2013-11-19  Roger Fong  <roger_fong@apple.com>
2745
2746         Update ANGLE sources.
2747         https://bugs.webkit.org/show_bug.cgi?id=124615.
2748
2749         Reviewed by Dean Jackson.
2750
2751         Tests covered by Khronos WebGL conformance tests.
2752
2753         * platform/graphics/ANGLEWebKitBridge.cpp: Resolve a build error that resulted from updating ANGLE.
2754         (WebCore::getSymbolInfo):
2755         (WebCore::ANGLEWebKitBridge::compileShaderSource):
2756
2757 2013-11-19  Filip Pizlo  <fpizlo@apple.com>
2758
2759         Rename WatchpointSet::notifyWrite() should be renamed to WatchpointSet::fireAll()
2760         https://bugs.webkit.org/show_bug.cgi?id=124609
2761
2762         Rubber stamped by Mark Lam.
2763
2764         No new tests because no new behavior.
2765
2766         * bindings/scripts/CodeGeneratorJS.pm:
2767         (GenerateHeader):
2768         * bindings/scripts/test/JS/JSTestEventTarget.h:
2769         (WebCore::JSTestEventTarget::create):
2770
2771 2013-11-19  Bear Travis  <betravis@adobe.com>
2772
2773         [CSS Shapes] Parse [<box> || <shape>] values
2774         https://bugs.webkit.org/show_bug.cgi?id=124426
2775
2776         Reviewed by Dirk Schulze.
2777
2778         Shape values can now have an optional box specifying the coordinate sytem to use
2779         for sizing and positioning the shape. This patch adds the functionality to support
2780         parsing these new values.
2781
2782         * css/BasicShapeFunctions.cpp:
2783         (WebCore::valueForBox): Added function to convert between BasicShape::ReferenceBox
2784         and CSSPrimitiveValue (which wraps a CSSValueID).
2785         (WebCore::boxForValue): Ditto.
2786         (WebCore::valueForBasicShape): Translations between CSSBasicShape and BasicShape
2787         must now include the reference box.
2788         (WebCore::basicShapeForValue): Ditto.
2789         * css/BasicShapeFunctions.h:
2790         * css/CSSBasicShapes.cpp:
2791         (WebCore::buildRectangleString): Include the box in the built CSS string.
2792         (WebCore::CSSBasicShapeRectangle::cssText): Ditto.
2793         (WebCore::CSSBasicShapeRectangle::equals): Include the box in comparisions.
2794         (WebCore::buildCircleString):
2795         (WebCore::CSSBasicShapeCircle::cssText):
2796         (WebCore::CSSBasicShapeCircle::equals):
2797         (WebCore::buildEllipseString):
2798         (WebCore::CSSBasicShapeEllipse::cssText):
2799         (WebCore::CSSBasicShapeEllipse::equals):
2800         (WebCore::buildPolygonString):
2801         (WebCore::CSSBasicShapePolygon::cssText):
2802         (WebCore::CSSBasicShapePolygon::equals):
2803         (WebCore::buildInsetRectangleString):
2804         (WebCore::CSSBasicShapeInsetRectangle::cssText):
2805         (WebCore::CSSBasicShapeInsetRectangle::equals):
2806         * css/CSSBasicShapes.h:
2807         (WebCore::CSSBasicShape::box): BasicShapes now have an reference box.
2808         (WebCore::CSSBasicShape::setBox): Ditto.
2809         * css/CSSComputedStyleDeclaration.cpp:
2810         (WebCore::ComputedStyleExtractor::propertyValue): Shape-inside can also
2811         parse the box values.
2812         * css/CSSParser.cpp:
2813         (WebCore::CSSParser::parseValue): The shape properties use parseShapeProperty,
2814         while minor adjustments were made to parseBasicShape's return type.
2815         (WebCore::isBoxValue): Is the CSSValueID one of  the box values.
2816         (WebCore::CSSParser::parseShapeProperty): Parse one of the shape properties
2817         and return an appropriate CSSValue.
2818         (WebCore::CSSParser::parseBasicShape): Return a CSSBasicShape rather than
2819         adding a ShapeValue to the style.
2820         * css/CSSParser.h:
2821         * rendering/style/BasicShapes.h:
2822         (WebCore::BasicShape::box): Add a box to BasicShape and getters/setters.
2823         (WebCore::BasicShape::setBox): Ditto.
2824         (WebCore::BasicShape::BasicShape): Ditto.
2825
2826 2013-11-19  Jer Noble  <jer.noble@apple.com>
2827
2828         [Mac] 9 WebGL conformance failures after r159518.
2829         https://bugs.webkit.org/show_bug.cgi?id=124608
2830
2831         Reviewed by Dean Jackson.
2832
2833         Once we removed the CIImage drawing path, there was no longer any reason to flip the
2834         CGImageRef before drawing to the provided GraphicsContext.
2835
2836         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2837         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2838
2839 2013-11-19  Chris Fleizach  <cfleizach@apple.com>
2840
2841         Web Speech API crashes onboundary event handling with reload
2842         https://bugs.webkit.org/show_bug.cgi?id=124607
2843
2844         Reviewed by Tim Horton.
2845
2846         If the page goes away, we need to cleanup the Mac platform synthesizer object, because
2847         NSSpeechSynthesizer is retained elsewhere to handle the callbacks (so it doesn't automatically
2848         get torn down).
2849
2850         The layout tests for speech rely on a Mock synthesizer, so there is no good way to test this
2851         Mac platform specific behavior.       
2852
2853         * platform/mac/PlatformSpeechSynthesizerMac.mm:
2854         (-[WebSpeechSynthesisWrapper invalidate]):
2855         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
2856
2857 2013-11-19  Mark Lam  <mark.lam@apple.com>
2858
2859         Add tracking of endColumn for Executables.
2860         https://bugs.webkit.org/show_bug.cgi?id=124245.
2861
2862         Reviewed by Geoffrey Garen.
2863
2864         Test: js/dom/script-start-end-locations.html
2865
2866         * ForwardingHeaders/bytecode: Added.
2867         * ForwardingHeaders/bytecode/CodeBlock.h: Added.
2868         * WebCore.exp.in:
2869         * testing/Internals.cpp:
2870         (WebCore::GetCallerCodeBlockFunctor::GetCallerCodeBlockFunctor):
2871         (WebCore::GetCallerCodeBlockFunctor::operator()):
2872         (WebCore::GetCallerCodeBlockFunctor::codeBlock):
2873         (WebCore::Internals::parserMetaData):
2874         * testing/Internals.h:
2875         * testing/Internals.idl:
2876
2877 2013-11-15  Jer Noble  <jer.noble@apple.com>
2878
2879         [MSE] Support fastSeek() in MediaSource.
2880         https://bugs.webkit.org/show_bug.cgi?id=124422
2881
2882         Reviewed by Eric Carlson.
2883
2884         Test: media/media-source/media-source-fastseek.html
2885
2886         * Modules/mediasource/MediaSource.cpp:
2887         * Modules/mediasource/MediaSource.h:
2888
2889         Add support for "seek to the next fastest time" in MediaSource by
2890         returning the time of the nearest Sync sample.
2891
2892         Move the data structure logic out of SourceBuffer and into it's own
2893         class:
2894         * Modules/mediasource/SampleMap.cpp: Added.
2895         (WebCore::SampleIsLessThanMediaTimeComparator::operator()):
2896         (WebCore::SampleIsGreaterThanMediaTimeComparator::operator()):
2897         (WebCore::SampleIsRandomAccess::operator()):
2898         (WebCore::SamplePresentationTimeIsWithinRangeComparator::operator()):
2899         (WebCore::SampleMap::addSample):
2900         (WebCore::SampleMap::removeSample):
2901         (WebCore::SampleMap::findSampleContainingPresentationTime):
2902         (WebCore::SampleMap::findSampleAfterPresentationTime):
2903         (WebCore::SampleMap::findSampleWithDecodeTime):
2904         (WebCore::SampleMap::reverseFindSampleContainingPresentationTime):
2905         (WebCore::SampleMap::reverseFindSampleBeforePresentationTime):
2906         (WebCore::SampleMap::reverseFindSampleWithDecodeTime):
2907         (WebCore::SampleMap::findSyncSamplePriorToPresentationTime):
2908         (WebCore::SampleMap::findSyncSamplePriorToDecodeIterator):
2909         (WebCore::SampleMap::findSyncSampleAfterPresentationTime):
2910         (WebCore::SampleMap::findSyncSampleAfterDecodeIterator):
2911         (WebCore::SampleMap::findSamplesBetweenPresentationTimes):
2912         (WebCore::SampleMap::findDependentSamples):
2913         * Modules/mediasource/SampleMap.h: Added.
2914         (WebCore::SampleMap::presentationBegin):
2915         (WebCore::SampleMap::presentationEnd):
2916         (WebCore::SampleMap::decodeBegin):
2917         (WebCore::SampleMap::decodeEnd):
2918         (WebCore::SampleMap::reversePresentationBegin):
2919         (WebCore::SampleMap::reversePresentationEnd):
2920         (WebCore::SampleMap::reverseDecodeBegin):
2921         (WebCore::SampleMap::reverseDecodeEnd):
2922
2923         Add logic to find and return the time of the next & previous sync
2924         sample, within the threshold provided:
2925         * Modules/mediasource/SourceBuffer.cpp:
2926         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
2927         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
2928         (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime):
2929         (WebCore::SourceBuffer::appendBufferTimerFired):
2930         (WebCore::SourceBuffer::setActive):
2931         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2932         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
2933         (WebCore::SourceBuffer::provideMediaData):
2934         * Modules/mediasource/SourceBuffer.h:
2935         * platform/graphics/SourceBufferPrivate.h:
2936         (WebCore::SourceBufferPrivate::setActive):
2937         * platform/graphics/SourceBufferPrivateClient.h:
2938         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateFastSeekTimeForMediaTime):
2939         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateSeekToTime):
2940
2941         Add new files to the project:
2942         * WebCore.xcodeproj/project.pbxproj:
2943
2944         Drive-by fixes in HTMLMediaElement:
2945         * html/HTMLMediaSource.h:
2946         * html/HTMLMediaElement.cpp:
2947         (HTMLMediaElement::finishSeek): Cause the MediaSource to check the ready state of all its buffers.
2948         (HTMLMediaElement::selectNextSourceChild): Pass in whether the source element has a MediaSource URL.
2949
2950         Implement the seekWithTolerance behavior in MockMediaPlayerMediaSource:
2951         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
2952         (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble):
2953         (WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
2954         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
2955         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
2956         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
2957         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
2958         (WebCore::MockMediaSourcePrivate::seekToTime):
2959         * platform/mock/mediasource/MockMediaSourcePrivate.h:
2960         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2961         (WebCore::MockMediaSample::flags):
2962         (WebCore::MockSourceBufferPrivate::setActive):
2963         (WebCore::MockSourceBufferPrivate::fastSeekTimeForMediaTime):
2964         (WebCore::MockSourceBufferPrivate::seekToTime):
2965         * platform/mock/mediasource/MockSourceBufferPrivate.h:
2966
2967 2013-11-19  Jer Noble  <jer.noble@apple.com>
2968
2969         [Mac] 10X slower than Chrome when drawing a video into a canvas
2970         https://bugs.webkit.org/show_bug.cgi?id=124599
2971
2972         Reviewed by Dean Jackson.
2973
2974         Improve performance by creating a CGImageRef which directly references the CVPixelBuffer provided
2975         by AVPlayerItemVideoOutput:
2976         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2977         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2978         (WebCore::CVPixelBufferGetBytePointerCallback):
2979         (WebCore::CVPixelBufferReleaseBytePointerCallback):
2980         (WebCore::CVPixelBufferReleaseInfoCallback):
2981         (WebCore::createImageFromPixelBuffer):
2982         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage):
2983
2984         Additionally, when asked to paint with an AVPlayerItemVideoOutput, block until the output notifies
2985         its delegate that a pixel buffer is available:
2986         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2987         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2988         (WebCore::globalPullDelegateQueue):
2989         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
2990         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
2991         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2992         (WebCore::MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime):
2993         (WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange):
2994         (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
2995         (-[WebCoreAVFPullDelegate initWithCallback:]):
2996         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
2997         (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
2998         
2999         To further optimize video -> canvas drawing, add a method which can return a PassNativeImage to be
3000         drawn directly onto the canvas, rather than rendering into an intermediary context:
3001         * html/HTMLVideoElement.cpp:
3002         (WebCore::HTMLVideoElement::nativeImageForCurrentTime):
3003         * html/HTMLVideoElement.h:
3004         * html/canvas/CanvasRenderingContext2D.cpp:
3005         (WebCore::CanvasRenderingContext2D::drawImage):
3006         * platform/graphics/MediaPlayer.cpp:
3007         (WebCore::MediaPlayer::nativeImageForCurrentTime):
3008         * platform/graphics/MediaPlayer.h:
3009         * platform/graphics/MediaPlayerPrivate.h:
3010         (WebCore::MediaPlayerPrivateInterface::nativeImageForCurrentTime):
3011
3012 2013-11-19  Brady Eidson  <beidson@apple.com>
3013
3014         Consolidate IDBBackingStore*Interface and IDBBackingStore*LevelDB
3015         https://bugs.webkit.org/show_bug.cgi?id=124597
3016
3017         Reviewed by Alexey Proskuryakov.
3018
3019         The Interface abstraction doesn’t make sense anymore, as LevelDB will be the only implementor.
3020
3021         * Modules/indexeddb/IDBBackingStoreCursorInterface.h: Removed.
3022         * Modules/indexeddb/IDBBackingStoreInterface.h: Removed.
3023         * Modules/indexeddb/IDBBackingStoreTransactionInterface.h: Removed.
3024
3025         * Modules/indexeddb/IDBServerConnection.h:
3026
3027         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h:
3028         (WebCore::IDBBackingStoreCursorLevelDB::key):
3029         (WebCore::IDBBackingStoreCursorLevelDB::primaryKey):
3030         (WebCore::IDBBackingStoreCursorLevelDB::recordIdentifier):
3031
3032         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3033         (WebCore::IDBBackingStoreLevelDB::getOrEstablishIDBDatabaseMetadata):
3034         (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
3035         (WebCore::IDBBackingStoreLevelDB::deleteDatabase):
3036         (WebCore::IDBBackingStoreLevelDB::createObjectStore):
3037         (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
3038         (WebCore::IDBBackingStoreLevelDB::getRecord):
3039         (WebCore::IDBBackingStoreLevelDB::putRecord):
3040         (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
3041         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
3042         (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
3043         (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
3044         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
3045         (WebCore::IDBBackingStoreLevelDB::createIndex):
3046         (WebCore::IDBBackingStoreLevelDB::deleteIndex):
3047         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
3048         (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
3049         (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
3050         (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
3051         (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
3052         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
3053         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
3054         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
3055         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
3056         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3057
3058         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
3059         (WebCore::IDBBackingStoreTransactionLevelDB::levelDBTransactionFrom):
3060
3061         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp:
3062         (WebCore::IDBIndexWriterLevelDB::writeIndexKeys):
3063         (WebCore::IDBIndexWriterLevelDB::verifyIndexKeys):
3064         (WebCore::IDBIndexWriterLevelDB::addingKeyAllowed):
3065         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h:
3066
3067         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
3068         (WebCore::IDBServerConnectionLevelDB::get):
3069         (WebCore::IDBServerConnectionLevelDB::openCursor):
3070         (WebCore::IDBServerConnectionLevelDB::count):
3071         (WebCore::IDBServerConnectionLevelDB::deleteRange):
3072
3073         * WebCore.xcodeproj/project.pbxproj:
3074
3075 2013-11-19  Sergio Correia  <sergio.correia@openbossa.org>
3076
3077         Get rid of bare new in SVGAnimatedColorAnimator::constructFromString()
3078         https://bugs.webkit.org/show_bug.cgi?id=124595
3079
3080         Reviewed by Darin Adler.
3081
3082         Use std::unique_ptr instead, to manage the arguments passed to the create
3083         methods of SVGAnimatedType.
3084
3085         No new tests, covered by existing tests.
3086
3087         * svg/SVGAnimatedAngle.cpp:
3088         (WebCore::SVGAnimatedAngleAnimator::constructFromString): Replace bare
3089         pointer with std::unique_ptr.
3090         * svg/SVGAnimatedBoolean.cpp:
3091         (WebCore::SVGAnimatedBooleanAnimator::constructFromString): Ditto.
3092         * svg/SVGAnimatedColor.cpp:
3093         (WebCore::SVGAnimatedColorAnimator::constructFromString): Ditto.
3094         * svg/SVGAnimatedEnumeration.cpp:
3095         (WebCore::SVGAnimatedEnumerationAnimator::constructFromString): Ditto.
3096         * svg/SVGAnimatedInteger.cpp:
3097         (WebCore::SVGAnimatedIntegerAnimator::constructFromString): Ditto.
3098         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
3099         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString):
3100         Ditto.
3101         * svg/SVGAnimatedLength.cpp:
3102         (WebCore::SVGAnimatedLengthAnimator::constructFromString): Ditto.
3103         * svg/SVGAnimatedLengthList.cpp:
3104         (WebCore::SVGAnimatedLengthListAnimator::constructFromString): Ditto.
3105         * svg/SVGAnimatedNumber.cpp:
3106         (WebCore::SVGAnimatedNumberAnimator::constructFromString): Ditto.
3107         * svg/SVGAnimatedNumberList.cpp:
3108         (WebCore::SVGAnimatedNumberListAnimator::constructFromString): Ditto.
3109         * svg/SVGAnimatedNumberOptionalNumber.cpp:
3110         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString):
3111         Ditto.
3112         * svg/SVGAnimatedPointList.cpp:
3113         (WebCore::SVGAnimatedPointListAnimator::constructFromString): Ditto.
3114         * svg/SVGAnimatedPreserveAspectRatio.cpp:
3115         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString):
3116         Ditto.
3117         * svg/SVGAnimatedRect.cpp:
3118         (WebCore::SVGAnimatedRectAnimator::constructFromString): Ditto.
3119         * svg/SVGAnimatedString.cpp:
3120         (WebCore::SVGAnimatedStringAnimator::constructFromString): Ditto.
3121         * svg/SVGAnimatedTransformList.cpp:
3122         (WebCore::SVGAnimatedTransformListAnimator::constructFromString):
3123         Ditto.
3124         * svg/SVGAnimatedType.cpp:
3125         (WebCore::SVGAnimatedType::createAngleAndEnumeration): Use
3126         std::unique_ptr instead of bare pointer as parameter.
3127         (WebCore::SVGAnimatedType::createBoolean): Ditto.
3128         (WebCore::SVGAnimatedType::createColor): Ditto.
3129         (WebCore::SVGAnimatedType::createEnumeration): Ditto.
3130         (WebCore::SVGAnimatedType::createInteger): Ditto.
3131         (WebCore::SVGAnimatedType::createIntegerOptionalInteger): Ditto.
3132         (WebCore::SVGAnimatedType::createLength): Ditto.
3133         (WebCore::SVGAnimatedType::createLengthList): Ditto.
3134         (WebCore::SVGAnimatedType::createNumber): Ditto.
3135         (WebCore::SVGAnimatedType::createNumberList): Ditto.
3136         (WebCore::SVGAnimatedType::createNumberOptionalNumber): Ditto.
3137         (WebCore::SVGAnimatedType::createPointList): Ditto.
3138         (WebCore::SVGAnimatedType::createPreserveAspectRatio): Ditto.
3139         (WebCore::SVGAnimatedType::createRect): Ditto.
3140         (WebCore::SVGAnimatedType::createString): Ditto.
3141         (WebCore::SVGAnimatedType::createTransformList): Ditto.
3142         * svg/SVGAnimatedType.h: Use std::unique_ptr as parameter in the
3143         create methods.
3144         * svg/SVGAnimatedTypeAnimator.h:
3145         (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValue): Make
3146         helper return std::unique_ptr instead of bare pointer.
3147         (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValues): Ditto.
3148
3149 2013-11-19  Hans Muller  <hmuller@adobe.com>
3150
3151         [CSS Shapes] Refactor RectangleShape
3152         https://bugs.webkit.org/show_bug.cgi?id=124416
3153
3154         Privatize and rename the FloatRoundedRect class defined in RectangleShape.h.
3155         The new class is called RectangleShape::ShapeBounds. This change enables
3156         creating a proper FloatRoundedRect analog of the existing RoundedRect class;
3157         part of adding support for box shapes, per the latest CSS spec.
3158
3159         Reviewed by Dean Jackson.
3160
3161         No new tests, just refactoring.
3162
3163         * rendering/shapes/RectangleShape.cpp:
3164         (WebCore::RectangleShape::ShapeBounds::paddingBounds):
3165         (WebCore::RectangleShape::ShapeBounds::marginBounds):
3166         (WebCore::RectangleShape::ShapeBounds::cornerInterceptForWidth):
3167         (WebCore::RectangleShape::shapePaddingBounds):
3168         (WebCore::RectangleShape::shapeMarginBounds):
3169         (WebCore::RectangleShape::getExcludedIntervals):
3170         (WebCore::RectangleShape::getIncludedIntervals):
3171         (WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
3172         * rendering/shapes/RectangleShape.h:
3173         (WebCore::RectangleShape::ShapeBounds::ShapeBounds):
3174         (WebCore::RectangleShape::ShapeBounds::rx):
3175         (WebCore::RectangleShape::ShapeBounds::ry):
3176
3177 2013-11-19  Sergio Correia  <sergio.correia@openbossa.org>
3178
3179         Mark classes deriving from SVGAnimatedTypeAnimator as FINAL
3180         https://bugs.webkit.org/show_bug.cgi?id=124456
3181
3182         Reviewed by Darin Adler.
3183
3184         Also add OVERRIDE to their virtual methods appropriately and remove
3185         existing empty virtual destructors.
3186
3187         No new tests, covered by existing ones.
3188
3189         * svg/SVGAnimatedAngle.h:
3190         * svg/SVGAnimatedBoolean.h:
3191         * svg/SVGAnimatedColor.h:
3192         * svg/SVGAnimatedEnumeration.h:
3193         * svg/SVGAnimatedInteger.h:
3194         * svg/SVGAnimatedIntegerOptionalInteger.h:
3195         * svg/SVGAnimatedLength.h:
3196         * svg/SVGAnimatedLengthList.h:
3197         * svg/SVGAnimatedNumber.h:
3198         * svg/SVGAnimatedNumberList.h:
3199         * svg/SVGAnimatedNumberOptionalNumber.h:
3200         * svg/SVGAnimatedPath.h:
3201         * svg/SVGAnimatedPointList.h:
3202         * svg/SVGAnimatedPreserveAspectRatio.h:
3203         * svg/SVGAnimatedRect.h:
3204         * svg/SVGAnimatedString.h:
3205         * svg/SVGAnimatedTransformList.h:
3206
3207 2013-11-19  Brady Eidson  <beidson@apple.com>
3208
3209         Add WebIDBServerConnection and DatabaseProcessIDBConnection stubs
3210         https://bugs.webkit.org/show_bug.cgi?id=124562
3211
3212         Reviewed by Alexey Proskuryakov.
3213
3214         Export some more symbols and headers for WK2 to use.
3215
3216         * WebCore.exp.in:
3217         * WebCore.xcodeproj/project.pbxproj:
3218
3219 2013-11-19  Frédéric Wang  <fred.wang@free.fr>
3220
3221         Map the dir attribute to the CSS direction property.
3222         https://bugs.webkit.org/show_bug.cgi?id=124572.
3223
3224         Reviewed by Darin Adler.
3225
3226         Tests: mathml/presentation/direction-overall.html
3227                mathml/presentation/direction-token.html
3228                mathml/presentation/direction.html
3229
3230         * mathml/MathMLElement.cpp:
3231         (WebCore::MathMLElement::isPresentationAttribute): add dir
3232         (WebCore::MathMLElement::collectStyleForPresentationAttribute): map dir
3233         * mathml/mathattrs.in: add the dir attribute
3234         * mathml/mathtags.in: add the mstyle tag (needed to use mstyleTag)
3235
3236 2013-11-19  Sergio Correia  <sergio.correia@openbossa.org>
3237
3238         [SVG] Convert OwnPtr/PassOwnPtr to std::unique_ptr
3239         https://bugs.webkit.org/show_bug.cgi?id=124382
3240
3241         Reviewed by Darin Adler.
3242
3243         The files modified are mostly under WebCore/svg/; in a few cases, some
3244         "external" files needed changes as well.
3245
3246         No new tests, covered by existing ones.
3247
3248         * css/CSSFontFaceSource.cpp:
3249         * loader/cache/CachedImage.cpp:
3250         * loader/cache/CachedImage.h:
3251         * platform/graphics/SimpleFontData.cpp:
3252         * platform/graphics/SimpleFontData.h:
3253         * rendering/svg/RenderSVGResourceContainer.cpp:
3254         * svg/SVGAnimateElement.cpp:
3255         * svg/SVGAnimateElement.h:
3256         * svg/SVGAnimatedAngle.cpp:
3257         * svg/SVGAnimatedAngle.h:
3258         * svg/SVGAnimatedBoolean.cpp:
3259         * svg/SVGAnimatedBoolean.h:
3260         * svg/SVGAnimatedColor.cpp:
3261         * svg/SVGAnimatedColor.h:
3262         * svg/SVGAnimatedEnumeration.cpp:
3263         * svg/SVGAnimatedEnumeration.h:
3264         * svg/SVGAnimatedInteger.cpp:
3265         * svg/SVGAnimatedInteger.h:
3266         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
3267         * svg/SVGAnimatedIntegerOptionalInteger.h:
3268         * svg/SVGAnimatedLength.cpp:
3269         * svg/SVGAnimatedLength.h:
3270         * svg/SVGAnimatedLengthList.cpp:
3271         * svg/SVGAnimatedLengthList.h:
3272         * svg/SVGAnimatedNumber.cpp:
3273         * svg/SVGAnimatedNumber.h:
3274         * svg/SVGAnimatedNumberList.cpp:
3275         * svg/SVGAnimatedNumberList.h:
3276         * svg/SVGAnimatedNumberOptionalNumber.cpp:
3277         * svg/SVGAnimatedNumberOptionalNumber.h:
3278         * svg/SVGAnimatedPath.cpp:
3279         * svg/SVGAnimatedPath.h:
3280         * svg/SVGAnimatedPointList.cpp:
3281         * svg/SVGAnimatedPointList.h:
3282         * svg/SVGAnimatedPreserveAspectRatio.cpp:
3283         * svg/SVGAnimatedPreserveAspectRatio.h:
3284         * svg/SVGAnimatedRect.cpp:
3285         * svg/SVGAnimatedRect.h:
3286         * svg/SVGAnimatedString.cpp:
3287         * svg/SVGAnimatedString.h:
3288         * svg/SVGAnimatedTransformList.cpp:
3289         * svg/SVGAnimatedTransformList.h:
3290         * svg/SVGAnimatedType.cpp:
3291         * svg/SVGAnimatedType.h:
3292         * svg/SVGAnimatedTypeAnimator.cpp:
3293         * svg/SVGAnimatedTypeAnimator.h:
3294         * svg/SVGAnimatorFactory.h:
3295         * svg/SVGDocumentExtensions.cpp:
3296         * svg/SVGDocumentExtensions.h:
3297         * svg/SVGFontData.h:
3298         * svg/SVGFontElement.cpp:
3299         * svg/SVGFontElement.h:
3300         * svg/SVGGraphicsElement.cpp:
3301         * svg/SVGGraphicsElement.h:
3302         * svg/SVGPathByteStreamSource.h:
3303         * svg/SVGPathParser.h:
3304         * svg/SVGPathSegListSource.h:
3305         * svg/SVGPathStringSource.h:
3306         * svg/SVGPathUtilities.cpp:
3307         * svg/SVGPathUtilities.h:
3308         * svg/animation/SMILTimeContainer.cpp:
3309         * svg/animation/SMILTimeContainer.h:
3310         * svg/graphics/SVGImage.cpp:
3311         * svg/graphics/SVGImage.h:
3312         * svg/graphics/SVGImageCache.h:
3313         * svg/properties/SVGAttributeToPropertyMap.cpp:
3314         * svg/properties/SVGAttributeToPropertyMap.h:
3315
3316 2013-11-19  Zoltan Horvath  <zoltan@webkit.org>
3317
3318         Add LineInlineHeaders.h to WebCore.xcodeproj
3319         <https://webkit.org/b/124460>
3320
3321         Reviewed by Csaba Osztrogonác.
3322
3323         LineInlineHeaders.h (r159354) hasn't been added to WebCore.xcodeproj. This patch adds to it.
3324
3325         No new tests, no behavior change.
3326
3327         * WebCore.xcodeproj/project.pbxproj:
3328
3329 2013-11-19  Krzysztof Czech  <k.czech@samsung.com>
3330
3331         [AX] Use std::unique_ptr to manage AXComputedObjectAttributeCache
3332         https://bugs.webkit.org/show_bug.cgi?id=124404
3333
3334         Reviewed by Mario Sanchez Prada.
3335
3336         Convert OwnPtr/PassOwnPtr to std::unique_ptr.
3337
3338         * accessibility/AXObjectCache.cpp:
3339         (WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates):
3340         (WebCore::AXObjectCache::stopCachingComputedObjectAttributes):
3341         * accessibility/AXObjectCache.h:
3342         (WebCore::AXComputedObjectAttributeCache::AXComputedObjectAttributeCache):
3343
3344 2013-11-19  Ryosuke Niwa  <rniwa@webkit.org>
3345
3346         Add more assertions with security implications in DocumentOrderedMap
3347         https://bugs.webkit.org/show_bug.cgi?id=124559
3348
3349         Reviewed by Antti Koivisto.
3350
3351         Assert that newly added elements and existing elements in the document ordered map are in the same tree scope
3352         as the document ordered map. Also exit early if we're about to add an element in a wrong document to the map.
3353         We don't exit early in get() because the damage has already been done at that point (the element may have been
3354         deleted already).
3355
3356         * dom/Document.cpp:
3357         (WebCore::Document::addImageElementByLowercasedUsemap):
3358         * dom/DocumentOrderedMap.cpp:
3359         (WebCore::DocumentOrderedMap::add): Assert that the newly added element is in the current tree scope.
3360         Also exit early if either the element is not in the tree scope or not in the right document.
3361         While this doesn't make the function completely fault safe, it'll catch when we try to add a detached node.
3362         (WebCore::DocumentOrderedMap::remove): Convert existing assertions to ones with security implication.
3363         (WebCore::DocumentOrderedMap::get): Assert with security implication that the element we're about to return
3364         is in the current tree scope. The element may have already been deleted if we ever hit these assertions.
3365         (WebCore::DocumentOrderedMap::getAllElementsById):  Convert an existing assertion to an assertion with security
3366         implication.
3367         * dom/DocumentOrderedMap.h:
3368         * dom/TreeScope.cpp:
3369         (WebCore::TreeScope::addElementById):
3370         (WebCore::TreeScope::addElementByName):
3371         (WebCore::TreeScope::addImageMap):
3372         (WebCore::TreeScope::addLabel):
3373         * html/HTMLDocument.cpp:
3374         (WebCore::HTMLDocument::addDocumentNamedItem):
3375         (WebCore::HTMLDocument::addWindowNamedItem):
3376         * html/HTMLImageElement.cpp:
3377         (WebCore::HTMLImageElement::insertedInto): Set InTreeScope flag before calling addImageElementByLowercasedUsemap.
3378         * html/HTMLMapElement.cpp:
3379         (WebCore::HTMLMapElement::insertedInto): Ditto for addImageMap.
3380
3381 2013-11-18  Commit Queue  <commit-queue@webkit.org>
3382
3383         Unreviewed, rolling out r159455.
3384         http://trac.webkit.org/changeset/159455
3385         https://bugs.webkit.org/show_bug.cgi?id=124568
3386
3387         broke two api tests (see bug 124564) (Requested by thorton on
3388         #webkit).
3389
3390         * CMakeLists.txt:
3391         * GNUmakefile.list.am:
3392         * WebCore.exp.in:
3393         * WebCore.vcxproj/WebCore.vcxproj:
3394         * WebCore.vcxproj/WebCore.vcxproj.filters:
3395         * WebCore.xcodeproj/project.pbxproj:
3396         * bindings/objc/DOM.mm:
3397         (-[DOMNode renderedImage]):
3398         (-[DOMRange renderedImageForcingBlackText:]):
3399         * dom/Clipboard.cpp:
3400         (WebCore::Clipboard::createDragImage):
3401         * dom/ClipboardMac.mm:
3402         (WebCore::Clipboard::createDragImage):
3403         * page/DragController.cpp:
3404         (WebCore::DragController::startDrag):
3405         * page/Frame.cpp:
3406         (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
3407         (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
3408         (WebCore::Frame::nodeImage):
3409         (WebCore::Frame::dragImageForSelection):
3410         * page/Frame.h:
3411         * page/FrameSnapshotting.cpp: Removed.
3412         * page/FrameSnapshotting.h: Removed.
3413         * page/mac/FrameMac.mm: Copied from Source/WebCore/page/win/FrameWin.h.
3414         (WebCore::Frame::nodeImage):
3415         (WebCore::Frame::dragImageForSelection):
3416         * page/mac/FrameSnapshottingMac.h: Copied from Source/WebCore/page/win/FrameWin.h.
3417         * page/mac/FrameSnapshottingMac.mm: Added.
3418         (WebCore::imageFromRect):
3419         (WebCore::selectionImage):
3420         (WebCore::rangeImage):
3421         (WebCore::snapshotDragImage):
3422         * page/win/FrameWin.cpp:
3423         (WebCore::Frame::dragImageForSelection):
3424         (WebCore::Frame::nodeImage):
3425         * page/win/FrameWin.h:
3426         * platform/DragImage.cpp:
3427         (WebCore::fitDragImageToMaxSize):
3428         (WebCore::createDragImageForLink):
3429         * platform/DragImage.h:
3430
3431 2013-11-18  Mark Rowe  <mrowe@apple.com>
3432
3433         Use hw.activecpu for determining how many processes to spawn.
3434
3435         It's documented as the preferred way to determine the number of threads
3436         or processes to create in a SMP aware application.
3437
3438         Rubber-stamped by Tim Horton.
3439
3440         * WebCore.xcodeproj/project.pbxproj:
3441
3442 2013-11-18  Samuel White  <samuel_white@apple.com>
3443
3444         AX: aria-labelledby should be used in preference to aria-labeledby
3445         https://bugs.webkit.org/show_bug.cgi?id=62351
3446
3447         Reviewed by Chris Fleizach.
3448
3449         Making sure aria-labelled by overrides the incorrectly spelled aria-labeledby attribute.
3450
3451         Test: accessibility/aria-labelledby-overrides-aria-labeledby.html
3452
3453         * accessibility/AccessibilityNodeObject.cpp:
3454         (WebCore::AccessibilityNodeObject::ariaLabeledByElements):
3455
3456 2013-11-18  Zalan Bujtas  <zalan@apple.com>
3457
3458         use after free in WebCore::DocumentOrderedMap::remove / WebCore::TreeScope::removeElementById
3459         https://bugs.webkit.org/show_bug.cgi?id=121324
3460
3461         Reviewed by Ryosuke Niwa.
3462
3463         Update the document ordered map for an image element before dispatching load or error events
3464         when it's inserted into a document.
3465
3466         Test: fast/dom/modify-node-and-while-in-the-callback-too-crash.html
3467
3468         * dom/DocumentOrderedMap.cpp: defensive fix to avoid use after free issues.
3469         (WebCore::DocumentOrderedMap::remove):
3470         * html/HTMLImageElement.cpp:
3471         (WebCore::HTMLImageElement::insertedInto):
3472         * loader/ImageLoader.cpp:
3473         (WebCore::ImageLoader::updateFromElement): setting m_failedLoadURL makes
3474         repeated updateFromElement calls return early.
3475
3476 2013-11-18  Benjamin Poulain  <bpoulain@apple.com>
3477
3478         Upstream iOS's ResourceHandle implementation
3479         https://bugs.webkit.org/show_bug.cgi?id=124554
3480
3481         Reviewed by Sam Weinig.
3482
3483         * platform/network/ResourceHandle.h:
3484         (WebCore::ResourceHandle::quickLookHandle):
3485         (WebCore::ResourceHandle::setQuickLookHandle):
3486         * platform/network/ResourceHandleClient.h:
3487         (WebCore::ResourceHandleClient::connectionProperties):
3488         (WebCore::ResourceHandleClient::shouldCacheResponse):
3489         * platform/network/ResourceHandleInternal.h:
3490         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
3491         * platform/network/cf/ResourceHandleCFNet.cpp:
3492         (WebCore::synthesizeRedirectResponseIfNecessary):
3493         (WebCore::willSendRequest):
3494         (WebCore::didReceiveResponse):
3495         (WebCore::didReceiveDataArray):
3496         (WebCore::didReceiveData):
3497         (WebCore::didFinishLoading):
3498         (WebCore::didFail):
3499         (WebCore::willCacheResponse):
3500         (WebCore::canRespondToProtectionSpace):
3501         (WebCore::ResourceHandle::createCFURLConnection):
3502         (WebCore::ResourceHandle::start):
3503         (WebCore::ResourceHandle::willSendRequest):
3504         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
3505         (WebCore::ResourceHandle::currentRequest):
3506         (WebCore::ResourceHandle::connectionClientCallbacks):
3507
3508 2013-11-18  Commit Queue  <commit-queue@webkit.org>
3509
3510         Unreviewed, rolling out r159430.
3511         http://trac.webkit.org/changeset/159430
3512         https://bugs.webkit.org/show_bug.cgi?id=124548
3513
3514         WebCore can know nothing about nor use files from WebKit/
3515         (Requested by thorton on #webkit).
3516
3517         * DerivedSources.make:
3518
3519 2013-11-18  Brady Eidson  <beidson@apple.com>
3520
3521         Remove IDBServerConnection's deprecatedBackingStore()
3522         https://bugs.webkit.org/show_bug.cgi?id=124547
3523
3524         Reviewed by Tim Horton.
3525
3526         It is no longer needed, as the front end no longer knows about the backing store.
3527
3528         * Modules/indexeddb/IDBServerConnection.h:
3529
3530         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
3531         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
3532
3533 2013-11-18  Samuel White  <samuel_white@apple.com>
3534
3535         AX: Add ability to fetch only visible table rows.
3536         https://bugs.webkit.org/show_bug.cgi?id=124430
3537
3538         Reviewed by Chris Fleizach.
3539
3540         Adding AccessibilityTable::visibleRows method to support AXVisibleRows attribute mac platform.
3541
3542         Test: platform/mac/accessibility/table-visible-rows.html
3543
3544         * accessibility/AccessibilityTable.cpp:
3545         (WebCore::AccessibilityTable::columnHeaders):
3546         (WebCore::AccessibilityTable::rowHeaders):
3547         (WebCore::AccessibilityTable::visibleRows):
3548         * accessibility/AccessibilityTable.h:
3549         * accessibility/AccessibilityTableRow.h:
3550         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3551         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3552
3553 2013-11-18  Simon Fraser  <simon.fraser@apple.com>
3554
3555         At some scales, opaque compositing layers have garbage pixels around the edges
3556         https://bugs.webkit.org/show_bug.cgi?id=124541
3557
3558         Reviewed by Dean Jackson.
3559         
3560         Layers get marked as having opaque contents when their background is
3561         known to paint the entire layer. However, this failed to take into
3562         account two reasons why every pixel may not get painted.
3563         
3564         First, subpixel layout can result in non-integral RenderLayer
3565         bounds, which will get rounded up to an integral GraphicsLayer
3566         size. When this happens we may not paint edge pixels.
3567         
3568         Second, at non-integral scale factors, graphics context scaling
3569         may cause us to not paint edge pixels.
3570         
3571         Fix by only marking PlatformCALayers as having opaque contents
3572         when the contentsScale of the layer is integral.
3573
3574         Not testable, because we can't guarantee to get garbage pixels
3575         in a ref test, and layer dumps show GraphicsLayer's notion of
3576         content opaqueness, not the one we set on the PlatformCALayer.
3577
3578         * platform/graphics/ca/GraphicsLayerCA.cpp:
3579         (WebCore::isIntegral):
3580         (WebCore::clampedContentsScaleForScale):
3581         (WebCore::GraphicsLayerCA::updateRootRelativeScale):
3582         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3583         (WebCore::GraphicsLayerCA::updateContentsOpaque):
3584         (WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact):
3585         Drive-by typo fix.
3586         (WebCore::GraphicsLayerCA::noteChangesForScaleSensitiveProperties):
3587         * platform/graphics/ca/GraphicsLayerCA.h:
3588         * rendering/RenderLayerBacking.cpp:
3589         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3590
3591 2013-11-18  David Hyatt  <hyatt@apple.com>
3592
3593         Add a quirk to not respect center text-align when positioning
3594
3595         <rdar://problem/15427571>
3596         https://bugs.webkit.org/show_bug.cgi?id=124522
3597
3598         Reviewed by Simon Fraser.
3599
3600         Added fast/block/legacy-text-align-position-quirk.html
3601
3602         * page/Settings.in:
3603         Add the quirk setting.
3604
3605         * rendering/RenderBlockLineLayout.cpp:
3606         (WebCore::RenderBlock::startAlignedOffsetForLine):
3607         Don't pay attention to center text-align when the quirk is set.
3608
3609 2013-11-18  Brian J. Burg  <burg@cs.washington.edu>
3610
3611         Consolidate various frame snapshot capabilities.
3612         https://bugs.webkit.org/show_bug.cgi?id=124325
3613
3614         Reviewed by Timothy Hatcher.
3615
3616         Various snapshot creation methods had duplicated code and were split
3617         between Frame, DragImage, and platform-specific implementationss.
3618         This patch puts WebCore snapshot methods into FrameSnapshotting
3619         and removes platform implementations where possible.
3620
3621         DragImage methods reuse snapshot methods where possible. Inspector
3622         will be able to take snapshots without using drag images.
3623
3624         No new tests, this is a refactoring.
3625
3626         * CMakeLists.txt:
3627         * GNUmakefile.list.am:
3628         * WebCore.exp.in:
3629         * WebCore.vcxproj/WebCore.vcxproj:
3630         * WebCore.vcxproj/WebCore.vcxproj.filters:
3631         * WebCore.xcodeproj/project.pbxproj:
3632         * bindings/objc/DOM.mm:
3633         (-[DOMNode renderedImage]):
3634         (-[DOMRange renderedImageForcingBlackText:]):
3635         * dom/Clipboard.cpp:
3636         (WebCore::Clipboard::createDragImage):
3637         * dom/ClipboardMac.mm:
3638         (WebCore::Clipboard::createDragImage):
3639         * page/DragController.cpp:
3640         (WebCore::DragController::startDrag):
3641         * page/Frame.cpp:
3642         * page/Frame.h:
3643         * page/FrameSnapshotting.cpp: Added.
3644         (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
3645         (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
3646         (WebCore::snapshotFrameRect): Move most buffer logic to here.
3647         (WebCore::snapshotSelection): Moved from Frame.
3648         (WebCore::snapshotNode): Moved from Frame.
3649         * page/FrameSnapshotting.h: Added.
3650         * page/mac/FrameMac.mm: Removed.
3651         * page/mac/FrameSnapshottingMac.h: Removed.
3652         * page/mac/FrameSnapshottingMac.mm: Removed.
3653         * page/win/FrameWin.cpp: remove duplicate implementation.
3654         * page/win/FrameWin.h: Fix an incorrect parameter name.
3655         * platform/DragImage.cpp:
3656         (WebCore::ScopedNodeDragState::ScopedNodeDragState):
3657         (WebCore::ScopedNodeDragState::~ScopedNodeDragState):
3658         (WebCore::createDragImageFromSnapshot): Boilerplate buffer conversion.
3659         (WebCore::createDragImageForNode):
3660         (WebCore::createDragImageForSelection):
3661         (WebCore::ScopedFrameSelectionState::ScopedFrameSelectionState):
3662         (WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState):
3663         (WebCore::createDragImageForRange): Moved from Frame.
3664         (WebCore::createDragImageForImage): Moved from FrameSnapshottingMac.
3665         (WebCore::createDragImageForLink): use nullptr.
3666
3667 2013-11-18  Brendan Long  <b.long@cablelabs.com>
3668
3669         [GStreamer] Crash when using media source
3670         https://bugs.webkit.org/show_bug.cgi?id=124525
3671
3672         Reviewed by Philippe Normand.
3673
3674         No new tests because this is already covered by tests in media/media-source (which aren't enabled because the feature isn't done).
3675
3676         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
3677         (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): Add missing adoptRef()
3678
3679 2013-11-18  Brady Eidson  <beidson@apple.com>
3680
3681         Remove unneeded BackingStore-related #include from IDBFactoryBackendInterface
3682
3683         Rubberstamped by Beth Dakin.
3684
3685         * Modules/indexeddb/IDBFactoryBackendInterface.h:
3686
3687 2013-11-18  Nick Diego Yamane  <nick.yamane@openbossa.org>
3688
3689         Change mediasource and mediastream modules to use nullptr
3690         https://bugs.webkit.org/show_bug.cgi?id=124530
3691
3692         Reviewed by Tim Horton.
3693
3694         No new tests needed, no behavior change.
3695
3696         * Modules/mediasource/MediaSource.cpp:
3697         * Modules/mediasource/SourceBuffer.cpp:
3698         * Modules/mediastream/MediaStream.cpp:
3699         * Modules/mediastream/RTCDTMFSender.cpp:
3700         * Modules/mediastream/RTCDataChannel.cpp:
3701         * Modules/mediastream/RTCIceCandidate.cpp:
3702         * Modules/mediastream/RTCPeerConnection.cpp:
3703         * Modules/mediastream/RTCSessionDescription.cpp:
3704         * Modules/mediastream/RTCStatsResponse.cpp:
3705         * Modules/mediastream/UserMediaRequest.cpp:
3706
3707 2013-11-18  Brady Eidson  <beidson@apple.com>
3708
3709         Move execution of IDBCursorBackendOperations to the IDBServerConnection
3710         https://bugs.webkit.org/show_bug.cgi?id=124463
3711
3712         Reviewed by Tim Horton.
3713
3714         This almost entirely removes knowledge of the backing store from the front end.
3715
3716         The primary change here is to give cursors a unique ID.
3717
3718         This way the IDBCursorBackend can reference itself by ID, while the 
3719         IDBServerConnection can handle mapping that ID to a backing store.
3720
3721         * Modules/indexeddb/IDBBackingStoreCursorInterface.h:
3722
3723         * Modules/indexeddb/IDBBackingStoreInterface.h:
3724
3725         * Modules/indexeddb/IDBCursorBackend.cpp:
3726         (WebCore::IDBCursorBackend::IDBCursorBackend):
3727         (WebCore::IDBCursorBackend::deleteFunction):
3728         (WebCore::IDBCursorBackend::prefetchReset):
3729         (WebCore::IDBCursorBackend::close):
3730         (WebCore::IDBCursorBackend::updateCursorData):
3731         (WebCore::IDBCursorBackend::clearCursorData):
3732         * Modules/indexeddb/IDBCursorBackend.h:
3733         (WebCore::IDBCursorBackend::create):
3734         (WebCore::IDBCursorBackend::key):
3735         (WebCore::IDBCursorBackend::primaryKey):
3736         (WebCore::IDBCursorBackend::value):
3737         (WebCore::IDBCursorBackend::id):
3738         (WebCore::IDBCursorBackend::transaction):
3739         (WebCore::IDBCursorBackend::setSavedCursorID):
3740
3741         * Modules/indexeddb/IDBCursorBackendOperations.cpp:
3742         (WebCore::CursorAdvanceOperation::perform):
3743         (WebCore::CursorIterationOperation::perform):
3744         (WebCore::CursorPrefetchIterationOperation::perform):
3745         * Modules/indexeddb/IDBCursorBackendOperations.h:
3746         (WebCore::CursorIterationOperation::key):
3747         (WebCore::CursorIterationOperation::callbacks):
3748         (WebCore::CursorAdvanceOperation::count):
3749         (WebCore::CursorAdvanceOperation::callbacks):
3750         (WebCore::CursorPrefetchIterationOperation::numberToFetch):
3751         (WebCore::CursorPrefetchIterationOperation::callbacks):
3752
3753         * Modules/indexeddb/IDBServerConnection.h:
3754
3755         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h:
3756         (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
3757
3758         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
3759         (WebCore::ObjectStoreKeyCursorImpl::create):
3760         (WebCore::ObjectStoreKeyCursorImpl::clone):
3761         (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
3762         (WebCore::ObjectStoreCursorImpl::create):
3763         (WebCore::ObjectStoreCursorImpl::clone):
3764         (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
3765         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
3766         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
3767         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
3768         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
3769         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
3770
3771         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
3772         (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
3773         (WebCore::IDBServerConnectionLevelDB::setIndexKeys):
3774         (WebCore::IDBServerConnectionLevelDB::createObjectStore):
3775         (WebCore::IDBServerConnectionLevelDB::createIndex):
3776         (WebCore::IDBServerConnectionLevelDB::deleteIndex):
3777         (WebCore::IDBServerConnectionLevelDB::get):
3778         (WebCore::IDBServerConnectionLevelDB::put):
3779         (WebCore::IDBServerConnectionLevelDB::openCursor):
3780         (WebCore::IDBServerConnectionLevelDB::count):
3781         (WebCore::IDBServerConnectionLevelDB::deleteRange):
3782         (WebCore::IDBServerConnectionLevelDB::clearObjectStore):
3783         (WebCore::IDBServerConnectionLevelDB::deleteObjectStore):
3784         (WebCore::IDBServerConnectionLevelDB::changeDatabaseVersion):
3785         (WebCore::IDBServerConnectionLevelDB::cursorAdvance):
3786         (WebCore::IDBServerConnectionLevelDB::cursorIterate):
3787         (WebCore::IDBServerConnectionLevelDB::cursorPrefetchIteration):
3788         (WebCore::IDBServerConnectionLevelDB::cursorPrefetchReset):
3789         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
3790
3791 2013-11-17  Jer Noble  <jer.noble@apple.com>
3792
3793         [WTF] Media time should not have a constructor which accepts a single int or float.
3794         https://bugs.webkit.org/show_bug.cgi?id=124470
3795
3796         Reviewed by Eric Carlson.
3797
3798         Fix the compile error exposed by removing the default parameter in the MediaTime constructor.
3799
3800         * Modules/mediasource/SourceBuffer.cpp:
3801         (WebCore::SourceBuffer::setTimestampOffset):
3802
3803 2013-11-18  Nick Diego Yamane  <nick.yamane@openbossa.org>
3804
3805         Change webaudio to use nullptr for null pointers
3806         https://bugs.webkit.org/show_bug.cgi?id=124526
3807
3808         Reviewed by Anders Carlsson.
3809
3810         No new tests needed, no behavior change.
3811
3812         * Modules/webaudio/AudioBuffer.cpp:
3813         * Modules/webaudio/AudioContext.cpp:
3814         * Modules/webaudio/AudioNode.cpp:
3815         * Modules/webaudio/ChannelMergerNode.cpp:
3816         * Modules/webaudio/ChannelSplitterNode.cpp:
3817         * Modules/webaudio/MediaStreamAudioSource.cpp:
3818         * Modules/webaudio/OfflineAudioContext.cpp:
3819         * Modules/webaudio/PeriodicWave.cpp:
3820         * Modules/webaudio/ScriptProcessorNode.cpp:
3821
3822 2013-11-18  peavo@outlook.com  <peavo@outlook.com>
3823
3824         [Curl] Basic authentication is not reused.
3825         https://bugs.webkit.org/show_bug.cgi?id=124452
3826
3827         Reviewed by Brent Fulgham.
3828
3829         After a successful basic authentication, the credentials are not reused for later requests.
3830         In the CFNetwork port, this is solved by trying basic authentication first, if credentials exists.
3831         Also, when a 401 response is received, the first thing the CFNetwork port does, is to use
3832         m_user/m_pass as credentials in the following request if they are set.
3833         This can be done the same way for the Curl version.
3834
3835         * platform/network/curl/ResourceHandleCurl.cpp:
3836         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Try using m_user/m_pass as credentials first, if they are set.
3837         * platform/network/curl/ResourceHandleManager.cpp:
3838         (WebCore::ResourceHandleManager::applyAuthenticationToRequest): Try basic authentication first, if credentials exists.
3839
3840 2013-11-18  Mátyás Mustoha  <mmatyas@inf.u-szeged.hu>
3841
3842         [curl] Add file cache
3843         https://bugs.webkit.org/show_bug.cgi?id=123333
3844
3845         Reviewed by Brent Fulgham.
3846
3847         Implementation of on disc file cache
3848         for the curl network backend.
3849
3850         * WebCore.vcxproj/WebCore.vcxproj:
3851         * WebCore.vcxproj/WebCore.vcxproj.filters:
3852         * platform/network/curl/CurlCacheEntry.cpp: Added.
3853         (WebCore::CurlCacheEntry::CurlCacheEntry):
3854         (WebCore::CurlCacheEntry::~CurlCacheEntry):
3855         (WebCore::CurlCacheEntry::isCached):
3856         (WebCore::CurlCacheEntry::requestHeaders):
3857         (WebCore::CurlCacheEntry::saveCachedData):
3858         (WebCore::CurlCacheEntry::loadCachedData):
3859         (WebCore::CurlCacheEntry::saveResponseHeaders):
3860         (WebCore::CurlCacheEntry::loadResponseHeaders):
3861         (WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
3862         (WebCore::CurlCacheEntry::didFail):
3863         (WebCore::CurlCacheEntry::didFinishLoading):
3864         (WebCore::CurlCacheEntry::generateBaseFilename):
3865         (WebCore::CurlCacheEntry::loadFileToBuffer):
3866         (WebCore::CurlCacheEntry::invalidate):
3867         (WebCore::CurlCacheEntry::parseResponseHeaders):
3868         * platform/network/curl/CurlCacheEntry.h: Added.
3869         (WebCore::CurlCacheEntry::isInMemory):
3870         * platform/network/curl/CurlCacheManager.cpp: Added.
3871         (WebCore::CurlCacheManager::getInstance):
3872         (WebCore::CurlCacheManager::CurlCacheManager):
3873         (WebCore::CurlCacheManager::~CurlCacheManager):
3874         (WebCore::CurlCacheManager::setCacheDirectory):
3875         (WebCore::CurlCacheManager::loadIndex):
3876         (WebCore::CurlCacheManager::saveIndex):
3877         (WebCore::CurlCacheManager::didReceiveResponse):
3878         (WebCore::CurlCacheManager::didFinishLoading):
3879         (WebCore::CurlCacheManager::isCached):
3880         (WebCore::CurlCacheManager::requestHeaders):
3881         (WebCore::CurlCacheManager::didReceiveData):
3882         (WebCore::CurlCacheManager::saveResponseHeaders):
3883         (WebCore::CurlCacheManager::invalidateCacheEntry):
3884         (WebCore::CurlCacheManager::didFail):
3885         (WebCore::CurlCacheManager::loadCachedData):
3886         * platform/network/curl/CurlCacheManager.h: Added.
3887         (WebCore::CurlCacheManager::getCacheDirectory):
3888         * platform/network/curl/ResourceHandleManager.cpp:
3889         (WebCore::writeCallback):
3890         (WebCore::headerCallback):
3891         (WebCore::ResourceHandleManager::downloadTimerCallback):
3892         (WebCore::ResourceHandleManager::initializeHandle):
3893
3894 2013-11-18  peavo@outlook.com  <peavo@outlook.com>
3895
3896         [Win] WebKit version in user agent string is incorrect.
3897         https://bugs.webkit.org/show_bug.cgi?id=124454
3898
3899         Reviewed by Brent Fulgham.
3900
3901         * DerivedSources.make: Generate WebKitVersion.h
3902
3903 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
3904
3905         Unreviewed. Fix make distcheck.
3906
3907         * GNUmakefile.am: Add inspector json files to EXTRA_DIST and
3908         remove maketokenizer from EXTRA_DIST.
3909         * GNUmakefile.list.am: Add missing header files.
3910
3911 2013-11-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3912
3913         Generate toHTMLDataList|Html|EmbedElement
3914         https://bugs.webkit.org/show_bug.cgi?id=124482
3915
3916         Reviewed by Tim Horton.
3917
3918         To clean up static_cast<HTMLFoo*>, toHTMLEmbedElement, toHTMLHtmlElement, toHTMLDataListElement
3919         are generated.
3920
3921         No new tests, no behavior changes.
3922
3923         * html/HTMLDataListElement.h:
3924         * html/HTMLEmbedElement.h:
3925         * html/HTMLHtmlElement.h:
3926         * html/HTMLInputElement.cpp:
3927         (WebCore::HTMLInputElement::dataList):
3928         * html/HTMLOptionElement.cpp:
3929         (WebCore::HTMLOptionElement::ownerDataListElement):
3930         * html/HTMLTagNames.in:
3931         * html/ImageDocument.cpp:
3932         (WebCore::ImageDocument::createDocumentStructure):
3933         * html/MediaDocument.cpp:
3934         (WebCore::MediaDocumentParser::createDocumentStructure):
3935         (WebCore::MediaDocument::replaceMediaElementTimerFired):
3936         * html/PluginDocument.cpp:
3937         (WebCore::PluginDocumentParser::createDocumentStructure):
3938         * rendering/RenderTheme.cpp:
3939         (WebCore::RenderTheme::paintSliderTicks):
3940         * xml/parser/XMLDocumentParserLibxml2.cpp:
3941         (WebCore::XMLDocumentParser::startElementNs):
3942
3943 2013-11-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3944
3945         Clean up static_cast<HTMLFoo*> usage
3946         https://bugs.webkit.org/show_bug.cgi?id=124480
3947
3948         Reviewed by Tim Horton.
3949
3950         Though there are toHTMLFoo(), some places are still using static_cast<>.
3951         Additionally, toHTMLBodyElement() is supported from now.
3952
3953         No new tests, no behavior changes.
3954
3955         * accessibility/AccessibilityNodeObject.cpp:
3956         (WebCore::AccessibilityNodeObject::isRequired):
3957         * accessibility/AccessibilityTable.cpp:
3958         (WebCore::AccessibilityTable::isDataTable):
3959         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
3960         (WebCore::JSHTMLFrameSetElement::nameGetter):
3961         * bindings/js/JSPluginElementFunctions.cpp:
3962         (WebCore::pluginInstance):
3963         * dom/Document.cpp:
3964         (WebCore::Document::openSearchDescriptionURL):
3965         (WebCore::Document::iconURLs):
3966         * dom/DocumentStyleSheetCollection.cpp:
3967         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
3968         * editing/ReplaceSelectionCommand.cpp:
3969         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
3970         * editing/ios/EditorIOS.mm:
3971         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
3972         * html/HTMLBodyElement.h:
3973         * html/HTMLDocument.cpp:
3974         (WebCore::HTMLDocument::bgColor):
3975         (WebCore::HTMLDocument::setBgColor):
3976         (WebCore::HTMLDocument::fgColor):
3977         (WebCore::HTMLDocument::setFgColor):
3978         (WebCore::HTMLDocument::alinkColor):
3979         (WebCore::HTMLDocument::setAlinkColor):
3980         (WebCore::HTMLDocument::linkColor):
3981         (WebCore::HTMLDocument::setLinkColor):
3982         (WebCore::HTMLDocument::vlinkColor):
3983         (WebCore::HTMLDocument::setVlinkColor):
3984         * html/HTMLEmbedElement.cpp:
3985         (WebCore::HTMLEmbedElement::rendererIsNeeded):
3986         * html/HTMLFormControlElement.cpp:
3987         (WebCore::HTMLFormControlElement::updateAncestorDisabledState):
3988         (WebCore::HTMLFormControlElement::enclosingFormControlElement):
3989         * html/HTMLFormElement.cpp:
3990         (WebCore::submitElementFromEvent):
3991         * html/HTMLImageLoader.cpp:
3992         (WebCore::HTMLImageLoader::notifyFinished):
3993         * html/HTMLLegendElement.cpp:
3994         (WebCore::HTMLLegendElement::virtualForm):
3995         * html/RadioNodeList.cpp:
3996         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
3997         * inspector/InspectorDOMAgent.cpp:
3998         (WebCore::InspectorDOMAgent::buildObjectForNode):
3999
4000 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
4001
4002         Unreviewed. Update GObject DOM symbols file after r158760.
4003
4004         * bindings/gobject/webkitdom.symbols: Add
4005         webkit_dom_text_track_get_id prototype.
4006
4007 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
4008
4009         REGRESSION(r158821): [GTK] API break due to removed properties in GObject DOM bindings
4010         https://bugs.webkit.org/show_bug.cgi?id=124489
4011
4012         Reviewed by Philippe Normand.
4013
4014         In r158821, several properties were changed from readonly to
4015         CustomSetter. The GObject DOM bindings currently skips any
4016         attribute having a custom getter or setter, and those properties
4017         are not generated anymore. We should add support for generating
4018         attributes having a custom getter or setter in GObject DOM
4019         bindings generator, but to fix the ABI break now we bring the old
4020         implementatiom back as custom implementation. This fixes the ABI
4021         compatibility, but not the API since the GObject properties are
4022         not generated.
4023
4024         * bindings/gobject/WebKitDOMCustom.cpp:
4025         (webkit_dom_audio_track_get_kind):
4026         (webkit_dom_audio_track_get_language):
4027         (webkit_dom_text_track_get_kind):
4028         (webkit_dom_text_track_get_language):
4029         (webkit_dom_video_track_get_kind):
4030         (webkit_dom_video_track_get_language):
4031         * bindings/gobject/WebKitDOMCustom.h:
4032         * bindings/gobject/WebKitDOMCustom.symbols:
4033
4034 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
4035
4036         Unreviewed. Update GObject DOM symbols file after r158662.
4037
4038         * bindings/gobject/webkitdom.symbols: Add missing prototypes.
4039
4040 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
4041
4042         Unreviewed. Update GObject DOM symbols file after r159208 and r159363.
4043
4044         * bindings/gobject/webkitdom.symbols: Add
4045         webkit_dom_html_media_element_fast_seek prototype.
4046
4047 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
4048
4049         REGRESSION(r159363): [GTK] API break in webkit_dom_html_media_element_set_current_time
4050