Update an out-dated ASSERT in IconDatabase code.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-11-07  Brady Eidson  <beidson@apple.com>
2
3         Update an out-dated ASSERT in IconDatabase code.
4         <rdar://problem/15171118> and https://bugs.webkit.org/show_bug.cgi?id=124030.
5
6         Reviewed by Andreas Kling.
7
8         With the asynchronous interfaces that have been added and the support for WK2 that has been added, 
9         this ASSERT can incorrectly fire if an icon is asked for before database cleanup is allowed.
10
11         * loader/icon/IconDatabase.cpp:
12         (WebCore::IconDatabase::synchronousIconForPageURL): Update an invalid ASSERT.
13
14 2013-11-07  Andreas Kling  <akling@apple.com>
15
16         RenderSVGResource helpers should take RenderStyle by const reference.
17         <https://webkit.org/b/124029>
18
19         Take const RenderStyle& instead of RenderStyle* in a few more places
20         so we can get rid of some ampersands and assertions.
21
22         Reviewed by Anders Carlsson.
23
24 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
25
26         [AX] Generate toAccessibilityTableRow|Column|Cell to detect bad type casts
27         https://bugs.webkit.org/show_bug.cgi?id=123984
28
29         Reviewed by Mario Sanchez Prada.
30
31         As a step to let static_cast<> use TYPE_CASTS_BASE, AccessibilityTableRow|Column|Cell use
32         ACCESSIBILITY_OBJECT_TYPE_CASTS which can support more helper functions rather than manual
33         static_cast<>. This change will help to detect bad type casts further.
34
35         No new tests, no behavior changes.
36
37         * accessibility/AccessibilityARIAGrid.cpp:
38         (WebCore::AccessibilityARIAGrid::addTableCellChild):
39         (WebCore::AccessibilityARIAGrid::addChildren):
40         * accessibility/AccessibilityARIAGridCell.cpp:
41         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
42         * accessibility/AccessibilityTable.cpp:
43         (WebCore::AccessibilityTable::addChildren):
44         (WebCore::AccessibilityTable::rowHeaders):
45         (WebCore::AccessibilityTable::columnHeaders):
46         (WebCore::AccessibilityTable::cellForColumnAndRow):
47         * accessibility/AccessibilityTableCell.h:
48         * accessibility/AccessibilityTableColumn.h:
49         * accessibility/AccessibilityTableRow.cpp:
50         (WebCore::AccessibilityTableRow::headerObject):
51         * accessibility/AccessibilityTableRow.h:
52         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
53         (cellAtIndex):
54         (webkitAccessibleTableGetColumnHeader):
55         (webkitAccessibleTableGetRowHeader):
56         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
57         (-[WebAccessibilityObjectWrapper tableCellParent]):
58         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
59         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
60
61 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
62
63         REGRESSION (r154375): Image is oriented incorrectly
64         https://bugs.webkit.org/show_bug.cgi?id=123831
65
66         Reviewed by Antonio Gomes.
67
68         r154375 made that shouldRespectImageOrientation() isn't used by drawImage().
69         It causes an image isn't oriented correctly. This patch sets shouldRespectImageOrientation()
70         value by default.
71
72         * rendering/RenderImage.cpp:
73         (WebCore::RenderImage::paintReplaced):
74         (WebCore::RenderImage::paintIntoRect):
75
76 2013-11-07  Hans Muller  <hmuller@adobe.com>
77
78         [CSS Shapes] Image shape-outside with vertical gaps is handled incorrectly
79         https://bugs.webkit.org/show_bug.cgi?id=123934
80
81         Reviewed by Andreas Kling.
82
83         RasterShapeIntervals::getExcludedIntervals() was returning an empty
84         list when the line overlapped any vertical gap in the image. This short-circuit
85         had been mistakenly copied from getIncludedIntervals(), where it makes sense.
86
87         Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-vgap.html
88
89         * rendering/shapes/RasterShape.cpp:
90         (WebCore::RasterShapeIntervals::getExcludedIntervals):
91
92 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
93
94         Make contents layer borders more visible
95         https://bugs.webkit.org/show_bug.cgi?id=124025
96
97         Reviewed by Tim Horton.
98
99         Layer borders for contents layers are impossible to see when the
100         contentsLayer has the same bounds as its parent; make the contents
101         layer border 4px thick to make it more visible.
102
103         * platform/graphics/ca/GraphicsLayerCA.cpp:
104         (WebCore::GraphicsLayerCA::setupContentsLayer):
105
106 2013-11-07  Andreas Kling  <akling@apple.com>
107
108         InlineFlowBox always has a RenderBoxModelObject, take advantage.
109         <https://webkit.org/b/124024>
110
111         Since InlineFlowBox already has the branch-less renderer() returning
112         a RenderBoxModelObject&, avoid using InlineBox::boxModelObject()
113         wherever we have a tightly-typed box. One branch disappears from
114         every call site.
115
116         Deleted boxModelObject() on InlineFlowBox to prevent new code from
117         calling the less efficient function.
118
119         Reviewed by Anders Carlsson.
120
121 2013-11-07  Andreas Kling  <akling@apple.com>
122
123         CTTE: Scrolling tree nodes should always have a ScrollingTree&.
124         <https://webkit.org/b/124022>
125
126         Let ScrollingTreeNode and subclasses store the backpointer to the
127         tree as a ScrollingTree& reference.
128
129         Reviewed by Anders Carlsson.
130
131 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
132
133         Lots of layers get solid color but transparent contents layers now
134         https://bugs.webkit.org/show_bug.cgi?id=123537
135
136         Reviewed by Tim Horton.
137         
138         We call rendererBackgroundColor() to determine the layer's background color,
139         but on most elements this returns the transparent color (a valid color).
140         This caused us to allocate a contentsLayer, and use the transparent color as its
141         backgroundColor, which was wasteful.
142         
143         Fix by only making a background-color layer if the color is not transparent (zero alpha).
144         
145         Also avoid making a new contents layer on every color change, and make sure that
146         we don't do implicit animations for backgroundColor, and some other properties
147         that were omitted by mistake.
148
149         Layer tree dumps don't dump content layers, so no way to test easily.
150
151         * platform/graphics/ca/GraphicsLayerCA.cpp:
152         (WebCore::GraphicsLayerCA::setContentsToSolidColor):
153         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
154         (nullActionsDictionary):
155
156 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
157
158         DOMTokenList::add can add duplicated values if arguments had duplicated values
159         https://bugs.webkit.org/show_bug.cgi?id=123962
160
161         Reviewed by Benjamin Poulain.
162
163         Merge https://chromium.googlesource.com/chromium/blink/+/bd3822ad4ae3fc5d8f89f433a7bf04f697334305
164
165         In case we do element.classList.add('a', 'a') we need to ensure that we do not add the same token twice.
166         See http://dom.spec.whatwg.org/#dom-domtokenlist-add
167
168         * html/DOMTokenList.cpp:
169         (WebCore::DOMTokenList::add): Make sure filtered tokens are unique among themselves.
170
171 2013-11-07  Eric Carlson  <eric.carlson@apple.com>
172
173         Remove npr.org specific hack in HTMLMediaElement
174         https://bugs.webkit.org/show_bug.cgi?id=123859
175
176         Reviewed by Jer Noble.
177
178         Remove the site specific hack added in r57820, it is no longer necessary.
179
180         * html/HTMLMediaElement.cpp:
181         (WebCore::HTMLMediaElement::HTMLMediaElement): Remove m_dispatchingCanPlayEvent.
182         (HTMLMediaElement::play): Don't special case npr.org.
183         * html/HTMLMediaElement.h:
184
185 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
186
187         Attempt to fix the 32-bit build. Virtual thunks seem to have different
188         symbol names between 32- and 64-bit.
189         
190         * WebCore.exp.in:
191
192 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
193
194         Crash in HTMLMediaElement::contextDestroyed
195         https://bugs.webkit.org/show_bug.cgi?id=123963
196
197         Reviewed by Eric Carlson.
198
199         Merge https://chromium.googlesource.com/chromium/blink/+/177999cdb34b707465670f0feff723922939f278
200
201         * html/HTMLMediaElement.cpp:
202         (WebCore::HTMLMediaElement::~HTMLMediaElement):
203
204 2013-11-07  Jer Noble  <jer.noble@apple.com>
205
206         [Mac] Crash at com.apple.WebCore: -[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:] + 2084 
207         https://bugs.webkit.org/show_bug.cgi?id=124012
208
209         Reviewed by Eric Carlson.
210
211         The value of the 'duration' key is a NSConcreteValue wrapping a CMTime, not a NSNumber.
212
213         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
214         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
215
216 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
217
218         Crash when submitting form in a document with null encoding
219         https://bugs.webkit.org/show_bug.cgi?id=123975
220
221         Reviewed by Alexey Proskuryakov.
222
223         Merge https://chromium.googlesource.com/chromium/blink/+/bba01a7fff09e3053ada96ababac2a6e4261fe5f
224         
225         The CString object which is passed to normalizeLineEndingsToCRLF() can be
226         a null string. It is created in FormDataList::appendString(), and it
227         produces a null CString if FormDataList::m_encoding is a null encoding.
228
229         Test: fast/forms/form-submit-in-image-document.html
230
231         * platform/text/LineEnding.cpp:
232         (internalNormalizeLineEndingsToCRLF):
233
234 2013-11-07  Anders Carlsson  <andersca@apple.com>
235
236         Use std::function for all policy continuation functions
237         https://bugs.webkit.org/show_bug.cgi?id=124011
238
239         Reviewed by Sam Weinig.
240
241         * loader/DocumentLoader.cpp:
242         (WebCore::DocumentLoader::willSendRequest):
243         (WebCore::DocumentLoader::responseReceived):
244         * loader/DocumentLoader.h:
245         * loader/FrameLoader.cpp:
246         (WebCore::FrameLoader::loadURL):
247         (WebCore::FrameLoader::load):
248         (WebCore::FrameLoader::loadWithDocumentLoader):
249         (WebCore::FrameLoader::loadPostRequest):
250         * loader/PolicyCallback.cpp:
251         (WebCore::PolicyCallback::clear):
252         (WebCore::PolicyCallback::set):
253         (WebCore::PolicyCallback::call):
254         (WebCore::PolicyCallback::clearRequest):
255         (WebCore::PolicyCallback::cancel):
256         * loader/PolicyCallback.h:
257         * loader/PolicyChecker.cpp:
258         (WebCore::PolicyChecker::checkNavigationPolicy):
259         (WebCore::PolicyChecker::checkNewWindowPolicy):
260         (WebCore::PolicyChecker::checkContentPolicy):
261         * loader/PolicyChecker.h:
262
263 2013-11-07  Brady Eidson  <beidson@apple.com>
264
265         Use SQLite journal mode WAL (WriteAheadLogging)
266         https://bugs.webkit.org/show_bug.cgi?id=124009
267
268         Reviewed by Anders Carlsson.
269
270         WriteAheadLogging journalling is better than the traditional rollback model.
271
272         * platform/sql/SQLiteDatabase.cpp:
273         (WebCore::SQLiteDatabase::open): Use a PRAGMA to set journal_mode to WAL.
274
275 2013-11-07  Mark Lam  <mark.lam@apple.com>
276
277         Cosmetic: rename xxxId to xxxID for ScriptId, SourceId, and BreakpointId.
278         https://bugs.webkit.org/show_bug.cgi?id=123945.
279
280         Reviewed by Geoffrey Garen.
281
282         No new tests.
283
284         * bindings/js/JSInjectedScriptHostCustom.cpp:
285         (WebCore::JSInjectedScriptHost::functionDetails):
286         * bindings/js/JavaScriptCallFrame.h:
287         (WebCore::JavaScriptCallFrame::sourceID):
288         * bindings/js/ScriptDebugServer.cpp:
289         (WebCore::ScriptDebugServer::ScriptDebugServer):
290         (WebCore::ScriptDebugServer::setBreakpoint):
291         (WebCore::ScriptDebugServer::removeBreakpoint):
292         (WebCore::ScriptDebugServer::hasBreakpoint):
293         (WebCore::ScriptDebugServer::clearBreakpoints):
294         (WebCore::ScriptDebugServer::updateCallFrame):
295         (WebCore::ScriptDebugServer::pauseIfNeeded):
296         * bindings/js/ScriptDebugServer.h:
297         * inspector/InspectorConsoleAgent.cpp:
298         (WebCore::InspectorConsoleAgent::addMessageToConsole):
299         * inspector/InspectorConsoleAgent.h:
300         * inspector/InspectorConsoleInstrumentation.h:
301         (WebCore::InspectorInstrumentation::addMessageToConsole):
302         * inspector/InspectorDOMAgent.cpp:
303         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
304         * inspector/InspectorDebuggerAgent.cpp:
305         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
306         (WebCore::parseLocation):
307         (WebCore::InspectorDebuggerAgent::setBreakpoint):
308         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
309         (WebCore::InspectorDebuggerAgent::continueToLocation):
310         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
311         (WebCore::InspectorDebuggerAgent::searchInContent):
312         (WebCore::InspectorDebuggerAgent::setScriptSource):
313         (WebCore::InspectorDebuggerAgent::getScriptSource):
314         (WebCore::InspectorDebuggerAgent::compileScript):
315         (WebCore::InspectorDebuggerAgent::runScript):
316         (WebCore::InspectorDebuggerAgent::didParseSource):
317         (WebCore::InspectorDebuggerAgent::didPause):
318         (WebCore::InspectorDebuggerAgent::clear):
319         (WebCore::InspectorDebuggerAgent::reset):
320         * inspector/InspectorDebuggerAgent.h:
321         * inspector/InspectorInstrumentation.cpp:
322         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
323         * inspector/InspectorInstrumentation.h:
324         * inspector/ScriptDebugListener.h:
325
326 2013-11-07  Cidorvan Leite  <cidorvan.leite@openbossa.org>
327
328         Avoid invalid cairo matrix when drawing surfaces too small
329         https://bugs.webkit.org/show_bug.cgi?id=123810
330
331         Drawing surfaces too small makes inverse matrix with values too big,
332         when this happen, cairo context is not valid anymore and it stops to draw anything.
333
334         Reviewed by Martin Robinson.
335
336         Test: fast/canvas/drawImage-with-small-values.html
337
338         * platform/graphics/cairo/PlatformContextCairo.cpp:
339         (WebCore::PlatformContextCairo::drawSurfaceToContext):
340
341 2013-11-07  Antti Koivisto  <antti@apple.com>
342
343         Simple line layout crashes with SVG fonts
344         https://bugs.webkit.org/show_bug.cgi?id=124002
345
346         Reviewed by Simon Fraser.
347         
348         Don't use simple line layout for flows using SVG fonts. They crash if kerning is enabled.
349
350         Test: fast/text/svg-font-simple-line-crash.html
351
352         * platform/graphics/Font.h:
353         (WebCore::Font::isSVGFont):
354         
355             Add isSVGFont() so callers don't need to go via primaryFont().
356
357         * rendering/InlineTextBox.cpp:
358         (WebCore::InlineTextBox::constructTextRun):
359         * rendering/RenderBlock.cpp:
360         (WebCore::constructTextRunInternal):
361         * rendering/SimpleLineLayout.cpp:
362         (WebCore::SimpleLineLayout::canUseFor):
363         
364             Disallow SVG fonts.
365
366         * rendering/svg/SVGInlineTextBox.cpp:
367         (WebCore::SVGInlineTextBox::constructTextRun):
368         * rendering/svg/SVGTextMetrics.cpp:
369         (WebCore::SVGTextMetrics::constructTextRun):
370         (WebCore::SVGTextMetrics::SVGTextMetrics):
371         * rendering/svg/SVGTextRunRenderingContext.h:
372         
373             Get rid of the abstract textRunNeedsRenderingContext in favor of just testing isSVGFont().
374
375 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
376
377         Allow customization of the contentsScale of TileController tiles
378         https://bugs.webkit.org/show_bug.cgi?id=124004
379
380         Reviewed by Tim Horton.
381
382         On some platorms, zooming out on pages with TiledBacking compositing
383         layers can cause very high memory use, because the TiledBacking retains
384         the original page scale while the zoom is in flight, but can be asked
385         to cover a large area.
386         
387         Make it possible to reduce memory use in this case by allowing RenderLayerCompositor
388         to provide an additional scale factor for newly created tiles. Platforms can
389         then customize this to create low-res tiles when necessary.
390
391         * WebCore.exp.in:
392         * platform/graphics/GraphicsLayerClient.h:
393         (WebCore::GraphicsLayerClient::contentsScaleMultiplierForNewTiles):
394         * platform/graphics/ca/GraphicsLayerCA.cpp:
395         (WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
396         * platform/graphics/ca/GraphicsLayerCA.h:
397         * platform/graphics/ca/PlatformCALayerClient.h:
398         (WebCore::PlatformCALayerClient::platformCALayerContentsScaleMultiplierForNewTiles):
399         * platform/graphics/ca/mac/TileController.h:
400         * platform/graphics/ca/mac/TileController.mm:
401         (WebCore::TileController::TileController):
402         (WebCore::TileController::setScale):
403         (WebCore::TileController::createTileLayer):
404         * rendering/RenderLayerBacking.cpp:
405         (WebCore::RenderLayerBacking::contentsScaleMultiplierForNewTiles):
406         * rendering/RenderLayerBacking.h:
407         * rendering/RenderLayerCompositor.cpp:
408         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
409         * rendering/RenderLayerCompositor.h:
410
411 2013-11-07  Jer Noble  <jer.noble@apple.com>
412
413         Unreviewed Win build fix after r158855; wrap shapeInfoForFloat() in an ENABLE(CSS_SHAPES) guard.
414
415         * rendering/FloatingObjects.cpp:
416
417 2013-11-07  Bem Jones-Bey  <bjonesbe@adobe.com>
418
419         Refactor logical left/right offset for line methods
420         https://bugs.webkit.org/show_bug.cgi?id=123898
421
422         Reviewed by David Hyatt.
423
424         Simplify the logical left/right offset for line methods and their
425         implementation, including the ComputeFloatOffsetAdapter. This also
426         reduces the number of line offset methods in RenderBlock.
427
428         No new tests, no behavior change.
429
430         * rendering/FloatingObjects.cpp:
431         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
432         (WebCore::ComputeFloatOffsetAdapter::offset): Add a method to return
433             the offset instead of using a confusing out parameter.
434         (WebCore::::shapeOffset): Method to return the offset modified by the
435             shape delta. Moving the computation to this method allowed for
436             simplification of the users of ComputeFloatOffsetAdapter.
437         (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat): Added this
438             method so that ShapeOutsideFloatOffsetMode isn't needed. Returns the
439             offset based on the float margin box.
440         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat): Ditto.
441         (WebCore::FloatingObjects::logicalLeftOffset): This now only returns
442             the offset based on the shape's contour.
443         (WebCore::FloatingObjects::logicalRightOffset): Ditto.
444         (WebCore::::heightRemaining): Rename to properly follow the getter
445             naming convention.
446         * rendering/FloatingObjects.h:
447         * rendering/RenderBlock.h:
448         (WebCore::RenderBlock::logicalRightOffsetForLine): Update to remove
449             use of ShapeOutsideFloatOffsetMode and heightRemaining.
450         (WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
451         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
452         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
453         * rendering/RenderBlockFlow.cpp:
454         (WebCore::RenderBlockFlow::logicalLeftOffsetForPositioningFloat):
455             Positioning a float is the only case where the float margin box
456             should be used, and also the only case where heightRemaining is
457             needed. This handles that case.
458         (WebCore::RenderBlockFlow::logicalRightOffsetForPositioningFloat):
459             Ditto.
460         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat): Update to
461             use logical(Left|Right)OffsetForPositioningFloatOnLine.
462         (WebCore::RenderBlockFlow::logicalLeftFloatOffsetForLine): Update to
463             remove use for ShapeOutsideFloatOffsetMode and heightRemaining.
464         (WebCore::RenderBlockFlow::logicalRightFloatOffsetForLine): Ditto.
465         * rendering/RenderBlockFlow.h:
466
467 2013-11-07  Alexandru Chiculita  <achicu@adobe.com>
468
469         Web Inspector: CSS Regions: Removing a content node of a ContentFlow from the DOM will send a 0 nodeId
470         https://bugs.webkit.org/show_bug.cgi?id=123577
471
472         Reviewed by Timothy Hatcher.
473
474         Test: inspector-protocol/model/content-flow-content-removal.html
475
476         Do not send unregister events for the content nodes of a flow when the element is not part of the DOM
477         anymore. We already send an unbind event, so the inspector is already notified that the node was removed.
478
479         * inspector/InspectorCSSAgent.cpp:
480         (WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
481
482 2013-10-30  Jer Noble  <jer.noble@apple.com>
483
484         [MSE] Add mock MediaSource classes for testing.
485         https://bugs.webkit.org/show_bug.cgi?id=123322
486
487         Reviewed by Eric Carlson.
488
489         Tests: media/media-source/media-source-addsourcebuffer.html
490                media/media-source/media-source-append-buffer.html
491                media/media-source/media-source-canplaythrough.html
492                media/media-source/media-source-closed.html
493                media/media-source/media-source-play.html
494                media/media-source/media-source-track-enabled.html
495                media/media-source/media-source-tracks.html
496
497
498         Add mock implementation of platform MediaSource classes, allowing ports to test the
499         MediaSource API without having a platform implementation.
500
501         The MockMediaSource will support a byteformat defined in MockBox.h: a simple box-style media
502         format with an initialization segment containing a number of tracks, followed by a list of
503         samples.
504
505         Add a means to insert a new media engine factory at runtime, so the internals object can add
506         a MockMediaSourceMediaPlayer:
507         * platform/graphics/MediaPlayer.cpp:
508         (WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine):
509         * platform/graphics/MediaPlayer.h:
510         * testing/Internals.cpp:
511         (WebCore::Internals::initializeMockMediaSource):
512         * testing/Internals.h:
513         * testing/Internals.idl:
514
515         For non-media-source supporting media engines, fail immediately when asked to load a media
516         source, so that the MockMediaSourceMediaPlayer will be instantiated as a fall-back:
517         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
518         (WebCore::MediaPlayerPrivateAVFoundation::load):
519         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
520         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
521         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
522         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
523         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
524         (WebCore::MediaPlayerPrivateQTKit::load):
525         (WebCore::MediaPlayerPrivateQTKit::supportsType):
526
527         Add new files to the project:
528         * WebCore.xcodeproj/project.pbxproj:
529         * Source/WebCore/WebCore.exp.in:
530
531         Update the MediaSource implementation:
532         * Modules/mediasource/MediaSource.cpp:
533         (WebCore::MediaSource::monitorSourceBuffers): Add a link to the spec.
534         * Modules/mediasource/SourceBuffer.cpp:
535         (WebCore::SourceBuffer::buffered): Ditto.
536         (WebCore::SourceBuffer::setTimestampOffset): Ditto.
537         (WebCore::SourceBuffer::validateInitializationSegment): Ditto.
538         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Ditto. Also,
539             bring the implementation up to date with part of the spec.
540         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Remove "Predicate" from
541             SampleIsRandomAccessPredicate.
542
543         Add utility classes to parse and represent the bytestream supported by the MockMediaSource:
544         * platform/mock/mediasource/MockBox.cpp: Added.
545         (WebCore::MockBox::MockBox):
546         (WebCore::MockBox::peekType):
547         (WebCore::MockBox::peekLength):
548         (WebCore::MockTrackBox::MockTrackBox):
549         (WebCore::MockTrackBox::type):
550         (WebCore::MockInitializationBox::MockInitializationBox):
551         (WebCore::MockInitializationBox::type):
552         (WebCore::MockSampleBox::MockSampleBox):
553         (WebCore::MockSampleBox::type):
554         * platform/mock/mediasource/MockBox.h: Added.
555         (WebCore::MockBox::length):
556         (WebCore::MockBox::type):
557         (WebCore::MockTrackBox::trackID):
558         (WebCore::MockTrackBox::codec):
559         (WebCore::MockTrackBox::kind):
560         (WebCore::MockInitializationBox::duration):
561         (WebCore::MockInitializationBox::tracks):
562         (WebCore::MockSampleBox::presentationTimestamp):
563         (WebCore::MockSampleBox::decodeTimestamp):
564         (WebCore::MockSampleBox::duration):
565         (WebCore::MockSampleBox::trackID):
566         (WebCore::MockSampleBox::flags):
567         (WebCore::MockSampleBox::isSync):
568
569         Add a MediaPlayerPrivate implementation which uses MockMediaSource:
570         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: Added.
571         (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
572         (WebCore::MockMediaPlayerMediaSource::create):
573         (WebCore::mimeTypeCache):
574         (WebCore::MockMediaPlayerMediaSource::getSupportedTypes):
575         (WebCore::MockMediaPlayerMediaSource::supportsType):
576         (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource):
577         (WebCore::MockMediaPlayerMediaSource::~MockMediaPlayerMediaSource):
578         (WebCore::MockMediaPlayerMediaSource::load):
579         (WebCore::MockMediaPlayerMediaSource::cancelLoad):
580         (WebCore::MockMediaPlayerMediaSource::play):
581         (WebCore::MockMediaPlayerMediaSource::pause):
582         (WebCore::MockMediaPlayerMediaSource::naturalSize):
583         (WebCore::MockMediaPlayerMediaSource::hasVideo):
584         (WebCore::MockMediaPlayerMediaSource::hasAudio):
585         (WebCore::MockMediaPlayerMediaSource::setVisible):
586         (WebCore::MockMediaPlayerMediaSource::seeking):
587         (WebCore::MockMediaPlayerMediaSource::paused):
588         (WebCore::MockMediaPlayerMediaSource::networkState):
589         (WebCore::MockMediaPlayerMediaSource::readyState):
590         (WebCore::MockMediaPlayerMediaSource::buffered):
591         (WebCore::MockMediaPlayerMediaSource::didLoadingProgress):
592         (WebCore::MockMediaPlayerMediaSource::setSize):
593         (WebCore::MockMediaPlayerMediaSource::paint):
594         (WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
595         (WebCore::MockMediaPlayerMediaSource::durationDouble):
596         (WebCore::MockMediaPlayerMediaSource::seekDouble):
597         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
598         (WebCore::MockMediaPlayerMediaSource::updateDuration):
599         (WebCore::MockMediaPlayerMediaSource::setReadyState):
600         * platform/mock/mediasource/MockMediaPlayerMediaSource.h: Added.
601
602         Add a mock implementation of MediaSourcePrivate, which uses MockSourceBuffer:
603         * platform/mock/mediasource/MockMediaSourcePrivate.cpp: Added.
604         (WebCore::MockMediaSourcePrivate::create):
605         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
606         (WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate):
607         (WebCore::MockMediaSourcePrivate::addSourceBuffer):
608         (WebCore::MockMediaSourcePrivate::removeSourceBuffer):
609         (WebCore::MockMediaSourcePrivate::duration):
610         (WebCore::MockMediaSourcePrivate::setDuration):
611         (WebCore::MockMediaSourcePrivate::markEndOfStream):
612         (WebCore::MockMediaSourcePrivate::unmarkEndOfStream):
613         (WebCore::MockMediaSourcePrivate::readyState):
614         (WebCore::MockMediaSourcePrivate::setReadyState):
615         (WebCore::MockMediaSourcePrivate::sourceBufferPrivateDidChangeActiveState):
616         (WebCore::MockSourceBufferPrivateHasAudio):
617         (WebCore::MockMediaSourcePrivate::hasAudio):
618         (WebCore::MockSourceBufferPrivateHasVideo):
619         (WebCore::MockMediaSourcePrivate::hasVideo):
620         * platform/mock/mediasource/MockMediaSourcePrivate.h: Added.
621         (WebCore::MockMediaSourcePrivate::activeSourceBuffers):
622         (WebCore::MockMediaSourcePrivate::player):
623
624         Add a mock implementation of SourceBufferPrivate, which uses MockBoxes to parse the
625         bytestream provided by SourceBuffer:
626         * platform/mock/mediasource/MockSourceBufferPrivate.cpp: Added.
627         (WebCore::MockMediaSample::create):
628         (WebCore::MockMediaSample::~MockMediaSample):
629         (WebCore::MockMediaSample::MockMediaSample):
630         (WebCore::MockMediaSample::platformSample):
631         (WebCore::MockMediaDescription::create):
632         (WebCore::MockMediaDescription::~MockMediaDescription):
633         (WebCore::MockMediaDescription::MockMediaDescription):
634         (WebCore::MockSourceBufferPrivate::create):
635         (WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate):
636         (WebCore::MockSourceBufferPrivate::~MockSourceBufferPrivate):
637         (WebCore::MockSourceBufferPrivate::setClient):
638         (WebCore::MockSourceBufferPrivate::append):
639         (WebCore::MockSourceBufferPrivate::didReceiveInitializationSegment):
640         (WebCore::MockSourceBufferPrivate::didReceiveSample):
641         (WebCore::MockSourceBufferPrivate::abort):
642         (WebCore::MockSourceBufferPrivate::removedFromMediaSource):
643         (WebCore::MockSourceBufferPrivate::readyState):
644         (WebCore::MockSourceBufferPrivate::setReadyState):
645         (WebCore::MockSourceBufferPrivate::hasVideo):
646         (WebCore::MockSourceBufferPrivate::hasAudio):
647         * platform/mock/mediasource/MockSourceBufferPrivate.h: Added.
648
649         Create mock implementations of AudioTrackPrivate, VideoTrackPrivate, and TextTrackPrivate
650         which wrap the MockTrackBox class:
651         * platform/mock/mediasource/MockTracks.cpp: Added.
652         * platform/mock/mediasource/MockTracks.h: Added.
653         (WebCore::MockAudioTrackPrivate::create):
654         (WebCore::MockAudioTrackPrivate::~MockAudioTrackPrivate):
655         (WebCore::MockAudioTrackPrivate::id):
656         (WebCore::MockAudioTrackPrivate::MockAudioTrackPrivate):
657         (WebCore::MockTextTrackPrivate::create):
658         (WebCore::MockTextTrackPrivate::~MockTextTrackPrivate):
659         (WebCore::MockTextTrackPrivate::id):
660         (WebCore::MockTextTrackPrivate::MockTextTrackPrivate):
661         (WebCore::MockVideoTrackPrivate::create):
662         (WebCore::MockVideoTrackPrivate::~MockVideoTrackPrivate):
663         (WebCore::MockVideoTrackPrivate::id):
664         (WebCore::MockVideoTrackPrivate::MockVideoTrackPrivate):
665
666 2013-11-07  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
667
668         Changing MediaStreamDescriptor to MediaStreamPrivate
669         https://bugs.webkit.org/show_bug.cgi?id=123935
670
671         Reviewed by Eric Carlson.
672
673         No new tests needed.
674
675         * CMakeLists.txt:
676         * GNUmakefile.list.am:
677         * Modules/mediastream/MediaStream.cpp:
678         (WebCore::MediaStream::create):
679         (WebCore::MediaStream::MediaStream):
680         (WebCore::MediaStream::~MediaStream):
681         (WebCore::MediaStream::ended):
682         (WebCore::MediaStream::setEnded):
683         (WebCore::MediaStream::addTrack):
684         (WebCore::MediaStream::removeTrack):
685         (WebCore::MediaStream::removeRemoteSource):
686         * Modules/mediastream/MediaStream.h:
687         * Modules/mediastream/MediaStreamRegistry.cpp:
688         (WebCore::MediaStreamRegistry::registerURL):
689         (WebCore::MediaStreamRegistry::unregisterURL):
690         (WebCore::MediaStreamRegistry::lookupMediaStreamPrivate):
691         * Modules/mediastream/MediaStreamRegistry.h:
692         * Modules/mediastream/MediaStreamTrack.cpp:
693         * Modules/mediastream/MediaStreamTrack.h:
694         * Modules/mediastream/RTCPeerConnection.cpp:
695         (WebCore::RTCPeerConnection::addStream):
696         (WebCore::RTCPeerConnection::removeStream):
697         (WebCore::RTCPeerConnection::didAddRemoteStream):
698         (WebCore::RTCPeerConnection::didRemoveRemoteStream):
699         * Modules/mediastream/RTCPeerConnection.h:
700         * Modules/mediastream/UserMediaRequest.cpp:
701         (WebCore::UserMediaRequest::didCreateStream):
702         (WebCore::UserMediaRequest::callSuccessHandler):
703         * Modules/mediastream/UserMediaRequest.h:
704         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
705         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
706         * WebCore.xcodeproj/project.pbxproj:
707         * html/HTMLMediaElement.cpp:
708         (HTMLMediaElement::loadResource):
709         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
710         (WebCore::toWebMediaStreamPrivate):
711         (WebCore::MediaPlayerPrivate::lookupMediaStream):
712         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
713         * platform/mediastream/MediaStreamCenter.cpp:
714         * platform/mediastream/MediaStreamCreationClient.h:
715         * platform/mediastream/MediaStreamPrivate.cpp: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.cpp.
716         (WebCore::MediaStreamPrivate::create):
717         (WebCore::MediaStreamPrivate::addSource):
718         (WebCore::MediaStreamPrivate::removeSource):
719         (WebCore::MediaStreamPrivate::addRemoteSource):
720         (WebCore::MediaStreamPrivate::removeRemoteSource):
721         (WebCore::MediaStreamPrivate::addRemoteTrack):
722         (WebCore::MediaStreamPrivate::removeRemoteTrack):
723         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
724         (WebCore::MediaStreamPrivate::setEnded):
725         (WebCore::MediaStreamPrivate::addTrack):
726         (WebCore::MediaStreamPrivate::removeTrack):
727         * platform/mediastream/MediaStreamPrivate.h: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.h.
728         (WebCore::MediaStreamPrivateClient::~MediaStreamPrivateClient):
729         (WebCore::MediaStreamPrivate::~MediaStreamPrivate):
730         (WebCore::MediaStreamPrivate::client):
731         (WebCore::MediaStreamPrivate::setClient):
732         (WebCore::MediaStreamPrivate::id):
733         (WebCore::MediaStreamPrivate::numberOfAudioSources):
734         (WebCore::MediaStreamPrivate::audioSources):
735         (WebCore::MediaStreamPrivate::numberOfVideoSources):
736         (WebCore::MediaStreamPrivate::videoSources):
737         (WebCore::MediaStreamPrivate::numberOfAudioTracks):
738         (WebCore::MediaStreamPrivate::audioTracks):
739         (WebCore::MediaStreamPrivate::numberOfVideoTracks):
740         (WebCore::MediaStreamPrivate::videoTracks):
741         (WebCore::MediaStreamPrivate::ended):
742         * platform/mediastream/MediaStreamSource.cpp:
743         * platform/mediastream/MediaStreamSource.h:
744         * platform/mediastream/RTCPeerConnectionHandler.h:
745         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
746         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
747         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
748         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
749         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
750         * platform/mediastream/mac/MediaStreamCenterMac.cpp:
751         (WebCore::MediaStreamCenterMac::createMediaStream):
752         * platform/mock/MockMediaStreamCenter.cpp:
753         (WebCore::MockMediaStreamCenter::createMediaStream):
754         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
755         (WebCore::RTCPeerConnectionHandlerMock::addStream):
756         (WebCore::RTCPeerConnectionHandlerMock::removeStream):
757         * platform/mock/RTCPeerConnectionHandlerMock.h:
758
759 2013-11-07  Denis Nomiyama  <d.nomiyama@samsung.com>
760
761         [GTK] Glyphs in vertical text tests are rotated 90 degrees clockwise
762         https://bugs.webkit.org/show_bug.cgi?id=50619
763
764         Reviewed by Martin Robinson.
765
766         Implemented the OPENTYPE_VERTICAL feature for the GTK+ port. It resolves
767         the 90 degrees rotation problem of CJK characters when displaying
768         vertical text.
769
770         New tests are not required as the existing tests for vertical text will
771         work properly now.
772
773         * GNUmakefile.list.am: Added OpenTypeVerticalData.cpp and
774         OpenTypeVerticalData.h to platformgtk_sources.
775         * PlatformEfl.cmake: Added OpenTypeVerticalData.cpp.
776         * PlatformGTK.cmake: Added OpenTypeVerticalData.cpp.
777         * platform/graphics/FontCache.cpp: Originally the HashMap for
778         OpenTypeVerticalData was designed with FontFileKey as integer in the
779         Chromium port, which was an unique number provided by Skia. Since other
780         ports use FontFileKey as string, new generic hash functions had to be
781         implemented instead of using the specific ones for integers.
782         (WebCore::FontVerticalDataCacheKeyHash::hash): New hash function for
783         HashMap of OpenTypeVerticalData.
784         (WebCore::FontVerticalDataCacheKeyHash::equal): New function for
785         comparing hash indexes in the HashMap of OpenTypeVerticalData.
786         (WebCore::FontVerticalDataCacheKeyTraits::emptyValue): New function for
787         giving an empty FontFileKey.
788         (WebCore::FontVerticalDataCacheKeyTraits::constructDeletedValue): New
789         function to create a FontFileKey for deleted values.
790         (WebCore::FontVerticalDataCacheKeyTraits::isDeletedValue): New function
791         to check if a HashMap entry is available.
792         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
793         (WebCore::FontCustomPlatformData::fontPlatformData): Added font
794         orientation as a parameter to the FontPlatformData constructor.
795         * platform/graphics/freetype/FontPlatformData.h: Added m_orientation to
796         store the font orientation and m_horizontalOrientationMatrix to store
797         the Cairo matrix for horizontal orientation, which can be restored in
798         setOrientation().
799         (WebCore::FontPlatformData::FontPlatformData): Added font orientation as
800         a parameter.
801         (WebCore::FontPlatformData::orientation): Implemented this function
802         based on m_orientation.
803         * platform/graphics/freetype/FontPlatformDataFreeType.cpp: Added new
804         helper function rotateCairoMatrixForVerticalOrientation() to rotate the
805         Cairo matrix in case of vertical orientation.
806         (WebCore::FontPlatformData::FontPlatformData): Initialized
807         m_orientation.
808         (WebCore::FontPlatformData::operator=): Added m_orientation and
809         m_horizontalOrientationMatrix to the assignment operator.
810         (WebCore::FontPlatformData::operator==): Added m_orientation to the
811         equal operator.
812         (WebCore::FontPlatformData::initializeWithFontFace): Rotated and
813         translated fonts if orientation is vertical. Also stored the horizontal
814         Cairo matrix.
815         (WebCore::FontPlatformData::verticalData): Returned the vertical data
816         from the font cache.
817         (WebCore::FontPlatformData::openTypeTable): Loaded the font table into
818         a shared buffer.
819         (WebCore::FontPlatformData::setOrientation): Replaced the scaled font
820         data by rotating fonts according to the new orientation.
821         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
822         (WebCore::SimpleFontData::platformInit): Set the glyph's height and
823         width according to the font orientation. It also sets EM.
824         (WebCore::SimpleFontData::platformCreateScaledFontData): Added
825         orientation to the FontPlatformData constructor.
826         (WebCore::SimpleFontData::platformWidthForGlyph): Returned the glyph's
827         width according the orientation.
828         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
829         (WebCore::CairoGetGlyphWidthAndExtents): Obtained the character advance
830         and extents according to the font orientation.
831
832 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
833
834         [AX] Use toAccessibilityRenderObject() instead of using static_cast<>
835         https://bugs.webkit.org/show_bug.cgi?id=123986
836
837         Reviewed by Mario Sanchez Prada.
838
839         Though there is toAccessibilityRenderObject(), static_cast<> are being used by many places.
840         To use toAccessibilityRenderObject() is more helpful to find bad type cast.
841
842         No new tests, no behavior changes.
843
844         * accessibility/AXObjectCache.cpp:
845         (WebCore::AXObjectCache::notificationPostTimerFired):
846         * accessibility/AccessibilityImageMapLink.cpp:
847         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
848         * accessibility/AccessibilityRenderObject.cpp:
849         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
850         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
851         * accessibility/ios/AccessibilityObjectIOS.mm:
852         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
853         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
854         (AXAttributeStringSetElement):
855         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
856
857 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
858
859         [AX] Use toAccessibilityTable() instead of using manual static_cast<>
860         https://bugs.webkit.org/show_bug.cgi?id=123982
861
862         Reviewed by Mario Sanchez Prada.
863
864         Though there is toAccessibilityTable(), static_cast<> are being used by many places.
865         We need to use toAccessibilityTable().
866
867         No new tests, no behavior changes.
868
869         * accessibility/AccessibilityARIAGridRow.cpp:
870         (WebCore::AccessibilityARIAGridRow::disclosedRows):
871         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
872         * accessibility/AccessibilityTableHeaderContainer.cpp:
873         (WebCore::AccessibilityTableHeaderContainer::addChildren):
874         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
875         (cell):
876         (cellAtIndex):
877         (webkitAccessibleTableGetIndexAt):
878         (webkitAccessibleTableGetNColumns):
879         (webkitAccessibleTableGetNRows):
880         (webkitAccessibleTableGetColumnHeader):
881         (webkitAccessibleTableGetRowHeader):
882         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
883         (-[WebAccessibilityObjectWrapper tableParent]):
884         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
885         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
886         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
887         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
888
889 2013-11-07  Andreas Kling  <akling@apple.com>
890
891         Use tighter InlineBox subtypes in some places.
892         <https://webkit.org/b/123980>
893
894         RenderLineBreak and RenderBox line box wrappers are always going to
895         be InlineElementBox, so codify this with tighter types. Also made
896         the various positionLine() functions take tighter reference types.
897
898         All the casting to renderer-appropriate box types happens inside of
899         RenderBlockFlow::computeBlockDirectionPositionsForLine() and
900         propagates from there.
901
902         Reviewed by Antti Koivisto.
903
904 2013-11-07  Mario Sanchez Prada  <mario.prada@samsung.com>
905
906         AX: [ATK] Video and audio elements are not properly exposed
907         https://bugs.webkit.org/show_bug.cgi?id=123894
908
909         Reviewed by Chris Fleizach.
910
911         Expose <audio> and <video> elements with ATK_ROLE_EMBEDDED, so we
912         can identify them properly from ATK/AT-SPI based ATs.
913
914         Tests: platform/gtk/accessibility/media-controls-panel-title.html
915                platform/efl/accessibility/media-emits-object-replacement.html
916                platform/gtk/accessibility/media-emits-object-replacement.html
917
918         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
919         (atkRole): Add the new mapping.
920
921 2013-11-07  Laszlo Vidacs  <lac@inf.u-szeged.hu>
922         
923         Fix crash in BitmapImage::destroyDecodedData()
924         https://bugs.webkit.org/show_bug.cgi?id=116494
925
926         Reviewed by Csaba Osztrogonác.
927
928         Merge from https://chromium.googlesource.com/chromium/blink/+/6b6887bf53068f8537908e501fdc7317ad2c6d86
929
930         * platform/graphics/BitmapImage.cpp:
931         (WebCore::BitmapImage::destroyDecodedData):
932
933 2013-11-06  Sergio Villar Senin  <svillar@igalia.com>
934
935         [CSS Grid Layout] CSSParser should reject <track-list> without a <track-size>
936         https://bugs.webkit.org/show_bug.cgi?id=118025
937
938         Reviewed by Andreas Kling.
939
940         From Blink r152914 by <jchaffraix@chromium.org>
941
942         Make sure that we parse at least 1 <track-size> inside each
943         <track-list>. The old parser code allowed track-lists exclusively
944         made of <track-name>. The way it was implemented eases the future
945         addition of parsing for the repeat() function.
946
947         * css/CSSParser.cpp:
948         (WebCore::CSSParser::parseGridTrackList):
949         * css/StyleResolver.cpp:
950         (WebCore::createGridTrackList): ASSERT if we don't find any
951         <track-size> now that we detect their absence in the parser.
952
953 2013-11-06  Sergio Villar Senin  <svillar@igalia.com>
954
955         [CSS Grid Layout] Fix handling of 'inherit' and 'initial' for grid lines
956         https://bugs.webkit.org/show_bug.cgi?id=115401
957
958         Reviewed by Andreas Kling.
959
960         From Blink r150585 by <jchaffraix@chromium.org>
961
962         Added support for 'inherit' and 'initial' special values to
963         grid-auto-{columns|rows} and grid-definition-{columns|rows}.
964
965         * css/StyleResolver.cpp:
966         (WebCore::StyleResolver::applyProperty): Resolve 'initial' and 'inherit'.
967         * rendering/style/RenderStyle.h: Added initialNamedGrid{Column|Row}Lines().
968         * rendering/style/StyleGridData.cpp:
969         (WebCore::StyleGridData::StyleGridData): Initialize m_namedGrid{Column|Row}Lines.
970
971 2013-11-07  Andreas Kling  <akling@apple.com>
972
973         Clean up BidiRun a little bit.
974         <https://webkit.org/b/123964>
975
976         Make BidiRun's member variables private and add accessors for them.
977         In doing so, codify the following:
978
979             - BidiRun always has a corresponding RenderObject.
980             - The inline box is never cleared after being set.
981
982         Reviewed by Antti Koivisto.
983
984 2013-11-07  Andreas Kling  <akling@apple.com>
985
986         More CSSPrimitiveValue constructors should return PassRef.
987         <https://webkit.org/b/123953>
988
989         Make some more CSSPrimitiveValue constructor helpers (that are
990         known to never return null) return PassRef instead of PassRefPtr.
991
992         Reviewed by Antti Koivisto.
993
994 2013-11-07  Andreas Kling  <akling@apple.com>
995
996         Generate type casting helpers for line boxes and use them.
997         <https://webkit.org/b/123976>
998
999         Semi-automatically generate the full set of toFooInlineBox()
1000         helpers with macros instead of having them (partially) hand-coded.
1001         Replaced static_casts with the new helpers across the codebase.
1002
1003         Also made the isFooInlineBox() overrides private since they should
1004         never be called when the type is already known.
1005
1006         Reviewed by Antti Koivisto.
1007
1008 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
1009
1010         Simplify Attr by removing m_specified member variable and setter
1011         https://bugs.webkit.org/show_bug.cgi?id=123965
1012
1013         Reviewed by Andreas Kling.
1014
1015         Merge https://chromium.googlesource.com/chromium/blink/+/597f44ec928e08820574728889adabc6d8ecd746
1016
1017         m_specified is always true in WebKit so simply return true in Attr::specified().
1018
1019         * dom/Attr.cpp:
1020         (WebCore::Attr::Attr):
1021         * dom/Attr.h:
1022         * dom/Document.cpp:
1023         (WebCore::Document::adoptNode):
1024
1025 2013-10-25  Jer Noble  <jer.noble@apple.com>
1026
1027         [MSE] Add MediaSource extensions to AudioTrack, VideoTrack, and TextTrack.
1028         https://bugs.webkit.org/show_bug.cgi?id=123374
1029
1030         Reviewed by Eric Carlson.
1031
1032         No tests added; tests will be added when Mock implementations are added in a future patch.
1033
1034         Add new partial interfaces for added methods on AudioTrack, TextTrack, and VideoTrack:
1035         * Modules/mediasource/AudioTrackMediaSource.idl: Add read-only sourceBuffer attribute.
1036         * Modules/mediasource/TextTrackMediaSource.idl: Ditto.
1037         * Modules/mediasource/VideoTrackMediaSource.idl: Ditto.
1038         * Modules/mediasource/AudioTrackMediaSource.h:
1039         (WebCore::AudioTrackMediaSource::sourceBuffer): Added static wrapper around non-static sourceBuffer().
1040         * Modules/mediasource/TextTrackMediaSource.h:
1041         (WebCore::TextTrackMediaSource::sourceBuffer): Ditto.
1042         * Modules/mediasource/VideoTrackMediaSource.h:
1043         (WebCore::VideoTrackMediaSource::sourceBuffer): Ditto.
1044
1045         Add support for writable kind & language attributes through a custom setter:
1046         * bindings/js/JSAudioTrackCustom.cpp:
1047         (WebCore::JSAudioTrack::setKind):
1048         (WebCore::JSAudioTrack::setLanguage):
1049         * bindings/js/JSTextTrackCustom.cpp:
1050         (WebCore::JSTextTrack::setKind):
1051         (WebCore::JSTextTrack::setLanguage):
1052         * bindings/js/JSVideoTrackCustom.cpp:
1053         (WebCore::JSVideoTrack::setKind):
1054         (WebCore::JSVideoTrack::setLanguage):
1055         * html/track/AudioTrack.idl:
1056         * html/track/TextTrack.idl:
1057         * html/track/VideoTrack.idl:
1058
1059         Add setter methods to the implementation classes:
1060         * html/track/TextTrack.cpp:
1061         (WebCore::TextTrack::TextTrack):
1062         (WebCore::TextTrack::setKind):
1063         (WebCore::TextTrack::setLanguage):
1064         * html/track/TextTrack.h:
1065         * html/track/TrackBase.cpp:
1066         (WebCore::TrackBase::TrackBase):
1067         (WebCore::TrackBase::setKind):
1068         (WebCore::TrackBase::setKindInternal):
1069         * html/track/TrackBase.h:
1070         (WebCore::TrackBase::setLanguage):
1071         (WebCore::TrackBase::sourceBuffer):
1072         (WebCore::TrackBase::setSourceBuffer):
1073         * html/track/VideoTrack.cpp:
1074         (WebCore::VideoTrack::VideoTrack):
1075         (WebCore::VideoTrack::setKind):
1076         (WebCore::VideoTrack::setLanguage):
1077         * html/track/VideoTrack.h:
1078
1079         Implement the unimplemented portions of MediaSource and SourceBuffer:
1080         * Modules/mediasource/MediaSource.cpp:
1081         (WebCore::MediaSource::removeSourceBuffer):
1082         * Modules/mediasource/MediaSourceBase.cpp:
1083         (WebCore::MediaSourceBase::MediaSourceBase):
1084         (WebCore::MediaSourceBase::setPrivateAndOpen):
1085         (WebCore::MediaSourceBase::setReadyState):
1086         (WebCore::MediaSourceBase::attachToElement):
1087         * Modules/mediasource/MediaSourceBase.h:
1088         (WebCore::MediaSourceBase::mediaElement):
1089         * Modules/mediasource/SourceBuffer.cpp:
1090         (WebCore::SourceBuffer::videoTracks):
1091         (WebCore::SourceBuffer::audioTracks):
1092         (WebCore::SourceBuffer::textTracks):
1093         (WebCore::SourceBuffer::sourceBufferPrivateDidAddAudioTrack):
1094         (WebCore::SourceBuffer::sourceBufferPrivateDidAddVideoTrack):
1095         (WebCore::SourceBuffer::sourceBufferPrivateDidAddTextTrack):
1096         (WebCore::SourceBuffer::sourceBufferPrivateDidChangeActiveState):
1097         * Modules/mediasource/SourceBuffer.h:
1098         * Modules/mediasource/SourceBuffer.idl:
1099
1100         Add new files to the project:
1101         * DerivedSources.make:
1102         * WebCore.xcodeproj/project.pbxproj:
1103
1104         And a smorgasbord of other utility changes:
1105         * html/HTMLMediaElement.cpp:
1106         (WebCore::HTMLMediaElement::loadResource): Pass this when attaching.
1107         (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Ditto.
1108         * html/HTMLMediaSource.h:
1109         * html/track/TextTrackList.cpp:
1110         (TextTrackList::item): Make const.
1111         * html/track/TextTrackList.h:
1112         (WebCore::TextTrackList::lastItem): Added.
1113         * platform/graphics/InbandTextTrackPrivate.h:
1114         (WebCore::InbandTextTrackPrivate::create): Added.
1115         (WebCore::MockSourceBufferPrivate::trackDidChangeEnabled):
1116
1117 2013-11-06  Vani Hegde  <vani.hegde@samsung.com>
1118
1119         Applied background color is not retained after typing a characters
1120         https://bugs.webkit.org/show_bug.cgi?id=117337
1121
1122         Reviewed by Ryosuke Niwa.
1123
1124         While deleting a selection, only the inheritable style properties
1125         applied on the selection were saved.
1126         Since background color is considered as noninheritable style property,
1127         on deleting the selection, background color set on it was being lost.
1128         Hence on typing in new text, it would not have the applied
1129         background color set.
1130         Fixed by saving editing preoperties that are already in effect
1131         on a selection before deleting it.
1132
1133         Test: editing/style/background-color-retained.html
1134
1135         * editing/DeleteSelectionCommand.cpp:
1136         (WebCore::DeleteSelectionCommand::saveTypingStyleState):
1137         Modified as to save EditingPropertiesInEffect on a selection before
1138         deleting it.
1139
1140 2013-11-06  Andreas Kling  <akling@apple.com>
1141
1142         InlineBox: Make paint() and nodeAtPoint() pure virtuals.
1143         <https://webkit.org/b/123937>
1144
1145         ...and move the current implementations to InlineElementBox.
1146         All subclasses were already overriding these functions so the move
1147         is completely natural.
1148
1149         Reviewed by Anders Carlsson.
1150
1151 2013-11-06  Andreas Kling  <akling@apple.com>
1152
1153         Nothing should return std::unique_ptr<InlineBox>.
1154         <https://webkit.org/b/123936>
1155
1156         Made RenderBox, RenderLineBreak and RenderListMarker return tightly
1157         typed InlineElementBoxes instead.
1158
1159         Reviewed by Anders Carlsson.
1160
1161 2013-11-06  Daniel Bates  <dabates@apple.com>
1162
1163         [iOS] Upstream Letterpress effect
1164         https://bugs.webkit.org/show_bug.cgi?id=123932
1165
1166         Reviewed by Sam Weinig.
1167
1168         Test: platform/iphone-simulator/iphone/getComputedStyle-text-decoration-letterpress.html
1169
1170         * Configurations/FeatureDefines.xcconfig: Add feature define ENABLE_LETTERPRESS disabled
1171         by default. We only enable letterpress on iOS.
1172         * css/CSSComputedStyleDeclaration.cpp:
1173         (WebCore::renderTextDecorationFlagsToCSSValue): Add support for CSS value -webkit-letterpress.
1174         * css/CSSParser.cpp:
1175         (WebCore::CSSParser::parseTextDecoration): Ditto.
1176         * css/CSSPrimitiveValueMappings.h:
1177         (WebCore::CSSPrimitiveValue::operator TextDecoration): Ditto.
1178         * css/CSSValueKeywords.in: Added CSS value -webkit-letterpress.
1179         * platform/graphics/GraphicsContext.h:
1180         * platform/graphics/mac/FontMac.mm:
1181         (WebCore::fillVectorWithHorizontalGlyphPositions): Added.
1182         (WebCore::shouldUseLetterpressEffect): Added.
1183         (WebCore::showLetterpressedGlyphsWithAdvances): Added.
1184         (WebCore::showGlyphsWithAdvances): Modified to call showLetterpressedGlyphsWithAdvances()
1185         to show a letterpressed glyph. I also included additional iOS-specific changes.
1186         (WebCore::Font::drawGlyphs):
1187         * rendering/TextPaintStyle.cpp:
1188         (WebCore::TextPaintStyle::TextPaintStyle): 
1189         (WebCore::computeTextPaintStyle): Modified to compute letterpress effect style.
1190         (WebCore::updateGraphicsContext): Modified to apply/unapply letterpress effect drawing mode.
1191         * rendering/TextPaintStyle.h:
1192         * rendering/style/RenderStyleConstants.h:
1193
1194 2013-11-06  Ryosuke Niwa  <rniwa@webkit.org>
1195
1196         Crash in SliderThumbElement::dragFrom
1197         https://bugs.webkit.org/show_bug.cgi?id=123873
1198
1199         Reviewed by Sam Weinig.
1200
1201         Moved Ref.
1202
1203         * html/RangeInputType.cpp:
1204         (WebCore::RangeInputType::handleMouseDownEvent):
1205         * html/shadow/SliderThumbElement.cpp:
1206         (WebCore::SliderThumbElement::dragFrom):
1207
1208 2013-11-06  Daniel Bates  <dabates@apple.com>
1209
1210         Cleanup FontMac.mm
1211         https://bugs.webkit.org/show_bug.cgi?id=123928
1212
1213         Reviewed by Andy Estes.
1214
1215         * platform/graphics/mac/FontMac.mm:
1216         (WebCore::showGlyphsWithAdvances): Inline the value of variable isVertical as we
1217         reference it exactly once and its value is sufficiently clear.
1218         (WebCore::Font::drawGlyphs): Remove default case in switch block so that the compiler
1219         checks that all cases are covered. Move definition of platformData to the top of the
1220         function and use it whenever we want to access the platform font data
1221
1222 2013-11-06  Brent Fulgham  <bfulgham@apple.com>
1223
1224         [WebGL] We should not allow generateMipMap on compressed textures
1225         https://bugs.webkit.org/show_bug.cgi?id=123915
1226         <rdar://problem/15201274>
1227
1228         Reviewed by Dean Jackson.
1229
1230         Found by existing conformance/extensions/webgl-compressed-texture-s3tc.html
1231
1232         * html/canvas/WebGLRenderingContext.cpp:
1233         (WebCore::WebGLRenderingContext::compressedTexImage2D): Set compressed flag.
1234         (WebCore::WebGLRenderingContext::compressedTexSubImage2D): Ditto.
1235         (WebCore::WebGLRenderingContext::generateMipmap): For Apple builds, check state
1236         of compressed flag and generate appropriate WebGL error if necessary.
1237         * html/canvas/WebGLTexture.cpp:
1238         (WebCore::WebGLTexture::WebGLTexture): Set compressed flag to false by default
1239         (WebCore::WebGLTexture::isCompressed): Added
1240         (WebCore::WebGLTexture::setCompressed): Added
1241         * html/canvas/WebGLTexture.h:
1242         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1243         (WebCore::GraphicsContext3D::generateMipmap): Switch implementation to use proper
1244         glGenerateMipmaps, rather than the glGenerateMipmapsEXT method.
1245
1246 2013-11-06  Joseph Pecoraro  <pecoraro@apple.com>
1247
1248         Web Inspector: Changes to CodeGeneratorInspectorStrings.py should rebuild inspector generated files
1249         https://bugs.webkit.org/show_bug.cgi?id=123925
1250
1251         Reviewed by Timothy Hatcher.
1252
1253         * CMakeLists.txt:
1254         * DerivedSources.make:
1255         * GNUmakefile.am:
1256
1257 2013-11-06  Bem Jones-Bey  <bjonesbe@adobe.com>
1258
1259         Rename region line offset methods
1260         https://bugs.webkit.org/show_bug.cgi?id=123897
1261
1262         Reviewed by Sam Weinig.
1263
1264         Because of the large number of overloads on the line offset methods,
1265         it is very hard to read code using them, which also makes it harder to
1266         move them out of RenderBlock. This patch renames the methods that take
1267         a region as an argument to make it clearer when looking at the code
1268         how the differ from the ones that don't.
1269
1270         No new tests, no behavior change.
1271
1272         * rendering/RenderBlock.cpp:
1273         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
1274         * rendering/RenderBlock.h:
1275         (WebCore::RenderBlock::availableLogicalWidthForLineInRegion):
1276         (WebCore::RenderBlock::logicalRightOffsetForLineInRegion):
1277         (WebCore::RenderBlock::logicalLeftOffsetForLineInRegion):
1278         (WebCore::RenderBlock::startOffsetForLineInRegion):
1279         (WebCore::RenderBlock::endOffsetForLineInRegion):
1280         (WebCore::RenderBlock::availableLogicalWidthForLine):
1281         * rendering/RenderBox.cpp:
1282         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
1283         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
1284
1285 2013-11-06  Antti Koivisto  <antti@apple.com>
1286
1287         HTMLCollection should use CollectionIndexCache
1288         https://bugs.webkit.org/show_bug.cgi?id=123906
1289
1290         Reviewed by Ryosuke Niwa.
1291         
1292         More code sharing.
1293
1294         * bindings/js/JSDOMWindowCustom.cpp:
1295         (WebCore::namedItemGetter):
1296         * bindings/js/JSHTMLDocumentCustom.cpp:
1297         (WebCore::JSHTMLDocument::nameGetter):
1298         * dom/ChildNodeList.h:
1299         * dom/CollectionIndexCache.h:
1300         (WebCore::::nodeBeforeCached):
1301         (WebCore::::nodeAfterCached):
1302         (WebCore::::nodeAt):
1303             
1304             Add a mechanism for disabling use of backward traversal.
1305
1306         * dom/LiveNodeList.h:
1307         (WebCore::LiveNodeList::collectionCanTraverseBackward):
1308         * html/HTMLCollection.cpp:
1309         (WebCore::HTMLCollection::HTMLCollection):
1310         (WebCore::isMatchingElement):
1311         (WebCore::HTMLCollection::iterateForPreviousElement):
1312         (WebCore::firstMatchingElement):
1313         (WebCore::nextMatchingElement):
1314         (WebCore::HTMLCollection::length):
1315         (WebCore::HTMLCollection::item):
1316         (WebCore::nameShouldBeVisibleInDocumentAll):
1317         (WebCore::firstMatchingChildElement):
1318         (WebCore::nextMatchingSiblingElement):
1319         (WebCore::HTMLCollection::firstElement):
1320         (WebCore::HTMLCollection::traverseForward):
1321         (WebCore::HTMLCollection::collectionFirst):
1322         (WebCore::HTMLCollection::collectionLast):
1323         (WebCore::HTMLCollection::collectionTraverseForward):
1324         (WebCore::HTMLCollection::collectionTraverseBackward):
1325         (WebCore::HTMLCollection::invalidateCache):
1326         (WebCore::HTMLCollection::namedItem):
1327         (WebCore::HTMLCollection::updateNameCache):
1328         * html/HTMLCollection.h:
1329         (WebCore::HTMLCollection::collectionCanTraverseBackward):
1330         
1331             Disable use of backward traversal for collections that use custom traversal.
1332
1333 2013-11-06  Brendan Long  <b.long@cablelabs.com>
1334
1335         Add "id" attribute to TextTrack
1336         https://bugs.webkit.org/show_bug.cgi?id=123825
1337
1338         Reviewed by Eric Carlson.
1339
1340         Test: media/track/track-id.html
1341
1342         * html/HTMLMediaElement.cpp:
1343         (HTMLMediaElement::addTextTrack): Add emptyString() for track id.
1344         * html/track/AudioTrack.cpp:
1345         (WebCore::AudioTrack::AudioTrack): Pass trackPrivate->id() to TrackBase.
1346         (WebCore::AudioTrack::idChanged): Added, set id.
1347         * html/track/AudioTrack.h: Move m_id to TrackBase.
1348         * html/track/InbandTextTrack.cpp:
1349         (WebCore::InbandTextTrack::InbandTextTrack): Pass trackPrivate->id() to TrackBase.
1350         (WebCore::InbandTextTrack::idChanged): Added, set id.
1351         * html/track/InbandTextTrack.h: Add idChanged().
1352         * html/track/LoadableTextTrack.cpp:
1353         (WebCore::LoadableTextTrack::LoadableTextTrack): Add emptyString() for track id.
1354         (WebCore::LoadableTextTrack::id): Override to return the track element's id.
1355         * html/track/TextTrack.cpp:
1356         (WebCore::TextTrack::captionMenuOffItem): Add empty string for track id.
1357         (WebCore::TextTrack::captionMenuAutomaticItem): Add empty string for track id.
1358         (WebCore::TextTrack::TextTrack): Pass id to TrackBase.
1359         * html/track/TextTrack.h:
1360         (WebCore::TextTrack::create): Add id parameter.
1361         * html/track/TextTrack.idl: Add id attribute.
1362         * html/track/TrackBase.cpp:
1363         (WebCore::TrackBase::TrackBase): Add m_id.
1364         * html/track/TrackBase.h: Add id attribute / m_id.
1365         * html/track/VideoTrack.cpp:
1366         (WebCore::VideoTrack::VideoTrack): Pass trackPrivate->id() to TrackBase.
1367         (WebCore::VideoTrack::idChanged): Added, set id.
1368         * html/track/VideoTrack.h: Move m_id to TrackBase.
1369         * platform/graphics/TrackPrivateBase.h: Add idChanged() callback.
1370
1371 2013-11-06  Antti Koivisto  <antti@apple.com>
1372
1373         Move array position caching out from HTMLCollection
1374         https://bugs.webkit.org/show_bug.cgi?id=123895
1375
1376         Reviewed by Darin Adler.
1377
1378         This caching complicates the logic but is used by a single subclass
1379         (HTMLFormControlsCollection) only. The subclass can do the caching itself.
1380
1381         * html/HTMLAllCollection.cpp:
1382         (WebCore::HTMLAllCollection::HTMLAllCollection):
1383         * html/HTMLCollection.cpp:
1384         (WebCore::HTMLCollection::HTMLCollection):
1385         (WebCore::HTMLCollection::create):
1386         (WebCore::HTMLCollection::item):
1387         (WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
1388         (WebCore::HTMLCollection::firstElement):
1389         
1390             Renamed from traverseFirstElement.
1391
1392         (WebCore::HTMLCollection::traverseForwardToOffset):
1393         (WebCore::HTMLCollection::invalidateCache):
1394         
1395             Make cache invalidation virtual so we can clear HTMLTableRowsCollection index cache.
1396
1397         (WebCore::HTMLCollection::namedItem):
1398         (WebCore::HTMLCollection::updateNameCache):
1399         
1400             Use traverseForwardToOffset instead traverseNextElement. This allows removal of traverseNextElement.
1401
1402         * html/HTMLCollection.h:
1403         (WebCore::HTMLCollection::usesCustomForwardOnlyTraversal):
1404         
1405             Renamed the enum and the accessor to be more informative.
1406
1407         (WebCore::HTMLCollection::setCachedElement):
1408         (WebCore::HTMLCollection::customElementAfter):
1409         
1410             Renamed from virtualItemAfter.
1411
1412         * html/HTMLFormControlsCollection.cpp:
1413         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
1414         (WebCore::findFormAssociatedElement):
1415         (WebCore::HTMLFormControlsCollection::customElementAfter):
1416         
1417             Move the array position caching logic here.
1418
1419         (WebCore::HTMLFormControlsCollection::invalidateCache):
1420         * html/HTMLFormControlsCollection.h:
1421         * html/HTMLNameCollection.cpp:
1422         (WebCore::HTMLNameCollection::HTMLNameCollection):
1423         * html/HTMLOptionsCollection.cpp:
1424         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
1425         * html/HTMLTableRowsCollection.cpp:
1426         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
1427         (WebCore::HTMLTableRowsCollection::customElementAfter):
1428         * html/HTMLTableRowsCollection.h:
1429
1430 2013-11-06  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1431
1432         [ATK] accessibility/title-ui-element-correctness.html fails
1433         https://bugs.webkit.org/show_bug.cgi?id=99825
1434
1435         Reviewed by Mario Sanchez Prada.
1436
1437         When calling setAtkRelationSetFromCoreObject a new ATK_LABELLED_BY_RELATION
1438         is added, adding proper label element as a relation. When the document structure
1439         has been changed and a different label should be linked as a relation, current ATK
1440         implementation adds it as a next target on relation's target list, while
1441         WTR/DumpRenderTree implementation takes only first one into account.
1442         This patch adds a new function removing current relations before adding new ones.
1443
1444         Covered by existing tests.
1445
1446         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1447         (removeAtkRelationFromRelationSetByType):
1448         (setAtkRelationSetFromCoreObject):
1449
1450 2013-11-06  Daniel Bates  <dabates@apple.com>
1451
1452         Add ENABLE(TEXT_SELECTION)
1453         https://bugs.webkit.org/show_bug.cgi?id=123827
1454
1455         Reviewed by Ryosuke Niwa.
1456
1457         Add compile-time guard, ENABLE(TEXT_SELECTION), to enable or
1458         disable selection painting in WebCore (enabled by default).
1459
1460         On iOS we disable WebCore selection painting and have UIKit
1461         paint the selection.
1462
1463         * rendering/InlineTextBox.cpp:
1464         (WebCore::InlineTextBox::paintSelection): Only paint selection when
1465         TEXT_SELECTION is enabled.
1466         * rendering/LogicalSelectionOffsetCaches.h:
1467         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
1468         For now, add a ENABLE(TEXT_SELECTION)-guard around an assertion. Added
1469         a FIXME comment to investigate the callers and either move the assertion
1470         to the appropriate callers or structure the code such that we can remove
1471         the assertion.
1472         * rendering/RenderBlock.cpp:
1473         (WebCore::RenderBlock::paintSelection): Only paint selection when
1474         TEXT_SELECTION is enabled.
1475         * rendering/TextPaintStyle.cpp:
1476         (WebCore::computeTextSelectionPaintStyle): Only compute the selection
1477         paint style when TEXT_SELECTION is enabled. Otherwise, return a paint
1478         style identical to the text paint style. Also, substitute nullptr for 0.
1479
1480 2013-11-06  Jer Noble  <jer.noble@apple.com>
1481
1482         Unrevewied Windows build fix after r158736; add InlineElementBox.cpp to the RenderingAllInOne.cpp file.
1483
1484         * rendering/RenderingAllInOne.cpp:
1485
1486 2013-11-06  Sergio Villar Senin  <svillar@igalia.com>
1487
1488         Unreviewed build fix, style() return type is now a reference.
1489
1490         * rendering/RenderGrid.cpp:
1491         (WebCore::RenderGrid::resolveGridPositionFromStyle):
1492
1493 2013-11-06  Jer Noble  <jer.noble@apple.com>
1494
1495         Unreviewed 32-bit Mac build fix; use an explicit FloatSize -> IntSize conversion function.
1496
1497         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1498         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
1499
1500 2013-11-04  Jer Noble  <jer.noble@apple.com>
1501
1502         Playing many sounds with HTML5 Audio makes WebKit unresponsive
1503         https://bugs.webkit.org/show_bug.cgi?id=116145
1504
1505         Reviewed by Eric Carlson.
1506
1507         Cache as much information as possible from AVPlayerItem to eliminate unneccesary
1508         calls into AVFoundation.
1509
1510         Add WillChange/DidChange functions to handle the results of KVO notifications
1511         from AVPlayerItem and AVPlayer:
1512         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1513         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPlay):
1514         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPause):
1515         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate):
1516         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatusDidChange):
1517         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpWillChange):
1518         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpDidChange):
1519         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyWillChange):
1520         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyDidChange):
1521         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullWillChange):
1522         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullDidChange):
1523         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
1524         (WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
1525         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
1526         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasEnabledAudioDidChange):
1527         (WebCore::MediaPlayerPrivateAVFoundationObjC::presentationSizeDidChange):
1528         (WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
1529         (WebCore::MediaPlayerPrivateAVFoundationObjC::rateDidChange):
1530         (WebCore::itemKVOProperties):
1531         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1532
1533         Instruct the HTMLMediaElement to cache the currentTime value for 5 seconds:
1534         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1535         (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime):
1536
1537         Add and initialize member variables to hold these cached values:
1538         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1539         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1540         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
1541         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
1542
1543         Add a new Notification type which can take (and call) a Function object:
1544         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1545         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
1546         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1547         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
1548         (WebCore::MediaPlayerPrivateAVFoundation::Notification::function):
1549
1550         Implement queries in terms of the cached values of AVPlayerItem and AVPlayer
1551         properties:
1552         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1553         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1554         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
1555         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
1556         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
1557         (WebCore::MediaPlayerPrivateAVFoundationObjC::rate):
1558         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
1559         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
1560         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
1561         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
1562         (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes):
1563         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
1564         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
1565         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
1566         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
1567         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
1568
1569         Invalidate the cached currentTime before calling scheduleTimeUpdate so that the
1570         correct movieTime is saved in m_clockTimeAtLastUpdateEvent:
1571         * html/HTMLMediaElement.cpp:
1572         (HTMLMediaElement::setReadyState):
1573
1574 2013-10-24  Sergio Villar Senin  <svillar@igalia.com>
1575
1576         [CSS Grid Layout] Add support for named grid areas
1577         https://bugs.webkit.org/show_bug.cgi?id=120045
1578
1579         Reviewed by Andreas Kling.
1580
1581         From Blink r155555, r155850 and r155889 by <jchaffraix@chromium.org>
1582
1583         Added support for named grid areas. Basically a named grid area is
1584         now a valid grid position. The shorthand parsing of grid-area was
1585         split from the grid-{row|column} as the rules for expanding are
1586         slightly different.
1587
1588         Unknown grid area names are treated as 'auto' as per the
1589         specification. This means that for those cases we need to trigger
1590         the auto-placement algorithm.
1591
1592         Tests: fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html
1593                fast/css-grid-layout/grid-item-named-grid-area-resolution.html
1594
1595         * css/CSSComputedStyleDeclaration.cpp:
1596         (WebCore::valueForGridPosition):
1597         * css/CSSParser.cpp:
1598         (WebCore::CSSParser::parseValue):
1599         (WebCore::CSSParser::parseGridPosition):
1600         (WebCore::gridMissingGridPositionValue):
1601         (WebCore::CSSParser::parseGridItemPositionShorthand):
1602         (WebCore::CSSParser::parseGridAreaShorthand):
1603         (WebCore::CSSParser::parseSingleGridAreaLonghand):
1604         * css/CSSParser.h:
1605         * css/StyleResolver.cpp:
1606         (WebCore::StyleResolver::adjustRenderStyle):
1607         (WebCore::StyleResolver::adjustGridItemPosition):
1608         (WebCore::createGridPosition):
1609         * css/StyleResolver.h:
1610         * rendering/RenderGrid.cpp:
1611         (WebCore::RenderGrid::resolveGridPositionFromStyle):
1612         * rendering/style/GridPosition.h:
1613         (WebCore::GridPosition::isNamedGridArea):
1614         (WebCore::GridPosition::setNamedGridArea):
1615         (WebCore::GridPosition::namedGridLine):
1616
1617 2013-11-06  Chris Fleizach  <cfleizach@apple.com>
1618
1619         AX: Audio and Video attachments are not output to VoiceOver
1620         https://bugs.webkit.org/show_bug.cgi?id=123479
1621
1622         Reviewed by Mario Sanchez Prada.
1623
1624         Video and audio elements don't appear as distinct objects in the AX hierarchy,
1625         nor are they treated as replaceable objects when emitting the text. We should
1626         treat these characters like attachments, for one. On the Mac platform, we should
1627         also identify them with special subroles.
1628
1629         Tests: platform/mac/accessibility/media-emits-object-replacement.html
1630                platform/mac/accessibility/media-role-descriptions.html
1631
1632         * accessibility/AccessibilityNodeObject.cpp:
1633         (WebCore::AccessibilityNodeObject::isGenericFocusableElement):
1634         * accessibility/AccessibilityObject.h:
1635         * accessibility/AccessibilityRenderObject.cpp:
1636         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1637         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1638         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1639         (createAccessibilityRoleMap):
1640         (-[WebAccessibilityObjectWrapper subrole]):
1641         (-[WebAccessibilityObjectWrapper roleDescription]):
1642         * editing/TextIterator.cpp:
1643         (WebCore::isRendererReplacedElement):
1644
1645
1646 2013-11-06  Ryosuke Niwa  <rniwa@webkit.org>
1647
1648         Notify nodes removal to Range/Selection after dispatching blur and mutation event
1649         https://bugs.webkit.org/show_bug.cgi?id=123880
1650
1651         Reviewed by Andreas Kling.
1652
1653         Merge https://chromium.googlesource.com/chromium/blink/+/b60576a0560d14f8757e58d55d37b7cefa48a6ac
1654
1655         In willRemoveChildren in ContainerNode.cpp, call Document::nodeChildrenWillBeRemoved after instead of
1656         before dispatching mutation events because we need to update ranges created by those mutation event
1657         listeners. willRemoveChild was fixed in r115686.
1658
1659         Tests: editing/selection/selection-change-in-blur-event-by-remove-children.html
1660                editing/selection/selection-change-in-mutation-event-by-remove-children.html
1661                fast/dom/Range/range-created-during-remove-children.html
1662
1663         * dom/ContainerNode.cpp:
1664         (WebCore::willRemoveChildren):
1665
1666 2013-11-06  Ryosuke Niwa  <rniwa@webkit.org>
1667
1668         Fix out-of-date offset in selection range code in range.surroundContents
1669         https://bugs.webkit.org/show_bug.cgi?id=123871
1670
1671         Reviewed by Andreas Kling.
1672         
1673         Merge https://chromium.googlesource.com/chromium/blink/+/c89b413ff0fc4aafa0c71d180b0b1e131bb37707
1674
1675         The code in Range::insertNode assumeed that the start offset of the selection range within its container
1676         doesn't change across a call to insertBefore on the container but this is wrong. This patch recomputes
1677         the start offset when it is used after the insertBefore call.
1678
1679         Test: editing/selection/range-surroundContents-with-preceding-node.html
1680
1681         * dom/Range.cpp:
1682         (WebCore::Range::insertNode):
1683
1684 2013-11-06  Andreas Kling  <akling@apple.com>
1685
1686         Add InlineElementBox and stop instantiating InlineBox directly.
1687         <https://webkit.org/b/123882>
1688
1689         Make the InlineBox constructors protected and add a new class
1690         called InlineElementBox on top. This is somewhat analogous to the
1691         split between RenderText and RenderElement, and allows us to make
1692         renderer() return a far tighter RenderBoxModelObject& instead
1693         of a RenderObject&.
1694
1695         Moved over attachLine(), deleteLine() and extractLine() to start
1696         things off. More things will follow.
1697
1698         Reviewed by Antti Koivisto.
1699
1700 2013-11-06  Piotr Grad  <p.grad@samsung.com>
1701
1702         Seek for video doesn't work when playback rate is negative
1703         https://bugs.webkit.org/show_bug.cgi?id=123791
1704
1705         In MediaPlayerPrivateGStreamer::seek negative playback rate was not taken to account.
1706
1707         Reviewed by Philippe Normand.
1708
1709         Test: media/video-seek-with-negative-playback.html
1710
1711         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1712         (WebCore::MediaPlayerPrivateGStreamer::seek):
1713
1714 2013-11-06  Andreas Kling  <akling@apple.com>
1715
1716         Reinstate an annoying assertion that I accidentally commented out.
1717
1718         * loader/icon/IconDatabase.cpp:
1719         (WebCore::IconDatabase::synchronousIconForPageURL):
1720
1721 2013-11-06  Brendan Long  <b.long@cablelabs.com>
1722
1723         [GStreamer] Override label() and language() in Audio and VideoTrackPrivateGStreamer
1724         https://bugs.webkit.org/show_bug.cgi?id=123836
1725
1726         The tests are currently flakey because we only get the label and language if we get
1727         tags after the track client is set.
1728
1729         Reviewed by Philippe Normand.
1730
1731         No new tests because the tests already exist (this fixes flakeyness).
1732
1733         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Override label() and language() to use m_label and m_language.
1734         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Same.
1735         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Make m_label and m_language protected so they can be used in the functions above.
1736
1737 2013-11-05  Andreas Kling  <akling@apple.com>
1738
1739         RenderBlockFlow should only expose its line boxes as RootInlineBox.
1740         <https://webkit.org/b/123878>
1741
1742         The line boxes attached directly to a RenderBlockFlow are always
1743         RootInlineBox objects, so call sites should always use the tightly
1744         typed firstRootBox() and lastRootBox().
1745
1746         This allows the compiler to devirtualize calls to member functions
1747         of RootInlineBox that are marked FINAL.
1748
1749         Reviewed by Antti Koivisto.
1750
1751 2013-11-06  Ryosuke Niwa  <rniwa@webkit.org>
1752
1753         Assertion failure end < m_runCount in WebCore::BidiRunList<WebCore::BidiRun>::reverseRuns
1754         https://bugs.webkit.org/show_bug.cgi?id=123863
1755
1756         Reviewed by Andreas Kling.
1757
1758         Merge https://chromium.googlesource.com/chromium/blink/+/cbaa92c763a37d89eeabd01658e522219299290c
1759
1760         Test: fast/text/bidi-reverse-runs-crash.html
1761
1762         * platform/text/BidiResolver.h:
1763         (WebCore::BidiResolver<Iterator, Run>::createBidiRunsForLine): Don't reverse the runs if there's
1764         nothing to be reversed.
1765
1766 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
1767
1768         Address the review comment after r158724.
1769
1770         * html/RangeInputType.cpp:
1771         (WebCore::RangeInputType::handleMouseDownEvent):
1772
1773 2013-11-05  Zalan Bujtas  <zalan@apple.com>
1774
1775         Widget's position change should not initiate layout, only when its size changes.
1776         https://bugs.webkit.org/show_bug.cgi?id=123860
1777
1778         Reviewed by Andreas Kling.
1779
1780         RenderWidgets initiate unnecessary layouts while scrolling when they are embedded to
1781         overflow:scroll containers. Scroll position change doesn't dirty the render tree
1782         so it should not trigger layout either.
1783
1784         Manual test added. Unfortunately we can't test against the number of layouts yet.
1785
1786         * rendering/RenderWidget.cpp:
1787         (WebCore::RenderWidget::setWidgetGeometry):
1788         (WebCore::RenderWidget::updateWidgetGeometry):
1789         (WebCore::RenderWidget::updateWidgetPosition):
1790
1791 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
1792
1793         Use-after-free in SliderThumbElement::dragFrom
1794         https://bugs.webkit.org/show_bug.cgi?id=123873
1795
1796         Reviewed by Andreas Kling.
1797
1798         Ref the SliderThumbElement since it could go away inside dragFrom.
1799
1800         Test: fast/forms/range/range-type-change-onchange-2.html
1801
1802         * html/RangeInputType.cpp:
1803         (WebCore::RangeInputType::handleMouseDownEvent):
1804
1805 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
1806
1807         Change the order of conditions to avoid computing rendererIsEditable()
1808         https://bugs.webkit.org/show_bug.cgi?id=123868
1809
1810         Reviewed by Andreas Kling.
1811
1812         Merge https://chromium.googlesource.com/chromium/blink/+/c89b413ff0fc4aafa0c71d180b0b1e131bb37707
1813
1814         When we need both Node::renderer() and Node::rendererIsEditable() conditions to be true to perform
1815         some operation, it is more effective to check for renderer() first, so that if this condition fails
1816         we can avoid unnecessary computation of rendererIsEditable().
1817
1818         * dom/Position.cpp:
1819         (WebCore::nextRenderedEditable):
1820         (WebCore::previousRenderedEditable):
1821         * page/EventHandler.cpp:
1822         (WebCore::EventHandler::handleMouseReleaseEvent):
1823
1824 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
1825
1826         simpleUserAgentStyleSheet doesn't have focus ring on anchor element
1827         https://bugs.webkit.org/show_bug.cgi?id=123867
1828
1829         Reviewed by Andreas Kling.
1830
1831         Merge https://chromium.googlesource.com/chromium/blink/+/08ecc23c4d80be9969918c4baf0ac83dc6cb6cbd
1832
1833         * css/CSSDefaultStyleSheets.cpp:
1834
1835 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
1836
1837         valueForBorderRadiusShorthand returns wrong values in some case
1838         https://bugs.webkit.org/show_bug.cgi?id=123866
1839
1840         Reviewed by Andreas Kling.
1841
1842         Merge https://chromium.googlesource.com/chromium/blink/+/0933728126f2db06ab8e945efc98bffa2d42af1c
1843
1844         Because valueForBorderRadiusShorthand misses the followings:
1845         - showHorizontalBottomRight depends on showHorizontalBottomLeft.
1846         - showHorizontalTopRight depends on showHorizontalBottomRight (including showHorizontalBottomLeft).
1847
1848         See also http://dev.w3.org/csswg/css-backgrounds/#the-border-radius
1849
1850         Test: fast/css/getComputedStyle/getComputedStyle-borderRadius-2.html
1851
1852         * css/CSSComputedStyleDeclaration.cpp:
1853         (WebCore::getBorderRadiusShorthandValue):
1854
1855 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
1856
1857         Protect DOM nodes in IndentOutdentCommand::tryIndentingAsListItem()
1858         https://bugs.webkit.org/show_bug.cgi?id=123861
1859
1860         Reviewed by Benjamin Poulain.
1861
1862         Merge https://chromium.googlesource.com/chromium/blink/+/297442eb539a2b764fdad323de79099a70179186 partially.
1863
1864         * editing/IndentOutdentCommand.cpp:
1865         (WebCore::IndentOutdentCommand::tryIndentingAsListItem): Make selectedListItem, previousList, and nextList
1866         RefPtr since they're are used after calling insertNodeBefore.
1867
1868 2013-11-05  Andreas Kling  <akling@apple.com>
1869
1870         Apply more unique_ptr to line box management.
1871         <https://webkit.org/b/123857>
1872
1873         Make all of the functions that return newly-created line boxes
1874         return them packed up in std::unique_ptrs.
1875
1876         There is one exception in RenderBlockLineLayout where the function
1877         createInlineBoxForRenderer() is inconsistent about the ownership of
1878         the returned object. This will be addressed by a subsequent patch.
1879
1880         We now "release" the line boxes into their various home structures,
1881         so the pointer smartness doesn't go end-to-end just yet.
1882
1883         Reviewed by Anders Carlsson.
1884
1885 2013-11-05  Ryosuke Niwa  <rniwa@webkit.org>
1886
1887         getComputedStyle(x).lineHeight is affected by zooming
1888         https://bugs.webkit.org/show_bug.cgi?id=123847
1889
1890         Reviewed by Benjamin Poulain.
1891
1892         Merge https://chromium.googlesource.com/chromium/blink/+/7957097afbab2899ababd0d9c8acbf6e3eddb870
1893
1894         Test: fast/css/line-height-zoom-get-computed-style.html
1895
1896         * css/CSSComputedStyleDeclaration.cpp:
1897         (WebCore::lineHeightFromStyle): Don't round line-height values.
1898         * css/DeprecatedStyleBuilder.cpp:
1899         (WebCore::ApplyPropertyLineHeight::applyValue): Use the computed value instead of the used value.
1900
1901 2013-11-05  James Craig  <jcraig@apple.com>
1902
1903         AX: media controls accessibility needs more work
1904         https://bugs.webkit.org/show_bug.cgi?id=123749
1905
1906         Reviewed by Jer Noble.
1907
1908         Updated some of the control labels/roles to improve accessibility.
1909           - Volume slider is now keyboard/screenreader accessible.
1910           - muteButton was a checkbox toggling checked state, now a button that toggles label "mute/unmute"
1911           - fullscreenButton was a checkbox toggling checked state, now a button that toggles label "display/exit full screen"
1912           - captionButton was a checkbox, now a popup button that launches the newly accessible menu.
1913         Subtitles menu is now keyboard/screenreader accessible (uses roaming tabindex).
1914         Render dump expectations changed because volume slider is now hidden via... 
1915         ...opacity/size (to make accessible without hover) instead of display:none.
1916
1917         Updated existing test coverage.
1918
1919         * Modules/mediacontrols/mediaControlsApple.css:
1920         (audio::-webkit-media-controls-panel .volume-box):
1921         (audio::-webkit-media-controls-panel .volume-box:active):
1922         (audio::-webkit-media-controls-toggle-closed-captions-button):
1923         (audio::-webkit-media-controls-closed-captions-container .list):
1924         (audio::-webkit-media-controls-closed-captions-container li:focus):
1925         * Modules/mediacontrols/mediaControlsApple.js:
1926         (Controller.prototype.createControls):
1927         (Controller.prototype.handleFullscreenChange):
1928         (Controller.prototype.handleMuteButtonClicked):
1929         (Controller.prototype.handleMinButtonClicked):
1930         (Controller.prototype.handleMaxButtonClicked):
1931         (Controller.prototype.handleVolumeSliderChange):
1932         (Controller.prototype.buildCaptionMenu):
1933         (Controller.prototype.focusSiblingCaptionItem):
1934         (Controller.prototype.handleCaptionItemKeyUp):
1935
1936 2013-11-05  Andreas Kling  <akling@apple.com>
1937
1938         Move some plugin-specific code from RenderWidget to RenderEmbeddedObject.
1939         <https://webkit.org/b/123845>
1940
1941         All RenderWidgets representing plugins will be RenderEmbeddedObjects.
1942         Move some of the plugin-specific logic to RenderEmbeddedObject since it
1943         doesn't make sense for all RenderWidgets (frames, embedded documents)
1944         to care about this.
1945
1946         Reviewed by Anders Carlsson.
1947
1948 2013-11-05  Tim Horton  <timothy_horton@apple.com>
1949
1950         Fix the 32-bit build.
1951
1952         * WebCore.exp.in:
1953
1954 2013-11-05  Alexandru Chiculita  <achicu@adobe.com>
1955
1956         Web Inspector: Moving an element while in the DOMNodeRemoved handler will hide it in the inspector
1957         https://bugs.webkit.org/show_bug.cgi?id=123516
1958
1959         Reviewed by Timothy Hatcher.
1960
1961         InspectorInstrumentation::willRemoveDOMNode was actually calling both willRemoveDOMNodeImpl and
1962         didRemoveDOMNodeImpl, making the DOMAgent unbind the element even if it was still part of the DOM.
1963
1964         Because of that the DOMAgent was sending two events:
1965         1. When the element was about to be removed, just before JS "DOMNodeRemoved" was triggered.
1966         2. When the element was actually removed.
1967
1968         Note that inspector's event #2 will not know about the node, as it just removed it from the
1969         internal hashmap, so it will just use a nodeID == 0 for it.
1970
1971         This patch adds a separate call to InspectorInstrumentation::didRemoveDOMNode, just before the
1972         element is about to be removed. The InspectorInstrumentation::willRemoveDOMNode call is now only used
1973         by the DOMDebugger to trigger the DOM breakpoints in the Web Inspector. That feature is not exposed
1974         in the new Inspector UI, but can be used/tested using the protocol directly.
1975
1976         Tests: inspector-protocol/dom-debugger/node-removed.html
1977                inspector-protocol/dom/dom-remove-events.html
1978                inspector-protocol/dom/remove-multiple-nodes.html
1979
1980         * dom/ContainerNode.cpp:
1981         (WebCore::ContainerNode::removeBetween):
1982         * inspector/InspectorInstrumentation.h:
1983         (WebCore::InspectorInstrumentation::willRemoveDOMNode):
1984         (WebCore::InspectorInstrumentation::didRemoveDOMNode):
1985
1986 2013-11-05  Ryuan Choi  <ryuan.choi@samsung.com>
1987
1988         Unreviewed build fix on CMake based ports with GLES.
1989
1990         * CMakeLists.txt:
1991         Added OPENGLES2_LIBRARIES and OPENGLES2_INCLUDE_DIR into the includes and
1992         libraries list.
1993
1994 2013-11-05  Tim Horton  <timothy_horton@apple.com>
1995
1996         platformCALayerDeviceScaleFactor should be const
1997         https://bugs.webkit.org/show_bug.cgi?id=123842
1998
1999         Reviewed by Simon Fraser.
2000
2001         * WebCore.exp.in:
2002         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2003         (WebCore::LayerClient::platformCALayerDeviceScaleFactor):
2004         * platform/graphics/ca/GraphicsLayerCA.cpp:
2005         (WebCore::GraphicsLayerCA::platformCALayerDeviceScaleFactor):
2006         * platform/graphics/ca/GraphicsLayerCA.h:
2007         * platform/graphics/ca/PlatformCALayerClient.h:
2008         * platform/graphics/ca/mac/TileController.h:
2009         * platform/graphics/ca/mac/TileController.mm:
2010         (WebCore::TileController::platformCALayerDeviceScaleFactor):
2011         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2012         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDeviceScaleFactor):
2013         Constify PlatformCALayerClient::platformCALayerDeviceScaleFactor.
2014
2015 2013-11-05  Gavin Barraclough  <barraclough@apple.com>
2016
2017         Subresource loads should not prevent page throttling
2018         https://bugs.webkit.org/show_bug.cgi?id=123757
2019
2020         Reviewed by Alexey Proskuryakov.
2021
2022         The page-is-loading test for inhibiting process supression is currently
2023         too conservative, preventing supression of pages with infinitely loading
2024         resources (commonly XHRs). Instead, just rely on the FrameLoader being
2025         active (with hysteresis).
2026
2027         * loader/SubresourceLoader.cpp:
2028         (WebCore::SubresourceLoader::init):
2029         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
2030         (WebCore::SubresourceLoader::didFinishLoading):
2031         (WebCore::SubresourceLoader::didFail):
2032         (WebCore::SubresourceLoader::willCancel):
2033         * loader/SubresourceLoader.h:
2034             - remove m_activityAssertion from SubresourceLoader.
2035
2036 2013-11-05  Tim Horton  <timothy_horton@apple.com>
2037
2038         [mac] PDFDocumentImage is too big if PDF has a crop box smaller than the media box
2039         https://bugs.webkit.org/show_bug.cgi?id=123840
2040         <rdar://problem/15308765>
2041
2042         Reviewed by Alexey Proskuryakov.
2043
2044         Test: fast/images/pdf-as-image-crop-box.html
2045
2046         * platform/graphics/cg/PDFDocumentImage.cpp:
2047         (WebCore::PDFDocumentImage::size):
2048         Use the crop box when determining the size of the image.
2049
2050         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
2051         * platform/graphics/cg/PDFDocumentImage.h:
2052         * platform/graphics/mac/PDFDocumentImageMac.mm:
2053         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
2054         Get rid of m_mediaBox, since we don't need it anymore.
2055
2056         (WebCore::PDFDocumentImage::drawPDFPage):
2057         PDFKit does the translation by the crop box origin for us;
2058         if we do it additionally, we'll be painting the wrong part of the image.
2059         So, don't do the translation here.
2060
2061 2013-11-05  Antti Koivisto  <antti@apple.com>
2062
2063         Factor index cache for NodeLists and HTMLCollections to a class
2064         https://bugs.webkit.org/show_bug.cgi?id=123823
2065
2066         Reviewed by Ryosuke Niwa.
2067
2068         Implement index cache class that can used by NodeLists and HTMLCollections that currently
2069         each have implementations of their own.
2070         
2071         This patch also implements ChildNodeList and LiveNodeList using CollectionIndexCache.
2072         HTMLCollection is will be transitioned later.
2073
2074         * GNUmakefile.list.am:
2075         * WebCore.vcxproj/WebCore.vcxproj:
2076         * WebCore.xcodeproj/project.pbxproj:
2077         * dom/ChildNodeList.cpp:
2078         (WebCore::ChildNodeList::ChildNodeList):
2079         (WebCore::ChildNodeList::length):
2080         (WebCore::ChildNodeList::item):
2081         
2082             The client calls to cache to for indexed and size access.
2083
2084         (WebCore::ChildNodeList::collectionFirst):
2085         (WebCore::ChildNodeList::collectionLast):
2086         (WebCore::ChildNodeList::collectionTraverseForward):
2087         (WebCore::ChildNodeList::collectionTraverseBackward):
2088         
2089             Cache calls back to these as needed to do the actual traversal.
2090
2091         (WebCore::ChildNodeList::invalidateCache):
2092         * dom/ChildNodeList.h:
2093         * dom/CollectionIndexCache.h: Added.
2094         
2095             Templated cache class itself.
2096
2097         (WebCore::::CollectionIndexCache):
2098         (WebCore::::nodeCount):
2099         (WebCore::::nodeBeforeCached):
2100         (WebCore::::nodeAfterCached):
2101         (WebCore::::nodeAt):
2102         (WebCore::::invalidate):
2103         * dom/LiveNodeList.cpp:
2104         (WebCore::firstMatchingElement):
2105         (WebCore::nextMatchingElement):
2106         (WebCore::traverseMatchingElementsForward):
2107         (WebCore::LiveNodeList::collectionFirst):
2108         (WebCore::LiveNodeList::collectionLast):
2109         (WebCore::LiveNodeList::collectionTraverseForward):
2110         (WebCore::LiveNodeList::collectionTraverseBackward):
2111         (WebCore::LiveNodeList::length):
2112         (WebCore::LiveNodeList::item):
2113         (WebCore::LiveNodeList::invalidateCache):
2114         * dom/LiveNodeList.h:
2115         (WebCore::LiveNodeList::LiveNodeList):
2116
2117 2013-11-05  Enrica Casucci  <enrica@apple.com>
2118
2119         Full width semicolon is wrong in vertical text.
2120         https://bugs.webkit.org/show_bug.cgi?id=123814
2121         <rdar://problem/15312541>
2122
2123         Reviewed by Benjamin Poulain.
2124
2125         The full width semicolon should always be upright.
2126         Adding it to the list of characters that should
2127         ignore rotation.
2128
2129         * platform/graphics/FontGlyphs.cpp:
2130         (WebCore::shouldIgnoreRotation):
2131
2132 2013-11-05  Andreas Kling  <akling@apple.com>
2133
2134         Remove unused RenderWidget::notifyWidget().
2135
2136         Rubber-stamped by Anders Carlsson.
2137
2138 2013-11-05  Commit Queue  <commit-queue@webkit.org>
2139
2140         Unreviewed, rolling out r158678.
2141         http://trac.webkit.org/changeset/158678
2142         https://bugs.webkit.org/show_bug.cgi?id=123820
2143
2144         Causes a new debug assertion failure on the Mavericks test
2145         system. (Requested by bfulgham on #webkit).
2146
2147         * rendering/mathml/RenderMathMLOperator.cpp:
2148
2149 2013-11-05  Renata Hodovan  <reni@webkit.org>
2150
2151         ASSERTION FAILED: isHTMLTitleElement(m_titleElement.get()) in WebCore::Document::setTitle
2152         https://bugs.webkit.org/show_bug.cgi?id=122092
2153
2154         Reviewed by Darin Adler.
2155
2156         Remove a bogus assert in Document::setTitle().
2157         m_titleElement can be either of HTMLTitleElement or SVGTitleElement. The assertion was wrong.
2158         
2159         Backported from Blink:
2160         https://src.chromium.org/viewvc/blink?revision=158620&view=revision
2161
2162         Test: svg/custom/title-assertion.html
2163
2164         * dom/Document.cpp:
2165         (WebCore::Document::setTitle):
2166         * svg/SVGTitleElement.cpp:
2167         (WebCore::SVGTitleElement::insertedInto):
2168
2169 2013-11-05  Martin Robinson  <mrobinson@igalia.com>
2170
2171         [MathML] Poor spacing around delimiters in MathML Torture Test 14
2172         https://bugs.webkit.org/show_bug.cgi?id=122837
2173
2174         Reviewed by Brent Fulgham.
2175
2176         Instead of stretching the vertical bar with the stretchable version, just repeat
2177         the normal vertical bar. This follows what Gecko does when rendering tall vertical
2178         bars and also works around an issue with STIX fonts leading to poor spacing in
2179         formulas.
2180
2181         * rendering/mathml/RenderMathMLOperator.cpp: Stretch the vertical bar with the
2182         normal variant.
2183
2184 2013-11-05  Daniel Bates  <dabates@apple.com>
2185
2186         XSSAuditor should catch reflected srcdoc properties even without a <frame> tag injection
2187
2188         From Blink r160615 by <tsepez@chromium.org>
2189         https://src.chromium.org/viewvc/blink?view=rev&revision=160615
2190
2191         Test: http/tests/security/xssAuditor/iframe-srcdoc-property-blocked.html
2192
2193         * html/parser/XSSAuditor.cpp:
2194         (WebCore::XSSAuditor::filterIframeToken):
2195
2196 2013-11-05  Éva Balázsfalvi  <balazsfalvi.eva@stud.u-szeged.hu>
2197
2198         Delete maketokenizer.
2199         https://bugs.webkit.org/show_bug.cgi?id=115155
2200
2201         Reviewed by Zoltan Herczeg.
2202
2203         This script was used to generate the old flex based CSS tokenizer. It
2204         was replaced by a custom tokenizer in r106217 but the script wasn't
2205         removed. Since there is no mention of it in the original bug nor any
2206         reference to maketokenizer in our build files, it's probably an
2207         oversight.
2208
2209         Merge from blink:
2210         https://chromium.googlesource.com/chromium/blink/+/2a1c8aaf867f707ccdcd8893446e907e2aa2e1c2
2211
2212         * css/maketokenizer: Removed.
2213
2214 2013-11-05  Zan Dobersek  <zdobersek@igalia.com>
2215
2216         Unreviewed. Unbreaking GCC builds.
2217
2218         * html/HTMLCollection.cpp:
2219         (WebCore::isMatchingElement): This inline function is not a template anymore.
2220
2221 2013-11-05  Antti Koivisto  <antti@apple.com>
2222
2223         Make it compile.
2224
2225         * dom/LiveNodeList.h:
2226         (WebCore::LiveNodeList::LiveNodeList):
2227         (WebCore::LiveNodeList::~LiveNodeList):
2228         * dom/NodeRareData.h:
2229         (WebCore::NodeListsNodeData::adoptDocument):
2230         * html/HTMLCollection.cpp:
2231         (WebCore::HTMLCollection::HTMLCollection):
2232         (WebCore::HTMLCollection::~HTMLCollection):
2233
2234 2013-11-05  Antti Koivisto  <antti@apple.com>
2235
2236         HTMLCollection should not be NodeList
2237         https://bugs.webkit.org/show_bug.cgi?id=123794
2238
2239         Reviewed by Andreas Kling.
2240
2241         HTMLCollection and NodeList are unrelated types in DOM yet our HTMLCollection inherits NodeList
2242         for code sharing reasons. While some code does get shared the types are sufficiently different 
2243         that this results in lots of unnecessary branches, complexity and general awkwardness. Code sharing 
2244         can be better achieved by means other than inheritance.
2245         
2246         This patch splits HTMLCollection from NodeList by copy-pasting and eliminating resulting redundancies. 
2247         Sharing comes later.
2248
2249         * dom/Attr.cpp:
2250         (WebCore::Attr::setValue):
2251         (WebCore::Attr::childrenChanged):
2252         * dom/ClassNodeList.cpp:
2253         (WebCore::ClassNodeList::~ClassNodeList):
2254         * dom/ContainerNode.cpp:
2255         (WebCore::ContainerNode::childrenChanged):
2256         (WebCore::ContainerNode::getElementsByTagName):
2257         (WebCore::ContainerNode::getElementsByName):
2258         (WebCore::ContainerNode::getElementsByClassName):
2259         (WebCore::ContainerNode::radioNodeList):
2260         * dom/Document.cpp:
2261         (WebCore::Document::Document):
2262         (WebCore::Document::~Document):
2263         (WebCore::Document::registerNodeList):
2264         (WebCore::Document::unregisterNodeList):
2265         (WebCore::Document::registerCollection):
2266         (WebCore::Document::unregisterCollection):
2267         (WebCore::Document::ensureCachedCollection):
2268         
2269             Add separate functions and map for registering HTMLCollections.
2270
2271         (WebCore::Document::all):
2272         (WebCore::Document::windowNamedItems):
2273         (WebCore::Document::documentNamedItems):
2274         * dom/Document.h:
2275         * dom/Element.cpp:
2276         (WebCore::Element::attributeChanged):
2277         (WebCore::Element::ensureCachedHTMLCollection):
2278         (WebCore::Element::cachedHTMLCollection):
2279         * dom/LiveNodeList.cpp:
2280         (WebCore::LiveNodeList::rootNode):
2281         (WebCore::isMatchingElement):
2282         (WebCore::LiveNodeList::iterateForPreviousElement):
2283         (WebCore::LiveNodeList::itemBefore):
2284         (WebCore::firstMatchingElement):
2285         (WebCore::nextMatchingElement):
2286         (WebCore::traverseMatchingElementsForwardToOffset):
2287         (WebCore::LiveNodeList::traverseLiveNodeListFirstElement):
2288         (WebCore::LiveNodeList::traverseLiveNodeListForwardToOffset):
2289         (WebCore::LiveNodeList::isLastItemCloserThanLastOrCachedItem):
2290         (WebCore::LiveNodeList::isFirstItemCloserThanCachedItem):
2291         (WebCore::LiveNodeList::length):
2292         (WebCore::LiveNodeList::item):
2293         (WebCore::LiveNodeList::elementBeforeOrAfterCachedElement):
2294         
2295             This code used to live in HTMLCollection.cpp. Copy-paste here and remove all branches not needed for NodeLists.
2296
2297         (WebCore::LiveNodeList::invalidateCache):
2298         
2299             NodeLists have no name caches.
2300
2301         * dom/LiveNodeList.h:
2302         (WebCore::LiveNodeList::LiveNodeList):
2303         (WebCore::LiveNodeList::~LiveNodeList):
2304         (WebCore::LiveNodeList::isRootedAtDocument):
2305         (WebCore::LiveNodeList::type):
2306         (WebCore::LiveNodeList::invalidateCache):
2307         (WebCore::LiveNodeList::setCachedElement):
2308         
2309             Merge LiveNodeListBase and LiveNodeList.
2310             Remove fields and code supporting HTMLCollection.
2311
2312         (WebCore::shouldInvalidateTypeOnAttributeChange):
2313         
2314             Move to global scope. This function is used both HTMLCollections and LiveNodeLists.
2315
2316         * dom/NameNodeList.cpp:
2317         (WebCore::NameNodeList::~NameNodeList):
2318         * dom/NameNodeList.h:
2319         (WebCore::NameNodeList::create):
2320         * dom/Node.cpp:
2321         (WebCore::shouldInvalidateNodeListCachesForAttr):
2322         (WebCore::Document::shouldInvalidateNodeListAndCollectionCaches):
2323         (WebCore::Document::invalidateNodeListAndCollectionCaches):
2324         (WebCore::Node::invalidateNodeListAndCollectionCachesInAncestors):
2325         (WebCore::NodeListsNodeData::invalidateCaches):
2326         * dom/Node.h:
2327         * dom/NodeRareData.h:
2328         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
2329         (WebCore::NodeListsNodeData::addCacheWithName):
2330         (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
2331         (WebCore::NodeListsNodeData::addCachedCollection):
2332         (WebCore::NodeListsNodeData::cachedCollection):
2333         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
2334         (WebCore::NodeListsNodeData::removeCacheWithName):
2335         (WebCore::NodeListsNodeData::removeCachedCollection):
2336         (WebCore::NodeListsNodeData::isEmpty):
2337         (WebCore::NodeListsNodeData::adoptDocument):
2338         (WebCore::NodeListsNodeData::namedCollectionKey):
2339         (WebCore::NodeListsNodeData::namedNodeListKey):
2340         (WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList):
2341         
2342             Add separate cache for HTMLCollections.
2343
2344         * dom/TagNodeList.cpp:
2345         (WebCore::TagNodeList::TagNodeList):
2346         (WebCore::TagNodeList::~TagNodeList):
2347         * dom/TagNodeList.h:
2348         (WebCore::TagNodeList::create):
2349         (WebCore::HTMLTagNodeList::create):
2350         * html/CollectionType.h:
2351         
2352             Remove NodeList types.
2353
2354         * html/HTMLCollection.cpp:
2355         (WebCore::shouldOnlyIncludeDirectChildren):
2356         (WebCore::rootTypeFromCollectionType):
2357         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
2358         (WebCore::HTMLCollection::HTMLCollection):
2359         (WebCore::HTMLCollection::~HTMLCollection):
2360         (WebCore::HTMLCollection::rootNode):
2361         (WebCore::isMatchingElement):
2362         (WebCore::HTMLCollection::iterateForPreviousElement):
2363         (WebCore::HTMLCollection::itemBefore):
2364         (WebCore::firstMatchingElement):
2365         (WebCore::nextMatchingElement):
2366         (WebCore::traverseMatchingElementsForwardToOffset):
2367         (WebCore::HTMLCollection::isLastItemCloserThanLastOrCachedItem):
2368         (WebCore::HTMLCollection::isFirstItemCloserThanCachedItem):
2369         (WebCore::HTMLCollection::setCachedElement):
2370         (WebCore::HTMLCollection::length):
2371         (WebCore::HTMLCollection::item):
2372         (WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
2373         (WebCore::HTMLCollection::traverseFirstElement):
2374         (WebCore::HTMLCollection::traverseNextElement):
2375         (WebCore::HTMLCollection::traverseForwardToOffset):
2376         (WebCore::HTMLCollection::invalidateCache):
2377         (WebCore::HTMLCollection::invalidateIdNameCacheMaps):
2378         (WebCore::HTMLCollection::namedItem):
2379         
2380             Remove NodeList specific branches and functions.
2381             LiveNodeListBase functions are now HTMLCollection functions.
2382
2383         * html/HTMLCollection.h:
2384         (WebCore::HTMLCollection::isRootedAtDocument):
2385         (WebCore::HTMLCollection::invalidationType):
2386         (WebCore::HTMLCollection::type):
2387         (WebCore::HTMLCollection::ownerNode):
2388         (WebCore::HTMLCollection::invalidateCache):
2389         (WebCore::HTMLCollection::document):
2390         (WebCore::HTMLCollection::overridesItemAfter):
2391         (WebCore::HTMLCollection::isElementCacheValid):
2392         (WebCore::HTMLCollection::cachedElement):
2393         (WebCore::HTMLCollection::cachedElementOffset):
2394         (WebCore::HTMLCollection::isLengthCacheValid):
2395         (WebCore::HTMLCollection::cachedLength):
2396         (WebCore::HTMLCollection::setLengthCache):
2397         (WebCore::HTMLCollection::setCachedElement):
2398         (WebCore::HTMLCollection::isItemRefElementsCacheValid):
2399         (WebCore::HTMLCollection::setItemRefElementsCacheValid):
2400         (WebCore::HTMLCollection::rootType):
2401         (WebCore::HTMLCollection::hasNameCache):
2402         (WebCore::HTMLCollection::setHasNameCache):
2403         
2404             Copy-paste functions and fields from former LiveNodeListBase.
2405
2406         * html/HTMLNameCollection.cpp:
2407         (WebCore::HTMLNameCollection::~HTMLNameCollection):
2408         * html/LabelableElement.cpp:
2409         (WebCore::LabelableElement::labels):
2410         * html/LabelsNodeList.cpp:
2411         (WebCore::LabelsNodeList::~LabelsNodeList):
2412         * html/LabelsNodeList.h:
2413         * html/RadioNodeList.cpp:
2414         (WebCore::RadioNodeList::~RadioNodeList):
2415         * html/RadioNodeList.h:
2416         (WebCore::RadioNodeList::create):
2417
2418 2013-11-05  Emilio Pozuelo Monfort  <pochu27@gmail.com>
2419
2420         [GTK] Add stubs for missing symbols in dom bindings
2421         https://bugs.webkit.org/show_bug.cgi?id=123663
2422
2423         Reviewed by Carlos Garcia Campos.
2424
2425         * bindings/gobject/WebKitDOMCustom.cpp:
2426         (webkit_dom_html_head_element_get_profile):
2427         (webkit_dom_html_head_element_set_profile):
2428         (webkit_dom_processing_instruction_get_data):
2429         (webkit_dom_processing_instruction_set_data):
2430         * bindings/gobject/WebKitDOMCustom.h:
2431         * bindings/gobject/WebKitDOMCustom.symbols:
2432
2433 2013-11-05  Zan Dobersek  <zdobersek@igalia.com>
2434
2435         Main thread tasks in ThreadableBlobRegistry should use std::unique_ptr
2436         https://bugs.webkit.org/show_bug.cgi?id=122946
2437
2438         Reviewed by Darin Adler.
2439
2440         The new BlobRegistryContext objects don't have to be adopted into OwnPtr and then have OwnPtr's leaked pointer
2441         passed into the WTF::callOnMainThread call - the pointer to the new heap-allocated object is passed in directly,
2442         with the object ending up being managed by std::unique_ptr in the designated main thread task.
2443
2444         * fileapi/ThreadableBlobRegistry.cpp:
2445         (WebCore::registerBlobURLTask):
2446         (WebCore::ThreadableBlobRegistry::registerBlobURL):
2447         (WebCore::registerBlobURLFromTask):
2448         (WebCore::unregisterBlobURLTask):
2449         (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
2450
2451 2013-11-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2452
2453         [CSS] Enable css-image-orientation on EFL and GTK ports.
2454         https://bugs.webkit.org/show_bug.cgi?id=123698
2455
2456         Reviewed by Beth Dakin.
2457
2458         r157909 added wrong early return for css-image-orientation. It causes about 20 regressions in layout test
2459         when enabling css-image-orientation. This fixes those wrong implementation as well as enables it on EFL
2460         and GTK ports by default.
2461
2462         Test: fast/css/image-orientation/image-orientation.html
2463
2464         * loader/cache/CachedImage.cpp:
2465         (WebCore::CachedImage::imageSizeForRenderer):
2466         * platform/graphics/BitmapImage.cpp:
2467         (WebCore::BitmapImage::updateSize):
2468
2469 2013-11-05  Andreas Kling  <akling@apple.com>
2470
2471         RenderEmbeddedObject shouldn't know about fallback content.
2472         <https://webkit.org/b/123781>
2473
2474         Stop caching the presence of fallback (DOM) content in a flag on
2475         RenderEmbeddedObject and have SubframeLoader fetch it directly from
2476         HTMLObjectElement instead.
2477
2478         Also made SubframeLoader::requestObject() take the owner element
2479         by reference since we don't support owner-less embedded objects.
2480
2481         Reviewed by Antti Koivisto.
2482
2483 2013-11-05  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2484
2485         [GStreamer] Remove NATIVE_FULLSCREEN_VIDEO support
2486         https://bugs.webkit.org/show_bug.cgi?id=123437
2487
2488         Reviewed by Philippe Normand.
2489
2490         Removed some dead code as no GStreamer port is using the native
2491         fullscreen video support.
2492
2493         * GNUmakefile.list.am:
2494         * PlatformEfl.cmake:
2495         * PlatformGTK.cmake: Removed compilation of deleted files.
2496         * platform/graphics/MediaPlayer.h: Removed structures related to
2497         GStreamer and NATIVE_FULLSCREEN_VIDEO.
2498         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp: Removed.
2499         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.h: Removed.
2500         * platform/graphics/gstreamer/GStreamerGWorld.cpp: Removed.
2501         * platform/graphics/gstreamer/GStreamerGWorld.h: Removed.
2502         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: Removed
2503         gst/video/video.h include.
2504         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2505         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
2506         (WebCore::MediaPlayerPrivateGStreamerBase::platformMedia):
2507         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
2508         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2509         Removed code related to GStreamer and NATIVE_FULLSCREEN_VIDEO.
2510         * platform/graphics/gstreamer/PlatformVideoWindow.h: Removed.
2511         * platform/graphics/gstreamer/PlatformVideoWindowEfl.cpp: Removed.
2512         * platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp: Removed.
2513         * platform/graphics/gstreamer/PlatformVideoWindowMac.mm: Removed.
2514         * platform/graphics/gstreamer/PlatformVideoWindowNix.cpp: Removed.
2515         * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h: Removed.
2516         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2517         (webkitVideoSinkRender):
2518         (webkitVideoSinkNew):
2519         * platform/graphics/gstreamer/VideoSinkGStreamer.h: Removed code
2520         related to GStreamer and NATIVE_FULLSCREEN_VIDEO.
2521         * platform/graphics/gtk/FullscreenVideoControllerGtk.cpp: Removed.
2522         * platform/graphics/gtk/FullscreenVideoControllerGtk.h: Removed.
2523
2524 2013-11-05  Andreas Kling  <akling@apple.com>
2525
2526         Remove RenderWidget::viewCleared().
2527         <https://webkit.org/b/123777>
2528
2529         This was some ancient hand-waving code from the KHTML era.
2530
2531         It was obviously confused (e.g RenderEmbeddedObject trying to handle
2532         iframe owners, even though that setup is impossible.)
2533
2534         Reviewed by Anders Carlsson.
2535
2536 2013-11-04  Brady Eidson  <beidson@apple.com>
2537
2538         IDB: Split backend Cursors and Transactions into their own files
2539         https://bugs.webkit.org/show_bug.cgi?id=123789
2540
2541         Reviewed by Alexey Proskuryakov.
2542
2543         No new tests (Rename, no change in behavior).
2544
2545         * CMakeLists.txt:
2546         * GNUmakefile.list.am:
2547         * WebCore.xcodeproj/project.pbxproj:
2548
2549         * Modules/indexeddb/IDBBackingStoreCursorInterface.h:
2550         (WebCore::IDBBackingStoreCursorInterface::~IDBBackingStoreCursorInterface):
2551
2552         * Modules/indexeddb/IDBBackingStoreInterface.h:
2553
2554         * Modules/indexeddb/IDBBackingStoreTransactionInterface.h: Added.
2555         (WebCore::IDBBackingStoreTransactionInterface::~IDBBackingStoreTransactionInterface):
2556
2557         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
2558         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
2559         * Modules/indexeddb/IDBCursorBackendImpl.h:
2560         (WebCore::IDBCursorBackendImpl::create):
2561
2562         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2563
2564         * Modules/indexeddb/IDBIndexWriter.cpp:
2565         (WebCore::IDBIndexWriter::writeIndexKeys):
2566         (WebCore::IDBIndexWriter::verifyIndexKeys):
2567         (WebCore::IDBIndexWriter::addingKeyAllowed):
2568         * Modules/indexeddb/IDBIndexWriter.h:
2569
2570         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2571         (WebCore::IDBTransactionBackendImpl::createCursorBackend):
2572         * Modules/indexeddb/IDBTransactionBackendImpl.h:
2573         * Modules/indexeddb/IDBTransactionBackendInterface.h:
2574
2575         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2576         (WebCore::GetOperation::perform):
2577         (WebCore::OpenCursorOperation::perform):
2578         (WebCore::CountOperation::perform):
2579         (WebCore::DeleteRangeOperation::perform):
2580
2581         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.cpp: Added.
2582         (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
2583         (WebCore::IDBBackingStoreCursorLevelDB::firstSeek):
2584         (WebCore::IDBBackingStoreCursorLevelDB::advance):
2585         (WebCore::IDBBackingStoreCursorLevelDB::continueFunction):
2586         (WebCore::IDBBackingStoreCursorLevelDB::haveEnteredRange):
2587         (WebCore::IDBBackingStoreCursorLevelDB::isPastBounds):
2588         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h: Added.
2589         (WebCore::IDBBackingStoreCursorLevelDB::~IDBBackingStoreCursorLevelDB):
2590         (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
2591
2592         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2593         (WebCore::IDBBackingStoreLevelDB::compareIndexKeys):
2594         (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
2595         (WebCore::IDBBackingStoreLevelDB::createObjectStore):
2596         (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
2597         (WebCore::IDBBackingStoreLevelDB::getRecord):
2598         (WebCore::IDBBackingStoreLevelDB::putRecord):
2599         (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
2600         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
2601         (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
2602         (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
2603         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
2604         (WebCore::IDBBackingStoreLevelDB::createIndex):
2605         (WebCore::IDBBackingStoreLevelDB::deleteIndex):
2606         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
2607         (WebCore::findGreatestKeyLessThanOrEqual):
2608         (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
2609         (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
2610         (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
2611         (WebCore::ObjectStoreKeyCursorImpl::create):
2612         (WebCore::ObjectStoreKeyCursorImpl::clone):
2613         (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
2614         (WebCore::ObjectStoreCursorImpl::create):
2615         (WebCore::ObjectStoreCursorImpl::clone):
2616         (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
2617         (WebCore::objectStoreCursorOptions):
2618         (WebCore::indexCursorOptions):
2619         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
2620         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
2621         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
2622         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
2623         (WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction):
2624         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2625  
2626        * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp: Added.
2627         (WebCore::IDBBackingStoreTransactionLevelDB::IDBBackingStoreTransactionLevelDB):
2628         (WebCore::IDBBackingStoreTransactionLevelDB::begin):
2629         (WebCore::IDBBackingStoreTransactionLevelDB::commit):
2630         (WebCore::IDBBackingStoreTransactionLevelDB::rollback):
2631         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
2632
2633         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2634         (WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
2635         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2636
2637 2013-11-04  Zalan Bujtas  <zalan@apple.com>
2638
2639         Do not call setFrameRect on Widget unless its boundaries changed.
2640         https://bugs.webkit.org/show_bug.cgi?id=123781
2641
2642         Reviewed by Andreas Kling.
2643
2644         Call Widget:setFrameRect only when the frame's rect actually changes. It also
2645         cleans up the related weak reference code a bit.
2646         
2647         Covered by existing tests.
2648
2649         * rendering/RenderWidget.cpp:
2650         (WebCore::RenderWidget::setWidgetGeometry): 
2651
2652 2013-11-04  Santosh Mahto  <santosh.ma@samsung.com>
2653
2654         [webcore/html] remove extra header includes from cpp files.
2655         https://bugs.webkit.org/show_bug.cgi?id=123740
2656
2657         Reviewed by Darin Adler.
2658
2659         Removing redundant headers.
2660
2661         * html/BaseDateAndTimeInputType.cpp:
2662         * html/ColorInputType.cpp:
2663         * html/DOMFormData.cpp:
2664         * html/DOMURL.cpp:
2665         * html/DateInputType.cpp:
2666         * html/DateTimeInputType.cpp:
2667         * html/DateTimeLocalInputType.cpp:
2668         * html/FTPDirectoryDocument.cpp:
2669         * html/FileInputType.cpp:
2670         * html/FormController.cpp:
2671         * html/HTMLAnchorElement.cpp:
2672         * html/HTMLAreaElement.cpp:
2673         * html/HTMLCanvasElement.cpp:
2674         * html/HTMLCollection.cpp:
2675         * html/HTMLDetailsElement.cpp:
2676         * html/HTMLDocument.cpp:
2677         * html/HTMLElement.cpp:
2678         * html/HTMLFormControlsCollection.cpp:
2679         * html/HTMLFormElement.cpp:
2680         * html/HTMLImageElement.cpp:
2681         * html/HTMLInputElement.cpp:
2682         * html/HTMLLegendElement.cpp:
2683         * html/HTMLMapElement.cpp:
2684         * html/HTMLMediaElement.cpp:
2685         * html/HTMLOptionElement.cpp:
2686         * html/HTMLOptionsCollection.cpp:
2687         * html/HTMLPlugInImageElement.cpp:
2688         * html/HTMLProgressElement.cpp:
2689         * html/HTMLSummaryElement.cpp:
2690         * html/HTMLTemplateElement.cpp:
2691         * html/HTMLVideoElement.cpp:
2692         * html/HTMLViewSourceDocument.cpp:
2693         * html/MediaController.cpp:
2694         * html/MediaKeyEvent.cpp:
2695         * html/MonthInputType.cpp:
2696         * html/RangeInputType.cpp:
2697         * html/StepRange.cpp:
2698         * html/TextFieldInputType.cpp:
2699         * html/TimeInputType.cpp:
2700         * html/WeekInputType.cpp:
2701         * html/canvas/CanvasRenderingContext.cpp:
2702         * html/canvas/CanvasRenderingContext2D.cpp:
2703         * html/canvas/CanvasStyle.cpp:
2704         * html/canvas/OESVertexArrayObject.cpp:
2705         * html/parser/BackgroundHTMLParser.cpp:
2706         * html/parser/CSSPreloadScanner.cpp:
2707         * html/parser/CompactHTMLToken.cpp:
2708         * html/parser/HTMLConstructionSite.cpp:
2709         * html/parser/HTMLDocumentParser.cpp:
2710         * html/parser/HTMLElementStack.cpp:
2711         * html/parser/HTMLFormattingElementList.cpp:
2712         * html/parser/HTMLMetaCharsetParser.cpp:
2713         * html/parser/HTMLParserIdioms.cpp:
2714         * html/parser/HTMLPreloadScanner.cpp:
2715         * html/parser/HTMLTokenizer.cpp:
2716         * html/parser/HTMLTreeBuilder.cpp:
2717         * html/parser/HTMLTreeBuilderSimulator.cpp:
2718         * html/parser/HTMLViewSourceParser.cpp:
2719         * html/parser/TextDocumentParser.cpp:
2720         * html/parser/XSSAuditor.cpp:
2721         * html/shadow/ContentDistributor.cpp:
2722         * html/shadow/InsertionPoint.cpp:
2723         * html/shadow/MediaControlElements.cpp:
2724         * html/shadow/MediaControlsApple.cpp:
2725         * html/shadow/MediaControlsBlackBerry.cpp:
2726         * html/shadow/MediaControlsGtk.cpp:
2727         * html/shadow/SliderThumbElement.cpp:
2728         * html/track/AudioTrack.cpp:
2729         * html/track/InbandGenericTextTrack.cpp:
2730         * html/track/InbandTextTrack.cpp:
2731         * html/track/InbandWebVTTTextTrack.cpp:
2732         * html/track/TextTrack.cpp:
2733         * html/track/TextTrackCueGeneric.cpp:
2734         * html/track/TextTrackList.cpp:
2735         * html/track/TextTrackRegion.cpp:
2736         * html/track/TrackListBase.cpp:
2737         * html/track/VideoTrack.cpp:
2738         * html/track/WebVTTParser.cpp:
2739
2740 2013-11-04  Brady Eidson  <beidson@apple.com>
2741
2742         IDB: deleteDatabase() interface should be asynchronous
2743         https://bugs.webkit.org/show_bug.cgi?id=123787
2744
2745         Reviewed by Tim Horton.
2746
2747         No new tests (No behavior change for a tested port).
2748
2749         deleteDatabase now has no return value, but calls back to a bool function:
2750         * Modules/indexeddb/IDBBackingStoreInterface.h:
2751         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2752         (WebCore::IDBBackingStoreLevelDB::deleteDatabase):
2753         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2754
2755         Refactor to account for the new async deleteDatabase:
2756         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2757         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
2758         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
2759         (WebCore::IDBDatabaseBackendImpl::deleteDatabaseAsync):
2760         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2761
2762 2013-11-04  Brady Eidson  <beidson@apple.com>
2763
2764         Add Modules/indexeddb/leveldb to the WebCore.xcodeproj
2765
2766         Rubberstamped by Andreas Kling.
2767
2768         This will make hacking on IDB much easier for Mac developers as they won’t have
2769         to constantly add and then subtract the leveldb subdirectory.
2770
2771         The USE(LEVELDB) flag is still disabled so these files won’t actually build by default.
2772
2773         * WebCore.xcodeproj/project.pbxproj:
2774
2775 2013-11-04  Brady Eidson  <beidson@apple.com>
2776
2777         Address review feedback I forgot to commit in r158641
2778
2779         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2780         (WebCore::IDBDatabaseBackendImpl::processPendingOpenCalls):
2781
2782 2013-11-04  Brady Eidson  <beidson@apple.com>
2783
2784         IDB: Make opening/establishing a database asynchronous.
2785         https://bugs.webkit.org/show_bug.cgi?id=123775
2786
2787         Reviewed by Andreas Kling.
2788
2789         No new tests (No behavior change for a tested port).
2790
2791         * Modules/indexeddb/IDBBackingStoreInterface.h: Add getOrEstablishIDBDatabaseMetadata with a callback,
2792           removing getIDBDatabaseMetaData, getObjectStores, and createIDBDatabaseMetaData in the process.
2793
2794         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2795         (WebCore::IDBBackingStoreLevelDB::getOrEstablishIDBDatabaseMetadata): Adapted from getIDBDatabaseMetaData,
2796           implement the asynchronous interface in terms of other LevelDB methods, always calling back synchronously.
2797         (WebCore::IDBBackingStoreLevelDB::createIDBDatabaseMetaData):
2798         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2799
2800         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2801         (WebCore::IDBDatabaseBackendImpl::create):
2802         (WebCore::IDBDatabaseBackendImpl::openInternalAsync): Broken off from openInternal.
2803         (WebCore::IDBDatabaseBackendImpl::didOpenInternalAsync): Broken off from openInternal.
2804         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
2805         (WebCore::IDBDatabaseBackendImpl::processPendingOpenCalls): Broken off to allow didOpenInternalAsync
2806           to perform open callbacks in the failure case.
2807         (WebCore::IDBDatabaseBackendImpl::openConnection): Always queue open connection calls, then immediately processPendingCalls.
2808         (WebCore::IDBDatabaseBackendImpl::openConnectionInternal): Actually perform open connection calls.
2809         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2810
2811
2812 2013-11-04  Andreas Kling  <akling@apple.com>
2813
2814         CTTE: RenderFrameBase's widget is always a FrameView.
2815         <https://webkit.org/b/123771>
2816
2817         Delete widget() from RenderFrameBase and supplant a childView()
2818         that returns FrameView*. Strip away unnecessary casts and asserts.
2819
2820         Reviewed by Antti Koivisto.
2821
2822 2013-11-04  Zoltan Horvath  <zoltan@webkit.org>
2823
2824         [CSS Regions][CSS Shapes] Content in region doesn't respect shape-outside after initial layout pass
2825         <https://webkit.org/b/114829>
2826
2827         Although we set the size of a shape for shape-outside in RenderBlockFlow::insertFloatingObject based on the
2828         float's size, the actual height of the float is not always resolved at that point. (Look at cases when the shape
2829         has percentage based height or percentage based radius.) ShapeInfo::setShapeSize triggers a layout for 0 height
2830         value, which will be overriden later, when RenderBlockFlow::positionNewFloats sets the actual size of the float (shape).
2831         Thus it doesn't make sense to set the shape's size in insertFloatingObject and run those extra unnecessary layout passes,
2832         since it'll be overriden anyways. I moved the shape size setting logic into RenderBlockFlow::positionNewFloats.
2833
2834         The problem showed up when we had a shape-outside ellipse with percentage based radius, and we inserted the content
2835         with JavaScript into a region flow. The content has been layed out based on the 0 border radius, and relayout hasn't been
2836         triggered when it flew into the flow. This change sets the shape size only when we already have the height of the float,
2837         so the radius(es) can be resolved correctly, thus no unnecessary layout passes will happen and the layout will be correct as well.
2838
2839         Reviewed by David Hyatt.
2840
2841         Test: fast/shapes/shape-outside-floats/shape-outside-floats-layout-after-initial-layout-pass.html
2842
2843         * rendering/RenderBlockFlow.cpp:
2844         (WebCore::RenderBlockFlow::insertFloatingObject): Remove setting the size of the shape.
2845         (WebCore::RenderBlockFlow::positionNewFloats): Set the size of the shape here.
2846
2847 2013-11-04  Samuel White  <samuel_white@apple.com>
2848
2849         AX: AXShowMenu doesn't always work.
2850         https://bugs.webkit.org/show_bug.cgi?id=123649
2851
2852         Reviewed by Chris Fleizach.
2853
2854         No new tests, the change occurs in a code path that forces the context menu to show which
2855         locks up DRT if we try to test it (platform menu is shown). The change itself gives the mouse
2856         event handler a chance to handle our platform mouse event BEFORE the event ends up in the show
2857         context menu machinery. This is necessary because without it, the element will not become
2858         focused. Without focus, accessibility shows different/less menu items than a mouse click. The
2859         end result is that context menus shown via accessibility are consistent with menus shown via click.
2860
2861         * page/ContextMenuController.cpp:
2862         (WebCore::ContextMenuController::showContextMenuAt):
2863
2864 2013-11-04  Jeffrey Pfau  <jpfau@apple.com>
2865
2866         SMIL timers can still fire after the containing document has been torn down
2867         <https://webkit.org/b/123291>
2868
2869         Reviewed by Darin Adler.
2870
2871         Ensure that the timers get paused when the document is preparing to be torn down.
2872
2873         Test: svg/animations/smil-timers-not-disabled-crash.html
2874
2875         * dom/Document.cpp:
2876         (WebCore::Document::dropChildren):
2877         (WebCore::Document::commonTeardown):
2878         (WebCore::Document::prepareForDestruction):
2879         * dom/Document.h:
2880
2881 2013-11-04  Brendan Long  <b.long@cablelabs.com>
2882
2883         Move duplicate code in TrackPrivate classes to a common base class
2884         https://bugs.webkit.org/show_bug.cgi?id=123619
2885
2886         Reviewed by Darin Adler.
2887
2888         No new tests because this is just refactoring.
2889
2890         * GNUmakefile.list.am: Add TrackPrivateBase.
2891         * WebCore.vcxproj/WebCore.vcxproj: Same.
2892         * WebCore.vcxproj/WebCore.vcxproj.filters: Same.
2893         * WebCore.xcodeproj/project.pbxproj: Same.
2894         * html/track/AudioTrack.cpp:
2895         (WebCore::AudioTrack::inbandTrackIndex): Renamed audioTrackIndex() to trackIndex().
2896         (WebCore::AudioTrack::labelChanged): First argument is now a TrackPrivateBase*.
2897         (WebCore::AudioTrack::languageChanged): Same.
2898         (WebCore::AudioTrack::willRemove): Same.
2899         * html/track/AudioTrack.h: Update TrackPrivateBaseClient function signatures.
2900         * html/track/InbandTextTrack.cpp:
2901         (WebCore::InbandTextTrack::inbandTrackIndex): Renamed textTrackIndex() to trackIndex().
2902         (WebCore::InbandTextTrack::labelChanged): First argument is now a TrackPrivateBase*.
2903         (WebCore::InbandTextTrack::languageChanged): Same.
2904         (WebCore::InbandTextTrack::willRemove): Same.
2905         * html/track/InbandTextTrack.h: Update TrackPrivateBaseClient function signatures.
2906         * html/track/VideoTrack.cpp:
2907         (WebCore::VideoTrack::inbandTrackIndex): Renamed videoTrackIndex() to trackIndex().
2908         (WebCore::VideoTrack::labelChanged): First argument is now a TrackPrivateBase*.
2909         (WebCore::VideoTrack::languageChanged): Same.
2910         (WebCore::VideoTrack::willRemove): Same.
2911         * html/track/VideoTrack.h: Update TrackPrivateBaseClient function signatures.
2912         * platform/graphics/AudioTrackPrivate.h: Remove code that was moved to TrackPrivateBase.
2913         * platform/graphics/InbandTextTrackPrivate.h: Same.
2914         * platform/graphics/InbandTextTrackPrivateClient.h: Same.
2915         * platform/graphics/VideoTrackPrivate.h: Same.
2916         * platform/graphics/TrackPrivateBase.h: Refactored out duplicate code in AudioTrackPrivate, InbandTextTrackPrivate and VideoTrackPrivate.
2917         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Renamed textTrackIndex() to trackIndex().
2918         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: Same.
2919         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Renamed audioTrackIndex() to trackIndex().
2920         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Renamed videoTrackIndex() to trackIndex90.
2921
2922 2013-11-04  Andreas Kling  <akling@apple.com>
2923
2924         FrameView destructor is worried about being retained by a renderer.
2925         <https://webkit.org/b/123763>
2926
2927         There's no way we can be in ~FrameView() while also being owned by
2928         a RenderWidget. Remove some overly paranoid code that was making sure
2929         the renderer didn't have a reference on us.
2930
2931         Reviewed by Anders Carlsson.
2932
2933 2013-11-04  Eric Carlson  <eric.carlson@apple.com>
2934
2935         REGRESSION(r158311): media/media-fragments/TC0054.html and TC0061.html hit assertions
2936         https://bugs.webkit.org/show_bug.cgi?id=123555
2937
2938         Reviewed by Darin Adler.
2939
2940         No new tests, covered by existing tests.
2941
2942         * html/MediaFragmentURIParser.cpp:
2943         (WebCore::MediaFragmentURIParser::parseFragments): Don't add a fragment with empty key or value as
2944             they will not processed.
2945         (WebCore::MediaFragmentURIParser::parseNPTFragment): Remove excess whitespace.
2946
2947 2013-11-04  Patrick Gansterer  <paroga@webkit.org>
2948
2949         Remove code duplications in createFontCustomPlatformData()
2950         https://bugs.webkit.org/show_bug.cgi?id=123706
2951
2952         Reviewed by Darin Adler.
2953
2954         Move OpenTypeSanitizer and WOFF handling from the port specific
2955         implementations in createFontCustomPlatformData() into the only
2956         caller of this function CachedFont::ensureCustomFontData().
2957         Also change the parameter passing the SharedBuffer from a
2958         pointer to a reference since it is never null.
2959
2960         * loader/cache/CachedFont.cpp:
2961         (WebCore::CachedFont::ensureCustomFontData):
2962         * platform/graphics/blackberry/FontCustomPlatformData.h:
2963         * platform/graphics/blackberry/FontCustomPlatformDataBlackBerry.cpp:
2964         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
2965         (WebCore::createFontCustomPlatformData):
2966         * platform/graphics/cairo/FontCustomPlatformData.h:
2967         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
2968         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
2969         (WebCore::createFontCustomPlatformData):
2970         * platform/graphics/mac/FontCustomPlatformData.cpp:
2971         (WebCore::createFontCustomPlatformData):
2972         * platform/graphics/mac/FontCustomPlatformData.h:
2973         * platform/graphics/win/FontCustomPlatformData.cpp:
2974         (WebCore::createFontCustomPlatformData):
2975         * platform/graphics/win/FontCustomPlatformData.h:
2976         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2977         (WebCore::createFontCustomPlatformData):
2978         * platform/graphics/wince/FontCustomPlatformData.cpp:
2979         (WebCore::createFontCustomPlatformData):
2980         * platform/graphics/wince/FontCustomPlatformData.h:
2981
2982 2013-11-04  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2983
2984         Fixing MediaStreamDescriptor addSource and addTrack methods
2985         https://bugs.webkit.org/show_bug.cgi?id=123755
2986
2987         Reviewed by Eric Carlson.
2988
2989         We must store the track and source that is passed as parameter in a RefPtr,
2990         otherwise we will refer to a null pointer.
2991
2992         No new tests needed.
2993
2994         * platform/mediastream/MediaStreamDescriptor.cpp:
2995         (WebCore::MediaStreamDescriptor::addSource):
2996         (WebCore::MediaStreamDescriptor::addTrack):
2997
2998 2013-11-04  Tim Horton  <timothy_horton@apple.com>
2999
3000         Remove PlatformCALayer::playerLayer
3001         https://bugs.webkit.org/show_bug.cgi?id=123764
3002
3003         Reviewed by Sam Weinig.
3004
3005         * platform/graphics/ca/PlatformCALayer.h:
3006         * platform/graphics/ca/mac/PlatformCALayerMac.h:
3007         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3008         (PlatformCALayerMac::clone):
3009         Remove playerLayer(), fold it into clone().
3010
3011 2013-11-04  Chris Fleizach  <cfleizach@apple.com>
3012
3013         AX: Mail attachments at the start of an email are not output by VoiceOver
3014         https://bugs.webkit.org/show_bug.cgi?id=123697
3015
3016         Reviewed by Ryosuke Niwa.
3017
3018         VoiceOver is expecting that "replaced elements" (attachments in a Mail message in this case) to be
3019         represented by the replacement character when asking for a stringForRange.
3020
3021         However, when that replaced element is at the beginning of the document, the logic does not work because
3022         there is a few code places that will take that first Position and advance it forward, not accounting for replaced elements.
3023         When using the TextIterator normally, it does account for these, so that's why it's only affecting as at the beginning of the document.
3024
3025         Also a "replaced element" can be more than just renderer->isReplaced(), hence the externing of the isRendererReplacedElement method
3026         and using that it in pertinent places.
3027
3028         Tests: platform/mac/accessibility/object-replacement-with-no-rendered-children-at-node-start.html
3029                platform/mac/accessibility/object-replacement-with-rendered-children-at-node-start.html
3030
3031         * accessibility/AccessibilityObject.cpp:
3032         (WebCore::replacedNodeNeedsCharacter):
3033         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3034         (nsStringForReplacedNode):
3035         * dom/Position.cpp:
3036         (WebCore::Position::isCandidate):
3037         * dom/PositionIterator.cpp:
3038         * dom/Range.cpp:
3039         (WebCore::Range::firstNode):
3040         * editing/TextIterator.cpp:
3041         (WebCore::isRendererReplacedElement):
3042         * editing/TextIterator.h:
3043
3044 2013-11-04  Andreas Kling  <akling@apple.com>
3045
3046         Use RenderAncestorIterator in a couple of places.
3047         <https://webkit.org/b/123725>
3048
3049         Take the ancestorsOfType<RenderMoo>() thingy out for a spin.
3050
3051         Found a bunch of parent chain walking loops that were really just
3052         looking for the first ancestor renderer of a certain type.
3053         They were a perfect fit for this pattern:
3054
3055             if (auto svgRoot = ancestorsOfType<RenderSVGRoot>(renderer).first())
3056                 svgRoot->shakeMoneyMaker();
3057
3058         Quite a bit clearer than the previous:
3059
3060             for (auto ancestor = renderer.parent(); ancestor; ancestor = ancestor->parent()) {
3061                 if (ancestor->isSVGRoot())
3062                     toRenderSVGRoot(ancestor)->makeMoneyShaker();
3063             }
3064
3065         Reviewed by Antti Koivisto.
3066
3067 2013-10-25  Jer Noble  <jer.noble@apple.com>
3068
3069         [MSE] Add a SourceBufferPrivateClient interface for platform -> html communication.
3070         https://bugs.webkit.org/show_bug.cgi?id=123373
3071
3072         Reviewed by Eric Carlson.
3073
3074         To enable communication between SourceBuffer and SourceBufferPrivate without introducing
3075         layering violations, add a new interface class SourceBufferPrivateInterface from which
3076         SourceBuffer will inherit.
3077
3078         * Modules/mediasource/SourceBuffer.cpp:
3079         (WebCore::SourceBuffer::SourceBuffer): Set the private's client.
3080         (WebCore::SourceBuffer::~SourceBuffer): Clear the private's client.
3081         (WebCore::SourceBuffer::sourceBufferPrivateDidEndStream): Added stub.
3082         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Hinno.
3083         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Ditto.
3084         (WebCore::SourceBuffer::sourceBufferPrivateHasAudio): Ditto.
3085         (WebCore::SourceBuffer::sourceBufferPrivateHasVideo): Ditto.
3086         * Modules/mediasource/SourceBuffer.h:
3087         * WebCore.xcodeproj/project.pbxproj: Add new files to project.
3088         * platform/graphics/SourceBufferPrivate.h:
3089         * platform/graphics/SourceBufferPrivateClient.h: Added.
3090         (WebCore::SourceBufferPrivateClient::~SourceBufferPrivateClient): Empty destructor.
3091
3092 2013-11-01  Jer Noble  <jer.noble@apple.com>
3093
3094         [PluginProxy] Add a setting to disable video plugin proxy support in HTMLMediaElement.
3095         https://bugs.webkit.org/show_bug.cgi?id=123621
3096
3097         Reviewed by Eric Carlson.
3098
3099         Add a new Setting which will disable the video plugin proxy. Enable support for AVFoundation
3100         in iOS (which requries fixing a few compile errors resulting from classes and methods which
3101         are not available on iOS.
3102
3103         * WebCore.exp.in: Export wkAVAssetResolvedURL.
3104         * css/StyleResolver.cpp:
3105         (WebCore::StyleResolver::canShareStyleWithElement): Make conditional upon
3106             new isVideoPluginProxyEnabled() setting.
3107         * html/HTMLMediaElement.cpp:
3108         (WebCore::HTMLMediaElement::parseAttribute): Ditto.
3109         * html/HTMLMediaElement.h:
3110         * html/HTMLVideoElement.cpp:
3111         (WebCore::HTMLVideoElement::createRenderer): Ditto.
3112         (WebCore::HTMLVideoElement::attach): Ditto.
3113         (WebCore::HTMLVideoElement::parseAttribute): Ditto.
3114         (HTMLVideoElement::setDisplayMode): Ditto.
3115         * html/HTMLVideoElement.h:
3116         * page/Settings.cpp:
3117         (WebCore::Settings::setVideoPluginProxyEnabled): Simple setter.
3118         * page/Settings.h:
3119         (WebCore::Settings::isVideoPluginProxyEnabled): Simple getter.
3120         * platform/graphics/MediaPlayer.cpp:
3121         (WebCore::installedMediaEngines): Conditionally add MediaPlayerPrivateIOS and always add
3122             MediaPlayerPriateAVFoundationObjC.
3123         * platform/graphics/MediaPlayerPrivate.h:
3124         (WebCore::MediaPlayerPrivateInterface::deliverNotification): Add default implementation.
3125         (WebCore::MediaPlayerPrivateInterface::setMediaPlayerProxy): Ditto.
3126         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3127         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3128         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Use new
3129             HAS_ and USE_ macros instead of __MAC_OS_MIN_VERNSION_REQUIRED.
3130         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Ditto.
3131         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasContextRenderer): Ditto.
3132         (WebCore::MediaPlayerPrivateAVFoundationObjC::createContextVideoRenderer): Ditto.
3133         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyContextVideoRenderer): Ditto.
3134         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Ditto.
3135         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Ditto.
3136         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Use cachedCGColor instead
3137             of CGColorGetConstantColor.
3138         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Use CVPixelBuffer pixel
3139             format constant instead of QuickDraw constant.
3140         (WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer): Ditto.
3141         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput): Draw to intermediary
3142             CGImage on iOS.
3143         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
3144         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
3145         * platform/ios/WebCoreSystemInterfaceIOS.mm:
3146         * platform/mac/WebCoreSystemInterface.h:
3147
3148 2013-11-04  Andreas Kling  <akling@apple.com>
3149
3150         REGRESSION(r158561): fast/block/float/float-append-child-crash.html asserting.
3151
3152         The non-const ancestor iterator was walking siblings, not ancestors.
3153
3154         Rubber-stamped by Antti Koivisto.
3155
3156 2013-10-31  Jer Noble  <jer.noble@apple.com>
3157
3158         [MSE] [Mac] Disclaim support for MSE in AVFoundation and QTKit engines
3159         https://bugs.webkit.org/show_bug.cgi?id=123593
3160
3161         Reviewed by Eric Carlson.
3162
3163         Immediately fail if asked to load a Media Source in engines which do not support
3164         them.
3165
3166         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3167         (WebCore::MediaPlayerPrivateAVFoundation::load):
3168         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3169         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3170         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
3171         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3172         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3173         (WebCore::MediaPlayerPrivateQTKit::load):
3174         (WebCore::MediaPlayerPrivateQTKit::supportsType):
3175
3176 2013-11-04  Hans Muller  <hmuller@adobe.com>
3177
3178         [CSS Shapes] image valued shape element margin can cause an ASSERT fail
3179         https://bugs.webkit.org/show_bug.cgi?id=123743
3180
3181         Reviewed by Andreas Kling.
3182
3183         When margin-top is specified for a shape's element, the Y coordinates passed
3184         to RasterShapeIntervals::getExcludedIntervals() may be negative. This is
3185         because the incoming logical coordinates are relative to the content or
3186         padding box, depending on the box-sizing property. The RasterShape::getExcludedIntervals()
3187         method now clips the incoming Y coordinates to the shape's bounds before
3188         accessing the shape's intervals.
3189
3190         Test: fast/shapes/shape-outside-floats/shape-outside-floats-margin-crash.html
3191
3192         * rendering/shapes/RasterShape.cpp:
3193         (WebCore::RasterShapeIntervals::getExcludedIntervals):
3194
3195 2013-11-04  Antti Koivisto  <antti@apple.com>
3196
3197         Make LiveNodeListBase use Elements instead of Nodes
3198         https://bugs.webkit.org/show_bug.cgi?id=123745
3199
3200         Reviewed by Anders Carlsson.
3201
3202         * WebCore.exp.in:
3203         * dom/Element.cpp:
3204         (WebCore::Element::firstElementChild):
3205         (WebCore::Element::lastElementChild):
3206         
3207             Switch to correct calls. ElementTraversal::previous and previousChild are no longer equivalent.
3208
3209         * dom/ElementTraversal.h:
3210         (WebCore::::lastWithinTemplate):
3211         (WebCore::::previousTemplate):
3212         
3213             Fix ElementTraversal::lastWithin and previous. They had no real clients and didn't work correctly.
3214             With LiveNodeListBase starting to use these they get excellent test coverage.
3215
3216         * dom/LiveNodeList.cpp:
3217         (WebCore::LiveNodeListBase::invalidateCache):
3218         * dom/LiveNodeList.h:
3219         (WebCore::LiveNodeListBase::LiveNodeListBase):
3220         (WebCore::LiveNodeListBase::isElementCacheValid):
3221         (WebCore::LiveNodeListBase::cachedElement):
3222         (WebCore::LiveNodeListBase::cachedElementOffset):
3223         (WebCore::LiveNodeListBase::setCachedElement):
3224         
3225             Make the cache Element based.
3226             Switch to Elements in all helpers.
3227             Rename item -> element for clarity.
3228
3229         * dom/NodeIterator.cpp:
3230         (WebCore::NodeIterator::NodePointer::moveToPrevious):
3231         (WebCore::NodeIterator::updateForNodeRemoval):
3232         
3233             This code expected the old inconsistent NodeTraversal::previous behavior where the traversal includes
3234             the root as the last item. Drop the stayWithin parameter and handle the one case where it is needed here.
3235
3236         * dom/NodeTraversal.cpp:
3237         (WebCore::NodeTraversal::last):
3238         (WebCore::NodeTraversal::deepLastChild):
3239         * dom/NodeTraversal.h:
3240         
3241             Support ElementTraversal::previous/lastWithin.
3242
3243         (WebCore::NodeTraversal::previous):
3244         
3245             This was slightly wrong too.
3246
3247         * html/HTMLCollection.cpp:
3248         (WebCore::previousElement):
3249         (WebCore::lastElement):
3250         (WebCore::LiveNodeListBase::iterateForPreviousElement):
3251         (WebCore::LiveNodeListBase::itemBefore):
3252         (WebCore::LiveNodeListBase::isLastItemCloserThanLastOrCachedItem):
3253         (WebCore::LiveNodeListBase::isFirstItemCloserThanCachedItem):
3254         (WebCore::LiveNodeListBase::setCachedElement):
3255         (WebCore::LiveNodeListBase::item):
3256         (WebCore::LiveNodeListBase::elementBeforeOrAfterCachedElement):
3257         * html/HTMLCollection.h:
3258         (WebCore::HTMLCollection::isEmpty):
3259         (WebCore::HTMLCollection::hasExactlyOneItem):
3260
3261 2013-11-04  Michael Saboff  <msaboff@apple.com>
3262
3263         Eliminate HostCall bit from JSC Stack CallerFrame
3264         https://bugs.webkit.org/show_bug.cgi?id=123642
3265
3266         Reviewed by Geoffrey Garen.
3267
3268         Updated JavaScript stack walking as a result of the corresponding changes made in
3269         JavaScriptCore.
3270
3271         * bindings/js/ScriptController.cpp:
3272         (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
3273         * bindings/js/ScriptDebugServer.cpp:
3274         (WebCore::ScriptDebugServer::stepOutOfFunction):
3275         (WebCore::ScriptDebugServer::returnEvent):
3276         (WebCore::ScriptDebugServer::didExecuteProgram):
3277
3278 2013-11-04  Bem Jones-Bey  <bjonesbe@adobe.com>
3279
3280         [css shapes] Fix support for shape-outside on a float with padding
3281         https://bugs.webkit.org/show_bug.cgi?id=123590
3282
3283         Reviewed by Alexandru Chiculita.
3284
3285         The line top was being improperly converted to the coordinates of the
3286         shape, causing the shape to be positioned incorrectly when the float
3287         had padding. This fixes that problem.
3288
3289         No new tests, covered by updates to existing ones.
3290
3291         * rendering/shapes/ShapeOutsideInfo.cpp:
3292         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
3293
3294 2013-11-04  Alexey Proskuryakov  <ap@apple.com>
3295
3296         Implement generateKey for HMAC and AES-CBC
3297         https://bugs.webkit.org/show_bug.cgi?id=123669
3298
3299         Reviewed by Dan Bernstein.
3300
3301         Tests: crypto/subtle/aes-cbc-generate-key.html
3302                crypto/subtle/hmac-generate-key.html
3303
3304         * WebCore.xcodeproj/project.pbxproj: Added new files.
3305
3306         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
3307         (WebCore::createAesKeyGenParams): Added bindings for AesKeyGenParams.
3308         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Handle
3309         algorithms that generate AES and HMAC keys.
3310
3311         * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::generateKey): Added.
3312
3313         * crypto/CryptoAlgorithmAesKeyGenParams.h: Added.
3314
3315         * crypto/CryptoKey.cpp: (WebCore::CryptoKey::randomData):
3316         * crypto/CryptoKey.h:
3317         * crypto/CryptoKeyMac.cpp: Added
3318         Expose a function that produces random data for symmetric crypto keys. Cross-platform
3319         implementation uses ARC4 code from WTF, while Mac uses a system function that
3320         provides a FIPS validated random number generator.
3321
3322         * crypto/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::generate):
3323         * crypto/CryptoKeyAES.h:
3324         Added a function that creates AES keys.
3325
3326         * crypto/SubtleCrypto.idl: Added generateKey.
3327
3328         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
3329         (WebCore::CryptoAlgorithmAES_CBC::generateKey): Added.
3330
3331         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
3332         (WebCore::CryptoAlgorithmHMAC::generateKey): Added.
3333
3334         * crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::generate):
3335         * crypto/keys/CryptoKeyHMAC.h:
3336         Added a function that creates HMAC keys.
3337
3338         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: Removed generateKey stub, the implementation
3339         ended up in cross-platform file.
3340
3341         * crypto/mac/CryptoAlgorithmHMACMac.cpp: Ditto.
3342
3343 2013-11-04  Daniel Bates  <dabates@apple.com>
3344
3345         Revert SetCGFontRenderingMode() build fix for Chromium Mac
3346         https://bugs.webkit.org/show_bug.cgi?id=123633
3347
3348         Reviewed by Darin Adler.
3349
3350         Reverts <http://trac.webkit.org/changeset/134380>, which
3351         was a Chromium Mac build fix for <http://trac.webkit.org/changeset/134348>
3352         (https://bugs.webkit.org/show_bug.cgi?id=101787). Chromium doesn't
3353         build against top-of-tree WebKit.
3354
3355         * platform/graphics/mac/FontMac.mm:
3356         (WebCore::Font::drawGlyphs):
3357         * platform/mac/WebCoreSystemInterface.h:
3358         * platform/mac/WebCoreSystemInterface.mm:
3359
3360 2013-11-04  Commit Queue  <commit-queue@webkit.org>
3361
3362         Unreviewed, rolling out r158526.
3363         http://trac.webkit.org/changeset/158526
3364         https://bugs.webkit.org/show_bug.cgi?id=123744
3365
3366         it broke the build (Requested by jessieberlin on #webkit).
3367
3368         * WebCore.xcodeproj/project.pbxproj:
3369         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
3370         (WebCore::createAesCbcParams):
3371         (WebCore::createHmacParams):
3372         (WebCore::createHmacKeyParams):
3373         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
3374         * bindings/js/JSSubtleCryptoCustom.cpp:
3375         * crypto/CryptoAlgorithmAesKeyGenParams.h: Removed.
3376         * crypto/CryptoKey.cpp:
3377         * crypto/CryptoKey.h:
3378         * crypto/CryptoKeyAES.cpp:
3379         * crypto/CryptoKeyAES.h:
3380         * crypto/CryptoKeyMac.cpp: Removed.
3381         * crypto/SubtleCrypto.idl:
3382         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
3383         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
3384         * crypto/keys/CryptoKeyHMAC.cpp:
3385         * crypto/keys/CryptoKeyHMAC.h:
3386         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
3387         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
3388         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
3389         (WebCore::CryptoAlgorithmHMAC::generateKey):
3390
3391 2013-11-04  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
3392
3393         [Texmap] Remove redundant calls in CoordinatedGraphicsScene
3394         https://bugs.webkit.org/show_bug.cgi?id=123737
3395
3396         Reviewed by Noam Rosenthal.
3397
3398         Removing unused code left after few refactoring patches.
3399
3400         No new tests. Covered by existing ones.
3401
3402         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
3403         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
3404
3405 2013-11-04  Andreas Kling  <akling@apple.com>
3406
3407         CSSPrimitiveValue color constructors should return PassRef.
3408         <https://webkit.org/b/123728>
3409
3410         Make CSSPrimitiveValue::createColor() and the corresponding
3411         CSSValuePool helper functions return PassRef<CSSPrimitiveValue>.
3412
3413         Also made CSSValuePool slightly less stupid when hitting the upper
3414         size limit on the color value cache: instead of throwing out cache
3415         and rebuilding it from scratch, just remove one value at random.
3416
3417         Reviewed by Antti Koivisto.
3418
3419 2013-11-04  Andreas Kling  <akling@apple.com>
3420
3421         Some more RenderChildIterator deployment.
3422         <https://webkit.org/b/123735>
3423
3424         Convert another handful of loops to use childrenOfType<RenderFoo>
3425         iterators, mostly for skipping over uninteresting text renderers.
3426
3427         Reviewed by Antti Koivisto.
3428
3429 2013-11-04  Andreas Kling  <akling@apple.com>
3430
3431         LabelsNodeList always is always rooted at a LabelableElement.
3432         <https://webkit.org/b/123730>
3433
3434         Tighten up LabelsNodeList by enforcing that it's only rooted to
3435         a LabelableElement. Also marked the class FINAL and made its
3436         create() helper return PassRef.
3437
3438         Reviewed by Antti Koivisto.
3439
3440 2013-11-04  Andreas Kling  <akling@apple.com>
3441
3442         REGRESSION: RenderStyle is leaked when not creating renderer for display:none
3443         <https://webkit.org/b/123726>
3444
3445         Explicitly drop the RenderStyle reference in RenderElement::createFor
3446         if we decide to not create any renderer.
3447
3448         Reviewed by Antti Koivisto.
3449
3450         Test: fast/css/renderstyle-leak-with-display-none.html
3451
3452         * rendering/RenderElement.cpp:
3453         (WebCore::RenderElement::createFor):
3454
3455 2013-11-04  Santosh Mahto  <santosh.ma@samsung.com>
3456
3457         [webcore/dom] Remove extra header includes from cpp files.
3458         https://bugs.webkit.org/show_bug.cgi?id=123720
3459
3460         Reviewed by Andreas Kling.
3461
3462         Removing redundant headers from dom related cpp files.
3463
3464         * dom/Attr.cpp:
3465         * dom/CharacterData.cpp:
3466         * dom/ChildListMutationScope.cpp:
3467         * dom/ChildNodeList.cpp:
3468         * dom/ContainerNode.cpp:
3469         * dom/ContainerNodeAlgorithms.cpp:
3470         * dom/DOMNamedFlowCollection.cpp:
3471         * dom/DatasetDOMStringMap.cpp:
3472         * dom/Document.cpp:
3473         * dom/DocumentEventQueue.cpp:
3474         * dom/DocumentMarkerController.cpp:
3475         * dom/DocumentOrderedMap.cpp:
3476         * dom/DocumentStyleSheetCollection.cpp:
3477         * dom/Element.cpp:
3478         * dom/ElementRareData.cpp:
3479         * dom/Event.cpp:
3480         * dom/EventContext.cpp:
3481         * dom/EventDispatcher.cpp:
3482         * dom/EventTarget.cpp:
3483         * dom/ExceptionBase.cpp:
3484         * dom/FocusEvent.cpp:
3485         * dom/InlineStyleSheetOwner.cpp:
3486         * dom/KeyboardEvent.cpp:
3487         * dom/LiveNodeList.cpp:
3488         * dom/MessageEvent.cpp:
3489         * dom/MessagePort.cpp:
3490         * dom/MouseRelatedEvent.cpp:
3491         * dom/MutationEvent.cpp:
3492         * dom/MutationObserver.cpp:
3493         * dom/MutationObserverInterestGroup.cpp:
3494         * dom/MutationObserverRegistration.cpp:
3495         * dom/MutationRecord.cpp:
3496         * dom/NameNodeList.cpp:
3497         * dom/NamedFlowCollection.cpp:
3498         * dom/NamedNodeMap.cpp:
3499         * dom/Node.cpp:
3500         * dom/NodeIterator.cpp:
3501         * dom/NodeTraversal.cpp:
3502         * dom/PositionIterator.cpp:
3503         * dom/ProcessingInstruction.cpp:
3504         * dom/Range.cpp:
3505         * dom/RegisteredEventListener.cpp:
3506         * dom/ScopedEventQueue.cpp:
3507         * dom/ScriptElement.cpp:
3508         * dom/ScriptRunner.cpp:
3509         * dom/SelectorQuery.cpp:
3510         * dom/ShadowRoot.cpp:
3511         * dom/StyledElement.cpp:
3512         * dom/TagNodeList.cpp:
3513         * dom/Text.cpp:
3514         * dom/TextEvent.cpp:
3515         * dom/TouchEvent.cpp:
3516         * dom/TreeScope.cpp:
3517         * dom/TreeScopeAdopter.cpp:
3518         * dom/TreeWalker.cpp:
3519         * dom/UIEvent.cpp:
3520         * dom/UserActionElementSet.cpp:
3521         * dom/UserTypingGestureIndicator.cpp:
3522         * dom/VisitedLinkState.cpp:
3523         * dom/WebKitNamedFlow.cpp:
3524
3525 2013-11-04  Andreas Kling  <akling@apple.com>
3526
3527         HTMLAllCollection is always rooted at a Document.
3528         <https://webkit.org/b/123724>
3529
3530         Tighten up HTMLAllCollection by making the constructor take a
3531         Document& instead of a ContainerNode&. Drive-by application of
3532         FINAL and PassRef also happened.
3533
3534         Reviewed by Antti Koivisto.
3535
3536 2013-11-04  Andreas Kling  <akling@apple.com>
3537
3538         Make more CSSValue subclass constructors return PassRef.
3539         <https://webkit.org/b/123731>
3540
3541         Make the constructor helpers for the following classes return
3542         PassRef instead of PassRefPtr:
3543
3544             - CSSFontValue
3545             - CSSImageSetValue
3546             - CSSUnicodeRangeValue
3547             - WebKitCSSArrayFunctionValue
3548             - WebKitCSSFilterValue
3549             - WebKitCSSMatFunctionValue
3550             - WebKitCSSMixFunctionValue
3551             - WebKitCSSShaderValue
3552             - WebKitCSSTransformValue
3553
3554         Reviewed by Antti Koivisto.
3555
3556 2013-11-04  Jozsef Berta  <jberta@inf.u-szeged.hu>
3557
3558         Buildfix after r158182 for GCC 4.6
3559         https://bugs.webkit.org/show_bug.cgi?id=123442
3560
3561         Reviewed by Csaba Osztrogonác.
3562
3563         Added explicit "friend class", because  GCC 4.6 doesn't support extended friend declaration (c++11)
3564
3565         * dom/ScopedEventQueue.h:
3566
3567 2013-11-04  Andreas Kling  <akling@apple.com>
3568
3569         HTMLTableRowsCollection is always rooted at a HTMLTableElement.
3570         <https://webkit.org/b/123721>
3571
3572         Tighten up HTMLTableRowsCollection by making the create() helper
3573         take a HTMLTableElement& and adding a HTMLSelectElement& getter.
3574
3575         Reviewed by Antti Koivisto.
3576
3577 2013-11-04  Andreas Kling  <akling@apple.com>
3578
3579         HTMLNameCollection and friends are always rooted at a Document.
3580         <https://webkit.org/b/123722>
3581
3582         Tighten WindowNameCollection and DocumentNameCollection by making
3583         their constructors take a Document&, and add a slightly better
3584         document() than the one we inherit from LiveNodeListBase.
3585
3586         Also marked the classes FINAL and made create() helpers return
3587         PassRef instead of PassRefPtr.
3588
3589         Reviewed by Antti Koivisto.
3590
3591 2013-11-04  Andreas Kling  <akling@apple.com>
3592
3593         Add an ancestor renderer iterator.
3594         <https://webkit.org/b/123718>
3595
3596         Add ancestor iterators for renderers, analogous to element ancestor
3597         iterators. They walk the chain of parent renderers, stopping at each
3598         ancestor of a certain type.
3599
3600         Just like child renderer iterators, this requires isRendererOfType()
3601         to be implemented for the targeted renderer class.
3602
3603         You use them like this:
3604
3605         auto frameSets = ancestorsOfType<RenderFrameSet>(*this);
3606         for (auto frameSet = frameSets.begin(), end = frameSets.end(); frameSet != end; ++frameSet)
3607             frameSet->thisOrThat();
3608
3609         To complete the patch, I put them to use in a couple of random places.
3610
3611         Reviewed by Antti Koivisto.
3612
3613 2013-11-04  Mihnea Ovidenie  <mihnea@adobe.com>
3614
3615         [CSSRegions] Use auto keyword to clean-up for loops
3616         https://bugs.webkit.org/show_bug.cgi?id=123699
3617
3618         Reviewed by Anders Carlsson.
3619
3620         Start using auto keyword for loops.
3621         Also, since region breaks (forced breaks) can be added only on boxes,
3622         i changed RenderFlowThread::addForcedRegionBreak to use a RenderBox* instead of RenderObject*.
3623
3624         No change in functionality, no new tests.
3625
3626         * dom/WebKitNamedFlow.cpp:
3627         (WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
3628         * rendering/FlowThreadController.cpp:
3629         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
3630         (WebCore::FlowThreadController::styleDidChange):
3631         (WebCore::FlowThreadController::layoutRenderNamedFlowThreads):
3632         (WebCore::FlowThreadController::updateFlowThreadsChainIfNecessary):
3633         (WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
3634         (WebCore::FlowThreadController::updateFlowThreadsNeedingTwoStepLayout):
3635         (WebCore::FlowThreadController::resetFlowThreadsWithAutoHeightRegions):
3636         (WebCore::FlowThreadController::updateFlowThreadsIntoConstrainedPhase):
3637         (WebCore::FlowThreadController::updateFlowThreadsIntoOverflowPhase):
3638         (WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
3639         (WebCore::FlowThreadController::updateFlowThreadsIntoFinalPhase):
3640         (WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded):
3641         (WebCore::FlowThreadController::collectFixedPositionedLayers):
3642         (WebCore::FlowThreadController::isAutoLogicalHeightRegionsCountConsistent):
3643         * rendering/RenderFlowThread.cpp:
3644         (WebCore::RenderFlowThread::validateRegions):
3645         (WebCore::RenderFlowThread::hasCompositingRegionDescendant):
3646         (WebCore::RenderFlowThread::getLayerListForRegion):
3647         (WebCore::RenderFlowThread::updateLayerToRegionMappings):
3648         (WebCore::RenderFlowThread::updateLogicalWidth):
3649         (WebCore::RenderFlowThread::computeLogicalHeight):
3650         (WebCore::RenderFlowThread::repaintRectangleInRegions):
3651         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
3652         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
3653         (WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
3654         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
3655         (WebCore::RenderFlowThread::setRegionRangeForBox):
3656         (WebCore::RenderFlowThread::getRegionRangeForBox):
3657         (WebCore::RenderFlowThread::regionInRange):
3658         (WebCore::RenderFlowThread::checkRegionsWithStyling):
3659         (WebCore::RenderFlowThread::objectInFlowRegion):
3660         (WebCore::RenderFlowThread::isAutoLogicalHeightRegionsCountConsistent):
3661         (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
3662         (WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
3663         (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
3664         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
3665         (WebCore::RenderFlowThread::addForcedRegionBreak):
3666         (WebCore::RenderFlowThread::collectLayerFragments):
3667         (WebCore::RenderFlowThread::fragmentsBoundingBox):
3668         (WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
3669         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
3670         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
3671         (WebCore::RenderFlowThread::addRegionsLayoutOverflow):
3672         (WebCore::RenderFlowThread::clearRegionsOverflow):
3673         * rendering/RenderFlowThread.h:
3674         * rendering/RenderNamedFlowThread.cpp:
3675         (WebCore::RenderNamedFlowThread::nextRendererForNode):
3676         (WebCore::RenderNamedFlowThread::previousRendererForNode):
3677         (WebCore::RenderNamedFlowThread::dependsOn):
3678         (WebCore::addRegionToList):
3679         (WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
3680         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
3681         (WebCore::RenderNamedFlowThread::pushDependencies):
3682         * rendering/RenderRegion.cpp:
3683         (WebCore::RenderRegion::setRegionObjectsRegionStyle):
3684         (WebCore::RenderRegion::restoreRegionObjectsOriginalStyle):
3685         (WebCore::RenderRegion::computeChildrenStyleInRegion):
3686
3687 2013-11-03  Zan Dobersek  <zdobersek@igalia.com>
3688
3689         PingLoader objects unnecessarily pass through OwnPtr
3690         https://bugs.webkit.org/show_bug.cgi?id=122942
3691
3692         Reviewed by Darin Adler.
3693
3694         There's no need to store new PingLoader objects into an OwnPtr just to leak them out a few lines later
3695         into an unused variable. New objects are created through a new helper method and then left unmanaged as
3696         they're guaranteed to destroy themselves when they receive a response of any kind.
3697
3698         * loader/PingLoader.cpp:
3699         (WebCore::PingLoader::loadImage): Call the new createPingLoader method to spawn the PingLoader.
3700         (WebCore::PingLoader::sendPing): Ditto.
3701         (WebCore::PingLoader::sendViolationReport): Ditto.
3702         (WebCore::PingLoader::createPingLoader): A helper method that creates a new PingLoader object
3703         * loader/PingLoader.h: Declare the new PingLoader::createPingLoader method.
3704
3705 2013-11-03  Andreas Kling  <akling@apple.com>
3706
3707         HTMLOptionsCollection is always rooted at a HTMLSelectElement.
3708         <https://webkit.org/b/123719>
3709
3710         Tighten up HTMLOptionsCollection by making the constructor take
3711         a HTMLSelectElement& and adding a HTMLSelectElement& getter instead
3712         of casting all over the place. Removed now-pointless assertions.
3713
3714         Reviewed by Sam Weinig.
3715
3716 2013-11-03  Andreas Kling  <akling@apple.com>
3717
3718         RenderTextFragment: Tighten first-letter logic.
3719         <https://webkit.org/b/123714>
3720
3721         Reviewed by Antti Koivisto.
3722
3723         * editing/TextIterator.cpp:
3724         (WebCore::firstRenderTextInFirstLetter):
3725
3726             Use iterator helper to find first RenderText child.
3727
3728         (WebCore::TextIterator::handleTextNodeFirstLetter):
3729
3730             Tightening through type inference.
3731
3732         * rendering/RenderBlock.cpp:
3733         (WebCore::RenderBlock::updateFirstLetterStyle):
3734         (WebCore::RenderBlock::createFirstLetterRenderer):
3735         * rendering/RenderTextFragment.h:
3736
3737             The first letter renderer is always a RenderBoxModelObject,
3738             so make the code deal in that instead of RenderObject.
3739
3740         * rendering/RenderChildIterator.h:
3741         (WebCore::RenderChildIteratorAdapter::first):
3742         (WebCore::RenderChildIteratorAdapter::last):
3743
3744             Remove excess ampersands that were keeping this from building.
3745
3746 2013-11-03  Andreas Kling  <akling@apple.com>
3747
3748         CSSPrimitiveValue identifier constructors should return PassRef.
3749         <https://webkit.org/b/123712>
3750
3751         Make CSSPrimitiveValue::createIdentifier() and the corresponding
3752         CSSValuePool helper return PassRef<CSSPrimitiveValue>.
3753
3754         Reviewed by Antti Koivisto.
3755
3756 2013-11-03  Andreas Kling  <akling@apple.com>
3757
3758         Use RenderChildIterator in two more loops.
3759         <https://webkit.org/b/123713>
3760
3761         Switch two more renderer child traversal loops to childrenOfType.
3762
3763         Reviewed by Antti Koivisto.
3764
3765 2013-11-03  Andreas Kling  <akling@apple.com>
3766
3767         CSSShadowValue constructor should return PassRef.
3768         <https://webkit.org/b/123711>
3769
3770         Make CSSShadowValue::create() return a PassRef since it will never
3771         return null.
3772
3773         Reviewed by Sam Weinig.
3774
3775 2013-11-03  Andreas Kling  <akling@apple.com>
3776
3777         CSSLineBoxContainValue constructor should return PassRef.
3778         <https://webkit.org/b/123710>
3779
3780         Make CSSLineBoxContainValue::create() return a PassRef since it
3781         will never return null.
3782
3783         Reviewed by Sam Weinig.
3784
3785 2013-11-03  Antti Koivisto  <antti@apple.com>
3786
3787         LiveNodeLists should have non-null ContainerNode as root
3788         https://bugs.webkit.org/show_bug.cgi?id=123709
3789
3790         Reviewed by Andreas Kling.
3791
3792         After moving ChildNodeList off from LiveNodeList the root is now always at least a ContainerNode.
3793
3794         * dom/ContainerNode.cpp:
3795         (WebCore::ContainerNode::getElementsByTagName):
3796         (WebCore::ContainerNode::getElementsByTagNameNS):
3797         (WebCore::ContainerNode::getElementsByName):
3798         (WebCore::ContainerNode::getElementsByClassName):
3799         (WebCore::ContainerNode::radioNodeList):
3800         
3801             Also these move from Node to ContainerNode to make tighter typing work.
3802
3803 2013-11-03  Antti Koivisto  <antti@apple.com>
3804
3805         Switch createContextualFragment to element iterator
3806         https://bugs.webkit.org/show_bug.cgi?id=123704
3807
3808         Reviewed by Andreas Kling.
3809
3810         * editing/FrameSelection.cpp:
3811         (WebCore::scanForForm):
3812         
3813             Use type helpers instead of hasTagName
3814
3815         * editing/markup.cpp:
3816         (WebCore::collectElementsToRemoveFromFragment):
3817         (WebCore::removeElementFromFragmentPreservingChildren):
3818         (WebCore::createContextualFragment):
3819         * html/HTMLFormElement.cpp:
3820         (WebCore::HTMLFormElement::formElementIndex):
3821         
3822             Use type helpers instead of hasTagName
3823
3824         * html/HTMLTagNames.in:
3825         
3826             Generate type helpers for <html>.
3827
3828 2013-11-03  Antti Koivisto  <antti@apple.com>
3829
3830         ChildNodeList should not be LiveNodeList
3831         https://bugs.webkit.org/show_bug.cgi?id=123708
3832
3833         Reviewed by Sam Weinig.
3834
3835         ChildNodeList is a poor fit to be a LiveNodeList. It is heavily special-cased. It is also
3836         the only subtype that returns non-Elements thus preventing tightening.
3837
3838         * bindings/js/JSNodeListCustom.cpp:
3839         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
3840         
3841             Support new types.
3842
3843         * dom/ChildNodeList.cpp:
3844         (WebCore::EmptyNodeList::~EmptyNodeList):
3845         (WebCore::ChildNodeList::ChildNodeList):
3846         (WebCore::ChildNodeList::~ChildNodeList):
3847         (WebCore::ChildNodeList::length):
3848         (WebCore::childFromFirst):
3849         (WebCore::childFromLast):
3850         (WebCore::ChildNodeList::nodeBeforeCached):
3851         (WebCore::ChildNodeList::nodeAfterCached):
3852         (WebCore::ChildNodeList::item):
3853         (WebCore::ChildNodeList::namedItem):
3854         (WebCore::ChildNodeList::invalidateCache):
3855         
3856             Implement the same caching optimizations as LiveNodeList with tighter, less generic code.
3857
3858         * dom/ChildNodeList.h:
3859         
3860             Inherit ChildNodeList directly from NodeList.
3861
3862             Add new EmptyNodeList type. This is only ever used if NodeList is requested for a non-container node.
3863             It allows tighter typing in ChildNodeList.
3864
3865         * dom/LiveNodeList.cpp:
3866         (WebCore::LiveNodeList::namedItem):
3867         * dom/LiveNodeList.h:
3868         (WebCore::LiveNodeListBase::LiveNodeListBase):
3869         (WebCore::LiveNodeListBase::~LiveNodeListBase):
3870         (WebCore::LiveNodeList::LiveNodeList):
3871         
3872             Remove ChildNodeList specific code and branches.
3873
3874         * dom/Node.cpp:
3875         (WebCore::Node::childNodes):
3876         
3877             Return EmptyNodeList for non-containers.
3878
3879         * dom/NodeList.h:
3880         (WebCore::NodeList::~NodeList):
3881         (WebCore::NodeList::isLiveNodeList):
3882         (WebCore::NodeList::isChildNodeList):
3883         (WebCore::NodeList::isEmptyNodeList):
3884         
3885             For isReachableFromOpaqueRoots.
3886
3887         * dom/NodeRareData.h:
3888         (WebCore::NodeListsNodeData::ensureChildNodeList):
3889         (WebCore::NodeListsNodeData::removeChildNodeList):
3890         (WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
3891         (WebCore::NodeListsNodeData::removeEmptyChildNodeList):
3892         (WebCore::NodeListsNodeData::NodeListsNodeData):
3893         (WebCore::NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList):
3894         
3895             EmptyNodeList support.
3896
3897         * html/CollectionType.h:
3898         * html/HTMLCollection.cpp:
3899         (WebCore::shouldOnlyIncludeDirectChildren):
3900         (WebCore::rootTypeFromCollectionType):
3901         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
3902         (WebCore::isMatchingElement):
3903         (WebCore::LiveNodeListBase::itemBefore):
3904         (WebCore::LiveNodeListBase::traverseLiveNodeListFirstElement):
3905         (WebCore::LiveNodeListBase::traverseLiveNodeListForwardToOffset):
3906         (WebCore::LiveNodeListBase::item):
3907         (WebCore::LiveNodeListBase::itemBeforeOrAfterCachedItem):
3908         
3909             Remove ChildNodeList specific code and branches.
3910
3911 2013-11-03  Patrick Gansterer  <paroga@webkit.org>
3912
3913         [WINCE] Replace OwnPtr with GDIObject
3914         https://bugs.webkit.org/show_bug.cgi?id=123670
3915
3916         Reviewed by Anders Carlsson.
3917
3918         * page/win/FrameGdiWin.cpp:
3919         (WebCore::imageFromRect):
3920         * platform/graphics/wince/FontPlatformData.cpp:
3921         (WebCore::FixedSizeFontData::create):
3922         (WebCore::FontPlatformData::hfont):
3923         (WebCore::FontPlatformData::getScaledFontHandle):
3924         * platform/graphics/wince/GraphicsContextWinCE.cpp:
3925         (WebCore::createPen):
3926         (WebCore::createBrush):
3927         (WebCore::GraphicsContext::drawRect):
3928         (WebCore::GraphicsContext::drawLine):
3929         (WebCore::GraphicsContext::drawEllipse):
3930         (WebCore::GraphicsContext::drawConvexPolygon):
3931         (WebCore::GraphicsContext::fillRect):
3932         (WebCore::GraphicsContext::clip):
3933         (WebCore::GraphicsContext::strokeRect):
3934         (WebCore::GraphicsContext::fillRoundedRect):
3935         (WebCore::GraphicsContext::drawRoundCorner):
3936         (WebCore::GraphicsContext::fillPath):
3937         (WebCore::GraphicsContext::strokePath):
3938         (WebCore::GraphicsContext::drawText):
3939         * platform/graphics/wince/ImageWinCE.cpp:
3940         (WebCore::BitmapImage::getHBITMAPOfSize):
3941         * platform/graphics/wince/SharedBitmap.cpp:
3942         (WebCore::SharedBitmap::createHandle):
3943         (WebCore::SharedBitmap::draw):
3944         (WebCore::SharedBitmap::clipBitmap):
3945         (WebCore::drawPatternSimple):
3946         (WebCore::SharedBitmap::drawPattern):
3947         (WebCore::SharedBitmap::DCProvider::getDC):
3948         * platform/graphics/wince/SharedBitmap.h:
3949
3950 2013-11-03  Antti Koivisto  <antti@apple.com>
3951
3952         Add helpers for partial descendant traversal to element iterators
3953         https://bugs.webkit.org/show_bug.cgi?id=123703
3954
3955         Reviewed by Andreas Kling.
3956
3957         * dom/ElementAncestorIterator.h:
3958         (WebCore::lineageOfType):
3959         
3960             lineageOfType definition didn't match the declaration.
3961
3962         * dom/ElementDescendantIterator.h:
3963         (WebCore::::find):
3964         (WebCore::::from):
3965         
3966             Add find and from for getting begin iterator for partial traversals.
3967
3968         * editing/FrameSelection.cpp:
3969         (WebCore::scanForForm):
3970         (WebCore::FrameSelection::currentForm):
3971         * html/HTMLFormElement.cpp:
3972         (WebCore::HTMLFormElement::formElementIndex):
3973         (WebCore::HTMLFormElement::findClosestFormAncestor):
3974         
3975             Use them in a few places.
3976
3977 2013-11-03  Andreas Kling  <akling@apple.com>
3978
3979         Inline RenderStyle functions for getting/setting pseudo style bits.
3980         <https://webkit.org/b/123702>
3981
3982         hasPseudoStyle() actually shows up on html5-full-render.html,
3983         and it's pretty crazy to eat the cost of a function call just
3984         to do some basic bit twiddling.
3985
3986         Reviewed by Antti Koivisto.
3987
3988 2013-11-03  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3989
3990         Remove HTMLMediaElement.initialTime
3991         https://bugs.webkit.org/show_bug.cgi?id=123572
3992
3993         Reviewed by Eric Carlson.
3994
3995         Patch based on one by: philipj@opera.com
3996         Blink review URL: https://codereview.chromium.org/35033002
3997
3998         initialTime has been removed from the HTMLMediaElement.
3999
4000         * bindings/gobject/WebKitDOMCustom.cpp:
4001         (webkit_dom_html_media_element_get_initial_time):
4002         * bindings/gobject/WebKitDOMCustom.h:
4003         * bindings/gobject/WebKitDOMCustom.symbols: Added phony function.
4004         * html/HTMLMediaElement.cpp:
4005         * html/HTMLMediaElement.h:
4006         * html/HTMLMediaElement.idl: Removed HTMLMediaElement::initialTime.
4007
4008 2013-11-02  Alexey Proskuryakov  <ap@apple.com>
4009
4010         Implement generateKey for HMAC and AES-CBC
4011         https://bugs.webkit.org/show_bug.cgi?id=123669
4012
4013         Reviewed by Dan Bernstein.
4014
4015         Tests: crypto/subtle/aes-cbc-generate-key.html
4016                crypto/subtle/hmac-generate-key.html
4017
4018         * WebCore.xcodeproj/project.pbxproj: Added new files.
4019
4020         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
4021         (WebCore::createAesKeyGenParams): Added bindings for AesKeyGenParams.
4022         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Handle
4023         algorithms that generate AES and HMAC keys.
4024
4025         * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::generateKey): Added.
4026
4027         * crypto/CryptoAlgorithmAesKeyGenParams.h: Added.
4028
4029         * crypto/CryptoKey.cpp: (WebCore::CryptoKey::randomData):
4030         * crypto/CryptoKey.h:
4031         * crypto/CryptoKeyMac.cpp: Added
4032         Expose a function that produces random data for symmetric crypto keys. Cross-platform
4033         implementation uses ARC4 code from WTF, while Mac uses a system function that
4034         provides a FIPS validated random number generator.
4035
4036         * crypto/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::generate):
4037         * crypto/CryptoKeyAES.h:
4038         Added a function that creates AES keys.
4039
4040         * crypto/SubtleCrypto.idl: Added generateKey.
4041
4042         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
4043         (WebCore::CryptoAlgorithmAES_CBC::generateKey): Added.
4044
4045         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
4046         (WebCore::CryptoAlgorithmHMAC::generateKey): Added.
4047
4048         * crypto/keys/CryptoKeyHMAC.cpp: (WebCore::CryptoKeyHMAC::generate):
4049         * crypto/keys/CryptoKeyHMAC.h:
4050         Added a function that creates HMAC keys.
4051